summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-21 05:20:03 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-21 05:20:03 (GMT)
commit8079a0c5b4ee6550501476410fab457d63c705b6 (patch)
tree6d7bb6335ebe494546296911b1ff1239335212b9 /src
parent5a3db7268eb9203e91fc09e5db6d8690274464d7 (diff)
parent6ca14dce65634e202b36499c76c268c87f78ceb6 (diff)
downloadQt-8079a0c5b4ee6550501476410fab457d63c705b6.zip
Qt-8079a0c5b4ee6550501476410fab457d63c705b6.tar.gz
Qt-8079a0c5b4ee6550501476410fab457d63c705b6.tar.bz2
Merge commit 'qt/master' into graphicseffects
Conflicts: src/gui/graphicsview/graphicsview.pri src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicsscene.h src/gui/graphicsview/qgraphicsview.cpp
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.c2
-rw-r--r--src/3rdparty/phonon/ds9/backend.cpp6
-rw-r--r--src/3rdparty/phonon/ds9/backendnode.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/fakesource.cpp34
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.cpp11
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp64
-rw-r--r--src/3rdparty/phonon/ds9/qaudiocdreader.cpp54
-rw-r--r--src/3rdparty/phonon/ds9/qmeminputpin.cpp6
-rw-r--r--src/3rdparty/phonon/ds9/qpin.cpp31
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.cpp32
-rw-r--r--src/3rdparty/phonon/ds9/videowidget.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/volumeeffect.cpp12
-rw-r--r--src/3rdparty/phonon/phonon/audiooutput.cpp14
-rw-r--r--src/3rdparty/phonon/phonon/backendcapabilities.cpp14
-rw-r--r--src/3rdparty/phonon/phonon/backendcapabilities.h13
-rw-r--r--src/3rdparty/phonon/phonon/effect.cpp6
-rw-r--r--src/3rdparty/phonon/phonon/effectwidget.cpp10
-rw-r--r--src/3rdparty/phonon/phonon/factory.cpp43
-rw-r--r--src/3rdparty/phonon/phonon/medianode.cpp4
-rw-r--r--src/3rdparty/phonon/phonon/mediaobject.cpp12
-rw-r--r--src/3rdparty/phonon/phonon/mediaobject.h22
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp4
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h8
-rw-r--r--src/3rdparty/phonon/phonon/path.cpp24
-rw-r--r--src/3rdparty/webkit/ChangeLog69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog461
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi452
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp25
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h39
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h14
-rwxr-xr-xsrc/3rdparty/webkit/JavaScriptCore/create_hash_table2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp1002
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h109
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h19
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp562
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp13
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jsc.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h5
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h7
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h3
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp53
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp3
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp21
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h7
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h3
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp7
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h18
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h15
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp216
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp2
-rw-r--r--src/3rdparty/webkit/VERSION6
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog5485
-rw-r--r--src/3rdparty/webkit/WebCore/DerivedSources.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.gypi3334
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.order1
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro50
-rw-r--r--src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h5
-rw-r--r--src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.h1
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp93
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h12
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.h5
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp83
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h56
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerCustom.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm14
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm103
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_array.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_method.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_object.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_root.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_root.h2
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParser.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h10
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRule.idl1
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelector.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelector.h3
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h7
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValue.idl1
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in4
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaList.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQuery.h3
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.h3
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryExp.h6
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheet.idl1
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.h2
-rw-r--r--src/3rdparty/webkit/WebCore/css/html.css (renamed from src/3rdparty/webkit/WebCore/css/html4.css)4
-rw-r--r--src/3rdparty/webkit/WebCore/css/mediaControls.css13
-rw-r--r--src/3rdparty/webkit/WebCore/css/mediaControlsQT.css115
-rw-r--r--src/3rdparty/webkit/WebCore/css/themeWin.css2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Comment.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.h8
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentFragment.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentFragment.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DynamicNodeList.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h9
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EditingText.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.cpp32
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.h2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Event.idl1
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTarget.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTarget.h6
-rw-r--r--src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageChannel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessagePortChannel.cpp17
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Node.cpp28
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Node.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeRareData.h21
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Notation.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/SelectElement.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/dom/SelectElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StyledElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp17
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp21
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/editing/Editor.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h3
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SelectionController.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SmartReplaceICU.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TextIterator.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/editing/gtk/SelectionControllerGtk.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp877
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSGrammar.h109
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c547
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h426
-rw-r--r--src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/Grammar.cpp1002
-rw-r--r--src/3rdparty/webkit/WebCore/generated/Grammar.h109
-rw-r--r--src/3rdparty/webkit/WebCore/generated/HTMLElementFactory.cpp28
-rw-r--r--src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/generated/HTMLNames.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSAttr.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSComment.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSConsole.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCounter.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h7
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocument.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEntity.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEventException.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSFile.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSFileList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHistory.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSImageData.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSLocation.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNode.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNotation.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSONObject.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRange.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRect.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSScreen.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStorage.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSText.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp172
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSValidityState.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorker.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h3
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/Lexer.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/MathObject.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp418
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XPathGrammar.h64
-rw-r--r--src/3rdparty/webkit/WebCore/history/HistoryItem.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/history/HistoryItem.h9
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.h69
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumn.h47
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumn.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumnList.h21
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridDataSource.h7
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in1
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAudioElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBRElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLButtonElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDListElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp75
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h23
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h10
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp27
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormElement.h2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHRElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.h2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl5
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h11
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMenuElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLModElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOListElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionElement.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParamElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParser.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParser.h2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLStyleElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableColElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTagNames.in11
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTitleElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLUListElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp16
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/html/ImageData.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/html/TimeRanges.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/ValidityState.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/html/ValidityState.h59
-rw-r--r--src/3rdparty/webkit/WebCore/html/ValidityState.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.h5
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorController.h4
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.h1
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp21
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h3
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/CallStackSidebarPane.js57
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Console.js94
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/KeyboardShortcut.js108
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js4
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js2
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js61
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/TextPrompt.js5
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc2
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css8
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html1
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js1
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocLoader.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/loader/EmptyClients.h9
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.h8
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h4
-rw-r--r--src/3rdparty/webkit/WebCore/loader/TextDocument.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h4
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseNone.cpp21
-rw-r--r--src/3rdparty/webkit/WebCore/loader/loader.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/loader/loader.h9
-rw-r--r--src/3rdparty/webkit/WebCore/page/ChromeClient.h5
-rw-r--r--src/3rdparty/webkit/WebCore/page/Console.cpp39
-rw-r--r--src/3rdparty/webkit/WebCore/page/Console.h19
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.idl9
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.h4
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.cpp36
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.h4
-rw-r--r--src/3rdparty/webkit/WebCore/page/Frame.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.cpp223
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.h34
-rw-r--r--src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.h5
-rw-r--r--src/3rdparty/webkit/WebCore/page/Settings.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/page/Settings.h8
-rw-r--r--src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp135
-rw-r--r--src/3rdparty/webkit/WebCore/page/XSSAuditor.h24
-rw-r--r--src/3rdparty/webkit/WebCore/page/android/DragControllerAndroid.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/page/android/EventHandlerAndroid.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/AnimationController.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.cpp147
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.h2
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/page/qt/DragControllerQt.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/DragControllerWin.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/FrameWin.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/CrossThreadCopier.h9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DragImage.h4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/FileSystem.h38
-rw-r--r--src/3rdparty/webkit/WebCore/platform/LocalizedStrings.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp56
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h16
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp31
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Scrollbar.h15
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollbarClient.h26
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Theme.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ThemeTypes.h7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Widget.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Widget.h26
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Color.h1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Image.h16
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/LocalizedStringsMac.mm16
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.h7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.mm7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WidgetMac.mm74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.cpp123
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.h114
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorInternalICU.h4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/android/TextBreakIteratorInternalICU.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm96
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginView.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginView.h2
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineBox.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineBox.h39
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h12
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp308
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h97
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderApplet.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderArena.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.h21
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlockLineLayout.cpp (renamed from src/3rdparty/webkit/WebCore/rendering/bidi.cpp)57
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp136
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.h22
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp26
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderImage.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderInline.h5
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp152
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayer.h28
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.cpp19
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.cpp180
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.h30
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListBox.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListBox.h4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMarquee.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMedia.cpp209
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMedia.h25
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMenuList.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderObject.h8
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPart.cpp16
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPart.h4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSlider.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSlider.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableCol.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp31
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp23
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTheme.h10
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.mm30
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp23
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumWin.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeMac.h7
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderView.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp31
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.h7
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RootInlineBox.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.h4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/bidi.h65
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h9
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h5
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.h4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.h2
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Database.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Database.h3
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTask.h15
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseThread.cpp27
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseThread.h8
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageArea.cpp221
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageArea.h44
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp266
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h80
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h3
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespace.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespace.h26
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp129
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/GradientAttributes.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/LinearGradientAttributes.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/PatternAttributes.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/RadialGradientAttributes.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstance.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETileElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGList.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGListTraits.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSetElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformList.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformList.h1
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformable.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SMILTime.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp336
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h23
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp125
-rw-r--r--src/3rdparty/webkit/WebCore/workers/AbstractWorker.h86
-rw-r--r--src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl52
-rw-r--r--src/3rdparty/webkit/WebCore/workers/GenericWorkerTask.h70
-rw-r--r--src/3rdparty/webkit/WebCore/workers/SharedWorker.cpp52
-rw-r--r--src/3rdparty/webkit/WebCore/workers/SharedWorker.h61
-rw-r--r--src/3rdparty/webkit/WebCore/workers/SharedWorker.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/workers/Worker.cpp17
-rw-r--r--src/3rdparty/webkit/WebCore/workers/Worker.h5
-rw-r--r--src/3rdparty/webkit/WebCore/workers/Worker.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp32
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerContext.h9
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerContext.idl8
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerContextProxy.h5
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerLoaderProxy.h2
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp52
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h8
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerObjectProxy.h7
-rw-r--r--src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp36
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h1
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathPath.h3
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit.pri6
-rw-r--r--src/3rdparty/webkit/WebKit/ChangeLog39
-rw-r--r--src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/headers.pri4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp16
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp197
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp73
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp29
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog338
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp75
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp60
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp50
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc3
-rw-r--r--src/activeqt/container/qaxbase.cpp58
-rw-r--r--src/activeqt/container/qaxdump.cpp4
-rw-r--r--src/activeqt/container/qaxobject.cpp12
-rw-r--r--src/activeqt/container/qaxscript.cpp22
-rw-r--r--src/activeqt/container/qaxselect.cpp34
-rw-r--r--src/activeqt/container/qaxwidget.cpp64
-rw-r--r--src/activeqt/control/qaxfactory.cpp12
-rw-r--r--src/activeqt/control/qaxserver.cpp22
-rw-r--r--src/activeqt/control/qaxserverbase.cpp173
-rw-r--r--src/activeqt/control/qaxserverdll.cpp4
-rw-r--r--src/activeqt/control/qaxservermain.cpp15
-rw-r--r--src/activeqt/shared/qaxtypes.cpp13
-rw-r--r--src/corelib/animation/qabstractanimation.cpp54
-rw-r--r--src/corelib/animation/qabstractanimation_p.h7
-rw-r--r--src/corelib/animation/qanimationgroup_p.h4
-rw-r--r--src/corelib/animation/qparallelanimationgroup_p.h4
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp18
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h6
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp4
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h3
-rw-r--r--src/corelib/animation/qvariantanimation.h2
-rw-r--r--src/corelib/animation/qvariantanimation_p.h4
-rw-r--r--src/corelib/codecs/qiconvcodec.cpp6
-rw-r--r--src/corelib/codecs/qtextcodec.cpp51
-rw-r--r--src/corelib/codecs/qtextcodec_p.h27
-rw-r--r--src/corelib/codecs/qutfcodec.cpp349
-rw-r--r--src/corelib/codecs/qutfcodec_p.h53
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.cpp8
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.cpp3
-rw-r--r--src/corelib/global/qglobal.cpp101
-rw-r--r--src/corelib/global/qglobal.h32
-rw-r--r--src/corelib/global/qnamespace.h32
-rw-r--r--src/corelib/global/qt_windows.h37
-rw-r--r--src/corelib/io/qbuffer.cpp2
-rw-r--r--src/corelib/io/qdiriterator.cpp87
-rw-r--r--src/corelib/io/qfileinfo.cpp6
-rw-r--r--src/corelib/io/qfilesystemwatcher_dnotify.cpp20
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp40
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp5
-rw-r--r--src/corelib/io/qfilesystemwatcher_p.h7
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp435
-rw-r--r--src/corelib/io/qfilesystemwatcher_win_p.h53
-rw-r--r--src/corelib/io/qfsfileengine.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_iterator_win.cpp32
-rw-r--r--src/corelib/io/qfsfileengine_p.h4
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp20
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp939
-rw-r--r--src/corelib/io/qprocess_unix.cpp281
-rw-r--r--src/corelib/io/qprocess_win.cpp231
-rw-r--r--src/corelib/io/qresource.cpp4
-rw-r--r--src/corelib/io/qsettings.cpp37
-rw-r--r--src/corelib/io/qsettings_win.cpp209
-rw-r--r--src/corelib/io/qtemporaryfile.cpp20
-rw-r--r--src/corelib/kernel/kernel.pri2
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp25
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp2
-rw-r--r--src/corelib/kernel/qcore_unix.cpp194
-rw-r--r--src/corelib/kernel/qcore_unix_p.h275
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp71
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp106
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h9
-rw-r--r--src/corelib/kernel/qcoreevent.cpp5
-rw-r--r--src/corelib/kernel/qcoreevent.h3
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp35
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp89
-rw-r--r--src/corelib/kernel/qfunctions_wince.cpp12
-rw-r--r--src/corelib/kernel/qfunctions_wince.h6
-rw-r--r--src/corelib/kernel/qmath.h4
-rw-r--r--src/corelib/kernel/qmetaobject.cpp25
-rw-r--r--src/corelib/kernel/qmetatype.cpp7
-rw-r--r--src/corelib/kernel/qmimedata.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp30
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp8
-rw-r--r--src/corelib/kernel/qsharedmemory_win.cpp19
-rw-r--r--src/corelib/kernel/qsystemsemaphore_win.cpp6
-rw-r--r--src/corelib/kernel/qtimer.cpp5
-rw-r--r--src/corelib/kernel/qtranslator.cpp3
-rw-r--r--src/corelib/kernel/qvariant.cpp4
-rw-r--r--src/corelib/plugin/qlibrary.cpp8
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp34
-rw-r--r--src/corelib/plugin/qplugin.h19
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp12
-rw-r--r--src/corelib/thread/qmutex_win.cpp16
-rw-r--r--src/corelib/thread/qthread.cpp11
-rw-r--r--src/corelib/thread/qthread_win.cpp40
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp6
-rw-r--r--src/corelib/tools/qbytedata_p.h203
-rw-r--r--src/corelib/tools/qcontiguouscache.cpp18
-rw-r--r--src/corelib/tools/qdatetime.cpp15
-rw-r--r--src/corelib/tools/qlocale.cpp137
-rw-r--r--src/corelib/tools/qpoint.cpp2
-rw-r--r--src/corelib/tools/qregexp.cpp340
-rw-r--r--src/corelib/tools/qregexp.h2
-rw-r--r--src/corelib/tools/qringbuffer_p.h50
-rw-r--r--src/corelib/tools/qsharedpointer.cpp59
-rw-r--r--src/corelib/tools/qsharedpointer.h3
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h53
-rw-r--r--src/corelib/tools/qstring.cpp122
-rw-r--r--src/corelib/tools/qstring.h2
-rw-r--r--src/corelib/tools/qstringbuilder.h14
-rw-r--r--src/corelib/tools/qtimeline.cpp2
-rw-r--r--src/corelib/tools/qunicodetables.cpp13383
-rw-r--r--src/corelib/tools/qunicodetables_p.h4
-rw-r--r--src/corelib/tools/qvector.h4
-rw-r--r--src/corelib/tools/tools.pri1
-rw-r--r--src/corelib/xml/qxmlstream.cpp2
-rw-r--r--src/dbus/qdbusabstractinterface.cpp252
-rw-r--r--src/dbus/qdbusabstractinterface.h18
-rw-r--r--src/dbus/qdbusabstractinterface_p.h8
-rw-r--r--src/dbus/qdbusargument_p.h3
-rw-r--r--src/dbus/qdbusconnection.cpp7
-rw-r--r--src/dbus/qdbusconnection_p.h5
-rw-r--r--src/dbus/qdbuserror.cpp21
-rw-r--r--src/dbus/qdbuserror.h6
-rw-r--r--src/dbus/qdbusintegrator.cpp100
-rw-r--r--src/dbus/qdbusinterface.cpp146
-rw-r--r--src/dbus/qdbusinternalfilters.cpp167
-rw-r--r--src/dbus/qdbusmarshaller.cpp35
-rw-r--r--src/dbus/qdbusmessage.cpp81
-rw-r--r--src/dbus/qdbusmessage.h6
-rw-r--r--src/dbus/qdbusmessage_p.h11
-rw-r--r--src/dbus/qdbusmisc.cpp47
-rw-r--r--src/dbus/qdbuspendingcall.cpp38
-rw-r--r--src/dbus/qdbuspendingcall.h3
-rw-r--r--src/dbus/qdbuspendingcall_p.h3
-rw-r--r--src/dbus/qdbusutil_p.h68
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp37
-rw-r--r--src/gui/accessible/qaccessible_win.cpp32
-rw-r--r--src/gui/dialogs/qdialog.cpp3
-rw-r--r--src/gui/dialogs/qfiledialog.cpp62
-rw-r--r--src/gui/dialogs/qfiledialog_p.h4
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp667
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp22
-rw-r--r--src/gui/dialogs/qpagesetupdialog_win.cpp7
-rw-r--r--src/gui/dialogs/qprintdialog_win.cpp115
-rw-r--r--src/gui/dialogs/qprogressdialog.cpp2
-rw-r--r--src/gui/dialogs/qsidebar.cpp13
-rw-r--r--src/gui/dialogs/qwizard.cpp18
-rw-r--r--src/gui/dialogs/qwizard_win.cpp4
-rw-r--r--src/gui/dialogs/qwizard_win_p.h2
-rw-r--r--src/gui/embedded/qkbdlinuxinput_qws.cpp1
-rw-r--r--src/gui/embedded/qkbdsl5000_qws.cpp6
-rw-r--r--src/gui/embedded/qkbdtty_qws.cpp4
-rw-r--r--src/gui/embedded/qkbdvfb_qws.cpp9
-rw-r--r--src/gui/embedded/qkbdvr41xx_qws.cpp7
-rw-r--r--src/gui/embedded/qkbdyopy_qws.cpp10
-rw-r--r--src/gui/embedded/qlock.cpp6
-rw-r--r--src/gui/embedded/qmousebus_qws.cpp11
-rw-r--r--src/gui/embedded/qmouselinuxtp_qws.cpp7
-rw-r--r--src/gui/embedded/qmousepc_qws.cpp39
-rw-r--r--src/gui/embedded/qmousevfb_qws.cpp9
-rw-r--r--src/gui/embedded/qmousevr41xx_qws.cpp11
-rw-r--r--src/gui/embedded/qmouseyopy_qws.cpp7
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.cpp20
-rw-r--r--src/gui/embedded/qsoundqss_qws.cpp9
-rw-r--r--src/gui/embedded/qtransportauth_qws.cpp7
-rw-r--r--src/gui/embedded/qunixsocket.cpp18
-rw-r--r--src/gui/graphicsview/graphicsview.pri50
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp428
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h64
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h102
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.cpp36
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp2038
-rw-r--r--src/gui/graphicsview/qgraphicsscene.h43
-rw-r--r--src/gui/graphicsview/qgraphicsscene_bsp.cpp56
-rw-r--r--src/gui/graphicsview/qgraphicsscene_bsp_p.h9
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h138
-rw-r--r--src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp785
-rw-r--r--src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h208
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp245
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.h43
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex.cpp648
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex_p.h182
-rw-r--r--src/gui/graphicsview/qgraphicsscenelinearindex.cpp95
-rw-r--r--src/gui/graphicsview/qgraphicsscenelinearindex_p.h (renamed from src/gui/kernel/qgesturestandardrecognizers_p.h)96
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp272
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h21
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp16
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/image/qpicture.cpp2
-rw-r--r--src/gui/image/qpixmap.cpp7
-rw-r--r--src/gui/image/qpixmap_mac.cpp19
-rw-r--r--src/gui/image/qpixmap_win.cpp12
-rw-r--r--src/gui/image/qpixmapcache.cpp61
-rw-r--r--src/gui/image/qpixmapfilter.cpp10
-rw-r--r--src/gui/inputmethod/qwininputcontext_win.cpp116
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp135
-rw-r--r--src/gui/itemviews/qabstractitemview.h1
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h30
-rw-r--r--src/gui/itemviews/qcolumnview.cpp82
-rw-r--r--src/gui/itemviews/qcolumnview.h8
-rw-r--r--src/gui/itemviews/qcolumnview_p.h9
-rw-r--r--src/gui/itemviews/qdirmodel.cpp5
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp61
-rw-r--r--src/gui/itemviews/qheaderview.cpp26
-rw-r--r--src/gui/itemviews/qheaderview.h3
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp19
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp35
-rw-r--r--src/gui/itemviews/qlistview.cpp155
-rw-r--r--src/gui/itemviews/qlistview_p.h24
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp42
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp13
-rw-r--r--src/gui/itemviews/qtableview.cpp8
-rw-r--r--src/gui/itemviews/qtreeview.cpp210
-rw-r--r--src/gui/itemviews/qtreeview.h12
-rw-r--r--src/gui/itemviews/qtreeview_p.h38
-rw-r--r--src/gui/kernel/kernel.pri13
-rw-r--r--src/gui/kernel/qaction.cpp52
-rw-r--r--src/gui/kernel/qaction.h8
-rw-r--r--src/gui/kernel/qaction_p.h1
-rw-r--r--src/gui/kernel/qapplication.cpp117
-rw-r--r--src/gui/kernel/qapplication.h9
-rw-r--r--src/gui/kernel/qapplication_mac.mm53
-rw-r--r--src/gui/kernel/qapplication_p.h132
-rw-r--r--src/gui/kernel/qapplication_qws.cpp8
-rw-r--r--src/gui/kernel/qapplication_win.cpp615
-rw-r--r--src/gui/kernel/qapplication_x11.cpp29
-rw-r--r--src/gui/kernel/qclipboard_mac.cpp14
-rw-r--r--src/gui/kernel/qclipboard_win.cpp10
-rw-r--r--src/gui/kernel/qcocoapanel_mac.mm6
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm143
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h4
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm6
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm7
-rw-r--r--src/gui/kernel/qcursor_win.cpp48
-rw-r--r--src/gui/kernel/qdesktopwidget.h8
-rw-r--r--src/gui/kernel/qdesktopwidget_mac.mm64
-rw-r--r--src/gui/kernel/qdesktopwidget_mac_p.h3
-rw-r--r--src/gui/kernel/qdesktopwidget_win.cpp139
-rw-r--r--src/gui/kernel/qdesktopwidget_x11.cpp25
-rw-r--r--src/gui/kernel/qdirectionrecognizer.cpp182
-rw-r--r--src/gui/kernel/qdirectionsimplificator_p.h172
-rw-r--r--src/gui/kernel/qdnd_mac.mm4
-rw-r--r--src/gui/kernel/qdnd_p.h2
-rw-r--r--src/gui/kernel/qdnd_win.cpp75
-rw-r--r--src/gui/kernel/qevent.cpp270
-rw-r--r--src/gui/kernel/qevent.h35
-rw-r--r--src/gui/kernel/qevent_p.h16
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm12
-rw-r--r--src/gui/kernel/qgesture.cpp297
-rw-r--r--src/gui/kernel/qgesture.h94
-rw-r--r--src/gui/kernel/qgesture_p.h35
-rw-r--r--src/gui/kernel/qgesturemanager.cpp644
-rw-r--r--src/gui/kernel/qgesturemanager_p.h126
-rw-r--r--src/gui/kernel/qgesturerecognizer.cpp159
-rw-r--r--src/gui/kernel/qgesturestandardrecognizers.cpp306
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp24
-rw-r--r--src/gui/kernel/qguifunctions_wince.h8
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp130
-rw-r--r--src/gui/kernel/qmime_win.cpp148
-rw-r--r--src/gui/kernel/qmultitouch_mac.mm6
-rw-r--r--src/gui/kernel/qmultitouch_mac_p.h4
-rw-r--r--src/gui/kernel/qsound_win.cpp40
-rw-r--r--src/gui/kernel/qstandardgestures.cpp254
-rw-r--r--src/gui/kernel/qstandardgestures.h (renamed from src/gui/kernel/qgesturerecognizer.h)72
-rw-r--r--src/gui/kernel/qstandardgestures_p.h (renamed from src/gui/kernel/qgesturerecognizer_p.h)35
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm136
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac_p.h7
-rw-r--r--src/gui/kernel/qt_mac.cpp6
-rw-r--r--src/gui/kernel/qwhatsthis.cpp9
-rw-r--r--src/gui/kernel/qwidget.cpp242
-rw-r--r--src/gui/kernel/qwidget.h7
-rw-r--r--src/gui/kernel/qwidget_mac.mm97
-rw-r--r--src/gui/kernel/qwidget_p.h7
-rw-r--r--src/gui/kernel/qwidget_win.cpp129
-rw-r--r--src/gui/kernel/qwidget_wince.cpp46
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp6
-rw-r--r--src/gui/math3d/qgenericmatrix.h4
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp11
-rw-r--r--src/gui/math3d/qquaternion.cpp8
-rw-r--r--src/gui/math3d/qvector2d.cpp4
-rw-r--r--src/gui/math3d/qvector3d.cpp4
-rw-r--r--src/gui/math3d/qvector4d.cpp4
-rw-r--r--src/gui/painting/qblendfunctions.cpp6
-rw-r--r--src/gui/painting/qdrawutil.cpp3
-rw-r--r--src/gui/painting/qdrawutil.h7
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp102
-rw-r--r--src/gui/painting/qpdf.cpp22
-rw-r--r--src/gui/painting/qprintengine_pdf.cpp2
-rw-r--r--src/gui/painting/qprintengine_win.cpp646
-rw-r--r--src/gui/painting/qprintengine_win_p.h16
-rw-r--r--src/gui/painting/qprinter.cpp3
-rw-r--r--src/gui/painting/qprinterinfo_win.cpp100
-rw-r--r--src/gui/painting/qregion.cpp4
-rw-r--r--src/gui/painting/qregion_win.cpp2
-rw-r--r--src/gui/painting/qwindowsurface_qws.cpp3
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp24
-rw-r--r--src/gui/painting/qwindowsurface_raster_p.h13
-rw-r--r--src/gui/styles/gtksymbols.cpp46
-rw-r--r--src/gui/styles/gtksymbols_p.h2
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp6
-rw-r--r--src/gui/styles/qcommonstyle.cpp166
-rw-r--r--src/gui/styles/qcommonstyle_p.h1
-rw-r--r--src/gui/styles/qgtkstyle.cpp35
-rw-r--r--src/gui/styles/qmacstyle_mac.mm144
-rw-r--r--src/gui/styles/qplastiquestyle.cpp28
-rw-r--r--src/gui/styles/qstyle.cpp7
-rw-r--r--src/gui/styles/qstyle.h2
-rw-r--r--src/gui/styles/qstyle_p.h3
-rw-r--r--src/gui/styles/qstylehelper.cpp7
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
-rw-r--r--src/gui/styles/qwindowsstyle.cpp124
-rw-r--r--src/gui/styles/qwindowsvistastyle.cpp151
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp32
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp1
-rw-r--r--src/gui/text/qcssparser.cpp10
-rw-r--r--src/gui/text/qcssparser_p.h2
-rw-r--r--src/gui/text/qfont_win.cpp8
-rw-r--r--src/gui/text/qfontdatabase_qws.cpp5
-rw-r--r--src/gui/text/qfontdatabase_win.cpp261
-rw-r--r--src/gui/text/qfontengine_qpf.cpp11
-rw-r--r--src/gui/text/qfontengine_qws.cpp5
-rw-r--r--src/gui/text/qfontengine_win.cpp450
-rw-r--r--src/gui/text/qfontengine_win_p.h18
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp42
-rw-r--r--src/gui/text/qsyntaxhighlighter.h1
-rw-r--r--src/gui/text/qtextcontrol.cpp3
-rw-r--r--src/gui/text/qtextcursor.cpp2
-rw-r--r--src/gui/text/qtextdocument.cpp7
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp6
-rw-r--r--src/gui/text/qtextformat.cpp2
-rw-r--r--src/gui/text/qtextformat.h2
-rw-r--r--src/gui/text/qtexthtmlparser.cpp6
-rw-r--r--src/gui/text/qtextlist.cpp49
-rw-r--r--src/gui/text/qtextodfwriter.cpp8
-rw-r--r--src/gui/text/qzip.cpp20
-rw-r--r--src/gui/util/qcompleter.cpp38
-rw-r--r--src/gui/util/qcompleter.h4
-rw-r--r--src/gui/util/qcompleter_p.h1
-rw-r--r--src/gui/util/qdesktopservices_win.cpp34
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp338
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp37
-rw-r--r--src/gui/widgets/qabstractscrollarea_p.h9
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp11
-rw-r--r--src/gui/widgets/qabstractspinbox_p.h2
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac.mm10
-rw-r--r--src/gui/widgets/qcombobox.cpp6
-rw-r--r--src/gui/widgets/qdatetimeedit.cpp4
-rw-r--r--src/gui/widgets/qdockarealayout.cpp14
-rw-r--r--src/gui/widgets/qeffects.cpp96
-rw-r--r--src/gui/widgets/qfontcombobox.cpp2
-rw-r--r--src/gui/widgets/qframe.cpp2
-rw-r--r--src/gui/widgets/qgroupbox.cpp11
-rw-r--r--src/gui/widgets/qlineedit.cpp3
-rw-r--r--src/gui/widgets/qmainwindow.cpp20
-rw-r--r--src/gui/widgets/qmainwindowlayout.cpp276
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm31
-rw-r--r--src/gui/widgets/qmainwindowlayout_p.h25
-rw-r--r--src/gui/widgets/qmdisubwindow.cpp35
-rw-r--r--src/gui/widgets/qmenu.cpp100
-rw-r--r--src/gui/widgets/qmenu_p.h8
-rw-r--r--src/gui/widgets/qmenubar.cpp21
-rw-r--r--src/gui/widgets/qplaintextedit.cpp51
-rw-r--r--src/gui/widgets/qplaintextedit.h1
-rw-r--r--src/gui/widgets/qplaintextedit_p.h5
-rw-r--r--src/gui/widgets/qprogressbar.cpp2
-rw-r--r--src/gui/widgets/qsizegrip.cpp3
-rw-r--r--src/gui/widgets/qspinbox.cpp11
-rw-r--r--src/gui/widgets/qtabbar.cpp66
-rw-r--r--src/gui/widgets/qtabbar.h2
-rw-r--r--src/gui/widgets/qtabbar_p.h68
-rw-r--r--src/gui/widgets/qtextedit.cpp26
-rw-r--r--src/gui/widgets/qtextedit.h1
-rw-r--r--src/gui/widgets/qtextedit_p.h5
-rw-r--r--src/gui/widgets/qtoolbar.cpp71
-rw-r--r--src/gui/widgets/qtoolbar.h1
-rw-r--r--src/gui/widgets/qtoolbar_p.h8
-rw-r--r--src/gui/widgets/qtoolbararealayout.cpp18
-rw-r--r--src/gui/widgets/qtoolbutton.cpp15
-rw-r--r--src/gui/widgets/qwidgetanimator.cpp164
-rw-r--r--src/gui/widgets/qwidgetanimator_p.h34
-rw-r--r--src/gui/widgets/qworkspace.cpp26
-rw-r--r--src/network/access/qabstractnetworkcache.cpp4
-rw-r--r--src/network/access/qhttp.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp71
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h11
-rw-r--r--src/network/access/qhttpnetworkreply.cpp82
-rw-r--r--src/network/access/qhttpnetworkreply_p.h14
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp4
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessdatabackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessfilebackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp6
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp19
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp65
-rw-r--r--src/network/access/qnetworkreply.cpp25
-rw-r--r--src/network/access/qnetworkreply.h2
-rw-r--r--src/network/access/qnetworkreply_p.h2
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp55
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h7
-rw-r--r--src/network/access/qnetworkrequest.cpp4
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp5
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp19
-rw-r--r--src/network/kernel/qnetworkinterface_win.cpp15
-rw-r--r--src/network/kernel/qnetworkinterface_win_p.h2
-rw-r--r--src/network/kernel/qnetworkproxy.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp17
-rw-r--r--src/network/socket/qhttpsocketengine.cpp1
-rw-r--r--src/network/socket/qlocalserver.cpp2
-rw-r--r--src/network/socket/qlocalserver_tcp.cpp2
-rw-r--r--src/network/socket/qlocalserver_unix.cpp9
-rw-r--r--src/network/socket/qlocalserver_win.cpp19
-rw-r--r--src/network/socket/qlocalsocket.cpp29
-rw-r--r--src/network/socket/qlocalsocket.h1
-rw-r--r--src/network/socket/qlocalsocket_p.h53
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp5
-rw-r--r--src/network/socket/qlocalsocket_win.cpp285
-rw-r--r--src/network/socket/qnativesocketengine_p.h29
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp65
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp131
-rw-r--r--src/network/socket/qnet_unix_p.h182
-rw-r--r--src/network/socket/qudpsocket.cpp3
-rw-r--r--src/network/socket/socket.pri3
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp40
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h26
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp102
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h25
-rw-r--r--src/opengl/qgl.cpp1
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qgl_win.cpp16
-rw-r--r--src/opengl/qglframebufferobject.cpp27
-rw-r--r--src/opengl/qglpixelbuffer.cpp2
-rw-r--r--src/opengl/qpaintengine_opengl.cpp2
-rw-r--r--src/opengl/qwindowsurface_gl.cpp2
-rw-r--r--src/openvg/qpaintengine_vg.cpp192
-rw-r--r--src/openvg/qpaintengine_vg_p.h1
-rw-r--r--src/plugins/accessible/compat/q3complexwidgets.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp24
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h18
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp877
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h55
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp66
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h18
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp15
-rw-r--r--src/plugins/graphicssystems/openvg/openvg.pro8
-rw-r--r--src/plugins/graphicssystems/shivavg/shivavg.pro4
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp12
-rw-r--r--src/plugins/kbddrivers/sl5000/main.cpp3
-rw-r--r--src/plugins/kbddrivers/vr41xx/main.cpp3
-rw-r--r--src/plugins/kbddrivers/yopy/main.cpp3
-rw-r--r--src/qt3support/canvas/q3canvas.cpp2
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp206
-rw-r--r--src/qt3support/dialogs/q3filedialog_win.cpp430
-rw-r--r--src/qt3support/network/q3dns.cpp70
-rw-r--r--src/qt3support/network/q3http.cpp4
-rw-r--r--src/qt3support/network/q3socketdevice_win.cpp7
-rw-r--r--src/qt3support/other/q3dragobject.cpp7
-rw-r--r--src/qt3support/other/q3process_win.cpp152
-rw-r--r--src/qt3support/sql/q3datatable.cpp2
-rw-r--r--src/qt3support/tools/q3cstring.cpp32
-rw-r--r--src/qt3support/widgets/q3datetimeedit.cpp75
-rw-r--r--src/qt3support/widgets/q3dockarea.cpp29
-rw-r--r--src/qt3support/widgets/q3titlebar.cpp33
-rw-r--r--src/script/qscriptvalue.cpp16
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp18
-rw-r--r--src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp2
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp32
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp9
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp34
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp49
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.cpp4
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp5
-rw-r--r--src/sql/kernel/qsqldatabase.cpp28
-rw-r--r--src/sql/kernel/qsqldriver.cpp26
-rw-r--r--src/sql/models/qsqltablemodel.cpp3
-rw-r--r--src/svg/qsvghandler.cpp349
-rw-r--r--src/svg/qsvgnode.cpp2
-rw-r--r--src/svg/qsvgstyle.cpp22
-rw-r--r--src/svg/qsvgstyle_p.h40
-rw-r--r--src/testlib/qplaintestlogger.cpp2
-rw-r--r--src/testlib/qtestcase.cpp194
-rw-r--r--src/testlib/qtestfilelogger.cpp25
-rw-r--r--src/tools/bootstrap/bootstrap.pri20
-rw-r--r--src/tools/idc/main.cpp69
-rw-r--r--src/tools/uic/uic.cpp4
-rw-r--r--src/tools/uic3/main.cpp6
-rw-r--r--src/tools/uic3/uic.cpp4
-rw-r--r--src/winmain/qtmain_win.cpp20
-rw-r--r--src/xml/sax/qxml.cpp52
-rw-r--r--src/xmlpatterns/Doxyfile2
-rw-r--r--src/xmlpatterns/acceltree/qacceltree.cpp43
-rw-r--r--src/xmlpatterns/acceltree/qacceltree_p.h17
-rw-r--r--src/xmlpatterns/acceltree/qacceltreebuilder.cpp31
-rw-r--r--src/xmlpatterns/acceltree/qacceltreebuilder_p.h19
-rw-r--r--src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp60
-rw-r--r--src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h27
-rw-r--r--src/xmlpatterns/api/api.pri11
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.cpp16
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.h5
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel_p.h10
-rw-r--r--src/xmlpatterns/api/qabstractxmlpullprovider.cpp177
-rw-r--r--src/xmlpatterns/api/qabstractxmlpullprovider_p.h113
-rw-r--r--src/xmlpatterns/api/qpullbridge.cpp232
-rw-r--r--src/xmlpatterns/api/qpullbridge_p.h103
-rw-r--r--src/xmlpatterns/api/qresourcedelegator.cpp8
-rw-r--r--src/xmlpatterns/api/qxmlnamepool.cpp4
-rw-r--r--src/xmlpatterns/api/qxmlnamepool.h7
-rw-r--r--src/xmlpatterns/api/qxmlquery.cpp18
-rw-r--r--src/xmlpatterns/api/qxmlquery.h11
-rw-r--r--src/xmlpatterns/api/qxmlquery_p.h37
-rw-r--r--src/xmlpatterns/api/qxmlschema.cpp295
-rw-r--r--src/xmlpatterns/api/qxmlschema.h97
-rw-r--r--src/xmlpatterns/api/qxmlschema_p.cpp199
-rw-r--r--src/xmlpatterns/api/qxmlschema_p.h109
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.cpp340
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.h97
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator_p.h131
-rw-r--r--src/xmlpatterns/common.pri1
-rw-r--r--src/xmlpatterns/data/data.pri20
-rw-r--r--src/xmlpatterns/data/qboolean.cpp2
-rw-r--r--src/xmlpatterns/data/qcomparisonfactory.cpp154
-rw-r--r--src/xmlpatterns/data/qcomparisonfactory_p.h121
-rw-r--r--src/xmlpatterns/data/qitem_p.h5
-rw-r--r--src/xmlpatterns/data/qresourceloader_p.h2
-rw-r--r--src/xmlpatterns/data/qvaluefactory.cpp106
-rw-r--r--src/xmlpatterns/data/qvaluefactory_p.h98
-rw-r--r--src/xmlpatterns/environment/createReportContext.xsl5
-rw-r--r--src/xmlpatterns/environment/qreportcontext.cpp1
-rw-r--r--src/xmlpatterns/environment/qreportcontext_p.h4
-rw-r--r--src/xmlpatterns/expr/qcastingplatform.cpp22
-rw-r--r--src/xmlpatterns/expr/qcastingplatform_p.h23
-rw-r--r--src/xmlpatterns/expr/qexpressionfactory.cpp27
-rw-r--r--src/xmlpatterns/functions/qpatternplatform.cpp21
-rw-r--r--src/xmlpatterns/functions/qpatternplatform_p.h18
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser.cpp944
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser_p.h70
-rw-r--r--src/xmlpatterns/parser/querytransformparser.ypp176
-rw-r--r--src/xmlpatterns/schema/.gitignore1
-rw-r--r--src/xmlpatterns/schema/builtinschemas.qrc5
-rw-r--r--src/xmlpatterns/schema/doc/All_diagram.dot13
-rw-r--r--src/xmlpatterns/schema/doc/Alternative_diagram.dot11
-rw-r--r--src/xmlpatterns/schema/doc/Annotation_diagram.dot9
-rw-r--r--src/xmlpatterns/schema/doc/AnyAttribute_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Any_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Assert_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Choice_diagram.dot22
-rw-r--r--src/xmlpatterns/schema/doc/ComplexContentExtension_diagram.dot47
-rw-r--r--src/xmlpatterns/schema/doc/ComplexContentRestriction_diagram.dot47
-rw-r--r--src/xmlpatterns/schema/doc/ComplexContent_diagram.dot11
-rw-r--r--src/xmlpatterns/schema/doc/DefaultOpenContent_diagram.dot9
-rw-r--r--src/xmlpatterns/schema/doc/EnumerationFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Field_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/FractionDigitsFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/GlobalAttribute_diagram.dot9
-rw-r--r--src/xmlpatterns/schema/doc/GlobalComplexType_diagram.dot52
-rw-r--r--src/xmlpatterns/schema/doc/GlobalElement_diagram.dot32
-rw-r--r--src/xmlpatterns/schema/doc/GlobalSimpleType_diagram.dot13
-rw-r--r--src/xmlpatterns/schema/doc/Import_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Include_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/KeyRef_diagram.dot12
-rw-r--r--src/xmlpatterns/schema/doc/Key_diagram.dot12
-rw-r--r--src/xmlpatterns/schema/doc/LengthFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/List_diagram.dot9
-rw-r--r--src/xmlpatterns/schema/doc/LocalAll_diagram.dot13
-rw-r--r--src/xmlpatterns/schema/doc/LocalAttribute_diagram.dot9
-rw-r--r--src/xmlpatterns/schema/doc/LocalChoice_diagram.dot22
-rw-r--r--src/xmlpatterns/schema/doc/LocalComplexType_diagram.dot52
-rw-r--r--src/xmlpatterns/schema/doc/LocalElement_diagram.dot32
-rw-r--r--src/xmlpatterns/schema/doc/LocalSequence_diagram.dot22
-rw-r--r--src/xmlpatterns/schema/doc/LocalSimpleType_diagram.dot13
-rw-r--r--src/xmlpatterns/schema/doc/MaxExclusiveFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/MaxInclusiveFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/MaxLengthFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/MinExclusiveFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/MinInclusiveFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/MinLengthFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/NamedAttributeGroup_diagram.dot17
-rw-r--r--src/xmlpatterns/schema/doc/NamedGroup_diagram.dot13
-rw-r--r--src/xmlpatterns/schema/doc/Notation_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Override_diagram.dot21
-rw-r--r--src/xmlpatterns/schema/doc/PatternFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Redefine_diagram.dot15
-rw-r--r--src/xmlpatterns/schema/doc/ReferredAttributeGroup_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/ReferredGroup_diagram.dot13
-rw-r--r--src/xmlpatterns/schema/doc/Schema_diagram.dot66
-rw-r--r--src/xmlpatterns/schema/doc/Selector_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Sequence_diagram.dot22
-rw-r--r--src/xmlpatterns/schema/doc/SimpleContentExtension_diagram.dot23
-rw-r--r--src/xmlpatterns/schema/doc/SimpleContentRestriction_diagram.dot87
-rw-r--r--src/xmlpatterns/schema/doc/SimpleContent_diagram.dot11
-rw-r--r--src/xmlpatterns/schema/doc/SimpleRestriction_diagram.dot62
-rw-r--r--src/xmlpatterns/schema/doc/TotalDigitsFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/Union_diagram.dot10
-rw-r--r--src/xmlpatterns/schema/doc/Unique_diagram.dot12
-rw-r--r--src/xmlpatterns/schema/doc/WhiteSpaceFacet_diagram.dot6
-rw-r--r--src/xmlpatterns/schema/doc/legend.dot7
-rw-r--r--src/xmlpatterns/schema/qnamespacesupport.cpp160
-rw-r--r--src/xmlpatterns/schema/qnamespacesupport_p.h173
-rw-r--r--src/xmlpatterns/schema/qxsdalternative.cpp68
-rw-r--r--src/xmlpatterns/schema/qxsdalternative_p.h114
-rw-r--r--src/xmlpatterns/schema/qxsdannotated.cpp63
-rw-r--r--src/xmlpatterns/schema/qxsdannotated_p.h96
-rw-r--r--src/xmlpatterns/schema/qxsdannotation.cpp78
-rw-r--r--src/xmlpatterns/schema/qxsdannotation_p.h127
-rw-r--r--src/xmlpatterns/schema/qxsdapplicationinformation.cpp68
-rw-r--r--src/xmlpatterns/schema/qxsdapplicationinformation_p.h115
-rw-r--r--src/xmlpatterns/schema/qxsdassertion.cpp58
-rw-r--r--src/xmlpatterns/schema/qxsdassertion_p.h101
-rw-r--r--src/xmlpatterns/schema/qxsdattribute.cpp130
-rw-r--r--src/xmlpatterns/schema/qxsdattribute_p.h246
-rw-r--r--src/xmlpatterns/schema/qxsdattributegroup.cpp73
-rw-r--r--src/xmlpatterns/schema/qxsdattributegroup_p.h122
-rw-r--r--src/xmlpatterns/schema/qxsdattributereference.cpp88
-rw-r--r--src/xmlpatterns/schema/qxsdattributereference_p.h147
-rw-r--r--src/xmlpatterns/schema/qxsdattributeterm.cpp58
-rw-r--r--src/xmlpatterns/schema/qxsdattributeterm_p.h96
-rw-r--r--src/xmlpatterns/schema/qxsdattributeuse.cpp136
-rw-r--r--src/xmlpatterns/schema/qxsdattributeuse_p.h224
-rw-r--r--src/xmlpatterns/schema/qxsdcomplextype.cpp231
-rw-r--r--src/xmlpatterns/schema/qxsdcomplextype_p.h404
-rw-r--r--src/xmlpatterns/schema/qxsddocumentation.cpp86
-rw-r--r--src/xmlpatterns/schema/qxsddocumentation_p.h137
-rw-r--r--src/xmlpatterns/schema/qxsdelement.cpp244
-rw-r--r--src/xmlpatterns/schema/qxsdelement_p.h403
-rw-r--r--src/xmlpatterns/schema/qxsdfacet.cpp124
-rw-r--r--src/xmlpatterns/schema/qxsdfacet_p.h213
-rw-r--r--src/xmlpatterns/schema/qxsdidcache.cpp66
-rw-r--r--src/xmlpatterns/schema/qxsdidcache_p.h (renamed from src/gui/kernel/qdirectionrecognizer_p.h)82
-rw-r--r--src/xmlpatterns/schema/qxsdidchelper.cpp137
-rw-r--r--src/xmlpatterns/schema/qxsdidchelper_p.h186
-rw-r--r--src/xmlpatterns/schema/qxsdidentityconstraint.cpp93
-rw-r--r--src/xmlpatterns/schema/qxsdidentityconstraint_p.h173
-rw-r--r--src/xmlpatterns/schema/qxsdinstancereader.cpp196
-rw-r--r--src/xmlpatterns/schema/qxsdinstancereader_p.h189
-rw-r--r--src/xmlpatterns/schema/qxsdmodelgroup.cpp78
-rw-r--r--src/xmlpatterns/schema/qxsdmodelgroup_p.h139
-rw-r--r--src/xmlpatterns/schema/qxsdnotation.cpp68
-rw-r--r--src/xmlpatterns/schema/qxsdnotation_p.h119
-rw-r--r--src/xmlpatterns/schema/qxsdparticle.cpp95
-rw-r--r--src/xmlpatterns/schema/qxsdparticle_p.h154
-rw-r--r--src/xmlpatterns/schema/qxsdparticlechecker.cpp540
-rw-r--r--src/xmlpatterns/schema/qxsdparticlechecker_p.h99
-rw-r--r--src/xmlpatterns/schema/qxsdreference.cpp83
-rw-r--r--src/xmlpatterns/schema/qxsdreference_p.h145
-rw-r--r--src/xmlpatterns/schema/qxsdschema.cpp272
-rw-r--r--src/xmlpatterns/schema/qxsdschema_p.h301
-rw-r--r--src/xmlpatterns/schema/qxsdschemachecker.cpp2061
-rw-r--r--src/xmlpatterns/schema/qxsdschemachecker_helper.cpp306
-rw-r--r--src/xmlpatterns/schema/qxsdschemachecker_p.h284
-rw-r--r--src/xmlpatterns/schema/qxsdschemachecker_setup.cpp327
-rw-r--r--src/xmlpatterns/schema/qxsdschemacontext.cpp528
-rw-r--r--src/xmlpatterns/schema/qxsdschemacontext_p.h187
-rw-r--r--src/xmlpatterns/schema/qxsdschemadebugger.cpp226
-rw-r--r--src/xmlpatterns/schema/qxsdschemadebugger_p.h127
-rw-r--r--src/xmlpatterns/schema/qxsdschemahelper.cpp821
-rw-r--r--src/xmlpatterns/schema/qxsdschemahelper_p.h217
-rw-r--r--src/xmlpatterns/schema/qxsdschemamerger.cpp157
-rw-r--r--src/xmlpatterns/schema/qxsdschemamerger_p.h99
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp6078
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser_p.h721
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser_setup.cpp1110
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparsercontext.cpp603
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparsercontext_p.h231
-rw-r--r--src/xmlpatterns/schema/qxsdschemaresolver.cpp1736
-rw-r--r--src/xmlpatterns/schema/qxsdschemaresolver_p.h578
-rw-r--r--src/xmlpatterns/schema/qxsdschematoken.cpp2981
-rw-r--r--src/xmlpatterns/schema/qxsdschematoken_p.h209
-rw-r--r--src/xmlpatterns/schema/qxsdschematypesfactory.cpp126
-rw-r--r--src/xmlpatterns/schema/qxsdschematypesfactory_p.h109
-rw-r--r--src/xmlpatterns/schema/qxsdsimpletype.cpp148
-rw-r--r--src/xmlpatterns/schema/qxsdsimpletype_p.h219
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachine.cpp477
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachine_p.h245
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp260
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h141
-rw-r--r--src/xmlpatterns/schema/qxsdterm.cpp68
-rw-r--r--src/xmlpatterns/schema/qxsdterm_p.h114
-rw-r--r--src/xmlpatterns/schema/qxsdtypechecker.cpp1338
-rw-r--r--src/xmlpatterns/schema/qxsdtypechecker_p.h189
-rw-r--r--src/xmlpatterns/schema/qxsduserschematype.cpp75
-rw-r--r--src/xmlpatterns/schema/qxsduserschematype_p.h124
-rw-r--r--src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp215
-rw-r--r--src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h179
-rw-r--r--src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp1276
-rw-r--r--src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h296
-rw-r--r--src/xmlpatterns/schema/qxsdwildcard.cpp115
-rw-r--r--src/xmlpatterns/schema/qxsdwildcard_p.h199
-rw-r--r--src/xmlpatterns/schema/qxsdxpathexpression.cpp88
-rw-r--r--src/xmlpatterns/schema/qxsdxpathexpression_p.h143
-rw-r--r--src/xmlpatterns/schema/schema.pri93
-rw-r--r--src/xmlpatterns/schema/schemas/xml.xsd145
-rw-r--r--src/xmlpatterns/schema/schemas/xml.xsd-LICENSE40
-rw-r--r--src/xmlpatterns/schema/tokens.xml155
-rw-r--r--src/xmlpatterns/type/qanysimpletype.cpp10
-rw-r--r--src/xmlpatterns/type/qanysimpletype_p.h12
-rw-r--r--src/xmlpatterns/type/qanytype.cpp12
-rw-r--r--src/xmlpatterns/type/qanytype_p.h10
-rw-r--r--src/xmlpatterns/type/qnamedschemacomponent.cpp71
-rw-r--r--src/xmlpatterns/type/qnamedschemacomponent_p.h127
-rw-r--r--src/xmlpatterns/type/qprimitives_p.h13
-rw-r--r--src/xmlpatterns/type/qschematype.cpp5
-rw-r--r--src/xmlpatterns/type/qschematype_p.h30
-rw-r--r--src/xmlpatterns/type/type.pri2
-rw-r--r--src/xmlpatterns/utils/qpatternistlocale_p.h10
-rw-r--r--src/xmlpatterns/utils/qxpathhelper.cpp12
-rw-r--r--src/xmlpatterns/utils/qxpathhelper_p.h5
-rw-r--r--src/xmlpatterns/xmlpatterns.pro2
1635 files changed, 82322 insertions, 28468 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
index 1ac3779..c932ec2 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
@@ -2723,7 +2723,7 @@ static HB_Error Load_Mark2Array( HB_Mark2Array* m2a,
{
HB_Error error;
- HB_UShort k, m, n, count;
+ HB_UShort m, n, count;
HB_UInt cur_offset, new_offset, base_offset;
HB_Mark2Record *m2r;
diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp
index 245749a..2c56af7 100644
--- a/src/3rdparty/phonon/ds9/backend.cpp
+++ b/src/3rdparty/phonon/ds9/backend.cpp
@@ -50,7 +50,7 @@ namespace Phonon
Backend::Backend(QObject *parent, const QVariantList &)
: QObject(parent)
{
- ::CoInitialize(0);
+ ::CoInitialize(0);
//registering meta types
qRegisterMetaType<HRESULT>("HRESULT");
@@ -61,7 +61,7 @@ namespace Phonon
{
m_audioOutputs.clear();
m_audioEffects.clear();
- ::CoUninitialize();
+ ::CoUninitialize();
}
QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
@@ -216,7 +216,7 @@ namespace Phonon
LPOLESTR str = 0;
HRESULT hr = mon->GetDisplayName(0,0, &str);
if (SUCCEEDED(hr)) {
- QString name = QString::fromUtf16((unsigned short*)str);
+ QString name = QString::fromUtf16((unsigned short*)str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp
index 7e0b3cd..855357a 100644
--- a/src/3rdparty/phonon/ds9/backendnode.cpp
+++ b/src/3rdparty/phonon/ds9/backendnode.cpp
@@ -57,6 +57,8 @@ namespace Phonon
BackendNode::~BackendNode()
{
+ //this will remove the filter from the graph
+ mediaObjectDestroyed();
}
void BackendNode::setMediaObject(MediaObject *mo)
diff --git a/src/3rdparty/phonon/ds9/fakesource.cpp b/src/3rdparty/phonon/ds9/fakesource.cpp
index 9a61a2e..a4d4640 100644
--- a/src/3rdparty/phonon/ds9/fakesource.cpp
+++ b/src/3rdparty/phonon/ds9/fakesource.cpp
@@ -29,8 +29,10 @@ namespace Phonon
namespace DS9
{
static WAVEFORMATEX g_defaultWaveFormat = {WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0};
- static BITMAPINFOHEADER g_defautBitmapHeader = { sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0};
- static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} };
+
+ static const AM_MEDIA_TYPE g_fakeAudioType = {MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 0, 0, 2, FORMAT_WaveFormatEx, 0, sizeof(WAVEFORMATEX), reinterpret_cast<BYTE*>(&g_defaultWaveFormat)};
+ static const AM_MEDIA_TYPE g_fakeVideoType = {MEDIATYPE_Video, MEDIASUBTYPE_RGB32, TRUE, FALSE, 0, FORMAT_VideoInfo2, 0, sizeof(VIDEOINFOHEADER2), reinterpret_cast<BYTE*>(&g_defaultVideoInfo)};
class FakePin : public QPin
{
@@ -128,36 +130,12 @@ namespace Phonon
void FakeSource::createFakeAudioPin()
{
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Audio;
- mt.subtype = MEDIASUBTYPE_PCM;
- mt.formattype = FORMAT_WaveFormatEx;
- mt.lSampleSize = 2;
-
- //fake the format (stereo 44.1 khz stereo 16 bits)
- mt.cbFormat = sizeof(WAVEFORMATEX);
- mt.pbFormat = reinterpret_cast<BYTE*>(&g_defaultWaveFormat);
-
- new FakePin(this, mt);
+ new FakePin(this, g_fakeAudioType);
}
void FakeSource::createFakeVideoPin()
{
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Video;
- mt.subtype = MEDIASUBTYPE_RGB32;
- mt.formattype = FORMAT_VideoInfo2;
- mt.bFixedSizeSamples = 1;
-
- g_defaultVideoInfo.bmiHeader = g_defautBitmapHeader;
-
- //fake the format
- mt.cbFormat = sizeof(VIDEOINFOHEADER2);
- mt.pbFormat = reinterpret_cast<BYTE*>(&g_defaultVideoInfo);
-
- new FakePin(this, mt);
+ new FakePin(this, g_fakeVideoType);
}
}
diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp
index ec10278..38c983b 100644
--- a/src/3rdparty/phonon/ds9/iodevicereader.cpp
+++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp
@@ -36,19 +36,10 @@ namespace Phonon
//these mediatypes define a stream, its type will be autodetected by DirectShow
static QVector<AM_MEDIA_TYPE> getMediaTypes()
{
- AM_MEDIA_TYPE mt;
- mt.majortype = MEDIATYPE_Stream;
- mt.bFixedSizeSamples = TRUE;
- mt.bTemporalCompression = FALSE;
- mt.lSampleSize = 1;
- mt.formattype = GUID_NULL;
- mt.pUnk = 0;
- mt.cbFormat = 0;
- mt.pbFormat = 0;
+ AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
QVector<AM_MEDIA_TYPE> ret;
//normal auto-detect stream
- mt.subtype = MEDIASUBTYPE_NULL;
ret << mt;
//AVI stream
mt.subtype = MEDIASUBTYPE_Avi;
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index 1d0b69d..df42011 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -36,7 +36,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QDebug>
-#define TIMER_INTERVAL 16 //... ms for the timer that polls the current state (we use the multimedia timer
+#define TIMER_INTERVAL 16 //... ms for the timer that polls the current state (we use the multimedia timer)
#define PRELOAD_TIME 2000 // 2 seconds to load a source
QT_BEGIN_NAMESPACE
@@ -89,7 +89,7 @@ namespace Phonon
DWORD result = ::WaitForMultipleObjects(count, handles, FALSE, INFINITE);
if (result == WAIT_OBJECT_0) {
if (m_finished) {
- //that's the end if the thread execution
+ //that's the end of the thread execution
return;
}
@@ -207,12 +207,14 @@ namespace Phonon
HRESULT hr = S_OK;
- m_currentRender = w.graph;
- m_currentRenderId = w.id;
- if (w.task == ReplaceGraph) {
+ {
QMutexLocker locker(&m_mutex);
- HANDLE h;
+ m_currentRender = w.graph;
+ m_currentRenderId = w.id;
+ }
+ if (w.task == ReplaceGraph) {
+ QMutexLocker locker(&m_mutex);
int index = -1;
for(int i = 0; i < FILTER_COUNT; ++i) {
if (m_graphHandle[i].graph == w.oldGraph) {
@@ -228,6 +230,7 @@ namespace Phonon
Q_ASSERT(index != -1);
//add the new graph
+ HANDLE h;
if (SUCCEEDED(ComPointer<IMediaEvent>(w.graph, IID_IMediaEvent)
->GetEventHandle(reinterpret_cast<OAEVENT*>(&h)))) {
m_graphHandle[index].graph = w.graph;
@@ -250,7 +253,7 @@ namespace Phonon
hr = w.graph->RenderFile(reinterpret_cast<const wchar_t *>(w.url.utf16()), 0);
}
if (hr != E_ABORT) {
- emit asyncRenderFinished(w.id, hr, w.graph);
+ emit asyncRenderFinished(w.id, hr, w.graph);
}
} else if (w.task == Seek) {
//that's a seekrequest
@@ -266,7 +269,7 @@ namespace Phonon
}
}
emit asyncSeekingFinished(w.id, currentTime);
- hr = E_ABORT; //to avoid emitting asyncRenderFinished
+ hr = E_ABORT; //to avoid emitting asyncRenderFinished
} else if (w.task == ChangeState) {
//remove useless decoders
@@ -324,16 +327,17 @@ namespace Phonon
}
}
- m_currentRender = Graph();
- m_currentRenderId = 0;
-
+ {
+ QMutexLocker locker(&m_mutex);
+ m_currentRender = Graph();
+ m_currentRenderId = 0;
+ }
}
- void WorkerThread::abortCurrentRender(qint16 renderId)
- {
+ void WorkerThread::abortCurrentRender(qint16 renderId)
+ {
QMutexLocker locker(&m_mutex);
bool found = false;
- //we try to see if there is already an attempt to seek and we remove it
for(int i = 0; !found && i < m_queue.size(); ++i) {
const Work &w = m_queue.at(i);
if (w.id == renderId) {
@@ -342,10 +346,10 @@ namespace Phonon
}
}
- if (m_currentRender && m_currentRenderId == renderId) {
- m_currentRender->Abort();
- }
- }
+ if (m_currentRender && m_currentRenderId == renderId) {
+ m_currentRender->Abort();
+ }
+ }
//tells the thread to stop processing
void WorkerThread::signalStop()
@@ -383,13 +387,13 @@ namespace Phonon
{
for(int i = 0; i < FILTER_COUNT; ++i) {
- m_graphs[i] = new MediaGraph(this, i);
+ m_graphs[i] = new MediaGraph(this, i);
}
- connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)),
+ connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)),
SLOT(slotStateReady(Graph, Phonon::State)));
- connect(&m_thread, SIGNAL(eventReady(Graph, long, long)),
+ connect(&m_thread, SIGNAL(eventReady(Graph, long, long)),
SLOT(handleEvents(Graph, long, long)));
connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)),
@@ -484,7 +488,7 @@ namespace Phonon
}
if (!m_aboutToFinishSent && remaining < PRELOAD_TIME - m_transitionTime + TIMER_INTERVAL/2) {
- //let's take a 2 seconds time time to actually load the next file
+ //let's take a 2 seconds time to actually load the next file
#ifdef GRAPH_DEBUG
qDebug() << "DS9: emit aboutToFinish" << remaining << QTime::currentTime().toString();
#endif
@@ -573,7 +577,7 @@ namespace Phonon
{
#ifndef QT_NO_PHONON_MEDIACONTROLLER
//1st, check if there is more titles after
- const qint64 ret = (m_currentTitle < _iface_availableTitles() - 1) ?
+ const qint64 ret = (m_currentTitle < _iface_availableTitles() - 1) ?
titleAbsolutePosition(m_currentTitle+1) : currentGraph()->absoluteTotalTime();
//this is the duration of the current title
@@ -586,7 +590,7 @@ namespace Phonon
qint64 MediaObject::currentTime() const
{
//this handles inaccuracy when stopping on a title
- return currentGraph()->absoluteCurrentTime()
+ return currentGraph()->absoluteCurrentTime()
#ifndef QT_NO_PHONON_MEDIACONTROLLER
- titleAbsolutePosition(m_currentTitle)
#endif //QT_NO_PHONON_MEDIACONTROLLER
@@ -736,7 +740,7 @@ namespace Phonon
m_oldHasVideo = currentGraph()->hasVideo();
setState(Phonon::LoadingState);
//After loading we go into stopped state
- m_nextState = Phonon::StoppedState;
+ m_nextState = Phonon::StoppedState;
catchComError(currentGraph()->loadSource(source));
emit currentSourceChanged(source);
}
@@ -750,7 +754,7 @@ namespace Phonon
void MediaObject::loadingFinished(MediaGraph *mg)
{
- if (mg == currentGraph()) {
+ if (mg == currentGraph()) {
#ifndef QT_NO_PHONON_MEDIACONTROLLER
//Title interface
m_currentTitle = 0;
@@ -807,7 +811,7 @@ namespace Phonon
void MediaObject::seekingFinished(MediaGraph *mg)
{
- if (mg == currentGraph()) {
+ if (mg == currentGraph()) {
updateTargetTick();
if (currentTime() < totalTime() - m_prefinishMark) {
@@ -882,7 +886,7 @@ namespace Phonon
#ifndef QT_NO_PHONON_VIDEO
if (VideoWidget *video = qobject_cast<VideoWidget*>(sink)) {
m_videoWidgets += video;
- } else
+ } else
#endif //QT_NO_PHONON_VIDEO
if (AudioOutput *audio = qobject_cast<AudioOutput*>(sink)) {
m_audioOutputs += audio;
@@ -901,7 +905,7 @@ namespace Phonon
#ifndef QT_NO_PHONON_VIDEO
if (VideoWidget *video = qobject_cast<VideoWidget*>(sink)) {
m_videoWidgets.removeOne(video);
- } else
+ } else
#endif //QT_NO_PHONON_VIDEO
if (AudioOutput *audio = qobject_cast<AudioOutput*>(sink)) {
m_audioOutputs.removeOne(audio);
@@ -983,7 +987,7 @@ namespace Phonon
emit stateChanged(state(), m_state);
}
break;
- case EC_LENGTH_CHANGED:
+ case EC_LENGTH_CHANGED:
if (graph == currentGraph()->graph()) {
emit totalTimeChanged( totalTime() );
}
diff --git a/src/3rdparty/phonon/ds9/qaudiocdreader.cpp b/src/3rdparty/phonon/ds9/qaudiocdreader.cpp
index b9f9fd6..6d0f335 100644
--- a/src/3rdparty/phonon/ds9/qaudiocdreader.cpp
+++ b/src/3rdparty/phonon/ds9/qaudiocdreader.cpp
@@ -103,8 +103,8 @@ namespace Phonon
private:
HANDLE m_cddrive;
- CDROM_TOC *m_toc;
- WaveStructure *m_waveHeader;
+ CDROM_TOC m_toc;
+ WaveStructure m_waveHeader;
qint64 m_trackAddress;
};
@@ -112,19 +112,8 @@ namespace Phonon
#define SECTOR_SIZE 2352
#define NB_SECTORS_READ 20
- static AM_MEDIA_TYPE getAudioCDMediaType()
- {
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Stream;
- mt.subtype = MEDIASUBTYPE_WAVE;
- mt.bFixedSizeSamples = TRUE;
- mt.bTemporalCompression = FALSE;
- mt.lSampleSize = 1;
- mt.formattype = GUID_NULL;
- return mt;
- }
-
+ static const AM_MEDIA_TYPE audioCDMediaType = { MEDIATYPE_Stream, MEDIASUBTYPE_WAVE, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
+
int addressToSectors(UCHAR address[4])
{
return ((address[0] * 60 + address[1]) * 60 + address[2]) * 75 + address[3] - 150;
@@ -141,11 +130,8 @@ namespace Phonon
}
- QAudioCDReader::QAudioCDReader(QBaseFilter *parent, QChar drive) : QAsyncReader(parent, QVector<AM_MEDIA_TYPE>() << getAudioCDMediaType())
+ QAudioCDReader::QAudioCDReader(QBaseFilter *parent, QChar drive) : QAsyncReader(parent, QVector<AM_MEDIA_TYPE>() << audioCDMediaType)
{
- m_toc = new CDROM_TOC;
- m_waveHeader = new WaveStructure;
-
//now open the cd-drive
QString path;
if (drive.isNull()) {
@@ -154,36 +140,30 @@ namespace Phonon
path = QString::fromLatin1("\\\\.\\%1:").arg(drive);
}
- m_cddrive = QT_WA_INLINE (
- ::CreateFile( (TCHAR*)path.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ),
- ::CreateFileA( path.toLocal8Bit().constData(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL )
- );
+ m_cddrive = ::CreateFile((const wchar_t *)path.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
- qMemSet(m_toc, 0, sizeof(CDROM_TOC));
+ qMemSet(&m_toc, 0, sizeof(CDROM_TOC));
//read the TOC
DWORD bytesRead = 0;
- bool tocRead = ::DeviceIoControl(m_cddrive, IOCTL_CDROM_READ_TOC, 0, 0, m_toc, sizeof(CDROM_TOC), &bytesRead, 0);
+ bool tocRead = ::DeviceIoControl(m_cddrive, IOCTL_CDROM_READ_TOC, 0, 0, &m_toc, sizeof(CDROM_TOC), &bytesRead, 0);
if (!tocRead) {
qWarning("unable to load the TOC from the CD");
return;
}
- m_trackAddress = addressToSectors(m_toc->TrackData[0].Address);
- const qint32 nbSectorsToRead = (addressToSectors(m_toc->TrackData[m_toc->LastTrack + 1 - m_toc->FirstTrack].Address)
+ m_trackAddress = addressToSectors(m_toc.TrackData[0].Address);
+ const qint32 nbSectorsToRead = (addressToSectors(m_toc.TrackData[m_toc.LastTrack + 1 - m_toc.FirstTrack].Address)
- m_trackAddress);
const qint32 dataLength = nbSectorsToRead * SECTOR_SIZE;
- m_waveHeader->chunksize = 4 + (8 + m_waveHeader->chunksize2) + (8 + dataLength);
- m_waveHeader->dataLength = dataLength;
+ m_waveHeader.chunksize = 4 + (8 + m_waveHeader.chunksize2) + (8 + dataLength);
+ m_waveHeader.dataLength = dataLength;
}
QAudioCDReader::~QAudioCDReader()
{
::CloseHandle(m_cddrive);
- delete m_toc;
- delete m_waveHeader;
-
}
STDMETHODIMP_(ULONG) QAudioCDReader::AddRef()
@@ -199,7 +179,7 @@ namespace Phonon
STDMETHODIMP QAudioCDReader::Length(LONGLONG *total,LONGLONG *available)
{
- const LONGLONG length = sizeof(WaveStructure) + m_waveHeader->dataLength;
+ const LONGLONG length = sizeof(WaveStructure) + m_waveHeader.dataLength;
if (total) {
*total = length;
}
@@ -238,11 +218,11 @@ namespace Phonon
if (pos < sizeof(WaveStructure)) {
//we first copy the content of the structure
nbRead = qMin(LONG(sizeof(WaveStructure) - pos), length);
- qMemCopy(buffer, reinterpret_cast<char*>(m_waveHeader) + pos, nbRead);
+ qMemCopy(buffer, reinterpret_cast<char*>(&m_waveHeader) + pos, nbRead);
}
const LONGLONG posInTrack = pos - sizeof(WaveStructure) + nbRead;
- const int bytesLeft = qMin(m_waveHeader->dataLength - posInTrack, LONGLONG(length - nbRead));
+ const int bytesLeft = qMin(m_waveHeader.dataLength - posInTrack, LONGLONG(length - nbRead));
if (bytesLeft > 0) {
@@ -297,8 +277,8 @@ namespace Phonon
{
QList<qint64> ret;
ret << 0;
- for(int i = m_toc->FirstTrack; i <= m_toc->LastTrack ; ++i) {
- const uchar *address = m_toc->TrackData[i].Address;
+ for(int i = m_toc.FirstTrack; i <= m_toc.LastTrack ; ++i) {
+ const uchar *address = m_toc.TrackData[i].Address;
ret << ((address[0] * 60 + address[1]) * 60 + address[2]) * 1000 + address[3]*1000/75 - 2000;
}
diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp
index 0af1bfd..dca99db 100644
--- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp
+++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp
@@ -28,7 +28,7 @@ namespace Phonon
namespace DS9
{
- QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, bool transform) :
+ QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, bool transform) :
QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform)
{
}
@@ -203,7 +203,7 @@ namespace Phonon
for (int i = 0; i < m_outputs.count(); ++i) {
QPin *current = m_outputs.at(i);
- IMediaSample *outSample = m_shouldDuplicateSamples ?
+ IMediaSample *outSample = m_shouldDuplicateSamples ?
duplicateSampleForOutput(sample, current->memoryAllocator())
: sample;
@@ -261,7 +261,7 @@ namespace Phonon
}
//addition
- //this should be used by the filter to tell it's input pins to which output they should route the samples
+ //this should be used by the filter to tell its input pins to which output they should route the samples
void QMemInputPin::addOutput(QPin *output)
{
diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp
index 37fe48d..68a4ec0 100644
--- a/src/3rdparty/phonon/ds9/qpin.cpp
+++ b/src/3rdparty/phonon/ds9/qpin.cpp
@@ -28,20 +28,7 @@ namespace Phonon
namespace DS9
{
- static const AM_MEDIA_TYPE defaultMediaType()
- {
- AM_MEDIA_TYPE ret;
- ret.majortype = MEDIATYPE_NULL;
- ret.subtype = MEDIASUBTYPE_NULL;
- ret.bFixedSizeSamples = TRUE;
- ret.bTemporalCompression = FALSE;
- ret.lSampleSize = 1;
- ret.formattype = GUID_NULL;
- ret.pUnk = 0;
- ret.cbFormat = 0;
- ret.pbFormat = 0;
- return ret;
- }
+ static const AM_MEDIA_TYPE defaultMediaType = { MEDIATYPE_NULL, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0};
class QEnumMediaTypes : public IEnumMediaTypes
{
@@ -159,7 +146,7 @@ namespace Phonon
QPin::QPin(QBaseFilter *parent, PIN_DIRECTION dir, const QVector<AM_MEDIA_TYPE> &mt) :
m_memAlloc(0), m_parent(parent), m_refCount(1), m_connected(0),
- m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType()),
+ m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType),
m_flushing(false)
{
Q_ASSERT(m_parent);
@@ -273,7 +260,7 @@ namespace Phonon
if (FAILED(hr)) {
setConnected(0);
- setConnectedType(defaultMediaType());
+ setConnectedType(defaultMediaType);
} else {
ComPointer<IMemInputPin> input(pin, IID_IMemInputPin);
if (input) {
@@ -315,10 +302,8 @@ namespace Phonon
}
setConnected(0);
- setConnectedType(defaultMediaType());
- if (m_direction == PINDIR_INPUT) {
- setMemoryAllocator(0);
- }
+ setConnectedType(defaultMediaType);
+ setMemoryAllocator(0);
return S_OK;
}
@@ -456,8 +441,8 @@ namespace Phonon
HRESULT QPin::checkOutputMediaTypesConnection(IPin *pin)
{
- IEnumMediaTypes *emt = 0;
- HRESULT hr = pin->EnumMediaTypes(&emt);
+ ComPointer<IEnumMediaTypes> emt;
+ HRESULT hr = pin->EnumMediaTypes(emt.pparam());
if (hr != S_OK) {
return hr;
}
@@ -470,7 +455,7 @@ namespace Phonon
freeMediaType(type);
return S_OK;
} else {
- setConnectedType(defaultMediaType());
+ setConnectedType(defaultMediaType);
freeMediaType(type);
}
}
diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
index dd6e076..2112267 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
@@ -63,9 +63,9 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
static const char yv12ToRgb[] =
"!!ARBfp1.0"
"PARAM c[5] = { program.local[0..1],"
-" { 1.164, 0, 1.596, 0.5 },"
-" { 0.0625, 1.164, -0.391, -0.81300002 },"
-" { 1.164, 2.0179999, 0 } };"
+"{ 1.164, 0, 1.596, 0.5 },"
+"{ 0.0625, 1.164, -0.391, -0.81300002 },"
+"{ 1.164, 2.0179999, 0 } };"
"TEMP R0;"
"TEX R0.x, fragment.texcoord[0], texture[1], 2D;"
"ADD R0.y, R0.x, -c[2].w;"
@@ -89,11 +89,11 @@ static const char yv12ToRgb[] =
"END";
static const char yuy2ToRgb[] =
- "!!ARBfp1.0"
+"!!ARBfp1.0"
"PARAM c[5] = { program.local[0..1],"
-" { 0.5, 2, 1, 0.0625 },"
-" { 1.164, 0, 1.596, 2.0179999 },"
-" { 1.164, -0.391, -0.81300002 } };"
+"{ 0.5, 2, 1, 0.0625 },"
+"{ 1.164, 0, 1.596, 2.0179999 },"
+"{ 1.164, -0.391, -0.81300002 } };"
"TEMP R0;"
"TEMP R1;"
"TEMP R2;"
@@ -149,24 +149,16 @@ namespace Phonon
{
static const QVector<AM_MEDIA_TYPE> videoMediaTypes()
{
- AM_MEDIA_TYPE mt;
- qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE));
- mt.majortype = MEDIATYPE_Video;
-
- //we accept any video format
- mt.formattype = GUID_NULL;
- mt.cbFormat = 0;
- mt.pbFormat = 0;
+ AM_MEDIA_TYPE mt = { MEDIATYPE_Video, MEDIASUBTYPE_YV12, 0, 0, 0, GUID_NULL, 0, 0, 0 };
QVector<AM_MEDIA_TYPE> ret;
- //we support YUV (YV12 and YUY2) and RGB32
- mt.subtype = MEDIASUBTYPE_YV12;
- ret << mt;
+ //we add all the subtypes we support
+ ret << mt; //YV12
mt.subtype = MEDIASUBTYPE_YUY2;
- ret << mt;
+ ret << mt; //YUY2
mt.subtype = MEDIASUBTYPE_RGB32;
- ret << mt;
+ ret << mt; //RGB32
return ret;
}
diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp
index 0ef653f..34ff8cb 100644
--- a/src/3rdparty/phonon/ds9/videowidget.cpp
+++ b/src/3rdparty/phonon/ds9/videowidget.cpp
@@ -153,7 +153,7 @@ namespace Phonon
}
} else if (!isEmbedded()) {
m_currentRenderer = m_node->switchRendering(m_currentRenderer);
- setAttribute(Qt::WA_PaintOnScreen, true);
+ setAttribute(Qt::WA_PaintOnScreen, false);
}
}
diff --git a/src/3rdparty/phonon/ds9/volumeeffect.cpp b/src/3rdparty/phonon/ds9/volumeeffect.cpp
index 2fd1afc..b9a5fce 100644
--- a/src/3rdparty/phonon/ds9/volumeeffect.cpp
+++ b/src/3rdparty/phonon/ds9/volumeeffect.cpp
@@ -68,17 +68,7 @@ namespace Phonon
static const QVector<AM_MEDIA_TYPE> audioMediaType()
{
QVector<AM_MEDIA_TYPE> ret;
-
- AM_MEDIA_TYPE mt;
- mt.majortype = MEDIATYPE_Audio;
- mt.subtype = MEDIASUBTYPE_PCM;
- mt.bFixedSizeSamples = 1;
- mt.bTemporalCompression = 0;
- mt.pUnk = 0;
- mt.lSampleSize = 1;
- mt.cbFormat = 0;
- mt.pbFormat = 0;
- mt.formattype = GUID_NULL;
+ AM_MEDIA_TYPE mt = { MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 1, 0, 1, GUID_NULL, 0, 0, 0};
ret << mt;
return ret;
}
diff --git a/src/3rdparty/phonon/phonon/audiooutput.cpp b/src/3rdparty/phonon/phonon/audiooutput.cpp
index 752580a..00b2ebd 100644
--- a/src/3rdparty/phonon/phonon/audiooutput.cpp
+++ b/src/3rdparty/phonon/phonon/audiooutput.cpp
@@ -264,8 +264,8 @@ void AudioOutputPrivate::setupBackendObject()
if (deviceList.isEmpty()) {
return;
}
- foreach (int devIndex, deviceList) {
- const AudioOutputDevice &dev = AudioOutputDevice::fromIndex(devIndex);
+ for (int i = 0; i < deviceList.count(); ++i) {
+ const AudioOutputDevice &dev = AudioOutputDevice::fromIndex(deviceList.at(i));
if (callSetOutputDevice(this, dev)) {
handleAutomaticDeviceChange(dev, AudioOutputPrivate::FallbackChange);
return; // found one that works
@@ -305,8 +305,9 @@ void AudioOutputPrivate::_k_audioDeviceFailed()
pDebug() << Q_FUNC_INFO;
// outputDeviceIndex identifies a failing device
// fall back in the preference list of output devices
- QList<int> deviceList = GlobalConfig().audioOutputDeviceListFor(category, GlobalConfig::AdvancedDevicesFromSettings | GlobalConfig::HideUnavailableDevices);
- foreach (int devIndex, deviceList) {
+ const QList<int> deviceList = GlobalConfig().audioOutputDeviceListFor(category, GlobalConfig::AdvancedDevicesFromSettings | GlobalConfig::HideUnavailableDevices);
+ for (int i = 0; i < deviceList.count(); ++i) {
+ const int devIndex = deviceList.at(i);
// if it's the same device as the one that failed, ignore it
if (device.index() != devIndex) {
const AudioOutputDevice &info = AudioOutputDevice::fromIndex(devIndex);
@@ -326,9 +327,10 @@ void AudioOutputPrivate::_k_deviceListChanged()
{
pDebug() << Q_FUNC_INFO;
// let's see if there's a usable device higher in the preference list
- QList<int> deviceList = GlobalConfig().audioOutputDeviceListFor(category, GlobalConfig::AdvancedDevicesFromSettings);
+ const QList<int> deviceList = GlobalConfig().audioOutputDeviceListFor(category, GlobalConfig::AdvancedDevicesFromSettings);
DeviceChangeType changeType = HigherPreferenceChange;
- foreach (int devIndex, deviceList) {
+ for (int i = 0; i < deviceList.count(); ++i) {
+ const int devIndex = deviceList.at(i);
const AudioOutputDevice &info = AudioOutputDevice::fromIndex(devIndex);
if (!info.property("available").toBool()) {
if (device.index() == devIndex) {
diff --git a/src/3rdparty/phonon/phonon/backendcapabilities.cpp b/src/3rdparty/phonon/phonon/backendcapabilities.cpp
index 5dee6a0..62c9cc9 100644
--- a/src/3rdparty/phonon/phonon/backendcapabilities.cpp
+++ b/src/3rdparty/phonon/phonon/backendcapabilities.cpp
@@ -76,8 +76,8 @@ QList<AudioOutputDevice> BackendCapabilities::availableAudioOutputDevices()
{
QList<AudioOutputDevice> ret;
const QList<int> deviceIndexes = GlobalConfig().audioOutputDeviceListFor(Phonon::NoCategory);
- foreach (int i, deviceIndexes) {
- ret.append(AudioOutputDevice::fromIndex(i));
+ for (int i = 0; i < deviceIndexes.count(); ++i) {
+ ret.append(AudioOutputDevice::fromIndex(deviceIndexes.at(i)));
}
return ret;
}
@@ -88,8 +88,8 @@ QList<AudioCaptureDevice> BackendCapabilities::availableAudioCaptureDevices()
{
QList<AudioCaptureDevice> ret;
const QList<int> deviceIndexes = GlobalConfig().audioCaptureDeviceListFor(Phonon::NoCategory);
- foreach (int i, deviceIndexes) {
- ret.append(AudioCaptureDevice::fromIndex(i));
+ for (int i = 0; i < deviceIndexes.count(); ++i) {
+ ret.append(AudioCaptureDevice::fromIndex(deviceIndexes.at(i)));
}
return ret;
}
@@ -101,9 +101,9 @@ QList<EffectDescription> BackendCapabilities::availableAudioEffects()
BackendInterface *backendIface = qobject_cast<BackendInterface *>(Factory::backend());
QList<EffectDescription> ret;
if (backendIface) {
- QList<int> deviceIndexes = backendIface->objectDescriptionIndexes(Phonon::EffectType);
- foreach (int i, deviceIndexes) {
- ret.append(EffectDescription::fromIndex(i));
+ const QList<int> deviceIndexes = backendIface->objectDescriptionIndexes(Phonon::EffectType);
+ for (int i = 0; i < deviceIndexes.count(); ++i) {
+ ret.append(EffectDescription::fromIndex(deviceIndexes.at(i)));
}
}
return ret;
diff --git a/src/3rdparty/phonon/phonon/backendcapabilities.h b/src/3rdparty/phonon/phonon/backendcapabilities.h
index 65b2830..36454a3 100644
--- a/src/3rdparty/phonon/phonon/backendcapabilities.h
+++ b/src/3rdparty/phonon/phonon/backendcapabilities.h
@@ -6,7 +6,7 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
- successor approved by the membership of KDE e.V.), Trolltech ASA
+ successor approved by the membership of KDE e.V.), Trolltech ASA
(or its successors, if any) and the KDE Free Qt Foundation, which shall
act as a proxy defined in Section 6 of version 3 of the license.
@@ -15,7 +15,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
+ You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -88,19 +88,18 @@ namespace BackendCapabilities
};
/**
- * Use this function to get a QObject pointer to connect to the capabilitiesChanged signal.
+ * Use this function to get a QObject pointer to connect to one of the Notifier signals.
*
* \return a pointer to a QObject.
*
- * The capabilitiesChanged signal is emitted if the capabilities have changed. This can
- * happen if the user has requested a backend change.
- *
- * To connect to this signal do the following:
+ * To connect to the signal do the following:
* \code
* QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitiesChanged()), ...
* \endcode
*
* \see Notifier::capabilitiesChanged()
+ * \see Notifier::availableAudioOutputDevicesChanged()
+ * \see Notifier::availableAudioCaptureDevicesChanged()
*/
PHONON_EXPORT Notifier *notifier();
diff --git a/src/3rdparty/phonon/phonon/effect.cpp b/src/3rdparty/phonon/phonon/effect.cpp
index c125232..98662a5 100644
--- a/src/3rdparty/phonon/phonon/effect.cpp
+++ b/src/3rdparty/phonon/phonon/effect.cpp
@@ -107,7 +107,8 @@ bool EffectPrivate::aboutToDeleteBackendObject()
{
if (m_backendObject) {
const QList<EffectParameter> parameters = pINTERFACE_CALL(parameters());
- foreach (const EffectParameter &p, parameters) {
+ for (int i = 0; i < parameters.count(); ++i) {
+ const EffectParameter &p = parameters.at(i);
parameterValues[p] = pINTERFACE_CALL(parameterValue(p));
}
}
@@ -120,7 +121,8 @@ void EffectPrivate::setupBackendObject()
// set up attributes
const QList<EffectParameter> parameters = pINTERFACE_CALL(parameters());
- foreach (const EffectParameter &p, parameters) {
+ for (int i = 0; i < parameters.count(); ++i) {
+ const EffectParameter &p = parameters.at(i);
pINTERFACE_CALL(setParameterValue(p, parameterValues[p]));
}
}
diff --git a/src/3rdparty/phonon/phonon/effectwidget.cpp b/src/3rdparty/phonon/phonon/effectwidget.cpp
index d5c6c81..99478f7 100644
--- a/src/3rdparty/phonon/phonon/effectwidget.cpp
+++ b/src/3rdparty/phonon/phonon/effectwidget.cpp
@@ -97,7 +97,8 @@ void EffectWidgetPrivate::autogenerateUi()
Q_Q(EffectWidget);
QVBoxLayout *mainLayout = new QVBoxLayout(q);
mainLayout->setMargin(0);
- foreach (const EffectParameter &para, effect->parameters()) {
+ for (int i = 0; i < effect->parameters().count(); ++i) {
+ const EffectParameter &para = effect->parameters().at(i);
QVariant value = effect->parameterValue(para);
QHBoxLayout *pLayout = new QHBoxLayout;
mainLayout->addLayout(pLayout);
@@ -117,13 +118,14 @@ void EffectWidgetPrivate::autogenerateUi()
control = cb;
if (value.type() == QVariant::Int) {
//value just defines the item index
- foreach (const QVariant &item, para.possibleValues()) {
- cb->addItem(item.toString());
+ for (int i = 0; i < para.possibleValues().count(); ++i) {
+ cb->addItem(para.possibleValues().at(i).toString());
}
cb->setCurrentIndex(value.toInt());
QObject::connect(cb, SIGNAL(currentIndexChanged(int)), q, SLOT(_k_setIntParameter(int)));
} else {
- foreach (const QVariant &item, para.possibleValues()) {
+ for (int i = 0; i < para.possibleValues().count(); ++i) {
+ const QVariant &item = para.possibleValues().at(i);
cb->addItem(item.toString());
if (item == value) {
cb->setCurrentIndex(cb->count() - 1);
diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp
index 43c45ee..fef88f0 100644
--- a/src/3rdparty/phonon/phonon/factory.cpp
+++ b/src/3rdparty/phonon/phonon/factory.cpp
@@ -124,15 +124,18 @@ bool FactoryPrivate::createBackend()
// could not load a backend through the platform plugin. Falling back to the default
// (finding the first loadable backend).
const QLatin1String suffix("/phonon_backend/");
- foreach (QString libPath, QCoreApplication::libraryPaths()) {
- libPath += suffix;
+ const QStringList paths = QCoreApplication::libraryPaths();
+ for (int i = 0; i < paths.count(); ++i) {
+ const QString libPath = paths.at(i) + suffix;
const QDir dir(libPath);
if (!dir.exists()) {
pDebug() << Q_FUNC_INFO << dir.absolutePath() << "does not exist";
continue;
}
- foreach (const QString &pluginName, dir.entryList(QDir::Files)) {
- QPluginLoader pluginLoader(libPath + pluginName);
+
+ const QStringList files = dir.entryList(QDir::Files);
+ for (int i = 0; i < files.count(); ++i) {
+ QPluginLoader pluginLoader(libPath + files.at(i));
if (!pluginLoader.load()) {
pDebug() << Q_FUNC_INFO << " load failed:"
<< pluginLoader.errorString();
@@ -183,14 +186,8 @@ FactoryPrivate::FactoryPrivate()
FactoryPrivate::~FactoryPrivate()
{
- foreach (QObject *o, objects) {
- MediaObject *m = qobject_cast<MediaObject *>(o);
- if (m) {
- m->stop();
- }
- }
- foreach (MediaNodePrivate *bp, mediaNodePrivateList) {
- bp->deleteBackendObject();
+ for (int i = 0; i < mediaNodePrivateList.count(); ++i) {
+ mediaNodePrivateList.at(i)->deleteBackendObject();
}
if (objects.size() > 0) {
pError() << "The backend objects are not deleted as was requested.";
@@ -258,8 +255,8 @@ void Factory::deregisterFrontendObject(MediaNodePrivate *bp)
void FactoryPrivate::phononBackendChanged()
{
if (m_backendObject) {
- foreach (MediaNodePrivate *bp, mediaNodePrivateList) {
- bp->deleteBackendObject();
+ for (int i = 0; i < mediaNodePrivateList.count(); ++i) {
+ mediaNodePrivateList.at(i)->deleteBackendObject();
}
if (objects.size() > 0) {
pDebug() << "WARNING: we were asked to change the backend but the application did\n"
@@ -268,8 +265,8 @@ void FactoryPrivate::phononBackendChanged()
"backendswitching possible.";
// in case there were objects deleted give 'em a chance to recreate
// them now
- foreach (MediaNodePrivate *bp, mediaNodePrivateList) {
- bp->createBackendObject();
+ for (int i = 0; i < mediaNodePrivateList.count(); ++i) {
+ mediaNodePrivateList.at(i)->createBackendObject();
}
return;
}
@@ -277,8 +274,8 @@ void FactoryPrivate::phononBackendChanged()
m_backendObject = 0;
}
createBackend();
- foreach (MediaNodePrivate *bp, mediaNodePrivateList) {
- bp->createBackendObject();
+ for (int i = 0; i < mediaNodePrivateList.count(); ++i) {
+ mediaNodePrivateList.at(i)->createBackendObject();
}
emit backendChanged();
}
@@ -362,15 +359,17 @@ PlatformPlugin *FactoryPrivate::platformPlugin()
QStringList())
);
dir.setFilter(QDir::Files);
+ const QStringList libPaths = QCoreApplication::libraryPaths();
forever {
- foreach (QString libPath, QCoreApplication::libraryPaths()) {
- libPath += suffix;
+ for (int i = 0; i < libPaths.count(); ++i) {
+ const QString libPath = libPaths.at(i) + suffix;
dir.setPath(libPath);
if (!dir.exists()) {
continue;
}
- foreach (const QString &pluginName, dir.entryList()) {
- QPluginLoader pluginLoader(libPath + pluginName);
+ const QStringList files = dir.entryList(QDir::Files);
+ for (int i = 0; i < files.count(); ++i) {
+ QPluginLoader pluginLoader(libPath + files.at(i));
if (!pluginLoader.load()) {
pDebug() << Q_FUNC_INFO << " platform plugin load failed:"
<< pluginLoader.errorString();
diff --git a/src/3rdparty/phonon/phonon/medianode.cpp b/src/3rdparty/phonon/phonon/medianode.cpp
index 4693cb8..63fa2e3 100644
--- a/src/3rdparty/phonon/phonon/medianode.cpp
+++ b/src/3rdparty/phonon/phonon/medianode.cpp
@@ -67,8 +67,8 @@ bool MediaNode::isValid() const
MediaNodePrivate::~MediaNodePrivate()
{
- foreach (MediaNodeDestructionHandler *handler, handlers) {
- handler->phononObjectDestroyed(this);
+ for (int i = 0 ; i < handlers.count(); ++i) {
+ handlers.at(i)->phononObjectDestroyed(this);
}
Factory::deregisterFrontendObject(this);
delete m_backendObject;
diff --git a/src/3rdparty/phonon/phonon/mediaobject.cpp b/src/3rdparty/phonon/phonon/mediaobject.cpp
index de5fbc8..10fefbd 100644
--- a/src/3rdparty/phonon/phonon/mediaobject.cpp
+++ b/src/3rdparty/phonon/phonon/mediaobject.cpp
@@ -300,15 +300,15 @@ void MediaObject::enqueue(const MediaSource &source)
void MediaObject::enqueue(const QList<MediaSource> &sources)
{
- foreach (const MediaSource &m, sources) {
- enqueue(m);
+ for (int i = 0; i < sources.count(); ++i) {
+ enqueue(sources.at(i));
}
}
void MediaObject::enqueue(const QList<QUrl> &urls)
{
- foreach (const QUrl &url, urls) {
- enqueue(url);
+ for (int i = 0; i < urls.count(); ++i) {
+ enqueue(urls.at(i));
}
}
@@ -502,8 +502,8 @@ void MediaObjectPrivate::setupBackendObject()
}
#ifndef QT_NO_PHONON_MEDIACONTROLLER
- foreach (FrontendInterfacePrivate *f, interfaceList) {
- f->_backendObjectChanged();
+ for (int i = 0 ; i < interfaceList.count(); ++i) {
+ interfaceList.at(i)->_backendObjectChanged();
}
#endif //QT_NO_PHONON_MEDIACONTROLLER
diff --git a/src/3rdparty/phonon/phonon/mediaobject.h b/src/3rdparty/phonon/phonon/mediaobject.h
index 5cbddbb..c56b6b5 100644
--- a/src/3rdparty/phonon/phonon/mediaobject.h
+++ b/src/3rdparty/phonon/phonon/mediaobject.h
@@ -6,7 +6,7 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
- successor approved by the membership of KDE e.V.), Trolltech ASA
+ successor approved by the membership of KDE e.V.), Trolltech ASA
(or its successors, if any) and the KDE Free Qt Foundation, which shall
act as a proxy defined in Section 6 of version 3 of the license.
@@ -15,7 +15,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
+ You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -58,7 +58,7 @@ namespace Phonon
* media->play();
* \endcode
*
- * If you want to play more that one media file (one after another) you can
+ * If you want to play more than one media file (one after another) you can
* either tell MediaObject about all those files
* \code
* media->setCurrentSource(":/sounds/startsound.ogg");
@@ -198,18 +198,18 @@ namespace Phonon
* Check whether the current media may be seeked.
*
* \warning This information cannot be known immediately. It is best
- * to also listen to the hasVideoChanged signal.
+ * to also listen to the seekableChanged signal.
*
* \code
- * connect(media, SIGNAL(hasVideoChanged(bool)), hasVideoChanged(bool));
+ * connect(media, SIGNAL(seekableChanged(bool)), seekableChanged(bool));
* media->setCurrentSource("somevideo.avi");
- * media->hasVideo(); // returns false;
+ * media->isSeekable(); // returns false;
* }
*
- * void hasVideoChanged(bool b)
+ * void seekableChanged(bool b)
* {
* // b == true
- * media->hasVideo(); // returns true;
+ * media->isSeekable(); // returns true;
* }
* \endcode
*
@@ -301,7 +301,7 @@ namespace Phonon
void setCurrentSource(const MediaSource &source);
/**
- * Returns the queued media sources. This does list does not include
+ * Returns the queued media sources. This list does not include
* the current source (returned by currentSource).
*/
QList<MediaSource> queue() const;
@@ -456,8 +456,6 @@ namespace Phonon
Q_SIGNALS:
/**
* Emitted when the state of the MediaObject has changed.
- * In case you're not interested in the old state you can also
- * connect to a slot that only has one State argument.
*
* @param newstate The state the Player is in now.
* @param oldstate The state the Player was in before.
@@ -587,7 +585,7 @@ namespace Phonon
/**
* This signal is emitted as soon as the total time of the media file is
* known or has changed. For most non-local media data the total
- * time of the media can only be known after some time. At that time the
+ * time of the media can only be known after some time. Initially the
* totalTime function can not return useful information. You have
* to wait for this signal to know the real total time.
*
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp b/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp
index e989d0c..b67344f 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp
@@ -321,8 +321,8 @@ bool ObjectDescriptionModelData::dropMimeData(ObjectDescriptionType type, const
}
}
d->model->beginInsertRows(QModelIndex(), row, row + toInsert.size() - 1);
- foreach (const QExplicitlySharedDataPointer<ObjectDescriptionData> &obj, toInsert) {
- d->data.insert(row, obj);
+ for (int i = 0 ; i < toInsert.count(); ++i) {
+ d->data.insert(row, toInsert.at(i));
}
d->model->endInsertRows();
return true;
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
index 84dc0bb..ba3cb42 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
@@ -292,8 +292,8 @@ namespace Phonon
*/
inline void setModelData(const QList<ObjectDescription<type> > &data) { //krazy:exclude=inline
QList<QExplicitlySharedDataPointer<ObjectDescriptionData> > list;
- Q_FOREACH (const ObjectDescription<type> &desc, data) {
- list << desc.d;
+ for (int i = 0; i < data.count(); ++i) {
+ list += data.at(i).d;
}
d->setModelData(list);
}
@@ -307,8 +307,8 @@ namespace Phonon
inline QList<ObjectDescription<type> > modelData() const { //krazy:exclude=inline
QList<ObjectDescription<type> > ret;
QList<QExplicitlySharedDataPointer<ObjectDescriptionData> > list = d->modelData();
- Q_FOREACH (const QExplicitlySharedDataPointer<ObjectDescriptionData> &data, list) {
- ret << ObjectDescription<type>(data);
+ for (int i = 0; i < list.count(); ++i) {
+ ret << ObjectDescription<type>(list.at(i));
}
return ret;
}
diff --git a/src/3rdparty/phonon/phonon/path.cpp b/src/3rdparty/phonon/phonon/path.cpp
index b46d30a..aec8d05 100644
--- a/src/3rdparty/phonon/phonon/path.cpp
+++ b/src/3rdparty/phonon/phonon/path.cpp
@@ -58,8 +58,8 @@ class ConnectionTransaction
PathPrivate::~PathPrivate()
{
#ifndef QT_NO_PHONON_EFFECT
- foreach (Effect *e, effects) {
- e->k_ptr->removeDestructionHandler(this);
+ for (int i = 0; i < effects.count(); ++i) {
+ effects.at(i)->k_ptr->removeDestructionHandler(this);
}
delete effectsParent;
#endif
@@ -233,8 +233,8 @@ bool Path::disconnect()
if (d->sourceNode)
list << d->sourceNode->k_ptr->backendObject();
#ifndef QT_NO_PHONON_EFFECT
- foreach(Effect *e, d->effects) {
- list << e->k_ptr->backendObject();
+ for (int i = 0; i < d->effects.count(); ++i) {
+ list << d->effects.at(i)->k_ptr->backendObject();
}
#endif
if (d->sinkNode) {
@@ -260,8 +260,8 @@ bool Path::disconnect()
d->sourceNode = 0;
#ifndef QT_NO_PHONON_EFFECT
- foreach(Effect *e, d->effects) {
- e->k_ptr->removeDestructionHandler(d.data());
+ for (int i = 0; i < d->effects.count(); ++i) {
+ d->effects.at(i)->k_ptr->removeDestructionHandler(d.data());
}
d->effects.clear();
#endif
@@ -292,11 +292,13 @@ MediaNode *Path::sink() const
bool PathPrivate::executeTransaction( const QList<QObjectPair> &disconnections, const QList<QObjectPair> &connections)
{
QSet<QObject*> nodesForTransaction;
- foreach(const QObjectPair &pair, disconnections) {
+ for (int i = 0; i < disconnections.count(); ++i) {
+ const QObjectPair &pair = disconnections.at(i);
nodesForTransaction << pair.first;
nodesForTransaction << pair.second;
}
- foreach(const QObjectPair &pair, connections) {
+ for (int i = 0; i < connections.count(); ++i) {
+ const QObjectPair &pair = connections.at(i);
nodesForTransaction << pair.first;
nodesForTransaction << pair.second;
}
@@ -338,7 +340,8 @@ bool PathPrivate::executeTransaction( const QList<QObjectPair> &disconnections,
}
//and now let's reconnect the nodes that were disconnected: rollback
- foreach(const QObjectPair &pair, disconnections) {
+ for (int i = 0; i < disconnections.count(); ++i) {
+ const QObjectPair &pair = disconnections.at(i);
bool success = backend->connectNodes(pair.first, pair.second);
Q_ASSERT(success); //a failure here means it is impossible to reestablish the connection
Q_UNUSED(success);
@@ -417,7 +420,8 @@ void PathPrivate::phononObjectDestroyed(MediaNodePrivate *mediaNodePrivate)
sinkNode = 0;
} else {
#ifndef QT_NO_PHONON_EFFECT
- foreach (Effect *e, effects) {
+ for (int i = 0; i < effects.count(); ++i) {
+ Effect *e = effects.at(i);
if (e->k_ptr == mediaNodePrivate) {
removeEffect(e);
}
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index f2cc9a2..fa8e3ff 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,3 +1,72 @@
+2009-07-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Build fix for QtWebKit on Win
+ https://bugs.webkit.org/show_bug.cgi?id=27205
+
+ * WebKit.pri: Include the major version number in the QtWebKit
+ library file for Win.
+
+2009-07-13 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Add the test netscape plugin for the Qt DRT to the build.
+
+ * WebKit.pro:
+
+2009-07-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
+ https://bugs.webkit.org/show_bug.cgi?id=26932
+
+ Added ENABLE(SHARED_WORKERS) flag.
+
+ * configure.ac:
+
+2009-07-12 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Bump version in preparation for 1.1.11 release.
+
+ * configure.ac:
+
+2009-07-07 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Exclude DumpRenderTree.pro from symbian build
+
+ * WebKit.pro:
+
+2009-07-09 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26903
+
+ Turned on CHANNEL_MESSAGING by default because the MessageChannel API
+ can now be implemented for Web Workers and is reasonably stable.
+
+ * configure.ac: enable CHANNEL_MESSAGING.
+
+2009-07-03 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez and Gustavo Noronha.
+
+ Set user-agent from application
+ https://bugs.webkit.org/show_bug.cgi?id=17375
+
+ Define UA version macros to be used by the UA string.
+ Add new WebSettings unit test for the User-Agent string API.
+
+ * GNUmakefile.am:
+ * configure.ac:
+
2009-06-20 Gustavo Noronha Silva <gns@gnome.org>
Reviewed by Jan Alonzo.
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index c8bba0f..cd46bf5 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,464 @@
+2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed make dist build fix.
+
+ * GNUmakefile.am:
+
+2009-07-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
+ https://bugs.webkit.org/show_bug.cgi?id=26932
+
+ Added ENABLE(SHARED_WORKERS) flag (off by default).
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-07 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Maciej Stachoviak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27058
+
+ Removed superfluous parenthesis around single expression.
+ Compilers on Symbian platform fail to properly parse and compile.
+
+ * JavaScriptCore/wtf/Platform.h:
+
+2009-07-13 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Maciej Stachoviak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27054
+
+ Renamed Translator to HashTranslator
+
+ Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
+ mismatch between template declaration and definition
+ (HashTranslator / Translator)
+
+ * wtf/HashSet.h:
+
+2009-07-13 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27053
+
+ Ambiguity in LabelScope initialization
+
+ Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
+ type of "0" unambiguously. Set expression explicitly to
+ PassRefPtr<Label>::PassRefPtr()
+
+ * bytecompiler/BytecodeGenerator.cpp
+
+2009-07-11 Simon Fraser <simon.fraser@apple.com>
+
+ Enable support for accelerated compositing and 3d transforms on Leopard.
+ <https://bugs.webkit.org/show_bug.cgi?id=20166>
+ <rdar://problem/6120614>
+
+ Reviewed by Oliver Hunt.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * wtf/Platform.h:
+
+2009-07-10 Mark Rowe <mrowe@apple.com>
+
+ Second part of the "make Windows happier" dance.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-07-10 Mark Rowe <mrowe@apple.com>
+
+ Try and make the Windows build happy.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-07-10 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ * debugger/Debugger.h: Made this function virtual for use in WebCore's
+ WebInspector.
+
+2009-07-10 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Darin Adler.
+
+ ParserArenaDeletable should override delete
+ https://bugs.webkit.org/show_bug.cgi?id=26790
+
+ ParserArenaDeletable overrides new, but it does not override delete.
+ ParserArenaDeletable must be freed by fastFree
+ because it is allocated by fastMalloc.
+
+ * parser/NodeConstructors.h:
+ (JSC::ParserArenaDeletable::operator delete):
+ * parser/Nodes.h:
+
+2009-07-10 Adam Roben <aroben@apple.com>
+
+ Sort all our Xcode projects
+
+ Accomplished using sort-Xcode-project-file.
+
+ Requested by Dave Kilzer.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2009-07-09 Maciej Stachowiak <mjs@apple.com>
+
+ Not reviewed, build fix.
+
+ Windows build fix for the last change.
+
+ * wtf/dtoa.cpp: Forgot to include Vector.h
+
+2009-07-09 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: crash in edge cases of floating point parsing.
+ https://bugs.webkit.org/show_bug.cgi?id=27110
+ <rdar://problem/7044458>
+
+ Tests: fast/css/number-parsing-crash.html
+ fast/css/number-parsing-crash.html
+ fast/js/number-parsing-crash.html
+
+ * wtf/dtoa.cpp:
+ (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
+ with inline capacity
+
+ (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
+ Added an assertion to verify that invariants are maintained.
+
+ All other functions are adapted fairly mechanically to the above changes.
+ (WTF::BigInt::clear):
+ (WTF::BigInt::size):
+ (WTF::BigInt::resize):
+ (WTF::BigInt::words):
+ (WTF::BigInt::append):
+ (WTF::multadd):
+ (WTF::s2b):
+ (WTF::i2b):
+ (WTF::mult):
+ (WTF::cmp):
+ (WTF::diff):
+ (WTF::b2d):
+ (WTF::d2b):
+ (WTF::ratio):
+ (WTF::strtod):
+ (WTF::quorem):
+ (WTF::dtoa):
+
+2009-07-09 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Turned on CHANNEL_MESSAGING by default because the MessageChannel API
+ can now be implemented for Web Workers and is reasonably stable.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-09 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute):
+
+2009-07-09 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27016 - Interpreter crashes due to invalid array indexes
+ <https://bugs.webkit.org/show_bug.cgi?id=27016>
+
+ Unsigned vs signed conversions results in incorrect behaviour in
+ 64bit interpreter builds.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute):
+
+2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=27135
+
+ * JavaScriptCore.gypi: Added.
+
+2009-07-09 Joe Mason <joe.mason@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=27031
+ Add an override for deleteOwnedPtr(HDC) on Windows
+
+ * wtf/OwnPtrCommon.h:
+ * wtf/OwnPtrWin.cpp:
+ (WTF::deleteOwnedPtr):
+
+2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
+ on SYMBIAN.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27026
+
+ Based on Norbert Leser's work.
+
+ * jsc.cpp:
+ (printUsageStatement):
+ (parseArguments):
+ * wtf/Platform.h:
+
+2009-07-07 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Stop loading constants into the register file.
+
+ Instead, use high register values (highest bit bar the sign bit set) to indicate
+ constants in the instruction stream, and when we encounter such a value load it
+ directly from the CodeBlock.
+
+ Since constants are no longer copied into the register file, this patch renders
+ the 'unexpected constant' mechanism redundant, and removes it.
+
+ 2% improvement, thanks to Sam Weinig.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dump):
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::CodeBlock::mark):
+ (JSC::CodeBlock::shrinkToFit):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::isTemporaryRegisterIndex):
+ (JSC::CodeBlock::constantRegister):
+ (JSC::CodeBlock::isConstantRegisterIndex):
+ (JSC::CodeBlock::getConstant):
+ (JSC::ExecState::r):
+ * bytecode/Opcode.h:
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::preserveLastVar):
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::addConstantValue):
+ (JSC::BytecodeGenerator::emitEqualityOp):
+ (JSC::BytecodeGenerator::emitLoad):
+ (JSC::BytecodeGenerator::emitResolveBase):
+ (JSC::BytecodeGenerator::emitResolveWithBase):
+ (JSC::BytecodeGenerator::emitNewError):
+ * bytecompiler/BytecodeGenerator.h:
+ (JSC::BytecodeGenerator::emitNode):
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::noCaller):
+ (JSC::ExecState::hasHostCallFrameFlag):
+ (JSC::ExecState::addHostCallFrameFlag):
+ (JSC::ExecState::removeHostCallFrameFlag):
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::resolve):
+ (JSC::Interpreter::resolveSkip):
+ (JSC::Interpreter::resolveGlobal):
+ (JSC::Interpreter::resolveBase):
+ (JSC::Interpreter::resolveBaseAndProperty):
+ (JSC::Interpreter::resolveBaseAndFunc):
+ (JSC::Interpreter::dumpRegisters):
+ (JSC::Interpreter::throwException):
+ (JSC::Interpreter::createExceptionScope):
+ (JSC::Interpreter::privateExecute):
+ (JSC::Interpreter::retrieveArguments):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::emitLoadDouble):
+ (JSC::JIT::emitLoadInt32ToDouble):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_new_error):
+ (JSC::JIT::emit_op_enter):
+ (JSC::JIT::emit_op_enter_with_activation):
+ * parser/Nodes.cpp:
+ (JSC::DeleteResolveNode::emitBytecode):
+ (JSC::DeleteValueNode::emitBytecode):
+ (JSC::PrefixResolveNode::emitBytecode):
+ * runtime/JSActivation.cpp:
+ (JSC::JSActivation::JSActivation):
+ * wtf/Platform.h:
+
+2009-07-07 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
+ Bug 27025: Crashes and regression test failures related to regexps in 64-bit
+
+ For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
+ neglects to save and restore it. The change in handling of the output vector in r45545
+ altered code generation so that the RegExp::match was now storing important data in rbx,
+ which caused crashes and bogus results when it was clobbered.
+
+ * yarr/RegexJIT.cpp:
+ (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
+ (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
+
+2009-07-06 Ada Chan <adachan@apple.com>
+
+ Reviewed by Darin Adler and Mark Rowe.
+
+ Decommitted spans are added to the list of normal spans rather than
+ the returned spans in TCMalloc_PageHeap::Delete().
+ https://bugs.webkit.org/show_bug.cgi?id=26998
+
+ In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
+ the process of merging with neighboring spans that are also decommitted.
+ The merged span needs to be placed in the list of returned spans (spans
+ whose memory has been returned to the system). Right now it's always added
+ to the list of the normal spans which can theoretically cause thrashing.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_PageHeap::Delete):
+
+2009-07-05 Lars Knoll <lars.knoll@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26843
+
+ Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
+
+ The Metrowerks compiler on the Symbian platform moves the globally
+ defined Hashtables into read-only memory, despite one of the members
+ being mutable. This causes crashes at run-time due to write access to
+ read-only memory.
+
+ Avoid the use of const with this compiler by introducing the
+ JSC_CONST_HASHTABLE macro.
+
+ Based on idea by Norbert Leser.
+
+ * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
+ * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
+ * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
+
+2009-07-04 Dan Bernstein <mitz@apple.com>
+
+ - debug build fix
+
+ * runtime/RegExpConstructor.cpp:
+ (JSC::RegExpConstructor::getLastParen):
+
+2009-07-03 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Maciej Stachowiak (and revised slightly)
+
+ RegExp::match to be optimized
+ https://bugs.webkit.org/show_bug.cgi?id=26957
+
+ Allow regexp matching to use Vectors with inline capacity instead of
+ allocating a new ovector buffer every time.
+
+ ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
+
+ * runtime/RegExp.cpp:
+ (JSC::RegExp::match):
+ * runtime/RegExp.h:
+ * runtime/RegExpConstructor.cpp:
+ (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
+ (JSC::RegExpConstructorPrivate::lastOvector):
+ (JSC::RegExpConstructorPrivate::tempOvector):
+ (JSC::RegExpConstructorPrivate::changeLastOvector):
+ (JSC::RegExpConstructor::performMatch):
+ (JSC::RegExpMatchesArray::RegExpMatchesArray):
+ (JSC::RegExpMatchesArray::fillArrayInstance):
+ (JSC::RegExpConstructor::getBackref):
+ (JSC::RegExpConstructor::getLastParen):
+ (JSC::RegExpConstructor::getLeftContext):
+ (JSC::RegExpConstructor::getRightContext):
+ * runtime/StringPrototype.cpp:
+ (JSC::stringProtoFuncSplit):
+
+2009-06-30 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ Override operator new/delete with const std::nothrow_t& as the second
+ argument.
+ https://bugs.webkit.org/show_bug.cgi?id=26792
+
+ On Windows CE, operator new/delete, new[]/delete[] with const
+ std::nothrow_t& must be overrided because some standard template
+ libraries use these operators.
+
+ The problem occurs when memory allocated by new(size_t s, const
+ std::nothrow_t&) is freed by delete(void* p). This causes the umatched
+ malloc/free problem.
+
+ The patch overrides all new, delete, new[] and delete[] to use
+ fastMaloc and fastFree consistently.
+
+ * wtf/FastMalloc.h:
+ (throw):
+
+2009-06-30 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Reviewed by Sam Weinig.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=24986>
+
+ Remove unnecessary references to AssemblerBuffer.
+
+ * interpreter/Interpreter.cpp:
+ * interpreter/Interpreter.h:
+
+2009-06-29 David Levin <levin@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Still seeing occasional leaks from UString::sharedBuffer code
+ https://bugs.webkit.org/show_bug.cgi?id=26420
+
+ The problem is that the pointer to the memory allocation isn't visible
+ by "leaks" due to the lower bits being used as flags. The fix is to
+ make the pointer visible in memory (in debug only). The downside of
+ this fix that the memory allocated by sharedBuffer will still look like
+ a leak in non-debug builds when any flags are set.
+
+ * wtf/PtrAndFlags.h:
+ (WTF::PtrAndFlags::set):
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Remove more unused scons support.
+
+ * SConstruct: Removed.
+
+2009-06-29 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
+ <https://bugs.webkit.org/show_bug.cgi?id=26802>
+
+ In the original JSON.parse patch unicode was handled correctly, however in some last
+ minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug.
+
+ * runtime/LiteralParser.cpp:
+ (JSC::isSafeStringCharacter):
+ (JSC::LiteralParser::Lexer::lexString):
+
2009-06-26 Oliver Hunt <oliver@apple.com>
Reviewed by Dan Bernstein.
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi
new file mode 100644
index 0000000..2d69c7d
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi
@@ -0,0 +1,452 @@
+{
+ 'variables': {
+ 'javascriptcore_files': [
+ 'AllInOneFile.cpp',
+ 'API/APICast.h',
+ 'API/JavaScript.h',
+ 'API/JavaScriptCore.h',
+ 'API/JSBase.cpp',
+ 'API/JSBase.h',
+ 'API/JSBasePrivate.h',
+ 'API/JSCallbackConstructor.cpp',
+ 'API/JSCallbackConstructor.h',
+ 'API/JSCallbackFunction.cpp',
+ 'API/JSCallbackFunction.h',
+ 'API/JSCallbackObject.cpp',
+ 'API/JSCallbackObject.h',
+ 'API/JSCallbackObjectFunctions.h',
+ 'API/JSClassRef.cpp',
+ 'API/JSClassRef.h',
+ 'API/JSContextRef.cpp',
+ 'API/JSContextRef.h',
+ 'API/JSObjectRef.cpp',
+ 'API/JSObjectRef.h',
+ 'API/JSProfilerPrivate.cpp',
+ 'API/JSProfilerPrivate.h',
+ 'API/JSRetainPtr.h',
+ 'API/JSStringRef.cpp',
+ 'API/JSStringRef.h',
+ 'API/JSStringRefBSTR.cpp',
+ 'API/JSStringRefBSTR.h',
+ 'API/JSStringRefCF.cpp',
+ 'API/JSStringRefCF.h',
+ 'API/JSValueRef.cpp',
+ 'API/JSValueRef.h',
+ 'API/OpaqueJSString.cpp',
+ 'API/OpaqueJSString.h',
+ 'API/tests/JSNode.h',
+ 'API/tests/JSNodeList.h',
+ 'API/tests/Node.h',
+ 'API/tests/NodeList.h',
+ 'API/WebKitAvailability.h',
+ 'assembler/AbstractMacroAssembler.h',
+ 'assembler/ARMv7Assembler.h',
+ 'assembler/AssemblerBuffer.h',
+ 'assembler/CodeLocation.h',
+ 'assembler/MacroAssembler.h',
+ 'assembler/MacroAssemblerARMv7.h',
+ 'assembler/MacroAssemblerCodeRef.h',
+ 'assembler/MacroAssemblerX86.h',
+ 'assembler/MacroAssemblerX86_64.h',
+ 'assembler/MacroAssemblerX86Common.h',
+ 'assembler/X86Assembler.h',
+ 'bytecode/CodeBlock.cpp',
+ 'bytecode/CodeBlock.h',
+ 'bytecode/EvalCodeCache.h',
+ 'bytecode/Instruction.h',
+ 'bytecode/JumpTable.cpp',
+ 'bytecode/JumpTable.h',
+ 'bytecode/Opcode.cpp',
+ 'bytecode/Opcode.h',
+ 'bytecode/SamplingTool.cpp',
+ 'bytecode/SamplingTool.h',
+ 'bytecode/StructureStubInfo.cpp',
+ 'bytecode/StructureStubInfo.h',
+ 'bytecompiler/BytecodeGenerator.cpp',
+ 'bytecompiler/BytecodeGenerator.h',
+ 'bytecompiler/Label.h',
+ 'bytecompiler/LabelScope.h',
+ 'bytecompiler/RegisterID.h',
+ 'config.h',
+ 'debugger/Debugger.cpp',
+ 'debugger/Debugger.h',
+ 'debugger/DebuggerActivation.cpp',
+ 'debugger/DebuggerActivation.h',
+ 'debugger/DebuggerCallFrame.cpp',
+ 'debugger/DebuggerCallFrame.h',
+ 'icu/unicode/parseerr.h',
+ 'icu/unicode/platform.h',
+ 'icu/unicode/putil.h',
+ 'icu/unicode/uchar.h',
+ 'icu/unicode/ucnv.h',
+ 'icu/unicode/ucnv_err.h',
+ 'icu/unicode/ucol.h',
+ 'icu/unicode/uconfig.h',
+ 'icu/unicode/uenum.h',
+ 'icu/unicode/uiter.h',
+ 'icu/unicode/uloc.h',
+ 'icu/unicode/umachine.h',
+ 'icu/unicode/unorm.h',
+ 'icu/unicode/urename.h',
+ 'icu/unicode/uset.h',
+ 'icu/unicode/ustring.h',
+ 'icu/unicode/utf.h',
+ 'icu/unicode/utf16.h',
+ 'icu/unicode/utf8.h',
+ 'icu/unicode/utf_old.h',
+ 'icu/unicode/utypes.h',
+ 'icu/unicode/uversion.h',
+ 'interpreter/CachedCall.h',
+ 'interpreter/CallFrame.cpp',
+ 'interpreter/CallFrame.h',
+ 'interpreter/CallFrameClosure.h',
+ 'interpreter/Interpreter.cpp',
+ 'interpreter/Interpreter.h',
+ 'interpreter/Register.h',
+ 'interpreter/RegisterFile.cpp',
+ 'interpreter/RegisterFile.h',
+ 'JavaScriptCorePrefix.h',
+ 'jit/ExecutableAllocator.cpp',
+ 'jit/ExecutableAllocator.h',
+ 'jit/ExecutableAllocatorFixedVMPool.cpp',
+ 'jit/ExecutableAllocatorPosix.cpp',
+ 'jit/ExecutableAllocatorWin.cpp',
+ 'jit/JIT.cpp',
+ 'jit/JIT.h',
+ 'jit/JITArithmetic.cpp',
+ 'jit/JITCall.cpp',
+ 'jit/JITCode.h',
+ 'jit/JITInlineMethods.h',
+ 'jit/JITOpcodes.cpp',
+ 'jit/JITPropertyAccess.cpp',
+ 'jit/JITStubCall.h',
+ 'jit/JITStubs.cpp',
+ 'jit/JITStubs.h',
+ 'jsc.cpp',
+ 'os-win32/stdbool.h',
+ 'os-win32/stdint.h',
+ 'parser/Lexer.cpp',
+ 'parser/Lexer.h',
+ 'parser/NodeConstructors.h',
+ 'parser/NodeInfo.h',
+ 'parser/Nodes.cpp',
+ 'parser/Nodes.h',
+ 'parser/Parser.cpp',
+ 'parser/Parser.h',
+ 'parser/ParserArena.cpp',
+ 'parser/ParserArena.h',
+ 'parser/ResultType.h',
+ 'parser/SourceCode.h',
+ 'parser/SourceProvider.h',
+ 'pcre/pcre.h',
+ 'pcre/pcre_compile.cpp',
+ 'pcre/pcre_exec.cpp',
+ 'pcre/pcre_internal.h',
+ 'pcre/pcre_tables.cpp',
+ 'pcre/pcre_ucp_searchfuncs.cpp',
+ 'pcre/pcre_xclass.cpp',
+ 'pcre/ucpinternal.h',
+ 'pcre/ucptable.cpp',
+ 'profiler/CallIdentifier.h',
+ 'profiler/HeavyProfile.cpp',
+ 'profiler/HeavyProfile.h',
+ 'profiler/Profile.cpp',
+ 'profiler/Profile.h',
+ 'profiler/ProfileGenerator.cpp',
+ 'profiler/ProfileGenerator.h',
+ 'profiler/ProfileNode.cpp',
+ 'profiler/ProfileNode.h',
+ 'profiler/Profiler.cpp',
+ 'profiler/Profiler.h',
+ 'profiler/ProfilerServer.h',
+ 'profiler/TreeProfile.cpp',
+ 'profiler/TreeProfile.h',
+ 'runtime/ArgList.cpp',
+ 'runtime/ArgList.h',
+ 'runtime/Arguments.cpp',
+ 'runtime/Arguments.h',
+ 'runtime/ArrayConstructor.cpp',
+ 'runtime/ArrayConstructor.h',
+ 'runtime/ArrayPrototype.cpp',
+ 'runtime/ArrayPrototype.h',
+ 'runtime/BatchedTransitionOptimizer.h',
+ 'runtime/BooleanConstructor.cpp',
+ 'runtime/BooleanConstructor.h',
+ 'runtime/BooleanObject.cpp',
+ 'runtime/BooleanObject.h',
+ 'runtime/BooleanPrototype.cpp',
+ 'runtime/BooleanPrototype.h',
+ 'runtime/CallData.cpp',
+ 'runtime/CallData.h',
+ 'runtime/ClassInfo.h',
+ 'runtime/Collector.cpp',
+ 'runtime/Collector.h',
+ 'runtime/CollectorHeapIterator.h',
+ 'runtime/CommonIdentifiers.cpp',
+ 'runtime/CommonIdentifiers.h',
+ 'runtime/Completion.cpp',
+ 'runtime/Completion.h',
+ 'runtime/ConstructData.cpp',
+ 'runtime/ConstructData.h',
+ 'runtime/DateConstructor.cpp',
+ 'runtime/DateConstructor.h',
+ 'runtime/DateConversion.cpp',
+ 'runtime/DateConversion.h',
+ 'runtime/DateInstance.cpp',
+ 'runtime/DateInstance.h',
+ 'runtime/DatePrototype.cpp',
+ 'runtime/DatePrototype.h',
+ 'runtime/Error.cpp',
+ 'runtime/Error.h',
+ 'runtime/ErrorConstructor.cpp',
+ 'runtime/ErrorConstructor.h',
+ 'runtime/ErrorInstance.cpp',
+ 'runtime/ErrorInstance.h',
+ 'runtime/ErrorPrototype.cpp',
+ 'runtime/ErrorPrototype.h',
+ 'runtime/ExceptionHelpers.cpp',
+ 'runtime/ExceptionHelpers.h',
+ 'runtime/FunctionConstructor.cpp',
+ 'runtime/FunctionConstructor.h',
+ 'runtime/FunctionPrototype.cpp',
+ 'runtime/FunctionPrototype.h',
+ 'runtime/GetterSetter.cpp',
+ 'runtime/GetterSetter.h',
+ 'runtime/GlobalEvalFunction.cpp',
+ 'runtime/GlobalEvalFunction.h',
+ 'runtime/Identifier.cpp',
+ 'runtime/Identifier.h',
+ 'runtime/InitializeThreading.cpp',
+ 'runtime/InitializeThreading.h',
+ 'runtime/InternalFunction.cpp',
+ 'runtime/InternalFunction.h',
+ 'runtime/JSActivation.cpp',
+ 'runtime/JSActivation.h',
+ 'runtime/JSArray.cpp',
+ 'runtime/JSArray.h',
+ 'runtime/JSByteArray.cpp',
+ 'runtime/JSByteArray.h',
+ 'runtime/JSCell.cpp',
+ 'runtime/JSCell.h',
+ 'runtime/JSFunction.cpp',
+ 'runtime/JSFunction.h',
+ 'runtime/JSGlobalData.cpp',
+ 'runtime/JSGlobalData.h',
+ 'runtime/JSGlobalObject.cpp',
+ 'runtime/JSGlobalObject.h',
+ 'runtime/JSGlobalObjectFunctions.cpp',
+ 'runtime/JSGlobalObjectFunctions.h',
+ 'runtime/JSImmediate.cpp',
+ 'runtime/JSImmediate.h',
+ 'runtime/JSLock.cpp',
+ 'runtime/JSLock.h',
+ 'runtime/JSNotAnObject.cpp',
+ 'runtime/JSNotAnObject.h',
+ 'runtime/JSNumberCell.cpp',
+ 'runtime/JSNumberCell.h',
+ 'runtime/JSObject.cpp',
+ 'runtime/JSObject.h',
+ 'runtime/JSONObject.cpp',
+ 'runtime/JSONObject.h',
+ 'runtime/JSPropertyNameIterator.cpp',
+ 'runtime/JSPropertyNameIterator.h',
+ 'runtime/JSStaticScopeObject.cpp',
+ 'runtime/JSStaticScopeObject.h',
+ 'runtime/JSString.cpp',
+ 'runtime/JSString.h',
+ 'runtime/JSType.h',
+ 'runtime/JSValue.cpp',
+ 'runtime/JSValue.h',
+ 'runtime/JSVariableObject.cpp',
+ 'runtime/JSVariableObject.h',
+ 'runtime/JSWrapperObject.cpp',
+ 'runtime/JSWrapperObject.h',
+ 'runtime/LiteralParser.cpp',
+ 'runtime/LiteralParser.h',
+ 'runtime/Lookup.cpp',
+ 'runtime/Lookup.h',
+ 'runtime/MathObject.cpp',
+ 'runtime/MathObject.h',
+ 'runtime/NativeErrorConstructor.cpp',
+ 'runtime/NativeErrorConstructor.h',
+ 'runtime/NativeErrorPrototype.cpp',
+ 'runtime/NativeErrorPrototype.h',
+ 'runtime/NativeFunctionWrapper.h',
+ 'runtime/NumberConstructor.cpp',
+ 'runtime/NumberConstructor.h',
+ 'runtime/NumberObject.cpp',
+ 'runtime/NumberObject.h',
+ 'runtime/NumberPrototype.cpp',
+ 'runtime/NumberPrototype.h',
+ 'runtime/ObjectConstructor.cpp',
+ 'runtime/ObjectConstructor.h',
+ 'runtime/ObjectPrototype.cpp',
+ 'runtime/ObjectPrototype.h',
+ 'runtime/Operations.cpp',
+ 'runtime/Operations.h',
+ 'runtime/PropertyMapHashTable.h',
+ 'runtime/PropertyNameArray.cpp',
+ 'runtime/PropertyNameArray.h',
+ 'runtime/PropertySlot.cpp',
+ 'runtime/PropertySlot.h',
+ 'runtime/Protect.h',
+ 'runtime/PrototypeFunction.cpp',
+ 'runtime/PrototypeFunction.h',
+ 'runtime/PutPropertySlot.h',
+ 'runtime/RegExp.cpp',
+ 'runtime/RegExp.h',
+ 'runtime/RegExpConstructor.cpp',
+ 'runtime/RegExpConstructor.h',
+ 'runtime/RegExpMatchesArray.h',
+ 'runtime/RegExpObject.cpp',
+ 'runtime/RegExpObject.h',
+ 'runtime/RegExpPrototype.cpp',
+ 'runtime/RegExpPrototype.h',
+ 'runtime/ScopeChain.cpp',
+ 'runtime/ScopeChain.h',
+ 'runtime/ScopeChainMark.h',
+ 'runtime/SmallStrings.cpp',
+ 'runtime/SmallStrings.h',
+ 'runtime/StringConstructor.cpp',
+ 'runtime/StringConstructor.h',
+ 'runtime/StringObject.cpp',
+ 'runtime/StringObject.h',
+ 'runtime/StringObjectThatMasqueradesAsUndefined.h',
+ 'runtime/StringPrototype.cpp',
+ 'runtime/StringPrototype.h',
+ 'runtime/Structure.cpp',
+ 'runtime/Structure.h',
+ 'runtime/StructureChain.cpp',
+ 'runtime/StructureChain.h',
+ 'runtime/StructureTransitionTable.h',
+ 'runtime/SymbolTable.h',
+ 'runtime/TimeoutChecker.cpp',
+ 'runtime/TimeoutChecker.h',
+ 'runtime/Tracing.h',
+ 'runtime/TypeInfo.h',
+ 'runtime/UString.cpp',
+ 'runtime/UString.h',
+ 'wrec/CharacterClass.cpp',
+ 'wrec/CharacterClass.h',
+ 'wrec/CharacterClassConstructor.cpp',
+ 'wrec/CharacterClassConstructor.h',
+ 'wrec/Escapes.h',
+ 'wrec/Quantifier.h',
+ 'wrec/WREC.cpp',
+ 'wrec/WREC.h',
+ 'wrec/WRECFunctors.cpp',
+ 'wrec/WRECFunctors.h',
+ 'wrec/WRECGenerator.cpp',
+ 'wrec/WRECGenerator.h',
+ 'wrec/WRECParser.cpp',
+ 'wrec/WRECParser.h',
+ 'wtf/AlwaysInline.h',
+ 'wtf/ASCIICType.h',
+ 'wtf/Assertions.cpp',
+ 'wtf/Assertions.h',
+ 'wtf/AVLTree.h',
+ 'wtf/ByteArray.cpp',
+ 'wtf/ByteArray.h',
+ 'wtf/chromium/ChromiumThreading.h',
+ 'wtf/chromium/MainThreadChromium.cpp',
+ 'wtf/CrossThreadRefCounted.h',
+ 'wtf/CurrentTime.cpp',
+ 'wtf/CurrentTime.h',
+ 'wtf/DateMath.cpp',
+ 'wtf/DateMath.h',
+ 'wtf/Deque.h',
+ 'wtf/DisallowCType.h',
+ 'wtf/dtoa.cpp',
+ 'wtf/dtoa.h',
+ 'wtf/FastAllocBase.h',
+ 'wtf/FastMalloc.cpp',
+ 'wtf/FastMalloc.h',
+ 'wtf/Forward.h',
+ 'wtf/GetPtr.h',
+ 'wtf/GOwnPtr.cpp',
+ 'wtf/GOwnPtr.h',
+ 'wtf/gtk/MainThreadGtk.cpp',
+ 'wtf/gtk/ThreadingGtk.cpp',
+ 'wtf/HashCountedSet.h',
+ 'wtf/HashFunctions.h',
+ 'wtf/HashIterators.h',
+ 'wtf/HashMap.h',
+ 'wtf/HashSet.h',
+ 'wtf/HashTable.cpp',
+ 'wtf/HashTable.h',
+ 'wtf/HashTraits.h',
+ 'wtf/ListHashSet.h',
+ 'wtf/ListRefPtr.h',
+ 'wtf/Locker.h',
+ 'wtf/MainThread.cpp',
+ 'wtf/MainThread.h',
+ 'wtf/MallocZoneSupport.h',
+ 'wtf/MathExtras.h',
+ 'wtf/MessageQueue.h',
+ 'wtf/Noncopyable.h',
+ 'wtf/NotFound.h',
+ 'wtf/OwnArrayPtr.h',
+ 'wtf/OwnFastMallocPtr.h',
+ 'wtf/OwnPtr.h',
+ 'wtf/OwnPtrCommon.h',
+ 'wtf/OwnPtrWin.cpp',
+ 'wtf/PassOwnPtr.h',
+ 'wtf/PassRefPtr.h',
+ 'wtf/Platform.h',
+ 'wtf/PtrAndFlags.h',
+ 'wtf/qt/MainThreadQt.cpp',
+ 'wtf/qt/ThreadingQt.cpp',
+ 'wtf/RandomNumber.cpp',
+ 'wtf/RandomNumber.h',
+ 'wtf/RandomNumberSeed.h',
+ 'wtf/RefCounted.h',
+ 'wtf/RefCountedLeakCounter.cpp',
+ 'wtf/RefCountedLeakCounter.h',
+ 'wtf/RefPtr.h',
+ 'wtf/RefPtrHashMap.h',
+ 'wtf/RetainPtr.h',
+ 'wtf/SegmentedVector.h',
+ 'wtf/StdLibExtras.h',
+ 'wtf/StringExtras.h',
+ 'wtf/TCPackedCache.h',
+ 'wtf/TCPageMap.h',
+ 'wtf/TCSpinLock.h',
+ 'wtf/TCSystemAlloc.cpp',
+ 'wtf/TCSystemAlloc.h',
+ 'wtf/Threading.cpp',
+ 'wtf/Threading.h',
+ 'wtf/ThreadingNone.cpp',
+ 'wtf/ThreadingPthreads.cpp',
+ 'wtf/ThreadingWin.cpp',
+ 'wtf/ThreadSpecific.h',
+ 'wtf/ThreadSpecificWin.cpp',
+ 'wtf/TypeTraits.cpp',
+ 'wtf/TypeTraits.h',
+ 'wtf/unicode/Collator.h',
+ 'wtf/unicode/CollatorDefault.cpp',
+ 'wtf/unicode/glib/UnicodeGLib.cpp',
+ 'wtf/unicode/glib/UnicodeGLib.h',
+ 'wtf/unicode/glib/UnicodeMacrosFromICU.h',
+ 'wtf/unicode/icu/CollatorICU.cpp',
+ 'wtf/unicode/icu/UnicodeIcu.h',
+ 'wtf/unicode/qt4/UnicodeQt4.h',
+ 'wtf/unicode/Unicode.h',
+ 'wtf/unicode/UTF8.cpp',
+ 'wtf/unicode/UTF8.h',
+ 'wtf/UnusedParam.h',
+ 'wtf/Vector.h',
+ 'wtf/VectorTraits.h',
+ 'wtf/VMTags.h',
+ 'wtf/win/MainThreadWin.cpp',
+ 'wtf/wx/MainThreadWx.cpp',
+ 'yarr/RegexCompiler.cpp',
+ 'yarr/RegexCompiler.h',
+ 'yarr/RegexInterpreter.cpp',
+ 'yarr/RegexInterpreter.h',
+ 'yarr/RegexJIT.cpp',
+ 'yarr/RegexJIT.h',
+ 'yarr/RegexParser.h',
+ 'yarr/RegexPattern.h',
+ ]
+ }
+}
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp
index d777f73..5dae952 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -363,15 +363,6 @@ void CodeBlock::dump(ExecState* exec) const
} while (i < m_constantRegisters.size());
}
- if (m_rareData && !m_rareData->m_unexpectedConstants.isEmpty()) {
- printf("\nUnexpected Constants:\n");
- size_t i = 0;
- do {
- printf(" k%u = %s\n", static_cast<unsigned>(i), valueToSourceString(exec, m_rareData->m_unexpectedConstants[i]).ascii());
- ++i;
- } while (i < m_rareData->m_unexpectedConstants.size());
- }
-
if (m_rareData && !m_rareData->m_regexps.isEmpty()) {
printf("\nm_regexps:\n");
size_t i = 0;
@@ -506,12 +497,6 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
printf("[%4d] convert_this %s\n", location, registerName(r0).c_str());
break;
}
- case op_unexpected_load: {
- int r0 = (++it)->u.operand;
- int k0 = (++it)->u.operand;
- printf("[%4d] unexpected_load\t %s, %s\n", location, registerName(r0).c_str(), constantName(exec, k0, unexpectedConstant(k0)).c_str());
- break;
- }
case op_new_object: {
int r0 = (++it)->u.operand;
printf("[%4d] new_object\t %s\n", location, registerName(r0).c_str());
@@ -1084,7 +1069,7 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
int r0 = (++it)->u.operand;
int errorType = (++it)->u.operand;
int k0 = (++it)->u.operand;
- printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, unexpectedConstant(k0)).c_str());
+ printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str());
break;
}
case op_jsr: {
@@ -1142,7 +1127,6 @@ static HashSet<CodeBlock*> liveCodeBlockSet;
#define FOR_EACH_MEMBER_VECTOR_RARE_DATA(macro) \
macro(regexps) \
macro(functions) \
- macro(unexpectedConstants) \
macro(exceptionHandlers) \
macro(immediateSwitchJumpTables) \
macro(characterSwitchJumpTables) \
@@ -1267,7 +1251,6 @@ void CodeBlock::dumpStatistics()
CodeBlock::CodeBlock(ScopeNode* ownerNode)
: m_numCalleeRegisters(0)
- , m_numConstants(0)
, m_numVars(0)
, m_numParameters(0)
, m_ownerNode(ownerNode)
@@ -1290,7 +1273,6 @@ CodeBlock::CodeBlock(ScopeNode* ownerNode)
CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset)
: m_numCalleeRegisters(0)
- , m_numConstants(0)
, m_numVars(0)
, m_numParameters(0)
, m_ownerNode(ownerNode)
@@ -1455,10 +1437,6 @@ void CodeBlock::mark()
for (size_t i = 0; i < m_rareData->m_functions.size(); ++i)
m_rareData->m_functions[i]->body()->mark();
- for (size_t i = 0; i < m_rareData->m_unexpectedConstants.size(); ++i) {
- if (!m_rareData->m_unexpectedConstants[i].marked())
- m_rareData->m_unexpectedConstants[i].mark();
- }
m_rareData->m_evalCodeCache.mark();
}
}
@@ -1757,7 +1735,6 @@ void CodeBlock::shrinkToFit()
if (m_rareData) {
m_rareData->m_exceptionHandlers.shrinkToFit();
m_rareData->m_functions.shrinkToFit();
- m_rareData->m_unexpectedConstants.shrinkToFit();
m_rareData->m_regexps.shrinkToFit();
m_rareData->m_immediateSwitchJumpTables.shrinkToFit();
m_rareData->m_characterSwitchJumpTables.shrinkToFit();
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h
index afd32f0..64b6c98 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h
@@ -46,6 +46,12 @@
#include "StructureStubInfo.h"
#endif
+// Register numbers used in bytecode operations have different meaning accoring to their ranges:
+// 0x80000000-0xFFFFFFFF Negative indicies from the CallFrame pointer are entries in the call frame, see RegisterFile.h.
+// 0x00000000-0x3FFFFFFF Forwards indices from the CallFrame pointer are local vars and temporaries with the function's callframe.
+// 0x40000000-0x7FFFFFFF Positive indices from 0x40000000 specify entries in the constant pool on the CodeBlock.
+static const int FirstConstantRegisterIndex = 0x40000000;
+
namespace JSC {
class ExecState;
@@ -248,19 +254,9 @@ namespace JSC {
return false;
}
- ALWAYS_INLINE bool isConstantRegisterIndex(int index)
- {
- return index >= m_numVars && index < m_numVars + m_numConstants;
- }
-
- ALWAYS_INLINE JSValue getConstant(int index)
- {
- return m_constantRegisters[index - m_numVars].jsValue();
- }
-
ALWAYS_INLINE bool isTemporaryRegisterIndex(int index)
{
- return index >= m_numVars + m_numConstants;
+ return index >= m_numVars;
}
HandlerInfo* handlerForBytecodeOffset(unsigned bytecodeOffset);
@@ -400,7 +396,9 @@ namespace JSC {
size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); }
void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); }
- Register& constantRegister(int index) { return m_constantRegisters[index]; }
+ Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; }
+ ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; }
+ ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); }
unsigned addFunctionExpression(FuncExprNode* n) { unsigned size = m_functionExpressions.size(); m_functionExpressions.append(n); return size; }
FuncExprNode* functionExpression(int index) const { return m_functionExpressions[index].get(); }
@@ -410,9 +408,6 @@ namespace JSC {
bool hasFunctions() const { return m_functionExpressions.size() || (m_rareData && m_rareData->m_functions.size()); }
- unsigned addUnexpectedConstant(JSValue v) { createRareDataIfNecessary(); unsigned size = m_rareData->m_unexpectedConstants.size(); m_rareData->m_unexpectedConstants.append(v); return size; }
- JSValue unexpectedConstant(int index) const { ASSERT(m_rareData); return m_rareData->m_unexpectedConstants[index]; }
-
unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; }
RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); }
@@ -441,11 +436,6 @@ namespace JSC {
// FIXME: Make these remaining members private.
int m_numCalleeRegisters;
- // NOTE: numConstants holds the number of constant registers allocated
- // by the code generator, not the number of constant registers used.
- // (Duplicate constants are uniqued during code generation, and spare
- // constant registers may be allocated.)
- int m_numConstants;
int m_numVars;
int m_numParameters;
@@ -519,7 +509,6 @@ namespace JSC {
// Rare Constants
Vector<RefPtr<FuncDeclNode> > m_functions;
- Vector<JSValue> m_unexpectedConstants;
Vector<RefPtr<RegExp> > m_regexps;
// Jump Tables
@@ -574,6 +563,14 @@ namespace JSC {
int m_baseScopeDepth;
};
+ inline Register& ExecState::r(int index)
+ {
+ CodeBlock* codeBlock = this->codeBlock();
+ if (codeBlock->isConstantRegisterIndex(index))
+ return codeBlock->constantRegister(index);
+ return this[index];
+ }
+
} // namespace JSC
#endif // CodeBlock_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
index f4421df..27b016e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
@@ -44,7 +44,6 @@ namespace JSC {
macro(op_create_arguments, 1) \
macro(op_convert_this, 2) \
\
- macro(op_unexpected_load, 3) \
macro(op_new_object, 2) \
macro(op_new_array, 4) \
macro(op_new_regexp, 3) \
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 7feb3c8..15261ee 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -196,17 +196,10 @@ bool BytecodeGenerator::addGlobalVar(const Identifier& ident, bool isConstant, R
return result.second;
}
-void BytecodeGenerator::allocateConstants(size_t count)
+void BytecodeGenerator::preserveLastVar()
{
- m_codeBlock->m_numConstants = count;
- if (!count)
- return;
-
- m_nextConstantIndex = m_calleeRegisters.size();
-
- for (size_t i = 0; i < count; ++i)
- newRegister();
- m_lastConstant = &m_calleeRegisters.last();
+ if ((m_firstConstantIndex = m_calleeRegisters.size()) != 0)
+ m_lastVar = &m_calleeRegisters.last();
}
BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* debugger, const ScopeChain& scopeChain, SymbolTable* symbolTable, ProgramCodeBlock* codeBlock)
@@ -222,6 +215,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d
, m_baseScopeDepth(0)
, m_codeType(GlobalCode)
, m_nextGlobalIndex(-1)
+ , m_nextConstantOffset(0)
, m_globalConstantIndex(0)
, m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
, m_lastOpcodeID(op_end)
@@ -272,7 +266,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d
if (!globalObject->hasProperty(exec, varStack[i].first))
newVars.append(addGlobalVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant));
- allocateConstants(programNode->neededConstants());
+ preserveLastVar();
for (size_t i = 0; i < newVars.size(); ++i)
emitLoad(newVars[i], jsUndefined());
@@ -290,7 +284,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d
globalObject->putWithAttributes(exec, varStack[i].first, jsUndefined(), attributes);
}
- allocateConstants(programNode->neededConstants());
+ preserveLastVar();
}
}
@@ -305,6 +299,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug
, m_dynamicScopeDepth(0)
, m_baseScopeDepth(0)
, m_codeType(FunctionCode)
+ , m_nextConstantOffset(0)
, m_globalConstantIndex(0)
, m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
, m_lastOpcodeID(op_end)
@@ -372,7 +367,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug
for (size_t i = 0; i < parameterCount; ++i)
addParameter(parameters[i]);
- allocateConstants(functionBody->neededConstants());
+ preserveLastVar();
}
BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugger, const ScopeChain& scopeChain, SymbolTable* symbolTable, EvalCodeBlock* codeBlock)
@@ -387,6 +382,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge
, m_dynamicScopeDepth(0)
, m_baseScopeDepth(codeBlock->baseScopeDepth())
, m_codeType(EvalCode)
+ , m_nextConstantOffset(0)
, m_globalConstantIndex(0)
, m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
, m_lastOpcodeID(op_end)
@@ -401,7 +397,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge
codeBlock->setGlobalData(m_globalData);
m_codeBlock->m_numParameters = 1; // Allocate space for "this"
- allocateConstants(evalNode->neededConstants());
+ preserveLastVar();
}
RegisterID* BytecodeGenerator::addParameter(const Identifier& ident)
@@ -525,7 +521,7 @@ PassRefPtr<LabelScope> BytecodeGenerator::newLabelScope(LabelScope::Type type, c
m_labelScopes.removeLast();
// Allocate new label scope.
- LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : 0); // Only loops have continue targets.
+ LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr<Label>()); // Only loops have continue targets.
m_labelScopes.append(scope);
return &m_labelScopes.last();
}
@@ -791,34 +787,19 @@ unsigned BytecodeGenerator::addConstant(const Identifier& ident)
return result.first->second;
}
-RegisterID* BytecodeGenerator::addConstant(JSValue v)
+RegisterID* BytecodeGenerator::addConstantValue(JSValue v)
{
- pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantIndex);
- if (result.second) {
- RegisterID& constant = m_calleeRegisters[m_nextConstantIndex];
-
- ++m_nextConstantIndex;
+ int index = m_nextConstantOffset;
+ pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantOffset);
+ if (result.second) {
+ m_constantPoolRegisters.append(FirstConstantRegisterIndex + m_nextConstantOffset);
+ ++m_nextConstantOffset;
m_codeBlock->addConstantRegister(JSValue(v));
- return &constant;
- }
+ } else
+ index = result.first->second;
- return &registerFor(result.first->second);
-}
-
-unsigned BytecodeGenerator::addUnexpectedConstant(JSValue v)
-{
- return m_codeBlock->addUnexpectedConstant(v);
-}
-
-RegisterID* BytecodeGenerator::emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject)
-{
- if (!m_globalConstantIndex)
- m_globalConstantIndex = m_codeBlock->addUnexpectedConstant(globalObject);
- emitOpcode(op_unexpected_load);
- instructions().append(dst->index());
- instructions().append(m_globalConstantIndex);
- return dst;
+ return &m_constantPoolRegisters[index];
}
unsigned BytecodeGenerator::addRegExp(RegExp* r)
@@ -898,8 +879,8 @@ RegisterID* BytecodeGenerator::emitEqualityOp(OpcodeID opcodeID, RegisterID* dst
if (src1->index() == dstIndex
&& src1->isTemporary()
&& m_codeBlock->isConstantRegisterIndex(src2->index())
- && m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue().isString()) {
- const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue())->value();
+ && m_codeBlock->constantRegister(src2->index()).jsValue().isString()) {
+ const UString& value = asString(m_codeBlock->constantRegister(src2->index()).jsValue())->value();
if (value == "undefined") {
rewindUnaryOp();
emitOpcode(op_is_undefined);
@@ -979,28 +960,12 @@ RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, const Identifier& ident
RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, JSValue v)
{
- RegisterID* constantID = addConstant(v);
+ RegisterID* constantID = addConstantValue(v);
if (dst)
return emitMove(dst, constantID);
return constantID;
}
-RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, bool b)
-{
- emitOpcode(op_unexpected_load);
- instructions().append(dst->index());
- instructions().append(addUnexpectedConstant(jsBoolean(b)));
- return dst;
-}
-
-RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, double d)
-{
- emitOpcode(op_unexpected_load);
- instructions().append(dst->index());
- instructions().append(addUnexpectedConstant(jsNumber(globalData(), d)));
- return dst;
-}
-
bool BytecodeGenerator::findScopedProperty(const Identifier& property, int& index, size_t& stackDepth, bool forWriting, JSObject*& globalObject)
{
// Cases where we cannot statically optimize the lookup.
@@ -1169,7 +1134,7 @@ RegisterID* BytecodeGenerator::emitResolveBase(RegisterID* dst, const Identifier
}
// Global object is the base
- return emitLoadGlobalObject(dst, globalObject);
+ return emitLoad(dst, JSValue(globalObject));
}
RegisterID* BytecodeGenerator::emitResolveWithBase(RegisterID* baseDst, RegisterID* propDst, const Identifier& property)
@@ -1196,7 +1161,7 @@ RegisterID* BytecodeGenerator::emitResolveWithBase(RegisterID* baseDst, Register
}
// Global object is the base
- emitLoadGlobalObject(baseDst, globalObject);
+ emitLoad(baseDst, JSValue(globalObject));
if (index != missingSymbolMarker() && !forceGlobalResolve) {
// Directly index the property lookup across multiple scopes.
@@ -1831,7 +1796,7 @@ RegisterID* BytecodeGenerator::emitNewError(RegisterID* dst, ErrorType type, JSV
emitOpcode(op_new_error);
instructions().append(dst->index());
instructions().append(static_cast<int>(type));
- instructions().append(addUnexpectedConstant(message));
+ instructions().append(addConstantValue(message)->index());
return dst;
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index d29a24d..54d0289 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -245,9 +245,6 @@ namespace JSC {
RegisterID* emitLoad(RegisterID* dst, double);
RegisterID* emitLoad(RegisterID* dst, const Identifier&);
RegisterID* emitLoad(RegisterID* dst, JSValue);
- RegisterID* emitUnexpectedLoad(RegisterID* dst, bool);
- RegisterID* emitUnexpectedLoad(RegisterID* dst, double);
- RegisterID* emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject);
RegisterID* emitUnaryOp(OpcodeID, RegisterID* dst, RegisterID* src);
RegisterID* emitBinaryOp(OpcodeID, RegisterID* dst, RegisterID* src1, RegisterID* src2, OperandTypes);
@@ -399,7 +396,7 @@ namespace JSC {
RegisterID* addParameter(const Identifier&);
- void allocateConstants(size_t);
+ void preserveLastVar();
RegisterID& registerFor(int index)
{
@@ -420,8 +417,7 @@ namespace JSC {
unsigned addConstant(FuncDeclNode*);
unsigned addConstant(FuncExprNode*);
unsigned addConstant(const Identifier&);
- RegisterID* addConstant(JSValue);
- unsigned addUnexpectedConstant(JSValue);
+ RegisterID* addConstantValue(JSValue);
unsigned addRegExp(RegExp*);
Vector<Instruction>& instructions() { return m_codeBlock->instructions(); }
@@ -450,12 +446,13 @@ namespace JSC {
RegisterID m_thisRegister;
RegisterID m_argumentsRegister;
int m_activationRegisterIndex;
+ WTF::SegmentedVector<RegisterID, 32> m_constantPoolRegisters;
WTF::SegmentedVector<RegisterID, 32> m_calleeRegisters;
WTF::SegmentedVector<RegisterID, 32> m_parameters;
WTF::SegmentedVector<RegisterID, 32> m_globals;
WTF::SegmentedVector<Label, 32> m_labels;
WTF::SegmentedVector<LabelScope, 8> m_labelScopes;
- RefPtr<RegisterID> m_lastConstant;
+ RefPtr<RegisterID> m_lastVar;
int m_finallyDepth;
int m_dynamicScopeDepth;
int m_baseScopeDepth;
@@ -466,7 +463,8 @@ namespace JSC {
int m_nextGlobalIndex;
int m_nextParameterIndex;
- int m_nextConstantIndex;
+ int m_firstConstantIndex;
+ int m_nextConstantOffset;
unsigned m_globalConstantIndex;
int m_globalVarStorageOffset;
diff --git a/src/3rdparty/webkit/JavaScriptCore/create_hash_table b/src/3rdparty/webkit/JavaScriptCore/create_hash_table
index 25d0b02..4184500 100755
--- a/src/3rdparty/webkit/JavaScriptCore/create_hash_table
+++ b/src/3rdparty/webkit/JavaScriptCore/create_hash_table
@@ -268,7 +268,7 @@ sub output() {
}
print " { 0, 0, 0, 0 }\n";
print "};\n\n";
- print "extern const struct HashTable $name =\n";
+ print "extern JSC_CONST_HASHTABLE HashTable $name =\n";
print " \{ $compactSize, $compactHashSizeMask, $nameEntries, 0 \};\n";
print "} // namespace\n";
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h
index 868ea71..98d0935 100644
--- a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h
+++ b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h
@@ -38,7 +38,7 @@ namespace JSC {
virtual ~Debugger();
void attach(JSGlobalObject*);
- void detach(JSGlobalObject*);
+ virtual void detach(JSGlobalObject*);
virtual void sourceParsed(ExecState*, const SourceCode&, int errorLine, const UString& errorMsg) = 0;
virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h
index 2a7c98f..5732add 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h
@@ -29,6 +29,6 @@ static const struct HashTableValue arrayTableValues[22] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable arrayTable =
+extern JSC_CONST_HASHTABLE HashTable arrayTable =
{ 65, 63, arrayTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h
index 1f43d4d..8b1c735 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h
@@ -54,6 +54,6 @@ static const struct HashTableValue dateTableValues[47] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable dateTable =
+extern JSC_CONST_HASHTABLE HashTable dateTable =
{ 134, 127, dateTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp
index 8e80eca..4e16e25 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,159 +54,28 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 1
/* Substitute the variable and function names. */
-#define yyparse jscyyparse
-#define yylex jscyylex
-#define yyerror jscyyerror
-#define yylval jscyylval
-#define yychar jscyychar
-#define yydebug jscyydebug
-#define yynerrs jscyynerrs
-#define yylloc jscyylloc
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- NULLTOKEN = 258,
- TRUETOKEN = 259,
- FALSETOKEN = 260,
- BREAK = 261,
- CASE = 262,
- DEFAULT = 263,
- FOR = 264,
- NEW = 265,
- VAR = 266,
- CONSTTOKEN = 267,
- CONTINUE = 268,
- FUNCTION = 269,
- RETURN = 270,
- VOIDTOKEN = 271,
- DELETETOKEN = 272,
- IF = 273,
- THISTOKEN = 274,
- DO = 275,
- WHILE = 276,
- INTOKEN = 277,
- INSTANCEOF = 278,
- TYPEOF = 279,
- SWITCH = 280,
- WITH = 281,
- RESERVED = 282,
- THROW = 283,
- TRY = 284,
- CATCH = 285,
- FINALLY = 286,
- DEBUGGER = 287,
- IF_WITHOUT_ELSE = 288,
- ELSE = 289,
- EQEQ = 290,
- NE = 291,
- STREQ = 292,
- STRNEQ = 293,
- LE = 294,
- GE = 295,
- OR = 296,
- AND = 297,
- PLUSPLUS = 298,
- MINUSMINUS = 299,
- LSHIFT = 300,
- RSHIFT = 301,
- URSHIFT = 302,
- PLUSEQUAL = 303,
- MINUSEQUAL = 304,
- MULTEQUAL = 305,
- DIVEQUAL = 306,
- LSHIFTEQUAL = 307,
- RSHIFTEQUAL = 308,
- URSHIFTEQUAL = 309,
- ANDEQUAL = 310,
- MODEQUAL = 311,
- XOREQUAL = 312,
- OREQUAL = 313,
- OPENBRACE = 314,
- CLOSEBRACE = 315,
- NUMBER = 316,
- IDENT = 317,
- STRING = 318,
- AUTOPLUSPLUS = 319,
- AUTOMINUSMINUS = 320
- };
-#endif
-/* Tokens. */
-#define NULLTOKEN 258
-#define TRUETOKEN 259
-#define FALSETOKEN 260
-#define BREAK 261
-#define CASE 262
-#define DEFAULT 263
-#define FOR 264
-#define NEW 265
-#define VAR 266
-#define CONSTTOKEN 267
-#define CONTINUE 268
-#define FUNCTION 269
-#define RETURN 270
-#define VOIDTOKEN 271
-#define DELETETOKEN 272
-#define IF 273
-#define THISTOKEN 274
-#define DO 275
-#define WHILE 276
-#define INTOKEN 277
-#define INSTANCEOF 278
-#define TYPEOF 279
-#define SWITCH 280
-#define WITH 281
-#define RESERVED 282
-#define THROW 283
-#define TRY 284
-#define CATCH 285
-#define FINALLY 286
-#define DEBUGGER 287
-#define IF_WITHOUT_ELSE 288
-#define ELSE 289
-#define EQEQ 290
-#define NE 291
-#define STREQ 292
-#define STRNEQ 293
-#define LE 294
-#define GE 295
-#define OR 296
-#define AND 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define LSHIFT 300
-#define RSHIFT 301
-#define URSHIFT 302
-#define PLUSEQUAL 303
-#define MINUSEQUAL 304
-#define MULTEQUAL 305
-#define DIVEQUAL 306
-#define LSHIFTEQUAL 307
-#define RSHIFTEQUAL 308
-#define URSHIFTEQUAL 309
-#define ANDEQUAL 310
-#define MODEQUAL 311
-#define XOREQUAL 312
-#define OREQUAL 313
-#define OPENBRACE 314
-#define CLOSEBRACE 315
-#define NUMBER 316
-#define IDENT 317
-#define STRING 318
-#define AUTOPLUSPLUS 319
-#define AUTOMINUSMINUS 320
-
-
-
+#define yyparse jscyyparse
+#define yylex jscyylex
+#define yyerror jscyyerror
+#define yylval jscyylval
+#define yychar jscyychar
+#define yydebug jscyydebug
+#define yynerrs jscyynerrs
+#define yylloc jscyylloc
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 3 "../parser/Grammar.y"
@@ -363,6 +231,9 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D
+/* Line 189 of yacc.c */
+#line 236 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -381,10 +252,88 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ NULLTOKEN = 258,
+ TRUETOKEN = 259,
+ FALSETOKEN = 260,
+ BREAK = 261,
+ CASE = 262,
+ DEFAULT = 263,
+ FOR = 264,
+ NEW = 265,
+ VAR = 266,
+ CONSTTOKEN = 267,
+ CONTINUE = 268,
+ FUNCTION = 269,
+ RETURN = 270,
+ VOIDTOKEN = 271,
+ DELETETOKEN = 272,
+ IF = 273,
+ THISTOKEN = 274,
+ DO = 275,
+ WHILE = 276,
+ INTOKEN = 277,
+ INSTANCEOF = 278,
+ TYPEOF = 279,
+ SWITCH = 280,
+ WITH = 281,
+ RESERVED = 282,
+ THROW = 283,
+ TRY = 284,
+ CATCH = 285,
+ FINALLY = 286,
+ DEBUGGER = 287,
+ IF_WITHOUT_ELSE = 288,
+ ELSE = 289,
+ EQEQ = 290,
+ NE = 291,
+ STREQ = 292,
+ STRNEQ = 293,
+ LE = 294,
+ GE = 295,
+ OR = 296,
+ AND = 297,
+ PLUSPLUS = 298,
+ MINUSMINUS = 299,
+ LSHIFT = 300,
+ RSHIFT = 301,
+ URSHIFT = 302,
+ PLUSEQUAL = 303,
+ MINUSEQUAL = 304,
+ MULTEQUAL = 305,
+ DIVEQUAL = 306,
+ LSHIFTEQUAL = 307,
+ RSHIFTEQUAL = 308,
+ URSHIFTEQUAL = 309,
+ ANDEQUAL = 310,
+ MODEQUAL = 311,
+ XOREQUAL = 312,
+ OREQUAL = 313,
+ OPENBRACE = 314,
+ CLOSEBRACE = 315,
+ NUMBER = 316,
+ IDENT = 317,
+ STRING = 318,
+ AUTOPLUSPLUS = 319,
+ AUTOMINUSMINUS = 320
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 157 "../parser/Grammar.y"
{
+
+/* Line 214 of yacc.c */
+#line 157 "../parser/Grammar.y"
+
int intValue;
double doubleValue;
Identifier* ident;
@@ -414,13 +363,15 @@ typedef union YYSTYPE
ParameterListInfo parameterList;
Operator op;
-}
-/* Line 187 of yacc.c. */
-#line 420 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 371 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -440,8 +391,8 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 445 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+/* Line 264 of yacc.c */
+#line 396 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
#ifdef short
# undef short
@@ -516,14 +467,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -605,9 +556,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -642,12 +593,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -2361,17 +2312,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -2406,11 +2360,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) );
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -2692,10 +2646,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -2714,10 +2666,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -2741,88 +2692,97 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[2];
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
goto yysetstate;
@@ -2861,6 +2821,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -2882,9 +2843,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2905,6 +2866,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -2913,16 +2877,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2954,20 +2918,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -3008,31 +2968,43 @@ yyreduce:
switch (yyn)
{
case 2:
+
+/* Line 1455 of yacc.c */
#line 290 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;}
break;
case 3:
+
+/* Line 1455 of yacc.c */
#line 291 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;}
break;
case 4:
+
+/* Line 1455 of yacc.c */
#line 292 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;}
break;
case 5:
+
+/* Line 1455 of yacc.c */
#line 293 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;}
break;
case 6:
+
+/* Line 1455 of yacc.c */
#line 294 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;}
break;
case 7:
+
+/* Line 1455 of yacc.c */
#line 295 "../parser/Grammar.y"
{
Lexer& l = *LEXER;
@@ -3046,6 +3018,8 @@ yyreduce:
break;
case 8:
+
+/* Line 1455 of yacc.c */
#line 304 "../parser/Grammar.y"
{
Lexer& l = *LEXER;
@@ -3059,26 +3033,36 @@ yyreduce:
break;
case 9:
+
+/* Line 1455 of yacc.c */
#line 316 "../parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 10:
+
+/* Line 1455 of yacc.c */
#line 317 "../parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 11:
+
+/* Line 1455 of yacc.c */
#line 318 "../parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, UString::from((yyvsp[(1) - (3)].doubleValue))), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 12:
+
+/* Line 1455 of yacc.c */
#line 319 "../parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;}
break;
case 13:
+
+/* Line 1455 of yacc.c */
#line 321 "../parser/Grammar.y"
{
(yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0);
@@ -3091,6 +3075,8 @@ yyreduce:
break;
case 14:
+
+/* Line 1455 of yacc.c */
#line 332 "../parser/Grammar.y"
{ (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node);
(yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head;
@@ -3099,6 +3085,8 @@ yyreduce:
break;
case 15:
+
+/* Line 1455 of yacc.c */
#line 336 "../parser/Grammar.y"
{ (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head;
(yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail);
@@ -3107,51 +3095,71 @@ yyreduce:
break;
case 17:
+
+/* Line 1455 of yacc.c */
#line 344 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;}
break;
case 18:
+
+/* Line 1455 of yacc.c */
#line 345 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;}
break;
case 19:
+
+/* Line 1455 of yacc.c */
#line 347 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;}
break;
case 20:
+
+/* Line 1455 of yacc.c */
#line 351 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;}
break;
case 23:
+
+/* Line 1455 of yacc.c */
#line 354 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;}
break;
case 24:
+
+/* Line 1455 of yacc.c */
#line 355 "../parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;}
break;
case 25:
+
+/* Line 1455 of yacc.c */
#line 359 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;}
break;
case 26:
+
+/* Line 1455 of yacc.c */
#line 360 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;}
break;
case 27:
+
+/* Line 1455 of yacc.c */
#line 361 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;}
break;
case 28:
+
+/* Line 1455 of yacc.c */
#line 365 "../parser/Grammar.y"
{ (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node);
(yyval.elementList).m_node.tail = (yyval.elementList).m_node.head;
@@ -3160,6 +3168,8 @@ yyreduce:
break;
case 29:
+
+/* Line 1455 of yacc.c */
#line 370 "../parser/Grammar.y"
{ (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head;
(yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node);
@@ -3168,26 +3178,36 @@ yyreduce:
break;
case 30:
+
+/* Line 1455 of yacc.c */
#line 377 "../parser/Grammar.y"
{ (yyval.intValue) = 0; ;}
break;
case 32:
+
+/* Line 1455 of yacc.c */
#line 382 "../parser/Grammar.y"
{ (yyval.intValue) = 1; ;}
break;
case 33:
+
+/* Line 1455 of yacc.c */
#line 383 "../parser/Grammar.y"
{ (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;}
break;
case 35:
+
+/* Line 1455 of yacc.c */
#line 388 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;}
break;
case 36:
+
+/* Line 1455 of yacc.c */
#line 389 "../parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3196,6 +3216,8 @@ yyreduce:
break;
case 37:
+
+/* Line 1455 of yacc.c */
#line 393 "../parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3204,6 +3226,8 @@ yyreduce:
break;
case 38:
+
+/* Line 1455 of yacc.c */
#line 397 "../parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3212,6 +3236,8 @@ yyreduce:
break;
case 40:
+
+/* Line 1455 of yacc.c */
#line 405 "../parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3220,6 +3246,8 @@ yyreduce:
break;
case 41:
+
+/* Line 1455 of yacc.c */
#line 409 "../parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3228,6 +3256,8 @@ yyreduce:
break;
case 42:
+
+/* Line 1455 of yacc.c */
#line 413 "../parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3236,6 +3266,8 @@ yyreduce:
break;
case 44:
+
+/* Line 1455 of yacc.c */
#line 421 "../parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column);
@@ -3244,6 +3276,8 @@ yyreduce:
break;
case 46:
+
+/* Line 1455 of yacc.c */
#line 429 "../parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column);
@@ -3252,16 +3286,22 @@ yyreduce:
break;
case 47:
+
+/* Line 1455 of yacc.c */
#line 436 "../parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 48:
+
+/* Line 1455 of yacc.c */
#line 437 "../parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 49:
+
+/* Line 1455 of yacc.c */
#line 438 "../parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3270,6 +3310,8 @@ yyreduce:
break;
case 50:
+
+/* Line 1455 of yacc.c */
#line 442 "../parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3277,16 +3319,22 @@ yyreduce:
break;
case 51:
+
+/* Line 1455 of yacc.c */
#line 448 "../parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 52:
+
+/* Line 1455 of yacc.c */
#line 449 "../parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 53:
+
+/* Line 1455 of yacc.c */
#line 450 "../parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3295,6 +3343,8 @@ yyreduce:
break;
case 54:
+
+/* Line 1455 of yacc.c */
#line 454 "../parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3303,16 +3353,22 @@ yyreduce:
break;
case 55:
+
+/* Line 1455 of yacc.c */
#line 461 "../parser/Grammar.y"
{ (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;}
break;
case 56:
+
+/* Line 1455 of yacc.c */
#line 462 "../parser/Grammar.y"
{ (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;}
break;
case 57:
+
+/* Line 1455 of yacc.c */
#line 466 "../parser/Grammar.y"
{ (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node);
(yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head;
@@ -3321,6 +3377,8 @@ yyreduce:
break;
case 58:
+
+/* Line 1455 of yacc.c */
#line 470 "../parser/Grammar.y"
{ (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head;
(yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node);
@@ -3329,181 +3387,253 @@ yyreduce:
break;
case 64:
+
+/* Line 1455 of yacc.c */
#line 488 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 65:
+
+/* Line 1455 of yacc.c */
#line 489 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 67:
+
+/* Line 1455 of yacc.c */
#line 494 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 68:
+
+/* Line 1455 of yacc.c */
#line 495 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 69:
+
+/* Line 1455 of yacc.c */
#line 499 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 70:
+
+/* Line 1455 of yacc.c */
#line 500 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;}
break;
case 71:
+
+/* Line 1455 of yacc.c */
#line 501 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 72:
+
+/* Line 1455 of yacc.c */
#line 502 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 73:
+
+/* Line 1455 of yacc.c */
#line 503 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 74:
+
+/* Line 1455 of yacc.c */
#line 504 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 75:
+
+/* Line 1455 of yacc.c */
#line 505 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 76:
+
+/* Line 1455 of yacc.c */
#line 506 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 77:
+
+/* Line 1455 of yacc.c */
#line 507 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 78:
+
+/* Line 1455 of yacc.c */
#line 508 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 79:
+
+/* Line 1455 of yacc.c */
#line 509 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 85:
+
+/* Line 1455 of yacc.c */
#line 523 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 86:
+
+/* Line 1455 of yacc.c */
#line 524 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 87:
+
+/* Line 1455 of yacc.c */
#line 525 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 89:
+
+/* Line 1455 of yacc.c */
#line 531 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 90:
+
+/* Line 1455 of yacc.c */
#line 533 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 91:
+
+/* Line 1455 of yacc.c */
#line 535 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 93:
+
+/* Line 1455 of yacc.c */
#line 540 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 94:
+
+/* Line 1455 of yacc.c */
#line 541 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 96:
+
+/* Line 1455 of yacc.c */
#line 547 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 97:
+
+/* Line 1455 of yacc.c */
#line 549 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 99:
+
+/* Line 1455 of yacc.c */
#line 554 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 100:
+
+/* Line 1455 of yacc.c */
#line 555 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 101:
+
+/* Line 1455 of yacc.c */
#line 556 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 103:
+
+/* Line 1455 of yacc.c */
#line 561 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 104:
+
+/* Line 1455 of yacc.c */
#line 562 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 105:
+
+/* Line 1455 of yacc.c */
#line 563 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 107:
+
+/* Line 1455 of yacc.c */
#line 568 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 108:
+
+/* Line 1455 of yacc.c */
#line 569 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 109:
+
+/* Line 1455 of yacc.c */
#line 570 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 110:
+
+/* Line 1455 of yacc.c */
#line 571 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 111:
+
+/* Line 1455 of yacc.c */
#line 572 "../parser/Grammar.y"
{ InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3511,6 +3641,8 @@ yyreduce:
break;
case 112:
+
+/* Line 1455 of yacc.c */
#line 575 "../parser/Grammar.y"
{ InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3518,26 +3650,36 @@ yyreduce:
break;
case 114:
+
+/* Line 1455 of yacc.c */
#line 582 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 115:
+
+/* Line 1455 of yacc.c */
#line 583 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 116:
+
+/* Line 1455 of yacc.c */
#line 584 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 117:
+
+/* Line 1455 of yacc.c */
#line 585 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 118:
+
+/* Line 1455 of yacc.c */
#line 587 "../parser/Grammar.y"
{ InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3545,26 +3687,36 @@ yyreduce:
break;
case 120:
+
+/* Line 1455 of yacc.c */
#line 594 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 121:
+
+/* Line 1455 of yacc.c */
#line 595 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 122:
+
+/* Line 1455 of yacc.c */
#line 596 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 123:
+
+/* Line 1455 of yacc.c */
#line 597 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 124:
+
+/* Line 1455 of yacc.c */
#line 599 "../parser/Grammar.y"
{ InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3572,6 +3724,8 @@ yyreduce:
break;
case 125:
+
+/* Line 1455 of yacc.c */
#line 603 "../parser/Grammar.y"
{ InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3579,156 +3733,218 @@ yyreduce:
break;
case 127:
+
+/* Line 1455 of yacc.c */
#line 610 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 128:
+
+/* Line 1455 of yacc.c */
#line 611 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 129:
+
+/* Line 1455 of yacc.c */
#line 612 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 130:
+
+/* Line 1455 of yacc.c */
#line 613 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 132:
+
+/* Line 1455 of yacc.c */
#line 619 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 133:
+
+/* Line 1455 of yacc.c */
#line 621 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 134:
+
+/* Line 1455 of yacc.c */
#line 623 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 135:
+
+/* Line 1455 of yacc.c */
#line 625 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 137:
+
+/* Line 1455 of yacc.c */
#line 631 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 138:
+
+/* Line 1455 of yacc.c */
#line 632 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 139:
+
+/* Line 1455 of yacc.c */
#line 634 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 140:
+
+/* Line 1455 of yacc.c */
#line 636 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 142:
+
+/* Line 1455 of yacc.c */
#line 641 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 144:
+
+/* Line 1455 of yacc.c */
#line 647 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 146:
+
+/* Line 1455 of yacc.c */
#line 652 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 148:
+
+/* Line 1455 of yacc.c */
#line 657 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 150:
+
+/* Line 1455 of yacc.c */
#line 663 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 152:
+
+/* Line 1455 of yacc.c */
#line 669 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 154:
+
+/* Line 1455 of yacc.c */
#line 674 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 156:
+
+/* Line 1455 of yacc.c */
#line 680 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 158:
+
+/* Line 1455 of yacc.c */
#line 686 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 160:
+
+/* Line 1455 of yacc.c */
#line 691 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 162:
+
+/* Line 1455 of yacc.c */
#line 697 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 164:
+
+/* Line 1455 of yacc.c */
#line 703 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 166:
+
+/* Line 1455 of yacc.c */
#line 708 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 168:
+
+/* Line 1455 of yacc.c */
#line 714 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 170:
+
+/* Line 1455 of yacc.c */
#line 719 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 172:
+
+/* Line 1455 of yacc.c */
#line 725 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;}
break;
case 174:
+
+/* Line 1455 of yacc.c */
#line 731 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;}
break;
case 176:
+
+/* Line 1455 of yacc.c */
#line 737 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;}
break;
case 178:
+
+/* Line 1455 of yacc.c */
#line 743 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature,
(yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants);
@@ -3736,6 +3952,8 @@ yyreduce:
break;
case 180:
+
+/* Line 1455 of yacc.c */
#line 751 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature,
(yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants);
@@ -3743,6 +3961,8 @@ yyreduce:
break;
case 182:
+
+/* Line 1455 of yacc.c */
#line 759 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature,
(yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants);
@@ -3750,99 +3970,137 @@ yyreduce:
break;
case 183:
+
+/* Line 1455 of yacc.c */
#line 765 "../parser/Grammar.y"
{ (yyval.op) = OpEqual; ;}
break;
case 184:
+
+/* Line 1455 of yacc.c */
#line 766 "../parser/Grammar.y"
{ (yyval.op) = OpPlusEq; ;}
break;
case 185:
+
+/* Line 1455 of yacc.c */
#line 767 "../parser/Grammar.y"
{ (yyval.op) = OpMinusEq; ;}
break;
case 186:
+
+/* Line 1455 of yacc.c */
#line 768 "../parser/Grammar.y"
{ (yyval.op) = OpMultEq; ;}
break;
case 187:
+
+/* Line 1455 of yacc.c */
#line 769 "../parser/Grammar.y"
{ (yyval.op) = OpDivEq; ;}
break;
case 188:
+
+/* Line 1455 of yacc.c */
#line 770 "../parser/Grammar.y"
{ (yyval.op) = OpLShift; ;}
break;
case 189:
+
+/* Line 1455 of yacc.c */
#line 771 "../parser/Grammar.y"
{ (yyval.op) = OpRShift; ;}
break;
case 190:
+
+/* Line 1455 of yacc.c */
#line 772 "../parser/Grammar.y"
{ (yyval.op) = OpURShift; ;}
break;
case 191:
+
+/* Line 1455 of yacc.c */
#line 773 "../parser/Grammar.y"
{ (yyval.op) = OpAndEq; ;}
break;
case 192:
+
+/* Line 1455 of yacc.c */
#line 774 "../parser/Grammar.y"
{ (yyval.op) = OpXOrEq; ;}
break;
case 193:
+
+/* Line 1455 of yacc.c */
#line 775 "../parser/Grammar.y"
{ (yyval.op) = OpOrEq; ;}
break;
case 194:
+
+/* Line 1455 of yacc.c */
#line 776 "../parser/Grammar.y"
{ (yyval.op) = OpModEq; ;}
break;
case 196:
+
+/* Line 1455 of yacc.c */
#line 781 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 198:
+
+/* Line 1455 of yacc.c */
#line 786 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 200:
+
+/* Line 1455 of yacc.c */
#line 791 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 218:
+
+/* Line 1455 of yacc.c */
#line 815 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
break;
case 219:
+
+/* Line 1455 of yacc.c */
#line 817 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
break;
case 220:
+
+/* Line 1455 of yacc.c */
#line 822 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
break;
case 221:
+
+/* Line 1455 of yacc.c */
#line 824 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)]));
@@ -3850,6 +4108,8 @@ yyreduce:
break;
case 222:
+
+/* Line 1455 of yacc.c */
#line 830 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = 0;
(yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
@@ -3861,6 +4121,8 @@ yyreduce:
break;
case 223:
+
+/* Line 1455 of yacc.c */
#line 837 "../parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column);
@@ -3874,6 +4136,8 @@ yyreduce:
break;
case 224:
+
+/* Line 1455 of yacc.c */
#line 847 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node;
(yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations;
@@ -3885,6 +4149,8 @@ yyreduce:
break;
case 225:
+
+/* Line 1455 of yacc.c */
#line 855 "../parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column);
@@ -3898,6 +4164,8 @@ yyreduce:
break;
case 226:
+
+/* Line 1455 of yacc.c */
#line 867 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = 0;
(yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
@@ -3909,6 +4177,8 @@ yyreduce:
break;
case 227:
+
+/* Line 1455 of yacc.c */
#line 874 "../parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column);
@@ -3922,6 +4192,8 @@ yyreduce:
break;
case 228:
+
+/* Line 1455 of yacc.c */
#line 884 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node;
(yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations;
@@ -3933,6 +4205,8 @@ yyreduce:
break;
case 229:
+
+/* Line 1455 of yacc.c */
#line 892 "../parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column);
@@ -3946,18 +4220,24 @@ yyreduce:
break;
case 230:
+
+/* Line 1455 of yacc.c */
#line 904 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
break;
case 231:
+
+/* Line 1455 of yacc.c */
#line 907 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;}
break;
case 232:
+
+/* Line 1455 of yacc.c */
#line 912 "../parser/Grammar.y"
{ (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node;
(yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head;
@@ -3970,6 +4250,8 @@ yyreduce:
break;
case 233:
+
+/* Line 1455 of yacc.c */
#line 921 "../parser/Grammar.y"
{ (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head;
(yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node;
@@ -3982,49 +4264,67 @@ yyreduce:
break;
case 234:
+
+/* Line 1455 of yacc.c */
#line 932 "../parser/Grammar.y"
{ (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;}
break;
case 235:
+
+/* Line 1455 of yacc.c */
#line 933 "../parser/Grammar.y"
{ (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 236:
+
+/* Line 1455 of yacc.c */
#line 937 "../parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;}
break;
case 237:
+
+/* Line 1455 of yacc.c */
#line 941 "../parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;}
break;
case 238:
+
+/* Line 1455 of yacc.c */
#line 945 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;}
break;
case 239:
+
+/* Line 1455 of yacc.c */
#line 949 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
break;
case 240:
+
+/* Line 1455 of yacc.c */
#line 951 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;}
break;
case 241:
+
+/* Line 1455 of yacc.c */
#line 957 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;}
break;
case 242:
+
+/* Line 1455 of yacc.c */
#line 960 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node),
mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations),
@@ -4035,24 +4335,32 @@ yyreduce:
break;
case 243:
+
+/* Line 1455 of yacc.c */
#line 969 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;}
break;
case 244:
+
+/* Line 1455 of yacc.c */
#line 971 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;}
break;
case 245:
+
+/* Line 1455 of yacc.c */
#line 973 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;}
break;
case 246:
+
+/* Line 1455 of yacc.c */
#line 976 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations,
(yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features,
@@ -4062,6 +4370,8 @@ yyreduce:
break;
case 247:
+
+/* Line 1455 of yacc.c */
#line 982 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true),
mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations),
@@ -4072,6 +4382,8 @@ yyreduce:
break;
case 248:
+
+/* Line 1455 of yacc.c */
#line 989 "../parser/Grammar.y"
{
ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node);
@@ -4084,6 +4396,8 @@ yyreduce:
break;
case 249:
+
+/* Line 1455 of yacc.c */
#line 998 "../parser/Grammar.y"
{ ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column);
SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column);
@@ -4093,6 +4407,8 @@ yyreduce:
break;
case 250:
+
+/* Line 1455 of yacc.c */
#line 1004 "../parser/Grammar.y"
{ ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column);
SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column);
@@ -4104,16 +4420,22 @@ yyreduce:
break;
case 251:
+
+/* Line 1455 of yacc.c */
#line 1014 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;}
break;
case 253:
+
+/* Line 1455 of yacc.c */
#line 1019 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;}
break;
case 255:
+
+/* Line 1455 of yacc.c */
#line 1024 "../parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4122,6 +4444,8 @@ yyreduce:
break;
case 256:
+
+/* Line 1455 of yacc.c */
#line 1028 "../parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4130,6 +4454,8 @@ yyreduce:
break;
case 257:
+
+/* Line 1455 of yacc.c */
#line 1032 "../parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4138,6 +4464,8 @@ yyreduce:
break;
case 258:
+
+/* Line 1455 of yacc.c */
#line 1036 "../parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4146,6 +4474,8 @@ yyreduce:
break;
case 259:
+
+/* Line 1455 of yacc.c */
#line 1043 "../parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4153,6 +4483,8 @@ yyreduce:
break;
case 260:
+
+/* Line 1455 of yacc.c */
#line 1046 "../parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4160,6 +4492,8 @@ yyreduce:
break;
case 261:
+
+/* Line 1455 of yacc.c */
#line 1049 "../parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4167,6 +4501,8 @@ yyreduce:
break;
case 262:
+
+/* Line 1455 of yacc.c */
#line 1052 "../parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4174,6 +4510,8 @@ yyreduce:
break;
case 263:
+
+/* Line 1455 of yacc.c */
#line 1058 "../parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4181,6 +4519,8 @@ yyreduce:
break;
case 264:
+
+/* Line 1455 of yacc.c */
#line 1061 "../parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4188,6 +4528,8 @@ yyreduce:
break;
case 265:
+
+/* Line 1455 of yacc.c */
#line 1064 "../parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4195,6 +4537,8 @@ yyreduce:
break;
case 266:
+
+/* Line 1455 of yacc.c */
#line 1067 "../parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4202,6 +4546,8 @@ yyreduce:
break;
case 267:
+
+/* Line 1455 of yacc.c */
#line 1073 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column),
(yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants);
@@ -4209,6 +4555,8 @@ yyreduce:
break;
case 268:
+
+/* Line 1455 of yacc.c */
#line 1079 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations,
(yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants);
@@ -4216,11 +4564,15 @@ yyreduce:
break;
case 269:
+
+/* Line 1455 of yacc.c */
#line 1085 "../parser/Grammar.y"
{ (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;}
break;
case 270:
+
+/* Line 1455 of yacc.c */
#line 1087 "../parser/Grammar.y"
{ (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head),
mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations),
@@ -4230,11 +4582,15 @@ yyreduce:
break;
case 271:
+
+/* Line 1455 of yacc.c */
#line 1095 "../parser/Grammar.y"
{ (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;}
break;
case 273:
+
+/* Line 1455 of yacc.c */
#line 1100 "../parser/Grammar.y"
{ (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node);
(yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head;
@@ -4245,6 +4601,8 @@ yyreduce:
break;
case 274:
+
+/* Line 1455 of yacc.c */
#line 1106 "../parser/Grammar.y"
{ (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head;
(yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node);
@@ -4256,26 +4614,36 @@ yyreduce:
break;
case 275:
+
+/* Line 1455 of yacc.c */
#line 1116 "../parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;}
break;
case 276:
+
+/* Line 1455 of yacc.c */
#line 1117 "../parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;}
break;
case 277:
+
+/* Line 1455 of yacc.c */
#line 1121 "../parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;}
break;
case 278:
+
+/* Line 1455 of yacc.c */
#line 1122 "../parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;}
break;
case 279:
+
+/* Line 1455 of yacc.c */
#line 1126 "../parser/Grammar.y"
{ LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4283,6 +4651,8 @@ yyreduce:
break;
case 280:
+
+/* Line 1455 of yacc.c */
#line 1132 "../parser/Grammar.y"
{ ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4291,6 +4661,8 @@ yyreduce:
break;
case 281:
+
+/* Line 1455 of yacc.c */
#line 1136 "../parser/Grammar.y"
{ ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4299,6 +4671,8 @@ yyreduce:
break;
case 282:
+
+/* Line 1455 of yacc.c */
#line 1143 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node),
mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations),
@@ -4309,6 +4683,8 @@ yyreduce:
break;
case 283:
+
+/* Line 1455 of yacc.c */
#line 1149 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0),
mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations),
@@ -4319,6 +4695,8 @@ yyreduce:
break;
case 284:
+
+/* Line 1455 of yacc.c */
#line 1156 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node),
mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations),
@@ -4329,23 +4707,31 @@ yyreduce:
break;
case 285:
+
+/* Line 1455 of yacc.c */
#line 1165 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
break;
case 286:
+
+/* Line 1455 of yacc.c */
#line 1167 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;}
break;
case 287:
+
+/* Line 1455 of yacc.c */
#line 1172 "../parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)); ;}
break;
case 288:
+
+/* Line 1455 of yacc.c */
#line 1174 "../parser/Grammar.y"
{
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0);
@@ -4357,11 +4743,15 @@ yyreduce:
break;
case 289:
+
+/* Line 1455 of yacc.c */
#line 1184 "../parser/Grammar.y"
{ (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), LEXER->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;}
break;
case 290:
+
+/* Line 1455 of yacc.c */
#line 1186 "../parser/Grammar.y"
{
(yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0);
@@ -4372,11 +4762,15 @@ yyreduce:
break;
case 291:
+
+/* Line 1455 of yacc.c */
#line 1192 "../parser/Grammar.y"
{ (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;}
break;
case 292:
+
+/* Line 1455 of yacc.c */
#line 1194 "../parser/Grammar.y"
{
(yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0);
@@ -4387,6 +4781,8 @@ yyreduce:
break;
case 293:
+
+/* Line 1455 of yacc.c */
#line 1203 "../parser/Grammar.y"
{ (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident));
(yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0;
@@ -4394,6 +4790,8 @@ yyreduce:
break;
case 294:
+
+/* Line 1455 of yacc.c */
#line 1206 "../parser/Grammar.y"
{ (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head;
(yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0);
@@ -4401,27 +4799,37 @@ yyreduce:
break;
case 295:
+
+/* Line 1455 of yacc.c */
#line 1212 "../parser/Grammar.y"
{ (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;}
break;
case 296:
+
+/* Line 1455 of yacc.c */
#line 1213 "../parser/Grammar.y"
{ (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;}
break;
case 297:
+
+/* Line 1455 of yacc.c */
#line 1217 "../parser/Grammar.y"
{ GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;}
break;
case 298:
+
+/* Line 1455 of yacc.c */
#line 1218 "../parser/Grammar.y"
{ GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features,
(yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;}
break;
case 299:
+
+/* Line 1455 of yacc.c */
#line 1223 "../parser/Grammar.y"
{ (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA);
(yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node);
@@ -4433,6 +4841,8 @@ yyreduce:
break;
case 300:
+
+/* Line 1455 of yacc.c */
#line 1230 "../parser/Grammar.y"
{ (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node);
(yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations);
@@ -4443,188 +4853,261 @@ yyreduce:
break;
case 304:
+
+/* Line 1455 of yacc.c */
#line 1244 "../parser/Grammar.y"
{ ;}
break;
case 305:
+
+/* Line 1455 of yacc.c */
#line 1245 "../parser/Grammar.y"
{ ;}
break;
case 306:
+
+/* Line 1455 of yacc.c */
#line 1246 "../parser/Grammar.y"
{ Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;}
break;
case 307:
+
+/* Line 1455 of yacc.c */
#line 1247 "../parser/Grammar.y"
{ Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;}
break;
case 308:
+
+/* Line 1455 of yacc.c */
#line 1251 "../parser/Grammar.y"
{ ;}
break;
case 309:
+
+/* Line 1455 of yacc.c */
#line 1252 "../parser/Grammar.y"
{ ;}
break;
case 310:
+
+/* Line 1455 of yacc.c */
#line 1253 "../parser/Grammar.y"
{ ;}
break;
case 311:
+
+/* Line 1455 of yacc.c */
#line 1254 "../parser/Grammar.y"
{ if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;}
break;
case 312:
+
+/* Line 1455 of yacc.c */
#line 1255 "../parser/Grammar.y"
{ if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;}
break;
case 316:
+
+/* Line 1455 of yacc.c */
#line 1265 "../parser/Grammar.y"
{ ;}
break;
case 317:
+
+/* Line 1455 of yacc.c */
#line 1266 "../parser/Grammar.y"
{ ;}
break;
case 318:
+
+/* Line 1455 of yacc.c */
#line 1268 "../parser/Grammar.y"
{ ;}
break;
case 322:
+
+/* Line 1455 of yacc.c */
#line 1275 "../parser/Grammar.y"
{ ;}
break;
case 517:
+
+/* Line 1455 of yacc.c */
#line 1643 "../parser/Grammar.y"
{ ;}
break;
case 518:
+
+/* Line 1455 of yacc.c */
#line 1644 "../parser/Grammar.y"
{ ;}
break;
case 520:
+
+/* Line 1455 of yacc.c */
#line 1649 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 521:
+
+/* Line 1455 of yacc.c */
#line 1653 "../parser/Grammar.y"
{ ;}
break;
case 522:
+
+/* Line 1455 of yacc.c */
#line 1654 "../parser/Grammar.y"
{ ;}
break;
case 525:
+
+/* Line 1455 of yacc.c */
#line 1660 "../parser/Grammar.y"
{ ;}
break;
case 526:
+
+/* Line 1455 of yacc.c */
#line 1661 "../parser/Grammar.y"
{ ;}
break;
case 530:
+
+/* Line 1455 of yacc.c */
#line 1668 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 533:
+
+/* Line 1455 of yacc.c */
#line 1677 "../parser/Grammar.y"
{ ;}
break;
case 534:
+
+/* Line 1455 of yacc.c */
#line 1678 "../parser/Grammar.y"
{ ;}
break;
case 539:
+
+/* Line 1455 of yacc.c */
#line 1695 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 555:
+
+/* Line 1455 of yacc.c */
#line 1726 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 557:
+
+/* Line 1455 of yacc.c */
#line 1728 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 559:
+
+/* Line 1455 of yacc.c */
#line 1733 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 561:
+
+/* Line 1455 of yacc.c */
#line 1735 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 563:
+
+/* Line 1455 of yacc.c */
#line 1740 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 565:
+
+/* Line 1455 of yacc.c */
#line 1742 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 568:
+
+/* Line 1455 of yacc.c */
#line 1754 "../parser/Grammar.y"
{ ;}
break;
case 569:
+
+/* Line 1455 of yacc.c */
#line 1755 "../parser/Grammar.y"
{ ;}
break;
case 578:
+
+/* Line 1455 of yacc.c */
#line 1779 "../parser/Grammar.y"
{ ;}
break;
case 580:
+
+/* Line 1455 of yacc.c */
#line 1784 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 585:
+
+/* Line 1455 of yacc.c */
#line 1795 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 592:
+
+/* Line 1455 of yacc.c */
#line 1811 "../parser/Grammar.y"
{ ;}
break;
-/* Line 1267 of yacc.c. */
-#line 4628 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+
+/* Line 1455 of yacc.c */
+#line 5111 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4700,7 +5183,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -4717,7 +5200,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -4775,14 +5258,11 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
+ the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
@@ -4807,7 +5287,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -4818,7 +5298,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc);
/* Do not reclaim the symbols of the rule which action triggered
@@ -4844,6 +5324,8 @@ yyreturn:
}
+
+/* Line 1675 of yacc.c */
#line 1827 "../parser/Grammar.y"
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h
index ebd30c8..c7d3837 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -104,78 +104,16 @@
AUTOMINUSMINUS = 320
};
#endif
-/* Tokens. */
-#define NULLTOKEN 258
-#define TRUETOKEN 259
-#define FALSETOKEN 260
-#define BREAK 261
-#define CASE 262
-#define DEFAULT 263
-#define FOR 264
-#define NEW 265
-#define VAR 266
-#define CONSTTOKEN 267
-#define CONTINUE 268
-#define FUNCTION 269
-#define RETURN 270
-#define VOIDTOKEN 271
-#define DELETETOKEN 272
-#define IF 273
-#define THISTOKEN 274
-#define DO 275
-#define WHILE 276
-#define INTOKEN 277
-#define INSTANCEOF 278
-#define TYPEOF 279
-#define SWITCH 280
-#define WITH 281
-#define RESERVED 282
-#define THROW 283
-#define TRY 284
-#define CATCH 285
-#define FINALLY 286
-#define DEBUGGER 287
-#define IF_WITHOUT_ELSE 288
-#define ELSE 289
-#define EQEQ 290
-#define NE 291
-#define STREQ 292
-#define STRNEQ 293
-#define LE 294
-#define GE 295
-#define OR 296
-#define AND 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define LSHIFT 300
-#define RSHIFT 301
-#define URSHIFT 302
-#define PLUSEQUAL 303
-#define MINUSEQUAL 304
-#define MULTEQUAL 305
-#define DIVEQUAL 306
-#define LSHIFTEQUAL 307
-#define RSHIFTEQUAL 308
-#define URSHIFTEQUAL 309
-#define ANDEQUAL 310
-#define MODEQUAL 311
-#define XOREQUAL 312
-#define OREQUAL 313
-#define OPENBRACE 314
-#define CLOSEBRACE 315
-#define NUMBER 316
-#define IDENT 317
-#define STRING 318
-#define AUTOPLUSPLUS 319
-#define AUTOMINUSMINUS 320
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 157 "../parser/Grammar.y"
{
+
+/* Line 1676 of yacc.c */
+#line 157 "../parser/Grammar.y"
+
int intValue;
double doubleValue;
Identifier* ident;
@@ -205,13 +143,15 @@ typedef union YYSTYPE
ParameterListInfo parameterList;
Operator op;
-}
-/* Line 1489 of yacc.c. */
-#line 211 "JavaScriptCore/tmp/../generated/Grammar.tab.h"
- YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c */
+#line 151 "JavaScriptCore/tmp/../generated/Grammar.tab.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -230,3 +170,4 @@ typedef struct YYLTYPE
#endif
+
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h
index 2b7e836..a9b1631 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h
@@ -10,6 +10,6 @@ static const struct HashTableValue jsonTableValues[3] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable jsonTable =
+extern JSC_CONST_HASHTABLE HashTable jsonTable =
{ 4, 3, jsonTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h
index fb1ae29..95c33b6 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h
@@ -44,6 +44,6 @@ static const struct HashTableValue mainTableValues[37] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable mainTable =
+extern JSC_CONST_HASHTABLE HashTable mainTable =
{ 133, 127, mainTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h
index 7d9b43e..9cb0ee2 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h
@@ -26,6 +26,6 @@ static const struct HashTableValue mathTableValues[19] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable mathTable =
+extern JSC_CONST_HASHTABLE HashTable mathTable =
{ 67, 63, mathTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h
index e963e1a..6285d62 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h
@@ -13,6 +13,6 @@ static const struct HashTableValue numberTableValues[6] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable numberTable =
+extern JSC_CONST_HASHTABLE HashTable numberTable =
{ 16, 15, numberTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h
index fd822c6..a3f15b3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h
@@ -29,6 +29,6 @@ static const struct HashTableValue regExpConstructorTableValues[22] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable regExpConstructorTable =
+extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable =
{ 65, 63, regExpConstructorTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h
index 81d5b60..8c87f16 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h
@@ -13,6 +13,6 @@ static const struct HashTableValue regExpTableValues[6] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable regExpTable =
+extern JSC_CONST_HASHTABLE HashTable regExpTable =
{ 17, 15, regExpTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h
index dfb9c20..f912298 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h
@@ -40,6 +40,6 @@ static const struct HashTableValue stringTableValues[33] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable stringTable =
+extern JSC_CONST_HASHTABLE HashTable stringTable =
{ 71, 63, stringTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h
index 0b0e5fe..2d677ce 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h
@@ -124,26 +124,23 @@ namespace JSC {
setCalleeArguments(0);
}
- private:
- friend class Arguments;
- friend class JSActivation;
- friend class JSGlobalObject;
- friend class Interpreter;
- friend struct CallFrameClosure;
+ // Read a register from the codeframe (or constant from the CodeBlock).
+ inline Register& r(int);
+ static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }
int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); }
+ bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; }
+ CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); }
+ CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
+
+ private:
void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; }
void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }
void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; }
static const intptr_t HostCallFrameFlag = 1;
- static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }
- bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; }
- CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); }
- CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
-
ExecState();
~ExecState();
};
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
index 7b1e547..ed7e1ee 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
@@ -65,10 +65,6 @@
#include "JIT.h"
#endif
-#if ENABLE(ASSEMBLER)
-#include "AssemblerBuffer.h"
-#endif
-
using namespace std;
namespace JSC {
@@ -112,7 +108,7 @@ NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, J
exceptionValue = callFrame->globalData().exception;
if (exceptionValue)
return false;
- callFrame[dst] = JSValue(result);
+ callFrame->r(dst) = JSValue(result);
return true;
}
} while (++iter != end);
@@ -145,7 +141,7 @@ NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vP
exceptionValue = callFrame->globalData().exception;
if (exceptionValue)
return false;
- callFrame[dst] = JSValue(result);
+ callFrame->r(dst) = JSValue(result);
return true;
}
} while (++iter != end);
@@ -163,7 +159,7 @@ NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction*
int offset = (vPC + 5)->u.operand;
if (structure == globalObject->structure()) {
- callFrame[dst] = JSValue(globalObject->getDirectOffset(offset));
+ callFrame->r(dst) = JSValue(globalObject->getDirectOffset(offset));
return true;
}
@@ -178,14 +174,14 @@ NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction*
globalObject->structure()->ref();
vPC[4] = globalObject->structure();
vPC[5] = slot.cachedOffset();
- callFrame[dst] = JSValue(result);
+ callFrame->r(dst) = JSValue(result);
return true;
}
exceptionValue = callFrame->globalData().exception;
if (exceptionValue)
return false;
- callFrame[dst] = JSValue(result);
+ callFrame->r(dst) = JSValue(result);
return true;
}
@@ -197,7 +193,7 @@ NEVER_INLINE void Interpreter::resolveBase(CallFrame* callFrame, Instruction* vP
{
int dst = (vPC + 1)->u.operand;
int property = (vPC + 2)->u.operand;
- callFrame[dst] = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));
+ callFrame->r(dst) = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));
}
NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue)
@@ -225,8 +221,8 @@ NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Inst
exceptionValue = callFrame->globalData().exception;
if (exceptionValue)
return false;
- callFrame[propDst] = JSValue(result);
- callFrame[baseDst] = JSValue(base);
+ callFrame->r(propDst) = JSValue(result);
+ callFrame->r(baseDst) = JSValue(base);
return true;
}
++iter;
@@ -270,8 +266,8 @@ NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruct
if (exceptionValue)
return false;
- callFrame[baseDst] = JSValue(thisObj);
- callFrame[funcDst] = JSValue(result);
+ callFrame->r(baseDst) = JSValue(thisObj);
+ callFrame->r(funcDst) = JSValue(result);
return true;
}
++iter;
@@ -436,17 +432,7 @@ void Interpreter::dumpRegisters(CallFrame* callFrame)
}
printf("----------------------------------------------------\n");
- end = it + codeBlock->m_numConstants;
- if (it != end) {
- do {
- printf("[r%2d] | %10p | %10p \n", registerCount, it, (*it).v());
- ++it;
- ++registerCount;
- } while (it != end);
- }
- printf("----------------------------------------------------\n");
-
- end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numConstants - codeBlock->m_numVars;
+ end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numVars;
if (it != end) {
do {
printf("[r%2d] | %10p | %10p \n", registerCount, it, (*it).v());
@@ -567,13 +553,13 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV
if (Profiler* profiler = *Profiler::enabledProfilerReference()) {
#if !ENABLE(JIT)
if (isCallBytecode(codeBlock->instructions()[bytecodeOffset].u.opcode))
- profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue());
+ profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 2].u.operand).jsValue());
else if (codeBlock->instructions()[bytecodeOffset + 8].u.opcode == getOpcode(op_construct))
- profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue());
+ profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 10].u.operand).jsValue());
#else
int functionRegisterIndex;
if (codeBlock->functionRegisterForBytecodeOffset(bytecodeOffset, functionRegisterIndex))
- profiler->didExecute(callFrame, callFrame[functionRegisterIndex].jsValue());
+ profiler->didExecute(callFrame, callFrame->r(functionRegisterIndex).jsValue());
#endif
}
@@ -625,7 +611,7 @@ JSValue Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, Sco
globalObject->copyGlobalsTo(m_registerFile);
CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize);
- newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj);
+ newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj);
newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), 0, 0, 0);
if (codeBlock->needsFullScopeChain())
@@ -682,10 +668,10 @@ JSValue Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* call
CallFrame* newCallFrame = CallFrame::create(oldEnd);
size_t dst = 0;
- newCallFrame[0] = JSValue(thisObj);
+ newCallFrame->r(0) = JSValue(thisObj);
ArgList::const_iterator end = args.end();
for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- newCallFrame[++dst] = *it;
+ newCallFrame->r(++dst) = *it;
CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain);
newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc);
@@ -743,7 +729,7 @@ CallFrameClosure Interpreter::prepareForRepeatCall(FunctionBodyNode* functionBod
CallFrame* newCallFrame = CallFrame::create(oldEnd);
size_t dst = 0;
for (int i = 0; i < argc; ++i)
- newCallFrame[++dst] = jsUndefined();
+ newCallFrame->r(++dst) = jsUndefined();
CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain);
newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc);
@@ -854,7 +840,7 @@ JSValue Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject*
CallFrame* newCallFrame = CallFrame::create(m_registerFile.start() + globalRegisterOffset);
// a 0 codeBlock indicates a built-in caller
- newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj);
+ newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj);
newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, 0, 0);
if (codeBlock->needsFullScopeChain())
@@ -918,9 +904,9 @@ NEVER_INLINE ScopeChainNode* Interpreter::createExceptionScope(CallFrame* callFr
int dst = (++vPC)->u.operand;
CodeBlock* codeBlock = callFrame->codeBlock();
Identifier& property = codeBlock->identifier((++vPC)->u.operand);
- JSValue value = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue value = callFrame->r((++vPC)->u.operand).jsValue();
JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete);
- callFrame[dst] = JSValue(scope);
+ callFrame->r(dst) = JSValue(scope);
return callFrame->scopeChain()->push(scope);
}
@@ -1197,7 +1183,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
constructor, and puts the result in register dst.
*/
int dst = (++vPC)->u.operand;
- callFrame[dst] = JSValue(constructEmptyObject(callFrame));
+ callFrame->r(dst) = JSValue(constructEmptyObject(callFrame));
++vPC;
NEXT_INSTRUCTION();
@@ -1214,7 +1200,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int firstArg = (++vPC)->u.operand;
int argCount = (++vPC)->u.operand;
ArgList args(callFrame->registers() + firstArg, argCount);
- callFrame[dst] = JSValue(constructArray(callFrame, args));
+ callFrame->r(dst) = JSValue(constructArray(callFrame, args));
++vPC;
NEXT_INSTRUCTION();
@@ -1228,7 +1214,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int regExp = (++vPC)->u.operand;
- callFrame[dst] = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
+ callFrame->r(dst) = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
++vPC;
NEXT_INSTRUCTION();
@@ -1240,7 +1226,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = callFrame[src];
+ callFrame->r(dst) = callFrame->r(src);
++vPC;
NEXT_INSTRUCTION();
@@ -1253,14 +1239,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
- callFrame[dst] = JSFastMath::equal(src1, src2);
+ callFrame->r(dst) = JSFastMath::equal(src1, src2);
else {
JSValue result = jsBoolean(JSValue::equalSlowCase(callFrame, src1, src2));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
@@ -1273,15 +1259,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
operator, and puts the result as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
if (src.isUndefinedOrNull()) {
- callFrame[dst] = jsBoolean(true);
+ callFrame->r(dst) = jsBoolean(true);
++vPC;
NEXT_INSTRUCTION();
}
- callFrame[dst] = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined());
+ callFrame->r(dst) = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined());
++vPC;
NEXT_INSTRUCTION();
}
@@ -1293,14 +1279,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
result as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
- callFrame[dst] = JSFastMath::notEqual(src1, src2);
+ callFrame->r(dst) = JSFastMath::notEqual(src1, src2);
else {
JSValue result = jsBoolean(!JSValue::equalSlowCase(callFrame, src1, src2));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
@@ -1313,15 +1299,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
operator, and puts the result as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
if (src.isUndefinedOrNull()) {
- callFrame[dst] = jsBoolean(false);
+ callFrame->r(dst) = jsBoolean(false);
++vPC;
NEXT_INSTRUCTION();
}
- callFrame[dst] = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined());
+ callFrame->r(dst) = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined());
++vPC;
NEXT_INSTRUCTION();
}
@@ -1333,9 +1319,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
result as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
- callFrame[dst] = jsBoolean(JSValue::strictEqual(src1, src2));
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
+ callFrame->r(dst) = jsBoolean(JSValue::strictEqual(src1, src2));
++vPC;
NEXT_INSTRUCTION();
@@ -1348,9 +1334,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
puts the result as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
- callFrame[dst] = jsBoolean(!JSValue::strictEqual(src1, src2));
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
+ callFrame->r(dst) = jsBoolean(!JSValue::strictEqual(src1, src2));
++vPC;
NEXT_INSTRUCTION();
@@ -1363,11 +1349,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
JSValue result = jsBoolean(jsLess(callFrame, src1, src2));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
@@ -1380,11 +1366,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
puts the result as a boolean in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
JSValue result = jsBoolean(jsLessEq(callFrame, src1, src2));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
@@ -1396,13 +1382,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
back in register srcDst.
*/
int srcDst = (++vPC)->u.operand;
- JSValue v = callFrame[srcDst].jsValue();
+ JSValue v = callFrame->r(srcDst).jsValue();
if (JSFastMath::canDoFastAdditiveOperations(v))
- callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v));
+ callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v));
else {
JSValue result = jsNumber(callFrame, v.toNumber(callFrame) + 1);
CHECK_FOR_EXCEPTION();
- callFrame[srcDst] = result;
+ callFrame->r(srcDst) = result;
}
++vPC;
@@ -1415,13 +1401,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
back in register srcDst.
*/
int srcDst = (++vPC)->u.operand;
- JSValue v = callFrame[srcDst].jsValue();
+ JSValue v = callFrame->r(srcDst).jsValue();
if (JSFastMath::canDoFastAdditiveOperations(v))
- callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v));
+ callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v));
else {
JSValue result = jsNumber(callFrame, v.toNumber(callFrame) - 1);
CHECK_FOR_EXCEPTION();
- callFrame[srcDst] = result;
+ callFrame->r(srcDst) = result;
}
++vPC;
@@ -1436,15 +1422,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int srcDst = (++vPC)->u.operand;
- JSValue v = callFrame[srcDst].jsValue();
+ JSValue v = callFrame->r(srcDst).jsValue();
if (JSFastMath::canDoFastAdditiveOperations(v)) {
- callFrame[dst] = v;
- callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v));
+ callFrame->r(dst) = v;
+ callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v));
} else {
- JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame);
+ JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame);
CHECK_FOR_EXCEPTION();
- callFrame[dst] = number;
- callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1));
+ callFrame->r(dst) = number;
+ callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1));
}
++vPC;
@@ -1459,15 +1445,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int srcDst = (++vPC)->u.operand;
- JSValue v = callFrame[srcDst].jsValue();
+ JSValue v = callFrame->r(srcDst).jsValue();
if (JSFastMath::canDoFastAdditiveOperations(v)) {
- callFrame[dst] = v;
- callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v));
+ callFrame->r(dst) = v;
+ callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v));
} else {
- JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame);
+ JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame);
CHECK_FOR_EXCEPTION();
- callFrame[dst] = number;
- callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1));
+ callFrame->r(dst) = number;
+ callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1));
}
++vPC;
@@ -1482,14 +1468,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- JSValue srcVal = callFrame[src].jsValue();
+ JSValue srcVal = callFrame->r(src).jsValue();
if (LIKELY(srcVal.isNumber()))
- callFrame[dst] = callFrame[src];
+ callFrame->r(dst) = callFrame->r(src);
else {
JSValue result = srcVal.toJSNumber(callFrame);
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
@@ -1502,15 +1488,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
result in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
++vPC;
double v;
if (src.getNumber(v))
- callFrame[dst] = JSValue(jsNumber(callFrame, -v));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, -v));
else {
JSValue result = jsNumber(callFrame, -src.toNumber(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
NEXT_INSTRUCTION();
@@ -1523,14 +1509,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
numeric add, depending on the types of the operands.)
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
if (JSFastMath::canDoFastAdditiveOperations(src1, src2))
- callFrame[dst] = JSValue(JSFastMath::addImmediateNumbers(src1, src2));
+ callFrame->r(dst) = JSValue(JSFastMath::addImmediateNumbers(src1, src2));
else {
JSValue result = jsAdd(callFrame, src1, src2);
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
vPC += 2;
NEXT_INSTRUCTION();
@@ -1542,23 +1528,23 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
numbers), and puts the product in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
double left;
double right;
if (JSValue::areBothInt32Fast(src1, src2)) {
int32_t left = src1.getInt32Fast();
int32_t right = src2.getInt32Fast();
if ((left | right) >> 15 == 0)
- callFrame[dst] = JSValue(jsNumber(callFrame, left * right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right));
else
- callFrame[dst] = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));
} else if (src1.getNumber(left) && src2.getNumber(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left * right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right));
else {
JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) * src2.toNumber(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
vPC += 2;
@@ -1572,16 +1558,16 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
quotient in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue dividend = callFrame[(++vPC)->u.operand].jsValue();
- JSValue divisor = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue dividend = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue divisor = callFrame->r((++vPC)->u.operand).jsValue();
double left;
double right;
if (dividend.getNumber(left) && divisor.getNumber(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left / right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left / right));
else {
JSValue result = jsNumber(callFrame, dividend.toNumber(callFrame) / divisor.toNumber(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
NEXT_INSTRUCTION();
@@ -1597,15 +1583,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int dividend = (++vPC)->u.operand;
int divisor = (++vPC)->u.operand;
- JSValue dividendValue = callFrame[dividend].jsValue();
- JSValue divisorValue = callFrame[divisor].jsValue();
+ JSValue dividendValue = callFrame->r(dividend).jsValue();
+ JSValue divisorValue = callFrame->r(divisor).jsValue();
if (JSValue::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != jsNumber(callFrame, 0)) {
// We expect the result of the modulus of a number that was representable as an int32 to also be representable
// as an int32.
JSValue result = JSValue::makeInt32Fast(dividendValue.getInt32Fast() % divisorValue.getInt32Fast());
ASSERT(result);
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
}
@@ -1613,7 +1599,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
double d = dividendValue.toNumber(callFrame);
JSValue result = jsNumber(callFrame, fmod(d, divisorValue.toNumber(callFrame)));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
}
@@ -1625,18 +1611,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
double left;
double right;
if (JSFastMath::canDoFastAdditiveOperations(src1, src2))
- callFrame[dst] = JSValue(JSFastMath::subImmediateNumbers(src1, src2));
+ callFrame->r(dst) = JSValue(JSFastMath::subImmediateNumbers(src1, src2));
else if (src1.getNumber(left) && src2.getNumber(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left - right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left - right));
else {
JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) - src2.toNumber(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
vPC += 2;
NEXT_INSTRUCTION();
@@ -1649,18 +1635,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue val = callFrame[(++vPC)->u.operand].jsValue();
- JSValue shift = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue val = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue shift = callFrame->r((++vPC)->u.operand).jsValue();
int32_t left;
uint32_t right;
if (JSValue::areBothInt32Fast(val, shift))
- callFrame[dst] = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f)));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f)));
else if (val.numberToInt32(left) && shift.numberToUInt32(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left << (right & 0x1f)));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left << (right & 0x1f)));
else {
JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
@@ -1674,18 +1660,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
uint32), and puts the result in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue val = callFrame[(++vPC)->u.operand].jsValue();
- JSValue shift = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue val = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue shift = callFrame->r((++vPC)->u.operand).jsValue();
int32_t left;
uint32_t right;
if (JSFastMath::canDoFastRshift(val, shift))
- callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
+ callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
else if (val.numberToInt32(left) && shift.numberToUInt32(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left >> (right & 0x1f)));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left >> (right & 0x1f)));
else {
JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
@@ -1699,14 +1685,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
uint32), and puts the result in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue val = callFrame[(++vPC)->u.operand].jsValue();
- JSValue shift = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue val = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue shift = callFrame->r((++vPC)->u.operand).jsValue();
if (JSFastMath::canDoFastUrshift(val, shift))
- callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
+ callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
else {
JSValue result = jsNumber(callFrame, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
@@ -1720,18 +1706,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int32_t left;
int32_t right;
if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
- callFrame[dst] = JSValue(JSFastMath::andImmediateNumbers(src1, src2));
+ callFrame->r(dst) = JSValue(JSFastMath::andImmediateNumbers(src1, src2));
else if (src1.numberToInt32(left) && src2.numberToInt32(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left & right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left & right));
else {
JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) & src2.toInt32(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
vPC += 2;
@@ -1745,18 +1731,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int32_t left;
int32_t right;
if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
- callFrame[dst] = JSValue(JSFastMath::xorImmediateNumbers(src1, src2));
+ callFrame->r(dst) = JSValue(JSFastMath::xorImmediateNumbers(src1, src2));
else if (src1.numberToInt32(left) && src2.numberToInt32(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left ^ right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left ^ right));
else {
JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) ^ src2.toInt32(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
vPC += 2;
@@ -1770,18 +1756,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
result in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int32_t left;
int32_t right;
if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
- callFrame[dst] = JSValue(JSFastMath::orImmediateNumbers(src1, src2));
+ callFrame->r(dst) = JSValue(JSFastMath::orImmediateNumbers(src1, src2));
else if (src1.numberToInt32(left) && src2.numberToInt32(right))
- callFrame[dst] = JSValue(jsNumber(callFrame, left | right));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, left | right));
else {
JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) | src2.toInt32(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
vPC += 2;
@@ -1794,14 +1780,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
and puts the result in register dst.
*/
int dst = (++vPC)->u.operand;
- JSValue src = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
int32_t value;
if (src.numberToInt32(value))
- callFrame[dst] = JSValue(jsNumber(callFrame, ~value));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, ~value));
else {
JSValue result = jsNumber(callFrame, ~src.toInt32(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
}
++vPC;
NEXT_INSTRUCTION();
@@ -1814,9 +1800,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- JSValue result = jsBoolean(!callFrame[src].jsValue().toBoolean(callFrame));
+ JSValue result = jsBoolean(!callFrame->r(src).jsValue().toBoolean(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
@@ -1839,14 +1825,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int base = vPC[3].u.operand;
int baseProto = vPC[4].u.operand;
- JSValue baseVal = callFrame[base].jsValue();
+ JSValue baseVal = callFrame->r(base).jsValue();
if (isInvalidParamForInstanceOf(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue))
goto vm_throw;
- bool result = asObject(baseVal)->hasInstance(callFrame, callFrame[value].jsValue(), callFrame[baseProto].jsValue());
+ bool result = asObject(baseVal)->hasInstance(callFrame, callFrame->r(value).jsValue(), callFrame->r(baseProto).jsValue());
CHECK_FOR_EXCEPTION();
- callFrame[dst] = jsBoolean(result);
+ callFrame->r(dst) = jsBoolean(result);
vPC += 5;
NEXT_INSTRUCTION();
@@ -1859,7 +1845,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = JSValue(jsTypeStringForValue(callFrame, callFrame[src].jsValue()));
+ callFrame->r(dst) = JSValue(jsTypeStringForValue(callFrame, callFrame->r(src).jsValue()));
++vPC;
NEXT_INSTRUCTION();
@@ -1873,8 +1859,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- JSValue v = callFrame[src].jsValue();
- callFrame[dst] = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined());
+ JSValue v = callFrame->r(src).jsValue();
+ callFrame->r(dst) = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined());
++vPC;
NEXT_INSTRUCTION();
@@ -1888,7 +1874,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = jsBoolean(callFrame[src].jsValue().isBoolean());
+ callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isBoolean());
++vPC;
NEXT_INSTRUCTION();
@@ -1902,7 +1888,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = jsBoolean(callFrame[src].jsValue().isNumber());
+ callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isNumber());
++vPC;
NEXT_INSTRUCTION();
@@ -1916,7 +1902,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = jsBoolean(callFrame[src].jsValue().isString());
+ callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isString());
++vPC;
NEXT_INSTRUCTION();
@@ -1930,7 +1916,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = jsBoolean(jsIsObjectType(callFrame[src].jsValue()));
+ callFrame->r(dst) = jsBoolean(jsIsObjectType(callFrame->r(src).jsValue()));
++vPC;
NEXT_INSTRUCTION();
@@ -1944,7 +1930,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = jsBoolean(jsIsFunctionType(callFrame[src].jsValue()));
+ callFrame->r(dst) = jsBoolean(jsIsFunctionType(callFrame->r(src).jsValue()));
++vPC;
NEXT_INSTRUCTION();
@@ -1962,21 +1948,21 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int property = (++vPC)->u.operand;
int base = (++vPC)->u.operand;
- JSValue baseVal = callFrame[base].jsValue();
+ JSValue baseVal = callFrame->r(base).jsValue();
if (isInvalidParamForIn(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue))
goto vm_throw;
JSObject* baseObj = asObject(baseVal);
- JSValue propName = callFrame[property].jsValue();
+ JSValue propName = callFrame->r(property).jsValue();
uint32_t i;
if (propName.getUInt32(i))
- callFrame[dst] = jsBoolean(baseObj->hasProperty(callFrame, i));
+ callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, i));
else {
Identifier property(callFrame, propName.toString(callFrame));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = jsBoolean(baseObj->hasProperty(callFrame, property));
+ callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, property));
}
++vPC;
@@ -2034,7 +2020,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
ASSERT(scope->isGlobalObject());
int index = (++vPC)->u.operand;
- callFrame[dst] = scope->registerAt(index);
+ callFrame->r(dst) = scope->registerAt(index);
++vPC;
NEXT_INSTRUCTION();
}
@@ -2048,7 +2034,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int index = (++vPC)->u.operand;
int value = (++vPC)->u.operand;
- scope->registerAt(index) = JSValue(callFrame[value].jsValue());
+ scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
++vPC;
NEXT_INSTRUCTION();
}
@@ -2073,7 +2059,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
ASSERT((*iter)->isVariableObject());
JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
- callFrame[dst] = scope->registerAt(index);
+ callFrame->r(dst) = scope->registerAt(index);
++vPC;
NEXT_INSTRUCTION();
}
@@ -2096,7 +2082,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
ASSERT((*iter)->isVariableObject());
JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
- scope->registerAt(index) = JSValue(callFrame[value].jsValue());
+ scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
++vPC;
NEXT_INSTRUCTION();
}
@@ -2164,14 +2150,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
CodeBlock* codeBlock = callFrame->codeBlock();
Identifier& ident = codeBlock->identifier(property);
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
PropertySlot slot(baseValue);
JSValue result = baseValue.get(callFrame, ident, slot);
CHECK_FOR_EXCEPTION();
tryCacheGetByID(callFrame, codeBlock, vPC, baseValue, ident, slot);
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
vPC += 8;
NEXT_INSTRUCTION();
}
@@ -2183,7 +2169,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
op_get_by_id.
*/
int base = vPC[2].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
JSCell* baseCell = asCell(baseValue);
@@ -2196,7 +2182,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int offset = vPC[5].u.operand;
ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
- callFrame[dst] = JSValue(baseObject->getDirectOffset(offset));
+ callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset));
vPC += 8;
NEXT_INSTRUCTION();
@@ -2214,7 +2200,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
reverts to op_get_by_id.
*/
int base = vPC[2].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
JSCell* baseCell = asCell(baseValue);
@@ -2230,7 +2216,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int offset = vPC[6].u.operand;
ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset));
- callFrame[dst] = JSValue(protoObject->getDirectOffset(offset));
+ callFrame->r(dst) = JSValue(protoObject->getDirectOffset(offset));
vPC += 8;
NEXT_INSTRUCTION();
@@ -2263,7 +2249,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
reverts to op_get_by_id.
*/
int base = vPC[2].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
JSCell* baseCell = asCell(baseValue);
@@ -2285,7 +2271,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int offset = vPC[7].u.operand;
ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
- callFrame[dst] = JSValue(baseObject->getDirectOffset(offset));
+ callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset));
vPC += 8;
NEXT_INSTRUCTION();
@@ -2311,12 +2297,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int property = vPC[3].u.operand;
Identifier& ident = callFrame->codeBlock()->identifier(property);
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
PropertySlot slot(baseValue);
JSValue result = baseValue.get(callFrame, ident, slot);
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
vPC += 8;
NEXT_INSTRUCTION();
}
@@ -2329,10 +2315,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int base = vPC[2].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(isJSArray(globalData, baseValue))) {
int dst = vPC[1].u.operand;
- callFrame[dst] = JSValue(jsNumber(callFrame, asArray(baseValue)->length()));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, asArray(baseValue)->length()));
vPC += 8;
NEXT_INSTRUCTION();
}
@@ -2349,10 +2335,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int base = vPC[2].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(isJSString(globalData, baseValue))) {
int dst = vPC[1].u.operand;
- callFrame[dst] = JSValue(jsNumber(callFrame, asString(baseValue)->value().size()));
+ callFrame->r(dst) = JSValue(jsNumber(callFrame, asString(baseValue)->value().size()));
vPC += 8;
NEXT_INSTRUCTION();
}
@@ -2375,10 +2361,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int value = vPC[3].u.operand;
CodeBlock* codeBlock = callFrame->codeBlock();
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
Identifier& ident = codeBlock->identifier(property);
PutPropertySlot slot;
- baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot);
+ baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot);
CHECK_FOR_EXCEPTION();
tryCachePutByID(callFrame, codeBlock, vPC, baseValue, slot);
@@ -2398,7 +2384,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
the register file.
*/
int base = vPC[1].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
JSCell* baseCell = asCell(baseValue);
@@ -2426,7 +2412,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int value = vPC[3].u.operand;
unsigned offset = vPC[7].u.operand;
ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset);
- baseObject->putDirectOffset(offset, callFrame[value].jsValue());
+ baseObject->putDirectOffset(offset, callFrame->r(value).jsValue());
vPC += 8;
NEXT_INSTRUCTION();
@@ -2448,7 +2434,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
the register file.
*/
int base = vPC[1].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
if (LIKELY(baseValue.isCell())) {
JSCell* baseCell = asCell(baseValue);
@@ -2461,7 +2447,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
unsigned offset = vPC[5].u.operand;
ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset);
- baseObject->putDirectOffset(offset, callFrame[value].jsValue());
+ baseObject->putDirectOffset(offset, callFrame->r(value).jsValue());
vPC += 8;
NEXT_INSTRUCTION();
@@ -2484,10 +2470,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int property = vPC[2].u.operand;
int value = vPC[3].u.operand;
- JSValue baseValue = callFrame[base].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
Identifier& ident = callFrame->codeBlock()->identifier(property);
PutPropertySlot slot;
- baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot);
+ baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot);
CHECK_FOR_EXCEPTION();
vPC += 8;
@@ -2505,11 +2491,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int base = (++vPC)->u.operand;
int property = (++vPC)->u.operand;
- JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame);
+ JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame);
Identifier& ident = callFrame->codeBlock()->identifier(property);
JSValue result = jsBoolean(baseObj->deleteProperty(callFrame, ident));
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
}
@@ -2525,8 +2511,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int base = (++vPC)->u.operand;
int property = (++vPC)->u.operand;
- JSValue baseValue = callFrame[base].jsValue();
- JSValue subscript = callFrame[property].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
+ JSValue subscript = callFrame->r(property).jsValue();
JSValue result;
@@ -2550,7 +2536,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
}
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
}
@@ -2569,21 +2555,21 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int property = (++vPC)->u.operand;
int value = (++vPC)->u.operand;
- JSValue baseValue = callFrame[base].jsValue();
- JSValue subscript = callFrame[property].jsValue();
+ JSValue baseValue = callFrame->r(base).jsValue();
+ JSValue subscript = callFrame->r(property).jsValue();
if (LIKELY(subscript.isUInt32Fast())) {
uint32_t i = subscript.getUInt32Fast();
if (isJSArray(globalData, baseValue)) {
JSArray* jsArray = asArray(baseValue);
if (jsArray->canSetIndex(i))
- jsArray->setIndex(i, callFrame[value].jsValue());
+ jsArray->setIndex(i, callFrame->r(value).jsValue());
else
- jsArray->JSArray::put(callFrame, i, callFrame[value].jsValue());
+ jsArray->JSArray::put(callFrame, i, callFrame->r(value).jsValue());
} else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) {
JSByteArray* jsByteArray = asByteArray(baseValue);
double dValue = 0;
- JSValue jsValue = callFrame[value].jsValue();
+ JSValue jsValue = callFrame->r(value).jsValue();
if (jsValue.isInt32Fast())
jsByteArray->setIndex(i, jsValue.getInt32Fast());
else if (jsValue.getNumber(dValue))
@@ -2591,12 +2577,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
else
baseValue.put(callFrame, i, jsValue);
} else
- baseValue.put(callFrame, i, callFrame[value].jsValue());
+ baseValue.put(callFrame, i, callFrame->r(value).jsValue());
} else {
Identifier property(callFrame, subscript.toString(callFrame));
if (!globalData->exception) { // Don't put to an object if toString threw an exception.
PutPropertySlot slot;
- baseValue.put(callFrame, property, callFrame[value].jsValue(), slot);
+ baseValue.put(callFrame, property, callFrame->r(value).jsValue(), slot);
}
}
@@ -2616,9 +2602,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int base = (++vPC)->u.operand;
int property = (++vPC)->u.operand;
- JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); // may throw
+ JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame); // may throw
- JSValue subscript = callFrame[property].jsValue();
+ JSValue subscript = callFrame->r(property).jsValue();
JSValue result;
uint32_t i;
if (subscript.getUInt32(i))
@@ -2631,7 +2617,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
}
CHECK_FOR_EXCEPTION();
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
++vPC;
NEXT_INSTRUCTION();
}
@@ -2651,7 +2637,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
unsigned property = (++vPC)->u.operand;
int value = (++vPC)->u.operand;
- callFrame[base].jsValue().put(callFrame, property, callFrame[value].jsValue());
+ callFrame->r(base).jsValue().put(callFrame, property, callFrame->r(value).jsValue());
++vPC;
NEXT_INSTRUCTION();
@@ -2698,7 +2684,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int cond = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- if (callFrame[cond].jsValue().toBoolean(callFrame)) {
+ if (callFrame->r(cond).jsValue().toBoolean(callFrame)) {
vPC += target;
CHECK_FOR_TIMEOUT();
NEXT_INSTRUCTION();
@@ -2715,7 +2701,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int cond = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- if (callFrame[cond].jsValue().toBoolean(callFrame)) {
+ if (callFrame->r(cond).jsValue().toBoolean(callFrame)) {
vPC += target;
NEXT_INSTRUCTION();
}
@@ -2731,7 +2717,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int cond = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- if (!callFrame[cond].jsValue().toBoolean(callFrame)) {
+ if (!callFrame->r(cond).jsValue().toBoolean(callFrame)) {
vPC += target;
NEXT_INSTRUCTION();
}
@@ -2747,7 +2733,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int src = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- JSValue srcValue = callFrame[src].jsValue();
+ JSValue srcValue = callFrame->r(src).jsValue();
if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) {
vPC += target;
@@ -2765,7 +2751,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int src = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- JSValue srcValue = callFrame[src].jsValue();
+ JSValue srcValue = callFrame->r(src).jsValue();
if (!srcValue.isUndefinedOrNull() || (srcValue.isCell() && !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) {
vPC += target;
@@ -2784,7 +2770,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int src = (++vPC)->u.operand;
JSValue ptr = JSValue((++vPC)->u.jsCell);
int target = (++vPC)->u.operand;
- JSValue srcValue = callFrame[src].jsValue();
+ JSValue srcValue = callFrame->r(src).jsValue();
if (srcValue != ptr) {
vPC += target;
NEXT_INSTRUCTION();
@@ -2804,8 +2790,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
Additionally this loop instruction may terminate JS execution is
the JS timeout is reached.
*/
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int target = (++vPC)->u.operand;
bool result = jsLess(callFrame, src1, src2);
@@ -2831,8 +2817,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
Additionally this loop instruction may terminate JS execution is
the JS timeout is reached.
*/
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int target = (++vPC)->u.operand;
bool result = jsLessEq(callFrame, src1, src2);
@@ -2855,8 +2841,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
target from the current instruction, if and only if the
result of the comparison is false.
*/
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int target = (++vPC)->u.operand;
bool result = jsLess(callFrame, src1, src2);
@@ -2878,8 +2864,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
and then jumps to offset target from the current instruction,
if and only if theresult of the comparison is false.
*/
- JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
- JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
+ JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
int target = (++vPC)->u.operand;
bool result = jsLessEq(callFrame, src1, src2);
@@ -2904,7 +2890,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int tableIndex = (++vPC)->u.operand;
int defaultOffset = (++vPC)->u.operand;
- JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue();
if (scrutinee.isInt32Fast())
vPC += callFrame->codeBlock()->immediateSwitchJumpTable(tableIndex).offsetForValue(scrutinee.getInt32Fast(), defaultOffset);
else {
@@ -2928,7 +2914,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int tableIndex = (++vPC)->u.operand;
int defaultOffset = (++vPC)->u.operand;
- JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue();
if (!scrutinee.isString())
vPC += defaultOffset;
else {
@@ -2951,7 +2937,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int tableIndex = (++vPC)->u.operand;
int defaultOffset = (++vPC)->u.operand;
- JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue();
+ JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue();
if (!scrutinee.isString())
vPC += defaultOffset;
else
@@ -2969,7 +2955,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int dst = (++vPC)->u.operand;
int func = (++vPC)->u.operand;
- callFrame[dst] = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain());
+ callFrame->r(dst) = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain());
++vPC;
NEXT_INSTRUCTION();
@@ -2985,7 +2971,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int dst = (++vPC)->u.operand;
int func = (++vPC)->u.operand;
- callFrame[dst] = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain());
+ callFrame->r(dst) = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain());
++vPC;
NEXT_INSTRUCTION();
@@ -3007,7 +2993,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int argCount = vPC[3].u.operand;
int registerOffset = vPC[4].u.operand;
- JSValue funcVal = callFrame[func].jsValue();
+ JSValue funcVal = callFrame->r(func).jsValue();
Register* newCallFrame = callFrame->registers() + registerOffset;
Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount;
@@ -3018,7 +3004,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);
if (exceptionValue)
goto vm_throw;
- callFrame[dst] = result;
+ callFrame->r(dst) = result;
vPC += 5;
NEXT_INSTRUCTION();
@@ -3044,7 +3030,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int argCount = vPC[3].u.operand;
int registerOffset = vPC[4].u.operand;
- JSValue v = callFrame[func].jsValue();
+ JSValue v = callFrame->r(func).jsValue();
CallData callData;
CallType callType = v.getCallData(callData);
@@ -3093,7 +3079,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
}
CHECK_FOR_EXCEPTION();
- callFrame[dst] = JSValue(returnValue);
+ callFrame->r(dst) = JSValue(returnValue);
vPC += 5;
NEXT_INSTRUCTION();
@@ -3108,19 +3094,19 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int argCountDst = (++vPC)->u.operand;
int argsOffset = (++vPC)->u.operand;
- JSValue arguments = callFrame[argsOffset].jsValue();
- uint32_t argCount = 0;
+ JSValue arguments = callFrame->r(argsOffset).jsValue();
+ int32_t argCount = 0;
if (!arguments) {
- argCount = (uint32_t)(callFrame[RegisterFile::ArgumentCount].u.i) - 1;
+ argCount = (uint32_t)(callFrame->argumentCount()) - 1;
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
exceptionValue = createStackOverflowError(callFrame);
goto vm_throw;
}
- uint32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount();
- uint32_t inplaceArgs = min(argCount, expectedParams);
- uint32_t i = 0;
+ int32_t expectedParams = callFrame->callee()->body()->parameterCount();
+ int32_t inplaceArgs = min(argCount, expectedParams);
+ int32_t i = 0;
Register* argStore = callFrame->registers() + argsOffset;
// First step is to copy the "expected" parameters from their normal location relative to the callframe
@@ -3164,7 +3150,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
goto vm_throw;
}
Register* argsBuffer = callFrame->registers() + argsOffset;
- for (unsigned i = 0; i < argCount; ++i) {
+ for (int32_t i = 0; i < argCount; ++i) {
argsBuffer[i] = asObject(arguments)->get(callFrame, i);
CHECK_FOR_EXCEPTION();
}
@@ -3176,7 +3162,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
}
}
CHECK_FOR_EXCEPTION();
- callFrame[argCountDst] = argCount + 1;
+ callFrame->r(argCountDst) = argCount + 1;
++vPC;
NEXT_INSTRUCTION();
}
@@ -3197,8 +3183,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int argCountReg = vPC[3].u.operand;
int registerOffset = vPC[4].u.operand;
- JSValue v = callFrame[func].jsValue();
- int argCount = callFrame[argCountReg].i();
+ JSValue v = callFrame->r(func).jsValue();
+ int argCount = callFrame->r(argCountReg).i();
registerOffset += argCount;
CallData callData;
CallType callType = v.getCallData(callData);
@@ -3247,7 +3233,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
}
CHECK_FOR_EXCEPTION();
- callFrame[dst] = JSValue(returnValue);
+ callFrame->r(dst) = JSValue(returnValue);
vPC += 5;
NEXT_INSTRUCTION();
@@ -3274,7 +3260,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int src = (++vPC)->u.operand;
ASSERT(callFrame->codeBlock()->needsFullScopeChain());
- asActivation(callFrame[src].jsValue())->copyRegisters(callFrame->optionalCalleeArguments());
+ asActivation(callFrame->r(src).jsValue())->copyRegisters(callFrame->optionalCalleeArguments());
++vPC;
NEXT_INSTRUCTION();
@@ -3314,7 +3300,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
if (callFrame->codeBlock()->needsFullScopeChain())
callFrame->scopeChain()->deref();
- JSValue returnValue = callFrame[result].jsValue();
+ JSValue returnValue = callFrame->r(result).jsValue();
vPC = callFrame->returnPC();
int dst = callFrame->returnValueRegister();
@@ -3323,7 +3309,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
if (callFrame->hasHostCallFrameFlag())
return returnValue;
- callFrame[dst] = JSValue(returnValue);
+ callFrame->r(dst) = JSValue(returnValue);
NEXT_INSTRUCTION();
}
@@ -3342,10 +3328,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
CodeBlock* codeBlock = callFrame->codeBlock();
for (size_t count = codeBlock->m_numVars; i < count; ++i)
- callFrame[i] = jsUndefined();
-
- for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j)
- callFrame[i] = codeBlock->constantRegister(j);
+ callFrame->r(i) = jsUndefined();
++vPC;
NEXT_INSTRUCTION();
@@ -3367,14 +3350,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
CodeBlock* codeBlock = callFrame->codeBlock();
for (size_t count = codeBlock->m_numVars; i < count; ++i)
- callFrame[i] = jsUndefined();
-
- for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j)
- callFrame[i] = codeBlock->constantRegister(j);
+ callFrame->r(i) = jsUndefined();
int dst = (++vPC)->u.operand;
JSActivation* activation = new (globalData) JSActivation(callFrame, static_cast<FunctionBodyNode*>(codeBlock->ownerNode()));
- callFrame[dst] = activation;
+ callFrame->r(dst) = activation;
callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation));
++vPC;
@@ -3393,9 +3373,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int thisRegister = (++vPC)->u.operand;
- JSValue thisVal = callFrame[thisRegister].jsValue();
+ JSValue thisVal = callFrame->r(thisRegister).jsValue();
if (thisVal.needsThisConversion())
- callFrame[thisRegister] = JSValue(thisVal.toThisObject(callFrame));
+ callFrame->r(thisRegister) = JSValue(thisVal.toThisObject(callFrame));
++vPC;
NEXT_INSTRUCTION();
@@ -3410,7 +3390,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
This opcode should only be used at the beginning of a code
block.
*/
- callFrame[RegisterFile::ArgumentsRegister] = JSValue();
+ callFrame->r(RegisterFile::ArgumentsRegister) = JSValue();
++vPC;
NEXT_INSTRUCTION();
}
@@ -3425,7 +3405,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
if (!callFrame->optionalCalleeArguments()) {
Arguments* arguments = new (globalData) Arguments(callFrame);
callFrame->setCalleeArguments(arguments);
- callFrame[RegisterFile::ArgumentsRegister] = arguments;
+ callFrame->r(RegisterFile::ArgumentsRegister) = arguments;
}
++vPC;
NEXT_INSTRUCTION();
@@ -3452,7 +3432,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int proto = vPC[5].u.operand;
int thisRegister = vPC[6].u.operand;
- JSValue v = callFrame[func].jsValue();
+ JSValue v = callFrame->r(func).jsValue();
ConstructData constructData;
ConstructType constructType = v.getConstructData(constructData);
@@ -3463,14 +3443,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
CodeBlock* newCodeBlock = &functionBodyNode->bytecode(callDataScopeChain);
Structure* structure;
- JSValue prototype = callFrame[proto].jsValue();
+ JSValue prototype = callFrame->r(proto).jsValue();
if (prototype.isObject())
structure = asObject(prototype)->inheritorID();
else
structure = callDataScopeChain->globalObject()->emptyObjectStructure();
JSObject* newObject = new (globalData) JSObject(structure);
- callFrame[thisRegister] = JSValue(newObject); // "this" value
+ callFrame->r(thisRegister) = JSValue(newObject); // "this" value
CallFrame* previousCallFrame = callFrame;
@@ -3504,7 +3484,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
returnValue = constructData.native.function(newCallFrame, asObject(v), args);
}
CHECK_FOR_EXCEPTION();
- callFrame[dst] = JSValue(returnValue);
+ callFrame->r(dst) = JSValue(returnValue);
vPC += 7;
NEXT_INSTRUCTION();
@@ -3523,13 +3503,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = vPC[1].u.operand;
- if (LIKELY(callFrame[dst].jsValue().isObject())) {
+ if (LIKELY(callFrame->r(dst).jsValue().isObject())) {
vPC += 3;
NEXT_INSTRUCTION();
}
int override = vPC[2].u.operand;
- callFrame[dst] = callFrame[override];
+ callFrame->r(dst) = callFrame->r(override);
vPC += 3;
NEXT_INSTRUCTION();
@@ -3539,7 +3519,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int src = (++vPC)->u.operand;
int count = (++vPC)->u.operand;
- callFrame[dst] = concatenateStrings(callFrame, &callFrame->registers()[src], count);
+ callFrame->r(dst) = concatenateStrings(callFrame, &callFrame->registers()[src], count);
++vPC;
NEXT_INSTRUCTION();
@@ -3548,7 +3528,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int dst = (++vPC)->u.operand;
int src = (++vPC)->u.operand;
- callFrame[dst] = callFrame[src].jsValue().toPrimitive(callFrame);
+ callFrame->r(dst) = callFrame->r(src).jsValue().toPrimitive(callFrame);
++vPC;
NEXT_INSTRUCTION();
@@ -3561,11 +3541,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
are replaced by the result of toObject conversion of the scope.
*/
int scope = (++vPC)->u.operand;
- JSValue v = callFrame[scope].jsValue();
+ JSValue v = callFrame->r(scope).jsValue();
JSObject* o = v.toObject(callFrame);
CHECK_FOR_EXCEPTION();
- callFrame[scope] = JSValue(o);
+ callFrame->r(scope) = JSValue(o);
callFrame->setScopeChain(callFrame->scopeChain()->push(o));
++vPC;
@@ -3592,7 +3572,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int dst = (++vPC)->u.operand;
int base = (++vPC)->u.operand;
- callFrame[dst] = JSPropertyNameIterator::create(callFrame, callFrame[base].jsValue());
+ callFrame->r(dst) = JSPropertyNameIterator::create(callFrame, callFrame->r(base).jsValue());
++vPC;
NEXT_INSTRUCTION();
}
@@ -3609,10 +3589,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int iter = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- JSPropertyNameIterator* it = callFrame[iter].propertyNameIterator();
+ JSPropertyNameIterator* it = callFrame->r(iter).propertyNameIterator();
if (JSValue temp = it->next(callFrame)) {
CHECK_FOR_TIMEOUT();
- callFrame[dst] = JSValue(temp);
+ callFrame->r(dst) = JSValue(temp);
vPC += target;
NEXT_INSTRUCTION();
}
@@ -3668,7 +3648,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
ASSERT(exceptionValue);
ASSERT(!globalData->exception);
int ex = (++vPC)->u.operand;
- callFrame[ex] = exceptionValue;
+ callFrame->r(ex) = exceptionValue;
exceptionValue = JSValue();
++vPC;
@@ -3686,7 +3666,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int ex = (++vPC)->u.operand;
- exceptionValue = callFrame[ex].jsValue();
+ exceptionValue = callFrame->r(ex).jsValue();
handler = throwException(callFrame, exceptionValue, vPC - callFrame->codeBlock()->instructions().begin(), true);
if (!handler) {
@@ -3697,18 +3677,6 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
vPC = callFrame->codeBlock()->instructions().begin() + handler->target;
NEXT_INSTRUCTION();
}
- DEFINE_OPCODE(op_unexpected_load) {
- /* unexpected_load load dst(r) src(k)
-
- Copies constant src to register dst.
- */
- int dst = (++vPC)->u.operand;
- int src = (++vPC)->u.operand;
- callFrame[dst] = JSValue(callFrame->codeBlock()->unexpectedConstant(src));
-
- ++vPC;
- NEXT_INSTRUCTION();
- }
DEFINE_OPCODE(op_new_error) {
/* new_error dst(r) type(n) message(k)
@@ -3722,7 +3690,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int message = (++vPC)->u.operand;
CodeBlock* codeBlock = callFrame->codeBlock();
- callFrame[dst] = JSValue(Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message).toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()));
+ callFrame->r(dst) = JSValue(Error::create(callFrame, (ErrorType)type, callFrame->r(message).jsValue().toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()));
++vPC;
NEXT_INSTRUCTION();
@@ -3740,7 +3708,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
scopeChain->deref();
}
int result = (++vPC)->u.operand;
- return callFrame[result].jsValue();
+ return callFrame->r(result).jsValue();
}
DEFINE_OPCODE(op_put_getter) {
/* put_getter base(r) property(id) function(r)
@@ -3757,11 +3725,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int property = (++vPC)->u.operand;
int function = (++vPC)->u.operand;
- ASSERT(callFrame[base].jsValue().isObject());
- JSObject* baseObj = asObject(callFrame[base].jsValue());
+ ASSERT(callFrame->r(base).jsValue().isObject());
+ JSObject* baseObj = asObject(callFrame->r(base).jsValue());
Identifier& ident = callFrame->codeBlock()->identifier(property);
- ASSERT(callFrame[function].jsValue().isObject());
- baseObj->defineGetter(callFrame, ident, asObject(callFrame[function].jsValue()));
+ ASSERT(callFrame->r(function).jsValue().isObject());
+ baseObj->defineGetter(callFrame, ident, asObject(callFrame->r(function).jsValue()));
++vPC;
NEXT_INSTRUCTION();
@@ -3781,11 +3749,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int property = (++vPC)->u.operand;
int function = (++vPC)->u.operand;
- ASSERT(callFrame[base].jsValue().isObject());
- JSObject* baseObj = asObject(callFrame[base].jsValue());
+ ASSERT(callFrame->r(base).jsValue().isObject());
+ JSObject* baseObj = asObject(callFrame->r(base).jsValue());
Identifier& ident = callFrame->codeBlock()->identifier(property);
- ASSERT(callFrame[function].jsValue().isObject());
- baseObj->defineSetter(callFrame, ident, asObject(callFrame[function].jsValue()));
+ ASSERT(callFrame->r(function).jsValue().isObject());
+ baseObj->defineSetter(callFrame, ident, asObject(callFrame->r(function).jsValue()));
++vPC;
NEXT_INSTRUCTION();
@@ -3802,7 +3770,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int retAddrDst = (++vPC)->u.operand;
int target = (++vPC)->u.operand;
- callFrame[retAddrDst] = vPC + 1;
+ callFrame->r(retAddrDst) = vPC + 1;
vPC += target;
NEXT_INSTRUCTION();
@@ -3815,7 +3783,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
register, not as an immediate.
*/
int retAddrSrc = (++vPC)->u.operand;
- vPC = callFrame[retAddrSrc].vPC();
+ vPC = callFrame->r(retAddrSrc).vPC();
NEXT_INSTRUCTION();
}
DEFINE_OPCODE(op_debug) {
@@ -3842,7 +3810,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int function = vPC[1].u.operand;
if (*enabledProfilerReference)
- (*enabledProfilerReference)->willExecute(callFrame, callFrame[function].jsValue());
+ (*enabledProfilerReference)->willExecute(callFrame, callFrame->r(function).jsValue());
vPC += 2;
NEXT_INSTRUCTION();
@@ -3856,7 +3824,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
int function = vPC[1].u.operand;
if (*enabledProfilerReference)
- (*enabledProfilerReference)->didExecute(callFrame, callFrame[function].jsValue());
+ (*enabledProfilerReference)->didExecute(callFrame, callFrame->r(function).jsValue());
vPC += 2;
NEXT_INSTRUCTION();
@@ -3899,12 +3867,12 @@ JSValue Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* functio
ASSERT(codeBlock->codeType() == FunctionCode);
SymbolTable& symbolTable = codeBlock->symbolTable();
int argumentsIndex = symbolTable.get(functionCallFrame->propertyNames().arguments.ustring().rep()).getIndex();
- if (!functionCallFrame[argumentsIndex].arguments()) {
+ if (!functionCallFrame->r(argumentsIndex).arguments()) {
Arguments* arguments = new (callFrame) Arguments(functionCallFrame);
functionCallFrame->setCalleeArguments(arguments);
- functionCallFrame[RegisterFile::ArgumentsRegister] = arguments;
+ functionCallFrame->r(RegisterFile::ArgumentsRegister) = arguments;
}
- return functionCallFrame[argumentsIndex].jsValue();
+ return functionCallFrame->r(argumentsIndex).jsValue();
}
Arguments* arguments = functionCallFrame->optionalCalleeArguments();
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h
index 702c89c..fa6f7db 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h
@@ -45,7 +45,6 @@ namespace JSC {
class FunctionBodyNode;
class Instruction;
class InternalFunction;
- class AssemblerBuffer;
class JSFunction;
class JSGlobalObject;
class ProgramNode;
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
index 02cb09b..f1b22c0 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
@@ -275,7 +275,6 @@ void JIT::privateCompileMainPass()
DEFINE_OP(op_throw)
DEFINE_OP(op_to_jsnumber)
DEFINE_OP(op_to_primitive)
- DEFINE_OP(op_unexpected_load)
case op_get_array_length:
case op_get_by_id_chain:
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp
index dbcb34d..b669dfa 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp
@@ -505,13 +505,6 @@ void JIT::emit_op_jneq_ptr(Instruction* currentInstruction)
RECORD_JUMP_TARGET(target + 3);
}
-void JIT::emit_op_unexpected_load(Instruction* currentInstruction)
-{
- JSValue v = m_codeBlock->unexpectedConstant(currentInstruction[2].u.operand);
- move(ImmPtr(JSValue::encode(v)), regT0);
- emitPutVirtualRegister(currentInstruction[1].u.operand);
-}
-
void JIT::emit_op_jsr(Instruction* currentInstruction)
{
int retAddrDst = currentInstruction[1].u.operand;
@@ -759,7 +752,7 @@ void JIT::emit_op_new_error(Instruction* currentInstruction)
{
JITStubCall stubCall(this, JITStubs::cti_op_new_error);
stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
- stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->unexpectedConstant(currentInstruction[3].u.operand))));
+ stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->getConstant(currentInstruction[3].u.operand))));
stubCall.addArgument(Imm32(m_bytecodeIndex));
stubCall.call(currentInstruction[1].u.operand);
}
@@ -828,7 +821,7 @@ void JIT::emit_op_enter(Instruction*)
// Even though CTI doesn't use them, we initialize our constant
// registers to zap stale pointers, to avoid unnecessarily prolonging
// object lifetime and increasing GC pressure.
- size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters();
+ size_t count = m_codeBlock->m_numVars;
for (size_t j = 0; j < count; ++j)
emitInitRegister(j);
@@ -839,7 +832,7 @@ void JIT::emit_op_enter_with_activation(Instruction* currentInstruction)
// Even though CTI doesn't use them, we initialize our constant
// registers to zap stale pointers, to avoid unnecessarily prolonging
// object lifetime and increasing GC pressure.
- size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters();
+ size_t count = m_codeBlock->m_numVars;
for (size_t j = 0; j < count; ++j)
emitInitRegister(j);
diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
index 20d6694..769169b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
@@ -48,7 +48,7 @@
#include <sys/time.h>
#endif
-#if PLATFORM(UNIX)
+#if HAVE(SIGNAL_H)
#include <signal.h>
#endif
@@ -489,7 +489,9 @@ static NO_RETURN void printUsageStatement(JSGlobalData* globalData, bool help =
fprintf(stderr, " -f Specifies a source file (deprecated)\n");
fprintf(stderr, " -h|--help Prints this help message\n");
fprintf(stderr, " -i Enables interactive mode (default if no files are specified)\n");
+#if HAVE(SIGNAL_H)
fprintf(stderr, " -s Installs signal handlers that exit on a crash (Unix platforms only)\n");
+#endif
cleanupGlobalData(globalData);
exit(help ? EXIT_SUCCESS : EXIT_FAILURE);
@@ -524,7 +526,7 @@ static void parseArguments(int argc, char** argv, Options& options, JSGlobalData
continue;
}
if (strcmp(arg, "-s") == 0) {
-#if PLATFORM(UNIX)
+#if HAVE(SIGNAL_H)
signal(SIGILL, _exit);
signal(SIGFPE, _exit);
signal(SIGBUS, _exit);
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h
index d17da69..780a624 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h
@@ -39,6 +39,11 @@ namespace JSC {
return fastMalloc(size);
}
+ inline void ParserArenaDeletable::operator delete(void* p)
+ {
+ fastFree(p);
+ }
+
inline ParserArenaRefCounted::ParserArenaRefCounted(JSGlobalData* globalData)
{
globalData->parser->arena().derefWithArena(adoptRef(this));
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp
index ba6e1e0..105ceaf 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp
@@ -601,7 +601,7 @@ RegisterID* PostfixErrorNode::emitBytecode(BytecodeGenerator& generator, Registe
RegisterID* DeleteResolveNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
{
if (generator.registerFor(m_ident))
- return generator.emitUnexpectedLoad(generator.finalDestination(dst), false);
+ return generator.emitLoad(generator.finalDestination(dst), false);
generator.emitExpressionInfo(divot(), startOffset(), endOffset());
RegisterID* base = generator.emitResolveBase(generator.tempDestination(dst), m_ident);
@@ -636,7 +636,7 @@ RegisterID* DeleteValueNode::emitBytecode(BytecodeGenerator& generator, Register
generator.emitNode(generator.ignoredResult(), m_expr);
// delete on a non-location expression ignores the value and returns true
- return generator.emitUnexpectedLoad(generator.finalDestination(dst), true);
+ return generator.emitLoad(generator.finalDestination(dst), true);
}
// ------------------------------ VoidNode -------------------------------------
@@ -688,7 +688,7 @@ RegisterID* PrefixResolveNode::emitBytecode(BytecodeGenerator& generator, Regist
if (generator.isLocalConstant(m_ident)) {
if (dst == generator.ignoredResult())
return 0;
- RefPtr<RegisterID> r0 = generator.emitUnexpectedLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0);
+ RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0);
return generator.emitBinaryOp(op_add, r0.get(), local, r0.get(), OperandTypes());
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h
index a9f88b7..34b4497 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h
@@ -109,6 +109,8 @@ namespace JSC {
// Objects created with this version of new are not deleted when the arena is deleted.
// Other arrangements must be made.
void* operator new(size_t);
+
+ void operator delete(void*);
};
class ParserArenaRefCounted : public RefCounted<ParserArenaRefCounted> {
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp
index 8996629..3bef263 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp
@@ -40,7 +40,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSActivation);
const ClassInfo JSActivation::info = { "JSActivation", 0, 0, 0 };
JSActivation::JSActivation(CallFrame* callFrame, PassRefPtr<FunctionBodyNode> functionBody)
- : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame))
+ : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame->registers()))
{
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp
index d5c4ee4..ff728e8 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -59,14 +59,14 @@ using namespace WTF;
namespace JSC {
-extern const HashTable arrayTable;
-extern const HashTable jsonTable;
-extern const HashTable dateTable;
-extern const HashTable mathTable;
-extern const HashTable numberTable;
-extern const HashTable regExpTable;
-extern const HashTable regExpConstructorTable;
-extern const HashTable stringTable;
+extern JSC_CONST_HASHTABLE HashTable arrayTable;
+extern JSC_CONST_HASHTABLE HashTable jsonTable;
+extern JSC_CONST_HASHTABLE HashTable dateTable;
+extern JSC_CONST_HASHTABLE HashTable mathTable;
+extern JSC_CONST_HASHTABLE HashTable numberTable;
+extern JSC_CONST_HASHTABLE HashTable regExpTable;
+extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable;
+extern JSC_CONST_HASHTABLE HashTable stringTable;
struct VPtrSet {
VPtrSet();
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp
index 3f3fab9..798013a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp
@@ -124,9 +124,9 @@ LiteralParser::TokenType LiteralParser::Lexer::lex(LiteralParserToken& token)
return TokError;
}
-static inline bool isSafeStringCharacter(UChar c)
+template <LiteralParser::ParserMode mode> static inline bool isSafeStringCharacter(UChar c)
{
- return (c >= ' ' && c <= 0xff && c != '\\' && c != '"') || c == '\t';
+ return (c >= ' ' && (mode == LiteralParser::StrictJSON || c <= 0xff) && c != '\\' && c != '"') || c == '\t';
}
template <LiteralParser::ParserMode mode> LiteralParser::TokenType LiteralParser::Lexer::lexString(LiteralParserToken& token)
@@ -136,7 +136,7 @@ template <LiteralParser::ParserMode mode> LiteralParser::TokenType LiteralParser
token.stringToken = UString();
do {
runStart = m_ptr;
- while (m_ptr < m_end && isSafeStringCharacter(*m_ptr))
+ while (m_ptr < m_end && isSafeStringCharacter<mode>(*m_ptr))
++m_ptr;
if (runStart < m_ptr)
token.stringToken.append(runStart, m_ptr - runStart);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h
index 3b7353d..167f2bc 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h
@@ -29,6 +29,13 @@
#include <stdio.h>
#include <wtf/Assertions.h>
+// Bug #26843: Work around Metrowerks compiler bug
+#if COMPILER(WINSCW)
+#define JSC_CONST_HASHTABLE
+#else
+#define JSC_CONST_HASHTABLE const
+#endif
+
namespace JSC {
// Hash table generated by the create_hash_table script.
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp
index 857a316..7dd4a8f 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 1999-2001, 2004 Harri Porten (porten@kde.org)
* Copyright (c) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -110,7 +111,7 @@ void RegExp::compile(JSGlobalData* globalData)
#endif
}
-int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector)
+int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
{
if (startOffset < 0)
startOffset = 0;
@@ -126,16 +127,20 @@ int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector)
if (m_regExpBytecode) {
#endif
int offsetVectorSize = (m_numSubpatterns + 1) * 3; // FIXME: should be 2 - but adding temporary fallback to pcre.
- int* offsetVector = new int [offsetVectorSize];
+ int* offsetVector;
+ Vector<int, 32> nonReturnedOvector;
+ if (ovector) {
+ ovector->resize(offsetVectorSize);
+ offsetVector = ovector->data();
+ } else {
+ nonReturnedOvector.resize(offsetVectorSize);
+ offsetVector = nonReturnedOvector.data();
+ }
+
ASSERT(offsetVector);
for (int j = 0; j < offsetVectorSize; ++j)
offsetVector[j] = -1;
- OwnArrayPtr<int> nonReturnedOvector;
- if (!ovector)
- nonReturnedOvector.set(offsetVector);
- else
- ovector->set(offsetVector);
#if ENABLE(YARR_JIT)
int result = Yarr::executeRegex(m_regExpJITCode, s.data(), startOffset, s.size(), offsetVector, offsetVectorSize);
@@ -177,7 +182,7 @@ void RegExp::compile(JSGlobalData* globalData)
m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(m_pattern.data()), m_pattern.size(), ignoreCaseOption, multilineOption, &m_numSubpatterns, &m_constructionError);
}
-int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector)
+int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
{
if (startOffset < 0)
startOffset = 0;
@@ -190,17 +195,19 @@ int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector)
#if ENABLE(WREC)
if (m_wrecFunction) {
int offsetVectorSize = (m_numSubpatterns + 1) * 2;
- int* offsetVector = new int [offsetVectorSize];
+ int* offsetVector;
+ Vector<int, 32> nonReturnedOvector;
+ if (ovector) {
+ ovector->resize(offsetVectorSize);
+ offsetVector = ovector->data();
+ } else {
+ nonReturnedOvector.resize(offsetVectorSize);
+ offsetVector = nonReturnedOvector.data();
+ }
ASSERT(offsetVector);
for (int j = 0; j < offsetVectorSize; ++j)
offsetVector[j] = -1;
- OwnArrayPtr<int> nonReturnedOvector;
- if (!ovector)
- nonReturnedOvector.set(offsetVector);
- else
- ovector->set(offsetVector);
-
int result = m_wrecFunction(s.data(), startOffset, s.size(), offsetVector);
if (result < 0) {
@@ -226,8 +233,8 @@ int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector)
offsetVector = fixedSizeOffsetVector;
} else {
offsetVectorSize = (m_numSubpatterns + 1) * 3;
- offsetVector = new int [offsetVectorSize];
- ovector->set(offsetVector);
+ ovector->resize(offsetVectorSize);
+ offsetVector = ovector->data();
}
int numMatches = jsRegExpExecute(m_regExp, reinterpret_cast<const UChar*>(s.data()), s.size(), startOffset, offsetVector, offsetVectorSize);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h
index f3be656..24d4199 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -53,7 +54,7 @@ namespace JSC {
bool isValid() const { return !m_constructionError; }
const char* errorMessage() const { return m_constructionError; }
- int match(const UString&, int startOffset, OwnArrayPtr<int>* ovector = 0);
+ int match(const UString&, int startOffset, Vector<int, 32>* ovector = 0);
unsigned numSubpatterns() const { return m_numSubpatterns; }
private:
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp
index bcd0d07..e468521 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2003, 2007, 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -93,14 +94,21 @@ struct RegExpConstructorPrivate {
RegExpConstructorPrivate()
: lastNumSubPatterns(0)
, multiline(false)
+ , lastOvectorIndex(0)
{
}
+ const Vector<int, 32>& lastOvector() const { return ovector[lastOvectorIndex]; }
+ Vector<int, 32>& lastOvector() { return ovector[lastOvectorIndex]; }
+ Vector<int, 32>& tempOvector() { return ovector[lastOvectorIndex ? 0 : 1]; }
+ void changeLastOvector() { lastOvectorIndex = lastOvectorIndex ? 0 : 1; }
+
UString input;
UString lastInput;
- OwnArrayPtr<int> lastOvector;
- unsigned lastNumSubPatterns : 31;
+ Vector<int, 32> ovector[2];
+ unsigned lastNumSubPatterns : 30;
bool multiline : 1;
+ unsigned lastOvectorIndex : 1;
};
RegExpConstructor::RegExpConstructor(ExecState* exec, PassRefPtr<Structure> structure, RegExpPrototype* regExpPrototype)
@@ -121,20 +129,19 @@ RegExpConstructor::RegExpConstructor(ExecState* exec, PassRefPtr<Structure> stru
*/
void RegExpConstructor::performMatch(RegExp* r, const UString& s, int startOffset, int& position, int& length, int** ovector)
{
- OwnArrayPtr<int> tmpOvector;
- position = r->match(s, startOffset, &tmpOvector);
+ position = r->match(s, startOffset, &d->tempOvector());
if (ovector)
- *ovector = tmpOvector.get();
+ *ovector = d->tempOvector().data();
if (position != -1) {
- ASSERT(tmpOvector);
+ ASSERT(!d->tempOvector().isEmpty());
- length = tmpOvector[1] - tmpOvector[0];
+ length = d->tempOvector()[1] - d->tempOvector()[0];
d->input = s;
d->lastInput = s;
- d->lastOvector.set(tmpOvector.release());
+ d->changeLastOvector();
d->lastNumSubPatterns = r->numSubpatterns();
}
}
@@ -147,8 +154,8 @@ RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate
d->lastInput = data->lastInput;
d->lastNumSubPatterns = data->lastNumSubPatterns;
unsigned offsetVectorSize = (data->lastNumSubPatterns + 1) * 2; // only copying the result part of the vector
- d->lastOvector.set(new int[offsetVectorSize]);
- memcpy(d->lastOvector.get(), data->lastOvector.get(), offsetVectorSize * sizeof(int));
+ d->lastOvector().resize(offsetVectorSize);
+ memcpy(d->lastOvector().data(), data->lastOvector().data(), offsetVectorSize * sizeof(int));
// d->multiline is not needed, and remains uninitialized
setLazyCreationData(d);
@@ -167,13 +174,13 @@ void RegExpMatchesArray::fillArrayInstance(ExecState* exec)
unsigned lastNumSubpatterns = d->lastNumSubPatterns;
for (unsigned i = 0; i <= lastNumSubpatterns; ++i) {
- int start = d->lastOvector[2 * i];
+ int start = d->lastOvector()[2 * i];
if (start >= 0)
- JSArray::put(exec, i, jsSubstring(exec, d->lastInput, start, d->lastOvector[2 * i + 1] - start));
+ JSArray::put(exec, i, jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start));
}
PutPropertySlot slot;
- JSArray::put(exec, exec->propertyNames().index, jsNumber(exec, d->lastOvector[0]), slot);
+ JSArray::put(exec, exec->propertyNames().index, jsNumber(exec, d->lastOvector()[0]), slot);
JSArray::put(exec, exec->propertyNames().input, jsString(exec, d->input), slot);
delete d;
@@ -187,10 +194,10 @@ JSObject* RegExpConstructor::arrayOfMatches(ExecState* exec) const
JSValue RegExpConstructor::getBackref(ExecState* exec, unsigned i) const
{
- if (d->lastOvector && i <= d->lastNumSubPatterns) {
- int start = d->lastOvector[2 * i];
+ if (!d->lastOvector().isEmpty() && i <= d->lastNumSubPatterns) {
+ int start = d->lastOvector()[2 * i];
if (start >= 0)
- return jsSubstring(exec, d->lastInput, start, d->lastOvector[2 * i + 1] - start);
+ return jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start);
}
return jsEmptyString(exec);
}
@@ -199,25 +206,25 @@ JSValue RegExpConstructor::getLastParen(ExecState* exec) const
{
unsigned i = d->lastNumSubPatterns;
if (i > 0) {
- ASSERT(d->lastOvector);
- int start = d->lastOvector[2 * i];
+ ASSERT(!d->lastOvector().isEmpty());
+ int start = d->lastOvector()[2 * i];
if (start >= 0)
- return jsSubstring(exec, d->lastInput, start, d->lastOvector[2 * i + 1] - start);
+ return jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start);
}
return jsEmptyString(exec);
}
JSValue RegExpConstructor::getLeftContext(ExecState* exec) const
{
- if (d->lastOvector)
- return jsSubstring(exec, d->lastInput, 0, d->lastOvector[0]);
+ if (!d->lastOvector().isEmpty())
+ return jsSubstring(exec, d->lastInput, 0, d->lastOvector()[0]);
return jsEmptyString(exec);
}
JSValue RegExpConstructor::getRightContext(ExecState* exec) const
{
- if (d->lastOvector)
- return jsSubstring(exec, d->lastInput, d->lastOvector[1], d->lastInput.size() - d->lastOvector[1]);
+ if (!d->lastOvector().isEmpty())
+ return jsSubstring(exec, d->lastInput, d->lastOvector()[1], d->lastInput.size() - d->lastOvector()[1]);
return jsEmptyString(exec);
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp
index d6939cb..ceb6b1e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -575,7 +576,7 @@ JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue t
}
int pos = 0;
while (i != limit && pos < s.size()) {
- OwnArrayPtr<int> ovector;
+ Vector<int, 32> ovector;
int mpos = reg->match(s, pos, &ovector);
if (mpos < 0)
break;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
index c65ba85..d6850e6 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
@@ -1526,10 +1526,6 @@ inline void TCMalloc_PageHeap::Delete(Span* span) {
// necessary. We do not bother resetting the stale pagemap
// entries for the pieces we are merging together because we only
// care about the pagemap entries for the boundaries.
- //
- // Note that the spans we merge into "span" may come out of
- // a "returned" list. For simplicity, we move these into the
- // "normal" list of the appropriate size class.
const PageID p = span->start;
const Length n = span->length;
Span* prev = GetDescriptor(p-1);
@@ -1560,10 +1556,19 @@ inline void TCMalloc_PageHeap::Delete(Span* span) {
Event(span, 'D', span->length);
span->free = 1;
- if (span->length < kMaxPages) {
- DLL_Prepend(&free_[span->length].normal, span);
- } else {
- DLL_Prepend(&large_.normal, span);
+#if TCMALLOC_TRACK_DECOMMITED_SPANS
+ if (span->decommitted) {
+ if (span->length < kMaxPages)
+ DLL_Prepend(&free_[span->length].returned, span);
+ else
+ DLL_Prepend(&large_.returned, span);
+ } else
+#endif
+ {
+ if (span->length < kMaxPages)
+ DLL_Prepend(&free_[span->length].normal, span);
+ else
+ DLL_Prepend(&large_.normal, span);
}
free_pages_ += n;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h
index 9e13cf9..61ebe32 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h
@@ -179,6 +179,13 @@ WTF_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); }
WTF_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); }
WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); }
WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); }
+
+#if PLATFORM(WINCE)
+WTF_PRIVATE_INLINE void* operator new(size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); }
+WTF_PRIVATE_INLINE void operator delete(void* p, const std::nothrow_t&) throw() { fastFree(p); }
+WTF_PRIVATE_INLINE void* operator new[](size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); }
+WTF_PRIVATE_INLINE void operator delete[](void* p, const std::nothrow_t&) throw() { fastFree(p); }
+#endif
#endif
#endif // _CRTDBG_MAP_ALLOC
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h
index d664c67..990670d 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h
@@ -176,28 +176,28 @@ namespace WTF {
}
template<typename Value, typename HashFunctions, typename Traits>
- template<typename T, typename Translator>
+ template<typename T, typename HashTranslator>
typename HashSet<Value, HashFunctions, Traits>::iterator
inline HashSet<Value, HashFunctions, Traits>::find(const T& value)
{
- typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter;
+ typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
return m_impl.template find<T, Adapter>(value);
}
template<typename Value, typename HashFunctions, typename Traits>
- template<typename T, typename Translator>
+ template<typename T, typename HashTranslator>
typename HashSet<Value, HashFunctions, Traits>::const_iterator
inline HashSet<Value, HashFunctions, Traits>::find(const T& value) const
{
- typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter;
+ typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
return m_impl.template find<T, Adapter>(value);
}
template<typename Value, typename HashFunctions, typename Traits>
- template<typename T, typename Translator>
+ template<typename T, typename HashTranslator>
inline bool HashSet<Value, HashFunctions, Traits>::contains(const T& value) const
{
- typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter;
+ typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
return m_impl.template contains<T, Adapter>(value);
}
@@ -208,11 +208,11 @@ namespace WTF {
}
template<typename Value, typename HashFunctions, typename Traits>
- template<typename T, typename Translator>
+ template<typename T, typename HashTranslator>
pair<typename HashSet<Value, HashFunctions, Traits>::iterator, bool>
HashSet<Value, HashFunctions, Traits>::add(const T& value)
{
- typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter;
+ typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
return m_impl.template addPassingHashCode<T, T, Adapter>(value, value);
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h
index 6cd8bdd..6d91a54 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,6 +30,7 @@
#if PLATFORM(WIN)
typedef struct HBITMAP__* HBITMAP;
typedef struct HBRUSH__* HBRUSH;
+typedef struct HDC__* HDC;
typedef struct HFONT__* HFONT;
typedef struct HPALETTE__* HPALETTE;
typedef struct HPEN__* HPEN;
@@ -47,6 +49,7 @@ namespace WTF {
#if PLATFORM(WIN)
void deleteOwnedPtr(HBITMAP);
void deleteOwnedPtr(HBRUSH);
+ void deleteOwnedPtr(HDC);
void deleteOwnedPtr(HFONT);
void deleteOwnedPtr(HPALETTE);
void deleteOwnedPtr(HPEN);
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp
index b08d7dc..67a32ff 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009 Torch Mobile, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,6 +43,12 @@ void deleteOwnedPtr(HBRUSH ptr)
DeleteObject(ptr);
}
+void deleteOwnedPtr(HDC ptr)
+{
+ if (ptr)
+ DeleteDC(ptr);
+}
+
void deleteOwnedPtr(HFONT ptr)
{
if (ptr)
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index c82d1f7..5e37e09 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -27,11 +27,11 @@
#define WTF_Platform_h
/* PLATFORM handles OS, operating environment, graphics API, and CPU */
-#define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE)
-#define COMPILER(WTF_FEATURE) (defined( WTF_COMPILER_##WTF_FEATURE ) && WTF_COMPILER_##WTF_FEATURE)
-#define HAVE(WTF_FEATURE) (defined( HAVE_##WTF_FEATURE ) && HAVE_##WTF_FEATURE)
-#define USE(WTF_FEATURE) (defined( WTF_USE_##WTF_FEATURE ) && WTF_USE_##WTF_FEATURE)
-#define ENABLE(WTF_FEATURE) (defined( ENABLE_##WTF_FEATURE ) && ENABLE_##WTF_FEATURE)
+#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
+#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)
+#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
+#define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
+#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
/* Operating systems - low-level dependencies */
@@ -402,6 +402,10 @@
#endif
#endif /* !defined(HAVE_ACCESSIBILITY) */
+#if PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
+#define HAVE_SIGNAL_H 1
+#endif
+
#if PLATFORM(DARWIN)
#define HAVE_ERRNO_H 1
@@ -549,6 +553,7 @@
#endif
#endif
+#if ENABLE(JIT)
#ifndef ENABLE_JIT_OPTIMIZE_CALL
#define ENABLE_JIT_OPTIMIZE_CALL 1
#endif
@@ -564,6 +569,7 @@
#ifndef ENABLE_JIT_OPTIMIZE_METHOD_CALLS
#define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1
#endif
+#endif
#if PLATFORM(X86) && COMPILER(MSVC)
#define JSC_HOST_CALL __fastcall
@@ -630,7 +636,7 @@
/* Accelerated compositing */
#if PLATFORM(MAC)
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+#if !defined(BUILDING_ON_TIGER)
#define WTF_USE_ACCELERATED_COMPOSITING 1
#endif
#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h b/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h
index 477e893..f4527df 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Google 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
@@ -42,9 +42,20 @@ namespace WTF {
void setFlag(FlagEnum flagNumber) { ASSERT(flagNumber < 2); m_ptrAndFlags |= (1 << flagNumber);}
void clearFlag(FlagEnum flagNumber) { ASSERT(flagNumber < 2); m_ptrAndFlags &= ~(1 << flagNumber);}
T* get() const { return reinterpret_cast<T*>(m_ptrAndFlags & ~3); }
- void set(T* ptr) { ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3)); m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3);}
+ void set(T* ptr)
+ {
+ ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3));
+ m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3);
+#ifndef NDEBUG
+ m_leaksPtr = ptr;
+#endif
+ }
+
private:
intptr_t m_ptrAndFlags;
+#ifndef NDEBUG
+ void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced.
+#endif
};
} // namespace WTF
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp
index 9509388..d75c17a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp
@@ -148,6 +148,7 @@
#include <wtf/AlwaysInline.h>
#include <wtf/Assertions.h>
#include <wtf/FastMalloc.h>
+#include <wtf/Vector.h>
#include <wtf/Threading.h>
#include <stdio.h>
@@ -255,6 +256,8 @@ typedef union { double d; uint32_t L[2]; } U;
#define Big0 (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1))
#define Big1 0xffffffff
+
+// FIXME: we should remove non-Pack_32 mode since it is unused and unmaintained
#ifndef Pack_32
#define Pack_32
#endif
@@ -278,25 +281,41 @@ typedef union { double d; uint32_t L[2]; } U;
#define Kmax 15
struct BigInt {
- BigInt() : sign(0), wds(0) { }
- BigInt(const BigInt& other) : sign(other.sign), wds(other.wds)
+ BigInt() : sign(0) { }
+ int sign;
+
+ void clear()
+ {
+ sign = 0;
+ m_words.clear();
+ }
+
+ size_t size() const
+ {
+ return m_words.size();
+ }
+
+ void resize(size_t s)
{
- for (int i = 0; i < 64; ++i)
- x[i] = other.x[i];
+ m_words.resize(s);
+ }
+
+ uint32_t* words()
+ {
+ return m_words.data();
}
- BigInt& operator=(const BigInt& other)
+ const uint32_t* words() const
{
- sign = other.sign;
- wds = other.wds;
- for (int i = 0; i < 64; ++i)
- x[i] = other.x[i];
- return *this;
+ return m_words.data();
}
- int sign;
- int wds;
- uint32_t x[64];
+ void append(uint32_t w)
+ {
+ m_words.append(w);
+ }
+
+ Vector<uint32_t, 16> m_words;
};
static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */
@@ -307,8 +326,8 @@ static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */
uint32_t carry;
#endif
- int wds = b.wds;
- uint32_t* x = b.x;
+ int wds = b.size();
+ uint32_t* x = b.words();
int i = 0;
carry = a;
do {
@@ -331,10 +350,8 @@ static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */
#endif
} while (++i < wds);
- if (carry) {
- b.x[wds++] = (uint32_t)carry;
- b.wds = wds;
- }
+ if (carry)
+ b.append((uint32_t)carry);
}
static void s2b(BigInt& b, const char* s, int nd0, int nd, uint32_t y9)
@@ -346,12 +363,12 @@ static void s2b(BigInt& b, const char* s, int nd0, int nd, uint32_t y9)
for (k = 0, y = 1; x > y; y <<= 1, k++) { }
#ifdef Pack_32
b.sign = 0;
- b.x[0] = y9;
- b.wds = 1;
+ b.resize(1);
+ b.words()[0] = y9;
#else
b.sign = 0;
- b.x[0] = y9 & 0xffff;
- b.wds = (b->x[1] = y9 >> 16) ? 2 : 1;
+ b.resize((b->x[1] = y9 >> 16) ? 2 : 1);
+ b.words()[0] = y9 & 0xffff;
#endif
int i = 9;
@@ -440,8 +457,8 @@ static int lo0bits (uint32_t* y)
static void i2b(BigInt& b, int i)
{
b.sign = 0;
- b.x[0] = i;
- b.wds = 1;
+ b.resize(1);
+ b.words()[0] = i;
}
static void mult(BigInt& aRef, const BigInt& bRef)
@@ -459,23 +476,24 @@ static void mult(BigInt& aRef, const BigInt& bRef)
uint32_t carry, z;
#endif
- if (a->wds < b->wds) {
+ if (a->size() < b->size()) {
const BigInt* tmp = a;
a = b;
b = tmp;
}
- wa = a->wds;
- wb = b->wds;
+ wa = a->size();
+ wb = b->size();
wc = wa + wb;
+ c.resize(wc);
- for (xc = c.x, xa = xc + wc; xc < xa; xc++)
+ for (xc = c.words(), xa = xc + wc; xc < xa; xc++)
*xc = 0;
- xa = a->x;
+ xa = a->words();
xae = xa + wa;
- xb = b->x;
+ xb = b->words();
xbe = xb + wb;
- xc0 = c.x;
+ xc0 = c.words();
#ifdef USE_LONG_LONG
for (; xb < xbe; xc0++) {
if ((y = *xb++)) {
@@ -537,8 +555,8 @@ static void mult(BigInt& aRef, const BigInt& bRef)
}
#endif
#endif
- for (xc0 = c.x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) { }
- c.wds = wc;
+ for (xc0 = c.words(), xc = xc0 + wc; wc > 0 && !*--xc; --wc) { }
+ c.resize(wc);
aRef = c;
}
@@ -617,14 +635,20 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k)
int n = k >> 4;
#endif
- int n1 = n + b.wds + 1;
+ int origSize = b.size();
+ int n1 = n + origSize + 1;
+
+ if (k &= 0x1f)
+ b.resize(b.size() + n + 1);
+ else
+ b.resize(b.size() + n);
- const uint32_t* srcStart = b.x;
- uint32_t* dstStart = b.x;
- const uint32_t* src = srcStart + b.wds - 1;
+ const uint32_t* srcStart = b.words();
+ uint32_t* dstStart = b.words();
+ const uint32_t* src = srcStart + origSize - 1;
uint32_t* dst = dstStart + n1 - 1;
#ifdef Pack_32
- if (k &= 0x1f) {
+ if (k) {
uint32_t hiSubword = 0;
int s = 32 - k;
for (; src >= srcStart; --src) {
@@ -633,7 +657,8 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k)
}
*dst = hiSubword;
ASSERT(dst == dstStart + n);
- b.wds = b.wds + n + (b.x[n1 - 1] != 0);
+
+ b.resize(origSize + n + (b.words()[n1 - 1] != 0));
}
#else
if (k &= 0xf) {
@@ -652,10 +677,11 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k)
do {
*--dst = *src--;
} while (src >= srcStart);
- b.wds = b.wds + n;
}
for (dst = dstStart + n; dst != dstStart; )
*--dst = 0;
+
+ ASSERT(b.size() <= 1 || b.words()[b.size() - 1]);
}
static int cmp(const BigInt& a, const BigInt& b)
@@ -663,15 +689,15 @@ static int cmp(const BigInt& a, const BigInt& b)
const uint32_t *xa, *xa0, *xb, *xb0;
int i, j;
- i = a.wds;
- j = b.wds;
- ASSERT(i <= 1 || a.x[i - 1]);
- ASSERT(j <= 1 || b.x[j - 1]);
+ i = a.size();
+ j = b.size();
+ ASSERT(i <= 1 || a.words()[i - 1]);
+ ASSERT(j <= 1 || b.words()[j - 1]);
if (i -= j)
return i;
- xa0 = a.x;
+ xa0 = a.words();
xa = xa0 + j;
- xb0 = b.x;
+ xb0 = b.words();
xb = xb0 + j;
for (;;) {
if (*--xa != *--xb)
@@ -692,8 +718,8 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef
i = cmp(*a, *b);
if (!i) {
c.sign = 0;
- c.wds = 1;
- c.x[0] = 0;
+ c.resize(1);
+ c.words()[0] = 0;
return;
}
if (i < 0) {
@@ -704,15 +730,16 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef
} else
i = 0;
- c.wds = 0;
- c.sign = i;
- wa = a->wds;
- const uint32_t* xa = a->x;
+ wa = a->size();
+ const uint32_t* xa = a->words();
const uint32_t* xae = xa + wa;
- wb = b->wds;
- const uint32_t* xb = b->x;
+ wb = b->size();
+ const uint32_t* xb = b->words();
const uint32_t* xbe = xb + wb;
- xc = c.x;
+
+ c.resize(wa);
+ c.sign = i;
+ xc = c.words();
#ifdef USE_LONG_LONG
unsigned long long borrow = 0;
do {
@@ -757,7 +784,7 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef
#endif
while (!*--xc)
wa--;
- c.wds = wa;
+ c.resize(wa);
}
static double ulp(U *x)
@@ -804,8 +831,8 @@ static double b2d(const BigInt& a, int* e)
#define d0 word0(&d)
#define d1 word1(&d)
- xa0 = a.x;
- xa = xa0 + a.wds;
+ xa0 = a.words();
+ xa = xa0 + a.size();
y = *--xa;
ASSERT(y);
k = hi0bits(y);
@@ -860,11 +887,11 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits)
b.sign = 0;
#ifdef Pack_32
- b.wds = 1;
+ b.resize(1);
#else
- b.wds = 2;
+ b.resize(2);
#endif
- x = b.x;
+ x = b.words();
z = d0 & Frac_mask;
d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
@@ -881,17 +908,21 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits)
z >>= k;
} else
x[0] = y;
+ if (z) {
+ b.resize(2);
+ x[1] = z;
+ }
+
#ifndef Sudden_Underflow
- i =
+ i = b.size();
#endif
- b.wds = (x[1] = z) ? 2 : 1;
} else {
k = lo0bits(&z);
x[0] = z;
#ifndef Sudden_Underflow
- i =
+ i = 1;
#endif
- b.wds = 1;
+ b.resize(1);
k += 32;
}
#else
@@ -929,7 +960,7 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits)
k += 32;
} while (!x[i])
--i;
- b->wds = i + 1;
+ b->resize(i + 1);
#endif
#ifndef Sudden_Underflow
if (de) {
@@ -958,9 +989,9 @@ static double ratio(const BigInt& a, const BigInt& b)
dval(&da) = b2d(a, &ka);
dval(&db) = b2d(b, &kb);
#ifdef Pack_32
- k = ka - kb + 32 * (a.wds - b.wds);
+ k = ka - kb + 32 * (a.size() - b.size());
#else
- k = ka - kb + 16 * (a.wds - b.wds);
+ k = ka - kb + 16 * (a.size() - b.size());
#endif
if (k > 0)
word0(&da) += k * Exp_msk1;
@@ -1452,12 +1483,12 @@ undfl:
#endif
) {
#ifdef SET_INEXACT
- if (!delta->x[0] && delta->wds <= 1)
+ if (!delta->words()[0] && delta->size() <= 1)
inexact = 0;
#endif
break;
}
- if (!delta.x[0] && delta.wds <= 1) {
+ if (!delta.words()[0] && delta.size() <= 1) {
/* exact result */
#ifdef SET_INEXACT
inexact = 0;
@@ -1700,7 +1731,7 @@ ret:
static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
{
- int n;
+ size_t n;
uint32_t *bx, *bxe, q, *sx, *sxe;
#ifdef USE_LONG_LONG
unsigned long long borrow, carry, y, ys;
@@ -1710,14 +1741,16 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
uint32_t si, z, zs;
#endif
#endif
+ ASSERT(b.size() <= 1 || b.words()[b.size() - 1]);
+ ASSERT(S.size() <= 1 || S.words()[S.size() - 1]);
- n = S.wds;
- ASSERT_WITH_MESSAGE(b.wds <= n, "oversize b in quorem");
- if (b.wds < n)
+ n = S.size();
+ ASSERT_WITH_MESSAGE(b.size() <= n, "oversize b in quorem");
+ if (b.size() < n)
return 0;
- sx = S.x;
+ sx = S.words();
sxe = sx + --n;
- bx = b.x;
+ bx = b.words();
bxe = bx + n;
q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
ASSERT_WITH_MESSAGE(q <= 9, "oversized quotient in quorem");
@@ -1752,18 +1785,18 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
#endif
} while (sx <= sxe);
if (!*bxe) {
- bx = b.x;
+ bx = b.words();
while (--bxe > bx && !*bxe)
--n;
- b.wds = n;
+ b.resize(n);
}
}
if (cmp(b, S) >= 0) {
q++;
borrow = 0;
carry = 0;
- bx = b.x;
- sx = S.x;
+ bx = b.words();
+ sx = S.words();
do {
#ifdef USE_LONG_LONG
ys = *sx++ + carry;
@@ -1791,12 +1824,12 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
#endif
#endif
} while (sx <= sxe);
- bx = b.x;
+ bx = b.words();
bxe = bx + n;
if (!*bxe) {
while (--bxe > bx && !*bxe)
--n;
- b.wds = n;
+ b.resize(n);
}
}
return q;
@@ -2027,7 +2060,8 @@ void dtoa(char* result, double dd, int ndigits, int* decpt, int* sign, char** rv
dval(&eps) = (ieps * dval(&u)) + 7.;
word0(&eps) -= (P - 1) * Exp_msk1;
if (ilim == 0) {
- S = mhi = BigInt();
+ S.clear();
+ mhi.clear();
dval(&u) -= 5.;
if (dval(&u) > dval(&eps))
goto one_digit;
@@ -2090,7 +2124,8 @@ fast_failed:
/* Yes. */
ds = tens[k];
if (ndigits < 0 && ilim <= 0) {
- S = mhi = BigInt();
+ S.clear();
+ mhi.clear();
if (ilim < 0 || dval(&u) <= 5 * ds)
goto no_digits;
goto one_digit;
@@ -2132,7 +2167,8 @@ bump_up:
m2 = b2;
m5 = b5;
- mhi = mlo = BigInt();
+ mhi.clear();
+ mlo.clear();
if (leftright) {
i =
#ifndef Sudden_Underflow
@@ -2186,10 +2222,10 @@ bump_up:
* can do shifts and ors to compute the numerator for q.
*/
#ifdef Pack_32
- if ((i = ((s5 ? 32 - hi0bits(S.x[S.wds - 1]) : 1) + s2) & 0x1f))
+ if ((i = ((s5 ? 32 - hi0bits(S.words()[S.size() - 1]) : 1) + s2) & 0x1f))
i = 32 - i;
#else
- if ((i = ((s5 ? 32 - hi0bits(S.x[S.wds - 1]) : 1) + s2) & 0xf))
+ if ((i = ((s5 ? 32 - hi0bits(S.words()[S.size() - 1]) : 1) + s2) & 0xf))
i = 16 - i;
#endif
if (i > 4) {
@@ -2252,7 +2288,7 @@ bump_up:
goto ret;
}
if (j < 0 || (j == 0 && !(word1(&u) & 1))) {
- if (!b.x[0] && b.wds <= 1) {
+ if (!b.words()[0] && b.size() <= 1) {
#ifdef SET_INEXACT
inexact = 0;
#endif
@@ -2287,7 +2323,7 @@ round_9_up:
} else
for (i = 1;; i++) {
*s++ = dig = quorem(b,S) + '0';
- if (!b.x[0] && b.wds <= 1) {
+ if (!b.words()[0] && b.size() <= 1) {
#ifdef SET_INEXACT
inexact = 0;
#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
index 29a9d18..65c53cf 100644
--- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
@@ -1292,6 +1292,7 @@ class RegexGenerator : private MacroAssembler {
#if PLATFORM(X86_64)
push(X86::ebp);
move(stackPointerRegister, X86::ebp);
+ push(X86::ebx);
#elif PLATFORM(X86)
push(X86::ebp);
move(stackPointerRegister, X86::ebp);
@@ -1319,6 +1320,7 @@ class RegexGenerator : private MacroAssembler {
void generateReturn()
{
#if PLATFORM(X86_64)
+ pop(X86::ebx);
pop(X86::ebp);
#elif PLATFORM(X86)
pop(X86::esi);
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 730c023..fc32632 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -1,11 +1,11 @@
This is a snapshot of the Qt port of WebKit from
- git://code.staikos.net/webkit
+ git://gitorious.org/qtwebkit/qtwebkit.git
The commit imported was from the
- qtwebkit-4.6-snapshot-29062009 branch/tag
+ qtwebkit-4.6-snapshot-13072009 branch/tag
and has the sha1 checksum
- 22aadba1b4356ad7d8e9446b95baccb6b2c037b0
+ b2abc0c271880b8135507861056af497f895adf5
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 8991528..35640c5 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,5488 @@
+2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed make dist build fix.
+
+ * GNUmakefile.am:
+
+2009-07-13 Cédric Luthi <cedric.luthi@gmail.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix NPWindow clip rect in PluginViewMac
+
+ The rect should be in window-coordinates. This bug can be observed
+ with Flash 10 here: http://www.permadi.com/tutorial/cursorTracker/
+
+ * plugins/mac/PluginViewMac.cpp:
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix Qt implementation of WebCore::directoryName to return the absolute
+ directory name instead of the base file name.
+
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::directoryName):
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix WebCore::Path::isEmpty() for the Qt port to return true
+ if there is no element in the path.
+
+ QPainterPath::isEmpty() returns also true if there is one single
+ MoveTo element inside, which makes sense but doesn't patch Webcore's
+ is-empty definition.
+
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::isEmpty): Use elementCount() == 0.
+
+2009-07-13 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream fixes to NPV8Object.cpp that make ~30 layout tests pass.
+ https://bugs.webkit.org/show_bug.cgi?id=27127
+
+ There were a number of bugs introduced during the last upstreaming
+ effort that broke around 30 layout tests. This fixes those bugs.
+ It also has compile fixes to match the recent cutting apart of
+ V8Proxy.
+
+ * bindings/v8/NPV8Object.cpp:
+ (freeV8NPObject):
+ (npCreateV8ScriptObject):
+ (NPN_Invoke):
+ (NPN_InvokeDefault):
+ (NPN_EvaluateHelper):
+ (NPN_SetException):
+ (NPN_Construct):
+
+2009-07-13 Mads Ager <ager@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix memory leak in the V8 binding layer.
+ https://bugs.webkit.org/show_bug.cgi?id=27163
+
+ Reinitializing the context is not necessary when clearing the proxy for navigation
+ and it will lead us to hold on to an empty context for each frame.
+
+ Test for empty context instead of empty global object handle when
+ updating the document for a context.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::updateDocument):
+
+2009-07-13 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Correct the logic to determine if a V8 callback returns a value.
+ https://bugs.webkit.org/show_bug.cgi?id=27155
+
+ * bindings/v8/custom/V8CustomVoidCallback.cpp:
+ (WebCore::invokeCallback):
+ - Don't crash if result.IsEmpty().
+
+2009-07-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
+ https://bugs.webkit.org/show_bug.cgi?id=26932
+
+ Initial IDL definition and bindings for SharedWorkers.
+
+ * Configurations/FeatureDefines.xcconfig:
+ Added new files for SharedWorker support.
+ * DerivedSources.make:
+ Added new files for SharedWorker support.
+ * GNUmakefile.am:
+ Added new files for SharedWorker support.
+ * WebCore.gypi:
+ Added new files for SharedWorker support.
+ * WebCore.pro:
+ Added new files for SharedWorker support.
+ * WebCore.xcodeproj/project.pbxproj:
+ Added new files for SharedWorker support.
+ * bindings/js/JSAbstractWorkerCustom.cpp: Added.
+ (WebCore::JSAbstractWorker::mark):
+ Custom mark handler that marks the event listeners.
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ (WebCore::JSAbstractWorker::toJS):
+ Custom toJS handler which differentiates between various subclasses.
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::sharedWorker):
+ SharedWorker constructor (only enabled when SHARED_WORKERS is
+ enabled).
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ Added support for converting to/from SharedWorkers.
+ * bindings/js/JSSharedWorkerConstructor.cpp: Added.
+ (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
+ (WebCore::constructSharedWorker):
+ (WebCore::JSSharedWorkerConstructor::getConstructData):
+ * bindings/js/JSSharedWorkerConstructor.h: Added.
+ (WebCore::JSSharedWorkerConstructor::classInfo):
+ * bindings/js/JSSharedWorkerCustom.cpp: Added.
+ (WebCore::JSSharedWorker::mark):
+ Custom mark function that marks the internal MessagePort.
+ * bindings/v8/DOMObjectsInclude.h:
+ Updated to include new header files.
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Added.
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ V8 handlers for add/removeEventListener().
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ Custom constructor for SharedWorker.
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toSharedWorker):
+ * dom/EventTarget.h:
+ * page/DOMWindow.idl:
+ * workers/AbstractWorker.cpp: Added.
+ (WebCore::AbstractWorker::AbstractWorker):
+ Common base class for SharedWorker and (soon) Worker. The functions below were copied from Worker.cpp.
+ This is the first step in refactoring Worker to derive from AbstractWorker to enable code sharing.
+ (WebCore::AbstractWorker::~AbstractWorker):
+ (WebCore::AbstractWorker::addEventListener):
+ (WebCore::AbstractWorker::removeEventListener):
+ (WebCore::AbstractWorker::dispatchEvent):
+ (WebCore::AbstractWorker::dispatchLoadErrorEvent):
+ (WebCore::AbstractWorker::dispatchScriptErrorEvent):
+ * workers/AbstractWorker.h: Added.
+ Definitions of functionality shared by Worker.h and SharedWorker.h. In a future patch, Worker will derive from AbstractWorker.
+ (WebCore::AbstractWorker::scriptExecutionContext):
+ (WebCore::AbstractWorker::setOnerror):
+ (WebCore::AbstractWorker::onerror):
+ (WebCore::AbstractWorker::eventListeners):
+ (WebCore::AbstractWorker::refEventTarget):
+ (WebCore::AbstractWorker::derefEventTarget):
+ * workers/AbstractWorker.idl: Added.
+ * workers/SharedWorker.cpp: Added.
+ (WebCore::SharedWorker::SharedWorker):
+ (WebCore::SharedWorker::~SharedWorker):
+ * workers/SharedWorker.h: Added.
+ (WebCore::SharedWorker::create):
+ (WebCore::SharedWorker::port):
+ (WebCore::SharedWorker::toSharedWorker):
+ * workers/SharedWorker.idl: Added.
+
+2009-07-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Cleanup - Remove prf install target
+ https://bugs.webkit.org/show_bug.cgi?id=27191
+
+ qtwebkit.prf has been removed; this cleans up the related
+ install target as well.
+
+ * WebCore.pro: Remove prf install target
+
+2009-07-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Facebook Chat is broken due to XSS auditor
+ https://bugs.webkit.org/show_bug.cgi?id=27179
+
+ Instead of just using the script's URL as to detect an XSS attack, we
+ now use a bit of context before the URL. In particular, we use the
+ bytes from the beginning of the attribute name to the end of the
+ attribute value. In virtually all injection attacks, the attacker
+ would need to supply the attribute name as well as the attribute value.
+ However, in the Facebook false positive, the attribute name is not
+ present in the URL.
+
+ Tests: http/tests/security/xssAuditor/script-tag-src-redirect-safe.html
+ http/tests/security/xssAuditor/script-tag-with-source-double-quote.html
+ http/tests/security/xssAuditor/script-tag-with-source-no-quote.html
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::parseTag):
+ * html/HTMLTokenizer.h:
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ * page/XSSAuditor.h:
+
+2009-07-12 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Refactor ConsoleMessage to add MessageType attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=20625
+
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::printErrorMessage):
+ * dom/Document.cpp:
+ (WebCore::Document::reportException):
+ (WebCore::Document::addMessage):
+ * dom/Document.h:
+ * dom/ScriptExecutionContext.h:
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::reportErrorToConsole):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addMessageToConsole):
+ (WebCore::InspectorController::startGroup):
+ (WebCore::InspectorController::endGroup):
+ (WebCore::InspectorController::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorController::addStartProfilingMessageToConsole):
+ (WebCore::InspectorController::count):
+ * inspector/InspectorController.h:
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype.addMessage):
+ (WebInspector.ConsoleMessage): Added type property.
+ (WebInspector.ConsoleMessage.prototype.toMessageElement):
+ (WebInspector.ConsoleMessage.prototype.toString):
+ (WebInspector.ConsoleMessage.prototype.isEqual):
+ (WebInspector.ConsoleCommandResult):
+ (WebInspector.ConsoleGroup.prototype.addMessage):
+ (WebInspector.ConsoleGroup.prototype._titleClicked):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.prototype._addTip):
+ (WebInspector.Resource.prototype._checkWarning):
+ * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title"
+ * inspector/front-end/inspector.js:
+ (WebInspector.addMessageToConsole):
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::printAccessDeniedMessage):
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::addMessageToConsole):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::reportLocalLoadFailed):
+ (WebCore::FrameLoader::shouldAllowNavigation):
+ * page/ChromeClient.h:
+ * page/Console.cpp:
+ (WebCore::printMessageSourceAndLevelPrefix):
+ (WebCore::Console::addMessage):
+ (WebCore::Console::error):
+ (WebCore::Console::log):
+ (WebCore::Console::dir):
+ (WebCore::Console::trace):
+ (WebCore::Console::assertCondition):
+ (WebCore::Console::timeEnd):
+ (WebCore::Console::warn):
+ * page/Console.h: Added MessageType enum.
+ (WebCore::):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::postMessageTimerFired):
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::reportWarning):
+ (WebCore::SVGDocumentExtensions::reportError):
+ * wml/WMLErrorHandling.cpp:
+ (WebCore::reportWMLError):
+ * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument.
+ (WebCore::GenericWorkerTask8::create):
+ (WebCore::GenericWorkerTask8::GenericWorkerTask8):
+ (WebCore::GenericWorkerTask8::performTask):
+ (WebCore::createCallbackTask):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::addMessage):
+ (WebCore::WorkerContext::importScripts):
+ * workers/WorkerContext.h:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::postConsoleMessageTask):
+ (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerObjectProxy.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::reportUnsafeUsage):
+ (WebCore::XMLHttpRequest::didFinishLoading):
+ * xml/XSLTProcessor.cpp:
+ (WebCore::XSLTProcessor::parseErrorFunc):
+
+2009-07-12 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27132
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * dom/HTMLAllCollection.idl: Added.
+
+2009-07-12 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Inspector: Duplicate Computation in Autocompletion
+ https://bugs.webkit.org/show_bug.cgi?id=26778
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype._completionsReady):
+
+2009-07-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27196
+ Rename bidi.cpp to RenderBlockLineLayout.cpp and remove bidi.h
+
+ * GNUmakefile.am: Updated.
+ * WebCore.gypi: Updated.
+ * WebCore.pro: Updated.
+ * WebCore.vcproj/WebCore.vcproj: Updated.
+ * WebCore.xcodeproj/project.pbxproj: Updated.
+ * WebCoreSources.bkl: Updated.
+ * rendering/RenderBlock.h: Removed unnecessary forward declaration and
+ updated comments.
+ * rendering/RenderBlockLineLayout.cpp: Copied from WebCore/rendering/bidi.cpp.
+ Removed unnecessary #include statements.
+ (WebCore::BidiRun::BidiRun): Moved here from bidi.h.
+ (WebCore::RenderBlock::layoutInlineChildren): Removed outdated comment.
+ * rendering/bidi.cpp: Removed.
+ * rendering/bidi.h: Removed.
+
+2009-07-12 Dan Bernstein <mitz@apple.com>
+
+ - Windows build fix
+
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::dataChanged):
+
+2009-07-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Image cleanup
+
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor
+ instead of the m_data member.
+ (WebCore::BitmapImage::dataChanged): Ditto.
+ * platform/graphics/Image.h: Re-ordered #includes and class
+ declarations. Removed the drawPatternCallback() declaration. Made member
+ variables private.
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::drawPatternCallback): Changed this from a member function to a
+ static function.
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor
+ instead of the m_data member.
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged): Ditto.
+
+2009-07-12 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27189
+
+ Fixes insufficient check in XSSAuditor::canSetBaseElementURL that caused
+ XSSAuditor to incorrectly block HTML Base elements whose base path coincided
+ with the URL of the page.
+
+ Test: http/tests/security/xssAuditor/base-href-safe3.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canSetBaseElementURL): Changed conditional to only call
+ XSSAuditor::findInRequest() if the host in the page URL disagrees with the host
+ in the base element URL.
+
+2009-07-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Text searching with ICU should take the user's default locale into account
+ https://bugs.webkit.org/show_bug.cgi?id=27184
+ rdar://problem/6812121
+
+ No simple way to test this since it's dependent on user locale.
+ After this, the user's default locale is used only on Mac.
+
+ * editing/TextIterator.cpp:
+ (WebCore::createSearcher): Pass result of the currentSearchLocaleID
+ function as the locale.
+
+ * platform/text/TextBreakIteratorInternalICU.h: Added declaration of
+ currentSearchLocaleID function.
+
+ * platform/text/android/TextBreakIteratorInternalICU.cpp:
+ (WebCore::currentSearchLocaleID): Added. Returns the empty string.
+ * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
+ (WebCore::currentSearchLocaleID): Ditto.
+ * platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp:
+ (WebCore::currentSearchLocaleID): Ditto.
+
+ * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
+ (WebCore::textBreakLocalePreference): Added. Returns the value of
+ the AppleTextBreakLocale preference.
+ (WebCore::topLanguagePreference): Added. Returns the value of the
+ first item in the AppleLanguages preference.
+ (WebCore::canonicalLanguageIdentifier): Added. Cover for the
+ CFLocaleCreateCanonicalLanguageIdentifierFromString function.
+ (WebCore::getLocale): Added. Transfers the locale from a CFStringRef
+ into a buffer.
+ (WebCore::getSearchLocale): Added. Calls topLanguagePreference,
+ canonicalLanguageIdentifier, and getLocale.
+ (WebCore::currentSearchLocaleID): Added. Calls getSearchLocale once.
+ (WebCore::getTextBreakLocale): Changed to call
+ textBreakLocalePreference, topLanguagePreference,
+ canonicalLanguageIdentifier, and getLocale.
+
+ * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
+ (WebCore::currentSearchLocaleID): Added. Returns the empty string.
+ * platform/wx/TemporaryLinkStubs.cpp:
+ (WebCore::currentSearchLocaleID): Ditto.
+
+2009-07-12 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Create a PangoLayout that properly represents the visual
+ appearance of the text in the web page so that the line boundary
+ modes of getText{At,Before,After}Offset work correctly.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (UTF16ToUTF8):
+ (g_substr):
+ (convertUniCharToUTF8):
+ (getPangoLayoutForAtk):
+
+2009-07-11 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Bug 27187 - Match Gecko behaviour for canvas path mutation APIs on an empty path
+ <https://bugs.webkit.org/show_bug.cgi?id=27187>
+
+ Simple API change, check for the empty path and add appropriate point if necessary.
+
+ Test: fast/canvas/canvas-modify-emptyPath.html
+
+ * Info.plist:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::lineTo):
+ (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
+ (WebCore::CanvasRenderingContext2D::bezierCurveTo):
+
+2009-07-11 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ HTMLMediaElement.canPlayType "maybe" and "probably" reversed
+ https://bugs.webkit.org/show_bug.cgi?id=27186
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ Return "probably" if type has codecs parameter.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ Ditto.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ Ditto.
+
+2009-07-11 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ A worker-thread inspired follow-up for:
+ https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
+ REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR
+ is running on a worker thread. Accessing the global Cache data structures from a non-main thread is
+ not currently supported.
+
+2009-07-11 Simon Fraser <simon.fraser@apple.com>
+
+ Enable support for accelerated compositing and 3d transforms on Leopard.
+ <https://bugs.webkit.org/show_bug.cgi?id=20166>
+ <rdar://problem/6120614>
+
+ Reviewed by Oliver Hunt.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-11 Simon Hausmann <hausmann@webkit.org>
+
+ Fix the Qt build after r45724.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
+
+2009-07-10 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26921
+
+ Implements support for HTML entities, so XSSAuditor can protect against attacks
+ encoded with HTML entities.
+
+ Tests: http/tests/security/xssAuditor/inline-event-HTML-entities.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities.html
+ http/tests/security/xssAuditor/link-onclick-entities.html
+ http/tests/security/xssAuditor/script-tag-entities.html
+ http/tests/security/xssAuditor/script-tag-with-source-entities.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::decodeURL): Modified to call WebCore::XSSAuditor::decodeHTMLEntities
+ to decode HTML entities.
+ (WebCore::XSSAuditor::decodeHTMLEntities): Added method to decode HTML entities.
+ (WebCore::XSSAuditor::findInRequest):
+ * page/XSSAuditor.h:
+
+2009-07-10 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27007: Build fixes when ICONDATABASE is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27007>
+
+ Reviewed by Sam Weinig.
+
+ * WebCore.xcodeproj/project.pbxproj: Added IconDatabaseNone.cpp
+ to the project.
+ * loader/icon/IconDatabase.cpp: Added
+ #if ENABLE(ICONDATABASE)/#endif macro guard.
+ * loader/icon/IconDatabase.h: Removed three public methods from
+ #if ENABLE(ICONDATABASE)/#endif macro so that they may be
+ stubbed out in IconDatabaseNone.cpp.
+ * loader/icon/IconDatabaseNone.cpp: Added
+ #if !ENABLE(ICONDATABASE)/#endif macro guard.
+ (WebCore::IconDatabase::importIconURLForPageURL): Added.
+ (WebCore::IconDatabase::importIconDataForIconURL): Added.
+ (WebCore::IconDatabase::shouldStopThreadActivity): Added.
+
+2009-07-10 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27151
+
+ Fixes issue where JavaScript URLs that contain null- and non-null control characters can
+ bypass XSSAuditor.
+
+ Tests: http/tests/security/xssAuditor/javascript-link-control-char.html
+ http/tests/security/xssAuditor/javascript-link-null-char.html
+ http/tests/security/xssAuditor/javascript-link.html
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): Separated out logic for JavaScript URLs from
+ inline scripts. For JavaScript URLs, calls XSSAuditor::canEvaluateJavaScriptURL.
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): Made similar changes to evaluate() as in
+ bindings/js/ScriptController.cpp.
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Separated out logic for JavaScript URLs
+ into its own method.
+ * page/XSSAuditor.h:
+
+2009-07-10 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ WebKit needs a style linting tool
+ https://bugs.webkit.org/show_bug.cgi?id=25884
+
+ Fix bunch of style issues by autofix of cpplint.
+ This patch is created to demonstrate the autofix of cpplint.py.
+
+ No new testcases because it's a style fix
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseMediaQuery):
+ (WebCore::CSSParser::validUnit):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::skipCommaInDashboardRegion):
+ (WebCore::CSSParser::parseDashboardRegions):
+ (WebCore::ShadowParseContext::commitValue):
+ (WebCore::ShadowParseContext::commitLength):
+ (WebCore::ShadowParseContext::commitColor):
+ (WebCore::BorderImageParseContext::commitNumber):
+ (WebCore::BorderImageParseContext::commitWidth):
+ (WebCore::BorderImageParseContext::commitRule):
+ (WebCore::BorderImageParseContext::commitBorderImage):
+ (WebCore::CSSParser::lex):
+ (WebCore::CSSParser::text):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/MediaList.cpp:
+ (WebCore::MediaList::deleteMedium):
+ * css/MediaQuery.h:
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::parseAspectRatio):
+ * css/MediaQueryEvaluator.h:
+ * css/MediaQueryExp.h:
+ (WebCore::MediaQueryExp::operator==):
+ * css/WebKitCSSMatrix.h:
+ * dom/Comment.h:
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * dom/Document.h:
+ (WebCore::Document::setHasDashboardRegions):
+ * dom/DocumentFragment.cpp:
+ (WebCore::DocumentFragment::nodeName):
+ * dom/DocumentFragment.h:
+ * dom/DynamicNodeList.h:
+ * dom/EditingText.h:
+ * dom/Element.cpp:
+ (WebCore::Element::dispatchAttrAdditionEvent):
+ * dom/NamedAttrMap.cpp:
+ (WebCore::NamedNodeMap::item):
+ * dom/Node.cpp:
+ (WebCore::Node::nodeValue):
+ (WebCore::Node::nodeIndex):
+ * dom/NodeRareData.h:
+ (WebCore::NodeListsNodeData::create):
+ * dom/Notation.h:
+ * dom/ProcessingInstruction.h:
+ * dom/Range.cpp:
+ (WebCore::Range::processContents):
+ * dom/StyledElement.cpp:
+ (WebCore::toHex):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
+ (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
+ (WebCore::PendingCallbacks::):
+ (WebCore::OffsetBuffer::readOutBytes):
+ (WebCore::handleElementNamespaces):
+ (WebCore::handleElementAttributes):
+ (WebCore::attributesStartElementNsHandler):
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::attributesStartElementNsHandler):
+ (WebCore::XMLTokenizer::parseStartElement):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::applyInlineStyle):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::removeNode):
+ * editing/Editor.cpp:
+ (WebCore::Editor::pasteAsPlainText):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::directionOfEnclosingBlock):
+ * editing/SmartReplaceICU.cpp:
+ (WebCore::addAllCodePoints):
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::icon):
+ (WebCore::HistoryItem::adoptVisitCounts):
+ * html/CanvasStyle.cpp:
+ (WebCore::CanvasStyle::applyFillColor):
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::setActive):
+ (WebCore::HTMLAnchorElement::isLiveLink):
+ * html/HTMLAppletElement.h:
+ * html/HTMLAudioElement.h:
+ * html/HTMLBRElement.h:
+ * html/HTMLBaseElement.h:
+ * html/HTMLBaseFontElement.h:
+ * html/HTMLDListElement.h:
+ * html/HTMLDirectoryElement.h:
+ * html/HTMLFieldSetElement.cpp:
+ (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::reset):
+ * html/HTMLHRElement.cpp:
+ (WebCore::HTMLHRElement::parseMappedAttribute):
+ * html/HTMLHeadElement.h:
+ * html/HTMLHtmlElement.h:
+ * html/HTMLImageElement.h:
+ (WebCore::HTMLImageElement::setLoadManually):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::selection):
+ * html/HTMLIsIndexElement.h:
+ * html/HTMLMarqueeElement.cpp:
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::):
+ * html/HTMLMenuElement.h:
+ * html/HTMLMetaElement.h:
+ * html/HTMLModElement.h:
+ * html/HTMLOListElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::childrenChanged):
+ * html/HTMLParamElement.h:
+ * html/HTMLQuoteElement.h:
+ * html/HTMLStyleElement.h:
+ * html/HTMLTableCaptionElement.h:
+ * html/HTMLTableCellElement.h:
+ * html/HTMLTableColElement.h:
+ * html/HTMLTableSectionElement.cpp:
+ (WebCore::HTMLTableSectionElement::deleteRow):
+ * html/HTMLTitleElement.h:
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::parseNonHTMLText):
+ (WebCore::HTMLTokenizer::parseEntity):
+ (WebCore::HTMLTokenizer::parseTag):
+ (WebCore::HTMLTokenizer::write):
+ * html/HTMLUListElement.h:
+ * html/HTMLVideoElement.h:
+ * html/TimeRanges.h:
+ (WebCore::TimeRanges::Range::Range):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::enableResourceTracking):
+ (WebCore::InspectorController::disableResourceTracking):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::newInspectorJSONObject):
+ * page/Console.cpp:
+ (WebCore::Console::addMessage):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::selectCursor):
+ (WebCore::EventHandler::defaultKeyboardEventHandler):
+ * page/Frame.cpp:
+ (WebCore::Frame::jsDefaultStatusBarText):
+ * page/android/DragControllerAndroid.cpp:
+ (WebCore::DragController::dragOperation):
+ * page/android/EventHandlerAndroid.cpp:
+ (WebCore::EventHandler::tabsToAllControls):
+ (WebCore::EventHandler::eventActivatedView):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/gtk/DragControllerGtk.cpp:
+ (WebCore::DragController::dragOperation):
+ * page/qt/DragControllerQt.cpp:
+ * page/win/DragControllerWin.cpp:
+ (WebCore::DragController::isCopyKeyDown):
+ * page/win/FrameWin.h:
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::mouseEventOffsetToThumb):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::setVerticalAlignLength):
+ (WebCore::InheritedFlags::setUnicodeBidi):
+ (WebCore::InheritedFlags::setCursor):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+ * rendering/style/SVGRenderStyleDefs.h:
+ * rendering/style/StyleInheritedData.h:
+ (WebCore::StyleInheritedData::operator!=):
+ * storage/DatabaseTask.h:
+ * svg/GradientAttributes.h:
+ * svg/LinearGradientAttributes.h:
+ * svg/PatternAttributes.h:
+ * svg/RadialGradientAttributes.h:
+ * svg/SVGAnimatedPathData.h:
+ * svg/SVGAnimatedPoints.h:
+ * svg/SVGAnimationElement.h:
+ * svg/SVGClipPathElement.h:
+ * svg/SVGElementInstance.h:
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::build):
+ * svg/SVGFEBlendElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::build):
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::build):
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::build):
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::build):
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::build):
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFEFloodElement.cpp:
+ (WebCore::SVGFEFloodElement::build):
+ * svg/SVGFEFloodElement.h:
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::build):
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::build):
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::build):
+ * svg/SVGFEOffsetElement.cpp:
+ (WebCore::SVGFEOffsetElement::build):
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::build):
+ * svg/SVGFESpotLightElement.h:
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::build):
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::parseMappedAttribute):
+ * svg/SVGList.h:
+ * svg/SVGListTraits.h:
+ (WebCore::):
+ * svg/SVGMPathElement.h:
+ * svg/SVGMetadataElement.h:
+ * svg/SVGParserUtilities.cpp:
+ (WebCore::SVGPathParser::parseSVG):
+ (WebCore::SVGPathParser::calculateArc):
+ * svg/SVGPathElement.h:
+ * svg/SVGPathSegClosePath.h:
+ * svg/SVGSVGElement.h:
+ * svg/SVGSetElement.h:
+ * svg/SVGSwitchElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::parseMappedAttribute):
+ * svg/SVGTextPathElement.h:
+ * svg/SVGTitleElement.h:
+ * svg/SVGTransformable.cpp:
+ (WebCore::):
+ * svg/SVGViewSpec.cpp:
+ (WebCore::):
+ * svg/animation/SMILTime.cpp:
+ (WebCore::operator+):
+ (WebCore::operator-):
+ (WebCore::operator*):
+ * svg/animation/SVGSMILElement.h:
+ * svg/graphics/SVGResource.cpp:
+ (WebCore::clientMap):
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::value):
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::value):
+ * workers/WorkerRunLoop.cpp:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::dropProtection):
+ * xml/XPathPath.h:
+
+2009-07-10 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7049066>.
+ Update SnowLeopard media controller layout.
+
+ * css/mediaControlsQT.css:
+ Update for new layout.
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::movieLoadType):
+ Added to replace isStreaming.
+ * html/HTMLMediaElement.h:
+ Declare movieLoadType, remove isStreaming.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlStatusDisplayElement::update):
+ Use movieLoadType instead of isStreaming.
+ (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
+ MediaControlElement is the base class, not HTMLInputElement.
+ (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded):
+ Ditto.
+ (WebCore::MediaControlRewindButtonElement::rendererIsNeeded):
+ Don't display rewind button for live streams.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded):
+ MediaControlInputElement is the base class, not HTMLInputElement.
+ * rendering/MediaControlElements.h:
+
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::getMediaUIPartStateFlags):
+ New, return wkDrawMediaUIPart flags.
+ (WebCore::RenderThemeMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeMac::paintMediaMuteButton):
+ (WebCore::RenderThemeMac::paintMediaPlayButton):
+ (WebCore::RenderThemeMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeMac::paintMediaSliderThumb):
+ (WebCore::RenderThemeMac::paintMediaRewindButton):
+ (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
+ (WebCore::RenderThemeMac::paintMediaControlsBackground):
+ (WebCore::RenderThemeMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeMac::paintMediaTimeRemaining):
+ Use getMediaUIPartStateFlags.
+
+2009-07-10 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19562
+ Added build stuff and stub for the ValidityState class, part of HTML5
+ section Forms:
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
+
+ Test: fast/forms/ValidityState-001.html
+
+ * DerivedSources.cpp: Fix aimed to include ValidityState files
+ * DerivedSources.make: ditto
+ * GNUmakefile.am: ditto
+ * WebCore.gypi: ditto
+ * WebCore.pro: ditto
+ * WebCore.vcproj/WebCore.vcproj: ditto
+ * WebCore.xcodeproj/project.pbxproj: ditto
+ * WebCoreSources.bkl: ditto
+ * html/HTMLButtonElement.idl: "validity" attribute
+ * html/HTMLFieldSetElement.idl: ditto
+ * html/HTMLFormControlElement.cpp: object getter
+ (WebCore::HTMLFormControlElement::validity):
+ * html/HTMLFormControlElement.h: ditto
+ * html/HTMLInputElement.idl: "validity" attribute
+ * html/HTMLSelectElement.idl: ditto
+ * html/HTMLTextAreaElement.idl: ditto
+ * html/ValidityState.cpp: Added.
+ (WebCore::ValidityState::ValidityState):
+ (WebCore::ValidityState::valid): validation flag
+ * html/ValidityState.h: Added.
+ (WebCore::ValidityState::create): creation routine
+ (WebCore::ValidityState::control): ValidityState's parent getter
+ (WebCore::ValidityState::valueMissing): validation flag
+ (WebCore::ValidityState::typeMismatch): ditto
+ (WebCore::ValidityState::patternMismatch): ditto
+ (WebCore::ValidityState::tooLong): ditto
+ (WebCore::ValidityState::rangeUnderflow): ditto
+ (WebCore::ValidityState::rangeOverflow): ditto
+ (WebCore::ValidityState::stepMismatch): ditto
+ (WebCore::ValidityState::customError): ditto
+ * html/ValidityState.idl: Added.
+
+2009-07-10 Brady Eidson <beidson@apple.com>
+
+ Style cleanup over my last patch.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::~XMLHttpRequest):
+
+2009-07-10 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ * inspector/JavaScriptCallFrame.cpp:
+ (WebCore::JavaScriptCallFrame::dynamicGlobalObject):
+ * inspector/JavaScriptCallFrame.h: New helper method, used below.
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::detach): In the special case
+ where we detach from a window currently executing JavaScript,
+ manually tear down our representation of the JavaScript
+ call stack, since we won't get any more callbacks from JavaScriptCore
+ to automatically tear it down. It's too bad that WebCore is
+ responsible for this kind of tracking -- in the future, it would
+ be nice if more of the breakpoint handling was inside of JavaScriptCore.
+
+2009-07-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
+ REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
+
+ With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected.
+ When that happened, the first request that was over the limit ended up in a bizarre state where it
+ wasn't fully serviced until after the long running XHR was complete.
+
+ Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache
+ resources - such as XHR - could still end up causing this limit to be exceeded.
+
+ This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will
+ handle this at the resource handle level.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::nonCacheRequestInFlight):
+ (WebCore::Loader::nonCacheRequestComplete):
+ (WebCore::Loader::Host::Host):
+ (WebCore::Loader::Host::nonCacheRequestInFlight):
+ (WebCore::Loader::Host::nonCacheRequestComplete):
+ (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account.
+ * loader/loader.h:
+ (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::XMLHttpRequest):
+ (WebCore::XMLHttpRequest::~XMLHttpRequest):
+ (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count.
+ (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified.
+ (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
+
+2009-07-10 Antti Koivisto <antti@apple.com>
+
+ Try to unbreak non-Mac build.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::formDidFocus):
+ (WebCore::ChromeClient::formDidBlur):
+
+2009-07-10 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ The rest of the fix for <rdar://problem/7038831> REGRESSION (TOT):
+ In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after
+ clicking To Do's close box
+
+ Make the Widget* in passMouseDownEventToWidget() a RefPtr.
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::passMouseDownEventToWidget):
+
+2009-07-10 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ rename getDOMStructure calls w/o JSGlobalObject* to deprecatedGetDOMStructure
+ https://bugs.webkit.org/show_bug.cgi?id=27157
+
+ This is the first step to fixing
+ https://bugs.webkit.org/show_bug.cgi?id=27088
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::deprecatedGetDOMStructure):
+ (WebCore::createDOMObjectWrapper):
+ (WebCore::createDOMNodeWrapper):
+ * bindings/js/JSNamedNodesCollection.cpp:
+ (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
+ * bindings/js/JSRGBColor.cpp:
+ (WebCore::JSRGBColor::JSRGBColor):
+ * bridge/objc/objc_runtime.mm:
+ (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::RuntimeArray):
+ * bridge/runtime_method.cpp:
+ (JSC::RuntimeMethod::RuntimeMethod):
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::RuntimeObjectImp):
+
+2009-07-10 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Add delegate methods about focus and blur and state change
+ https://bugs.webkit.org/show_bug.cgi?id=27153
+
+ Call the appropriate new ChromeClient methods for focus and blur.
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::dispatchFocusEvent):
+ (WebCore::HTMLFormControlElement::dispatchBlurEvent):
+ * html/HTMLFormControlElement.h:
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::formDidFocus):
+ (WebCore::EmptyChromeClient::formDidBlur):
+ * page/ChromeClient.h:
+
+2009-07-10 Steve Falkenburg <sfalken@apple.com>
+
+ <rdar://problem/7048741> REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave
+
+ Use altered search path while loading plug-ins. This modifies the DLL search order
+ to look in the directory containing the plug-in even if a call to SetDllDirectory
+ was previously made. Use of SetDllDirectory removes the current directory from the search path,
+ breaking the previous strategy for locating any dependent DLLs of the plug-in.
+
+ Reviewed by Jon Honeycutt.
+
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
+
+2009-07-10 Adam Roben <aroben@apple.com>
+
+ Sort all our Xcode projects
+
+ Accomplished using sort-Xcode-project-file.
+
+ Requested by Dave Kilzer.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-07-10 Adam Langley <agl@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Chromium Linux: use disabled images for disabled widgets.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27106
+
+ Previously, checkboxes and radio controls rendered the same even if disabled.
+ The Chromium side of this change is r20224.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+ (WebCore::RenderThemeChromiumSkia::paintRadio):
+
+2009-07-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fix crash when changing the zoom level in http://iphone.akamai.com/
+ <rdar://problem/7029077>
+
+ RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(),
+ which could potentially destroy that compositing layer, causing a crash.
+ Prevent this from happening by not doing a compositing update from paintIntoLayer().
+
+ The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(),
+ and still does the compositing update. The new updateLayerListsIfNeeded() does not touch
+ compositing layers, and is still called from paintIntoLayer().
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+ (WebCore::RenderLayer::hitTestLayer):
+ (WebCore::RenderLayer::updateLayerListsIfNeeded):
+ (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
+ * rendering/RenderLayer.h:
+
+2009-07-10 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Darin Adler.
+
+ Need to remove UsesManualToJSImplementation() in favor of CustomToJS.
+ https://bugs.webkit.org/show_bug.cgi?id=27010
+
+ Added support for CustomToJS IDL attribute to replace the hard-coded class list in UsesManualToJSImplementation().
+
+ This is just a cleanup of existing functionality, so existing LayoutTests adequately cover this patch.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Removed UsesManualToJSImplementation(), added support for CustomToJS attribute.
+ * css/CSSRule.idl:
+ * css/CSSValue.idl:
+ * css/StyleSheet.idl:
+ * dom/Document.idl:
+ * dom/Event.idl:
+ * dom/Node.idl:
+ * html/ImageData.idl:
+ * svg/SVGElementInstance.idl:
+ * svg/SVGPathSeg.idl:
+ Added CustomToJS attribute to all the above IDL files.
+
+2009-07-10 Dan Bernstein <mitz@apple.com>
+
+ - fix the build by reverting the ill-advised r45711
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollToAnchor):
+
+2009-07-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Updated WebCore.base.exp to add some needed functions.
+
+ * WebCore.base.exp:
+
+2009-07-10 Dan Bernstein <mitz@apple.com>
+
+ - address a review comment from Simon Fraser which I forgot to include
+ in the last check-in
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollToAnchor): Pass true to getRect() for
+ maximum transform friendliness!
+
+2009-07-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=27137
+ <rdar://problem/7043124> REGRESSION (r44311): Reproducible crash due
+ to infinite recursion into FrameLoader::gotoAnchor() ->
+ FrameView::layout()
+
+ Test: fast/loader/goto-anchor-infinite-layout.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout,
+ find the renderer to scroll to, and scroll from here to methods on
+ FrameView, and replaced it with a call to
+ FrameView::maintainScrollPositionAtAnchor().
+ (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor()
+ instead of setLockedToAnchor().
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView): Removed initialization of
+ m_lockedToAnchor.
+ (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead
+ of m_lockedToAnchor.
+ (WebCore::FrameView::layout): Removed the code related to scrolling to
+ the anchor from here, because scrolling can trigger events which
+ invalidate the layout, and as such, belongs with the post-layout tasks.
+ (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called
+ with a node scrolls the view to the top of that node and maintains it
+ scrolled to the top of the node during subsequent layouts, until
+ this function is called with 0 or other things trigger scrolling.
+ (WebCore::FrameView::scrollRectIntoViewRecursively): Reset
+ m_maintainScrollPositionAnchor.
+ (WebCore::FrameView::setScrollPosition): Ditto.
+ (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of
+ m_maintainScrollPositionAnchor, if it is set.
+ (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor().
+ (WebCore::FrameView::setWasScrolledByUser): Reset
+ m_maintainScrollPositionAnchor.
+
+ * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(),
+ and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and
+ m_maintainScrollPositionAnchor.
+
+2009-07-04 Sriram Yadavalli <sriram.yadavalli@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26439
+
+ QtWebKit fails in loading www.nytimes.com in Windows/Linux
+
+ QNetworkReplyHandler is ignoring content associated with 401 error.
+ This causes the XHR response handling to fail.
+
+ Simon: Added also ProxyAuthenticationRequiredError, to handle the same
+ case when going through proxies, as suggested by Prasanth.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+
+2009-07-10 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Enable HTML 5 Messaging to fix message channel Qt DRT failures in
+ fast/events.
+
+ * WebCore.pro:
+
+2009-07-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ added InlineBox::isLeaf()
+ firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore.
+ firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree.
+ Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox()
+ Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes
+
+ Currently, these methods are called on RootInlineBox objects only, so above changes should not have
+ any observable effect (only the removal of the square performance behavior could apply,
+ but the conditions for that are probably of a rather theoretical nature).
+
+ * rendering/InlineBox.cpp:
+ (WebCore::InlineBox::nextLeafChild):
+ (WebCore::InlineBox::prevLeafChild):
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::isLeaf):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::firstLeafChild):
+ (WebCore::InlineFlowBox::lastLeafChild):
+ * rendering/InlineFlowBox.h:
+ (WebCore::InlineFlowBox::firstChild):
+ (WebCore::InlineFlowBox::lastChild):
+ (WebCore::InlineFlowBox::isLeaf):
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::closestLeafChildForXPos):
+
+2009-07-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added InlineBox::baselinePosition() and lineHeight() methods
+ (adapted remaining code accordingly to use those methods)
+
+ No change in functionality.
+
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::baselinePosition):
+ (WebCore::InlineBox::lineHeight):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
+ (WebCore::InlineFlowBox::computeLogicalBoxHeights):
+ (WebCore::InlineFlowBox::placeBoxesVertically):
+
+2009-07-09 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 27142 - canPlayType() should return empty string for unsupported content
+ <https://bugs.webkit.org/show_bug.cgi?id=27142>
+
+ Return "" instead of "no" for unsupport media types.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::canPlayType):
+
+2009-07-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement the part of HTML5 spec that deals with parsing of <rp> and <rt> tags
+ in that their end tags are optional if followed by <rp>/<rt>.
+
+ Also specify a new accessibility role "annotation" for <rp> and <rt>.
+
+ Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing
+ is not affected by whether ruby is rendered properly or not (in fact, it may
+ be more profound without ruby layouting, since the contents of <rp> are not hidden).
+
+ Test: fast/ruby/parse-rp.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::roleValue):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::endTagRequirement):
+ (WebCore::HTMLElement::tagPriority):
+ (WebCore::inlineTagList):
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::rpCreateErrorCheck):
+ (WebCore::HTMLParser::rtCreateErrorCheck):
+ (WebCore::HTMLParser::getNode):
+ * html/HTMLParser.h:
+ * html/HTMLTagNames.in:
+
+2009-07-09 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, fix for previous commit.
+
+ The change http://trac.webkit.org/changeset/45695 did not correctly
+ enabled GTL and QT build flags. This caused layout tests failure.
+ This is speculative fix for those failures.
+
+ * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag.
+ * WebCore.pro: ditto.
+ * page/DOMWindow.idl: touched to cause recompile.
+ * workers/WorkerContext.idl: ditto.
+
+2009-07-09 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26903
+
+ Turned on CHANNEL_MESSAGING by default because the MessageChannel API
+ is now implemented for Web Workers and is reasonably stable.
+
+ Tests: fast/events/message-channel-gc-2.html
+ fast/events/message-channel-gc-3.html
+ fast/events/message-channel-gc-4.html
+ fast/events/message-channel-gc.html
+ fast/events/message-channel-listener-circular-ownership.html
+ fast/events/message-port-clone.html
+ fast/events/message-port-constructor-for-deleted-document.html
+ fast/events/message-port-deleted-document.html
+ fast/events/message-port-deleted-frame.html
+ fast/events/message-port-inactive-document.html
+ fast/events/message-port-no-wrapper.html
+ fast/events/message-port.html
+ fast/workers/worker-cloneport.html
+ fast/workers/worker-messageport-gc.html
+ fast/workers/worker-messageport.html
+
+ * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING.
+ * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto.
+ * WebCore/WebCore.vcproj/build-generated-files.sh: ditto.
+ * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers.
+ * WebCore/workers/WorkerContext.idl: ditto.
+
+
+2009-07-09 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Full page zoom breaks remaining and elapsed time display in the <video> controller.
+ https://bugs.webkit.org/show_bug.cgi?id=27123
+
+ We are changing the size of the time remaining and time elapsed field, to
+ automatically hide them, when the controller is too short.
+
+ Because we toggle the size between 0 and the previous value of the
+ controller, we miss any width change that may occur during full page zoom,
+ and we fail to restore a correct width.
+
+ This change fixes that problem by using a cloned style on which we
+ set the width to 0, and restoring the previous style when going back to
+ the normal width.
+
+ We take care about properly using the cloned style or the pseudo style,
+ by overriding styleForElement().
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::styleForElement):
+ (WebCore::MediaControlElement::attach):
+ (WebCore::MediaControlElement::updateStyle):
+ (WebCore::MediaControlInputElement::styleForElement):
+ (WebCore::MediaControlInputElement::attach):
+ (WebCore::MediaControlInputElement::updateStyle):
+ (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
+ (WebCore::MediaControlTimeDisplayElement::styleForElement):
+ (WebCore::MediaControlTimeDisplayElement::setVisible):
+ * rendering/MediaControlElements.h:
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::shouldShowTimeDisplayControls): Make sure
+ we take in account the zoom level when deciding if we should hide the
+ ellapsed and remaining time.
+
+2009-07-09 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fix chromium build bustage due to Widget being a RefCounted class.
+ https://bugs.webkit.org/show_bug.cgi?id=27139
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ * platform/chromium/PopupMenuChromium.h:
+
+2009-07-09 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27130 - Need to implement ARIA role="toolbar"
+ https://bugs.webkit.org/show_bug.cgi?id=27130
+
+ Test: platform/mac/accessibility/aria-toolbar.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::RoleEntry::):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Upstream WebCore.gypi, the project file for Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=27135
+
+ * WebCore.gypi: Added.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ A more robust fix for <rdar://problem/6930280> Reproducible crash at
+ USA Today photo gallery
+
+ Reviewed by Steve Falkenburg.
+
+ * plugins/win/PluginMessageThrottlerWin.cpp:
+ (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
+ Protect the PluginView from destruction before calling its window proc.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+
+ Reviewed by Darin Adler.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::bindingInstance):
+ Protect the PluginView from destruction before calling NPN_GetValue. If
+ the renderer for the PluginView was destroyed during the call, and the
+ PluginView's ref count is now 1, return null.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Speculative fix for <rdar://problem/6991251> WER #13: Crash in
+ WebKit!WebCore::PluginView::performRequest+203 (1311461169)
+
+ Reviewed by Darin Adler.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::performRequest):
+ Protect the PluginView from destruction before performing a load.
+ Removed some trailing whitespace.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Build fix.
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
+
+2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make Widget RefCounted to fix or make fixable:
+
+ <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
+ at WebCore::Widget::afterMouseDown() after clicking To Do's close
+ box
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+ -and-
+ <rdar://problem/6991251> WER #13: Crash in WebKit!
+ WebCore::PluginView::performRequest+203 (1311461169)
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::createPlugin):
+ Changed to return PassRefPtr
+ (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
+ Ditto.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadSubframe):
+ (WebCore::FrameLoader::loadPlugin):
+ Make the widget variable a RefPtr. Use .get() when passing it to
+ RenderPart::setWidget().
+ (WebCore::FrameLoader::createJavaAppletWidget):
+ Make the widget variable a RefPtr.
+
+ * loader/FrameLoader.h:
+ Changed the return type of createJavaAppletWidget().
+
+ * loader/FrameLoaderClient.h:
+ Change the return types of createPlugin() and
+ createJavaAppletWidget().
+
+ * page/Frame.cpp:
+ (WebCore::Frame::createView):
+ No need to call .get() since setWidget() takes a RefPtr.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layoutIfNeededRecursive):
+ children() now returns a HashSet of RefPtrs.
+
+ * page/FrameView.h:
+ Remove inheritance from RefCounted; we pick this up from ScrollView
+ through Widget.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::addChild):
+ addChild() now takes a PassRefPtr and m_children now keeps a
+ HashSet of RefPtrs.
+
+ * platform/ScrollView.h:
+ ScrollView constructor is now protected.
+ (WebCore::ScrollView::children):
+ m_children is now a HashSet of RefPtrs.
+
+ * platform/Scrollbar.h:
+ Remove inheritance from RefCounted; we pick this up from ScrollView
+ through Widget.
+
+ * platform/Widget.h:
+ Inherit from RefCounted. Cleaned up some whitespace. Make m_widget
+ a RefPtr.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::create):
+ Adopt the PluginView when returning it.
+
+ * plugins/PluginView.h:
+ Changed create() to return a PassRefPtr.
+
+ * rendering/RenderApplet.cpp:
+ Receive result in a RefPtr when calling createJavaAppletWidget().
+
+ * rendering/RenderPart.cpp:
+ (WebCore::RenderPart::setWidget):
+ setWidget() now takes a PassRefPtr. Also removed the manual ref of
+ FrameViews. This is handled by having m_widget be a RefPtr. Removed
+ deleteWidget().
+
+ * rendering/RenderPart.h:
+ Removed override of deleteWidget().
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::destroy):
+ (WebCore::RenderWidget::setWidget):
+ (WebCore::RenderWidget::paint):
+ (WebCore::RenderWidget::setOverlapTestResult):
+ (WebCore::RenderWidget::updateWidgetPosition):
+ Use .get().
+ (WebCore::RenderWidget::clearWidget):
+ Don't call deleteWidget(). It was removed.
+
+ * rendering/RenderWidget.h:
+ Removed deleteWidget(). Made m_widget a RefPtr.
+ (WebCore::RenderWidget::widget):
+ Use .get().
+
+2009-07-09 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27129 - AX: possible assertion for a non-native image in accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=27129
+
+ It's possible for an image that is not really an image to assert, because its renderer
+ is turned into a RenderImage.
+
+ Test: accessibility/non-native-image-crash.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::RoleEntry::):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-07-09 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix for SnowLeopard.
+
+ Avoid using the contentsTransform methods if not on Leopard, because
+ we don't need to call them.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::updateContentsTransform):
+ * platform/graphics/mac/WebLayer.mm:
+ (-[WebLayer setNeedsDisplayInRect:]):
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer setNeedsDisplayInRect:]):
+
+2009-07-09 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ Improve the appearance of text in compositing layers when -[CALayer geometryFlipped]
+ is not available.
+ <rdar://problem/6120614>
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setContentsOrientation):
+ (WebCore::GraphicsLayer::contentsOrientation):
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ Add a m_contentsOrientation member and getter/setter to control whether
+ the contents of this layer have a transform applied to them before display.
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ New method to return the default contents orientation.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::flipTransform):
+ Convenience method to return a transform with a Y flip.
+
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+ (WebCore::GraphicsLayerCA::setSize):
+ After the size changes we have to update the contentsTransform.
+
+ (WebCore::GraphicsLayerCA::setGeometryOrientation):
+ (WebCore::GraphicsLayerCA::geometryOrientation):
+ If -setGeometryFlipped: is not available, use a children transform.
+
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+ Tiled layers have issues with flipped contentsTransform, so just use
+ top-down drawing for them. Call updateContentsTransform() to set the
+ new contents transform after swapping layers.
+
+ (WebCore::GraphicsLayerCA::defaultContentsOrientation):
+ Use bottom-up when -geometryFlipped is not available, otherwise top-down.
+
+ (WebCore::GraphicsLayerCA::updateContentsTransform):
+ Set the layer contents transform based on contentsOrientation().
+
+ (WebCore::GraphicsLayerCA::setContentsLayer):
+ We have to manually flip contents layers if we're not using -geometryFlipped.
+
+ * platform/graphics/mac/WebLayer.h:
+ * platform/graphics/mac/WebLayer.mm:
+ Do early return if layerContents is nil. Flip the CTM if the layer has
+ bottom-up coordinates, so that CG sees a CTM with no flip.
+ Do the CGContextRestoreGState() after drawing the debug indicator.
+
+ (-[WebLayer setNeedsDisplayInRect:]):
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer setNeedsDisplayInRect:]):
+ Need to map the dirty rect through the contentsTransform.
+
+2009-07-09 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ <rdar://problem/6921671> Visit counter shouldn't be incremented by redirects.
+
+ Can't test this functionality with layout tests.
+
+ * WebCore.base.exp:
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::recordVisitAtTime):
+ (WebCore::HistoryItem::visited):
+ * history/HistoryItem.h:
+ Only increase visit count if explicitly told to. Now, some visits change last access time,
+ but do not increase visit count.
+
+2009-07-09 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7046098> MediaControllerThemeQT requires QuickTime 7.6.3
+
+ Require QuickTime 7.6.3 or higher to enable the new media controller UI.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+
+2009-07-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Beth Dakin.
+
+ Remove incorrect comment.
+
+ * page/MouseEventWithHitTestResults.h:
+
+2009-07-09 Mads Ager <ager@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Update the V8 bindings codegenerator to use the RGBColor::create
+ method to handle refcounts for RGBColor objects correctly.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Use RGBColor::create to create RGBColor objects.
+
+2009-07-09 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Crash in RenderMedia::styleDidChange.
+ <rdar://problem/7044313> CrashTracer: quicklook crashed generating thumbnail for page with
+ media element (RenderMedia::styleDidChange + 115)
+
+ Speculative fix for crash in styleDidChange. Null check controller elements before tell
+ them to update style.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::styleDidChange):
+
+2009-07-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Move V8DOMWrapper to its own file
+ https://bugs.webkit.org/show_bug.cgi?id=27121
+
+ * bindings/v8/V8DOMWrapper.cpp: Added.
+ (WebCore::GetToStringName):
+ (WebCore::ConstructorToString):
+ (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
+ (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
+ (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ (WebCore::V8DOMWrapper::domWrapperType):
+ (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
+ (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
+ (WebCore::V8DOMWrapper::lookupDOMWrapper):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
+ (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::setDOMWrapper):
+ (WebCore::V8DOMWrapper::maybeDOMWrapper):
+ (WebCore::V8DOMWrapper::isDOMEventWrapper):
+ (WebCore::V8DOMWrapper::isWrapperOfType):
+ (WebCore::V8DOMWrapper::htmlElementType):
+ (WebCore::V8DOMWrapper::svgElementType):
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ (WebCore::):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
+ (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
+ (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ * bindings/v8/V8DOMWrapper.h: Added.
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
+ (WebCore::V8DOMWrapper::wrapCPointer):
+ (WebCore::V8DOMWrapper::extractCPointer):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::convertToNativeObject):
+ (WebCore::V8DOMWrapper::convertToNativeEvent):
+ (WebCore::V8DOMWrapper::extractCPointerImpl):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2009-07-09 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Crash in setFocusedFrame.
+ <rdar://7032869> Crashing in setFocusedFrame on blogger.com.
+
+ Speculative fix for crasher in setFocusedFrame. Make sure to ref both frames and fire
+ the events only after the local member has been updated.
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setFocusedFrame):
+
+2009-07-09 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Possible crashes when mouse clicks not dispatched because range input destroyed while
+ thumb is being dragged (e.g. scrub to end of movie)
+ <rdar://problem/7037494>
+ https://bugs.webkit.org/show_bug.cgi?id=27101
+
+ Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to
+ get mouse events even when the mouse is moved outside of the node. This is done by putting
+ EventHandler into a mode where it sends all mouse events to the node regardless of the
+ actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the
+ node is deleted while in this mode, the mouseUp is never sent and EventHandler continues
+ to try to send events to the deleted node. This sometimes results in a crash, and sometimes
+ in a page that doesn't respond to click events.
+
+ Tests: fast/forms/search-delete-while-cancel-button-clicked.html
+ fast/forms/slider-delete-while-dragging-thumb.html
+ media/audio-delete-while-slider-thumb-clicked.html
+ media/audio-delete-while-step-button-clicked.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlSeekButtonElement::detach):
+ New, call setCapturingMouseEventsNode if capturing mouse events.
+ * rendering/MediaControlElements.h:
+ Declare detach().
+
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderThumbElement::detach):
+ New, call setCapturingMouseEventsNode if capturing mouse events.
+
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::SearchFieldCancelButtonElement::detach):
+ New, call setCapturingMouseEventsNode if capturing mouse events.
+ * rendering/TextControlInnerElements.h:
+ Declare detach().
+
+2009-07-09 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Enter the Frame's context before creating new objects in setContextDebugId.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27112
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setContextDebugId):
+
+2009-07-09 Simon Hausmann <hausmann@webkit.org>
+
+ Fix the Qt build.
+
+ * WebCore.pro: Add new storage impl files to the build.
+
+2009-07-08 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ [V8] Move DOM wrapper functions in V8Proxy to V8DOMWrapper
+ https://bugs.webkit.org/show_bug.cgi?id=27107
+
+ This patch is just renaming. Code motion will occur next.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGesture):
+ (WebCore::createScriptObject):
+ (WebCore::ScriptController::createScriptObjectForPluginElement):
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::handleEvent):
+ (WebCore::V8AbstractEventListener::getReceiverObject):
+ * bindings/v8/V8Collection.cpp:
+ (WebCore::toOptionsCollectionSetter):
+ * bindings/v8/V8Collection.h:
+ (WebCore::getV8Object):
+ (WebCore::getNamedPropertyOfCollection):
+ (WebCore::nodeCollectionNamedPropertyGetter):
+ (WebCore::getIndexedPropertyOfCollection):
+ (WebCore::nodeCollectionIndexedPropertyGetter):
+ (WebCore::nodeCollectionIndexedPropertyEnumerator):
+ (WebCore::collectionIndexedPropertyEnumerator):
+ (WebCore::collectionStringOrNullIndexedPropertyGetter):
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::DOMData::handleWeakObject):
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::enumerateDOMObjectMap):
+ (WebCore::DOMObjectVisitor::visitDOMWrapper):
+ (WebCore::GCPrologueVisitor::visitDOMWrapper):
+ (WebCore::GCEpilogueVisitor::visitDOMWrapper):
+ * bindings/v8/V8Helpers.cpp:
+ (WebCore::wrapNPObject):
+ * bindings/v8/V8NodeFilterCondition.cpp:
+ (WebCore::V8NodeFilterCondition::acceptNode):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
+ (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
+ (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::getConstructor):
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8Proxy::retrieveWindow):
+ (WebCore::V8Proxy::updateDocumentWrapperCache):
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::installDOMWindow):
+ (WebCore::setDOMExceptionHelper):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ (WebCore::V8DOMWrapper::domWrapperType):
+ (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
+ (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
+ (WebCore::V8DOMWrapper::lookupDOMWrapper):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
+ (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::setDOMWrapper):
+ (WebCore::V8DOMWrapper::maybeDOMWrapper):
+ (WebCore::V8DOMWrapper::isDOMEventWrapper):
+ (WebCore::V8DOMWrapper::isWrapperOfType):
+ (WebCore::V8DOMWrapper::htmlElementType):
+ (WebCore::V8DOMWrapper::svgElementType):
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
+ (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
+ (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ (WebCore::V8Proxy::bindJsObjectToWindow):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
+ (WebCore::V8DOMWrapper::wrapCPointer):
+ (WebCore::V8DOMWrapper::extractCPointer):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::convertToNativeObject):
+ (WebCore::V8DOMWrapper::convertToNativeEvent):
+ (WebCore::V8DOMWrapper::extractCPointerImpl):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8Proxy::constructDOMObject):
+ (WebCore::toV8):
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+ (WebCore::V8SVGPODTypeUtil::toSVGPODType):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::retrieve):
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ (WebCore::WorkerContextExecutionProxy::GetConstructor):
+ (WebCore::WorkerContextExecutionProxy::ToV8Object):
+ (WebCore::WorkerContextExecutionProxy::EventToV8Object):
+ (WebCore::WorkerContextExecutionProxy::toV8):
+ * bindings/v8/custom/V8AttrCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::toCanvasStyle):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ClientRectListCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::V8Custom::GetTargetFrame):
+ * bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
+ (WebCore::V8CustomSQLStatementCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+ (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
+ (WebCore::V8CustomSQLTransactionCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
+ (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::V8Custom::ClearTimeoutImpl):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8EventCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::getItem):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8InspectorControllerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8NavigatorCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGLengthCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
+ (WebCore::storageGetter):
+ (WebCore::storageSetter):
+ (WebCore::storageDeleter):
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::SetTimeoutOrInterval):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make sure we can click outside the slider thumb and start dragging.
+ https://bugs.webkit.org/show_bug.cgi?id=26229
+
+ Previously we were assuming that if the thumb hasn't been clicked, we
+ wouldn't issue any value change upon dragging.
+
+ We need to handle the two different cases:
+ - Clicked in the thumb, we need to make sure the cursor is always pointing
+ the same slider thumb point.
+ - Clicked outside, the cursor should always be pointing to the center of
+ the thumb.
+
+ For simplicity, we don't remember the original point of the mouse down,
+ but a vector between that point and the thumb.
+
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderThumbElement::SliderThumbElement):
+ (WebCore::SliderThumbElement::defaultEventHandler):
+ (WebCore::RenderSlider::mouseEventVectorToThumb): Utility function.
+ * rendering/RenderSlider.h:
+
+2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27100
+ <rdar://problem/7042621>
+
+ Don't display "loading" in the <video> controller when
+ there is no src specified.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlStatusDisplayElement::update): The only
+ way to find out if we have an element is currentSrc(). networkState()
+ will always report LOADING according to the spec.
+
+2009-07-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Move V8GCController functions to their own file
+ https://bugs.webkit.org/show_bug.cgi?id=27102
+
+ * bindings/v8/V8GCController.cpp: Added.
+ * bindings/v8/V8GCController.h: Added.
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2009-07-08 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Split StorageArea and StorageNamespace into an interface and implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=27072
+
+ I need to split StorageNamespace and StorageArea into an interface and
+ implementation. In a later patch, I'll implement a proxy interface
+ that'll run inside the Chromium renderer process.
+
+ Additionally, fix the alphabetical ordering of files I recently added
+ in the project files.
+
+ This is a continuation of other refactoring work:
+ https://bugs.webkit.org/show_bug.cgi?id=25376
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::create):
+ * storage/StorageArea.h:
+ (WebCore::StorageArea::~StorageArea):
+ * storage/StorageAreaImpl.cpp: Copied from WebCore/storage/StorageArea.cpp.
+ (WebCore::StorageAreaImpl::create):
+ (WebCore::StorageAreaImpl::~StorageAreaImpl):
+ (WebCore::StorageAreaImpl::StorageAreaImpl):
+ (WebCore::StorageAreaImpl::copy):
+ (WebCore::StorageAreaImpl::length):
+ (WebCore::StorageAreaImpl::key):
+ (WebCore::StorageAreaImpl::getItem):
+ (WebCore::StorageAreaImpl::setItem):
+ (WebCore::StorageAreaImpl::removeItem):
+ (WebCore::StorageAreaImpl::clear):
+ (WebCore::StorageAreaImpl::contains):
+ (WebCore::StorageAreaImpl::importItem):
+ (WebCore::StorageAreaImpl::securityOrigin):
+ (WebCore::StorageAreaImpl::close):
+ (WebCore::StorageAreaImpl::blockUntilImportComplete):
+ (WebCore::StorageAreaImpl::dispatchStorageEvent):
+ * storage/StorageAreaImpl.h: Copied from WebCore/storage/StorageArea.h.
+ * storage/StorageAreaSync.h:
+ * storage/StorageNamespace.cpp:
+ (WebCore::StorageNamespace::localStorageNamespace):
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ * storage/StorageNamespace.h:
+ (WebCore::StorageNamespace::~StorageNamespace):
+ * storage/StorageNamespaceImpl.cpp: Copied from WebCore/storage/StorageNamespace.cpp.
+ (WebCore::StorageNamespaceImpl::localStorageNamespace):
+ (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
+ (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::copy):
+ (WebCore::StorageNamespaceImpl::storageArea):
+ (WebCore::StorageNamespaceImpl::close):
+ * storage/StorageNamespaceImpl.h: Copied from WebCore/storage/StorageNamespace.h.
+
+2009-07-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Move garbage collector related functions from V8Proxy to V8GCController
+ https://bugs.webkit.org/show_bug.cgi?id=26967
+
+ This patch just moves the functions around in V8Proxy. We'll actually
+ move them to a separate file in another patch.
+
+ * bindings/v8/NPV8Object.cpp:
+ (freeV8NPObject):
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::~ScheduledAction):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::gcProtectJSWrapper):
+ (WebCore::ScriptController::gcUnprotectJSWrapper):
+ * bindings/v8/ScriptInstance.cpp:
+ (WebCore::V8ScriptInstance::clear):
+ (WebCore::V8ScriptInstance::set):
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::ScriptValue):
+ (WebCore::ScriptValue::operator=):
+ (WebCore::ScriptValue::clear):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::disposeListenerObject):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::~V8LazyEventListener):
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ (WebCore::V8LazyEventListener::getWrappedListenerFunction):
+ * bindings/v8/V8NodeFilterCondition.cpp:
+ (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
+ (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8GCController::registerGlobalHandle):
+ (WebCore::V8GCController::unregisterGlobalHandle):
+ (WebCore::V8GCController::gcProtect):
+ (WebCore::V8GCController::gcUnprotect):
+ (WebCore::V8Proxy::destroyGlobal):
+ (WebCore::V8Proxy::updateDocumentWrapper):
+ (WebCore::V8Proxy::clearDocumentWrapper):
+ (WebCore::V8Proxy::disposeContextHandles):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::):
+ (WebCore::GlobalHandleInfo::GlobalHandleInfo):
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener):
+
+2009-07-08 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26918
+
+ Prevents injection of HTML Base tag.
+
+ Tests: http/tests/security/xssAuditor/base-href-control-char.html
+ http/tests/security/xssAuditor/base-href-null-char.html
+ http/tests/security/xssAuditor/base-href-safe.html
+ http/tests/security/xssAuditor/base-href-safe2.html
+ http/tests/security/xssAuditor/base-href-scheme-relative.html
+ http/tests/security/xssAuditor/base-href.html
+
+ * html/HTMLBaseElement.cpp:
+ (WebCore::HTMLBaseElement::parseMappedAttribute):
+ (WebCore::HTMLBaseElement::process): Modified to call XSSAuditor::canSetBaseElementURL
+ to determine if it is safe to use base element URL.
+ * html/HTMLBaseElement.h: Added field m_hrefAttrValue to store unparsed base element URL.
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canSetBaseElementURL):
+ * page/XSSAuditor.h:
+
+2009-07-08 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream V8 npruntime bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27094
+
+ * bindings/v8/npruntime.cpp: Upstreamed from src.chromium.org.
+ (StringKey::operator==):
+ (StringKey::StringKeyHash::hash):
+ (StringKey::StringKeyHash::equal):
+ (StringKeyHashTraits::constructDeletedValue):
+ (StringKeyHashTraits::isDeletedValue):
+ (getStringIdentifierMap):
+ (getIntIdentifierMap):
+ * bindings/v8/npruntime_impl.h: Upstreamed from src.chromium.org.
+ * bindings/v8/npruntime_internal.h: Upstreamed from src.chromium.org.
+ * bindings/v8/npruntime_priv.h: Upstreamed from src.chromium.org.
+
+2009-07-08 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Extending the PlatformFileHandle definition from PLATFORM(WIN) to
+ PLATFORM(WIN_OS)
+
+ https://bugs.webkit.org/show_bug.cgi?id=27013
+
+ * platform/FileSystem.h:
+
+2009-07-08 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27071
+
+ Resolves issue when HTTP parameters contain null- and non-null-control- characters.
+
+ Tests: http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html
+ http/tests/security/xssAuditor/embed-tag-control-char.html
+ http/tests/security/xssAuditor/embed-tag-null-char.html
+ http/tests/security/xssAuditor/embed-tag.html
+ http/tests/security/xssAuditor/link-onclick-control-char.html
+ http/tests/security/xssAuditor/link-onclick-null-char.html
+ http/tests/security/xssAuditor/object-embed-tag-control-char.html
+ http/tests/security/xssAuditor/object-embed-tag-null-char.html
+ http/tests/security/xssAuditor/object-embed-tag.html
+ http/tests/security/xssAuditor/object-tag.html
+ http/tests/security/xssAuditor/script-tag-post-control-char.html
+ http/tests/security/xssAuditor/script-tag-post-null-char.html
+ http/tests/security/xssAuditor/script-tag-with-source-control-char.html
+ http/tests/security/xssAuditor/script-tag-with-source-null-char.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::isNonNullControlCharacter): Called by XSSAuditor::decodeURL.
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::decodeURL): Added parameters matchNullCharacters,
+ and matchNonNullControlCharacters.
+ (WebCore::XSSAuditor::findInRequest): Added parameters matchNullCharacters,
+ and matchNonNullControlCharacters.
+ * page/XSSAuditor.h:
+
+2009-07-08 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add DerivesSourcesAllInOne.cpp to help with release windows compilation.
+ https://bugs.webkit.org/show_bug.cgi?id=27093
+
+ This is specific for v8, no change in behavior.
+
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Added.
+
+2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27086
+
+ Make sure the Media controller doesn't fade in for no reason.
+ This is happening because a update() call to the controller
+ panel may reset the opacity to 1.0, given that it reloads the
+ style.
+
+ We also add a different fade in and fade out time to soften
+ the fade out effect.
+
+ No test case because this depends on how the movie is loaded.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia):
+ (WebCore::RenderMedia::updateControls):
+ (WebCore::RenderMedia::updateControlVisibility): Simplify
+ , and make sure we stop the timer if there is no animation
+ to do.
+ (WebCore::RenderMedia::opacityAnimationTimerFired):
+ * rendering/RenderMedia.h:
+
+2009-07-08 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27081: Wrap RunLoopTimerCF.cpp in PLATFORM(MAC) && HAVE(RUNLOOP_TIMER)
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27081>
+
+ Reviewed by Timothy Hatcher.
+
+ * platform/cf/RunLoopTimerCF.cpp: This code is only used on
+ Mac OS X when HAVE(RUNLOOP_TIMER) is enabled, so wrap the code
+ in that macro as well.
+
+2009-07-08 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add -[WebView _isProcessingUserGesture]
+ https://bugs.webkit.org/show_bug.cgi?id=27084
+
+ Rename FrameLoader::userGestureHint() to FrameLoader::isProcessingUserGesture()
+ for clarity.
+
+ * WebCore.base.exp: Add WebCore::FrameLoader::isProcessingUserGesture()
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::processingUserGesture):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestFrame):
+ (WebCore::FrameLoader::isProcessingUserGesture):
+ * loader/FrameLoader.h:
+
+2009-07-08 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed (an earlier version) by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27090
+ Remove lockBackForwardList argument from HTMLFormElement::submit()
+
+ No change in behavior, so no tests.
+
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::submit):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::submit):
+ * html/HTMLFormElement.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::scheduleFormSubmission):
+ * loader/FrameLoader.h:
+ Don't pass lockBackForwardList around when it's known to be false.
+
+2009-07-08 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix V8 idl codegen to use unique constant names
+ <https://bugs.webkit.org/show_bug.cgi?id=27089>
+
+ Embed the interface name in the global constant names so coagulating all
+ the .cc files into one compile unit works with V8 bindings.
+
+ Nothing added; Still compiles and pass tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-07-08 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix: Add missing #includes for Windows (cURL) build.
+ The <winsock2.h> and <windows.h> headers were not being
+ included in Windows cURL builds.
+
+ * platform/network/ResourceHandleInternal.h:
+ * platform/network/curl/ResourceHandleManager.h:
+
+2009-07-08 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ WebKit needs a style linting tool
+ https://bugs.webkit.org/show_bug.cgi?id=25884
+
+ Fix bunch of style issues in WebCore/rendering.
+ This patch is created to demonstrate cpplint.py.
+
+ No testcase because it's just a style fixes.
+
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ (WebCore::AutoTableLayout::layout):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeEllipsisBox):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintTextMatchMarker):
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimelineElement::defaultEventHandler):
+ * rendering/MediaControlElements.h:
+ * rendering/RenderArena.cpp:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::startDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::updateScrollInfoAfterLayout):
+ (WebCore::RenderBlock::positionNewFloats):
+ (WebCore::RenderBlock::newLine):
+ (WebCore::RenderBlock::floatBottom):
+ (WebCore::RenderBlock::leftBottom):
+ (WebCore::RenderBlock::rightBottom):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcReplacedWidthUsing):
+ * rendering/RenderFieldset.cpp:
+ (WebCore::RenderFieldset::layoutLegend):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::FlexBoxIterator::FlexBoxIterator):
+ (WebCore::FlexBoxIterator::reset):
+ (WebCore::FlexBoxIterator::first):
+ (WebCore::FlexBoxIterator::next):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+ * rendering/RenderFrameSet.cpp:
+ (WebCore::borderStartEdgeColor):
+ * rendering/RenderFrameSet.h:
+ * rendering/RenderImage.cpp:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateVisibilityStatus):
+ (WebCore::RenderLayer::calculateClipRects):
+ (WebCore::RenderLayer::calculateRects):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::panScroll):
+ * rendering/RenderMarquee.cpp:
+ (WebCore::RenderMarquee::updateMarqueeStyle):
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::drawLineForBoxSide):
+ (WebCore::RenderObject::localCaretRect):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
+ * rendering/RenderSlider.h:
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::outerBorderBottom):
+ * rendering/RenderTableCol.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::itemIsSeparator):
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::supportsHover):
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::supportsFocusRing):
+ * rendering/SVGCharacterLayoutInfo.cpp:
+ (WebCore::SVGCharacterLayoutInfo::addStackContent):
+ * rendering/SVGCharacterLayoutInfo.h:
+ * rendering/TextControlInnerElements.h:
+ * rendering/bidi.cpp:
+ (WebCore::RenderBlock::computeHorizontalPositionsForLine):
+
+2009-07-07 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Reduce complexity of lifetime management in DynamicNodeList caches
+ <https://bugs.webkit.org/show_bug.cgi?id=27068>
+
+ Switch the Cache object used by DynamicNodeList into a normal
+ refcounted object rather than having a weird flag controlled
+ refcounting system, where positive refcount did not automatically
+ imply the cache object would actually still be live.
+
+ * dom/DynamicNodeList.cpp:
+ (WebCore::DynamicNodeList::DynamicNodeList):
+ (WebCore::DynamicNodeList::~DynamicNodeList):
+ (WebCore::DynamicNodeList::Caches::Caches):
+ (WebCore::DynamicNodeList::Caches::create):
+ * dom/DynamicNodeList.h:
+ * dom/Node.cpp:
+ (WebCore::Node::childNodes):
+ (WebCore::Node::getElementsByTagNameNS):
+ (WebCore::Node::getElementsByName):
+ (WebCore::Node::getElementsByClassName):
+ (WebCore::NodeListsNodeData::invalidateCaches):
+ (WebCore::NodeListsNodeData::isEmpty):
+ * dom/NodeRareData.h:
+ (WebCore::NodeListsNodeData::NodeListsNodeData):
+
+2009-07-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ -webkit-perspective should be a Length
+ https://bugs.webkit.org/show_bug.cgi?id=27066
+
+ -webkit-perspective should not take a magic valueless number, but should
+ be a normal Length value which responds to zooming. Treat valueless numbers
+ as pixels for backward compatibility.
+
+ Test: transforms/3d/general/perspective-units.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+
+2009-07-07 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27047
+
+ We need to make sure that when we reattach, we also reattach
+ the children in every MediaControlElement. Else we may end up
+ having no remaining or elapsed time.
+
+ We have to handle that, because we are using a special shadow
+ tree in the DOM, and that we are ourselves handling
+ attaching/detaching the renderer.
+
+ The strategy here is to try to implement ::attach(), and try
+ to reuse as much code as we can from the super class, including
+ children attachement.
+
+ Test: media/controls-after-reload.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::styleForElement): Code factoring.
+ (WebCore::MediaControlElement::rendererIsNeeded): Code factoring.
+ (WebCore::MediaControlElement::attach): Implement attach
+ and call super class so that children are also attached.
+ (WebCore::MediaControlElement::updateStyle): Use attach()
+ (WebCore::MediaControlInputElement::styleForElement): Code factoring.
+ (WebCore::MediaControlInputElement::rendererIsNeeded): Code factoring.
+ (WebCore::MediaControlInputElement::attach): See above.
+ (WebCore::MediaControlInputElement::updateStyle): Use attach()
+ * rendering/MediaControlElements.h:
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls): Directly run attach() on
+ the m_panel, which is a root node for our shadow tree.
+
+2009-07-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Repaint issue after layer drops out of composited mode.
+ <https://bugs.webkit.org/show_bug.cgi?id=27022>
+
+ RenderLayers cache repaint rects in the form of m_repaintRect and m_outlineBox,
+ and expect these to stay valid from one style change to the next. These rects
+ are relative to the repaint container, so if a layer stops being composited,
+ we need to recompute them.
+
+ Test: compositing/repaint/layer-repaint-rects.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::computeRepaintRects):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking):
+
+2009-07-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt and Darin Adler.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=26963
+ <rdar://problem/7030998> Reproducible crash at
+ FontCache::getFontData() when a custom font is used in a pseudo-style
+
+ Test: fast/css/pseudo-cache-stale.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::pseudoStyleCacheIsInvalid): Added. Given the old
+ style and the new style, goes over cached pseudo-styles in the old
+ style and re-resolves the same style types off the new style. If any of
+ the new pseudo-styles is different from the currently cached
+ corresponding style, returns true. Otherwise, returns false.
+ (WebCore::Element::recalcStyle): Validate the pseudo-style cache before
+ deciding to keep the existing style.
+ * dom/Element.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::uncachedFirstLineStyle): Added this version that
+ returns an uncached first-line style based off the given style.
+ (WebCore::RenderObject::getUncachedPseudoStyle): Added the 'ownStyle'
+ parameter.
+ * rendering/RenderObject.h:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::getPseudoStyleCache): Added. Returns the cached
+ pseudo-styles in the passed-in vector.
+ * rendering/style/RenderStyle.h:
+
+2009-07-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=27042
+ <rdar://problem/7010981> Incomplete painting of newly created floats
+
+ Tests: fast/repaint/float-in-new-block-with-layout-delta.html
+ fast/repaint/float-new-in-block.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlockChildren): If the child has never been
+ laid out before, paint its overhanging floats in addition to itself.
+ * rendering/RenderBlock.h:
+ (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added and
+ initialized a boolean everHadLayout member.
+ * rendering/bidi.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren): Paint floats that have
+ never been laid out before and did not move from (0, 0).
+
+2009-07-07 Brady Eidson <beidson@apple.com>
+
+ Contributions from both Darin Adler and Brady Eidson.
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7024039> REGRESSION (r42158): Back-forward navigation does not work correctly on nytimes.com
+
+ In r42158 we lost some exclusions to making back/forward items for subframe navigations when a main frame
+ navigation was still in progress.
+
+ This patch makes things even better than it used to be by:
+ - Locking back/forward history at the time the navigation is scheduled, not after the load has committed.
+ - Locking back/forward history if *any* ancestor frame is still loading instead of just the main frame.
+
+ Test: fast/loader/subframe-navigate-during-main-frame-load.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm): Move out the history locking logic into a standalone function so it can be
+ used from multiple sites.
+ (WebCore::mustLockBackForwardList): Returns true if any ancestor frame is still loading.
+ (WebCore::FrameLoader::scheduleLocationChange): Respect mustLockBackForwardList() in addition to the passed in
+ lockBackForwardList flag.
+ (WebCore::FrameLoader::scheduleFormSubmission): Ditto.
+
+2009-07-07 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Upstream DOMObjectsInclude.h from src.chromium.org.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27035
+
+ * bindings/v8/DOMObjectsInclude.h: Added.
+
+2009-07-07 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Relanding r45559, which was rolled back at r45574.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26857
+
+ * bindings/scripts/CodeGeneratorV8.pm: Updated a function name in auto-generated bindings.
+ * bindings/v8/V8Binding.cpp: Moved from src.chromium.org.
+ * bindings/v8/V8Binding.h: Contents moved from src.chromium.org.
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::V8Proxy::compileScript):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-07 Gregory Hughes <gfhughesVO+webkit@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ AX: Some webpages do not send AXLoadComplete
+ https://bugs.webkit.org/show_bug.cgi?id=26995
+
+ When sending the AXLayoutComplete notification it is possible
+ that the AXObjectCache was cleared, resulting in no valid
+ object to send the notification to. This fix ensures that an
+ AX object is created and cached if one does not already exist.
+
+ Not able to add a test because notifications get sent after the layout test is completed.
+
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+
+2009-07-06 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27015
+
+ Make sure that the CSS properties letter-spacing, word-spacing,
+ line-height, text-transform, text-indent, text-shadow,
+ text-decoration and color do not affect the media element controls,
+ that display text.
+
+ Controls that display text are only present in when the theme
+ MediaControllerThemeQT is being used.
+
+ Test: media/controls-styling.html
+
+ * css/mediaControlsQT.css:
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::updateStyle): Special case for
+ text-decoration. text-decoration can't be overriden from CSS, because
+ text-decoration is additive for historical reasons.
+
+2009-07-07 Albert Wong <ajwong@chromium.org>
+
+ Not reviewed, Chromium build fix.
+
+ Add in missing header + fix syntax issue that crept into last patch.
+ https://bugs.webkit.org/show_bug.cgi?id=27027
+
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
+
+2009-07-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make use of geometry information to decide which layers become composited.
+
+ <rdar://problem/7011947>
+ <https://bugs.webkit.org/show_bug.cgi?id=27021>
+
+ In addition to looking at painting order, also, optionally, take layer
+ overlap into account when deciding which RenderLayers need to be composited.
+
+ No testcase because DRT doesn't dump which layers are composited.
+
+ * page/FrameView.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateCompositingLayers):
+ Removed the unused CompositingUpdate parameter, and just do an early return
+ when there is no view.
+
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::rendererContentChanged):
+ (WebCore::RenderLayer::dirtyZOrderLists):
+ (WebCore::RenderLayer::dirtyNormalFlowList):
+ (WebCore::RenderLayer::styleChanged):
+ (WebCore::RenderLayer::mustOverlapCompositedLayers):
+ (WebCore::RenderLayer::setMustOverlapCompositedLayers):
+ Change "overlay" to "overlap" for consistency with the use of "overlap"
+ elsewhere.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+ compositingLayersNeedUpdate() renamed to compositingLayersNeedRebuild().
+
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::RenderLayerBacking::startTransition):
+ Tell the compositor that we started an accelerated animation or transition.
+
+ * rendering/RenderLayerCompositor.h:
+ (WebCore::RenderLayerCompositor::compositingLayersNeedRebuild):
+ Renamed, since it's explicitly about changes in hierarchy now.
+
+ (WebCore::RenderLayerCompositor::setCompositingConsultsOverlap):
+ (WebCore::RenderLayerCompositor::compositingConsultsOverlap):
+ New getter and setter for whether compositing should take overlap into account.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::RenderLayerCompositor):
+ Add m_compositingConsultsOverlap, re-order some member variables.
+
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag):
+ Whitespace cleanup and method rename.
+
+ (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild):
+ Method and variable renaming.
+
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ Now we have to run through the layer hierarchy every time if looking
+ at overlap, because changes in layout can now alter compositing behavior.
+ We minimize work by tracking whether we actually need to change the layer
+ hierarchy via needLayerRebuild.
+
+ (WebCore::RenderLayerCompositor::updateBacking):
+ 3D transforms turn off overlap mode.
+
+ (WebCore::RenderLayerCompositor::layerWasAdded):
+ (WebCore::RenderLayerCompositor::layerWillBeRemoved):
+ Method rename.
+
+ (WebCore::RenderLayerCompositor::addToOverlapMap):
+ (WebCore::RenderLayerCompositor::overlapsCompositedLayers):
+ Utility methods to add a layer to the overlapMap (computing the absolute
+ bounding box only if we haven't already done so), and testing the map
+ entries.
+
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ If a layer would composite only because it comes after other compositing
+ layers in the painting order, then consult the overlap map to determine whether
+ it overlaps, and thus actually needs to composite.
+
+ Add layers to the map when they must be composited.
+
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ Only do re-parenting work if the updateHierarchy flag is set.
+
+ (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation):
+ When we start an accelerated transition or animation, we stop looking at
+ overlap because we can no longer guarantee correct front-to-back ordering while the
+ accelerated animation is running.
+
+ (WebCore::RenderLayerCompositor::needsToBeComposited):
+ Method renames.
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setMaximalOutlineSize):
+ Add comment indicating that this could be optimized.
+
+2009-07-07 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Speed up creation of V8 wrappers for DOM nodes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26882
+
+ This patch doesn't require new tests as it a set of refactorings
+ to speed up wrapper creation.
+
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2009-07-07 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] textarea height property works only if other property are defined
+ https://bugs.webkit.org/show_bug.cgi?id=18984
+
+ Let WebCore handle textarea's metrics instead of readjusting it RenderthemeGtk.
+
+ Test: fast/forms/textarea-metrics.html
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ * platform/gtk/RenderThemeGtk.h:
+
+2009-07-07 Ben Murdoch <benm@google.com>
+
+ Reviewed by Antti Koivisto.
+
+ HTML5 Database becomes locked if a transaction is in progress when the page is refreshed.
+ https://bugs.webkit.org/show_bug.cgi?id=25711
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=25711 where web
+ storage databases could become locked until the browser is shut
+ down if the page is refreshed whilst a transaction is in progress.
+
+ Test: storage/database-lock-after-reload.html
+
+ * storage/Database.cpp:
+ (WebCore::Database::Database):
+ (WebCore::Database::close): add code to inform the database thread we've closed the database.
+ (WebCore::Database::performOpenAndVerify): add code to inform the database thread we've opened a database.
+ * storage/Database.h:
+ (WebCore::Database::opened): return true iff the underlying sqlite database has been opened but not closed.
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::databaseThread): Before the database thread terminates, close any databases that ran transactions in this thread.
+ (WebCore::DatabaseThread::recordDatabaseOpen): Records a database that executed a transaction in this thread.
+ (WebCore::DatabaseThread::recordDatabaseClosed): Removes a database from the set of open databases.
+ * storage/DatabaseThread.h:
+ (WebCore::DatabaseThread::getThreadID): return the thread id for the database thread.
+
+2009-07-07 Jiahua Huang <jhuangjiahua@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ [Gtk] Paste of rich text from firefox results garbled markup
+ https://bugs.webkit.org/show_bug.cgi?id=26791
+
+ Fix problem with UTF-16 clipboard pasted.
+
+ * manual-tests/gtk/paste-richtext-from-firefox.html: Added.
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::documentFragment):
+
+2009-07-07 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Change 'Continue debug' shortcut from F5 to F8 for consistency with Firebug.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23849
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+
+2009-07-06 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Update RenderThemeChromiumMac for wkDrawMediaUIPart and wkDrawMediaSlider API
+ change.
+
+ Fix compile RenderThemeChromiumMac.mm due to API changes from r45572
+ https://bugs.webkit.org/show_bug.cgi?id=27018
+
+ This is mainly an API change update to fix the chromium compile. It
+ also has a small fix of a typo in RenderThemeMac.mm.
+
+ Compilation against the head of chromium trunk passed. Since this is
+ a compile fix, that should be sufficient.
+
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::):
+ (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::):
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27002: Build fix when DASHBOARD_SUPPORT is disabled with -Wunused-parameter
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27002>
+
+ Reviewed by Geoff Garen.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
+ Mark gradient as an unused parameter when DASHBOARD_SUPPORT is
+ disabled.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27001: Fix improper use of PassRefPtr<Node> to RefPtr<Node>
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27001>
+
+ Reviewed by Geoff Garen.
+
+ PassRefPtr<> should only be used for arguments to functions that
+ take ownership of the object, or as return values from functions
+ that relinquish ownership of the object.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::increaseSelectionListLevelOrdered): Changed
+ stack-allocated PassRefPtr<Node> to RefPtr<Node> and call
+ release() on returned object.
+ (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
+
+2009-07-06 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7035474> Make new media controller UI default on SnowLeopard
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+ New media controller UI is enabled by default on SnowLeopard.
+
+2009-07-06 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, build fix.
+
+ Roll out r45559 to fix Chromium canary.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26857
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp: Removed.
+ * bindings/v8/V8Binding.h:
+ (WebCore::toInt32):
+ (WebCore::toWebCoreString):
+ (WebCore::fromWebCoreString):
+ (WebCore::toWebCoreStringWithNullCheck):
+ (WebCore::isUndefinedOrNull):
+ (WebCore::v8Boolean):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::V8Proxy::compileScript):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-06 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7008093> Media controller can’t be used to scrub when movie is
+ narrow — track is too narrow
+
+ Do not show media controller time display elements when the a movie is too narrow.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
+ Give current time and time remaining controls a common base class.
+ (WebCore::MediaControlTimeDisplayElement::setVisible):
+ New method, hide and show the element.
+ * rendering/MediaControlElements.h:
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia):
+ Initialize m_previousVisible.
+ (WebCore::RenderMedia::layout):
+ Show/hide the time display elements as the movie width changes.
+ (WebCore::RenderMedia::createCurrentTimeDisplay):
+ (WebCore::RenderMedia::createTimeRemainingDisplay):
+ Base class is now MediaControlTimeDisplayElement, not MediaControlElement.
+ (WebCore::RenderMedia::shouldShowTimeDisplayControls):
+ New, decide if time display elements should be visible or not.
+ * rendering/RenderMedia.h:
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::):
+ (WebCore::RenderThemeMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeMac::paintMediaMuteButton):
+ (WebCore::RenderThemeMac::paintMediaPlayButton):
+ (WebCore::RenderThemeMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeMac::paintMediaSliderThumb):
+ (WebCore::RenderThemeMac::paintMediaRewindButton):
+ (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
+ (WebCore::RenderThemeMac::paintMediaControlsBackground):
+ (WebCore::RenderThemeMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeMac::paintMediaTimeRemaining):
+ The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27000: Minor clean up to runtime_root.{cpp|h}
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27000>
+
+ Reviewed by Geoff Garen.
+
+ * bridge/runtime_root.cpp: Added blank line between license and
+ the first #include statement.
+ * bridge/runtime_root.h: Added comment to #endif.
+
+2009-07-06 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ generalize the special height treatment for SVG (to be re-used for ruby):
+ renamed InlineBox::m_isSVG to m_hasVirtualHeight
+ renamed InlineBox::isSVG() to hasVirtualHeight()
+ renamed InlineBox::setIsSVG() to setHasVirtualHeight()
+
+ * rendering/InlineBox.cpp:
+ (WebCore::InlineBox::height):
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::InlineBox):
+ (WebCore::InlineBox::isText):
+ (WebCore::InlineBox::setIsText):
+ (WebCore::InlineBox::isSVGRootInlineBox):
+ (WebCore::InlineBox::hasVirtualHeight):
+ (WebCore::InlineBox::setHasVirtualHeight):
+ (WebCore::InlineBox::virtualHeight):
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::createFlowBox):
+ * rendering/RenderSVGInlineText.cpp:
+ (WebCore::RenderSVGInlineText::createTextBox):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::createRootBox):
+ * rendering/SVGInlineFlowBox.h:
+ (WebCore::SVGInlineFlowBox::virtualHeight):
+ * rendering/SVGInlineTextBox.h:
+ (WebCore::SVGInlineTextBox::virtualHeight):
+ * rendering/SVGRootInlineBox.h:
+ (WebCore::SVGRootInlineBox::virtualHeight):
+
+2009-07-06 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r45285): focus rings are black on windows safari
+ https://bugs.webkit.org/show_bug.cgi?id=26821
+ <rdar://problem/7018252>
+
+ Add a mechanism for setting a custom focus ring color, and relocate the
+ determination of focus ring color to base class RenderTheme.
+
+ No new tests. Already-existing tests run in pixel mode would have caught this regression
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Move the responsibility
+ of determining focus color to base class RenderTheme.
+ * rendering/RenderTheme.cpp:
+ (WebCore::customFocusRingColor): Added static local.
+ (WebCore::RenderTheme::setCustomFocusRingColor): Added
+ (WebCore::RenderTheme::focusRingColor): Use custom color over platform color.
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::platformFocusRingColor): default implementation, black color
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderTheme::themeForPage): Circumstances that lead to returning the RenderThemeWin
+ are the same under which we want to use the focus ring color from SafariTheme.
+ (WebCore::RenderThemeSafari::platformFocusRingColor): Renamed from focusRingColor
+ * rendering/RenderThemeSafari.h:
+
+ Renaming focusRingColor to platformFocusRingColor in these files:
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::platformFocusRingColor):
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::platformFocusRingColor):
+ * rendering/RenderThemeChromiumSkia.h:
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::platformFocusRingColor):
+
+ Cleanup leftover from removal of WebCore::Color in r45285 in these files:
+ * WebCore.order:
+ * platform/graphics/Color.h:
+
+2009-07-06 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Bug 15135: REGRESSION (r19843-r19850): Changing a flexbox's
+ contents makes its container scroll to the top
+ https://bugs.webkit.org/show_bug.cgi?id=15135
+
+ Delay updateing scroll bar of descendants of flexbox until their
+ positions are determined. In this way we can prevent descendants
+ of flexible boxes from changing positions of their scrollbars
+ using tentative positions.
+
+ Test: fast/flexbox/repaint-scrollbar.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::startDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::updateScrollInfoAfterLayout):
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::layoutOnlyPositionedObjects):
+ * rendering/RenderBlock.h:
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+
+2009-07-06 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Make unconfirmed IME text affect textarea's value.
+ This matches input and contentEditable elements as well
+ IE and Firefox.
+
+ This fixes https://bugs.webkit.org/show_bug.cgi?id=25061.
+
+ Input elements would go down this code path because it
+ would always get a null compositionNode from frame->editor().
+ Special casing compositionNodes is wrong because we explicitly
+ want unconfirmed IME input in the textarea's value (assuming we
+ want to match IE and Firefox here).
+
+ This change is originally created by Ojan Vafai <ojan@chromium.org> and
+ I just changed its manual tests with an automated test on his behalf.
+
+ Test: platform/mac/editing/input/text-control-ime-input.html
+
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::text):
+ (WebCore::RenderTextControl::textWithHardLineBreaks):
+
+2009-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Add the ability for wheel events to latch to a node.
+
+ * WebCore.base.exp:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::EventHandler):
+ (WebCore::EventHandler::clear):
+ (WebCore::EventHandler::handleWheelEvent):
+ * page/EventHandler.h:
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::wheelEvent):
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
+2009-07-06 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a bunch of layout test crahses in Chromium caused by a bad usage of DEFINE_STATIC_LOCAL.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26997
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8ValueToWebCoreString): Use a regular static declaration instead of DEFINE_STATIC_LOCAL.
+
+2009-07-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: suggest global properties based on async evaluation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26976
+
+ Before this change, empty string was evaluated to the global object
+ (or scope chain object) synchronously. This is now fixed and global
+ object is evaluated using the same control flow.
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype.completions):
+ (WebInspector.Console.prototype._evalInInspectedWindow):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._variablesInScope):
+
+2009-07-06 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix crash when indenting in an empty table cell.
+ https://bugs.webkit.org/show_bug.cgi?id=26872
+
+ The crash is that we would call splitTreeToNode where the node
+ and the nodeToSplitTo were the same node.
+
+ Test: editing/execCommand/indent-empty-table-cell.html
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::splitTreeToNode):
+ Added an assert in that node and nodeToSplitTo
+ are different nodes to make this assumption explicit.
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::isAtUnsplittableElement):
+ (WebCore::IndentOutdentCommand::indentRegion):
+ * editing/IndentOutdentCommand.h:
+
+2009-07-06 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Upstream V8Binding and update some function names.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26857
+
+ * bindings/scripts/CodeGeneratorV8.pm: Update function names in auto-generated files.
+ * bindings/v8/V8Binding.cpp: Upstreamed from src.chromium.org.
+ * bindings/v8/V8Binding.h: Upstreamed from src.chromium.org.
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::V8Proxy::compileScript):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-06 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Jan Alonzo.
+
+ Use soup's content sniffing
+ https://bugs.webkit.org/show_bug.cgi?id=26982
+
+ Drop our hackish content sniffing code, and use the new libsoup
+ feature to do that job for us.
+
+ Testing this is in a cross-platform way is not obvious or possible
+ while we are using platform-specific code for sniffing.
+
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::gotHeadersCallback):
+ (WebCore::contentSniffedCallback):
+ (WebCore::gotChunkCallback):
+ (WebCore::ResourceHandle::startHttp):
+
+2009-07-05 Antonio Gomes <antonio.gomes@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r40499): fast/dom/cssTarget-crash.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=20342
+
+ Re-added code removed by commit r40499.
+ Without this, both Qt and Mac were crashing while running the test.
+
+ Note that this does not entirely fix the bug. It fixes the WebCore
+ crash, but the test no longer seems to work due to loader changes.
+ So this patch does not reenable the test. The test probably has to
+ be rewritten.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::removedFromDocument): Re-added code to
+ set the CSS target of the document to 0.
+
+2009-07-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26943
+
+ When one transition finishes slightly before another the longer
+ one will fire a second time. This is because the second
+ ImplicitAnmation object is culled too early, before its final
+ RenderStyle is in place. This is done by cleanupFinishedAnimations()
+ so I got rid of that method completely and now cleanup each
+ transition or animation at the point where I am setting the final
+ style, or when I detect that the transition or animation has been
+ terminated early (which happens when you remove it from the style).
+
+ Test: transitions/extra-transition.html
+
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ * page/animation/CompositeAnimation.h:
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::getTimeToNextEvent):
+ Avoid a divide by zero if m_animation->duration() is zero, which can happen
+ if the duration is changed to zero while the animation is running.
+
+2009-07-05 Simon Fraser <simon.fraser@apple.com>
+
+ Revert the previous commit because it broke the
+ animations/transition-and-animation-1.html
+ testcase.
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::getTimeToNextEvent):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ (WebCore::CompositeAnimation::cleanupFinishedAnimations):
+ * page/animation/CompositeAnimation.h:
+
+2009-07-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26943
+
+ When one transition finishes slightly before another the longer
+ one will fire a second time. This is because the second
+ ImplicitAnmation object is culled too early, before its final
+ RenderStyle is in place. This is done by cleanupFinishedAnimations()
+ so I got rid of that method completely and now cleanup each
+ transition or animation at the point where I am setting the final
+ style, or when I detect that the transition or animation has been
+ terminated early (which happens when you remove it from the style).
+
+ Test: transitions/extra-transition.html
+
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ * page/animation/CompositeAnimation.h:
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::getTimeToNextEvent):
+ Avoid a divide by zero if m_animation->duration() is zero, which can happen
+ if the duration is changed to zero while the animation is running.
+
+2009-07-05 Lars Knoll <lars.knoll@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26843
+
+ Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
+
+ The Metrowerks compiler on the Symbian platform moves the globally
+ defined Hashtables into read-only memory, despite one of the members
+ being mutable. This causes crashes at run-time due to write access to
+ read-only memory.
+
+ Avoid the use of const with this compiler by introducing the
+ JSC_CONST_HASHTABLE macro.
+
+ Based on idea by Norbert Leser.
+
+ * bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables
+ define in the bindings.
+
+2009-07-05 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 26897 - Dynamic SVG images do not display correctly
+ https://bugs.webkit.org/show_bug.cgi?id=26897
+
+ Use repaint() to fix a rendering problem with a SVG image embedded in xhtml.
+
+ Test: svg/custom/createImageElement2.xhtml
+
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::imageChanged):
+
+2009-07-05 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26960
+ [Gtk] caret offset not updated when selecting text
+
+ Report the caret offset from the end of the selection so it works
+ correctly for multi-char selections too (ie, anything that is not
+ the zero width caret).
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_text_get_caret_offset):
+
+2009-07-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Unreviewed link fix for Qt.
+
+ Fix Qt link error by adding two new localized strings
+
+ In r45474 two new strings got added to LocalizedStrings.h add
+ the definition of them to Qt.
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+
+2009-07-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION (r44670-r44680): Typing is suprisingly slow in password field on reddit.com
+ https://bugs.webkit.org/show_bug.cgi?id=26959
+ rdar://problem/7029882
+
+ The code to handle iteration boundaries was malfunctioning when the boundary was
+ at the edge of a shadow tree. This happens all the time with <input> elements.
+
+ It's not immediately obvious how to make a regression test for this since the
+ symptom was a performance problem, not incorrect behavior. I'll add a test if I
+ figure out a way to make one.
+
+ * editing/TextIterator.cpp:
+ (WebCore::parentCrossingShadowBoundaries): Renamed from parentOrShadowParent.
+ (WebCore::depthCrossingShadowBoundaries): Updated for name change.
+ (WebCore::nextInPreOrderCrossingShadowBoundaries): Added.
+ (WebCore::previousInPostOrderCrossingShadowBoundaries): Added.
+ (WebCore::setUpFullyClippedStack): Updated for name change.
+ (WebCore::TextIterator::TextIterator): Updated for name change. Use
+ nextInPreOrderCrossingShadowBoundaries instead of Range::pastLastNode to fix the bug.
+ (WebCore::TextIterator::advance): Updated for name change.
+ (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
+ Tweaked formatting.
+ (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto. Changed code that
+ initializes m_pastStartNode to use previousInPostOrderCrossingShadowBoundaries.
+ (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Tweaked formatting.
+ (WebCore::SimplifiedBackwardsTextIterator::exitNode): Ditto.
+
+2009-07-03 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Background audio stops playing when JS GC runs
+ https://bugs.webkit.org/show_bug.cgi?id=26956
+
+ Ensure we keep the Audio object around while it is playing, so that it
+ doesn't get collected.
+
+ Not testable because there's no way to know whether the audio keeps
+ playing without holding a reference to it.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::isObservableThroughDOM):
+
+2009-07-02 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26814
+ [Gtk] Caret-moved events are not issued for the correct offset
+ when text is selected forward
+
+ Report the caret offset from the end of the selection, otherwise
+ we'll report the same offset when moving the caret while
+ modififying the selection (eg, with Shift + Right).
+
+ * editing/gtk/SelectionControllerGtk.cpp:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+
+2009-07-02 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26815
+ [Gtk] text-selection-changed events are not issued for the correct
+ object when the selection spans multiple objects
+
+ Get the focused node from the end of the selection, not the start,
+ so we can detect when we cross object boundaries.
+
+ * editing/gtk/SelectionControllerGtk.cpp:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26947
+
+ Fix the media controls hit tests. They may lose click events.
+
+ Test cases already covered in the video-controls-zoomed tests.
+
+ Don't trust wkHitTestMediaUIPart for the tests. We are accurate enough.
+
+ * rendering/RenderThemeMac.h: Remove hitTestMediaControlPart.
+ * rendering/RenderThemeMac.mm: Remove hitTestMediaControlPart.
+
+2009-07-02 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Eric Seidel.
+
+ RenderBlock and RenderInline have confusingly named object creation methods:
+ RenderBlock::createRootBox/createRootInlineBox
+ RenderInline::createFlowBox/createInlineFlowBox
+ where the 2nd method in both cases just calls the first and then appends the created object.
+ I therefore renamed those methods to something IMHO more informative:
+
+ createRootBox() -> createRootInlineBox()
+ createRootInlineBox() -> createAndAppendRootInlineBox();
+ createFlowBox() -> createInlineFlowBox();
+ createInlineFlowBox() -> createAndAppendInlineFlowBox();
+
+ https://bugs.webkit.org/show_bug.cgi?id=26828
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::createRootInlineBox):
+ (WebCore::RenderBlock::createAndAppendRootInlineBox):
+ * rendering/RenderBlock.h:
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::createInlineFlowBox):
+ (WebCore::RenderInline::createAndAppendInlineFlowBox):
+ * rendering/RenderInline.h:
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::createInlineFlowBox):
+ * rendering/RenderSVGInline.h:
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::createRootInlineBox):
+ * rendering/RenderSVGText.h:
+ * rendering/bidi.cpp:
+ (WebCore::createInlineBoxForRenderer):
+
+2009-07-02 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fix typo in the resource panel enabler caption.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26753
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+
+2009-07-02 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ [Win] HTML5 Drag and drop, dragend is not fired when pressing Esc
+ https://bugs.webkit.org/show_bug.cgi?id=26699
+
+ * manual-tests/drag-escape.html: Added.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dragSourceEndedAt):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26944
+
+ Make sure we support full page zoom in video controls.
+
+ This is tracked by a the video-controls-zoom test case.
+
+ * css/mediaControlsQT.css: Make sure we don't have any inherited margin.
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::updateStyle): Propagate the style to the innertext.
+ * rendering/RenderThemeMac.mm: Adjust the painting rect.
+ (WebCore::getUnzoomedRectAndAdjustCurrentContext):
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeMac::paintMediaTimeRemaining):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Fix the Gtk build after r45474. The localized strings should
+ have been added there.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26939
+
+ Media controller is rendered badly at http://www.mozilla.com/en-US/firefox/video/firefox-3.5.html
+
+ We fix two things:
+ - We use px instead of em, because px is used everywhere else
+ and because 0.09em hit the font size limit.
+ - We use -webkit-box instead of inline-block because in strict mode
+ inline-block has a different behavior.
+
+ Test: media/controls-strict.html
+
+ * css/mediaControlsQT.css:
+
+2009-07-02 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ TextIterator should use hasOverflowClip when checking for overflow instead of looking at the style.
+ https://bugs.webkit.org/show_bug.cgi?id=26942
+
+ * editing/TextIterator.cpp:
+ (WebCore::fullyClipsContents):
+
+2009-07-02 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for <rdar://problem/5230700>
+ Remove local .xhtml file workaround
+
+ * platform/network/mac/ResourceResponseMac.mm:
+ (WebCore::ResourceResponse::platformLazyInit): Work around is no longer necessary.
+
+2009-07-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Sort, add functions used by WebKit.
+
+ * WebCore.base.exp:
+
+2009-07-02 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Sam Weinig.
+
+ More of <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
+
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (webNSURLResponseMIMEType): Give Tiger a chance to query the UTI machinery.
+
+2009-07-02 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: fix complex text rendering with line break characters.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26935
+
+ If the CSS white-space property is inhibiting line breaking, we might
+ find end-of-line characters rendered via the complex text path. Fonts
+ don't provide glyphs for these code points so, if we find one, we
+ simulate the space glyph being interposed in this case. Because the
+ input is variable-length per code point, we walk the input in step
+ with the output.
+
+ Covered by:
+ LayoutTests/fast/text/international/bidi-linebreak-002.html
+ LayoutTests/fast/text/international/bidi-linebreak-003.html
+ LayoutTests/fast/text/international/hindi-whitespace.html
+
+ * platform/graphics/chromium/HarfbuzzSkia.cpp:
+ (WebCore::stringToGlyphs):
+
+2009-07-02 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26521
+ Expose file size to chromium.
+
+ Implement getFileSize() for Chromium.
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/FileSystemChromium.cpp:
+ (WebCore::getFileSize):
+
+2009-07-02 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, build fix.
+
+ * bindings/v8/V8SVGPODTypeWrapper.h: Lost a space in nested template argument list.
+
+2009-07-02 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix: add missing #include.
+
+ * platform/mac/ThemeMac.mm:
+
+2009-07-02 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/7028682> ThemeMac::paintRadio() throws Obj-C exceptions when zoomed
+
+ Add BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS guards around code
+ that can possibly throw Objective-C exceptions when drawing Mac form controls.
+
+ * platform/mac/ThemeMac.mm:
+ (WebCore::paintCheckbox):
+ (WebCore::paintRadio):
+ (WebCore::paintButton):
+ (WebCore::ThemeMac::inflateControlPaintRect):
+
+2009-07-02 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Upstream V8SVGPODTypeWrapper.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26907
+
+ * bindings/scripts/CodeGeneratorV8.pm: Update function being renamed in V8SVGPODTypeWrapper.h.
+ * bindings/v8/V8SVGPODTypeWrapper.h: Upstreamed from src.chromium.org.
+
+2009-07-02 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adds an abstraction layer between the DB classes and the file
+ system, which allows us to add our own logic for storing, opening,
+ deleting, etc. databases.
+
+ The patch was tested using the tests in WebCore/storage.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26054
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/sql/SQLiteDatabase.cpp:
+ (WebCore::SQLiteDatabase::open): Delegating the job of opening DB files to SQLiteFileSystem to allow use of custom VFSs.
+ * platform/sql/SQLiteFileSystem.cpp: Added.
+ * platform/sql/SQLiteFileSystem.h: Added.
+ * platform/win/FileSystemWin.cpp:
+ (WebCore::directoryName): Implemented.
+ * storage/Database.cpp:
+ (WebCore::Database::databaseSize): The code that returns the size of a DB file moved to SQLiteFileSystem.
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::DatabaseTracker): Added the ability to register a custom SQLite VFS.
+ (WebCore::DatabaseTracker::trackerDatabasePath): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::openTrackerDatabase): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::originPath): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::fullPathForDatabase): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::usageForDatabase): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::deleteOrigin): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::deleteDatabaseFile): DB file-related operations moved to SQLiteFileSystem.
+ * storage/OriginUsageRecord.cpp:
+ (WebCore::OriginUsageRecord::diskUsage): DB file-related operations moved to SQLiteFileSystem.
+
+2009-07-02 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Always clip replaced elements to border radii.
+ https://bugs.webkit.org/show_bug.cgi?id=26933
+
+ Make sure to always clip replaced elements to border radii, even when overflow is visible.
+ Stop defaulting those elements to overflow:hidden in the UA sheet, since it is now no longer
+ necessary.
+
+ Covered by existing tests (since the UA default changing keeps the behavior exactly the same).
+
+ * css/html.css:
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::paint):
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint):
+
+2009-07-02 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ convertFromScrollbarToContainingView and friends should be in ScrollView
+ https://bugs.webkit.org/show_bug.cgi?id=26929
+
+ This is breaking Chromium's build because PopupMenuChromium inherits
+ from ScrollView, but these functions are pure virtual in it. I could
+ put it directly in PopupMenuChromium, but that seems a bit silly since
+ the functions are fairly generic.
+
+ Passes existing layout tests.
+
+ * page/FrameView.cpp: Remove the 4 functions Hyatt just added
+ (IntRect WebCore::FrameView::convertFromScrollbarToContainingView):
+ (IntRect WebCore::FrameView::convertFromContainingViewToScrollBar):
+ (IntPoint WebCore::FrameView::convertFromScrollbarToContainingView):
+ (IntPoint WebCore::FrameView::convertFromContainingViewToScrollBar):
+ * page/FrameView.h: ditto
+ * platform/ScrollView.cpp: Move the 4 functions from FrameView here
+ (IntRect WebCore::ScrollView::convertFromScrollbarToContainingView):
+ (IntRect WebCore::ScrollView::convertFromContainingViewToScrollBar):
+ (IntPoint WebCore::ScrollView::convertFromScrollbarToContainingView):
+ (IntPoint WebCore::ScrollView::convertFromContainingViewToScrollBar):
+ * platform/ScrollView.h: ditto
+
+2009-07-02 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=26088 - TransparencyWin
+ doesn't handle errors well at all; revise it to fail silently
+ (drawing nothing), and bulletproof FontChromiumWin to handle the
+ failure accordingly.
+
+ Tests: fast/text/text-large-negative-letter-spacing-with-opacity.html
+ fast/text/text-letter-spacing.html
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
+ (WebCore::Font::drawGlyphs):
+ (WebCore::Font::drawComplexText):
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::TransparencyWin):
+ (WebCore::TransparencyWin::setupLayerForNoLayer):
+ (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
+ (WebCore::TransparencyWin::setupLayerForWhiteLayer):
+ (WebCore::TransparencyWin::setupTransformForKeepTransform):
+ (WebCore::TransparencyWin::setupTransformForScaleTransform):
+ (WebCore::TransparencyWin::initializeNewContext):
+ (WebCore::TransparencyWin::compositeOpaqueComposite):
+ (WebCore::TransparencyWin::compositeTextComposite):
+ (WebCore::TransparencyWin::makeLayerOpaque):
+ * platform/graphics/chromium/TransparencyWin.h:
+ (WebCore::TransparencyWin::platformContext):
+
+2009-07-02 Eric Carlson <eric.carlson@apple.com>
+
+ Change #import to #include to fix non-ObjC builds.
+
+ * rendering/MediaControlElements.cpp:
+
+2009-07-02 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (mimeTypeFromUTITree):
+
+2009-07-02 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for bug 22119, clicks in the scrollbars of transformed content don't work. Add new
+ conversion methods for going across parent/child widget boundaries that can be implemented
+ by the FrameView and ScrollbarClient to be transform-aware.
+
+ Test cases added in platform/mac/fast/forms and platform/mac/fast/overflow.
+
+ * WebCore.base.exp:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::convertFromScrollbarToContainingView):
+ (WebCore::FrameView::convertFromContainingViewToScrollbar):
+ (WebCore::FrameView::convertFromRenderer):
+ (WebCore::FrameView::convertToRenderer):
+ (WebCore::FrameView::convertToContainingView):
+ (WebCore::FrameView::convertFromContainingView):
+ * page/FrameView.h:
+ * platform/ScrollView.h:
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::convertToContainingView):
+ (WebCore::Scrollbar::convertFromContainingView):
+ * platform/Scrollbar.h:
+ * platform/ScrollbarClient.h:
+ (WebCore::ScrollbarClient::convertFromScrollbarToContainingView):
+ (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar):
+ * platform/Widget.cpp:
+ (WebCore::Widget::convertFromContainingWindow):
+ (WebCore::Widget::convertToContainingWindow):
+ (WebCore::Widget::convertFromRootToContainingWindow):
+ (WebCore::Widget::convertFromContainingWindowToRoot):
+ (WebCore::Widget::convertToContainingView):
+ (WebCore::Widget::convertFromContainingView):
+ * platform/Widget.h:
+ * platform/graphics/IntPoint.h:
+ (WebCore::IntPoint::move):
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::convertFromRootToContainingWindow):
+ (WebCore::Widget::convertFromContainingWindowToRoot):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::isPointInOverflowControl):
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::convertFromScrollbarToContainingView):
+ (WebCore::RenderDataGrid::convertFromContainingViewToScrollbar):
+ * rendering/RenderDataGrid.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::convertFromScrollbarToContainingView):
+ (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
+ (WebCore::RenderLayer::scrollbarOffset):
+ (WebCore::RenderLayer::hitTestOverflowControls):
+ * rendering/RenderLayer.h:
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::isPointInOverflowControl):
+ (WebCore::RenderListBox::convertFromScrollbarToContainingView):
+ (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
+ * rendering/RenderListBox.h:
+
+2009-07-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt and Simon Fraser.
+
+ - fix <rdar://problem/6933052> SPOD playing video in a div with a box
+ shadow
+
+ Test: fast/box-shadow/transform-fringing.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintBoxShadow): Clip out the
+ box even if it has an opaque background, but in that case, inset the
+ clip path by 1 pixel, to avoid antialiasing artifacts.
+ Do not inset the clip rect by 1 pixel if the CTM is purely a
+ translation.
+ Move the shadow-casting path away in the non-rounded-rect case (it
+ was already being done in the rounded-rect case), to avoid a black
+ fringe when the CTM is not purely a translation.
+
+2009-07-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
+
+ Walk the CoreTypes UTI tree for extensions with unknown MIME types, using the first MIME type found.
+
+ For many types of text files (such as source code files) this ends up being text/plain.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Tweak the logging output.
+
+ * platform/network/mac/WebCoreURLResponse.h:
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (mimeTypeFromUTITree):
+ (webNSURLResponseMIMEType): Use mimeTypeFromUTITree() to find a UTI-based MIME type for this file's extension.
+ (-[NSURLResponse _webcore_reportedMIMEType]): Return the actual MIME type that CFNetwork gave us.
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6518119>
+
+ Add a rewind button and hide the timeline for live broadcasts when
+ in MediaUI mode.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType): Ditto.
+ * css/CSSSelector.h:
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
+
+ * css/CSSValueKeywords.in: Ditto.
+ * css/mediaControls.css: Ditto.
+ * css/mediaControlsQT.css: Ditto.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::rewind): New.
+ (WebCore::HTMLMediaElement::returnToRealTime): New.
+ (WebCore::HTMLMediaElement::isStreaming): New.
+ * html/HTMLMediaElement.h:
+
+ * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.
+
+ * platform/LocalizedStrings.h: Add localized media state messages.
+
+ * platform/ThemeTypes.h: Add the new pseudo element.
+
+ * platform/mac/LocalizedStringsMac.mm:
+ (WebCore::mediaElementLoadingStateText): Add localized media state.
+ (WebCore::mediaElementLiveBroadcastStateText): Ditto.
+
+ * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support
+ multiple states.
+ * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::MediaControlElement): Deal with new elements.
+ (WebCore::MediaControlElement::attachToParent): Ditto.
+ (WebCore::MediaControlElement::update): Ditto.
+ (WebCore::MediaControlElement::updateStyle): Ditto.
+ (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
+ (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto.
+ (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
+ (WebCore::MediaControlStatusDisplayElement::update): Ditto.
+ (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto.
+ (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto.
+ (WebCore::MediaControlInputElement::attachToParent): Ditto.
+ (WebCore::MediaControlInputElement::updateStyle): Ditto.
+ (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
+ (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto.
+ (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
+ (WebCore::MediaControlTimelineElement::update): Ditto.
+ (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
+ * rendering/MediaControlElements.h: Ditto.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::styleDidChange): Deal with the new elements.
+ (WebCore::RenderMedia::createPanel): Ditto.
+ (WebCore::RenderMedia::createRewindButton): Ditto.
+ (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto.
+ (WebCore::RenderMedia::createStatusDisplay): Ditto.
+ (WebCore::RenderMedia::createTimelineContainer): Ditto.
+ (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto.
+ (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto.
+ (WebCore::RenderMedia::updateControls): Ditto.
+ (WebCore::RenderMedia::forwardEvent): Ditto.
+ * rendering/RenderMedia.h:
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint): Deal with the new elements.
+
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements.
+ (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto.
+ (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.
+
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements.
+ (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
+ (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
+
+ * rendering/style/RenderStyleConstants.h: Add constants for the new elements.
+
+2009-07-01 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Small refactoring of MessagePortChannel so that PlatformMessagePortChannel
+ may be defined at the WebKit layer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26905
+
+ * dom/MessageChannel.cpp:
+ (WebCore::MessageChannel::MessageChannel):
+ * dom/MessagePortChannel.cpp:
+ * dom/MessagePortChannel.h:
+ * dom/default/PlatformMessagePortChannel.cpp:
+ (WebCore::MessagePortChannel::createChannel):
+ (WebCore::MessagePortChannel::create):
+ (WebCore::MessagePortChannel::MessagePortChannel):
+ (WebCore::MessagePortChannel::~MessagePortChannel):
+
+2009-07-01 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <video> fails to show on http://camendesign.com/code/video_for_everybody
+ <rdar://problem/7026010>
+ https://bugs.webkit.org/show_bug.cgi?id=26919
+
+ Fix an issue introduced in r44961. In that revision we changed to only update
+ compositing layer geometry when all siblings had been laid out (i.e. we pushed
+ the updates one level down). However, that left out the root layer, so this
+ fix ensures that the root layer geometry gets updated at the end.
+
+ Test: compositing/geometry/root-layer-update.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+
+2009-07-01 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
+
+ First part of fix: when outline width changes, don't to a synchronous
+ layer update right away, but just set the flag to say that compositing
+ layers need updating. The synchronous layer update left the layer geometries
+ out of whack when it happened in the middle of layout (e.g. when inside ::first-letter).
+
+ Test: compositing/geometry/outline-change.html
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setMaximalOutlineSize):
+
+2009-07-01 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26842
+ Build fix when ENABLE_DATABASE is off
+
+ Move Database.h into ENABLE(DATABASE) guard so toggling ENABLE_DATABASE
+ off does not break builds.
+
+ * bindings/js/ScriptObjectQuarantine.cpp:
+
+2009-07-01 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26899
+
+ Modified XSSAuditor::decodeURL to only remove null characters so that
+ it is consistent with the behavior of HTMLTokenizer and prevents
+ injected scripts that contain control characters.
+
+ Tests: http/tests/security/xssAuditor/script-tag-control-char.html
+ http/tests/security/xssAuditor/script-tag-null-char.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::decodeURL): Modified to only remove null characters.
+ * page/XSSAuditor.h: Reverted naming of third argument of method XSSAuditor::decodeURL
+ from allowControlCharacters back to allowNullCharacters.
+ * platform/network/ResourceResponseBase.cpp: Reverted back to rev #45003.
+ (WebCore::isControlCharacter):
+ * platform/network/ResourceResponseBase.h: Reverted back to rev #45003.
+
+2009-07-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ - supported keyboard shortcuts compatible with Firebug in Scripts Debugger:
+ F5, Ctrl+/ (win,lin), Command+/ (mac) - continue
+ F10, Ctrl+' (win, lin), Command+' (mac) - step over
+ F11, Ctrl+; (win, lin), Command+; (mac) - step into
+ Shift+F11, Ctrl+Shift+; (win, lin), Command+Shift+; (mac) - step out
+
+ - added call stack navigation shortcuts:
+ Ctrl+. - next call frame
+ Ctrl+, - previouse call frame
+
+ https://bugs.webkit.org/show_bug.cgi?id=23849
+
+ * inspector/front-end/CallStackSidebarPane.js:
+ (WebInspector.CallStackSidebarPane):
+ (WebInspector.CallStackSidebarPane.prototype.handleKeyEvent):
+ (WebInspector.CallStackSidebarPane.prototype._selectNextCallFrameOnStack):
+ (WebInspector.CallStackSidebarPane.prototype._selectPreviousCallFrameOnStack):
+ (WebInspector.CallStackSidebarPane.prototype._selectedPlacardByIndex):
+ (WebInspector.CallStackSidebarPane.prototype._selectedCallFrameIndex):
+ * inspector/front-end/KeyboardShortcut.js: Added.
+ (WebInspector.KeyboardShortcut):
+ (WebInspector.KeyboardShortcut.makeKey):
+ (WebInspector.KeyboardShortcut.makeKeyFromEvent):
+ (WebInspector.KeyboardShortcut.makeKeyFromCodeAndModifiers_):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.handleKeyEvent):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2009-07-01 Daniel Erat <derat@google.com>
+
+ Reviewed by David Levin.
+
+ Chromium Linux: Move the scrollbar thumb on middle-click.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26910
+ http://code.google.com/p/chromium/issues/detail?id=11976
+
+ Tested by building Chrome and checking that the scrollbar moves as expected.
+
+ * platform/chromium/ScrollbarThemeChromium.cpp:
+ * platform/chromium/ScrollbarThemeChromium.h:
+ * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+ * platform/chromium/ScrollbarThemeChromiumLinux.h:
+ * platform/chromium/ScrollbarThemeChromiumWin.cpp:
+ * platform/chromium/ScrollbarThemeChromiumWin.h:
+
+2009-07-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
+
+ * WebCore.base.exp:
+
+ * page/Settings.cpp:
+ (WebCore::Settings::setLocalFileContentSniffingEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::localFileContentSniffingEnabled):
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::start):
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
+
+2009-07-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 26909: aria-label needs to be supported
+ https://bugs.webkit.org/show_bug.cgi?id=26909
+
+ Test: accessibility/aria-label.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ * html/HTMLAttributeNames.in:
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ More datagrid columns work. Make sure columns cache both a style for the column header as well
+ as a style for the column background (behind the cells).
+
+ Hook up to CSSStyleSelector methods for obtaining the pseudo styles for columns (stubbed out and
+ unimplemented).
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::pseudoStyleForDataGridColumn):
+ (WebCore::CSSStyleSelector::pseudoStyleForDataGridColumnHeader):
+ * css/CSSStyleSelector.h:
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::setColumnList):
+ (WebCore::DataGridColumn::columnStyle):
+ (WebCore::DataGridColumn::setColumnStyle):
+ (WebCore::DataGridColumn::headerStyle):
+ (WebCore::DataGridColumn::setHeaderStyle):
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::recalcStyleForColumn):
+ (WebCore::RenderDataGrid::columnStyle):
+ (WebCore::RenderDataGrid::headerStyle):
+ (WebCore::RenderDataGrid::paintColumnHeaders):
+ * rendering/RenderDataGrid.h:
+
+2009-07-01 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7009870> After <audio> movie finishes playing, Pause button fails to change
+ back to Play button
+
+ Grab onto the current time when QTKit "ended" notification fires and use it as
+ duration from that point on as QuickTime sometimes refuses to play all the way to
+ the time it reports for duration and buffered. HTMLMediaElement assumes that there
+ more to play in this situation and tries to restart playback, endlessly.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ Rename m_duration to m_reportedDuration. Declare m_cachedDuration.
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ Rename m_duration to m_reportedDuration. Initialize m_cachedDuration.
+ (WebCore::MediaPlayerPrivate::duration):
+ Return m_cachedDuration once it has been set.
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Rename m_duration to m_reportedDuration.
+ (WebCore::MediaPlayerPrivate::didEnd):
+ Set m_cachedDuration to currentTime().
+
+2009-07-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Bug 26900: AX: Manual spell check with Command-; does not bring up suggestions
+ https://bugs.webkit.org/show_bug.cgi?id=26900
+
+ Editable web areas should have a clickpoint that uses where the selection is.
+
+ Test: accessibility/editable-webarea-context-menu-point.html
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::clickPoint):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2009-07-01 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove unused code in SVGTransformList and SVGTransformDistance
+ <https://bugs.webkit.org/show_bug.cgi?id=26891>
+
+ * svg/SVGTransformDistance.cpp:
+ (WebCore::SVGTransformDistance::SVGTransformDistance):
+ * svg/SVGTransformList.cpp:
+ * svg/SVGTransformList.h:
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Begin stubbing out functions for layout, painting and style/geometry caching on columns. Not enough
+ is implemented for this to do much of anything yet, but it should help keep patch sizes down. :)
+
+ * html/DataGridColumn.cpp:
+ (WebCore::DataGridColumn::columnChanged):
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::setId):
+ (WebCore::DataGridColumn::setLabel):
+ (WebCore::DataGridColumn::setType):
+ (WebCore::DataGridColumn::setSortable):
+ (WebCore::DataGridColumn::setSortDirection):
+ (WebCore::DataGridColumn::setColumnList):
+ (WebCore::DataGridColumn::style):
+ (WebCore::DataGridColumn::setStyle):
+ (WebCore::DataGridColumn::rect):
+ (WebCore::DataGridColumn::setRect):
+ * html/DataGridColumnList.cpp:
+ (WebCore::DataGridColumnList::DataGridColumnList):
+ (WebCore::DataGridColumnList::setDataGridNeedsLayout):
+ (WebCore::DataGridColumnList::add):
+ (WebCore::DataGridColumnList::remove):
+ (WebCore::DataGridColumnList::move):
+ (WebCore::DataGridColumnList::clear):
+ (WebCore::DataGridColumnList::primaryColumnChanged):
+ * html/DataGridColumnList.h:
+ (WebCore::DataGridColumnList::create):
+ (WebCore::DataGridColumnList::dataGrid):
+ (WebCore::DataGridColumnList::clearDataGrid):
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
+ (WebCore::HTMLDataGridColElement::findDataGridAncestor):
+ (WebCore::HTMLDataGridColElement::insertedIntoTree):
+ (WebCore::HTMLDataGridColElement::removedFromTree):
+ * html/HTMLDataGridColElement.h:
+ (WebCore::HTMLDataGridColElement::dataGrid):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ (WebCore::HTMLDataGridElement::~HTMLDataGridElement):
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::styleDidChange):
+ (WebCore::RenderDataGrid::recalcStyleForColumns):
+ (WebCore::RenderDataGrid::recalcStyleForColumn):
+ (WebCore::RenderDataGrid::styleForColumn):
+ (WebCore::RenderDataGrid::layout):
+ (WebCore::RenderDataGrid::layoutColumns):
+ (WebCore::RenderDataGrid::paintColumnHeaders):
+ (WebCore::RenderDataGrid::paintColumnHeader):
+ * rendering/RenderDataGrid.h:
+ (WebCore::RenderDataGrid::renderName):
+ (WebCore::RenderDataGrid::canHaveChildren):
+
+2009-07-01 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26807
+
+ Fixes this address by checking whether frame->document()->decoder() is null.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::findInRequest):
+
+2009-07-01 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=26885
+
+ Correctly reset history length to '0', not '1'. Old relict from early WML days.
+ Add some new WML testcases covering the use of history length (by onenterforward event handling)
+
+ Tests: wml/onenterforward-event.html
+ wml/onenterforward-inline-event.html
+ wml/ontimer-event.html
+
+ * wml/WMLPageState.cpp:
+ (WebCore::WMLPageState::reset):
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make sure setting attributes on dcol elements properly updates the corresponding DataGridColumn object.
+
+ Added new test in fast/dom/HTMLDataGridElement.
+
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::parseMappedAttribute):
+ * html/HTMLDataGridColElement.h:
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
+ even though the field is not actually focused for keyboard input
+
+ Add the concept of whether or not the Page is focused by adding a boolean to the focusController. This allows the
+ focused frame and focused node to both be cached and changed programmatically even when the Page itself doesn't
+ actually happen to have focus at that time.
+
+ * WebCore.base.exp:
+ * page/FocusController.cpp:
+ (WebCore::FocusController::FocusController):
+ (WebCore::FocusController::setFocusedFrame):
+ (WebCore::FocusController::setFocused):
+ (WebCore::FocusController::setActive):
+ * page/FocusController.h:
+ (WebCore::FocusController::isFocused):
+
+2009-07-01 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Move some API headers from WebCore.pro to headers.pri so that they
+ get installed when running make install from the build directory.
+
+ * WebCore.pro:
+
+2009-07-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Ariya Hidayat.
+
+ Ran WebKitTools/Scripts/generate-qt-inspector-resource to update the
+ qrc file with new png files from the web inspector.
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-06-30 Mark Rowe <mrowe@apple.com>
+
+ Land some code that has a hope of compiling.
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::imageSourceOptions):
+
+2009-06-30 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Flip back on block caching. Throwing away block data, while
+ a perceived memory win, is a performance hit in cases where we
+ are repainting large images (i.e. backgrounds) frequently
+ (i.e. a flash video playing on top).
+ <rdar://problem/6933515> REGRESSION(L-SL): Large JPEG images are
+ decoded on drawing, slowing down painting of sites that frequently
+ repaint e.g. because of Flash (pandora.com, Starcraft 2)
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::imageSourceOptions):
+
+2009-06-30 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Rename html4.css to html.css, since we target HTML5 now
+ https://bugs.webkit.org/show_bug.cgi?id=26873
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::loadFullDefaultStyle):
+ * css/html.css: Copied from css/html4.css.
+ * css/html4.css: Removed.
+ * css/themeWin.css:
+ * platform/Theme.h:
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
+ * rendering/RenderTheme.h:
+
+2009-06-30 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Drag and drop support
+ https://bugs.webkit.org/show_bug.cgi?id=23642
+
+ Define DragImageRef as GdkPixbuf and implement essential
+ functions which manipulate drag images.
+
+ * platform/DragImage.h:
+ * platform/gtk/DragImageGtk.cpp:
+ (WebCore::dragImageSize):
+ (WebCore::deleteDragImage):
+ (WebCore::scaleDragImage):
+ (WebCore::createDragImageFromImage):
+
+2009-06-30 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ StorageNamespace.cpp build issue
+ https://bugs.webkit.org/show_bug.cgi?id=26859
+
+ Moved #endif //ENABLE(DOM_STORAGE) position
+ so that the build doesn't fail.
+ The namespace WebCore was started after the #if ENABLE(DOM_STORAGE)
+ but closed after the #endif.
+
+ * storage/StorageNamespace.cpp:
+
+2009-06-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7020825> HTMLMediaElement should not assume seeking is only possible in
+ buffered time ranges
+
+ * html/HTMLMediaElement.cpp:
+ Don't ASSERT if the network state goes to Idle when when the ready state is
+ HaveEnoughData or higher, it is perfectly legal.
+ (WebCore::HTMLMediaElement::setReadyState):
+ Don't clear m_seeking after posting a 'seeking' event.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::seek):
+ Do nothing when asked to seek to the same time we are already seeking to. Check requested
+ seek time against maxTimeSeekable, not maxTimeLoaded.
+ (WebCore::MediaPlayerPrivate::doSeek):
+ Don't bother stopping a movie that isn't playing. Minor cleanup to make the code more readable.
+ (WebCore::MediaPlayerPrivate::seekTimerFired):
+ Check requested seek time against maxTimeSeekable, not maxTimeLoaded.
+ (WebCore::MediaPlayerPrivate::updateStates):
+ A streaming movie has as much data as it needs once it reaches "playable", so
+ set the ready state to HaveFutureData. A movie with metadata doesn't drop back
+ to "have nothing" when seeking. A streaming movie doesn't use the network when paused.
+ (WebCore::MediaPlayerPrivate::timeChanged):
+ It may not be possible to seek to a specific time in a streamed movie but when seeking
+ in a streaming movie QuickTime sets the time to closest time possible and posts a
+ timechanged notification, so update m_seekTo so we can detect when the seek completes.
+
+2009-06-30 Steve Falkenburg <sfalken@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=26860
+
+ Reviewed by Sam Weinig.
+
+ Blacklist Yahoo Application State plug-in for versions prior to 1.0.0.6.
+ Earlier versions cause corruption crashes.
+
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::isPluginBlacklisted):
+
+2009-06-30 Dean Jackson <dino@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7005207> <video> in canvas broken with ACCEL_COMPOSITING
+
+ Fix drawImage of video in CanvasRenderingContext2D when
+ accelerated compositing is enabled. This is done by
+ adding a new paint method to HTMLVideoElement that
+ is only called from canvas, which will create the software
+ renderer if necessary, but otherwise calls the regular
+ paint method. Meanwhile, add logic to the software video
+ renderer so that it can be created without calling repaint
+ every time it sees a new frame.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
+ * html/HTMLVideoElement.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::paintCurrentFrameInContext):
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie):
+ (WebCore::MediaPlayerPrivate::createQTVideoRenderer):
+ (WebCore::MediaPlayerPrivate::currentRenderingMode):
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering):
+ (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
+ (WebCore::MediaPlayerPrivate::paintCurrentFrameInContext):
+
+2009-06-30 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26858
+
+ Get <dcol> elements reflected into the datagrid's column list. Make sure columns get added/removed
+ properly. (Attribute changes are still not caught. That is coming in a separate patch.)
+
+ Added fast/dom/HTMLDataGridElement/DataGridColumns-dom.html
+
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::create):
+ (WebCore::DataGridColumn::setColumnList):
+ (WebCore::DataGridColumn::DataGridColumn):
+ * html/DataGridColumnList.cpp:
+ (WebCore::DataGridColumnList::add):
+ (WebCore::DataGridColumnList::remove):
+ (WebCore::DataGridColumnList::clear):
+ * html/DataGridColumnList.h:
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
+ (WebCore::HTMLDataGridColElement::findDatagridAncestor):
+ (WebCore::HTMLDataGridColElement::ensureColumn):
+ (WebCore::HTMLDataGridColElement::insertedIntoTree):
+ (WebCore::HTMLDataGridColElement::removedFromTree):
+ (WebCore::HTMLDataGridColElement::sortable):
+ (WebCore::HTMLDataGridColElement::setSortable):
+ * html/HTMLDataGridColElement.h:
+ (WebCore::HTMLDataGridColElement::column):
+ (WebCore::HTMLDataGridColElement::setColumn):
+ (WebCore::HTMLDataGridColElement::datagrid):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::setDataSource):
+ (WebCore::HTMLDataGridElement::dataSource):
+
+2009-06-30 Jeremy Orlow (jorlow@chromium.org)
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26852
+
+ Fix some minor build issues in the v8 bindings.
+
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
+ (WebCore::storageGetter):
+ (WebCore::storageSetter):
+ (WebCore::storageDeleter):
+ * storage/StorageArea.cpp:
+
+2009-06-30 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: use different fonts for each script run.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26853
+
+ Previously, when rendering complex text, we picked a single font which
+ could render all the glyphs needed for the run. However, this meant
+ that sometimes lines were rendered with, for example, [LATIN, THAI,
+ LATIN] and we could end up with a different font for the Latin parts
+ than for lines without Thai in them.
+
+ With this patch, we pick a font for each script run.
+
+ This change is covered by existing layout tests.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::Font::drawGlyphs):
+ (WebCore::TextRunWalker::TextRunWalker):
+ (WebCore::TextRunWalker::~TextRunWalker):
+ (WebCore::TextRunWalker::nextScriptRun):
+ (WebCore::TextRunWalker::fontPlatformDataForScriptRun):
+ (WebCore::TextRunWalker::setupFontForScriptRun):
+ (WebCore::TextRunWalker::allocHarfbuzzFont):
+ (WebCore::setupForTextPainting):
+ (WebCore::Font::drawComplexText):
+ (WebCore::Font::floatWidthForComplexText):
+ (WebCore::Font::offsetForPositionForComplexText):
+ (WebCore::Font::selectionRectForComplexText):
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+ (WebCore::FontPlatformData::setupPaint):
+
+2009-06-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt, Dan Bernstein.
+
+ <rdar://problem/6191676> Redraw issues scrolling overflow:scroll div with compositing
+
+ There are two parts to this fix. First, if a compositing layer has overflow clipping
+ or a mask, then the compositing layer does not need to be sized to encompass all
+ non-composited children.
+
+ Second, when scrolling, we have to back up to the compositing ancestor and have
+ it reposition descendant compositing layers, because overflow doesn't follow
+ the z-order tree.
+
+ Test: compositing/overflow/overflow-scroll.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ Pass the UpdateCompositingLayers flag when updating layers after layout, so that
+ we can reposition compositing layers if we're not about to do a layer rebuild.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ Only update compositing layers if the flag is set.
+
+ (WebCore::RenderLayer::scrollToOffset):
+ Do compositing layer updates from the compositing ancestor in one fell swoop.
+
+ * rendering/RenderLayer.h:
+ Replace the unused FullUpdate flag with one that allows us to specify whether
+ compositing layers should be updated.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+ * rendering/RenderLayerBacking.h:
+ New param that we can pass to updateCompositingDescendantGeometry to control
+ whether the update goes deep.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+ We can return earlier if this is not a self-painting layer.
+ If the layer has overflow clip or a mask, then the composited bounds are just the
+ local bounds, excluding descendants.
+
+ (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
+ * rendering/RenderLayerCompositor.h:
+ Renamed from updateCompositingChildrenGeometry, and added a flag that allows
+ us to do a deep update.
+
+2009-06-30 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26764
+ Uncaught NOT_FOUND_ERR: DOMException 8 loading empty text file
+
+ Test: fast/parser/empty-text-resource.html
+
+ * loader/TextDocument.cpp: (WebCore::TextTokenizer::finish): Create document tree if it
+ hasn't been created yet.
+
+2009-06-30 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Renamed scrollbarUnderPoint to scrollbarAtPoint.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::hitTestResultAtPoint):
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollbarAtPoint):
+ * platform/ScrollView.h:
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::handleMouseDownEvent):
+ (WebCore::PopupListBox::handleMouseMoveEvent):
+
+2009-06-30 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ <rdar://problem/6960286> CrashTracer: [REGRESSION] 1120 crashes in Safari at com.apple.WebCore WebCore::JSLazyEventListener::parseCode const + 62
+
+ <select> elements and other elements the produce popups can keep their popups
+ live across a page load. If this occurs and the <select> element has an
+ onchange handler it is possible to get into a state where we try to execute
+ JS on a page that no longer has an execution context.
+
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::parseCode):
+ Be paranoid and add a null check, but assert as well because we shouldn't
+ actually get to this point.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::valueChanged):
+
+2009-06-30 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25435>
+
+ Added support for sending MessagePorts to/from Workers via postMessage().
+
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::messageChannel):
+ Exposes MessageChannel constructor WorkerContext.
+ * bindings/js/JSWorkerCustom.cpp:
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Now correctly handles being instantiated from within a Worker.
+ * platform/CrossThreadCopier.h:
+ (WebCore::GenericWorkerTaskTraits<PassOwnPtr>):
+ Added support for passing PassOwnPtr as argument to GenericWorkerTask
+ * workers/GenericWorkerTask.h:
+ (WebCore::):
+ * workers/Worker.cpp:
+ (WebCore::Worker::postMessage):
+ Now handles disentangling/entangling MessagePorts sent to/from via postMessage.
+ (WebCore::Worker::dispatchMessage):
+ * workers/Worker.h:
+ * workers/Worker.idl:
+ Added an optional MessagePort argument to postMessage()
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::hasPendingActivity):
+ Workers now report pending activity whenever there are remotely entangled ports.
+ (WebCore::WorkerContext::postMessage):
+ Now handles disentangling/entangling MessagePorts sent to/from via postMessage.
+ (WebCore::WorkerContext::dispatchMessage):
+ * workers/WorkerContext.h:
+ * workers/WorkerContext.idl:
+ Added an optional MessagePort argument to postMessage()
+ * workers/WorkerContextProxy.h:
+ * workers/WorkerMessagingProxy.cpp:
+ Updated messaging infrastructure to transport an optional MessagePort/MessagePortChannel.
+ (WebCore::MessageWorkerContextTask::create):
+ (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
+ (WebCore::MessageWorkerContextTask::performTask):
+ (WebCore::MessageWorkerTask::create):
+ (WebCore::MessageWorkerTask::MessageWorkerTask):
+ (WebCore::MessageWorkerTask::performTask):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
+ * workers/WorkerMessagingProxy.h:
+ Added additional postMessage() API that accepts a MessagePort
+ * workers/WorkerObjectProxy.h:
+ Added additional postMessage() API that accepts a MessagePort
+
+2009-06-30 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium: Add complex text support on Linux.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25068
+
+ This patch adds complex text support on Linux using Harfbuzz. It's not
+ the fastest code possible: some caching of font tables will certainly
+ be required. However, it's probably the simplest code that works.
+
+ This will require checking in new baselines in the Chromium tree for
+ those layout tests which now pass.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::Font::drawGlyphs):
+ (WebCore::truncateFixedPointToInteger):
+ (WebCore::TextRunWalker::TextRunWalker):
+ (WebCore::TextRunWalker::~TextRunWalker):
+ (WebCore::TextRunWalker::reset):
+ (WebCore::TextRunWalker::setXOffsetToZero):
+ (WebCore::TextRunWalker::rtl):
+ (WebCore::TextRunWalker::setBackwardsIteration):
+ (WebCore::TextRunWalker::nextScriptRun):
+ (WebCore::TextRunWalker::glyphs):
+ (WebCore::TextRunWalker::length):
+ (WebCore::TextRunWalker::xPositions):
+ (WebCore::TextRunWalker::advances):
+ (WebCore::TextRunWalker::width):
+ (WebCore::TextRunWalker::logClusters):
+ (WebCore::TextRunWalker::numCodePoints):
+ (WebCore::TextRunWalker::widthOfFullRun):
+ (WebCore::TextRunWalker::allocHarfbuzzFont):
+ (WebCore::TextRunWalker::deleteGlyphArrays):
+ (WebCore::TextRunWalker::createGlyphArrays):
+ (WebCore::TextRunWalker::expandGlyphArrays):
+ (WebCore::TextRunWalker::shapeGlyphs):
+ (WebCore::TextRunWalker::setGlyphXPositions):
+ (WebCore::setupForTextPainting):
+ (WebCore::fontPlatformDataForTextRun):
+ (WebCore::Font::drawComplexText):
+ (WebCore::Font::floatWidthForComplexText):
+ (WebCore::glyphIndexForXPositionInScriptRun):
+ (WebCore::Font::offsetForPositionForComplexText):
+ (WebCore::Font::selectionRectForComplexText):
+ * platform/graphics/chromium/HarfbuzzSkia.cpp: Added.
+ (WebCore::SkiaScalarToHarfbuzzFixed):
+ (WebCore::stringToGlyphs):
+ (WebCore::glyphsToAdvances):
+ (WebCore::canRender):
+ (WebCore::getOutlinePoint):
+ (WebCore::getGlyphMetrics):
+ (WebCore::getFontMetric):
+ (WebCore::harfbuzzSkiaGetTable):
+
+2009-06-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7019799> Slow loading MediaDocument can fall back to plug-in unnecessarily
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Always fall back to a plug-in if m_hasUnsupportedTracks is set.
+ (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
+ Set m_hasUnsupportedTracks if we disable a track.
+
+2009-06-30 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix inverted if/else that's causing a layout test in src.chromium.org to fail.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26820
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::GCPrologueVisitor::visitDOMWrapper): if (port2), not if (!port2).
+
+2009-06-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
+ to Grid" window is clipping
+
+ Added an app-specific quirk to revert the behavior of <link> elements
+ to the way it was before r30673, namely that if the rel attribute
+ is not "stylesheet" but the type attribute contains "text/css", the
+ link behaves as a stylesheet link.
+
+ * WebCore.base.exp: Exported setTreatsAnyTextCSSLinkAsStylesheet().
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process): Check
+ Settings::treatsAnyTextCSSLinkAsStylesheet() and if true, allow a
+ style sheet link if the type contains "text/css".
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ Initialize m_treatsAnyTextCSSLinkAsStylesheet.
+ (WebCore::Settings::setTreatsAnyTextCSSLinkAsStylesheet): Added.
+ * page/Settings.h:
+ (WebCore::Settings::treatsAnyTextCSSLinkAsStylesheet): Added.
+
+2009-06-30 Adrien Nader <camaradetux@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ Fix typo in GNUMakefile.am: it reads WebCOre instead of WebCore.
+
+ * GNUmakefile.am:
+
+2009-06-30 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Turn on ENABLE_DATAGRID so we can run the layout tests.
+
+ * GNUmakefile.am:
+
+2009-06-30 Raju Kunnath <raju.kunnath@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=26752>
+
+ [Qt] Windows release build issue with Qt4.5 due to -GL flag on msvc2005 and msvc2008.
+
+ * WebCore.pro: Removed -GL compiler option for win32-msvc2005|win32-msvc2008.
+
+2009-06-30 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ Initialize member variables in the right order. Fixes compiler
+ warning.
+
+ * platform/image-decoders/bmp/BMPImageReader.cpp:
+ (WebCore::BMPImageReader::BMPImageReader):
+
+2009-06-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26831
+ Fix compiler warning in WorkerLoaderProxy.h
+
+ Forward declaration of a class within a class is not allowed,
+ since the compiler can't know if the declaration is legal at that
+ point. This gives the following compiler warning:
+
+ ../../WebCore/workers/WorkerLoaderProxy.h:40: warning: declaration
+ "class WebCore::ScriptExecutionContext::Task" does not declare
+ anything
+
+ Include the full ScriptExecutionHeader header instead.
+
+ * workers/WorkerLoaderProxy.h:
+
+2009-06-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ Remove unused function.
+
+ * plugins/gtk/PluginPackageGtk.cpp:
+
+2009-06-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Change RenderLayer::updateLayerPositions() to use a bitmask instead of two
+ boolean arguments. FullUpdate is unused at present, but will be used soon.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ (WebCore::RenderLayer::scrollToOffset):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::):
+
+2009-06-29 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix one more bad merge in V8Proxy.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26819
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setDOMException): setDOMExceptionHelper() instead of convertToV8Object().
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Remove more unused scons support.
+
+ * SConstruct: Removed.
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Fix some incorrect create functions.
+
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::create):
+ * html/DataGridColumnList.h:
+ (WebCore::DataGridColumnList::create):
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Remove initialize method from DataGridDataSource and add
+ DOMDataGridDataSource.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSDataGridDataSource.cpp:
+ * bindings/js/JSDataGridDataSource.h:
+ * bindings/js/JSHTMLDataGridElementCustom.cpp:
+ (WebCore::JSHTMLDataGridElement::setDataSource):
+ * html/DOMDataGridDataSource.cpp: Added.
+ (WebCore::DOMDataGridDataSource::DOMDataGridDataSource):
+ (WebCore::DOMDataGridDataSource::~DOMDataGridDataSource):
+ * html/DOMDataGridDataSource.h: Added.
+ (WebCore::DOMDataGridDataSource::create):
+ (WebCore::DOMDataGridDataSource::isDOMDataGridDataSource):
+ (WebCore::asDOMDataGridDataSource):
+ * html/DataGridDataSource.h:
+ (WebCore::DataGridDataSource::isDOMDataGridDataSource):
+ (WebCore::DataGridDataSource::isJSDataGridDataSource):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ (WebCore::HTMLDataGridElement::setDataSource):
+ (WebCore::HTMLDataGridElement::dataSource):
+ * html/HTMLDataGridElement.h:
+
+2009-06-29 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a couple of bad merge items from my previous V8Proxy patch.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26813
+
+ * bindings/v8/V8Collection.h:
+ (WebCore::nodeCollectionNamedPropertyGetter): Fix a bad function name that slipped through.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setDOMException): Fix a bad merge that caused a couple of lines of extraneous, breaking code to get in.
+
+2009-06-29 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26706
+
+ Fixed crash due to dereference of m_toStyle
+
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::isTargetPropertyEqual):
+
+2009-06-29 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
+
+ * WebCore.base.exp:
+ Export _wkQTMovieGetType
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::hasSingleSecurityOrigin):
+ Move to keep with other non-callback functions.
+ (WebCore::MediaPlayer::movieLoadType):
+ New, returns the movie type.
+ * platform/graphics/MediaPlayer.h:
+ Declare MovieLoadType enum and movieLoadType method.
+
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::movieLoadType):
+ Default implementation of movieLoadType
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie):
+ Don't base m_isStreaming on protocol, there are other types of streaming movies.
+ (WebCore::MediaPlayerPrivate::maxTimeBuffered):
+ Don't assume all streams are unbuffered.
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Update m_isStreaming once we have metadata.
+ (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
+ Tracks that are disabled to begin with shouldn't be included in m_enabledTrackCount.
+ (WebCore::MediaPlayerPrivate::movieLoadType):
+ New, return movie type.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ Add wkQTMovieGetType.
+
+2009-06-29 Alice Liu <alice.liu@apple.com>
+
+ Fixed <rdar://problem/6930280> Reproducible crash at USA Today photo gallery
+
+ Reviewed by Anders Carlsson.
+
+ No test added because the crash requires a flash plugin
+
+ * plugins/win/PluginMessageThrottlerWin.cpp:
+ Rely on the hWnd of the plugin to tell us whether the PluginView has
+ been deleted during execution of its wndProc.
+ (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
+
+2009-06-29 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26811
+ [Chromium] Remove a flag and functions used to enable workers in runtime.
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ * bindings/v8/WorkerContextExecutionProxy.h:
+
+2009-06-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/6976712> Text antialiasing problems when rendering into compositing layers.
+
+ Improve the appearance of text in compositing layers by making use of
+ CA's layer geometry flipping, rather that doing it ourselves with a flip
+ transform. This allows CG to use font autohinting in the layer text.
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setGeometryOrientation):
+ (WebCore::GraphicsLayer::geometryOrientation):
+ New methods to set whether this layer uses flipped geometry.
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setGeometryOrientation):
+ (WebCore::GraphicsLayerCA::geometryOrientation):
+ Subclass in order to call into CA
+
+ (WebCore::GraphicsLayerCA::setContentsLayer):
+ Now that CA is doing the geometry flipping, we no longer need to flip the content
+ layers for image and video manually
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
+ Turn on flipping on the root layer.
+
+2009-06-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=26246
+
+ Implement most WML specific <select> element features.
+ Add 'iname' / 'ivalue' support and support variable references.
+
+ Add two tests covering most select/variable related functionality.
+ Needs more tests when adding full 'iname' / 'ivalue' support (used in conjuction with onpick).
+
+ Tests: http/tests/wml/post-data-to-server.html
+ wml/select-element-variables.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::optionCount): Refactored from HTMLSelectElement::length() for use within HTML & WML.
+ * dom/SelectElement.h:
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::length): Use new SelectElement::optionCount() function. (no functional changes for HTML).
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): Activated commented code taking care of WMLSelectElement initialization.
+ * wml/WMLSelectElement.cpp: Add a bunch of new code handling WML specific feature processing.
+ (WebCore::WMLSelectElement::title):
+ (WebCore::WMLSelectElement::formControlName):
+ (WebCore::WMLSelectElement::defaultEventHandler):
+ (WebCore::WMLSelectElement::selectInitialOptions):
+ (WebCore::WMLSelectElement::calculateDefaultOptionIndices):
+ (WebCore::WMLSelectElement::selectDefaultOptions):
+ (WebCore::WMLSelectElement::initializeVariables):
+ (WebCore::WMLSelectElement::updateVariables):
+ (WebCore::WMLSelectElement::parseIndexValueString):
+ (WebCore::WMLSelectElement::valueStringToOptionIndices):
+ (WebCore::WMLSelectElement::optionIndicesToValueString):
+ (WebCore::WMLSelectElement::optionIndicesToString):
+ (WebCore::WMLSelectElement::name):
+ (WebCore::WMLSelectElement::value):
+ (WebCore::WMLSelectElement::iname):
+ (WebCore::WMLSelectElement::ivalue):
+ * wml/WMLSelectElement.h:
+
+2009-06-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Put <datagrid> behind an ifdef.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * bindings/js/JSDataGridColumnListCustom.cpp:
+ * bindings/js/JSDataGridDataSource.cpp:
+ * bindings/js/JSDataGridDataSource.h:
+ * bindings/js/JSHTMLDataGridElementCustom.cpp:
+ * html/DataGridColumn.cpp:
+ * html/DataGridColumn.h:
+ * html/DataGridColumn.idl:
+ * html/DataGridColumnList.cpp:
+ * html/DataGridColumnList.h:
+ * html/DataGridColumnList.idl:
+ * html/DataGridDataSource.h:
+ * html/HTMLDataGridCellElement.cpp:
+ * html/HTMLDataGridCellElement.h:
+ * html/HTMLDataGridCellElement.idl:
+ * html/HTMLDataGridColElement.cpp:
+ * html/HTMLDataGridColElement.h:
+ * html/HTMLDataGridColElement.idl:
+ * html/HTMLDataGridElement.cpp:
+ * html/HTMLDataGridElement.h:
+ * html/HTMLDataGridElement.idl:
+ * html/HTMLDataGridRowElement.cpp:
+ * html/HTMLDataGridRowElement.h:
+ * html/HTMLDataGridRowElement.idl:
+ * html/HTMLTagNames.in:
+ * page/DOMWindow.idl:
+ * rendering/RenderDataGrid.cpp:
+ * rendering/RenderDataGrid.h:
+
+2009-06-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Ariya Hidayat and Adam Roben.
+
+ Fix compilation with MINGW. Ported MSVC inline assembly to
+ GNU inline assembly. Also fixed casting errors where gcc
+ refused to cast a pointer-to-function to a pointer-to-object,
+ without an intermediate cast to a non-pointer type.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::hookedBeginPaint):
+ (WebCore::PluginView::hookedEndPaint):
+ (WebCore::hook):
+ (WebCore::setUpOffscreenPaintingHooks):
+
2009-06-26 John Sullivan <sullivan@apple.com>
Added Speech submenu to context menu on Mac when there's a non-editable selection
diff --git a/src/3rdparty/webkit/WebCore/DerivedSources.cpp b/src/3rdparty/webkit/WebCore/DerivedSources.cpp
index 3075a4b..69cc3e3 100644
--- a/src/3rdparty/webkit/WebCore/DerivedSources.cpp
+++ b/src/3rdparty/webkit/WebCore/DerivedSources.cpp
@@ -317,6 +317,7 @@
#include "JSTimeRanges.cpp"
#include "JSTreeWalker.cpp"
#include "JSUIEvent.cpp"
+#include "JSValidityState.cpp"
#include "JSVoidCallback.cpp"
#include "JSWebKitAnimationEvent.cpp"
#include "JSWebKitCSSKeyframeRule.cpp"
diff --git a/src/3rdparty/webkit/WebCore/WebCore.gypi b/src/3rdparty/webkit/WebCore/WebCore.gypi
new file mode 100644
index 0000000..d96da86
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/WebCore.gypi
@@ -0,0 +1,3334 @@
+{
+ 'variables': {
+ 'webcore_files': [
+
+ #IDL files
+ 'css/CSSCharsetRule.idl',
+ 'css/CSSFontFaceRule.idl',
+ 'css/CSSImportRule.idl',
+ 'css/CSSMediaRule.idl',
+ 'css/CSSPageRule.idl',
+ 'css/CSSPrimitiveValue.idl',
+ 'css/CSSRule.idl',
+ 'css/CSSRuleList.idl',
+ 'css/CSSStyleDeclaration.idl',
+ 'css/CSSStyleRule.idl',
+ 'css/CSSStyleSheet.idl',
+ 'css/CSSUnknownRule.idl',
+ 'css/CSSValue.idl',
+ 'css/CSSValueList.idl',
+ 'css/CSSVariablesDeclaration.idl',
+ 'css/CSSVariablesRule.idl',
+ 'css/Counter.idl',
+ 'css/MediaList.idl',
+ 'css/RGBColor.idl',
+ 'css/Rect.idl',
+ 'css/StyleSheet.idl',
+ 'css/StyleSheetList.idl',
+ 'css/WebKitCSSKeyframeRule.idl',
+ 'css/WebKitCSSKeyframesRule.idl',
+ 'css/WebKitCSSMatrix.idl',
+ 'css/WebKitCSSTransformValue.idl',
+ 'dom/Attr.idl',
+ 'dom/CDATASection.idl',
+ 'dom/CharacterData.idl',
+ 'dom/ClientRect.idl',
+ 'dom/ClientRectList.idl',
+ 'dom/Clipboard.idl',
+ 'dom/Comment.idl',
+ 'dom/DOMCoreException.idl',
+ 'dom/DOMImplementation.idl',
+ 'dom/Document.idl',
+ 'dom/DocumentFragment.idl',
+ 'dom/DocumentType.idl',
+ 'dom/Element.idl',
+ 'dom/Entity.idl',
+ 'dom/EntityReference.idl',
+ 'dom/Event.idl',
+ 'dom/EventException.idl',
+ 'dom/EventListener.idl',
+ 'dom/EventTarget.idl',
+ 'dom/KeyboardEvent.idl',
+ 'dom/MessageChannel.idl',
+ 'dom/MessageEvent.idl',
+ 'dom/MessagePort.idl',
+ 'dom/MouseEvent.idl',
+ 'dom/MutationEvent.idl',
+ 'dom/NamedNodeMap.idl',
+ 'dom/Node.idl',
+ 'dom/NodeFilter.idl',
+ 'dom/NodeIterator.idl',
+ 'dom/NodeList.idl',
+ 'dom/Notation.idl',
+ 'dom/OverflowEvent.idl',
+ 'dom/ProcessingInstruction.idl',
+ 'dom/ProgressEvent.idl',
+ 'dom/Range.idl',
+ 'dom/RangeException.idl',
+ 'dom/Text.idl',
+ 'dom/TextEvent.idl',
+ 'dom/TreeWalker.idl',
+ 'dom/UIEvent.idl',
+ 'dom/WebKitAnimationEvent.idl',
+ 'dom/WebKitTransitionEvent.idl',
+ 'dom/WheelEvent.idl',
+ 'html/CanvasGradient.idl',
+ 'html/CanvasPattern.idl',
+ 'html/CanvasPixelArray.idl',
+ 'html/CanvasRenderingContext2D.idl',
+ 'html/DataGridColumn.idl',
+ 'html/DataGridColumnList.idl',
+ 'html/File.idl',
+ 'html/FileList.idl',
+ 'html/HTMLAnchorElement.idl',
+ 'html/HTMLAppletElement.idl',
+ 'html/HTMLAreaElement.idl',
+ 'html/HTMLAudioElement.idl',
+ 'html/HTMLBRElement.idl',
+ 'html/HTMLBaseElement.idl',
+ 'html/HTMLBaseFontElement.idl',
+ 'html/HTMLBlockquoteElement.idl',
+ 'html/HTMLBodyElement.idl',
+ 'html/HTMLButtonElement.idl',
+ 'html/HTMLCanvasElement.idl',
+ 'html/HTMLCollection.idl',
+ 'html/HTMLDListElement.idl',
+ 'html/HTMLDataGridCellElement.idl',
+ 'html/HTMLDataGridColElement.idl',
+ 'html/HTMLDataGridElement.idl',
+ 'html/HTMLDataGridRowElement.idl',
+ 'html/HTMLDirectoryElement.idl',
+ 'html/HTMLDivElement.idl',
+ 'html/HTMLDocument.idl',
+ 'html/HTMLElement.idl',
+ 'html/HTMLEmbedElement.idl',
+ 'html/HTMLFieldSetElement.idl',
+ 'html/HTMLFontElement.idl',
+ 'html/HTMLFormElement.idl',
+ 'html/HTMLFrameElement.idl',
+ 'html/HTMLFrameSetElement.idl',
+ 'html/HTMLHRElement.idl',
+ 'html/HTMLHeadElement.idl',
+ 'html/HTMLHeadingElement.idl',
+ 'html/HTMLHtmlElement.idl',
+ 'html/HTMLIFrameElement.idl',
+ 'html/HTMLImageElement.idl',
+ 'html/HTMLInputElement.idl',
+ 'html/HTMLIsIndexElement.idl',
+ 'html/HTMLLIElement.idl',
+ 'html/HTMLLabelElement.idl',
+ 'html/HTMLLegendElement.idl',
+ 'html/HTMLLinkElement.idl',
+ 'html/HTMLMapElement.idl',
+ 'html/HTMLMarqueeElement.idl',
+ 'html/HTMLMediaElement.idl',
+ 'html/HTMLMenuElement.idl',
+ 'html/HTMLMetaElement.idl',
+ 'html/HTMLModElement.idl',
+ 'html/HTMLOListElement.idl',
+ 'html/HTMLObjectElement.idl',
+ 'html/HTMLOptGroupElement.idl',
+ 'html/HTMLOptionElement.idl',
+ 'html/HTMLOptionsCollection.idl',
+ 'html/HTMLParagraphElement.idl',
+ 'html/HTMLParamElement.idl',
+ 'html/HTMLPreElement.idl',
+ 'html/HTMLQuoteElement.idl',
+ 'html/HTMLScriptElement.idl',
+ 'html/HTMLSelectElement.idl',
+ 'html/HTMLSourceElement.idl',
+ 'html/HTMLStyleElement.idl',
+ 'html/HTMLTableCaptionElement.idl',
+ 'html/HTMLTableCellElement.idl',
+ 'html/HTMLTableColElement.idl',
+ 'html/HTMLTableElement.idl',
+ 'html/HTMLTableRowElement.idl',
+ 'html/HTMLTableSectionElement.idl',
+ 'html/HTMLTextAreaElement.idl',
+ 'html/HTMLTitleElement.idl',
+ 'html/HTMLUListElement.idl',
+ 'html/HTMLVideoElement.idl',
+ 'html/ImageData.idl',
+ 'html/MediaError.idl',
+ 'html/TextMetrics.idl',
+ 'html/TimeRanges.idl',
+ 'html/ValidityState.idl',
+ 'html/VoidCallback.idl',
+ 'inspector/InspectorController.idl',
+ 'inspector/JavaScriptCallFrame.idl',
+ 'loader/appcache/DOMApplicationCache.idl',
+ 'page/AbstractView.idl',
+ 'page/BarInfo.idl',
+ 'page/Console.idl',
+ 'page/DOMSelection.idl',
+ 'page/DOMWindow.idl',
+ 'page/Geolocation.idl',
+ 'page/Geoposition.idl',
+ 'page/History.idl',
+ 'page/Location.idl',
+ 'page/Navigator.idl',
+ 'page/PositionCallback.idl',
+ 'page/PositionError.idl',
+ 'page/PositionErrorCallback.idl',
+ 'page/Screen.idl',
+ 'page/WebKitPoint.idl',
+ 'page/WorkerNavigator.idl',
+ 'plugins/MimeType.idl',
+ 'plugins/MimeTypeArray.idl',
+ 'plugins/Plugin.idl',
+ 'plugins/PluginArray.idl',
+ 'storage/Database.idl',
+ 'storage/SQLError.idl',
+ 'storage/SQLResultSet.idl',
+ 'storage/SQLResultSetRowList.idl',
+ 'storage/SQLTransaction.idl',
+ 'storage/Storage.idl',
+ 'storage/StorageEvent.idl',
+ 'svg/ElementTimeControl.idl',
+ 'svg/SVGAElement.idl',
+ 'svg/SVGAltGlyphElement.idl',
+ 'svg/SVGAngle.idl',
+ 'svg/SVGAnimateColorElement.idl',
+ 'svg/SVGAnimateElement.idl',
+ 'svg/SVGAnimateTransformElement.idl',
+ 'svg/SVGAnimatedAngle.idl',
+ 'svg/SVGAnimatedBoolean.idl',
+ 'svg/SVGAnimatedEnumeration.idl',
+ 'svg/SVGAnimatedInteger.idl',
+ 'svg/SVGAnimatedLength.idl',
+ 'svg/SVGAnimatedLengthList.idl',
+ 'svg/SVGAnimatedNumber.idl',
+ 'svg/SVGAnimatedNumberList.idl',
+ 'svg/SVGAnimatedPathData.idl',
+ 'svg/SVGAnimatedPoints.idl',
+ 'svg/SVGAnimatedPreserveAspectRatio.idl',
+ 'svg/SVGAnimatedRect.idl',
+ 'svg/SVGAnimatedString.idl',
+ 'svg/SVGAnimatedTransformList.idl',
+ 'svg/SVGAnimationElement.idl',
+ 'svg/SVGCircleElement.idl',
+ 'svg/SVGClipPathElement.idl',
+ 'svg/SVGColor.idl',
+ 'svg/SVGComponentTransferFunctionElement.idl',
+ 'svg/SVGCursorElement.idl',
+ 'svg/SVGDefinitionSrcElement.idl',
+ 'svg/SVGDefsElement.idl',
+ 'svg/SVGDescElement.idl',
+ 'svg/SVGDocument.idl',
+ 'svg/SVGElement.idl',
+ 'svg/SVGElementInstance.idl',
+ 'svg/SVGElementInstanceList.idl',
+ 'svg/SVGEllipseElement.idl',
+ 'svg/SVGException.idl',
+ 'svg/SVGExternalResourcesRequired.idl',
+ 'svg/SVGFEBlendElement.idl',
+ 'svg/SVGFEColorMatrixElement.idl',
+ 'svg/SVGFEComponentTransferElement.idl',
+ 'svg/SVGFECompositeElement.idl',
+ 'svg/SVGFEDiffuseLightingElement.idl',
+ 'svg/SVGFEDisplacementMapElement.idl',
+ 'svg/SVGFEDistantLightElement.idl',
+ 'svg/SVGFEFloodElement.idl',
+ 'svg/SVGFEFuncAElement.idl',
+ 'svg/SVGFEFuncBElement.idl',
+ 'svg/SVGFEFuncGElement.idl',
+ 'svg/SVGFEFuncRElement.idl',
+ 'svg/SVGFEGaussianBlurElement.idl',
+ 'svg/SVGFEImageElement.idl',
+ 'svg/SVGFEMergeElement.idl',
+ 'svg/SVGFEMergeNodeElement.idl',
+ 'svg/SVGFEOffsetElement.idl',
+ 'svg/SVGFEPointLightElement.idl',
+ 'svg/SVGFESpecularLightingElement.idl',
+ 'svg/SVGFESpotLightElement.idl',
+ 'svg/SVGFETileElement.idl',
+ 'svg/SVGFETurbulenceElement.idl',
+ 'svg/SVGFilterElement.idl',
+ 'svg/SVGFilterPrimitiveStandardAttributes.idl',
+ 'svg/SVGFitToViewBox.idl',
+ 'svg/SVGFontElement.idl',
+ 'svg/SVGFontFaceElement.idl',
+ 'svg/SVGFontFaceFormatElement.idl',
+ 'svg/SVGFontFaceNameElement.idl',
+ 'svg/SVGFontFaceSrcElement.idl',
+ 'svg/SVGFontFaceUriElement.idl',
+ 'svg/SVGForeignObjectElement.idl',
+ 'svg/SVGGElement.idl',
+ 'svg/SVGGlyphElement.idl',
+ 'svg/SVGGradientElement.idl',
+ 'svg/SVGHKernElement.idl',
+ 'svg/SVGImageElement.idl',
+ 'svg/SVGLangSpace.idl',
+ 'svg/SVGLength.idl',
+ 'svg/SVGLengthList.idl',
+ 'svg/SVGLineElement.idl',
+ 'svg/SVGLinearGradientElement.idl',
+ 'svg/SVGLocatable.idl',
+ 'svg/SVGMarkerElement.idl',
+ 'svg/SVGMaskElement.idl',
+ 'svg/SVGMatrix.idl',
+ 'svg/SVGMetadataElement.idl',
+ 'svg/SVGMissingGlyphElement.idl',
+ 'svg/SVGNumber.idl',
+ 'svg/SVGNumberList.idl',
+ 'svg/SVGPaint.idl',
+ 'svg/SVGPathElement.idl',
+ 'svg/SVGPathSeg.idl',
+ 'svg/SVGPathSegArcAbs.idl',
+ 'svg/SVGPathSegArcRel.idl',
+ 'svg/SVGPathSegClosePath.idl',
+ 'svg/SVGPathSegCurvetoCubicAbs.idl',
+ 'svg/SVGPathSegCurvetoCubicRel.idl',
+ 'svg/SVGPathSegCurvetoCubicSmoothAbs.idl',
+ 'svg/SVGPathSegCurvetoCubicSmoothRel.idl',
+ 'svg/SVGPathSegCurvetoQuadraticAbs.idl',
+ 'svg/SVGPathSegCurvetoQuadraticRel.idl',
+ 'svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl',
+ 'svg/SVGPathSegCurvetoQuadraticSmoothRel.idl',
+ 'svg/SVGPathSegLinetoAbs.idl',
+ 'svg/SVGPathSegLinetoHorizontalAbs.idl',
+ 'svg/SVGPathSegLinetoHorizontalRel.idl',
+ 'svg/SVGPathSegLinetoRel.idl',
+ 'svg/SVGPathSegLinetoVerticalAbs.idl',
+ 'svg/SVGPathSegLinetoVerticalRel.idl',
+ 'svg/SVGPathSegList.idl',
+ 'svg/SVGPathSegMovetoAbs.idl',
+ 'svg/SVGPathSegMovetoRel.idl',
+ 'svg/SVGPatternElement.idl',
+ 'svg/SVGPoint.idl',
+ 'svg/SVGPointList.idl',
+ 'svg/SVGPolygonElement.idl',
+ 'svg/SVGPolylineElement.idl',
+ 'svg/SVGPreserveAspectRatio.idl',
+ 'svg/SVGRadialGradientElement.idl',
+ 'svg/SVGRect.idl',
+ 'svg/SVGRectElement.idl',
+ 'svg/SVGRenderingIntent.idl',
+ 'svg/SVGSVGElement.idl',
+ 'svg/SVGScriptElement.idl',
+ 'svg/SVGSetElement.idl',
+ 'svg/SVGStopElement.idl',
+ 'svg/SVGStringList.idl',
+ 'svg/SVGStylable.idl',
+ 'svg/SVGStyleElement.idl',
+ 'svg/SVGSwitchElement.idl',
+ 'svg/SVGSymbolElement.idl',
+ 'svg/SVGTRefElement.idl',
+ 'svg/SVGTSpanElement.idl',
+ 'svg/SVGTests.idl',
+ 'svg/SVGTextContentElement.idl',
+ 'svg/SVGTextElement.idl',
+ 'svg/SVGTextPathElement.idl',
+ 'svg/SVGTextPositioningElement.idl',
+ 'svg/SVGTitleElement.idl',
+ 'svg/SVGTransform.idl',
+ 'svg/SVGTransformList.idl',
+ 'svg/SVGTransformable.idl',
+ 'svg/SVGURIReference.idl',
+ 'svg/SVGUnitTypes.idl',
+ 'svg/SVGUseElement.idl',
+ 'svg/SVGViewElement.idl',
+ 'svg/SVGViewSpec.idl',
+ 'svg/SVGZoomAndPan.idl',
+ 'svg/SVGZoomEvent.idl',
+ 'workers/AbstractWorker.idl',
+ 'workers/SharedWorker.idl',
+ 'workers/Worker.idl',
+ 'workers/WorkerContext.idl',
+ 'workers/WorkerLocation.idl',
+ 'xml/DOMParser.idl',
+ 'xml/XMLHttpRequest.idl',
+ 'xml/XMLHttpRequestException.idl',
+ 'xml/XMLHttpRequestProgressEvent.idl',
+ 'xml/XMLHttpRequestUpload.idl',
+ 'xml/XMLSerializer.idl',
+ 'xml/XPathEvaluator.idl',
+ 'xml/XPathException.idl',
+ 'xml/XPathExpression.idl',
+ 'xml/XPathNSResolver.idl',
+ 'xml/XPathResult.idl',
+ 'xml/XSLTProcessor.idl',
+
+ # Source/Header Files
+ 'accessibility/AXObjectCache.cpp',
+ 'accessibility/AXObjectCache.h',
+ 'accessibility/AccessibilityARIAGrid.cpp',
+ 'accessibility/AccessibilityARIAGrid.h',
+ 'accessibility/AccessibilityARIAGridCell.cpp',
+ 'accessibility/AccessibilityARIAGridCell.h',
+ 'accessibility/AccessibilityARIAGridRow.cpp',
+ 'accessibility/AccessibilityARIAGridRow.h',
+ 'accessibility/AccessibilityImageMapLink.cpp',
+ 'accessibility/AccessibilityImageMapLink.h',
+ 'accessibility/AccessibilityList.cpp',
+ 'accessibility/AccessibilityList.h',
+ 'accessibility/AccessibilityListBox.cpp',
+ 'accessibility/AccessibilityListBox.h',
+ 'accessibility/AccessibilityListBoxOption.cpp',
+ 'accessibility/AccessibilityListBoxOption.h',
+ 'accessibility/AccessibilityObject.cpp',
+ 'accessibility/AccessibilityObject.h',
+ 'accessibility/AccessibilityRenderObject.cpp',
+ 'accessibility/AccessibilityRenderObject.h',
+ 'accessibility/AccessibilityTable.cpp',
+ 'accessibility/AccessibilityTable.h',
+ 'accessibility/AccessibilityTableCell.cpp',
+ 'accessibility/AccessibilityTableCell.h',
+ 'accessibility/AccessibilityTableColumn.cpp',
+ 'accessibility/AccessibilityTableColumn.h',
+ 'accessibility/AccessibilityTableHeaderContainer.cpp',
+ 'accessibility/AccessibilityTableHeaderContainer.h',
+ 'accessibility/AccessibilityTableRow.cpp',
+ 'accessibility/AccessibilityTableRow.h',
+ 'accessibility/chromium/AXObjectCacheChromium.cpp',
+ 'accessibility/chromium/AccessibilityObjectChromium.cpp',
+ 'accessibility/chromium/AccessibilityObjectWrapper.h',
+ 'accessibility/gtk/AXObjectCacheAtk.cpp',
+ 'accessibility/gtk/AccessibilityObjectAtk.cpp',
+ 'accessibility/gtk/AccessibilityObjectWrapperAtk.cpp',
+ 'accessibility/gtk/AccessibilityObjectWrapperAtk.h',
+ 'accessibility/qt/AccessibilityObjectQt.cpp',
+ 'accessibility/mac/AXObjectCacheMac.mm',
+ 'accessibility/mac/AccessibilityObjectMac.mm',
+ 'accessibility/mac/AccessibilityObjectWrapper.h',
+ 'accessibility/mac/AccessibilityObjectWrapper.mm',
+ 'accessibility/win/AXObjectCacheWin.cpp',
+ 'accessibility/win/AccessibilityObjectWin.cpp',
+ 'accessibility/win/AccessibilityObjectWrapperWin.h',
+ 'accessibility/wx/AccessibilityObjectWx.cpp',
+ 'bindings/js/CachedScriptSourceProvider.h',
+ 'bindings/js/GCController.cpp',
+ 'bindings/js/GCController.h',
+ 'bindings/js/JSAttrCustom.cpp',
+ 'bindings/js/JSAudioConstructor.cpp',
+ 'bindings/js/JSAudioConstructor.h',
+ 'bindings/js/JSCanvasRenderingContext2DCustom.cpp',
+ 'bindings/js/JSCDATASectionCustom.cpp',
+ 'bindings/js/JSClipboardCustom.cpp',
+ 'bindings/js/JSConsoleCustom.cpp',
+ 'bindings/js/JSCoordinatesCustom.cpp',
+ 'bindings/js/JSCSSRuleCustom.cpp',
+ 'bindings/js/JSCSSStyleDeclarationCustom.cpp',
+ 'bindings/js/JSCSSStyleDeclarationCustom.h',
+ 'bindings/js/JSCSSValueCustom.cpp',
+ 'bindings/js/JSCustomPositionCallback.cpp',
+ 'bindings/js/JSCustomPositionCallback.h',
+ 'bindings/js/JSCustomPositionErrorCallback.cpp',
+ 'bindings/js/JSCustomPositionErrorCallback.h',
+ 'bindings/js/JSCustomSQLStatementCallback.cpp',
+ 'bindings/js/JSCustomSQLStatementCallback.h',
+ 'bindings/js/JSCustomSQLStatementErrorCallback.cpp',
+ 'bindings/js/JSCustomSQLStatementErrorCallback.h',
+ 'bindings/js/JSCustomSQLTransactionCallback.cpp',
+ 'bindings/js/JSCustomSQLTransactionCallback.h',
+ 'bindings/js/JSCustomSQLTransactionErrorCallback.cpp',
+ 'bindings/js/JSCustomSQLTransactionErrorCallback.h',
+ 'bindings/js/JSCustomVoidCallback.cpp',
+ 'bindings/js/JSCustomVoidCallback.h',
+ 'bindings/js/JSCustomXPathNSResolver.cpp',
+ 'bindings/js/JSCustomXPathNSResolver.h',
+ 'bindings/js/JSDatabaseCustom.cpp',
+ 'bindings/js/JSDataGridColumnListCustom.cpp',
+ 'bindings/js/JSDataGridDataSource.cpp',
+ 'bindings/js/JSDataGridDataSource.h',
+ 'bindings/js/JSDocumentCustom.cpp',
+ 'bindings/js/JSDocumentFragmentCustom.cpp',
+ 'bindings/js/JSDOMApplicationCacheCustom.cpp',
+ 'bindings/js/JSDOMBinding.cpp',
+ 'bindings/js/JSDOMBinding.h',
+ 'bindings/js/JSDOMGlobalObject.cpp',
+ 'bindings/js/JSDOMGlobalObject.h',
+ 'bindings/js/JSDOMWindowBase.cpp',
+ 'bindings/js/JSDOMWindowBase.h',
+ 'bindings/js/JSDOMWindowCustom.cpp',
+ 'bindings/js/JSDOMWindowCustom.h',
+ 'bindings/js/JSDOMWindowShell.cpp',
+ 'bindings/js/JSDOMWindowShell.h',
+ 'bindings/js/JSElementCustom.cpp',
+ 'bindings/js/JSEventCustom.cpp',
+ 'bindings/js/JSEventListener.cpp',
+ 'bindings/js/JSEventListener.h',
+ 'bindings/js/JSEventTarget.cpp',
+ 'bindings/js/JSEventTarget.h',
+ 'bindings/js/JSGeolocationCustom.cpp',
+ 'bindings/js/JSHistoryCustom.cpp',
+ 'bindings/js/JSHistoryCustom.h',
+ 'bindings/js/JSHTMLAllCollection.cpp',
+ 'bindings/js/JSHTMLAllCollection.h',
+ 'bindings/js/JSHTMLAppletElementCustom.cpp',
+ 'bindings/js/JSHTMLAppletElementCustom.h',
+ 'bindings/js/JSHTMLCollectionCustom.cpp',
+ 'bindings/js/JSHTMLDataGridElementCustom.cpp',
+ 'bindings/js/JSHTMLDocumentCustom.cpp',
+ 'bindings/js/JSHTMLElementCustom.cpp',
+ 'bindings/js/JSHTMLEmbedElementCustom.cpp',
+ 'bindings/js/JSHTMLEmbedElementCustom.h',
+ 'bindings/js/JSHTMLFormElementCustom.cpp',
+ 'bindings/js/JSHTMLFrameElementCustom.cpp',
+ 'bindings/js/JSHTMLFrameSetElementCustom.cpp',
+ 'bindings/js/JSHTMLIFrameElementCustom.cpp',
+ 'bindings/js/JSHTMLInputElementCustom.cpp',
+ 'bindings/js/JSHTMLInputElementCustom.h',
+ 'bindings/js/JSHTMLObjectElementCustom.cpp',
+ 'bindings/js/JSHTMLObjectElementCustom.h',
+ 'bindings/js/JSHTMLOptionsCollectionCustom.cpp',
+ 'bindings/js/JSHTMLSelectElementCustom.cpp',
+ 'bindings/js/JSHTMLSelectElementCustom.h',
+ 'bindings/js/JSImageConstructor.cpp',
+ 'bindings/js/JSImageConstructor.h',
+ 'bindings/js/JSImageDataCustom.cpp',
+ 'bindings/js/JSInspectedObjectWrapper.cpp',
+ 'bindings/js/JSInspectedObjectWrapper.h',
+ 'bindings/js/JSInspectorCallbackWrapper.cpp',
+ 'bindings/js/JSInspectorCallbackWrapper.h',
+ 'bindings/js/JSInspectorControllerCustom.cpp',
+ 'bindings/js/JSJavaScriptCallFrameCustom.cpp',
+ 'bindings/js/JSLazyEventListener.cpp',
+ 'bindings/js/JSLazyEventListener.h',
+ 'bindings/js/JSLocationCustom.cpp',
+ 'bindings/js/JSLocationCustom.h',
+ 'bindings/js/JSMessageChannelConstructor.cpp',
+ 'bindings/js/JSMessageChannelConstructor.h',
+ 'bindings/js/JSMessageChannelCustom.cpp',
+ 'bindings/js/JSMessagePortCustom.cpp',
+ 'bindings/js/JSMimeTypeArrayCustom.cpp',
+ 'bindings/js/JSNamedNodeMapCustom.cpp',
+ 'bindings/js/JSNamedNodesCollection.cpp',
+ 'bindings/js/JSNamedNodesCollection.h',
+ 'bindings/js/JSNavigatorCustom.cpp',
+ 'bindings/js/JSNodeCustom.cpp',
+ 'bindings/js/JSNodeFilterCondition.cpp',
+ 'bindings/js/JSNodeFilterCondition.h',
+ 'bindings/js/JSNodeFilterCustom.cpp',
+ 'bindings/js/JSNodeIteratorCustom.cpp',
+ 'bindings/js/JSNodeListCustom.cpp',
+ 'bindings/js/JSOptionConstructor.cpp',
+ 'bindings/js/JSOptionConstructor.h',
+ 'bindings/js/JSPluginArrayCustom.cpp',
+ 'bindings/js/JSPluginCustom.cpp',
+ 'bindings/js/JSPluginElementFunctions.cpp',
+ 'bindings/js/JSPluginElementFunctions.h',
+ 'bindings/js/JSQuarantinedObjectWrapper.cpp',
+ 'bindings/js/JSQuarantinedObjectWrapper.h',
+ 'bindings/js/JSRGBColor.cpp',
+ 'bindings/js/JSRGBColor.h',
+ 'bindings/js/JSSQLResultSetRowListCustom.cpp',
+ 'bindings/js/JSSQLTransactionCustom.cpp',
+ 'bindings/js/JSStorageCustom.cpp',
+ 'bindings/js/JSStorageCustom.h',
+ 'bindings/js/JSStyleSheetCustom.cpp',
+ 'bindings/js/JSStyleSheetListCustom.cpp',
+ 'bindings/js/JSSVGElementInstanceCustom.cpp',
+ 'bindings/js/JSSVGLengthCustom.cpp',
+ 'bindings/js/JSSVGMatrixCustom.cpp',
+ 'bindings/js/JSSVGPathSegCustom.cpp',
+ 'bindings/js/JSSVGPathSegListCustom.cpp',
+ 'bindings/js/JSSVGPODTypeWrapper.h',
+ 'bindings/js/JSSVGPointListCustom.cpp',
+ 'bindings/js/JSSVGTransformListCustom.cpp',
+ 'bindings/js/JSTextCustom.cpp',
+ 'bindings/js/JSTreeWalkerCustom.cpp',
+ 'bindings/js/JSWebKitCSSMatrixConstructor.cpp',
+ 'bindings/js/JSWebKitCSSMatrixConstructor.h',
+ 'bindings/js/JSWebKitPointConstructor.cpp',
+ 'bindings/js/JSWebKitPointConstructor.h',
+ 'bindings/js/JSWorkerConstructor.cpp',
+ 'bindings/js/JSWorkerConstructor.h',
+ 'bindings/js/JSWorkerContextBase.cpp',
+ 'bindings/js/JSWorkerContextBase.h',
+ 'bindings/js/JSWorkerContextCustom.cpp',
+ 'bindings/js/JSWorkerCustom.cpp',
+ 'bindings/js/JSXMLHttpRequestConstructor.cpp',
+ 'bindings/js/JSXMLHttpRequestConstructor.h',
+ 'bindings/js/JSXMLHttpRequestCustom.cpp',
+ 'bindings/js/JSXMLHttpRequestUploadCustom.cpp',
+ 'bindings/js/JSXSLTProcessorConstructor.cpp',
+ 'bindings/js/JSXSLTProcessorConstructor.h',
+ 'bindings/js/JSXSLTProcessorCustom.cpp',
+ 'bindings/js/ScheduledAction.cpp',
+ 'bindings/js/ScheduledAction.h',
+ 'bindings/js/ScriptCachedFrameData.cpp',
+ 'bindings/js/ScriptCachedFrameData.h',
+ 'bindings/js/ScriptCallFrame.cpp',
+ 'bindings/js/ScriptCallFrame.h',
+ 'bindings/js/ScriptCallStack.cpp',
+ 'bindings/js/ScriptCallStack.h',
+ 'bindings/js/ScriptController.cpp',
+ 'bindings/js/ScriptController.h',
+ 'bindings/js/ScriptControllerGtk.cpp',
+ 'bindings/js/ScriptControllerMac.mm',
+ 'bindings/js/ScriptControllerQt.cpp',
+ 'bindings/js/ScriptControllerWin.cpp',
+ 'bindings/js/ScriptControllerWx.cpp',
+ 'bindings/js/ScriptEventListener.cpp',
+ 'bindings/js/ScriptEventListener.h',
+ 'bindings/js/ScriptFunctionCall.cpp',
+ 'bindings/js/ScriptFunctionCall.h',
+ 'bindings/js/ScriptInstance.h',
+ 'bindings/js/ScriptObject.cpp',
+ 'bindings/js/ScriptObject.h',
+ 'bindings/js/ScriptObjectQuarantine.cpp',
+ 'bindings/js/ScriptObjectQuarantine.h',
+ 'bindings/js/ScriptSourceCode.h',
+ 'bindings/js/ScriptState.cpp',
+ 'bindings/js/ScriptState.h',
+ 'bindings/js/ScriptString.h',
+ 'bindings/js/ScriptValue.cpp',
+ 'bindings/js/ScriptValue.h',
+ 'bindings/js/StringSourceProvider.h',
+ 'bindings/js/WorkerScriptController.cpp',
+ 'bindings/js/WorkerScriptController.h',
+ 'bindings/v8/custom/V8AbstractWorkerCustom.cpp',
+ 'bindings/v8/custom/V8AttrCustom.cpp',
+ 'bindings/v8/custom/V8CanvasPixelArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp',
+ 'bindings/v8/custom/V8ClientRectListCustom.cpp',
+ 'bindings/v8/custom/V8ClipboardCustom.cpp',
+ 'bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp',
+ 'bindings/v8/custom/V8CustomBinding.cpp',
+ 'bindings/v8/custom/V8CustomBinding.h',
+ 'bindings/v8/custom/V8CustomEventListener.cpp',
+ 'bindings/v8/custom/V8CustomEventListener.h',
+ 'bindings/v8/custom/V8CustomSQLStatementCallback.cpp',
+ 'bindings/v8/custom/V8CustomSQLStatementCallback.h',
+ 'bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp',
+ 'bindings/v8/custom/V8CustomSQLStatementErrorCallback.h',
+ 'bindings/v8/custom/V8CustomSQLTransactionCallback.cpp',
+ 'bindings/v8/custom/V8CustomSQLTransactionCallback.h',
+ 'bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp',
+ 'bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h',
+ 'bindings/v8/custom/V8CustomVoidCallback.cpp',
+ 'bindings/v8/custom/V8CustomVoidCallback.h',
+ 'bindings/v8/custom/V8CustomXPathNSResolver.cpp',
+ 'bindings/v8/custom/V8CustomXPathNSResolver.h',
+ 'bindings/v8/custom/V8DatabaseCustom.cpp',
+ 'bindings/v8/custom/V8DocumentLocationCustom.cpp',
+ 'bindings/v8/custom/V8DOMParserConstructor.cpp',
+ 'bindings/v8/custom/V8DOMWindowCustom.cpp',
+ 'bindings/v8/custom/V8DocumentCustom.cpp',
+ 'bindings/v8/custom/V8ElementCustom.cpp',
+ 'bindings/v8/custom/V8EventCustom.cpp',
+ 'bindings/v8/custom/V8HTMLAudioElementConstructor.cpp',
+ 'bindings/v8/custom/V8HTMLCanvasElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLCollectionCustom.cpp',
+ 'bindings/v8/custom/V8HTMLDataGridElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLDocumentCustom.cpp',
+ 'bindings/v8/custom/V8HTMLFormElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLFrameElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLIFrameElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLImageElementConstructor.cpp',
+ 'bindings/v8/custom/V8HTMLInputElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLOptionElementConstructor.cpp',
+ 'bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp',
+ 'bindings/v8/custom/V8HTMLPlugInElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp',
+ 'bindings/v8/custom/V8HTMLSelectElementCustom.cpp',
+ 'bindings/v8/custom/V8HTMLSelectElementCustom.h',
+ 'bindings/v8/custom/V8InspectorControllerCustom.cpp',
+ 'bindings/v8/custom/V8LocationCustom.cpp',
+ 'bindings/v8/custom/V8MessageChannelConstructor.cpp',
+ 'bindings/v8/custom/V8MessagePortCustom.cpp',
+ 'bindings/v8/custom/V8NamedNodeMapCustom.cpp',
+ 'bindings/v8/custom/V8NamedNodesCollection.cpp',
+ 'bindings/v8/custom/V8NamedNodesCollection.h',
+ 'bindings/v8/custom/V8NavigatorCustom.cpp',
+ 'bindings/v8/custom/V8NodeCustom.cpp',
+ 'bindings/v8/custom/V8NodeFilterCustom.cpp',
+ 'bindings/v8/custom/V8NodeIteratorCustom.cpp',
+ 'bindings/v8/custom/V8NodeListCustom.cpp',
+ 'bindings/v8/custom/V8SQLResultSetRowListCustom.cpp',
+ 'bindings/v8/custom/V8SQLTransactionCustom.cpp',
+ 'bindings/v8/custom/V8SVGElementInstanceCustom.cpp',
+ 'bindings/v8/custom/V8SVGLengthCustom.cpp',
+ 'bindings/v8/custom/V8SVGMatrixCustom.cpp',
+ 'bindings/v8/custom/V8SharedWorkerCustom.cpp',
+ 'bindings/v8/custom/V8StyleSheetListCustom.cpp',
+ 'bindings/v8/custom/V8TreeWalkerCustom.cpp',
+ 'bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp',
+ 'bindings/v8/custom/V8WebKitPointConstructor.cpp',
+ 'bindings/v8/custom/V8WorkerContextCustom.cpp',
+ 'bindings/v8/custom/V8WorkerCustom.cpp',
+ 'bindings/v8/custom/V8XMLHttpRequestConstructor.cpp',
+ 'bindings/v8/custom/V8XMLHttpRequestCustom.cpp',
+ 'bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp',
+ 'bindings/v8/custom/V8XMLSerializerConstructor.cpp',
+ 'bindings/v8/custom/V8XPathEvaluatorConstructor.cpp',
+ 'bindings/v8/custom/V8XSLTProcessorCustom.cpp',
+ 'bindings/v8/ScheduledAction.cpp',
+ 'bindings/v8/ScheduledAction.h',
+ 'bindings/v8/ScriptCachedFrameData.h',
+ 'bindings/v8/ScriptCallFrame.cpp',
+ 'bindings/v8/ScriptCallFrame.h',
+ 'bindings/v8/ScriptCallStack.cpp',
+ 'bindings/v8/ScriptCallStack.h',
+ 'bindings/v8/ScriptController.cpp',
+ 'bindings/v8/ScriptController.h',
+ 'bindings/v8/ScriptEventListener.cpp',
+ 'bindings/v8/ScriptEventListener.h',
+ 'bindings/v8/ScriptFunctionCall.cpp',
+ 'bindings/v8/ScriptFunctionCall.h',
+ 'bindings/v8/ScriptInstance.cpp',
+ 'bindings/v8/ScriptInstance.h',
+ 'bindings/v8/ScriptObject.cpp',
+ 'bindings/v8/ScriptObject.h',
+ 'bindings/v8/ScriptObjectQuarantine.cpp',
+ 'bindings/v8/ScriptObjectQuarantine.h',
+ 'bindings/v8/ScriptScope.cpp',
+ 'bindings/v8/ScriptScope.h',
+ 'bindings/v8/ScriptSourceCode.h',
+ 'bindings/v8/ScriptState.h',
+ 'bindings/v8/ScriptState.cpp',
+ 'bindings/v8/ScriptString.h',
+ 'bindings/v8/ScriptValue.cpp',
+ 'bindings/v8/ScriptValue.h',
+ 'bindings/v8/V8AbstractEventListener.cpp',
+ 'bindings/v8/V8AbstractEventListener.h',
+ 'bindings/v8/V8Binding.cpp',
+ 'bindings/v8/V8Binding.h',
+ 'bindings/v8/V8Collection.cpp',
+ 'bindings/v8/V8Collection.h',
+ 'bindings/v8/V8DOMMap.cpp',
+ 'bindings/v8/V8DOMMap.h',
+ 'bindings/v8/V8EventListenerList.cpp',
+ 'bindings/v8/V8EventListenerList.h',
+ 'bindings/v8/V8Helpers.cpp',
+ 'bindings/v8/V8Helpers.h',
+ 'bindings/v8/V8Index.cpp',
+ 'bindings/v8/V8Index.h',
+ 'bindings/v8/V8IsolatedWorld.cpp',
+ 'bindings/v8/V8IsolatedWorld.h',
+ 'bindings/v8/V8LazyEventListener.cpp',
+ 'bindings/v8/V8LazyEventListener.h',
+ 'bindings/v8/V8NodeFilterCondition.cpp',
+ 'bindings/v8/V8NodeFilterCondition.h',
+ 'bindings/v8/V8ObjectEventListener.cpp',
+ 'bindings/v8/V8ObjectEventListener.h',
+ 'bindings/v8/V8Proxy.cpp',
+ 'bindings/v8/V8Proxy.h',
+ 'bindings/v8/V8SVGPODTypeWrapper.h',
+ 'bindings/v8/V8Utilities.cpp',
+ 'bindings/v8/V8Utilities.h',
+ 'bindings/v8/V8WorkerContextEventListener.cpp',
+ 'bindings/v8/V8WorkerContextEventListener.h',
+ 'bindings/v8/V8WorkerContextObjectEventListener.cpp',
+ 'bindings/v8/V8WorkerContextObjectEventListener.h',
+ 'bindings/v8/WorkerContextExecutionProxy.h',
+ 'bindings/v8/WorkerContextExecutionProxy.cpp',
+ 'bindings/v8/WorkerScriptController.h',
+ 'bindings/v8/WorkerScriptController.cpp',
+ 'css/CSSBorderImageValue.cpp',
+ 'css/CSSBorderImageValue.h',
+ 'css/CSSCanvasValue.cpp',
+ 'css/CSSCanvasValue.h',
+ 'css/CSSCharsetRule.cpp',
+ 'css/CSSCharsetRule.h',
+ 'css/CSSComputedStyleDeclaration.cpp',
+ 'css/CSSComputedStyleDeclaration.h',
+ 'css/CSSCursorImageValue.cpp',
+ 'css/CSSCursorImageValue.h',
+ 'css/CSSFontFace.cpp',
+ 'css/CSSFontFace.h',
+ 'css/CSSFontFaceRule.cpp',
+ 'css/CSSFontFaceRule.h',
+ 'css/CSSFontFaceSource.cpp',
+ 'css/CSSFontFaceSource.h',
+ 'css/CSSFontFaceSrcValue.cpp',
+ 'css/CSSFontFaceSrcValue.h',
+ 'css/CSSFontSelector.cpp',
+ 'css/CSSFontSelector.h',
+ 'css/CSSFunctionValue.cpp',
+ 'css/CSSFunctionValue.h',
+ 'css/CSSGradientValue.cpp',
+ 'css/CSSGradientValue.h',
+ 'css/CSSHelper.cpp',
+ 'css/CSSHelper.h',
+ 'css/CSSImageGeneratorValue.cpp',
+ 'css/CSSImageGeneratorValue.h',
+ 'css/CSSImageValue.cpp',
+ 'css/CSSImageValue.h',
+ 'css/CSSImportRule.cpp',
+ 'css/CSSImportRule.h',
+ 'css/CSSInheritedValue.cpp',
+ 'css/CSSInheritedValue.h',
+ 'css/CSSInitialValue.cpp',
+ 'css/CSSInitialValue.h',
+ 'css/CSSMediaRule.cpp',
+ 'css/CSSMediaRule.h',
+ 'css/CSSMutableStyleDeclaration.cpp',
+ 'css/CSSMutableStyleDeclaration.h',
+ 'css/CSSNamespace.h',
+ 'css/CSSPageRule.cpp',
+ 'css/CSSPageRule.h',
+ 'css/CSSParser.cpp',
+ 'css/CSSParser.h',
+ 'css/CSSParserValues.cpp',
+ 'css/CSSParserValues.h',
+ 'css/CSSPrimitiveValue.cpp',
+ 'css/CSSPrimitiveValue.h',
+ 'css/CSSPrimitiveValueMappings.h',
+ 'css/CSSProperty.cpp',
+ 'css/CSSProperty.h',
+ 'css/CSSPropertyLonghand.cpp',
+ 'css/CSSPropertyLonghand.h',
+ 'css/CSSQuirkPrimitiveValue.h',
+ 'css/CSSReflectValue.cpp',
+ 'css/CSSReflectValue.h',
+ 'css/CSSReflectionDirection.h',
+ 'css/CSSRule.cpp',
+ 'css/CSSRule.h',
+ 'css/CSSRuleList.cpp',
+ 'css/CSSRuleList.h',
+ 'css/CSSSegmentedFontFace.cpp',
+ 'css/CSSSegmentedFontFace.h',
+ 'css/CSSSelector.cpp',
+ 'css/CSSSelector.h',
+ 'css/CSSSelectorList.cpp',
+ 'css/CSSSelectorList.h',
+ 'css/CSSStyleDeclaration.cpp',
+ 'css/CSSStyleDeclaration.h',
+ 'css/CSSStyleRule.cpp',
+ 'css/CSSStyleRule.h',
+ 'css/CSSStyleSelector.cpp',
+ 'css/CSSStyleSelector.h',
+ 'css/CSSStyleSheet.cpp',
+ 'css/CSSStyleSheet.h',
+ 'css/CSSTimingFunctionValue.cpp',
+ 'css/CSSTimingFunctionValue.h',
+ 'css/CSSUnicodeRangeValue.cpp',
+ 'css/CSSUnicodeRangeValue.h',
+ 'css/CSSUnknownRule.h',
+ 'css/CSSValue.h',
+ 'css/CSSValueList.cpp',
+ 'css/CSSValueList.h',
+ 'css/CSSVariableDependentValue.cpp',
+ 'css/CSSVariableDependentValue.h',
+ 'css/CSSVariablesDeclaration.cpp',
+ 'css/CSSVariablesDeclaration.h',
+ 'css/CSSVariablesRule.cpp',
+ 'css/CSSVariablesRule.h',
+ 'css/Counter.h',
+ 'css/DashboardRegion.h',
+ 'css/FontFamilyValue.cpp',
+ 'css/FontFamilyValue.h',
+ 'css/FontValue.cpp',
+ 'css/FontValue.h',
+ 'css/MediaFeatureNames.cpp',
+ 'css/MediaFeatureNames.h',
+ 'css/MediaList.cpp',
+ 'css/MediaList.h',
+ 'css/MediaQuery.cpp',
+ 'css/MediaQuery.h',
+ 'css/MediaQueryEvaluator.cpp',
+ 'css/MediaQueryEvaluator.h',
+ 'css/MediaQueryExp.cpp',
+ 'css/MediaQueryExp.h',
+ 'css/Pair.h',
+ 'css/Rect.h',
+ 'css/SVGCSSComputedStyleDeclaration.cpp',
+ 'css/SVGCSSParser.cpp',
+ 'css/SVGCSSStyleSelector.cpp',
+ 'css/ShadowValue.cpp',
+ 'css/ShadowValue.h',
+ 'css/StyleBase.cpp',
+ 'css/StyleBase.h',
+ 'css/StyleList.cpp',
+ 'css/StyleList.h',
+ 'css/StyleSheet.cpp',
+ 'css/StyleSheet.h',
+ 'css/StyleSheetList.cpp',
+ 'css/StyleSheetList.h',
+ 'css/WebKitCSSKeyframeRule.cpp',
+ 'css/WebKitCSSKeyframeRule.h',
+ 'css/WebKitCSSKeyframesRule.cpp',
+ 'css/WebKitCSSKeyframesRule.h',
+ 'css/WebKitCSSMatrix.cpp',
+ 'css/WebKitCSSMatrix.h',
+ 'css/WebKitCSSTransformValue.cpp',
+ 'css/WebKitCSSTransformValue.h',
+ 'dom/default/PlatformMessagePortChannel.cpp',
+ 'dom/default/PlatformMessagePortChannel.h',
+ 'dom/ActiveDOMObject.cpp',
+ 'dom/ActiveDOMObject.h',
+ 'dom/Attr.cpp',
+ 'dom/Attr.h',
+ 'dom/Attribute.cpp',
+ 'dom/Attribute.h',
+ 'dom/BeforeTextInsertedEvent.cpp',
+ 'dom/BeforeTextInsertedEvent.h',
+ 'dom/BeforeUnloadEvent.cpp',
+ 'dom/BeforeUnloadEvent.h',
+ 'dom/CDATASection.cpp',
+ 'dom/CDATASection.h',
+ 'dom/CSSMappedAttributeDeclaration.cpp',
+ 'dom/CSSMappedAttributeDeclaration.h',
+ 'dom/CharacterData.cpp',
+ 'dom/CharacterData.h',
+ 'dom/CheckedRadioButtons.cpp',
+ 'dom/CheckedRadioButtons.h',
+ 'dom/ChildNodeList.cpp',
+ 'dom/ChildNodeList.h',
+ 'dom/ClassNames.cpp',
+ 'dom/ClassNames.h',
+ 'dom/ClassNodeList.cpp',
+ 'dom/ClassNodeList.h',
+ 'dom/ClientRect.cpp',
+ 'dom/ClientRect.h',
+ 'dom/ClientRectList.cpp',
+ 'dom/ClientRectList.h',
+ 'dom/Clipboard.cpp',
+ 'dom/Clipboard.h',
+ 'dom/ClipboardAccessPolicy.h',
+ 'dom/ClipboardEvent.cpp',
+ 'dom/ClipboardEvent.h',
+ 'dom/Comment.cpp',
+ 'dom/Comment.h',
+ 'dom/ContainerNode.cpp',
+ 'dom/ContainerNode.h',
+ 'dom/ContainerNodeAlgorithms.h',
+ 'dom/DOMCoreException.h',
+ 'dom/DOMImplementation.cpp',
+ 'dom/DOMImplementation.h',
+ 'dom/DocPtr.h',
+ 'dom/Document.cpp',
+ 'dom/Document.h',
+ 'dom/DocumentFragment.cpp',
+ 'dom/DocumentFragment.h',
+ 'dom/DocumentMarker.h',
+ 'dom/DocumentType.cpp',
+ 'dom/DocumentType.h',
+ 'dom/DynamicNodeList.cpp',
+ 'dom/DynamicNodeList.h',
+ 'dom/EditingText.cpp',
+ 'dom/EditingText.h',
+ 'dom/Element.cpp',
+ 'dom/Element.h',
+ 'dom/ElementRareData.h',
+ 'dom/Entity.cpp',
+ 'dom/Entity.h',
+ 'dom/EntityReference.cpp',
+ 'dom/EntityReference.h',
+ 'dom/Event.cpp',
+ 'dom/Event.h',
+ 'dom/EventException.h',
+ 'dom/EventListener.h',
+ 'dom/EventNames.cpp',
+ 'dom/EventNames.h',
+ 'dom/EventTarget.cpp',
+ 'dom/EventTarget.h',
+ 'dom/ExceptionBase.cpp',
+ 'dom/ExceptionBase.h',
+ 'dom/ExceptionCode.cpp',
+ 'dom/ExceptionCode.h',
+ 'dom/InputElement.cpp',
+ 'dom/InputElement.h',
+ 'dom/KeyboardEvent.cpp',
+ 'dom/KeyboardEvent.h',
+ 'dom/MappedAttribute.cpp',
+ 'dom/MappedAttribute.h',
+ 'dom/MappedAttributeEntry.h',
+ 'dom/MessageChannel.cpp',
+ 'dom/MessageChannel.h',
+ 'dom/MessageEvent.cpp',
+ 'dom/MessageEvent.h',
+ 'dom/MessagePort.cpp',
+ 'dom/MessagePort.h',
+ 'dom/MessagePortChannel.cpp',
+ 'dom/MessagePortChannel.h',
+ 'dom/MouseEvent.cpp',
+ 'dom/MouseEvent.h',
+ 'dom/MouseRelatedEvent.cpp',
+ 'dom/MouseRelatedEvent.h',
+ 'dom/MutationEvent.cpp',
+ 'dom/MutationEvent.h',
+ 'dom/NameNodeList.cpp',
+ 'dom/NameNodeList.h',
+ 'dom/NamedAttrMap.cpp',
+ 'dom/NamedAttrMap.h',
+ 'dom/NamedMappedAttrMap.cpp',
+ 'dom/NamedMappedAttrMap.h',
+ 'dom/NamedNodeMap.h',
+ 'dom/Node.cpp',
+ 'dom/Node.h',
+ 'dom/NodeFilter.cpp',
+ 'dom/NodeFilter.h',
+ 'dom/NodeFilterCondition.cpp',
+ 'dom/NodeFilterCondition.h',
+ 'dom/NodeIterator.cpp',
+ 'dom/NodeIterator.h',
+ 'dom/NodeList.h',
+ 'dom/NodeRareData.h',
+ 'dom/NodeRenderStyle.h',
+ 'dom/NodeWithIndex.h',
+ 'dom/Notation.cpp',
+ 'dom/Notation.h',
+ 'dom/OptionElement.cpp',
+ 'dom/OptionElement.h',
+ 'dom/OptionGroupElement.cpp',
+ 'dom/OptionGroupElement.h',
+ 'dom/OverflowEvent.cpp',
+ 'dom/OverflowEvent.h',
+ 'dom/Position.cpp',
+ 'dom/Position.h',
+ 'dom/PositionIterator.cpp',
+ 'dom/PositionIterator.h',
+ 'dom/ProcessingInstruction.cpp',
+ 'dom/ProcessingInstruction.h',
+ 'dom/ProgressEvent.cpp',
+ 'dom/ProgressEvent.h',
+ 'dom/QualifiedName.cpp',
+ 'dom/QualifiedName.h',
+ 'dom/Range.cpp',
+ 'dom/Range.h',
+ 'dom/RangeBoundaryPoint.h',
+ 'dom/RangeException.h',
+ 'dom/RegisteredEventListener.cpp',
+ 'dom/RegisteredEventListener.h',
+ 'dom/ScriptElement.cpp',
+ 'dom/ScriptElement.h',
+ 'dom/ScriptExecutionContext.cpp',
+ 'dom/ScriptExecutionContext.h',
+ 'dom/SelectElement.cpp',
+ 'dom/SelectElement.h',
+ 'dom/SelectorNodeList.cpp',
+ 'dom/SelectorNodeList.h',
+ 'dom/StaticNodeList.cpp',
+ 'dom/StaticNodeList.h',
+ 'dom/StaticStringList.cpp',
+ 'dom/StaticStringList.h',
+ 'dom/StyleElement.cpp',
+ 'dom/StyleElement.h',
+ 'dom/StyledElement.cpp',
+ 'dom/StyledElement.h',
+ 'dom/TagNodeList.cpp',
+ 'dom/TagNodeList.h',
+ 'dom/Text.cpp',
+ 'dom/Text.h',
+ 'dom/TextEvent.cpp',
+ 'dom/TextEvent.h',
+ 'dom/Tokenizer.h',
+ 'dom/Traversal.cpp',
+ 'dom/Traversal.h',
+ 'dom/TreeWalker.cpp',
+ 'dom/TreeWalker.h',
+ 'dom/UIEvent.cpp',
+ 'dom/UIEvent.h',
+ 'dom/UIEventWithKeyState.cpp',
+ 'dom/UIEventWithKeyState.h',
+ 'dom/WebKitAnimationEvent.cpp',
+ 'dom/WebKitAnimationEvent.h',
+ 'dom/WebKitTransitionEvent.cpp',
+ 'dom/WebKitTransitionEvent.h',
+ 'dom/WheelEvent.cpp',
+ 'dom/WheelEvent.h',
+ 'dom/XMLTokenizer.cpp',
+ 'dom/XMLTokenizer.h',
+ 'dom/XMLTokenizerLibxml2.cpp',
+ 'dom/XMLTokenizerScope.cpp',
+ 'dom/XMLTokenizerScope.h',
+ 'dom/XMLTokenizerQt.cpp',
+ 'editing/android/EditorAndroid.cpp',
+ 'editing/chromium/EditorChromium.cpp',
+ 'editing/mac/EditorMac.mm',
+ 'editing/mac/SelectionControllerMac.mm',
+ 'editing/qt/EditorQt.cpp',
+ 'editing/wx/EditorWx.cpp',
+ 'editing/AppendNodeCommand.cpp',
+ 'editing/AppendNodeCommand.h',
+ 'editing/ApplyStyleCommand.cpp',
+ 'editing/ApplyStyleCommand.h',
+ 'editing/BreakBlockquoteCommand.cpp',
+ 'editing/BreakBlockquoteCommand.h',
+ 'editing/CompositeEditCommand.cpp',
+ 'editing/CompositeEditCommand.h',
+ 'editing/CreateLinkCommand.cpp',
+ 'editing/CreateLinkCommand.h',
+ 'editing/DeleteButton.cpp',
+ 'editing/DeleteButton.h',
+ 'editing/DeleteButtonController.cpp',
+ 'editing/DeleteButtonController.h',
+ 'editing/DeleteFromTextNodeCommand.cpp',
+ 'editing/DeleteFromTextNodeCommand.h',
+ 'editing/DeleteSelectionCommand.cpp',
+ 'editing/DeleteSelectionCommand.h',
+ 'editing/EditAction.h',
+ 'editing/EditCommand.cpp',
+ 'editing/EditCommand.h',
+ 'editing/Editor.cpp',
+ 'editing/Editor.h',
+ 'editing/EditorCommand.cpp',
+ 'editing/EditorDeleteAction.h',
+ 'editing/EditorInsertAction.h',
+ 'editing/FormatBlockCommand.cpp',
+ 'editing/FormatBlockCommand.h',
+ 'editing/HTMLInterchange.cpp',
+ 'editing/HTMLInterchange.h',
+ 'editing/IndentOutdentCommand.cpp',
+ 'editing/IndentOutdentCommand.h',
+ 'editing/InsertIntoTextNodeCommand.cpp',
+ 'editing/InsertIntoTextNodeCommand.h',
+ 'editing/InsertLineBreakCommand.cpp',
+ 'editing/InsertLineBreakCommand.h',
+ 'editing/InsertListCommand.cpp',
+ 'editing/InsertListCommand.h',
+ 'editing/InsertNodeBeforeCommand.cpp',
+ 'editing/InsertNodeBeforeCommand.h',
+ 'editing/InsertParagraphSeparatorCommand.cpp',
+ 'editing/InsertParagraphSeparatorCommand.h',
+ 'editing/InsertTextCommand.cpp',
+ 'editing/InsertTextCommand.h',
+ 'editing/JoinTextNodesCommand.cpp',
+ 'editing/JoinTextNodesCommand.h',
+ 'editing/MergeIdenticalElementsCommand.cpp',
+ 'editing/MergeIdenticalElementsCommand.h',
+ 'editing/ModifySelectionListLevel.cpp',
+ 'editing/ModifySelectionListLevel.h',
+ 'editing/MoveSelectionCommand.cpp',
+ 'editing/MoveSelectionCommand.h',
+ 'editing/RemoveCSSPropertyCommand.cpp',
+ 'editing/RemoveCSSPropertyCommand.h',
+ 'editing/RemoveFormatCommand.cpp',
+ 'editing/RemoveFormatCommand.h',
+ 'editing/RemoveNodeCommand.cpp',
+ 'editing/RemoveNodeCommand.h',
+ 'editing/RemoveNodePreservingChildrenCommand.cpp',
+ 'editing/RemoveNodePreservingChildrenCommand.h',
+ 'editing/ReplaceNodeWithSpanCommand.cpp',
+ 'editing/ReplaceNodeWithSpanCommand.h',
+ 'editing/ReplaceSelectionCommand.cpp',
+ 'editing/ReplaceSelectionCommand.h',
+ 'editing/SelectionController.cpp',
+ 'editing/SelectionController.h',
+ 'editing/SetNodeAttributeCommand.cpp',
+ 'editing/SetNodeAttributeCommand.h',
+ 'editing/SmartReplace.cpp',
+ 'editing/SmartReplace.h',
+ 'editing/SmartReplaceCF.cpp',
+ 'editing/SmartReplaceICU.cpp',
+ 'editing/SplitElementCommand.cpp',
+ 'editing/SplitElementCommand.h',
+ 'editing/SplitTextNodeCommand.cpp',
+ 'editing/SplitTextNodeCommand.h',
+ 'editing/SplitTextNodeContainingElementCommand.cpp',
+ 'editing/SplitTextNodeContainingElementCommand.h',
+ 'editing/TextAffinity.h',
+ 'editing/TextGranularity.h',
+ 'editing/TextIterator.cpp',
+ 'editing/TextIterator.h',
+ 'editing/TypingCommand.cpp',
+ 'editing/TypingCommand.h',
+ 'editing/UnlinkCommand.cpp',
+ 'editing/UnlinkCommand.h',
+ 'editing/VisiblePosition.cpp',
+ 'editing/VisiblePosition.h',
+ 'editing/VisibleSelection.cpp',
+ 'editing/VisibleSelection.h',
+ 'editing/WrapContentsInDummySpanCommand.cpp',
+ 'editing/WrapContentsInDummySpanCommand.h',
+ 'editing/htmlediting.cpp',
+ 'editing/htmlediting.h',
+ 'editing/markup.cpp',
+ 'editing/markup.h',
+ 'editing/visible_units.cpp',
+ 'editing/visible_units.h',
+ 'history/mac/HistoryItemMac.mm',
+ 'history/BackForwardList.cpp',
+ 'history/BackForwardList.h',
+ 'history/BackForwardListChromium.cpp',
+ 'history/CachedFrame.cpp',
+ 'history/CachedFrame.h',
+ 'history/CachedFramePlatformData.h',
+ 'history/CachedPage.cpp',
+ 'history/CachedPage.h',
+ 'history/HistoryItem.cpp',
+ 'history/HistoryItem.h',
+ 'history/PageCache.cpp',
+ 'history/PageCache.h',
+ 'html/CanvasGradient.cpp',
+ 'html/CanvasGradient.h',
+ 'html/CanvasPattern.cpp',
+ 'html/CanvasPattern.h',
+ 'html/CanvasPixelArray.cpp',
+ 'html/CanvasPixelArray.h',
+ 'html/CanvasRenderingContext2D.cpp',
+ 'html/CanvasRenderingContext2D.h',
+ 'html/CanvasStyle.cpp',
+ 'html/CanvasStyle.h',
+ 'html/CollectionCache.cpp',
+ 'html/CollectionCache.h',
+ 'html/CollectionType.h',
+ 'html/DataGridColumn.cpp',
+ 'html/DataGridColumn.h',
+ 'html/DOMDataGridDataSource.cpp',
+ 'html/DOMDataGridDataSource.h',
+ 'html/DataGridColumnList.cpp',
+ 'html/DataGridColumnList.h',
+ 'html/File.cpp',
+ 'html/File.h',
+ 'html/FileList.cpp',
+ 'html/FileList.h',
+ 'html/FormDataList.cpp',
+ 'html/FormDataList.h',
+ 'html/HTMLAnchorElement.cpp',
+ 'html/HTMLAnchorElement.h',
+ 'html/HTMLAppletElement.cpp',
+ 'html/HTMLAppletElement.h',
+ 'html/HTMLAreaElement.cpp',
+ 'html/HTMLAreaElement.h',
+ 'html/HTMLAudioElement.cpp',
+ 'html/HTMLAudioElement.h',
+ 'html/HTMLBRElement.cpp',
+ 'html/HTMLBRElement.h',
+ 'html/HTMLBaseElement.cpp',
+ 'html/HTMLBaseElement.h',
+ 'html/HTMLBaseFontElement.cpp',
+ 'html/HTMLBaseFontElement.h',
+ 'html/HTMLBlockquoteElement.cpp',
+ 'html/HTMLBlockquoteElement.h',
+ 'html/HTMLBodyElement.cpp',
+ 'html/HTMLBodyElement.h',
+ 'html/HTMLButtonElement.cpp',
+ 'html/HTMLButtonElement.h',
+ 'html/HTMLCanvasElement.cpp',
+ 'html/HTMLCanvasElement.h',
+ 'html/HTMLCollection.cpp',
+ 'html/HTMLCollection.h',
+ 'html/HTMLDListElement.cpp',
+ 'html/HTMLDListElement.h',
+ 'html/HTMLDataGridCellElement.cpp',
+ 'html/HTMLDataGridCellElement.h',
+ 'html/HTMLDataGridColElement.cpp',
+ 'html/HTMLDataGridColElement.h',
+ 'html/HTMLDataGridElement.cpp',
+ 'html/HTMLDataGridElement.h',
+ 'html/HTMLDataGridRowElement.cpp',
+ 'html/HTMLDataGridRowElement.h',
+ 'html/HTMLDirectoryElement.cpp',
+ 'html/HTMLDirectoryElement.h',
+ 'html/HTMLDivElement.cpp',
+ 'html/HTMLDivElement.h',
+ 'html/HTMLDocument.cpp',
+ 'html/HTMLDocument.h',
+ 'html/HTMLElement.cpp',
+ 'html/HTMLElement.h',
+ 'html/HTMLEmbedElement.cpp',
+ 'html/HTMLEmbedElement.h',
+ 'html/HTMLFieldSetElement.cpp',
+ 'html/HTMLFieldSetElement.h',
+ 'html/HTMLFontElement.cpp',
+ 'html/HTMLFontElement.h',
+ 'html/HTMLFormCollection.cpp',
+ 'html/HTMLFormCollection.h',
+ 'html/HTMLFormControlElement.cpp',
+ 'html/HTMLFormControlElement.h',
+ 'html/HTMLFormElement.cpp',
+ 'html/HTMLFormElement.h',
+ 'html/HTMLFrameElement.cpp',
+ 'html/HTMLFrameElement.h',
+ 'html/HTMLFrameElementBase.cpp',
+ 'html/HTMLFrameElementBase.h',
+ 'html/HTMLFrameOwnerElement.cpp',
+ 'html/HTMLFrameOwnerElement.h',
+ 'html/HTMLFrameSetElement.cpp',
+ 'html/HTMLFrameSetElement.h',
+ 'html/HTMLHRElement.cpp',
+ 'html/HTMLHRElement.h',
+ 'html/HTMLHeadElement.cpp',
+ 'html/HTMLHeadElement.h',
+ 'html/HTMLHeadingElement.cpp',
+ 'html/HTMLHeadingElement.h',
+ 'html/HTMLHtmlElement.cpp',
+ 'html/HTMLHtmlElement.h',
+ 'html/HTMLIFrameElement.cpp',
+ 'html/HTMLIFrameElement.h',
+ 'html/HTMLImageElement.cpp',
+ 'html/HTMLImageElement.h',
+ 'html/HTMLImageLoader.cpp',
+ 'html/HTMLImageLoader.h',
+ 'html/HTMLInputElement.cpp',
+ 'html/HTMLInputElement.h',
+ 'html/HTMLIsIndexElement.cpp',
+ 'html/HTMLIsIndexElement.h',
+ 'html/HTMLKeygenElement.cpp',
+ 'html/HTMLKeygenElement.h',
+ 'html/HTMLLIElement.cpp',
+ 'html/HTMLLIElement.h',
+ 'html/HTMLLabelElement.cpp',
+ 'html/HTMLLabelElement.h',
+ 'html/HTMLLegendElement.cpp',
+ 'html/HTMLLegendElement.h',
+ 'html/HTMLLinkElement.cpp',
+ 'html/HTMLLinkElement.h',
+ 'html/HTMLMapElement.cpp',
+ 'html/HTMLMapElement.h',
+ 'html/HTMLMarqueeElement.cpp',
+ 'html/HTMLMarqueeElement.h',
+ 'html/HTMLMediaElement.cpp',
+ 'html/HTMLMediaElement.h',
+ 'html/HTMLMenuElement.cpp',
+ 'html/HTMLMenuElement.h',
+ 'html/HTMLMetaElement.cpp',
+ 'html/HTMLMetaElement.h',
+ 'html/HTMLModElement.cpp',
+ 'html/HTMLModElement.h',
+ 'html/HTMLNameCollection.cpp',
+ 'html/HTMLNameCollection.h',
+ 'html/HTMLOListElement.cpp',
+ 'html/HTMLOListElement.h',
+ 'html/HTMLObjectElement.cpp',
+ 'html/HTMLObjectElement.h',
+ 'html/HTMLOptGroupElement.cpp',
+ 'html/HTMLOptGroupElement.h',
+ 'html/HTMLOptionElement.cpp',
+ 'html/HTMLOptionElement.h',
+ 'html/HTMLOptionsCollection.cpp',
+ 'html/HTMLOptionsCollection.h',
+ 'html/HTMLParagraphElement.cpp',
+ 'html/HTMLParagraphElement.h',
+ 'html/HTMLParamElement.cpp',
+ 'html/HTMLParamElement.h',
+ 'html/HTMLParser.cpp',
+ 'html/HTMLParser.h',
+ 'html/HTMLParserErrorCodes.cpp',
+ 'html/HTMLParserErrorCodes.h',
+ 'html/HTMLPlugInElement.cpp',
+ 'html/HTMLPlugInElement.h',
+ 'html/HTMLPlugInImageElement.cpp',
+ 'html/HTMLPlugInImageElement.h',
+ 'html/HTMLPreElement.cpp',
+ 'html/HTMLPreElement.h',
+ 'html/HTMLQuoteElement.cpp',
+ 'html/HTMLQuoteElement.h',
+ 'html/HTMLScriptElement.cpp',
+ 'html/HTMLScriptElement.h',
+ 'html/HTMLSelectElement.cpp',
+ 'html/HTMLSelectElement.h',
+ 'html/HTMLSourceElement.cpp',
+ 'html/HTMLSourceElement.h',
+ 'html/HTMLStyleElement.cpp',
+ 'html/HTMLStyleElement.h',
+ 'html/HTMLTableCaptionElement.cpp',
+ 'html/HTMLTableCaptionElement.h',
+ 'html/HTMLTableCellElement.cpp',
+ 'html/HTMLTableCellElement.h',
+ 'html/HTMLTableColElement.cpp',
+ 'html/HTMLTableColElement.h',
+ 'html/HTMLTableElement.cpp',
+ 'html/HTMLTableElement.h',
+ 'html/HTMLTablePartElement.cpp',
+ 'html/HTMLTablePartElement.h',
+ 'html/HTMLTableRowElement.cpp',
+ 'html/HTMLTableRowElement.h',
+ 'html/HTMLTableRowsCollection.cpp',
+ 'html/HTMLTableRowsCollection.h',
+ 'html/HTMLTableSectionElement.cpp',
+ 'html/HTMLTableSectionElement.h',
+ 'html/HTMLTextAreaElement.cpp',
+ 'html/HTMLTextAreaElement.h',
+ 'html/HTMLTitleElement.cpp',
+ 'html/HTMLTitleElement.h',
+ 'html/HTMLTokenizer.cpp',
+ 'html/HTMLTokenizer.h',
+ 'html/HTMLUListElement.cpp',
+ 'html/HTMLUListElement.h',
+ 'html/HTMLVideoElement.cpp',
+ 'html/HTMLVideoElement.h',
+ 'html/HTMLViewSourceDocument.cpp',
+ 'html/HTMLViewSourceDocument.h',
+ 'html/ImageData.cpp',
+ 'html/ImageData.h',
+ 'html/MediaError.h',
+ 'html/PreloadScanner.cpp',
+ 'html/PreloadScanner.h',
+ 'html/TextMetrics.h',
+ 'html/TimeRanges.cpp',
+ 'html/TimeRanges.h',
+ 'html/ValidityState.cpp',
+ 'html/ValidityState.h',
+ 'html/VoidCallback.h',
+ 'inspector/InspectorClient.h',
+ 'inspector/ConsoleMessage.cpp',
+ 'inspector/ConsoleMessage.h',
+ 'inspector/InspectorController.cpp',
+ 'inspector/InspectorController.h',
+ 'inspector/InspectorDatabaseResource.cpp',
+ 'inspector/InspectorDatabaseResource.h',
+ 'inspector/InspectorDOMStorageResource.cpp',
+ 'inspector/InspectorDOMStorageResource.h',
+ 'inspector/InspectorFrontend.cpp',
+ 'inspector/InspectorFrontend.h',
+ 'inspector/InspectorJSONObject.cpp',
+ 'inspector/InspectorJSONObject.h',
+ 'inspector/InspectorResource.cpp',
+ 'inspector/InspectorResource.h',
+ 'inspector/JavaScriptCallFrame.cpp',
+ 'inspector/JavaScriptCallFrame.h',
+ 'inspector/JavaScriptDebugListener.h',
+ 'inspector/JavaScriptDebugServer.cpp',
+ 'inspector/JavaScriptDebugServer.h',
+ 'inspector/JavaScriptProfile.cpp',
+ 'inspector/JavaScriptProfile.h',
+ 'inspector/JavaScriptProfileNode.cpp',
+ 'inspector/JavaScriptProfileNode.h',
+ 'loader/appcache/ApplicationCache.cpp',
+ 'loader/appcache/ApplicationCache.h',
+ 'loader/appcache/ApplicationCacheGroup.cpp',
+ 'loader/appcache/ApplicationCacheGroup.h',
+ 'loader/appcache/ApplicationCacheResource.cpp',
+ 'loader/appcache/ApplicationCacheResource.h',
+ 'loader/appcache/ApplicationCacheStorage.cpp',
+ 'loader/appcache/ApplicationCacheStorage.h',
+ 'loader/appcache/DOMApplicationCache.cpp',
+ 'loader/appcache/DOMApplicationCache.h',
+ 'loader/appcache/ManifestParser.cpp',
+ 'loader/appcache/ManifestParser.h',
+ 'loader/archive/cf/LegacyWebArchive.cpp',
+ 'loader/archive/cf/LegacyWebArchive.h',
+ 'loader/archive/cf/LegacyWebArchiveMac.mm',
+ 'loader/archive/Archive.h',
+ 'loader/archive/ArchiveFactory.cpp',
+ 'loader/archive/ArchiveFactory.h',
+ 'loader/archive/ArchiveResource.cpp',
+ 'loader/archive/ArchiveResource.h',
+ 'loader/archive/ArchiveResourceCollection.cpp',
+ 'loader/archive/ArchiveResourceCollection.h',
+ 'loader/icon/IconDatabase.cpp',
+ 'loader/icon/IconDatabase.h',
+ 'loader/icon/IconDatabaseClient.h',
+ 'loader/icon/IconDatabaseNone.cpp',
+ 'loader/icon/IconFetcher.cpp',
+ 'loader/icon/IconFetcher.h',
+ 'loader/icon/IconLoader.cpp',
+ 'loader/icon/IconLoader.h',
+ 'loader/icon/IconRecord.cpp',
+ 'loader/icon/IconRecord.h',
+ 'loader/icon/PageURLRecord.cpp',
+ 'loader/icon/PageURLRecord.h',
+ 'loader/mac/DocumentLoaderMac.cpp',
+ 'loader/mac/LoaderNSURLExtras.h',
+ 'loader/mac/LoaderNSURLExtras.mm',
+ 'loader/mac/ResourceLoaderMac.mm',
+ 'loader/win/DocumentLoaderWin.cpp',
+ 'loader/win/FrameLoaderWin.cpp',
+ 'loader/Cache.cpp',
+ 'loader/Cache.h',
+ 'loader/CachePolicy.h',
+ 'loader/CachedCSSStyleSheet.cpp',
+ 'loader/CachedCSSStyleSheet.h',
+ 'loader/CachedFont.cpp',
+ 'loader/CachedFont.h',
+ 'loader/CachedImage.cpp',
+ 'loader/CachedImage.h',
+ 'loader/CachedResource.cpp',
+ 'loader/CachedResource.h',
+ 'loader/CachedResourceClient.h',
+ 'loader/CachedResourceClientWalker.cpp',
+ 'loader/CachedResourceClientWalker.h',
+ 'loader/CachedResourceHandle.cpp',
+ 'loader/CachedResourceHandle.h',
+ 'loader/CachedScript.cpp',
+ 'loader/CachedScript.h',
+ 'loader/CachedXBLDocument.cpp',
+ 'loader/CachedXBLDocument.h',
+ 'loader/CachedXSLStyleSheet.cpp',
+ 'loader/CachedXSLStyleSheet.h',
+ 'loader/CrossOriginAccessControl.cpp',
+ 'loader/CrossOriginAccessControl.h',
+ 'loader/CrossOriginPreflightResultCache.cpp',
+ 'loader/CrossOriginPreflightResultCache.h',
+ 'loader/DocLoader.cpp',
+ 'loader/DocLoader.h',
+ 'loader/DocumentLoader.cpp',
+ 'loader/DocumentLoader.h',
+ 'loader/DocumentThreadableLoader.cpp',
+ 'loader/DocumentThreadableLoader.h',
+ 'loader/EmptyClients.h',
+ 'loader/FTPDirectoryDocument.cpp',
+ 'loader/FTPDirectoryDocument.h',
+ 'loader/FTPDirectoryParser.cpp',
+ 'loader/FTPDirectoryParser.h',
+ 'loader/FormState.cpp',
+ 'loader/FormState.h',
+ 'loader/FrameLoader.cpp',
+ 'loader/FrameLoader.h',
+ 'loader/FrameLoaderClient.h',
+ 'loader/FrameLoaderTypes.h',
+ 'loader/ImageDocument.cpp',
+ 'loader/ImageDocument.h',
+ 'loader/ImageLoader.cpp',
+ 'loader/ImageLoader.h',
+ 'loader/MainResourceLoader.cpp',
+ 'loader/MainResourceLoader.h',
+ 'loader/MediaDocument.cpp',
+ 'loader/MediaDocument.h',
+ 'loader/NavigationAction.cpp',
+ 'loader/NavigationAction.h',
+ 'loader/NetscapePlugInStreamLoader.cpp',
+ 'loader/NetscapePlugInStreamLoader.h',
+ 'loader/PluginDocument.cpp',
+ 'loader/PluginDocument.h',
+ 'loader/ProgressTracker.cpp',
+ 'loader/ProgressTracker.h',
+ 'loader/Request.cpp',
+ 'loader/Request.h',
+ 'loader/ResourceLoader.cpp',
+ 'loader/ResourceLoader.h',
+ 'loader/SubresourceLoader.cpp',
+ 'loader/SubresourceLoader.h',
+ 'loader/SubresourceLoaderClient.h',
+ 'loader/SubstituteData.h',
+ 'loader/SubstituteResource.h',
+ 'loader/TextDocument.cpp',
+ 'loader/TextDocument.h',
+ 'loader/TextResourceDecoder.cpp',
+ 'loader/TextResourceDecoder.h',
+ 'loader/ThreadableLoader.cpp',
+ 'loader/ThreadableLoader.h',
+ 'loader/ThreadableLoaderClient.h',
+ 'loader/ThreadableLoaderClientWrapper.h',
+ 'loader/UserStyleSheetLoader.cpp',
+ 'loader/UserStyleSheetLoader.h',
+ 'loader/WorkerThreadableLoader.cpp',
+ 'loader/WorkerThreadableLoader.h',
+ 'loader/loader.cpp',
+ 'loader/loader.h',
+ 'page/animation/AnimationBase.cpp',
+ 'page/animation/AnimationBase.h',
+ 'page/animation/AnimationController.cpp',
+ 'page/animation/AnimationController.h',
+ 'page/animation/AnimationControllerPrivate.h',
+ 'page/animation/CompositeAnimation.cpp',
+ 'page/animation/CompositeAnimation.h',
+ 'page/animation/ImplicitAnimation.cpp',
+ 'page/animation/ImplicitAnimation.h',
+ 'page/animation/KeyframeAnimation.cpp',
+ 'page/animation/KeyframeAnimation.h',
+ 'page/chromium/ChromeClientChromium.h',
+ 'page/chromium/DragControllerChromium.cpp',
+ 'page/chromium/EventHandlerChromium.cpp',
+ 'page/chromium/FrameChromium.cpp',
+ 'page/chromium/FrameChromium.h',
+ 'page/gtk/DragControllerGtk.cpp',
+ 'page/gtk/EventHandlerGtk.cpp',
+ 'page/gtk/FrameGtk.cpp',
+ 'page/mac/ChromeMac.mm',
+ 'page/mac/DragControllerMac.mm',
+ 'page/mac/EventHandlerMac.mm',
+ 'page/mac/FrameMac.mm',
+ 'page/mac/PageMac.cpp',
+ 'page/mac/WebCoreFrameView.h',
+ 'page/mac/WebCoreKeyboardUIMode.h',
+ 'page/mac/WebCoreViewFactory.h',
+ 'page/mac/WebCoreViewFactory.m',
+ 'page/mac/WebDashboardRegion.h',
+ 'page/mac/WebDashboardRegion.m',
+ 'page/qt/DragControllerQt.cpp',
+ 'page/qt/EventHandlerQt.cpp',
+ 'page/qt/FrameQt.cpp',
+ 'page/win/DragControllerWin.cpp',
+ 'page/win/EventHandlerWin.cpp',
+ 'page/win/FrameCGWin.cpp',
+ 'page/win/FrameCairoWin.cpp',
+ 'page/win/FrameWin.cpp',
+ 'page/win/FrameWin.h',
+ 'page/win/PageWin.cpp',
+ 'page/wx/DragControllerWx.cpp',
+ 'page/wx/EventHandlerWx.cpp',
+ 'page/BarInfo.cpp',
+ 'page/BarInfo.h',
+ 'page/Chrome.cpp',
+ 'page/Chrome.h',
+ 'page/ChromeClient.h',
+ 'page/Console.cpp',
+ 'page/Console.h',
+ 'page/ContextMenuClient.h',
+ 'page/ContextMenuController.cpp',
+ 'page/ContextMenuController.h',
+ 'page/Coordinates.cpp',
+ 'page/DOMSelection.cpp',
+ 'page/DOMSelection.h',
+ 'page/DOMTimer.cpp',
+ 'page/DOMTimer.h',
+ 'page/DOMWindow.cpp',
+ 'page/DOMWindow.h',
+ 'page/DragActions.h',
+ 'page/DragClient.h',
+ 'page/DragController.cpp',
+ 'page/DragController.h',
+ 'page/EditorClient.h',
+ 'page/EventHandler.cpp',
+ 'page/EventHandler.h',
+ 'page/FocusController.cpp',
+ 'page/FocusController.h',
+ 'page/FocusDirection.h',
+ 'page/Frame.cpp',
+ 'page/Frame.h',
+ 'page/FrameLoadRequest.h',
+ 'page/FrameTree.cpp',
+ 'page/FrameTree.h',
+ 'page/FrameView.cpp',
+ 'page/FrameView.h',
+ 'page/Geolocation.cpp',
+ 'page/Geolocation.h',
+ 'page/Geoposition.cpp',
+ 'page/Geoposition.h',
+ 'page/History.cpp',
+ 'page/History.h',
+ 'page/Location.cpp',
+ 'page/Location.h',
+ 'page/MouseEventWithHitTestResults.cpp',
+ 'page/MouseEventWithHitTestResults.h',
+ 'page/Navigator.cpp',
+ 'page/Navigator.h',
+ 'page/NavigatorBase.cpp',
+ 'page/NavigatorBase.h',
+ 'page/Page.cpp',
+ 'page/Page.h',
+ 'page/PageGroup.cpp',
+ 'page/PageGroup.h',
+ 'page/PageGroupLoadDeferrer.cpp',
+ 'page/PageGroupLoadDeferrer.h',
+ 'page/PositionCallback.h',
+ 'page/PositionError.h',
+ 'page/PositionErrorCallback.h',
+ 'page/PositionOptions.h',
+ 'page/PrintContext.cpp',
+ 'page/PrintContext.h',
+ 'page/Screen.cpp',
+ 'page/Screen.h',
+ 'page/SecurityOrigin.cpp',
+ 'page/SecurityOrigin.h',
+ 'page/SecurityOriginHash.h',
+ 'page/Settings.cpp',
+ 'page/Settings.h',
+ 'page/WebKitPoint.h',
+ 'page/WindowFeatures.cpp',
+ 'page/WindowFeatures.h',
+ 'page/WorkerNavigator.cpp',
+ 'page/WorkerNavigator.h',
+ 'page/XSSAuditor.cpp',
+ 'page/XSSAuditor.h',
+ 'platform/animation/Animation.cpp',
+ 'platform/animation/Animation.h',
+ 'platform/animation/AnimationList.cpp',
+ 'platform/animation/AnimationList.h',
+ 'platform/animation/TimingFunction.h',
+ 'platform/cf/FileSystemCF.cpp',
+ 'platform/cf/KURLCFNet.cpp',
+ 'platform/cf/SchedulePair.cpp',
+ 'platform/cf/SchedulePair.h',
+ 'platform/cf/SharedBufferCF.cpp',
+ 'platform/chromium/ChromiumBridge.h',
+ 'platform/chromium/ChromiumDataObject.cpp',
+ 'platform/chromium/ChromiumDataObject.h',
+ 'platform/chromium/ClipboardChromium.cpp',
+ 'platform/chromium/ClipboardChromium.h',
+ 'platform/chromium/ClipboardChromiumLinux.cpp',
+ 'platform/chromium/ClipboardChromiumMac.cpp',
+ 'platform/chromium/ClipboardChromiumWin.cpp',
+ 'platform/chromium/ClipboardUtilitiesChromium.cpp',
+ 'platform/chromium/ClipboardUtilitiesChromium.h',
+ 'platform/chromium/ContextMenuChromium.cpp',
+ 'platform/chromium/ContextMenuItemChromium.cpp',
+ 'platform/chromium/CursorChromium.cpp',
+ 'platform/chromium/DragDataChromium.cpp',
+ 'platform/chromium/DragDataRef.h',
+ 'platform/chromium/DragImageChromium.cpp',
+ 'platform/chromium/DragImageRef.h',
+ 'platform/chromium/FileChooserChromium.cpp',
+ 'platform/chromium/FileSystemChromium.cpp',
+ 'platform/chromium/FileSystemChromiumLinux.cpp',
+ 'platform/chromium/FileSystemChromiumMac.mm',
+ 'platform/chromium/FileSystemChromiumWin.cpp',
+ 'platform/chromium/FramelessScrollView.cpp',
+ 'platform/chromium/FramelessScrollView.h',
+ 'platform/chromium/FramelessScrollViewClient.h',
+ 'platform/chromium/KeyCodeConversion.h',
+ 'platform/chromium/KeyCodeConversionGtk.cpp',
+ 'platform/chromium/KeyboardCodesPosix.h',
+ 'platform/chromium/KeyboardCodesWin.h',
+ 'platform/chromium/Language.cpp',
+ 'platform/chromium/LinkHashChromium.cpp',
+ 'platform/chromium/MimeTypeRegistryChromium.cpp',
+ 'platform/chromium/PasteboardChromium.cpp',
+ 'platform/chromium/PasteboardPrivate.h',
+ 'platform/chromium/PlatformCursor.h',
+ 'platform/chromium/PlatformKeyboardEventChromium.cpp',
+ 'platform/chromium/PlatformScreenChromium.cpp',
+ 'platform/chromium/PlatformWidget.h',
+ 'platform/chromium/PopupMenuChromium.cpp',
+ 'platform/chromium/PopupMenuChromium.h',
+ 'platform/chromium/PopupMenuPrivate.h',
+ 'platform/chromium/SSLKeyGeneratorChromium.cpp',
+ 'platform/chromium/ScrollbarThemeChromium.cpp',
+ 'platform/chromium/ScrollbarThemeChromium.h',
+ 'platform/chromium/ScrollbarThemeChromiumLinux.cpp',
+ 'platform/chromium/ScrollbarThemeChromiumWin.cpp',
+ 'platform/chromium/SearchPopupMenuChromium.cpp',
+ 'platform/chromium/SharedTimerChromium.cpp',
+ 'platform/chromium/SoundChromiumPosix.cpp',
+ 'platform/chromium/SoundChromiumWin.cpp',
+ 'platform/chromium/SuddenTerminationChromium.cpp',
+ 'platform/chromium/SystemTimeChromium.cpp',
+ 'platform/chromium/TemporaryLinkStubs.cpp',
+ 'platform/chromium/WidgetChromium.cpp',
+ 'platform/chromium/WindowsVersion.cpp',
+ 'platform/chromium/WindowsVersion.h',
+ 'platform/graphics/cairo/CairoPath.h',
+ 'platform/graphics/cairo/FontCairo.cpp',
+ 'platform/graphics/cairo/GradientCairo.cpp',
+ 'platform/graphics/cairo/GraphicsContextCairo.cpp',
+ 'platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h',
+ 'platform/graphics/cairo/ImageBufferCairo.cpp',
+ 'platform/graphics/cairo/ImageBufferData.h',
+ 'platform/graphics/cairo/ImageCairo.cpp',
+ 'platform/graphics/cairo/ImageSourceCairo.cpp',
+ 'platform/graphics/cairo/PathCairo.cpp',
+ 'platform/graphics/cairo/PatternCairo.cpp',
+ 'platform/graphics/cairo/TransformationMatrixCairo.cpp',
+ 'platform/graphics/cg/ColorCG.cpp',
+ 'platform/graphics/cg/FloatPointCG.cpp',
+ 'platform/graphics/cg/FloatRectCG.cpp',
+ 'platform/graphics/cg/FloatSizeCG.cpp',
+ 'platform/graphics/cg/GradientCG.cpp',
+ 'platform/graphics/cg/GraphicsContextCG.cpp',
+ 'platform/graphics/cg/GraphicsContextPlatformPrivateCG.h',
+ 'platform/graphics/cg/ImageBufferCG.cpp',
+ 'platform/graphics/cg/ImageBufferData.h',
+ 'platform/graphics/cg/ImageCG.cpp',
+ 'platform/graphics/cg/ImageSourceCG.cpp',
+ 'platform/graphics/cg/ImageSourceCG.h',
+ 'platform/graphics/cg/ImageSourceCGMac.mm',
+ 'platform/graphics/cg/ImageSourceCGWin.cpp',
+ 'platform/graphics/cg/IntPointCG.cpp',
+ 'platform/graphics/cg/IntRectCG.cpp',
+ 'platform/graphics/cg/IntSizeCG.cpp',
+ 'platform/graphics/cg/PDFDocumentImage.cpp',
+ 'platform/graphics/cg/PDFDocumentImage.h',
+ 'platform/graphics/cg/PathCG.cpp',
+ 'platform/graphics/cg/PatternCG.cpp',
+ 'platform/graphics/cg/TransformationMatrixCG.cpp',
+ 'platform/graphics/chromium/FontCacheChromiumWin.cpp',
+ 'platform/graphics/chromium/FontCacheLinux.cpp',
+ 'platform/graphics/chromium/FontChromiumWin.cpp',
+ 'platform/graphics/chromium/FontCustomPlatformData.cpp',
+ 'platform/graphics/chromium/FontCustomPlatformData.h',
+ 'platform/graphics/chromium/FontLinux.cpp',
+ 'platform/graphics/chromium/FontPlatformData.h',
+ 'platform/graphics/chromium/FontPlatformDataChromiumWin.cpp',
+ 'platform/graphics/chromium/FontPlatformDataChromiumWin.h',
+ 'platform/graphics/chromium/FontPlatformDataLinux.cpp',
+ 'platform/graphics/chromium/FontPlatformDataLinux.h',
+ 'platform/graphics/chromium/FontUtilsChromiumWin.cpp',
+ 'platform/graphics/chromium/FontUtilsChromiumWin.h',
+ 'platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp',
+ 'platform/graphics/chromium/GlyphPageTreeNodeLinux.cpp',
+ 'platform/graphics/chromium/IconChromiumLinux.cpp',
+ 'platform/graphics/chromium/IconChromiumMac.cpp',
+ 'platform/graphics/chromium/IconChromiumWin.cpp',
+ 'platform/graphics/chromium/ImageBufferData.h',
+ 'platform/graphics/chromium/ImageChromiumMac.mm',
+ 'platform/graphics/chromium/MediaPlayerPrivateChromium.h',
+ 'platform/graphics/chromium/PlatformIcon.h',
+ 'platform/graphics/chromium/SimpleFontDataChromiumWin.cpp',
+ 'platform/graphics/chromium/SimpleFontDataLinux.cpp',
+ 'platform/graphics/chromium/TransparencyWin.cpp',
+ 'platform/graphics/chromium/TransparencyWin.h',
+ 'platform/graphics/chromium/UniscribeHelper.cpp',
+ 'platform/graphics/chromium/UniscribeHelper.h',
+ 'platform/graphics/chromium/UniscribeHelperTextRun.cpp',
+ 'platform/graphics/chromium/UniscribeHelperTextRun.h',
+ 'platform/graphics/filters/FEBlend.cpp',
+ 'platform/graphics/filters/FEBlend.h',
+ 'platform/graphics/filters/FEColorMatrix.cpp',
+ 'platform/graphics/filters/FEColorMatrix.h',
+ 'platform/graphics/filters/FEComponentTransfer.cpp',
+ 'platform/graphics/filters/FEComponentTransfer.h',
+ 'platform/graphics/filters/FEComposite.cpp',
+ 'platform/graphics/filters/FEComposite.h',
+ 'platform/graphics/filters/SourceAlpha.cpp',
+ 'platform/graphics/filters/SourceAlpha.h',
+ 'platform/graphics/filters/SourceGraphic.cpp',
+ 'platform/graphics/filters/SourceGraphic.h',
+ 'platform/graphics/gtk/ColorGtk.cpp',
+ 'platform/graphics/gtk/FontCacheGtk.cpp',
+ 'platform/graphics/gtk/FontCustomPlatformData.cpp',
+ 'platform/graphics/gtk/FontCustomPlatformData.h',
+ 'platform/graphics/gtk/FontCustomPlatformDataPango.cpp',
+ 'platform/graphics/gtk/FontGtk.cpp',
+ 'platform/graphics/gtk/FontPlatformData.h',
+ 'platform/graphics/gtk/FontPlatformDataGtk.cpp',
+ 'platform/graphics/gtk/FontPlatformDataPango.cpp',
+ 'platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp',
+ 'platform/graphics/gtk/GlyphPageTreeNodePango.cpp',
+ 'platform/graphics/gtk/IconGtk.cpp',
+ 'platform/graphics/gtk/ImageGtk.cpp',
+ 'platform/graphics/gtk/IntPointGtk.cpp',
+ 'platform/graphics/gtk/IntRectGtk.cpp',
+ 'platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp',
+ 'platform/graphics/gtk/MediaPlayerPrivateGStreamer.h',
+ 'platform/graphics/gtk/SimpleFontDataGtk.cpp',
+ 'platform/graphics/gtk/SimpleFontDataPango.cpp',
+ 'platform/graphics/gtk/VideoSinkGStreamer.cpp',
+ 'platform/graphics/gtk/VideoSinkGStreamer.h',
+ 'platform/graphics/mac/ColorMac.h',
+ 'platform/graphics/mac/ColorMac.mm',
+ 'platform/graphics/mac/CoreTextController.cpp',
+ 'platform/graphics/mac/CoreTextController.h',
+ 'platform/graphics/mac/FloatPointMac.mm',
+ 'platform/graphics/mac/FloatRectMac.mm',
+ 'platform/graphics/mac/FloatSizeMac.mm',
+ 'platform/graphics/mac/FontCacheMac.mm',
+ 'platform/graphics/mac/FontCustomPlatformData.cpp',
+ 'platform/graphics/mac/FontCustomPlatformData.h',
+ 'platform/graphics/mac/FontMac.mm',
+ 'platform/graphics/mac/FontMacATSUI.mm',
+ 'platform/graphics/mac/FontMacCoreText.cpp',
+ 'platform/graphics/mac/FontPlatformData.h',
+ 'platform/graphics/mac/FontPlatformDataMac.mm',
+ 'platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
+ 'platform/graphics/mac/GraphicsContextMac.mm',
+ 'platform/graphics/mac/GraphicsLayerCA.h',
+ 'platform/graphics/mac/GraphicsLayerCA.mm',
+ 'platform/graphics/mac/IconMac.mm',
+ 'platform/graphics/mac/ImageMac.mm',
+ 'platform/graphics/mac/IntPointMac.mm',
+ 'platform/graphics/mac/IntRectMac.mm',
+ 'platform/graphics/mac/IntSizeMac.mm',
+ 'platform/graphics/mac/MediaPlayerPrivateQTKit.h',
+ 'platform/graphics/mac/MediaPlayerPrivateQTKit.mm',
+ 'platform/graphics/mac/MediaPlayerProxy.h',
+ 'platform/graphics/mac/SimpleFontDataMac.mm',
+ 'platform/graphics/mac/WebLayer.h',
+ 'platform/graphics/mac/WebLayer.mm',
+ 'platform/graphics/mac/WebTiledLayer.h',
+ 'platform/graphics/mac/WebTiledLayer.mm',
+ 'platform/graphics/MediaPlayer.cpp',
+ 'platform/graphics/opentype/OpenTypeUtilities.cpp',
+ 'platform/graphics/opentype/OpenTypeUtilities.h',
+ 'platform/graphics/qt/ColorQt.cpp',
+ 'platform/graphics/qt/FloatPointQt.cpp',
+ 'platform/graphics/qt/FloatRectQt.cpp',
+ 'platform/graphics/qt/FontCacheQt.cpp',
+ 'platform/graphics/qt/FontCustomPlatformData.cpp',
+ 'platform/graphics/qt/FontCustomPlatformData.h',
+ 'platform/graphics/qt/FontFallbackListQt.cpp',
+ 'platform/graphics/qt/FontPlatformData.h',
+ 'platform/graphics/qt/FontPlatformDataQt.cpp',
+ 'platform/graphics/qt/FontQt.cpp',
+ 'platform/graphics/qt/FontQt43.cpp',
+ 'platform/graphics/qt/GlyphPageTreeNodeQt.cpp',
+ 'platform/graphics/qt/GradientQt.cpp',
+ 'platform/graphics/qt/GraphicsContextQt.cpp',
+ 'platform/graphics/qt/IconQt.cpp',
+ 'platform/graphics/qt/ImageBufferData.h',
+ 'platform/graphics/qt/ImageBufferQt.cpp',
+ 'platform/graphics/qt/ImageDecoderQt.cpp',
+ 'platform/graphics/qt/ImageDecoderQt.h',
+ 'platform/graphics/qt/ImageQt.cpp',
+ 'platform/graphics/qt/ImageSourceQt.cpp',
+ 'platform/graphics/qt/IntPointQt.cpp',
+ 'platform/graphics/qt/IntRectQt.cpp',
+ 'platform/graphics/qt/IntSizeQt.cpp',
+ 'platform/graphics/qt/MediaPlayerPrivatePhonon.cpp',
+ 'platform/graphics/qt/MediaPlayerPrivatePhonon.h',
+ 'platform/graphics/qt/PathQt.cpp',
+ 'platform/graphics/qt/PatternQt.cpp',
+ 'platform/graphics/qt/SimpleFontDataQt.cpp',
+ 'platform/graphics/qt/StillImageQt.cpp',
+ 'platform/graphics/qt/StillImageQt.h',
+ 'platform/graphics/qt/TransformationMatrixQt.cpp',
+ 'platform/graphics/skia/BitmapImageSingleFrameSkia.h',
+ 'platform/graphics/skia/FloatPointSkia.cpp',
+ 'platform/graphics/skia/FloatRectSkia.cpp',
+ 'platform/graphics/skia/GradientSkia.cpp',
+ 'platform/graphics/skia/GraphicsContextPlatformPrivate.h',
+ 'platform/graphics/skia/GraphicsContextSkia.cpp',
+ 'platform/graphics/skia/ImageBufferSkia.cpp',
+ 'platform/graphics/skia/ImageSkia.cpp',
+ 'platform/graphics/skia/ImageSourceSkia.cpp',
+ 'platform/graphics/skia/ImageSourceSkia.h',
+ 'platform/graphics/skia/IntPointSkia.cpp',
+ 'platform/graphics/skia/IntRectSkia.cpp',
+ 'platform/graphics/skia/NativeImageSkia.cpp',
+ 'platform/graphics/skia/NativeImageSkia.h',
+ 'platform/graphics/skia/PathSkia.cpp',
+ 'platform/graphics/skia/PatternSkia.cpp',
+ 'platform/graphics/skia/PlatformContextSkia.cpp',
+ 'platform/graphics/skia/PlatformContextSkia.h',
+ 'platform/graphics/skia/PlatformGraphics.h',
+ 'platform/graphics/skia/SkiaFontWin.cpp',
+ 'platform/graphics/skia/SkiaFontWin.h',
+ 'platform/graphics/skia/SkiaUtils.cpp',
+ 'platform/graphics/skia/SkiaUtils.h',
+ 'platform/graphics/skia/TransformationMatrixSkia.cpp',
+ 'platform/graphics/transforms/IdentityTransformOperation.h',
+ 'platform/graphics/transforms/Matrix3DTransformOperation.cpp',
+ 'platform/graphics/transforms/Matrix3DTransformOperation.h',
+ 'platform/graphics/transforms/MatrixTransformOperation.cpp',
+ 'platform/graphics/transforms/MatrixTransformOperation.h',
+ 'platform/graphics/transforms/PerspectiveTransformOperation.cpp',
+ 'platform/graphics/transforms/PerspectiveTransformOperation.h',
+ 'platform/graphics/transforms/RotateTransformOperation.cpp',
+ 'platform/graphics/transforms/RotateTransformOperation.h',
+ 'platform/graphics/transforms/ScaleTransformOperation.cpp',
+ 'platform/graphics/transforms/ScaleTransformOperation.h',
+ 'platform/graphics/transforms/SkewTransformOperation.cpp',
+ 'platform/graphics/transforms/SkewTransformOperation.h',
+ 'platform/graphics/transforms/TransformOperation.h',
+ 'platform/graphics/transforms/TransformOperations.cpp',
+ 'platform/graphics/transforms/TransformOperations.h',
+ 'platform/graphics/transforms/TransformationMatrix.cpp',
+ 'platform/graphics/transforms/TransformationMatrix.h',
+ 'platform/graphics/transforms/TranslateTransformOperation.cpp',
+ 'platform/graphics/transforms/TranslateTransformOperation.h',
+ 'platform/graphics/win/ColorSafari.cpp',
+ 'platform/graphics/win/FontCGWin.cpp',
+ 'platform/graphics/win/FontCacheWin.cpp',
+ 'platform/graphics/win/FontCustomPlatformData.cpp',
+ 'platform/graphics/win/FontCustomPlatformData.h',
+ 'platform/graphics/win/FontCustomPlatformDataCairo.cpp',
+ 'platform/graphics/win/FontCustomPlatformDataCairo.h',
+ 'platform/graphics/win/FontDatabase.cpp',
+ 'platform/graphics/win/FontDatabase.h',
+ 'platform/graphics/win/FontPlatformData.h',
+ 'platform/graphics/win/FontPlatformDataCGWin.cpp',
+ 'platform/graphics/win/FontPlatformDataCairoWin.cpp',
+ 'platform/graphics/win/FontPlatformDataWin.cpp',
+ 'platform/graphics/win/FontWin.cpp',
+ 'platform/graphics/win/GlyphPageTreeNodeCGWin.cpp',
+ 'platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp',
+ 'platform/graphics/win/GraphicsContextCGWin.cpp',
+ 'platform/graphics/win/GraphicsContextCairoWin.cpp',
+ 'platform/graphics/win/GraphicsContextWin.cpp',
+ 'platform/graphics/win/IconWin.cpp',
+ 'platform/graphics/win/ImageCGWin.cpp',
+ 'platform/graphics/win/ImageCairoWin.cpp',
+ 'platform/graphics/win/ImageWin.cpp',
+ 'platform/graphics/win/IntPointWin.cpp',
+ 'platform/graphics/win/IntRectWin.cpp',
+ 'platform/graphics/win/IntSizeWin.cpp',
+ 'platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp',
+ 'platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h',
+ 'platform/graphics/win/QTMovieWin.cpp',
+ 'platform/graphics/win/QTMovieWin.h',
+ 'platform/graphics/win/QTMovieWinTimer.cpp',
+ 'platform/graphics/win/QTMovieWinTimer.h',
+ 'platform/graphics/win/SimpleFontDataCGWin.cpp',
+ 'platform/graphics/win/SimpleFontDataCairoWin.cpp',
+ 'platform/graphics/win/SimpleFontDataWin.cpp',
+ 'platform/graphics/win/UniscribeController.cpp',
+ 'platform/graphics/win/UniscribeController.h',
+ 'platform/graphics/wx/ColorWx.cpp',
+ 'platform/graphics/wx/FloatRectWx.cpp',
+ 'platform/graphics/wx/FontCacheWx.cpp',
+ 'platform/graphics/wx/FontPlatformData.h',
+ 'platform/graphics/wx/FontPlatformDataWx.cpp',
+ 'platform/graphics/wx/FontWx.cpp',
+ 'platform/graphics/wx/GlyphMapWx.cpp',
+ 'platform/graphics/wx/GradientWx.cpp',
+ 'platform/graphics/wx/GraphicsContextWx.cpp',
+ 'platform/graphics/wx/ImageBufferData.h',
+ 'platform/graphics/wx/ImageBufferWx.cpp',
+ 'platform/graphics/wx/ImageSourceWx.cpp',
+ 'platform/graphics/wx/ImageWx.cpp',
+ 'platform/graphics/wx/IntPointWx.cpp',
+ 'platform/graphics/wx/IntRectWx.cpp',
+ 'platform/graphics/wx/PathWx.cpp',
+ 'platform/graphics/wx/PenWx.cpp',
+ 'platform/graphics/wx/SimpleFontDataWx.cpp',
+ 'platform/graphics/wx/TransformationMatrixWx.cpp',
+ 'platform/graphics/BitmapImage.cpp',
+ 'platform/graphics/BitmapImage.h',
+ 'platform/graphics/Color.cpp',
+ 'platform/graphics/Color.h',
+ 'platform/graphics/DashArray.h',
+ 'platform/graphics/FloatPoint.cpp',
+ 'platform/graphics/FloatPoint.h',
+ 'platform/graphics/FloatPoint3D.cpp',
+ 'platform/graphics/FloatPoint3D.h',
+ 'platform/graphics/FloatQuad.cpp',
+ 'platform/graphics/FloatQuad.h',
+ 'platform/graphics/FloatRect.cpp',
+ 'platform/graphics/FloatRect.h',
+ 'platform/graphics/FloatSize.cpp',
+ 'platform/graphics/FloatSize.h',
+ 'platform/graphics/Font.cpp',
+ 'platform/graphics/Font.h',
+ 'platform/graphics/FontCache.cpp',
+ 'platform/graphics/FontCache.h',
+ 'platform/graphics/FontData.cpp',
+ 'platform/graphics/FontData.h',
+ 'platform/graphics/FontDescription.cpp',
+ 'platform/graphics/FontDescription.h',
+ 'platform/graphics/FontFallbackList.cpp',
+ 'platform/graphics/FontFallbackList.h',
+ 'platform/graphics/FontFamily.cpp',
+ 'platform/graphics/FontFamily.h',
+ 'platform/graphics/FontFastPath.cpp',
+ 'platform/graphics/FontRenderingMode.h',
+ 'platform/graphics/FontSelector.h',
+ 'platform/graphics/FontTraitsMask.h',
+ 'platform/graphics/GeneratedImage.cpp',
+ 'platform/graphics/GeneratedImage.h',
+ 'platform/graphics/Generator.h',
+ 'platform/graphics/GlyphBuffer.h',
+ 'platform/graphics/GlyphPageTreeNode.cpp',
+ 'platform/graphics/GlyphPageTreeNode.h',
+ 'platform/graphics/GlyphWidthMap.cpp',
+ 'platform/graphics/GlyphWidthMap.h',
+ 'platform/graphics/Gradient.cpp',
+ 'platform/graphics/Gradient.h',
+ 'platform/graphics/GraphicsContext.cpp',
+ 'platform/graphics/GraphicsContext.h',
+ 'platform/graphics/GraphicsContextPrivate.h',
+ 'platform/graphics/GraphicsLayer.cpp',
+ 'platform/graphics/GraphicsLayer.h',
+ 'platform/graphics/GraphicsLayerClient.h',
+ 'platform/graphics/GraphicsTypes.cpp',
+ 'platform/graphics/GraphicsTypes.h',
+ 'platform/graphics/Icon.h',
+ 'platform/graphics/Image.cpp',
+ 'platform/graphics/Image.h',
+ 'platform/graphics/ImageBuffer.h',
+ 'platform/graphics/ImageObserver.h',
+ 'platform/graphics/ImageSource.h',
+ 'platform/graphics/IntPoint.h',
+ 'platform/graphics/IntRect.cpp',
+ 'platform/graphics/IntRect.h',
+ 'platform/graphics/IntSize.h',
+ 'platform/graphics/IntSizeHash.h',
+ 'platform/graphics/MediaPlayer.cpp',
+ 'platform/graphics/MediaPlayer.h',
+ 'platform/graphics/MediaPlayerPrivate.h',
+ 'platform/graphics/Path.cpp',
+ 'platform/graphics/Path.h',
+ 'platform/graphics/PathTraversalState.cpp',
+ 'platform/graphics/PathTraversalState.h',
+ 'platform/graphics/Pattern.cpp',
+ 'platform/graphics/Pattern.h',
+ 'platform/graphics/Pen.cpp',
+ 'platform/graphics/Pen.h',
+ 'platform/graphics/SegmentedFontData.cpp',
+ 'platform/graphics/SegmentedFontData.h',
+ 'platform/graphics/SimpleFontData.cpp',
+ 'platform/graphics/SimpleFontData.h',
+ 'platform/graphics/StringTruncator.cpp',
+ 'platform/graphics/StringTruncator.h',
+ 'platform/graphics/StrokeStyleApplier.h',
+ 'platform/graphics/TextRun.h',
+ 'platform/graphics/UnitBezier.h',
+ 'platform/graphics/WidthIterator.cpp',
+ 'platform/graphics/WidthIterator.h',
+ 'platform/gtk/ClipboardGtk.cpp',
+ 'platform/gtk/ClipboardGtk.h',
+ 'platform/gtk/ContextMenuGtk.cpp',
+ 'platform/gtk/ContextMenuItemGtk.cpp',
+ 'platform/gtk/CursorGtk.cpp',
+ 'platform/gtk/CursorGtk.h',
+ 'platform/gtk/DragDataGtk.cpp',
+ 'platform/gtk/DragImageGtk.cpp',
+ 'platform/gtk/EventLoopGtk.cpp',
+ 'platform/gtk/FileChooserGtk.cpp',
+ 'platform/gtk/FileSystemGtk.cpp',
+ 'platform/gtk/GeolocationServiceGtk.cpp',
+ 'platform/gtk/GeolocationServiceGtk.h',
+ 'platform/gtk/KURLGtk.cpp',
+ 'platform/gtk/KeyEventGtk.cpp',
+ 'platform/gtk/KeyboardCodes.h',
+ 'platform/gtk/Language.cpp',
+ 'platform/gtk/LocalizedStringsGtk.cpp',
+ 'platform/gtk/LoggingGtk.cpp',
+ 'platform/gtk/MIMETypeRegistryGtk.cpp',
+ 'platform/gtk/MouseEventGtk.cpp',
+ 'platform/gtk/PasteboardGtk.cpp',
+ 'platform/gtk/PasteboardHelper.h',
+ 'platform/gtk/PlatformScreenGtk.cpp',
+ 'platform/gtk/PopupMenuGtk.cpp',
+ 'platform/gtk/RenderThemeGtk.cpp',
+ 'platform/gtk/RenderThemeGtk.h',
+ 'platform/gtk/ScrollViewGtk.cpp',
+ 'platform/gtk/ScrollbarGtk.cpp',
+ 'platform/gtk/ScrollbarGtk.h',
+ 'platform/gtk/ScrollbarThemeGtk.cpp',
+ 'platform/gtk/ScrollbarThemeGtk.h',
+ 'platform/gtk/SearchPopupMenuGtk.cpp',
+ 'platform/gtk/SharedBufferGtk.cpp',
+ 'platform/gtk/SharedTimerGtk.cpp',
+ 'platform/gtk/SoundGtk.cpp',
+ 'platform/gtk/TemporaryLinkStubs.cpp',
+ 'platform/gtk/WheelEventGtk.cpp',
+ 'platform/gtk/WidgetGtk.cpp',
+ 'platform/gtk/gtkdrawing.h',
+ 'platform/gtk/guriescape.h',
+ 'platform/image-decoders/ImageDecoder.h',
+ 'platform/image-decoders/bmp/BMPImageDecoder.cpp',
+ 'platform/image-decoders/bmp/BMPImageDecoder.h',
+ 'platform/image-decoders/bmp/BMPImageReader.cpp',
+ 'platform/image-decoders/bmp/BMPImageReader.h',
+ 'platform/image-decoders/gif/GIFImageDecoder.cpp',
+ 'platform/image-decoders/gif/GIFImageDecoder.h',
+ 'platform/image-decoders/gif/GIFImageReader.cpp',
+ 'platform/image-decoders/gif/GIFImageReader.h',
+ 'platform/image-decoders/ico/ICOImageDecoder.cpp',
+ 'platform/image-decoders/ico/ICOImageDecoder.h',
+ 'platform/image-decoders/jpeg/JPEGImageDecoder.cpp',
+ 'platform/image-decoders/jpeg/JPEGImageDecoder.h',
+ 'platform/image-decoders/png/PNGImageDecoder.cpp',
+ 'platform/image-decoders/png/PNGImageDecoder.h',
+ 'platform/image-decoders/xbm/XBMImageDecoder.cpp',
+ 'platform/image-decoders/xbm/XBMImageDecoder.h',
+ 'platform/image-decoders/zlib/crc32.h',
+ 'platform/image-decoders/zlib/deflate.h',
+ 'platform/image-decoders/zlib/inffast.h',
+ 'platform/image-decoders/zlib/inffixed.h',
+ 'platform/image-decoders/zlib/inflate.h',
+ 'platform/image-decoders/zlib/inftrees.h',
+ 'platform/image-decoders/zlib/mozzconf.h',
+ 'platform/image-decoders/zlib/trees.h',
+ 'platform/image-decoders/zlib/zconf.h',
+ 'platform/image-decoders/zlib/zlib.h',
+ 'platform/image-decoders/zlib/zutil.h',
+ 'platform/image-decoders/skia/ImageDecoderSkia.cpp',
+ 'platform/image-encoders/skia/PNGImageEncoder.cpp',
+ 'platform/image-encoders/skia/PNGImageEncoder.h',
+ 'platform/mac/AutodrainedPool.mm',
+ 'platform/mac/BlockExceptions.h',
+ 'platform/mac/BlockExceptions.mm',
+ 'platform/mac/ClipboardMac.h',
+ 'platform/mac/ClipboardMac.mm',
+ 'platform/mac/ContextMenuItemMac.mm',
+ 'platform/mac/ContextMenuMac.mm',
+ 'platform/mac/CookieJar.mm',
+ 'platform/mac/CursorMac.mm',
+ 'platform/mac/DragDataMac.mm',
+ 'platform/mac/DragImageMac.mm',
+ 'platform/mac/EventLoopMac.mm',
+ 'platform/mac/FileChooserMac.mm',
+ 'platform/mac/FileSystemMac.mm',
+ 'platform/mac/FoundationExtras.h',
+ 'platform/mac/KURLMac.mm',
+ 'platform/mac/KeyEventMac.mm',
+ 'platform/mac/Language.mm',
+ 'platform/mac/LocalCurrentGraphicsContext.h',
+ 'platform/mac/LocalCurrentGraphicsContext.mm',
+ 'platform/mac/LocalizedStringsMac.mm',
+ 'platform/mac/LoggingMac.mm',
+ 'platform/mac/MIMETypeRegistryMac.mm',
+ 'platform/mac/PasteboardHelper.h',
+ 'platform/mac/PasteboardMac.mm',
+ 'platform/mac/PlatformMouseEventMac.mm',
+ 'platform/mac/PlatformScreenMac.mm',
+ 'platform/mac/PopupMenuMac.mm',
+ 'platform/mac/PurgeableBufferMac.cpp',
+ 'platform/mac/SSLKeyGeneratorMac.mm',
+ 'platform/mac/SchedulePairMac.mm',
+ 'platform/mac/ScrollViewMac.mm',
+ 'platform/mac/ScrollbarThemeMac.h',
+ 'platform/mac/ScrollbarThemeMac.mm',
+ 'platform/mac/SearchPopupMenuMac.mm',
+ 'platform/mac/SharedBufferMac.mm',
+ 'platform/mac/SharedTimerMac.mm',
+ 'platform/mac/SoftLinking.h',
+ 'platform/mac/SoundMac.mm',
+ 'platform/mac/SystemTimeMac.cpp',
+ 'platform/mac/ThemeMac.h',
+ 'platform/mac/ThemeMac.mm',
+ 'platform/mac/ThreadCheck.mm',
+ 'platform/mac/WebCoreKeyGenerator.h',
+ 'platform/mac/WebCoreKeyGenerator.m',
+ 'platform/mac/WebCoreNSStringExtras.h',
+ 'platform/mac/WebCoreNSStringExtras.mm',
+ 'platform/mac/WebCoreObjCExtras.h',
+ 'platform/mac/WebCoreObjCExtras.mm',
+ 'platform/mac/WebCoreSystemInterface.h',
+ 'platform/mac/WebCoreSystemInterface.mm',
+ 'platform/mac/WebCoreView.h',
+ 'platform/mac/WebCoreView.m',
+ 'platform/mac/WebFontCache.h',
+ 'platform/mac/WebFontCache.mm',
+ 'platform/mac/WheelEventMac.mm',
+ 'platform/mac/WidgetMac.mm',
+ 'platform/network/cf/AuthenticationCF.cpp',
+ 'platform/network/cf/AuthenticationCF.h',
+ 'platform/network/cf/AuthenticationChallenge.h',
+ 'platform/network/cf/DNSCFNet.cpp',
+ 'platform/network/cf/FormDataStreamCFNet.cpp',
+ 'platform/network/cf/FormDataStreamCFNet.h',
+ 'platform/network/cf/ResourceError.h',
+ 'platform/network/cf/ResourceErrorCF.cpp',
+ 'platform/network/cf/ResourceHandleCFNet.cpp',
+ 'platform/network/cf/ResourceRequest.h',
+ 'platform/network/cf/ResourceRequestCFNet.cpp',
+ 'platform/network/cf/ResourceRequestCFNet.h',
+ 'platform/network/cf/ResourceResponse.h',
+ 'platform/network/cf/ResourceResponseCFNet.cpp',
+ 'platform/network/cf/ResourceResponseCFNet.h',
+ 'platform/network/chromium/AuthenticationChallenge.h',
+ 'platform/network/chromium/AuthenticationChallengeChromium.cpp',
+ 'platform/network/chromium/CookieJarChromium.cpp',
+ 'platform/network/chromium/DNSChromium.cpp',
+ 'platform/network/chromium/NetworkStateNotifierChromium.cpp',
+ 'platform/network/chromium/NetworkStateNotifierPrivate.h',
+ 'platform/network/chromium/ResourceError.h',
+ 'platform/network/chromium/ResourceRequest.h',
+ 'platform/network/chromium/ResourceResponse.h',
+ 'platform/network/curl/AuthenticationChallenge.h',
+ 'platform/network/curl/CookieJarCurl.cpp',
+ 'platform/network/curl/DNSCurl.cpp',
+ 'platform/network/curl/FormDataStreamCurl.cpp',
+ 'platform/network/curl/FormDataStreamCurl.h',
+ 'platform/network/curl/ResourceError.h',
+ 'platform/network/curl/ResourceHandleCurl.cpp',
+ 'platform/network/curl/ResourceHandleManager.cpp',
+ 'platform/network/curl/ResourceHandleManager.h',
+ 'platform/network/curl/ResourceRequest.h',
+ 'platform/network/curl/ResourceResponse.h',
+ 'platform/network/mac/AuthenticationChallenge.h',
+ 'platform/network/mac/AuthenticationMac.h',
+ 'platform/network/mac/AuthenticationMac.mm',
+ 'platform/network/mac/FormDataStreamMac.h',
+ 'platform/network/mac/FormDataStreamMac.mm',
+ 'platform/network/mac/NetworkStateNotifierMac.cpp',
+ 'platform/network/mac/ResourceError.h',
+ 'platform/network/mac/ResourceErrorMac.mm',
+ 'platform/network/mac/ResourceHandleMac.mm',
+ 'platform/network/mac/ResourceRequest.h',
+ 'platform/network/mac/ResourceRequestMac.mm',
+ 'platform/network/mac/ResourceResponse.h',
+ 'platform/network/mac/ResourceResponseMac.mm',
+ 'platform/network/mac/WebCoreURLResponse.h',
+ 'platform/network/mac/WebCoreURLResponse.mm',
+ 'platform/network/qt/AuthenticationChallenge.h',
+ 'platform/network/qt/QNetworkReplyHandler.cpp',
+ 'platform/network/qt/QNetworkReplyHandler.h',
+ 'platform/network/qt/ResourceError.h',
+ 'platform/network/qt/ResourceHandleQt.cpp',
+ 'platform/network/qt/ResourceRequest.h',
+ 'platform/network/qt/ResourceRequestQt.cpp',
+ 'platform/network/qt/ResourceResponse.h',
+ 'platform/network/soup/AuthenticationChallenge.h',
+ 'platform/network/soup/CookieJarSoup.cpp',
+ 'platform/network/soup/CookieJarSoup.h',
+ 'platform/network/soup/DNSSoup.cpp',
+ 'platform/network/soup/ResourceError.h',
+ 'platform/network/soup/ResourceHandleSoup.cpp',
+ 'platform/network/soup/ResourceRequest.h',
+ 'platform/network/soup/ResourceResponse.h',
+ 'platform/network/soup/webkit-soup-auth-dialog.c',
+ 'platform/network/soup/webkit-soup-auth-dialog.h',
+ 'platform/network/win/CookieJarCFNetWin.cpp',
+ 'platform/network/win/CookieJarWin.cpp',
+ 'platform/network/win/CookieStorageWin.cpp',
+ 'platform/network/win/CookieStorageWin.h',
+ 'platform/network/win/NetworkStateNotifierWin.cpp',
+ 'platform/network/win/ResourceHandleWin.cpp',
+ 'platform/network/win/ResourceHandleWin.h',
+ 'platform/network/AuthenticationChallengeBase.cpp',
+ 'platform/network/AuthenticationChallengeBase.h',
+ 'platform/network/Credential.cpp',
+ 'platform/network/Credential.h',
+ 'platform/network/DNS.h',
+ 'platform/network/FormData.cpp',
+ 'platform/network/FormData.h',
+ 'platform/network/FormDataBuilder.cpp',
+ 'platform/network/FormDataBuilder.h',
+ 'platform/network/HTTPHeaderMap.cpp',
+ 'platform/network/HTTPHeaderMap.h',
+ 'platform/network/HTTPParsers.cpp',
+ 'platform/network/HTTPParsers.h',
+ 'platform/network/NetworkStateNotifier.cpp',
+ 'platform/network/NetworkStateNotifier.h',
+ 'platform/network/ProtectionSpace.cpp',
+ 'platform/network/ProtectionSpace.h',
+ 'platform/network/ResourceErrorBase.cpp',
+ 'platform/network/ResourceErrorBase.h',
+ 'platform/network/ResourceHandleClient.h',
+ 'platform/network/ResourceHandleInternal.h',
+ 'platform/network/ResourceRequestBase.cpp',
+ 'platform/network/ResourceRequestBase.h',
+ 'platform/network/ResourceResponseBase.cpp',
+ 'platform/network/ResourceResponseBase.h',
+ 'platform/posix/FileSystemPOSIX.cpp',
+ 'platform/qt/ClipboardQt.cpp',
+ 'platform/qt/ClipboardQt.h',
+ 'platform/qt/ContextMenuItemQt.cpp',
+ 'platform/qt/ContextMenuQt.cpp',
+ 'platform/qt/CookieJarQt.cpp',
+ 'platform/qt/CursorQt.cpp',
+ 'platform/qt/DragDataQt.cpp',
+ 'platform/qt/DragImageQt.cpp',
+ 'platform/qt/EventLoopQt.cpp',
+ 'platform/qt/FileChooserQt.cpp',
+ 'platform/qt/FileSystemQt.cpp',
+ 'platform/qt/KURLQt.cpp',
+ 'platform/qt/KeyboardCodes.h',
+ 'platform/qt/Localizations.cpp',
+ 'platform/qt/LoggingQt.cpp',
+ 'platform/qt/MIMETypeRegistryQt.cpp',
+ 'platform/qt/MenuEventProxy.h',
+ 'platform/qt/PasteboardQt.cpp',
+ 'platform/qt/PlatformKeyboardEventQt.cpp',
+ 'platform/qt/PlatformMouseEventQt.cpp',
+ 'platform/qt/PlatformScreenQt.cpp',
+ 'platform/qt/PopupMenuQt.cpp',
+ 'platform/qt/QWebPopup.cpp',
+ 'platform/qt/QWebPopup.h',
+ 'platform/qt/RenderThemeQt.cpp',
+ 'platform/qt/RenderThemeQt.h',
+ 'platform/qt/ScreenQt.cpp',
+ 'platform/qt/ScrollViewQt.cpp',
+ 'platform/qt/ScrollbarQt.cpp',
+ 'platform/qt/ScrollbarThemeQt.cpp',
+ 'platform/qt/ScrollbarThemeQt.h',
+ 'platform/qt/SearchPopupMenuQt.cpp',
+ 'platform/qt/SharedBufferQt.cpp',
+ 'platform/qt/SharedTimerQt.cpp',
+ 'platform/qt/SoundQt.cpp',
+ 'platform/qt/TemporaryLinkStubs.cpp',
+ 'platform/qt/WheelEventQt.cpp',
+ 'platform/qt/WidgetQt.cpp',
+ 'platform/sql/SQLValue.cpp',
+ 'platform/sql/SQLValue.h',
+ 'platform/sql/SQLiteAuthorizer.cpp',
+ 'platform/sql/SQLiteDatabase.cpp',
+ 'platform/sql/SQLiteDatabase.h',
+ 'platform/sql/SQLiteFileSystem.h',
+ 'platform/sql/SQLiteFileSystem.cpp',
+ 'platform/sql/SQLiteStatement.cpp',
+ 'platform/sql/SQLiteStatement.h',
+ 'platform/sql/SQLiteTransaction.cpp',
+ 'platform/sql/SQLiteTransaction.h',
+ 'platform/symbian/FloatPointSymbian.cpp',
+ 'platform/symbian/FloatRectSymbian.cpp',
+ 'platform/symbian/IntPointSymbian.cpp',
+ 'platform/symbian/IntRectSymbian.cpp',
+ 'platform/symbian/IntSizeSymbian.cpp',
+ 'platform/text/cf/StringCF.cpp',
+ 'platform/text/cf/StringImplCF.cpp',
+ 'platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp',
+ 'platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp',
+ 'platform/text/mac/CharsetData.h',
+ 'platform/text/mac/ShapeArabic.c',
+ 'platform/text/mac/ShapeArabic.h',
+ 'platform/text/mac/StringImplMac.mm',
+ 'platform/text/mac/StringMac.mm',
+ 'platform/text/mac/TextBoundaries.mm',
+ 'platform/text/mac/TextBreakIteratorInternalICUMac.mm',
+ 'platform/text/mac/TextCodecMac.cpp',
+ 'platform/text/mac/TextCodecMac.h',
+ 'platform/text/qt/StringQt.cpp',
+ 'platform/text/qt/TextBoundaries.cpp',
+ 'platform/text/qt/TextBreakIteratorQt.cpp',
+ 'platform/text/qt/TextCodecQt.cpp',
+ 'platform/text/qt/TextCodecQt.h',
+ 'platform/text/symbian/StringImplSymbian.cpp',
+ 'platform/text/symbian/StringSymbian.cpp',
+ 'platform/text/win/TextBreakIteratorInternalICUWin.cpp',
+ 'platform/text/wx/StringWx.cpp',
+ 'platform/text/AtomicString.cpp',
+ 'platform/text/AtomicString.h',
+ 'platform/text/AtomicStringHash.h',
+ 'platform/text/AtomicStringImpl.h',
+ 'platform/text/Base64.cpp',
+ 'platform/text/Base64.h',
+ 'platform/text/BidiContext.cpp',
+ 'platform/text/BidiContext.h',
+ 'platform/text/BidiResolver.h',
+ 'platform/text/CString.cpp',
+ 'platform/text/CString.h',
+ 'platform/text/CharacterNames.h',
+ 'platform/text/ParserUtilities.h',
+ 'platform/text/PlatformString.h',
+ 'platform/text/RegularExpression.cpp',
+ 'platform/text/RegularExpression.h',
+ 'platform/text/SegmentedString.cpp',
+ 'platform/text/SegmentedString.h',
+ 'platform/text/String.cpp',
+ 'platform/text/StringBuffer.h',
+ 'platform/text/StringBuilder.cpp',
+ 'platform/text/StringBuilder.h',
+ 'platform/text/StringHash.h',
+ 'platform/text/StringImpl.cpp',
+ 'platform/text/StringImpl.h',
+ 'platform/text/TextBoundaries.h',
+ 'platform/text/TextBoundariesICU.cpp',
+ 'platform/text/TextBreakIterator.h',
+ 'platform/text/TextBreakIteratorICU.cpp',
+ 'platform/text/TextBreakIteratorInternalICU.h',
+ 'platform/text/TextCodec.cpp',
+ 'platform/text/TextCodec.h',
+ 'platform/text/TextCodecICU.cpp',
+ 'platform/text/TextCodecICU.h',
+ 'platform/text/TextCodecLatin1.cpp',
+ 'platform/text/TextCodecLatin1.h',
+ 'platform/text/TextCodecUTF16.cpp',
+ 'platform/text/TextCodecUTF16.h',
+ 'platform/text/TextCodecUserDefined.cpp',
+ 'platform/text/TextCodecUserDefined.h',
+ 'platform/text/TextDirection.h',
+ 'platform/text/TextEncoding.cpp',
+ 'platform/text/TextEncoding.h',
+ 'platform/text/TextEncodingDetector.h',
+ 'platform/text/TextEncodingDetectorICU.cpp',
+ 'platform/text/TextEncodingRegistry.cpp',
+ 'platform/text/TextEncodingRegistry.h',
+ 'platform/text/TextStream.cpp',
+ 'platform/text/TextStream.h',
+ 'platform/text/UnicodeRange.cpp',
+ 'platform/text/UnicodeRange.h',
+ 'platform/win/BString.cpp',
+ 'platform/win/BString.h',
+ 'platform/win/COMPtr.h',
+ 'platform/win/ClipboardUtilitiesWin.cpp',
+ 'platform/win/ClipboardUtilitiesWin.h',
+ 'platform/win/ClipboardWin.cpp',
+ 'platform/win/ClipboardWin.h',
+ 'platform/win/ContextMenuItemWin.cpp',
+ 'platform/win/ContextMenuWin.cpp',
+ 'platform/win/CursorWin.cpp',
+ 'platform/win/DragDataWin.cpp',
+ 'platform/win/DragImageCGWin.cpp',
+ 'platform/win/DragImageCairoWin.cpp',
+ 'platform/win/DragImageWin.cpp',
+ 'platform/win/EditorWin.cpp',
+ 'platform/win/EventLoopWin.cpp',
+ 'platform/win/FileChooserWin.cpp',
+ 'platform/win/FileSystemWin.cpp',
+ 'platform/win/GDIObjectCounter.cpp',
+ 'platform/win/GDIObjectCounter.h',
+ 'platform/win/KeyEventWin.cpp',
+ 'platform/win/Language.cpp',
+ 'platform/win/LoggingWin.cpp',
+ 'platform/win/MIMETypeRegistryWin.cpp',
+ 'platform/win/PasteboardWin.cpp',
+ 'platform/win/PlatformMouseEventWin.cpp',
+ 'platform/win/PlatformScreenWin.cpp',
+ 'platform/win/PlatformScrollBar.h',
+ 'platform/win/PlatformScrollBarWin.cpp',
+ 'platform/win/PopupMenuWin.cpp',
+ 'platform/win/ScrollbarThemeSafari.cpp',
+ 'platform/win/ScrollbarThemeSafari.h',
+ 'platform/win/ScrollbarThemeWin.cpp',
+ 'platform/win/ScrollbarThemeWin.h',
+ 'platform/win/SearchPopupMenuWin.cpp',
+ 'platform/win/SharedBufferWin.cpp',
+ 'platform/win/SharedTimerWin.cpp',
+ 'platform/win/SoftLinking.h',
+ 'platform/win/SoundWin.cpp',
+ 'platform/win/SystemTimeWin.cpp',
+ 'platform/win/TemporaryLinkStubs.cpp',
+ 'platform/win/WCDataObject.cpp',
+ 'platform/win/WCDataObject.h',
+ 'platform/win/WebCoreTextRenderer.cpp',
+ 'platform/win/WebCoreTextRenderer.h',
+ 'platform/win/WheelEventWin.cpp',
+ 'platform/win/WidgetWin.cpp',
+ 'platform/win/WindowMessageBroadcaster.cpp',
+ 'platform/win/WindowMessageBroadcaster.h',
+ 'platform/win/WindowMessageListener.h',
+ 'platform/wx/wxcode/gtk/fontprops.cpp',
+ 'platform/wx/wxcode/gtk/non-kerned-drawing.cpp',
+ 'platform/wx/wxcode/mac/carbon/fontprops.cpp',
+ 'platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp',
+ 'platform/wx/wxcode/win/fontprops.cpp',
+ 'platform/wx/wxcode/win/non-kerned-drawing.cpp',
+ 'platform/wx/wxcode/fontprops.cpp',
+ 'platform/wx/wxcode/fontprops.h',
+ 'platform/wx/wxcode/non-kerned-drawing.h',
+ 'platform/wx/ClipboardWx.cpp',
+ 'platform/wx/ClipboardWx.h',
+ 'platform/wx/ContextMenuItemWx.cpp',
+ 'platform/wx/ContextMenuWx.cpp',
+ 'platform/wx/CursorWx.cpp',
+ 'platform/wx/DragDataWx.cpp',
+ 'platform/wx/DragImageWx.cpp',
+ 'platform/wx/EventLoopWx.cpp',
+ 'platform/wx/FileSystemWx.cpp',
+ 'platform/wx/KeyEventWin.cpp',
+ 'platform/wx/KeyboardCodes.h',
+ 'platform/wx/KeyboardEventWx.cpp',
+ 'platform/wx/LocalizedStringsWx.cpp',
+ 'platform/wx/LoggingWx.cpp',
+ 'platform/wx/MimeTypeRegistryWx.cpp',
+ 'platform/wx/MouseEventWx.cpp',
+ 'platform/wx/MouseWheelEventWx.cpp',
+ 'platform/wx/PasteboardWx.cpp',
+ 'platform/wx/PopupMenuWx.cpp',
+ 'platform/wx/RenderThemeWx.cpp',
+ 'platform/wx/ScreenWx.cpp',
+ 'platform/wx/ScrollViewWx.cpp',
+ 'platform/wx/SharedTimerWx.cpp',
+ 'platform/wx/SoundWx.cpp',
+ 'platform/wx/TemporaryLinkStubs.cpp',
+ 'platform/wx/WidgetWx.cpp',
+ 'platform/Arena.cpp',
+ 'platform/Arena.h',
+ 'platform/AutodrainedPool.h',
+ 'platform/ContentType.cpp',
+ 'platform/ContentType.h',
+ 'platform/ContextMenu.cpp',
+ 'platform/ContextMenu.h',
+ 'platform/ContextMenuItem.h',
+ 'platform/CookieJar.h',
+ 'platform/CrossThreadCopier.h',
+ 'platform/CrossThreadCopier.cpp',
+ 'platform/Cursor.h',
+ 'platform/DeprecatedPtrList.h',
+ 'platform/DeprecatedPtrListImpl.cpp',
+ 'platform/DeprecatedPtrListImpl.h',
+ 'platform/DragData.cpp',
+ 'platform/DragData.h',
+ 'platform/DragImage.cpp',
+ 'platform/DragImage.h',
+ 'platform/EventLoop.h',
+ 'platform/FileChooser.cpp',
+ 'platform/FileChooser.h',
+ 'platform/FileSystem.h',
+ 'platform/FloatConversion.h',
+ 'platform/GeolocationService.cpp',
+ 'platform/GeolocationService.h',
+ 'platform/HostWindow.h',
+ 'platform/KeyboardCodes.h',
+ 'platform/KURL.cpp',
+ 'platform/KURL.h',
+ 'platform/KURLGoogle.cpp',
+ 'platform/KURLGooglePrivate.h',
+ 'platform/KURLHash.h',
+ 'platform/Language.h',
+ 'platform/Length.cpp',
+ 'platform/Length.h',
+ 'platform/LengthBox.h',
+ 'platform/LengthSize.h',
+ 'platform/LinkHash.cpp',
+ 'platform/LinkHash.h',
+ 'platform/LocalizedStrings.h',
+ 'platform/Logging.cpp',
+ 'platform/Logging.h',
+ 'platform/MIMETypeRegistry.cpp',
+ 'platform/MIMETypeRegistry.h',
+ 'platform/NotImplemented.h',
+ 'platform/Pasteboard.h',
+ 'platform/PlatformKeyboardEvent.h',
+ 'platform/PlatformMenuDescription.h',
+ 'platform/PlatformMouseEvent.h',
+ 'platform/PlatformScreen.h',
+ 'platform/PlatformWheelEvent.h',
+ 'platform/PopupMenu.h',
+ 'platform/PopupMenuClient.h',
+ 'platform/PopupMenuStyle.h',
+ 'platform/PurgeableBuffer.h',
+ 'platform/SSLKeyGenerator.h',
+ 'platform/ScrollTypes.h',
+ 'platform/ScrollView.cpp',
+ 'platform/ScrollView.h',
+ 'platform/Scrollbar.cpp',
+ 'platform/Scrollbar.h',
+ 'platform/ScrollbarClient.h',
+ 'platform/ScrollbarTheme.h',
+ 'platform/ScrollbarThemeComposite.cpp',
+ 'platform/ScrollbarThemeComposite.h',
+ 'platform/SearchPopupMenu.h',
+ 'platform/SharedBuffer.cpp',
+ 'platform/SharedBuffer.h',
+ 'platform/SharedTimer.h',
+ 'platform/Sound.h',
+ 'platform/StaticConstructors.h',
+ 'platform/SystemTime.h',
+ 'platform/Theme.cpp',
+ 'platform/Theme.h',
+ 'platform/ThemeTypes.h',
+ 'platform/ThreadCheck.h',
+ 'platform/ThreadGlobalData.cpp',
+ 'platform/ThreadGlobalData.h',
+ 'platform/ThreadTimers.cpp',
+ 'platform/ThreadTimers.h',
+ 'platform/Timer.cpp',
+ 'platform/Timer.h',
+ 'platform/TreeShared.h',
+ 'platform/Widget.cpp',
+ 'platform/Widget.h',
+ 'plugins/chromium/PluginDataChromium.cpp',
+ 'plugins/gtk/PluginDataGtk.cpp',
+ 'plugins/gtk/PluginPackageGtk.cpp',
+ 'plugins/gtk/PluginViewGtk.cpp',
+ 'plugins/gtk/gtk2xtbin.h',
+ 'plugins/gtk/xembed.h',
+ 'plugins/mac/PluginDataMac.mm',
+ 'plugins/mac/PluginPackageMac.cpp',
+ 'plugins/mac/PluginViewMac.cpp',
+ 'plugins/qt/PluginDataQt.cpp',
+ 'plugins/qt/PluginPackageQt.cpp',
+ 'plugins/qt/PluginViewQt.cpp',
+ 'plugins/win/PluginDataWin.cpp',
+ 'plugins/win/PluginDatabaseWin.cpp',
+ 'plugins/win/PluginMessageThrottlerWin.cpp',
+ 'plugins/win/PluginMessageThrottlerWin.h',
+ 'plugins/win/PluginPackageWin.cpp',
+ 'plugins/win/PluginViewWin.cpp',
+ 'plugins/wx/PluginDataWx.cpp',
+ 'plugins/wx/PluginPackageWx.cpp',
+ 'plugins/wx/PluginViewWx.cpp',
+ 'plugins/MimeType.cpp',
+ 'plugins/MimeType.h',
+ 'plugins/MimeTypeArray.cpp',
+ 'plugins/MimeTypeArray.h',
+ 'plugins/Plugin.cpp',
+ 'plugins/Plugin.h',
+ 'plugins/PluginArray.cpp',
+ 'plugins/PluginArray.h',
+ 'plugins/PluginData.cpp',
+ 'plugins/PluginData.h',
+ 'plugins/PluginDatabase.cpp',
+ 'plugins/PluginDatabase.h',
+ 'plugins/PluginDebug.h',
+ 'plugins/PluginInfoStore.cpp',
+ 'plugins/PluginInfoStore.h',
+ 'plugins/PluginMainThreadScheduler.cpp',
+ 'plugins/PluginMainThreadScheduler.h',
+ 'plugins/PluginPackage.cpp',
+ 'plugins/PluginPackage.h',
+ 'plugins/PluginQuirkSet.h',
+ 'plugins/PluginStream.cpp',
+ 'plugins/PluginStream.h',
+ 'plugins/PluginView.cpp',
+ 'plugins/PluginView.h',
+ 'plugins/npapi.cpp',
+ 'plugins/npfunctions.h',
+ 'rendering/style/BindingURI.cpp',
+ 'rendering/style/BindingURI.h',
+ 'rendering/style/BorderData.h',
+ 'rendering/style/BorderValue.h',
+ 'rendering/style/CollapsedBorderValue.h',
+ 'rendering/style/ContentData.cpp',
+ 'rendering/style/ContentData.h',
+ 'rendering/style/CounterContent.h',
+ 'rendering/style/CounterDirectives.cpp',
+ 'rendering/style/CounterDirectives.h',
+ 'rendering/style/CursorData.h',
+ 'rendering/style/CursorList.h',
+ 'rendering/style/DataRef.h',
+ 'rendering/style/FillLayer.cpp',
+ 'rendering/style/FillLayer.h',
+ 'rendering/style/KeyframeList.cpp',
+ 'rendering/style/KeyframeList.h',
+ 'rendering/style/NinePieceImage.cpp',
+ 'rendering/style/NinePieceImage.h',
+ 'rendering/style/OutlineValue.h',
+ 'rendering/style/RenderStyle.cpp',
+ 'rendering/style/RenderStyle.h',
+ 'rendering/style/RenderStyleConstants.h',
+ 'rendering/style/SVGRenderStyle.cpp',
+ 'rendering/style/SVGRenderStyle.h',
+ 'rendering/style/SVGRenderStyleDefs.cpp',
+ 'rendering/style/SVGRenderStyleDefs.h',
+ 'rendering/style/ShadowData.cpp',
+ 'rendering/style/ShadowData.h',
+ 'rendering/style/StyleBackgroundData.cpp',
+ 'rendering/style/StyleBackgroundData.h',
+ 'rendering/style/StyleBoxData.cpp',
+ 'rendering/style/StyleBoxData.h',
+ 'rendering/style/StyleCachedImage.cpp',
+ 'rendering/style/StyleCachedImage.h',
+ 'rendering/style/StyleDashboardRegion.h',
+ 'rendering/style/StyleFlexibleBoxData.cpp',
+ 'rendering/style/StyleFlexibleBoxData.h',
+ 'rendering/style/StyleGeneratedImage.cpp',
+ 'rendering/style/StyleGeneratedImage.h',
+ 'rendering/style/StyleImage.h',
+ 'rendering/style/StyleInheritedData.cpp',
+ 'rendering/style/StyleInheritedData.h',
+ 'rendering/style/StyleMarqueeData.cpp',
+ 'rendering/style/StyleMarqueeData.h',
+ 'rendering/style/StyleMultiColData.cpp',
+ 'rendering/style/StyleMultiColData.h',
+ 'rendering/style/StyleRareInheritedData.cpp',
+ 'rendering/style/StyleRareInheritedData.h',
+ 'rendering/style/StyleRareNonInheritedData.cpp',
+ 'rendering/style/StyleRareNonInheritedData.h',
+ 'rendering/style/StyleReflection.h',
+ 'rendering/style/StyleSurroundData.cpp',
+ 'rendering/style/StyleSurroundData.h',
+ 'rendering/style/StyleTransformData.cpp',
+ 'rendering/style/StyleTransformData.h',
+ 'rendering/style/StyleVisualData.cpp',
+ 'rendering/style/StyleVisualData.h',
+ 'rendering/AutoTableLayout.cpp',
+ 'rendering/AutoTableLayout.h',
+ 'rendering/CounterNode.cpp',
+ 'rendering/CounterNode.h',
+ 'rendering/EllipsisBox.cpp',
+ 'rendering/EllipsisBox.h',
+ 'rendering/FixedTableLayout.cpp',
+ 'rendering/FixedTableLayout.h',
+ 'rendering/GapRects.h',
+ 'rendering/HitTestRequest.h',
+ 'rendering/HitTestResult.cpp',
+ 'rendering/HitTestResult.h',
+ 'rendering/InlineBox.cpp',
+ 'rendering/InlineBox.h',
+ 'rendering/InlineFlowBox.cpp',
+ 'rendering/InlineFlowBox.h',
+ 'rendering/InlineRunBox.h',
+ 'rendering/InlineTextBox.cpp',
+ 'rendering/InlineTextBox.h',
+ 'rendering/LayoutState.cpp',
+ 'rendering/LayoutState.h',
+ 'rendering/MediaControlElements.cpp',
+ 'rendering/MediaControlElements.h',
+ 'rendering/PointerEventsHitRules.cpp',
+ 'rendering/PointerEventsHitRules.h',
+ 'rendering/RenderApplet.cpp',
+ 'rendering/RenderApplet.h',
+ 'rendering/RenderArena.cpp',
+ 'rendering/RenderArena.h',
+ 'rendering/RenderBR.cpp',
+ 'rendering/RenderBR.h',
+ 'rendering/RenderBlock.cpp',
+ 'rendering/RenderBlock.h',
+ 'rendering/RenderBlockLineLayout.cpp',
+ 'rendering/RenderBox.cpp',
+ 'rendering/RenderBox.h',
+ 'rendering/RenderBoxModelObject.cpp',
+ 'rendering/RenderBoxModelObject.h',
+ 'rendering/RenderButton.cpp',
+ 'rendering/RenderButton.h',
+ 'rendering/RenderCounter.cpp',
+ 'rendering/RenderCounter.h',
+ 'rendering/RenderDataGrid.cpp',
+ 'rendering/RenderDataGrid.h',
+ 'rendering/RenderFieldset.cpp',
+ 'rendering/RenderFieldset.h',
+ 'rendering/RenderFileUploadControl.cpp',
+ 'rendering/RenderFileUploadControl.h',
+ 'rendering/RenderFlexibleBox.cpp',
+ 'rendering/RenderFlexibleBox.h',
+ 'rendering/RenderForeignObject.cpp',
+ 'rendering/RenderForeignObject.h',
+ 'rendering/RenderFrame.cpp',
+ 'rendering/RenderFrame.h',
+ 'rendering/RenderFrameSet.cpp',
+ 'rendering/RenderFrameSet.h',
+ 'rendering/RenderHTMLCanvas.cpp',
+ 'rendering/RenderHTMLCanvas.h',
+ 'rendering/RenderImage.cpp',
+ 'rendering/RenderImage.h',
+ 'rendering/RenderImageGeneratedContent.cpp',
+ 'rendering/RenderImageGeneratedContent.h',
+ 'rendering/RenderInline.cpp',
+ 'rendering/RenderInline.h',
+ 'rendering/RenderLayer.cpp',
+ 'rendering/RenderLayer.h',
+ 'rendering/RenderLayerBacking.cpp',
+ 'rendering/RenderLayerBacking.h',
+ 'rendering/RenderLayerCompositor.cpp',
+ 'rendering/RenderLayerCompositor.h',
+ 'rendering/RenderLineBoxList.cpp',
+ 'rendering/RenderLineBoxList.h',
+ 'rendering/RenderListBox.cpp',
+ 'rendering/RenderListBox.h',
+ 'rendering/RenderListItem.cpp',
+ 'rendering/RenderListItem.h',
+ 'rendering/RenderListMarker.cpp',
+ 'rendering/RenderListMarker.h',
+ 'rendering/RenderMarquee.cpp',
+ 'rendering/RenderMarquee.h',
+ 'rendering/RenderMedia.cpp',
+ 'rendering/RenderMedia.h',
+ 'rendering/RenderMenuList.cpp',
+ 'rendering/RenderMenuList.h',
+ 'rendering/RenderObject.cpp',
+ 'rendering/RenderObject.h',
+ 'rendering/RenderObjectChildList.cpp',
+ 'rendering/RenderObjectChildList.h',
+ 'rendering/RenderPart.cpp',
+ 'rendering/RenderPart.h',
+ 'rendering/RenderPartObject.cpp',
+ 'rendering/RenderPartObject.h',
+ 'rendering/RenderPath.cpp',
+ 'rendering/RenderPath.h',
+ 'rendering/RenderReplaced.cpp',
+ 'rendering/RenderReplaced.h',
+ 'rendering/RenderReplica.cpp',
+ 'rendering/RenderReplica.h',
+ 'rendering/RenderSVGBlock.cpp',
+ 'rendering/RenderSVGBlock.h',
+ 'rendering/RenderSVGContainer.cpp',
+ 'rendering/RenderSVGContainer.h',
+ 'rendering/RenderSVGGradientStop.cpp',
+ 'rendering/RenderSVGGradientStop.h',
+ 'rendering/RenderSVGHiddenContainer.cpp',
+ 'rendering/RenderSVGHiddenContainer.h',
+ 'rendering/RenderSVGImage.cpp',
+ 'rendering/RenderSVGImage.h',
+ 'rendering/RenderSVGInline.cpp',
+ 'rendering/RenderSVGInline.h',
+ 'rendering/RenderSVGInlineText.cpp',
+ 'rendering/RenderSVGInlineText.h',
+ 'rendering/RenderSVGModelObject.cpp',
+ 'rendering/RenderSVGModelObject.h',
+ 'rendering/RenderSVGRoot.cpp',
+ 'rendering/RenderSVGRoot.h',
+ 'rendering/RenderSVGTSpan.cpp',
+ 'rendering/RenderSVGTSpan.h',
+ 'rendering/RenderSVGText.cpp',
+ 'rendering/RenderSVGText.h',
+ 'rendering/RenderSVGTextPath.cpp',
+ 'rendering/RenderSVGTextPath.h',
+ 'rendering/RenderSVGTransformableContainer.cpp',
+ 'rendering/RenderSVGTransformableContainer.h',
+ 'rendering/RenderSVGViewportContainer.cpp',
+ 'rendering/RenderSVGViewportContainer.h',
+ 'rendering/RenderScrollbar.cpp',
+ 'rendering/RenderScrollbar.h',
+ 'rendering/RenderScrollbarPart.cpp',
+ 'rendering/RenderScrollbarPart.h',
+ 'rendering/RenderScrollbarTheme.cpp',
+ 'rendering/RenderScrollbarTheme.h',
+ 'rendering/RenderSelectionInfo.h',
+ 'rendering/RenderSlider.cpp',
+ 'rendering/RenderSlider.h',
+ 'rendering/RenderTable.cpp',
+ 'rendering/RenderTable.h',
+ 'rendering/RenderTableCell.cpp',
+ 'rendering/RenderTableCell.h',
+ 'rendering/RenderTableCol.cpp',
+ 'rendering/RenderTableCol.h',
+ 'rendering/RenderTableRow.cpp',
+ 'rendering/RenderTableRow.h',
+ 'rendering/RenderTableSection.cpp',
+ 'rendering/RenderTableSection.h',
+ 'rendering/RenderText.cpp',
+ 'rendering/RenderText.h',
+ 'rendering/RenderTextControl.cpp',
+ 'rendering/RenderTextControl.h',
+ 'rendering/RenderTextControlMultiLine.cpp',
+ 'rendering/RenderTextControlMultiLine.h',
+ 'rendering/RenderTextControlSingleLine.cpp',
+ 'rendering/RenderTextControlSingleLine.h',
+ 'rendering/RenderTextFragment.cpp',
+ 'rendering/RenderTextFragment.h',
+ 'rendering/RenderTheme.cpp',
+ 'rendering/RenderTheme.h',
+ 'rendering/RenderThemeChromiumSkia.cpp',
+ 'rendering/RenderThemeChromiumSkia.h',
+ 'rendering/RenderThemeChromiumLinux.cpp',
+ 'rendering/RenderThemeChromiumLinux.h',
+ 'rendering/RenderThemeChromiumMac.h',
+ 'rendering/RenderThemeChromiumMac.mm',
+ 'rendering/RenderThemeChromiumWin.cpp',
+ 'rendering/RenderThemeChromiumWin.h',
+ 'rendering/RenderThemeMac.h',
+ 'rendering/RenderThemeMac.mm',
+ 'rendering/RenderThemeSafari.cpp',
+ 'rendering/RenderThemeSafari.h',
+ 'rendering/RenderThemeWin.cpp',
+ 'rendering/RenderThemeWin.h',
+ 'rendering/RenderTreeAsText.cpp',
+ 'rendering/RenderTreeAsText.h',
+ 'rendering/RenderVideo.cpp',
+ 'rendering/RenderVideo.h',
+ 'rendering/RenderView.cpp',
+ 'rendering/RenderView.h',
+ 'rendering/RenderWidget.cpp',
+ 'rendering/RenderWidget.h',
+ 'rendering/RenderWordBreak.cpp',
+ 'rendering/RenderWordBreak.h',
+ 'rendering/RootInlineBox.cpp',
+ 'rendering/RootInlineBox.h',
+ 'rendering/ScrollBehavior.cpp',
+ 'rendering/ScrollBehavior.h',
+ 'rendering/SVGCharacterLayoutInfo.cpp',
+ 'rendering/SVGCharacterLayoutInfo.h',
+ 'rendering/SVGInlineFlowBox.cpp',
+ 'rendering/SVGInlineFlowBox.h',
+ 'rendering/SVGInlineTextBox.cpp',
+ 'rendering/SVGInlineTextBox.h',
+ 'rendering/SVGRenderSupport.cpp',
+ 'rendering/SVGRenderSupport.h',
+ 'rendering/SVGRenderTreeAsText.cpp',
+ 'rendering/SVGRenderTreeAsText.h',
+ 'rendering/SVGRootInlineBox.cpp',
+ 'rendering/SVGRootInlineBox.h',
+ 'rendering/TableLayout.h',
+ 'rendering/TextControlInnerElements.cpp',
+ 'rendering/TextControlInnerElements.h',
+ 'rendering/TransformState.cpp',
+ 'rendering/TransformState.h',
+ 'rendering/break_lines.cpp',
+ 'rendering/break_lines.h',
+ 'storage/ChangeVersionWrapper.cpp',
+ 'storage/ChangeVersionWrapper.h',
+ 'storage/Database.cpp',
+ 'storage/Database.h',
+ 'storage/DatabaseAuthorizer.cpp',
+ 'storage/DatabaseAuthorizer.h',
+ 'storage/DatabaseDetails.h',
+ 'storage/DatabaseTask.cpp',
+ 'storage/DatabaseTask.h',
+ 'storage/DatabaseThread.cpp',
+ 'storage/DatabaseThread.h',
+ 'storage/DatabaseTracker.cpp',
+ 'storage/DatabaseTracker.h',
+ 'storage/DatabaseTrackerClient.h',
+ 'storage/LocalStorage.cpp',
+ 'storage/LocalStorage.h',
+ 'storage/LocalStorageArea.cpp',
+ 'storage/LocalStorageArea.h',
+ 'storage/LocalStorageTask.cpp',
+ 'storage/LocalStorageTask.h',
+ 'storage/LocalStorageThread.cpp',
+ 'storage/LocalStorageThread.h',
+ 'storage/OriginQuotaManager.cpp',
+ 'storage/OriginQuotaManager.h',
+ 'storage/OriginUsageRecord.cpp',
+ 'storage/OriginUsageRecord.h',
+ 'storage/SQLError.h',
+ 'storage/SQLResultSet.cpp',
+ 'storage/SQLResultSet.h',
+ 'storage/SQLResultSetRowList.cpp',
+ 'storage/SQLResultSetRowList.h',
+ 'storage/SQLStatement.cpp',
+ 'storage/SQLStatement.h',
+ 'storage/SQLStatementCallback.h',
+ 'storage/SQLStatementErrorCallback.h',
+ 'storage/SQLTransaction.cpp',
+ 'storage/SQLTransaction.h',
+ 'storage/SQLTransactionCallback.h',
+ 'storage/SQLTransactionErrorCallback.h',
+ 'storage/SessionStorage.cpp',
+ 'storage/SessionStorage.h',
+ 'storage/SessionStorageArea.cpp',
+ 'storage/SessionStorageArea.h',
+ 'storage/Storage.cpp',
+ 'storage/Storage.h',
+ 'storage/StorageArea.cpp',
+ 'storage/StorageArea.h',
+ 'storage/StorageEvent.cpp',
+ 'storage/StorageEvent.h',
+ 'storage/StorageMap.cpp',
+ 'storage/StorageMap.h',
+ 'svg/animation/SMILTime.cpp',
+ 'svg/animation/SMILTime.h',
+ 'svg/animation/SMILTimeContainer.cpp',
+ 'svg/animation/SMILTimeContainer.h',
+ 'svg/animation/SVGSMILElement.cpp',
+ 'svg/animation/SVGSMILElement.h',
+ 'svg/graphics/filters/SVGDistantLightSource.h',
+ 'svg/graphics/filters/SVGFEConvolveMatrix.cpp',
+ 'svg/graphics/filters/SVGFEConvolveMatrix.h',
+ 'svg/graphics/filters/SVGFEDiffuseLighting.cpp',
+ 'svg/graphics/filters/SVGFEDiffuseLighting.h',
+ 'svg/graphics/filters/SVGFEDisplacementMap.cpp',
+ 'svg/graphics/filters/SVGFEDisplacementMap.h',
+ 'svg/graphics/filters/SVGFEFlood.cpp',
+ 'svg/graphics/filters/SVGFEFlood.h',
+ 'svg/graphics/filters/SVGFEGaussianBlur.cpp',
+ 'svg/graphics/filters/SVGFEGaussianBlur.h',
+ 'svg/graphics/filters/SVGFEImage.cpp',
+ 'svg/graphics/filters/SVGFEImage.h',
+ 'svg/graphics/filters/SVGFEMerge.cpp',
+ 'svg/graphics/filters/SVGFEMerge.h',
+ 'svg/graphics/filters/SVGFEMorphology.cpp',
+ 'svg/graphics/filters/SVGFEMorphology.h',
+ 'svg/graphics/filters/SVGFEOffset.cpp',
+ 'svg/graphics/filters/SVGFEOffset.h',
+ 'svg/graphics/filters/SVGFESpecularLighting.cpp',
+ 'svg/graphics/filters/SVGFESpecularLighting.h',
+ 'svg/graphics/filters/SVGFETile.cpp',
+ 'svg/graphics/filters/SVGFETile.h',
+ 'svg/graphics/filters/SVGFETurbulence.cpp',
+ 'svg/graphics/filters/SVGFETurbulence.h',
+ 'svg/graphics/filters/SVGFilterEffect.cpp',
+ 'svg/graphics/filters/SVGFilterEffect.h',
+ 'svg/graphics/filters/SVGLightSource.cpp',
+ 'svg/graphics/filters/SVGLightSource.h',
+ 'svg/graphics/filters/SVGPointLightSource.h',
+ 'svg/graphics/filters/SVGSpotLightSource.h',
+ 'svg/graphics/SVGImage.cpp',
+ 'svg/graphics/SVGImage.h',
+ 'svg/graphics/SVGPaintServer.cpp',
+ 'svg/graphics/SVGPaintServer.h',
+ 'svg/graphics/SVGPaintServerGradient.cpp',
+ 'svg/graphics/SVGPaintServerGradient.h',
+ 'svg/graphics/SVGPaintServerLinearGradient.cpp',
+ 'svg/graphics/SVGPaintServerLinearGradient.h',
+ 'svg/graphics/SVGPaintServerPattern.cpp',
+ 'svg/graphics/SVGPaintServerPattern.h',
+ 'svg/graphics/SVGPaintServerRadialGradient.cpp',
+ 'svg/graphics/SVGPaintServerRadialGradient.h',
+ 'svg/graphics/SVGPaintServerSolid.cpp',
+ 'svg/graphics/SVGPaintServerSolid.h',
+ 'svg/graphics/SVGResource.cpp',
+ 'svg/graphics/SVGResource.h',
+ 'svg/graphics/SVGResourceClipper.cpp',
+ 'svg/graphics/SVGResourceClipper.h',
+ 'svg/graphics/SVGResourceFilter.cpp',
+ 'svg/graphics/SVGResourceFilter.h',
+ 'svg/graphics/SVGResourceListener.h',
+ 'svg/graphics/SVGResourceMarker.cpp',
+ 'svg/graphics/SVGResourceMarker.h',
+ 'svg/graphics/SVGResourceMasker.cpp',
+ 'svg/graphics/SVGResourceMasker.h',
+ 'svg/ColorDistance.cpp',
+ 'svg/ColorDistance.h',
+ 'svg/ElementTimeControl.h',
+ 'svg/Filter.cpp',
+ 'svg/Filter.h',
+ 'svg/FilterBuilder.h',
+ 'svg/FilterBuilder.cpp',
+ 'svg/FilterEffect.cpp',
+ 'svg/FilterEffect.h',
+ 'svg/GradientAttributes.h',
+ 'svg/LinearGradientAttributes.h',
+ 'svg/PatternAttributes.h',
+ 'svg/RadialGradientAttributes.h',
+ 'svg/SVGAElement.cpp',
+ 'svg/SVGAElement.h',
+ 'svg/SVGAllInOne.cpp',
+ 'svg/SVGAltGlyphElement.cpp',
+ 'svg/SVGAltGlyphElement.h',
+ 'svg/SVGAngle.cpp',
+ 'svg/SVGAngle.h',
+ 'svg/SVGAnimateColorElement.cpp',
+ 'svg/SVGAnimateColorElement.h',
+ 'svg/SVGAnimateElement.cpp',
+ 'svg/SVGAnimateElement.h',
+ 'svg/SVGAnimateMotionElement.cpp',
+ 'svg/SVGAnimateMotionElement.h',
+ 'svg/SVGAnimateTransformElement.cpp',
+ 'svg/SVGAnimateTransformElement.h',
+ 'svg/SVGAnimatedPathData.cpp',
+ 'svg/SVGAnimatedPathData.h',
+ 'svg/SVGAnimatedPoints.cpp',
+ 'svg/SVGAnimatedPoints.h',
+ 'svg/SVGAnimatedProperty.h',
+ 'svg/SVGAnimatedTemplate.h',
+ 'svg/SVGAnimationElement.cpp',
+ 'svg/SVGAnimationElement.h',
+ 'svg/SVGCircleElement.cpp',
+ 'svg/SVGCircleElement.h',
+ 'svg/SVGClipPathElement.cpp',
+ 'svg/SVGClipPathElement.h',
+ 'svg/SVGColor.cpp',
+ 'svg/SVGColor.h',
+ 'svg/SVGComponentTransferFunctionElement.cpp',
+ 'svg/SVGComponentTransferFunctionElement.h',
+ 'svg/SVGCursorElement.cpp',
+ 'svg/SVGCursorElement.h',
+ 'svg/SVGDefinitionSrcElement.cpp',
+ 'svg/SVGDefinitionSrcElement.h',
+ 'svg/SVGDefsElement.cpp',
+ 'svg/SVGDefsElement.h',
+ 'svg/SVGDescElement.cpp',
+ 'svg/SVGDescElement.h',
+ 'svg/SVGDocument.cpp',
+ 'svg/SVGDocument.h',
+ 'svg/SVGDocumentExtensions.cpp',
+ 'svg/SVGDocumentExtensions.h',
+ 'svg/SVGElement.cpp',
+ 'svg/SVGElement.h',
+ 'svg/SVGElementInstance.cpp',
+ 'svg/SVGElementInstance.h',
+ 'svg/SVGElementInstanceList.cpp',
+ 'svg/SVGElementInstanceList.h',
+ 'svg/SVGEllipseElement.cpp',
+ 'svg/SVGEllipseElement.h',
+ 'svg/SVGException.h',
+ 'svg/SVGExternalResourcesRequired.cpp',
+ 'svg/SVGExternalResourcesRequired.h',
+ 'svg/SVGFEBlendElement.cpp',
+ 'svg/SVGFEBlendElement.h',
+ 'svg/SVGFEColorMatrixElement.cpp',
+ 'svg/SVGFEColorMatrixElement.h',
+ 'svg/SVGFEComponentTransferElement.cpp',
+ 'svg/SVGFEComponentTransferElement.h',
+ 'svg/SVGFECompositeElement.cpp',
+ 'svg/SVGFECompositeElement.h',
+ 'svg/SVGFEDiffuseLightingElement.cpp',
+ 'svg/SVGFEDiffuseLightingElement.h',
+ 'svg/SVGFEDisplacementMapElement.cpp',
+ 'svg/SVGFEDisplacementMapElement.h',
+ 'svg/SVGFEDistantLightElement.cpp',
+ 'svg/SVGFEDistantLightElement.h',
+ 'svg/SVGFEFloodElement.cpp',
+ 'svg/SVGFEFloodElement.h',
+ 'svg/SVGFEFuncAElement.cpp',
+ 'svg/SVGFEFuncAElement.h',
+ 'svg/SVGFEFuncBElement.cpp',
+ 'svg/SVGFEFuncBElement.h',
+ 'svg/SVGFEFuncGElement.cpp',
+ 'svg/SVGFEFuncGElement.h',
+ 'svg/SVGFEFuncRElement.cpp',
+ 'svg/SVGFEFuncRElement.h',
+ 'svg/SVGFEGaussianBlurElement.cpp',
+ 'svg/SVGFEGaussianBlurElement.h',
+ 'svg/SVGFEImageElement.cpp',
+ 'svg/SVGFEImageElement.h',
+ 'svg/SVGFELightElement.cpp',
+ 'svg/SVGFELightElement.h',
+ 'svg/SVGFEMergeElement.cpp',
+ 'svg/SVGFEMergeElement.h',
+ 'svg/SVGFEMergeNodeElement.cpp',
+ 'svg/SVGFEMergeNodeElement.h',
+ 'svg/SVGFEOffsetElement.cpp',
+ 'svg/SVGFEOffsetElement.h',
+ 'svg/SVGFEPointLightElement.cpp',
+ 'svg/SVGFEPointLightElement.h',
+ 'svg/SVGFESpecularLightingElement.cpp',
+ 'svg/SVGFESpecularLightingElement.h',
+ 'svg/SVGFESpotLightElement.cpp',
+ 'svg/SVGFESpotLightElement.h',
+ 'svg/SVGFETileElement.cpp',
+ 'svg/SVGFETileElement.h',
+ 'svg/SVGFETurbulenceElement.cpp',
+ 'svg/SVGFETurbulenceElement.h',
+ 'svg/SVGFilterElement.cpp',
+ 'svg/SVGFilterElement.h',
+ 'svg/SVGFilterPrimitiveStandardAttributes.cpp',
+ 'svg/SVGFilterPrimitiveStandardAttributes.h',
+ 'svg/SVGFitToViewBox.cpp',
+ 'svg/SVGFitToViewBox.h',
+ 'svg/SVGFont.cpp',
+ 'svg/SVGFontData.cpp',
+ 'svg/SVGFontData.h',
+ 'svg/SVGFontElement.cpp',
+ 'svg/SVGFontElement.h',
+ 'svg/SVGFontFaceElement.cpp',
+ 'svg/SVGFontFaceElement.h',
+ 'svg/SVGFontFaceFormatElement.cpp',
+ 'svg/SVGFontFaceFormatElement.h',
+ 'svg/SVGFontFaceNameElement.cpp',
+ 'svg/SVGFontFaceNameElement.h',
+ 'svg/SVGFontFaceSrcElement.cpp',
+ 'svg/SVGFontFaceSrcElement.h',
+ 'svg/SVGFontFaceUriElement.cpp',
+ 'svg/SVGFontFaceUriElement.h',
+ 'svg/SVGForeignObjectElement.cpp',
+ 'svg/SVGForeignObjectElement.h',
+ 'svg/SVGGElement.cpp',
+ 'svg/SVGGElement.h',
+ 'svg/SVGGlyphElement.cpp',
+ 'svg/SVGGlyphElement.h',
+ 'svg/SVGGlyphMap.h',
+ 'svg/SVGGradientElement.cpp',
+ 'svg/SVGGradientElement.h',
+ 'svg/SVGHKernElement.cpp',
+ 'svg/SVGHKernElement.h',
+ 'svg/SVGImageElement.cpp',
+ 'svg/SVGImageElement.h',
+ 'svg/SVGImageLoader.cpp',
+ 'svg/SVGImageLoader.h',
+ 'svg/SVGLangSpace.cpp',
+ 'svg/SVGLangSpace.h',
+ 'svg/SVGLength.cpp',
+ 'svg/SVGLength.h',
+ 'svg/SVGLengthList.cpp',
+ 'svg/SVGLengthList.h',
+ 'svg/SVGLineElement.cpp',
+ 'svg/SVGLineElement.h',
+ 'svg/SVGLinearGradientElement.cpp',
+ 'svg/SVGLinearGradientElement.h',
+ 'svg/SVGList.h',
+ 'svg/SVGListTraits.h',
+ 'svg/SVGLocatable.cpp',
+ 'svg/SVGLocatable.h',
+ 'svg/SVGMPathElement.cpp',
+ 'svg/SVGMPathElement.h',
+ 'svg/SVGMarkerElement.cpp',
+ 'svg/SVGMarkerElement.h',
+ 'svg/SVGMaskElement.cpp',
+ 'svg/SVGMaskElement.h',
+ 'svg/SVGMetadataElement.cpp',
+ 'svg/SVGMetadataElement.h',
+ 'svg/SVGMissingGlyphElement.cpp',
+ 'svg/SVGMissingGlyphElement.h',
+ 'svg/SVGNumberList.cpp',
+ 'svg/SVGNumberList.h',
+ 'svg/SVGPaint.cpp',
+ 'svg/SVGPaint.h',
+ 'svg/SVGParserUtilities.cpp',
+ 'svg/SVGParserUtilities.h',
+ 'svg/SVGPathElement.cpp',
+ 'svg/SVGPathElement.h',
+ 'svg/SVGPathSeg.h',
+ 'svg/SVGPathSegArc.cpp',
+ 'svg/SVGPathSegArc.h',
+ 'svg/SVGPathSegClosePath.cpp',
+ 'svg/SVGPathSegClosePath.h',
+ 'svg/SVGPathSegCurvetoCubic.cpp',
+ 'svg/SVGPathSegCurvetoCubic.h',
+ 'svg/SVGPathSegCurvetoCubicSmooth.cpp',
+ 'svg/SVGPathSegCurvetoCubicSmooth.h',
+ 'svg/SVGPathSegCurvetoQuadratic.cpp',
+ 'svg/SVGPathSegCurvetoQuadratic.h',
+ 'svg/SVGPathSegCurvetoQuadraticSmooth.cpp',
+ 'svg/SVGPathSegCurvetoQuadraticSmooth.h',
+ 'svg/SVGPathSegLineto.cpp',
+ 'svg/SVGPathSegLineto.h',
+ 'svg/SVGPathSegLinetoHorizontal.cpp',
+ 'svg/SVGPathSegLinetoHorizontal.h',
+ 'svg/SVGPathSegLinetoVertical.cpp',
+ 'svg/SVGPathSegLinetoVertical.h',
+ 'svg/SVGPathSegList.cpp',
+ 'svg/SVGPathSegList.h',
+ 'svg/SVGPathSegMoveto.cpp',
+ 'svg/SVGPathSegMoveto.h',
+ 'svg/SVGPatternElement.cpp',
+ 'svg/SVGPatternElement.h',
+ 'svg/SVGPointList.cpp',
+ 'svg/SVGPointList.h',
+ 'svg/SVGPolyElement.cpp',
+ 'svg/SVGPolyElement.h',
+ 'svg/SVGPolygonElement.cpp',
+ 'svg/SVGPolygonElement.h',
+ 'svg/SVGPolylineElement.cpp',
+ 'svg/SVGPolylineElement.h',
+ 'svg/SVGPreserveAspectRatio.cpp',
+ 'svg/SVGPreserveAspectRatio.h',
+ 'svg/SVGRadialGradientElement.cpp',
+ 'svg/SVGRadialGradientElement.h',
+ 'svg/SVGRectElement.cpp',
+ 'svg/SVGRectElement.h',
+ 'svg/SVGRenderingIntent.h',
+ 'svg/SVGSVGElement.cpp',
+ 'svg/SVGSVGElement.h',
+ 'svg/SVGScriptElement.cpp',
+ 'svg/SVGScriptElement.h',
+ 'svg/SVGSetElement.cpp',
+ 'svg/SVGSetElement.h',
+ 'svg/SVGStopElement.cpp',
+ 'svg/SVGStopElement.h',
+ 'svg/SVGStringList.cpp',
+ 'svg/SVGStringList.h',
+ 'svg/SVGStylable.cpp',
+ 'svg/SVGStylable.h',
+ 'svg/SVGStyleElement.cpp',
+ 'svg/SVGStyleElement.h',
+ 'svg/SVGStyledElement.cpp',
+ 'svg/SVGStyledElement.h',
+ 'svg/SVGStyledLocatableElement.cpp',
+ 'svg/SVGStyledLocatableElement.h',
+ 'svg/SVGStyledTransformableElement.cpp',
+ 'svg/SVGStyledTransformableElement.h',
+ 'svg/SVGSwitchElement.cpp',
+ 'svg/SVGSwitchElement.h',
+ 'svg/SVGSymbolElement.cpp',
+ 'svg/SVGSymbolElement.h',
+ 'svg/SVGTRefElement.cpp',
+ 'svg/SVGTRefElement.h',
+ 'svg/SVGTSpanElement.cpp',
+ 'svg/SVGTSpanElement.h',
+ 'svg/SVGTests.cpp',
+ 'svg/SVGTests.h',
+ 'svg/SVGTextContentElement.cpp',
+ 'svg/SVGTextContentElement.h',
+ 'svg/SVGTextElement.cpp',
+ 'svg/SVGTextElement.h',
+ 'svg/SVGTextPathElement.cpp',
+ 'svg/SVGTextPathElement.h',
+ 'svg/SVGTextPositioningElement.cpp',
+ 'svg/SVGTextPositioningElement.h',
+ 'svg/SVGTitleElement.cpp',
+ 'svg/SVGTitleElement.h',
+ 'svg/SVGTransform.cpp',
+ 'svg/SVGTransform.h',
+ 'svg/SVGTransformDistance.cpp',
+ 'svg/SVGTransformDistance.h',
+ 'svg/SVGTransformList.cpp',
+ 'svg/SVGTransformList.h',
+ 'svg/SVGTransformable.cpp',
+ 'svg/SVGTransformable.h',
+ 'svg/SVGURIReference.cpp',
+ 'svg/SVGURIReference.h',
+ 'svg/SVGUnitTypes.h',
+ 'svg/SVGUseElement.cpp',
+ 'svg/SVGUseElement.h',
+ 'svg/SVGViewElement.cpp',
+ 'svg/SVGViewElement.h',
+ 'svg/SVGViewSpec.cpp',
+ 'svg/SVGViewSpec.h',
+ 'svg/SVGZoomAndPan.cpp',
+ 'svg/SVGZoomAndPan.h',
+ 'svg/SVGZoomEvent.cpp',
+ 'svg/SVGZoomEvent.h',
+ 'svg/SynchronizableTypeWrapper.h',
+ 'workers/AbstractWorker.cpp',
+ 'workers/AbstractWorker.h',
+ 'workers/GenericWorkerTask.h',
+ 'workers/SharedWorker.cpp',
+ 'workers/SharedWorker.h',
+ 'workers/Worker.cpp',
+ 'workers/Worker.h',
+ 'workers/WorkerContext.cpp',
+ 'workers/WorkerContext.h',
+ 'workers/WorkerContextProxy.h',
+ 'workers/WorkerLoaderProxy.h',
+ 'workers/WorkerLocation.cpp',
+ 'workers/WorkerLocation.h',
+ 'workers/WorkerMessagingProxy.cpp',
+ 'workers/WorkerMessagingProxy.h',
+ 'workers/WorkerObjectProxy.h',
+ 'workers/WorkerRunLoop.cpp',
+ 'workers/WorkerRunLoop.h',
+ 'workers/WorkerScriptLoader.cpp',
+ 'workers/WorkerScriptLoader.h',
+ 'workers/WorkerScriptLoaderClient.h',
+ 'workers/WorkerThread.cpp',
+ 'workers/WorkerThread.h',
+ 'xml/DOMParser.cpp',
+ 'xml/DOMParser.h',
+ 'xml/NativeXPathNSResolver.cpp',
+ 'xml/NativeXPathNSResolver.h',
+ 'xml/XMLHttpRequest.cpp',
+ 'xml/XMLHttpRequest.h',
+ 'xml/XMLHttpRequestException.h',
+ 'xml/XMLHttpRequestProgressEvent.h',
+ 'xml/XMLHttpRequestUpload.cpp',
+ 'xml/XMLHttpRequestUpload.h',
+ 'xml/XMLSerializer.cpp',
+ 'xml/XMLSerializer.h',
+ 'xml/XPathEvaluator.cpp',
+ 'xml/XPathEvaluator.h',
+ 'xml/XPathException.h',
+ 'xml/XPathExpression.cpp',
+ 'xml/XPathExpression.h',
+ 'xml/XPathExpressionNode.cpp',
+ 'xml/XPathExpressionNode.h',
+ 'xml/XPathFunctions.cpp',
+ 'xml/XPathFunctions.h',
+ 'xml/XPathNSResolver.cpp',
+ 'xml/XPathNSResolver.h',
+ 'xml/XPathNamespace.cpp',
+ 'xml/XPathNamespace.h',
+ 'xml/XPathNodeSet.cpp',
+ 'xml/XPathNodeSet.h',
+ 'xml/XPathParser.cpp',
+ 'xml/XPathParser.h',
+ 'xml/XPathPath.cpp',
+ 'xml/XPathPath.h',
+ 'xml/XPathPredicate.cpp',
+ 'xml/XPathPredicate.h',
+ 'xml/XPathResult.cpp',
+ 'xml/XPathResult.h',
+ 'xml/XPathStep.cpp',
+ 'xml/XPathStep.h',
+ 'xml/XPathUtil.cpp',
+ 'xml/XPathUtil.h',
+ 'xml/XPathValue.cpp',
+ 'xml/XPathValue.h',
+ 'xml/XPathVariableReference.cpp',
+ 'xml/XPathVariableReference.h',
+ 'xml/XSLImportRule.cpp',
+ 'xml/XSLImportRule.h',
+ 'xml/XSLStyleSheet.cpp',
+ 'xml/XSLStyleSheet.h',
+ 'xml/XSLTExtensions.cpp',
+ 'xml/XSLTExtensions.h',
+ 'xml/XSLTProcessor.cpp',
+ 'xml/XSLTProcessor.h',
+ 'xml/XSLTUnicodeSort.cpp',
+ 'xml/XSLTUnicodeSort.h',
+ ],
+ }
+}
diff --git a/src/3rdparty/webkit/WebCore/WebCore.order b/src/3rdparty/webkit/WebCore/WebCore.order
index ddce440..31b178c 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.order
+++ b/src/3rdparty/webkit/WebCore/WebCore.order
@@ -3793,7 +3793,6 @@ __ZN7WebCore7UIEventD0Ev
__ZN7WebCore5EventD2Ev
__ZN7WebCore13ContainerNode8setFocusEb
__ZN7WebCore4Node8setFocusEb
-__ZN7WebCore14focusRingColorEv
+[WebCoreControlTintObserver controlTintDidChange]
__ZN7WebCore26usesTestModeFocusRingColorEv
__ZNK7WebCore14SVGRenderStyle17inheritedNotEqualEPKS0_
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 486c9d0..b0b0290 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -41,7 +41,7 @@ CONFIG -= warn_on
# Disable a few warnings on Windows. The warnings are also
# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
-win32-*: QMAKE_CXXFLAGS += -wd4291 -wd4344
+!win32-g++:win32-*: QMAKE_CXXFLAGS += -wd4291 -wd4344
unix:!mac:*-g++*:QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections
@@ -58,6 +58,12 @@ freebsd-*: DEFINES += HAVE_PTHREAD_NP_H
DEFINES += BUILD_WEBKIT
+# Remove whole program optimizations due to miscompilations
+win32-msvc2005|win32-msvc2008:{
+ QMAKE_CFLAGS_RELEASE -= -GL
+ QMAKE_CXXFLAGS_RELEASE -= -GL
+}
+
win32-*: DEFINES += _HAS_TR1=0
wince* {
# DEFINES += ENABLE_SVG=0 ENABLE_XPATH=0 ENABLE_XBL=0 \
@@ -100,6 +106,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
!contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=.): DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
!contains(DEFINES, ENABLE_DOM_STORAGE=.): DEFINES += ENABLE_DOM_STORAGE=1
!contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
+!contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
# turn on SQLITE support if any of the dependent features are turned on
!contains(DEFINES, ENABLE_SQLITE=.) {
@@ -116,6 +123,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
!contains(DEFINES, ENABLE_XSLT=.): DEFINES += ENABLE_XSLT=0
#!contains(DEFINES, ENABLE_XBL=.): DEFINES += ENABLE_XBL=1
!contains(DEFINES, ENABLE_WML=.): DEFINES += ENABLE_WML=0
+!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=0
!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
!contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0
@@ -246,7 +254,7 @@ SVGCSSPROPERTIES = $$PWD/css/SVGCSSPropertyNames.in
SVGCSSVALUES = $$PWD/css/SVGCSSValueKeywords.in
STYLESHEETS_EMBED = \
- $$PWD/css/html4.css \
+ $$PWD/css/html.css \
$$PWD/css/quirks.css \
$$PWD/css/svg.css \
$$PWD/css/view-source.css \
@@ -404,6 +412,7 @@ IDL_BINDINGS += \
html/ImageData.idl \
html/MediaError.idl \
html/TextMetrics.idl \
+ html/ValidityState.idl \
html/VoidCallback.idl \
inspector/InspectorController.idl \
page/BarInfo.idl \
@@ -748,6 +757,7 @@ SOURCES += \
html/CollectionCache.cpp \
html/DataGridColumn.cpp \
html/DataGridColumnList.cpp \
+ html/DOMDataGridDataSource.cpp \
html/File.cpp \
html/FileList.cpp \
html/FormDataList.cpp \
@@ -833,6 +843,7 @@ SOURCES += \
html/HTMLViewSourceDocument.cpp \
html/ImageData.cpp \
html/PreloadScanner.cpp \
+ html/ValidityState.cpp \
inspector/ConsoleMessage.cpp \
inspector/InspectorDatabaseResource.cpp \
inspector/InspectorDOMStorageResource.cpp \
@@ -1012,7 +1023,6 @@ SOURCES += \
plugins/PluginStream.cpp \
plugins/PluginView.cpp \
rendering/AutoTableLayout.cpp \
- rendering/bidi.cpp \
rendering/break_lines.cpp \
rendering/CounterNode.cpp \
rendering/EllipsisBox.cpp \
@@ -1025,6 +1035,7 @@ SOURCES += \
rendering/RenderApplet.cpp \
rendering/RenderArena.cpp \
rendering/RenderBlock.cpp \
+ rendering/RenderBlockLineLayout.cpp \
rendering/RenderBox.cpp \
rendering/RenderBoxModelObject.cpp \
rendering/RenderBR.cpp \
@@ -1106,7 +1117,6 @@ SOURCES += \
HEADERS += \
$$PWD/platform/graphics/qt/StillImageQt.h \
$$PWD/platform/qt/QWebPopup.h \
- $$PWD/../WebKit/qt/Api/qwebpluginfactory.h \
$$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
$$PWD/platform/network/qt/QNetworkReplyHandler.h \
$$PWD/rendering/style/CursorData.h \
@@ -1114,9 +1124,7 @@ HEADERS += \
$$PWD/rendering/style/StyleInheritedData.h \
$$PWD/rendering/style/StyleRareInheritedData.h \
$$PWD/rendering/style/StyleRareNonInheritedData.h \
- $$PWD/rendering/style/StyleReflection.h \
- $$PWD/../WebKit/qt/Api/qwebsecurityorigin.h \
- $$PWD/../WebKit/qt/Api/qwebdatabase.h
+ $$PWD/rendering/style/StyleReflection.h
SOURCES += \
@@ -1293,6 +1301,10 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
plugins/PluginViewNone.cpp
}
+contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1) {
+ FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
+}
+
contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0) {
DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in
}
@@ -1322,6 +1334,7 @@ contains(DEFINES, ENABLE_SQLITE=1) {
SOURCES += \
platform/sql/SQLiteAuthorizer.cpp \
platform/sql/SQLiteDatabase.cpp \
+ platform/sql/SQLiteFileSystem.cpp \
platform/sql/SQLiteStatement.cpp \
platform/sql/SQLiteTransaction.cpp \
platform/sql/SQLValue.cpp \
@@ -1368,10 +1381,12 @@ contains(DEFINES, ENABLE_DOM_STORAGE=1) {
storage/LocalStorageThread.h \
storage/Storage.h \
storage/StorageArea.h \
+ storage/StorageAreaImpl.h \
storage/StorageAreaSync.h \
storage/StorageEvent.h \
storage/StorageMap.h \
storage/StorageNamespace.h \
+ storage/StorageNamespaceImpl.h \
storage/StorageSyncManager.h
SOURCES += \
@@ -1380,10 +1395,12 @@ contains(DEFINES, ENABLE_DOM_STORAGE=1) {
storage/LocalStorageThread.cpp \
storage/Storage.cpp \
storage/StorageArea.cpp \
+ storage/StorageAreaImpl.cpp \
storage/StorageAreaSync.cpp \
storage/StorageEvent.cpp \
storage/StorageMap.cpp \
storage/StorageNamespace.cpp \
+ storage/StorageNamespaceImpl.cpp \
storage/StorageSyncManager.cpp
IDL_BINDINGS += \
@@ -1427,6 +1444,21 @@ contains(DEFINES, ENABLE_WORKERS=1) {
workers/WorkerScriptLoader.cpp
}
+contains(DEFINES, SHARED_WORKERS=1) {
+ FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
+
+ IDL_BINDINGS += \
+ workers/AbstractWorker.idl \
+ workers/SharedWorker.idl
+
+ SOURCES += \
+ bindings/js/JSAbstractWorkerCustom.cpp \
+ bindings/js/JSSharedWorkerConstructor.cpp \
+ bindings/js/JSSharedWorkerCustom.cpp \
+ workers/AbstractWorker.cpp \
+ workers/SharedWorker.cpp
+}
+
contains(DEFINES, ENABLE_VIDEO=1) {
FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
@@ -2168,8 +2200,6 @@ HEADERS += $$WEBKIT_API_HEADERS
target.path = $$[QT_INSTALL_LIBS]
headers.files = $$WEBKIT_API_HEADERS
headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
- prf.files = $$PWD/../WebKit/qt/Api/qtwebkit.prf
- prf.path = $$[QT_INSTALL_PREFIX]/mkspecs/features
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
@@ -2182,7 +2212,7 @@ HEADERS += $$WEBKIT_API_HEADERS
}
- INSTALLS += target headers prf
+ INSTALLS += target headers
unix {
CONFIG += create_pc create_prl
diff --git a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h
index 8939092..22a7f99 100644
--- a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h
+++ b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h
@@ -151,7 +151,8 @@ enum AccessibilityRole {
ListBoxOptionRole,
TableHeaderContainerRole,
DefinitionListTermRole,
- DefinitionListDefinitionRole
+ DefinitionListDefinitionRole,
+ AnnotationRole
};
struct VisiblePositionRange {
@@ -285,7 +286,7 @@ public:
virtual IntRect boundingBoxRect() const;
virtual IntRect elementRect() const;
virtual IntSize size() const;
- IntPoint clickPoint() const;
+ virtual IntPoint clickPoint() const;
virtual KURL url() const;
virtual PlainTextRange selectedTextRange() const;
diff --git a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp
index 9c10267..7d2ddc5 100644
--- a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -966,6 +966,10 @@ String AccessibilityRenderObject::accessibilityDescription() const
if (!m_renderer)
return String();
+ String ariaLabel = getAttribute(aria_labelAttr).string();
+ if (!ariaLabel.isEmpty())
+ return ariaLabel;
+
String ariaDescription = ariaDescribedByAttribute();
if (!ariaDescription.isEmpty())
return ariaDescription;
@@ -1063,6 +1067,21 @@ IntSize AccessibilityRenderObject::size() const
return rect.size();
}
+IntPoint AccessibilityRenderObject::clickPoint() const
+{
+ // use the default position unless this is an editable web area, in which case we use the selection bounds.
+ if (!isWebArea() || isReadOnly())
+ return AccessibilityObject::clickPoint();
+
+ VisibleSelection visSelection = selection();
+ VisiblePositionRange range = VisiblePositionRange(visSelection.visibleStart(), visSelection.visibleEnd());
+ IntRect bounds = boundsForVisiblePositionRange(range);
+#if PLATFORM(MAC)
+ bounds.setLocation(m_renderer->document()->view()->screenToContents(bounds.location()));
+#endif
+ return IntPoint(bounds.x() + (bounds.width() / 2), bounds.y() - (bounds.height() / 2));
+}
+
AccessibilityObject* AccessibilityRenderObject::internalLinkElement() const
{
Element* element = anchorElement();
@@ -1290,13 +1309,13 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
return false;
}
- // check for one-dimensional image
- RenderImage* image = toRenderImage(m_renderer);
- if (image->height() <= 1 || image->width() <= 1)
- return true;
-
- // check whether rendered image was stretched from one-dimensional file image
if (isNativeImage()) {
+ // check for one-dimensional image
+ RenderImage* image = toRenderImage(m_renderer);
+ if (image->height() <= 1 || image->width() <= 1)
+ return true;
+
+ // check whether rendered image was stretched from one-dimensional file image
if (image->cachedImage()) {
IntSize imageSize = image->cachedImage()->imageSize(image->view()->zoomFactor());
return imageSize.height() <= 1 || imageSize.width() <= 1;
@@ -2154,12 +2173,13 @@ AccessibilityObject* AccessibilityRenderObject::observableObject() const
typedef HashMap<String, AccessibilityRole, CaseFoldingHash> ARIARoleMap;
-struct RoleEntry {
- String ariaRole;
- AccessibilityRole webcoreRole;
-};
static const ARIARoleMap& createARIARoleMap()
{
+ struct RoleEntry {
+ String ariaRole;
+ AccessibilityRole webcoreRole;
+ };
+
const RoleEntry roles[] = {
{ "button", ButtonRole },
{ "checkbox", CheckBoxRole },
@@ -2184,7 +2204,8 @@ static const ARIARoleMap& createARIARoleMap()
{ "range", SliderRole },
{ "slider", SliderRole },
{ "spinbutton", ProgressIndicatorRole },
- { "textbox", TextAreaRole }
+ { "textbox", TextAreaRole },
+ { "toolbar", ToolbarRole }
};
ARIARoleMap& roleMap = *new ARIARoleMap;
@@ -2304,6 +2325,9 @@ AccessibilityRole AccessibilityRenderObject::roleValue() const
if (node && node->hasTagName(dtTag))
return DefinitionListTermRole;
+ if (node && (node->hasTagName(rpTag) || node->hasTagName(rtTag)))
+ return AnnotationRole;
+
if (m_renderer->isBlockFlow() || (node && node->hasTagName(labelTag)))
return GroupRole;
diff --git a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.h b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.h
index 4fa325f..4f8e247 100644
--- a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.h
@@ -147,6 +147,7 @@ public:
virtual IntRect boundingBoxRect() const;
virtual IntRect elementRect() const;
virtual IntSize size() const;
+ virtual IntPoint clickPoint() const;
void setRenderer(RenderObject* renderer) { m_renderer = renderer; }
RenderObject* renderer() const { return m_renderer; }
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp
new file mode 100644
index 0000000..82e06e3
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp
@@ -0,0 +1,93 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "JSAbstractWorker.h"
+
+#include "AbstractWorker.h"
+#include "JSDOMGlobalObject.h"
+#include "JSEventListener.h"
+#include "JSEventTarget.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+void JSAbstractWorker::mark()
+{
+ DOMObject::mark();
+
+ markIfNotNull(m_impl->onerror());
+
+ typedef AbstractWorker::EventListenersMap EventListenersMap;
+ typedef AbstractWorker::ListenerVector ListenerVector;
+ EventListenersMap& eventListeners = m_impl->eventListeners();
+ for (EventListenersMap::iterator mapIter = eventListeners.begin(); mapIter != eventListeners.end(); ++mapIter) {
+ for (ListenerVector::iterator vecIter = mapIter->second.begin(); vecIter != mapIter->second.end(); ++vecIter)
+ (*vecIter)->markJSFunction();
+ }
+}
+
+JSValue JSAbstractWorker::addEventListener(ExecState* exec, const ArgList& args)
+{
+ JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(impl()->scriptExecutionContext());
+ if (!globalObject)
+ return jsUndefined();
+ RefPtr<JSEventListener> listener = globalObject->findOrCreateJSEventListener(args.at(1));
+ if (!listener)
+ return jsUndefined();
+ impl()->addEventListener(args.at(0).toString(exec), listener.release(), args.at(2).toBoolean(exec));
+ return jsUndefined();
+}
+
+JSValue JSAbstractWorker::removeEventListener(ExecState* exec, const ArgList& args)
+{
+ JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(impl()->scriptExecutionContext());
+ if (!globalObject)
+ return jsUndefined();
+ JSEventListener* listener = globalObject->findJSEventListener(args.at(1));
+ if (!listener)
+ return jsUndefined();
+ impl()->removeEventListener(args.at(0).toString(exec), listener, args.at(2).toBoolean(exec));
+ return jsUndefined();
+}
+
+JSValue toJS(ExecState* exec, AbstractWorker* baseObject)
+{
+ // Just call the JSEventTarget implementation of toJS(), which already differentiates between the different implementations.
+ return toJS(exec, static_cast<EventTarget*>(baseObject));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
index 6361e70..ffe8cf5 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
@@ -84,7 +84,7 @@ String JSCustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
callType = m_customResolver->getCallData(callData);
if (callType == CallTypeNone) {
// FIXME: Pass actual line number and source URL.
- m_frame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.", 0, String());
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.", 0, String());
return String();
}
function = m_customResolver;
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp
index 55f0e91..81d59fb 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp
@@ -32,6 +32,7 @@
#include "EventException.h"
#include "ExceptionCode.h"
#include "Frame.h"
+#include "HTMLAudioElement.h"
#include "HTMLImageElement.h"
#include "HTMLScriptElement.h"
#include "HTMLNames.h"
@@ -288,6 +289,10 @@ static inline bool isObservableThroughDOM(JSNode* jsNode)
return true;
if (node->hasTagName(scriptTag) && !static_cast<HTMLScriptElement*>(node)->haveFiredLoadEvent())
return true;
+#if ENABLE(VIDEO)
+ if (node->hasTagName(audioTag) && !static_cast<HTMLAudioElement*>(node)->paused())
+ return true;
+#endif
}
return false;
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h
index 1378c91..e3fd417 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h
@@ -86,8 +86,9 @@ namespace WebCore {
return structure;
return cacheDOMStructure(globalObject, WrapperClass::createStructure(WrapperClass::createPrototype(exec, globalObject)), &WrapperClass::s_info);
}
- template<class WrapperClass> inline JSC::Structure* getDOMStructure(JSC::ExecState* exec)
+ template<class WrapperClass> inline JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState* exec)
{
+ // FIXME: This function is wrong. It uses the wrong global object for creating the prototype structure.
return getDOMStructure<WrapperClass>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()));
}
template<class WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject)
@@ -99,7 +100,8 @@ namespace WebCore {
{
ASSERT(object);
ASSERT(!getCachedDOMObjectWrapper(exec->globalData(), object));
- WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec), object);
+ // FIXME: new (exec) could use a different globalData than the globalData this wrapper is cached on.
+ WrapperClass* wrapper = new (exec) WrapperClass(deprecatedGetDOMStructure<WrapperClass>(exec), object);
cacheDOMObjectWrapper(exec->globalData(), object, wrapper);
return wrapper;
}
@@ -118,7 +120,7 @@ namespace WebCore {
{
ASSERT(object);
ASSERT(!getCachedDOMObjectWrapper(exec->globalData(), object));
- WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec), object, context);
+ WrapperClass* wrapper = new (exec) WrapperClass(deprecatedGetDOMStructure<WrapperClass>(exec), object, context);
cacheDOMObjectWrapper(exec->globalData(), object, wrapper);
return wrapper;
}
@@ -137,7 +139,9 @@ namespace WebCore {
{
ASSERT(node);
ASSERT(!getCachedDOMNodeWrapper(node->document(), node));
- WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec), node);
+ WrapperClass* wrapper = new (exec) WrapperClass(deprecatedGetDOMStructure<WrapperClass>(exec), node);
+ // FIXME: The entire function can be removed, once we fix caching.
+ // This function is a one-off hack to make Nodes cache in the right global object.
cacheDOMNodeWrapper(node->document(), node, wrapper);
return wrapper;
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp
index 0eefebe..0f419ba 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp
@@ -99,7 +99,7 @@ void JSDOMWindowBase::printErrorMessage(const String& message) const
if (settings->privateBrowsingEnabled())
return;
- impl()->console()->addMessage(JSMessageSource, ErrorMessageLevel, message, 1, String()); // FIXME: provide a real line number and source URL.
+ impl()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String()); // FIXME: provide a real line number and source URL.
}
ExecState* JSDOMWindowBase::globalExec()
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
index 22013eb..c095bf2 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -45,6 +45,7 @@
#include "JSMessageChannelConstructor.h"
#include "JSMessagePort.h"
#include "JSOptionConstructor.h"
+#include "JSSharedWorkerConstructor.h"
#include "JSWebKitCSSMatrixConstructor.h"
#include "JSWebKitPointConstructor.h"
#include "JSWorkerConstructor.h"
@@ -476,6 +477,13 @@ JSValue JSDOMWindow::worker(ExecState* exec) const
}
#endif
+#if ENABLE(SHARED_WORKERS)
+JSValue JSDOMWindow::sharedWorker(ExecState* exec) const
+{
+ return getDOMConstructor<JSSharedWorkerConstructor>(exec, this);
+}
+#endif
+
// Custom functions
// Helper for window.open() and window.showModalDialog()
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp
index af49df4..c7ffcde 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSDataGridColumnList.h"
#include "AtomicString.h"
@@ -47,3 +50,5 @@ JSValue JSDataGridColumnList::nameGetter(ExecState* exec, const Identifier& prop
}
} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.cpp
index e75b10b..02b4214 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSDataGridDataSource.h"
#include "Document.h"
@@ -47,34 +50,6 @@ JSDataGridDataSource::~JSDataGridDataSource()
{
}
-void JSDataGridDataSource::initialize(HTMLDataGridElement* datagrid)
-{
- if (!m_frame->script()->isEnabled())
- return;
-
- JSLock lock(false);
- RefPtr<JSDataGridDataSource> protect(this);
-
- ExecState* exec = m_frame->script()->globalObject()->globalExec();
-
- if (!jsDataSource().isObject())
- return;
-
- JSValue initializeFunction = jsDataSource().get(exec, Identifier(exec, "initialize"));
- CallData callData;
- CallType callType = initializeFunction.getCallData(callData);
- if (callType == CallTypeNone)
- return;
-
- MarkedArgumentBuffer args;
- args.append(toJS(exec, datagrid));
-
- JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.start();
- call(exec, initializeFunction, callType, callData, m_dataSource, args);
- JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.stop();
-
- if (exec->hadException())
- reportCurrentException(exec);
-}
-
} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.h
index 2537b00..077ef8f 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.h
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridDataSource.h
@@ -26,6 +26,8 @@
#ifndef JSDataGridDataSource_h
#define JSDataGridDataSource_h
+#if ENABLE(DATAGRID)
+
#include "DataGridDataSource.h"
#include <runtime/JSValue.h>
#include <runtime/Protect.h>
@@ -49,8 +51,6 @@ public:
virtual bool isJSDataGridDataSource() const { return true; }
JSC::JSValue jsDataSource() const { return m_dataSource.get(); }
- virtual void initialize(HTMLDataGridElement*);
-
private:
JSDataGridDataSource(JSC::JSValue, Frame*);
@@ -72,4 +72,5 @@ inline const JSDataGridDataSource* asJSDataGridDataSource(const DataGridDataSour
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
#endif // JSDataGridDataSource_h
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp
index 2058098..875e904 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp
@@ -56,6 +56,11 @@
#include "WorkerContext.h"
#endif
+#if ENABLE(SHARED_WORKERS)
+#include "JSSharedWorker.h"
+#include "SharedWorker.h"
+#endif
+
using namespace JSC;
namespace WebCore {
@@ -101,6 +106,11 @@ JSValue toJS(ExecState* exec, EventTarget* target)
return toJSDOMGlobalObject(workerContext);
#endif
+#if ENABLE(SHARED_WORKERS)
+ if (SharedWorker* sharedWorker = target->toSharedWorker())
+ return toJS(exec, sharedWorker);
+#endif
+
ASSERT_NOT_REACHED();
return jsNull();
}
@@ -132,6 +142,10 @@ EventTarget* toEventTarget(JSC::JSValue value)
CONVERT_TO_EVENT_TARGET(WorkerContext)
#endif
+#if ENABLE(SHARED_WORKERS)
+ CONVERT_TO_EVENT_TARGET(SharedWorker)
+#endif
+
return 0;
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
index 5aa0904..a30f5e4 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSHTMLDataGridElement.h"
#include "Document.h"
@@ -44,7 +47,14 @@ JSValue JSHTMLDataGridElement::dataSource(ExecState*) const
void JSHTMLDataGridElement::setDataSource(ExecState*, JSValue value)
{
+ if (value.isNull()) {
+ static_cast<HTMLDataGridElement*>(impl())->setDataSource(0);
+ return;
+ }
+
static_cast<HTMLDataGridElement*>(impl())->setDataSource(JSDataGridDataSource::create(value, impl()->document()->frame()));
}
} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
index 8bf543c..e5b428a 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
@@ -62,7 +62,7 @@ JSValue JSHTMLFormElement::submit(ExecState* exec, const ArgList&)
Frame* activeFrame = asJSDOMWindow(exec->dynamicGlobalObject())->impl()->frame();
if (!activeFrame)
return jsUndefined();
- static_cast<HTMLFormElement*>(impl())->submit(0, false, !activeFrame->script()->anyPageIsProcessingUserGesture(), false);
+ static_cast<HTMLFormElement*>(impl())->submit(0, false, !activeFrame->script()->anyPageIsProcessingUserGesture());
return jsUndefined();
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp
index f7c74ae..8913243 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp
@@ -77,7 +77,11 @@ void JSLazyEventListener::parseCode() const
if (m_parsed)
return;
- if (m_globalObject->scriptExecutionContext()->isDocument()) {
+ ScriptExecutionContext* executionContext = m_globalObject->scriptExecutionContext();
+ ASSERT(executionContext);
+ if (!executionContext)
+ return;
+ if (executionContext->isDocument()) {
JSDOMWindow* window = static_cast<JSDOMWindow*>(m_globalObject);
Frame* frame = window->impl()->frame();
if (!frame)
@@ -93,7 +97,7 @@ void JSLazyEventListener::parseCode() const
ExecState* exec = m_globalObject->globalExec();
MarkedArgumentBuffer args;
- UString sourceURL(m_globalObject->scriptExecutionContext()->url().string());
+ UString sourceURL(executionContext->url().string());
args.append(jsNontrivialString(exec, m_eventParameterName));
args.append(jsString(exec, m_code));
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp
index 93a8937..af1995b 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp
@@ -43,7 +43,9 @@ const ClassInfo JSNamedNodesCollection::s_info = { "Collection", 0, 0, 0 };
// for constructs like document.forms.<name>[1],
// so it shouldn't be a problem that it's storing all the nodes (with the same name). (David)
JSNamedNodesCollection::JSNamedNodesCollection(ExecState* exec, const Vector<RefPtr<Node> >& nodes)
- : DOMObject(getDOMStructure<JSNamedNodesCollection>(exec))
+ // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
+ // we should use the global object from the nodes.
+ : DOMObject(deprecatedGetDOMStructure<JSNamedNodesCollection>(exec))
, m_nodes(new Vector<RefPtr<Node> >(nodes))
{
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp
index f7c87e2..c430d5f 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp
@@ -49,7 +49,9 @@ ASSERT_CLASS_FITS_IN_CELL(JSRGBColor);
const ClassInfo JSRGBColor::s_info = { "RGBColor", 0, &JSRGBColorTable, 0 };
JSRGBColor::JSRGBColor(ExecState* exec, unsigned color)
- : DOMObject(getDOMStructure<JSRGBColor>(exec))
+ // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
+ // This will be fixed when JSRGBColor wraps css/RGBColor instead of being custom.
+ : DOMObject(deprecatedGetDOMStructure<JSRGBColor>(exec))
, m_color(color)
{
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp
new file mode 100644
index 0000000..ead17dd
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp
@@ -0,0 +1,83 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "JSSharedWorkerConstructor.h"
+
+#include "JSDOMWindowCustom.h"
+#include "JSSharedWorker.h"
+#include "SharedWorker.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+const ClassInfo JSSharedWorkerConstructor::s_info = { "SharedWorkerConstructor", 0, 0, 0 };
+
+JSSharedWorkerConstructor::JSSharedWorkerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
+ : DOMObject(JSSharedWorkerConstructor::createStructure(globalObject->objectPrototype()))
+{
+ putDirect(exec->propertyNames().prototype, JSSharedWorkerPrototype::self(exec, globalObject), None);
+ // Host functions have a length property describing the number of expected arguments.
+ putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum);
+}
+
+static JSObject* constructSharedWorker(ExecState* exec, JSObject*, const ArgList& args)
+{
+ if (args.size() < 2)
+ return throwError(exec, SyntaxError, "Not enough arguments");
+
+ UString scriptURL = args.at(0).toString(exec);
+ UString name = args.at(1).toString(exec);
+ if (exec->hadException())
+ return 0;
+
+ ScriptExecutionContext* context = static_cast<JSDOMGlobalObject*>(exec->dynamicGlobalObject())->scriptExecutionContext();
+ ExceptionCode ec = 0;
+ RefPtr<SharedWorker> worker = SharedWorker::create(scriptURL, name, context, ec);
+ setDOMException(exec, ec);
+
+ // FIXME: toJS() creates an object whose prototype is derived from lexicalGlobalScope, which is incorrect (Bug 27088)
+ return asObject(toJS(exec, worker.release()));
+}
+
+ConstructType JSSharedWorkerConstructor::getConstructData(ConstructData& constructData)
+{
+ constructData.native.function = constructSharedWorker;
+ return ConstructTypeHost;
+}
+
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h
new file mode 100644
index 0000000..be8b2b4
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h
@@ -0,0 +1,56 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSSharedWorkerConstructor_h
+#define JSSharedWorkerConstructor_h
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "JSDOMBinding.h"
+
+namespace WebCore {
+
+ class JSSharedWorkerConstructor : public DOMObject {
+ public:
+ JSSharedWorkerConstructor(JSC::ExecState*, JSDOMGlobalObject*);
+
+ static const JSC::ClassInfo s_info;
+
+ private:
+ virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
+
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ };
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
+
+#endif // JSSharedWorkerConstructor_h
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerCustom.cpp
new file mode 100644
index 0000000..8553298
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerCustom.cpp
@@ -0,0 +1,57 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "JSSharedWorker.h"
+
+#include "JSDOMGlobalObject.h"
+#include "SharedWorker.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+void JSSharedWorker::mark()
+{
+ Base::mark();
+
+ if (MessagePort* port = impl()->port()) {
+ DOMObject* wrapper = getCachedDOMObjectWrapper(*Heap::heap(this)->globalData(), port);
+ if (wrapper && !wrapper->marked())
+ wrapper->mark();
+ }
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp
index 14bbe19..06475f9 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp
@@ -30,7 +30,10 @@
#include "JSWorkerContext.h"
#include "JSDOMBinding.h"
+#include "JSDOMGlobalObject.h"
#include "JSEventListener.h"
+#include "JSMessageChannelConstructor.h"
+#include "JSMessagePort.h"
#include "JSWorkerLocation.h"
#include "JSWorkerNavigator.h"
#include "JSXMLHttpRequestConstructor.h"
@@ -138,6 +141,14 @@ JSValue JSWorkerContext::setInterval(ExecState* exec, const ArgList& args)
return jsNumber(exec, impl()->setInterval(action, delay));
}
+
+#if ENABLE(CHANNEL_MESSAGING)
+JSValue JSWorkerContext::messageChannel(ExecState* exec) const
+{
+ return getDOMConstructor<JSMessageChannelConstructor>(exec, this);
+}
+#endif
+
} // namespace WebCore
#endif // ENABLE(WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp
index f4d3033..9707519 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp
@@ -31,6 +31,7 @@
#include "JSDOMGlobalObject.h"
#include "JSEventListener.h"
+#include "JSMessagePort.h"
#include "Worker.h"
using namespace JSC;
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp
index 3e59df9..442205e 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp
@@ -81,7 +81,15 @@ ScriptController::~ScriptController()
ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
{
- if (!m_XSSAuditor->canEvaluate(sourceCode.source())) {
+ const SourceCode& jsSourceCode = sourceCode.jsSourceCode();
+ String sourceURL = jsSourceCode.provider()->url();
+
+ if (sourceURL.isNull() && !m_XSSAuditor->canEvaluateJavaScriptURL(sourceCode.source())) {
+ // This JavaScript URL is not safe to be evaluated.
+ return JSValue();
+ }
+
+ if (!sourceURL.isNull() && !m_XSSAuditor->canEvaluate(sourceCode.source())) {
// This script is not safe to be evaluated.
return JSValue();
}
@@ -89,8 +97,6 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
// evaluate code. Returns the JS return value or 0
// if there was none, an error occured or the type couldn't be converted.
- const SourceCode& jsSourceCode = sourceCode.jsSourceCode();
-
initScriptIfNeeded();
// inlineCode is true for <a href="javascript:doSomething()">
// and false for <script>doSomething()</script>. Check if it has the
@@ -98,7 +104,6 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
// See smart window.open policy for where this is used.
ExecState* exec = m_windowShell->window()->globalExec();
const String* savedSourceURL = m_sourceURL;
- String sourceURL = jsSourceCode.provider()->url();
m_sourceURL = &sourceURL;
JSLock lock(false);
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp
index 13e180a..ab392bc 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp
@@ -31,7 +31,6 @@
#include "config.h"
#include "ScriptObjectQuarantine.h"
-#include "Database.h"
#include "Document.h"
#include "Frame.h"
#include "JSDOMBinding.h"
@@ -43,6 +42,7 @@
#include <runtime/JSLock.h>
#if ENABLE(DATABASE)
+#include "Database.h"
#include "JSDatabase.h"
#endif
diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 4f9aa1a..dbcffff 100644
--- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -140,14 +140,6 @@ sub AvoidInclusionOfType
return 0;
}
-sub UsesManualToJSImplementation
-{
- my $type = shift;
-
- return 1 if $type eq "Node" or $type eq "Document" or $type eq "HTMLCollection" or $type eq "SVGPathSeg" or $type eq "StyleSheet" or $type eq "CSSRule" or $type eq "CSSValue" or $type eq "Event" or $type eq "ImageData" or $type eq "Element" or $type eq "Text" or $type eq "SVGElementInstance";
- return 0;
-}
-
sub IndexGetterReturnsStrings
{
my $type = shift;
@@ -629,7 +621,7 @@ sub GenerateHeader
push(@headerContent, "}\n\n");
}
- if (!$hasParent || $dataNode->extendedAttributes->{"GenerateToJS"}) {
+ if (!$hasParent || $dataNode->extendedAttributes->{"GenerateToJS"} || $dataNode->extendedAttributes->{"CustomToJS"}) {
if ($podType) {
push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<$podType>*, SVGElement* context);\n");
} elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
@@ -1505,7 +1497,7 @@ sub GenerateImplementation
}
}
- if ((!$hasParent or $dataNode->extendedAttributes->{"GenerateToJS"}) and !UsesManualToJSImplementation($implClassName)) {
+ if ((!$hasParent or $dataNode->extendedAttributes->{"GenerateToJS"}) and !$dataNode->extendedAttributes->{"CustomToJS"}) {
if ($podType) {
push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<$podType>* object, SVGElement* context)\n");
} elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
@@ -1910,7 +1902,7 @@ tableSizeLoop:
push(@implContent, "};\n\n");
my $perfectSizeMask = $perfectSize - 1;
my $compactSizeMask = $numEntries - 1;
- push(@implContent, "static const HashTable $name =\n");
+ push(@implContent, "static JSC_CONST_HASHTABLE HashTable $name =\n");
push(@implContent, "#if ENABLE(PERFECT_HASH_SIZE)\n");
push(@implContent, " { $perfectSizeMask, $nameEntries, 0 };\n");
push(@implContent, "#else\n");
diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 088668e..cdadf81 100644
--- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -234,7 +234,7 @@ sub AddClassForwardIfNeeded
sub GetImplementationFileName
{
my $iface = shift;
- return "HTMLCollection.h" if $iface eq "UndetectableHTMLCollection";
+ return "HTMLCollection.h" if $iface eq "HTMLAllCollection";
return "Event.h" if $iface eq "DOMTimeStamp";
return "NamedAttrMap.h" if $iface eq "NamedNodeMap";
return "NameNodeList.h" if $iface eq "NodeList";
@@ -346,12 +346,12 @@ sub HolderToNative
if (IsNodeSubType($dataNode)) {
push(@implContentDecls, <<END);
- $implClassName* imp = V8Proxy::convertDOMWrapperToNode<$implClassName>(holder);
+ $implClassName* imp = V8DOMWrapper::convertDOMWrapperToNode<$implClassName>(holder);
END
} else {
push(@implContentDecls, <<END);
- $implClassName* imp = V8Proxy::convertToNativeObject<$implClassName>(V8ClassIndex::$classIndex, holder);
+ $implClassName* imp = V8DOMWrapper::convertToNativeObject<$implClassName>(V8ClassIndex::$classIndex, holder);
END
}
@@ -381,7 +381,7 @@ sub GenerateDomainSafeFunctionGetter
INC_STATS(\"DOM.$implClassName.$funcName._get\");
static v8::Persistent<v8::FunctionTemplate> private_template =
v8::Persistent<v8::FunctionTemplate>::New($newTemplateString);
- v8::Handle<v8::Object> holder = V8Proxy::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
+ v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -421,7 +421,7 @@ END
if ($classIndex eq "DOMWINDOW") {
push(@implContentDecls, <<END);
- DOMWindow* window = V8Proxy::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
Frame* frame = window->frame();
if (frame) {
// Get the proxy corresponding to the DOMWindow if possible to
@@ -500,7 +500,7 @@ END
if ($isPodType) {
push(@implContentDecls, <<END);
- V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8Proxy::convertToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());
+ V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());
$implClassName imp_instance = *imp_wrapper;
END
if ($getterStringUsesImp) {
@@ -512,7 +512,7 @@ END
} elsif ($attrExt->{"v8OnProto"} || $attrExt->{"V8DisallowShadowing"}) {
# perform lookup first
push(@implContentDecls, <<END);
- v8::Handle<v8::Object> holder = V8Proxy::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
+ v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
if (holder.IsEmpty()) return v8::Undefined();
END
HolderToNative($dataNode, $implClassName, $classIndex);
@@ -562,7 +562,7 @@ END
$getterString = "imp_instance";
}
if ($nativeType eq "String") {
- $getterString = "ToString($getterString)";
+ $getterString = "toString($getterString)";
}
my $result;
@@ -624,9 +624,9 @@ END
if ($attrIsPodType) {
my $classIndex = uc($attrType);
- push(@implContentDecls, " return V8Proxy::convertToV8Object(V8ClassIndex::$classIndex, wrapper);\n");
+ push(@implContentDecls, " return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper);\n");
} else {
- push(@implContentDecls, " return ".NativeToJSValue($attribute->signature, $result).";\n");
+ push(@implContentDecls, " " . ReturnNativeToJSValue($attribute->signature, $result, " ").";\n");
}
push(@implContentDecls, " }\n\n"); # end of getter
@@ -674,14 +674,14 @@ sub GenerateNormalAttrSetter
if ($isPodType) {
$implClassName = GetNativeType($implClassName);
$implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
- push(@implContentDecls, " V8SVGPODTypeWrapper<$implClassName>* wrapper = V8Proxy::convertToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());\n");
+ push(@implContentDecls, " V8SVGPODTypeWrapper<$implClassName>* wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());\n");
push(@implContentDecls, " $implClassName imp_instance = *wrapper;\n");
push(@implContentDecls, " $implClassName* imp = &imp_instance;\n");
} elsif ($attrExt->{"v8OnProto"}) {
# perform lookup first
push(@implContentDecls, <<END);
- v8::Handle<v8::Object> holder = V8Proxy::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
+ v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
if (holder.IsEmpty()) return v8::Undefined();
END
HolderToNative($dataNode, $implClassName, $classIndex);
@@ -795,7 +795,7 @@ sub GenerateFunctionCallback
if (IsPodType($implClassName)) {
my $nativeClassName = GetNativeType($implClassName);
- push(@implContentDecls, " V8SVGPODTypeWrapper<$nativeClassName>* imp_wrapper = V8Proxy::convertToNativeObject<V8SVGPODTypeWrapper<$nativeClassName> >(V8ClassIndex::$classIndex, args.Holder());\n");
+ push(@implContentDecls, " V8SVGPODTypeWrapper<$nativeClassName>* imp_wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<$nativeClassName> >(V8ClassIndex::$classIndex, args.Holder());\n");
push(@implContentDecls, " $nativeClassName imp_instance = *imp_wrapper;\n");
push(@implContentDecls, " $nativeClassName* imp = &imp_instance;\n");
} else {
@@ -1053,7 +1053,7 @@ sub GenerateImplementation
push(@implFixedHeader,
"#include \"config.h\"\n" .
"#include \"V8Proxy.h\"\n" .
- "#include \"v8_binding.h\"\n\n" .
+ "#include \"V8Binding.h\"\n\n" .
"#undef LOG\n\n");
my $conditionalString;
@@ -1174,7 +1174,7 @@ sub GenerateImplementation
my $has_attributes = 0;
if (@$attributes) {
$has_attributes = 1;
- push(@implContent, "static const BatchedAttribute attrs[] = {\n");
+ push(@implContent, "static const BatchedAttribute ${interfaceName}_attrs[] = {\n");
GenerateBatchedAttributeData($interfaceName, $attributes);
push(@implContent, "};\n");
}
@@ -1183,7 +1183,7 @@ sub GenerateImplementation
my $has_constants = 0;
if (@{$dataNode->constants}) {
$has_constants = 1;
- push(@implContent, "static const BatchedConstant consts[] = {\n");
+ push(@implContent, "static const BatchedConstant ${interfaceName}_consts[] = {\n");
}
foreach my $constant (@{$dataNode->constants}) {
my $name = $constant->name;
@@ -1234,7 +1234,7 @@ END
# Set up our attributes if we have them
if ($has_attributes) {
push(@implContent, <<END);
- batchConfigureAttributes(instance, proto, attrs, sizeof(attrs)/sizeof(*attrs));
+ batchConfigureAttributes(instance, proto, ${interfaceName}_attrs, sizeof(${interfaceName}_attrs)/sizeof(*${interfaceName}_attrs));
END
}
@@ -1319,7 +1319,7 @@ END
if ($parent eq "EventTarget") { next; }
$implIncludes{"V8${parent}.h"} = 1;
my $parentClassIndex = uc($codeGenerator->StripModule($parent));
- push(@implContent, " desc->Inherit(V8Proxy::getTemplate(V8ClassIndex::${parentClassIndex}));\n");
+ push(@implContent, " desc->Inherit(V8DOMWrapper::getTemplate(V8ClassIndex::${parentClassIndex}));\n");
last;
}
@@ -1328,7 +1328,7 @@ END
if ($has_constants) {
push(@implContent, <<END);
- batchConfigureConstants(desc, proto, consts, sizeof(consts)/sizeof(*consts));
+ batchConfigureConstants(desc, proto, ${interfaceName}_consts, sizeof(${interfaceName}_consts)/sizeof(*${interfaceName}_consts));
END
}
@@ -1482,7 +1482,7 @@ sub GenerateFunctionCallString()
}
$result .= $indent . "if (success)\n";
$result .= $indent . " " .
- "return V8Proxy::convertNodeToV8Object($nodeToReturn);\n";
+ "return V8DOMWrapper::convertNodeToV8Object($nodeToReturn);\n";
$result .= $indent . "return v8::Null();\n";
return $result;
} elsif ($returnType eq "void") {
@@ -1547,9 +1547,9 @@ sub GenerateFunctionCallString()
if ($returnsPodType) {
my $classIndex = uc($returnType);
- $result .= $indent . "return V8Proxy::convertToV8Object(V8ClassIndex::$classIndex, wrapper);\n";
+ $result .= $indent . "return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper);\n";
} else {
- $result .= $indent . "return " . NativeToJSValue($function->signature, $return) . ";\n";
+ $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n";
}
return $result;
@@ -1560,7 +1560,7 @@ sub GenerateFunctionCallString()
sub GetClassName
{
my $type = shift;
- return "HTMLCollection" if $type eq "UndetectableHTMLCollection";
+ return "HTMLCollection" if $type eq "HTMLAllCollection";
return $type;
}
@@ -1799,19 +1799,19 @@ sub JSValueToNative
return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $type eq "double";
return "$value->NumberValue()" if $type eq "SVGNumber";
- return "ToInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short" or $type eq "long";
+ return "toInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short" or $type eq "long";
return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
return "static_cast<SVGPaint::SVGPaintType>($value->ToInt32()->Int32Value())" if $type eq "SVGPaintType";
- return "ToWebCoreString($value)" if $type eq "AtomicString" or $type eq "DOMUserData";
+ return "toWebCoreString($value)" if $type eq "AtomicString" or $type eq "DOMUserData";
if ($type eq "DOMString") {
- return "valueToStringWithNullCheck($value)" if $signature->extendedAttributes->{"ConvertNullToNullString"};
- return "valueToStringWithNullOrUndefinedCheck($value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"};
- return "ToWebCoreString($value)";
+ return "toWebCoreStringWithNullCheck($value)" if $signature->extendedAttributes->{"ConvertNullToNullString"};
+ return "toWebCoreStringWithNullOrUndefinedCheck($value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"};
+ return "toWebCoreString($value)";
}
if ($type eq "NodeFilter") {
- return "V8Proxy::wrapNativeNodeFilter($value)";
+ return "V8DOMWrapper::wrapNativeNodeFilter($value)";
}
if ($type eq "SVGRect") {
@@ -1828,7 +1828,7 @@ sub JSValueToNative
$implIncludes{"V8Node.h"} = 1;
# EventTarget is not in DOM hierarchy, but all Nodes are EventTarget.
- return "V8Node::HasInstance($value) ? V8Proxy::convertDOMWrapperToNode<Node>($value) : 0";
+ return "V8Node::HasInstance($value) ? V8DOMWrapper::convertDOMWrapperToNode<Node>($value) : 0";
}
AddIncludesForType($type);
@@ -1839,7 +1839,7 @@ sub JSValueToNative
# Perform type checks on the parameter, if it is expected Node type,
# return NULL.
- return "V8${type}::HasInstance($value) ? V8Proxy::convertDOMWrapperToNode<${type}>($value) : 0";
+ return "V8${type}::HasInstance($value) ? V8DOMWrapper::convertDOMWrapperToNode<${type}>($value) : 0";
} else {
# TODO: Temporary to avoid Window name conflict.
my $classIndex = uc($type);
@@ -1851,14 +1851,14 @@ sub JSValueToNative
my $nativeType = GetNativeType($type);
$implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
- return "V8SVGPODTypeUtil::ToSVGPODType<${nativeType}>(V8ClassIndex::${classIndex}, $value${maybeOkParam})"
+ return "V8SVGPODTypeUtil::toSVGPODType<${nativeType}>(V8ClassIndex::${classIndex}, $value${maybeOkParam})"
}
$implIncludes{"V8${type}.h"} = 1;
# Perform type checks on the parameter, if it is expected Node type,
# return NULL.
- return "V8${type}::HasInstance($value) ? V8Proxy::convertToNativeObject<${implClassName}>(V8ClassIndex::${classIndex}, $value) : 0";
+ return "V8${type}::HasInstance($value) ? V8DOMWrapper::convertToNativeObject<${implClassName}>(V8ClassIndex::${classIndex}, $value) : 0";
}
}
@@ -1976,33 +1976,34 @@ sub IsDOMNodeType
}
-sub NativeToJSValue
+sub ReturnNativeToJSValue
{
my $signature = shift;
my $value = shift;
+ my $indent = shift;
my $type = $codeGenerator->StripModule($signature->type);
my $className= "V8$type";
- return "v8::Date::New(static_cast<double>($value))" if $type eq "DOMTimeStamp";
- return "$value ? v8::True() : v8::False()" if $type eq "boolean";
- return "v8::Undefined()" if $type eq "void";
+ return "return v8::Date::New(static_cast<double>($value))" if $type eq "DOMTimeStamp";
+ return "return $value ? v8::True() : v8::False()" if $type eq "boolean";
+ return "return v8::Undefined()" if $type eq "void";
# For all the types where we use 'int' as the representation type,
# we use Integer::New which has a fast Smi conversion check.
- return "v8::Integer::New($value)" if GetNativeType($type) eq "int";
+ return "return v8::Integer::New($value)" if GetNativeType($type) eq "int";
- return "v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType";
+ return "return v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType";
if ($codeGenerator->IsStringType($type)) {
my $conv = $signature->extendedAttributes->{"ConvertNullStringTo"};
if (defined $conv) {
- return "v8StringOrNull($value)" if $conv eq "Null";
- return "v8StringOrUndefined($value)" if $conv eq "Undefined";
- return "v8StringOrFalse($value)" if $conv eq "False";
+ return "return v8StringOrNull($value)" if $conv eq "Null";
+ return "return v8StringOrUndefined($value)" if $conv eq "Undefined";
+ return "return v8StringOrFalse($value)" if $conv eq "False";
die "Unknown value for ConvertNullStringTo extended attribute";
}
- return "v8String($value)";
+ return "return v8String($value)";
}
# V8 specific.
@@ -2012,30 +2013,32 @@ sub NativeToJSValue
# special case for non-DOM node interfaces
if (IsDOMNodeType($type)) {
- return "V8Proxy::convertNodeToV8Object($value)";
+ return "return V8DOMWrapper::convertNodeToV8Object($value)";
}
if ($type eq "EventTarget" or $type eq "SVGElementInstance") {
- return "V8Proxy::convertEventTargetToV8Object($value)";
+ return "return V8DOMWrapper::convertEventTargetToV8Object($value)";
}
if ($type eq "Event") {
- return "V8Proxy::convertEventToV8Object($value)";
+ return "return V8DOMWrapper::convertEventToV8Object($value)";
}
if ($type eq "EventListener") {
- return "V8Proxy::convertEventListenerToV8Object($value)";
+ return "return V8DOMWrapper::convertEventListenerToV8Object($value)";
}
if ($type eq "RGBColor") {
- return "V8Proxy::convertToV8Object(V8ClassIndex::RGBCOLOR, new RGBColor($value))";
+ my $construct = "RefPtr<RGBColor> rgbcolor = RGBColor::create($value);\n";
+ my $convert = "V8DOMWrapper::convertToV8Object(V8ClassIndex::RGBCOLOR, WTF::getPtr(rgbcolor))";
+ return $construct . $indent . "return " . $convert;
}
if ($type eq "WorkerContext" or $type eq "WorkerLocation" or $type eq "WorkerNavigator") {
$implIncludes{"WorkerContextExecutionProxy.h"} = 1;
my $classIndex = uc($type);
- return "WorkerContextExecutionProxy::ToV8Object(V8ClassIndex::$classIndex, $value)";
+ return "return WorkerContextExecutionProxy::ToV8Object(V8ClassIndex::$classIndex, $value)";
}
else {
@@ -2047,7 +2050,7 @@ sub NativeToJSValue
$value = GenerateSVGStaticPodTypeWrapper($type, $value);
}
- return "V8Proxy::convertToV8Object(V8ClassIndex::$classIndex, $value)";
+ return "return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, $value)";
}
}
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp
index 60cf16f..3ea8bcf 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp
@@ -74,7 +74,7 @@ private:
const ClassInfo QtRuntimeObjectImp::s_info = { "QtRuntimeObject", &RuntimeObjectImp::s_info, 0, 0 };
QtRuntimeObjectImp::QtRuntimeObjectImp(ExecState* exec, PassRefPtr<Instance> instance)
- : RuntimeObjectImp(exec, WebCore::getDOMStructure<QtRuntimeObjectImp>(exec), instance)
+ : RuntimeObjectImp(exec, WebCore::deprecatedGetDOMStructure<QtRuntimeObjectImp>(exec), instance)
{
}
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 161e570..aabd677 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -907,7 +907,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
const ClassInfo QtRuntimeMethod::s_info = { "QtRuntimeMethod", 0, 0, 0 };
QtRuntimeMethod::QtRuntimeMethod(QtRuntimeMethodData* dd, ExecState* exec, const Identifier& ident, PassRefPtr<QtInstance> inst)
- : InternalFunction(&exec->globalData(), getDOMStructure<QtRuntimeMethod>(exec), ident)
+ : InternalFunction(&exec->globalData(), deprecatedGetDOMStructure<QtRuntimeMethod>(exec), ident)
, d_ptr(dd)
{
QW_D(QtRuntimeMethod);
diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime_array.cpp b/src/3rdparty/webkit/WebCore/bridge/runtime_array.cpp
index fead83a..2849822 100644
--- a/src/3rdparty/webkit/WebCore/bridge/runtime_array.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/runtime_array.cpp
@@ -36,9 +36,11 @@ namespace JSC {
const ClassInfo RuntimeArray::s_info = { "RuntimeArray", &JSArray::info, 0, 0 };
-RuntimeArray::RuntimeArray(ExecState* exec, Bindings::Array* a)
- : JSObject(getDOMStructure<RuntimeArray>(exec))
- , _array(a)
+RuntimeArray::RuntimeArray(ExecState* exec, Bindings::Array* array)
+ // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
+ // We need to pass in the right global object for "array".
+ : JSObject(deprecatedGetDOMStructure<RuntimeArray>(exec))
+ , _array(array)
{
}
diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime_method.cpp b/src/3rdparty/webkit/WebCore/bridge/runtime_method.cpp
index 30a3581..0af0af5 100644
--- a/src/3rdparty/webkit/WebCore/bridge/runtime_method.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/runtime_method.cpp
@@ -41,8 +41,11 @@ ASSERT_CLASS_FITS_IN_CELL(RuntimeMethod);
const ClassInfo RuntimeMethod::s_info = { "RuntimeMethod", 0, 0, 0 };
-RuntimeMethod::RuntimeMethod(ExecState* exec, const Identifier& ident, Bindings::MethodList& m)
- : InternalFunction(&exec->globalData(), getDOMStructure<RuntimeMethod>(exec), ident)
+RuntimeMethod::RuntimeMethod(ExecState* exec, const Identifier& ident, Bindings::MethodList& m)
+ // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
+ // exec-globalData() is also likely wrong.
+ // Callers will need to pass in the right global object corresponding to this native object "m".
+ : InternalFunction(&exec->globalData(), deprecatedGetDOMStructure<RuntimeMethod>(exec), ident)
, _methodList(new MethodList(m))
{
}
diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime_object.cpp b/src/3rdparty/webkit/WebCore/bridge/runtime_object.cpp
index 79afd3f..385f914 100644
--- a/src/3rdparty/webkit/WebCore/bridge/runtime_object.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/runtime_object.cpp
@@ -41,7 +41,9 @@ using namespace Bindings;
const ClassInfo RuntimeObjectImp::s_info = { "RuntimeObject", 0, 0, 0 };
RuntimeObjectImp::RuntimeObjectImp(ExecState* exec, PassRefPtr<Instance> i)
- : JSObject(getDOMStructure<RuntimeObjectImp>(exec))
+ // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
+ // We need to pass in the right global object for "i".
+ : JSObject(deprecatedGetDOMStructure<RuntimeObjectImp>(exec))
, instance(i)
{
instance->rootObject()->addRuntimeObject(this);
diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime_root.cpp b/src/3rdparty/webkit/WebCore/bridge/runtime_root.cpp
index 8e00fd5..0e9bf74 100644
--- a/src/3rdparty/webkit/WebCore/bridge/runtime_root.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/runtime_root.cpp
@@ -22,6 +22,7 @@
* (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 "runtime_root.h"
diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime_root.h b/src/3rdparty/webkit/WebCore/bridge/runtime_root.h
index 0d6fdbd..eacbb57 100644
--- a/src/3rdparty/webkit/WebCore/bridge/runtime_root.h
+++ b/src/3rdparty/webkit/WebCore/bridge/runtime_root.h
@@ -86,4 +86,4 @@ private:
} // namespace JSC
-#endif
+#endif // RUNTIME_ROOT_H_
diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
index 2e8f3bb..b49b646 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
@@ -347,7 +347,7 @@ bool CSSParser::parseMediaQuery(MediaList* queries, const String& string)
m_mediaQuery = 0;
// can't use { because tokenizer state switches from mediaquery to initial state when it sees { token.
// instead insert one " " (which is WHITESPACE in CSSGrammar.y)
- setupParser ("@-webkit-mediaquery ", string, "} ");
+ setupParser("@-webkit-mediaquery ", string, "} ");
cssyyparse(this);
bool ok = false;
@@ -408,7 +408,7 @@ bool CSSParser::validUnit(CSSParserValue* value, Units unitflags, bool strict)
return false;
bool b = false;
- switch(value->unit) {
+ switch (value->unit) {
case CSSPrimitiveValue::CSS_NUMBER:
b = (unitflags & FNumber);
if (!b && ((unitflags & (FLength | FAngle | FTime)) && (value->fValue == 0 || !strict))) {
@@ -1049,7 +1049,7 @@ bool CSSParser::parseValue(int propId, bool important)
} else {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
bool is_valid = true;
- while(is_valid && value) {
+ while (is_valid && value) {
switch (value->id) {
case CSSValueBlink:
break;
@@ -1317,7 +1317,8 @@ bool CSSParser::parseValue(int propId, bool important)
if (id == CSSValueNone)
valid_primitive = true;
else {
- if (validUnit(value, FNumber|FNonNeg, m_strict)) {
+ // Accepting valueless numbers is a quirk of the -webkit prefixed version of the property.
+ if (validUnit(value, FNumber|FLength|FNonNeg, m_strict)) {
RefPtr<CSSValue> val = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
if (val) {
addProperty(propId, val.release(), important);
@@ -2576,7 +2577,7 @@ bool CSSParser::parseAnimationProperty(int propId, RefPtr<CSSValue>& result)
#define DASHBOARD_REGION_NUM_PARAMETERS 6
#define DASHBOARD_REGION_SHORT_NUM_PARAMETERS 2
-static CSSParserValue* skipCommaInDashboardRegion (CSSParserValueList *args)
+static CSSParserValue* skipCommaInDashboardRegion(CSSParserValueList *args)
{
if (args->size() == (DASHBOARD_REGION_NUM_PARAMETERS*2-1) ||
args->size() == (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1)) {
@@ -2631,7 +2632,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
int numArgs = args->size();
if ((numArgs != DASHBOARD_REGION_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_NUM_PARAMETERS*2-1)) &&
- (numArgs != DASHBOARD_REGION_SHORT_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1))){
+ (numArgs != DASHBOARD_REGION_SHORT_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1))) {
valid = false;
break;
}
@@ -2647,7 +2648,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
// Second arg is a type.
arg = args->next();
- arg = skipCommaInDashboardRegion (args);
+ arg = skipCommaInDashboardRegion(args);
if (arg->unit != CSSPrimitiveValue::CSS_IDENT) {
valid = false;
break;
@@ -2677,7 +2678,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
int i;
for (i = 0; i < 4; i++) {
arg = args->next();
- arg = skipCommaInDashboardRegion (args);
+ arg = skipCommaInDashboardRegion(args);
valid = arg->id == CSSValueAuto || validUnit(arg, FLength, m_strict);
if (!valid)
@@ -3438,7 +3439,8 @@ struct ShadowParseContext {
bool allowLength() { return allowX || allowY || allowBlur; }
- void commitValue() {
+ void commitValue()
+ {
// Handle the ,, case gracefully by doing nothing.
if (x || y || blur || color) {
if (!values)
@@ -3454,7 +3456,8 @@ struct ShadowParseContext {
allowY = allowBlur = false;
}
- void commitLength(CSSParserValue* v) {
+ void commitLength(CSSParserValue* v)
+ {
RefPtr<CSSPrimitiveValue> val = CSSPrimitiveValue::create(v->fValue, (CSSPrimitiveValue::UnitTypes)v->unit);
if (allowX) {
@@ -3471,7 +3474,8 @@ struct ShadowParseContext {
}
}
- void commitColor(PassRefPtr<CSSPrimitiveValue> val) {
+ void commitColor(PassRefPtr<CSSPrimitiveValue> val)
+ {
color = val;
allowColor = false;
if (allowX)
@@ -3603,8 +3607,7 @@ bool CSSParser::parseReflect(int propId, bool important)
return true;
}
-struct BorderImageParseContext
-{
+struct BorderImageParseContext {
BorderImageParseContext()
: m_allowBreak(false)
, m_allowNumber(false)
@@ -3626,7 +3629,8 @@ struct BorderImageParseContext
bool allowRule() const { return m_allowRule; }
void commitImage(PassRefPtr<CSSValue> image) { m_image = image; m_allowNumber = true; }
- void commitNumber(CSSParserValue* v) {
+ void commitNumber(CSSParserValue* v)
+ {
PassRefPtr<CSSPrimitiveValue> val = CSSPrimitiveValue::create(v->fValue, (CSSPrimitiveValue::UnitTypes)v->unit);
if (!m_top)
m_top = val;
@@ -3643,7 +3647,8 @@ struct BorderImageParseContext
m_allowNumber = !m_left;
}
void commitSlash() { m_allowBreak = m_allowSlash = m_allowNumber = false; m_allowWidth = true; }
- void commitWidth(CSSParserValue* val) {
+ void commitWidth(CSSParserValue* val)
+ {
if (!m_borderTop)
m_borderTop = val;
else if (!m_borderRight)
@@ -3658,14 +3663,16 @@ struct BorderImageParseContext
m_allowBreak = m_allowRule = true;
m_allowWidth = !m_borderLeft;
}
- void commitRule(int keyword) {
+ void commitRule(int keyword)
+ {
if (!m_horizontalRule)
m_horizontalRule = keyword;
else if (!m_verticalRule)
m_verticalRule = keyword;
m_allowRule = !m_verticalRule;
}
- PassRefPtr<CSSValue> commitBorderImage(CSSParser* p, bool important) {
+ PassRefPtr<CSSValue> commitBorderImage(CSSParser* p, bool important)
+ {
// We need to clone and repeat values for any omissions.
if (!m_right) {
m_right = CSSPrimitiveValue::create(m_top->getDoubleValue(), (CSSPrimitiveValue::UnitTypes)m_top->primitiveType());
@@ -4291,7 +4298,7 @@ int CSSParser::lex(void* yylvalWithoutType)
int length;
UChar* t = text(&length);
- switch(token) {
+ switch (token) {
case WHITESPACE:
case SGML_CD:
case INCLUDES:
@@ -4374,7 +4381,7 @@ UChar* CSSParser::text(int *length)
{
UChar* start = yytext;
int l = yyleng;
- switch(yyTok) {
+ switch (yyTok) {
case STRING:
l--;
/* nobreak */
diff --git a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h
index fd1d203..1dd2a2d 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h
@@ -215,14 +215,20 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
case MediaSeekForwardButtonPart:
m_value.ident = CSSValueMediaSeekForwardButton;
break;
+ case MediaRewindButtonPart:
+ m_value.ident = CSSValueMediaRewindButton;
+ break;
+ case MediaReturnToRealtimeButtonPart:
+ m_value.ident = CSSValueMediaReturnToRealtimeButton;
+ break;
case MediaSliderPart:
m_value.ident = CSSValueMediaSlider;
break;
case MediaSliderThumbPart:
m_value.ident = CSSValueMediaSliderthumb;
break;
- case MediaTimelineContainerPart:
- m_value.ident = CSSValueMediaTimelineContainer;
+ case MediaControlsBackgroundPart:
+ m_value.ident = CSSValueMediaControlsBackground;
break;
case MediaCurrentTimePart:
m_value.ident = CSSValueMediaCurrentTimeDisplay;
diff --git a/src/3rdparty/webkit/WebCore/css/CSSRule.idl b/src/3rdparty/webkit/WebCore/css/CSSRule.idl
index f13f293..bc57e55 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSRule.idl
+++ b/src/3rdparty/webkit/WebCore/css/CSSRule.idl
@@ -22,6 +22,7 @@ module css {
// Introduced in DOM Level 2:
interface [
+ CustomToJS,
GenerateConstructor,
Polymorphic,
InterfaceUUID=548139b4-31ab-4978-b1d5-cfcfdfbaea0e,
diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp b/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp
index 17fbd64..5429c16 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp
@@ -107,6 +107,9 @@ void CSSSelector::extractPseudoType() const
DEFINE_STATIC_LOCAL(AtomicString, mediaControlsTimeline, ("-webkit-media-controls-timeline"));
DEFINE_STATIC_LOCAL(AtomicString, mediaControlsSeekBackButton, ("-webkit-media-controls-seek-back-button"));
DEFINE_STATIC_LOCAL(AtomicString, mediaControlsSeekForwardButton, ("-webkit-media-controls-seek-forward-button"));
+ DEFINE_STATIC_LOCAL(AtomicString, mediaControlsRewindButton, ("-webkit-media-controls-rewind-button"));
+ DEFINE_STATIC_LOCAL(AtomicString, mediaControlsReturnToRealtimeButton, ("-webkit-media-controls-return-to-realtime-button"));
+ DEFINE_STATIC_LOCAL(AtomicString, mediaControlsStatusDisplay, ("-webkit-media-controls-status-display"));
DEFINE_STATIC_LOCAL(AtomicString, mediaControlsFullscreenButton, ("-webkit-media-controls-fullscreen-button"));
DEFINE_STATIC_LOCAL(AtomicString, mediaControlsTimelineContainer, ("-webkit-media-controls-timeline-container"));
DEFINE_STATIC_LOCAL(AtomicString, mediaControlsCurrentTimeDisplay, ("-webkit-media-controls-current-time-display"));
@@ -236,6 +239,15 @@ void CSSSelector::extractPseudoType() const
} else if (m_value == mediaControlsSeekForwardButton) {
m_pseudoType = PseudoMediaControlsSeekForwardButton;
element = true;
+ } else if (m_value == mediaControlsRewindButton) {
+ m_pseudoType = PseudoMediaControlsRewindButton;
+ element = true;
+ } else if (m_value == mediaControlsReturnToRealtimeButton) {
+ m_pseudoType = PseudoMediaControlsReturnToRealtimeButton;
+ element = true;
+ } else if (m_value == mediaControlsStatusDisplay) {
+ m_pseudoType = PseudoMediaControlsStatusDisplay;
+ element = true;
} else if (m_value == mediaControlsFullscreenButton) {
m_pseudoType = PseudoMediaControlsFullscreenButton;
element = true;
diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelector.h b/src/3rdparty/webkit/WebCore/css/CSSSelector.h
index 728c34d..b24f057 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSSelector.h
+++ b/src/3rdparty/webkit/WebCore/css/CSSSelector.h
@@ -173,6 +173,9 @@ namespace WebCore {
PseudoMediaControlsTimeline,
PseudoMediaControlsSeekBackButton,
PseudoMediaControlsSeekForwardButton,
+ PseudoMediaControlsRewindButton,
+ PseudoMediaControlsReturnToRealtimeButton,
+ PseudoMediaControlsStatusDisplay,
PseudoMediaControlsFullscreenButton
};
diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp
index ce4c343..d782d38 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp
@@ -526,7 +526,7 @@ static void loadFullDefaultStyle()
}
// Strict-mode rules.
- String defaultRules = String(html4UserAgentStyleSheet, sizeof(html4UserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraDefaultStyleSheet();
+ String defaultRules = String(htmlUserAgentStyleSheet, sizeof(htmlUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraDefaultStyleSheet();
CSSStyleSheet* defaultSheet = parseUASheet(defaultRules);
defaultStyle->addRulesFromSheet(defaultSheet, screenEval());
defaultPrintStyle->addRulesFromSheet(defaultSheet, printEval());
@@ -1405,6 +1405,22 @@ PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForElement(PseudoId pseudo,
return m_style.release();
}
+#if ENABLE(DATAGRID)
+
+PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForDataGridColumn(DataGridColumn*, RenderStyle*)
+{
+ // FIXME: Implement
+ return 0;
+}
+
+PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForDataGridColumnHeader(DataGridColumn*, RenderStyle*)
+{
+ // FIXME: Implement
+ return 0;
+}
+
+#endif
+
static void addIntrinsicMargins(RenderStyle* style)
{
// Intrinsic margin value.
@@ -2481,6 +2497,15 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
case CSSSelector::PseudoMediaControlsSeekForwardButton:
dynamicPseudo = MEDIA_CONTROLS_SEEK_FORWARD_BUTTON;
return true;
+ case CSSSelector::PseudoMediaControlsRewindButton:
+ dynamicPseudo = MEDIA_CONTROLS_REWIND_BUTTON;
+ return true;
+ case CSSSelector::PseudoMediaControlsReturnToRealtimeButton:
+ dynamicPseudo = MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON;
+ return true;
+ case CSSSelector::PseudoMediaControlsStatusDisplay:
+ dynamicPseudo = MEDIA_CONTROLS_STATUS_DISPLAY;
+ return true;
case CSSSelector::PseudoMediaControlsFullscreenButton:
dynamicPseudo = MEDIA_CONTROLS_FULLSCREEN_BUTTON;
return true;
@@ -3413,7 +3438,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
}
int width = 0;
- if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal){
+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) {
width = 0;
} else {
if (!primitiveValue)
@@ -4931,7 +4956,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
int type = primitiveValue->primitiveType();
if (CSSPrimitiveValue::isUnitTypeLength(type))
l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed);
- else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length(primitiveValue->getDoubleValue(), Percent);
else
return;
@@ -4961,10 +4986,17 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_style->setPerspective(0);
return;
}
-
- if (primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
+
+ float perspectiveValue;
+ int type = primitiveValue->primitiveType();
+ if (CSSPrimitiveValue::isUnitTypeLength(type))
+ perspectiveValue = static_cast<float>(primitiveValue->computeLengthIntForLength(style(), zoomFactor));
+ else if (type == CSSPrimitiveValue::CSS_NUMBER) {
+ // For backward compatibility, treat valueless numbers as px.
+ perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLengthFloat(style(), zoomFactor);
+ } else
return;
- float perspectiveValue = static_cast<float>(primitiveValue->getDoubleValue());
+
if (perspectiveValue >= 0.0f)
m_style->setPerspective(perspectiveValue);
return;
@@ -4994,7 +5026,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
int type = primitiveValue->primitiveType();
if (CSSPrimitiveValue::isUnitTypeLength(type))
l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed);
- else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length(primitiveValue->getDoubleValue(), Percent);
else
return;
@@ -5718,7 +5750,7 @@ Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveV
} else if (ident == CSSValueWebkitActivelink)
col = m_element->document()->activeLinkColor();
else if (ident == CSSValueWebkitFocusRingColor)
- col = RenderTheme::defaultTheme()->focusRingColor();
+ col = RenderTheme::focusRingColor();
else if (ident == CSSValueCurrentcolor)
col = m_style->color();
else
diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h
index 8dd36d7..c9df876 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h
+++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h
@@ -50,6 +50,7 @@ class CSSStyleSheet;
class CSSValue;
class CSSVariableDependentValue;
class CSSVariablesRule;
+class DataGridColumn;
class Document;
class Element;
class Frame;
@@ -89,6 +90,12 @@ public:
PassRefPtr<RenderStyle> pseudoStyleForElement(PseudoId, Element*, RenderStyle* parentStyle = 0);
+#if ENABLE(DATAGRID)
+ // Datagrid style computation (uses unique pseudo elements and structures)
+ PassRefPtr<RenderStyle> pseudoStyleForDataGridColumn(DataGridColumn*, RenderStyle* parentStyle);
+ PassRefPtr<RenderStyle> pseudoStyleForDataGridColumnHeader(DataGridColumn*, RenderStyle* parentStyle);
+#endif
+
private:
RenderStyle* locateSharedStyle();
Node* locateCousinList(Element* parent, unsigned depth = 1);
diff --git a/src/3rdparty/webkit/WebCore/css/CSSValue.idl b/src/3rdparty/webkit/WebCore/css/CSSValue.idl
index 875d12e..ee82b0c 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSValue.idl
+++ b/src/3rdparty/webkit/WebCore/css/CSSValue.idl
@@ -21,6 +21,7 @@
module css {
interface [
+ CustomToJS,
GenerateConstructor,
Polymorphic,
InterfaceUUID=9fd62a7b-539d-4500-bd6c-ec075abbc404,
diff --git a/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in b/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in
index 698dffe..dac7567 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in
+++ b/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in
@@ -504,9 +504,11 @@ media-mute-button
media-play-button
media-seek-back-button
media-seek-forward-button
+media-rewind-button
+media-return-to-realtime-button
media-slider
media-sliderthumb
-media-timeline-container
+media-controls-background
media-current-time-display
media-time-remaining-display
menulist
diff --git a/src/3rdparty/webkit/WebCore/css/MediaList.cpp b/src/3rdparty/webkit/WebCore/css/MediaList.cpp
index 452345f..85cf590 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaList.cpp
+++ b/src/3rdparty/webkit/WebCore/css/MediaList.cpp
@@ -139,7 +139,7 @@ void MediaList::deleteMedium(const String& oldMedium, ExceptionCode& ec)
ec = NOT_FOUND_ERR;
if (oldQuery) {
- for(size_t i = 0; i < m_queries.size(); ++i) {
+ for (size_t i = 0; i < m_queries.size(); ++i) {
MediaQuery* a = m_queries[i];
if (*a == *oldQuery) {
m_queries.remove(i);
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQuery.h b/src/3rdparty/webkit/WebCore/css/MediaQuery.h
index 0aa0da1..ff22d9a 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQuery.h
+++ b/src/3rdparty/webkit/WebCore/css/MediaQuery.h
@@ -34,8 +34,7 @@
namespace WebCore {
class MediaQueryExp;
-class MediaQuery
-{
+class MediaQuery {
public:
enum Restrictor {
Only, Not, None
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp
index c641dfd..16af981 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp
+++ b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp
@@ -162,7 +162,7 @@ bool MediaQueryEvaluator::eval(const MediaList* mediaList, CSSStyleSelector* sty
static bool parseAspectRatio(CSSValue* value, int& h, int& v)
{
- if (value->isValueList()){
+ if (value->isValueList()) {
CSSValueList* valueList = static_cast<CSSValueList*>(value);
if (valueList->length() == 3) {
CSSValue* i0 = valueList->itemWithoutBoundsCheck(0);
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.h b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.h
index 5ae8fec..404504b 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.h
+++ b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.h
@@ -49,8 +49,7 @@ class MediaQueryExp;
* the device characteristics are not known. This can be used to prune the loading
* of stylesheets to only those which are probable to match.
*/
-class MediaQueryEvaluator
-{
+class MediaQueryEvaluator {
public:
/** Creates evaluator which evaluates only simple media queries
* Evaluator returns true for "all", and returns value of \mediaFeatureResult
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h b/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h
index 3036d04..5ff4af3 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h
+++ b/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h
@@ -36,8 +36,7 @@
namespace WebCore {
class CSSParserValueList;
-class MediaQueryExp
-{
+class MediaQueryExp {
public:
MediaQueryExp(const AtomicString& mediaFeature, CSSParserValueList* values);
~MediaQueryExp();
@@ -46,7 +45,8 @@ public:
CSSValue* value() const { return m_value.get(); }
- bool operator==(const MediaQueryExp& other) const {
+ bool operator==(const MediaQueryExp& other) const
+ {
return (other.m_mediaFeature == m_mediaFeature)
&& ((!other.m_value && !m_value)
|| (other.m_value && m_value && other.m_value->cssText() == m_value->cssText()));
diff --git a/src/3rdparty/webkit/WebCore/css/StyleSheet.idl b/src/3rdparty/webkit/WebCore/css/StyleSheet.idl
index 3a26f20..e4f4090 100644
--- a/src/3rdparty/webkit/WebCore/css/StyleSheet.idl
+++ b/src/3rdparty/webkit/WebCore/css/StyleSheet.idl
@@ -23,6 +23,7 @@ module stylesheets {
// Introduced in DOM Level 2:
interface [
CustomMarkFunction,
+ CustomToJS,
GenerateConstructor,
Polymorphic,
InterfaceUUID=2bd2db5f-aaab-4422-96a0-e05455313f35,
diff --git a/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.h b/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.h
index 67ba113..56bf76b 100644
--- a/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.h
+++ b/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.h
@@ -149,7 +149,7 @@ protected:
WebKitCSSMatrix();
WebKitCSSMatrix(const WebKitCSSMatrix&);
WebKitCSSMatrix(const TransformationMatrix&);
- WebKitCSSMatrix(const String&, ExceptionCode& );
+ WebKitCSSMatrix(const String&, ExceptionCode&);
TransformationMatrix m_matrix;
};
diff --git a/src/3rdparty/webkit/WebCore/css/html4.css b/src/3rdparty/webkit/WebCore/css/html.css
index dc1f608..8dad349 100644
--- a/src/3rdparty/webkit/WebCore/css/html4.css
+++ b/src/3rdparty/webkit/WebCore/css/html.css
@@ -610,8 +610,4 @@ iframe {
border: 2px inset
}
-img, input[type=image], video, iframe, object, embed, applet {
- overflow: hidden; /* Default to overflow:hidden so that border-radius clipping works on the foreground of these elements. */
-}
-
/* noscript is handled internally, as it depends on settings */
diff --git a/src/3rdparty/webkit/WebCore/css/mediaControls.css b/src/3rdparty/webkit/WebCore/css/mediaControls.css
index 668458c..f9694f8 100644
--- a/src/3rdparty/webkit/WebCore/css/mediaControls.css
+++ b/src/3rdparty/webkit/WebCore/css/mediaControls.css
@@ -32,6 +32,7 @@ audio {
audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
display: -webkit-box;
-webkit-box-orient: horizontal;
+ -webkit-box-align: center;
-webkit-user-select: none;
position: absolute;
bottom: 0;
@@ -61,7 +62,7 @@ audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-bu
}
audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
- -webkit-appearance: media-timeline-container;
+ -webkit-appearance: media-controls-background;
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-align: center;
@@ -102,6 +103,16 @@ audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls
}
audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button {
+ -webkit-appearance: media-fullscreen-button;
+ display: -webkit-box;
+ width: 16px;
+ height: 16px;
+}
+
+audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button {
display: none;
}
+audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button {
+ display: none;
+}
diff --git a/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css b/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css
index 900dcf2..a9b7a5f 100644
--- a/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css
+++ b/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css
@@ -31,6 +31,7 @@ audio {
audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
/* In mediaControls.css */
+ -webkit-appearance: media-controls-background;
height: 25px;
}
@@ -39,50 +40,83 @@ video:-webkit-full-page-media::-webkit-media-controls-panel {
}
audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
- -webkit-box-ordinal-group: 2; /* At the end of the controller bar */
- width: 30px;
- height: 25px;
+ -webkit-box-ordinal-group: 2; /* Before the fullscreen button */
+ width: 15px;
+ height: 14px;
+ margin-left: 2px;
+ margin-right: 8px;
}
audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
- width: 30px;
- height: 25px;
+ width: 16px;
+ height: 16px;
+ margin-left: 6px;
+ margin-right: 1px;
}
audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
- height: 25px;
+ -webkit-appearance: none;
+ -webkit-box-orient: horizontal;
+ -webkit-box-align: center;
+ -webkit-box-pack: center;
+ -webkit-box-flex: 1;
+ text-align: right;
+ height: auto;
}
audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display {
- -webkit-appearance: media-current-time-display;
-webkit-user-select: none;
- display: inline-block;
+ display: -webkit-box;
+ -webkit-box-flex: 0;
+ -webkit-box-pack: center;
+ -webkit-box-align: center;
cursor: default;
font: -webkit-small-control;
- font-size: .09em;
- text-align: center;
+ font-size: 9px;
overflow: hidden;
- line-height: 13px;
- height: 14px;
+ height: 13px;
width: 45px;
+ color: white;
+ text-shadow: black 0px 1px 1px;
+
+ letter-spacing: normal;
+ word-spacing: normal;
+ line-height: normal;
+ text-transform: none;
+ text-indent: 0;
+ text-decoration: none;
}
audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display {
- -webkit-appearance: media-time-remaining-display;
-webkit-user-select: none;
- display: inline-block;
+ display: -webkit-box;
+ -webkit-box-flex: 0;
+ -webkit-box-pack: center;
+ -webkit-box-align: center;
cursor: default;
font: -webkit-small-control;
- font-size: .09em;
- text-align: center;
+ font-size: 9px;
overflow: hidden;
- line-height: 13px;
- height: 14px;
+ height: 13px;
width: 45px;
+ color: white;
+ text-shadow: black 0px 1px 1px;
+
+ letter-spacing: normal;
+ word-spacing: normal;
+ line-height: normal;
+ text-transform: none;
+ text-indent: 0;
+ text-decoration: none;
}
audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline {
+ display: -webkit-box;
+ -webkit-box-flex: 1;
height: 13px;
+ padding: 0px;
+ margin: 0px;
+ margin-top: 4px;
}
audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button {
@@ -96,5 +130,50 @@ audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls
}
audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button {
+ width: 16px;
+ height: 16px;
+ margin-left: 7px;
+ margin-right: 7px;
+ -webkit-box-ordinal-group: 3; /* At the very end */
+}
+
+audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button {
+ display: -webkit-box;
+ -webkit-appearance: media-rewind-button;
+ width: 18px;
+ height: 18px;
+ margin-bottom: 1px;
+ margin-left: 6px;
+ margin-right: 2px;
+}
+
+audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button {
display: none;
+ -webkit-appearance: media-return-to-realtime-button;
+ width: 16px;
+ height: 11px;
+ margin-left: 6px;
+ margin-right: 2px;
+}
+
+audio::-webkit-media-controls-status-display, video::-webkit-media-controls-status-display {
+ -webkit-user-select: none;
+ cursor: default;
+ display: -webkit-box;
+ -webkit-box-flex: 1;
+ font: -webkit-small-control;
+ color: white;
+ font-size: 10px;
+ line-height: 13px;
+ overflow: hidden;
+ text-shadow: black 0px 1px 1px;
+ margin-left: 10px;
+ margin-right: 10px;
+
+ letter-spacing: normal;
+ word-spacing: normal;
+ line-height: normal;
+ text-transform: none;
+ text-indent: 0;
+ text-decoration: none;
}
diff --git a/src/3rdparty/webkit/WebCore/css/themeWin.css b/src/3rdparty/webkit/WebCore/css/themeWin.css
index 421fed0..a0170ac 100644
--- a/src/3rdparty/webkit/WebCore/css/themeWin.css
+++ b/src/3rdparty/webkit/WebCore/css/themeWin.css
@@ -29,7 +29,7 @@
*/
/* These styles override the default styling for HTML elements as defined in
- WebCore/css/html4.css. So far we have used this file exclusively for
+ WebCore/css/html.css. So far we have used this file exclusively for
making our form elements match Firefox's. */
input:not([type]),
diff --git a/src/3rdparty/webkit/WebCore/dom/Comment.h b/src/3rdparty/webkit/WebCore/dom/Comment.h
index f5f1810..d00ba62 100644
--- a/src/3rdparty/webkit/WebCore/dom/Comment.h
+++ b/src/3rdparty/webkit/WebCore/dom/Comment.h
@@ -29,8 +29,7 @@
namespace WebCore {
-class Comment : public CharacterData
-{
+class Comment : public CharacterData {
public:
Comment(Document*, const String &_text);
Comment(Document*);
diff --git a/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp b/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp
index 20cc7a3..2d79156 100644
--- a/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp
@@ -600,6 +600,8 @@ void ContainerNode::insertedIntoDocument()
void ContainerNode::removedFromDocument()
{
Node::removedFromDocument();
+ if (document()->cssTarget() == this)
+ document()->setCSSTarget(0);
setInDocument(false);
removedFromTree(false);
for (Node* child = m_firstChild; child; child = child->nextSibling())
diff --git a/src/3rdparty/webkit/WebCore/dom/Document.cpp b/src/3rdparty/webkit/WebCore/dom/Document.cpp
index 3d01c80..3ee00ad 100644
--- a/src/3rdparty/webkit/WebCore/dom/Document.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Document.cpp
@@ -1663,7 +1663,8 @@ void Document::implicitClose()
}
frame()->loader()->checkCallImplicitClose();
-
+ RenderObject* renderObject = renderer();
+
// We used to force a synchronous display and flush here. This really isn't
// necessary and can in fact be actively harmful if pages are loading at a rate of > 60fps
// (if your platform is syncing flushes and limiting them to 60fps).
@@ -1672,13 +1673,18 @@ void Document::implicitClose()
updateStyleIfNeeded();
// Always do a layout after loading if needed.
- if (view() && renderer() && (!renderer()->firstChild() || renderer()->needsLayout()))
+ if (view() && renderObject && (!renderObject->firstChild() || renderObject->needsLayout()))
view()->layout();
}
#if PLATFORM(MAC)
- if (f && renderer() && this == topDocument() && AXObjectCache::accessibilityEnabled())
- axObjectCache()->postNotification(renderer(), "AXLoadComplete", true);
+ if (f && renderObject && this == topDocument() && AXObjectCache::accessibilityEnabled())
+ // The AX cache may have been cleared at this point, but we need to make sure it contains an
+ // AX object to send the notification to. getOrCreate will make sure that an valid AX object
+ // exists in the cache (we ignore the return value because we don't need it here). This is
+ // only safe to call when a layout is not in progress, so it can not be used in postNotification.
+ axObjectCache()->getOrCreate(renderObject);
+ axObjectCache()->postNotification(renderObject, "AXLoadComplete", true);
#endif
#if ENABLE(SVG)
@@ -2598,7 +2604,7 @@ bool Document::setFocusedNode(PassRefPtr<Node> newFocusedNode)
else
view()->setFocus();
}
- }
+ }
#if PLATFORM(MAC) && !PLATFORM(CHROMIUM)
if (!focusChangeBlocked && m_focusedNode && AXObjectCache::accessibilityEnabled())
@@ -4354,19 +4360,19 @@ void Document::parseDNSPrefetchControlHeader(const String& dnsPrefetchControl)
void Document::reportException(const String& errorMessage, int lineNumber, const String& sourceURL)
{
if (DOMWindow* window = domWindow())
- window->console()->addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, lineNumber, sourceURL);
+ window->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, errorMessage, lineNumber, sourceURL);
}
-void Document::addMessage(MessageDestination destination, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
+void Document::addMessage(MessageDestination destination, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
{
switch (destination) {
case InspectorControllerDestination:
if (page())
- page()->inspectorController()->addMessageToConsole(source, level, message, lineNumber, sourceURL);
+ page()->inspectorController()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL);
return;
case ConsoleDestination:
if (DOMWindow* window = domWindow())
- window->console()->addMessage(source, level, message, lineNumber, sourceURL);
+ window->console()->addMessage(source, type, level, message, lineNumber, sourceURL);
return;
}
ASSERT_NOT_REACHED();
diff --git a/src/3rdparty/webkit/WebCore/dom/Document.h b/src/3rdparty/webkit/WebCore/dom/Document.h
index 92865f4..82f0455 100644
--- a/src/3rdparty/webkit/WebCore/dom/Document.h
+++ b/src/3rdparty/webkit/WebCore/dom/Document.h
@@ -224,7 +224,7 @@ public:
}
virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
- PassRefPtr<DocumentFragment> createDocumentFragment ();
+ PassRefPtr<DocumentFragment> createDocumentFragment();
PassRefPtr<Text> createTextNode(const String& data);
PassRefPtr<Comment> createComment(const String& data);
PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionCode&);
@@ -403,7 +403,7 @@ public:
PassRefPtr<CSSStyleDeclaration> createCSSStyleDeclaration();
PassRefPtr<EditingText> createEditingTextNode(const String&);
- virtual void recalcStyle( StyleChange = NoChange );
+ virtual void recalcStyle(StyleChange = NoChange);
virtual void updateStyleIfNeeded();
void updateLayout();
void updateLayoutIgnorePendingStylesheets();
@@ -787,7 +787,7 @@ public:
void parseDNSPrefetchControlHeader(const String&);
virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL);
- virtual void addMessage(MessageDestination, MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
+ virtual void addMessage(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
virtual void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString);
virtual void scriptImported(unsigned long, const String&);
virtual void postTask(PassRefPtr<Task>); // Executes the task on context's thread asynchronously.
@@ -990,7 +990,7 @@ public:
void setDashboardRegionsDirty(bool f) { m_dashboardRegionsDirty = f; }
bool dashboardRegionsDirty() const { return m_dashboardRegionsDirty; }
bool hasDashboardRegions () const { return m_hasDashboardRegions; }
- void setHasDashboardRegions (bool f) { m_hasDashboardRegions = f; }
+ void setHasDashboardRegions(bool f) { m_hasDashboardRegions = f; }
const Vector<DashboardRegionValue>& dashboardRegions() const;
void setDashboardRegions(const Vector<DashboardRegionValue>&);
#endif
diff --git a/src/3rdparty/webkit/WebCore/dom/Document.idl b/src/3rdparty/webkit/WebCore/dom/Document.idl
index ac6dd0e..ad41057 100644
--- a/src/3rdparty/webkit/WebCore/dom/Document.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Document.idl
@@ -21,8 +21,8 @@
module core {
interface [
+ CustomToJS,
GenerateConstructor,
- GenerateToJS,
GenerateNativeConverter,
CustomMarkFunction,
InlineGetOwnPropertySlot,
diff --git a/src/3rdparty/webkit/WebCore/dom/DocumentFragment.cpp b/src/3rdparty/webkit/WebCore/dom/DocumentFragment.cpp
index 40be64d..7a6174f 100644
--- a/src/3rdparty/webkit/WebCore/dom/DocumentFragment.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/DocumentFragment.cpp
@@ -34,7 +34,7 @@ DocumentFragment::DocumentFragment(Document *doc) : ContainerNode(doc)
String DocumentFragment::nodeName() const
{
- return "#document-fragment";
+ return "#document-fragment";
}
Node::NodeType DocumentFragment::nodeType() const
diff --git a/src/3rdparty/webkit/WebCore/dom/DocumentFragment.h b/src/3rdparty/webkit/WebCore/dom/DocumentFragment.h
index 33a62be..46d8ecd 100644
--- a/src/3rdparty/webkit/WebCore/dom/DocumentFragment.h
+++ b/src/3rdparty/webkit/WebCore/dom/DocumentFragment.h
@@ -30,8 +30,7 @@
namespace WebCore {
-class DocumentFragment : public ContainerNode
-{
+class DocumentFragment : public ContainerNode {
public:
DocumentFragment(Document*);
diff --git a/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.cpp b/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.cpp
index eeb9833..892a5e7 100644
--- a/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.cpp
@@ -30,7 +30,7 @@ namespace WebCore {
DynamicNodeList::DynamicNodeList(PassRefPtr<Node> rootNode)
: m_rootNode(rootNode)
- , m_caches(new Caches)
+ , m_caches(Caches::create())
, m_ownsCaches(true)
{
m_rootNode->registerDynamicNodeList(this);
@@ -42,16 +42,11 @@ DynamicNodeList::DynamicNodeList(PassRefPtr<Node> rootNode, DynamicNodeList::Cac
, m_ownsCaches(false)
{
m_rootNode->registerDynamicNodeList(this);
- ++caches->refCount;
}
DynamicNodeList::~DynamicNodeList()
{
m_rootNode->unregisterDynamicNodeList(this);
- if (m_ownsCaches)
- delete m_caches;
- else
- --m_caches->refCount;
}
unsigned DynamicNodeList::length() const
@@ -158,10 +153,14 @@ DynamicNodeList::Caches::Caches()
: lastItem(0)
, isLengthCacheValid(false)
, isItemCacheValid(false)
- , refCount(0)
{
}
+PassRefPtr<DynamicNodeList::Caches> DynamicNodeList::Caches::create()
+{
+ return adoptRef(new Caches());
+}
+
void DynamicNodeList::Caches::reset()
{
lastItem = 0;
diff --git a/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h b/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
index ee9832d..f97c38f 100644
--- a/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
+++ b/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
@@ -37,8 +37,8 @@ namespace WebCore {
class DynamicNodeList : public NodeList {
public:
- struct Caches {
- Caches();
+ struct Caches : RefCounted<Caches> {
+ static PassRefPtr<Caches> create();
void reset();
unsigned cachedLength;
@@ -46,7 +46,8 @@ namespace WebCore {
unsigned lastItemOffset;
bool isLengthCacheValid : 1;
bool isItemCacheValid : 1;
- unsigned refCount;
+ protected:
+ Caches();
};
virtual ~DynamicNodeList();
@@ -68,7 +69,7 @@ namespace WebCore {
virtual bool nodeMatches(Element*) const = 0;
RefPtr<Node> m_rootNode;
- mutable Caches* m_caches;
+ mutable RefPtr<Caches> m_caches;
bool m_ownsCaches;
private:
diff --git a/src/3rdparty/webkit/WebCore/dom/EditingText.h b/src/3rdparty/webkit/WebCore/dom/EditingText.h
index 3dcd8c1..e114786 100644
--- a/src/3rdparty/webkit/WebCore/dom/EditingText.h
+++ b/src/3rdparty/webkit/WebCore/dom/EditingText.h
@@ -29,8 +29,7 @@
namespace WebCore {
-class EditingText : public Text
-{
+class EditingText : public Text {
public:
EditingText(Document *impl, const String &text);
EditingText(Document *impl);
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp
index d858888..0e6c245 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp
@@ -761,6 +761,34 @@ void Element::detach()
ContainerNode::detach();
}
+bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle)
+{
+ ASSERT(currentStyle = renderStyle());
+
+ if (!renderer() || !currentStyle)
+ return false;
+
+ RenderStyle::PseudoStyleCache pseudoStyleCache;
+ currentStyle->getPseudoStyleCache(pseudoStyleCache);
+ size_t cacheSize = pseudoStyleCache.size();
+ for (size_t i = 0; i < cacheSize; ++i) {
+ RefPtr<RenderStyle> newPseudoStyle;
+ PseudoId pseudoId = pseudoStyleCache[i]->styleType();
+ if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED)
+ newPseudoStyle = renderer()->uncachedFirstLineStyle(newStyle);
+ else
+ newPseudoStyle = renderer()->getUncachedPseudoStyle(pseudoId, newStyle, newStyle);
+
+ if (*newPseudoStyle != *pseudoStyleCache[i]) {
+ if (pseudoId < FIRST_INTERNAL_PSEUDOID)
+ newStyle->setHasPseudoStyle(pseudoId);
+ newStyle->addCachedPseudoStyle(newPseudoStyle);
+ return true;
+ }
+ }
+ return false;
+}
+
void Element::recalcStyle(StyleChange change)
{
RenderStyle* currentStyle = renderStyle();
@@ -811,7 +839,7 @@ void Element::recalcStyle(StyleChange change)
newStyle->setChildrenAffectedByDirectAdjacentRules();
}
- if (ch != NoChange) {
+ if (ch != NoChange || pseudoStyleCacheIsInvalid(currentStyle, newStyle.get())) {
setRenderStyle(newStyle);
} else if (needsStyleRecalc() && (styleChangeType() != AnimationStyleChange) && (document()->usesSiblingRules() || document()->usesDescendantRules())) {
// Although no change occurred, we use the new style so that the cousin style sharing code won't get
@@ -981,7 +1009,7 @@ void Element::dispatchAttrAdditionEvent(Attribute*)
return;
ExceptionCode ec = 0;
dispatchEvent(new MutationEvent(DOMAttrModifiedEvent, true, false, attr, attr->value(),
- attr->value(),document()->attrName(attr->id()), MutationEvent::ADDITION), ec);
+ attr->value(), document()->attrName(attr->id()), MutationEvent::ADDITION), ec);
#endif
}
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.h b/src/3rdparty/webkit/WebCore/dom/Element.h
index dfa2c0e..b0bbeb3 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.h
+++ b/src/3rdparty/webkit/WebCore/dom/Element.h
@@ -170,6 +170,8 @@ public:
virtual void formatForDebugger(char* buffer, unsigned length) const;
#endif
+ bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle);
+
String innerText() const;
String outerText() const;
diff --git a/src/3rdparty/webkit/WebCore/dom/Event.idl b/src/3rdparty/webkit/WebCore/dom/Event.idl
index 5ac9e0c..75b6b5f 100644
--- a/src/3rdparty/webkit/WebCore/dom/Event.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Event.idl
@@ -22,6 +22,7 @@ module events {
// Introduced in DOM Level 2:
interface [
+ CustomToJS,
GenerateConstructor,
NoStaticTables,
Polymorphic,
diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp b/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp
index 06cea07..437f5ba 100644
--- a/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp
@@ -95,6 +95,13 @@ WorkerContext* EventTarget::toWorkerContext()
}
#endif
+#if ENABLE(SHARED_WORKERS)
+SharedWorker* EventTarget::toSharedWorker()
+{
+ return 0;
+}
+#endif
+
#ifndef NDEBUG
void forbidEventDispatch()
{
diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.h b/src/3rdparty/webkit/WebCore/dom/EventTarget.h
index 662902e..73a32e3 100644
--- a/src/3rdparty/webkit/WebCore/dom/EventTarget.h
+++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.h
@@ -36,6 +36,7 @@
namespace WebCore {
+ class AbstractWorker;
class AtomicString;
class DOMApplicationCache;
class DOMWindow;
@@ -45,6 +46,7 @@ namespace WebCore {
class Node;
class SVGElementInstance;
class ScriptExecutionContext;
+ class SharedWorker;
class Worker;
class WorkerContext;
class XMLHttpRequest;
@@ -70,6 +72,10 @@ namespace WebCore {
virtual WorkerContext* toWorkerContext();
#endif
+#if ENABLE(SHARED_WORKERS)
+ virtual SharedWorker* toSharedWorker();
+#endif
+
virtual ScriptExecutionContext* scriptExecutionContext() const = 0;
virtual void addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) = 0;
diff --git a/src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl b/src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl
new file mode 100644
index 0000000..dee365f
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008, 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ // This interface is used for undetectable HTMLCollections.
+ // An undetectable HTMLCollection behaves like an HTMLCollection
+ // when used, but the 'typeof' operator returns undefined and
+ // ToBoolean returns false.
+ interface HTMLAllCollection : HTMLCollection {
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/dom/MessageChannel.cpp b/src/3rdparty/webkit/WebCore/dom/MessageChannel.cpp
index ac0a4ab..73c016f 100644
--- a/src/3rdparty/webkit/WebCore/dom/MessageChannel.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/MessageChannel.cpp
@@ -28,7 +28,7 @@
#include "MessageChannel.h"
#include "MessagePort.h"
-#include "PlatformMessagePortChannel.h"
+#include "MessagePortChannel.h"
namespace WebCore {
@@ -36,7 +36,7 @@ MessageChannel::MessageChannel(ScriptExecutionContext* context)
: m_port1(MessagePort::create(*context))
, m_port2(MessagePort::create(*context))
{
- PlatformMessagePortChannel::createChannel(m_port1.get(), m_port2.get());
+ MessagePortChannel::createChannel(m_port1.get(), m_port2.get());
}
MessageChannel::~MessageChannel()
diff --git a/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.cpp b/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.cpp
index 768d4f4..05134c0 100644
--- a/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.cpp
@@ -30,14 +30,8 @@
#include "config.h"
#include "MessagePortChannel.h"
-#include "PlatformMessagePortChannel.h"
-
namespace WebCore {
-PassOwnPtr<MessagePortChannel> MessagePortChannel::create(PassRefPtr<PlatformMessagePortChannel> channel)
-{
- return new MessagePortChannel(channel);
-}
PassOwnPtr<MessagePortChannel::EventData> MessagePortChannel::EventData::create(const String& message, PassOwnPtr<MessagePortChannel> channel)
{
@@ -50,15 +44,4 @@ MessagePortChannel::EventData::EventData(const String& message, PassOwnPtr<Messa
{
}
-MessagePortChannel::MessagePortChannel(PassRefPtr<PlatformMessagePortChannel> channel)
- : m_channel(channel)
-{
-}
-
-MessagePortChannel::~MessagePortChannel()
-{
- // Make sure we close our platform channel when the base is freed, to keep the channel objects from leaking.
- m_channel->close();
-}
-
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h b/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h
index 15b3d16..3841020 100644
--- a/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h
+++ b/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h
@@ -50,6 +50,8 @@ namespace WebCore {
// It acts as a wrapper around the platform-dependent PlatformMessagePortChannel implementation which ensures that the platform-dependent close() method is invoked before destruction.
class MessagePortChannel : Noncopyable {
public:
+ static void createChannel(PassRefPtr<MessagePort>, PassRefPtr<MessagePort>);
+
// Creates a new wrapper for the passed channel.
static PassOwnPtr<MessagePortChannel> create(PassRefPtr<PlatformMessagePortChannel>);
diff --git a/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp b/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp
index f3e9bb2..fe631c8 100644
--- a/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp
@@ -164,7 +164,7 @@ PassRefPtr<Node> NamedNodeMap::removeNamedItem(const QualifiedName& name, Except
return r.release();
}
-PassRefPtr<Node> NamedNodeMap::item (unsigned index) const
+PassRefPtr<Node> NamedNodeMap::item(unsigned index) const
{
if (index >= length())
return 0;
diff --git a/src/3rdparty/webkit/WebCore/dom/Node.cpp b/src/3rdparty/webkit/WebCore/dom/Node.cpp
index 3ddf4c0..192462d 100644
--- a/src/3rdparty/webkit/WebCore/dom/Node.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Node.cpp
@@ -495,7 +495,7 @@ void Node::setTabIndexExplicitly(short i)
String Node::nodeValue() const
{
- return String();
+ return String();
}
void Node::setNodeValue(const String& /*nodeValue*/, ExceptionCode& ec)
@@ -517,7 +517,7 @@ PassRefPtr<NodeList> Node::childNodes()
document()->addNodeListCache();
}
- return ChildNodeList::create(this, &data->nodeLists()->m_childNodeListCaches);
+ return ChildNodeList::create(this, data->nodeLists()->m_childNodeListCaches.get());
}
Node *Node::lastDescendant() const
@@ -777,7 +777,7 @@ unsigned Node::nodeIndex() const
{
Node *_tempNode = previousSibling();
unsigned count=0;
- for( count=0; _tempNode; count++ )
+ for ( count=0; _tempNode; count++ )
_tempNode = _tempNode->previousSibling();
return count;
}
@@ -1500,9 +1500,9 @@ PassRefPtr<NodeList> Node::getElementsByTagNameNS(const AtomicString& namespaceU
pair<NodeListsNodeData::TagCacheMap::iterator, bool> result = data->nodeLists()->m_tagNodeListCaches.add(QualifiedName(nullAtom, localNameAtom, namespaceURI), 0);
if (result.second)
- result.first->second = new DynamicNodeList::Caches;
+ result.first->second = DynamicNodeList::Caches::create();
- return TagNodeList::create(this, namespaceURI.isEmpty() ? nullAtom : namespaceURI, localNameAtom, result.first->second);
+ return TagNodeList::create(this, namespaceURI.isEmpty() ? nullAtom : namespaceURI, localNameAtom, result.first->second.get());
}
PassRefPtr<NodeList> Node::getElementsByName(const String& elementName)
@@ -1515,9 +1515,9 @@ PassRefPtr<NodeList> Node::getElementsByName(const String& elementName)
pair<NodeListsNodeData::CacheMap::iterator, bool> result = data->nodeLists()->m_nameNodeListCaches.add(elementName, 0);
if (result.second)
- result.first->second = new DynamicNodeList::Caches;
+ result.first->second = DynamicNodeList::Caches::create();
- return NameNodeList::create(this, elementName, result.first->second);
+ return NameNodeList::create(this, elementName, result.first->second.get());
}
PassRefPtr<NodeList> Node::getElementsByClassName(const String& classNames)
@@ -1530,9 +1530,9 @@ PassRefPtr<NodeList> Node::getElementsByClassName(const String& classNames)
pair<NodeListsNodeData::CacheMap::iterator, bool> result = data->nodeLists()->m_classNodeListCaches.add(classNames, 0);
if (result.second)
- result.first->second = new DynamicNodeList::Caches;
+ result.first->second = DynamicNodeList::Caches::create();
- return ClassNodeList::create(this, classNames, result.first->second);
+ return ClassNodeList::create(this, classNames, result.first->second.get());
}
template <typename Functor>
@@ -2185,7 +2185,7 @@ void Node::formatForDebugger(char* buffer, unsigned length) const
void NodeListsNodeData::invalidateCaches()
{
- m_childNodeListCaches.reset();
+ m_childNodeListCaches->reset();
TagCacheMap::const_iterator tagCachesEnd = m_tagNodeListCaches.end();
for (TagCacheMap::const_iterator it = m_tagNodeListCaches.begin(); it != tagCachesEnd; ++it)
it->second->reset();
@@ -2208,24 +2208,24 @@ bool NodeListsNodeData::isEmpty() const
if (!m_listsWithCaches.isEmpty())
return false;
- if (m_childNodeListCaches.refCount)
+ if (m_childNodeListCaches->refCount())
return false;
TagCacheMap::const_iterator tagCachesEnd = m_tagNodeListCaches.end();
for (TagCacheMap::const_iterator it = m_tagNodeListCaches.begin(); it != tagCachesEnd; ++it) {
- if (it->second->refCount)
+ if (it->second->refCount())
return false;
}
CacheMap::const_iterator classCachesEnd = m_classNodeListCaches.end();
for (CacheMap::const_iterator it = m_classNodeListCaches.begin(); it != classCachesEnd; ++it) {
- if (it->second->refCount)
+ if (it->second->refCount())
return false;
}
CacheMap::const_iterator nameCachesEnd = m_nameNodeListCaches.end();
for (CacheMap::const_iterator it = m_nameNodeListCaches.begin(); it != nameCachesEnd; ++it) {
- if (it->second->refCount)
+ if (it->second->refCount())
return false;
}
diff --git a/src/3rdparty/webkit/WebCore/dom/Node.idl b/src/3rdparty/webkit/WebCore/dom/Node.idl
index bcfb226..1e31aea 100644
--- a/src/3rdparty/webkit/WebCore/dom/Node.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Node.idl
@@ -23,9 +23,9 @@ module core {
interface [
CustomMarkFunction,
CustomPushEventHandlerScope,
+ CustomToJS,
GenerateConstructor,
GenerateNativeConverter,
- GenerateToJS,
InlineGetOwnPropertySlot,
Polymorphic,
InterfaceUUID=84BA0D7A-7E3E-4a7b-B6FB-7653E8FB54ED,
diff --git a/src/3rdparty/webkit/WebCore/dom/NodeRareData.h b/src/3rdparty/webkit/WebCore/dom/NodeRareData.h
index ae0e516..7740344 100644
--- a/src/3rdparty/webkit/WebCore/dom/NodeRareData.h
+++ b/src/3rdparty/webkit/WebCore/dom/NodeRareData.h
@@ -37,24 +37,18 @@ struct NodeListsNodeData {
typedef HashSet<DynamicNodeList*> NodeListSet;
NodeListSet m_listsWithCaches;
- DynamicNodeList::Caches m_childNodeListCaches;
+ RefPtr<DynamicNodeList::Caches> m_childNodeListCaches;
- typedef HashMap<String, DynamicNodeList::Caches*> CacheMap;
+ typedef HashMap<String, RefPtr<DynamicNodeList::Caches> > CacheMap;
CacheMap m_classNodeListCaches;
CacheMap m_nameNodeListCaches;
- typedef HashMap<QualifiedName, DynamicNodeList::Caches*> TagCacheMap;
+ typedef HashMap<QualifiedName, RefPtr<DynamicNodeList::Caches> > TagCacheMap;
TagCacheMap m_tagNodeListCaches;
- static PassOwnPtr<NodeListsNodeData> create() {
- return new NodeListsNodeData;
- }
-
- ~NodeListsNodeData()
+ static PassOwnPtr<NodeListsNodeData> create()
{
- deleteAllValues(m_classNodeListCaches);
- deleteAllValues(m_nameNodeListCaches);
- deleteAllValues(m_tagNodeListCaches);
+ return new NodeListsNodeData;
}
void invalidateCaches();
@@ -62,7 +56,10 @@ struct NodeListsNodeData {
bool isEmpty() const;
private:
- NodeListsNodeData() { }
+ NodeListsNodeData()
+ : m_childNodeListCaches(DynamicNodeList::Caches::create())
+ {
+ }
};
class NodeRareData {
diff --git a/src/3rdparty/webkit/WebCore/dom/Notation.h b/src/3rdparty/webkit/WebCore/dom/Notation.h
index 6f5bf3f..2bd5363 100644
--- a/src/3rdparty/webkit/WebCore/dom/Notation.h
+++ b/src/3rdparty/webkit/WebCore/dom/Notation.h
@@ -29,8 +29,7 @@
namespace WebCore {
-class Notation : public ContainerNode
-{
+class Notation : public ContainerNode {
public:
Notation(Document*);
Notation(Document*, const String& name, const String& publicId, const String& systemId);
diff --git a/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h b/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h
index 3f42ed4..d133019 100644
--- a/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h
+++ b/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h
@@ -33,8 +33,7 @@ namespace WebCore {
class StyleSheet;
class CSSStyleSheet;
-class ProcessingInstruction : public ContainerNode, private CachedResourceClient
-{
+class ProcessingInstruction : public ContainerNode, private CachedResourceClient {
public:
ProcessingInstruction(Document*);
ProcessingInstruction(Document*, const String& target, const String& data);
diff --git a/src/3rdparty/webkit/WebCore/dom/Range.cpp b/src/3rdparty/webkit/WebCore/dom/Range.cpp
index 4fb1164..e7fd8a2 100644
--- a/src/3rdparty/webkit/WebCore/dom/Range.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Range.cpp
@@ -725,7 +725,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
for (; leftParent != commonRoot; leftParent = leftParent->parentNode()) {
if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) {
RefPtr<Node> leftContentsParent = leftParent->cloneNode(false);
- leftContentsParent->appendChild(leftContents,ec);
+ leftContentsParent->appendChild(leftContents, ec);
leftContents = leftContentsParent;
}
@@ -733,11 +733,11 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
for (; n; n = next) {
next = n->nextSibling();
if (action == EXTRACT_CONTENTS)
- leftContents->appendChild(n,ec); // will remove n from leftParent
+ leftContents->appendChild(n, ec); // will remove n from leftParent
else if (action == CLONE_CONTENTS)
- leftContents->appendChild(n->cloneNode(true),ec);
+ leftContents->appendChild(n->cloneNode(true), ec);
else
- leftParent->removeChild(n,ec);
+ leftParent->removeChild(n, ec);
}
n = leftParent->nextSibling();
}
@@ -795,7 +795,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
for (; rightParent != commonRoot; rightParent = rightParent->parentNode()) {
if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) {
RefPtr<Node> rightContentsParent = rightParent->cloneNode(false);
- rightContentsParent->appendChild(rightContents,ec);
+ rightContentsParent->appendChild(rightContents, ec);
rightContents = rightContentsParent;
}
Node* prev;
diff --git a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h
index 7b2f36a..3f8febc 100644
--- a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h
+++ b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h
@@ -64,7 +64,7 @@ namespace WebCore {
SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL) = 0;
- virtual void addMessage(MessageDestination, MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL) = 0;
+ virtual void addMessage(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL) = 0;
virtual void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString) = 0;
virtual void scriptImported(unsigned long, const String&) = 0;
diff --git a/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp b/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp
index 1831f3a..7552c56 100644
--- a/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp
@@ -867,6 +867,19 @@ void SelectElement::accessKeySetSelectedIndex(SelectElementData& data, Element*
scrollToSelection(data, element);
}
+unsigned SelectElement::optionCount(const SelectElementData& data, const Element* element)
+{
+ unsigned options = 0;
+
+ const Vector<Element*>& items = data.listItems(element);
+ for (unsigned i = 0; i < items.size(); ++i) {
+ if (isOptionElement(items[i]))
+ ++options;
+ }
+
+ return options;
+}
+
// SelectElementData
SelectElementData::SelectElementData()
: m_multiple(false)
diff --git a/src/3rdparty/webkit/WebCore/dom/SelectElement.h b/src/3rdparty/webkit/WebCore/dom/SelectElement.h
index 29187ae..4cc76a0 100644
--- a/src/3rdparty/webkit/WebCore/dom/SelectElement.h
+++ b/src/3rdparty/webkit/WebCore/dom/SelectElement.h
@@ -95,7 +95,8 @@ protected:
static void typeAheadFind(SelectElementData&, Element*, KeyboardEvent*);
static void insertedIntoTree(SelectElementData&, Element*);
static void accessKeySetSelectedIndex(SelectElementData&, Element*, int index);
-
+ static unsigned optionCount(const SelectElementData&, const Element*);
+
private:
static void menuListDefaultEventHandler(SelectElementData&, Element*, Event*, HTMLFormElement*);
static void listBoxDefaultEventHandler(SelectElementData&, Element*, Event*, HTMLFormElement*);
diff --git a/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp b/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp
index 8ddfd31..c22ecf9 100644
--- a/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp
@@ -280,10 +280,11 @@ CSSStyleDeclaration* StyledElement::style()
return getInlineStyleDecl();
}
-static inline int toHex(UChar c) {
+static inline int toHex(UChar c)
+{
return ((c >= '0' && c <= '9') ? (c - '0')
: ((c >= 'a' && c <= 'f') ? (c - 'a' + 10)
- : (( c >= 'A' && c <= 'F') ? (c - 'A' + 10)
+ : ((c >= 'A' && c <= 'F') ? (c - 'A' + 10)
: -1)));
}
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp
index 4098eaa..95f63e9 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp
@@ -195,7 +195,8 @@ private:
};
struct PendingStartElementNSCallback : public PendingCallback {
- virtual ~PendingStartElementNSCallback() {
+ virtual ~PendingStartElementNSCallback()
+ {
xmlFree(xmlLocalName);
xmlFree(xmlPrefix);
xmlFree(xmlURI);
@@ -208,7 +209,8 @@ private:
xmlFree(attributes);
}
- virtual void call(XMLTokenizer* tokenizer) {
+ virtual void call(XMLTokenizer* tokenizer)
+ {
tokenizer->startElementNs(xmlLocalName, xmlPrefix, xmlURI,
nb_namespaces, const_cast<const xmlChar**>(namespaces),
nb_attributes, nb_defaulted, const_cast<const xmlChar**>(attributes));
@@ -312,7 +314,7 @@ private:
struct PendingErrorCallback: public PendingCallback {
virtual ~PendingErrorCallback()
{
- free (message);
+ free(message);
}
virtual void call(XMLTokenizer* tokenizer)
@@ -344,7 +346,8 @@ class OffsetBuffer {
public:
OffsetBuffer(const Vector<char>& b) : m_buffer(b), m_currentOffset(0) { }
- int readOutBytes(char* outputBuffer, unsigned askedToRead) {
+ int readOutBytes(char* outputBuffer, unsigned askedToRead)
+ {
unsigned bytesLeft = m_buffer.size() - m_currentOffset;
unsigned lenToCopy = min(askedToRead, bytesLeft);
if (lenToCopy) {
@@ -668,7 +671,7 @@ typedef struct _xmlSAX2Namespace xmlSAX2Namespace;
static inline void handleElementNamespaces(Element* newElement, const xmlChar** libxmlNamespaces, int nb_namespaces, ExceptionCode& ec)
{
xmlSAX2Namespace* namespaces = reinterpret_cast<xmlSAX2Namespace*>(libxmlNamespaces);
- for(int i = 0; i < nb_namespaces; i++) {
+ for (int i = 0; i < nb_namespaces; i++) {
String namespaceQName = "xmlns";
String namespaceURI = toString(namespaces[i].uri);
if (namespaces[i].prefix)
@@ -691,7 +694,7 @@ typedef struct _xmlSAX2Attributes xmlSAX2Attributes;
static inline void handleElementAttributes(Element* newElement, const xmlChar** libxmlAttributes, int nb_attributes, ExceptionCode& ec)
{
xmlSAX2Attributes* attributes = reinterpret_cast<xmlSAX2Attributes*>(libxmlAttributes);
- for(int i = 0; i < nb_attributes; i++) {
+ for (int i = 0; i < nb_attributes; i++) {
String attrLocalName = toString(attributes[i].localname);
int valueLength = (int) (attributes[i].end - attributes[i].value);
String attrValue = toString(attributes[i].value, valueLength);
@@ -1407,7 +1410,7 @@ static void attributesStartElementNsHandler(void* closure, const xmlChar* xmlLoc
state->gotAttributes = true;
xmlSAX2Attributes* attributes = reinterpret_cast<xmlSAX2Attributes*>(libxmlAttributes);
- for(int i = 0; i < nb_attributes; i++) {
+ for (int i = 0; i < nb_attributes; i++) {
String attrLocalName = toString(attributes[i].localname);
int valueLength = (int) (attributes[i].end - attributes[i].value);
String attrValue = toString(attributes[i].value, valueLength);
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
index 3173708..16c637f 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
@@ -66,8 +66,7 @@ using namespace std;
namespace WebCore {
#if QT_VERSION >= 0x040400
-class EntityResolver : public QXmlStreamEntityResolver
-{
+class EntityResolver : public QXmlStreamEntityResolver {
virtual QString resolveUndeclaredEntity(const QString &name);
};
@@ -354,7 +353,7 @@ static void attributesStartElementNsHandler(AttributeParseState* state, const QX
state->gotAttributes = true;
- for(int i = 0; i < attrs.count(); i++) {
+ for (int i = 0; i < attrs.count(); i++) {
const QXmlStreamAttribute& attr = attrs[i];
String attrLocalName = attr.name();
String attrValue = attr.value();
@@ -540,7 +539,7 @@ void XMLTokenizer::parseStartElement()
String prefix = prefixFromQName(m_stream.qualifiedName().toString());
if (m_parsingFragment && uri.isNull()) {
- Q_ASSERT (prefix.isNull());
+ Q_ASSERT(prefix.isNull());
uri = m_defaultNamespaceURI;
}
diff --git a/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp b/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
index 80ab7c8..d668703 100644
--- a/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
@@ -37,6 +37,27 @@
namespace WebCore {
// MessagePortChannel implementations - just delegate to the PlatformMessagePortChannel.
+void MessagePortChannel::createChannel(PassRefPtr<MessagePort> port1, PassRefPtr<MessagePort> port2)
+{
+ PlatformMessagePortChannel::createChannel(port1, port2);
+}
+
+PassOwnPtr<MessagePortChannel> MessagePortChannel::create(PassRefPtr<PlatformMessagePortChannel> channel)
+{
+ return new MessagePortChannel(channel);
+}
+
+MessagePortChannel::MessagePortChannel(PassRefPtr<PlatformMessagePortChannel> channel)
+ : m_channel(channel)
+{
+}
+
+MessagePortChannel::~MessagePortChannel()
+{
+ // Make sure we close our platform channel when the base is freed, to keep the channel objects from leaking.
+ m_channel->close();
+}
+
bool MessagePortChannel::entangleIfOpen(MessagePort* port)
{
return m_channel->entangleIfOpen(port);
diff --git a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp
index 8d0312b..998a1e2 100644
--- a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp
@@ -787,7 +787,7 @@ void ApplyStyleCommand::applyInlineStyle(CSSMutableStyleDeclaration *style)
styleWithoutEmbedding->removeProperty(CSSPropertyUnicodeBidi);
styleWithoutEmbedding->removeProperty(CSSPropertyDirection);
removeInlineStyle(styleWithoutEmbedding, removeStart, end);
- } else
+ } else
removeInlineStyle(style, removeStart, end);
start = startPosition();
@@ -857,7 +857,7 @@ void ApplyStyleCommand::applyInlineStyle(CSSMutableStyleDeclaration *style)
styleWithoutEmbedding->removeProperty(CSSPropertyUnicodeBidi);
styleWithoutEmbedding->removeProperty(CSSPropertyDirection);
applyInlineStyleToRange(styleWithoutEmbedding.get(), start, end);
- } else
+ } else
applyInlineStyleToRange(style, start, end);
// Remove dummy style spans created by splitting text elements.
diff --git a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp
index 8e4f950..9737e92 100644
--- a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp
@@ -1041,6 +1041,8 @@ Position CompositeEditCommand::positionAvoidingSpecialElementBoundary(const Posi
// to determine if the split is necessary. Returns the last split node.
PassRefPtr<Node> CompositeEditCommand::splitTreeToNode(Node* start, Node* end, bool splitAncestor)
{
+ ASSERT(start != end);
+
RefPtr<Node> node;
for (node = start; node && node->parent() != end; node = node->parent()) {
VisiblePosition positionInParent(Position(node->parent(), 0), DOWNSTREAM);
diff --git a/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp b/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp
index 5a0d8fc..284f073 100644
--- a/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp
@@ -365,7 +365,7 @@ void DeleteSelectionCommand::removeNode(PassRefPtr<Node> node)
updateLayout();
RenderObject *r = node->renderer();
if (r && r->isTableCell() && static_cast<RenderTableCell*>(r)->contentHeight() <= 0)
- insertBlockPlaceholder(Position(node,0));
+ insertBlockPlaceholder(Position(node, 0));
return;
}
diff --git a/src/3rdparty/webkit/WebCore/editing/Editor.cpp b/src/3rdparty/webkit/WebCore/editing/Editor.cpp
index 2ad5cce..b62ded7 100644
--- a/src/3rdparty/webkit/WebCore/editing/Editor.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/Editor.cpp
@@ -655,9 +655,9 @@ PassRefPtr<Node> Editor::increaseSelectionListLevelOrdered()
if (!canEditRichly() || m_frame->selection()->isNone())
return 0;
- PassRefPtr<Node> newList = IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered(m_frame->document());
+ RefPtr<Node> newList = IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered(m_frame->document());
revealSelectionAfterEditingOperation();
- return newList;
+ return newList.release();
}
PassRefPtr<Node> Editor::increaseSelectionListLevelUnordered()
@@ -665,9 +665,9 @@ PassRefPtr<Node> Editor::increaseSelectionListLevelUnordered()
if (!canEditRichly() || m_frame->selection()->isNone())
return 0;
- PassRefPtr<Node> newList = IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered(m_frame->document());
+ RefPtr<Node> newList = IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered(m_frame->document());
revealSelectionAfterEditingOperation();
- return newList;
+ return newList.release();
}
void Editor::decreaseSelectionListLevel()
@@ -1066,9 +1066,9 @@ void Editor::paste()
void Editor::pasteAsPlainText()
{
- if (!canPaste())
+ if (!canPaste())
return;
- pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
+ pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
}
void Editor::performDelete()
diff --git a/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp b/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp
index ab62c09..5a189d4 100644
--- a/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp
@@ -1247,9 +1247,10 @@ static String valueForeColor(Frame* frame, Event*)
// Map of functions
-struct CommandEntry { const char* name; EditorInternalCommand command; };
static const CommandMap& createCommandMap()
{
+ struct CommandEntry { const char* name; EditorInternalCommand command; };
+
static const CommandEntry commands[] = {
{ "AlignCenter", { executeJustifyCenter, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "AlignJustified", { executeJustifyFull, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
diff --git a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp
index 3922367..890cff2 100644
--- a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp
@@ -163,6 +163,12 @@ void IndentOutdentCommand::indentIntoBlockquote(const VisiblePosition& endOfCurr
moveParagraph(startOfParagraph(endOfCurrentParagraph), endOfCurrentParagraph, VisiblePosition(Position(insertionPoint, 0)), true);
}
+bool IndentOutdentCommand::isAtUnsplittableElement(const Position& pos) const
+{
+ Node* node = pos.node();
+ return node == editableRootForPosition(pos) || node == enclosingNodeOfType(pos, &isTableCell);
+}
+
void IndentOutdentCommand::indentRegion()
{
VisibleSelection selection = selectionForParagraphIteration(endingSelection());
@@ -174,10 +180,10 @@ void IndentOutdentCommand::indentRegion()
ASSERT(!startOfSelection.isNull());
ASSERT(!endOfSelection.isNull());
- // Special case empty root editable elements because there's nothing to split
+ // Special case empty unsplittable elements because there's nothing to split
// and there's nothing to move.
Position start = startOfSelection.deepEquivalent().downstream();
- if (start.node() == editableRootForPosition(start)) {
+ if (isAtUnsplittableElement(start)) {
RefPtr<Element> blockquote = createIndentBlockquoteElement(document());
insertNodeAt(blockquote, start);
RefPtr<Element> placeholder = createBreakElement(document());
diff --git a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h
index 419f832f..a10b89d 100644
--- a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h
+++ b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h
@@ -46,6 +46,9 @@ private:
virtual void doApply();
virtual EditAction editingAction() const { return m_typeOfAction == Indent ? EditActionIndent : EditActionOutdent; }
+ // FIXME: Does this belong in htmlediting.cpp?
+ bool isAtUnsplittableElement(const Position&) const;
+
void indentRegion();
void outdentRegion();
void outdentParagraph();
diff --git a/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp b/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp
index 9bb68ad..54f09cd 100644
--- a/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp
@@ -250,7 +250,8 @@ void SelectionController::willBeModified(EAlteration alter, EDirection direction
}
}
-TextDirection SelectionController::directionOfEnclosingBlock() {
+TextDirection SelectionController::directionOfEnclosingBlock()
+{
Node* n = m_sel.extent().node();
Node* enclosingBlockNode = enclosingBlock(n);
if (!enclosingBlockNode)
diff --git a/src/3rdparty/webkit/WebCore/editing/SmartReplaceICU.cpp b/src/3rdparty/webkit/WebCore/editing/SmartReplaceICU.cpp
index 18be647..9acd350 100644
--- a/src/3rdparty/webkit/WebCore/editing/SmartReplaceICU.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/SmartReplaceICU.cpp
@@ -37,7 +37,8 @@
namespace WebCore {
-static void addAllCodePoints(USet* smartSet, const String& string) {
+static void addAllCodePoints(USet* smartSet, const String& string)
+{
const UChar* characters = string.characters();
for (size_t i = 0; i < string.length(); i++)
uset_add(smartSet, characters[i]);
diff --git a/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp b/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp
index aee34df..a1b3bc5 100644
--- a/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp
@@ -42,6 +42,7 @@
#include "visible_units.h"
#if USE(ICU_UNICODE) && !UCONFIG_NO_COLLATION
+#include "TextBreakIteratorInternalICU.h"
#include <unicode/usearch.h>
#endif
@@ -143,7 +144,7 @@ unsigned BitStack::size() const
// --------
-static inline Node* parentOrShadowParent(Node* node)
+static inline Node* parentCrossingShadowBoundaries(Node* node)
{
if (Node* parent = node->parentNode())
return parent;
@@ -155,20 +156,50 @@ static inline Node* parentOrShadowParent(Node* node)
static unsigned depthCrossingShadowBoundaries(Node* node)
{
unsigned depth = 0;
- for (Node* parent = parentOrShadowParent(node); parent; parent = parentOrShadowParent(parent))
+ for (Node* parent = parentCrossingShadowBoundaries(node); parent; parent = parentCrossingShadowBoundaries(parent))
++depth;
return depth;
}
#endif
+// This function is like Range::pastLastNode, except for the fact that it can climb up out of shadow trees.
+static Node* nextInPreOrderCrossingShadowBoundaries(Node* rangeEndContainer, int rangeEndOffset)
+{
+ if (!rangeEndContainer)
+ return 0;
+ if (rangeEndOffset >= 0 && !rangeEndContainer->offsetInCharacters()) {
+ if (Node* next = rangeEndContainer->childNode(rangeEndOffset))
+ return next;
+ }
+ for (Node* node = rangeEndContainer; node; node = parentCrossingShadowBoundaries(node)) {
+ if (Node* next = node->nextSibling())
+ return next;
+ }
+ return 0;
+}
+
+static Node* previousInPostOrderCrossingShadowBoundaries(Node* rangeStartContainer, int rangeStartOffset)
+{
+ if (!rangeStartContainer)
+ return 0;
+ if (rangeStartOffset > 0 && !rangeStartContainer->offsetInCharacters()) {
+ if (Node* previous = rangeStartContainer->childNode(rangeStartOffset - 1))
+ return previous;
+ }
+ for (Node* node = rangeStartContainer; node; node = parentCrossingShadowBoundaries(node)) {
+ if (Node* previous = node->previousSibling())
+ return previous;
+ }
+ return 0;
+}
+
+// --------
+
static inline bool fullyClipsContents(Node* node)
{
RenderObject* renderer = node->renderer();
- if (!renderer || !renderer->isBox())
- return false;
- RenderStyle* style = renderer->style();
- if (style->overflowX() == OVISIBLE && style->overflowY() == OVISIBLE)
+ if (!renderer || !renderer->isBox() || !renderer->hasOverflowClip())
return false;
return toRenderBox(renderer)->size().isEmpty();
}
@@ -195,7 +226,7 @@ static void setUpFullyClippedStack(BitStack& stack, Node* node)
{
// Put the nodes in a vector so we can iterate in reverse order.
Vector<Node*, 100> ancestry;
- for (Node* parent = parentOrShadowParent(node); parent; parent = parentOrShadowParent(parent))
+ for (Node* parent = parentCrossingShadowBoundaries(node); parent; parent = parentCrossingShadowBoundaries(parent))
ancestry.append(parent);
// Call pushFullyClippedState on each node starting with the earliest ancestor.
@@ -265,7 +296,7 @@ TextIterator::TextIterator(const Range* r, bool emitCharactersBetweenAllVisibleP
m_handledChildren = false;
// calculate first out of bounds node
- m_pastEndNode = r->pastLastNode();
+ m_pastEndNode = nextInPreOrderCrossingShadowBoundaries(endContainer, endOffset);
// initialize node processing state
m_needAnotherNewline = false;
@@ -352,14 +383,14 @@ void TextIterator::advance()
next = m_node->nextSibling();
if (!next) {
bool pastEnd = m_node->traverseNextNode() == m_pastEndNode;
- Node* parentNode = parentOrShadowParent(m_node);
+ Node* parentNode = parentCrossingShadowBoundaries(m_node);
while (!next && parentNode) {
if ((pastEnd && parentNode == m_endContainer) || m_endContainer->isDescendantOf(parentNode))
return;
bool haveRenderer = m_node->renderer();
m_node = parentNode;
m_fullyClippedStack.pop();
- parentNode = parentOrShadowParent(m_node);
+ parentNode = parentCrossingShadowBoundaries(m_node);
if (haveRenderer)
exitNode();
if (m_positionNode) {
@@ -883,14 +914,14 @@ Node* TextIterator::node() const
// --------
-SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator() : m_positionNode(0)
+SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator()
+ : m_positionNode(0)
{
}
SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator(const Range* r)
+ : m_positionNode(0)
{
- m_positionNode = 0;
-
if (!r)
return;
@@ -932,15 +963,8 @@ SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator(const Range* r)
m_lastTextNode = 0;
m_lastCharacter = '\n';
-
- if (startOffset == 0 || !startNode->firstChild()) {
- m_pastStartNode = startNode->previousSibling();
- while (!m_pastStartNode && startNode->parentNode()) {
- startNode = startNode->parentNode();
- m_pastStartNode = startNode->previousSibling();
- }
- } else
- m_pastStartNode = startNode->childNode(startOffset - 1);
+
+ m_pastStartNode = previousInPostOrderCrossingShadowBoundaries(startNode, startOffset);
advance();
}
@@ -987,7 +1011,7 @@ void SimplifiedBackwardsTextIterator::advance()
// Exit all other containers.
next = m_node->previousSibling();
while (!next) {
- Node* parentNode = parentOrShadowParent(m_node);
+ Node* parentNode = parentCrossingShadowBoundaries(m_node);
if (!parentNode)
break;
m_node = parentNode;
@@ -1053,26 +1077,22 @@ bool SimplifiedBackwardsTextIterator::handleNonTextNode()
{
// We can use a linefeed in place of a tab because this simple iterator is only used to
// find boundaries, not actual content. A linefeed breaks words, sentences, and paragraphs.
- if (shouldEmitNewlineForNode(m_node) ||
- shouldEmitNewlineAfterNode(m_node) ||
- shouldEmitTabBeforeNode(m_node)) {
+ if (shouldEmitNewlineForNode(m_node) || shouldEmitNewlineAfterNode(m_node) || shouldEmitTabBeforeNode(m_node)) {
unsigned index = m_node->nodeIndex();
- // The start of this emitted range is wrong, ensuring correctness would require
- // VisiblePositions and so would be slow. previousBoundary expects this.
+ // The start of this emitted range is wrong. Ensuring correctness would require
+ // VisiblePositions and so would be slow. previousBoundary expects this.
emitCharacter('\n', m_node->parentNode(), index + 1, index + 1);
}
-
return true;
}
void SimplifiedBackwardsTextIterator::exitNode()
{
- if (shouldEmitNewlineForNode(m_node) ||
- shouldEmitNewlineBeforeNode(m_node) ||
- shouldEmitTabBeforeNode(m_node))
- // The start of this emitted range is wrong, ensuring correctness would require
- // VisiblePositions and so would be slow. previousBoundary expects this.
+ if (shouldEmitNewlineForNode(m_node) || shouldEmitNewlineBeforeNode(m_node) || shouldEmitTabBeforeNode(m_node)) {
+ // The start of this emitted range is wrong. Ensuring correctness would require
+ // VisiblePositions and so would be slow. previousBoundary expects this.
emitCharacter('\n', m_node, 0, 0);
+ }
}
void SimplifiedBackwardsTextIterator::emitCharacter(UChar c, Node* node, int startOffset, int endOffset)
@@ -1386,13 +1406,9 @@ static UStringSearch* createSearcher()
// Provide a non-empty pattern and non-empty text so usearch_open will not fail,
// but it doesn't matter exactly what it is, since we don't perform any searches
// without setting both the pattern and the text.
-
- // Pass empty string for the locale for now to get the Unicode Collation Algorithm,
- // rather than something locale-specific.
-
UErrorCode status = U_ZERO_ERROR;
- UStringSearch* searcher = usearch_open(&newlineCharacter, 1, &newlineCharacter, 1, "", 0, &status);
- ASSERT(status == U_ZERO_ERROR);
+ UStringSearch* searcher = usearch_open(&newlineCharacter, 1, &newlineCharacter, 1, currentSearchLocaleID(), 0, &status);
+ ASSERT(status == U_ZERO_ERROR || status == U_USING_FALLBACK_WARNING);
return searcher;
}
diff --git a/src/3rdparty/webkit/WebCore/editing/gtk/SelectionControllerGtk.cpp b/src/3rdparty/webkit/WebCore/editing/gtk/SelectionControllerGtk.cpp
index c21c45a..f3bd4bc 100644
--- a/src/3rdparty/webkit/WebCore/editing/gtk/SelectionControllerGtk.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/gtk/SelectionControllerGtk.cpp
@@ -30,11 +30,11 @@ namespace WebCore {
void SelectionController::notifyAccessibilityForSelectionChange()
{
if (AXObjectCache::accessibilityEnabled() && m_sel.start().isNotNull() && m_sel.end().isNotNull()) {
- RenderObject* focusedNode = m_sel.start().node()->renderer();
+ RenderObject* focusedNode = m_sel.end().node()->renderer();
AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCache()->getOrCreate(focusedNode);
AtkObject* wrapper = accessibilityObject->wrapper();
if (ATK_IS_TEXT(wrapper)) {
- g_signal_emit_by_name(wrapper, "text-caret-moved", m_sel.start().computeOffsetInContainerNode());
+ g_signal_emit_by_name(wrapper, "text-caret-moved", m_sel.end().computeOffsetInContainerNode());
if (m_sel.isRange())
g_signal_emit_by_name(wrapper, "text-selection-changed");
diff --git a/src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h b/src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h
index da67f2e..d3d7d36 100644
--- a/src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h
@@ -29,6 +29,6 @@ static const struct HashTableValue arrayTableValues[22] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable arrayTable =
+extern JSC_CONST_HASHTABLE HashTable arrayTable =
{ 65, 63, arrayTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp
index 4c85bee..1c2da06 100644
--- a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,159 +54,28 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse cssyyparse
-#define yylex cssyylex
-#define yyerror cssyyerror
-#define yylval cssyylval
-#define yychar cssyychar
-#define yydebug cssyydebug
-#define yynerrs cssyynerrs
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOKEN_EOF = 0,
- LOWEST_PREC = 258,
- UNIMPORTANT_TOK = 259,
- WHITESPACE = 260,
- SGML_CD = 261,
- INCLUDES = 262,
- DASHMATCH = 263,
- BEGINSWITH = 264,
- ENDSWITH = 265,
- CONTAINS = 266,
- STRING = 267,
- IDENT = 268,
- NTH = 269,
- HEX = 270,
- IDSEL = 271,
- IMPORT_SYM = 272,
- PAGE_SYM = 273,
- MEDIA_SYM = 274,
- FONT_FACE_SYM = 275,
- CHARSET_SYM = 276,
- NAMESPACE_SYM = 277,
- WEBKIT_RULE_SYM = 278,
- WEBKIT_DECLS_SYM = 279,
- WEBKIT_KEYFRAME_RULE_SYM = 280,
- WEBKIT_KEYFRAMES_SYM = 281,
- WEBKIT_VALUE_SYM = 282,
- WEBKIT_MEDIAQUERY_SYM = 283,
- WEBKIT_SELECTOR_SYM = 284,
- WEBKIT_VARIABLES_SYM = 285,
- WEBKIT_DEFINE_SYM = 286,
- VARIABLES_FOR = 287,
- WEBKIT_VARIABLES_DECLS_SYM = 288,
- ATKEYWORD = 289,
- IMPORTANT_SYM = 290,
- MEDIA_ONLY = 291,
- MEDIA_NOT = 292,
- MEDIA_AND = 293,
- QEMS = 294,
- EMS = 295,
- EXS = 296,
- PXS = 297,
- CMS = 298,
- MMS = 299,
- INS = 300,
- PTS = 301,
- PCS = 302,
- DEGS = 303,
- RADS = 304,
- GRADS = 305,
- TURNS = 306,
- MSECS = 307,
- SECS = 308,
- HERZ = 309,
- KHERZ = 310,
- DIMEN = 311,
- PERCENTAGE = 312,
- FLOATTOKEN = 313,
- INTEGER = 314,
- URI = 315,
- FUNCTION = 316,
- NOTFUNCTION = 317,
- UNICODERANGE = 318,
- VARCALL = 319
- };
-#endif
-/* Tokens. */
-#define TOKEN_EOF 0
-#define LOWEST_PREC 258
-#define UNIMPORTANT_TOK 259
-#define WHITESPACE 260
-#define SGML_CD 261
-#define INCLUDES 262
-#define DASHMATCH 263
-#define BEGINSWITH 264
-#define ENDSWITH 265
-#define CONTAINS 266
-#define STRING 267
-#define IDENT 268
-#define NTH 269
-#define HEX 270
-#define IDSEL 271
-#define IMPORT_SYM 272
-#define PAGE_SYM 273
-#define MEDIA_SYM 274
-#define FONT_FACE_SYM 275
-#define CHARSET_SYM 276
-#define NAMESPACE_SYM 277
-#define WEBKIT_RULE_SYM 278
-#define WEBKIT_DECLS_SYM 279
-#define WEBKIT_KEYFRAME_RULE_SYM 280
-#define WEBKIT_KEYFRAMES_SYM 281
-#define WEBKIT_VALUE_SYM 282
-#define WEBKIT_MEDIAQUERY_SYM 283
-#define WEBKIT_SELECTOR_SYM 284
-#define WEBKIT_VARIABLES_SYM 285
-#define WEBKIT_DEFINE_SYM 286
-#define VARIABLES_FOR 287
-#define WEBKIT_VARIABLES_DECLS_SYM 288
-#define ATKEYWORD 289
-#define IMPORTANT_SYM 290
-#define MEDIA_ONLY 291
-#define MEDIA_NOT 292
-#define MEDIA_AND 293
-#define QEMS 294
-#define EMS 295
-#define EXS 296
-#define PXS 297
-#define CMS 298
-#define MMS 299
-#define INS 300
-#define PTS 301
-#define PCS 302
-#define DEGS 303
-#define RADS 304
-#define GRADS 305
-#define TURNS 306
-#define MSECS 307
-#define SECS 308
-#define HERZ 309
-#define KHERZ 310
-#define DIMEN 311
-#define PERCENTAGE 312
-#define FLOATTOKEN 313
-#define INTEGER 314
-#define URI 315
-#define FUNCTION 316
-#define NOTFUNCTION 317
-#define UNICODERANGE 318
-#define VARCALL 319
-
-
+#define yyparse cssyyparse
+#define yylex cssyylex
+#define yyerror cssyyerror
+#define yylval cssyylval
+#define yychar cssyychar
+#define yydebug cssyydebug
+#define yynerrs cssyynerrs
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 1 "../css/CSSGrammar.y"
@@ -264,6 +132,9 @@ using namespace HTMLNames;
+/* Line 189 of yacc.c */
+#line 137 "WebCore/tmp/../generated/CSSGrammar.tab.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -282,10 +153,88 @@ using namespace HTMLNames;
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TOKEN_EOF = 0,
+ LOWEST_PREC = 258,
+ UNIMPORTANT_TOK = 259,
+ WHITESPACE = 260,
+ SGML_CD = 261,
+ INCLUDES = 262,
+ DASHMATCH = 263,
+ BEGINSWITH = 264,
+ ENDSWITH = 265,
+ CONTAINS = 266,
+ STRING = 267,
+ IDENT = 268,
+ NTH = 269,
+ HEX = 270,
+ IDSEL = 271,
+ IMPORT_SYM = 272,
+ PAGE_SYM = 273,
+ MEDIA_SYM = 274,
+ FONT_FACE_SYM = 275,
+ CHARSET_SYM = 276,
+ NAMESPACE_SYM = 277,
+ WEBKIT_RULE_SYM = 278,
+ WEBKIT_DECLS_SYM = 279,
+ WEBKIT_KEYFRAME_RULE_SYM = 280,
+ WEBKIT_KEYFRAMES_SYM = 281,
+ WEBKIT_VALUE_SYM = 282,
+ WEBKIT_MEDIAQUERY_SYM = 283,
+ WEBKIT_SELECTOR_SYM = 284,
+ WEBKIT_VARIABLES_SYM = 285,
+ WEBKIT_DEFINE_SYM = 286,
+ VARIABLES_FOR = 287,
+ WEBKIT_VARIABLES_DECLS_SYM = 288,
+ ATKEYWORD = 289,
+ IMPORTANT_SYM = 290,
+ MEDIA_ONLY = 291,
+ MEDIA_NOT = 292,
+ MEDIA_AND = 293,
+ QEMS = 294,
+ EMS = 295,
+ EXS = 296,
+ PXS = 297,
+ CMS = 298,
+ MMS = 299,
+ INS = 300,
+ PTS = 301,
+ PCS = 302,
+ DEGS = 303,
+ RADS = 304,
+ GRADS = 305,
+ TURNS = 306,
+ MSECS = 307,
+ SECS = 308,
+ HERZ = 309,
+ KHERZ = 310,
+ DIMEN = 311,
+ PERCENTAGE = 312,
+ FLOATTOKEN = 313,
+ INTEGER = 314,
+ URI = 315,
+ FUNCTION = 316,
+ NOTFUNCTION = 317,
+ UNICODERANGE = 318,
+ VARCALL = 319
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 58 "../css/CSSGrammar.y"
{
+
+/* Line 214 of yacc.c */
+#line 58 "../css/CSSGrammar.y"
+
bool boolean;
char character;
int integer;
@@ -307,18 +256,21 @@ typedef union YYSTYPE
WebKitCSSKeyframeRule* keyframeRule;
WebKitCSSKeyframesRule* keyframesRule;
float val;
-}
-/* Line 187 of yacc.c. */
-#line 313 "WebCore/tmp/../generated/CSSGrammar.tab.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 264 "WebCore/tmp/../generated/CSSGrammar.tab.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
/* Copy the second part of user declarations. */
+
+/* Line 264 of yacc.c */
#line 82 "../css/CSSGrammar.y"
@@ -334,8 +286,8 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
-/* Line 216 of yacc.c. */
-#line 339 "WebCore/tmp/../generated/CSSGrammar.tab.c"
+/* Line 264 of yacc.c */
+#line 291 "WebCore/tmp/../generated/CSSGrammar.tab.c"
#ifdef short
# undef short
@@ -410,14 +362,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -498,9 +450,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -534,12 +486,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -1558,17 +1510,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -1602,11 +1557,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1886,10 +1841,8 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1908,10 +1861,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1935,74 +1887,75 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
+ /* Number of syntax errors so far. */
+ int yynerrs;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
@@ -2032,7 +1985,6 @@ int yynerrs;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
-
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -2040,7 +1992,6 @@ int yynerrs;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-
&yystacksize);
yyss = yyss1;
@@ -2063,9 +2014,8 @@ int yynerrs;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2076,7 +2026,6 @@ int yynerrs;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -2086,6 +2035,9 @@ int yynerrs;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -2094,16 +2046,16 @@ int yynerrs;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2135,20 +2087,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -2188,6 +2136,8 @@ yyreduce:
switch (yyn)
{
case 12:
+
+/* Line 1455 of yacc.c */
#line 282 "../css/CSSGrammar.y"
{
static_cast<CSSParser*>(parser)->m_rule = (yyvsp[(4) - (6)].rule);
@@ -2195,6 +2145,8 @@ yyreduce:
break;
case 13:
+
+/* Line 1455 of yacc.c */
#line 288 "../css/CSSGrammar.y"
{
static_cast<CSSParser*>(parser)->m_keyframe = (yyvsp[(4) - (6)].keyframeRule);
@@ -2202,6 +2154,8 @@ yyreduce:
break;
case 14:
+
+/* Line 1455 of yacc.c */
#line 294 "../css/CSSGrammar.y"
{
/* can be empty */
@@ -2209,6 +2163,8 @@ yyreduce:
break;
case 15:
+
+/* Line 1455 of yacc.c */
#line 300 "../css/CSSGrammar.y"
{
/* can be empty */
@@ -2216,6 +2172,8 @@ yyreduce:
break;
case 16:
+
+/* Line 1455 of yacc.c */
#line 306 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2231,6 +2189,8 @@ yyreduce:
break;
case 17:
+
+/* Line 1455 of yacc.c */
#line 320 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2239,6 +2199,8 @@ yyreduce:
break;
case 18:
+
+/* Line 1455 of yacc.c */
#line 327 "../css/CSSGrammar.y"
{
if ((yyvsp[(4) - (5)].selectorList)) {
@@ -2250,12 +2212,16 @@ yyreduce:
break;
case 25:
+
+/* Line 1455 of yacc.c */
#line 349 "../css/CSSGrammar.y"
{
;}
break;
case 28:
+
+/* Line 1455 of yacc.c */
#line 359 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2266,18 +2232,24 @@ yyreduce:
break;
case 29:
+
+/* Line 1455 of yacc.c */
#line 365 "../css/CSSGrammar.y"
{
;}
break;
case 30:
+
+/* Line 1455 of yacc.c */
#line 367 "../css/CSSGrammar.y"
{
;}
break;
case 32:
+
+/* Line 1455 of yacc.c */
#line 373 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2287,12 +2259,16 @@ yyreduce:
break;
case 33:
+
+/* Line 1455 of yacc.c */
#line 378 "../css/CSSGrammar.y"
{
;}
break;
case 35:
+
+/* Line 1455 of yacc.c */
#line 384 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2302,6 +2278,8 @@ yyreduce:
break;
case 39:
+
+/* Line 1455 of yacc.c */
#line 398 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2311,11 +2289,15 @@ yyreduce:
break;
case 49:
+
+/* Line 1455 of yacc.c */
#line 421 "../css/CSSGrammar.y"
{ (yyval.ruleList) = 0; ;}
break;
case 50:
+
+/* Line 1455 of yacc.c */
#line 422 "../css/CSSGrammar.y"
{
(yyval.ruleList) = (yyvsp[(1) - (3)].ruleList);
@@ -2328,6 +2310,8 @@ yyreduce:
break;
case 60:
+
+/* Line 1455 of yacc.c */
#line 449 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createImportRule((yyvsp[(3) - (6)].string), (yyvsp[(5) - (6)].mediaList));
@@ -2335,6 +2319,8 @@ yyreduce:
break;
case 61:
+
+/* Line 1455 of yacc.c */
#line 452 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2342,6 +2328,8 @@ yyreduce:
break;
case 62:
+
+/* Line 1455 of yacc.c */
#line 455 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2349,6 +2337,8 @@ yyreduce:
break;
case 63:
+
+/* Line 1455 of yacc.c */
#line 458 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2356,6 +2346,8 @@ yyreduce:
break;
case 64:
+
+/* Line 1455 of yacc.c */
#line 464 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createVariablesRule((yyvsp[(3) - (7)].mediaList), true);
@@ -2363,6 +2355,8 @@ yyreduce:
break;
case 65:
+
+/* Line 1455 of yacc.c */
#line 468 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createVariablesRule((yyvsp[(3) - (7)].mediaList), false);
@@ -2370,6 +2364,8 @@ yyreduce:
break;
case 66:
+
+/* Line 1455 of yacc.c */
#line 474 "../css/CSSGrammar.y"
{
(yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList();
@@ -2377,6 +2373,8 @@ yyreduce:
break;
case 67:
+
+/* Line 1455 of yacc.c */
#line 478 "../css/CSSGrammar.y"
{
(yyval.mediaList) = (yyvsp[(3) - (3)].mediaList);
@@ -2384,6 +2382,8 @@ yyreduce:
break;
case 68:
+
+/* Line 1455 of yacc.c */
#line 484 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (1)].boolean);
@@ -2391,6 +2391,8 @@ yyreduce:
break;
case 69:
+
+/* Line 1455 of yacc.c */
#line 487 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (2)].boolean);
@@ -2400,6 +2402,8 @@ yyreduce:
break;
case 70:
+
+/* Line 1455 of yacc.c */
#line 492 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (1)].boolean);
@@ -2407,6 +2411,8 @@ yyreduce:
break;
case 71:
+
+/* Line 1455 of yacc.c */
#line 495 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2414,6 +2420,8 @@ yyreduce:
break;
case 72:
+
+/* Line 1455 of yacc.c */
#line 498 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2421,6 +2429,8 @@ yyreduce:
break;
case 73:
+
+/* Line 1455 of yacc.c */
#line 501 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (2)].boolean);
@@ -2428,6 +2438,8 @@ yyreduce:
break;
case 74:
+
+/* Line 1455 of yacc.c */
#line 507 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (3)].boolean);
@@ -2435,6 +2447,8 @@ yyreduce:
break;
case 75:
+
+/* Line 1455 of yacc.c */
#line 510 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2442,6 +2456,8 @@ yyreduce:
break;
case 76:
+
+/* Line 1455 of yacc.c */
#line 513 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2449,6 +2465,8 @@ yyreduce:
break;
case 77:
+
+/* Line 1455 of yacc.c */
#line 516 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2456,6 +2474,8 @@ yyreduce:
break;
case 78:
+
+/* Line 1455 of yacc.c */
#line 519 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (4)].boolean);
@@ -2465,6 +2485,8 @@ yyreduce:
break;
case 79:
+
+/* Line 1455 of yacc.c */
#line 524 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (4)].boolean);
@@ -2472,6 +2494,8 @@ yyreduce:
break;
case 80:
+
+/* Line 1455 of yacc.c */
#line 527 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (6)].boolean);
@@ -2479,6 +2503,8 @@ yyreduce:
break;
case 81:
+
+/* Line 1455 of yacc.c */
#line 533 "../css/CSSGrammar.y"
{
(yyval.boolean) = static_cast<CSSParser*>(parser)->addVariable((yyvsp[(1) - (4)].string), (yyvsp[(4) - (4)].valueList));
@@ -2486,6 +2512,8 @@ yyreduce:
break;
case 82:
+
+/* Line 1455 of yacc.c */
#line 537 "../css/CSSGrammar.y"
{
(yyval.boolean) = static_cast<CSSParser*>(parser)->addVariableDeclarationBlock((yyvsp[(1) - (7)].string));
@@ -2493,6 +2521,8 @@ yyreduce:
break;
case 83:
+
+/* Line 1455 of yacc.c */
#line 541 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2500,6 +2530,8 @@ yyreduce:
break;
case 84:
+
+/* Line 1455 of yacc.c */
#line 545 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -2507,6 +2539,8 @@ yyreduce:
break;
case 85:
+
+/* Line 1455 of yacc.c */
#line 549 "../css/CSSGrammar.y"
{
/* @variables { varname: } Just reduce away this variable with no value. */
@@ -2515,6 +2549,8 @@ yyreduce:
break;
case 86:
+
+/* Line 1455 of yacc.c */
#line 554 "../css/CSSGrammar.y"
{
/* if we come across rules with invalid values like this case: @variables { varname: *; }, just discard the property/value pair */
@@ -2523,6 +2559,8 @@ yyreduce:
break;
case 87:
+
+/* Line 1455 of yacc.c */
#line 561 "../css/CSSGrammar.y"
{
(yyval.string) = (yyvsp[(1) - (2)].string);
@@ -2530,6 +2568,8 @@ yyreduce:
break;
case 88:
+
+/* Line 1455 of yacc.c */
#line 567 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2539,16 +2579,22 @@ yyreduce:
break;
case 91:
+
+/* Line 1455 of yacc.c */
#line 577 "../css/CSSGrammar.y"
{ (yyval.string).characters = 0; ;}
break;
case 92:
+
+/* Line 1455 of yacc.c */
#line 578 "../css/CSSGrammar.y"
{ (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
case 95:
+
+/* Line 1455 of yacc.c */
#line 587 "../css/CSSGrammar.y"
{
(yyval.string) = (yyvsp[(1) - (2)].string);
@@ -2556,6 +2602,8 @@ yyreduce:
break;
case 96:
+
+/* Line 1455 of yacc.c */
#line 593 "../css/CSSGrammar.y"
{
(yyval.valueList) = 0;
@@ -2563,6 +2611,8 @@ yyreduce:
break;
case 97:
+
+/* Line 1455 of yacc.c */
#line 596 "../css/CSSGrammar.y"
{
(yyval.valueList) = (yyvsp[(3) - (4)].valueList);
@@ -2570,6 +2620,8 @@ yyreduce:
break;
case 98:
+
+/* Line 1455 of yacc.c */
#line 602 "../css/CSSGrammar.y"
{
(yyvsp[(3) - (7)].string).lower();
@@ -2578,6 +2630,8 @@ yyreduce:
break;
case 99:
+
+/* Line 1455 of yacc.c */
#line 609 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2587,6 +2641,8 @@ yyreduce:
break;
case 100:
+
+/* Line 1455 of yacc.c */
#line 614 "../css/CSSGrammar.y"
{
(yyval.mediaQueryExpList) = (yyvsp[(1) - (5)].mediaQueryExpList);
@@ -2595,6 +2651,8 @@ yyreduce:
break;
case 101:
+
+/* Line 1455 of yacc.c */
#line 621 "../css/CSSGrammar.y"
{
(yyval.mediaQueryExpList) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExpList();
@@ -2602,6 +2660,8 @@ yyreduce:
break;
case 102:
+
+/* Line 1455 of yacc.c */
#line 624 "../css/CSSGrammar.y"
{
(yyval.mediaQueryExpList) = (yyvsp[(3) - (3)].mediaQueryExpList);
@@ -2609,6 +2669,8 @@ yyreduce:
break;
case 103:
+
+/* Line 1455 of yacc.c */
#line 630 "../css/CSSGrammar.y"
{
(yyval.mediaQueryRestrictor) = MediaQuery::None;
@@ -2616,6 +2678,8 @@ yyreduce:
break;
case 104:
+
+/* Line 1455 of yacc.c */
#line 633 "../css/CSSGrammar.y"
{
(yyval.mediaQueryRestrictor) = MediaQuery::Only;
@@ -2623,6 +2687,8 @@ yyreduce:
break;
case 105:
+
+/* Line 1455 of yacc.c */
#line 636 "../css/CSSGrammar.y"
{
(yyval.mediaQueryRestrictor) = MediaQuery::Not;
@@ -2630,6 +2696,8 @@ yyreduce:
break;
case 106:
+
+/* Line 1455 of yacc.c */
#line 642 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2638,6 +2706,8 @@ yyreduce:
break;
case 107:
+
+/* Line 1455 of yacc.c */
#line 647 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2647,6 +2717,8 @@ yyreduce:
break;
case 108:
+
+/* Line 1455 of yacc.c */
#line 655 "../css/CSSGrammar.y"
{
(yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList();
@@ -2654,6 +2726,8 @@ yyreduce:
break;
case 110:
+
+/* Line 1455 of yacc.c */
#line 662 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2663,6 +2737,8 @@ yyreduce:
break;
case 111:
+
+/* Line 1455 of yacc.c */
#line 667 "../css/CSSGrammar.y"
{
(yyval.mediaList) = (yyvsp[(1) - (4)].mediaList);
@@ -2672,6 +2748,8 @@ yyreduce:
break;
case 112:
+
+/* Line 1455 of yacc.c */
#line 672 "../css/CSSGrammar.y"
{
(yyval.mediaList) = 0;
@@ -2679,6 +2757,8 @@ yyreduce:
break;
case 113:
+
+/* Line 1455 of yacc.c */
#line 678 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule((yyvsp[(3) - (7)].mediaList), (yyvsp[(6) - (7)].ruleList));
@@ -2686,6 +2766,8 @@ yyreduce:
break;
case 114:
+
+/* Line 1455 of yacc.c */
#line 681 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule(0, (yyvsp[(5) - (6)].ruleList));
@@ -2693,6 +2775,8 @@ yyreduce:
break;
case 115:
+
+/* Line 1455 of yacc.c */
#line 687 "../css/CSSGrammar.y"
{
(yyval.string) = (yyvsp[(1) - (2)].string);
@@ -2700,6 +2784,8 @@ yyreduce:
break;
case 116:
+
+/* Line 1455 of yacc.c */
#line 693 "../css/CSSGrammar.y"
{
(yyval.rule) = (yyvsp[(7) - (8)].keyframesRule);
@@ -2708,11 +2794,15 @@ yyreduce:
break;
case 119:
+
+/* Line 1455 of yacc.c */
#line 705 "../css/CSSGrammar.y"
{ (yyval.keyframesRule) = static_cast<CSSParser*>(parser)->createKeyframesRule(); ;}
break;
case 120:
+
+/* Line 1455 of yacc.c */
#line 706 "../css/CSSGrammar.y"
{
(yyval.keyframesRule) = (yyvsp[(1) - (3)].keyframesRule);
@@ -2722,6 +2812,8 @@ yyreduce:
break;
case 121:
+
+/* Line 1455 of yacc.c */
#line 714 "../css/CSSGrammar.y"
{
(yyval.keyframeRule) = static_cast<CSSParser*>(parser)->createKeyframeRule((yyvsp[(1) - (6)].valueList));
@@ -2729,6 +2821,8 @@ yyreduce:
break;
case 122:
+
+/* Line 1455 of yacc.c */
#line 720 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2738,6 +2832,8 @@ yyreduce:
break;
case 123:
+
+/* Line 1455 of yacc.c */
#line 725 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2748,11 +2844,15 @@ yyreduce:
break;
case 124:
+
+/* Line 1455 of yacc.c */
#line 734 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (1)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;}
break;
case 125:
+
+/* Line 1455 of yacc.c */
#line 735 "../css/CSSGrammar.y"
{
(yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER;
@@ -2767,6 +2867,8 @@ yyreduce:
break;
case 126:
+
+/* Line 1455 of yacc.c */
#line 759 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2774,6 +2876,8 @@ yyreduce:
break;
case 127:
+
+/* Line 1455 of yacc.c */
#line 762 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2781,6 +2885,8 @@ yyreduce:
break;
case 128:
+
+/* Line 1455 of yacc.c */
#line 769 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createFontFaceRule();
@@ -2788,6 +2894,8 @@ yyreduce:
break;
case 129:
+
+/* Line 1455 of yacc.c */
#line 772 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2795,6 +2903,8 @@ yyreduce:
break;
case 130:
+
+/* Line 1455 of yacc.c */
#line 775 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -2802,31 +2912,43 @@ yyreduce:
break;
case 131:
+
+/* Line 1455 of yacc.c */
#line 781 "../css/CSSGrammar.y"
{ (yyval.relation) = CSSSelector::DirectAdjacent; ;}
break;
case 132:
+
+/* Line 1455 of yacc.c */
#line 782 "../css/CSSGrammar.y"
{ (yyval.relation) = CSSSelector::IndirectAdjacent; ;}
break;
case 133:
+
+/* Line 1455 of yacc.c */
#line 783 "../css/CSSGrammar.y"
{ (yyval.relation) = CSSSelector::Child; ;}
break;
case 134:
+
+/* Line 1455 of yacc.c */
#line 787 "../css/CSSGrammar.y"
{ (yyval.integer) = -1; ;}
break;
case 135:
+
+/* Line 1455 of yacc.c */
#line 788 "../css/CSSGrammar.y"
{ (yyval.integer) = 1; ;}
break;
case 136:
+
+/* Line 1455 of yacc.c */
#line 792 "../css/CSSGrammar.y"
{
(yyval.rule) = static_cast<CSSParser*>(parser)->createStyleRule((yyvsp[(1) - (5)].selectorList));
@@ -2834,6 +2956,8 @@ yyreduce:
break;
case 137:
+
+/* Line 1455 of yacc.c */
#line 798 "../css/CSSGrammar.y"
{
if ((yyvsp[(1) - (1)].selector)) {
@@ -2847,6 +2971,8 @@ yyreduce:
break;
case 138:
+
+/* Line 1455 of yacc.c */
#line 807 "../css/CSSGrammar.y"
{
if ((yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector)) {
@@ -2859,6 +2985,8 @@ yyreduce:
break;
case 139:
+
+/* Line 1455 of yacc.c */
#line 815 "../css/CSSGrammar.y"
{
(yyval.selectorList) = 0;
@@ -2866,6 +2994,8 @@ yyreduce:
break;
case 140:
+
+/* Line 1455 of yacc.c */
#line 821 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(1) - (2)].selector);
@@ -2873,6 +3003,8 @@ yyreduce:
break;
case 141:
+
+/* Line 1455 of yacc.c */
#line 827 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(1) - (1)].selector);
@@ -2880,6 +3012,8 @@ yyreduce:
break;
case 142:
+
+/* Line 1455 of yacc.c */
#line 831 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(1) - (1)].selector);
@@ -2887,6 +3021,8 @@ yyreduce:
break;
case 143:
+
+/* Line 1455 of yacc.c */
#line 835 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(2) - (2)].selector);
@@ -2906,6 +3042,8 @@ yyreduce:
break;
case 144:
+
+/* Line 1455 of yacc.c */
#line 850 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(3) - (3)].selector);
@@ -2930,6 +3068,8 @@ yyreduce:
break;
case 145:
+
+/* Line 1455 of yacc.c */
#line 870 "../css/CSSGrammar.y"
{
(yyval.selector) = 0;
@@ -2937,21 +3077,29 @@ yyreduce:
break;
case 146:
+
+/* Line 1455 of yacc.c */
#line 876 "../css/CSSGrammar.y"
{ (yyval.string).characters = 0; (yyval.string).length = 0; ;}
break;
case 147:
+
+/* Line 1455 of yacc.c */
#line 877 "../css/CSSGrammar.y"
{ static UChar star = '*'; (yyval.string).characters = &star; (yyval.string).length = 1; ;}
break;
case 148:
+
+/* Line 1455 of yacc.c */
#line 878 "../css/CSSGrammar.y"
{ (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
case 149:
+
+/* Line 1455 of yacc.c */
#line 882 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -2961,6 +3109,8 @@ yyreduce:
break;
case 150:
+
+/* Line 1455 of yacc.c */
#line 887 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(2) - (2)].selector);
@@ -2972,6 +3122,8 @@ yyreduce:
break;
case 151:
+
+/* Line 1455 of yacc.c */
#line 894 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(1) - (1)].selector);
@@ -2982,6 +3134,8 @@ yyreduce:
break;
case 152:
+
+/* Line 1455 of yacc.c */
#line 900 "../css/CSSGrammar.y"
{
AtomicString namespacePrefix = (yyvsp[(1) - (2)].string);
@@ -2996,6 +3150,8 @@ yyreduce:
break;
case 153:
+
+/* Line 1455 of yacc.c */
#line 910 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(3) - (3)].selector);
@@ -3012,6 +3168,8 @@ yyreduce:
break;
case 154:
+
+/* Line 1455 of yacc.c */
#line 922 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(2) - (2)].selector);
@@ -3026,6 +3184,8 @@ yyreduce:
break;
case 155:
+
+/* Line 1455 of yacc.c */
#line 935 "../css/CSSGrammar.y"
{
CSSParserString& str = (yyvsp[(1) - (1)].string);
@@ -3038,6 +3198,8 @@ yyreduce:
break;
case 156:
+
+/* Line 1455 of yacc.c */
#line 943 "../css/CSSGrammar.y"
{
static UChar star = '*';
@@ -3047,6 +3209,8 @@ yyreduce:
break;
case 157:
+
+/* Line 1455 of yacc.c */
#line 951 "../css/CSSGrammar.y"
{
(yyval.selector) = (yyvsp[(1) - (1)].selector);
@@ -3054,6 +3218,8 @@ yyreduce:
break;
case 158:
+
+/* Line 1455 of yacc.c */
#line 954 "../css/CSSGrammar.y"
{
if (!(yyvsp[(2) - (2)].selector))
@@ -3071,6 +3237,8 @@ yyreduce:
break;
case 159:
+
+/* Line 1455 of yacc.c */
#line 967 "../css/CSSGrammar.y"
{
(yyval.selector) = 0;
@@ -3078,6 +3246,8 @@ yyreduce:
break;
case 160:
+
+/* Line 1455 of yacc.c */
#line 973 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3090,6 +3260,8 @@ yyreduce:
break;
case 161:
+
+/* Line 1455 of yacc.c */
#line 981 "../css/CSSGrammar.y"
{
if ((yyvsp[(1) - (1)].string).characters[0] >= '0' && (yyvsp[(1) - (1)].string).characters[0] <= '9') {
@@ -3106,6 +3278,8 @@ yyreduce:
break;
case 165:
+
+/* Line 1455 of yacc.c */
#line 999 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3118,6 +3292,8 @@ yyreduce:
break;
case 166:
+
+/* Line 1455 of yacc.c */
#line 1010 "../css/CSSGrammar.y"
{
CSSParserString& str = (yyvsp[(1) - (2)].string);
@@ -3130,6 +3306,8 @@ yyreduce:
break;
case 167:
+
+/* Line 1455 of yacc.c */
#line 1021 "../css/CSSGrammar.y"
{
(yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector();
@@ -3139,6 +3317,8 @@ yyreduce:
break;
case 168:
+
+/* Line 1455 of yacc.c */
#line 1026 "../css/CSSGrammar.y"
{
(yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector();
@@ -3149,6 +3329,8 @@ yyreduce:
break;
case 169:
+
+/* Line 1455 of yacc.c */
#line 1032 "../css/CSSGrammar.y"
{
AtomicString namespacePrefix = (yyvsp[(3) - (5)].string);
@@ -3161,6 +3343,8 @@ yyreduce:
break;
case 170:
+
+/* Line 1455 of yacc.c */
#line 1040 "../css/CSSGrammar.y"
{
AtomicString namespacePrefix = (yyvsp[(3) - (9)].string);
@@ -3174,6 +3358,8 @@ yyreduce:
break;
case 171:
+
+/* Line 1455 of yacc.c */
#line 1052 "../css/CSSGrammar.y"
{
(yyval.integer) = CSSSelector::Exact;
@@ -3181,6 +3367,8 @@ yyreduce:
break;
case 172:
+
+/* Line 1455 of yacc.c */
#line 1055 "../css/CSSGrammar.y"
{
(yyval.integer) = CSSSelector::List;
@@ -3188,6 +3376,8 @@ yyreduce:
break;
case 173:
+
+/* Line 1455 of yacc.c */
#line 1058 "../css/CSSGrammar.y"
{
(yyval.integer) = CSSSelector::Hyphen;
@@ -3195,6 +3385,8 @@ yyreduce:
break;
case 174:
+
+/* Line 1455 of yacc.c */
#line 1061 "../css/CSSGrammar.y"
{
(yyval.integer) = CSSSelector::Begin;
@@ -3202,6 +3394,8 @@ yyreduce:
break;
case 175:
+
+/* Line 1455 of yacc.c */
#line 1064 "../css/CSSGrammar.y"
{
(yyval.integer) = CSSSelector::End;
@@ -3209,6 +3403,8 @@ yyreduce:
break;
case 176:
+
+/* Line 1455 of yacc.c */
#line 1067 "../css/CSSGrammar.y"
{
(yyval.integer) = CSSSelector::Contain;
@@ -3216,6 +3412,8 @@ yyreduce:
break;
case 179:
+
+/* Line 1455 of yacc.c */
#line 1078 "../css/CSSGrammar.y"
{
(yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector();
@@ -3250,6 +3448,8 @@ yyreduce:
break;
case 180:
+
+/* Line 1455 of yacc.c */
#line 1108 "../css/CSSGrammar.y"
{
(yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector();
@@ -3273,6 +3473,8 @@ yyreduce:
break;
case 181:
+
+/* Line 1455 of yacc.c */
#line 1128 "../css/CSSGrammar.y"
{
CSSParser *p = static_cast<CSSParser*>(parser);
@@ -3294,6 +3496,8 @@ yyreduce:
break;
case 182:
+
+/* Line 1455 of yacc.c */
#line 1146 "../css/CSSGrammar.y"
{
CSSParser *p = static_cast<CSSParser*>(parser);
@@ -3315,6 +3519,8 @@ yyreduce:
break;
case 183:
+
+/* Line 1455 of yacc.c */
#line 1164 "../css/CSSGrammar.y"
{
CSSParser *p = static_cast<CSSParser*>(parser);
@@ -3337,6 +3543,8 @@ yyreduce:
break;
case 184:
+
+/* Line 1455 of yacc.c */
#line 1183 "../css/CSSGrammar.y"
{
if (!(yyvsp[(4) - (6)].selector) || (yyvsp[(4) - (6)].selector)->simpleSelector() || (yyvsp[(4) - (6)].selector)->tagHistory())
@@ -3353,6 +3561,8 @@ yyreduce:
break;
case 185:
+
+/* Line 1455 of yacc.c */
#line 1198 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (1)].boolean);
@@ -3360,6 +3570,8 @@ yyreduce:
break;
case 186:
+
+/* Line 1455 of yacc.c */
#line 1201 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (2)].boolean);
@@ -3369,6 +3581,8 @@ yyreduce:
break;
case 187:
+
+/* Line 1455 of yacc.c */
#line 1206 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (1)].boolean);
@@ -3376,6 +3590,8 @@ yyreduce:
break;
case 188:
+
+/* Line 1455 of yacc.c */
#line 1209 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3383,6 +3599,8 @@ yyreduce:
break;
case 189:
+
+/* Line 1455 of yacc.c */
#line 1212 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3390,6 +3608,8 @@ yyreduce:
break;
case 190:
+
+/* Line 1455 of yacc.c */
#line 1215 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (2)].boolean);
@@ -3397,6 +3617,8 @@ yyreduce:
break;
case 191:
+
+/* Line 1455 of yacc.c */
#line 1218 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (2)].boolean);
@@ -3404,6 +3626,8 @@ yyreduce:
break;
case 192:
+
+/* Line 1455 of yacc.c */
#line 1224 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (3)].boolean);
@@ -3411,6 +3635,8 @@ yyreduce:
break;
case 193:
+
+/* Line 1455 of yacc.c */
#line 1227 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3418,6 +3644,8 @@ yyreduce:
break;
case 194:
+
+/* Line 1455 of yacc.c */
#line 1230 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3425,6 +3653,8 @@ yyreduce:
break;
case 195:
+
+/* Line 1455 of yacc.c */
#line 1233 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3432,6 +3662,8 @@ yyreduce:
break;
case 196:
+
+/* Line 1455 of yacc.c */
#line 1236 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (4)].boolean);
@@ -3441,6 +3673,8 @@ yyreduce:
break;
case 197:
+
+/* Line 1455 of yacc.c */
#line 1241 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (4)].boolean);
@@ -3448,6 +3682,8 @@ yyreduce:
break;
case 198:
+
+/* Line 1455 of yacc.c */
#line 1244 "../css/CSSGrammar.y"
{
(yyval.boolean) = (yyvsp[(1) - (6)].boolean);
@@ -3455,6 +3691,8 @@ yyreduce:
break;
case 199:
+
+/* Line 1455 of yacc.c */
#line 1250 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3472,6 +3710,8 @@ yyreduce:
break;
case 200:
+
+/* Line 1455 of yacc.c */
#line 1264 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3487,6 +3727,8 @@ yyreduce:
break;
case 201:
+
+/* Line 1455 of yacc.c */
#line 1276 "../css/CSSGrammar.y"
{
(yyval.boolean) = false;
@@ -3494,6 +3736,8 @@ yyreduce:
break;
case 202:
+
+/* Line 1455 of yacc.c */
#line 1280 "../css/CSSGrammar.y"
{
/* The default movable type template has letter-spacing: .none; Handle this by looking for
@@ -3504,6 +3748,8 @@ yyreduce:
break;
case 203:
+
+/* Line 1455 of yacc.c */
#line 1287 "../css/CSSGrammar.y"
{
/* When we encounter something like p {color: red !important fail;} we should drop the declaration */
@@ -3512,6 +3758,8 @@ yyreduce:
break;
case 204:
+
+/* Line 1455 of yacc.c */
#line 1292 "../css/CSSGrammar.y"
{
/* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */
@@ -3520,6 +3768,8 @@ yyreduce:
break;
case 205:
+
+/* Line 1455 of yacc.c */
#line 1297 "../css/CSSGrammar.y"
{
/* div { font-family: } Just reduce away this property with no value. */
@@ -3528,6 +3778,8 @@ yyreduce:
break;
case 206:
+
+/* Line 1455 of yacc.c */
#line 1302 "../css/CSSGrammar.y"
{
/* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */
@@ -3536,6 +3788,8 @@ yyreduce:
break;
case 207:
+
+/* Line 1455 of yacc.c */
#line 1307 "../css/CSSGrammar.y"
{
/* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */
@@ -3544,6 +3798,8 @@ yyreduce:
break;
case 208:
+
+/* Line 1455 of yacc.c */
#line 1314 "../css/CSSGrammar.y"
{
(yyval.integer) = cssPropertyID((yyvsp[(1) - (2)].string));
@@ -3551,16 +3807,22 @@ yyreduce:
break;
case 209:
+
+/* Line 1455 of yacc.c */
#line 1320 "../css/CSSGrammar.y"
{ (yyval.boolean) = true; ;}
break;
case 210:
+
+/* Line 1455 of yacc.c */
#line 1321 "../css/CSSGrammar.y"
{ (yyval.boolean) = false; ;}
break;
case 211:
+
+/* Line 1455 of yacc.c */
#line 1325 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3570,6 +3832,8 @@ yyreduce:
break;
case 212:
+
+/* Line 1455 of yacc.c */
#line 1330 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3588,6 +3852,8 @@ yyreduce:
break;
case 213:
+
+/* Line 1455 of yacc.c */
#line 1344 "../css/CSSGrammar.y"
{
(yyval.valueList) = 0;
@@ -3595,6 +3861,8 @@ yyreduce:
break;
case 214:
+
+/* Line 1455 of yacc.c */
#line 1350 "../css/CSSGrammar.y"
{
(yyval.character) = '/';
@@ -3602,6 +3870,8 @@ yyreduce:
break;
case 215:
+
+/* Line 1455 of yacc.c */
#line 1353 "../css/CSSGrammar.y"
{
(yyval.character) = ',';
@@ -3609,6 +3879,8 @@ yyreduce:
break;
case 216:
+
+/* Line 1455 of yacc.c */
#line 1356 "../css/CSSGrammar.y"
{
(yyval.character) = 0;
@@ -3616,21 +3888,29 @@ yyreduce:
break;
case 217:
+
+/* Line 1455 of yacc.c */
#line 1362 "../css/CSSGrammar.y"
{ (yyval.value) = (yyvsp[(1) - (1)].value); ;}
break;
case 218:
+
+/* Line 1455 of yacc.c */
#line 1363 "../css/CSSGrammar.y"
{ (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;}
break;
case 219:
+
+/* Line 1455 of yacc.c */
#line 1364 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_STRING; ;}
break;
case 220:
+
+/* Line 1455 of yacc.c */
#line 1365 "../css/CSSGrammar.y"
{
(yyval.value).id = cssValueKeywordID((yyvsp[(1) - (2)].string));
@@ -3640,36 +3920,50 @@ yyreduce:
break;
case 221:
+
+/* Line 1455 of yacc.c */
#line 1371 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;}
break;
case 222:
+
+/* Line 1455 of yacc.c */
#line 1372 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = (yyvsp[(2) - (3)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;}
break;
case 223:
+
+/* Line 1455 of yacc.c */
#line 1373 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_URI; ;}
break;
case 224:
+
+/* Line 1455 of yacc.c */
#line 1374 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; ;}
break;
case 225:
+
+/* Line 1455 of yacc.c */
#line 1375 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (1)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;}
break;
case 226:
+
+/* Line 1455 of yacc.c */
#line 1376 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).string = CSSParserString(); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;}
break;
case 227:
+
+/* Line 1455 of yacc.c */
#line 1378 "../css/CSSGrammar.y"
{
(yyval.value) = (yyvsp[(1) - (1)].value);
@@ -3677,6 +3971,8 @@ yyreduce:
break;
case 228:
+
+/* Line 1455 of yacc.c */
#line 1381 "../css/CSSGrammar.y"
{
(yyval.value) = (yyvsp[(1) - (2)].value);
@@ -3684,6 +3980,8 @@ yyreduce:
break;
case 229:
+
+/* Line 1455 of yacc.c */
#line 1384 "../css/CSSGrammar.y"
{ /* Handle width: %; */
(yyval.value).id = 0; (yyval.value).unit = 0;
@@ -3691,106 +3989,148 @@ yyreduce:
break;
case 230:
+
+/* Line 1455 of yacc.c */
#line 1390 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).isInt = true; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;}
break;
case 231:
+
+/* Line 1455 of yacc.c */
#line 1391 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;}
break;
case 232:
+
+/* Line 1455 of yacc.c */
#line 1392 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PERCENTAGE; ;}
break;
case 233:
+
+/* Line 1455 of yacc.c */
#line 1393 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PX; ;}
break;
case 234:
+
+/* Line 1455 of yacc.c */
#line 1394 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_CM; ;}
break;
case 235:
+
+/* Line 1455 of yacc.c */
#line 1395 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MM; ;}
break;
case 236:
+
+/* Line 1455 of yacc.c */
#line 1396 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_IN; ;}
break;
case 237:
+
+/* Line 1455 of yacc.c */
#line 1397 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PT; ;}
break;
case 238:
+
+/* Line 1455 of yacc.c */
#line 1398 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PC; ;}
break;
case 239:
+
+/* Line 1455 of yacc.c */
#line 1399 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_DEG; ;}
break;
case 240:
+
+/* Line 1455 of yacc.c */
#line 1400 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_RAD; ;}
break;
case 241:
+
+/* Line 1455 of yacc.c */
#line 1401 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_GRAD; ;}
break;
case 242:
+
+/* Line 1455 of yacc.c */
#line 1402 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_TURN; ;}
break;
case 243:
+
+/* Line 1455 of yacc.c */
#line 1403 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MS; ;}
break;
case 244:
+
+/* Line 1455 of yacc.c */
#line 1404 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_S; ;}
break;
case 245:
+
+/* Line 1455 of yacc.c */
#line 1405 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_HZ; ;}
break;
case 246:
+
+/* Line 1455 of yacc.c */
#line 1406 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_KHZ; ;}
break;
case 247:
+
+/* Line 1455 of yacc.c */
#line 1407 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EMS; ;}
break;
case 248:
+
+/* Line 1455 of yacc.c */
#line 1408 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSParserValue::Q_EMS; ;}
break;
case 249:
+
+/* Line 1455 of yacc.c */
#line 1409 "../css/CSSGrammar.y"
{ (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EXS; ;}
break;
case 250:
+
+/* Line 1455 of yacc.c */
#line 1413 "../css/CSSGrammar.y"
{
(yyval.value).id = 0;
@@ -3800,6 +4140,8 @@ yyreduce:
break;
case 251:
+
+/* Line 1455 of yacc.c */
#line 1421 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3813,6 +4155,8 @@ yyreduce:
break;
case 252:
+
+/* Line 1455 of yacc.c */
#line 1430 "../css/CSSGrammar.y"
{
CSSParser* p = static_cast<CSSParser*>(parser);
@@ -3826,16 +4170,22 @@ yyreduce:
break;
case 253:
+
+/* Line 1455 of yacc.c */
#line 1446 "../css/CSSGrammar.y"
{ (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
case 254:
+
+/* Line 1455 of yacc.c */
#line 1447 "../css/CSSGrammar.y"
{ (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
case 255:
+
+/* Line 1455 of yacc.c */
#line 1454 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3843,6 +4193,8 @@ yyreduce:
break;
case 256:
+
+/* Line 1455 of yacc.c */
#line 1457 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3850,6 +4202,8 @@ yyreduce:
break;
case 257:
+
+/* Line 1455 of yacc.c */
#line 1463 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3857,6 +4211,8 @@ yyreduce:
break;
case 258:
+
+/* Line 1455 of yacc.c */
#line 1466 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3864,6 +4220,8 @@ yyreduce:
break;
case 261:
+
+/* Line 1455 of yacc.c */
#line 1477 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3871,6 +4229,8 @@ yyreduce:
break;
case 262:
+
+/* Line 1455 of yacc.c */
#line 1483 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3878,6 +4238,8 @@ yyreduce:
break;
case 263:
+
+/* Line 1455 of yacc.c */
#line 1489 "../css/CSSGrammar.y"
{
(yyval.rule) = 0;
@@ -3885,8 +4247,9 @@ yyreduce:
break;
-/* Line 1267 of yacc.c. */
-#line 3890 "WebCore/tmp/../generated/CSSGrammar.tab.c"
+
+/* Line 1455 of yacc.c */
+#line 4253 "WebCore/tmp/../generated/CSSGrammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -3897,7 +4260,6 @@ yyreduce:
*++yyvsp = yyval;
-
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -3962,7 +4324,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -3979,7 +4341,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -4036,9 +4398,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
@@ -4063,7 +4422,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -4074,7 +4433,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
@@ -4100,6 +4459,8 @@ yyreturn:
}
+
+/* Line 1675 of yacc.c */
#line 1516 "../css/CSSGrammar.y"
diff --git a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h
index 61ba1f5..4223680 100644
--- a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h
+++ b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h
@@ -1,26 +1,25 @@
#ifndef CSSGRAMMAR_H
#define CSSGRAMMAR_H
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -31,10 +30,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -106,78 +106,16 @@
VARCALL = 319
};
#endif
-/* Tokens. */
-#define TOKEN_EOF 0
-#define LOWEST_PREC 258
-#define UNIMPORTANT_TOK 259
-#define WHITESPACE 260
-#define SGML_CD 261
-#define INCLUDES 262
-#define DASHMATCH 263
-#define BEGINSWITH 264
-#define ENDSWITH 265
-#define CONTAINS 266
-#define STRING 267
-#define IDENT 268
-#define NTH 269
-#define HEX 270
-#define IDSEL 271
-#define IMPORT_SYM 272
-#define PAGE_SYM 273
-#define MEDIA_SYM 274
-#define FONT_FACE_SYM 275
-#define CHARSET_SYM 276
-#define NAMESPACE_SYM 277
-#define WEBKIT_RULE_SYM 278
-#define WEBKIT_DECLS_SYM 279
-#define WEBKIT_KEYFRAME_RULE_SYM 280
-#define WEBKIT_KEYFRAMES_SYM 281
-#define WEBKIT_VALUE_SYM 282
-#define WEBKIT_MEDIAQUERY_SYM 283
-#define WEBKIT_SELECTOR_SYM 284
-#define WEBKIT_VARIABLES_SYM 285
-#define WEBKIT_DEFINE_SYM 286
-#define VARIABLES_FOR 287
-#define WEBKIT_VARIABLES_DECLS_SYM 288
-#define ATKEYWORD 289
-#define IMPORTANT_SYM 290
-#define MEDIA_ONLY 291
-#define MEDIA_NOT 292
-#define MEDIA_AND 293
-#define QEMS 294
-#define EMS 295
-#define EXS 296
-#define PXS 297
-#define CMS 298
-#define MMS 299
-#define INS 300
-#define PTS 301
-#define PCS 302
-#define DEGS 303
-#define RADS 304
-#define GRADS 305
-#define TURNS 306
-#define MSECS 307
-#define SECS 308
-#define HERZ 309
-#define KHERZ 310
-#define DIMEN 311
-#define PERCENTAGE 312
-#define FLOATTOKEN 313
-#define INTEGER 314
-#define URI 315
-#define FUNCTION 316
-#define NOTFUNCTION 317
-#define UNICODERANGE 318
-#define VARCALL 319
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 58 "../css/CSSGrammar.y"
{
+
+/* Line 1676 of yacc.c */
+#line 58 "../css/CSSGrammar.y"
+
bool boolean;
char character;
int integer;
@@ -199,15 +137,18 @@ typedef union YYSTYPE
WebKitCSSKeyframeRule* keyframeRule;
WebKitCSSKeyframesRule* keyframesRule;
float val;
-}
-/* Line 1489 of yacc.c. */
-#line 203 "WebCore/tmp/../generated/CSSGrammar.tab.h"
- YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c */
+#line 143 "WebCore/tmp/../generated/CSSGrammar.tab.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c
index e84ca9e..6362110 100644
--- a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c
+++ b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c
@@ -84,6 +84,9 @@ hash_val (register const char *str, register unsigned int len)
switch (len)
{
default:
+ hval += asso_values[(unsigned char)str[30]];
+ /*FALLTHROUGH*/
+ case 30:
hval += asso_values[(unsigned char)str[29]];
/*FALLTHROUGH*/
case 29:
@@ -188,9 +191,9 @@ findValue (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 537,
+ TOTAL_KEYWORDS = 539,
MIN_WORD_LENGTH = 2,
- MAX_WORD_LENGTH = 30,
+ MAX_WORD_LENGTH = 31,
MIN_HASH_VALUE = 0,
MAX_HASH_VALUE = 8751
};
@@ -203,7 +206,7 @@ findValue (register const char *str, register unsigned int len)
{"300", CSSValue300},
#line 287 "CSSValueKeywords.gperf"
{"end", CSSValueEnd},
-#line 545 "CSSValueKeywords.gperf"
+#line 547 "CSSValueKeywords.gperf"
{"lr", CSSValueLr},
#line 48 "CSSValueKeywords.gperf"
{"900", CSSValue900},
@@ -211,7 +214,7 @@ findValue (register const char *str, register unsigned int len)
{"hide", CSSValueHide},
#line 47 "CSSValueKeywords.gperf"
{"800", CSSValue800},
-#line 369 "CSSValueKeywords.gperf"
+#line 371 "CSSValueKeywords.gperf"
{"lines", CSSValueLines},
#line 46 "CSSValueKeywords.gperf"
{"700", CSSValue700},
@@ -229,23 +232,23 @@ findValue (register const char *str, register unsigned int len)
{"circle", CSSValueCircle},
#line 43 "CSSValueKeywords.gperf"
{"400", CSSValue400},
-#line 463 "CSSValueKeywords.gperf"
+#line 465 "CSSValueKeywords.gperf"
{"linen", CSSValueLinen},
#line 41 "CSSValueKeywords.gperf"
{"200", CSSValue200},
-#line 479 "CSSValueKeywords.gperf"
+#line 481 "CSSValueKeywords.gperf"
{"oldlace", CSSValueOldlace},
#line 252 "CSSValueKeywords.gperf"
{"cross", CSSValueCross},
-#line 400 "CSSValueKeywords.gperf"
+#line 402 "CSSValueKeywords.gperf"
{"coral", CSSValueCoral},
#line 312 "CSSValueKeywords.gperf"
{"clip", CSSValueClip},
#line 13 "CSSValueKeywords.gperf"
{"none", CSSValueNone},
-#line 403 "CSSValueKeywords.gperf"
+#line 405 "CSSValueKeywords.gperf"
{"crimson", CSSValueCrimson},
-#line 547 "CSSValueKeywords.gperf"
+#line 549 "CSSValueKeywords.gperf"
{"tb", CSSValueTb},
#line 251 "CSSValueKeywords.gperf"
{"crop", CSSValueCrop},
@@ -255,7 +258,7 @@ findValue (register const char *str, register unsigned int len)
{"inline", CSSValueInline},
#line 176 "CSSValueKeywords.gperf"
{"armenian", CSSValueArmenian},
-#line 367 "CSSValueKeywords.gperf"
+#line 369 "CSSValueKeywords.gperf"
{"logical", CSSValueLogical},
#line 241 "CSSValueKeywords.gperf"
{"collapse", CSSValueCollapse},
@@ -271,13 +274,13 @@ findValue (register const char *str, register unsigned int len)
{"initial", CSSValueInitial},
#line 215 "CSSValueKeywords.gperf"
{"e-resize", CSSValueEResize},
-#line 546 "CSSValueKeywords.gperf"
+#line 548 "CSSValueKeywords.gperf"
{"rl", CSSValueRl},
#line 221 "CSSValueKeywords.gperf"
{"s-resize", CSSValueSResize},
-#line 375 "CSSValueKeywords.gperf"
+#line 377 "CSSValueKeywords.gperf"
{"linear", CSSValueLinear},
-#line 505 "CSSValueKeywords.gperf"
+#line 507 "CSSValueKeywords.gperf"
{"snow", CSSValueSnow},
#line 205 "CSSValueKeywords.gperf"
{"move", CSSValueMove},
@@ -287,29 +290,29 @@ findValue (register const char *str, register unsigned int len)
{"slow", CSSValueSlow},
#line 218 "CSSValueKeywords.gperf"
{"n-resize", CSSValueNResize},
-#line 509 "CSSValueKeywords.gperf"
+#line 511 "CSSValueKeywords.gperf"
{"thistle", CSSValueThistle},
-#line 455 "CSSValueKeywords.gperf"
+#line 457 "CSSValueKeywords.gperf"
{"lightsalmon", CSSValueLightsalmon},
-#line 399 "CSSValueKeywords.gperf"
+#line 401 "CSSValueKeywords.gperf"
{"chocolate", CSSValueChocolate},
#line 279 "CSSValueKeywords.gperf"
{"show", CSSValueShow},
#line 257 "CSSValueKeywords.gperf"
{"higher", CSSValueHigher},
-#line 520 "CSSValueKeywords.gperf"
+#line 522 "CSSValueKeywords.gperf"
{"srgb", CSSValueSrgb},
#line 187 "CSSValueKeywords.gperf"
{"compact", CSSValueCompact},
#line 309 "CSSValueKeywords.gperf"
{"ignore", CSSValueIgnore},
-#line 510 "CSSValueKeywords.gperf"
+#line 512 "CSSValueKeywords.gperf"
{"tomato", CSSValueTomato},
#line 90 "CSSValueKeywords.gperf"
{"white", CSSValueWhite},
#line 51 "CSSValueKeywords.gperf"
{"small", CSSValueSmall},
-#line 362 "CSSValueKeywords.gperf"
+#line 364 "CSSValueKeywords.gperf"
{"content", CSSValueContent},
#line 285 "CSSValueKeywords.gperf"
{"stretch", CSSValueStretch},
@@ -317,15 +320,15 @@ findValue (register const char *str, register unsigned int len)
{"maroon", CSSValueMaroon},
#line 293 "CSSValueKeywords.gperf"
{"single", CSSValueSingle},
-#line 374 "CSSValueKeywords.gperf"
+#line 376 "CSSValueKeywords.gperf"
{"ease", CSSValueEase},
#line 155 "CSSValueKeywords.gperf"
{"right", CSSValueRight},
-#line 496 "CSSValueKeywords.gperf"
+#line 498 "CSSValueKeywords.gperf"
{"salmon", CSSValueSalmon},
-#line 508 "CSSValueKeywords.gperf"
+#line 510 "CSSValueKeywords.gperf"
{"tan", CSSValueTan},
-#line 544 "CSSValueKeywords.gperf"
+#line 546 "CSSValueKeywords.gperf"
{"tb-rl", CSSValueTbRl},
#line 39 "CSSValueKeywords.gperf"
{"lighter", CSSValueLighter},
@@ -333,39 +336,39 @@ findValue (register const char *str, register unsigned int len)
{"crosshair", CSSValueCrosshair},
#line 59 "CSSValueKeywords.gperf"
{"wider", CSSValueWider},
-#line 351 "CSSValueKeywords.gperf"
+#line 353 "CSSValueKeywords.gperf"
{"caret", CSSValueCaret},
#line 189 "CSSValueKeywords.gperf"
{"table", CSSValueTable},
#line 332 "CSSValueKeywords.gperf"
{"listitem", CSSValueListitem},
-#line 475 "CSSValueKeywords.gperf"
+#line 477 "CSSValueKeywords.gperf"
{"mintcream", CSSValueMintcream},
#line 222 "CSSValueKeywords.gperf"
{"w-resize", CSSValueWResize},
-#line 542 "CSSValueKeywords.gperf"
+#line 544 "CSSValueKeywords.gperf"
{"lr-tb", CSSValueLrTb},
#line 179 "CSSValueKeywords.gperf"
{"hiragana", CSSValueHiragana},
#line 236 "CSSValueKeywords.gperf"
{"rtl", CSSValueRtl},
-#line 527 "CSSValueKeywords.gperf"
+#line 529 "CSSValueKeywords.gperf"
{"miter", CSSValueMiter},
-#line 448 "CSSValueKeywords.gperf"
+#line 450 "CSSValueKeywords.gperf"
{"lightcoral", CSSValueLightcoral},
-#line 440 "CSSValueKeywords.gperf"
+#line 442 "CSSValueKeywords.gperf"
{"indigo", CSSValueIndigo},
#line 243 "CSSValueKeywords.gperf"
{"absolute", CSSValueAbsolute},
#line 289 "CSSValueKeywords.gperf"
{"horizontal", CSSValueHorizontal},
-#line 404 "CSSValueKeywords.gperf"
+#line 406 "CSSValueKeywords.gperf"
{"cyan", CSSValueCyan},
#line 11 "CSSValueKeywords.gperf"
{"inherit", CSSValueInherit},
-#line 464 "CSSValueKeywords.gperf"
+#line 466 "CSSValueKeywords.gperf"
{"magenta", CSSValueMagenta},
-#line 516 "CSSValueKeywords.gperf"
+#line 518 "CSSValueKeywords.gperf"
{"nonzero", CSSValueNonzero},
#line 204 "CSSValueKeywords.gperf"
{"pointer", CSSValuePointer},
@@ -373,7 +376,7 @@ findValue (register const char *str, register unsigned int len)
{"underline", CSSValueUnderline},
#line 130 "CSSValueKeywords.gperf"
{"no-repeat", CSSValueNoRepeat},
-#line 387 "CSSValueKeywords.gperf"
+#line 389 "CSSValueKeywords.gperf"
{"aliceblue", CSSValueAliceblue},
#line 112 "CSSValueKeywords.gperf"
{"match", CSSValueMatch},
@@ -385,13 +388,13 @@ findValue (register const char *str, register unsigned int len)
{"ridge", CSSValueRidge},
#line 57 "CSSValueKeywords.gperf"
{"smaller", CSSValueSmaller},
-#line 395 "CSSValueKeywords.gperf"
+#line 397 "CSSValueKeywords.gperf"
{"brown", CSSValueBrown},
#line 230 "CSSValueKeywords.gperf"
{"wait", CSSValueWait},
#line 258 "CSSValueKeywords.gperf"
{"invert", CSSValueInvert},
-#line 540 "CSSValueKeywords.gperf"
+#line 542 "CSSValueKeywords.gperf"
{"no-change", CSSValueNoChange},
#line 32 "CSSValueKeywords.gperf"
{"italic", CSSValueItalic},
@@ -409,17 +412,17 @@ findValue (register const char *str, register unsigned int len)
{"intrinsic", CSSValueIntrinsic},
#line 317 "CSSValueKeywords.gperf"
{"wave", CSSValueWave},
-#line 501 "CSSValueKeywords.gperf"
+#line 503 "CSSValueKeywords.gperf"
{"skyblue", CSSValueSkyblue},
#line 302 "CSSValueKeywords.gperf"
{"infinite", CSSValueInfinite},
#line 280 "CSSValueKeywords.gperf"
{"static", CSSValueStatic},
-#line 462 "CSSValueKeywords.gperf"
+#line 464 "CSSValueKeywords.gperf"
{"limegreen", CSSValueLimegreen},
-#line 543 "CSSValueKeywords.gperf"
+#line 545 "CSSValueKeywords.gperf"
{"rl-tb", CSSValueRlTb},
-#line 447 "CSSValueKeywords.gperf"
+#line 449 "CSSValueKeywords.gperf"
{"lightblue", CSSValueLightblue},
#line 85 "CSSValueKeywords.gperf"
{"orange", CSSValueOrange},
@@ -429,23 +432,23 @@ findValue (register const char *str, register unsigned int len)
{"progress", CSSValueProgress},
#line 318 "CSSValueKeywords.gperf"
{"continuous", CSSValueContinuous},
-#line 385 "CSSValueKeywords.gperf"
+#line 387 "CSSValueKeywords.gperf"
{"fill", CSSValueFill},
#line 144 "CSSValueKeywords.gperf"
{"baseline", CSSValueBaseline},
-#line 538 "CSSValueKeywords.gperf"
+#line 540 "CSSValueKeywords.gperf"
{"mathematical", CSSValueMathematical},
#line 207 "CSSValueKeywords.gperf"
{"cell", CSSValueCell},
#line 273 "CSSValueKeywords.gperf"
{"pre", CSSValuePre},
-#line 452 "CSSValueKeywords.gperf"
+#line 454 "CSSValueKeywords.gperf"
{"lightgreen", CSSValueLightgreen},
-#line 460 "CSSValueKeywords.gperf"
+#line 462 "CSSValueKeywords.gperf"
{"lightsteelblue", CSSValueLightsteelblue},
-#line 456 "CSSValueKeywords.gperf"
+#line 458 "CSSValueKeywords.gperf"
{"lightseagreen", CSSValueLightseagreen},
-#line 500 "CSSValueKeywords.gperf"
+#line 502 "CSSValueKeywords.gperf"
{"sienna", CSSValueSienna},
#line 286 "CSSValueKeywords.gperf"
{"start", CSSValueStart},
@@ -465,11 +468,11 @@ findValue (register const char *str, register unsigned int len)
{"transparent", CSSValueTransparent},
#line 14 "CSSValueKeywords.gperf"
{"hidden", CSSValueHidden},
-#line 397 "CSSValueKeywords.gperf"
+#line 399 "CSSValueKeywords.gperf"
{"cadetblue", CSSValueCadetblue},
-#line 478 "CSSValueKeywords.gperf"
+#line 480 "CSSValueKeywords.gperf"
{"navajowhite", CSSValueNavajowhite},
-#line 502 "CSSValueKeywords.gperf"
+#line 504 "CSSValueKeywords.gperf"
{"slateblue", CSSValueSlateblue},
#line 308 "CSSValueKeywords.gperf"
{"element", CSSValueElement},
@@ -477,11 +480,11 @@ findValue (register const char *str, register unsigned int len)
{"level", CSSValueLevel},
#line 87 "CSSValueKeywords.gperf"
{"red", CSSValueRed},
-#line 494 "CSSValueKeywords.gperf"
+#line 496 "CSSValueKeywords.gperf"
{"royalblue", CSSValueRoyalblue},
#line 163 "CSSValueKeywords.gperf"
{"disc", CSSValueDisc},
-#line 433 "CSSValueKeywords.gperf"
+#line 435 "CSSValueKeywords.gperf"
{"ghostwhite", CSSValueGhostwhite},
#line 25 "CSSValueKeywords.gperf"
{"menu", CSSValueMenu},
@@ -491,37 +494,37 @@ findValue (register const char *str, register unsigned int len)
{"icon", CSSValueIcon},
#line 60 "CSSValueKeywords.gperf"
{"narrower", CSSValueNarrower},
-#line 484 "CSSValueKeywords.gperf"
+#line 486 "CSSValueKeywords.gperf"
{"palegreen", CSSValuePalegreen},
-#line 489 "CSSValueKeywords.gperf"
+#line 491 "CSSValueKeywords.gperf"
{"peru", CSSValuePeru},
#line 131 "CSSValueKeywords.gperf"
{"clear", CSSValueClear},
#line 52 "CSSValueKeywords.gperf"
{"medium", CSSValueMedium},
-#line 477 "CSSValueKeywords.gperf"
+#line 479 "CSSValueKeywords.gperf"
{"moccasin", CSSValueMoccasin},
#line 162 "CSSValueKeywords.gperf"
{"inside", CSSValueInside},
-#line 499 "CSSValueKeywords.gperf"
+#line 501 "CSSValueKeywords.gperf"
{"seashell", CSSValueSeashell},
-#line 513 "CSSValueKeywords.gperf"
+#line 515 "CSSValueKeywords.gperf"
{"wheat", CSSValueWheat},
#line 150 "CSSValueKeywords.gperf"
{"top", CSSValueTop},
#line 156 "CSSValueKeywords.gperf"
{"center", CSSValueCenter},
-#line 474 "CSSValueKeywords.gperf"
+#line 476 "CSSValueKeywords.gperf"
{"midnightblue", CSSValueMidnightblue},
-#line 532 "CSSValueKeywords.gperf"
+#line 534 "CSSValueKeywords.gperf"
{"central", CSSValueCentral},
#line 298 "CSSValueKeywords.gperf"
{"up", CSSValueUp},
-#line 521 "CSSValueKeywords.gperf"
+#line 523 "CSSValueKeywords.gperf"
{"linearrgb", CSSValueLinearrgb},
-#line 537 "CSSValueKeywords.gperf"
+#line 539 "CSSValueKeywords.gperf"
{"hanging", CSSValueHanging},
-#line 398 "CSSValueKeywords.gperf"
+#line 400 "CSSValueKeywords.gperf"
{"chartreuse", CSSValueChartreuse},
#line 80 "CSSValueKeywords.gperf"
{"green", CSSValueGreen},
@@ -529,13 +532,13 @@ findValue (register const char *str, register unsigned int len)
{"teal", CSSValueTeal},
#line 245 "CSSValueKeywords.gperf"
{"avoid", CSSValueAvoid},
-#line 372 "CSSValueKeywords.gperf"
+#line 374 "CSSValueKeywords.gperf"
{"flat", CSSValueFlat},
-#line 343 "CSSValueKeywords.gperf"
+#line 345 "CSSValueKeywords.gperf"
{"menulist", CSSValueMenulist},
#line 255 "CSSValueKeywords.gperf"
{"hand", CSSValueHand},
-#line 380 "CSSValueKeywords.gperf"
+#line 382 "CSSValueKeywords.gperf"
{"reset", CSSValueReset},
#line 175 "CSSValueKeywords.gperf"
{"hebrew", CSSValueHebrew},
@@ -545,11 +548,11 @@ findValue (register const char *str, register unsigned int len)
{"bold", CSSValueBold},
#line 154 "CSSValueKeywords.gperf"
{"left", CSSValueLeft},
-#line 528 "CSSValueKeywords.gperf"
+#line 530 "CSSValueKeywords.gperf"
{"bevel", CSSValueBevel},
-#line 439 "CSSValueKeywords.gperf"
+#line 441 "CSSValueKeywords.gperf"
{"indianred", CSSValueIndianred},
-#line 432 "CSSValueKeywords.gperf"
+#line 434 "CSSValueKeywords.gperf"
{"gainsboro", CSSValueGainsboro},
#line 322 "CSSValueKeywords.gperf"
{"space", CSSValueSpace},
@@ -567,17 +570,17 @@ findValue (register const char *str, register unsigned int len)
{"window", CSSValueWindow},
#line 271 "CSSValueKeywords.gperf"
{"overline", CSSValueOverline},
-#line 434 "CSSValueKeywords.gperf"
+#line 436 "CSSValueKeywords.gperf"
{"gold", CSSValueGold},
#line 211 "CSSValueKeywords.gperf"
{"no-drop", CSSValueNoDrop},
-#line 524 "CSSValueKeywords.gperf"
+#line 526 "CSSValueKeywords.gperf"
{"crispedges", CSSValueCrispedges},
-#line 384 "CSSValueKeywords.gperf"
+#line 386 "CSSValueKeywords.gperf"
{"painted", CSSValuePainted},
-#line 490 "CSSValueKeywords.gperf"
+#line 492 "CSSValueKeywords.gperf"
{"pink", CSSValuePink},
-#line 391 "CSSValueKeywords.gperf"
+#line 393 "CSSValueKeywords.gperf"
{"beige", CSSValueBeige},
#line 141 "CSSValueKeywords.gperf"
{"xor", CSSValueXor},
@@ -591,7 +594,7 @@ findValue (register const char *str, register unsigned int len)
{"mix", CSSValueMix},
#line 114 "CSSValueKeywords.gperf"
{"scrollbar", CSSValueScrollbar},
-#line 361 "CSSValueKeywords.gperf"
+#line 363 "CSSValueKeywords.gperf"
{"border", CSSValueBorder},
#line 38 "CSSValueKeywords.gperf"
{"bolder", CSSValueBolder},
@@ -599,41 +602,41 @@ findValue (register const char *str, register unsigned int len)
{"caption", CSSValueCaption},
#line 242 "CSSValueKeywords.gperf"
{"above", CSSValueAbove},
-#line 430 "CSSValueKeywords.gperf"
+#line 432 "CSSValueKeywords.gperf"
{"floralwhite", CSSValueFloralwhite},
-#line 507 "CSSValueKeywords.gperf"
+#line 509 "CSSValueKeywords.gperf"
{"steelblue", CSSValueSteelblue},
-#line 536 "CSSValueKeywords.gperf"
+#line 538 "CSSValueKeywords.gperf"
{"alphabetic", CSSValueAlphabetic},
#line 281 "CSSValueKeywords.gperf"
{"thick", CSSValueThick},
-#line 491 "CSSValueKeywords.gperf"
+#line 493 "CSSValueKeywords.gperf"
{"plum", CSSValuePlum},
-#line 402 "CSSValueKeywords.gperf"
+#line 404 "CSSValueKeywords.gperf"
{"cornsilk", CSSValueCornsilk},
#line 86 "CSSValueKeywords.gperf"
{"purple", CSSValuePurple},
-#line 386 "CSSValueKeywords.gperf"
+#line 388 "CSSValueKeywords.gperf"
{"stroke", CSSValueStroke},
#line 50 "CSSValueKeywords.gperf"
{"x-small", CSSValueXSmall},
#line 69 "CSSValueKeywords.gperf"
{"serif", CSSValueSerif},
-#line 392 "CSSValueKeywords.gperf"
+#line 394 "CSSValueKeywords.gperf"
{"bisque", CSSValueBisque},
-#line 466 "CSSValueKeywords.gperf"
+#line 468 "CSSValueKeywords.gperf"
{"mediumblue", CSSValueMediumblue},
-#line 431 "CSSValueKeywords.gperf"
+#line 433 "CSSValueKeywords.gperf"
{"forestgreen", CSSValueForestgreen},
-#line 535 "CSSValueKeywords.gperf"
+#line 537 "CSSValueKeywords.gperf"
{"ideographic", CSSValueIdeographic},
-#line 512 "CSSValueKeywords.gperf"
+#line 514 "CSSValueKeywords.gperf"
{"violet", CSSValueViolet},
#line 201 "CSSValueKeywords.gperf"
{"auto", CSSValueAuto},
-#line 390 "CSSValueKeywords.gperf"
+#line 392 "CSSValueKeywords.gperf"
{"azure", CSSValueAzure},
-#line 443 "CSSValueKeywords.gperf"
+#line 445 "CSSValueKeywords.gperf"
{"lavender", CSSValueLavender},
#line 75 "CSSValueKeywords.gperf"
{"aqua", CSSValueAqua},
@@ -641,23 +644,23 @@ findValue (register const char *str, register unsigned int len)
{"lower", CSSValueLower},
#line 237 "CSSValueKeywords.gperf"
{"capitalize", CSSValueCapitalize},
-#line 468 "CSSValueKeywords.gperf"
+#line 470 "CSSValueKeywords.gperf"
{"mediumpurple", CSSValueMediumpurple},
#line 88 "CSSValueKeywords.gperf"
{"silver", CSSValueSilver},
-#line 454 "CSSValueKeywords.gperf"
+#line 456 "CSSValueKeywords.gperf"
{"lightpink", CSSValueLightpink},
#line 297 "CSSValueKeywords.gperf"
{"ahead", CSSValueAhead},
-#line 363 "CSSValueKeywords.gperf"
+#line 365 "CSSValueKeywords.gperf"
{"padding", CSSValuePadding},
-#line 449 "CSSValueKeywords.gperf"
+#line 451 "CSSValueKeywords.gperf"
{"lightcyan", CSSValueLightcyan},
#line 248 "CSSValueKeywords.gperf"
{"blink", CSSValueBlink},
#line 239 "CSSValueKeywords.gperf"
{"lowercase", CSSValueLowercase},
-#line 498 "CSSValueKeywords.gperf"
+#line 500 "CSSValueKeywords.gperf"
{"seagreen", CSSValueSeagreen},
#line 294 "CSSValueKeywords.gperf"
{"multiple", CSSValueMultiple},
@@ -665,41 +668,41 @@ findValue (register const char *str, register unsigned int len)
{"blue", CSSValueBlue},
#line 184 "CSSValueKeywords.gperf"
{"block", CSSValueBlock},
-#line 469 "CSSValueKeywords.gperf"
+#line 471 "CSSValueKeywords.gperf"
{"mediumseagreen", CSSValueMediumseagreen},
-#line 470 "CSSValueKeywords.gperf"
+#line 472 "CSSValueKeywords.gperf"
{"mediumslateblue", CSSValueMediumslateblue},
-#line 514 "CSSValueKeywords.gperf"
+#line 516 "CSSValueKeywords.gperf"
{"whitesmoke", CSSValueWhitesmoke},
#line 18 "CSSValueKeywords.gperf"
{"outset", CSSValueOutset},
-#line 368 "CSSValueKeywords.gperf"
+#line 370 "CSSValueKeywords.gperf"
{"visual", CSSValueVisual},
#line 268 "CSSValueKeywords.gperf"
{"nowrap", CSSValueNowrap},
#line 232 "CSSValueKeywords.gperf"
{"all-scroll", CSSValueAllScroll},
-#line 438 "CSSValueKeywords.gperf"
+#line 440 "CSSValueKeywords.gperf"
{"hotpink", CSSValueHotpink},
#line 116 "CSSValueKeywords.gperf"
{"threedface", CSSValueThreedface},
-#line 481 "CSSValueKeywords.gperf"
+#line 483 "CSSValueKeywords.gperf"
{"orangered", CSSValueOrangered},
-#line 482 "CSSValueKeywords.gperf"
+#line 484 "CSSValueKeywords.gperf"
{"orchid", CSSValueOrchid},
#line 223 "CSSValueKeywords.gperf"
{"ew-resize", CSSValueEwResize},
#line 220 "CSSValueKeywords.gperf"
{"sw-resize", CSSValueSwResize},
-#line 388 "CSSValueKeywords.gperf"
+#line 390 "CSSValueKeywords.gperf"
{"antiquewhite", CSSValueAntiquewhite},
-#line 461 "CSSValueKeywords.gperf"
+#line 463 "CSSValueKeywords.gperf"
{"lightyellow", CSSValueLightyellow},
#line 16 "CSSValueKeywords.gperf"
{"groove", CSSValueGroove},
#line 185 "CSSValueKeywords.gperf"
{"list-item", CSSValueListItem},
-#line 401 "CSSValueKeywords.gperf"
+#line 403 "CSSValueKeywords.gperf"
{"cornflowerblue", CSSValueCornflowerblue},
#line 217 "CSSValueKeywords.gperf"
{"nw-resize", CSSValueNwResize},
@@ -717,35 +720,35 @@ findValue (register const char *str, register unsigned int len)
{"listbox", CSSValueListbox},
#line 197 "CSSValueKeywords.gperf"
{"table-cell", CSSValueTableCell},
-#line 376 "CSSValueKeywords.gperf"
+#line 378 "CSSValueKeywords.gperf"
{"ease-in", CSSValueEaseIn},
-#line 476 "CSSValueKeywords.gperf"
+#line 478 "CSSValueKeywords.gperf"
{"mistyrose", CSSValueMistyrose},
#line 83 "CSSValueKeywords.gperf"
{"navy", CSSValueNavy},
#line 76 "CSSValueKeywords.gperf"
{"black", CSSValueBlack},
-#line 495 "CSSValueKeywords.gperf"
+#line 497 "CSSValueKeywords.gperf"
{"saddlebrown", CSSValueSaddlebrown},
-#line 441 "CSSValueKeywords.gperf"
+#line 443 "CSSValueKeywords.gperf"
{"ivory", CSSValueIvory},
#line 227 "CSSValueKeywords.gperf"
{"col-resize", CSSValueColResize},
-#line 389 "CSSValueKeywords.gperf"
+#line 391 "CSSValueKeywords.gperf"
{"aquamarine", CSSValueAquamarine},
#line 54 "CSSValueKeywords.gperf"
{"x-large", CSSValueXLarge},
-#line 526 "CSSValueKeywords.gperf"
+#line 528 "CSSValueKeywords.gperf"
{"butt", CSSValueButt},
#line 111 "CSSValueKeywords.gperf"
{"infotext", CSSValueInfotext},
#line 190 "CSSValueKeywords.gperf"
{"inline-table", CSSValueInlineTable},
-#line 428 "CSSValueKeywords.gperf"
+#line 430 "CSSValueKeywords.gperf"
{"dodgerblue", CSSValueDodgerblue},
#line 127 "CSSValueKeywords.gperf"
{"repeat", CSSValueRepeat},
-#line 506 "CSSValueKeywords.gperf"
+#line 508 "CSSValueKeywords.gperf"
{"springgreen", CSSValueSpringgreen},
#line 278 "CSSValueKeywords.gperf"
{"separate", CSSValueSeparate},
@@ -765,33 +768,33 @@ findValue (register const char *str, register unsigned int len)
{"dotted", CSSValueDotted},
#line 124 "CSSValueKeywords.gperf"
{"currentcolor", CSSValueCurrentcolor},
-#line 525 "CSSValueKeywords.gperf"
+#line 527 "CSSValueKeywords.gperf"
{"geometricprecision", CSSValueGeometricprecision},
#line 295 "CSSValueKeywords.gperf"
{"forwards", CSSValueForwards},
-#line 519 "CSSValueKeywords.gperf"
+#line 521 "CSSValueKeywords.gperf"
{"new", CSSValueNew},
-#line 370 "CSSValueKeywords.gperf"
+#line 372 "CSSValueKeywords.gperf"
{"running", CSSValueRunning},
#line 119 "CSSValueKeywords.gperf"
{"threedshadow", CSSValueThreedshadow},
#line 20 "CSSValueKeywords.gperf"
{"dashed", CSSValueDashed},
-#line 377 "CSSValueKeywords.gperf"
+#line 379 "CSSValueKeywords.gperf"
{"ease-out", CSSValueEaseOut},
#line 198 "CSSValueKeywords.gperf"
{"table-caption", CSSValueTableCaption},
-#line 485 "CSSValueKeywords.gperf"
+#line 487 "CSSValueKeywords.gperf"
{"paleturquoise", CSSValuePaleturquoise},
-#line 379 "CSSValueKeywords.gperf"
+#line 381 "CSSValueKeywords.gperf"
{"document", CSSValueDocument},
#line 196 "CSSValueKeywords.gperf"
{"table-column", CSSValueTableColumn},
-#line 444 "CSSValueKeywords.gperf"
+#line 446 "CSSValueKeywords.gperf"
{"lavenderblush", CSSValueLavenderblush},
-#line 453 "CSSValueKeywords.gperf"
+#line 455 "CSSValueKeywords.gperf"
{"lightgrey", CSSValueLightgrey},
-#line 451 "CSSValueKeywords.gperf"
+#line 453 "CSSValueKeywords.gperf"
{"lightgray", CSSValueLightgray},
#line 181 "CSSValueKeywords.gperf"
{"hiragana-iroha", CSSValueHiraganaIroha},
@@ -799,7 +802,7 @@ findValue (register const char *str, register unsigned int len)
{"highlighttext", CSSValueHighlighttext},
#line 108 "CSSValueKeywords.gperf"
{"inactivecaption", CSSValueInactivecaption},
-#line 467 "CSSValueKeywords.gperf"
+#line 469 "CSSValueKeywords.gperf"
{"mediumorchid", CSSValueMediumorchid},
#line 194 "CSSValueKeywords.gperf"
{"table-row", CSSValueTableRow},
@@ -807,25 +810,25 @@ findValue (register const char *str, register unsigned int len)
{"windowframe", CSSValueWindowframe},
#line 299 "CSSValueKeywords.gperf"
{"down", CSSValueDown},
-#line 518 "CSSValueKeywords.gperf"
+#line 520 "CSSValueKeywords.gperf"
{"accumulate", CSSValueAccumulate},
#line 203 "CSSValueKeywords.gperf"
{"default", CSSValueDefault},
-#line 445 "CSSValueKeywords.gperf"
+#line 447 "CSSValueKeywords.gperf"
{"lawngreen", CSSValueLawngreen},
#line 262 "CSSValueKeywords.gperf"
{"loud", CSSValueLoud},
#line 274 "CSSValueKeywords.gperf"
{"pre-line", CSSValuePreLine},
-#line 459 "CSSValueKeywords.gperf"
+#line 461 "CSSValueKeywords.gperf"
{"lightslategrey", CSSValueLightslategrey},
-#line 458 "CSSValueKeywords.gperf"
+#line 460 "CSSValueKeywords.gperf"
{"lightslategray", CSSValueLightslategray},
#line 290 "CSSValueKeywords.gperf"
{"vertical", CSSValueVertical},
#line 238 "CSSValueKeywords.gperf"
{"uppercase", CSSValueUppercase},
-#line 522 "CSSValueKeywords.gperf"
+#line 524 "CSSValueKeywords.gperf"
{"optimizespeed", CSSValueOptimizespeed},
#line 229 "CSSValueKeywords.gperf"
{"text", CSSValueText},
@@ -835,17 +838,17 @@ findValue (register const char *str, register unsigned int len)
{"line-through", CSSValueLineThrough},
#line 132 "CSSValueKeywords.gperf"
{"copy", CSSValueCopy},
-#line 504 "CSSValueKeywords.gperf"
+#line 506 "CSSValueKeywords.gperf"
{"slategrey", CSSValueSlategrey},
-#line 503 "CSSValueKeywords.gperf"
+#line 505 "CSSValueKeywords.gperf"
{"slategray", CSSValueSlategray},
-#line 435 "CSSValueKeywords.gperf"
+#line 437 "CSSValueKeywords.gperf"
{"goldenrod", CSSValueGoldenrod},
-#line 471 "CSSValueKeywords.gperf"
+#line 473 "CSSValueKeywords.gperf"
{"mediumspringgreen", CSSValueMediumspringgreen},
-#line 446 "CSSValueKeywords.gperf"
+#line 448 "CSSValueKeywords.gperf"
{"lemonchiffon", CSSValueLemonchiffon},
-#line 393 "CSSValueKeywords.gperf"
+#line 395 "CSSValueKeywords.gperf"
{"blanchedalmond", CSSValueBlanchedalmond},
#line 125 "CSSValueKeywords.gperf"
{"grey", CSSValueGrey},
@@ -855,57 +858,57 @@ findValue (register const char *str, register unsigned int len)
{"decimal", CSSValueDecimal},
#line 113 "CSSValueKeywords.gperf"
{"menutext", CSSValueMenutext},
-#line 437 "CSSValueKeywords.gperf"
+#line 439 "CSSValueKeywords.gperf"
{"honeydew", CSSValueHoneydew},
#line 276 "CSSValueKeywords.gperf"
{"relative", CSSValueRelative},
#line 147 "CSSValueKeywords.gperf"
{"super", CSSValueSuper},
-#line 417 "CSSValueKeywords.gperf"
+#line 419 "CSSValueKeywords.gperf"
{"darksalmon", CSSValueDarksalmon},
-#line 360 "CSSValueKeywords.gperf"
+#line 362 "CSSValueKeywords.gperf"
{"round", CSSValueRound},
#line 72 "CSSValueKeywords.gperf"
{"fantasy", CSSValueFantasy},
-#line 465 "CSSValueKeywords.gperf"
+#line 467 "CSSValueKeywords.gperf"
{"mediumaquamarine", CSSValueMediumaquamarine},
-#line 493 "CSSValueKeywords.gperf"
+#line 495 "CSSValueKeywords.gperf"
{"rosybrown", CSSValueRosybrown},
-#line 371 "CSSValueKeywords.gperf"
+#line 373 "CSSValueKeywords.gperf"
{"paused", CSSValuePaused},
#line 22 "CSSValueKeywords.gperf"
{"double", CSSValueDouble},
#line 270 "CSSValueKeywords.gperf"
{"overlay", CSSValueOverlay},
-#line 358 "CSSValueKeywords.gperf"
+#line 360 "CSSValueKeywords.gperf"
{"textarea", CSSValueTextarea},
-#line 429 "CSSValueKeywords.gperf"
+#line 431 "CSSValueKeywords.gperf"
{"firebrick", CSSValueFirebrick},
-#line 382 "CSSValueKeywords.gperf"
+#line 384 "CSSValueKeywords.gperf"
{"visiblefill", CSSValueVisiblefill},
-#line 517 "CSSValueKeywords.gperf"
+#line 519 "CSSValueKeywords.gperf"
{"evenodd", CSSValueEvenodd},
#line 118 "CSSValueKeywords.gperf"
{"threedlightshadow", CSSValueThreedlightshadow},
#line 275 "CSSValueKeywords.gperf"
{"pre-wrap", CSSValuePreWrap},
-#line 511 "CSSValueKeywords.gperf"
+#line 513 "CSSValueKeywords.gperf"
{"turquoise", CSSValueTurquoise},
#line 70 "CSSValueKeywords.gperf"
{"sans-serif", CSSValueSansSerif},
#line 31 "CSSValueKeywords.gperf"
{"status-bar", CSSValueStatusBar},
-#line 483 "CSSValueKeywords.gperf"
+#line 485 "CSSValueKeywords.gperf"
{"palegoldenrod", CSSValuePalegoldenrod},
#line 244 "CSSValueKeywords.gperf"
{"always", CSSValueAlways},
-#line 436 "CSSValueKeywords.gperf"
+#line 438 "CSSValueKeywords.gperf"
{"greenyellow", CSSValueGreenyellow},
#line 250 "CSSValueKeywords.gperf"
{"close-quote", CSSValueCloseQuote},
-#line 480 "CSSValueKeywords.gperf"
+#line 482 "CSSValueKeywords.gperf"
{"olivedrab", CSSValueOlivedrab},
-#line 541 "CSSValueKeywords.gperf"
+#line 543 "CSSValueKeywords.gperf"
{"reset-size", CSSValueResetSize},
#line 212 "CSSValueKeywords.gperf"
{"not-allowed", CSSValueNotAllowed},
@@ -915,7 +918,7 @@ findValue (register const char *str, register unsigned int len)
{"buttonface", CSSValueButtonface},
#line 122 "CSSValueKeywords.gperf"
{"windowtext", CSSValueWindowtext},
-#line 472 "CSSValueKeywords.gperf"
+#line 474 "CSSValueKeywords.gperf"
{"mediumturquoise", CSSValueMediumturquoise},
#line 49 "CSSValueKeywords.gperf"
{"xx-small", CSSValueXxSmall},
@@ -923,53 +926,53 @@ findValue (register const char *str, register unsigned int len)
{"cursive", CSSValueCursive},
#line 266 "CSSValueKeywords.gperf"
{"no-close-quote", CSSValueNoCloseQuote},
-#line 427 "CSSValueKeywords.gperf"
+#line 429 "CSSValueKeywords.gperf"
{"dimgrey", CSSValueDimgrey},
-#line 426 "CSSValueKeywords.gperf"
+#line 428 "CSSValueKeywords.gperf"
{"dimgray", CSSValueDimgray},
-#line 488 "CSSValueKeywords.gperf"
+#line 490 "CSSValueKeywords.gperf"
{"peachpuff", CSSValuePeachpuff},
#line 225 "CSSValueKeywords.gperf"
{"nesw-resize", CSSValueNeswResize},
#line 267 "CSSValueKeywords.gperf"
{"no-open-quote", CSSValueNoOpenQuote},
-#line 539 "CSSValueKeywords.gperf"
+#line 541 "CSSValueKeywords.gperf"
{"use-script", CSSValueUseScript},
-#line 405 "CSSValueKeywords.gperf"
+#line 407 "CSSValueKeywords.gperf"
{"darkblue", CSSValueDarkblue},
#line 291 "CSSValueKeywords.gperf"
{"inline-axis", CSSValueInlineAxis},
-#line 352 "CSSValueKeywords.gperf"
+#line 354 "CSSValueKeywords.gperf"
{"searchfield", CSSValueSearchfield},
-#line 381 "CSSValueKeywords.gperf"
+#line 383 "CSSValueKeywords.gperf"
{"visiblepainted", CSSValueVisiblepainted},
#line 254 "CSSValueKeywords.gperf"
{"fixed", CSSValueFixed},
-#line 442 "CSSValueKeywords.gperf"
+#line 444 "CSSValueKeywords.gperf"
{"khaki", CSSValueKhaki},
-#line 412 "CSSValueKeywords.gperf"
+#line 414 "CSSValueKeywords.gperf"
{"darkmagenta", CSSValueDarkmagenta},
#line 103 "CSSValueKeywords.gperf"
{"captiontext", CSSValueCaptiontext},
-#line 515 "CSSValueKeywords.gperf"
+#line 517 "CSSValueKeywords.gperf"
{"yellowgreen", CSSValueYellowgreen},
-#line 486 "CSSValueKeywords.gperf"
+#line 488 "CSSValueKeywords.gperf"
{"palevioletred", CSSValuePalevioletred},
-#line 487 "CSSValueKeywords.gperf"
+#line 489 "CSSValueKeywords.gperf"
{"papayawhip", CSSValuePapayawhip},
-#line 492 "CSSValueKeywords.gperf"
+#line 494 "CSSValueKeywords.gperf"
{"powderblue", CSSValuePowderblue},
#line 78 "CSSValueKeywords.gperf"
{"fuchsia", CSSValueFuchsia},
-#line 409 "CSSValueKeywords.gperf"
+#line 411 "CSSValueKeywords.gperf"
{"darkgreen", CSSValueDarkgreen},
#line 100 "CSSValueKeywords.gperf"
{"buttonhighlight", CSSValueButtonhighlight},
-#line 418 "CSSValueKeywords.gperf"
+#line 420 "CSSValueKeywords.gperf"
{"darkseagreen", CSSValueDarkseagreen},
-#line 419 "CSSValueKeywords.gperf"
+#line 421 "CSSValueKeywords.gperf"
{"darkslateblue", CSSValueDarkslateblue},
-#line 414 "CSSValueKeywords.gperf"
+#line 416 "CSSValueKeywords.gperf"
{"darkorange", CSSValueDarkorange},
#line 186 "CSSValueKeywords.gperf"
{"run-in", CSSValueRunIn},
@@ -979,7 +982,7 @@ findValue (register const char *str, register unsigned int len)
{"buttonshadow", CSSValueButtonshadow},
#line 180 "CSSValueKeywords.gperf"
{"katakana", CSSValueKatakana},
-#line 347 "CSSValueKeywords.gperf"
+#line 349 "CSSValueKeywords.gperf"
{"slider-horizontal", CSSValueSliderHorizontal},
#line 134 "CSSValueKeywords.gperf"
{"source-in", CSSValueSourceIn},
@@ -987,41 +990,41 @@ findValue (register const char *str, register unsigned int len)
{"inline-block", CSSValueInlineBlock},
#line 172 "CSSValueKeywords.gperf"
{"lower-latin", CSSValueLowerLatin},
-#line 394 "CSSValueKeywords.gperf"
+#line 396 "CSSValueKeywords.gperf"
{"blueviolet", CSSValueBlueviolet},
#line 136 "CSSValueKeywords.gperf"
{"source-atop", CSSValueSourceAtop},
#line 226 "CSSValueKeywords.gperf"
{"nwse-resize", CSSValueNwseResize},
-#line 497 "CSSValueKeywords.gperf"
+#line 499 "CSSValueKeywords.gperf"
{"sandybrown", CSSValueSandybrown},
#line 208 "CSSValueKeywords.gperf"
{"context-menu", CSSValueContextMenu},
#line 168 "CSSValueKeywords.gperf"
{"lower-roman", CSSValueLowerRoman},
-#line 344 "CSSValueKeywords.gperf"
+#line 346 "CSSValueKeywords.gperf"
{"menulist-button", CSSValueMenulistButton},
#line 319 "CSSValueKeywords.gperf"
{"skip-white-space", CSSValueSkipWhiteSpace},
#line 55 "CSSValueKeywords.gperf"
{"xx-large", CSSValueXxLarge},
-#line 338 "CSSValueKeywords.gperf"
+#line 340 "CSSValueKeywords.gperf"
{"media-slider", CSSValueMediaSlider},
-#line 366 "CSSValueKeywords.gperf"
+#line 368 "CSSValueKeywords.gperf"
{"content-box", CSSValueContentBox},
-#line 457 "CSSValueKeywords.gperf"
+#line 459 "CSSValueKeywords.gperf"
{"lightskyblue", CSSValueLightskyblue},
#line 315 "CSSValueKeywords.gperf"
{"dot-dash", CSSValueDotDash},
-#line 531 "CSSValueKeywords.gperf"
+#line 533 "CSSValueKeywords.gperf"
{"after-edge", CSSValueAfterEdge},
#line 135 "CSSValueKeywords.gperf"
{"source-out", CSSValueSourceOut},
#line 228 "CSSValueKeywords.gperf"
{"row-resize", CSSValueRowResize},
-#line 383 "CSSValueKeywords.gperf"
+#line 385 "CSSValueKeywords.gperf"
{"visiblestroke", CSSValueVisiblestroke},
-#line 416 "CSSValueKeywords.gperf"
+#line 418 "CSSValueKeywords.gperf"
{"darkred", CSSValueDarkred},
#line 107 "CSSValueKeywords.gperf"
{"inactiveborder", CSSValueInactiveborder},
@@ -1029,15 +1032,15 @@ findValue (register const char *str, register unsigned int len)
{"buttontext", CSSValueButtontext},
#line 104 "CSSValueKeywords.gperf"
{"graytext", CSSValueGraytext},
-#line 378 "CSSValueKeywords.gperf"
+#line 380 "CSSValueKeywords.gperf"
{"ease-in-out", CSSValueEaseInOut},
#line 138 "CSSValueKeywords.gperf"
{"destination-in", CSSValueDestinationIn},
-#line 415 "CSSValueKeywords.gperf"
+#line 417 "CSSValueKeywords.gperf"
{"darkorchid", CSSValueDarkorchid},
#line 143 "CSSValueKeywords.gperf"
{"plus-lighter", CSSValuePlusLighter},
-#line 473 "CSSValueKeywords.gperf"
+#line 475 "CSSValueKeywords.gperf"
{"mediumvioletred", CSSValueMediumvioletred},
#line 97 "CSSValueKeywords.gperf"
{"appworkspace", CSSValueAppworkspace},
@@ -1051,7 +1054,7 @@ findValue (register const char *str, register unsigned int len)
{"push-button", CSSValuePushButton},
#line 320 "CSSValueKeywords.gperf"
{"break-all", CSSValueBreakAll},
-#line 529 "CSSValueKeywords.gperf"
+#line 531 "CSSValueKeywords.gperf"
{"optimizelegibility", CSSValueOptimizelegibility},
#line 109 "CSSValueKeywords.gperf"
{"inactivecaptiontext", CSSValueInactivecaptiontext},
@@ -1059,15 +1062,15 @@ findValue (register const char *str, register unsigned int len)
{"justify", CSSValueJustify},
#line 173 "CSSValueKeywords.gperf"
{"upper-alpha", CSSValueUpperAlpha},
-#line 349 "CSSValueKeywords.gperf"
+#line 351 "CSSValueKeywords.gperf"
{"sliderthumb-horizontal", CSSValueSliderthumbHorizontal},
-#line 424 "CSSValueKeywords.gperf"
+#line 426 "CSSValueKeywords.gperf"
{"deeppink", CSSValueDeeppink},
#line 139 "CSSValueKeywords.gperf"
{"destination-out", CSSValueDestinationOut},
#line 61 "CSSValueKeywords.gperf"
{"ultra-condensed", CSSValueUltraCondensed},
-#line 406 "CSSValueKeywords.gperf"
+#line 408 "CSSValueKeywords.gperf"
{"darkcyan", CSSValueDarkcyan},
#line 174 "CSSValueKeywords.gperf"
{"upper-latin", CSSValueUpperLatin},
@@ -1075,15 +1078,15 @@ findValue (register const char *str, register unsigned int len)
{"text-top", CSSValueTextTop},
#line 296 "CSSValueKeywords.gperf"
{"backwards", CSSValueBackwards},
-#line 423 "CSSValueKeywords.gperf"
+#line 425 "CSSValueKeywords.gperf"
{"darkviolet", CSSValueDarkviolet},
-#line 357 "CSSValueKeywords.gperf"
+#line 359 "CSSValueKeywords.gperf"
{"textfield", CSSValueTextfield},
#line 169 "CSSValueKeywords.gperf"
{"upper-roman", CSSValueUpperRoman},
#line 327 "CSSValueKeywords.gperf"
{"square-button", CSSValueSquareButton},
-#line 339 "CSSValueKeywords.gperf"
+#line 341 "CSSValueKeywords.gperf"
{"media-sliderthumb", CSSValueMediaSliderthumb},
#line 64 "CSSValueKeywords.gperf"
{"semi-condensed", CSSValueSemiCondensed},
@@ -1095,21 +1098,21 @@ findValue (register const char *str, register unsigned int len)
{"read-write", CSSValueReadWrite},
#line 95 "CSSValueKeywords.gperf"
{"activeborder", CSSValueActiveborder},
-#line 345 "CSSValueKeywords.gperf"
+#line 347 "CSSValueKeywords.gperf"
{"menulist-text", CSSValueMenulistText},
-#line 396 "CSSValueKeywords.gperf"
+#line 398 "CSSValueKeywords.gperf"
{"burlywood", CSSValueBurlywood},
-#line 523 "CSSValueKeywords.gperf"
+#line 525 "CSSValueKeywords.gperf"
{"optimizequality", CSSValueOptimizequality},
-#line 450 "CSSValueKeywords.gperf"
+#line 452 "CSSValueKeywords.gperf"
{"lightgoldenrodyellow", CSSValueLightgoldenrodyellow},
-#line 422 "CSSValueKeywords.gperf"
+#line 424 "CSSValueKeywords.gperf"
{"darkturquoise", CSSValueDarkturquoise},
-#line 530 "CSSValueKeywords.gperf"
+#line 532 "CSSValueKeywords.gperf"
{"before-edge", CSSValueBeforeEdge},
#line 26 "CSSValueKeywords.gperf"
{"message-box", CSSValueMessageBox},
-#line 348 "CSSValueKeywords.gperf"
+#line 350 "CSSValueKeywords.gperf"
{"slider-vertical", CSSValueSliderVertical},
#line 149 "CSSValueKeywords.gperf"
{"text-bottom", CSSValueTextBottom},
@@ -1119,15 +1122,13 @@ findValue (register const char *str, register unsigned int len)
{"cjk-ideographic", CSSValueCjkIdeographic},
#line 98 "CSSValueKeywords.gperf"
{"background", CSSValueBackground},
-#line 410 "CSSValueKeywords.gperf"
+#line 412 "CSSValueKeywords.gperf"
{"darkgrey", CSSValueDarkgrey},
#line 195 "CSSValueKeywords.gperf"
{"table-column-group", CSSValueTableColumnGroup},
-#line 408 "CSSValueKeywords.gperf"
+#line 410 "CSSValueKeywords.gperf"
{"darkgray", CSSValueDarkgray},
-#line 340 "CSSValueKeywords.gperf"
- {"media-timeline-container", CSSValueMediaTimelineContainer},
-#line 365 "CSSValueKeywords.gperf"
+#line 367 "CSSValueKeywords.gperf"
{"border-box", CSSValueBorderBox},
#line 330 "CSSValueKeywords.gperf"
{"default-button", CSSValueDefaultButton},
@@ -1137,17 +1138,17 @@ findValue (register const char *str, register unsigned int len)
{"bidi-override", CSSValueBidiOverride},
#line 115 "CSSValueKeywords.gperf"
{"threeddarkshadow", CSSValueThreeddarkshadow},
-#line 413 "CSSValueKeywords.gperf"
+#line 415 "CSSValueKeywords.gperf"
{"darkolivegreen", CSSValueDarkolivegreen},
#line 191 "CSSValueKeywords.gperf"
{"table-row-group", CSSValueTableRowGroup},
-#line 421 "CSSValueKeywords.gperf"
+#line 423 "CSSValueKeywords.gperf"
{"darkslategrey", CSSValueDarkslategrey},
-#line 420 "CSSValueKeywords.gperf"
+#line 422 "CSSValueKeywords.gperf"
{"darkslategray", CSSValueDarkslategray},
-#line 364 "CSSValueKeywords.gperf"
+#line 366 "CSSValueKeywords.gperf"
{"padding-box", CSSValuePaddingBox},
-#line 373 "CSSValueKeywords.gperf"
+#line 375 "CSSValueKeywords.gperf"
{"preserve-3d", CSSValuePreserve3d},
#line 133 "CSSValueKeywords.gperf"
{"source-over", CSSValueSourceOver},
@@ -1155,7 +1156,7 @@ findValue (register const char *str, register unsigned int len)
{"repeat-x", CSSValueRepeatX},
#line 334 "CSSValueKeywords.gperf"
{"media-mute-button", CSSValueMediaMuteButton},
-#line 407 "CSSValueKeywords.gperf"
+#line 409 "CSSValueKeywords.gperf"
{"darkgoldenrod", CSSValueDarkgoldenrod},
#line 129 "CSSValueKeywords.gperf"
{"repeat-y", CSSValueRepeatY},
@@ -1165,7 +1166,7 @@ findValue (register const char *str, register unsigned int len)
{"lower-greek", CSSValueLowerGreek},
#line 305 "CSSValueKeywords.gperf"
{"read-only", CSSValueReadOnly},
-#line 350 "CSSValueKeywords.gperf"
+#line 352 "CSSValueKeywords.gperf"
{"sliderthumb-vertical", CSSValueSliderthumbVertical},
#line 321 "CSSValueKeywords.gperf"
{"break-word", CSSValueBreakWord},
@@ -1173,7 +1174,7 @@ findValue (register const char *str, register unsigned int len)
{"extra-condensed", CSSValueExtraCondensed},
#line 329 "CSSValueKeywords.gperf"
{"button-bevel", CSSValueButtonBevel},
-#line 411 "CSSValueKeywords.gperf"
+#line 413 "CSSValueKeywords.gperf"
{"darkkhaki", CSSValueDarkkhaki},
#line 137 "CSSValueKeywords.gperf"
{"destination-over", CSSValueDestinationOver},
@@ -1189,13 +1190,15 @@ findValue (register const char *str, register unsigned int len)
{"semi-expanded", CSSValueSemiExpanded},
#line 142 "CSSValueKeywords.gperf"
{"plus-darker", CSSValuePlusDarker},
-#line 425 "CSSValueKeywords.gperf"
+#line 427 "CSSValueKeywords.gperf"
{"deepskyblue", CSSValueDeepskyblue},
#line 333 "CSSValueKeywords.gperf"
{"media-fullscreen-button", CSSValueMediaFullscreenButton},
-#line 353 "CSSValueKeywords.gperf"
+#line 355 "CSSValueKeywords.gperf"
{"searchfield-decoration", CSSValueSearchfieldDecoration},
-#line 346 "CSSValueKeywords.gperf"
+#line 338 "CSSValueKeywords.gperf"
+ {"media-rewind-button", CSSValueMediaRewindButton},
+#line 348 "CSSValueKeywords.gperf"
{"menulist-textfield", CSSValueMenulistTextfield},
#line 316 "CSSValueKeywords.gperf"
{"dot-dot-dash", CSSValueDotDotDash},
@@ -1203,9 +1206,9 @@ findValue (register const char *str, register unsigned int len)
{"media-play-button", CSSValueMediaPlayButton},
#line 67 "CSSValueKeywords.gperf"
{"extra-expanded", CSSValueExtraExpanded},
-#line 356 "CSSValueKeywords.gperf"
+#line 358 "CSSValueKeywords.gperf"
{"searchfield-cancel-button", CSSValueSearchfieldCancelButton},
-#line 359 "CSSValueKeywords.gperf"
+#line 361 "CSSValueKeywords.gperf"
{"caps-lock-indicator", CSSValueCapsLockIndicator},
#line 153 "CSSValueKeywords.gperf"
{"-webkit-auto", CSSValueWebkitAuto},
@@ -1215,21 +1218,23 @@ findValue (register const char *str, register unsigned int len)
{"decimal-leading-zero", CSSValueDecimalLeadingZero},
#line 30 "CSSValueKeywords.gperf"
{"-webkit-control", CSSValueWebkitControl},
-#line 355 "CSSValueKeywords.gperf"
+#line 357 "CSSValueKeywords.gperf"
{"searchfield-results-button", CSSValueSearchfieldResultsButton},
#line 284 "CSSValueKeywords.gperf"
{"-webkit-nowrap", CSSValueWebkitNowrap},
#line 159 "CSSValueKeywords.gperf"
{"-webkit-right", CSSValueWebkitRight},
-#line 534 "CSSValueKeywords.gperf"
+#line 342 "CSSValueKeywords.gperf"
+ {"media-controls-background", CSSValueMediaControlsBackground},
+#line 536 "CSSValueKeywords.gperf"
{"text-after-edge", CSSValueTextAfterEdge},
#line 158 "CSSValueKeywords.gperf"
{"-webkit-left", CSSValueWebkitLeft},
#line 233 "CSSValueKeywords.gperf"
{"-webkit-grab", CSSValueWebkitGrab},
-#line 533 "CSSValueKeywords.gperf"
+#line 535 "CSSValueKeywords.gperf"
{"text-before-edge", CSSValueTextBeforeEdge},
-#line 354 "CSSValueKeywords.gperf"
+#line 356 "CSSValueKeywords.gperf"
{"searchfield-results-decoration", CSSValueSearchfieldResultsDecoration},
#line 93 "CSSValueKeywords.gperf"
{"-webkit-link", CSSValueWebkitLink},
@@ -1243,14 +1248,16 @@ findValue (register const char *str, register unsigned int len)
{"-webkit-grabbing", CSSValueWebkitGrabbing},
#line 213 "CSSValueKeywords.gperf"
{"-webkit-zoom-in", CSSValueWebkitZoomIn},
-#line 342 "CSSValueKeywords.gperf"
+#line 344 "CSSValueKeywords.gperf"
{"media-time-remaining-display", CSSValueMediaTimeRemainingDisplay},
-#line 341 "CSSValueKeywords.gperf"
+#line 343 "CSSValueKeywords.gperf"
{"media-current-time-display", CSSValueMediaCurrentTimeDisplay},
#line 29 "CSSValueKeywords.gperf"
{"-webkit-small-control", CSSValueWebkitSmallControl},
#line 214 "CSSValueKeywords.gperf"
{"-webkit-zoom-out", CSSValueWebkitZoomOut},
+#line 339 "CSSValueKeywords.gperf"
+ {"media-return-to-realtime-button", CSSValueMediaReturnToRealtimeButton},
#line 28 "CSSValueKeywords.gperf"
{"-webkit-mini-control", CSSValueWebkitMiniControl},
#line 336 "CSSValueKeywords.gperf"
@@ -1584,72 +1591,71 @@ findValue (register const char *str, register unsigned int len)
-1, -1, 458, -1, -1, -1, -1, 459, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 460, 461, -1, -1, -1, 462, 463, -1, -1,
- 464, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 465, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 466, -1, -1, -1, -1, -1, -1, -1, -1,
- 467, 468, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 469, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 470, -1, -1, -1,
- -1, -1, 471, -1, -1, -1, -1, -1, -1, -1,
+ 464, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 465, -1, -1, -1, -1, -1, -1, -1, -1,
+ 466, 467, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 468, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 472, -1, -1, -1, -1, 473, -1, -1,
+ -1, -1, -1, -1, -1, -1, 469, -1, -1, -1,
+ -1, -1, 470, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 471, -1, -1, -1, -1, 472, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 474, -1, -1, -1, 475, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 473, -1, -1, -1, 474, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 476, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 477, -1, -1, -1, 478, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 475, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 476, -1, -1, -1, 477, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 479, 480, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 478, 479, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 481, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 482, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 480, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 481, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 483, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 484, -1, -1,
+ -1, -1, -1, -1, -1, -1, 482, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 485, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 483, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 484, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 486, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 485, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 487, -1, -1, -1, -1,
- -1, 488, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 489, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 486, -1, -1, -1, -1,
+ -1, 487, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 488, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 490, -1, -1, -1, -1,
- -1, 491, 492, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 489, -1, -1, -1, -1,
+ -1, 490, 491, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 493, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 492, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 494, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 493, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1657,26 +1663,27 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 495, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 494, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 496, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 495, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 497, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 498, -1, -1, -1, -1, -1, -1, -1, -1,
+ 496, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 497, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 498, -1, -1, -1, -1, -1, -1, -1, -1,
499, 500, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1789,14 +1796,14 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 511, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 511, -1, -1, -1, 512, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 512, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 513, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 513, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 514, -1, -1, -1, -1, -1, -1, -1, -1,
+ 514, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 515, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1806,10 +1813,10 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 515, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 516, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 516, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 517, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1832,7 +1839,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 517, 518, -1, -1, -1,
+ -1, -1, -1, -1, -1, 518, 519, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1842,46 +1849,46 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 519, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 520, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 520, -1, 521, -1, -1,
+ -1, -1, -1, -1, -1, 521, -1, 522, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 522, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 523, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 523, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 524, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 524, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 525, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 525, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 526, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 526, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 527, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 528, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 527, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 529, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 528, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 530, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1911,7 +1918,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 529, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 531, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1926,7 +1933,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 530, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 532, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1942,7 +1949,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 531, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 533, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1958,7 +1965,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 532, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 534, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1976,7 +1983,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 533, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 535, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -1984,7 +1991,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 534, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 536, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -2065,7 +2072,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 535, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 537, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -2150,7 +2157,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 536
+ -1, 538
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -2172,7 +2179,7 @@ findValue (register const char *str, register unsigned int len)
}
return 0;
}
-#line 548 "CSSValueKeywords.gperf"
+#line 550 "CSSValueKeywords.gperf"
static const char * const valueList[] = {
"",
@@ -2503,9 +2510,11 @@ static const char * const valueList[] = {
"media-play-button",
"media-seek-back-button",
"media-seek-forward-button",
+"media-rewind-button",
+"media-return-to-realtime-button",
"media-slider",
"media-sliderthumb",
-"media-timeline-container",
+"media-controls-background",
"media-current-time-display",
"media-time-remaining-display",
"menulist",
diff --git a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h
index 8b6c669..b8f83c4 100644
--- a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h
+++ b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h
@@ -331,218 +331,220 @@ const int CSSValueMediaMuteButton = 324;
const int CSSValueMediaPlayButton = 325;
const int CSSValueMediaSeekBackButton = 326;
const int CSSValueMediaSeekForwardButton = 327;
-const int CSSValueMediaSlider = 328;
-const int CSSValueMediaSliderthumb = 329;
-const int CSSValueMediaTimelineContainer = 330;
-const int CSSValueMediaCurrentTimeDisplay = 331;
-const int CSSValueMediaTimeRemainingDisplay = 332;
-const int CSSValueMenulist = 333;
-const int CSSValueMenulistButton = 334;
-const int CSSValueMenulistText = 335;
-const int CSSValueMenulistTextfield = 336;
-const int CSSValueSliderHorizontal = 337;
-const int CSSValueSliderVertical = 338;
-const int CSSValueSliderthumbHorizontal = 339;
-const int CSSValueSliderthumbVertical = 340;
-const int CSSValueCaret = 341;
-const int CSSValueSearchfield = 342;
-const int CSSValueSearchfieldDecoration = 343;
-const int CSSValueSearchfieldResultsDecoration = 344;
-const int CSSValueSearchfieldResultsButton = 345;
-const int CSSValueSearchfieldCancelButton = 346;
-const int CSSValueTextfield = 347;
-const int CSSValueTextarea = 348;
-const int CSSValueCapsLockIndicator = 349;
-const int CSSValueRound = 350;
-const int CSSValueBorder = 351;
-const int CSSValueContent = 352;
-const int CSSValuePadding = 353;
-const int CSSValuePaddingBox = 354;
-const int CSSValueBorderBox = 355;
-const int CSSValueContentBox = 356;
-const int CSSValueLogical = 357;
-const int CSSValueVisual = 358;
-const int CSSValueLines = 359;
-const int CSSValueRunning = 360;
-const int CSSValuePaused = 361;
-const int CSSValueFlat = 362;
-const int CSSValuePreserve3d = 363;
-const int CSSValueEase = 364;
-const int CSSValueLinear = 365;
-const int CSSValueEaseIn = 366;
-const int CSSValueEaseOut = 367;
-const int CSSValueEaseInOut = 368;
-const int CSSValueDocument = 369;
-const int CSSValueReset = 370;
-const int CSSValueVisiblepainted = 371;
-const int CSSValueVisiblefill = 372;
-const int CSSValueVisiblestroke = 373;
-const int CSSValuePainted = 374;
-const int CSSValueFill = 375;
-const int CSSValueStroke = 376;
-const int CSSValueAliceblue = 377;
-const int CSSValueAntiquewhite = 378;
-const int CSSValueAquamarine = 379;
-const int CSSValueAzure = 380;
-const int CSSValueBeige = 381;
-const int CSSValueBisque = 382;
-const int CSSValueBlanchedalmond = 383;
-const int CSSValueBlueviolet = 384;
-const int CSSValueBrown = 385;
-const int CSSValueBurlywood = 386;
-const int CSSValueCadetblue = 387;
-const int CSSValueChartreuse = 388;
-const int CSSValueChocolate = 389;
-const int CSSValueCoral = 390;
-const int CSSValueCornflowerblue = 391;
-const int CSSValueCornsilk = 392;
-const int CSSValueCrimson = 393;
-const int CSSValueCyan = 394;
-const int CSSValueDarkblue = 395;
-const int CSSValueDarkcyan = 396;
-const int CSSValueDarkgoldenrod = 397;
-const int CSSValueDarkgray = 398;
-const int CSSValueDarkgreen = 399;
-const int CSSValueDarkgrey = 400;
-const int CSSValueDarkkhaki = 401;
-const int CSSValueDarkmagenta = 402;
-const int CSSValueDarkolivegreen = 403;
-const int CSSValueDarkorange = 404;
-const int CSSValueDarkorchid = 405;
-const int CSSValueDarkred = 406;
-const int CSSValueDarksalmon = 407;
-const int CSSValueDarkseagreen = 408;
-const int CSSValueDarkslateblue = 409;
-const int CSSValueDarkslategray = 410;
-const int CSSValueDarkslategrey = 411;
-const int CSSValueDarkturquoise = 412;
-const int CSSValueDarkviolet = 413;
-const int CSSValueDeeppink = 414;
-const int CSSValueDeepskyblue = 415;
-const int CSSValueDimgray = 416;
-const int CSSValueDimgrey = 417;
-const int CSSValueDodgerblue = 418;
-const int CSSValueFirebrick = 419;
-const int CSSValueFloralwhite = 420;
-const int CSSValueForestgreen = 421;
-const int CSSValueGainsboro = 422;
-const int CSSValueGhostwhite = 423;
-const int CSSValueGold = 424;
-const int CSSValueGoldenrod = 425;
-const int CSSValueGreenyellow = 426;
-const int CSSValueHoneydew = 427;
-const int CSSValueHotpink = 428;
-const int CSSValueIndianred = 429;
-const int CSSValueIndigo = 430;
-const int CSSValueIvory = 431;
-const int CSSValueKhaki = 432;
-const int CSSValueLavender = 433;
-const int CSSValueLavenderblush = 434;
-const int CSSValueLawngreen = 435;
-const int CSSValueLemonchiffon = 436;
-const int CSSValueLightblue = 437;
-const int CSSValueLightcoral = 438;
-const int CSSValueLightcyan = 439;
-const int CSSValueLightgoldenrodyellow = 440;
-const int CSSValueLightgray = 441;
-const int CSSValueLightgreen = 442;
-const int CSSValueLightgrey = 443;
-const int CSSValueLightpink = 444;
-const int CSSValueLightsalmon = 445;
-const int CSSValueLightseagreen = 446;
-const int CSSValueLightskyblue = 447;
-const int CSSValueLightslategray = 448;
-const int CSSValueLightslategrey = 449;
-const int CSSValueLightsteelblue = 450;
-const int CSSValueLightyellow = 451;
-const int CSSValueLimegreen = 452;
-const int CSSValueLinen = 453;
-const int CSSValueMagenta = 454;
-const int CSSValueMediumaquamarine = 455;
-const int CSSValueMediumblue = 456;
-const int CSSValueMediumorchid = 457;
-const int CSSValueMediumpurple = 458;
-const int CSSValueMediumseagreen = 459;
-const int CSSValueMediumslateblue = 460;
-const int CSSValueMediumspringgreen = 461;
-const int CSSValueMediumturquoise = 462;
-const int CSSValueMediumvioletred = 463;
-const int CSSValueMidnightblue = 464;
-const int CSSValueMintcream = 465;
-const int CSSValueMistyrose = 466;
-const int CSSValueMoccasin = 467;
-const int CSSValueNavajowhite = 468;
-const int CSSValueOldlace = 469;
-const int CSSValueOlivedrab = 470;
-const int CSSValueOrangered = 471;
-const int CSSValueOrchid = 472;
-const int CSSValuePalegoldenrod = 473;
-const int CSSValuePalegreen = 474;
-const int CSSValuePaleturquoise = 475;
-const int CSSValuePalevioletred = 476;
-const int CSSValuePapayawhip = 477;
-const int CSSValuePeachpuff = 478;
-const int CSSValuePeru = 479;
-const int CSSValuePink = 480;
-const int CSSValuePlum = 481;
-const int CSSValuePowderblue = 482;
-const int CSSValueRosybrown = 483;
-const int CSSValueRoyalblue = 484;
-const int CSSValueSaddlebrown = 485;
-const int CSSValueSalmon = 486;
-const int CSSValueSandybrown = 487;
-const int CSSValueSeagreen = 488;
-const int CSSValueSeashell = 489;
-const int CSSValueSienna = 490;
-const int CSSValueSkyblue = 491;
-const int CSSValueSlateblue = 492;
-const int CSSValueSlategray = 493;
-const int CSSValueSlategrey = 494;
-const int CSSValueSnow = 495;
-const int CSSValueSpringgreen = 496;
-const int CSSValueSteelblue = 497;
-const int CSSValueTan = 498;
-const int CSSValueThistle = 499;
-const int CSSValueTomato = 500;
-const int CSSValueTurquoise = 501;
-const int CSSValueViolet = 502;
-const int CSSValueWheat = 503;
-const int CSSValueWhitesmoke = 504;
-const int CSSValueYellowgreen = 505;
-const int CSSValueNonzero = 506;
-const int CSSValueEvenodd = 507;
-const int CSSValueAccumulate = 508;
-const int CSSValueNew = 509;
-const int CSSValueSrgb = 510;
-const int CSSValueLinearrgb = 511;
-const int CSSValueOptimizespeed = 512;
-const int CSSValueOptimizequality = 513;
-const int CSSValueCrispedges = 514;
-const int CSSValueGeometricprecision = 515;
-const int CSSValueButt = 516;
-const int CSSValueMiter = 517;
-const int CSSValueBevel = 518;
-const int CSSValueOptimizelegibility = 519;
-const int CSSValueBeforeEdge = 520;
-const int CSSValueAfterEdge = 521;
-const int CSSValueCentral = 522;
-const int CSSValueTextBeforeEdge = 523;
-const int CSSValueTextAfterEdge = 524;
-const int CSSValueIdeographic = 525;
-const int CSSValueAlphabetic = 526;
-const int CSSValueHanging = 527;
-const int CSSValueMathematical = 528;
-const int CSSValueUseScript = 529;
-const int CSSValueNoChange = 530;
-const int CSSValueResetSize = 531;
-const int CSSValueLrTb = 532;
-const int CSSValueRlTb = 533;
-const int CSSValueTbRl = 534;
-const int CSSValueLr = 535;
-const int CSSValueRl = 536;
-const int CSSValueTb = 537;
-const int numCSSValueKeywords = 538;
-const size_t maxCSSValueKeywordLength = 30;
+const int CSSValueMediaRewindButton = 328;
+const int CSSValueMediaReturnToRealtimeButton = 329;
+const int CSSValueMediaSlider = 330;
+const int CSSValueMediaSliderthumb = 331;
+const int CSSValueMediaControlsBackground = 332;
+const int CSSValueMediaCurrentTimeDisplay = 333;
+const int CSSValueMediaTimeRemainingDisplay = 334;
+const int CSSValueMenulist = 335;
+const int CSSValueMenulistButton = 336;
+const int CSSValueMenulistText = 337;
+const int CSSValueMenulistTextfield = 338;
+const int CSSValueSliderHorizontal = 339;
+const int CSSValueSliderVertical = 340;
+const int CSSValueSliderthumbHorizontal = 341;
+const int CSSValueSliderthumbVertical = 342;
+const int CSSValueCaret = 343;
+const int CSSValueSearchfield = 344;
+const int CSSValueSearchfieldDecoration = 345;
+const int CSSValueSearchfieldResultsDecoration = 346;
+const int CSSValueSearchfieldResultsButton = 347;
+const int CSSValueSearchfieldCancelButton = 348;
+const int CSSValueTextfield = 349;
+const int CSSValueTextarea = 350;
+const int CSSValueCapsLockIndicator = 351;
+const int CSSValueRound = 352;
+const int CSSValueBorder = 353;
+const int CSSValueContent = 354;
+const int CSSValuePadding = 355;
+const int CSSValuePaddingBox = 356;
+const int CSSValueBorderBox = 357;
+const int CSSValueContentBox = 358;
+const int CSSValueLogical = 359;
+const int CSSValueVisual = 360;
+const int CSSValueLines = 361;
+const int CSSValueRunning = 362;
+const int CSSValuePaused = 363;
+const int CSSValueFlat = 364;
+const int CSSValuePreserve3d = 365;
+const int CSSValueEase = 366;
+const int CSSValueLinear = 367;
+const int CSSValueEaseIn = 368;
+const int CSSValueEaseOut = 369;
+const int CSSValueEaseInOut = 370;
+const int CSSValueDocument = 371;
+const int CSSValueReset = 372;
+const int CSSValueVisiblepainted = 373;
+const int CSSValueVisiblefill = 374;
+const int CSSValueVisiblestroke = 375;
+const int CSSValuePainted = 376;
+const int CSSValueFill = 377;
+const int CSSValueStroke = 378;
+const int CSSValueAliceblue = 379;
+const int CSSValueAntiquewhite = 380;
+const int CSSValueAquamarine = 381;
+const int CSSValueAzure = 382;
+const int CSSValueBeige = 383;
+const int CSSValueBisque = 384;
+const int CSSValueBlanchedalmond = 385;
+const int CSSValueBlueviolet = 386;
+const int CSSValueBrown = 387;
+const int CSSValueBurlywood = 388;
+const int CSSValueCadetblue = 389;
+const int CSSValueChartreuse = 390;
+const int CSSValueChocolate = 391;
+const int CSSValueCoral = 392;
+const int CSSValueCornflowerblue = 393;
+const int CSSValueCornsilk = 394;
+const int CSSValueCrimson = 395;
+const int CSSValueCyan = 396;
+const int CSSValueDarkblue = 397;
+const int CSSValueDarkcyan = 398;
+const int CSSValueDarkgoldenrod = 399;
+const int CSSValueDarkgray = 400;
+const int CSSValueDarkgreen = 401;
+const int CSSValueDarkgrey = 402;
+const int CSSValueDarkkhaki = 403;
+const int CSSValueDarkmagenta = 404;
+const int CSSValueDarkolivegreen = 405;
+const int CSSValueDarkorange = 406;
+const int CSSValueDarkorchid = 407;
+const int CSSValueDarkred = 408;
+const int CSSValueDarksalmon = 409;
+const int CSSValueDarkseagreen = 410;
+const int CSSValueDarkslateblue = 411;
+const int CSSValueDarkslategray = 412;
+const int CSSValueDarkslategrey = 413;
+const int CSSValueDarkturquoise = 414;
+const int CSSValueDarkviolet = 415;
+const int CSSValueDeeppink = 416;
+const int CSSValueDeepskyblue = 417;
+const int CSSValueDimgray = 418;
+const int CSSValueDimgrey = 419;
+const int CSSValueDodgerblue = 420;
+const int CSSValueFirebrick = 421;
+const int CSSValueFloralwhite = 422;
+const int CSSValueForestgreen = 423;
+const int CSSValueGainsboro = 424;
+const int CSSValueGhostwhite = 425;
+const int CSSValueGold = 426;
+const int CSSValueGoldenrod = 427;
+const int CSSValueGreenyellow = 428;
+const int CSSValueHoneydew = 429;
+const int CSSValueHotpink = 430;
+const int CSSValueIndianred = 431;
+const int CSSValueIndigo = 432;
+const int CSSValueIvory = 433;
+const int CSSValueKhaki = 434;
+const int CSSValueLavender = 435;
+const int CSSValueLavenderblush = 436;
+const int CSSValueLawngreen = 437;
+const int CSSValueLemonchiffon = 438;
+const int CSSValueLightblue = 439;
+const int CSSValueLightcoral = 440;
+const int CSSValueLightcyan = 441;
+const int CSSValueLightgoldenrodyellow = 442;
+const int CSSValueLightgray = 443;
+const int CSSValueLightgreen = 444;
+const int CSSValueLightgrey = 445;
+const int CSSValueLightpink = 446;
+const int CSSValueLightsalmon = 447;
+const int CSSValueLightseagreen = 448;
+const int CSSValueLightskyblue = 449;
+const int CSSValueLightslategray = 450;
+const int CSSValueLightslategrey = 451;
+const int CSSValueLightsteelblue = 452;
+const int CSSValueLightyellow = 453;
+const int CSSValueLimegreen = 454;
+const int CSSValueLinen = 455;
+const int CSSValueMagenta = 456;
+const int CSSValueMediumaquamarine = 457;
+const int CSSValueMediumblue = 458;
+const int CSSValueMediumorchid = 459;
+const int CSSValueMediumpurple = 460;
+const int CSSValueMediumseagreen = 461;
+const int CSSValueMediumslateblue = 462;
+const int CSSValueMediumspringgreen = 463;
+const int CSSValueMediumturquoise = 464;
+const int CSSValueMediumvioletred = 465;
+const int CSSValueMidnightblue = 466;
+const int CSSValueMintcream = 467;
+const int CSSValueMistyrose = 468;
+const int CSSValueMoccasin = 469;
+const int CSSValueNavajowhite = 470;
+const int CSSValueOldlace = 471;
+const int CSSValueOlivedrab = 472;
+const int CSSValueOrangered = 473;
+const int CSSValueOrchid = 474;
+const int CSSValuePalegoldenrod = 475;
+const int CSSValuePalegreen = 476;
+const int CSSValuePaleturquoise = 477;
+const int CSSValuePalevioletred = 478;
+const int CSSValuePapayawhip = 479;
+const int CSSValuePeachpuff = 480;
+const int CSSValuePeru = 481;
+const int CSSValuePink = 482;
+const int CSSValuePlum = 483;
+const int CSSValuePowderblue = 484;
+const int CSSValueRosybrown = 485;
+const int CSSValueRoyalblue = 486;
+const int CSSValueSaddlebrown = 487;
+const int CSSValueSalmon = 488;
+const int CSSValueSandybrown = 489;
+const int CSSValueSeagreen = 490;
+const int CSSValueSeashell = 491;
+const int CSSValueSienna = 492;
+const int CSSValueSkyblue = 493;
+const int CSSValueSlateblue = 494;
+const int CSSValueSlategray = 495;
+const int CSSValueSlategrey = 496;
+const int CSSValueSnow = 497;
+const int CSSValueSpringgreen = 498;
+const int CSSValueSteelblue = 499;
+const int CSSValueTan = 500;
+const int CSSValueThistle = 501;
+const int CSSValueTomato = 502;
+const int CSSValueTurquoise = 503;
+const int CSSValueViolet = 504;
+const int CSSValueWheat = 505;
+const int CSSValueWhitesmoke = 506;
+const int CSSValueYellowgreen = 507;
+const int CSSValueNonzero = 508;
+const int CSSValueEvenodd = 509;
+const int CSSValueAccumulate = 510;
+const int CSSValueNew = 511;
+const int CSSValueSrgb = 512;
+const int CSSValueLinearrgb = 513;
+const int CSSValueOptimizespeed = 514;
+const int CSSValueOptimizequality = 515;
+const int CSSValueCrispedges = 516;
+const int CSSValueGeometricprecision = 517;
+const int CSSValueButt = 518;
+const int CSSValueMiter = 519;
+const int CSSValueBevel = 520;
+const int CSSValueOptimizelegibility = 521;
+const int CSSValueBeforeEdge = 522;
+const int CSSValueAfterEdge = 523;
+const int CSSValueCentral = 524;
+const int CSSValueTextBeforeEdge = 525;
+const int CSSValueTextAfterEdge = 526;
+const int CSSValueIdeographic = 527;
+const int CSSValueAlphabetic = 528;
+const int CSSValueHanging = 529;
+const int CSSValueMathematical = 530;
+const int CSSValueUseScript = 531;
+const int CSSValueNoChange = 532;
+const int CSSValueResetSize = 533;
+const int CSSValueLrTb = 534;
+const int CSSValueRlTb = 535;
+const int CSSValueTbRl = 536;
+const int CSSValueLr = 537;
+const int CSSValueRl = 538;
+const int CSSValueTb = 539;
+const int numCSSValueKeywords = 540;
+const size_t maxCSSValueKeywordLength = 31;
const char* getValueName(unsigned short id);
diff --git a/src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h b/src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h
index 3016f9e..507cf91 100644
--- a/src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h
@@ -54,6 +54,6 @@ static const struct HashTableValue dateTableValues[47] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable dateTable =
+extern JSC_CONST_HASHTABLE HashTable dateTable =
{ 134, 127, dateTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/Grammar.cpp b/src/3rdparty/webkit/WebCore/generated/Grammar.cpp
index 4ad3078..d1a7a80 100644
--- a/src/3rdparty/webkit/WebCore/generated/Grammar.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/Grammar.cpp
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,159 +54,28 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 1
/* Substitute the variable and function names. */
-#define yyparse jscyyparse
-#define yylex jscyylex
-#define yyerror jscyyerror
-#define yylval jscyylval
-#define yychar jscyychar
-#define yydebug jscyydebug
-#define yynerrs jscyynerrs
-#define yylloc jscyylloc
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- NULLTOKEN = 258,
- TRUETOKEN = 259,
- FALSETOKEN = 260,
- BREAK = 261,
- CASE = 262,
- DEFAULT = 263,
- FOR = 264,
- NEW = 265,
- VAR = 266,
- CONSTTOKEN = 267,
- CONTINUE = 268,
- FUNCTION = 269,
- RETURN = 270,
- VOIDTOKEN = 271,
- DELETETOKEN = 272,
- IF = 273,
- THISTOKEN = 274,
- DO = 275,
- WHILE = 276,
- INTOKEN = 277,
- INSTANCEOF = 278,
- TYPEOF = 279,
- SWITCH = 280,
- WITH = 281,
- RESERVED = 282,
- THROW = 283,
- TRY = 284,
- CATCH = 285,
- FINALLY = 286,
- DEBUGGER = 287,
- IF_WITHOUT_ELSE = 288,
- ELSE = 289,
- EQEQ = 290,
- NE = 291,
- STREQ = 292,
- STRNEQ = 293,
- LE = 294,
- GE = 295,
- OR = 296,
- AND = 297,
- PLUSPLUS = 298,
- MINUSMINUS = 299,
- LSHIFT = 300,
- RSHIFT = 301,
- URSHIFT = 302,
- PLUSEQUAL = 303,
- MINUSEQUAL = 304,
- MULTEQUAL = 305,
- DIVEQUAL = 306,
- LSHIFTEQUAL = 307,
- RSHIFTEQUAL = 308,
- URSHIFTEQUAL = 309,
- ANDEQUAL = 310,
- MODEQUAL = 311,
- XOREQUAL = 312,
- OREQUAL = 313,
- OPENBRACE = 314,
- CLOSEBRACE = 315,
- NUMBER = 316,
- IDENT = 317,
- STRING = 318,
- AUTOPLUSPLUS = 319,
- AUTOMINUSMINUS = 320
- };
-#endif
-/* Tokens. */
-#define NULLTOKEN 258
-#define TRUETOKEN 259
-#define FALSETOKEN 260
-#define BREAK 261
-#define CASE 262
-#define DEFAULT 263
-#define FOR 264
-#define NEW 265
-#define VAR 266
-#define CONSTTOKEN 267
-#define CONTINUE 268
-#define FUNCTION 269
-#define RETURN 270
-#define VOIDTOKEN 271
-#define DELETETOKEN 272
-#define IF 273
-#define THISTOKEN 274
-#define DO 275
-#define WHILE 276
-#define INTOKEN 277
-#define INSTANCEOF 278
-#define TYPEOF 279
-#define SWITCH 280
-#define WITH 281
-#define RESERVED 282
-#define THROW 283
-#define TRY 284
-#define CATCH 285
-#define FINALLY 286
-#define DEBUGGER 287
-#define IF_WITHOUT_ELSE 288
-#define ELSE 289
-#define EQEQ 290
-#define NE 291
-#define STREQ 292
-#define STRNEQ 293
-#define LE 294
-#define GE 295
-#define OR 296
-#define AND 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define LSHIFT 300
-#define RSHIFT 301
-#define URSHIFT 302
-#define PLUSEQUAL 303
-#define MINUSEQUAL 304
-#define MULTEQUAL 305
-#define DIVEQUAL 306
-#define LSHIFTEQUAL 307
-#define RSHIFTEQUAL 308
-#define URSHIFTEQUAL 309
-#define ANDEQUAL 310
-#define MODEQUAL 311
-#define XOREQUAL 312
-#define OREQUAL 313
-#define OPENBRACE 314
-#define CLOSEBRACE 315
-#define NUMBER 316
-#define IDENT 317
-#define STRING 318
-#define AUTOPLUSPLUS 319
-#define AUTOMINUSMINUS 320
-
-
-
+#define yyparse jscyyparse
+#define yylex jscyylex
+#define yyerror jscyyerror
+#define yylval jscyylval
+#define yychar jscyychar
+#define yydebug jscyydebug
+#define yynerrs jscyynerrs
+#define yylloc jscyylloc
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 3 "../../JavaScriptCore/parser/Grammar.y"
@@ -363,6 +231,9 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D
+/* Line 189 of yacc.c */
+#line 236 "WebCore/tmp/../generated/Grammar.tab.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -381,10 +252,88 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ NULLTOKEN = 258,
+ TRUETOKEN = 259,
+ FALSETOKEN = 260,
+ BREAK = 261,
+ CASE = 262,
+ DEFAULT = 263,
+ FOR = 264,
+ NEW = 265,
+ VAR = 266,
+ CONSTTOKEN = 267,
+ CONTINUE = 268,
+ FUNCTION = 269,
+ RETURN = 270,
+ VOIDTOKEN = 271,
+ DELETETOKEN = 272,
+ IF = 273,
+ THISTOKEN = 274,
+ DO = 275,
+ WHILE = 276,
+ INTOKEN = 277,
+ INSTANCEOF = 278,
+ TYPEOF = 279,
+ SWITCH = 280,
+ WITH = 281,
+ RESERVED = 282,
+ THROW = 283,
+ TRY = 284,
+ CATCH = 285,
+ FINALLY = 286,
+ DEBUGGER = 287,
+ IF_WITHOUT_ELSE = 288,
+ ELSE = 289,
+ EQEQ = 290,
+ NE = 291,
+ STREQ = 292,
+ STRNEQ = 293,
+ LE = 294,
+ GE = 295,
+ OR = 296,
+ AND = 297,
+ PLUSPLUS = 298,
+ MINUSMINUS = 299,
+ LSHIFT = 300,
+ RSHIFT = 301,
+ URSHIFT = 302,
+ PLUSEQUAL = 303,
+ MINUSEQUAL = 304,
+ MULTEQUAL = 305,
+ DIVEQUAL = 306,
+ LSHIFTEQUAL = 307,
+ RSHIFTEQUAL = 308,
+ URSHIFTEQUAL = 309,
+ ANDEQUAL = 310,
+ MODEQUAL = 311,
+ XOREQUAL = 312,
+ OREQUAL = 313,
+ OPENBRACE = 314,
+ CLOSEBRACE = 315,
+ NUMBER = 316,
+ IDENT = 317,
+ STRING = 318,
+ AUTOPLUSPLUS = 319,
+ AUTOMINUSMINUS = 320
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 157 "../../JavaScriptCore/parser/Grammar.y"
{
+
+/* Line 214 of yacc.c */
+#line 157 "../../JavaScriptCore/parser/Grammar.y"
+
int intValue;
double doubleValue;
Identifier* ident;
@@ -414,13 +363,15 @@ typedef union YYSTYPE
ParameterListInfo parameterList;
Operator op;
-}
-/* Line 187 of yacc.c. */
-#line 420 "WebCore/tmp/../generated/Grammar.tab.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 371 "WebCore/tmp/../generated/Grammar.tab.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -440,8 +391,8 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 445 "WebCore/tmp/../generated/Grammar.tab.c"
+/* Line 264 of yacc.c */
+#line 396 "WebCore/tmp/../generated/Grammar.tab.c"
#ifdef short
# undef short
@@ -516,14 +467,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -605,9 +556,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -642,12 +593,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -2361,17 +2312,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -2406,11 +2360,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) );
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -2692,10 +2646,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -2714,10 +2666,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -2741,88 +2692,97 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[2];
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
goto yysetstate;
@@ -2861,6 +2821,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -2882,9 +2843,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2905,6 +2866,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -2913,16 +2877,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2954,20 +2918,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -3008,31 +2968,43 @@ yyreduce:
switch (yyn)
{
case 2:
+
+/* Line 1455 of yacc.c */
#line 290 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;}
break;
case 3:
+
+/* Line 1455 of yacc.c */
#line 291 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;}
break;
case 4:
+
+/* Line 1455 of yacc.c */
#line 292 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;}
break;
case 5:
+
+/* Line 1455 of yacc.c */
#line 293 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;}
break;
case 6:
+
+/* Line 1455 of yacc.c */
#line 294 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;}
break;
case 7:
+
+/* Line 1455 of yacc.c */
#line 295 "../../JavaScriptCore/parser/Grammar.y"
{
Lexer& l = *LEXER;
@@ -3046,6 +3018,8 @@ yyreduce:
break;
case 8:
+
+/* Line 1455 of yacc.c */
#line 304 "../../JavaScriptCore/parser/Grammar.y"
{
Lexer& l = *LEXER;
@@ -3059,26 +3033,36 @@ yyreduce:
break;
case 9:
+
+/* Line 1455 of yacc.c */
#line 316 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 10:
+
+/* Line 1455 of yacc.c */
#line 317 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 11:
+
+/* Line 1455 of yacc.c */
#line 318 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, UString::from((yyvsp[(1) - (3)].doubleValue))), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 12:
+
+/* Line 1455 of yacc.c */
#line 319 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;}
break;
case 13:
+
+/* Line 1455 of yacc.c */
#line 321 "../../JavaScriptCore/parser/Grammar.y"
{
(yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0);
@@ -3091,6 +3075,8 @@ yyreduce:
break;
case 14:
+
+/* Line 1455 of yacc.c */
#line 332 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node);
(yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head;
@@ -3099,6 +3085,8 @@ yyreduce:
break;
case 15:
+
+/* Line 1455 of yacc.c */
#line 336 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head;
(yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail);
@@ -3107,51 +3095,71 @@ yyreduce:
break;
case 17:
+
+/* Line 1455 of yacc.c */
#line 344 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;}
break;
case 18:
+
+/* Line 1455 of yacc.c */
#line 345 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;}
break;
case 19:
+
+/* Line 1455 of yacc.c */
#line 347 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;}
break;
case 20:
+
+/* Line 1455 of yacc.c */
#line 351 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;}
break;
case 23:
+
+/* Line 1455 of yacc.c */
#line 354 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;}
break;
case 24:
+
+/* Line 1455 of yacc.c */
#line 355 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;}
break;
case 25:
+
+/* Line 1455 of yacc.c */
#line 359 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;}
break;
case 26:
+
+/* Line 1455 of yacc.c */
#line 360 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;}
break;
case 27:
+
+/* Line 1455 of yacc.c */
#line 361 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;}
break;
case 28:
+
+/* Line 1455 of yacc.c */
#line 365 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node);
(yyval.elementList).m_node.tail = (yyval.elementList).m_node.head;
@@ -3160,6 +3168,8 @@ yyreduce:
break;
case 29:
+
+/* Line 1455 of yacc.c */
#line 370 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head;
(yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node);
@@ -3168,26 +3178,36 @@ yyreduce:
break;
case 30:
+
+/* Line 1455 of yacc.c */
#line 377 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.intValue) = 0; ;}
break;
case 32:
+
+/* Line 1455 of yacc.c */
#line 382 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.intValue) = 1; ;}
break;
case 33:
+
+/* Line 1455 of yacc.c */
#line 383 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;}
break;
case 35:
+
+/* Line 1455 of yacc.c */
#line 388 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;}
break;
case 36:
+
+/* Line 1455 of yacc.c */
#line 389 "../../JavaScriptCore/parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3196,6 +3216,8 @@ yyreduce:
break;
case 37:
+
+/* Line 1455 of yacc.c */
#line 393 "../../JavaScriptCore/parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3204,6 +3226,8 @@ yyreduce:
break;
case 38:
+
+/* Line 1455 of yacc.c */
#line 397 "../../JavaScriptCore/parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3212,6 +3236,8 @@ yyreduce:
break;
case 40:
+
+/* Line 1455 of yacc.c */
#line 405 "../../JavaScriptCore/parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3220,6 +3246,8 @@ yyreduce:
break;
case 41:
+
+/* Line 1455 of yacc.c */
#line 409 "../../JavaScriptCore/parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3228,6 +3256,8 @@ yyreduce:
break;
case 42:
+
+/* Line 1455 of yacc.c */
#line 413 "../../JavaScriptCore/parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3236,6 +3266,8 @@ yyreduce:
break;
case 44:
+
+/* Line 1455 of yacc.c */
#line 421 "../../JavaScriptCore/parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column);
@@ -3244,6 +3276,8 @@ yyreduce:
break;
case 46:
+
+/* Line 1455 of yacc.c */
#line 429 "../../JavaScriptCore/parser/Grammar.y"
{ NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column);
@@ -3252,16 +3286,22 @@ yyreduce:
break;
case 47:
+
+/* Line 1455 of yacc.c */
#line 436 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 48:
+
+/* Line 1455 of yacc.c */
#line 437 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 49:
+
+/* Line 1455 of yacc.c */
#line 438 "../../JavaScriptCore/parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3270,6 +3310,8 @@ yyreduce:
break;
case 50:
+
+/* Line 1455 of yacc.c */
#line 442 "../../JavaScriptCore/parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3277,16 +3319,22 @@ yyreduce:
break;
case 51:
+
+/* Line 1455 of yacc.c */
#line 448 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 52:
+
+/* Line 1455 of yacc.c */
#line 449 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;}
break;
case 53:
+
+/* Line 1455 of yacc.c */
#line 450 "../../JavaScriptCore/parser/Grammar.y"
{ BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column);
@@ -3295,6 +3343,8 @@ yyreduce:
break;
case 54:
+
+/* Line 1455 of yacc.c */
#line 454 "../../JavaScriptCore/parser/Grammar.y"
{ DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column);
@@ -3303,16 +3353,22 @@ yyreduce:
break;
case 55:
+
+/* Line 1455 of yacc.c */
#line 461 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;}
break;
case 56:
+
+/* Line 1455 of yacc.c */
#line 462 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;}
break;
case 57:
+
+/* Line 1455 of yacc.c */
#line 466 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node);
(yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head;
@@ -3321,6 +3377,8 @@ yyreduce:
break;
case 58:
+
+/* Line 1455 of yacc.c */
#line 470 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head;
(yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node);
@@ -3329,181 +3387,253 @@ yyreduce:
break;
case 64:
+
+/* Line 1455 of yacc.c */
#line 488 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 65:
+
+/* Line 1455 of yacc.c */
#line 489 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 67:
+
+/* Line 1455 of yacc.c */
#line 494 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 68:
+
+/* Line 1455 of yacc.c */
#line 495 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;}
break;
case 69:
+
+/* Line 1455 of yacc.c */
#line 499 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 70:
+
+/* Line 1455 of yacc.c */
#line 500 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;}
break;
case 71:
+
+/* Line 1455 of yacc.c */
#line 501 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 72:
+
+/* Line 1455 of yacc.c */
#line 502 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 73:
+
+/* Line 1455 of yacc.c */
#line 503 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 74:
+
+/* Line 1455 of yacc.c */
#line 504 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 75:
+
+/* Line 1455 of yacc.c */
#line 505 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 76:
+
+/* Line 1455 of yacc.c */
#line 506 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 77:
+
+/* Line 1455 of yacc.c */
#line 507 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 78:
+
+/* Line 1455 of yacc.c */
#line 508 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 79:
+
+/* Line 1455 of yacc.c */
#line 509 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 85:
+
+/* Line 1455 of yacc.c */
#line 523 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 86:
+
+/* Line 1455 of yacc.c */
#line 524 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 87:
+
+/* Line 1455 of yacc.c */
#line 525 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 89:
+
+/* Line 1455 of yacc.c */
#line 531 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 90:
+
+/* Line 1455 of yacc.c */
#line 533 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 91:
+
+/* Line 1455 of yacc.c */
#line 535 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 93:
+
+/* Line 1455 of yacc.c */
#line 540 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 94:
+
+/* Line 1455 of yacc.c */
#line 541 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 96:
+
+/* Line 1455 of yacc.c */
#line 547 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 97:
+
+/* Line 1455 of yacc.c */
#line 549 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 99:
+
+/* Line 1455 of yacc.c */
#line 554 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 100:
+
+/* Line 1455 of yacc.c */
#line 555 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 101:
+
+/* Line 1455 of yacc.c */
#line 556 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 103:
+
+/* Line 1455 of yacc.c */
#line 561 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 104:
+
+/* Line 1455 of yacc.c */
#line 562 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 105:
+
+/* Line 1455 of yacc.c */
#line 563 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 107:
+
+/* Line 1455 of yacc.c */
#line 568 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 108:
+
+/* Line 1455 of yacc.c */
#line 569 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 109:
+
+/* Line 1455 of yacc.c */
#line 570 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 110:
+
+/* Line 1455 of yacc.c */
#line 571 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 111:
+
+/* Line 1455 of yacc.c */
#line 572 "../../JavaScriptCore/parser/Grammar.y"
{ InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3511,6 +3641,8 @@ yyreduce:
break;
case 112:
+
+/* Line 1455 of yacc.c */
#line 575 "../../JavaScriptCore/parser/Grammar.y"
{ InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3518,26 +3650,36 @@ yyreduce:
break;
case 114:
+
+/* Line 1455 of yacc.c */
#line 582 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 115:
+
+/* Line 1455 of yacc.c */
#line 583 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 116:
+
+/* Line 1455 of yacc.c */
#line 584 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 117:
+
+/* Line 1455 of yacc.c */
#line 585 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 118:
+
+/* Line 1455 of yacc.c */
#line 587 "../../JavaScriptCore/parser/Grammar.y"
{ InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3545,26 +3687,36 @@ yyreduce:
break;
case 120:
+
+/* Line 1455 of yacc.c */
#line 594 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 121:
+
+/* Line 1455 of yacc.c */
#line 595 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 122:
+
+/* Line 1455 of yacc.c */
#line 596 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 123:
+
+/* Line 1455 of yacc.c */
#line 597 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 124:
+
+/* Line 1455 of yacc.c */
#line 599 "../../JavaScriptCore/parser/Grammar.y"
{ InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3572,6 +3724,8 @@ yyreduce:
break;
case 125:
+
+/* Line 1455 of yacc.c */
#line 603 "../../JavaScriptCore/parser/Grammar.y"
{ InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column);
@@ -3579,156 +3733,218 @@ yyreduce:
break;
case 127:
+
+/* Line 1455 of yacc.c */
#line 610 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 128:
+
+/* Line 1455 of yacc.c */
#line 611 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 129:
+
+/* Line 1455 of yacc.c */
#line 612 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 130:
+
+/* Line 1455 of yacc.c */
#line 613 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 132:
+
+/* Line 1455 of yacc.c */
#line 619 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 133:
+
+/* Line 1455 of yacc.c */
#line 621 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 134:
+
+/* Line 1455 of yacc.c */
#line 623 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 135:
+
+/* Line 1455 of yacc.c */
#line 625 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 137:
+
+/* Line 1455 of yacc.c */
#line 631 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 138:
+
+/* Line 1455 of yacc.c */
#line 632 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 139:
+
+/* Line 1455 of yacc.c */
#line 634 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 140:
+
+/* Line 1455 of yacc.c */
#line 636 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 142:
+
+/* Line 1455 of yacc.c */
#line 641 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 144:
+
+/* Line 1455 of yacc.c */
#line 647 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 146:
+
+/* Line 1455 of yacc.c */
#line 652 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 148:
+
+/* Line 1455 of yacc.c */
#line 657 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 150:
+
+/* Line 1455 of yacc.c */
#line 663 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 152:
+
+/* Line 1455 of yacc.c */
#line 669 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 154:
+
+/* Line 1455 of yacc.c */
#line 674 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 156:
+
+/* Line 1455 of yacc.c */
#line 680 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 158:
+
+/* Line 1455 of yacc.c */
#line 686 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 160:
+
+/* Line 1455 of yacc.c */
#line 691 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 162:
+
+/* Line 1455 of yacc.c */
#line 697 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 164:
+
+/* Line 1455 of yacc.c */
#line 703 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 166:
+
+/* Line 1455 of yacc.c */
#line 708 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 168:
+
+/* Line 1455 of yacc.c */
#line 714 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 170:
+
+/* Line 1455 of yacc.c */
#line 719 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 172:
+
+/* Line 1455 of yacc.c */
#line 725 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;}
break;
case 174:
+
+/* Line 1455 of yacc.c */
#line 731 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;}
break;
case 176:
+
+/* Line 1455 of yacc.c */
#line 737 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;}
break;
case 178:
+
+/* Line 1455 of yacc.c */
#line 743 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature,
(yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants);
@@ -3736,6 +3952,8 @@ yyreduce:
break;
case 180:
+
+/* Line 1455 of yacc.c */
#line 751 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature,
(yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants);
@@ -3743,6 +3961,8 @@ yyreduce:
break;
case 182:
+
+/* Line 1455 of yacc.c */
#line 759 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature,
(yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants);
@@ -3750,99 +3970,137 @@ yyreduce:
break;
case 183:
+
+/* Line 1455 of yacc.c */
#line 765 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpEqual; ;}
break;
case 184:
+
+/* Line 1455 of yacc.c */
#line 766 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpPlusEq; ;}
break;
case 185:
+
+/* Line 1455 of yacc.c */
#line 767 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpMinusEq; ;}
break;
case 186:
+
+/* Line 1455 of yacc.c */
#line 768 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpMultEq; ;}
break;
case 187:
+
+/* Line 1455 of yacc.c */
#line 769 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpDivEq; ;}
break;
case 188:
+
+/* Line 1455 of yacc.c */
#line 770 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpLShift; ;}
break;
case 189:
+
+/* Line 1455 of yacc.c */
#line 771 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpRShift; ;}
break;
case 190:
+
+/* Line 1455 of yacc.c */
#line 772 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpURShift; ;}
break;
case 191:
+
+/* Line 1455 of yacc.c */
#line 773 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpAndEq; ;}
break;
case 192:
+
+/* Line 1455 of yacc.c */
#line 774 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpXOrEq; ;}
break;
case 193:
+
+/* Line 1455 of yacc.c */
#line 775 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpOrEq; ;}
break;
case 194:
+
+/* Line 1455 of yacc.c */
#line 776 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.op) = OpModEq; ;}
break;
case 196:
+
+/* Line 1455 of yacc.c */
#line 781 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 198:
+
+/* Line 1455 of yacc.c */
#line 786 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 200:
+
+/* Line 1455 of yacc.c */
#line 791 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;}
break;
case 218:
+
+/* Line 1455 of yacc.c */
#line 815 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
break;
case 219:
+
+/* Line 1455 of yacc.c */
#line 817 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
break;
case 220:
+
+/* Line 1455 of yacc.c */
#line 822 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
break;
case 221:
+
+/* Line 1455 of yacc.c */
#line 824 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)]));
@@ -3850,6 +4108,8 @@ yyreduce:
break;
case 222:
+
+/* Line 1455 of yacc.c */
#line 830 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.varDeclList).m_node = 0;
(yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
@@ -3861,6 +4121,8 @@ yyreduce:
break;
case 223:
+
+/* Line 1455 of yacc.c */
#line 837 "../../JavaScriptCore/parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column);
@@ -3874,6 +4136,8 @@ yyreduce:
break;
case 224:
+
+/* Line 1455 of yacc.c */
#line 847 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node;
(yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations;
@@ -3885,6 +4149,8 @@ yyreduce:
break;
case 225:
+
+/* Line 1455 of yacc.c */
#line 855 "../../JavaScriptCore/parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column);
@@ -3898,6 +4164,8 @@ yyreduce:
break;
case 226:
+
+/* Line 1455 of yacc.c */
#line 867 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.varDeclList).m_node = 0;
(yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
@@ -3909,6 +4177,8 @@ yyreduce:
break;
case 227:
+
+/* Line 1455 of yacc.c */
#line 874 "../../JavaScriptCore/parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column);
@@ -3922,6 +4192,8 @@ yyreduce:
break;
case 228:
+
+/* Line 1455 of yacc.c */
#line 884 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node;
(yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations;
@@ -3933,6 +4205,8 @@ yyreduce:
break;
case 229:
+
+/* Line 1455 of yacc.c */
#line 892 "../../JavaScriptCore/parser/Grammar.y"
{ AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature);
SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column);
@@ -3946,18 +4220,24 @@ yyreduce:
break;
case 230:
+
+/* Line 1455 of yacc.c */
#line 904 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
break;
case 231:
+
+/* Line 1455 of yacc.c */
#line 907 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;}
break;
case 232:
+
+/* Line 1455 of yacc.c */
#line 912 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node;
(yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head;
@@ -3970,6 +4250,8 @@ yyreduce:
break;
case 233:
+
+/* Line 1455 of yacc.c */
#line 921 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head;
(yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node;
@@ -3982,49 +4264,67 @@ yyreduce:
break;
case 234:
+
+/* Line 1455 of yacc.c */
#line 932 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;}
break;
case 235:
+
+/* Line 1455 of yacc.c */
#line 933 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;}
break;
case 236:
+
+/* Line 1455 of yacc.c */
#line 937 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;}
break;
case 237:
+
+/* Line 1455 of yacc.c */
#line 941 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;}
break;
case 238:
+
+/* Line 1455 of yacc.c */
#line 945 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;}
break;
case 239:
+
+/* Line 1455 of yacc.c */
#line 949 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
break;
case 240:
+
+/* Line 1455 of yacc.c */
#line 951 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;}
break;
case 241:
+
+/* Line 1455 of yacc.c */
#line 957 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;}
break;
case 242:
+
+/* Line 1455 of yacc.c */
#line 960 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node),
mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations),
@@ -4035,24 +4335,32 @@ yyreduce:
break;
case 243:
+
+/* Line 1455 of yacc.c */
#line 969 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;}
break;
case 244:
+
+/* Line 1455 of yacc.c */
#line 971 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;}
break;
case 245:
+
+/* Line 1455 of yacc.c */
#line 973 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;}
break;
case 246:
+
+/* Line 1455 of yacc.c */
#line 976 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations,
(yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features,
@@ -4062,6 +4370,8 @@ yyreduce:
break;
case 247:
+
+/* Line 1455 of yacc.c */
#line 982 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true),
mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations),
@@ -4072,6 +4382,8 @@ yyreduce:
break;
case 248:
+
+/* Line 1455 of yacc.c */
#line 989 "../../JavaScriptCore/parser/Grammar.y"
{
ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node);
@@ -4084,6 +4396,8 @@ yyreduce:
break;
case 249:
+
+/* Line 1455 of yacc.c */
#line 998 "../../JavaScriptCore/parser/Grammar.y"
{ ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column);
SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column);
@@ -4093,6 +4407,8 @@ yyreduce:
break;
case 250:
+
+/* Line 1455 of yacc.c */
#line 1004 "../../JavaScriptCore/parser/Grammar.y"
{ ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column);
SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column);
@@ -4104,16 +4420,22 @@ yyreduce:
break;
case 251:
+
+/* Line 1455 of yacc.c */
#line 1014 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;}
break;
case 253:
+
+/* Line 1455 of yacc.c */
#line 1019 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;}
break;
case 255:
+
+/* Line 1455 of yacc.c */
#line 1024 "../../JavaScriptCore/parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4122,6 +4444,8 @@ yyreduce:
break;
case 256:
+
+/* Line 1455 of yacc.c */
#line 1028 "../../JavaScriptCore/parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4130,6 +4454,8 @@ yyreduce:
break;
case 257:
+
+/* Line 1455 of yacc.c */
#line 1032 "../../JavaScriptCore/parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4138,6 +4464,8 @@ yyreduce:
break;
case 258:
+
+/* Line 1455 of yacc.c */
#line 1036 "../../JavaScriptCore/parser/Grammar.y"
{ ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4146,6 +4474,8 @@ yyreduce:
break;
case 259:
+
+/* Line 1455 of yacc.c */
#line 1043 "../../JavaScriptCore/parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4153,6 +4483,8 @@ yyreduce:
break;
case 260:
+
+/* Line 1455 of yacc.c */
#line 1046 "../../JavaScriptCore/parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4160,6 +4492,8 @@ yyreduce:
break;
case 261:
+
+/* Line 1455 of yacc.c */
#line 1049 "../../JavaScriptCore/parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4167,6 +4501,8 @@ yyreduce:
break;
case 262:
+
+/* Line 1455 of yacc.c */
#line 1052 "../../JavaScriptCore/parser/Grammar.y"
{ BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident));
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4174,6 +4510,8 @@ yyreduce:
break;
case 263:
+
+/* Line 1455 of yacc.c */
#line 1058 "../../JavaScriptCore/parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4181,6 +4519,8 @@ yyreduce:
break;
case 264:
+
+/* Line 1455 of yacc.c */
#line 1061 "../../JavaScriptCore/parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column);
@@ -4188,6 +4528,8 @@ yyreduce:
break;
case 265:
+
+/* Line 1455 of yacc.c */
#line 1064 "../../JavaScriptCore/parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4195,6 +4537,8 @@ yyreduce:
break;
case 266:
+
+/* Line 1455 of yacc.c */
#line 1067 "../../JavaScriptCore/parser/Grammar.y"
{ ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4202,6 +4546,8 @@ yyreduce:
break;
case 267:
+
+/* Line 1455 of yacc.c */
#line 1073 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column),
(yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants);
@@ -4209,6 +4555,8 @@ yyreduce:
break;
case 268:
+
+/* Line 1455 of yacc.c */
#line 1079 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations,
(yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants);
@@ -4216,11 +4564,15 @@ yyreduce:
break;
case 269:
+
+/* Line 1455 of yacc.c */
#line 1085 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;}
break;
case 270:
+
+/* Line 1455 of yacc.c */
#line 1087 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head),
mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations),
@@ -4230,11 +4582,15 @@ yyreduce:
break;
case 271:
+
+/* Line 1455 of yacc.c */
#line 1095 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;}
break;
case 273:
+
+/* Line 1455 of yacc.c */
#line 1100 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node);
(yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head;
@@ -4245,6 +4601,8 @@ yyreduce:
break;
case 274:
+
+/* Line 1455 of yacc.c */
#line 1106 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head;
(yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node);
@@ -4256,26 +4614,36 @@ yyreduce:
break;
case 275:
+
+/* Line 1455 of yacc.c */
#line 1116 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;}
break;
case 276:
+
+/* Line 1455 of yacc.c */
#line 1117 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;}
break;
case 277:
+
+/* Line 1455 of yacc.c */
#line 1121 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;}
break;
case 278:
+
+/* Line 1455 of yacc.c */
#line 1122 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;}
break;
case 279:
+
+/* Line 1455 of yacc.c */
#line 1126 "../../JavaScriptCore/parser/Grammar.y"
{ LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4283,6 +4651,8 @@ yyreduce:
break;
case 280:
+
+/* Line 1455 of yacc.c */
#line 1132 "../../JavaScriptCore/parser/Grammar.y"
{ ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4291,6 +4661,8 @@ yyreduce:
break;
case 281:
+
+/* Line 1455 of yacc.c */
#line 1136 "../../JavaScriptCore/parser/Grammar.y"
{ ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node);
SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column);
@@ -4299,6 +4671,8 @@ yyreduce:
break;
case 282:
+
+/* Line 1455 of yacc.c */
#line 1143 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node),
mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations),
@@ -4309,6 +4683,8 @@ yyreduce:
break;
case 283:
+
+/* Line 1455 of yacc.c */
#line 1149 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0),
mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations),
@@ -4319,6 +4695,8 @@ yyreduce:
break;
case 284:
+
+/* Line 1455 of yacc.c */
#line 1156 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node),
mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations),
@@ -4329,23 +4707,31 @@ yyreduce:
break;
case 285:
+
+/* Line 1455 of yacc.c */
#line 1165 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
break;
case 286:
+
+/* Line 1455 of yacc.c */
#line 1167 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;}
break;
case 287:
+
+/* Line 1455 of yacc.c */
#line 1172 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)); ;}
break;
case 288:
+
+/* Line 1455 of yacc.c */
#line 1174 "../../JavaScriptCore/parser/Grammar.y"
{
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0);
@@ -4357,11 +4743,15 @@ yyreduce:
break;
case 289:
+
+/* Line 1455 of yacc.c */
#line 1184 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), LEXER->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;}
break;
case 290:
+
+/* Line 1455 of yacc.c */
#line 1186 "../../JavaScriptCore/parser/Grammar.y"
{
(yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0);
@@ -4372,11 +4762,15 @@ yyreduce:
break;
case 291:
+
+/* Line 1455 of yacc.c */
#line 1192 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;}
break;
case 292:
+
+/* Line 1455 of yacc.c */
#line 1194 "../../JavaScriptCore/parser/Grammar.y"
{
(yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0);
@@ -4387,6 +4781,8 @@ yyreduce:
break;
case 293:
+
+/* Line 1455 of yacc.c */
#line 1203 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident));
(yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0;
@@ -4394,6 +4790,8 @@ yyreduce:
break;
case 294:
+
+/* Line 1455 of yacc.c */
#line 1206 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head;
(yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0);
@@ -4401,27 +4799,37 @@ yyreduce:
break;
case 295:
+
+/* Line 1455 of yacc.c */
#line 1212 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;}
break;
case 296:
+
+/* Line 1455 of yacc.c */
#line 1213 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;}
break;
case 297:
+
+/* Line 1455 of yacc.c */
#line 1217 "../../JavaScriptCore/parser/Grammar.y"
{ GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;}
break;
case 298:
+
+/* Line 1455 of yacc.c */
#line 1218 "../../JavaScriptCore/parser/Grammar.y"
{ GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features,
(yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;}
break;
case 299:
+
+/* Line 1455 of yacc.c */
#line 1223 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA);
(yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node);
@@ -4433,6 +4841,8 @@ yyreduce:
break;
case 300:
+
+/* Line 1455 of yacc.c */
#line 1230 "../../JavaScriptCore/parser/Grammar.y"
{ (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node);
(yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations);
@@ -4443,188 +4853,261 @@ yyreduce:
break;
case 304:
+
+/* Line 1455 of yacc.c */
#line 1244 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 305:
+
+/* Line 1455 of yacc.c */
#line 1245 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 306:
+
+/* Line 1455 of yacc.c */
#line 1246 "../../JavaScriptCore/parser/Grammar.y"
{ Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;}
break;
case 307:
+
+/* Line 1455 of yacc.c */
#line 1247 "../../JavaScriptCore/parser/Grammar.y"
{ Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;}
break;
case 308:
+
+/* Line 1455 of yacc.c */
#line 1251 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 309:
+
+/* Line 1455 of yacc.c */
#line 1252 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 310:
+
+/* Line 1455 of yacc.c */
#line 1253 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 311:
+
+/* Line 1455 of yacc.c */
#line 1254 "../../JavaScriptCore/parser/Grammar.y"
{ if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;}
break;
case 312:
+
+/* Line 1455 of yacc.c */
#line 1255 "../../JavaScriptCore/parser/Grammar.y"
{ if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;}
break;
case 316:
+
+/* Line 1455 of yacc.c */
#line 1265 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 317:
+
+/* Line 1455 of yacc.c */
#line 1266 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 318:
+
+/* Line 1455 of yacc.c */
#line 1268 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 322:
+
+/* Line 1455 of yacc.c */
#line 1275 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 517:
+
+/* Line 1455 of yacc.c */
#line 1643 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 518:
+
+/* Line 1455 of yacc.c */
#line 1644 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 520:
+
+/* Line 1455 of yacc.c */
#line 1649 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 521:
+
+/* Line 1455 of yacc.c */
#line 1653 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 522:
+
+/* Line 1455 of yacc.c */
#line 1654 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 525:
+
+/* Line 1455 of yacc.c */
#line 1660 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 526:
+
+/* Line 1455 of yacc.c */
#line 1661 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 530:
+
+/* Line 1455 of yacc.c */
#line 1668 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 533:
+
+/* Line 1455 of yacc.c */
#line 1677 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 534:
+
+/* Line 1455 of yacc.c */
#line 1678 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 539:
+
+/* Line 1455 of yacc.c */
#line 1695 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 555:
+
+/* Line 1455 of yacc.c */
#line 1726 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 557:
+
+/* Line 1455 of yacc.c */
#line 1728 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 559:
+
+/* Line 1455 of yacc.c */
#line 1733 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 561:
+
+/* Line 1455 of yacc.c */
#line 1735 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 563:
+
+/* Line 1455 of yacc.c */
#line 1740 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 565:
+
+/* Line 1455 of yacc.c */
#line 1742 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 568:
+
+/* Line 1455 of yacc.c */
#line 1754 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 569:
+
+/* Line 1455 of yacc.c */
#line 1755 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 578:
+
+/* Line 1455 of yacc.c */
#line 1779 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
case 580:
+
+/* Line 1455 of yacc.c */
#line 1784 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 585:
+
+/* Line 1455 of yacc.c */
#line 1795 "../../JavaScriptCore/parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 592:
+
+/* Line 1455 of yacc.c */
#line 1811 "../../JavaScriptCore/parser/Grammar.y"
{ ;}
break;
-/* Line 1267 of yacc.c. */
-#line 4628 "WebCore/tmp/../generated/Grammar.tab.c"
+
+/* Line 1455 of yacc.c */
+#line 5111 "WebCore/tmp/../generated/Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4700,7 +5183,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -4717,7 +5200,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -4775,14 +5258,11 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
+ the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
@@ -4807,7 +5287,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -4818,7 +5298,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc);
/* Do not reclaim the symbols of the rule which action triggered
@@ -4844,6 +5324,8 @@ yyreturn:
}
+
+/* Line 1675 of yacc.c */
#line 1827 "../../JavaScriptCore/parser/Grammar.y"
diff --git a/src/3rdparty/webkit/WebCore/generated/Grammar.h b/src/3rdparty/webkit/WebCore/generated/Grammar.h
index 4188cd8..34b0b37 100644
--- a/src/3rdparty/webkit/WebCore/generated/Grammar.h
+++ b/src/3rdparty/webkit/WebCore/generated/Grammar.h
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -104,78 +104,16 @@
AUTOMINUSMINUS = 320
};
#endif
-/* Tokens. */
-#define NULLTOKEN 258
-#define TRUETOKEN 259
-#define FALSETOKEN 260
-#define BREAK 261
-#define CASE 262
-#define DEFAULT 263
-#define FOR 264
-#define NEW 265
-#define VAR 266
-#define CONSTTOKEN 267
-#define CONTINUE 268
-#define FUNCTION 269
-#define RETURN 270
-#define VOIDTOKEN 271
-#define DELETETOKEN 272
-#define IF 273
-#define THISTOKEN 274
-#define DO 275
-#define WHILE 276
-#define INTOKEN 277
-#define INSTANCEOF 278
-#define TYPEOF 279
-#define SWITCH 280
-#define WITH 281
-#define RESERVED 282
-#define THROW 283
-#define TRY 284
-#define CATCH 285
-#define FINALLY 286
-#define DEBUGGER 287
-#define IF_WITHOUT_ELSE 288
-#define ELSE 289
-#define EQEQ 290
-#define NE 291
-#define STREQ 292
-#define STRNEQ 293
-#define LE 294
-#define GE 295
-#define OR 296
-#define AND 297
-#define PLUSPLUS 298
-#define MINUSMINUS 299
-#define LSHIFT 300
-#define RSHIFT 301
-#define URSHIFT 302
-#define PLUSEQUAL 303
-#define MINUSEQUAL 304
-#define MULTEQUAL 305
-#define DIVEQUAL 306
-#define LSHIFTEQUAL 307
-#define RSHIFTEQUAL 308
-#define URSHIFTEQUAL 309
-#define ANDEQUAL 310
-#define MODEQUAL 311
-#define XOREQUAL 312
-#define OREQUAL 313
-#define OPENBRACE 314
-#define CLOSEBRACE 315
-#define NUMBER 316
-#define IDENT 317
-#define STRING 318
-#define AUTOPLUSPLUS 319
-#define AUTOMINUSMINUS 320
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 157 "../../JavaScriptCore/parser/Grammar.y"
{
+
+/* Line 1676 of yacc.c */
+#line 157 "../../JavaScriptCore/parser/Grammar.y"
+
int intValue;
double doubleValue;
Identifier* ident;
@@ -205,13 +143,15 @@ typedef union YYSTYPE
ParameterListInfo parameterList;
Operator op;
-}
-/* Line 1489 of yacc.c. */
-#line 211 "WebCore/tmp/../generated/Grammar.tab.h"
- YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c */
+#line 151 "WebCore/tmp/../generated/Grammar.tab.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -230,3 +170,4 @@ typedef struct YYLTYPE
#endif
+
diff --git a/src/3rdparty/webkit/WebCore/generated/HTMLElementFactory.cpp b/src/3rdparty/webkit/WebCore/generated/HTMLElementFactory.cpp
index d14bc93..4a8430c 100644
--- a/src/3rdparty/webkit/WebCore/generated/HTMLElementFactory.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/HTMLElementFactory.cpp
@@ -184,21 +184,33 @@ static PassRefPtr<HTMLElement> tablecolConstructor(const QualifiedName& tagName,
return new HTMLTableColElement(tagName, doc);
}
+#if ENABLE(DATAGRID)
+
static PassRefPtr<HTMLElement> datagridConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
return new HTMLDataGridElement(tagName, doc);
}
+#endif
+
+#if ENABLE(DATAGRID)
+
static PassRefPtr<HTMLElement> datagridcellConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
return new HTMLDataGridCellElement(tagName, doc);
}
+#endif
+
+#if ENABLE(DATAGRID)
+
static PassRefPtr<HTMLElement> datagridcolConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
return new HTMLDataGridColElement(tagName, doc);
}
+#endif
+
static PassRefPtr<HTMLElement> modConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
return new HTMLModElement(tagName, doc);
@@ -219,11 +231,15 @@ static PassRefPtr<HTMLElement> dlistConstructor(const QualifiedName& tagName, Do
return new HTMLDListElement(tagName, doc);
}
+#if ENABLE(DATAGRID)
+
static PassRefPtr<HTMLElement> datagridrowConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
return new HTMLDataGridRowElement(tagName, doc);
}
+#endif
+
static PassRefPtr<HTMLElement> embedConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
return new HTMLEmbedElement(tagName, doc);
@@ -486,14 +502,26 @@ static inline void createFunctionMapIfNecessary()
addTag(captionTag, tablecaptionConstructor);
addTag(colTag, tablecolConstructor);
addTag(colgroupTag, tablecolConstructor);
+#if ENABLE(DATAGRID)
addTag(datagridTag, datagridConstructor);
+#endif
+
+#if ENABLE(DATAGRID)
addTag(dcellTag, datagridcellConstructor);
+#endif
+
+#if ENABLE(DATAGRID)
addTag(dcolTag, datagridcolConstructor);
+#endif
+
addTag(delTag, modConstructor);
addTag(dirTag, directoryConstructor);
addTag(divTag, divConstructor);
addTag(dlTag, dlistConstructor);
+#if ENABLE(DATAGRID)
addTag(drowTag, datagridrowConstructor);
+#endif
+
addTag(embedTag, embedConstructor);
addTag(fieldsetTag, fieldsetConstructor);
addTag(fontTag, fontConstructor);
diff --git a/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp b/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp
index 4e23159..f40ae05 100644
--- a/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp
@@ -128,6 +128,9 @@ DEFINE_GLOBAL(QualifiedName, paramTag, nullAtom, "param", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, plaintextTag, nullAtom, "plaintext", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, preTag, nullAtom, "pre", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, qTag, nullAtom, "q", xhtmlNamespaceURI);
+DEFINE_GLOBAL(QualifiedName, rpTag, nullAtom, "rp", xhtmlNamespaceURI);
+DEFINE_GLOBAL(QualifiedName, rtTag, nullAtom, "rt", xhtmlNamespaceURI);
+DEFINE_GLOBAL(QualifiedName, rubyTag, nullAtom, "ruby", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, sTag, nullAtom, "s", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, sampTag, nullAtom, "samp", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, scriptTag, nullAtom, "script", xhtmlNamespaceURI);
@@ -244,6 +247,9 @@ WebCore::QualifiedName** getHTMLTags(size_t* size)
(WebCore::QualifiedName*)&plaintextTag,
(WebCore::QualifiedName*)&preTag,
(WebCore::QualifiedName*)&qTag,
+ (WebCore::QualifiedName*)&rpTag,
+ (WebCore::QualifiedName*)&rtTag,
+ (WebCore::QualifiedName*)&rubyTag,
(WebCore::QualifiedName*)&sTag,
(WebCore::QualifiedName*)&sampTag,
(WebCore::QualifiedName*)&scriptTag,
@@ -273,7 +279,7 @@ WebCore::QualifiedName** getHTMLTags(size_t* size)
(WebCore::QualifiedName*)&wbrTag,
(WebCore::QualifiedName*)&xmpTag,
};
- *size = 111;
+ *size = 114;
return HTMLTags;
}
@@ -292,6 +298,7 @@ DEFINE_GLOBAL(QualifiedName, aria_checkedAttr, nullAtom, "aria_checked", xhtmlNa
DEFINE_GLOBAL(QualifiedName, aria_describedbyAttr, nullAtom, "aria_describedby", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, aria_disabledAttr, nullAtom, "aria_disabled", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, aria_hiddenAttr, nullAtom, "aria_hidden", xhtmlNamespaceURI);
+DEFINE_GLOBAL(QualifiedName, aria_labelAttr, nullAtom, "aria_label", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, aria_labeledbyAttr, nullAtom, "aria_labeledby", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, aria_labelledbyAttr, nullAtom, "aria_labelledby", xhtmlNamespaceURI);
DEFINE_GLOBAL(QualifiedName, aria_levelAttr, nullAtom, "aria_level", xhtmlNamespaceURI);
@@ -529,6 +536,7 @@ WebCore::QualifiedName** getHTMLAttrs(size_t* size)
(WebCore::QualifiedName*)&aria_describedbyAttr,
(WebCore::QualifiedName*)&aria_disabledAttr,
(WebCore::QualifiedName*)&aria_hiddenAttr,
+ (WebCore::QualifiedName*)&aria_labelAttr,
(WebCore::QualifiedName*)&aria_labeledbyAttr,
(WebCore::QualifiedName*)&aria_labelledbyAttr,
(WebCore::QualifiedName*)&aria_levelAttr,
@@ -748,7 +756,7 @@ WebCore::QualifiedName** getHTMLAttrs(size_t* size)
(WebCore::QualifiedName*)&widthAttr,
(WebCore::QualifiedName*)&wrapAttr,
};
- *size = 232;
+ *size = 233;
return HTMLAttr;
}
@@ -856,6 +864,9 @@ void init()
const char *plaintextTagString = "plaintext";
const char *preTagString = "pre";
const char *qTagString = "q";
+ const char *rpTagString = "rp";
+ const char *rtTagString = "rt";
+ const char *rubyTagString = "ruby";
const char *sTagString = "s";
const char *sampTagString = "samp";
const char *scriptTagString = "script";
@@ -967,6 +978,9 @@ void init()
new ((void*)&plaintextTag) QualifiedName(nullAtom, plaintextTagString, xhtmlNS);
new ((void*)&preTag) QualifiedName(nullAtom, preTagString, xhtmlNS);
new ((void*)&qTag) QualifiedName(nullAtom, qTagString, xhtmlNS);
+ new ((void*)&rpTag) QualifiedName(nullAtom, rpTagString, xhtmlNS);
+ new ((void*)&rtTag) QualifiedName(nullAtom, rtTagString, xhtmlNS);
+ new ((void*)&rubyTag) QualifiedName(nullAtom, rubyTagString, xhtmlNS);
new ((void*)&sTag) QualifiedName(nullAtom, sTagString, xhtmlNS);
new ((void*)&sampTag) QualifiedName(nullAtom, sampTagString, xhtmlNS);
new ((void*)&scriptTag) QualifiedName(nullAtom, scriptTagString, xhtmlNS);
@@ -1010,6 +1024,7 @@ void init()
const char *aria_describedbyAttrString = "aria-describedby";
const char *aria_disabledAttrString = "aria-disabled";
const char *aria_hiddenAttrString = "aria-hidden";
+ const char *aria_labelAttrString = "aria-label";
const char *aria_labeledbyAttrString = "aria-labeledby";
const char *aria_labelledbyAttrString = "aria-labelledby";
const char *aria_levelAttrString = "aria-level";
@@ -1241,6 +1256,7 @@ void init()
new ((void*)&aria_describedbyAttr) QualifiedName(nullAtom, aria_describedbyAttrString, nullAtom);
new ((void*)&aria_disabledAttr) QualifiedName(nullAtom, aria_disabledAttrString, nullAtom);
new ((void*)&aria_hiddenAttr) QualifiedName(nullAtom, aria_hiddenAttrString, nullAtom);
+ new ((void*)&aria_labelAttr) QualifiedName(nullAtom, aria_labelAttrString, nullAtom);
new ((void*)&aria_labeledbyAttr) QualifiedName(nullAtom, aria_labeledbyAttrString, nullAtom);
new ((void*)&aria_labelledbyAttr) QualifiedName(nullAtom, aria_labelledbyAttrString, nullAtom);
new ((void*)&aria_levelAttr) QualifiedName(nullAtom, aria_levelAttrString, nullAtom);
diff --git a/src/3rdparty/webkit/WebCore/generated/HTMLNames.h b/src/3rdparty/webkit/WebCore/generated/HTMLNames.h
index fba6088..3de4fc5 100644
--- a/src/3rdparty/webkit/WebCore/generated/HTMLNames.h
+++ b/src/3rdparty/webkit/WebCore/generated/HTMLNames.h
@@ -124,6 +124,9 @@ extern const WebCore::QualifiedName paramTag;
extern const WebCore::QualifiedName plaintextTag;
extern const WebCore::QualifiedName preTag;
extern const WebCore::QualifiedName qTag;
+extern const WebCore::QualifiedName rpTag;
+extern const WebCore::QualifiedName rtTag;
+extern const WebCore::QualifiedName rubyTag;
extern const WebCore::QualifiedName sTag;
extern const WebCore::QualifiedName sampTag;
extern const WebCore::QualifiedName scriptTag;
@@ -167,6 +170,7 @@ extern const WebCore::QualifiedName aria_checkedAttr;
extern const WebCore::QualifiedName aria_describedbyAttr;
extern const WebCore::QualifiedName aria_disabledAttr;
extern const WebCore::QualifiedName aria_hiddenAttr;
+extern const WebCore::QualifiedName aria_labelAttr;
extern const WebCore::QualifiedName aria_labeledbyAttr;
extern const WebCore::QualifiedName aria_labelledbyAttr;
extern const WebCore::QualifiedName aria_levelAttr;
diff --git a/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp b/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp
index bf9bea5..4659189 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSAttrTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSAttrTable =
+static JSC_CONST_HASHTABLE HashTable JSAttrTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSAttrTableValues, 0 };
#else
@@ -63,7 +63,7 @@ static const HashTableValue JSAttrConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSAttrConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSAttrConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSAttrConstructorTableValues, 0 };
#else
@@ -101,7 +101,7 @@ static const HashTableValue JSAttrPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSAttrPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSAttrPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSAttrPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp
index 25aede5..2b5afda 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp
@@ -38,7 +38,7 @@ static const HashTableValue JSBarInfoTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSBarInfoTable =
+static JSC_CONST_HASHTABLE HashTable JSBarInfoTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSBarInfoTableValues, 0 };
#else
@@ -52,7 +52,7 @@ static const HashTableValue JSBarInfoPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSBarInfoPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSBarInfoPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSBarInfoPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp b/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp
index f89540d..51f543f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp
@@ -38,7 +38,7 @@ static const HashTableValue JSCDATASectionTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCDATASectionTable =
+static JSC_CONST_HASHTABLE HashTable JSCDATASectionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCDATASectionTableValues, 0 };
#else
@@ -52,7 +52,7 @@ static const HashTableValue JSCDATASectionConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCDATASectionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCDATASectionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCDATASectionConstructorTableValues, 0 };
#else
@@ -90,7 +90,7 @@ static const HashTableValue JSCDATASectionPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCDATASectionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCDATASectionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCDATASectionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp
index 15cabbf..70a61d5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSCSSCharsetRuleTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSCharsetRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSCharsetRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSCSSCharsetRuleTableValues, 0 };
#else
@@ -54,7 +54,7 @@ static const HashTableValue JSCSSCharsetRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSCharsetRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSCharsetRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSCharsetRuleConstructorTableValues, 0 };
#else
@@ -92,7 +92,7 @@ static const HashTableValue JSCSSCharsetRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSCharsetRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSCharsetRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSCharsetRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp
index ab3b3a5..13c119e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSCSSFontFaceRuleTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSFontFaceRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSCSSFontFaceRuleTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSCSSFontFaceRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSFontFaceRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSFontFaceRuleConstructorTableValues, 0 };
#else
@@ -94,7 +94,7 @@ static const HashTableValue JSCSSFontFaceRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSFontFaceRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSFontFaceRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp
index 4dc5151..45d5d60 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSCSSImportRuleTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSImportRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSImportRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSImportRuleTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSCSSImportRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSImportRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSImportRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSImportRuleConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSCSSImportRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSImportRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSImportRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSImportRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp
index 35589af..3e13a69 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSCSSMediaRuleTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSMediaRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSMediaRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSMediaRuleTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSCSSMediaRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSMediaRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSMediaRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSMediaRuleConstructorTableValues, 0 };
#else
@@ -100,7 +100,7 @@ static const HashTableValue JSCSSMediaRulePrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSMediaRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSMediaRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSCSSMediaRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp
index 6869a49..c02abbd 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSCSSPageRuleTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSPageRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSPageRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSPageRuleTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSCSSPageRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSPageRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSPageRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSPageRuleConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSCSSPageRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSPageRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSPageRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSPageRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp
index 61a39ec..5d81a44 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSCSSPrimitiveValueTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSPrimitiveValueTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSPrimitiveValueTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSCSSPrimitiveValueTableValues, 0 };
#else
@@ -88,7 +88,7 @@ static const HashTableValue JSCSSPrimitiveValueConstructorTableValues[27] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSPrimitiveValueConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSPrimitiveValueConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSCSSPrimitiveValueConstructorTableValues, 0 };
#else
@@ -159,7 +159,7 @@ static const HashTableValue JSCSSPrimitiveValuePrototypeTableValues[34] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSPrimitiveValuePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSPrimitiveValuePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSCSSPrimitiveValuePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp
index 31a4dc3..3aac528 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSCSSRuleTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSCSSRuleTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSCSSRuleConstructorTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSCSSRuleConstructorTableValues, 0 };
#else
@@ -119,7 +119,7 @@ static const HashTableValue JSCSSRulePrototypeTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSCSSRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp
index 19e9d14..6188091 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSCSSRuleListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSRuleListTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSRuleListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCSSRuleListTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSCSSRuleListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSRuleListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSRuleListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSRuleListConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSCSSRuleListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSRuleListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSRuleListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSRuleListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp
index cf7ceed..c437238 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSCSSStyleDeclarationTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleDeclarationTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleDeclarationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSCSSStyleDeclarationTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSCSSStyleDeclarationConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleDeclarationConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleDeclarationConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSStyleDeclarationConstructorTableValues, 0 };
#else
@@ -111,7 +111,7 @@ static const HashTableValue JSCSSStyleDeclarationPrototypeTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleDeclarationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleDeclarationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSCSSStyleDeclarationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp
index 1d92b22..a9f69a2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSCSSStyleRuleTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSStyleRuleTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSCSSStyleRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSStyleRuleConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSCSSStyleRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSStyleRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp
index f697203..c1cc446 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSCSSStyleSheetTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleSheetTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleSheetTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSCSSStyleSheetTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSCSSStyleSheetConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleSheetConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleSheetConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSStyleSheetConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSCSSStyleSheetPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSStyleSheetPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSStyleSheetPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSStyleSheetPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp
index 87aff14..a402304 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSCSSValueTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSValueTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSValueTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSValueTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSCSSValueConstructorTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSValueConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSValueConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSValueConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSCSSValuePrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSValuePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSValuePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSCSSValuePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp
index 98721ec..7322385 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSCSSValueListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSValueListTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSValueListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCSSValueListTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSCSSValueListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSValueListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSValueListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSValueListConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSCSSValueListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSValueListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSValueListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSValueListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp
index 3c8c75a..4aa1770 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSCSSVariablesDeclarationTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSVariablesDeclarationTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSVariablesDeclarationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSCSSVariablesDeclarationTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSCSSVariablesDeclarationConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSVariablesDeclarationConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSVariablesDeclarationConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSVariablesDeclarationConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSCSSVariablesDeclarationPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSVariablesDeclarationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSVariablesDeclarationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCSSVariablesDeclarationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp
index ed3050d..f28aaed 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSCSSVariablesRuleTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSVariablesRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSVariablesRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCSSVariablesRuleTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSCSSVariablesRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSVariablesRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSVariablesRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSVariablesRuleConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSCSSVariablesRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCSSVariablesRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCSSVariablesRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCSSVariablesRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp
index 7801622..79db6e0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSCanvasGradientPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCanvasGradientPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCanvasGradientPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCanvasGradientPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp
index 14dc535..c443a9c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp
@@ -37,7 +37,7 @@ static const HashTableValue JSCanvasPatternPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCanvasPatternPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCanvasPatternPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCanvasPatternPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
index 2f318c1..fd54b4f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
@@ -69,7 +69,7 @@ static const HashTableValue JSCanvasRenderingContext2DTableValues[18] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCanvasRenderingContext2DTable =
+static JSC_CONST_HASHTABLE HashTable JSCanvasRenderingContext2DTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSCanvasRenderingContext2DTableValues, 0 };
#else
@@ -83,7 +83,7 @@ static const HashTableValue JSCanvasRenderingContext2DConstructorTableValues[1]
{ 0, 0, 0, 0 }
};
-static const HashTable JSCanvasRenderingContext2DConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCanvasRenderingContext2DConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCanvasRenderingContext2DConstructorTableValues, 0 };
#else
@@ -165,7 +165,7 @@ static const HashTableValue JSCanvasRenderingContext2DPrototypeTableValues[45] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCanvasRenderingContext2DPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCanvasRenderingContext2DPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSCanvasRenderingContext2DPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp b/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp
index a860721..a2d10e4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSCharacterDataTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCharacterDataTable =
+static JSC_CONST_HASHTABLE HashTable JSCharacterDataTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCharacterDataTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSCharacterDataConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCharacterDataConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCharacterDataConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCharacterDataConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSCharacterDataPrototypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCharacterDataPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCharacterDataPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCharacterDataPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp
index 4db0efb..aea6ac5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSClientRectTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClientRectTable =
+static JSC_CONST_HASHTABLE HashTable JSClientRectTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSClientRectTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSClientRectConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClientRectConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSClientRectConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSClientRectConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSClientRectPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClientRectPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSClientRectPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSClientRectPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp
index 97eff69..854daa3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSClientRectListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClientRectListTable =
+static JSC_CONST_HASHTABLE HashTable JSClientRectListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSClientRectListTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSClientRectListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClientRectListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSClientRectListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSClientRectListConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSClientRectListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClientRectListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSClientRectListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSClientRectListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp b/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp
index 19c40b7..7306d2a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSClipboardTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClipboardTable =
+static JSC_CONST_HASHTABLE HashTable JSClipboardTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSClipboardTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSClipboardConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClipboardConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSClipboardConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSClipboardConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSClipboardPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSClipboardPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSClipboardPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSClipboardPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSComment.cpp b/src/3rdparty/webkit/WebCore/generated/JSComment.cpp
index 7905094..6666541 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSComment.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSComment.cpp
@@ -38,7 +38,7 @@ static const HashTableValue JSCommentTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCommentTable =
+static JSC_CONST_HASHTABLE HashTable JSCommentTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCommentTableValues, 0 };
#else
@@ -52,7 +52,7 @@ static const HashTableValue JSCommentConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCommentConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCommentConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCommentConstructorTableValues, 0 };
#else
@@ -90,7 +90,7 @@ static const HashTableValue JSCommentPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCommentPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCommentPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCommentPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp b/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp
index 24e5ef3..2b223a2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSConsoleTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSConsoleTable =
+static JSC_CONST_HASHTABLE HashTable JSConsoleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSConsoleTableValues, 0 };
#else
@@ -70,7 +70,7 @@ static const HashTableValue JSConsolePrototypeTableValues[17] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSConsolePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSConsolePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSConsolePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp
index 0db560b..eafee51 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSCoordinatesTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCoordinatesTable =
+static JSC_CONST_HASHTABLE HashTable JSCoordinatesTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSCoordinatesTableValues, 0 };
#else
@@ -63,7 +63,7 @@ static const HashTableValue JSCoordinatesPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCoordinatesPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCoordinatesPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCoordinatesPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp b/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp
index 03a3eb3..b3a834f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSCounterTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCounterTable =
+static JSC_CONST_HASHTABLE HashTable JSCounterTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSCounterTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSCounterConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCounterConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSCounterConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCounterConstructorTableValues, 0 };
#else
@@ -95,7 +95,7 @@ static const HashTableValue JSCounterPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSCounterPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSCounterPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSCounterPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp
index 0d7202b..e9d43ee 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp
@@ -57,7 +57,7 @@ static const HashTableValue JSDOMApplicationCacheTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMApplicationCacheTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMApplicationCacheTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSDOMApplicationCacheTableValues, 0 };
#else
@@ -82,7 +82,7 @@ static const HashTableValue JSDOMApplicationCachePrototypeTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMApplicationCachePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMApplicationCachePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSDOMApplicationCachePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp
index 3b45220..2241182 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSDOMCoreExceptionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMCoreExceptionTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSDOMCoreExceptionTableValues, 0 };
#else
@@ -81,7 +81,7 @@ static const HashTableValue JSDOMCoreExceptionConstructorTableValues[23] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMCoreExceptionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSDOMCoreExceptionConstructorTableValues, 0 };
#else
@@ -142,7 +142,7 @@ static const HashTableValue JSDOMCoreExceptionPrototypeTableValues[24] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMCoreExceptionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSDOMCoreExceptionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp
index 1e2f950..9b5787c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSDOMImplementationTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMImplementationTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMImplementationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDOMImplementationTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSDOMImplementationConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMImplementationConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMImplementationConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDOMImplementationConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSDOMImplementationPrototypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMImplementationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMImplementationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSDOMImplementationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp
index ffb4f70..ac05d7d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSDOMParserTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMParserTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMParserTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDOMParserTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSDOMParserConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMParserConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMParserConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDOMParserConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSDOMParserPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMParserPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMParserPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDOMParserPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp
index 422c410..b0a249d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp
@@ -56,7 +56,7 @@ static const HashTableValue JSDOMSelectionTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMSelectionTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMSelectionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSDOMSelectionTableValues, 0 };
#else
@@ -85,7 +85,7 @@ static const HashTableValue JSDOMSelectionPrototypeTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMSelectionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMSelectionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSDOMSelectionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
index d9c3ed9..6ac4749 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
@@ -94,6 +94,7 @@
#include "JSHTMLCanvasElement.h"
#include "JSHTMLCollection.h"
#include "JSHTMLDListElement.h"
+#include "JSHTMLDataGridCellElement.h"
#include "JSHTMLDataGridColElement.h"
#include "JSHTMLDataGridElement.h"
#include "JSHTMLDirectoryElement.h"
@@ -148,7 +149,9 @@
#include "JSKeyboardEvent.h"
#include "JSMediaError.h"
#include "JSMediaList.h"
+#include "JSMessageChannel.h"
#include "JSMessageEvent.h"
+#include "JSMessagePort.h"
#include "JSMimeType.h"
#include "JSMimeTypeArray.h"
#include "JSMouseEvent.h"
@@ -225,7 +228,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow);
/* Hash table */
-static const HashTableValue JSDOMWindowTableValues[272] =
+static const HashTableValue JSDOMWindowTableValues[275] =
{
{ "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 },
{ "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 },
@@ -385,8 +388,15 @@ static const HashTableValue JSDOMWindowTableValues[272] =
{ "HTMLBodyElement", DontDelete, (intptr_t)jsDOMWindowHTMLBodyElementConstructor, (intptr_t)setJSDOMWindowHTMLBodyElementConstructor },
{ "HTMLButtonElement", DontDelete, (intptr_t)jsDOMWindowHTMLButtonElementConstructor, (intptr_t)setJSDOMWindowHTMLButtonElementConstructor },
{ "HTMLCanvasElement", DontDelete, (intptr_t)jsDOMWindowHTMLCanvasElementConstructor, (intptr_t)setJSDOMWindowHTMLCanvasElementConstructor },
+#if ENABLE(DATAGRID)
{ "HTMLDataGridElement", DontDelete, (intptr_t)jsDOMWindowHTMLDataGridElementConstructor, (intptr_t)setJSDOMWindowHTMLDataGridElementConstructor },
+#endif
+#if ENABLE(DATAGRID)
+ { "HTMLDataGridCellElement", DontDelete, (intptr_t)jsDOMWindowHTMLDataGridCellElementConstructor, (intptr_t)setJSDOMWindowHTMLDataGridCellElementConstructor },
+#endif
+#if ENABLE(DATAGRID)
{ "HTMLDataGridColElement", DontDelete, (intptr_t)jsDOMWindowHTMLDataGridColElementConstructor, (intptr_t)setJSDOMWindowHTMLDataGridColElementConstructor },
+#endif
{ "HTMLDListElement", DontDelete, (intptr_t)jsDOMWindowHTMLDListElementConstructor, (intptr_t)setJSDOMWindowHTMLDListElementConstructor },
{ "HTMLDirectoryElement", DontDelete, (intptr_t)jsDOMWindowHTMLDirectoryElementConstructor, (intptr_t)setJSDOMWindowHTMLDirectoryElementConstructor },
{ "HTMLDivElement", DontDelete, (intptr_t)jsDOMWindowHTMLDivElementConstructor, (intptr_t)setJSDOMWindowHTMLDivElementConstructor },
@@ -467,6 +477,8 @@ static const HashTableValue JSDOMWindowTableValues[272] =
{ "XMLHttpRequest", DontDelete, (intptr_t)jsDOMWindowXMLHttpRequestConstructor, (intptr_t)setJSDOMWindowXMLHttpRequestConstructor },
{ "XMLHttpRequestUpload", DontDelete, (intptr_t)jsDOMWindowXMLHttpRequestUploadConstructor, (intptr_t)setJSDOMWindowXMLHttpRequestUploadConstructor },
{ "XMLHttpRequestException", DontDelete, (intptr_t)jsDOMWindowXMLHttpRequestExceptionConstructor, (intptr_t)setJSDOMWindowXMLHttpRequestExceptionConstructor },
+ { "MessagePort", DontDelete, (intptr_t)jsDOMWindowMessagePortConstructor, (intptr_t)setJSDOMWindowMessagePortConstructor },
+ { "MessageChannel", DontDelete, (intptr_t)jsDOMWindowMessageChannelConstructor, (intptr_t)setJSDOMWindowMessageChannelConstructor },
{ "Worker", DontDelete, (intptr_t)jsDOMWindowWorkerConstructor, (intptr_t)setJSDOMWindowWorkerConstructor },
{ "Plugin", DontDelete, (intptr_t)jsDOMWindowPluginConstructor, (intptr_t)setJSDOMWindowPluginConstructor },
{ "PluginArray", DontDelete, (intptr_t)jsDOMWindowPluginArrayConstructor, (intptr_t)setJSDOMWindowPluginArrayConstructor },
@@ -511,7 +523,7 @@ static const HashTableValue JSDOMWindowTableValues[272] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMWindowTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMWindowTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 32767, JSDOMWindowTableValues, 0 };
#else
@@ -561,7 +573,7 @@ static const HashTableValue JSDOMWindowPrototypeTableValues[37] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDOMWindowPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDOMWindowPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSDOMWindowPrototypeTableValues, 0 };
#else
@@ -2182,6 +2194,7 @@ JSValue jsDOMWindowHTMLCanvasElementConstructor(ExecState* exec, const Identifie
return JSHTMLCanvasElement::getConstructor(exec);
}
+#if ENABLE(DATAGRID)
JSValue jsDOMWindowHTMLDataGridElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
@@ -2189,7 +2202,19 @@ JSValue jsDOMWindowHTMLDataGridElementConstructor(ExecState* exec, const Identif
UNUSED_PARAM(slot);
return JSHTMLDataGridElement::getConstructor(exec);
}
+#endif
+
+#if ENABLE(DATAGRID)
+JSValue jsDOMWindowHTMLDataGridCellElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
+ return jsUndefined();
+ UNUSED_PARAM(slot);
+ return JSHTMLDataGridCellElement::getConstructor(exec);
+}
+#endif
+#if ENABLE(DATAGRID)
JSValue jsDOMWindowHTMLDataGridColElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
@@ -2197,6 +2222,7 @@ JSValue jsDOMWindowHTMLDataGridColElementConstructor(ExecState* exec, const Iden
UNUSED_PARAM(slot);
return JSHTMLDataGridColElement::getConstructor(exec);
}
+#endif
JSValue jsDOMWindowHTMLDListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
@@ -2833,6 +2859,21 @@ JSValue jsDOMWindowXMLHttpRequestExceptionConstructor(ExecState* exec, const Ide
return JSXMLHttpRequestException::getConstructor(exec);
}
+JSValue jsDOMWindowMessagePortConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
+ return jsUndefined();
+ UNUSED_PARAM(slot);
+ return JSMessagePort::getConstructor(exec);
+}
+
+JSValue jsDOMWindowMessageChannelConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
+ return jsUndefined();
+ return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->messageChannel(exec);
+}
+
JSValue jsDOMWindowWorkerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
@@ -4386,6 +4427,14 @@ void setJSDOMWindowHTMLDataGridElementConstructor(ExecState* exec, JSObject* thi
static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "HTMLDataGridElement"), value);
}
+void setJSDOMWindowHTMLDataGridCellElementConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
+ return;
+ // Shadowing a built-in constructor
+ static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "HTMLDataGridCellElement"), value);
+}
+
void setJSDOMWindowHTMLDataGridColElementConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
{
if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
@@ -5034,6 +5083,22 @@ void setJSDOMWindowXMLHttpRequestExceptionConstructor(ExecState* exec, JSObject*
static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "XMLHttpRequestException"), value);
}
+void setJSDOMWindowMessagePortConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
+ return;
+ // Shadowing a built-in constructor
+ static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "MessagePort"), value);
+}
+
+void setJSDOMWindowMessageChannelConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
+ return;
+ // Shadowing a built-in constructor
+ static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "MessageChannel"), value);
+}
+
void setJSDOMWindowWorkerConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
{
if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
index 869e598..073eff7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
@@ -66,6 +66,7 @@ public:
JSC::JSValue webKitCSSMatrix(JSC::ExecState*) const;
JSC::JSValue webKitPoint(JSC::ExecState*) const;
JSC::JSValue xmlHttpRequest(JSC::ExecState*) const;
+ JSC::JSValue messageChannel(JSC::ExecState*) const;
JSC::JSValue worker(JSC::ExecState*) const;
JSC::JSValue audio(JSC::ExecState*) const;
@@ -447,6 +448,8 @@ JSC::JSValue jsDOMWindowHTMLCanvasElementConstructor(JSC::ExecState*, const JSC:
void setJSDOMWindowHTMLCanvasElementConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowHTMLDataGridElementConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowHTMLDataGridElementConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsDOMWindowHTMLDataGridCellElementConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+void setJSDOMWindowHTMLDataGridCellElementConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowHTMLDataGridColElementConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowHTMLDataGridColElementConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowHTMLDListElementConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
@@ -609,6 +612,10 @@ JSC::JSValue jsDOMWindowXMLHttpRequestUploadConstructor(JSC::ExecState*, const J
void setJSDOMWindowXMLHttpRequestUploadConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowXMLHttpRequestExceptionConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowXMLHttpRequestExceptionConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsDOMWindowMessagePortConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+void setJSDOMWindowMessagePortConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsDOMWindowMessageChannelConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+void setJSDOMWindowMessageChannelConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp
index 105b916..9559fb5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp
@@ -19,6 +19,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSDataGridColumn.h"
#include "DataGridColumn.h"
@@ -47,7 +50,7 @@ static const HashTableValue JSDataGridColumnTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDataGridColumnTable =
+static JSC_CONST_HASHTABLE HashTable JSDataGridColumnTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSDataGridColumnTableValues, 0 };
#else
@@ -67,7 +70,7 @@ static const HashTableValue JSDataGridColumnConstructorTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDataGridColumnConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDataGridColumnConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSDataGridColumnConstructorTableValues, 0 };
#else
@@ -111,7 +114,7 @@ static const HashTableValue JSDataGridColumnPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDataGridColumnPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDataGridColumnPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSDataGridColumnPrototypeTableValues, 0 };
#else
@@ -287,3 +290,5 @@ DataGridColumn* toDataGridColumn(JSC::JSValue value)
}
}
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h
index 331ad9d..a85b988 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h
@@ -21,6 +21,8 @@
#ifndef JSDataGridColumn_h
#define JSDataGridColumn_h
+#if ENABLE(DATAGRID)
+
#include "JSDOMBinding.h"
#include <runtime/JSGlobalObject.h>
#include <runtime/ObjectPrototype.h>
@@ -95,4 +97,6 @@ JSC::JSValue jsDataGridColumnSORC_DESCENDING(JSC::ExecState*, const JSC::Identif
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp
index 276878e..3c0eb8d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp
@@ -19,6 +19,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSDataGridColumnList.h"
#include "AtomicString.h"
@@ -48,7 +51,7 @@ static const HashTableValue JSDataGridColumnListTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDataGridColumnListTable =
+static JSC_CONST_HASHTABLE HashTable JSDataGridColumnListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSDataGridColumnListTableValues, 0 };
#else
@@ -62,7 +65,7 @@ static const HashTableValue JSDataGridColumnListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDataGridColumnListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDataGridColumnListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDataGridColumnListConstructorTableValues, 0 };
#else
@@ -105,7 +108,7 @@ static const HashTableValue JSDataGridColumnListPrototypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDataGridColumnListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDataGridColumnListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSDataGridColumnListPrototypeTableValues, 0 };
#else
@@ -299,3 +302,5 @@ DataGridColumnList* toDataGridColumnList(JSC::JSValue value)
}
}
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h
index 879daf9..b76ffd5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h
@@ -21,6 +21,8 @@
#ifndef JSDataGridColumnList_h
#define JSDataGridColumnList_h
+#if ENABLE(DATAGRID)
+
#include "JSDOMBinding.h"
#include <runtime/JSGlobalObject.h>
#include <runtime/ObjectPrototype.h>
@@ -90,4 +92,6 @@ JSC::JSValue jsDataGridColumnListConstructor(JSC::ExecState*, const JSC::Identif
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp b/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp
index 490b081..894f93c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSDatabaseTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDatabaseTable =
+static JSC_CONST_HASHTABLE HashTable JSDatabaseTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDatabaseTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSDatabasePrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDatabasePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDatabasePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSDatabasePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp
index 2c59f13..ce7b850 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp
@@ -169,7 +169,7 @@ static const HashTableValue JSDocumentTableValues[69] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSDocumentTableValues, 0 };
#else
@@ -183,7 +183,7 @@ static const HashTableValue JSDocumentConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDocumentConstructorTableValues, 0 };
#else
@@ -257,7 +257,7 @@ static const HashTableValue JSDocumentPrototypeTableValues[37] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSDocumentPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp
index 865efd2..05deb3c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSDocumentFragmentTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentFragmentTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentFragmentTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDocumentFragmentTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSDocumentFragmentConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentFragmentConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentFragmentConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDocumentFragmentConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSDocumentFragmentPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentFragmentPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentFragmentPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSDocumentFragmentPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp
index 43e7a8c..361e62f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSDocumentTypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentTypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentTypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSDocumentTypeTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSDocumentTypeConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentTypeConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentTypeConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDocumentTypeConstructorTableValues, 0 };
#else
@@ -100,7 +100,7 @@ static const HashTableValue JSDocumentTypePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSDocumentTypePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSDocumentTypePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSDocumentTypePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp
index afa1d93..a4d2409 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp
@@ -117,7 +117,7 @@ static const HashTableValue JSElementTableValues[60] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSElementTable =
+static JSC_CONST_HASHTABLE HashTable JSElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSElementTableValues, 0 };
#else
@@ -131,7 +131,7 @@ static const HashTableValue JSElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSElementConstructorTableValues, 0 };
#else
@@ -196,7 +196,7 @@ static const HashTableValue JSElementPrototypeTableValues[28] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp b/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp
index be4eed5..4b354b0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSEntityTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEntityTable =
+static JSC_CONST_HASHTABLE HashTable JSEntityTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSEntityTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSEntityConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEntityConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSEntityConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSEntityConstructorTableValues, 0 };
#else
@@ -94,7 +94,7 @@ static const HashTableValue JSEntityPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEntityPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSEntityPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSEntityPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp b/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp
index dc12c48..1d6b6ff 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp
@@ -38,7 +38,7 @@ static const HashTableValue JSEntityReferenceTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEntityReferenceTable =
+static JSC_CONST_HASHTABLE HashTable JSEntityReferenceTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSEntityReferenceTableValues, 0 };
#else
@@ -52,7 +52,7 @@ static const HashTableValue JSEntityReferenceConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEntityReferenceConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSEntityReferenceConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSEntityReferenceConstructorTableValues, 0 };
#else
@@ -90,7 +90,7 @@ static const HashTableValue JSEntityReferencePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEntityReferencePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSEntityReferencePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSEntityReferencePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp
index f00e179..550db25 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp
@@ -55,7 +55,7 @@ static const HashTableValue JSEventTableValues[13] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEventTable =
+static JSC_CONST_HASHTABLE HashTable JSEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSEventTableValues, 0 };
#else
@@ -88,7 +88,7 @@ static const HashTableValue JSEventConstructorTableValues[20] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSEventConstructorTableValues, 0 };
#else
@@ -148,7 +148,7 @@ static const HashTableValue JSEventPrototypeTableValues[23] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp b/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp
index 2adb70a..1c39ced 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSEventExceptionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEventExceptionTable =
+static JSC_CONST_HASHTABLE HashTable JSEventExceptionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSEventExceptionTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSEventExceptionConstructorTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEventExceptionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSEventExceptionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSEventExceptionConstructorTableValues, 0 };
#else
@@ -100,7 +100,7 @@ static const HashTableValue JSEventExceptionPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSEventExceptionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSEventExceptionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSEventExceptionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSFile.cpp b/src/3rdparty/webkit/WebCore/generated/JSFile.cpp
index d25dfc6..923e24b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSFile.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSFile.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSFileTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSFileTable =
+static JSC_CONST_HASHTABLE HashTable JSFileTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSFileTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSFileConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSFileConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSFileConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSFileConstructorTableValues, 0 };
#else
@@ -95,7 +95,7 @@ static const HashTableValue JSFilePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSFilePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSFilePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSFilePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp b/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp
index cd165c1..9d14098 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSFileListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSFileListTable =
+static JSC_CONST_HASHTABLE HashTable JSFileListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSFileListTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSFileListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSFileListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSFileListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSFileListConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSFileListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSFileListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSFileListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSFileListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp
index a75348b..104d781 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSGeolocationTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSGeolocationTable =
+static JSC_CONST_HASHTABLE HashTable JSGeolocationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSGeolocationTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSGeolocationPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSGeolocationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSGeolocationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSGeolocationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp
index 35399cf..b872171 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSGeopositionTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSGeopositionTable =
+static JSC_CONST_HASHTABLE HashTable JSGeopositionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSGeopositionTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSGeopositionPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSGeopositionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSGeopositionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSGeopositionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp
index c422551..a9bbfca 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp
@@ -60,7 +60,7 @@ static const HashTableValue JSHTMLAnchorElementTableValues[21] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAnchorElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSHTMLAnchorElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSHTMLAnchorElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAnchorElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAnchorElementConstructorTableValues, 0 };
#else
@@ -113,7 +113,7 @@ static const HashTableValue JSHTMLAnchorElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAnchorElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAnchorElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp
index 787c2c7..4fe98d6 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp
@@ -53,7 +53,7 @@ static const HashTableValue JSHTMLAppletElementTableValues[13] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAppletElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAppletElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLAppletElementTableValues, 0 };
#else
@@ -67,7 +67,7 @@ static const HashTableValue JSHTMLAppletElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAppletElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAppletElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAppletElementConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSHTMLAppletElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAppletElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAppletElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAppletElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp
index 1d40591..f78a54b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp
@@ -54,7 +54,7 @@ static const HashTableValue JSHTMLAreaElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAreaElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAreaElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSHTMLAreaElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSHTMLAreaElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAreaElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAreaElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAreaElementConstructorTableValues, 0 };
#else
@@ -106,7 +106,7 @@ static const HashTableValue JSHTMLAreaElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAreaElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAreaElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAreaElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp
index 00db209..a2fbfce 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLAudioElementTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAudioElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAudioElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLAudioElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAudioElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAudioElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLAudioElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLAudioElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLAudioElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp
index aff5b90..2a43e6c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLBRElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBRElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBRElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLBRElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLBRElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBRElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBRElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBRElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLBRElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBRElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBRElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBRElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp
index d0c6502..7c78555 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSHTMLBaseElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBaseElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBaseElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLBaseElementTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSHTMLBaseElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBaseElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBaseElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBaseElementConstructorTableValues, 0 };
#else
@@ -94,7 +94,7 @@ static const HashTableValue JSHTMLBaseElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBaseElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBaseElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBaseElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp
index 24288a2..081be5a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLBaseFontElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBaseFontElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLBaseFontElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLBaseFontElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBaseFontElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBaseFontElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLBaseFontElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBaseFontElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBaseFontElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp
index aa108aa..852568b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLBlockquoteElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBlockquoteElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLBlockquoteElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLBlockquoteElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBlockquoteElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBlockquoteElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLBlockquoteElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBlockquoteElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBlockquoteElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp
index 6da9517..d86b723 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp
@@ -57,7 +57,7 @@ static const HashTableValue JSHTMLBodyElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBodyElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLBodyElementTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSHTMLBodyElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBodyElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBodyElementConstructorTableValues, 0 };
#else
@@ -109,7 +109,7 @@ static const HashTableValue JSHTMLBodyElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLBodyElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLBodyElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp
index 96f463b..098528d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp
@@ -24,7 +24,9 @@
#include "HTMLButtonElement.h"
#include "HTMLFormElement.h"
#include "JSHTMLFormElement.h"
+#include "JSValidityState.h"
#include "KURL.h"
+#include "ValidityState.h"
#include <runtime/Error.h>
#include <runtime/JSString.h>
#include <wtf/GetPtr.h>
@@ -37,9 +39,10 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLButtonElement);
/* Hash table */
-static const HashTableValue JSHTMLButtonElementTableValues[10] =
+static const HashTableValue JSHTMLButtonElementTableValues[11] =
{
{ "form", DontDelete|ReadOnly, (intptr_t)jsHTMLButtonElementForm, (intptr_t)0 },
+ { "validity", DontDelete|ReadOnly, (intptr_t)jsHTMLButtonElementValidity, (intptr_t)0 },
{ "accessKey", DontDelete, (intptr_t)jsHTMLButtonElementAccessKey, (intptr_t)setJSHTMLButtonElementAccessKey },
{ "disabled", DontDelete, (intptr_t)jsHTMLButtonElementDisabled, (intptr_t)setJSHTMLButtonElementDisabled },
{ "autofocus", DontDelete, (intptr_t)jsHTMLButtonElementAutofocus, (intptr_t)setJSHTMLButtonElementAutofocus },
@@ -51,7 +54,7 @@ static const HashTableValue JSHTMLButtonElementTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLButtonElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLButtonElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLButtonElementTableValues, 0 };
#else
@@ -65,7 +68,7 @@ static const HashTableValue JSHTMLButtonElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLButtonElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLButtonElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLButtonElementConstructorTableValues, 0 };
#else
@@ -104,7 +107,7 @@ static const HashTableValue JSHTMLButtonElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLButtonElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLButtonElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLButtonElementPrototypeTableValues, 0 };
#else
@@ -147,6 +150,13 @@ JSValue jsHTMLButtonElementForm(ExecState* exec, const Identifier&, const Proper
return toJS(exec, WTF::getPtr(imp->form()));
}
+JSValue jsHTMLButtonElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl());
+ return toJS(exec, WTF::getPtr(imp->validity()));
+}
+
JSValue jsHTMLButtonElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h
index 9849bbb..1ac56c5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h
@@ -66,6 +66,7 @@ JSC::JSValue JSC_HOST_CALL jsHTMLButtonElementPrototypeFunctionClick(JSC::ExecSt
// Attributes
JSC::JSValue jsHTMLButtonElementForm(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsHTMLButtonElementValidity(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLButtonElementAccessKey(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSHTMLButtonElementAccessKey(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLButtonElementDisabled(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp
index b90cbea..d40e900 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSHTMLCanvasElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLCanvasElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLCanvasElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLCanvasElementTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSHTMLCanvasElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLCanvasElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLCanvasElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLCanvasElementConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSHTMLCanvasElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLCanvasElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLCanvasElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLCanvasElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp
index 7ff47ac..9b6bda3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSHTMLCollectionTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLCollectionTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLCollectionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLCollectionTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSHTMLCollectionConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLCollectionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLCollectionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLCollectionConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSHTMLCollectionPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLCollectionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLCollectionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLCollectionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp
index e65bb1f..a3f60b2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp
@@ -39,7 +39,7 @@ static const HashTableValue JSHTMLDListElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDListElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDListElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLDListElementTableValues, 0 };
#else
@@ -53,7 +53,7 @@ static const HashTableValue JSHTMLDListElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDListElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDListElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDListElementConstructorTableValues, 0 };
#else
@@ -91,7 +91,7 @@ static const HashTableValue JSHTMLDListElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDListElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDListElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDListElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp
index e0f8624..f070da6 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp
@@ -19,6 +19,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSHTMLDataGridCellElement.h"
#include "HTMLDataGridCellElement.h"
@@ -46,7 +49,7 @@ static const HashTableValue JSHTMLDataGridCellElementTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridCellElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridCellElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLDataGridCellElementTableValues, 0 };
#else
@@ -60,7 +63,7 @@ static const HashTableValue JSHTMLDataGridCellElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridCellElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridCellElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridCellElementConstructorTableValues, 0 };
#else
@@ -98,7 +101,7 @@ static const HashTableValue JSHTMLDataGridCellElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridCellElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridCellElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridCellElementPrototypeTableValues, 0 };
#else
@@ -210,3 +213,5 @@ JSValue JSHTMLDataGridCellElement::getConstructor(ExecState* exec)
}
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h
index a0b8815..eb0a6de 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h
@@ -21,6 +21,8 @@
#ifndef JSHTMLDataGridCellElement_h
#define JSHTMLDataGridCellElement_h
+#if ENABLE(DATAGRID)
+
#include "JSHTMLElement.h"
namespace WebCore {
@@ -71,4 +73,6 @@ JSC::JSValue jsHTMLDataGridCellElementConstructor(JSC::ExecState*, const JSC::Id
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp
index a608a1f..0f750e7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp
@@ -19,6 +19,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSHTMLDataGridColElement.h"
#include "HTMLDataGridColElement.h"
@@ -46,7 +49,7 @@ static const HashTableValue JSHTMLDataGridColElementTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridColElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridColElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLDataGridColElementTableValues, 0 };
#else
@@ -60,7 +63,7 @@ static const HashTableValue JSHTMLDataGridColElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridColElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridColElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridColElementConstructorTableValues, 0 };
#else
@@ -98,7 +101,7 @@ static const HashTableValue JSHTMLDataGridColElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridColElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridColElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridColElementPrototypeTableValues, 0 };
#else
@@ -210,3 +213,5 @@ JSValue JSHTMLDataGridColElement::getConstructor(ExecState* exec)
}
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h
index 24efd48..0fe1b0e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h
@@ -21,6 +21,8 @@
#ifndef JSHTMLDataGridColElement_h
#define JSHTMLDataGridColElement_h
+#if ENABLE(DATAGRID)
+
#include "JSHTMLElement.h"
namespace WebCore {
@@ -71,4 +73,6 @@ JSC::JSValue jsHTMLDataGridColElementConstructor(JSC::ExecState*, const JSC::Ide
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp
index ea4237c..d964c7b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp
@@ -19,6 +19,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSHTMLDataGridElement.h"
#include "DataGridColumnList.h"
@@ -45,7 +48,7 @@ static const HashTableValue JSHTMLDataGridElementTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLDataGridElementTableValues, 0 };
#else
@@ -59,7 +62,7 @@ static const HashTableValue JSHTMLDataGridElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridElementConstructorTableValues, 0 };
#else
@@ -97,7 +100,7 @@ static const HashTableValue JSHTMLDataGridElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridElementPrototypeTableValues, 0 };
#else
@@ -200,3 +203,5 @@ JSValue JSHTMLDataGridElement::getConstructor(ExecState* exec)
}
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h
index ee6c8d8..7be0e5e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h
@@ -21,6 +21,8 @@
#ifndef JSHTMLDataGridElement_h
#define JSHTMLDataGridElement_h
+#if ENABLE(DATAGRID)
+
#include "JSHTMLElement.h"
namespace WebCore {
@@ -74,4 +76,6 @@ JSC::JSValue jsHTMLDataGridElementConstructor(JSC::ExecState*, const JSC::Identi
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp
index 938ff16..b6a2d97 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp
@@ -19,6 +19,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSHTMLDataGridRowElement.h"
#include "HTMLDataGridRowElement.h"
@@ -41,7 +44,7 @@ static const HashTableValue JSHTMLDataGridRowElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridRowElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridRowElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLDataGridRowElementTableValues, 0 };
#else
@@ -55,7 +58,7 @@ static const HashTableValue JSHTMLDataGridRowElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridRowElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridRowElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridRowElementConstructorTableValues, 0 };
#else
@@ -93,7 +96,7 @@ static const HashTableValue JSHTMLDataGridRowElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDataGridRowElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridRowElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDataGridRowElementPrototypeTableValues, 0 };
#else
@@ -179,3 +182,5 @@ JSValue JSHTMLDataGridRowElement::getConstructor(ExecState* exec)
}
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h
index 562b5f7..987e8bf 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h
@@ -21,6 +21,8 @@
#ifndef JSHTMLDataGridRowElement_h
#define JSHTMLDataGridRowElement_h
+#if ENABLE(DATAGRID)
+
#include "JSHTMLElement.h"
namespace WebCore {
@@ -67,4 +69,6 @@ JSC::JSValue jsHTMLDataGridRowElementConstructor(JSC::ExecState*, const JSC::Ide
} // namespace WebCore
+#endif // ENABLE(DATAGRID)
+
#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp
index 711057b..ddad16b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp
@@ -39,7 +39,7 @@ static const HashTableValue JSHTMLDirectoryElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDirectoryElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLDirectoryElementTableValues, 0 };
#else
@@ -53,7 +53,7 @@ static const HashTableValue JSHTMLDirectoryElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDirectoryElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDirectoryElementConstructorTableValues, 0 };
#else
@@ -91,7 +91,7 @@ static const HashTableValue JSHTMLDirectoryElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDirectoryElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDirectoryElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp
index 43da933..779666e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLDivElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDivElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLDivElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLDivElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDivElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDivElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLDivElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDivElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDivElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp
index 1182aee..fd3aaf4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp
@@ -62,7 +62,7 @@ static const HashTableValue JSHTMLDocumentTableValues[17] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDocumentTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDocumentTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSHTMLDocumentTableValues, 0 };
#else
@@ -76,7 +76,7 @@ static const HashTableValue JSHTMLDocumentConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDocumentConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDocumentConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLDocumentConstructorTableValues, 0 };
#else
@@ -122,7 +122,7 @@ static const HashTableValue JSHTMLDocumentPrototypeTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLDocumentPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLDocumentPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLDocumentPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp
index ce77377..25e9bca 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp
@@ -60,7 +60,7 @@ static const HashTableValue JSHTMLElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSHTMLElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSHTMLElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLElementConstructorTableValues, 0 };
#else
@@ -115,7 +115,7 @@ static const HashTableValue JSHTMLElementPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp
index 7d66f62..aaedcca 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp
@@ -243,21 +243,33 @@ static JSNode* createHTMLTableColElementWrapper(ExecState* exec, PassRefPtr<HTML
return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableColElement, element.get());
}
+#if ENABLE(DATAGRID)
+
static JSNode* createHTMLDataGridElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
{
return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridElement, element.get());
}
+#endif
+
+#if ENABLE(DATAGRID)
+
static JSNode* createHTMLDataGridCellElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
{
return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridCellElement, element.get());
}
+#endif
+
+#if ENABLE(DATAGRID)
+
static JSNode* createHTMLDataGridColElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
{
return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridColElement, element.get());
}
+#endif
+
static JSNode* createHTMLModElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
{
return CREATE_DOM_NODE_WRAPPER(exec, HTMLModElement, element.get());
@@ -278,11 +290,15 @@ static JSNode* createHTMLDListElementWrapper(ExecState* exec, PassRefPtr<HTMLEle
return CREATE_DOM_NODE_WRAPPER(exec, HTMLDListElement, element.get());
}
+#if ENABLE(DATAGRID)
+
static JSNode* createHTMLDataGridRowElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
{
return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridRowElement, element.get());
}
+#endif
+
static JSNode* createHTMLEmbedElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
{
return CREATE_DOM_NODE_WRAPPER(exec, HTMLEmbedElement, element.get());
@@ -526,14 +542,22 @@ JSNode* createJSHTMLWrapper(ExecState* exec, PassRefPtr<HTMLElement> element)
map.set(captionTag.localName().impl(), createHTMLTableCaptionElementWrapper);
map.set(colTag.localName().impl(), createHTMLTableColElementWrapper);
map.set(colgroupTag.localName().impl(), createHTMLTableColElementWrapper);
+#if ENABLE(DATAGRID)
map.set(datagridTag.localName().impl(), createHTMLDataGridElementWrapper);
+#endif
+#if ENABLE(DATAGRID)
map.set(dcellTag.localName().impl(), createHTMLDataGridCellElementWrapper);
+#endif
+#if ENABLE(DATAGRID)
map.set(dcolTag.localName().impl(), createHTMLDataGridColElementWrapper);
+#endif
map.set(delTag.localName().impl(), createHTMLModElementWrapper);
map.set(dirTag.localName().impl(), createHTMLDirectoryElementWrapper);
map.set(divTag.localName().impl(), createHTMLDivElementWrapper);
map.set(dlTag.localName().impl(), createHTMLDListElementWrapper);
+#if ENABLE(DATAGRID)
map.set(drowTag.localName().impl(), createHTMLDataGridRowElementWrapper);
+#endif
map.set(embedTag.localName().impl(), createHTMLEmbedElementWrapper);
map.set(fieldsetTag.localName().impl(), createHTMLFieldSetElementWrapper);
map.set(fontTag.localName().impl(), createHTMLFontElementWrapper);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp
index 107a225..b1c63f8 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp
@@ -52,7 +52,7 @@ static const HashTableValue JSHTMLEmbedElementTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLEmbedElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 16383, JSHTMLEmbedElementTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSHTMLEmbedElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLEmbedElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLEmbedElementConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSHTMLEmbedElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLEmbedElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLEmbedElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp
index 27a1ebb..07dc170 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp
@@ -24,6 +24,8 @@
#include "HTMLFieldSetElement.h"
#include "HTMLFormElement.h"
#include "JSHTMLFormElement.h"
+#include "JSValidityState.h"
+#include "ValidityState.h"
#include <wtf/GetPtr.h>
using namespace JSC;
@@ -34,15 +36,16 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLFieldSetElement);
/* Hash table */
-static const HashTableValue JSHTMLFieldSetElementTableValues[4] =
+static const HashTableValue JSHTMLFieldSetElementTableValues[5] =
{
{ "form", DontDelete|ReadOnly, (intptr_t)jsHTMLFieldSetElementForm, (intptr_t)0 },
+ { "validity", DontDelete|ReadOnly, (intptr_t)jsHTMLFieldSetElementValidity, (intptr_t)0 },
{ "willValidate", DontDelete|ReadOnly, (intptr_t)jsHTMLFieldSetElementWillValidate, (intptr_t)0 },
{ "constructor", DontEnum|ReadOnly, (intptr_t)jsHTMLFieldSetElementConstructor, (intptr_t)0 },
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFieldSetElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFieldSetElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLFieldSetElementTableValues, 0 };
#else
@@ -56,7 +59,7 @@ static const HashTableValue JSHTMLFieldSetElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFieldSetElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFieldSetElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFieldSetElementConstructorTableValues, 0 };
#else
@@ -94,7 +97,7 @@ static const HashTableValue JSHTMLFieldSetElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFieldSetElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFieldSetElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFieldSetElementPrototypeTableValues, 0 };
#else
@@ -132,6 +135,13 @@ JSValue jsHTMLFieldSetElementForm(ExecState* exec, const Identifier&, const Prop
return toJS(exec, WTF::getPtr(imp->form()));
}
+JSValue jsHTMLFieldSetElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase()))->impl());
+ return toJS(exec, WTF::getPtr(imp->validity()));
+}
+
JSValue jsHTMLFieldSetElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h
index fa6c56c..6966b40 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h
@@ -57,6 +57,7 @@ public:
// Attributes
JSC::JSValue jsHTMLFieldSetElementForm(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsHTMLFieldSetElementValidity(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLFieldSetElementWillValidate(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLFieldSetElementConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp
index 0bff1ee..5d80326 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSHTMLFontElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFontElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFontElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLFontElementTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSHTMLFontElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFontElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFontElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFontElementConstructorTableValues, 0 };
#else
@@ -95,7 +95,7 @@ static const HashTableValue JSHTMLFontElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFontElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFontElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFontElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp
index de495a5..c3cb279 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLFormElementTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFormElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFormElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSHTMLFormElementTableValues, 0 };
#else
@@ -69,7 +69,7 @@ static const HashTableValue JSHTMLFormElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFormElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFormElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFormElementConstructorTableValues, 0 };
#else
@@ -109,7 +109,7 @@ static const HashTableValue JSHTMLFormElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFormElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFormElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLFormElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp
index a5bff3e..d11a908 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp
@@ -62,7 +62,7 @@ static const HashTableValue JSHTMLFrameElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFrameElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFrameElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 16383, JSHTMLFrameElementTableValues, 0 };
#else
@@ -76,7 +76,7 @@ static const HashTableValue JSHTMLFrameElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFrameElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFrameElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFrameElementConstructorTableValues, 0 };
#else
@@ -115,7 +115,7 @@ static const HashTableValue JSHTMLFrameElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFrameElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFrameElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFrameElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp
index 7abfddd..358280c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp
@@ -54,7 +54,7 @@ static const HashTableValue JSHTMLFrameSetElementTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFrameSetElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFrameSetElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLFrameSetElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSHTMLFrameSetElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFrameSetElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFrameSetElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFrameSetElementConstructorTableValues, 0 };
#else
@@ -106,7 +106,7 @@ static const HashTableValue JSHTMLFrameSetElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLFrameSetElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLFrameSetElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLFrameSetElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp
index 8ec45b5..e208976 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLHRElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHRElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHRElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLHRElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLHRElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHRElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHRElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHRElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLHRElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHRElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHRElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHRElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp
index a2ec868..ff1f3e4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLHeadElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHeadElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHeadElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLHeadElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLHeadElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHeadElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHeadElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHeadElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLHeadElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHeadElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHeadElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHeadElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp
index 5a5b8b2..b4702f3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLHeadingElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHeadingElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHeadingElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLHeadingElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLHeadingElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHeadingElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHeadingElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHeadingElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLHeadingElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHeadingElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHeadingElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHeadingElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp
index 95ab223..8325f69 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLHtmlElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHtmlElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLHtmlElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLHtmlElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHtmlElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHtmlElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLHtmlElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLHtmlElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLHtmlElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp
index 068dfc2..557b3a4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp
@@ -60,7 +60,7 @@ static const HashTableValue JSHTMLIFrameElementTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLIFrameElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 16383, JSHTMLIFrameElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSHTMLIFrameElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLIFrameElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLIFrameElementConstructorTableValues, 0 };
#else
@@ -113,7 +113,7 @@ static const HashTableValue JSHTMLIFrameElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLIFrameElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLIFrameElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp
index a0259bb..da621b2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp
@@ -60,7 +60,7 @@ static const HashTableValue JSHTMLImageElementTableValues[20] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLImageElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 16383, JSHTMLImageElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSHTMLImageElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLImageElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLImageElementConstructorTableValues, 0 };
#else
@@ -112,7 +112,7 @@ static const HashTableValue JSHTMLImageElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLImageElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLImageElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp
index 720249a..e6111bb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp
@@ -26,7 +26,9 @@
#include "HTMLInputElement.h"
#include "JSFileList.h"
#include "JSHTMLFormElement.h"
+#include "JSValidityState.h"
#include "KURL.h"
+#include "ValidityState.h"
#include <runtime/Error.h>
#include <runtime/JSNumberCell.h>
#include <runtime/JSString.h>
@@ -40,11 +42,12 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLInputElement);
/* Hash table */
-static const HashTableValue JSHTMLInputElementTableValues[27] =
+static const HashTableValue JSHTMLInputElementTableValues[28] =
{
{ "defaultValue", DontDelete, (intptr_t)jsHTMLInputElementDefaultValue, (intptr_t)setJSHTMLInputElementDefaultValue },
{ "defaultChecked", DontDelete, (intptr_t)jsHTMLInputElementDefaultChecked, (intptr_t)setJSHTMLInputElementDefaultChecked },
{ "form", DontDelete|ReadOnly, (intptr_t)jsHTMLInputElementForm, (intptr_t)0 },
+ { "validity", DontDelete|ReadOnly, (intptr_t)jsHTMLInputElementValidity, (intptr_t)0 },
{ "accept", DontDelete, (intptr_t)jsHTMLInputElementAccept, (intptr_t)setJSHTMLInputElementAccept },
{ "accessKey", DontDelete, (intptr_t)jsHTMLInputElementAccessKey, (intptr_t)setJSHTMLInputElementAccessKey },
{ "align", DontDelete, (intptr_t)jsHTMLInputElementAlign, (intptr_t)setJSHTMLInputElementAlign },
@@ -71,7 +74,7 @@ static const HashTableValue JSHTMLInputElementTableValues[27] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLInputElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLInputElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSHTMLInputElementTableValues, 0 };
#else
@@ -85,7 +88,7 @@ static const HashTableValue JSHTMLInputElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLInputElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLInputElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLInputElementConstructorTableValues, 0 };
#else
@@ -126,7 +129,7 @@ static const HashTableValue JSHTMLInputElementPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLInputElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLInputElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLInputElementPrototypeTableValues, 0 };
#else
@@ -183,6 +186,13 @@ JSValue jsHTMLInputElementForm(ExecState* exec, const Identifier&, const Propert
return toJS(exec, WTF::getPtr(imp->form()));
}
+JSValue jsHTMLInputElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl());
+ return toJS(exec, WTF::getPtr(imp->validity()));
+}
+
JSValue jsHTMLInputElementAccept(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h
index ef9431c..52f455e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h
@@ -82,6 +82,7 @@ void setJSHTMLInputElementDefaultValue(JSC::ExecState*, JSC::JSObject*, JSC::JSV
JSC::JSValue jsHTMLInputElementDefaultChecked(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSHTMLInputElementDefaultChecked(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLInputElementForm(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsHTMLInputElementValidity(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLInputElementAccept(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSHTMLInputElementAccept(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLInputElementAccessKey(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp
index d23f3f1..6322e51 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLIsIndexElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLIsIndexElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLIsIndexElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLIsIndexElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLIsIndexElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLIsIndexElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLIsIndexElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLIsIndexElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLIsIndexElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLIsIndexElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLIsIndexElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLIsIndexElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp
index 35f00d2..14ba464 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSHTMLLIElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLIElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLIElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLLIElementTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSHTMLLIElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLIElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLIElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLIElementConstructorTableValues, 0 };
#else
@@ -95,7 +95,7 @@ static const HashTableValue JSHTMLLIElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLIElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLIElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLIElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp
index 24d1f57..37c7c76 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSHTMLLabelElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLabelElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLLabelElementTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSHTMLLabelElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLabelElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLabelElementConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSHTMLLabelElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLabelElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLabelElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp
index b52f3e9..b3b985a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSHTMLLegendElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLegendElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLLegendElementTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSHTMLLegendElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLegendElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLegendElementConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSHTMLLegendElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLegendElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLegendElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp
index c40004e..d6bf634 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp
@@ -52,7 +52,7 @@ static const HashTableValue JSHTMLLinkElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLinkElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLinkElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLLinkElementTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSHTMLLinkElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLinkElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLinkElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLinkElementConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSHTMLLinkElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLLinkElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLLinkElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLLinkElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp
index 458c3f1..9c9345f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLMapElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMapElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMapElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLMapElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLMapElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMapElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMapElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMapElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLMapElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMapElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMapElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMapElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp
index 90f090f..2e8c6d3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp
@@ -39,7 +39,7 @@ static const HashTableValue JSHTMLMarqueeElementTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMarqueeElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMarqueeElementTableValues, 0 };
#else
@@ -53,7 +53,7 @@ static const HashTableValue JSHTMLMarqueeElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMarqueeElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMarqueeElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLMarqueeElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMarqueeElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLMarqueeElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp
index 1f04d40..c3c74d3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp
@@ -72,7 +72,7 @@ static const HashTableValue JSHTMLMediaElementTableValues[25] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMediaElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMediaElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSHTMLMediaElementTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLMediaElementConstructorTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMediaElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMediaElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLMediaElementConstructorTableValues, 0 };
#else
@@ -148,7 +148,7 @@ static const HashTableValue JSHTMLMediaElementPrototypeTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMediaElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMediaElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLMediaElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp
index 35ce014..e658ed8 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp
@@ -39,7 +39,7 @@ static const HashTableValue JSHTMLMenuElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMenuElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMenuElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLMenuElementTableValues, 0 };
#else
@@ -53,7 +53,7 @@ static const HashTableValue JSHTMLMenuElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMenuElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMenuElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMenuElementConstructorTableValues, 0 };
#else
@@ -91,7 +91,7 @@ static const HashTableValue JSHTMLMenuElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMenuElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMenuElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMenuElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp
index 213c2bf..6b26520 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLMetaElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMetaElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMetaElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLMetaElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLMetaElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMetaElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMetaElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMetaElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLMetaElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLMetaElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLMetaElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLMetaElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp
index b55516c..ded7e9f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSHTMLModElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLModElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLModElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLModElementTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSHTMLModElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLModElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLModElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLModElementConstructorTableValues, 0 };
#else
@@ -94,7 +94,7 @@ static const HashTableValue JSHTMLModElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLModElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLModElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLModElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp
index 70fe0b4..63b781c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLOListElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOListElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOListElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLOListElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLOListElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOListElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOListElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLOListElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLOListElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOListElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOListElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLOListElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp
index c50e27a..c9f7102 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp
@@ -69,7 +69,7 @@ static const HashTableValue JSHTMLObjectElementTableValues[20] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLObjectElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLObjectElementTableValues, 0 };
#else
@@ -83,7 +83,7 @@ static const HashTableValue JSHTMLObjectElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLObjectElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLObjectElementConstructorTableValues, 0 };
#else
@@ -122,7 +122,7 @@ static const HashTableValue JSHTMLObjectElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLObjectElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLObjectElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp
index 69506b0..4b651c4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSHTMLOptGroupElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptGroupElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLOptGroupElementTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSHTMLOptGroupElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptGroupElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLOptGroupElementConstructorTableValues, 0 };
#else
@@ -94,7 +94,7 @@ static const HashTableValue JSHTMLOptGroupElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptGroupElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLOptGroupElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp
index ee1283d..4c9b51a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSHTMLOptionElementTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptionElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptionElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLOptionElementTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSHTMLOptionElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptionElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptionElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLOptionElementConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSHTMLOptionElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptionElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptionElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLOptionElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp
index 578ab90..b9e8d15 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLOptionsCollectionTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptionsCollectionTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptionsCollectionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSHTMLOptionsCollectionTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSHTMLOptionsCollectionPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLOptionsCollectionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLOptionsCollectionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSHTMLOptionsCollectionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp
index ba47a53..b267dc2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLParagraphElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLParagraphElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLParagraphElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLParagraphElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLParagraphElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLParagraphElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLParagraphElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLParagraphElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLParagraphElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLParagraphElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLParagraphElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLParagraphElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp
index b4c9348..467df03 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSHTMLParamElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLParamElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLParamElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLParamElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHTMLParamElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLParamElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLParamElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLParamElementConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSHTMLParamElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLParamElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLParamElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLParamElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp
index 8aac7c1..b6bc6fb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLPreElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLPreElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLPreElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLPreElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLPreElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLPreElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLPreElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLPreElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLPreElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp
index dd831c0..a8313b9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLQuoteElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLQuoteElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLQuoteElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLQuoteElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLQuoteElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLQuoteElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLQuoteElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLQuoteElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLQuoteElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLQuoteElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLQuoteElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLQuoteElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp
index ab7bc3d..8e157d1 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSHTMLScriptElementTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLScriptElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLScriptElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLScriptElementTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSHTMLScriptElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLScriptElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLScriptElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLScriptElementConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSHTMLScriptElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLScriptElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLScriptElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLScriptElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp
index 8a61381..08e765c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp
@@ -29,8 +29,10 @@
#include "JSHTMLFormElement.h"
#include "JSHTMLOptionsCollection.h"
#include "JSNode.h"
+#include "JSValidityState.h"
#include "KURL.h"
#include "Node.h"
+#include "ValidityState.h"
#include <runtime/Error.h>
#include <runtime/JSNumberCell.h>
#include <runtime/JSString.h>
@@ -45,13 +47,14 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLSelectElement);
/* Hash table */
-static const HashTableValue JSHTMLSelectElementTableValues[14] =
+static const HashTableValue JSHTMLSelectElementTableValues[15] =
{
{ "type", DontDelete|ReadOnly, (intptr_t)jsHTMLSelectElementType, (intptr_t)0 },
{ "selectedIndex", DontDelete, (intptr_t)jsHTMLSelectElementSelectedIndex, (intptr_t)setJSHTMLSelectElementSelectedIndex },
{ "value", DontDelete, (intptr_t)jsHTMLSelectElementValue, (intptr_t)setJSHTMLSelectElementValue },
{ "length", DontDelete, (intptr_t)jsHTMLSelectElementLength, (intptr_t)setJSHTMLSelectElementLength },
{ "form", DontDelete|ReadOnly, (intptr_t)jsHTMLSelectElementForm, (intptr_t)0 },
+ { "validity", DontDelete|ReadOnly, (intptr_t)jsHTMLSelectElementValidity, (intptr_t)0 },
{ "willValidate", DontDelete|ReadOnly, (intptr_t)jsHTMLSelectElementWillValidate, (intptr_t)0 },
{ "options", DontDelete|ReadOnly, (intptr_t)jsHTMLSelectElementOptions, (intptr_t)0 },
{ "disabled", DontDelete, (intptr_t)jsHTMLSelectElementDisabled, (intptr_t)setJSHTMLSelectElementDisabled },
@@ -63,11 +66,11 @@ static const HashTableValue JSHTMLSelectElementTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLSelectElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLSelectElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLSelectElementTableValues, 0 };
#else
- { 34, 31, JSHTMLSelectElementTableValues, 0 };
+ { 35, 31, JSHTMLSelectElementTableValues, 0 };
#endif
/* Hash table for constructor */
@@ -77,7 +80,7 @@ static const HashTableValue JSHTMLSelectElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLSelectElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLSelectElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLSelectElementConstructorTableValues, 0 };
#else
@@ -119,7 +122,7 @@ static const HashTableValue JSHTMLSelectElementPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLSelectElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLSelectElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLSelectElementPrototypeTableValues, 0 };
#else
@@ -210,6 +213,13 @@ JSValue jsHTMLSelectElementForm(ExecState* exec, const Identifier&, const Proper
return toJS(exec, WTF::getPtr(imp->form()));
}
+JSValue jsHTMLSelectElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl());
+ return toJS(exec, WTF::getPtr(imp->validity()));
+}
+
JSValue jsHTMLSelectElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h
index 1790360..53459cb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h
@@ -84,6 +84,7 @@ void setJSHTMLSelectElementValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLSelectElementLength(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSHTMLSelectElementLength(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLSelectElementForm(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsHTMLSelectElementValidity(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLSelectElementWillValidate(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLSelectElementOptions(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLSelectElementDisabled(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp
index b9f65ad..5e534cf 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSHTMLSourceElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLSourceElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLSourceElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLSourceElementTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSHTMLSourceElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLSourceElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLSourceElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLSourceElementConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSHTMLSourceElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLSourceElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLSourceElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLSourceElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp
index 5b31c04..77b1b1a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSHTMLStyleElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLStyleElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLStyleElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLStyleElementTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSHTMLStyleElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLStyleElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLStyleElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLStyleElementConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSHTMLStyleElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLStyleElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLStyleElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLStyleElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp
index 51b8dbe..3fcbcba 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLTableCaptionElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableCaptionElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableCaptionElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLTableCaptionElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLTableCaptionElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableCaptionElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableCaptionElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableCaptionElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLTableCaptionElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableCaptionElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableCaptionElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableCaptionElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp
index cb81f6d..8ddf4ca 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp
@@ -56,7 +56,7 @@ static const HashTableValue JSHTMLTableCellElementTableValues[17] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableCellElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableCellElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSHTMLTableCellElementTableValues, 0 };
#else
@@ -70,7 +70,7 @@ static const HashTableValue JSHTMLTableCellElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableCellElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableCellElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableCellElementConstructorTableValues, 0 };
#else
@@ -108,7 +108,7 @@ static const HashTableValue JSHTMLTableCellElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableCellElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableCellElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableCellElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp
index 470cd02..b79eda4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSHTMLTableColElementTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableColElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableColElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSHTMLTableColElementTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSHTMLTableColElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableColElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableColElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableColElementConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSHTMLTableColElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableColElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableColElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableColElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp
index 96b92e0..6965555 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp
@@ -63,7 +63,7 @@ static const HashTableValue JSHTMLTableElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLTableElementTableValues, 0 };
#else
@@ -77,7 +77,7 @@ static const HashTableValue JSHTMLTableElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableElementConstructorTableValues, 0 };
#else
@@ -123,7 +123,7 @@ static const HashTableValue JSHTMLTableElementPrototypeTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSHTMLTableElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp
index c384613..d806271 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp
@@ -54,7 +54,7 @@ static const HashTableValue JSHTMLTableRowElementTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableRowElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableRowElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSHTMLTableRowElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSHTMLTableRowElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableRowElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableRowElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableRowElementConstructorTableValues, 0 };
#else
@@ -108,7 +108,7 @@ static const HashTableValue JSHTMLTableRowElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableRowElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableRowElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSHTMLTableRowElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp
index 8e8ce54..7515cfd 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp
@@ -50,7 +50,7 @@ static const HashTableValue JSHTMLTableSectionElementTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableSectionElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLTableSectionElementTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSHTMLTableSectionElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableSectionElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTableSectionElementConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSHTMLTableSectionElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTableSectionElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLTableSectionElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp
index 6d845f9..f103fb7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp
@@ -24,7 +24,9 @@
#include "HTMLFormElement.h"
#include "HTMLTextAreaElement.h"
#include "JSHTMLFormElement.h"
+#include "JSValidityState.h"
#include "KURL.h"
+#include "ValidityState.h"
#include <runtime/Error.h>
#include <runtime/JSNumberCell.h>
#include <runtime/JSString.h>
@@ -38,10 +40,11 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLTextAreaElement);
/* Hash table */
-static const HashTableValue JSHTMLTextAreaElementTableValues[16] =
+static const HashTableValue JSHTMLTextAreaElementTableValues[17] =
{
{ "defaultValue", DontDelete, (intptr_t)jsHTMLTextAreaElementDefaultValue, (intptr_t)setJSHTMLTextAreaElementDefaultValue },
{ "form", DontDelete|ReadOnly, (intptr_t)jsHTMLTextAreaElementForm, (intptr_t)0 },
+ { "validity", DontDelete|ReadOnly, (intptr_t)jsHTMLTextAreaElementValidity, (intptr_t)0 },
{ "accessKey", DontDelete, (intptr_t)jsHTMLTextAreaElementAccessKey, (intptr_t)setJSHTMLTextAreaElementAccessKey },
{ "cols", DontDelete, (intptr_t)jsHTMLTextAreaElementCols, (intptr_t)setJSHTMLTextAreaElementCols },
{ "disabled", DontDelete, (intptr_t)jsHTMLTextAreaElementDisabled, (intptr_t)setJSHTMLTextAreaElementDisabled },
@@ -58,11 +61,11 @@ static const HashTableValue JSHTMLTextAreaElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTextAreaElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTextAreaElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSHTMLTextAreaElementTableValues, 0 };
#else
- { 35, 31, JSHTMLTextAreaElementTableValues, 0 };
+ { 36, 31, JSHTMLTextAreaElementTableValues, 0 };
#endif
/* Hash table for constructor */
@@ -72,7 +75,7 @@ static const HashTableValue JSHTMLTextAreaElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTextAreaElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTextAreaElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTextAreaElementConstructorTableValues, 0 };
#else
@@ -112,7 +115,7 @@ static const HashTableValue JSHTMLTextAreaElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTextAreaElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTextAreaElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSHTMLTextAreaElementPrototypeTableValues, 0 };
#else
@@ -162,6 +165,13 @@ JSValue jsHTMLTextAreaElementForm(ExecState* exec, const Identifier&, const Prop
return toJS(exec, WTF::getPtr(imp->form()));
}
+JSValue jsHTMLTextAreaElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl());
+ return toJS(exec, WTF::getPtr(imp->validity()));
+}
+
JSValue jsHTMLTextAreaElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h
index d248975..63d0575 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h
@@ -69,6 +69,7 @@ JSC::JSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetSelectionRan
JSC::JSValue jsHTMLTextAreaElementDefaultValue(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSHTMLTextAreaElementDefaultValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLTextAreaElementForm(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsHTMLTextAreaElementValidity(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
JSC::JSValue jsHTMLTextAreaElementAccessKey(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSHTMLTextAreaElementAccessKey(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsHTMLTextAreaElementCols(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp
index 82a61ad..dbc9932 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHTMLTitleElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTitleElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSHTMLTitleElementTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSHTMLTitleElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTitleElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTitleElementConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSHTMLTitleElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLTitleElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLTitleElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp
index 522ff7f..aae57e3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSHTMLUListElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLUListElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLUListElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSHTMLUListElementTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSHTMLUListElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLUListElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLUListElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLUListElementConstructorTableValues, 0 };
#else
@@ -94,7 +94,7 @@ static const HashTableValue JSHTMLUListElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLUListElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLUListElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLUListElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp
index c097281..19c1a20 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSHTMLVideoElementTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLVideoElementTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLVideoElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHTMLVideoElementTableValues, 0 };
#else
@@ -63,7 +63,7 @@ static const HashTableValue JSHTMLVideoElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLVideoElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLVideoElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLVideoElementConstructorTableValues, 0 };
#else
@@ -101,7 +101,7 @@ static const HashTableValue JSHTMLVideoElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHTMLVideoElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHTMLVideoElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHTMLVideoElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp b/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp
index 55e22af..097a6b7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSHistoryTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHistoryTable =
+static JSC_CONST_HASHTABLE HashTable JSHistoryTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSHistoryTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSHistoryPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSHistoryPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSHistoryPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSHistoryPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp b/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp
index a965375..139249b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSImageDataTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSImageDataTable =
+static JSC_CONST_HASHTABLE HashTable JSImageDataTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSImageDataTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSImageDataConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSImageDataConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSImageDataConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSImageDataConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSImageDataPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSImageDataPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSImageDataPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSImageDataPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp b/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp
index a0dac40..a457224 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSInspectorControllerTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSInspectorControllerTable =
+static JSC_CONST_HASHTABLE HashTable JSInspectorControllerTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSInspectorControllerTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSInspectorControllerConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSInspectorControllerConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSInspectorControllerConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSInspectorControllerConstructorTableValues, 0 };
#else
@@ -143,7 +143,7 @@ static const HashTableValue JSInspectorControllerPrototypeTableValues[48] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSInspectorControllerPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSInspectorControllerPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSInspectorControllerPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp
index c8a3f3d..a4a4f8b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp
@@ -52,7 +52,7 @@ static const HashTableValue JSJavaScriptCallFrameTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSJavaScriptCallFrameTable =
+static JSC_CONST_HASHTABLE HashTable JSJavaScriptCallFrameTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSJavaScriptCallFrameTableValues, 0 };
#else
@@ -67,7 +67,7 @@ static const HashTableValue JSJavaScriptCallFramePrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSJavaScriptCallFramePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSJavaScriptCallFramePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSJavaScriptCallFramePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp
index 750d1be..a03e149 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp
@@ -50,7 +50,7 @@ static const HashTableValue JSKeyboardEventTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSKeyboardEventTable =
+static JSC_CONST_HASHTABLE HashTable JSKeyboardEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSKeyboardEventTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSKeyboardEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSKeyboardEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSKeyboardEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSKeyboardEventConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSKeyboardEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSKeyboardEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSKeyboardEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSKeyboardEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp
index a1c76be..01b1416 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSLocationTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSLocationTable =
+static JSC_CONST_HASHTABLE HashTable JSLocationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSLocationTableValues, 0 };
#else
@@ -67,7 +67,7 @@ static const HashTableValue JSLocationPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSLocationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSLocationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSLocationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp b/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp
index 490e06c..76d8044 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSMediaErrorTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMediaErrorTable =
+static JSC_CONST_HASHTABLE HashTable JSMediaErrorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSMediaErrorTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSMediaErrorConstructorTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMediaErrorConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMediaErrorConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSMediaErrorConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSMediaErrorPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMediaErrorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMediaErrorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSMediaErrorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp b/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp
index 4a517c8f..448b378 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSMediaListTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMediaListTable =
+static JSC_CONST_HASHTABLE HashTable JSMediaListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSMediaListTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSMediaListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMediaListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMediaListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMediaListConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSMediaListPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMediaListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMediaListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSMediaListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp
index 8f660f2..5b41a54 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSMessageChannelTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessageChannelTable =
+static JSC_CONST_HASHTABLE HashTable JSMessageChannelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSMessageChannelTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSMessageChannelPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessageChannelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMessageChannelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMessageChannelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp
index e95dd9c..190fb5a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp
@@ -50,7 +50,7 @@ static const HashTableValue JSMessageEventTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessageEventTable =
+static JSC_CONST_HASHTABLE HashTable JSMessageEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSMessageEventTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSMessageEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessageEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMessageEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMessageEventConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSMessageEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessageEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMessageEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMessageEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp
index 7cb75b2..cc43258 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSMessagePortTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessagePortTable =
+static JSC_CONST_HASHTABLE HashTable JSMessagePortTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSMessagePortTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSMessagePortConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessagePortConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMessagePortConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMessagePortConstructorTableValues, 0 };
#else
@@ -106,7 +106,7 @@ static const HashTableValue JSMessagePortPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMessagePortPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMessagePortPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSMessagePortPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp b/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp
index 09a5dbd..1938061 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSMimeTypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMimeTypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMimeTypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSMimeTypeTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSMimeTypeConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMimeTypeConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMimeTypeConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMimeTypeConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSMimeTypePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMimeTypePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMimeTypePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMimeTypePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp
index 509d6d0..28e3930 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSMimeTypeArrayTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMimeTypeArrayTable =
+static JSC_CONST_HASHTABLE HashTable JSMimeTypeArrayTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSMimeTypeArrayTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSMimeTypeArrayConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMimeTypeArrayConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMimeTypeArrayConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMimeTypeArrayConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSMimeTypeArrayPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMimeTypeArrayPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMimeTypeArrayPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSMimeTypeArrayPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp
index 6daf2ab..fca18c5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp
@@ -64,7 +64,7 @@ static const HashTableValue JSMouseEventTableValues[19] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMouseEventTable =
+static JSC_CONST_HASHTABLE HashTable JSMouseEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSMouseEventTableValues, 0 };
#else
@@ -78,7 +78,7 @@ static const HashTableValue JSMouseEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMouseEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMouseEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMouseEventConstructorTableValues, 0 };
#else
@@ -117,7 +117,7 @@ static const HashTableValue JSMouseEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMouseEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMouseEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSMouseEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp
index 71d339e..2f6bc8e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSMutationEventTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMutationEventTable =
+static JSC_CONST_HASHTABLE HashTable JSMutationEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSMutationEventTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSMutationEventConstructorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMutationEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSMutationEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSMutationEventConstructorTableValues, 0 };
#else
@@ -108,7 +108,7 @@ static const HashTableValue JSMutationEventPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSMutationEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSMutationEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSMutationEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp
index 9c6a5a9..47a7643 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSNamedNodeMapTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNamedNodeMapTable =
+static JSC_CONST_HASHTABLE HashTable JSNamedNodeMapTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSNamedNodeMapTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSNamedNodeMapConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNamedNodeMapConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSNamedNodeMapConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNamedNodeMapConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSNamedNodeMapPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNamedNodeMapPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNamedNodeMapPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSNamedNodeMapPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp b/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp
index feefecc..e55a3cc 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp
@@ -58,7 +58,7 @@ static const HashTableValue JSNavigatorTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNavigatorTable =
+static JSC_CONST_HASHTABLE HashTable JSNavigatorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSNavigatorTableValues, 0 };
#else
@@ -73,7 +73,7 @@ static const HashTableValue JSNavigatorPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNavigatorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNavigatorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNavigatorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNode.cpp b/src/3rdparty/webkit/WebCore/generated/JSNode.cpp
index fda843c..d9d3d35 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNode.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNode.cpp
@@ -71,7 +71,7 @@ static const HashTableValue JSNodeTableValues[19] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSNodeTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSNodeConstructorTableValues[19] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSNodeConstructorTableValues, 0 };
#else
@@ -177,7 +177,7 @@ static const HashTableValue JSNodePrototypeTableValues[37] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNodePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSNodePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp
index 3084eed..32ef101 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp
@@ -39,7 +39,7 @@ static const HashTableValue JSNodeFilterTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeFilterTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeFilterTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNodeFilterTableValues, 0 };
#else
@@ -69,7 +69,7 @@ static const HashTableValue JSNodeFilterConstructorTableValues[17] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeFilterConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeFilterConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSNodeFilterConstructorTableValues, 0 };
#else
@@ -124,7 +124,7 @@ static const HashTableValue JSNodeFilterPrototypeTableValues[18] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeFilterPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeFilterPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSNodeFilterPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp
index 152ab6f..6e79669 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp
@@ -50,7 +50,7 @@ static const HashTableValue JSNodeIteratorTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeIteratorTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeIteratorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSNodeIteratorTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSNodeIteratorConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeIteratorConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeIteratorConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNodeIteratorConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSNodeIteratorPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeIteratorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeIteratorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSNodeIteratorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp
index 80e1f22..f02b7b7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSNodeListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeListTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSNodeListTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSNodeListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNodeListConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSNodeListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNodeListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNodeListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNodeListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp b/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp
index 95dacaa..13ac97b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSNotationTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNotationTable =
+static JSC_CONST_HASHTABLE HashTable JSNotationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSNotationTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSNotationConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNotationConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSNotationConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNotationConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSNotationPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSNotationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSNotationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSNotationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSONObject.lut.h b/src/3rdparty/webkit/WebCore/generated/JSONObject.lut.h
index 9a12bb4..ce685c2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSONObject.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSONObject.lut.h
@@ -10,6 +10,6 @@ static const struct HashTableValue jsonTableValues[3] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable jsonTable =
+extern JSC_CONST_HASHTABLE HashTable jsonTable =
{ 4, 3, jsonTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp
index b704dcb..88a8bd3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSOverflowEventTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSOverflowEventTable =
+static JSC_CONST_HASHTABLE HashTable JSOverflowEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSOverflowEventTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSOverflowEventConstructorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSOverflowEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSOverflowEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSOverflowEventConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSOverflowEventPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSOverflowEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSOverflowEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSOverflowEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp b/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp
index 9b3c480..c8d0432 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp
@@ -50,7 +50,7 @@ static const HashTableValue JSPluginTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPluginTable =
+static JSC_CONST_HASHTABLE HashTable JSPluginTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSPluginTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSPluginConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPluginConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSPluginConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSPluginConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSPluginPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPluginPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSPluginPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSPluginPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp
index ba960da..2d0ec36 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSPluginArrayTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPluginArrayTable =
+static JSC_CONST_HASHTABLE HashTable JSPluginArrayTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSPluginArrayTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSPluginArrayConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPluginArrayConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSPluginArrayConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSPluginArrayConstructorTableValues, 0 };
#else
@@ -100,7 +100,7 @@ static const HashTableValue JSPluginArrayPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPluginArrayPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSPluginArrayPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSPluginArrayPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp b/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp
index 89f9e56..680cfc3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSPositionErrorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPositionErrorTable =
+static JSC_CONST_HASHTABLE HashTable JSPositionErrorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSPositionErrorTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSPositionErrorConstructorTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPositionErrorConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSPositionErrorConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSPositionErrorConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSPositionErrorPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSPositionErrorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSPositionErrorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSPositionErrorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp b/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp
index 7ca8069..f9d2fc0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSProcessingInstructionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSProcessingInstructionTable =
+static JSC_CONST_HASHTABLE HashTable JSProcessingInstructionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSProcessingInstructionTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSProcessingInstructionConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSProcessingInstructionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSProcessingInstructionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSProcessingInstructionConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSProcessingInstructionPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSProcessingInstructionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSProcessingInstructionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSProcessingInstructionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp
index b70c3c2..5c7bd50 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSProgressEventTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSProgressEventTable =
+static JSC_CONST_HASHTABLE HashTable JSProgressEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSProgressEventTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSProgressEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSProgressEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSProgressEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSProgressEventConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSProgressEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSProgressEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSProgressEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSProgressEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h
index 03bb415..4bcba9c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h
@@ -11,6 +11,6 @@ static const struct HashTableValue JSRGBColorTableValues[4] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable JSRGBColorTable =
+extern JSC_CONST_HASHTABLE HashTable JSRGBColorTable =
{ 8, 7, JSRGBColorTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp
index 901b8f3..35582f5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp
@@ -53,7 +53,7 @@ static const HashTableValue JSRangeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRangeTable =
+static JSC_CONST_HASHTABLE HashTable JSRangeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSRangeTableValues, 0 };
#else
@@ -75,7 +75,7 @@ static const HashTableValue JSRangeConstructorTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRangeConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSRangeConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSRangeConstructorTableValues, 0 };
#else
@@ -144,7 +144,7 @@ static const HashTableValue JSRangePrototypeTableValues[32] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRangePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSRangePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSRangePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp b/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp
index 3cf51ee..799616e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSRangeExceptionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRangeExceptionTable =
+static JSC_CONST_HASHTABLE HashTable JSRangeExceptionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSRangeExceptionTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSRangeExceptionConstructorTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRangeExceptionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSRangeExceptionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSRangeExceptionConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSRangeExceptionPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRangeExceptionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSRangeExceptionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSRangeExceptionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSRect.cpp
index 02423ef..4f6a2f7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSRect.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSRect.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSRectTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRectTable =
+static JSC_CONST_HASHTABLE HashTable JSRectTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSRectTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSRectConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRectConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSRectConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSRectConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSRectPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSRectPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSRectPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSRectPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp
index 77cdc74..f907210 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSQLErrorTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLErrorTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLErrorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSQLErrorTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSSQLErrorPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLErrorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLErrorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSQLErrorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp
index 8852997..e00abfe 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSQLResultSetTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLResultSetTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLResultSetTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSQLResultSetTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSSQLResultSetPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLResultSetPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLResultSetPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSQLResultSetPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp
index daf19f5..1a8af16 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSQLResultSetRowListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLResultSetRowListTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLResultSetRowListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSQLResultSetRowListTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSSQLResultSetRowListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLResultSetRowListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLResultSetRowListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSQLResultSetRowListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp
index 1f086ee..cb7dabd 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSQLTransactionPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSQLTransactionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSQLTransactionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSQLTransactionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp
index 3e6d235..b7a3237 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp
@@ -70,7 +70,7 @@ static const HashTableValue JSSVGAElementTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGAElementTableValues, 0 };
#else
@@ -90,7 +90,7 @@ static const HashTableValue JSSVGAElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGAElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp
index 89543b1..56a4392 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGAltGlyphElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAltGlyphElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAltGlyphElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGAltGlyphElementTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGAltGlyphElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAltGlyphElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAltGlyphElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAltGlyphElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp
index 39c7e73..4bb4518 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSSVGAngleTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAngleTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAngleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGAngleTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGAngleConstructorTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAngleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAngleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGAngleConstructorTableValues, 0 };
#else
@@ -113,7 +113,7 @@ static const HashTableValue JSSVGAnglePrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnglePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnglePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGAnglePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp
index cbb2269..432bd7e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGAnimateColorElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimateColorElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimateColorElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimateColorElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp
index 77d0331..b79ba69 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGAnimateElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimateElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimateElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimateElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp
index 511108f..8b68ea4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGAnimateTransformElementPrototypeTableValues[1]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimateTransformElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimateTransformElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimateTransformElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp
index 92c485a..34a9a9b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGAnimatedAngleTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedAngleTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedAngleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedAngleTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGAnimatedAnglePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedAnglePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedAnglePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedAnglePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp
index 2821aaa..969a5c9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSSVGAnimatedBooleanTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedBooleanTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedBooleanTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedBooleanTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSSVGAnimatedBooleanPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedBooleanPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedBooleanPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedBooleanPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp
index 3af330f..d61ea12 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGAnimatedEnumerationTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedEnumerationTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedEnumerationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedEnumerationTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGAnimatedEnumerationPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedEnumerationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedEnumerationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedEnumerationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp
index 11337a2..8228409 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGAnimatedIntegerTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedIntegerTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedIntegerTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedIntegerTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGAnimatedIntegerPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedIntegerPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedIntegerPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedIntegerPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp
index 2e1fc5b..e680aea 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGAnimatedLengthTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedLengthTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedLengthTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedLengthTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGAnimatedLengthPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedLengthPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedLengthPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedLengthPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp
index 04fa5f2..f6bf514 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGAnimatedLengthListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedLengthListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedLengthListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedLengthListTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGAnimatedLengthListPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedLengthListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedLengthListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedLengthListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp
index 0b1d5a3..232b085 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGAnimatedNumberTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedNumberTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedNumberTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedNumberTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGAnimatedNumberPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedNumberPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedNumberPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedNumberPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp
index 3e07104..c782499 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGAnimatedNumberListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedNumberListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedNumberListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedNumberListTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGAnimatedNumberListPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedNumberListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedNumberListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedNumberListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp
index 6209832..6fd809c6 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGAnimatedPreserveAspectRatioTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedPreserveAspectRatioTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedPreserveAspectRatioTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedPreserveAspectRatioTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGAnimatedPreserveAspectRatioPrototypeTableValues
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedPreserveAspectRatioPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedPreserveAspectRatioPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedPreserveAspectRatioPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp
index 41698eb..8d8a4da 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGAnimatedRectTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedRectTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedRectTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedRectTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGAnimatedRectPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedRectPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedRectPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedRectPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp
index 8d29f52..cfcebf0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSSVGAnimatedStringTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedStringTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedStringTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedStringTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSSVGAnimatedStringPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedStringPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedStringPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedStringPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp
index ecdf262..80d48c9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGAnimatedTransformListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedTransformListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedTransformListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGAnimatedTransformListTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGAnimatedTransformListPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimatedTransformListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedTransformListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGAnimatedTransformListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp
index 12d6f19..70fc7b3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp
@@ -52,7 +52,7 @@ static const HashTableValue JSSVGAnimationElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimationElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimationElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGAnimationElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSSVGAnimationElementPrototypeTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGAnimationElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGAnimationElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGAnimationElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp
index f9fa2aa..a487e9c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp
@@ -72,7 +72,7 @@ static const HashTableValue JSSVGCircleElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGCircleElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGCircleElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGCircleElementTableValues, 0 };
#else
@@ -92,7 +92,7 @@ static const HashTableValue JSSVGCircleElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGCircleElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGCircleElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGCircleElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp
index 73e31af..5adfdb9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp
@@ -70,7 +70,7 @@ static const HashTableValue JSSVGClipPathElementTableValues[13] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGClipPathElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGClipPathElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGClipPathElementTableValues, 0 };
#else
@@ -90,7 +90,7 @@ static const HashTableValue JSSVGClipPathElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGClipPathElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGClipPathElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGClipPathElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp
index 88c62e4..97ea35b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGColorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGColorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGColorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGColorTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSSVGColorConstructorTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGColorConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGColorConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGColorConstructorTableValues, 0 };
#else
@@ -109,7 +109,7 @@ static const HashTableValue JSSVGColorPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGColorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGColorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGColorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp
index d5be3bc..3fc9adc 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSSVGComponentTransferFunctionElementTableValues[9]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGComponentTransferFunctionElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGComponentTransferFunctionElementTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSSVGComponentTransferFunctionElementConstructorTabl
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGComponentTransferFunctionElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGComponentTransferFunctionElementConstructorTableValues, 0 };
#else
@@ -115,7 +115,7 @@ static const HashTableValue JSSVGComponentTransferFunctionElementPrototypeTableV
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGComponentTransferFunctionElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGComponentTransferFunctionElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp
index d6171c6..c38cb5b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp
@@ -53,7 +53,7 @@ static const HashTableValue JSSVGCursorElementTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGCursorElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGCursorElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGCursorElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGCursorElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGCursorElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGCursorElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGCursorElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp
index 6947dda..207bbe7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGDefinitionSrcElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDefinitionSrcElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDefinitionSrcElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGDefinitionSrcElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp
index 83e26d0..dd87211 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGDefsElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDefsElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDefsElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGDefsElementTableValues, 0 };
#else
@@ -88,7 +88,7 @@ static const HashTableValue JSSVGDefsElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDefsElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDefsElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGDefsElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp
index 28641ab..77be621 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp
@@ -53,7 +53,7 @@ static const HashTableValue JSSVGDescElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDescElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDescElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGDescElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGDescElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDescElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDescElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGDescElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp
index 840e6c9..6d91ccc 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGDocumentTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDocumentTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDocumentTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGDocumentTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGDocumentPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGDocumentPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGDocumentPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGDocumentPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp
index e4defcf..b9e0a2d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSSVGElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGElementTableValues, 0 };
#else
@@ -63,7 +63,7 @@ static const HashTableValue JSSVGElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp
index 3b4d6b1..560630d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp
@@ -102,7 +102,7 @@ static const HashTableValue JSSVGElementInstanceTableValues[49] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGElementInstanceTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGElementInstanceTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSSVGElementInstanceTableValues, 0 };
#else
@@ -119,7 +119,7 @@ static const HashTableValue JSSVGElementInstancePrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGElementInstancePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGElementInstancePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGElementInstancePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp
index 81c9335..312345f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGElementInstanceListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGElementInstanceListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGElementInstanceListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGElementInstanceListTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGElementInstanceListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGElementInstanceListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGElementInstanceListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGElementInstanceListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp
index 8d6d8ec..73d7cfa 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp
@@ -73,7 +73,7 @@ static const HashTableValue JSSVGEllipseElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGEllipseElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGEllipseElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGEllipseElementTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSSVGEllipseElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGEllipseElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGEllipseElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGEllipseElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp
index af6a2090..7860c9d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSSVGExceptionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGExceptionTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGExceptionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGExceptionTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSSVGExceptionConstructorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGExceptionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGExceptionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGExceptionConstructorTableValues, 0 };
#else
@@ -107,7 +107,7 @@ static const HashTableValue JSSVGExceptionPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGExceptionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGExceptionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGExceptionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp
index 0ecbe59..a353006 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGFEBlendElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEBlendElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEBlendElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEBlendElementTableValues, 0 };
#else
@@ -80,7 +80,7 @@ static const HashTableValue JSSVGFEBlendElementConstructorTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEBlendElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEBlendElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFEBlendElementConstructorTableValues, 0 };
#else
@@ -125,7 +125,7 @@ static const HashTableValue JSSVGFEBlendElementPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEBlendElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEBlendElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFEBlendElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp
index dd8db83..d875386 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGFEColorMatrixElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEColorMatrixElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEColorMatrixElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEColorMatrixElementTableValues, 0 };
#else
@@ -80,7 +80,7 @@ static const HashTableValue JSSVGFEColorMatrixElementConstructorTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEColorMatrixElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEColorMatrixElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGFEColorMatrixElementConstructorTableValues, 0 };
#else
@@ -124,7 +124,7 @@ static const HashTableValue JSSVGFEColorMatrixElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEColorMatrixElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEColorMatrixElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGFEColorMatrixElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp
index cf4de5c..c5238a8 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGFEComponentTransferElementTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEComponentTransferElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEComponentTransferElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEComponentTransferElementTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSSVGFEComponentTransferElementPrototypeTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEComponentTransferElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEComponentTransferElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEComponentTransferElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp
index 6aff814..8edb5f0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp
@@ -65,7 +65,7 @@ static const HashTableValue JSSVGFECompositeElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFECompositeElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFECompositeElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFECompositeElementTableValues, 0 };
#else
@@ -86,7 +86,7 @@ static const HashTableValue JSSVGFECompositeElementConstructorTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFECompositeElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFECompositeElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFECompositeElementConstructorTableValues, 0 };
#else
@@ -132,7 +132,7 @@ static const HashTableValue JSSVGFECompositeElementPrototypeTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFECompositeElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFECompositeElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGFECompositeElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp
index 4549381..0fffc6e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGFEDiffuseLightingElementTableValues[13] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDiffuseLightingElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDiffuseLightingElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEDiffuseLightingElementTableValues, 0 };
#else
@@ -76,7 +76,7 @@ static const HashTableValue JSSVGFEDiffuseLightingElementPrototypeTableValues[2]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDiffuseLightingElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDiffuseLightingElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEDiffuseLightingElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp
index dca7363..0e8e342 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp
@@ -63,7 +63,7 @@ static const HashTableValue JSSVGFEDisplacementMapElementTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDisplacementMapElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEDisplacementMapElementTableValues, 0 };
#else
@@ -82,7 +82,7 @@ static const HashTableValue JSSVGFEDisplacementMapElementConstructorTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDisplacementMapElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFEDisplacementMapElementConstructorTableValues, 0 };
#else
@@ -126,7 +126,7 @@ static const HashTableValue JSSVGFEDisplacementMapElementPrototypeTableValues[7]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDisplacementMapElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFEDisplacementMapElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp
index 55abac8..63ece0d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGFEDistantLightElementTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDistantLightElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDistantLightElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFEDistantLightElementTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGFEDistantLightElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEDistantLightElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEDistantLightElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEDistantLightElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp
index 1b7cab5..f80ec71 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGFEFloodElementTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFloodElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEFloodElementTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSSVGFEFloodElementConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFloodElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEFloodElementConstructorTableValues, 0 };
#else
@@ -110,7 +110,7 @@ static const HashTableValue JSSVGFEFloodElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFloodElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEFloodElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp
index 90dbf26..a51799b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFEFuncAElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFuncAElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFuncAElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEFuncAElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp
index a2c895b..710a37b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFEFuncBElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFuncBElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFuncBElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEFuncBElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp
index acebd39..82aa829 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFEFuncGElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFuncGElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFuncGElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEFuncGElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp
index c6fad7b..26b8c93 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFEFuncRElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEFuncRElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEFuncRElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEFuncRElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp
index 281c9be..f36edd6 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGFEGaussianBlurElementTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEGaussianBlurElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEGaussianBlurElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEGaussianBlurElementTableValues, 0 };
#else
@@ -75,7 +75,7 @@ static const HashTableValue JSSVGFEGaussianBlurElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEGaussianBlurElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEGaussianBlurElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGFEGaussianBlurElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp
index 08ea33e..d3f76f9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp
@@ -62,7 +62,7 @@ static const HashTableValue JSSVGFEImageElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEImageElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEImageElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEImageElementTableValues, 0 };
#else
@@ -77,7 +77,7 @@ static const HashTableValue JSSVGFEImageElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEImageElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEImageElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEImageElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp
index 7262013..4b18c0a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp
@@ -55,7 +55,7 @@ static const HashTableValue JSSVGFEMergeElementTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEMergeElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEMergeElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEMergeElementTableValues, 0 };
#else
@@ -70,7 +70,7 @@ static const HashTableValue JSSVGFEMergeElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEMergeElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEMergeElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEMergeElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp
index 32fc5c7..3ea7b74 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGFEMergeNodeElementTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEMergeNodeElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEMergeNodeElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEMergeNodeElementTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGFEMergeNodeElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEMergeNodeElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEMergeNodeElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEMergeNodeElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp
index 3b36b96..4ea1f85 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGFEOffsetElementTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEOffsetElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEOffsetElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFEOffsetElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSSVGFEOffsetElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEOffsetElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEOffsetElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEOffsetElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp
index 5004762..6ca91ec 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSSVGFEPointLightElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEPointLightElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEPointLightElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGFEPointLightElementTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSSVGFEPointLightElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFEPointLightElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFEPointLightElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFEPointLightElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp
index 7521e62..4f8ac6c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGFESpecularLightingElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFESpecularLightingElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFESpecularLightingElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSSVGFESpecularLightingElementTableValues, 0 };
#else
@@ -75,7 +75,7 @@ static const HashTableValue JSSVGFESpecularLightingElementPrototypeTableValues[2
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFESpecularLightingElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFESpecularLightingElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFESpecularLightingElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp
index de15407..b5ae3d1 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSSVGFESpotLightElementTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFESpotLightElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFESpotLightElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFESpotLightElementTableValues, 0 };
#else
@@ -63,7 +63,7 @@ static const HashTableValue JSSVGFESpotLightElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFESpotLightElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFESpotLightElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFESpotLightElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp
index 66b19e8..bc0e33c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGFETileElementTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFETileElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFETileElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFETileElementTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSSVGFETileElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFETileElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFETileElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFETileElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp
index 50369f1..c0e4fac 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp
@@ -65,7 +65,7 @@ static const HashTableValue JSSVGFETurbulenceElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFETurbulenceElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFETurbulenceElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGFETurbulenceElementTableValues, 0 };
#else
@@ -85,7 +85,7 @@ static const HashTableValue JSSVGFETurbulenceElementConstructorTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFETurbulenceElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFETurbulenceElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGFETurbulenceElementConstructorTableValues, 0 };
#else
@@ -130,7 +130,7 @@ static const HashTableValue JSSVGFETurbulenceElementPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFETurbulenceElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFETurbulenceElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGFETurbulenceElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp
index 9a63655..6ba6d1b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp
@@ -67,7 +67,7 @@ static const HashTableValue JSSVGFilterElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFilterElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFilterElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSSVGFilterElementTableValues, 0 };
#else
@@ -83,7 +83,7 @@ static const HashTableValue JSSVGFilterElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFilterElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFilterElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGFilterElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp
index d66d6b6..755c2c0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFontElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFontElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFontElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFontElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp
index 55633bb..cddf759 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFontFaceElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFontFaceElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFontFaceElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFontFaceElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp
index 50708c2..bc0d0ae 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFontFaceFormatElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFontFaceFormatElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFontFaceFormatElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFontFaceFormatElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp
index 2f12035..87c749a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFontFaceNameElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFontFaceNameElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFontFaceNameElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFontFaceNameElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp
index 82c6137..302e4be 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFontFaceSrcElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFontFaceSrcElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFontFaceSrcElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFontFaceSrcElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp
index 32208d8..16507ff 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGFontFaceUriElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGFontFaceUriElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGFontFaceUriElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGFontFaceUriElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp
index 7bba5bb..8bac171 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp
@@ -73,7 +73,7 @@ static const HashTableValue JSSVGForeignObjectElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGForeignObjectElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGForeignObjectElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSSVGForeignObjectElementTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSSVGForeignObjectElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGForeignObjectElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGForeignObjectElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGForeignObjectElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp
index 75a61b6..1ea98b2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGGElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGGElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGGElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGGElementTableValues, 0 };
#else
@@ -88,7 +88,7 @@ static const HashTableValue JSSVGGElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGGElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGGElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGGElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp
index 684831f..6cd2211 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGGlyphElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGGlyphElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGGlyphElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGGlyphElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp
index 1dc75b0..bcadbfc 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp
@@ -58,7 +58,7 @@ static const HashTableValue JSSVGGradientElementTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGGradientElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGGradientElementTableValues, 0 };
#else
@@ -76,7 +76,7 @@ static const HashTableValue JSSVGGradientElementConstructorTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGGradientElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGGradientElementConstructorTableValues, 0 };
#else
@@ -119,7 +119,7 @@ static const HashTableValue JSSVGGradientElementPrototypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGGradientElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGGradientElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp
index 87c1fe8..d636a27 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGHKernElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGHKernElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGHKernElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGHKernElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp
index 4f6f84f..8aaa237 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp
@@ -76,7 +76,7 @@ static const HashTableValue JSSVGImageElementTableValues[18] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGImageElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGImageElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSSVGImageElementTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSSVGImageElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGImageElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGImageElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGImageElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp
index 7e86524..7a4d143 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSSVGLengthTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLengthTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLengthTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGLengthTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSSVGLengthConstructorTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLengthConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLengthConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSSVGLengthConstructorTableValues, 0 };
#else
@@ -125,7 +125,7 @@ static const HashTableValue JSSVGLengthPrototypeTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLengthPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLengthPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSSVGLengthPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp
index 9283d38..86b9320 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGLengthListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLengthListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLengthListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGLengthListTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSSVGLengthListPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLengthListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLengthListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGLengthListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp
index 62e72c5..9e7057b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp
@@ -73,7 +73,7 @@ static const HashTableValue JSSVGLineElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLineElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLineElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSSVGLineElementTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSSVGLineElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLineElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLineElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGLineElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp
index 4e0c48a..56ec26c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGLinearGradientElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLinearGradientElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLinearGradientElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGLinearGradientElementTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGLinearGradientElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGLinearGradientElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGLinearGradientElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGLinearGradientElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp
index afaf538..d1b0cd6 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp
@@ -71,7 +71,7 @@ static const HashTableValue JSSVGMarkerElementTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMarkerElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMarkerElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGMarkerElementTableValues, 0 };
#else
@@ -91,7 +91,7 @@ static const HashTableValue JSSVGMarkerElementConstructorTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMarkerElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMarkerElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGMarkerElementConstructorTableValues, 0 };
#else
@@ -138,7 +138,7 @@ static const HashTableValue JSSVGMarkerElementPrototypeTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMarkerElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMarkerElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGMarkerElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp
index d6e2a33..c266956 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGMaskElementTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMaskElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMaskElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGMaskElementTableValues, 0 };
#else
@@ -84,7 +84,7 @@ static const HashTableValue JSSVGMaskElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMaskElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMaskElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGMaskElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp
index 761f128..e668ab2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSSVGMatrixTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMatrixTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMatrixTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGMatrixTableValues, 0 };
#else
@@ -73,7 +73,7 @@ static const HashTableValue JSSVGMatrixPrototypeTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMatrixPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMatrixPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGMatrixPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp
index a150bd3..500bb33 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGMetadataElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMetadataElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMetadataElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGMetadataElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp
index f5eaa01..b6efc8c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGMissingGlyphElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGMissingGlyphElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGMissingGlyphElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGMissingGlyphElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp
index 9e3dede..491e6bf 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSSVGNumberTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGNumberTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGNumberTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGNumberTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSSVGNumberPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGNumberPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGNumberPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGNumberPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp
index 28fd4bc..1558247 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSSVGNumberListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGNumberListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGNumberListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGNumberListTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSSVGNumberListPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGNumberListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGNumberListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGNumberListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp
index 8bfddc2..f3e7b6f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSSVGPaintTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPaintTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPaintTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGPaintTableValues, 0 };
#else
@@ -71,7 +71,7 @@ static const HashTableValue JSSVGPaintConstructorTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPaintConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPaintConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSSVGPaintConstructorTableValues, 0 };
#else
@@ -121,7 +121,7 @@ static const HashTableValue JSSVGPaintPrototypeTableValues[13] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPaintPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPaintPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 4095, JSSVGPaintPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp
index 0855624..8da1204 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp
@@ -107,7 +107,7 @@ static const HashTableValue JSSVGPathElementTableValues[17] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGPathElementTableValues, 0 };
#else
@@ -149,7 +149,7 @@ static const HashTableValue JSSVGPathElementPrototypeTableValues[29] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGPathElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp
index 99c580b..b19e3a0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGPathSegTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGPathSegTableValues, 0 };
#else
@@ -80,7 +80,7 @@ static const HashTableValue JSSVGPathSegConstructorTableValues[21] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGPathSegConstructorTableValues, 0 };
#else
@@ -138,7 +138,7 @@ static const HashTableValue JSSVGPathSegPrototypeTableValues[21] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGPathSegPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp
index f754bf0..d8f37b2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSSVGPathSegArcAbsTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegArcAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegArcAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGPathSegArcAbsTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSSVGPathSegArcAbsPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegArcAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegArcAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegArcAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp
index 70a23c5..0f59520 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSSVGPathSegArcRelTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegArcRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegArcRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGPathSegArcRelTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSSVGPathSegArcRelPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegArcRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegArcRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegArcRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp
index 1270ef2..1519f2a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGPathSegClosePathPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegClosePathPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegClosePathPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegClosePathPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp
index a33c4bc..c862653 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicAbsTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGPathSegCurvetoCubicAbsTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicAbsPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoCubicAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp
index f6c6ad4..84c349c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicRelTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGPathSegCurvetoCubicRelTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicRelPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoCubicRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp
index 22f8de9..f5716b0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicSmoothAbsTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicSmoothAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicSmoothAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGPathSegCurvetoCubicSmoothAbsTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTableValue
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp
index 8608b28..c5c05d7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicSmoothRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicSmoothRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGPathSegCurvetoCubicSmoothRelTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValue
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoCubicSmoothRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoCubicSmoothRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp
index 5897807..4170299 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticAbsTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGPathSegCurvetoQuadraticAbsTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticAbsPrototypeTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoQuadraticAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp
index 19f9b60..4f50522 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticRelTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGPathSegCurvetoQuadraticRelTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticRelPrototypeTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoQuadraticRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp
index 3fefc7e..0ebe08a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticSmoothAbsTableValues[3]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticSmoothAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticSmoothAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPathSegCurvetoQuadraticSmoothAbsTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTableV
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp
index e16e6b5..69382f9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticSmoothRelTableValues[3]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticSmoothRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticSmoothRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPathSegCurvetoQuadraticSmoothRelTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGPathSegCurvetoQuadraticSmoothRelPrototypeTableV
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegCurvetoQuadraticSmoothRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegCurvetoQuadraticSmoothRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegCurvetoQuadraticSmoothRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp
index 8676d4b..bd7a491 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPathSegLinetoAbsTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPathSegLinetoAbsTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGPathSegLinetoAbsPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp
index 0289a9a..d5b7b4f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGPathSegLinetoHorizontalAbsTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoHorizontalAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoHorizontalAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoHorizontalAbsTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGPathSegLinetoHorizontalAbsPrototypeTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoHorizontalAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoHorizontalAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoHorizontalAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp
index cd0755a..2549caf 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGPathSegLinetoHorizontalRelTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoHorizontalRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoHorizontalRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoHorizontalRelTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGPathSegLinetoHorizontalRelPrototypeTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoHorizontalRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoHorizontalRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoHorizontalRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp
index 250196a..117083b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPathSegLinetoRelTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPathSegLinetoRelTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGPathSegLinetoRelPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp
index 82f7ff8..dea3f90 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGPathSegLinetoVerticalAbsTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoVerticalAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoVerticalAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoVerticalAbsTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGPathSegLinetoVerticalAbsPrototypeTableValues[1]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoVerticalAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoVerticalAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoVerticalAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp
index e07cdd2..e1ff669 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGPathSegLinetoVerticalRelTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoVerticalRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoVerticalRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoVerticalRelTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGPathSegLinetoVerticalRelPrototypeTableValues[1]
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegLinetoVerticalRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegLinetoVerticalRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegLinetoVerticalRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp
index 9a76052..8cfdc3c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSSVGPathSegListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegListTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSSVGPathSegListPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGPathSegListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp
index 3f23fb6..88ef122 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPathSegMovetoAbsTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegMovetoAbsTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegMovetoAbsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPathSegMovetoAbsTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGPathSegMovetoAbsPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegMovetoAbsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegMovetoAbsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegMovetoAbsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp
index 51a946d..1f572b2 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPathSegMovetoRelTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegMovetoRelTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegMovetoRelTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPathSegMovetoRelTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSSVGPathSegMovetoRelPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPathSegMovetoRelPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPathSegMovetoRelPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPathSegMovetoRelPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp
index a01e6f2..4616edc 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp
@@ -75,7 +75,7 @@ static const HashTableValue JSSVGPatternElementTableValues[19] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPatternElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPatternElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGPatternElementTableValues, 0 };
#else
@@ -91,7 +91,7 @@ static const HashTableValue JSSVGPatternElementPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPatternElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPatternElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPatternElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp
index ea8bc94..d0050bf 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGPointTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPointTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPointTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSSVGPointTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGPointPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPointPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPointPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPointPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp
index 74c85a6..5c911bd 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSSVGPointListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPointListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPointListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGPointListTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSSVGPointListPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPointListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPointListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGPointListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp
index 33a19b4..aba8123 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp
@@ -72,7 +72,7 @@ static const HashTableValue JSSVGPolygonElementTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPolygonElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPolygonElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGPolygonElementTableValues, 0 };
#else
@@ -92,7 +92,7 @@ static const HashTableValue JSSVGPolygonElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPolygonElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPolygonElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGPolygonElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp
index a04f5fa..8a967cd 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp
@@ -72,7 +72,7 @@ static const HashTableValue JSSVGPolylineElementTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPolylineElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPolylineElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGPolylineElementTableValues, 0 };
#else
@@ -92,7 +92,7 @@ static const HashTableValue JSSVGPolylineElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPolylineElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPolylineElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGPolylineElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp
index b586e60..85e123c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSSVGPreserveAspectRatioTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPreserveAspectRatioTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPreserveAspectRatioTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGPreserveAspectRatioTableValues, 0 };
#else
@@ -72,7 +72,7 @@ static const HashTableValue JSSVGPreserveAspectRatioConstructorTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPreserveAspectRatioConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPreserveAspectRatioConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGPreserveAspectRatioConstructorTableValues, 0 };
#else
@@ -124,7 +124,7 @@ static const HashTableValue JSSVGPreserveAspectRatioPrototypeTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGPreserveAspectRatioPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGPreserveAspectRatioPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGPreserveAspectRatioPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp
index b888704..ae2d18e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGRadialGradientElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRadialGradientElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRadialGradientElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSSVGRadialGradientElementTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGRadialGradientElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRadialGradientElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRadialGradientElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGRadialGradientElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp
index 8e857f2..59e4127 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSSVGRectTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRectTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRectTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGRectTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSSVGRectPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRectPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRectPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGRectPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp
index 2f97100..423808c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp
@@ -75,7 +75,7 @@ static const HashTableValue JSSVGRectElementTableValues[18] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRectElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRectElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSSVGRectElementTableValues, 0 };
#else
@@ -95,7 +95,7 @@ static const HashTableValue JSSVGRectElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRectElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRectElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGRectElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp
index 97df330..938f097 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSSVGRenderingIntentTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRenderingIntentTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRenderingIntentTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGRenderingIntentTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGRenderingIntentConstructorTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRenderingIntentConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRenderingIntentConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGRenderingIntentConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSSVGRenderingIntentPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGRenderingIntentPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGRenderingIntentPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGRenderingIntentPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp
index 072c0cf..b610779 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp
@@ -99,7 +99,7 @@ static const HashTableValue JSSVGSVGElementTableValues[28] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSVGElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSVGElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSSVGSVGElementTableValues, 0 };
#else
@@ -144,7 +144,7 @@ static const HashTableValue JSSVGSVGElementPrototypeTableValues[32] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSVGElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSVGElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGSVGElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp
index da7b486..4c8e140 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSSVGScriptElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGScriptElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGScriptElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGScriptElementTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGScriptElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGScriptElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGScriptElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGScriptElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp
index e54b57f..35f8787 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGSetElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSetElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSetElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGSetElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp
index 8308fcb..ea8be78 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSSVGStopElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGStopElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGStopElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGStopElementTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSSVGStopElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGStopElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGStopElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGStopElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp
index ee9cf18..1f80627 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSSVGStringListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGStringListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGStringListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGStringListTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSSVGStringListPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGStringListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGStringListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGStringListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp
index 6b9f6b7..1d7bd7a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGStyleElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGStyleElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGStyleElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGStyleElementTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSSVGStyleElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGStyleElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGStyleElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGStyleElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp
index 563c735..83b2146 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGSwitchElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSwitchElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSwitchElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGSwitchElementTableValues, 0 };
#else
@@ -88,7 +88,7 @@ static const HashTableValue JSSVGSwitchElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSwitchElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSwitchElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGSwitchElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp
index 757bfd8f..4a34e05 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp
@@ -59,7 +59,7 @@ static const HashTableValue JSSVGSymbolElementTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSymbolElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSymbolElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGSymbolElementTableValues, 0 };
#else
@@ -74,7 +74,7 @@ static const HashTableValue JSSVGSymbolElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGSymbolElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGSymbolElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGSymbolElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp
index 7abab12..8ee0f5f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSSVGTRefElementTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTRefElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTRefElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGTRefElementTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSSVGTRefElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTRefElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTRefElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGTRefElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp
index acfbd95..5203dfb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSSVGTSpanElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTSpanElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTSpanElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGTSpanElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp
index 16afd09..4208aa3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp
@@ -70,7 +70,7 @@ static const HashTableValue JSSVGTextContentElementTableValues[12] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextContentElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextContentElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGTextContentElementTableValues, 0 };
#else
@@ -87,7 +87,7 @@ static const HashTableValue JSSVGTextContentElementConstructorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextContentElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextContentElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGTextContentElementConstructorTableValues, 0 };
#else
@@ -139,7 +139,7 @@ static const HashTableValue JSSVGTextContentElementPrototypeTableValues[15] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextContentElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextContentElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGTextContentElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp
index 9ebc992..270113b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSSVGTextElementTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSSVGTextElementTableValues, 0 };
#else
@@ -67,7 +67,7 @@ static const HashTableValue JSSVGTextElementPrototypeTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGTextElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp
index ff320ca..68bcbf8 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSSVGTextPathElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextPathElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGTextPathElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGTextPathElementConstructorTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextPathElementConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGTextPathElementConstructorTableValues, 0 };
#else
@@ -112,7 +112,7 @@ static const HashTableValue JSSVGTextPathElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextPathElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGTextPathElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp
index 373d0c3..24bc336 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSSVGTextPositioningElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextPositioningElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextPositioningElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGTextPositioningElementTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSSVGTextPositioningElementPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTextPositioningElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTextPositioningElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGTextPositioningElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp
index 479cbcc..962a9f5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp
@@ -53,7 +53,7 @@ static const HashTableValue JSSVGTitleElementTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTitleElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTitleElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGTitleElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGTitleElementPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTitleElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTitleElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGTitleElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp
index cb98e9f..8f0aeb0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSSVGTransformTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTransformTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTransformTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGTransformTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGTransformConstructorTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTransformConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTransformConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGTransformConstructorTableValues, 0 };
#else
@@ -119,7 +119,7 @@ static const HashTableValue JSSVGTransformPrototypeTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTransformPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTransformPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSSVGTransformPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp
index 3232123..855efe0 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSSVGTransformListTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTransformListTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTransformListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGTransformListTableValues, 0 };
#else
@@ -69,7 +69,7 @@ static const HashTableValue JSSVGTransformListPrototypeTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGTransformListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGTransformListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSSVGTransformListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp
index 5477773..569a35a 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSSVGUnitTypesTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGUnitTypesTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGUnitTypesTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGUnitTypesTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSSVGUnitTypesConstructorTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGUnitTypesConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGUnitTypesConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGUnitTypesConstructorTableValues, 0 };
#else
@@ -99,7 +99,7 @@ static const HashTableValue JSSVGUnitTypesPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGUnitTypesPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGUnitTypesPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSSVGUnitTypesPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp
index d05bc22..f309e6d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp
@@ -78,7 +78,7 @@ static const HashTableValue JSSVGUseElementTableValues[19] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGUseElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGUseElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSSVGUseElementTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSSVGUseElementPrototypeTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGUseElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGUseElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 2047, JSSVGUseElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp
index 115ed1e..16b1ffb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSSVGViewElementTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGViewElementTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGViewElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSSVGViewElementTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSSVGViewElementPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGViewElementPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGViewElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGViewElementPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp
index 5434095..74cdb26 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSSVGZoomEventTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGZoomEventTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGZoomEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSSVGZoomEventTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSSVGZoomEventPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSSVGZoomEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSSVGZoomEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSSVGZoomEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp b/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp
index b68c308..0da8897 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp
@@ -46,7 +46,7 @@ static const HashTableValue JSScreenTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSScreenTable =
+static JSC_CONST_HASHTABLE HashTable JSScreenTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSScreenTableValues, 0 };
#else
@@ -60,7 +60,7 @@ static const HashTableValue JSScreenPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSScreenPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSScreenPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSScreenPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp b/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp
index bcdea8b..9f15644 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSStorageTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStorageTable =
+static JSC_CONST_HASHTABLE HashTable JSStorageTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSStorageTableValues, 0 };
#else
@@ -62,7 +62,7 @@ static const HashTableValue JSStorageConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStorageConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSStorageConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStorageConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSStoragePrototypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStoragePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSStoragePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSStoragePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp
index 293d0ad..42aac0e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp
@@ -54,7 +54,7 @@ static const HashTableValue JSStorageEventTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStorageEventTable =
+static JSC_CONST_HASHTABLE HashTable JSStorageEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSStorageEventTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSStorageEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStorageEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSStorageEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStorageEventConstructorTableValues, 0 };
#else
@@ -107,7 +107,7 @@ static const HashTableValue JSStorageEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStorageEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSStorageEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStorageEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp
index 04c6895..1e75a0d 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSStyleSheetTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStyleSheetTable =
+static JSC_CONST_HASHTABLE HashTable JSStyleSheetTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSStyleSheetTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSStyleSheetConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStyleSheetConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSStyleSheetConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStyleSheetConstructorTableValues, 0 };
#else
@@ -103,7 +103,7 @@ static const HashTableValue JSStyleSheetPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStyleSheetPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSStyleSheetPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStyleSheetPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp
index fccd08b..41cc305 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSStyleSheetListTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStyleSheetListTable =
+static JSC_CONST_HASHTABLE HashTable JSStyleSheetListTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSStyleSheetListTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSStyleSheetListConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStyleSheetListConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSStyleSheetListConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStyleSheetListConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSStyleSheetListPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSStyleSheetListPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSStyleSheetListPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSStyleSheetListPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSText.cpp b/src/3rdparty/webkit/WebCore/generated/JSText.cpp
index ea29d3c..8be8a89 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSText.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSText.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSTextTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextTable =
+static JSC_CONST_HASHTABLE HashTable JSTextTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSTextTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSTextConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSTextConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTextConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSTextPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSTextPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSTextPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp
index e20e411..de001cf 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp
@@ -43,7 +43,7 @@ static const HashTableValue JSTextEventTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextEventTable =
+static JSC_CONST_HASHTABLE HashTable JSTextEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSTextEventTableValues, 0 };
#else
@@ -57,7 +57,7 @@ static const HashTableValue JSTextEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSTextEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTextEventConstructorTableValues, 0 };
#else
@@ -96,7 +96,7 @@ static const HashTableValue JSTextEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSTextEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTextEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp
index 904be08..d11e8f8 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSTextMetricsTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextMetricsTable =
+static JSC_CONST_HASHTABLE HashTable JSTextMetricsTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSTextMetricsTableValues, 0 };
#else
@@ -54,7 +54,7 @@ static const HashTableValue JSTextMetricsConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextMetricsConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSTextMetricsConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTextMetricsConstructorTableValues, 0 };
#else
@@ -92,7 +92,7 @@ static const HashTableValue JSTextMetricsPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTextMetricsPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSTextMetricsPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTextMetricsPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp
index eebd8cd..fdd6278 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSTimeRangesTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTimeRangesTable =
+static JSC_CONST_HASHTABLE HashTable JSTimeRangesTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTimeRangesTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSTimeRangesPrototypeTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTimeRangesPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSTimeRangesPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 31, JSTimeRangesPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp
index da610da..b10b4cb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp
@@ -49,7 +49,7 @@ static const HashTableValue JSTreeWalkerTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTreeWalkerTable =
+static JSC_CONST_HASHTABLE HashTable JSTreeWalkerTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSTreeWalkerTableValues, 0 };
#else
@@ -63,7 +63,7 @@ static const HashTableValue JSTreeWalkerConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTreeWalkerConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSTreeWalkerConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTreeWalkerConstructorTableValues, 0 };
#else
@@ -108,7 +108,7 @@ static const HashTableValue JSTreeWalkerPrototypeTableValues[8] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSTreeWalkerPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSTreeWalkerPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSTreeWalkerPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp
index 3711f49..cdf611f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSUIEventTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSUIEventTable =
+static JSC_CONST_HASHTABLE HashTable JSUIEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSUIEventTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSUIEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSUIEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSUIEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSUIEventConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSUIEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSUIEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSUIEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSUIEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp b/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp
new file mode 100644
index 0000000..fe8ea20
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp
@@ -0,0 +1,172 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ 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 "JSValidityState.h"
+
+#include "ValidityState.h"
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+ASSERT_CLASS_FITS_IN_CELL(JSValidityState);
+
+/* Hash table */
+
+static const HashTableValue JSValidityStateTableValues[10] =
+{
+ { "valueMissing", DontDelete|ReadOnly, (intptr_t)jsValidityStateValueMissing, (intptr_t)0 },
+ { "typeMismatch", DontDelete|ReadOnly, (intptr_t)jsValidityStateTypeMismatch, (intptr_t)0 },
+ { "patternMismatch", DontDelete|ReadOnly, (intptr_t)jsValidityStatePatternMismatch, (intptr_t)0 },
+ { "tooLong", DontDelete|ReadOnly, (intptr_t)jsValidityStateTooLong, (intptr_t)0 },
+ { "rangeUnderflow", DontDelete|ReadOnly, (intptr_t)jsValidityStateRangeUnderflow, (intptr_t)0 },
+ { "rangeOverflow", DontDelete|ReadOnly, (intptr_t)jsValidityStateRangeOverflow, (intptr_t)0 },
+ { "stepMismatch", DontDelete|ReadOnly, (intptr_t)jsValidityStateStepMismatch, (intptr_t)0 },
+ { "customError", DontDelete|ReadOnly, (intptr_t)jsValidityStateCustomError, (intptr_t)0 },
+ { "valid", DontDelete|ReadOnly, (intptr_t)jsValidityStateValid, (intptr_t)0 },
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSValidityStateTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 1023, JSValidityStateTableValues, 0 };
+#else
+ { 34, 31, JSValidityStateTableValues, 0 };
+#endif
+
+/* Hash table for prototype */
+
+static const HashTableValue JSValidityStatePrototypeTableValues[1] =
+{
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSValidityStatePrototypeTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSValidityStatePrototypeTableValues, 0 };
+#else
+ { 1, 0, JSValidityStatePrototypeTableValues, 0 };
+#endif
+
+const ClassInfo JSValidityStatePrototype::s_info = { "ValidityStatePrototype", 0, &JSValidityStatePrototypeTable, 0 };
+
+JSObject* JSValidityStatePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSValidityState>(exec, globalObject);
+}
+
+const ClassInfo JSValidityState::s_info = { "ValidityState", 0, &JSValidityStateTable, 0 };
+
+JSValidityState::JSValidityState(PassRefPtr<Structure> structure, PassRefPtr<ValidityState> impl)
+ : DOMObject(structure)
+ , m_impl(impl)
+{
+}
+
+JSValidityState::~JSValidityState()
+{
+ forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get());
+}
+
+JSObject* JSValidityState::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return new (exec) JSValidityStatePrototype(JSValidityStatePrototype::createStructure(globalObject->objectPrototype()));
+}
+
+bool JSValidityState::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSValidityState, Base>(exec, &JSValidityStateTable, this, propertyName, slot);
+}
+
+JSValue jsValidityStateValueMissing(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->valueMissing());
+}
+
+JSValue jsValidityStateTypeMismatch(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->typeMismatch());
+}
+
+JSValue jsValidityStatePatternMismatch(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->patternMismatch());
+}
+
+JSValue jsValidityStateTooLong(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->tooLong());
+}
+
+JSValue jsValidityStateRangeUnderflow(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->rangeUnderflow());
+}
+
+JSValue jsValidityStateRangeOverflow(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->rangeOverflow());
+}
+
+JSValue jsValidityStateStepMismatch(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->stepMismatch());
+}
+
+JSValue jsValidityStateCustomError(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->customError());
+}
+
+JSValue jsValidityStateValid(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ UNUSED_PARAM(exec);
+ ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl());
+ return jsBoolean(imp->valid());
+}
+
+JSC::JSValue toJS(JSC::ExecState* exec, ValidityState* object)
+{
+ return getDOMObjectWrapper<JSValidityState>(exec, object);
+}
+ValidityState* toValidityState(JSC::JSValue value)
+{
+ return value.isObject(&JSValidityState::s_info) ? static_cast<JSValidityState*>(asObject(value))->impl() : 0;
+}
+
+}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSValidityState.h b/src/3rdparty/webkit/WebCore/generated/JSValidityState.h
new file mode 100644
index 0000000..a866146
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/generated/JSValidityState.h
@@ -0,0 +1,79 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef JSValidityState_h
+#define JSValidityState_h
+
+#include "JSDOMBinding.h"
+#include <runtime/JSGlobalObject.h>
+#include <runtime/ObjectPrototype.h>
+
+namespace WebCore {
+
+class ValidityState;
+
+class JSValidityState : public DOMObject {
+ typedef DOMObject Base;
+public:
+ JSValidityState(PassRefPtr<JSC::Structure>, PassRefPtr<ValidityState>);
+ virtual ~JSValidityState();
+ static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType));
+ }
+
+ ValidityState* impl() const { return m_impl.get(); }
+
+private:
+ RefPtr<ValidityState> m_impl;
+};
+
+JSC::JSValue toJS(JSC::ExecState*, ValidityState*);
+ValidityState* toValidityState(JSC::JSValue);
+
+class JSValidityStatePrototype : public JSC::JSObject {
+ typedef JSC::JSObject Base;
+public:
+ static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+ JSValidityStatePrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
+};
+
+// Attributes
+
+JSC::JSValue jsValidityStateValueMissing(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateTypeMismatch(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStatePatternMismatch(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateTooLong(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateRangeUnderflow(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateRangeOverflow(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateStepMismatch(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateCustomError(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+JSC::JSValue jsValidityStateValid(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+
+} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp
index ad9ae01..b95c440 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp
@@ -39,7 +39,7 @@ static const HashTableValue JSVoidCallbackPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSVoidCallbackPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSVoidCallbackPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSVoidCallbackPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp
index a1cb988..e8b791b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSWebKitAnimationEventTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitAnimationEventTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSWebKitAnimationEventTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSWebKitAnimationEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitAnimationEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitAnimationEventConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSWebKitAnimationEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitAnimationEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitAnimationEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp
index c07c962..a99fac6 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSWebKitCSSKeyframeRuleTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSKeyframeRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframeRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSWebKitCSSKeyframeRuleTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSWebKitCSSKeyframeRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSKeyframeRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframeRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitCSSKeyframeRuleConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSWebKitCSSKeyframeRulePrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSKeyframeRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframeRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitCSSKeyframeRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp
index 1bc7805..013622c 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSWebKitCSSKeyframesRuleTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSKeyframesRuleTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframesRuleTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSWebKitCSSKeyframesRuleTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSWebKitCSSKeyframesRuleConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSKeyframesRuleConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframesRuleConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitCSSKeyframesRuleConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSWebKitCSSKeyframesRulePrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSKeyframesRulePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframesRulePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSWebKitCSSKeyframesRulePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp
index 8b28647..9c1436b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp
@@ -64,7 +64,7 @@ static const HashTableValue JSWebKitCSSMatrixTableValues[23] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSMatrixTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSMatrixTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 255, JSWebKitCSSMatrixTableValues, 0 };
#else
@@ -86,7 +86,7 @@ static const HashTableValue JSWebKitCSSMatrixPrototypeTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSMatrixPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSMatrixPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSWebKitCSSMatrixPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp
index 37f1563..59a4650 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSWebKitCSSTransformValueTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSTransformValueTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValueTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSWebKitCSSTransformValueTableValues, 0 };
#else
@@ -75,7 +75,7 @@ static const HashTableValue JSWebKitCSSTransformValueConstructorTableValues[22]
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSTransformValueConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValueConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSWebKitCSSTransformValueConstructorTableValues, 0 };
#else
@@ -134,7 +134,7 @@ static const HashTableValue JSWebKitCSSTransformValuePrototypeTableValues[22] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitCSSTransformValuePrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValuePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSWebKitCSSTransformValuePrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp
index b954f24..ced49fb 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp
@@ -40,7 +40,7 @@ static const HashTableValue JSWebKitPointTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitPointTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitPointTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSWebKitPointTableValues, 0 };
#else
@@ -54,7 +54,7 @@ static const HashTableValue JSWebKitPointPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitPointPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitPointPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitPointPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp
index 3ca4c82..75e4de7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp
@@ -44,7 +44,7 @@ static const HashTableValue JSWebKitTransitionEventTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitTransitionEventTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitTransitionEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 7, JSWebKitTransitionEventTableValues, 0 };
#else
@@ -58,7 +58,7 @@ static const HashTableValue JSWebKitTransitionEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitTransitionEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitTransitionEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitTransitionEventConstructorTableValues, 0 };
#else
@@ -97,7 +97,7 @@ static const HashTableValue JSWebKitTransitionEventPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWebKitTransitionEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWebKitTransitionEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWebKitTransitionEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp
index e56513d..1a47e6f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp
@@ -54,7 +54,7 @@ static const HashTableValue JSWheelEventTableValues[17] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWheelEventTable =
+static JSC_CONST_HASHTABLE HashTable JSWheelEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSWheelEventTableValues, 0 };
#else
@@ -68,7 +68,7 @@ static const HashTableValue JSWheelEventConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWheelEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWheelEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWheelEventConstructorTableValues, 0 };
#else
@@ -106,7 +106,7 @@ static const HashTableValue JSWheelEventPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWheelEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWheelEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWheelEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp
index 4c4f8a0..979f43b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp
@@ -30,6 +30,7 @@
#include "JSDOMGlobalObject.h"
#include "JSEvent.h"
#include "JSEventListener.h"
+#include "JSMessagePort.h"
#include "Worker.h"
#include <runtime/Error.h>
#include <wtf/GetPtr.h>
@@ -49,7 +50,7 @@ static const HashTableValue JSWorkerTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSWorkerTableValues, 0 };
#else
@@ -60,7 +61,7 @@ static const HashTable JSWorkerTable =
static const HashTableValue JSWorkerPrototypeTableValues[6] =
{
- { "postMessage", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionPostMessage, (intptr_t)1 },
+ { "postMessage", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionPostMessage, (intptr_t)2 },
{ "terminate", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionTerminate, (intptr_t)0 },
{ "addEventListener", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionAddEventListener, (intptr_t)3 },
{ "removeEventListener", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionRemoveEventListener, (intptr_t)3 },
@@ -68,7 +69,7 @@ static const HashTableValue JSWorkerPrototypeTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSWorkerPrototypeTableValues, 0 };
#else
@@ -164,9 +165,20 @@ JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionPostMessage(ExecState* exec, JSOb
return throwError(exec, TypeError);
JSWorker* castedThisObj = static_cast<JSWorker*>(asObject(thisValue));
Worker* imp = static_cast<Worker*>(castedThisObj->impl());
+ ExceptionCode ec = 0;
const UString& message = args.at(0).toString(exec);
- imp->postMessage(message);
+ int argsCount = args.size();
+ if (argsCount < 2) {
+ imp->postMessage(message, ec);
+ setDOMException(exec, ec);
+ return jsUndefined();
+ }
+
+ MessagePort* messagePort = toMessagePort(args.at(1));
+
+ imp->postMessage(message, messagePort, ec);
+ setDOMException(exec, ec);
return jsUndefined();
}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp
index cf2e02d..cf46141 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp
@@ -28,7 +28,9 @@
#include "EventListener.h"
#include "JSEvent.h"
#include "JSEventListener.h"
+#include "JSMessageChannel.h"
#include "JSMessageEvent.h"
+#include "JSMessagePort.h"
#include "JSWorkerContext.h"
#include "JSWorkerLocation.h"
#include "JSWorkerNavigator.h"
@@ -47,7 +49,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSWorkerContext);
/* Hash table */
-static const HashTableValue JSWorkerContextTableValues[8] =
+static const HashTableValue JSWorkerContextTableValues[9] =
{
{ "self", DontDelete, (intptr_t)jsWorkerContextSelf, (intptr_t)setJSWorkerContextSelf },
{ "location", DontDelete, (intptr_t)jsWorkerContextLocation, (intptr_t)setJSWorkerContextLocation },
@@ -55,11 +57,12 @@ static const HashTableValue JSWorkerContextTableValues[8] =
{ "onmessage", DontDelete, (intptr_t)jsWorkerContextOnmessage, (intptr_t)setJSWorkerContextOnmessage },
{ "MessageEvent", DontDelete, (intptr_t)jsWorkerContextMessageEventConstructor, (intptr_t)setJSWorkerContextMessageEventConstructor },
{ "WorkerLocation", DontDelete, (intptr_t)jsWorkerContextWorkerLocationConstructor, (intptr_t)setJSWorkerContextWorkerLocationConstructor },
+ { "MessageChannel", DontDelete, (intptr_t)jsWorkerContextMessageChannelConstructor, (intptr_t)setJSWorkerContextMessageChannelConstructor },
{ "XMLHttpRequest", DontDelete, (intptr_t)jsWorkerContextXMLHttpRequestConstructor, (intptr_t)setJSWorkerContextXMLHttpRequestConstructor },
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerContextTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerContextTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSWorkerContextTableValues, 0 };
#else
@@ -72,7 +75,7 @@ static const HashTableValue JSWorkerContextPrototypeTableValues[11] =
{
{ "close", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionClose, (intptr_t)0 },
{ "importScripts", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionImportScripts, (intptr_t)0 },
- { "postMessage", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionPostMessage, (intptr_t)1 },
+ { "postMessage", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionPostMessage, (intptr_t)2 },
{ "setTimeout", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionSetTimeout, (intptr_t)2 },
{ "clearTimeout", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionClearTimeout, (intptr_t)1 },
{ "setInterval", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionSetInterval, (intptr_t)2 },
@@ -83,7 +86,7 @@ static const HashTableValue JSWorkerContextPrototypeTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerContextPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerContextPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSWorkerContextPrototypeTableValues, 0 };
#else
@@ -168,6 +171,11 @@ JSValue jsWorkerContextWorkerLocationConstructor(ExecState* exec, const Identifi
return JSWorkerLocation::getConstructor(exec);
}
+JSValue jsWorkerContextMessageChannelConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
+{
+ return static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->messageChannel(exec);
+}
+
JSValue jsWorkerContextXMLHttpRequestConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
return static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->xmlHttpRequest(exec);
@@ -216,6 +224,12 @@ void setJSWorkerContextWorkerLocationConstructor(ExecState* exec, JSObject* this
static_cast<JSWorkerContext*>(thisObject)->putDirect(Identifier(exec, "WorkerLocation"), value);
}
+void setJSWorkerContextMessageChannelConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ // Shadowing a built-in constructor
+ static_cast<JSWorkerContext*>(thisObject)->putDirect(Identifier(exec, "MessageChannel"), value);
+}
+
void setJSWorkerContextXMLHttpRequestConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
{
// Shadowing a built-in constructor
@@ -250,9 +264,20 @@ JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionPostMessage(ExecState* exe
return throwError(exec, TypeError);
JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue));
WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl());
+ ExceptionCode ec = 0;
const UString& message = args.at(0).toString(exec);
- imp->postMessage(message);
+ int argsCount = args.size();
+ if (argsCount < 2) {
+ imp->postMessage(message, ec);
+ setDOMException(exec, ec);
+ return jsUndefined();
+ }
+
+ MessagePort* messagePort = toMessagePort(args.at(1));
+
+ imp->postMessage(message, messagePort, ec);
+ setDOMException(exec, ec);
return jsUndefined();
}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h
index c522808..7453f27 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h
@@ -48,6 +48,7 @@ public:
// Custom attributes
+ JSC::JSValue messageChannel(JSC::ExecState*) const;
JSC::JSValue xmlHttpRequest(JSC::ExecState*) const;
// Custom functions
@@ -99,6 +100,8 @@ JSC::JSValue jsWorkerContextMessageEventConstructor(JSC::ExecState*, const JSC::
void setJSWorkerContextMessageEventConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsWorkerContextWorkerLocationConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSWorkerContextWorkerLocationConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsWorkerContextMessageChannelConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
+void setJSWorkerContextMessageChannelConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsWorkerContextXMLHttpRequestConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSWorkerContextXMLHttpRequestConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp
index 7960f9a..d29c219 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp
@@ -52,7 +52,7 @@ static const HashTableValue JSWorkerLocationTableValues[10] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerLocationTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerLocationTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSWorkerLocationTableValues, 0 };
#else
@@ -66,7 +66,7 @@ static const HashTableValue JSWorkerLocationConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerLocationConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerLocationConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWorkerLocationConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSWorkerLocationPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerLocationPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerLocationPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWorkerLocationPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp
index 457f163..76da8f1 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp
@@ -47,7 +47,7 @@ static const HashTableValue JSWorkerNavigatorTableValues[6] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerNavigatorTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerNavigatorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 511, JSWorkerNavigatorTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSWorkerNavigatorPrototypeTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSWorkerNavigatorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSWorkerNavigatorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSWorkerNavigatorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp
index 1677954..ebd723e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp
@@ -64,7 +64,7 @@ static const HashTableValue JSXMLHttpRequestTableValues[14] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSXMLHttpRequestTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSXMLHttpRequestPrototypeTableValues[16] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSXMLHttpRequestPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp
index 34a5444..3820567 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSXMLHttpRequestExceptionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestExceptionTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestExceptionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSXMLHttpRequestExceptionTableValues, 0 };
#else
@@ -61,7 +61,7 @@ static const HashTableValue JSXMLHttpRequestExceptionConstructorTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestExceptionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestExceptionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1, JSXMLHttpRequestExceptionConstructorTableValues, 0 };
#else
@@ -102,7 +102,7 @@ static const HashTableValue JSXMLHttpRequestExceptionPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestExceptionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestExceptionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSXMLHttpRequestExceptionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp
index 4882570..d1a5324 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp
@@ -41,7 +41,7 @@ static const HashTableValue JSXMLHttpRequestProgressEventTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestProgressEventTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSXMLHttpRequestProgressEventTableValues, 0 };
#else
@@ -55,7 +55,7 @@ static const HashTableValue JSXMLHttpRequestProgressEventConstructorTableValues[
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestProgressEventConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 };
#else
@@ -93,7 +93,7 @@ static const HashTableValue JSXMLHttpRequestProgressEventPrototypeTableValues[1]
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestProgressEventPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXMLHttpRequestProgressEventPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp
index 34942b0..ad482ce 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp
@@ -50,7 +50,7 @@ static const HashTableValue JSXMLHttpRequestUploadTableValues[7] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestUploadTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestUploadTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 15, JSXMLHttpRequestUploadTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSXMLHttpRequestUploadConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestUploadConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestUploadConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXMLHttpRequestUploadConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSXMLHttpRequestUploadPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLHttpRequestUploadPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestUploadPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSXMLHttpRequestUploadPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp
index 211f027..8c803b5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp
@@ -42,7 +42,7 @@ static const HashTableValue JSXMLSerializerTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLSerializerTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLSerializerTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXMLSerializerTableValues, 0 };
#else
@@ -56,7 +56,7 @@ static const HashTableValue JSXMLSerializerConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLSerializerConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLSerializerConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXMLSerializerConstructorTableValues, 0 };
#else
@@ -104,7 +104,7 @@ static const HashTableValue JSXMLSerializerPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXMLSerializerPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXMLSerializerPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXMLSerializerPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp
index 6103329..7570bc4 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp
@@ -51,7 +51,7 @@ static const HashTableValue JSXPathEvaluatorTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathEvaluatorTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathEvaluatorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXPathEvaluatorTableValues, 0 };
#else
@@ -65,7 +65,7 @@ static const HashTableValue JSXPathEvaluatorConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathEvaluatorConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathEvaluatorConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXPathEvaluatorConstructorTableValues, 0 };
#else
@@ -115,7 +115,7 @@ static const HashTableValue JSXPathEvaluatorPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathEvaluatorPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathEvaluatorPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSXPathEvaluatorPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp
index 82518b1..8ac6eb3 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp
@@ -48,7 +48,7 @@ static const HashTableValue JSXPathExceptionTableValues[5] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathExceptionTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathExceptionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSXPathExceptionTableValues, 0 };
#else
@@ -64,7 +64,7 @@ static const HashTableValue JSXPathExceptionConstructorTableValues[3] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathExceptionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathExceptionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSXPathExceptionConstructorTableValues, 0 };
#else
@@ -105,7 +105,7 @@ static const HashTableValue JSXPathExceptionPrototypeTableValues[4] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathExceptionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathExceptionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 3, JSXPathExceptionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp
index fd945fe..2bfaae5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSXPathExpressionTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathExpressionTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathExpressionTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXPathExpressionTableValues, 0 };
#else
@@ -59,7 +59,7 @@ static const HashTableValue JSXPathExpressionConstructorTableValues[1] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathExpressionConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathExpressionConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXPathExpressionConstructorTableValues, 0 };
#else
@@ -98,7 +98,7 @@ static const HashTableValue JSXPathExpressionPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathExpressionPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathExpressionPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXPathExpressionPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp
index 550c85e..7136752 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp
@@ -45,7 +45,7 @@ static const HashTableValue JSXPathNSResolverPrototypeTableValues[2] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathNSResolverPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathNSResolverPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSXPathNSResolverPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp
index cecdf90..118325b 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp
@@ -54,7 +54,7 @@ static const HashTableValue JSXPathResultTableValues[9] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathResultTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathResultTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 63, JSXPathResultTableValues, 0 };
#else
@@ -78,7 +78,7 @@ static const HashTableValue JSXPathResultConstructorTableValues[11] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathResultConstructorTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathResultConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSXPathResultConstructorTableValues, 0 };
#else
@@ -128,7 +128,7 @@ static const HashTableValue JSXPathResultPrototypeTableValues[13] =
{ 0, 0, 0, 0 }
};
-static const HashTable JSXPathResultPrototypeTable =
+static JSC_CONST_HASHTABLE HashTable JSXPathResultPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSXPathResultPrototypeTableValues, 0 };
#else
diff --git a/src/3rdparty/webkit/WebCore/generated/Lexer.lut.h b/src/3rdparty/webkit/WebCore/generated/Lexer.lut.h
index 4c46e07..2cf7617 100644
--- a/src/3rdparty/webkit/WebCore/generated/Lexer.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/Lexer.lut.h
@@ -44,6 +44,6 @@ static const struct HashTableValue mainTableValues[37] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable mainTable =
+extern JSC_CONST_HASHTABLE HashTable mainTable =
{ 133, 127, mainTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/MathObject.lut.h b/src/3rdparty/webkit/WebCore/generated/MathObject.lut.h
index c8359c1..ce76857 100644
--- a/src/3rdparty/webkit/WebCore/generated/MathObject.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/MathObject.lut.h
@@ -26,6 +26,6 @@ static const struct HashTableValue mathTableValues[19] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable mathTable =
+extern JSC_CONST_HASHTABLE HashTable mathTable =
{ 67, 63, mathTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h b/src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h
index 6879c03..d1155ae 100644
--- a/src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h
@@ -13,6 +13,6 @@ static const struct HashTableValue numberTableValues[6] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable numberTable =
+extern JSC_CONST_HASHTABLE HashTable numberTable =
{ 16, 15, numberTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h b/src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h
index 0bdf10c..eea201c 100644
--- a/src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h
@@ -29,6 +29,6 @@ static const struct HashTableValue regExpConstructorTableValues[22] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable regExpConstructorTable =
+extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable =
{ 65, 63, regExpConstructorTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h b/src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h
index 69a745d..146aec0 100644
--- a/src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h
@@ -13,6 +13,6 @@ static const struct HashTableValue regExpTableValues[6] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable regExpTable =
+extern JSC_CONST_HASHTABLE HashTable regExpTable =
{ 17, 15, regExpTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h b/src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h
index aa044fa..bbbd75e 100644
--- a/src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h
+++ b/src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h
@@ -40,6 +40,6 @@ static const struct HashTableValue stringTableValues[33] = {
{ 0, 0, 0, 0 }
};
-extern const struct HashTable stringTable =
+extern JSC_CONST_HASHTABLE HashTable stringTable =
{ 71, 63, stringTableValues, 0 };
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h
index 6c53189..1ccfa4a 100644
--- a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h
+++ b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h
@@ -1,8 +1,8 @@
namespace WebCore {
-extern const char html4UserAgentStyleSheet[8585];
+extern const char htmlUserAgentStyleSheet[8502];
extern const char quirksUserAgentStyleSheet[359];
extern const char svgUserAgentStyleSheet[358];
extern const char sourceUserAgentStyleSheet[2004];
extern const char wmlUserAgentStyleSheet[2956];
-extern const char mediaControlsUserAgentStyleSheet[1999];
+extern const char mediaControlsUserAgentStyleSheet[2346];
}
diff --git a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp
index efc6b9a..a6915e6 100644
--- a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp
@@ -1,5 +1,5 @@
namespace WebCore {
-extern const char html4UserAgentStyleSheet[8585] = {
+extern const char htmlUserAgentStyleSheet[8502] = {
110, 97, 109, 101, 115, 112, 97, 99, 101, 32, 34, 104, 116, 116, 112, 58,
47, 47, 119, 119, 119, 46, 119, 51, 46, 111, 114, 103, 47, 49, 57, 57,
57, 47, 120, 104, 116, 109, 108, 34, 59, 32, 104, 116, 109, 108, 32, 123,
@@ -531,12 +531,7 @@ extern const char html4UserAgentStyleSheet[8585] = {
123, 32, 98, 111, 114, 100, 101, 114, 45, 99, 111, 108, 111, 114, 58, 32,
105, 110, 104, 101, 114, 105, 116, 32, 125, 32, 105, 102, 114, 97, 109, 101,
32, 123, 32, 98, 111, 114, 100, 101, 114, 58, 32, 50, 112, 120, 32, 105,
- 110, 115, 101, 116, 32, 125, 32, 105, 109, 103, 44, 32, 105, 110, 112, 117,
- 116, 91, 116, 121, 112, 101, 61, 105, 109, 97, 103, 101, 93, 44, 32, 118,
- 105, 100, 101, 111, 44, 32, 105, 102, 114, 97, 109, 101, 44, 32, 111, 98,
- 106, 101, 99, 116, 44, 32, 101, 109, 98, 101, 100, 44, 32, 97, 112, 112,
- 108, 101, 116, 32, 123, 32, 111, 118, 101, 114, 102, 108, 111, 119, 58, 32,
- 104, 105, 100, 100, 101, 110, 59, 32, 125
+ 110, 115, 101, 116, 32, 125
};
extern const char quirksUserAgentStyleSheet[359] = {
105, 109, 103, 91, 97, 108, 105, 103, 110, 61, 34, 108, 101, 102, 116, 34,
@@ -903,7 +898,7 @@ extern const char wmlUserAgentStyleSheet[2956] = {
32, 99, 111, 108, 111, 114, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45,
97, 99, 116, 105, 118, 101, 108, 105, 110, 107, 32, 125
};
-extern const char mediaControlsUserAgentStyleSheet[1999] = {
+extern const char mediaControlsUserAgentStyleSheet[2346] = {
97, 117, 100, 105, 111, 32, 123, 32, 119, 105, 100, 116, 104, 58, 32, 50,
48, 48, 112, 120, 59, 32, 104, 101, 105, 103, 104, 116, 58, 32, 49, 54,
112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119, 101,
@@ -914,120 +909,142 @@ extern const char mediaControlsUserAgentStyleSheet[1999] = {
32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 45, 119, 101, 98, 107, 105,
116, 45, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98,
111, 120, 45, 111, 114, 105, 101, 110, 116, 58, 32, 104, 111, 114, 105, 122,
- 111, 110, 116, 97, 108, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 117,
- 115, 101, 114, 45, 115, 101, 108, 101, 99, 116, 58, 32, 110, 111, 110, 101,
- 59, 32, 112, 111, 115, 105, 116, 105, 111, 110, 58, 32, 97, 98, 115, 111,
- 108, 117, 116, 101, 59, 32, 98, 111, 116, 116, 111, 109, 58, 32, 48, 59,
- 32, 119, 105, 100, 116, 104, 58, 32, 49, 48, 48, 37, 59, 32, 122, 45,
- 105, 110, 100, 101, 120, 58, 32, 48, 59, 32, 111, 118, 101, 114, 102, 108,
- 111, 119, 58, 32, 104, 105, 100, 100, 101, 110, 59, 32, 104, 101, 105, 103,
- 104, 116, 58, 32, 49, 54, 112, 120, 59, 32, 116, 101, 120, 116, 45, 97,
- 108, 105, 103, 110, 58, 32, 114, 105, 103, 104, 116, 59, 32, 125, 32, 118,
- 105, 100, 101, 111, 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, 117, 108,
- 108, 45, 112, 97, 103, 101, 45, 109, 101, 100, 105, 97, 58, 58, 45, 119,
- 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116,
- 114, 111, 108, 115, 45, 112, 97, 110, 101, 108, 32, 123, 32, 98, 111, 116,
- 116, 111, 109, 58, 32, 45, 49, 54, 112, 120, 59, 32, 125, 32, 97, 117,
- 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100,
- 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 109, 117, 116, 101,
- 45, 98, 117, 116, 116, 111, 110, 44, 32, 118, 105, 100, 101, 111, 58, 58,
+ 111, 110, 116, 97, 108, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98,
+ 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 99, 101, 110, 116, 101, 114,
+ 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 117, 115, 101, 114, 45, 115,
+ 101, 108, 101, 99, 116, 58, 32, 110, 111, 110, 101, 59, 32, 112, 111, 115,
+ 105, 116, 105, 111, 110, 58, 32, 97, 98, 115, 111, 108, 117, 116, 101, 59,
+ 32, 98, 111, 116, 116, 111, 109, 58, 32, 48, 59, 32, 119, 105, 100, 116,
+ 104, 58, 32, 49, 48, 48, 37, 59, 32, 122, 45, 105, 110, 100, 101, 120,
+ 58, 32, 48, 59, 32, 111, 118, 101, 114, 102, 108, 111, 119, 58, 32, 104,
+ 105, 100, 100, 101, 110, 59, 32, 104, 101, 105, 103, 104, 116, 58, 32, 49,
+ 54, 112, 120, 59, 32, 116, 101, 120, 116, 45, 97, 108, 105, 103, 110, 58,
+ 32, 114, 105, 103, 104, 116, 59, 32, 125, 32, 118, 105, 100, 101, 111, 58,
+ 45, 119, 101, 98, 107, 105, 116, 45, 102, 117, 108, 108, 45, 112, 97, 103,
+ 101, 45, 109, 101, 100, 105, 97, 58, 58, 45, 119, 101, 98, 107, 105, 116,
+ 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45,
+ 112, 97, 110, 101, 108, 32, 123, 32, 98, 111, 116, 116, 111, 109, 58, 32,
+ 45, 49, 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58, 58,
45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111,
110, 116, 114, 111, 108, 115, 45, 109, 117, 116, 101, 45, 98, 117, 116, 116,
- 111, 110, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112,
- 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 109,
- 117, 116, 101, 45, 98, 117, 116, 116, 111, 110, 59, 32, 100, 105, 115, 112,
+ 111, 110, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119, 101, 98, 107,
+ 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108,
+ 115, 45, 109, 117, 116, 101, 45, 98, 117, 116, 116, 111, 110, 32, 123, 32,
+ 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110,
+ 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 109, 117, 116, 101, 45, 98,
+ 117, 116, 116, 111, 110, 59, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32,
+ 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 59, 32, 119, 105, 100,
+ 116, 104, 58, 32, 49, 54, 112, 120, 59, 32, 104, 101, 105, 103, 104, 116,
+ 58, 32, 49, 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58,
+ 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99,
+ 111, 110, 116, 114, 111, 108, 115, 45, 112, 108, 97, 121, 45, 98, 117, 116,
+ 116, 111, 110, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119, 101, 98,
+ 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111,
+ 108, 115, 45, 112, 108, 97, 121, 45, 98, 117, 116, 116, 111, 110, 32, 123,
+ 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97,
+ 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 112, 108, 97, 121, 45,
+ 98, 117, 116, 116, 111, 110, 59, 32, 100, 105, 115, 112, 108, 97, 121, 58,
+ 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 59, 32, 119, 105,
+ 100, 116, 104, 58, 32, 49, 54, 112, 120, 59, 32, 104, 101, 105, 103, 104,
+ 116, 58, 32, 49, 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111,
+ 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45,
+ 99, 111, 110, 116, 114, 111, 108, 115, 45, 116, 105, 109, 101, 108, 105, 110,
+ 101, 45, 99, 111, 110, 116, 97, 105, 110, 101, 114, 44, 32, 118, 105, 100,
+ 101, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105,
+ 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 116, 105, 109, 101, 108,
+ 105, 110, 101, 45, 99, 111, 110, 116, 97, 105, 110, 101, 114, 32, 123, 32,
+ 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110,
+ 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111,
+ 108, 115, 45, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, 59, 32, 100,
+ 105, 115, 112, 108, 97, 121, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45,
+ 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120,
+ 45, 111, 114, 105, 101, 110, 116, 58, 32, 104, 111, 114, 105, 122, 111, 110,
+ 116, 97, 108, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120,
+ 45, 97, 108, 105, 103, 110, 58, 32, 99, 101, 110, 116, 101, 114, 59, 32,
+ 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, 112, 97, 99, 107,
+ 58, 32, 101, 110, 100, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98,
+ 111, 120, 45, 102, 108, 101, 120, 58, 32, 49, 59, 32, 45, 119, 101, 98,
+ 107, 105, 116, 45, 117, 115, 101, 114, 45, 115, 101, 108, 101, 99, 116, 58,
+ 32, 110, 111, 110, 101, 59, 32, 104, 101, 105, 103, 104, 116, 58, 32, 49,
+ 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119,
+ 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116,
+ 114, 111, 108, 115, 45, 99, 117, 114, 114, 101, 110, 116, 45, 116, 105, 109,
+ 101, 45, 100, 105, 115, 112, 108, 97, 121, 44, 32, 118, 105, 100, 101, 111,
+ 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45,
+ 99, 111, 110, 116, 114, 111, 108, 115, 45, 99, 117, 114, 114, 101, 110, 116,
+ 45, 116, 105, 109, 101, 45, 100, 105, 115, 112, 108, 97, 121, 32, 123, 32,
+ 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, 101, 59, 32, 125,
+ 32, 97, 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45,
+ 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 116,
+ 105, 109, 101, 45, 114, 101, 109, 97, 105, 110, 105, 110, 103, 45, 100, 105,
+ 115, 112, 108, 97, 121, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119,
+ 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116,
+ 114, 111, 108, 115, 45, 116, 105, 109, 101, 45, 114, 101, 109, 97, 105, 110,
+ 105, 110, 103, 45, 100, 105, 115, 112, 108, 97, 121, 32, 123, 32, 100, 105,
+ 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, 101, 59, 32, 125, 32, 97,
+ 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101,
+ 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 116, 105, 109,
+ 101, 108, 105, 110, 101, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119,
+ 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116,
+ 114, 111, 108, 115, 45, 116, 105, 109, 101, 108, 105, 110, 101, 32, 123, 32,
+ 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110,
+ 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 115, 108, 105, 100, 101, 114,
+ 59, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 45, 119, 101, 98, 107,
+ 105, 116, 45, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45,
+ 98, 111, 120, 45, 102, 108, 101, 120, 58, 32, 49, 59, 32, 104, 101, 105,
+ 103, 104, 116, 58, 32, 49, 54, 112, 120, 59, 32, 112, 97, 100, 100, 105,
+ 110, 103, 58, 32, 48, 112, 120, 32, 50, 112, 120, 59, 32, 125, 32, 97,
+ 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101,
+ 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 115, 101, 101,
+ 107, 45, 98, 97, 99, 107, 45, 98, 117, 116, 116, 111, 110, 44, 32, 118,
+ 105, 100, 101, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101,
+ 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 115, 101, 101,
+ 107, 45, 98, 97, 99, 107, 45, 98, 117, 116, 116, 111, 110, 32, 123, 32,
+ 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110,
+ 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 115, 101, 101, 107, 45, 98,
+ 97, 99, 107, 45, 98, 117, 116, 116, 111, 110, 59, 32, 100, 105, 115, 112,
108, 97, 121, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120,
59, 32, 119, 105, 100, 116, 104, 58, 32, 49, 54, 112, 120, 59, 32, 104,
101, 105, 103, 104, 116, 58, 32, 49, 54, 112, 120, 59, 32, 125, 32, 97,
117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101,
- 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 112, 108, 97,
- 121, 45, 98, 117, 116, 116, 111, 110, 44, 32, 118, 105, 100, 101, 111, 58,
- 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99,
- 111, 110, 116, 114, 111, 108, 115, 45, 112, 108, 97, 121, 45, 98, 117, 116,
- 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112,
- 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45,
- 112, 108, 97, 121, 45, 98, 117, 116, 116, 111, 110, 59, 32, 100, 105, 115,
- 112, 108, 97, 121, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111,
- 120, 59, 32, 119, 105, 100, 116, 104, 58, 32, 49, 54, 112, 120, 59, 32,
- 104, 101, 105, 103, 104, 116, 58, 32, 49, 54, 112, 120, 59, 32, 125, 32,
- 97, 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109,
- 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 116, 105,
- 109, 101, 108, 105, 110, 101, 45, 99, 111, 110, 116, 97, 105, 110, 101, 114,
+ 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 115, 101, 101,
+ 107, 45, 102, 111, 114, 119, 97, 114, 100, 45, 98, 117, 116, 116, 111, 110,
44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116,
45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45,
- 116, 105, 109, 101, 108, 105, 110, 101, 45, 99, 111, 110, 116, 97, 105, 110,
- 101, 114, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112,
- 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 116,
- 105, 109, 101, 108, 105, 110, 101, 45, 99, 111, 110, 116, 97, 105, 110, 101,
- 114, 59, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 45, 119, 101, 98,
- 107, 105, 116, 45, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, 116,
- 45, 98, 111, 120, 45, 111, 114, 105, 101, 110, 116, 58, 32, 104, 111, 114,
- 105, 122, 111, 110, 116, 97, 108, 59, 32, 45, 119, 101, 98, 107, 105, 116,
- 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 99, 101, 110, 116,
- 101, 114, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45,
- 112, 97, 99, 107, 58, 32, 101, 110, 100, 59, 32, 45, 119, 101, 98, 107,
- 105, 116, 45, 98, 111, 120, 45, 102, 108, 101, 120, 58, 32, 49, 59, 32,
- 45, 119, 101, 98, 107, 105, 116, 45, 117, 115, 101, 114, 45, 115, 101, 108,
- 101, 99, 116, 58, 32, 110, 111, 110, 101, 59, 32, 104, 101, 105, 103, 104,
+ 115, 101, 101, 107, 45, 102, 111, 114, 119, 97, 114, 100, 45, 98, 117, 116,
+ 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112,
+ 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45,
+ 115, 101, 101, 107, 45, 102, 111, 114, 119, 97, 114, 100, 45, 98, 117, 116,
+ 116, 111, 110, 59, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 45, 119,
+ 101, 98, 107, 105, 116, 45, 98, 111, 120, 59, 32, 119, 105, 100, 116, 104,
+ 58, 32, 49, 54, 112, 120, 59, 32, 104, 101, 105, 103, 104, 116, 58, 32,
+ 49, 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45,
+ 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110,
+ 116, 114, 111, 108, 115, 45, 102, 117, 108, 108, 115, 99, 114, 101, 101, 110,
+ 45, 98, 117, 116, 116, 111, 110, 44, 32, 118, 105, 100, 101, 111, 58, 58,
+ 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111,
+ 110, 116, 114, 111, 108, 115, 45, 102, 117, 108, 108, 115, 99, 114, 101, 101,
+ 110, 45, 98, 117, 116, 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, 107,
+ 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 109,
+ 101, 100, 105, 97, 45, 102, 117, 108, 108, 115, 99, 114, 101, 101, 110, 45,
+ 98, 117, 116, 116, 111, 110, 59, 32, 100, 105, 115, 112, 108, 97, 121, 58,
+ 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 59, 32, 119, 105,
+ 100, 116, 104, 58, 32, 49, 54, 112, 120, 59, 32, 104, 101, 105, 103, 104,
116, 58, 32, 49, 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105, 111,
58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45,
- 99, 111, 110, 116, 114, 111, 108, 115, 45, 99, 117, 114, 114, 101, 110, 116,
- 45, 116, 105, 109, 101, 45, 100, 105, 115, 112, 108, 97, 121, 44, 32, 118,
- 105, 100, 101, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101,
- 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 99, 117, 114,
- 114, 101, 110, 116, 45, 116, 105, 109, 101, 45, 100, 105, 115, 112, 108, 97,
- 121, 32, 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110,
- 101, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119, 101, 98,
- 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111,
- 108, 115, 45, 116, 105, 109, 101, 45, 114, 101, 109, 97, 105, 110, 105, 110,
- 103, 45, 100, 105, 115, 112, 108, 97, 121, 44, 32, 118, 105, 100, 101, 111,
- 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45,
- 99, 111, 110, 116, 114, 111, 108, 115, 45, 116, 105, 109, 101, 45, 114, 101,
- 109, 97, 105, 110, 105, 110, 103, 45, 100, 105, 115, 112, 108, 97, 121, 32,
- 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, 101, 59,
- 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105,
- 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115,
- 45, 116, 105, 109, 101, 108, 105, 110, 101, 44, 32, 118, 105, 100, 101, 111,
- 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45,
- 99, 111, 110, 116, 114, 111, 108, 115, 45, 116, 105, 109, 101, 108, 105, 110,
- 101, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101,
- 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 115, 108,
- 105, 100, 101, 114, 59, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 45,
- 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 59, 32, 45, 119, 101, 98,
- 107, 105, 116, 45, 98, 111, 120, 45, 102, 108, 101, 120, 58, 32, 49, 59,
- 32, 104, 101, 105, 103, 104, 116, 58, 32, 49, 54, 112, 120, 59, 32, 112,
- 97, 100, 100, 105, 110, 103, 58, 32, 48, 112, 120, 32, 50, 112, 120, 59,
- 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105,
- 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115,
- 45, 115, 101, 101, 107, 45, 98, 97, 99, 107, 45, 98, 117, 116, 116, 111,
- 110, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119, 101, 98, 107, 105,
- 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115,
- 45, 115, 101, 101, 107, 45, 98, 97, 99, 107, 45, 98, 117, 116, 116, 111,
- 110, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101,
- 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 100, 105, 97, 45, 115, 101,
- 101, 107, 45, 98, 97, 99, 107, 45, 98, 117, 116, 116, 111, 110, 59, 32,
- 100, 105, 115, 112, 108, 97, 121, 58, 32, 45, 119, 101, 98, 107, 105, 116,
- 45, 98, 111, 120, 59, 32, 119, 105, 100, 116, 104, 58, 32, 49, 54, 112,
- 120, 59, 32, 104, 101, 105, 103, 104, 116, 58, 32, 49, 54, 112, 120, 59,
- 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119, 101, 98, 107, 105,
- 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115,
- 45, 115, 101, 101, 107, 45, 102, 111, 114, 119, 97, 114, 100, 45, 98, 117,
- 116, 116, 111, 110, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45, 119, 101,
- 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116, 114,
- 111, 108, 115, 45, 115, 101, 101, 107, 45, 102, 111, 114, 119, 97, 114, 100,
- 45, 98, 117, 116, 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, 107, 105,
- 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101,
- 100, 105, 97, 45, 115, 101, 101, 107, 45, 102, 111, 114, 119, 97, 114, 100,
- 45, 98, 117, 116, 116, 111, 110, 59, 32, 100, 105, 115, 112, 108, 97, 121,
- 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 59, 32, 119,
- 105, 100, 116, 104, 58, 32, 49, 54, 112, 120, 59, 32, 104, 101, 105, 103,
- 104, 116, 58, 32, 49, 54, 112, 120, 59, 32, 125, 32, 97, 117, 100, 105,
- 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97,
- 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 102, 117, 108, 108, 115, 99,
- 114, 101, 101, 110, 45, 98, 117, 116, 116, 111, 110, 44, 32, 118, 105, 100,
- 101, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105,
- 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 102, 117, 108, 108, 115,
- 99, 114, 101, 101, 110, 45, 98, 117, 116, 116, 111, 110, 32, 123, 32, 100,
- 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, 101, 59, 32, 125
+ 99, 111, 110, 116, 114, 111, 108, 115, 45, 114, 101, 119, 105, 110, 100, 45,
+ 98, 117, 116, 116, 111, 110, 44, 32, 118, 105, 100, 101, 111, 58, 58, 45,
+ 119, 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110,
+ 116, 114, 111, 108, 115, 45, 114, 101, 119, 105, 110, 100, 45, 98, 117, 116,
+ 116, 111, 110, 32, 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110,
+ 111, 110, 101, 59, 32, 125, 32, 97, 117, 100, 105, 111, 58, 58, 45, 119,
+ 101, 98, 107, 105, 116, 45, 109, 101, 100, 105, 97, 45, 99, 111, 110, 116,
+ 114, 111, 108, 115, 45, 114, 101, 116, 117, 114, 110, 45, 116, 111, 45, 114,
+ 101, 97, 108, 116, 105, 109, 101, 45, 98, 117, 116, 116, 111, 110, 44, 32,
+ 118, 105, 100, 101, 111, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 109,
+ 101, 100, 105, 97, 45, 99, 111, 110, 116, 114, 111, 108, 115, 45, 114, 101,
+ 116, 117, 114, 110, 45, 116, 111, 45, 114, 101, 97, 108, 116, 105, 109, 101,
+ 45, 98, 117, 116, 116, 111, 110, 32, 123, 32, 100, 105, 115, 112, 108, 97,
+ 121, 58, 32, 110, 111, 110, 101, 59, 32, 125
};
}
diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp
index d06adf6..1872980 100644
--- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,69 +54,28 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse xpathyyparse
-#define yylex xpathyylex
-#define yyerror xpathyyerror
-#define yylval xpathyylval
-#define yychar xpathyychar
-#define yydebug xpathyydebug
-#define yynerrs xpathyynerrs
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- MULOP = 258,
- RELOP = 259,
- EQOP = 260,
- MINUS = 261,
- PLUS = 262,
- AND = 263,
- OR = 264,
- AXISNAME = 265,
- NODETYPE = 266,
- PI = 267,
- FUNCTIONNAME = 268,
- LITERAL = 269,
- VARIABLEREFERENCE = 270,
- NUMBER = 271,
- DOTDOT = 272,
- SLASHSLASH = 273,
- NAMETEST = 274,
- XPATH_ERROR = 275
- };
-#endif
-/* Tokens. */
-#define MULOP 258
-#define RELOP 259
-#define EQOP 260
-#define MINUS 261
-#define PLUS 262
-#define AND 263
-#define OR 264
-#define AXISNAME 265
-#define NODETYPE 266
-#define PI 267
-#define FUNCTIONNAME 268
-#define LITERAL 269
-#define VARIABLEREFERENCE 270
-#define NUMBER 271
-#define DOTDOT 272
-#define SLASHSLASH 273
-#define NAMETEST 274
-#define XPATH_ERROR 275
-
-
+#define yyparse xpathyyparse
+#define yylex xpathyylex
+#define yyerror xpathyyerror
+#define yylval xpathyylval
+#define yychar xpathyychar
+#define yydebug xpathyydebug
+#define yynerrs xpathyynerrs
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 28 "../xml/XPathGrammar.y"
@@ -144,6 +102,9 @@ using namespace XPath;
+/* Line 189 of yacc.c */
+#line 107 "WebCore/tmp/../generated/XPathGrammar.tab.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -162,10 +123,43 @@ using namespace XPath;
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ MULOP = 258,
+ RELOP = 259,
+ EQOP = 260,
+ MINUS = 261,
+ PLUS = 262,
+ AND = 263,
+ OR = 264,
+ AXISNAME = 265,
+ NODETYPE = 266,
+ PI = 267,
+ FUNCTIONNAME = 268,
+ LITERAL = 269,
+ VARIABLEREFERENCE = 270,
+ NUMBER = 271,
+ DOTDOT = 272,
+ SLASHSLASH = 273,
+ NAMETEST = 274,
+ XPATH_ERROR = 275
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 56 "../xml/XPathGrammar.y"
{
+
+/* Line 214 of yacc.c */
+#line 56 "../xml/XPathGrammar.y"
+
Step::Axis axis;
Step::NodeTest* nodeTest;
NumericOp::Opcode numop;
@@ -176,18 +170,21 @@ typedef union YYSTYPE
Vector<Expression*>* argList;
Step* step;
LocationPath* locationPath;
-}
-/* Line 187 of yacc.c. */
-#line 182 "WebCore/tmp/../generated/XPathGrammar.tab.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 178 "WebCore/tmp/../generated/XPathGrammar.tab.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
/* Copy the second part of user declarations. */
+
+/* Line 264 of yacc.c */
#line 69 "../xml/XPathGrammar.y"
@@ -196,8 +193,8 @@ static void xpathyyerror(const char*) { }
-/* Line 216 of yacc.c. */
-#line 201 "WebCore/tmp/../generated/XPathGrammar.tab.c"
+/* Line 264 of yacc.c */
+#line 198 "WebCore/tmp/../generated/XPathGrammar.tab.c"
#ifdef short
# undef short
@@ -272,14 +269,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -360,9 +357,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -396,12 +393,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -854,17 +851,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -898,11 +898,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1182,10 +1182,8 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1204,10 +1202,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1231,74 +1228,75 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
@@ -1328,7 +1326,6 @@ int yynerrs;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
-
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -1336,7 +1333,6 @@ int yynerrs;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-
&yystacksize);
yyss = yyss1;
@@ -1359,9 +1355,8 @@ int yynerrs;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1372,7 +1367,6 @@ int yynerrs;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -1382,6 +1376,9 @@ int yynerrs;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1390,16 +1387,16 @@ int yynerrs;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1431,20 +1428,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1484,6 +1477,8 @@ yyreduce:
switch (yyn)
{
case 2:
+
+/* Line 1455 of yacc.c */
#line 118 "../xml/XPathGrammar.y"
{
PARSER->m_topExpr = (yyvsp[(1) - (1)].expr);
@@ -1491,6 +1486,8 @@ yyreduce:
break;
case 3:
+
+/* Line 1455 of yacc.c */
#line 125 "../xml/XPathGrammar.y"
{
(yyval.locationPath)->setAbsolute(false);
@@ -1498,6 +1495,8 @@ yyreduce:
break;
case 4:
+
+/* Line 1455 of yacc.c */
#line 130 "../xml/XPathGrammar.y"
{
(yyval.locationPath)->setAbsolute(true);
@@ -1505,6 +1504,8 @@ yyreduce:
break;
case 5:
+
+/* Line 1455 of yacc.c */
#line 137 "../xml/XPathGrammar.y"
{
(yyval.locationPath) = new LocationPath;
@@ -1513,6 +1514,8 @@ yyreduce:
break;
case 6:
+
+/* Line 1455 of yacc.c */
#line 143 "../xml/XPathGrammar.y"
{
(yyval.locationPath) = (yyvsp[(2) - (2)].locationPath);
@@ -1520,6 +1523,8 @@ yyreduce:
break;
case 7:
+
+/* Line 1455 of yacc.c */
#line 148 "../xml/XPathGrammar.y"
{
(yyval.locationPath) = (yyvsp[(2) - (2)].locationPath);
@@ -1529,6 +1534,8 @@ yyreduce:
break;
case 8:
+
+/* Line 1455 of yacc.c */
#line 157 "../xml/XPathGrammar.y"
{
(yyval.locationPath) = new LocationPath;
@@ -1539,6 +1546,8 @@ yyreduce:
break;
case 9:
+
+/* Line 1455 of yacc.c */
#line 165 "../xml/XPathGrammar.y"
{
(yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step));
@@ -1547,6 +1556,8 @@ yyreduce:
break;
case 10:
+
+/* Line 1455 of yacc.c */
#line 171 "../xml/XPathGrammar.y"
{
(yyval.locationPath)->appendStep((yyvsp[(2) - (3)].step));
@@ -1557,6 +1568,8 @@ yyreduce:
break;
case 11:
+
+/* Line 1455 of yacc.c */
#line 181 "../xml/XPathGrammar.y"
{
if ((yyvsp[(2) - (2)].predList)) {
@@ -1570,6 +1583,8 @@ yyreduce:
break;
case 12:
+
+/* Line 1455 of yacc.c */
#line 192 "../xml/XPathGrammar.y"
{
String localName;
@@ -1590,6 +1605,8 @@ yyreduce:
break;
case 13:
+
+/* Line 1455 of yacc.c */
#line 210 "../xml/XPathGrammar.y"
{
if ((yyvsp[(3) - (3)].predList)) {
@@ -1603,6 +1620,8 @@ yyreduce:
break;
case 14:
+
+/* Line 1455 of yacc.c */
#line 221 "../xml/XPathGrammar.y"
{
String localName;
@@ -1623,6 +1642,8 @@ yyreduce:
break;
case 17:
+
+/* Line 1455 of yacc.c */
#line 245 "../xml/XPathGrammar.y"
{
(yyval.axis) = Step::AttributeAxis;
@@ -1630,6 +1651,8 @@ yyreduce:
break;
case 18:
+
+/* Line 1455 of yacc.c */
#line 252 "../xml/XPathGrammar.y"
{
if (*(yyvsp[(1) - (3)].str) == "node")
@@ -1645,6 +1668,8 @@ yyreduce:
break;
case 19:
+
+/* Line 1455 of yacc.c */
#line 265 "../xml/XPathGrammar.y"
{
(yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest);
@@ -1654,6 +1679,8 @@ yyreduce:
break;
case 20:
+
+/* Line 1455 of yacc.c */
#line 272 "../xml/XPathGrammar.y"
{
(yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, (yyvsp[(3) - (4)].str)->stripWhiteSpace());
@@ -1664,6 +1691,8 @@ yyreduce:
break;
case 21:
+
+/* Line 1455 of yacc.c */
#line 282 "../xml/XPathGrammar.y"
{
(yyval.predList) = 0;
@@ -1671,6 +1700,8 @@ yyreduce:
break;
case 23:
+
+/* Line 1455 of yacc.c */
#line 291 "../xml/XPathGrammar.y"
{
(yyval.predList) = new Vector<Predicate*>;
@@ -1681,6 +1712,8 @@ yyreduce:
break;
case 24:
+
+/* Line 1455 of yacc.c */
#line 299 "../xml/XPathGrammar.y"
{
(yyval.predList)->append(new Predicate((yyvsp[(2) - (2)].expr)));
@@ -1689,6 +1722,8 @@ yyreduce:
break;
case 25:
+
+/* Line 1455 of yacc.c */
#line 307 "../xml/XPathGrammar.y"
{
(yyval.expr) = (yyvsp[(2) - (3)].expr);
@@ -1696,6 +1731,8 @@ yyreduce:
break;
case 26:
+
+/* Line 1455 of yacc.c */
#line 314 "../xml/XPathGrammar.y"
{
(yyval.step) = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
@@ -1704,6 +1741,8 @@ yyreduce:
break;
case 27:
+
+/* Line 1455 of yacc.c */
#line 322 "../xml/XPathGrammar.y"
{
(yyval.step) = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
@@ -1712,6 +1751,8 @@ yyreduce:
break;
case 28:
+
+/* Line 1455 of yacc.c */
#line 328 "../xml/XPathGrammar.y"
{
(yyval.step) = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
@@ -1720,6 +1761,8 @@ yyreduce:
break;
case 29:
+
+/* Line 1455 of yacc.c */
#line 336 "../xml/XPathGrammar.y"
{
(yyval.expr) = new VariableReference(*(yyvsp[(1) - (1)].str));
@@ -1729,6 +1772,8 @@ yyreduce:
break;
case 30:
+
+/* Line 1455 of yacc.c */
#line 343 "../xml/XPathGrammar.y"
{
(yyval.expr) = (yyvsp[(2) - (3)].expr);
@@ -1736,6 +1781,8 @@ yyreduce:
break;
case 31:
+
+/* Line 1455 of yacc.c */
#line 348 "../xml/XPathGrammar.y"
{
(yyval.expr) = new StringExpression(*(yyvsp[(1) - (1)].str));
@@ -1745,6 +1792,8 @@ yyreduce:
break;
case 32:
+
+/* Line 1455 of yacc.c */
#line 355 "../xml/XPathGrammar.y"
{
(yyval.expr) = new Number((yyvsp[(1) - (1)].str)->toDouble());
@@ -1754,6 +1803,8 @@ yyreduce:
break;
case 34:
+
+/* Line 1455 of yacc.c */
#line 366 "../xml/XPathGrammar.y"
{
(yyval.expr) = createFunction(*(yyvsp[(1) - (3)].str));
@@ -1765,6 +1816,8 @@ yyreduce:
break;
case 35:
+
+/* Line 1455 of yacc.c */
#line 375 "../xml/XPathGrammar.y"
{
(yyval.expr) = createFunction(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].argList));
@@ -1777,6 +1830,8 @@ yyreduce:
break;
case 36:
+
+/* Line 1455 of yacc.c */
#line 387 "../xml/XPathGrammar.y"
{
(yyval.argList) = new Vector<Expression*>;
@@ -1787,6 +1842,8 @@ yyreduce:
break;
case 37:
+
+/* Line 1455 of yacc.c */
#line 395 "../xml/XPathGrammar.y"
{
(yyval.argList)->append((yyvsp[(3) - (3)].expr));
@@ -1795,6 +1852,8 @@ yyreduce:
break;
case 40:
+
+/* Line 1455 of yacc.c */
#line 409 "../xml/XPathGrammar.y"
{
(yyval.expr) = new Union;
@@ -1807,6 +1866,8 @@ yyreduce:
break;
case 41:
+
+/* Line 1455 of yacc.c */
#line 421 "../xml/XPathGrammar.y"
{
(yyval.expr) = (yyvsp[(1) - (1)].locationPath);
@@ -1814,6 +1875,8 @@ yyreduce:
break;
case 43:
+
+/* Line 1455 of yacc.c */
#line 428 "../xml/XPathGrammar.y"
{
(yyvsp[(3) - (3)].locationPath)->setAbsolute(true);
@@ -1825,6 +1888,8 @@ yyreduce:
break;
case 44:
+
+/* Line 1455 of yacc.c */
#line 437 "../xml/XPathGrammar.y"
{
(yyvsp[(3) - (3)].locationPath)->insertFirstStep((yyvsp[(2) - (3)].step));
@@ -1838,6 +1903,8 @@ yyreduce:
break;
case 46:
+
+/* Line 1455 of yacc.c */
#line 452 "../xml/XPathGrammar.y"
{
(yyval.expr) = new Filter((yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList));
@@ -1848,6 +1915,8 @@ yyreduce:
break;
case 48:
+
+/* Line 1455 of yacc.c */
#line 464 "../xml/XPathGrammar.y"
{
(yyval.expr) = new LogicalOp(LogicalOp::OP_Or, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1858,6 +1927,8 @@ yyreduce:
break;
case 50:
+
+/* Line 1455 of yacc.c */
#line 476 "../xml/XPathGrammar.y"
{
(yyval.expr) = new LogicalOp(LogicalOp::OP_And, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1868,6 +1939,8 @@ yyreduce:
break;
case 52:
+
+/* Line 1455 of yacc.c */
#line 488 "../xml/XPathGrammar.y"
{
(yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1878,6 +1951,8 @@ yyreduce:
break;
case 54:
+
+/* Line 1455 of yacc.c */
#line 500 "../xml/XPathGrammar.y"
{
(yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1888,6 +1963,8 @@ yyreduce:
break;
case 56:
+
+/* Line 1455 of yacc.c */
#line 512 "../xml/XPathGrammar.y"
{
(yyval.expr) = new NumericOp(NumericOp::OP_Add, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1898,6 +1975,8 @@ yyreduce:
break;
case 57:
+
+/* Line 1455 of yacc.c */
#line 520 "../xml/XPathGrammar.y"
{
(yyval.expr) = new NumericOp(NumericOp::OP_Sub, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1908,6 +1987,8 @@ yyreduce:
break;
case 59:
+
+/* Line 1455 of yacc.c */
#line 532 "../xml/XPathGrammar.y"
{
(yyval.expr) = new NumericOp((yyvsp[(2) - (3)].numop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr));
@@ -1918,6 +1999,8 @@ yyreduce:
break;
case 61:
+
+/* Line 1455 of yacc.c */
#line 544 "../xml/XPathGrammar.y"
{
(yyval.expr) = new Negative;
@@ -1928,8 +2011,9 @@ yyreduce:
break;
-/* Line 1267 of yacc.c. */
-#line 1933 "WebCore/tmp/../generated/XPathGrammar.tab.c"
+
+/* Line 1455 of yacc.c */
+#line 2017 "WebCore/tmp/../generated/XPathGrammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1940,7 +2024,6 @@ yyreduce:
*++yyvsp = yyval;
-
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -2005,7 +2088,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -2022,7 +2105,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2079,9 +2162,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
@@ -2106,7 +2186,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2117,7 +2197,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
@@ -2143,6 +2223,8 @@ yyreturn:
}
+
+/* Line 1675 of yacc.c */
#line 552 "../xml/XPathGrammar.y"
diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h
index 9728266..5a974bb 100644
--- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h
+++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program 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 General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -59,33 +59,16 @@
XPATH_ERROR = 275
};
#endif
-/* Tokens. */
-#define MULOP 258
-#define RELOP 259
-#define EQOP 260
-#define MINUS 261
-#define PLUS 262
-#define AND 263
-#define OR 264
-#define AXISNAME 265
-#define NODETYPE 266
-#define PI 267
-#define FUNCTIONNAME 268
-#define LITERAL 269
-#define VARIABLEREFERENCE 270
-#define NUMBER 271
-#define DOTDOT 272
-#define SLASHSLASH 273
-#define NAMETEST 274
-#define XPATH_ERROR 275
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 56 "../xml/XPathGrammar.y"
{
+
+/* Line 1676 of yacc.c */
+#line 56 "../xml/XPathGrammar.y"
+
Step::Axis axis;
Step::NodeTest* nodeTest;
NumericOp::Opcode numop;
@@ -96,14 +79,17 @@ typedef union YYSTYPE
Vector<Expression*>* argList;
Step* step;
LocationPath* locationPath;
-}
-/* Line 1489 of yacc.c. */
-#line 102 "WebCore/tmp/../generated/XPathGrammar.tab.h"
- YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c */
+#line 87 "WebCore/tmp/../generated/XPathGrammar.tab.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
+
diff --git a/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp b/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp
index 6156524..e199337 100644
--- a/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp
+++ b/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp
@@ -161,8 +161,8 @@ const String& HistoryItem::alternateTitle() const
Image* HistoryItem::icon() const
{
- Image* result = iconDatabase()->iconForPageURL(m_urlString, IntSize(16,16));
- return result ? result : iconDatabase()->defaultIcon(IntSize(16,16));
+ Image* result = iconDatabase()->iconForPageURL(m_urlString, IntSize(16, 16));
+ return result ? result : iconDatabase()->defaultIcon(IntSize(16, 16));
}
double HistoryItem::lastVisitedTime() const
@@ -287,14 +287,16 @@ void HistoryItem::collapseDailyVisitsToWeekly()
m_weeklyVisitCounts.shrink(maxWeeklyCounts);
}
-void HistoryItem::recordVisitAtTime(double time)
+void HistoryItem::recordVisitAtTime(double time, VisitCountBehavior visitCountBehavior)
{
padDailyCountsForNewVisit(time);
m_lastVisitedTime = time;
- m_visitCount++;
- m_dailyVisitCounts[0]++;
+ if (visitCountBehavior == IncreaseVisitCount) {
+ ++m_visitCount;
+ ++m_dailyVisitCounts[0];
+ }
collapseDailyVisitsToWeekly();
}
@@ -305,10 +307,10 @@ void HistoryItem::setLastVisitedTime(double time)
recordVisitAtTime(time);
}
-void HistoryItem::visited(const String& title, double time)
+void HistoryItem::visited(const String& title, double time, VisitCountBehavior visitCountBehavior)
{
m_title = title;
- recordVisitAtTime(time);
+ recordVisitAtTime(time, visitCountBehavior);
}
int HistoryItem::visitCount() const
@@ -329,10 +331,10 @@ void HistoryItem::setVisitCount(int count)
void HistoryItem::adoptVisitCounts(Vector<int>& dailyCounts, Vector<int>& weeklyCounts)
{
- m_dailyVisitCounts.clear();
- m_dailyVisitCounts.swap(dailyCounts);
- m_weeklyVisitCounts.clear();
- m_weeklyVisitCounts.swap(weeklyCounts);
+ m_dailyVisitCounts.clear();
+ m_dailyVisitCounts.swap(dailyCounts);
+ m_weeklyVisitCounts.clear();
+ m_weeklyVisitCounts.swap(weeklyCounts);
}
const IntPoint& HistoryItem::scrollPoint() const
diff --git a/src/3rdparty/webkit/WebCore/history/HistoryItem.h b/src/3rdparty/webkit/WebCore/history/HistoryItem.h
index ac7d124..c12122f 100644
--- a/src/3rdparty/webkit/WebCore/history/HistoryItem.h
+++ b/src/3rdparty/webkit/WebCore/history/HistoryItem.h
@@ -56,6 +56,11 @@ typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
extern void (*notifyHistoryItemChanged)();
+enum VisitCountBehavior {
+ IncreaseVisitCount,
+ DoNotIncreaseVisitCount
+};
+
class HistoryItem : public RefCounted<HistoryItem> {
friend class PageCache;
@@ -144,7 +149,7 @@ public:
// This should not be called directly for HistoryItems that are already included
// in GlobalHistory. The WebKit api for this is to use -[WebHistory setLastVisitedTimeInterval:forItem:] instead.
void setLastVisitedTime(double);
- void visited(const String& title, double time);
+ void visited(const String& title, double time, VisitCountBehavior);
void addRedirectURL(const String&);
Vector<String>* redirectURLs() const;
@@ -189,7 +194,7 @@ private:
void padDailyCountsForNewVisit(double time);
void collapseDailyVisitsToWeekly();
- void recordVisitAtTime(double);
+ void recordVisitAtTime(double, VisitCountBehavior = IncreaseVisitCount);
HistoryItem* findTargetItem();
diff --git a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp
index 37f4799..7a255d8 100644
--- a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp
+++ b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp
@@ -58,10 +58,10 @@
#include "TextMetrics.h"
#include "HTMLVideoElement.h"
#include <stdio.h>
-
#include <wtf/ByteArray.h>
#include <wtf/MathExtras.h>
#include <wtf/OwnPtr.h>
+#include <wtf/UnusedParam.h>
using namespace std;
@@ -546,6 +546,8 @@ void CanvasRenderingContext2D::lineTo(float x, float y)
return;
if (!state().m_invertibleCTM)
return;
+ if (m_path.isEmpty())
+ m_path.moveTo(FloatPoint(x, y));
m_path.addLineTo(FloatPoint(x, y));
}
@@ -555,6 +557,8 @@ void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, f
return;
if (!state().m_invertibleCTM)
return;
+ if (m_path.isEmpty())
+ m_path.moveTo(FloatPoint(cpx, cpy));
m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y));
}
@@ -564,6 +568,8 @@ void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x,
return;
if (!state().m_invertibleCTM)
return;
+ if (m_path.isEmpty())
+ m_path.moveTo(FloatPoint(cp1x, cp1y));
m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y));
}
@@ -1103,7 +1109,7 @@ void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRec
c->translate(destRect.x(), destRect.y());
c->scale(FloatSize(destRect.width()/sourceRect.width(), destRect.height()/sourceRect.height()));
c->translate(-sourceRect.x(), -sourceRect.y());
- video->paint(c, IntRect(IntPoint(), size(video)));
+ video->paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video)));
c->restore();
}
#endif
@@ -1158,6 +1164,8 @@ void CanvasRenderingContext2D::prepareGradientForDashboard(CanvasGradient* gradi
if (Settings* settings = m_canvas->document()->settings())
if (settings->usesDashboardBackwardCompatibilityMode())
gradient->setDashboardCompatibilityMode();
+#else
+ UNUSED_PARAM(gradient);
#endif
}
diff --git a/src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp b/src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp
index 743ed4f..946cac7 100644
--- a/src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp
+++ b/src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp
@@ -174,7 +174,7 @@ void CanvasStyle::applyFillColor(GraphicsContext* context)
switch (m_type) {
case ColorString: {
Color c = Color(m_color);
- if (c.isValid()){
+ if (c.isValid()) {
context->setFillColor(c.rgb());
break;
}
@@ -185,7 +185,7 @@ void CanvasStyle::applyFillColor(GraphicsContext* context)
}
case ColorStringWithAlpha: {
Color c = Color(m_color);
- if (c.isValid()){
+ if (c.isValid()) {
context->setFillColor(colorWithOverrideAlpha(c.rgb(), m_alpha));
break;
}
diff --git a/src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.cpp b/src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.cpp
new file mode 100644
index 0000000..aa44d8c
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.cpp
@@ -0,0 +1,44 @@
+/*
+ * 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 INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(DATAGRID)
+
+#include "DOMDataGridDataSource.h"
+
+namespace WebCore {
+
+DOMDataGridDataSource::DOMDataGridDataSource()
+{
+}
+
+DOMDataGridDataSource::~DOMDataGridDataSource()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.h b/src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.h
new file mode 100644
index 0000000..2ce2ab8
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DOMDataGridDataSource.h
@@ -0,0 +1,69 @@
+/*
+ * 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 INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DOMDataGridDataSource_h
+#define DOMDataGridDataSource_h
+
+#if ENABLE(DATAGRID)
+
+#include "DataGridDataSource.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class HTMLDataGridElement;
+
+class DOMDataGridDataSource : public DataGridDataSource {
+public:
+ static PassRefPtr<DOMDataGridDataSource> create()
+ {
+ return adoptRef(new DOMDataGridDataSource);
+ }
+
+ virtual ~DOMDataGridDataSource();
+
+ virtual bool isDOMDataGridDataSource() const { return true; }
+
+private:
+ DOMDataGridDataSource();
+};
+
+inline DOMDataGridDataSource* asDOMDataGridDataSource(DataGridDataSource* dataSource)
+{
+ ASSERT(dataSource->isDOMDataGridDataSource());
+ return static_cast<DOMDataGridDataSource*>(dataSource);
+}
+
+inline const DOMDataGridDataSource* asDOMDataGridDataSource(const DataGridDataSource* dataSource)
+{
+ ASSERT(dataSource->isDOMDataGridDataSource());
+ return static_cast<const DOMDataGridDataSource*>(dataSource);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
+#endif // DOMDataGridDataSource_h
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp b/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp
index 136c08e..7810c86 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "DataGridColumn.h"
#include "DataGridColumnList.h"
@@ -39,4 +42,12 @@ void DataGridColumn::setPrimary(bool primary)
}
}
+void DataGridColumn::columnChanged()
+{
+ if (m_columns)
+ m_columns->setDataGridNeedsLayout();
+}
+
} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumn.h b/src/3rdparty/webkit/WebCore/html/DataGridColumn.h
index 8e63cd6..3d480a9 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridColumn.h
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumn.h
@@ -26,7 +26,10 @@
#ifndef DataGridColumn_h
#define DataGridColumn_h
+#if ENABLE(DATAGRID)
+
#include "AtomicString.h"
+#include "RenderStyle.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -36,34 +39,49 @@ class DataGridColumnList;
class DataGridColumn : public RefCounted<DataGridColumn> {
public:
- static PassRefPtr<DataGridColumn> create(DataGridColumnList* columns, const String& columnID, const String& label, const String& type, bool primary, unsigned short sortable)
+ static PassRefPtr<DataGridColumn> create(const String& columnID, const String& label, const String& type, bool primary, unsigned short sortable)
{
- return new DataGridColumn(columns, columnID, label, type, primary, sortable);
+ return adoptRef(new DataGridColumn(columnID, label, type, primary, sortable));
}
const AtomicString& id() const { return m_id; }
- void setId(const AtomicString& id) { m_id = id; }
+ void setId(const AtomicString& id) { m_id = id; columnChanged(); }
const AtomicString& label() const { return m_label; }
- void setLabel(const AtomicString& label) { m_label = label; }
+ void setLabel(const AtomicString& label) { m_label = label; columnChanged(); }
const AtomicString& type() const { return m_type; }
- void setType(const AtomicString& type) { m_type = type; }
+ void setType(const AtomicString& type) { m_type = type; columnChanged(); }
unsigned short sortable() const { return m_sortable; }
- void setSortable(unsigned short sortable) { m_sortable = sortable; }
+ void setSortable(unsigned short sortable) { m_sortable = sortable; columnChanged(); }
unsigned short sortDirection() const { return m_sortDirection; }
- void setSortDirection(unsigned short sortDirection) { m_sortDirection = sortDirection; }
+ void setSortDirection(unsigned short sortDirection) { m_sortDirection = sortDirection; columnChanged(); }
bool primary() const { return m_primary; }
void setPrimary(bool);
- void detachFromColumnList() { m_columns = 0; }
+ void setColumnList(DataGridColumnList* list)
+ {
+ m_columns = list;
+ m_columnStyle = 0;
+ m_headerStyle = 0;
+ m_rect = IntRect();
+ }
+
+ RenderStyle* columnStyle() const { return m_columnStyle.get(); }
+ void setColumnStyle(PassRefPtr<RenderStyle> style) { m_columnStyle = style; }
+
+ RenderStyle* headerStyle() const { return m_headerStyle.get(); }
+ void setHeaderStyle(PassRefPtr<RenderStyle> style) { m_headerStyle = style; }
+
+ const IntRect& rect() const { return m_rect; }
+ void setRect(const IntRect& rect) { m_rect = rect; }
private:
- DataGridColumn(DataGridColumnList* columns, const String& columnID, const String& label, const String& type, bool primary, unsigned short sortable)
- : m_columns(columns)
+ DataGridColumn(const String& columnID, const String& label, const String& type, bool primary, unsigned short sortable)
+ : m_columns(0)
, m_id(columnID)
, m_label(label)
, m_type(type)
@@ -73,6 +91,8 @@ private:
{
}
+ void columnChanged();
+
DataGridColumnList* m_columns; // Not refcounted. The columns list will null out our reference when it goes away.
AtomicString m_id;
@@ -83,8 +103,15 @@ private:
unsigned short m_sortable;
unsigned short m_sortDirection;
+
+ RefPtr<RenderStyle> m_columnStyle; // The style used to render the column background behind the row cells.
+ RefPtr<RenderStyle> m_headerStyle; // The style used to render the column header above the row cells.
+
+ IntRect m_rect;
};
} // namespace WebCore
+#endif
+
#endif // DataGridColumn_h
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl b/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl
index 04418a1..f566325 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl
@@ -26,7 +26,8 @@
module html {
interface [
- GenerateConstructor
+ GenerateConstructor,
+ Conditional=DATAGRID
] DataGridColumn {
attribute DOMString id; // The identifier for the column.
attribute DOMString label; // The text to display in the column.
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp
index 48f7d60..9613402 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp
@@ -24,13 +24,22 @@
*/
#include "config.h"
-#include "DataGridColumnList.h"
+
+#if ENABLE(DATAGRID)
#include "AtomicString.h"
+#include "DataGridColumnList.h"
+#include "HTMLDataGridElement.h"
#include "PlatformString.h"
+#include "RenderObject.h"
namespace WebCore {
+DataGridColumnList::DataGridColumnList(HTMLDataGridElement* dataGrid)
+ : m_dataGrid(dataGrid)
+{
+}
+
DataGridColumnList::~DataGridColumnList()
{
clear();
@@ -46,13 +55,26 @@ DataGridColumn* DataGridColumnList::itemWithName(const AtomicString& name) const
return 0;
}
+void DataGridColumnList::setDataGridNeedsLayout()
+{
+ // Mark the datagrid as needing layout.
+ if (dataGrid() && dataGrid()->renderer())
+ dataGrid()->renderer()->setNeedsLayout(true);
+}
+
DataGridColumn* DataGridColumnList::add(const String& id, const String& label, const String& type, bool primary, unsigned short sortable)
{
- RefPtr<DataGridColumn> column = DataGridColumn::create(this, id, label, type, primary, sortable);
- if (primary)
+ return add(DataGridColumn::create(id, label, type, primary, sortable).get());
+}
+
+DataGridColumn* DataGridColumnList::add(DataGridColumn* column)
+{
+ if (column->primary())
m_primaryColumn = column;
m_columns.append(column);
- return column.get();
+ column->setColumnList(this);
+ setDataGridNeedsLayout();
+ return column;
}
void DataGridColumnList::remove(DataGridColumn* col)
@@ -65,6 +87,8 @@ void DataGridColumnList::remove(DataGridColumn* col)
m_primaryColumn = 0;
if (col == m_sortColumn)
m_sortColumn = 0;
+ col->setColumnList(0);
+ setDataGridNeedsLayout();
}
void DataGridColumnList::move(DataGridColumn* col, unsigned long index)
@@ -73,16 +97,18 @@ void DataGridColumnList::move(DataGridColumn* col, unsigned long index)
if (colIndex == notFound)
return;
m_columns.insert(index, col);
+ setDataGridNeedsLayout();
}
void DataGridColumnList::clear()
{
unsigned length = m_columns.size();
for (unsigned i = 0; i < length; ++i)
- m_columns[i]->detachFromColumnList();
+ m_columns[i]->setColumnList(0);
m_columns.clear();
m_primaryColumn = 0;
m_sortColumn = 0;
+ setDataGridNeedsLayout();
}
void DataGridColumnList::primaryColumnChanged(DataGridColumn* col)
@@ -92,7 +118,9 @@ void DataGridColumnList::primaryColumnChanged(DataGridColumn* col)
else if (m_primaryColumn = col)
m_primaryColumn = 0;
- // FIXME: Invalidate the tree.
+ setDataGridNeedsLayout();
}
} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h
index d0caebe..ed72863 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h
@@ -1,6 +1,8 @@
#ifndef DataGridColumnList_h
#define DataGridColumnList_h
+#if ENABLE(DATAGRID)
+
#include "DataGridColumn.h"
#include <wtf/PassRefPtr.h>
@@ -10,13 +12,14 @@
namespace WebCore {
class AtomicString;
+class HTMLDataGridElement;
class DataGridColumnList : public RefCounted<DataGridColumnList> {
friend class DataGridColumn;
public:
- static PassRefPtr<DataGridColumnList> create()
+ static PassRefPtr<DataGridColumnList> create(HTMLDataGridElement* grid)
{
- return new DataGridColumnList();
+ return adoptRef(new DataGridColumnList(grid));
}
~DataGridColumnList();
@@ -31,12 +34,22 @@ public:
DataGridColumn* sortColumn() const { return m_sortColumn.get(); }
DataGridColumn* add(const String& id, const String& label, const String& type, bool primary, unsigned short sortable);
+ DataGridColumn* add(DataGridColumn*);
void remove(DataGridColumn*);
void move(DataGridColumn*, unsigned long index);
void clear();
+ HTMLDataGridElement* dataGrid() const { return m_dataGrid; }
+ void clearDataGrid() { m_dataGrid = 0; }
+
+ void setDataGridNeedsLayout();
+
private:
- void primaryColumnChanged(DataGridColumn* col);
+ DataGridColumnList(HTMLDataGridElement*);
+
+ void primaryColumnChanged(DataGridColumn*);
+
+ HTMLDataGridElement* m_dataGrid; // Weak reference. Will be nulled out when our tree goes away.
Vector<RefPtr<DataGridColumn> > m_columns;
RefPtr<DataGridColumn> m_primaryColumn;
@@ -45,4 +58,6 @@ private:
} // namespace WebCore
+#endif
+
#endif // DataGridColumnList_h
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl
index cab4339..1a59f43 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl
@@ -28,7 +28,8 @@ module html {
interface [
GenerateConstructor,
HasIndexGetter,
- HasNameGetter
+ HasNameGetter,
+ Conditional=DATAGRID
] DataGridColumnList {
DataGridColumn item(in [IsIndex] unsigned long index);
readonly attribute unsigned long length;
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h b/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h
index 0c9a24d..2ab1f5b 100644
--- a/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h
+++ b/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h
@@ -26,6 +26,8 @@
#ifndef DataGridDataSource_h
#define DataGridDataSource_h
+#if ENABLE(DATAGRID)
+
#include <wtf/RefCounted.h>
namespace WebCore {
@@ -36,11 +38,12 @@ class DataGridDataSource : public RefCounted<DataGridDataSource> {
public:
virtual ~DataGridDataSource() { }
+ virtual bool isDOMDataGridDataSource() const { return false; }
virtual bool isJSDataGridDataSource() const { return false; }
-
- virtual void initialize(HTMLDataGridElement*) = 0;
};
} // namespace WebCore
+#endif
+
#endif // DataGridDataSource_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp
index 354f9f0..09362cd 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp
@@ -249,7 +249,7 @@ void HTMLAnchorElement::setActive(bool down, bool pause)
if (Settings* settings = document()->settings())
editableLinkBehavior = settings->editableLinkBehavior();
- switch(editableLinkBehavior) {
+ switch (editableLinkBehavior) {
default:
case EditableLinkDefaultBehavior:
case EditableLinkAlwaysLive:
@@ -497,7 +497,7 @@ bool HTMLAnchorElement::isLiveLink() const
if (Settings* settings = document()->settings())
editableLinkBehavior = settings->editableLinkBehavior();
- switch(editableLinkBehavior) {
+ switch (editableLinkBehavior) {
default:
case EditableLinkDefaultBehavior:
case EditableLinkAlwaysLive:
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h
index 26d8126..e271965 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h
@@ -30,8 +30,7 @@ namespace WebCore {
class HTMLFormElement;
class HTMLImageLoader;
-class HTMLAppletElement : public HTMLPlugInElement
-{
+class HTMLAppletElement : public HTMLPlugInElement {
public:
HTMLAppletElement(const QualifiedName&, Document*);
~HTMLAppletElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in b/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in
index a29d6d2..0fc45d7 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in
+++ b/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in
@@ -17,6 +17,7 @@ aria-checked
aria-describedby
aria-disabled
aria-hidden
+aria-label
aria-labeledby
aria-labelledby
aria-level
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAudioElement.h b/src/3rdparty/webkit/WebCore/html/HTMLAudioElement.h
index de390cf..1dbe44f 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLAudioElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLAudioElement.h
@@ -32,8 +32,7 @@
namespace WebCore {
-class HTMLAudioElement : public HTMLMediaElement
-{
+class HTMLAudioElement : public HTMLMediaElement {
public:
HTMLAudioElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h
index 982a646..5600463 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h
@@ -28,8 +28,7 @@ namespace WebCore {
class String;
-class HTMLBRElement : public HTMLElement
-{
+class HTMLBRElement : public HTMLElement {
public:
HTMLBRElement(const QualifiedName&, Document*);
~HTMLBRElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp
index a278908..84e359c 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp
@@ -30,6 +30,7 @@
#include "HTMLNames.h"
#include "KURL.h"
#include "MappedAttribute.h"
+#include "XSSAuditor.h"
namespace WebCore {
@@ -48,6 +49,7 @@ HTMLBaseElement::~HTMLBaseElement()
void HTMLBaseElement::parseMappedAttribute(MappedAttribute* attr)
{
if (attr->name() == hrefAttr) {
+ m_hrefAttrValue = attr->value();
m_href = parseURL(attr->value());
process();
} else if (attr->name() == targetAttr) {
@@ -78,7 +80,7 @@ void HTMLBaseElement::process()
if (!inDocument())
return;
- if (!m_href.isEmpty())
+ if (!m_href.isEmpty() && (!document()->frame() || document()->frame()->script()->xssAuditor()->canSetBaseElementURL(m_hrefAttrValue)))
document()->setBaseElementURL(KURL(document()->url(), m_href));
if (!m_target.isEmpty())
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h
index f068851..bb980e9 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLBaseElement : public HTMLElement
-{
+class HTMLBaseElement : public HTMLElement {
public:
HTMLBaseElement(const QualifiedName&, Document*);
~HTMLBaseElement();
@@ -48,6 +47,7 @@ public:
void setTarget(const String&);
protected:
+ String m_hrefAttrValue;
String m_href;
String m_target;
};
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h
index 0c9a9fd..c15a36e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLBaseFontElement : public HTMLElement
-{
+class HTMLBaseFontElement : public HTMLElement {
public:
HTMLBaseFontElement(const QualifiedName&, Document* doc);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.idl
index 028e92b..30ad6f2 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.idl
@@ -26,6 +26,9 @@ module html {
ImplementationUUID=1be13b5f-40df-4550-b70e-8c805e546cad
] HTMLButtonElement : HTMLElement {
readonly attribute HTMLFormElement form;
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ readonly attribute ValidityState validity;
+#endif
attribute [ConvertNullToNullString] DOMString accessKey;
attribute boolean disabled;
attribute boolean autofocus;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDListElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDListElement.h
index 8925e6b..49c944b 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDListElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDListElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLDListElement : public HTMLElement
-{
+class HTMLDListElement : public HTMLElement {
public:
HTMLDListElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp
index d06ad82..bad8929 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "HTMLDataGridCellElement.h"
#include "HTMLNames.h"
@@ -89,3 +92,5 @@ void HTMLDataGridCellElement::setProgress(float progress)
}
} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h
index 9de6e40..270835c 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h
@@ -26,6 +26,8 @@
#ifndef HTMLDataGridCellElement_h
#define HTMLDataGridCellElement_h
+#if ENABLE(DATAGRID)
+
#include "HTMLElement.h"
namespace WebCore {
@@ -55,4 +57,6 @@ public:
} // namespace WebCore
+#endif
+
#endif // HTMLDataGridCellElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl
index 4d15f6f..c7c51bc 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl
@@ -26,7 +26,8 @@
module html {
interface [
- GenerateConstructor
+ GenerateConstructor,
+ Conditional=DATAGRID
] HTMLDataGridCellElement : HTMLElement {
attribute DOMString label; // The text to display in the column, assuming the type supports text.
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp
index b209447..8398545 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp
@@ -24,9 +24,14 @@
*/
#include "config.h"
-#include "HTMLDataGridColElement.h"
+#if ENABLE(DATAGRID)
+
+#include "DataGridColumn.h"
+#include "HTMLDataGridElement.h"
+#include "HTMLDataGridColElement.h"
#include "HTMLNames.h"
+#include "MappedAttribute.h"
#include "Text.h"
namespace WebCore {
@@ -35,9 +40,48 @@ using namespace HTMLNames;
HTMLDataGridColElement::HTMLDataGridColElement(const QualifiedName& name, Document* doc)
: HTMLElement(name, doc)
+ , m_dataGrid(0)
+{
+}
+
+HTMLDataGridElement* HTMLDataGridColElement::findDataGridAncestor() const
+{
+ if (parent() && parent()->hasTagName(datagridTag))
+ return static_cast<HTMLDataGridElement*>(parent());
+ return 0;
+}
+
+void HTMLDataGridColElement::ensureColumn()
{
+ if (m_column)
+ return;
+ m_column = DataGridColumn::create(getAttribute(idAttr), label(), type(), primary(), sortable());
}
+void HTMLDataGridColElement::insertedIntoTree(bool deep)
+{
+ HTMLElement::insertedIntoTree(deep);
+ if (dataGrid()) // We're connected to a datagrid already.
+ return;
+ m_dataGrid = findDataGridAncestor();
+ if (dataGrid() && dataGrid()->dataSource()->isDOMDataGridDataSource()) {
+ ensureColumn();
+ m_dataGrid->columns()->add(column()); // FIXME: Deal with ordering issues (complicated, since columns can be made outside the DOM).
+ }
+}
+
+void HTMLDataGridColElement::removedFromTree(bool deep)
+{
+ HTMLElement::removedFromTree(deep);
+ if (dataGrid() && dataGrid()->dataSource()->isDOMDataGridDataSource()) {
+ HTMLDataGridElement* grid = findDataGridAncestor();
+ if (!grid && column()) {
+ dataGrid()->columns()->remove(column());
+ m_dataGrid = 0;
+ }
+ }
+}
+
String HTMLDataGridColElement::label() const
{
return getAttribute(labelAttr);
@@ -60,12 +104,14 @@ void HTMLDataGridColElement::setType(const String& type)
unsigned short HTMLDataGridColElement::sortable() const
{
- return hasAttribute(sortableAttr);
+ if (!hasAttribute(sortableAttr))
+ return 2;
+ return getAttribute(sortableAttr).toInt(0);
}
void HTMLDataGridColElement::setSortable(unsigned short sortable)
{
- setAttribute(sortableAttr, sortable ? "" : 0);
+ setAttribute(sortableAttr, String::number(sortable));
}
unsigned short HTMLDataGridColElement::sortDirection() const
@@ -99,4 +145,27 @@ void HTMLDataGridColElement::setPrimary(bool primary)
setAttribute(primaryAttr, primary ? "" : 0);
}
+void HTMLDataGridColElement::parseMappedAttribute(MappedAttribute* attr)
+{
+ HTMLElement::parseMappedAttribute(attr);
+
+ if (!column())
+ return;
+
+ if (attr->name() == labelAttr)
+ column()->setLabel(label());
+ else if (attr->name() == typeAttr)
+ column()->setType(type());
+ else if (attr->name() == primaryAttr)
+ column()->setPrimary(primary());
+ else if (attr->name() == sortableAttr)
+ column()->setSortable(sortable());
+ else if (attr->name() == sortdirectionAttr)
+ column()->setSortDirection(sortDirection());
+ else if (attr->name() == idAttr)
+ column()->setId(getAttribute(idAttr));
+}
+
} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h
index 87133cc..d91ec51 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h
@@ -26,17 +26,25 @@
#ifndef HTMLDataGridColElement_h
#define HTMLDataGridColElement_h
+#if ENABLE(DATAGRID)
+
+#include "DataGridColumn.h"
#include "HTMLElement.h"
namespace WebCore {
+class HTMLDataGridElement;
+
class HTMLDataGridColElement : public HTMLElement {
public:
HTMLDataGridColElement(const QualifiedName&, Document*);
virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
virtual int tagPriority() const { return 0; }
-
+ virtual void insertedIntoTree(bool /*deep*/);
+ virtual void removedFromTree(bool /*deep*/);
+ virtual void parseMappedAttribute(MappedAttribute*);
+
String label() const;
void setLabel(const String&);
@@ -51,8 +59,21 @@ public:
bool primary() const;
void setPrimary(bool);
+
+ DataGridColumn* column() const { return m_column.get(); }
+ void setColumn(PassRefPtr<DataGridColumn> col) { m_column = col; }
+
+private:
+ HTMLDataGridElement* dataGrid() const { return m_dataGrid; }
+ HTMLDataGridElement* findDataGridAncestor() const;
+ void ensureColumn();
+
+ RefPtr<DataGridColumn> m_column;
+ HTMLDataGridElement* m_dataGrid; // Not refcounted. We will null out our reference if we get removed from the grid.
};
} // namespace WebCore
+#endif
+
#endif // HTMLDataGridColElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl
index c72751c..5861039 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl
@@ -26,7 +26,8 @@
module html {
interface [
- GenerateConstructor
+ GenerateConstructor,
+ Conditional=DATAGRID
] HTMLDataGridColElement : HTMLElement {
attribute DOMString label; // The text to display in the column.
attribute DOMString type; // The type of data displayed in this column.
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp
index 2d9f852..bb1f4a6 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp
@@ -24,8 +24,12 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "HTMLDataGridElement.h"
+#include "DOMDataGridDataSource.h"
#include "HTMLNames.h"
#include "RenderDataGrid.h"
#include "Text.h"
@@ -36,13 +40,14 @@ using namespace HTMLNames;
HTMLDataGridElement::HTMLDataGridElement(const QualifiedName& tagName, Document* document)
: HTMLElement(tagName, document)
- , m_initializationTimer(this, &HTMLDataGridElement::initializationTimerFired)
+ , m_columns(DataGridColumnList::create(this))
{
- m_columns = DataGridColumnList::create();
+ setDataSource(DOMDataGridDataSource::create());
}
HTMLDataGridElement::~HTMLDataGridElement()
{
+ m_columns->clearDataGrid();
}
bool HTMLDataGridElement::checkDTD(const Node* newChild)
@@ -87,18 +92,27 @@ void HTMLDataGridElement::setMultiple(bool multiple)
setAttribute(multipleAttr, multiple ? "" : 0);
}
-void HTMLDataGridElement::setDataSource(PassRefPtr<DataGridDataSource> dataSource)
+void HTMLDataGridElement::setDataSource(PassRefPtr<DataGridDataSource> ds)
{
- if (m_initializationTimer.isActive())
- m_initializationTimer.stop();
-
+ if (m_dataSource == ds)
+ return;
+
+ RefPtr<DataGridDataSource> dataSource = ds;
+ if (!dataSource)
+ dataSource = DOMDataGridDataSource::create();
m_dataSource = dataSource;
- m_initializationTimer.startOneShot(0);
+
+ // Always clear our columns when a data source changes.
+ // The register callback will rebuild the columns.
+ m_columns->clear();
}
-void HTMLDataGridElement::initializationTimerFired(Timer<HTMLDataGridElement>*)
+DataGridDataSource* HTMLDataGridElement::dataSource() const
{
- m_dataSource->initialize(this);
+ ASSERT(m_dataSource);
+ return m_dataSource.get();
}
} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h
index 646c97e..94672c1 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h
@@ -26,6 +26,8 @@
#ifndef HTMLDataGridElement_h
#define HTMLDataGridElement_h
+#if ENABLE(DATAGRID)
+
#include "DataGridColumnList.h"
#include "DataGridDataSource.h"
#include "HTMLElement.h"
@@ -53,19 +55,17 @@ public:
void setMultiple(bool);
void setDataSource(PassRefPtr<DataGridDataSource>);
- DataGridDataSource* dataSource() const { return m_dataSource.get(); }
+ DataGridDataSource* dataSource() const;
DataGridColumnList* columns() const { return m_columns.get(); }
private:
- void initializationTimerFired(Timer<HTMLDataGridElement>*);
-
- Timer<HTMLDataGridElement> m_initializationTimer;
RefPtr<DataGridDataSource> m_dataSource;
-
RefPtr<DataGridColumnList> m_columns;
};
} // namespace WebCore
+#endif
+
#endif // HTMLDataGridElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl
index b4b0897..c9e6d9d 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl
@@ -26,7 +26,8 @@
module html {
interface [
- GenerateConstructor
+ GenerateConstructor,
+ Conditional=DATAGRID
] HTMLDataGridElement : HTMLElement {
attribute [Custom] DataGridDataSource dataSource;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp
index e671806..c958cbd 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "HTMLDataGridRowElement.h"
#include "HTMLNames.h"
@@ -76,3 +79,5 @@ void HTMLDataGridRowElement::setExpanded(bool expanded)
}
} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h
index d911db2..eac33e6 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h
@@ -26,6 +26,8 @@
#ifndef HTMLDataGridRowElement_h
#define HTMLDataGridRowElement_h
+#if ENABLE(DATAGRID)
+
#include "HTMLElement.h"
namespace WebCore {
@@ -49,4 +51,6 @@ public:
} // namespace WebCore
+#endif
+
#endif // HTMLDataGridRowElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl
index 4aeb4d5..f6954af 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl
@@ -26,7 +26,8 @@
module html {
interface [
- GenerateConstructor
+ GenerateConstructor,
+ Conditional=DATAGRID
] HTMLDataGridRowElement : HTMLElement {
attribute boolean selected; // Whether or not the row is currently selected.
attribute boolean focused; // Whether or not the row is the current object in the tree for keyboard navigation (or as the principal item of a multiple selection).
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.h
index 6be4c22..eead141 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLDirectoryElement : public HTMLElement
-{
+class HTMLDirectoryElement : public HTMLElement {
public:
HTMLDirectoryElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
index 5655df8..8acc6bd 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
@@ -79,7 +79,7 @@ HTMLTagStatus HTMLElement::endTagRequirement() const
{
if (hasLocalName(wbrTag))
return TagStatusForbidden;
- if (hasLocalName(dtTag) || hasLocalName(ddTag))
+ if (hasLocalName(dtTag) || hasLocalName(ddTag) || hasLocalName(rpTag) || hasLocalName(rtTag))
return TagStatusOptional;
// Same values as <span>. This way custom tag name elements will behave like inline spans.
@@ -90,9 +90,9 @@ int HTMLElement::tagPriority() const
{
if (hasLocalName(wbrTag))
return 0;
- if (hasLocalName(addressTag) || hasLocalName(ddTag) || hasLocalName(dtTag) || hasLocalName(noscriptTag))
+ if (hasLocalName(addressTag) || hasLocalName(ddTag) || hasLocalName(dtTag) || hasLocalName(noscriptTag) || hasLocalName(rpTag) || hasLocalName(rtTag))
return 3;
- if (hasLocalName(centerTag) || hasLocalName(nobrTag))
+ if (hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag))
return 5;
if (hasLocalName(noembedTag) || hasLocalName(noframesTag))
return 10;
@@ -875,6 +875,9 @@ static HashSet<AtomicStringImpl*>* inlineTagList()
tagList.add(audioTag.localName().impl());
tagList.add(videoTag.localName().impl());
#endif
+ tagList.add(rpTag.localName().impl());
+ tagList.add(rtTag.localName().impl());
+ tagList.add(rubyTag.localName().impl());
}
return &tagList;
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.cpp
index eb8d4ed..eb83173 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.cpp
@@ -34,7 +34,7 @@ namespace WebCore {
using namespace HTMLNames;
HTMLFieldSetElement::HTMLFieldSetElement(const QualifiedName& tagName, Document *doc, HTMLFormElement *f)
- : HTMLFormControlElement(tagName, doc, f)
+ : HTMLFormControlElement(tagName, doc, f)
{
ASSERT(hasTagName(fieldsetTag));
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.idl
index c48f8d6..371f3fd 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.idl
@@ -25,6 +25,9 @@ module html {
ImplementationUUID=93573758-96db-415d-9bdc-ee7238604094
] HTMLFieldSetElement : HTMLElement {
readonly attribute HTMLFormElement form;
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ readonly attribute ValidityState validity;
+#endif
readonly attribute boolean willValidate;
};
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
index b985e75..87938ac 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
@@ -25,6 +25,7 @@
#include "config.h"
#include "HTMLFormControlElement.h"
+#include "ChromeClient.h"
#include "Document.h"
#include "EventHandler.h"
#include "EventNames.h"
@@ -35,8 +36,10 @@
#include "HTMLParser.h"
#include "HTMLTokenizer.h"
#include "MappedAttribute.h"
+#include "Page.h"
#include "RenderBox.h"
#include "RenderTheme.h"
+#include "ValidityState.h"
namespace WebCore {
@@ -61,6 +64,14 @@ HTMLFormControlElement::~HTMLFormControlElement()
m_form->removeFormElement(this);
}
+ValidityState* HTMLFormControlElement::validity()
+{
+ if (!m_validityState)
+ m_validityState = ValidityState::create(this);
+
+ return m_validityState.get();
+}
+
void HTMLFormControlElement::parseMappedAttribute(MappedAttribute *attr)
{
if (attr->name() == nameAttr) {
@@ -242,6 +253,22 @@ bool HTMLFormControlElement::willValidate() const
return form() && name().length() && !disabled() && !isReadOnlyFormControl();
}
+void HTMLFormControlElement::dispatchFocusEvent()
+{
+ if (document()->frame() && document()->frame()->page())
+ document()->frame()->page()->chrome()->client()->formDidFocus(this);
+
+ HTMLElement::dispatchFocusEvent();
+}
+
+void HTMLFormControlElement::dispatchBlurEvent()
+{
+ if (document()->frame() && document()->frame()->page())
+ document()->frame()->page()->chrome()->client()->formDidBlur(this);
+
+ HTMLElement::dispatchBlurEvent();
+}
+
bool HTMLFormControlElement::supportsFocus() const
{
return isFocusable() || (!disabled() && !document()->haveStylesheetsLoaded());
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h
index 0a7bbd1..a03eb1a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h
@@ -30,6 +30,7 @@ namespace WebCore {
class FormDataList;
class HTMLFormElement;
+class ValidityState;
class HTMLFormControlElement : public HTMLElement {
public:
@@ -40,6 +41,7 @@ public:
virtual int tagPriority() const { return 1; }
HTMLFormElement* form() const { return m_form; }
+ virtual ValidityState* validity();
virtual bool isTextFormControl() const { return false; }
virtual bool isEnabledFormControl() const { return !disabled(); }
@@ -100,6 +102,9 @@ public:
void formDestroyed() { m_form = 0; }
+ virtual void dispatchFocusEvent();
+ virtual void dispatchBlurEvent();
+
protected:
void removeFromForm();
@@ -107,6 +112,7 @@ private:
virtual HTMLFormElement* virtualForm() const;
HTMLFormElement* m_form;
+ RefPtr<ValidityState> m_validityState;
bool m_disabled;
bool m_readOnly;
bool m_valueMatchesRenderer;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
index 64cac37..f2012e1 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
@@ -328,7 +328,7 @@ static void transferMailtoPostFormDataToURL(RefPtr<FormData>& data, KURL& url, c
url.setQuery(query);
}
-void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockHistory, bool lockBackForwardList)
+void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockHistory)
{
FrameView* view = document()->view();
Frame* frame = document()->frame();
@@ -389,14 +389,14 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockH
m_url = url.string();
}
- frame->loader()->submitForm("POST", m_url, data.release(), m_target, m_formDataBuilder.encodingType(), String(), lockHistory, lockBackForwardList, event, formState.release());
+ frame->loader()->submitForm("POST", m_url, data.release(), m_target, m_formDataBuilder.encodingType(), String(), lockHistory, event, formState.release());
} else {
Vector<char> boundary = m_formDataBuilder.generateUniqueBoundaryString();
- frame->loader()->submitForm("POST", m_url, createFormData(boundary.data()), m_target, m_formDataBuilder.encodingType(), boundary.data(), lockHistory, lockBackForwardList, event, formState.release());
+ frame->loader()->submitForm("POST", m_url, createFormData(boundary.data()), m_target, m_formDataBuilder.encodingType(), boundary.data(), lockHistory, event, formState.release());
}
} else {
m_formDataBuilder.setIsMultiPartForm(false);
- frame->loader()->submitForm("GET", m_url, createFormData(CString()), m_target, String(), String(), lockHistory, lockBackForwardList, event, formState.release());
+ frame->loader()->submitForm("GET", m_url, createFormData(CString()), m_target, String(), String(), lockHistory, event, formState.release());
}
if (needButtonActivation && firstSuccessfulSubmitButton)
@@ -415,7 +415,7 @@ void HTMLFormElement::reset()
// ### DOM2 labels this event as not cancelable, however
// common browsers( sick! ) allow it be cancelled.
- if ( !dispatchEvent(eventNames().resetEvent,true, true) ) {
+ if ( !dispatchEvent(eventNames().resetEvent, true, true) ) {
m_inreset = false;
return;
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.h b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.h
index d08e16c..6b7812a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.h
@@ -78,7 +78,7 @@ public:
void removeImgElement(HTMLImageElement*);
bool prepareSubmit(Event*);
- void submit(Event* = 0, bool activateSubmitButton = false, bool lockHistory = false, bool lockBackForwardList = false);
+ void submit(Event* = 0, bool activateSubmitButton = false, bool lockHistory = false);
void reset();
// Used to indicate a malformed state to keep from applying the bottom margin of the form.
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLHRElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLHRElement.cpp
index d6cc58e..6858f56 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLHRElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLHRElement.cpp
@@ -71,7 +71,7 @@ void HTMLHRElement::parseMappedAttribute(MappedAttribute *attr)
} else if (attr->name() == widthAttr) {
bool ok;
int v = attr->value().toInt(&ok);
- if(ok && !v)
+ if (ok && !v)
addCSSLength(attr, CSSPropertyWidth, "1");
else
addCSSLength(attr, CSSPropertyWidth, attr->value());
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h b/src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h
index 2f01ef2..21d8a2f 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h
@@ -30,8 +30,7 @@
namespace WebCore {
-class HTMLHeadElement : public HTMLElement
-{
+class HTMLHeadElement : public HTMLElement {
public:
HTMLHeadElement(const QualifiedName&, Document*);
~HTMLHeadElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h b/src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h
index 91a0045..86603b5 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h
@@ -30,8 +30,7 @@
namespace WebCore {
-class HTMLHtmlElement : public HTMLElement
-{
+class HTMLHtmlElement : public HTMLElement {
public:
HTMLHtmlElement(const QualifiedName&, Document*);
~HTMLHtmlElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
index 25cbb55..ae2ce38 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
@@ -67,7 +67,7 @@ public:
CachedImage* cachedImage() const { return m_imageLoader.image(); }
void setCachedImage(CachedImage* i) { m_imageLoader.setImage(i); };
- void setLoadManually (bool loadManually) { m_imageLoader.setLoadManually(loadManually); }
+ void setLoadManually(bool loadManually) { m_imageLoader.setLoadManually(loadManually); }
String name() const;
void setName(const String&);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
index ae7e768..8b2aa0e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
@@ -1590,9 +1590,9 @@ void HTMLInputElement::onSearch()
VisibleSelection HTMLInputElement::selection() const
{
- if (!renderer() || !isTextField() || m_data.cachedSelectionStart() == -1 || m_data.cachedSelectionEnd() == -1)
+ if (!renderer() || !isTextField() || m_data.cachedSelectionStart() == -1 || m_data.cachedSelectionEnd() == -1)
return VisibleSelection();
- return toRenderTextControl(renderer())->selection(m_data.cachedSelectionStart(), m_data.cachedSelectionEnd());
+ return toRenderTextControl(renderer())->selection(m_data.cachedSelectionStart(), m_data.cachedSelectionEnd());
}
void HTMLInputElement::documentDidBecomeActive()
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl
index 5536733..7cd91b0 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl
@@ -28,6 +28,9 @@ module html {
attribute [ConvertNullToNullString] DOMString defaultValue;
attribute boolean defaultChecked;
readonly attribute HTMLFormElement form;
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ readonly attribute ValidityState validity;
+#endif
attribute [ConvertNullToNullString] DOMString accept;
attribute [ConvertNullToNullString] DOMString accessKey;
attribute [ConvertNullToNullString] DOMString align;
@@ -69,7 +72,7 @@ module html {
readonly attribute URL absoluteImageURL;
#endif
-#if !defined(LANGUAGE_COM)
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute FileList files;
#endif
};
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.h b/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.h
index 82042cf..a1462b8 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.h
@@ -27,8 +27,7 @@
namespace WebCore {
-class HTMLIsIndexElement : public HTMLInputElement
-{
+class HTMLIsIndexElement : public HTMLInputElement {
public:
HTMLIsIndexElement(const QualifiedName&, Document *doc, HTMLFormElement *f = 0);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
index cb8f36c..986544a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
@@ -181,9 +181,11 @@ void HTMLLinkElement::process()
if (m_isDNSPrefetch && m_url.isValid() && !m_url.isEmpty())
prefetchDNS(m_url.host());
+ bool acceptIfTypeContainsTextCSS = document()->page() && document()->page()->settings() && document()->page()->settings()->treatsAnyTextCSSLinkAsStylesheet();
+
// Stylesheet
// This was buggy and would incorrectly match <link rel="alternate">, which has a different specified meaning. -dwh
- if (m_disabledState != 2 && m_isStyleSheet && document()->frame() && m_url.isValid()) {
+ if (m_disabledState != 2 && (m_isStyleSheet || acceptIfTypeContainsTextCSS && type.contains("text/css")) && document()->frame() && m_url.isValid()) {
// also, don't load style sheets for standalone documents
// Add ourselves as a pending sheet, but only if we aren't an alternate
// stylesheet. Alternate stylesheets don't hold up render tree construction.
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.cpp
index d62eaab..0cb6501 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.cpp
@@ -34,7 +34,7 @@ namespace WebCore {
using namespace HTMLNames;
- // WinIE uses 60ms as the minimum delay by default.
+// WinIE uses 60ms as the minimum delay by default.
const int defaultMinimumDelay = 60;
HTMLMarqueeElement::HTMLMarqueeElement(const QualifiedName& tagName, Document* doc)
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp
index 3d48b82..716a592 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp
@@ -391,7 +391,7 @@ String HTMLMediaElement::canPlayType(const String& mimeType) const
switch (support)
{
case MediaPlayer::IsNotSupported:
- canPlay = "no";
+ canPlay = "";
break;
case MediaPlayer::MayBeSupported:
canPlay = "maybe";
@@ -690,7 +690,6 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
}
if (state == MediaPlayer::Idle) {
- ASSERT(static_cast<ReadyState>(m_player->readyState()) < HAVE_ENOUGH_DATA);
if (m_networkState > NETWORK_IDLE) {
stopPeriodicTimers();
scheduleProgressEvent(eventNames().suspendEvent);
@@ -752,7 +751,6 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
if (m_seeking && m_readyState < HAVE_CURRENT_DATA) {
// 4.8.10.10, step 9
scheduleEvent(eventNames().seekingEvent);
- m_seeking = false;
}
if (wasPotentiallyPlaying && m_readyState < HAVE_FUTURE_DATA) {
@@ -839,6 +837,18 @@ void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
}
}
+void HTMLMediaElement::rewind(float timeDelta)
+{
+ ExceptionCode e;
+ setCurrentTime(max(currentTime() - timeDelta, minTimeSeekable()), e);
+}
+
+void HTMLMediaElement::returnToRealtime()
+{
+ ExceptionCode e;
+ setCurrentTime(maxTimeSeekable(), e);
+}
+
void HTMLMediaElement::seek(float time, ExceptionCode& ec)
{
// 4.8.10.10. Seeking
@@ -891,6 +901,11 @@ HTMLMediaElement::ReadyState HTMLMediaElement::readyState() const
return m_readyState;
}
+MediaPlayer::MovieLoadType HTMLMediaElement::movieLoadType() const
+{
+ return m_player ? m_player->movieLoadType() : MediaPlayer::Unknown;
+}
+
bool HTMLMediaElement::seeking() const
{
return m_seeking;
@@ -1408,9 +1423,9 @@ PassRefPtr<TimeRanges> HTMLMediaElement::played() const
PassRefPtr<TimeRanges> HTMLMediaElement::seekable() const
{
// FIXME real ranges support
- if (!m_player || !m_player->maxTimeSeekable())
+ if (!maxTimeSeekable())
return TimeRanges::create();
- return TimeRanges::create(0, m_player->maxTimeSeekable());
+ return TimeRanges::create(minTimeSeekable(), maxTimeSeekable());
}
bool HTMLMediaElement::potentiallyPlaying() const
@@ -1444,6 +1459,16 @@ bool HTMLMediaElement::pausedForUserInteraction() const
return false;
}
+float HTMLMediaElement::minTimeSeekable() const
+{
+ return 0;
+}
+
+float HTMLMediaElement::maxTimeSeekable() const
+{
+ return m_player ? m_player->maxTimeSeekable() : 0;
+}
+
void HTMLMediaElement::updateVolume()
{
if (!m_player)
@@ -1603,7 +1628,7 @@ bool HTMLMediaElement::processingUserGesture() const
FrameLoader* loader = frame ? frame->loader() : 0;
// return 'true' for safety if we don't know the answer
- return loader ? loader->userGestureHint() : true;
+ return loader ? loader->isProcessingUserGesture() : true;
}
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h
index 8d238d5..486574b 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h
@@ -66,6 +66,9 @@ public:
virtual bool isVideo() const { return false; }
virtual bool hasVideo() const { return false; }
+ void rewind(float timeDelta);
+ void returnToRealtime();
+
virtual bool supportsFullscreen() const { return false; }
void scheduleLoad();
@@ -75,6 +78,8 @@ public:
// Pauses playback without changing any states or generating events
void setPausedInternal(bool);
+ MediaPlayer::MovieLoadType movieLoadType() const;
+
bool inActiveDocument() const { return m_inActiveDocument; }
// DOM API
@@ -221,10 +226,12 @@ private:
bool stoppedDueToErrors() const;
bool pausedForUserInteraction() const;
+ float minTimeSeekable() const;
+ float maxTimeSeekable() const;
+
// Restrictions to change default behaviors. This is a effectively a compile time choice at the moment
// because there are no accessor methods.
- enum BehaviorRestrictions
- {
+ enum BehaviorRestrictions {
NoRestrictions = 0,
RequireUserGestureForLoadRestriction = 1 << 0,
RequireUserGestureForRateChangeRestriction = 1 << 1,
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMenuElement.h b/src/3rdparty/webkit/WebCore/html/HTMLMenuElement.h
index 0f4488d..68b5b8f 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMenuElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMenuElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLMenuElement : public HTMLElement
-{
+class HTMLMenuElement : public HTMLElement {
public:
HTMLMenuElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h
index f535293..d86df2e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h
@@ -28,8 +28,7 @@
namespace WebCore {
-class HTMLMetaElement : public HTMLElement
-{
+class HTMLMetaElement : public HTMLElement {
public:
HTMLMetaElement(const QualifiedName&, Document*);
~HTMLMetaElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLModElement.h b/src/3rdparty/webkit/WebCore/html/HTMLModElement.h
index 399053c..83697f9 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLModElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLModElement.h
@@ -30,8 +30,7 @@ namespace WebCore {
class String;
-class HTMLModElement : public HTMLElement
-{
+class HTMLModElement : public HTMLElement {
public:
HTMLModElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLOListElement.h b/src/3rdparty/webkit/WebCore/html/HTMLOListElement.h
index e459269..b7a13ee 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLOListElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLOListElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLOListElement : public HTMLElement
-{
+class HTMLOListElement : public HTMLElement {
public:
HTMLOListElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLOptionElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLOptionElement.cpp
index 1d446f7..8cb95d0 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLOptionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLOptionElement.cpp
@@ -152,10 +152,10 @@ void HTMLOptionElement::setSelectedState(bool selected)
void HTMLOptionElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
- HTMLSelectElement* select = ownerSelectElement();
- if (select)
- select->childrenChanged(changedByParser);
- HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+ HTMLSelectElement* select = ownerSelectElement();
+ if (select)
+ select->childrenChanged(changedByParser);
+ HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
}
HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParamElement.h b/src/3rdparty/webkit/WebCore/html/HTMLParamElement.h
index 4da2ed3..1867ccf 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLParamElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLParamElement.h
@@ -27,8 +27,7 @@
namespace WebCore {
-class HTMLParamElement : public HTMLElement
-{
+class HTMLParamElement : public HTMLElement {
friend class HTMLAppletElement;
public:
HTMLParamElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
index ea6bbe2..722f4e2 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
@@ -793,6 +793,20 @@ bool HTMLParser::dtCreateErrorCheck(Token* t, RefPtr<Node>& result)
return true;
}
+bool HTMLParser::rpCreateErrorCheck(Token*, RefPtr<Node>&)
+{
+ popBlock(rpTag);
+ popBlock(rtTag);
+ return true;
+}
+
+bool HTMLParser::rtCreateErrorCheck(Token*, RefPtr<Node>&)
+{
+ popBlock(rpTag);
+ popBlock(rtTag);
+ return true;
+}
+
bool HTMLParser::nestedCreateErrorCheck(Token* t, RefPtr<Node>&)
{
popBlock(t->tagName);
@@ -917,6 +931,8 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
gFunctionMap.set(pTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(plaintextTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(preTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
+ gFunctionMap.set(rpTag.localName().impl(), &HTMLParser::rpCreateErrorCheck);
+ gFunctionMap.set(rtTag.localName().impl(), &HTMLParser::rtCreateErrorCheck);
gFunctionMap.set(sTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
gFunctionMap.set(selectTag.localName().impl(), &HTMLParser::selectCreateErrorCheck);
gFunctionMap.set(smallTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
@@ -1656,7 +1672,7 @@ void HTMLParser::reportErrorToConsole(HTMLParserErrorCode errorCode, const Atomi
message.replace("%tag1", tag1);
message.replace("%tag2", tag2);
- frame->domWindow()->console()->addMessage(HTMLMessageSource,
+ frame->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType,
isWarning(errorCode) ? WarningMessageLevel : ErrorMessageLevel,
message, lineNumber, m_document->url().string());
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParser.h b/src/3rdparty/webkit/WebCore/html/HTMLParser.h
index 19f553e..bd12049 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLParser.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLParser.h
@@ -102,6 +102,8 @@ private:
bool noscriptCreateErrorCheck(Token*, RefPtr<Node>&);
bool pCloserCreateErrorCheck(Token*, RefPtr<Node>&);
bool pCloserStrictCreateErrorCheck(Token*, RefPtr<Node>&);
+ bool rpCreateErrorCheck(Token*, RefPtr<Node>&);
+ bool rtCreateErrorCheck(Token*, RefPtr<Node>&);
bool selectCreateErrorCheck(Token*, RefPtr<Node>&);
bool tableCellCreateErrorCheck(Token*, RefPtr<Node>&);
bool tableSectionCreateErrorCheck(Token*, RefPtr<Node>&);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.h b/src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.h
index 623c28f..addbfb4 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.h
@@ -28,8 +28,7 @@ namespace WebCore {
class String;
-class HTMLQuoteElement : public HTMLElement
-{
+class HTMLQuoteElement : public HTMLElement {
public:
HTMLQuoteElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp
index c47bb70..2409f31 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp
@@ -106,13 +106,7 @@ int HTMLSelectElement::activeSelectionEndListIndex() const
unsigned HTMLSelectElement::length() const
{
- unsigned len = 0;
- const Vector<Element*>& items = listItems();
- for (unsigned i = 0; i < items.size(); ++i) {
- if (items[i]->hasLocalName(optionTag))
- ++len;
- }
- return len;
+ return SelectElement::optionCount(m_data, this);
}
void HTMLSelectElement::add(HTMLElement *element, HTMLElement *before, ExceptionCode& ec)
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.idl
index fb08bb1..26f2653 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.idl
@@ -41,6 +41,9 @@ module html {
#endif
readonly attribute HTMLFormElement form;
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ readonly attribute ValidityState validity;
+#endif
readonly attribute boolean willValidate;
// Modified in DOM Level 2:
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.h b/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.h
index fe3adb0..03b4c66 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.h
@@ -28,8 +28,7 @@
namespace WebCore {
-class HTMLStyleElement : public HTMLElement, public StyleElement
-{
+class HTMLStyleElement : public HTMLElement, public StyleElement {
public:
HTMLStyleElement(const QualifiedName&, Document*, bool createdByParser);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.h b/src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.h
index 38bc434..3c2aaa1 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.h
@@ -30,8 +30,7 @@
namespace WebCore {
-class HTMLTableCaptionElement : public HTMLTablePartElement
-{
+class HTMLTableCaptionElement : public HTMLTablePartElement {
public:
HTMLTableCaptionElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.h b/src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.h
index 7e26e94..fc74cae 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.h
@@ -32,8 +32,7 @@
namespace WebCore {
-class HTMLTableCellElement : public HTMLTablePartElement
-{
+class HTMLTableCellElement : public HTMLTablePartElement {
public:
HTMLTableCellElement(const QualifiedName&, Document*);
~HTMLTableCellElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.h b/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.h
index 0bed401..83a26aa 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.h
@@ -34,8 +34,7 @@ namespace WebCore {
class HTMLTableElement;
-class HTMLTableColElement : public HTMLTablePartElement
-{
+class HTMLTableColElement : public HTMLTablePartElement {
public:
HTMLTableColElement(const QualifiedName& tagName, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.cpp
index e91a96a..15fa97e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.cpp
@@ -99,7 +99,7 @@ PassRefPtr<HTMLElement> HTMLTableSectionElement::insertRow(int index, ExceptionC
return r.release();
}
-void HTMLTableSectionElement::deleteRow( int index, ExceptionCode& ec)
+void HTMLTableSectionElement::deleteRow(int index, ExceptionCode& ec)
{
RefPtr<HTMLCollection> children = rows();
int numRows = children ? (int)children->length() : 0;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in b/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in
index e6bbfc9..c066e3c 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in
@@ -25,10 +25,10 @@ cite interfaceName=HTMLElement
code interfaceName=HTMLElement
col interfaceName=HTMLTableColElement
colgroup interfaceName=HTMLTableColElement
-datagrid interfaceName=HTMLDataGridElement
-dcell interfaceName=HTMLDataGridCellElement
-dcol interfaceName=HTMLDataGridColElement
-drow interfaceName=HTMLDataGridRowElement
+datagrid interfaceName=HTMLDataGridElement,conditional=DATAGRID
+dcell interfaceName=HTMLDataGridCellElement,conditional=DATAGRID
+dcol interfaceName=HTMLDataGridColElement,conditional=DATAGRID
+drow interfaceName=HTMLDataGridRowElement,conditional=DATAGRID
dd interfaceName=HTMLElement
del interfaceName=HTMLModElement
dfn interfaceName=HTMLElement
@@ -89,6 +89,9 @@ param
plaintext interfaceName=HTMLElement
pre
q interfaceName=HTMLQuoteElement
+rp interfaceName=HTMLElement
+rt interfaceName=HTMLElement
+ruby interfaceName=HTMLElement
s interfaceName=HTMLElement
samp interfaceName=HTMLElement
script constructorNeedsCreatedByParser
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl
index c4f144b..f6ac05a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl
@@ -27,6 +27,9 @@ module html {
] HTMLTextAreaElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString defaultValue;
readonly attribute HTMLFormElement form;
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ readonly attribute ValidityState validity;
+#endif
attribute [ConvertNullToNullString] DOMString accessKey;
attribute long cols;
attribute boolean disabled;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTitleElement.h b/src/3rdparty/webkit/WebCore/html/HTMLTitleElement.h
index 2cbb667..5335d8d 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTitleElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTitleElement.h
@@ -28,8 +28,7 @@
namespace WebCore {
-class HTMLTitleElement : public HTMLElement
-{
+class HTMLTitleElement : public HTMLElement {
public:
HTMLTitleElement(const QualifiedName&, Document*);
~HTMLTitleElement();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp
index 6966351..5788eb6 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp
@@ -321,7 +321,7 @@ HTMLTokenizer::State HTMLTokenizer::parseNonHTMLText(SegmentedString& src, State
{
ASSERT(state.inTextArea() || state.inTitle() || state.inIFrame() || !state.hasEntityState());
ASSERT(!state.hasTagState());
- ASSERT(state.inXmp() + state.inTextArea() + state.inTitle() + state.inStyle() + state.inScript() + state.inIFrame() == 1 );
+ ASSERT(state.inXmp() + state.inTextArea() + state.inTitle() + state.inStyle() + state.inScript() + state.inIFrame() == 1);
if (state.inScript() && !m_currentScriptTagStartLineNumber)
m_currentScriptTagStartLineNumber = m_lineNumber;
@@ -730,9 +730,9 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
EntityUnicodeValue = 0;
}
- while(!src.isEmpty()) {
+ while (!src.isEmpty()) {
UChar cc = *src;
- switch(state.entityState()) {
+ switch (state.entityState()) {
case NoEntity:
ASSERT(state.entityState() != NoEntity);
return state;
@@ -781,7 +781,7 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
case Decimal:
{
int ll = min(src.length(), 9-cBufferPos);
- while(ll--) {
+ while (ll--) {
cc = *src;
if (!(cc >= '0' && cc <= '9')) {
@@ -800,7 +800,7 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
case EntityName:
{
int ll = min(src.length(), 9-cBufferPos);
- while(ll--) {
+ while (ll--) {
cc = *src;
if (!((cc >= 'a' && cc <= 'z') || (cc >= '0' && cc <= '9') || (cc >= 'A' && cc <= 'Z'))) {
@@ -814,7 +814,7 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
if (cBufferPos == 9)
state.setEntityState(SearchSemicolon);
if (state.entityState() == SearchSemicolon) {
- if(cBufferPos > 1) {
+ if (cBufferPos > 1) {
// Since the maximum length of entity name is 9,
// so a single char array which is allocated on
// the stack, its length is 10, should be OK.
@@ -837,11 +837,11 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
else
e = 0;
- if(e)
+ if (e)
EntityUnicodeValue = e->code;
// be IE compatible
- if(parsingTag && EntityUnicodeValue > 255 && *src != ';')
+ if (parsingTag && EntityUnicodeValue > 255 && *src != ';')
EntityUnicodeValue = 0;
}
}
@@ -1122,7 +1122,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
while (!src.isEmpty()) {
checkBuffer();
- switch(state.tagState()) {
+ switch (state.tagState()) {
case NoTag:
{
m_cBufferPos = cBufferPos;
@@ -1237,7 +1237,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
break;
}
case SearchAttribute:
- while(!src.isEmpty()) {
+ while (!src.isEmpty()) {
UChar curchar = *src;
// In this mode just ignore any quotes we encounter and treat them like spaces.
if (!isASCIISpace(curchar) && curchar != '\'' && curchar != '"') {
@@ -1256,6 +1256,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
break;
case AttributeName:
{
+ m_rawAttributeBeforeValue.clear();
int ll = min(src.length(), CBUFLEN - cBufferPos);
while (ll--) {
UChar curchar = *src;
@@ -1278,6 +1279,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
else
m_cBuffer[cBufferPos++] = curchar;
+ m_rawAttributeBeforeValue.append(curchar);
src.advance(m_lineNumber);
}
if (cBufferPos == CBUFLEN) {
@@ -1309,6 +1311,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
state.setTagState(SearchValue);
if (inViewSourceMode())
m_currentToken.addViewSourceChar(curchar);
+ m_rawAttributeBeforeValue.append(curchar);
src.advancePastNonNewline();
} else {
m_currentToken.addAttribute(m_attrName, emptyAtom, inViewSourceMode());
@@ -1318,11 +1321,12 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
}
break;
}
- if (inViewSourceMode())
- m_currentToken.addViewSourceChar(curchar);
-
+
lastIsSlash = curchar == '/';
+ if (inViewSourceMode())
+ m_currentToken.addViewSourceChar(curchar);
+ m_rawAttributeBeforeValue.append(curchar);
src.advance(m_lineNumber);
}
break;
@@ -1335,6 +1339,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
state.setTagState(QuotedValue);
if (inViewSourceMode())
m_currentToken.addViewSourceChar(curchar);
+ m_rawAttributeBeforeValue.append(curchar);
src.advancePastNonNewline();
} else
state.setTagState(Value);
@@ -1343,6 +1348,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
}
if (inViewSourceMode())
m_currentToken.addViewSourceChar(curchar);
+ m_rawAttributeBeforeValue.append(curchar);
src.advance(m_lineNumber);
}
break;
@@ -1391,6 +1397,13 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
m_currentToken.addViewSourceChar('x');
} else if (inViewSourceMode())
m_currentToken.addViewSourceChar('v');
+
+ if (m_currentToken.beginTag && m_currentToken.tagName == scriptTag && !inViewSourceMode() && !m_parser->skipMode() && m_attrName == srcAttr) {
+ String context(m_rawAttributeBeforeValue.data(), m_rawAttributeBeforeValue.size());
+ if (m_XSSAuditor && !m_XSSAuditor->canLoadExternalScriptFromSrc(context, attributeValue))
+ attributeValue = blankURL().string();
+ }
+
m_currentToken.addAttribute(m_attrName, attributeValue, inViewSourceMode());
m_dest = m_buffer;
state.setTagState(SearchAttribute);
@@ -1407,7 +1420,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
}
break;
case Value:
- while(!src.isEmpty()) {
+ while (!src.isEmpty()) {
checkBuffer();
UChar curchar = *src;
if (curchar <= '>' && !src.escaped()) {
@@ -1421,6 +1434,13 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
// '/' does not delimit in IE!
if (isASCIISpace(curchar) || curchar == '>') {
AtomicString attributeValue(m_buffer + 1, m_dest - m_buffer - 1);
+
+ if (m_currentToken.beginTag && m_currentToken.tagName == scriptTag && !inViewSourceMode() && !m_parser->skipMode() && m_attrName == srcAttr) {
+ String context(m_rawAttributeBeforeValue.data(), m_rawAttributeBeforeValue.size());
+ if (m_XSSAuditor && !m_XSSAuditor->canLoadExternalScriptFromSrc(context, attributeValue))
+ attributeValue = blankURL().string();
+ }
+
m_currentToken.addAttribute(m_attrName, attributeValue, inViewSourceMode());
if (inViewSourceMode())
m_currentToken.addViewSourceChar('v');
@@ -1473,11 +1493,8 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
m_scriptTagCharsetAttrValue = String();
if (m_currentToken.attrs && !m_fragment) {
if (m_doc->frame() && m_doc->frame()->script()->isEnabled()) {
- if ((a = m_currentToken.attrs->getAttributeItem(srcAttr))) {
+ if ((a = m_currentToken.attrs->getAttributeItem(srcAttr)))
m_scriptTagSrcAttrValue = m_doc->completeURL(parseURL(a->value())).string();
- if (m_XSSAuditor && !m_XSSAuditor->canLoadExternalScriptFromSrc(a->value()))
- m_scriptTagSrcAttrValue = String();
- }
}
}
}
@@ -1684,7 +1701,7 @@ void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
else if (state.startTag()) {
state.setStartTag(false);
- switch(cc) {
+ switch (cc) {
case '/':
break;
case '!': {
@@ -1712,7 +1729,7 @@ void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
}
// else fall through
default: {
- if( ((cc >= 'a') && (cc <= 'z')) || ((cc >= 'A') && (cc <= 'Z'))) {
+ if ( ((cc >= 'a') && (cc <= 'z')) || ((cc >= 'A') && (cc <= 'Z'))) {
// Start of a Start-Tag
} else {
// Invalid tag
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h
index 6612af8..d731b2d 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h
@@ -213,6 +213,10 @@ private:
Token m_currentToken;
+ // This buffer holds the raw characters we've seen between the beginning of
+ // the attribute name and the first character of the attribute value.
+ Vector<UChar, 32> m_rawAttributeBeforeValue;
+
// Tokenizer flags
//////////////////
// are we in quotes within a html tag
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLUListElement.h b/src/3rdparty/webkit/WebCore/html/HTMLUListElement.h
index 3a565a4..1eda5f3 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLUListElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLUListElement.h
@@ -26,8 +26,7 @@
namespace WebCore {
-class HTMLUListElement : public HTMLElement
-{
+class HTMLUListElement : public HTMLElement {
public:
HTMLUListElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp
index a6210a2..ecd74e7 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp
@@ -186,7 +186,7 @@ void HTMLVideoElement::updatePosterImage()
#endif
}
-void HTMLVideoElement::paint(GraphicsContext* context, const IntRect& r)
+void HTMLVideoElement::paint(GraphicsContext* context, const IntRect& destRect)
{
// FIXME: We should also be able to paint the poster image.
@@ -195,7 +195,19 @@ void HTMLVideoElement::paint(GraphicsContext* context, const IntRect& r)
return;
player->setVisible(true); // Make player visible or it won't draw.
- player->paint(context, r);
+ player->paint(context, destRect);
+}
+
+void HTMLVideoElement::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& destRect)
+{
+ // FIXME: We should also be able to paint the poster image.
+
+ MediaPlayer* player = HTMLMediaElement::player();
+ if (!player)
+ return;
+
+ player->setVisible(true); // Make player visible or it won't draw.
+ player->paintCurrentFrameInContext(context, destRect);
}
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h
index 830e72e..dc9714a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h
@@ -35,8 +35,7 @@ namespace WebCore {
class HTMLImageLoader;
-class HTMLVideoElement : public HTMLMediaElement
-{
+class HTMLVideoElement : public HTMLMediaElement {
public:
HTMLVideoElement(const QualifiedName&, Document*);
@@ -67,8 +66,9 @@ public:
void updatePosterImage();
- // Used by canvas to gain raw pixel access
void paint(GraphicsContext*, const IntRect&);
+ // Used by canvas to gain raw pixel access
+ void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
private:
OwnPtr<HTMLImageLoader> m_imageLoader;
diff --git a/src/3rdparty/webkit/WebCore/html/ImageData.idl b/src/3rdparty/webkit/WebCore/html/ImageData.idl
index 7f37b52..8025de1 100644
--- a/src/3rdparty/webkit/WebCore/html/ImageData.idl
+++ b/src/3rdparty/webkit/WebCore/html/ImageData.idl
@@ -29,8 +29,8 @@
module html {
interface [
+ CustomToJS,
GenerateConstructor,
- GenerateToJS
] ImageData {
readonly attribute long width;
readonly attribute long height;
diff --git a/src/3rdparty/webkit/WebCore/html/TimeRanges.h b/src/3rdparty/webkit/WebCore/html/TimeRanges.h
index 37820dc..6be8c4e 100644
--- a/src/3rdparty/webkit/WebCore/html/TimeRanges.h
+++ b/src/3rdparty/webkit/WebCore/html/TimeRanges.h
@@ -64,7 +64,8 @@ private:
// We consider all the Ranges to be semi-bounded as follow: [start, end[
struct Range {
Range() { }
- Range(float start, float end) {
+ Range(float start, float end)
+ {
m_start = start;
m_end = end;
}
diff --git a/src/3rdparty/webkit/WebCore/html/ValidityState.cpp b/src/3rdparty/webkit/WebCore/html/ValidityState.cpp
new file mode 100644
index 0000000..8ff629c
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/ValidityState.cpp
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
+ *
+ * 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 "ValidityState.h"
+#include "HTMLFormControlElement.h"
+
+namespace WebCore {
+
+ValidityState::ValidityState(HTMLFormControlElement* parent)
+ : m_control(parent)
+{
+ ASSERT(parent);
+}
+
+bool ValidityState::valid()
+{
+ bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow() ||
+ tooLong() || patternMismatch() || valueMissing() || customError();
+
+ return !someError;
+}
+
+} // namespace
diff --git a/src/3rdparty/webkit/WebCore/html/ValidityState.h b/src/3rdparty/webkit/WebCore/html/ValidityState.h
new file mode 100644
index 0000000..a011f7a
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/ValidityState.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef ValidityState_h
+#define ValidityState_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+ class HTMLFormControlElement;
+
+ class ValidityState : public RefCounted<ValidityState> {
+ public:
+ static PassRefPtr<ValidityState> create(HTMLFormControlElement* owner)
+ {
+ return adoptRef(new ValidityState(owner));
+ }
+
+ HTMLFormControlElement* control() const { return m_control; }
+
+ bool valueMissing() { return false; }
+ bool typeMismatch() { return false; }
+ bool patternMismatch() { return false; }
+ bool tooLong() { return false; }
+ bool rangeUnderflow() { return false; }
+ bool rangeOverflow() { return false; }
+ bool stepMismatch() { return false; }
+ bool customError() { return false; }
+ bool valid();
+
+ private:
+ ValidityState(HTMLFormControlElement*);
+ HTMLFormControlElement* m_control;
+ };
+
+} // namespace WebCore
+
+#endif // ValidityState_h
diff --git a/src/3rdparty/webkit/WebCore/html/ValidityState.idl b/src/3rdparty/webkit/WebCore/html/ValidityState.idl
new file mode 100644
index 0000000..b926852
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/ValidityState.idl
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
+ *
+ * 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.
+ *
+ */
+
+module html {
+
+ interface ValidityState {
+ readonly attribute boolean valueMissing;
+ readonly attribute boolean typeMismatch;
+ readonly attribute boolean patternMismatch;
+ readonly attribute boolean tooLong;
+ readonly attribute boolean rangeUnderflow;
+ readonly attribute boolean rangeOverflow;
+ readonly attribute boolean stepMismatch;
+ readonly attribute boolean customError;
+ readonly attribute boolean valid;
+ };
+}
diff --git a/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.cpp b/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.cpp
index b3c0218..609197e 100644
--- a/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.cpp
@@ -38,8 +38,9 @@
namespace WebCore {
-ConsoleMessage::ConsoleMessage(MessageSource s, MessageLevel l, const String& m, unsigned li, const String& u, unsigned g)
+ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, const String& m, unsigned li, const String& u, unsigned g)
: m_source(s)
+ , m_type(t)
, m_level(l)
, m_message(m)
, m_line(li)
@@ -49,8 +50,9 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageLevel l, const String& m,
{
}
-ConsoleMessage::ConsoleMessage(MessageSource s, MessageLevel l, ScriptCallStack* callStack, unsigned g, bool storeTrace)
+ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, ScriptCallStack* callStack, unsigned g, bool storeTrace)
: m_source(s)
+ , m_type(t)
, m_level(l)
, m_wrappedArguments(callStack->at(0).argumentCount())
, m_frames(storeTrace ? callStack->size() : 0)
@@ -77,6 +79,7 @@ void ConsoleMessage::addToConsole(InspectorFrontend* frontend)
{
InspectorJSONObject jsonObj = frontend->newInspectorJSONObject();
jsonObj.set("source", static_cast<int>(m_source));
+ jsonObj.set("type", static_cast<int>(m_type));
jsonObj.set("level", static_cast<int>(m_level));
jsonObj.set("line", static_cast<int>(m_line));
jsonObj.set("url", m_url);
@@ -109,6 +112,7 @@ bool ConsoleMessage::isEqual(ScriptState* state, ConsoleMessage* msg) const
}
return msg->m_source == m_source
+ && msg->m_type == m_type
&& msg->m_level == m_level
&& msg->m_message == m_message
&& msg->m_line == m_line
diff --git a/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.h b/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.h
index 15e6e7e..5b2f7d5 100644
--- a/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.h
+++ b/src/3rdparty/webkit/WebCore/inspector/ConsoleMessage.h
@@ -44,8 +44,8 @@ namespace WebCore {
class ConsoleMessage {
public:
- ConsoleMessage(MessageSource, MessageLevel, const String& m, unsigned li, const String& u, unsigned g);
- ConsoleMessage(MessageSource, MessageLevel, ScriptCallStack*, unsigned g, bool storeTrace = false);
+ ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, unsigned li, const String& u, unsigned g);
+ ConsoleMessage(MessageSource, MessageType, MessageLevel, ScriptCallStack*, unsigned g, bool storeTrace = false);
void addToConsole(InspectorFrontend* frontend);
void incrementCount() { ++m_repeatCount; };
@@ -53,6 +53,7 @@ namespace WebCore {
private:
MessageSource m_source;
+ MessageType m_type;
MessageLevel m_level;
String m_message;
Vector<ScriptValue> m_wrappedArguments;
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp
index 7e0cf31..4b2dd59 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp
@@ -395,20 +395,20 @@ void InspectorController::setWindowVisible(bool visible, bool attached)
m_showAfterVisible = CurrentPanel;
}
-void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, ScriptCallStack* callStack)
+void InspectorController::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, ScriptCallStack* callStack)
{
if (!enabled())
return;
- addConsoleMessage(callStack->state(), new ConsoleMessage(source, level, callStack, m_groupLevel, level == TraceMessageLevel));
+ addConsoleMessage(callStack->state(), new ConsoleMessage(source, type, level, callStack, m_groupLevel, type == TraceMessageType));
}
-void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
+void InspectorController::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
{
if (!enabled())
return;
- addConsoleMessage(0, new ConsoleMessage(source, level, message, lineNumber, sourceID, m_groupLevel));
+ addConsoleMessage(0, new ConsoleMessage(source, type, level, message, lineNumber, sourceID, m_groupLevel));
}
void InspectorController::addConsoleMessage(ScriptState* scriptState, ConsoleMessage* consoleMessage)
@@ -440,7 +440,7 @@ void InspectorController::startGroup(MessageSource source, ScriptCallStack* call
{
++m_groupLevel;
- addConsoleMessage(callStack->state(), new ConsoleMessage(source, StartGroupMessageLevel, callStack, m_groupLevel));
+ addConsoleMessage(callStack->state(), new ConsoleMessage(source, StartGroupMessageType, LogMessageLevel, callStack, m_groupLevel));
}
void InspectorController::endGroup(MessageSource source, unsigned lineNumber, const String& sourceURL)
@@ -450,7 +450,7 @@ void InspectorController::endGroup(MessageSource source, unsigned lineNumber, co
--m_groupLevel;
- addConsoleMessage(0, new ConsoleMessage(source, EndGroupMessageLevel, String(), lineNumber, sourceURL, m_groupLevel));
+ addConsoleMessage(0, new ConsoleMessage(source, EndGroupMessageType, LogMessageLevel, String(), lineNumber, sourceURL, m_groupLevel));
}
void InspectorController::attachWindow()
@@ -987,7 +987,8 @@ void InspectorController::scriptImported(unsigned long identifier, const String&
resource->updateScriptObject(m_frontend.get());
}
-void InspectorController::enableResourceTracking(bool always) {
+void InspectorController::enableResourceTracking(bool always)
+{
if (!enabled())
return;
@@ -1005,7 +1006,8 @@ void InspectorController::enableResourceTracking(bool always) {
m_inspectedPage->mainFrame()->loader()->reload();
}
-void InspectorController::disableResourceTracking(bool always) {
+void InspectorController::disableResourceTracking(bool always)
+{
if (!enabled())
return;
@@ -1098,7 +1100,7 @@ void InspectorController::addProfileFinishedMessageToConsole(PassRefPtr<Profile>
message += "/";
message += UString::from(profile->uid());
message += "\" finished.";
- addMessageToConsole(JSMessageSource, LogMessageLevel, message, lineNumber, sourceURL);
+ addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
}
void InspectorController::addStartProfilingMessageToConsole(const UString& title, unsigned lineNumber, const UString& sourceURL)
@@ -1106,7 +1108,7 @@ void InspectorController::addStartProfilingMessageToConsole(const UString& title
UString message = "Profile \"webkit-profile://";
message += encodeWithURLEscapeSequences(title);
message += "/0\" started.";
- addMessageToConsole(JSMessageSource, LogMessageLevel, message, lineNumber, sourceURL);
+ addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
}
void InspectorController::addScriptProfile(Profile* profile)
@@ -1506,7 +1508,7 @@ void InspectorController::count(const String& title, unsigned lineNumber, const
m_counts.add(identifier, count);
String message = String::format("%s: %d", title.utf8().data(), count);
- addMessageToConsole(JSMessageSource, LogMessageLevel, message, lineNumber, sourceID);
+ addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceID);
}
void InspectorController::startTiming(const String& title)
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h
index 8ba8669..4c90bc5 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h
@@ -173,8 +173,8 @@ public:
void addResourceSourceToFrame(long identifier, Node* frame);
bool addSourceToFrame(const String& mimeType, const String& source, Node*);
- void addMessageToConsole(MessageSource, MessageLevel, ScriptCallStack*);
- void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
+ void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*);
+ void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
void clearConsoleMessages();
void attachWindow();
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp
index 255f1d8..c1abd31 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp
@@ -61,7 +61,8 @@ InspectorFrontend::~InspectorFrontend()
m_webInspector = ScriptObject();
}
-InspectorJSONObject InspectorFrontend::newInspectorJSONObject() {
+InspectorJSONObject InspectorFrontend::newInspectorJSONObject()
+{
return InspectorJSONObject::createNew(m_scriptState);
}
diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp
index 6e8fce9..1ce0def 100644
--- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp
@@ -62,6 +62,14 @@ const JSC::ScopeChainNode* JavaScriptCallFrame::scopeChain() const
return m_debuggerCallFrame.scopeChain();
}
+JSC::JSGlobalObject* JavaScriptCallFrame::dynamicGlobalObject() const
+{
+ ASSERT(m_isValid);
+ if (!m_isValid)
+ return 0;
+ return m_debuggerCallFrame.dynamicGlobalObject();
+}
+
String JavaScriptCallFrame::functionName() const
{
ASSERT(m_isValid);
diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.h b/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.h
index 9f193d8..e86b0eb 100644
--- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.h
+++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.h
@@ -61,6 +61,7 @@ namespace WebCore {
String functionName() const;
JSC::DebuggerCallFrame::Type type() const;
const JSC::ScopeChainNode* scopeChain() const;
+ JSC::JSGlobalObject* dynamicGlobalObject() const;
JSC::JSObject* thisObject() const;
JSC::JSValue evaluate(const JSC::UString& script, JSC::JSValue& exception) const;
diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp
index bb6358c..84bc2f6 100644
--- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp
@@ -275,6 +275,19 @@ static Page* toPage(JSGlobalObject* globalObject)
return frame ? frame->page() : 0;
}
+void JavaScriptDebugServer::detach(JSGlobalObject* globalObject)
+{
+ // If we're detaching from the currently executing global object, manually tear down our
+ // stack, since we won't get further debugger callbacks to do so. Also, resume execution,
+ // since there's no point in staying paused once a window closes.
+ if (m_currentCallFrame && m_currentCallFrame->dynamicGlobalObject() == globalObject) {
+ m_currentCallFrame = 0;
+ m_pauseOnCallFrame = 0;
+ continueProgram();
+ }
+ Debugger::detach(globalObject);
+}
+
void JavaScriptDebugServer::sourceParsed(ExecState* exec, const SourceCode& source, int errorLine, const UString& errorMessage)
{
if (m_callingListeners)
@@ -387,12 +400,12 @@ void JavaScriptDebugServer::setJavaScriptPaused(FrameView* view, bool paused)
if (!view)
return;
- const HashSet<Widget*>* children = view->children();
+ const HashSet<RefPtr<Widget> >* children = view->children();
ASSERT(children);
- HashSet<Widget*>::const_iterator end = children->end();
- for (HashSet<Widget*>::const_iterator it = children->begin(); it != end; ++it) {
- Widget* widget = *it;
+ HashSet<RefPtr<Widget> >::const_iterator end = children->end();
+ for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it != end; ++it) {
+ Widget* widget = (*it).get();
if (!widget->isPluginView())
continue;
static_cast<PluginView*>(widget)->setJavaScriptPaused(paused);
diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h
index 4ec3e33..baa6699 100644
--- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h
+++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h
@@ -39,6 +39,7 @@
namespace JSC {
class DebuggerCallFrame;
+ class JSGlobalObject;
}
namespace WebCore {
@@ -99,6 +100,8 @@ namespace WebCore {
void dispatchFunctionToListeners(JavaScriptExecutionCallback, Page*);
void pauseIfNeeded(Page*);
+
+ virtual void detach(JSC::JSGlobalObject*);
virtual void sourceParsed(JSC::ExecState*, const JSC::SourceCode&, int errorLine, const JSC::UString& errorMsg);
virtual void callEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/CallStackSidebarPane.js b/src/3rdparty/webkit/WebCore/inspector/front-end/CallStackSidebarPane.js
index a2c8bed..c08cc7a 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/CallStackSidebarPane.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/CallStackSidebarPane.js
@@ -26,6 +26,16 @@
WebInspector.CallStackSidebarPane = function()
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Call Stack"));
+
+ this._shortcuts = {};
+
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Period,
+ WebInspector.KeyboardShortcut.Modifiers.Ctrl);
+ this._shortcuts[shortcut] = this._selectNextCallFrameOnStack.bind(this);
+
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Comma,
+ WebInspector.KeyboardShortcut.Modifiers.Ctrl);
+ this._shortcuts[shortcut] = this._selectPreviousCallFrameOnStack.bind(this);
}
WebInspector.CallStackSidebarPane.prototype = {
@@ -100,6 +110,53 @@ WebInspector.CallStackSidebarPane.prototype = {
this.dispatchEventToListeners("call frame selected");
},
+ handleKeyEvent: function(event)
+ {
+ var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
+ var handler = this._shortcuts[shortcut];
+ if (handler) {
+ handler(event);
+ event.preventDefault();
+ event.handled = true;
+ }
+ },
+
+ _selectNextCallFrameOnStack: function()
+ {
+ var index = this._selectedCallFrameIndex();
+ if (index == -1)
+ return;
+ this._selectedPlacardByIndex(index + 1);
+ },
+
+ _selectPreviousCallFrameOnStack: function()
+ {
+ var index = this._selectedCallFrameIndex();
+ if (index == -1)
+ return;
+ this._selectedPlacardByIndex(index - 1);
+ },
+
+ _selectedPlacardByIndex: function(index)
+ {
+ if (index < 0 || index >= this.placards.length)
+ return;
+ var placard = this.placards[index];
+ this.selectedCallFrame = placard.callFrame
+ },
+
+ _selectedCallFrameIndex: function()
+ {
+ if (!this._selectedCallFrame)
+ return -1;
+ for (var i = 0; i < this.placards.length; ++i) {
+ var placard = this.placards[i];
+ if (placard.callFrame === this._selectedCallFrame)
+ return i;
+ }
+ return -1;
+ },
+
_placardSelected: function(event)
{
var placardElement = event.target.enclosingNodeOrSelfWithClass("placard");
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js b/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js
index bce1784..ca9ac00 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js
@@ -198,7 +198,7 @@ WebInspector.Console.prototype = {
this.messages.push(msg);
- if (msg.level === WebInspector.ConsoleMessage.MessageLevel.EndGroup) {
+ if (msg.type === WebInspector.ConsoleMessage.MessageType.EndGroup) {
if (this.groupLevel < 1)
return;
@@ -206,7 +206,7 @@ WebInspector.Console.prototype = {
this.currentGroup = this.currentGroup.parentGroup;
} else {
- if (msg.level === WebInspector.ConsoleMessage.MessageLevel.StartGroup) {
+ if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup) {
this.groupLevel++;
var group = new WebInspector.ConsoleGroup(this.currentGroup, this.groupLevel);
@@ -260,16 +260,7 @@ WebInspector.Console.prototype = {
return;
var reportCompletions = this._reportCompletions.bind(this, bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix);
- if (expressionString) {
- this._evalInInspectedWindow(expressionString, reportCompletions);
- } else {
- // There is no expressionString, so the completion should happen against global properties.
- // Or if the debugger is paused, against properties in scope of the selected call frame.
- if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused)
- reportCompletions(WebInspector.panels.scripts.variablesInScopeForSelectedCallFrame());
- else
- reportCompletions(InspectorController.inspectedWindow());
- }
+ this._evalInInspectedWindow(expressionString, reportCompletions);
},
_reportCompletions: function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result) {
@@ -397,7 +388,6 @@ WebInspector.Console.prototype = {
WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, callback);
return;
}
-
this.doEvalInWindow(expression, callback);
},
@@ -431,6 +421,11 @@ WebInspector.Console.prototype = {
doEvalInWindow: function(expression, callback)
{
+ if (!expression) {
+ // There is no expression, so the completion should happen against global properties.
+ expression = "this";
+ }
+
// Surround the expression in with statements to inject our command line API so that
// the window object properties still take more precedent than our API functions.
expression = "with (window._inspectorCommandLineAPI) { with (window) { " + expression + " } }";
@@ -581,23 +576,24 @@ WebInspector.Console.prototype = {
WebInspector.Console.prototype.__proto__ = WebInspector.View.prototype;
-WebInspector.ConsoleMessage = function(source, level, line, url, groupLevel, repeatCount)
+WebInspector.ConsoleMessage = function(source, type, level, line, url, groupLevel, repeatCount)
{
this.source = source;
+ this.type = type;
this.level = level;
this.line = line;
this.url = url;
this.groupLevel = groupLevel;
this.repeatCount = repeatCount;
- if (arguments.length > 6)
- this.setMessageBody(Array.prototype.slice.call(arguments, 6));
+ if (arguments.length > 7)
+ this.setMessageBody(Array.prototype.slice.call(arguments, 7));
}
WebInspector.ConsoleMessage.prototype = {
setMessageBody: function(args)
{
- switch (this.level) {
- case WebInspector.ConsoleMessage.MessageLevel.Trace:
+ switch (this.type) {
+ case WebInspector.ConsoleMessage.MessageType.Trace:
var span = document.createElement("span");
span.addStyleClass("console-formatted-trace");
var stack = Array.prototype.slice.call(args);
@@ -607,7 +603,7 @@ WebInspector.ConsoleMessage.prototype = {
span.appendChild(document.createTextNode(funcNames.join("\n")));
this.formattedMessage = span;
break;
- case WebInspector.ConsoleMessage.MessageLevel.Object:
+ case WebInspector.ConsoleMessage.MessageType.Object:
this.formattedMessage = this._format(["%O", args[0]]);
break;
default:
@@ -725,8 +721,10 @@ WebInspector.ConsoleMessage.prototype = {
case WebInspector.ConsoleMessage.MessageLevel.Error:
element.addStyleClass("console-error-level");
break;
- case WebInspector.ConsoleMessage.MessageLevel.StartGroup:
- element.addStyleClass("console-group-title-level");
+ }
+
+ if (this.type === WebInspector.ConsoleMessage.MessageType.StartGroup) {
+ element.addStyleClass("console-group-title");
}
if (this.elementsTreeOutline) {
@@ -793,6 +791,25 @@ WebInspector.ConsoleMessage.prototype = {
break;
}
+ var typeString;
+ switch (this.type) {
+ case WebInspector.ConsoleMessage.MessageType.Log:
+ typeString = "Log";
+ break;
+ case WebInspector.ConsoleMessage.MessageType.Object:
+ typeString = "Object";
+ break;
+ case WebInspector.ConsoleMessage.MessageType.Trace:
+ typeString = "Trace";
+ break;
+ case WebInspector.ConsoleMessage.MessageType.StartGroup:
+ typeString = "Start Group";
+ break;
+ case WebInspector.ConsoleMessage.MessageType.EndGroup:
+ typeString = "End Group";
+ break;
+ }
+
var levelString;
switch (this.level) {
case WebInspector.ConsoleMessage.MessageLevel.Tip:
@@ -807,21 +824,9 @@ WebInspector.ConsoleMessage.prototype = {
case WebInspector.ConsoleMessage.MessageLevel.Error:
levelString = "Error";
break;
- case WebInspector.ConsoleMessage.MessageLevel.Object:
- levelString = "Object";
- break;
- case WebInspector.ConsoleMessage.MessageLevel.Trace:
- levelString = "Trace";
- break;
- case WebInspector.ConsoleMessage.MessageLevel.StartGroup:
- levelString = "Start Group";
- break;
- case WebInspector.ConsoleMessage.MessageLevel.EndGroup:
- levelString = "End Group";
- break;
}
- return sourceString + " " + levelString + ": " + this.formattedMessage.textContent + "\n" + this.url + " line " + this.line;
+ return sourceString + " " + typeString + " " + levelString + ": " + this.formattedMessage.textContent + "\n" + this.url + " line " + this.line;
},
isEqual: function(msg, disreguardGroup)
@@ -830,6 +835,7 @@ WebInspector.ConsoleMessage.prototype = {
return false;
var ret = (this.source == msg.source)
+ && (this.type == msg.type)
&& (this.level == msg.level)
&& (this.line == msg.line)
&& (this.url == msg.url)
@@ -849,15 +855,19 @@ WebInspector.ConsoleMessage.MessageSource = {
Other: 5
}
+WebInspector.ConsoleMessage.MessageType = {
+ Log: 0,
+ Object: 1,
+ Trace: 2,
+ StartGroup: 3,
+ EndGroup: 4
+}
+
WebInspector.ConsoleMessage.MessageLevel = {
Tip: 0,
Log: 1,
Warning: 2,
- Error: 3,
- Object: 4,
- Trace: 5,
- StartGroup: 6,
- EndGroup: 7
+ Error: 3
}
WebInspector.ConsoleCommand = function(command)
@@ -888,7 +898,7 @@ WebInspector.ConsoleCommandResult = function(result, exception, originatingComma
var line = (exception ? result.line : -1);
var url = (exception ? result.sourceURL : null);
- WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, level, line, url, null, 1, message);
+ WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Log, level, line, url, null, 1, message);
this.originatingCommand = originatingCommand;
}
@@ -925,7 +935,7 @@ WebInspector.ConsoleGroup.prototype = {
{
var element = msg.toMessageElement();
- if (msg.level === WebInspector.ConsoleMessage.MessageLevel.StartGroup) {
+ if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup) {
this.messagesElement.parentNode.insertBefore(element, this.messagesElement);
element.addEventListener("click", this._titleClicked.bind(this), true);
} else
@@ -937,7 +947,7 @@ WebInspector.ConsoleGroup.prototype = {
_titleClicked: function(event)
{
- var groupTitleElement = event.target.enclosingNodeOrSelfWithClass("console-group-title-level");
+ var groupTitleElement = event.target.enclosingNodeOrSelfWithClass("console-group-title");
if (groupTitleElement) {
var groupElement = groupTitleElement.enclosingNodeOrSelfWithClass("console-group");
if (groupElement)
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/KeyboardShortcut.js b/src/3rdparty/webkit/WebCore/inspector/front-end/KeyboardShortcut.js
new file mode 100644
index 0000000..ed28a48
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/KeyboardShortcut.js
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+WebInspector.KeyboardShortcut = function()
+{
+};
+
+/**
+ * Constants for encoding modifier key set as a bit mask.
+ * @see #_makeKeyFromCodeAndModifiers
+ */
+WebInspector.KeyboardShortcut.Modifiers = {
+ None: 0, // Constant for empty modifiers set.
+ Shift: 1,
+ Ctrl: 2,
+ Alt: 4,
+ Meta: 8 // Command key on Mac, Win key on other platforms.
+};
+
+WebInspector.KeyboardShortcut.KeyCodes = {
+ Esc: 27,
+ Space: 32,
+ PageUp: 33, // also NUM_NORTH_EAST
+ PageDown: 34, // also NUM_SOUTH_EAST
+ End: 35, // also NUM_SOUTH_WEST
+ Home: 36, // also NUM_NORTH_WEST
+ Left: 37, // also NUM_WEST
+ Up: 38, // also NUM_NORTH
+ Right: 39, // also NUM_EAST
+ Down: 40, // also NUM_SOUTH
+ F1: 112,
+ F2: 113,
+ F3: 114,
+ F4: 115,
+ F5: 116,
+ F6: 117,
+ F7: 118,
+ F8: 119,
+ F9: 120,
+ F10: 121,
+ F11: 122,
+ F12: 123,
+ Semicolon: 186, // ;
+ Comma: 188, // ,
+ Period: 190, // .
+ Slash: 191, // /
+ Apostrophe: 192, // `
+ SingleQuote: 222, // '
+};
+
+/**
+ * Creates a number encoding keyCode in the lower 8 bits and modifiers mask in the higher 8 bits.
+ * It is usefull for matching pressed keys.
+ * @param {number} keyCode Code of the key.
+ * @param {number} optModifiers Optional list of modifiers passed as additional paramerters.
+ */
+WebInspector.KeyboardShortcut.makeKey = function(keyCode, optModifiers)
+{
+ var modifiers = WebInspector.KeyboardShortcut.Modifiers.None;
+ for (var i = 1; i < arguments.length; i++)
+ modifiers |= arguments[i];
+ return WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers(keyCode, modifiers);
+};
+
+WebInspector.KeyboardShortcut.makeKeyFromEvent = function(keyboardEvent)
+{
+ var modifiers = WebInspector.KeyboardShortcut.Modifiers.None;
+ if (keyboardEvent.shiftKey)
+ modifiers |= WebInspector.KeyboardShortcut.Modifiers.Shift;
+ if (keyboardEvent.ctrlKey)
+ modifiers |= WebInspector.KeyboardShortcut.Modifiers.Ctrl;
+ if (keyboardEvent.altKey)
+ modifiers |= WebInspector.KeyboardShortcut.Modifiers.Alt;
+ if (keyboardEvent.metaKey)
+ modifiers |= WebInspector.KeyboardShortcut.Modifiers.Meta;
+ return WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers(keyboardEvent.keyCode, modifiers);
+};
+
+WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers = function(keyCode, modifiers)
+{
+ return (keyCode & 255) | (modifiers << 8);
+};
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js b/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js
index 058f232..85d5cd2 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js
@@ -489,7 +489,8 @@ WebInspector.Resource.prototype = {
// Otherwise, we flood the Console with too many tips.
/*
var msg = new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,
- WebInspector.ConsoleMessage.MessageLevel.Tip, -1, this.url, null, 1, tip.message);
+ WebInspector.ConsoleMessage.MessageType.Log, WebInspector.ConsoleMessage.MessageLevel.Tip,
+ -1, this.url, null, 1, tip.message);
WebInspector.console.addMessage(msg);
*/
},
@@ -549,6 +550,7 @@ WebInspector.Resource.prototype = {
case WebInspector.Warnings.IncorrectMIMEType.id:
if (!this._mimeTypeIsConsistentWithType())
msg = new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,
+ WebInspector.ConsoleMessage.MessageType.Log,
WebInspector.ConsoleMessage.MessageLevel.Warning, -1, this.url, null, 1,
String.sprintf(WebInspector.Warnings.IncorrectMIMEType.message,
WebInspector.Resource.Type.toString(this.type), this.mimeType));
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js
index 04d998e..c4ea83f 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js
@@ -126,7 +126,7 @@ WebInspector.ResourcesPanel = function()
this.resourcesTreeElement.expand();
- var panelEnablerHeading = WebInspector.UIString("You need to enable resource tracking to use the this panel.");
+ var panelEnablerHeading = WebInspector.UIString("You need to enable resource tracking to use this panel.");
var panelEnablerDisclaimer = WebInspector.UIString("Enabling resource tracking will reload the page and make page loading slower.");
var panelEnablerButton = WebInspector.UIString("Enable resource tracking");
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js
index d30c002..68013c9 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js
@@ -163,6 +163,39 @@ WebInspector.ScriptsPanel = function()
this._breakpointsURLMap = {};
+ this._shortcuts = {};
+
+ var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var platformSpecificModifier = isMac ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl;
+
+ // Continue.
+ var handler = this.pauseButton.click.bind(this.pauseButton);
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.F8);
+ this._shortcuts[shortcut] = handler;
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Slash, platformSpecificModifier);
+ this._shortcuts[shortcut] = handler;
+
+ // Step over.
+ var handler = this.stepOverButton.click.bind(this.stepOverButton);
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.F10);
+ this._shortcuts[shortcut] = handler;
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.SingleQuote, platformSpecificModifier);
+ this._shortcuts[shortcut] = handler;
+
+ // Step into.
+ var handler = this.stepIntoButton.click.bind(this.stepIntoButton);
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.F11);
+ this._shortcuts[shortcut] = handler;
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Semicolon, platformSpecificModifier);
+ this._shortcuts[shortcut] = handler;
+
+ // Step out.
+ var handler = this.stepOutButton.click.bind(this.stepOutButton);
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.F11, WebInspector.KeyboardShortcut.Modifiers.Shift);
+ this._shortcuts[shortcut] = handler;
+ var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Semicolon, WebInspector.KeyboardShortcut.Modifiers.Shift, platformSpecificModifier);
+ this._shortcuts[shortcut] = handler;
+
this.reset();
}
@@ -337,8 +370,14 @@ WebInspector.ScriptsPanel.prototype = {
doEvalInCallFrame: function(callFrame, code, callback)
{
+ var panel = this;
function delayedEvaluation()
{
+ if (!code) {
+ // Evaluate into properties in scope of the selected call frame.
+ callback(panel._variablesInScope(callFrame));
+ return;
+ }
try {
callback(callFrame.evaluate(code));
} catch (e) {
@@ -348,20 +387,15 @@ WebInspector.ScriptsPanel.prototype = {
setTimeout(delayedEvaluation, 0);
},
- variablesInScopeForSelectedCallFrame: function()
+ _variablesInScope: function(callFrame)
{
- var selectedCallFrame = this.sidebarPanes.callstack.selectedCallFrame;
- if (!this._paused || !selectedCallFrame)
- return {};
-
var result = {};
- var scopeChain = selectedCallFrame.scopeChain;
+ var scopeChain = callFrame.scopeChain;
for (var i = 0; i < scopeChain.length; ++i) {
var scopeObject = scopeChain[i];
for (var property in scopeObject)
result[property] = true;
}
-
return result;
},
@@ -486,6 +520,19 @@ WebInspector.ScriptsPanel.prototype = {
this._showScriptOrResource((view.resource || view.script));
},
+ handleKeyEvent: function(event)
+ {
+ var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
+ var handler = this._shortcuts[shortcut];
+ if (handler) {
+ handler(event);
+ event.preventDefault();
+ event.handled = true;
+ } else {
+ this.sidebarPanes.callstack.handleKeyEvent(event);
+ }
+ },
+
scriptViewForScript: function(script)
{
if (!script)
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/TextPrompt.js b/src/3rdparty/webkit/WebCore/inspector/front-end/TextPrompt.js
index 30772f7..4194ff1 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/TextPrompt.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/TextPrompt.js
@@ -159,10 +159,9 @@ WebInspector.TextPrompt.prototype = {
return;
var selectionRange = selection.getRangeAt(0);
- var wordPrefixRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, this.completionStopCharacters, this.element, "backward");
var fullWordRange = document.createRange();
- fullWordRange.setStart(wordPrefixRange.startContainer, wordPrefixRange.startOffset);
+ fullWordRange.setStart(originalWordPrefixRange.startContainer, originalWordPrefixRange.startOffset);
fullWordRange.setEnd(selectionRange.endContainer, selectionRange.endOffset);
if (originalWordPrefixRange.toString() + selectionRange.toString() != fullWordRange.toString())
@@ -185,7 +184,7 @@ WebInspector.TextPrompt.prototype = {
var completionText = completions[foundIndex + 1];
}
- var wordPrefixLength = wordPrefixRange.toString().length;
+ var wordPrefixLength = originalWordPrefixRange.toString().length;
this._userEnteredRange = fullWordRange;
this._userEnteredText = fullWordRange.toString();
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc b/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
index 76a925b..6619499 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
@@ -19,6 +19,7 @@
<file>FontView.js</file>
<file>ImageView.js</file>
<file>inspector.js</file>
+ <file>KeyboardShortcut.js</file>
<file>MetricsSidebarPane.js</file>
<file>Object.js</file>
<file>ObjectPropertiesSection.js</file>
@@ -109,6 +110,7 @@
<file>Images/resourcePlainIcon.png</file>
<file>Images/resourcePlainIconSmall.png</file>
<file>Images/resourcesIcon.png</file>
+ <file>Images/resourcesSilhouette.png</file>
<file>Images/resourcesSizeGraphIcon.png</file>
<file>Images/resourcesTimeGraphIcon.png</file>
<file>Images/scriptsIcon.png</file>
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css
index c162531..929caa2 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css
@@ -483,7 +483,7 @@ body.console-visible #console {
background-image: none;
}
-.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title-level::before {
+.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title::before {
position: absolute;
display: block;
content: "";
@@ -529,18 +529,18 @@ body.console-visible #console {
margin-left: 16px;
}
-.console-group-title-level {
+.console-group-title {
font-weight: bold;
}
-.console-group-title-level::before {
+.console-group-title::before {
background-image: url(Images/disclosureTriangleSmallDown.png);
top: 0.6em;
width: 11px;
height: 12px;
}
-.console-group.collapsed .console-group-title-level::before {
+.console-group.collapsed .console-group-title::before {
background-image: url(Images/disclosureTriangleSmallRight.png);
}
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html
index 184bb45..f211fb7 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html
@@ -34,6 +34,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="treeoutline.js"></script>
<script type="text/javascript" src="inspector.js"></script>
<script type="text/javascript" src="Object.js"></script>
+ <script type="text/javascript" src="KeyboardShortcut.js"></script>
<script type="text/javascript" src="TextPrompt.js"></script>
<script type="text/javascript" src="Placard.js"></script>
<script type="text/javascript" src="View.js"></script>
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js
index 9d5bac0..91f2659 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js
@@ -979,6 +979,7 @@ WebInspector.addMessageToConsole = function(payload)
{
var consoleMessage = new WebInspector.ConsoleMessage(
payload.source,
+ payload.type,
payload.level,
payload.line,
payload.url,
diff --git a/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp b/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp
index 06d96bc..0b72f94 100644
--- a/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp
@@ -247,7 +247,7 @@ void DocLoader::printAccessDeniedMessage(const KURL& url) const
m_doc->url().string().utf8().data());
// FIXME: provide a real line number and source URL.
- frame()->domWindow()->console()->addMessage(OtherMessageSource, ErrorMessageLevel, message, 1, String());
+ frame()->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String());
}
void DocLoader::setAutoLoadImages(bool enable)
diff --git a/src/3rdparty/webkit/WebCore/loader/EmptyClients.h b/src/3rdparty/webkit/WebCore/loader/EmptyClients.h
index 2abd54f..f1c4c5d 100644
--- a/src/3rdparty/webkit/WebCore/loader/EmptyClients.h
+++ b/src/3rdparty/webkit/WebCore/loader/EmptyClients.h
@@ -95,7 +95,7 @@ public:
virtual void setResizable(bool) { }
- virtual void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, const String&) { }
+ virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String&, unsigned, const String&) { }
virtual bool canRunBeforeUnloadConfirmPanel() { return false; }
virtual bool runBeforeUnloadConfirmPanel(const String&, Frame*) { return true; }
@@ -137,6 +137,9 @@ public:
virtual void formStateDidChange(const Node*) { }
+ virtual void formDidFocus(const Node*) { }
+ virtual void formDidBlur(const Node*) { }
+
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
virtual bool setCursor(PlatformCursorHandle) { return false; }
@@ -270,8 +273,8 @@ public:
virtual bool canCachePage() const { return false; }
virtual PassRefPtr<Frame> createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) { return 0; }
- virtual Widget* createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool) { return 0; }
- virtual Widget* createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { return 0; }
+ virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool) { return 0; }
+ virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { return 0; }
virtual ObjectContentType objectContentType(const KURL&, const String&) { return ObjectContentType(); }
virtual String overrideMediaType() const { return String(); }
diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
index 9a09e49..1e51583 100644
--- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
@@ -424,7 +424,7 @@ bool FrameLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const String
Frame* frame = ownerElement->contentFrame();
if (frame)
- frame->loader()->scheduleLocationChange(url.string(), m_outgoingReferrer, true, true, userGestureHint());
+ frame->loader()->scheduleLocationChange(url.string(), m_outgoingReferrer, true, true, isProcessingUserGesture());
else
frame = loadSubframe(ownerElement, url, frameName, m_outgoingReferrer);
@@ -487,7 +487,7 @@ Frame* FrameLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const KURL
void FrameLoader::submitForm(const char* action, const String& url, PassRefPtr<FormData> formData,
const String& target, const String& contentType, const String& boundary,
- bool lockHistory, bool lockBackForwardList, PassRefPtr<Event> event, PassRefPtr<FormState> formState)
+ bool lockHistory, PassRefPtr<Event> event, PassRefPtr<FormState> formState)
{
ASSERT(action);
ASSERT(strcmp(action, "GET") == 0 || strcmp(action, "POST") == 0);
@@ -559,20 +559,7 @@ void FrameLoader::submitForm(const char* action, const String& url, PassRefPtr<F
frameRequest.resourceRequest().setURL(u);
addHTTPOriginIfNeeded(frameRequest.resourceRequest(), outgoingOrigin());
- // Navigation of a subframe during loading of the main frame does not create a new back/forward item.
- // Strangely, we only implement this rule for form submission; time will tell if we need it for other types of navigation.
- // The definition of "during load" is any time before the load event has been handled.
- // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation for this.
- if (Page* targetPage = targetFrame->page()) {
- Frame* mainFrame = targetPage->mainFrame();
- if (mainFrame != targetFrame) {
- Document* document = mainFrame->document();
- if (!mainFrame->loader()->isComplete() || document && document->processingLoadEvent())
- lockBackForwardList = true;
- }
- }
-
- targetFrame->loader()->scheduleFormSubmission(frameRequest, lockHistory, lockBackForwardList, event, formState);
+ targetFrame->loader()->scheduleFormSubmission(frameRequest, lockHistory, event, formState);
}
void FrameLoader::stopLoading(bool sendUnload, DatabasePolicy databasePolicy)
@@ -1336,6 +1323,20 @@ void FrameLoader::scheduleHTTPRedirection(double delay, const String& url)
scheduleRedirection(new ScheduledRedirection(delay, url, true, delay <= 1, false, false));
}
+static bool mustLockBackForwardList(Frame* targetFrame)
+{
+ // Navigation of a subframe during loading of an ancestor frame does not create a new back/forward item.
+ // The definition of "during load" is any time before all handlers for the load event have been run.
+ // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation for this.
+
+ for (Frame* ancestor = targetFrame->tree()->parent(); ancestor; ancestor = ancestor->tree()->parent()) {
+ Document* document = ancestor->document();
+ if (!ancestor->loader()->isComplete() || document && document->processingLoadEvent())
+ return true;
+ }
+ return false;
+}
+
void FrameLoader::scheduleLocationChange(const String& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool wasUserGesture)
{
if (!m_frame->page())
@@ -1344,6 +1345,8 @@ void FrameLoader::scheduleLocationChange(const String& url, const String& referr
if (url.isEmpty())
return;
+ lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame);
+
// If the URL we're going to navigate to is the same as the current one, except for the
// fragment part, we don't need to schedule the location change.
KURL parsedURL(url);
@@ -1360,7 +1363,7 @@ void FrameLoader::scheduleLocationChange(const String& url, const String& referr
}
void FrameLoader::scheduleFormSubmission(const FrameLoadRequest& frameRequest,
- bool lockHistory, bool lockBackForwardList, PassRefPtr<Event> event, PassRefPtr<FormState> formState)
+ bool lockHistory, PassRefPtr<Event> event, PassRefPtr<FormState> formState)
{
ASSERT(m_frame->page());
ASSERT(!frameRequest.isEmpty());
@@ -1372,7 +1375,7 @@ void FrameLoader::scheduleFormSubmission(const FrameLoadRequest& frameRequest,
// This may happen when a frame changes the location of another frame.
bool duringLoad = !m_committedFirstRealDocumentLoad;
- scheduleRedirection(new ScheduledRedirection(frameRequest, lockHistory, lockBackForwardList, event, formState, duringLoad));
+ scheduleRedirection(new ScheduledRedirection(frameRequest, lockHistory, mustLockBackForwardList(m_frame), event, formState, duringLoad));
}
void FrameLoader::scheduleRefresh(bool wasUserGesture)
@@ -1586,28 +1589,8 @@ bool FrameLoader::gotoAnchor(const String& name)
if (!anchorNode && !(name.isEmpty() || equalIgnoringCase(name, "top")))
return false;
- // We need to update the layout before scrolling, otherwise we could
- // really mess things up if an anchor scroll comes at a bad moment.
- m_frame->document()->updateStyleIfNeeded();
- // Only do a layout if changes have occurred that make it necessary.
- if (m_frame->view() && m_frame->contentRenderer() && m_frame->contentRenderer()->needsLayout())
- m_frame->view()->layout();
-
- // Scroll nested layers and frames to reveal the anchor.
- // Align to the top and to the closest side (this matches other browsers).
- RenderObject* renderer;
- IntRect rect;
- if (!anchorNode)
- renderer = m_frame->document()->renderer(); // top of document
- else {
- renderer = anchorNode->renderer();
- rect = anchorNode->getRect();
- }
- if (renderer) {
- renderer->enclosingLayer()->scrollRectToVisible(rect, true, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways);
- if (m_frame->view())
- m_frame->view()->setLockedToAnchor(true);
- }
+ if (FrameView* view = m_frame->view())
+ view->maintainScrollPositionAtAnchor(anchorNode ? static_cast<Node*>(anchorNode) : m_frame->document());
return true;
}
@@ -1686,7 +1669,7 @@ static HTMLPlugInElement* toPlugInElement(Node* node)
bool FrameLoader::loadPlugin(RenderPart* renderer, const KURL& url, const String& mimeType,
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
{
- Widget* widget = 0;
+ RefPtr<Widget> widget;
if (renderer && !useFallback) {
HTMLPlugInElement* element = toPlugInElement(renderer->node());
@@ -1768,7 +1751,7 @@ void FrameLoader::provisionalLoadStarted()
m_client->provisionalLoadStarted();
}
-bool FrameLoader::userGestureHint()
+bool FrameLoader::isProcessingUserGesture()
{
Frame* frame = m_frame->tree()->top();
if (!frame->script()->isEnabled())
@@ -2111,7 +2094,7 @@ void FrameLoader::completed()
if (Frame* parent = m_frame->tree()->parent())
parent->loader()->checkCompleted();
if (m_frame->view())
- m_frame->view()->setLockedToAnchor(false);
+ m_frame->view()->maintainScrollPositionAtAnchor(0);
}
void FrameLoader::started()
@@ -2406,7 +2389,7 @@ void FrameLoader::reportLocalLoadFailed(Frame* frame, const String& url)
if (!frame)
return;
- frame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, "Not allowed to load local resource: " + url, 0, String());
+ frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Not allowed to load local resource: " + url, 0, String());
}
bool FrameLoader::shouldHideReferrer(const KURL& url, const String& referrer)
@@ -2623,7 +2606,7 @@ bool FrameLoader::shouldAllowNavigation(Frame* targetFrame) const
targetDocument->url().string().utf8().data(), activeDocument->url().string().utf8().data());
// FIXME: should we print to the console of the activeFrame as well?
- targetFrame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, message, 1, String());
+ targetFrame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String());
}
return false;
@@ -5066,7 +5049,7 @@ void FrameLoader::dispatchWindowObjectAvailable()
}
}
-Widget* FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
+PassRefPtr<Widget> FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
{
String baseURLString;
String codeBaseURLString;
@@ -5094,7 +5077,7 @@ Widget* FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletEleme
baseURLString = m_frame->document()->baseURL().string();
KURL baseURL = completeURL(baseURLString);
- Widget* widget = m_client->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
+ RefPtr<Widget> widget = m_client->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
if (!widget)
return 0;
diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h
index d96329f..b80a87c 100644
--- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h
+++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h
@@ -261,7 +261,7 @@ namespace WebCore {
void submitForm(const char* action, const String& url,
PassRefPtr<FormData>, const String& target, const String& contentType, const String& boundary,
- bool lockHistory, bool lockBackForwardList, PassRefPtr<Event>, PassRefPtr<FormState>);
+ bool lockHistory, PassRefPtr<Event>, PassRefPtr<FormState>);
void stop();
void stopLoading(bool sendUnload, DatabasePolicy = DatabasePolicyStop);
@@ -305,7 +305,7 @@ namespace WebCore {
void handledOnloadEvents();
String userAgent(const KURL&) const;
- Widget* createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const HashMap<String, String>& args);
+ PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const HashMap<String, String>& args);
void dispatchWindowObjectAvailable();
void dispatchDocumentElementAvailable();
@@ -316,7 +316,7 @@ namespace WebCore {
bool openedByDOM() const;
void setOpenedByDOM();
- bool userGestureHint();
+ bool isProcessingUserGesture();
void resetMultipleFormSubmissionProtection();
@@ -492,7 +492,7 @@ namespace WebCore {
void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier);
static bool isLocationChange(const ScheduledRedirection&);
- void scheduleFormSubmission(const FrameLoadRequest&, bool lockHistory, bool lockBackForwardList, PassRefPtr<Event>, PassRefPtr<FormState>);
+ void scheduleFormSubmission(const FrameLoadRequest&, bool lockHistory, PassRefPtr<Event>, PassRefPtr<FormState>);
void loadWithDocumentLoader(DocumentLoader*, FrameLoadType, PassRefPtr<FormState>); // Calls continueLoadAfterNavigationPolicy
void load(DocumentLoader*); // Calls loadWithDocumentLoader
diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h b/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h
index 8c050f0..aa36b50 100644
--- a/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h
+++ b/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h
@@ -200,10 +200,10 @@ namespace WebCore {
virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
- virtual Widget* createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
+ virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
- virtual Widget* createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;
+ virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;
virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0;
virtual String overrideMediaType() const = 0;
diff --git a/src/3rdparty/webkit/WebCore/loader/TextDocument.cpp b/src/3rdparty/webkit/WebCore/loader/TextDocument.cpp
index 0d86c1b..a3d7061 100644
--- a/src/3rdparty/webkit/WebCore/loader/TextDocument.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/TextDocument.cpp
@@ -162,6 +162,8 @@ void TextTokenizer::write(const SegmentedString& s, bool)
void TextTokenizer::finish()
{
+ if (!m_preElement)
+ write(SegmentedString(), true); // Create document structure for an empty text document.
m_preElement = 0;
fastFree(m_buffer);
m_buffer = 0;
diff --git a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp
index 3ded4f3..b78291d 100644
--- a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp
@@ -27,6 +27,8 @@
#include "config.h"
#include "IconDatabase.h"
+#if ENABLE(ICONDATABASE)
+
#include "AutodrainedPool.h"
#include "DocumentLoader.h"
#include "FileSystem.h"
@@ -2067,3 +2069,5 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot)
}
} // namespace WebCore
+
+#endif // ENABLE(ICONDATABASE)
diff --git a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h
index 40f641a..675e6c8 100644
--- a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h
+++ b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h
@@ -165,6 +165,7 @@ private:
HashSet<String> m_pageURLsPendingImport;
HashSet<String> m_pageURLsInterestedInIcons;
HashSet<IconRecord*> m_iconsPendingReading;
+#endif // ENABLE(ICONDATABASE)
// *** Sync Thread Only ***
public:
@@ -174,6 +175,7 @@ public:
bool shouldStopThreadActivity() const;
+#if ENABLE(ICONDATABASE)
private:
static void* iconDatabaseSyncThreadStart(void *);
void* iconDatabaseSyncThread();
@@ -238,4 +240,4 @@ IconDatabase* iconDatabase();
} // namespace WebCore
-#endif
+#endif // IconDatabase_h
diff --git a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseNone.cpp b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseNone.cpp
index a7fb88d..03a7964 100644
--- a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseNone.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseNone.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "IconDatabase.h"
+#if !ENABLE(ICONDATABASE)
+
#include "PlatformString.h"
#include "SharedBuffer.h"
#include <wtf/StdLibExtras.h>
@@ -194,4 +196,23 @@ void IconDatabase::setClient(IconDatabaseClient*)
{
}
+// ************************
+// *** Sync Thread Only ***
+// ************************
+
+void IconDatabase::importIconURLForPageURL(const String&, const String&)
+{
+}
+
+void IconDatabase::importIconDataForIconURL(PassRefPtr<SharedBuffer>, const String&)
+{
+}
+
+bool IconDatabase::shouldStopThreadActivity() const
+{
+ return true;
+}
+
} // namespace WebCore
+
+#endif // !ENABLE(ICONDATABASE)
diff --git a/src/3rdparty/webkit/WebCore/loader/loader.cpp b/src/3rdparty/webkit/WebCore/loader/loader.cpp
index d10877f..881e200 100644
--- a/src/3rdparty/webkit/WebCore/loader/loader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/loader.cpp
@@ -176,6 +176,35 @@ void Loader::resumePendingRequests()
scheduleServePendingRequests();
}
+void Loader::nonCacheRequestInFlight(const KURL& url)
+{
+ if (!url.protocolInHTTPFamily())
+ return;
+
+ AtomicString hostName = url.host();
+ RefPtr<Host> host = m_hosts.get(hostName.impl());
+ if (!host) {
+ host = Host::create(hostName, maxRequestsInFlightPerHost);
+ m_hosts.add(hostName.impl(), host);
+ }
+
+ host->nonCacheRequestInFlight();
+}
+
+void Loader::nonCacheRequestComplete(const KURL& url)
+{
+ if (!url.protocolInHTTPFamily())
+ return;
+
+ AtomicString hostName = url.host();
+ RefPtr<Host> host = m_hosts.get(hostName.impl());
+ ASSERT(host);
+ if (!host)
+ return;
+
+ host->nonCacheRequestComplete();
+}
+
void Loader::cancelRequests(DocLoader* docLoader)
{
docLoader->clearPendingPreloads();
@@ -204,6 +233,7 @@ Loader::Host::Host(const AtomicString& name, unsigned maxRequestsInFlight)
: m_name(name)
, m_maxRequestsInFlight(maxRequestsInFlight)
, m_numResourcesProcessing(0)
+ , m_nonCachedRequestsInFlight(0)
{
}
@@ -219,6 +249,17 @@ void Loader::Host::addRequest(Request* request, Priority priority)
m_requestsPending[priority].append(request);
}
+void Loader::Host::nonCacheRequestInFlight()
+{
+ ++m_nonCachedRequestsInFlight;
+}
+
+void Loader::Host::nonCacheRequestComplete()
+{
+ --m_nonCachedRequestsInFlight;
+ ASSERT(m_nonCachedRequestsInFlight >= 0);
+}
+
bool Loader::Host::hasRequests() const
{
if (!m_requestsLoading.isEmpty())
@@ -250,7 +291,7 @@ void Loader::Host::servePendingRequests(RequestQueue& requestsPending, bool& ser
// resources that we would want to push to the front of the queue. Just hand off the remaining resources
// to the networking layer.
bool parsedAndStylesheetsKnown = !docLoader->doc()->parsing() && docLoader->doc()->haveStylesheetsLoaded();
- if (!parsedAndStylesheetsKnown && !resourceIsCacheValidator && m_requestsLoading.size() >= m_maxRequestsInFlight) {
+ if (!parsedAndStylesheetsKnown && !resourceIsCacheValidator && m_requestsLoading.size() + m_nonCachedRequestsInFlight >= m_maxRequestsInFlight) {
serveLowerPriority = false;
return;
}
diff --git a/src/3rdparty/webkit/WebCore/loader/loader.h b/src/3rdparty/webkit/WebCore/loader/loader.h
index c5b9416..3cced3d 100644
--- a/src/3rdparty/webkit/WebCore/loader/loader.h
+++ b/src/3rdparty/webkit/WebCore/loader/loader.h
@@ -35,6 +35,7 @@ namespace WebCore {
class CachedResource;
class DocLoader;
+ class KURL;
class Request;
class Loader : Noncopyable {
@@ -52,6 +53,9 @@ namespace WebCore {
bool isSuspendingPendingRequests() { return m_isSuspendingPendingRequests; }
void suspendPendingRequests();
void resumePendingRequests();
+
+ void nonCacheRequestInFlight(const KURL&);
+ void nonCacheRequestComplete(const KURL&);
private:
Priority determinePriority(const CachedResource*) const;
@@ -69,11 +73,13 @@ namespace WebCore {
const AtomicString& name() const { return m_name; }
void addRequest(Request*, Priority);
+ void nonCacheRequestInFlight();
+ void nonCacheRequestComplete();
void servePendingRequests(Priority minimumPriority = Low);
void cancelRequests(DocLoader*);
bool hasRequests() const;
- bool processingResource() const { return m_numResourcesProcessing != 0; }
+ bool processingResource() const { return m_numResourcesProcessing != 0 || m_nonCachedRequestsInFlight !=0; }
private:
Host(const AtomicString&, unsigned);
@@ -94,6 +100,7 @@ namespace WebCore {
const AtomicString m_name;
const int m_maxRequestsInFlight;
int m_numResourcesProcessing;
+ int m_nonCachedRequestsInFlight;
};
typedef HashMap<AtomicStringImpl*, RefPtr<Host> > HostMap;
HostMap m_hosts;
diff --git a/src/3rdparty/webkit/WebCore/page/ChromeClient.h b/src/3rdparty/webkit/WebCore/page/ChromeClient.h
index e155754..78efa45 100644
--- a/src/3rdparty/webkit/WebCore/page/ChromeClient.h
+++ b/src/3rdparty/webkit/WebCore/page/ChromeClient.h
@@ -103,7 +103,7 @@ namespace WebCore {
virtual void setResizable(bool) = 0;
- virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID) = 0;
+ virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID) = 0;
virtual bool canRunBeforeUnloadConfirmPanel() = 0;
virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame) = 0;
@@ -168,6 +168,9 @@ namespace WebCore {
// Notification that the given form element has changed. This function
// will be called frequently, so handling should be very fast.
virtual void formStateDidChange(const Node*) = 0;
+
+ virtual void formDidFocus(const Node*) { };
+ virtual void formDidBlur(const Node*) { };
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() = 0;
diff --git a/src/3rdparty/webkit/WebCore/page/Console.cpp b/src/3rdparty/webkit/WebCore/page/Console.cpp
index 1a654ab..45ff059 100644
--- a/src/3rdparty/webkit/WebCore/page/Console.cpp
+++ b/src/3rdparty/webkit/WebCore/page/Console.cpp
@@ -128,18 +128,6 @@ static void printMessageSourceAndLevelPrefix(MessageSource source, MessageLevel
case ErrorMessageLevel:
levelString = "ERROR";
break;
- case ObjectMessageLevel:
- levelString = "OBJECT";
- break;
- case TraceMessageLevel:
- levelString = "TRACE";
- break;
- case StartGroupMessageLevel:
- levelString = "START GROUP";
- break;
- case EndGroupMessageLevel:
- levelString = "END GROUP";
- break;
default:
ASSERT_NOT_REACHED();
levelString = "UNKNOWN";
@@ -149,16 +137,16 @@ static void printMessageSourceAndLevelPrefix(MessageSource source, MessageLevel
printf("%s %s:", sourceString, levelString);
}
-void Console::addMessage(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
+void Console::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
{
Page* page = this->page();
if (!page)
return;
if (source == JSMessageSource || source == WMLMessageSource)
- page->chrome()->client()->addMessageToConsole(source, level, message, lineNumber, sourceURL);
+ page->chrome()->client()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL);
- page->inspectorController()->addMessageToConsole(source, level, message, lineNumber, sourceURL);
+ page->inspectorController()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL);
if (!Console::shouldPrintExceptions())
return;
@@ -169,7 +157,8 @@ void Console::addMessage(MessageSource source, MessageLevel level, const String&
printf(" %s\n", message.utf8().data());
}
-void Console::addMessage(MessageLevel level, ScriptCallStack* callStack, bool acceptNoArguments) {
+void Console::addMessage(MessageType type, MessageLevel level, ScriptCallStack* callStack, bool acceptNoArguments)
+{
Page* page = this->page();
if (!page)
return;
@@ -181,9 +170,9 @@ void Console::addMessage(MessageLevel level, ScriptCallStack* callStack, bool ac
String message;
if (getFirstArgumentAsString(callStack->state(), lastCaller, message))
- page->chrome()->client()->addMessageToConsole(JSMessageSource, level, message, lastCaller.lineNumber(), lastCaller.sourceURL().prettyURL());
+ page->chrome()->client()->addMessageToConsole(JSMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.sourceURL().prettyURL());
- page->inspectorController()->addMessageToConsole(JSMessageSource, level, callStack);
+ page->inspectorController()->addMessageToConsole(JSMessageSource, type, level, callStack);
if (!Console::shouldPrintExceptions())
return;
@@ -207,7 +196,7 @@ void Console::debug(ScriptCallStack* callStack)
void Console::error(ScriptCallStack* callStack)
{
- addMessage(ErrorMessageLevel, callStack);
+ addMessage(LogMessageType, ErrorMessageLevel, callStack);
}
void Console::info(ScriptCallStack* callStack)
@@ -217,12 +206,12 @@ void Console::info(ScriptCallStack* callStack)
void Console::log(ScriptCallStack* callStack)
{
- addMessage(LogMessageLevel, callStack);
+ addMessage(LogMessageType, LogMessageLevel, callStack);
}
void Console::dir(ScriptCallStack* callStack)
{
- addMessage(ObjectMessageLevel, callStack);
+ addMessage(ObjectMessageType, LogMessageLevel, callStack);
}
void Console::dirxml(ScriptCallStack* callStack)
@@ -233,7 +222,7 @@ void Console::dirxml(ScriptCallStack* callStack)
void Console::trace(ScriptCallStack* callStack)
{
- addMessage(TraceMessageLevel, callStack, true);
+ addMessage(TraceMessageType, LogMessageLevel, callStack, true);
if (!shouldPrintExceptions())
return;
@@ -251,7 +240,7 @@ void Console::assertCondition(bool condition, ScriptCallStack* callStack)
return;
// FIXME: <https://bugs.webkit.org/show_bug.cgi?id=19135> It would be nice to prefix assertion failures with a message like "Assertion failed: ".
- addMessage(ErrorMessageLevel, callStack, true);
+ addMessage(LogMessageType, ErrorMessageLevel, callStack, true);
}
void Console::count(ScriptCallStack* callStack)
@@ -349,7 +338,7 @@ void Console::timeEnd(const String& title, ScriptCallStack* callStack)
String message = title + String::format(": %.0fms", elapsed);
const ScriptCallFrame& lastCaller = callStack->at(0);
- page->inspectorController()->addMessageToConsole(JSMessageSource, LogMessageLevel, message, lastCaller.lineNumber(), lastCaller.sourceURL().string());
+ page->inspectorController()->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lastCaller.lineNumber(), lastCaller.sourceURL().string());
}
void Console::group(ScriptCallStack* callStack)
@@ -372,7 +361,7 @@ void Console::groupEnd()
void Console::warn(ScriptCallStack* callStack)
{
- addMessage(WarningMessageLevel, callStack);
+ addMessage(LogMessageType, WarningMessageLevel, callStack);
}
static bool printExceptions = false;
diff --git a/src/3rdparty/webkit/WebCore/page/Console.h b/src/3rdparty/webkit/WebCore/page/Console.h
index 79396ea..64e596d 100644
--- a/src/3rdparty/webkit/WebCore/page/Console.h
+++ b/src/3rdparty/webkit/WebCore/page/Console.h
@@ -59,16 +59,19 @@ namespace WebCore {
OtherMessageSource
};
+ enum MessageType {
+ LogMessageType,
+ ObjectMessageType,
+ TraceMessageType,
+ StartGroupMessageType,
+ EndGroupMessageType
+ };
+
enum MessageLevel {
TipMessageLevel,
LogMessageLevel,
WarningMessageLevel,
- ErrorMessageLevel,
- // FIXME: the remaining levels should become a new MessageType enum.
- ObjectMessageLevel,
- TraceMessageLevel,
- StartGroupMessageLevel,
- EndGroupMessageLevel
+ ErrorMessageLevel
};
class Console : public RefCounted<Console> {
@@ -78,7 +81,7 @@ namespace WebCore {
Frame* frame() const;
void disconnectFrame();
- void addMessage(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
+ void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
void debug(ScriptCallStack*);
void error(ScriptCallStack*);
@@ -108,7 +111,7 @@ namespace WebCore {
private:
inline Page* page() const;
- void addMessage(MessageLevel, ScriptCallStack*, bool acceptNoArguments = false);
+ void addMessage(MessageType, MessageLevel, ScriptCallStack*, bool acceptNoArguments = false);
Console(Frame*);
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
index eb1981c..8e64fe3 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
@@ -634,7 +634,7 @@ void DOMWindow::postMessageTimerFired(PostMessageTimer* t)
if (!timer->targetOrigin()->isSameSchemeHostPort(document()->securityOrigin())) {
String message = String::format("Unable to post message to %s. Recipient has origin %s.\n",
timer->targetOrigin()->toString().utf8().data(), document()->securityOrigin()->toString().utf8().data());
- console()->addMessage(JSMessageSource, ErrorMessageLevel, message, 0, String());
+ console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 0, String());
return;
}
}
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
index 942facc..bfdebd4 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
@@ -349,8 +349,9 @@ module window {
attribute HTMLBodyElementConstructor HTMLBodyElement;
attribute HTMLButtonElementConstructor HTMLButtonElement;
attribute HTMLCanvasElementConstructor HTMLCanvasElement;
- attribute HTMLDataGridElementConstructor HTMLDataGridElement;
- attribute HTMLDataGridColElementConstructor HTMLDataGridColElement;
+ attribute [Conditional=DATAGRID] HTMLDataGridElementConstructor HTMLDataGridElement;
+ attribute [Conditional=DATAGRID] HTMLDataGridCellElementConstructor HTMLDataGridCellElement;
+ attribute [Conditional=DATAGRID] HTMLDataGridColElementConstructor HTMLDataGridColElement;
attribute HTMLDListElementConstructor HTMLDListElement;
attribute HTMLDirectoryElementConstructor HTMLDirectoryElement;
attribute HTMLDivElementConstructor HTMLDivElement;
@@ -460,6 +461,10 @@ module window {
attribute [JSCCustomGetter] WorkerConstructor Worker; // Usable with the new operator
#endif
+#if defined(ENABLE_SHARED_WORKERS) && ENABLE_SHARED_WORKERS
+ attribute [JSCCustomGetter] SharedWorkerConstructor SharedWorker; // Usable with the new operator
+#endif
+
attribute PluginConstructor Plugin;
attribute PluginArrayConstructor PluginArray;
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
index 8f0b420..3f0296e 100644
--- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
@@ -154,6 +154,8 @@ EventHandler::EventHandler(Frame* frame)
, m_capturingMouseEventsNode(0)
, m_clickCount(0)
, m_mouseDownTimestamp(0)
+ , m_useLatchedWheelEventNode(false)
+ , m_widgetIsLatched(false)
#if PLATFORM(MAC)
, m_mouseDownView(nil)
, m_sendingEventToSubview(false)
@@ -193,6 +195,7 @@ void EventHandler::clear()
m_mousePressed = false;
m_capturesDragging = false;
m_capturingMouseEventsNode = 0;
+ m_latchedWheelEventNode = 0;
}
void EventHandler::selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults& result)
@@ -395,7 +398,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
m_mouseDownMayStartAutoscroll = m_mouseDownMayStartSelect ||
(m_mousePressNode && m_mousePressNode->renderBox() && m_mousePressNode->renderBox()->canBeProgramaticallyScrolled(true));
- return swallowEvent;
+ return swallowEvent;
}
bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& event)
@@ -766,7 +769,7 @@ HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool all
result = widgetHitTestResult;
if (testScrollbars == ShouldHitTestScrollbars) {
- Scrollbar* eventScrollbar = view->scrollbarUnderPoint(point);
+ Scrollbar* eventScrollbar = view->scrollbarAtPoint(point);
if (eventScrollbar)
result.setScrollbar(eventScrollbar);
}
@@ -967,7 +970,7 @@ Cursor EventHandler::selectCursor(const MouseEventWithHitTestResults& event, Scr
// If the link is editable, then we need to check the settings to see whether or not the link should be followed
if (editable) {
ASSERT(m_frame->settings());
- switch(m_frame->settings()->editableLinkBehavior()) {
+ switch (m_frame->settings()->editableLinkBehavior()) {
default:
case EditableLinkDefaultBehavior:
case EditableLinkAlwaysLive:
@@ -1159,7 +1162,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
invalidateClick();
return true;
}
- }
+ }
#endif
m_clickCount = mouseEvent.clickCount();
@@ -1205,7 +1208,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
}
FrameView* view = m_frame->view();
- Scrollbar* scrollbar = view ? view->scrollbarUnderPoint(mouseEvent.pos()) : 0;
+ Scrollbar* scrollbar = view ? view->scrollbarAtPoint(mouseEvent.pos()) : 0;
if (!scrollbar)
scrollbar = mev.scrollbar();
if (scrollbar && passMousePressEventToScrollbar(mev, scrollbar))
@@ -1297,7 +1300,7 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi
// Send events right to a scrollbar if the mouse is pressed.
if (m_lastScrollbarUnderMouse && m_mousePressed)
- return m_lastScrollbarUnderMouse->mouseMoved(m_lastScrollbarUnderMouse->transformEvent(mouseEvent));
+ return m_lastScrollbarUnderMouse->mouseMoved(mouseEvent);
// Treat mouse move events while the mouse is pressed as "read-only" in prepareMouseEvent
// if we are allowed to select.
@@ -1319,7 +1322,7 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi
m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner);
else {
if (FrameView* view = m_frame->view())
- scrollbar = view->scrollbarUnderPoint(mouseEvent.pos());
+ scrollbar = view->scrollbarAtPoint(mouseEvent.pos());
if (!scrollbar)
scrollbar = mev.scrollbar();
@@ -1349,7 +1352,7 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi
swallowEvent |= passMouseMoveEventToSubframe(mev, newSubframe.get(), hoveredNode);
} else {
if (scrollbar && !m_mousePressed)
- scrollbar->mouseMoved(scrollbar->transformEvent(mouseEvent)); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
+ scrollbar->mouseMoved(mouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
if (Page* page = m_frame->page()) {
if ((!m_resizeLayer || !m_resizeLayer->inResizeMode()) && !page->mainFrame()->eventHandler()->panScrollInProgress()) {
if (FrameView* view = m_frame->view())
@@ -1715,16 +1718,38 @@ bool EventHandler::handleWheelEvent(PlatformWheelEvent& e)
return false;
IntPoint vPoint = view->windowToContents(e.pos());
- HitTestRequest request(HitTestRequest::ReadOnly);
- HitTestResult result(vPoint);
- doc->renderView()->layer()->hitTest(request, result);
- Node* node = result.innerNode();
+ Node* node;
+ bool isOverWidget;
+ bool didSetLatchedNode = false;
+
+ if (m_useLatchedWheelEventNode) {
+ if (!m_latchedWheelEventNode) {
+ HitTestRequest request(HitTestRequest::ReadOnly);
+ HitTestResult result(vPoint);
+ doc->renderView()->layer()->hitTest(request, result);
+ m_latchedWheelEventNode = result.innerNode();
+ m_widgetIsLatched = result.isOverWidget();
+ didSetLatchedNode = true;
+ }
+
+ node = m_latchedWheelEventNode.get();
+ isOverWidget = m_widgetIsLatched;
+ } else {
+ if (m_latchedWheelEventNode)
+ m_latchedWheelEventNode = 0;
+
+ HitTestRequest request(HitTestRequest::ReadOnly);
+ HitTestResult result(vPoint);
+ doc->renderView()->layer()->hitTest(request, result);
+ node = result.innerNode();
+ isOverWidget = result.isOverWidget();
+ }
if (node) {
// Figure out which view to send the event to.
RenderObject* target = node->renderer();
- if (result.isOverWidget() && target && target->isWidget()) {
+ if (isOverWidget && target && target->isWidget()) {
Widget* widget = static_cast<RenderWidget*>(target)->widget();
if (widget && passWheelEventToWidget(e, widget)) {
@@ -2027,7 +2052,7 @@ void EventHandler::handleKeyboardSelectionMovement(KeyboardEvent* event)
void EventHandler::defaultKeyboardEventHandler(KeyboardEvent* event)
{
- if (event->type() == eventNames().keydownEvent) {
+ if (event->type() == eventNames().keydownEvent) {
m_frame->editor()->handleKeyboardEvent(event);
if (event->defaultHandled())
return;
@@ -2037,14 +2062,14 @@ void EventHandler::defaultKeyboardEventHandler(KeyboardEvent* event)
// provides KB navigation and selection for enhanced accessibility users
if (AXObjectCache::accessibilityEnhancedUserInterfaceEnabled())
handleKeyboardSelectionMovement(event);
- }
- if (event->type() == eventNames().keypressEvent) {
+ }
+ if (event->type() == eventNames().keypressEvent) {
m_frame->editor()->handleKeyboardEvent(event);
if (event->defaultHandled())
return;
if (event->charCode() == ' ')
defaultSpaceEventHandler(event);
- }
+ }
}
bool EventHandler::dragHysteresisExceeded(const FloatPoint& floatDragViewportLocation) const
@@ -2102,6 +2127,9 @@ void EventHandler::dragSourceEndedAt(const PlatformMouseEvent& event, DragOperat
}
freeClipboard();
dragState().m_dragSrc = 0;
+ // In case the drag was ended due to an escape key press we need to ensure
+ // that consecutive mousemove events don't reinitiate the drag and drop.
+ m_mouseDownMayStartDrag = false;
}
// returns if we should continue "default processing", i.e., whether eventhandler canceled
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.h b/src/3rdparty/webkit/WebCore/page/EventHandler.h
index f76716e..d5c0b97 100644
--- a/src/3rdparty/webkit/WebCore/page/EventHandler.h
+++ b/src/3rdparty/webkit/WebCore/page/EventHandler.h
@@ -332,6 +332,10 @@ private:
double m_mouseDownTimestamp;
PlatformMouseEvent m_mouseDown;
+ bool m_useLatchedWheelEventNode;
+ RefPtr<Node> m_latchedWheelEventNode;
+ bool m_widgetIsLatched;
+
#if PLATFORM(MAC)
NSView *m_mouseDownView;
bool m_sendingEventToSubview;
diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.cpp b/src/3rdparty/webkit/WebCore/page/FocusController.cpp
index 8dad846..817801c 100644
--- a/src/3rdparty/webkit/WebCore/page/FocusController.cpp
+++ b/src/3rdparty/webkit/WebCore/page/FocusController.cpp
@@ -58,6 +58,7 @@ using namespace HTMLNames;
FocusController::FocusController(Page* page)
: m_page(page)
, m_isActive(false)
+ , m_isFocused(false)
{
}
@@ -66,16 +67,20 @@ void FocusController::setFocusedFrame(PassRefPtr<Frame> frame)
if (m_focusedFrame == frame)
return;
- if (m_focusedFrame && m_focusedFrame->view()) {
- m_focusedFrame->selection()->setFocused(false);
- m_focusedFrame->document()->dispatchWindowEvent(eventNames().blurEvent, false, false);
- }
+ RefPtr<Frame> oldFrame = m_focusedFrame;
+ RefPtr<Frame> newFrame = frame;
- m_focusedFrame = frame;
+ m_focusedFrame = newFrame;
- if (m_focusedFrame && m_focusedFrame->view()) {
- m_focusedFrame->selection()->setFocused(true);
- m_focusedFrame->document()->dispatchWindowEvent(eventNames().focusEvent, false, false);
+ // Now that the frame is updated, fire events and update the selection focused states of both frames.
+ if (oldFrame && oldFrame->view()) {
+ oldFrame->selection()->setFocused(false);
+ oldFrame->document()->dispatchWindowEvent(eventNames().blurEvent, false, false);
+ }
+
+ if (newFrame && newFrame->view() && isFocused()) {
+ newFrame->selection()->setFocused(true);
+ newFrame->document()->dispatchWindowEvent(eventNames().focusEvent, false, false);
}
}
@@ -86,6 +91,19 @@ Frame* FocusController::focusedOrMainFrame()
return m_page->mainFrame();
}
+void FocusController::setFocused(bool focused)
+{
+ if (isFocused() == focused)
+ return;
+
+ m_isFocused = focused;
+
+ if (m_focusedFrame && m_focusedFrame->view()) {
+ m_focusedFrame->selection()->setFocused(focused);
+ m_focusedFrame->document()->dispatchWindowEvent(focused ? eventNames().focusEvent : eventNames().blurEvent, false, false);
+ }
+}
+
static Node* deepFocusableNode(FocusDirection direction, Node* node, KeyboardEvent* event)
{
// The node we found might be a HTMLFrameOwnerElement, so descend down the frame tree until we find either:
@@ -322,7 +340,7 @@ void FocusController::setActive(bool active)
focusedOrMainFrame()->selection()->pageActivationChanged();
- if (m_focusedFrame)
+ if (m_focusedFrame && isFocused())
m_focusedFrame->document()->dispatchWindowEvent(active ? eventNames().focusEvent : eventNames().blurEvent, false, false);
}
diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.h b/src/3rdparty/webkit/WebCore/page/FocusController.h
index f4a6632..33debf1 100644
--- a/src/3rdparty/webkit/WebCore/page/FocusController.h
+++ b/src/3rdparty/webkit/WebCore/page/FocusController.h
@@ -53,10 +53,14 @@ namespace WebCore {
void setActive(bool);
bool isActive() const { return m_isActive; }
+ void setFocused(bool);
+ bool isFocused() const { return m_isFocused; }
+
private:
Page* m_page;
RefPtr<Frame> m_focusedFrame;
bool m_isActive;
+ bool m_isFocused;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/Frame.cpp b/src/3rdparty/webkit/WebCore/page/Frame.cpp
index 8905bd9..870bd2a 100644
--- a/src/3rdparty/webkit/WebCore/page/Frame.cpp
+++ b/src/3rdparty/webkit/WebCore/page/Frame.cpp
@@ -793,7 +793,7 @@ String Frame::jsStatusBarText() const
String Frame::jsDefaultStatusBarText() const
{
- return m_kjsDefaultStatusBarText;
+ return m_kjsDefaultStatusBarText;
}
void Frame::setNeedsReapplyStyles()
@@ -1771,7 +1771,7 @@ void Frame::createView(const IntSize& viewportSize,
frameView->setParentVisible(true);
if (ownerRenderer())
- ownerRenderer()->setWidget(frameView.get());
+ ownerRenderer()->setWidget(frameView);
if (HTMLFrameOwnerElement* owner = ownerElement())
view()->setCanHaveScrollbars(owner->scrollingMode() != ScrollbarAlwaysOff);
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/WebCore/page/FrameView.cpp
index 41f2c5c..d57e845 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.cpp
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.cpp
@@ -111,7 +111,6 @@ FrameView::FrameView(Frame* frame)
, m_shouldUpdateWhileOffscreen(true)
, m_deferSetNeedsLayouts(0)
, m_setNeedsLayoutWasDeferred(false)
- , m_lockedToAnchor(false)
{
init();
}
@@ -185,7 +184,7 @@ void FrameView::reset()
m_isPainting = false;
m_isVisuallyNonEmpty = false;
m_firstVisuallyNonEmptyLayoutCallbackPending = true;
- m_lockedToAnchor = false;
+ m_maintainScrollPositionAnchor = 0;
}
bool FrameView::isFrameView() const
@@ -417,20 +416,18 @@ void FrameView::applyOverflowToViewport(RenderObject* o, ScrollbarMode& hMode, S
}
#if USE(ACCELERATED_COMPOSITING)
-void FrameView::updateCompositingLayers(CompositingUpdate updateType)
+void FrameView::updateCompositingLayers()
{
RenderView* view = m_frame->contentRenderer();
- if (view && view->compositor()) {
- // This call will make sure the cached hasAcceleratedCompositing is updated from the pref
- view->compositor()->cacheAcceleratedCompositingEnabledFlag();
- }
-
- if (!view || !view->usesCompositing())
+ if (!view)
return;
- if (updateType == ForcedCompositingUpdate)
- view->compositor()->setCompositingLayersNeedUpdate();
+ // This call will make sure the cached hasAcceleratedCompositing is updated from the pref
+ view->compositor()->cacheAcceleratedCompositingEnabledFlag();
+ if (!view->usesCompositing())
+ return;
+
view->compositor()->updateCompositingLayers();
}
@@ -624,7 +621,9 @@ void FrameView::layout(bool allowSubtree)
// Now update the positions of all layers.
beginDeferredRepaints();
- layer->updateLayerPositions(m_doFullRepaint);
+ layer->updateLayerPositions((m_doFullRepaint ? RenderLayer::DoFullRepaint : 0)
+ | RenderLayer::CheckForRepaint
+ | RenderLayer::UpdateCompositingLayers);
endDeferredRepaints();
#if USE(ACCELERATED_COMPOSITING)
@@ -666,9 +665,6 @@ void FrameView::layout(bool allowSubtree)
ASSERT(m_enqueueEvents);
}
- if (lockedToAnchor())
- m_frame->loader()->gotoAnchor();
-
m_nestedLayoutCount--;
}
@@ -751,11 +747,27 @@ void FrameView::restoreScrollbar()
setScrollbarsSuppressed(false);
}
+void FrameView::maintainScrollPositionAtAnchor(Node* anchorNode)
+{
+ m_maintainScrollPositionAnchor = anchorNode;
+ if (!m_maintainScrollPositionAnchor)
+ return;
+
+ // We need to update the layout before scrolling, otherwise we could
+ // really mess things up if an anchor scroll comes at a bad moment.
+ m_frame->document()->updateStyleIfNeeded();
+ // Only do a layout if changes have occurred that make it necessary.
+ if (m_frame->contentRenderer() && m_frame->contentRenderer()->needsLayout())
+ layout();
+ else
+ scrollToAnchor();
+}
+
void FrameView::scrollRectIntoViewRecursively(const IntRect& r)
{
bool wasInProgrammaticScroll = m_inProgrammaticScroll;
m_inProgrammaticScroll = true;
- setLockedToAnchor(false);
+ m_maintainScrollPositionAnchor = 0;
ScrollView::scrollRectIntoViewRecursively(r);
m_inProgrammaticScroll = wasInProgrammaticScroll;
}
@@ -764,7 +776,7 @@ void FrameView::setScrollPosition(const IntPoint& scrollPoint)
{
bool wasInProgrammaticScroll = m_inProgrammaticScroll;
m_inProgrammaticScroll = true;
- setLockedToAnchor(false);
+ m_maintainScrollPositionAnchor = 0;
ScrollView::setScrollPosition(scrollPoint);
m_inProgrammaticScroll = wasInProgrammaticScroll;
}
@@ -1118,6 +1130,27 @@ void FrameView::resumeScheduledEvents()
ASSERT(m_scheduledEvents.isEmpty() || m_enqueueEvents);
}
+void FrameView::scrollToAnchor()
+{
+ RefPtr<Node> anchorNode = m_maintainScrollPositionAnchor;
+ if (!anchorNode)
+ return;
+
+ if (!anchorNode->renderer())
+ return;
+
+ IntRect rect;
+ if (anchorNode != m_frame->document())
+ rect = anchorNode->getRect();
+
+ // Scroll nested layers and frames to reveal the anchor.
+ // Align to the top and to the closest side (this matches other browsers).
+ anchorNode->renderer()->enclosingLayer()->scrollRectToVisible(rect, true, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways);
+
+ // scrollRectToVisible can call into scrollRectIntoViewRecursively(), which resets m_maintainScrollPositionAnchor.
+ m_maintainScrollPositionAnchor = anchorNode;
+}
+
bool FrameView::updateWidgets()
{
if (m_nestedLayoutCount > 1 || !m_widgetUpdateSet || m_widgetUpdateSet->isEmpty())
@@ -1161,7 +1194,9 @@ void FrameView::performPostLayoutTasks()
if (updateWidgets())
break;
}
-
+
+ scrollToAnchor();
+
resumeScheduledEvents();
if (!root->printing()) {
@@ -1351,7 +1386,7 @@ void FrameView::setWasScrolledByUser(bool wasScrolledByUser)
{
if (m_inProgrammaticScroll)
return;
- setLockedToAnchor(false);
+ m_maintainScrollPositionAnchor = 0;
m_wasScrolledByUser = wasScrolledByUser;
}
@@ -1447,11 +1482,13 @@ void FrameView::layoutIfNeededRecursive()
if (needsLayout())
layout();
- const HashSet<Widget*>* viewChildren = children();
- HashSet<Widget*>::const_iterator end = viewChildren->end();
- for (HashSet<Widget*>::const_iterator current = viewChildren->begin(); current != end; ++current)
- if ((*current)->isFrameView())
- static_cast<FrameView*>(*current)->layoutIfNeededRecursive();
+ const HashSet<RefPtr<Widget> >* viewChildren = children();
+ HashSet<RefPtr<Widget> >::const_iterator end = viewChildren->end();
+ for (HashSet<RefPtr<Widget> >::const_iterator current = viewChildren->begin(); current != end; ++current) {
+ Widget* widget = (*current).get();
+ if (widget->isFrameView())
+ static_cast<FrameView*>(widget)->layoutIfNeededRecursive();
+ }
// layoutIfNeededRecursive is called when we need to make sure layout is up-to-date before
// painting, so we need to flush out any deferred repaints too.
@@ -1517,4 +1554,142 @@ void FrameView::adjustPageHeight(float *newBottom, float oldTop, float oldBottom
*newBottom = oldBottom;
}
+IntRect FrameView::convertFromRenderer(const RenderObject* renderer, const IntRect& rendererRect) const
+{
+ IntRect rect = renderer->localToAbsoluteQuad(FloatRect(rendererRect)).enclosingBoundingBox();
+
+ // Convert from page ("absolute") to FrameView coordinates.
+ rect.move(-scrollX(), -scrollY());
+
+ return rect;
+}
+
+IntRect FrameView::convertToRenderer(const RenderObject* renderer, const IntRect& viewRect) const
+{
+ IntRect rect = viewRect;
+
+ // Convert from FrameView coords into page ("absolute") coordinates.
+ rect.move(scrollX(), scrollY());
+
+ // FIXME: we don't have a way to map an absolute rect down to a local quad, so just
+ // move the rect for now.
+ rect.setLocation(roundedIntPoint(renderer->absoluteToLocal(rect.location(), false, true /* use transforms */)));
+ return rect;
+}
+
+IntPoint FrameView::convertFromRenderer(const RenderObject* renderer, const IntPoint& rendererPoint) const
+{
+ IntPoint point = roundedIntPoint(renderer->localToAbsolute(rendererPoint, false, true /* use transforms */));
+
+ // Convert from page ("absolute") to FrameView coordinates.
+ point.move(-scrollX(), -scrollY());
+ return point;
+}
+
+IntPoint FrameView::convertToRenderer(const RenderObject* renderer, const IntPoint& viewPoint) const
+{
+ IntPoint point = viewPoint;
+
+ // Convert from FrameView coords into page ("absolute") coordinates.
+ point += IntSize(scrollX(), scrollY());
+
+ return roundedIntPoint(renderer->absoluteToLocal(point, false, true /* use transforms */));
+}
+
+IntRect FrameView::convertToContainingView(const IntRect& localRect) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ if (parentScrollView->isFrameView()) {
+ const FrameView* parentView = static_cast<const FrameView*>(parentScrollView);
+ // Get our renderer in the parent view
+ RenderPart* renderer = m_frame->ownerRenderer();
+ if (!renderer)
+ return localRect;
+
+ IntRect rect(localRect);
+ // Add borders and padding??
+ rect.move(renderer->borderLeft() + renderer->paddingLeft(),
+ renderer->borderTop() + renderer->paddingTop());
+ return parentView->convertFromRenderer(renderer, rect);
+ }
+
+ return Widget::convertToContainingView(localRect);
+ }
+
+ return localRect;
+}
+
+IntRect FrameView::convertFromContainingView(const IntRect& parentRect) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ if (parentScrollView->isFrameView()) {
+ const FrameView* parentView = static_cast<const FrameView*>(parentScrollView);
+
+ // Get our renderer in the parent view
+ RenderPart* renderer = m_frame->ownerRenderer();
+ if (!renderer)
+ return parentRect;
+
+ IntRect rect = parentView->convertToRenderer(renderer, parentRect);
+ // Subtract borders and padding
+ rect.move(-renderer->borderLeft() - renderer->paddingLeft(),
+ -renderer->borderTop() - renderer->paddingTop());
+ return rect;
+ }
+
+ return Widget::convertFromContainingView(parentRect);
+ }
+
+ return parentRect;
+}
+
+IntPoint FrameView::convertToContainingView(const IntPoint& localPoint) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ if (parentScrollView->isFrameView()) {
+ const FrameView* parentView = static_cast<const FrameView*>(parentScrollView);
+
+ // Get our renderer in the parent view
+ RenderPart* renderer = m_frame->ownerRenderer();
+ if (!renderer)
+ return localPoint;
+
+ IntPoint point(localPoint);
+
+ // Add borders and padding
+ point.move(renderer->borderLeft() + renderer->paddingLeft(),
+ renderer->borderTop() + renderer->paddingTop());
+ return parentView->convertFromRenderer(renderer, point);
+ }
+
+ return Widget::convertToContainingView(localPoint);
+ }
+
+ return localPoint;
+}
+
+IntPoint FrameView::convertFromContainingView(const IntPoint& parentPoint) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ if (parentScrollView->isFrameView()) {
+ const FrameView* parentView = static_cast<const FrameView*>(parentScrollView);
+
+ // Get our renderer in the parent view
+ RenderPart* renderer = m_frame->ownerRenderer();
+ if (!renderer)
+ return parentPoint;
+
+ IntPoint point = parentView->convertToRenderer(renderer, parentPoint);
+ // Subtract borders and padding
+ point.move(-renderer->borderLeft() - renderer->paddingLeft(),
+ -renderer->borderTop() - renderer->paddingTop());
+ return point;
+ }
+
+ return Widget::convertFromContainingView(parentPoint);
+ }
+
+ return parentPoint;
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.h b/src/3rdparty/webkit/WebCore/page/FrameView.h
index 9dabe56..8eee5b8 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.h
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.h
@@ -48,7 +48,7 @@ class String;
template <typename T> class Timer;
-class FrameView : public ScrollView, public RefCounted<FrameView> {
+class FrameView : public ScrollView {
public:
friend class RenderView;
@@ -93,8 +93,7 @@ public:
bool needsFullRepaint() const { return m_doFullRepaint; }
#if USE(ACCELERATED_COMPOSITING)
- enum CompositingUpdate { NormalCompositingUpdate, ForcedCompositingUpdate };
- void updateCompositingLayers(CompositingUpdate updateType = NormalCompositingUpdate);
+ void updateCompositingLayers();
// Called when changes to the GraphicsLayer hierarchy have to be synchronized with
// content rendered via the normal painting path.
@@ -126,11 +125,6 @@ public:
virtual IntRect windowClipRect(bool clipToContents = true) const;
IntRect windowClipRectForLayer(const RenderLayer*, bool clipToLayerContents) const;
- virtual bool isActive() const;
- virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
- virtual void valueChanged(Scrollbar*);
- virtual void getTickmarks(Vector<IntRect>&) const;
-
virtual IntRect windowResizerRect() const;
virtual void scrollRectIntoViewRecursively(const IntRect&);
@@ -185,9 +179,13 @@ public:
void adjustPageHeight(float* newBottom, float oldTop, float oldBottom, float bottomLimit);
- bool lockedToAnchor() { return m_lockedToAnchor; }
- void setLockedToAnchor(bool lockedToAnchor) { m_lockedToAnchor = lockedToAnchor; }
+ void maintainScrollPositionAtAnchor(Node*);
+ // Methods to convert points and rects between the coordinate space of the renderer, and this view.
+ virtual IntRect convertFromRenderer(const RenderObject*, const IntRect&) const;
+ virtual IntRect convertToRenderer(const RenderObject*, const IntRect&) const;
+ virtual IntPoint convertFromRenderer(const RenderObject*, const IntPoint&) const;
+ virtual IntPoint convertToRenderer(const RenderObject*, const IntPoint&) const;
private:
FrameView(Frame*);
@@ -215,12 +213,26 @@ private:
layout();
}
+ // Override ScrollView methods to do point conversion via renderers, in order to
+ // take transforms into account.
+ virtual IntRect convertToContainingView(const IntRect&) const;
+ virtual IntRect convertFromContainingView(const IntRect&) const;
+ virtual IntPoint convertToContainingView(const IntPoint&) const;
+ virtual IntPoint convertFromContainingView(const IntPoint&) const;
+
+ // ScrollBarClient interface
+ virtual void valueChanged(Scrollbar*);
+ virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
+ virtual bool isActive() const;
+ virtual void getTickmarks(Vector<IntRect>&) const;
+
void deferredRepaintTimerFired(Timer<FrameView>*);
void doDeferredRepaints();
void updateDeferredRepaintDelay();
double adjustedDeferredRepaintDelay() const;
bool updateWidgets();
+ void scrollToAnchor();
static double sCurrentPaintTimeStamp; // used for detecting decoded resource thrash in the cache
@@ -290,7 +302,7 @@ private:
bool m_isVisuallyNonEmpty;
bool m_firstVisuallyNonEmptyLayoutCallbackPending;
- bool m_lockedToAnchor;
+ RefPtr<Node> m_maintainScrollPositionAnchor;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.h b/src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.h
index c4e419c..7330d93 100644
--- a/src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.h
+++ b/src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.h
@@ -28,7 +28,6 @@ namespace WebCore {
class Scrollbar;
-// FIXME: Why doesn't this class just cache a HitTestResult instead of copying all of HitTestResult's fields over?
class MouseEventWithHitTestResults {
public:
MouseEventWithHitTestResults(const PlatformMouseEvent&, const HitTestResult&);
@@ -46,6 +45,6 @@ private:
HitTestResult m_hitTestResult;
};
-}
+} // namespace WebCore
-#endif
+#endif // MouseEventWithHitTestResults_h
diff --git a/src/3rdparty/webkit/WebCore/page/Settings.cpp b/src/3rdparty/webkit/WebCore/page/Settings.cpp
index 7a15163..6f8b7c7 100644
--- a/src/3rdparty/webkit/WebCore/page/Settings.cpp
+++ b/src/3rdparty/webkit/WebCore/page/Settings.cpp
@@ -75,6 +75,7 @@ Settings::Settings(Page* page)
#endif
, m_needsAdobeFrameReloadingQuirk(false)
, m_needsKeyboardEventDisambiguationQuirks(false)
+ , m_treatsAnyTextCSSLinkAsStylesheet(false)
, m_needsLeopardMailQuirks(false)
, m_needsTigerMailQuirks(false)
, m_isDOMPasteAllowed(false)
@@ -87,6 +88,7 @@ Settings::Settings(Page* page)
, m_needsSiteSpecificQuirks(false)
, m_fontRenderingMode(0)
, m_webArchiveDebugModeEnabled(false)
+ , m_localFileContentSniffingEnabled(false)
, m_inApplicationChromeMode(false)
, m_offlineWebApplicationCacheEnabled(false)
, m_shouldPaintCustomScrollbars(false)
@@ -314,6 +316,11 @@ void Settings::setNeedsKeyboardEventDisambiguationQuirks(bool needsQuirks)
m_needsKeyboardEventDisambiguationQuirks = needsQuirks;
}
+void Settings::setTreatsAnyTextCSSLinkAsStylesheet(bool treatsAnyTextCSSLinkAsStylesheet)
+{
+ m_treatsAnyTextCSSLinkAsStylesheet = treatsAnyTextCSSLinkAsStylesheet;
+}
+
void Settings::setNeedsLeopardMailQuirks(bool needsQuirks)
{
m_needsLeopardMailQuirks = needsQuirks;
@@ -400,6 +407,11 @@ void Settings::setWebArchiveDebugModeEnabled(bool enabled)
m_webArchiveDebugModeEnabled = enabled;
}
+void Settings::setLocalFileContentSniffingEnabled(bool enabled)
+{
+ m_localFileContentSniffingEnabled = enabled;
+}
+
void Settings::setLocalStorageDatabasePath(const String& path)
{
m_localStorageDatabasePath = path;
diff --git a/src/3rdparty/webkit/WebCore/page/Settings.h b/src/3rdparty/webkit/WebCore/page/Settings.h
index 4b9b40a..962af18 100644
--- a/src/3rdparty/webkit/WebCore/page/Settings.h
+++ b/src/3rdparty/webkit/WebCore/page/Settings.h
@@ -163,6 +163,9 @@ namespace WebCore {
void setNeedsKeyboardEventDisambiguationQuirks(bool);
bool needsKeyboardEventDisambiguationQuirks() const { return m_needsKeyboardEventDisambiguationQuirks; }
+ void setTreatsAnyTextCSSLinkAsStylesheet(bool);
+ bool treatsAnyTextCSSLinkAsStylesheet() const { return m_treatsAnyTextCSSLinkAsStylesheet; }
+
void setNeedsLeopardMailQuirks(bool);
bool needsLeopardMailQuirks() const { return m_needsLeopardMailQuirks; }
@@ -202,6 +205,9 @@ namespace WebCore {
void setWebArchiveDebugModeEnabled(bool);
bool webArchiveDebugModeEnabled() const { return m_webArchiveDebugModeEnabled; }
+ void setLocalFileContentSniffingEnabled(bool);
+ bool localFileContentSniffingEnabled() const { return m_localFileContentSniffingEnabled; }
+
void setLocalStorageDatabasePath(const String&);
const String& localStorageDatabasePath() const { return m_localStorageDatabasePath; }
@@ -282,6 +288,7 @@ namespace WebCore {
#endif
bool m_needsAdobeFrameReloadingQuirk : 1;
bool m_needsKeyboardEventDisambiguationQuirks : 1;
+ bool m_treatsAnyTextCSSLinkAsStylesheet : 1;
bool m_needsLeopardMailQuirks : 1;
bool m_needsTigerMailQuirks : 1;
bool m_isDOMPasteAllowed : 1;
@@ -294,6 +301,7 @@ namespace WebCore {
bool m_needsSiteSpecificQuirks : 1;
unsigned m_fontRenderingMode : 1;
bool m_webArchiveDebugModeEnabled : 1;
+ bool m_localFileContentSniffingEnabled : 1;
bool m_inApplicationChromeMode : 1;
bool m_offlineWebApplicationCacheEnabled : 1;
bool m_shouldPaintCustomScrollbars : 1;
diff --git a/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp b/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp
index f8a2f40..5dfc963 100644
--- a/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp
+++ b/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp
@@ -28,6 +28,7 @@
#include "XSSAuditor.h"
#include <wtf/StdLibExtras.h>
+#include <wtf/Vector.h>
#include "Console.h"
#include "CString.h"
@@ -35,6 +36,7 @@
#include "DOMWindow.h"
#include "Frame.h"
#include "KURL.h"
+#include "PreloadScanner.h"
#include "ResourceResponseBase.h"
#include "ScriptSourceCode.h"
#include "Settings.h"
@@ -44,6 +46,11 @@ using namespace WTF;
namespace WebCore {
+static bool isNonNullControlCharacter(UChar c)
+{
+ return (c > '\0' && c < ' ') || c == 127;
+}
+
XSSAuditor::XSSAuditor(Frame* frame)
: m_frame(frame)
{
@@ -64,9 +71,22 @@ bool XSSAuditor::canEvaluate(const String& sourceCode) const
if (!isEnabled())
return true;
- if (findInRequest(sourceCode)) {
+ if (findInRequest(sourceCode, false, true, false)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
- m_frame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, consoleMessage, 1, String());
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
+ return false;
+ }
+ return true;
+}
+
+bool XSSAuditor::canEvaluateJavaScriptURL(const String& code) const
+{
+ if (!isEnabled())
+ return true;
+
+ if (findInRequest(code, false, false, true, true)) {
+ DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
}
return true;
@@ -77,17 +97,22 @@ bool XSSAuditor::canCreateInlineEventListener(const String&, const String& code)
if (!isEnabled())
return true;
- return canEvaluate(code);
+ if (findInRequest(code)) {
+ DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
+ return false;
+ }
+ return true;
}
-bool XSSAuditor::canLoadExternalScriptFromSrc(const String& url) const
+bool XSSAuditor::canLoadExternalScriptFromSrc(const String& context, const String& url) const
{
if (!isEnabled())
return true;
- if (findInRequest(url)) {
+ if (findInRequest(context + url)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
- m_frame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, consoleMessage, 1, String());
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
}
return true;
@@ -98,45 +123,113 @@ bool XSSAuditor::canLoadObject(const String& url) const
if (!isEnabled())
return true;
- if (findInRequest(url)) {
+ if (findInRequest(url, false, false)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request"));
- m_frame->domWindow()->console()->addMessage(OtherMessageSource, ErrorMessageLevel, consoleMessage, 1, String());
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
}
return true;
}
-String XSSAuditor::decodeURL(const String& str, const TextEncoding& encoding, bool allowControlCharacters)
+bool XSSAuditor::canSetBaseElementURL(const String& url) const
+{
+ if (!isEnabled())
+ return true;
+
+ KURL baseElementURL(m_frame->document()->url(), url);
+ if (m_frame->document()->url().host() != baseElementURL.host() && findInRequest(url)) {
+ DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request"));
+ m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
+ return false;
+ }
+ return true;
+}
+
+String XSSAuditor::decodeURL(const String& str, const TextEncoding& encoding, bool allowNullCharacters,
+ bool allowNonNullControlCharacters, bool decodeHTMLentities, bool leaveUndecodableHTMLEntitiesUntouched)
{
String result;
String url = str;
url.replace('+', ' ');
result = decodeURLEscapeSequences(url);
- if (!allowControlCharacters)
- result.removeCharacters(&isControlCharacter);
- result = encoding.decode(result.utf8().data(), result.length());
- if (!allowControlCharacters)
- result.removeCharacters(&isControlCharacter);
+ String decodedResult = encoding.decode(result.utf8().data(), result.length());
+ if (!decodedResult.isEmpty())
+ result = decodedResult;
+ if (decodeHTMLentities)
+ result = decodeHTMLEntities(result, leaveUndecodableHTMLEntitiesUntouched);
+ if (!allowNullCharacters)
+ result = StringImpl::createStrippingNullCharacters(result.characters(), result.length());
+ if (!allowNonNullControlCharacters) {
+ decodedResult = result.removeCharacters(&isNonNullControlCharacter);
+ if (!decodedResult.isEmpty())
+ result = decodedResult;
+ }
return result;
}
-bool XSSAuditor::findInRequest(const String& string) const
+String XSSAuditor::decodeHTMLEntities(const String& str, bool leaveUndecodableHTMLEntitiesUntouched)
+{
+ SegmentedString source(str);
+ SegmentedString sourceShadow;
+ Vector<UChar> result;
+
+ while (!source.isEmpty()) {
+ UChar cc = *source;
+ source.advance();
+
+ if (cc != '&') {
+ result.append(cc);
+ continue;
+ }
+
+ if (leaveUndecodableHTMLEntitiesUntouched)
+ sourceShadow = source;
+ bool notEnoughCharacters = false;
+ unsigned entity = PreloadScanner::consumeEntity(source, notEnoughCharacters);
+ // We ignore notEnoughCharacters because we might as well use this loop
+ // to copy the remaining characters into |result|.
+
+ if (entity > 0xFFFF) {
+ result.append(U16_LEAD(entity));
+ result.append(U16_TRAIL(entity));
+ } else if (!leaveUndecodableHTMLEntitiesUntouched || entity != 0xFFFD){
+ result.append(entity);
+ } else {
+ result.append('&');
+ if (leaveUndecodableHTMLEntitiesUntouched)
+ source = sourceShadow;
+ }
+ }
+
+ return String::adopt(result);
+}
+
+bool XSSAuditor::findInRequest(const String& string, bool matchNullCharacters, bool matchNonNullControlCharacters,
+ bool decodeHTMLentities, bool leaveUndecodableHTMLEntitiesUntouched) const
{
bool result = false;
Frame* parentFrame = m_frame->tree()->parent();
if (parentFrame && m_frame->document()->url() == blankURL())
- result = findInRequest(parentFrame, string);
+ result = findInRequest(parentFrame, string, matchNullCharacters, matchNonNullControlCharacters,
+ decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched);
if (!result)
- result = findInRequest(m_frame, string);
+ result = findInRequest(m_frame, string, matchNullCharacters, matchNonNullControlCharacters,
+ decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched);
return result;
}
-bool XSSAuditor::findInRequest(Frame* frame, const String& string) const
+bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool matchNullCharacters, bool matchNonNullControlCharacters,
+ bool decodeHTMLentities, bool leaveUndecodableHTMLEntitiesUntouched) const
{
ASSERT(frame->document());
String pageURL = frame->document()->url().string();
+ if (!frame->document()->decoder()) {
+ // Note, JavaScript URLs do not have a charset.
+ return false;
+ }
+
if (protocolIs(pageURL, "data"))
return false;
@@ -145,7 +238,8 @@ bool XSSAuditor::findInRequest(Frame* frame, const String& string) const
if (string.length() < pageURL.length()) {
// The string can actually fit inside the pageURL.
- String decodedPageURL = decodeURL(pageURL, frame->document()->decoder()->encoding());
+ String decodedPageURL = decodeURL(pageURL, frame->document()->decoder()->encoding(), matchNullCharacters,
+ matchNonNullControlCharacters, decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched);
if (decodedPageURL.find(string, 0, false) != -1)
return true; // We've found the smoking gun.
}
@@ -158,7 +252,8 @@ bool XSSAuditor::findInRequest(Frame* frame, const String& string) const
// the url-encoded POST data because the length of the url-decoded
// code is less than or equal to the length of the url-encoded
// string.
- String decodedFormData = decodeURL(formData, frame->document()->decoder()->encoding());
+ String decodedFormData = decodeURL(formData, frame->document()->decoder()->encoding(), matchNullCharacters,
+ matchNonNullControlCharacters, decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched);
if (decodedFormData.find(string, 0, false) != -1)
return true; // We found the string in the POST data.
}
diff --git a/src/3rdparty/webkit/WebCore/page/XSSAuditor.h b/src/3rdparty/webkit/WebCore/page/XSSAuditor.h
index 7974d1c..6c6a56c 100644
--- a/src/3rdparty/webkit/WebCore/page/XSSAuditor.h
+++ b/src/3rdparty/webkit/WebCore/page/XSSAuditor.h
@@ -74,13 +74,17 @@ namespace WebCore {
// based on the content of any user-submitted data.
bool canEvaluate(const String& sourceCode) const;
+ // Determines whether the JavaScript URL should be allowed or denied execution
+ // based on the content of any user-submitted data.
+ bool canEvaluateJavaScriptURL(const String& code) const;
+
// Determines whether the event listener should be created based on the
// content of any user-submitted data.
bool canCreateInlineEventListener(const String& functionName, const String& code) const;
// Determines whether the external script should be loaded based on the
// content of any user-submitted data.
- bool canLoadExternalScriptFromSrc(const String& url) const;
+ bool canLoadExternalScriptFromSrc(const String& context, const String& url) const;
// Determines whether object should be loaded based on the content of
// any user-submitted data.
@@ -88,12 +92,24 @@ namespace WebCore {
// This method is called by FrameLoader::requestObject.
bool canLoadObject(const String& url) const;
+ // Determines whether the base URL should be changed based on the content
+ // of any user-submitted data.
+ //
+ // This method is called by HTMLBaseElement::process.
+ bool canSetBaseElementURL(const String& url) const;
+
private:
- static String decodeURL(const String& url, const TextEncoding& encoding = UTF8Encoding(), bool allowControlCharacters = false);
+ static String decodeURL(const String& url, const TextEncoding& encoding = UTF8Encoding(), bool allowNullCharacters = false,
+ bool allowNonNullControlCharacters = true, bool decodeHTMLentities = true,
+ bool leaveUndecodableHTMLEntitiesUntouched = false);
+
+ static String decodeHTMLEntities(const String&, bool leaveUndecodableHTMLEntitiesUntouched = false);
- bool findInRequest(const String&) const;
+ bool findInRequest(const String&, bool matchNullCharacters = true, bool matchNonNullControlCharacters = true,
+ bool decodeHTMLentities = true, bool leaveUndecodableHTMLEntitiesUntouched = false) const;
- bool findInRequest(Frame*, const String&) const;
+ bool findInRequest(Frame*, const String&, bool matchNullCharacters = true, bool matchNonNullControlCharacters = true,
+ bool decodeHTMLentities = true, bool leaveUndecodableHTMLEntitiesUntouched = false) const;
// The frame to audit.
Frame* m_frame;
diff --git a/src/3rdparty/webkit/WebCore/page/android/DragControllerAndroid.cpp b/src/3rdparty/webkit/WebCore/page/android/DragControllerAndroid.cpp
index 94c1cbb..19d02c6 100644
--- a/src/3rdparty/webkit/WebCore/page/android/DragControllerAndroid.cpp
+++ b/src/3rdparty/webkit/WebCore/page/android/DragControllerAndroid.cpp
@@ -44,7 +44,7 @@ DragOperation DragController::dragOperation(DragData* dragData)
if (dragData->containsURL())
return DragOperationCopy;
- return DragOperationNone;
+ return DragOperationNone;
}
const float DragController::DragImageAlpha = 1.0f;
diff --git a/src/3rdparty/webkit/WebCore/page/android/EventHandlerAndroid.cpp b/src/3rdparty/webkit/WebCore/page/android/EventHandlerAndroid.cpp
index 2464429..c6bce4f 100644
--- a/src/3rdparty/webkit/WebCore/page/android/EventHandlerAndroid.cpp
+++ b/src/3rdparty/webkit/WebCore/page/android/EventHandlerAndroid.cpp
@@ -41,7 +41,7 @@ namespace WebCore {
unsigned EventHandler::s_accessKeyModifiers = PlatformKeyboardEvent::AltKey;
-bool EventHandler::tabsToAllControls(KeyboardEvent* ) const
+bool EventHandler::tabsToAllControls(KeyboardEvent*) const
{
return true;
}
@@ -75,7 +75,7 @@ bool EventHandler::passMouseDownEventToWidget(Widget* )
return false;
}
-bool EventHandler::eventActivatedView(const PlatformMouseEvent& ) const
+bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
{
notImplemented();
return false;
diff --git a/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp b/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp
index 7b8a189..a4916e9 100644
--- a/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp
+++ b/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp
@@ -1041,7 +1041,7 @@ void AnimationBase::getTimeToNextEvent(double& time, bool& isLooping) const
double nextIterationTime = m_totalDuration;
if (m_totalDuration < 0 || elapsedDuration < m_totalDuration) {
- durationLeft = m_animation->duration() - fmod(elapsedDuration, m_animation->duration());
+ durationLeft = m_animation->duration() > 0 ? (m_animation->duration() - fmod(elapsedDuration, m_animation->duration())) : 0;
nextIterationTime = elapsedDuration + durationLeft;
}
diff --git a/src/3rdparty/webkit/WebCore/page/animation/AnimationController.cpp b/src/3rdparty/webkit/WebCore/page/animation/AnimationController.cpp
index 58a1f5b..ed241e1 100644
--- a/src/3rdparty/webkit/WebCore/page/animation/AnimationController.cpp
+++ b/src/3rdparty/webkit/WebCore/page/animation/AnimationController.cpp
@@ -136,9 +136,9 @@ void AnimationControllerPrivate::updateStyleIfNeededDispatcherFired(Timer<Animat
Vector<EventToDispatch>::const_iterator eventsToDispatchEnd = m_eventsToDispatch.end();
for (Vector<EventToDispatch>::const_iterator it = m_eventsToDispatch.begin(); it != eventsToDispatchEnd; ++it) {
if (it->eventType == eventNames().webkitTransitionEndEvent)
- it->element->dispatchWebKitTransitionEvent(it->eventType,it->name, it->elapsedTime);
+ it->element->dispatchWebKitTransitionEvent(it->eventType, it->name, it->elapsedTime);
else
- it->element->dispatchWebKitAnimationEvent(it->eventType,it->name, it->elapsedTime);
+ it->element->dispatchWebKitAnimationEvent(it->eventType, it->name, it->elapsedTime);
}
m_eventsToDispatch.clear();
@@ -152,20 +152,6 @@ void AnimationControllerPrivate::updateStyleIfNeededDispatcherFired(Timer<Animat
if (m_frame)
m_frame->document()->updateStyleIfNeeded();
-
- // We can now safely remove any animations or transitions that are finished.
- // We can't remove them any earlier because we might get a false restart of
- // a transition. This can happen because we have not yet set the final property
- // value until we call the rendering dispatcher. So this can make the current
- // style slightly different from the desired final style (because our last
- // animation step was, say 0.9999 or something). And we need to remove them
- // here because if there are no more animations running we'll never get back
- // into the animation code to clean them up.
- RenderObjectAnimationMap::const_iterator animationsEnd = m_compositeAnimations.end();
- for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) {
- CompositeAnimation* compAnim = it->second.get();
- compAnim->cleanupFinishedAnimations(); // will not modify m_compositeAnimations, so OK to call while iterating
- }
}
void AnimationControllerPrivate::startUpdateStyleIfNeededDispatcher()
diff --git a/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.cpp b/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.cpp
index b03dfe3..9481b8d 100644
--- a/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.cpp
@@ -117,7 +117,10 @@ void CompositeAnimation::updateTransitions(RenderObject* renderer, RenderStyle*
bool equal = true;
if (implAnim) {
- implAnim->setActive(true);
+ // If we are post active don't bother setting the active flag. This will cause
+ // this animation to get removed at the end of this function.
+ if (!implAnim->postActive())
+ implAnim->setActive(true);
// This might be a transition that is just finishing. That would be the case
// if it were postActive. But we still need to check for equality because
@@ -183,52 +186,62 @@ void CompositeAnimation::updateKeyframeAnimations(RenderObject* renderer, Render
if (m_keyframeAnimations.isEmpty() && !targetStyle->hasAnimations())
return;
- // Nothing to do if the current and target animations are the same
- if (currentStyle && currentStyle->hasAnimations() && targetStyle->hasAnimations() && *(currentStyle->animations()) == *(targetStyle->animations()))
- return;
-
- // Mark all existing animations as no longer active
AnimationNameMap::const_iterator kfend = m_keyframeAnimations.end();
- for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != kfend; ++it)
- it->second->setIndex(-1);
-
- // Toss the animation order map
- m_keyframeAnimationOrderMap.clear();
- // Now mark any still active animations as active and add any new animations
- if (targetStyle->animations()) {
- int numAnims = targetStyle->animations()->size();
- for (int i = 0; i < numAnims; ++i) {
- const Animation* anim = targetStyle->animations()->animation(i);
- AtomicString animationName(anim->name());
-
- if (!anim->isValidAnimation())
- continue;
+ if (currentStyle && currentStyle->hasAnimations() && targetStyle->hasAnimations() && *(currentStyle->animations()) == *(targetStyle->animations())) {
+ // The current and target animations are the same so we just need to toss any
+ // animation which is finished (postActive).
+ for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != kfend; ++it) {
+ if (it->second->postActive())
+ it->second->setIndex(-1);
+ }
+ } else {
+ // Mark all existing animations as no longer active.
+ for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != kfend; ++it)
+ it->second->setIndex(-1);
- // See if there is a current animation for this name
- RefPtr<KeyframeAnimation> keyframeAnim = m_keyframeAnimations.get(animationName.impl());
+ // Toss the animation order map.
+ m_keyframeAnimationOrderMap.clear();
+
+ // Now mark any still active animations as active and add any new animations.
+ if (targetStyle->animations()) {
+ int numAnims = targetStyle->animations()->size();
+ for (int i = 0; i < numAnims; ++i) {
+ const Animation* anim = targetStyle->animations()->animation(i);
+ AtomicString animationName(anim->name());
+
+ if (!anim->isValidAnimation())
+ continue;
+
+ // See if there is a current animation for this name.
+ RefPtr<KeyframeAnimation> keyframeAnim = m_keyframeAnimations.get(animationName.impl());
+
+ if (keyframeAnim) {
+ // If this animation is postActive, skip it so it gets removed at the end of this function.
+ if (keyframeAnim->postActive())
+ continue;
+
+ // This one is still active.
+
+ // Animations match, but play states may differ. Update if needed.
+ keyframeAnim->updatePlayState(anim->playState() == AnimPlayStatePlaying);
+
+ // Set the saved animation to this new one, just in case the play state has changed.
+ keyframeAnim->setAnimation(anim);
+ keyframeAnim->setIndex(i);
+ } else if ((anim->duration() || anim->delay()) && anim->iterationCount()) {
+ keyframeAnim = KeyframeAnimation::create(const_cast<Animation*>(anim), renderer, i, this, currentStyle ? currentStyle : targetStyle);
+ m_keyframeAnimations.set(keyframeAnim->name().impl(), keyframeAnim);
+ }
- if (keyframeAnim) {
- // There is one so it is still active
-
- // Animations match, but play states may differ. update if needed
- keyframeAnim->updatePlayState(anim->playState() == AnimPlayStatePlaying);
-
- // Set the saved animation to this new one, just in case the play state has changed
- keyframeAnim->setAnimation(anim);
- keyframeAnim->setIndex(i);
- } else if ((anim->duration() || anim->delay()) && anim->iterationCount()) {
- keyframeAnim = KeyframeAnimation::create(const_cast<Animation*>(anim), renderer, i, this, currentStyle ? currentStyle : targetStyle);
- m_keyframeAnimations.set(keyframeAnim->name().impl(), keyframeAnim);
+ // Add this to the animation order map.
+ if (keyframeAnim)
+ m_keyframeAnimationOrderMap.append(keyframeAnim->name().impl());
}
-
- // Add this to the animation order map
- if (keyframeAnim)
- m_keyframeAnimationOrderMap.append(keyframeAnim->name().impl());
}
}
-
- // Make a list of animations to be removed
+
+ // Make a list of animations to be removed.
Vector<AtomicStringImpl*> animsToBeRemoved;
kfend = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != kfend; ++it) {
@@ -237,7 +250,7 @@ void CompositeAnimation::updateKeyframeAnimations(RenderObject* renderer, Render
animsToBeRemoved.append(keyframeAnim->name().impl());
}
- // Now remove the animations from the list
+ // Now remove the animations from the list.
for (size_t j = 0; j < animsToBeRemoved.size(); ++j)
m_keyframeAnimations.remove(animsToBeRemoved[j]);
}
@@ -246,11 +259,9 @@ PassRefPtr<RenderStyle> CompositeAnimation::animate(RenderObject* renderer, Rend
{
RefPtr<RenderStyle> resultStyle;
- // Update animations first so we can see if any transitions are overridden
- updateKeyframeAnimations(renderer, currentStyle, targetStyle);
-
- // We don't do any transitions if we don't have a currentStyle (on startup)
+ // We don't do any transitions if we don't have a currentStyle (on startup).
updateTransitions(renderer, currentStyle, targetStyle);
+ updateKeyframeAnimations(renderer, currentStyle, targetStyle);
if (currentStyle) {
// Now that we have transition objects ready, let them know about the new goal state. We want them
@@ -272,8 +283,6 @@ PassRefPtr<RenderStyle> CompositeAnimation::animate(RenderObject* renderer, Rend
keyframeAnim->animate(this, renderer, currentStyle, targetStyle, resultStyle);
}
- cleanupFinishedAnimations();
-
return resultStyle ? resultStyle.release() : targetStyle;
}
@@ -364,50 +373,6 @@ PassRefPtr<KeyframeAnimation> CompositeAnimation::getAnimationForProperty(int pr
return retval;
}
-void CompositeAnimation::cleanupFinishedAnimations()
-{
- if (isSuspended())
- return;
-
- // Make a list of transitions to be deleted
- Vector<int> finishedTransitions;
- if (!m_transitions.isEmpty()) {
- CSSPropertyTransitionsMap::const_iterator transitionsEnd = m_transitions.end();
-
- for (CSSPropertyTransitionsMap::const_iterator it = m_transitions.begin(); it != transitionsEnd; ++it) {
- ImplicitAnimation* anim = it->second.get();
- if (!anim)
- continue;
- if (anim->postActive())
- finishedTransitions.append(anim->animatingProperty());
- }
-
- // Delete them
- size_t finishedTransitionCount = finishedTransitions.size();
- for (size_t i = 0; i < finishedTransitionCount; ++i)
- m_transitions.remove(finishedTransitions[i]);
- }
-
- // Make a list of animations to be deleted
- Vector<AtomicStringImpl*> finishedAnimations;
- if (!m_keyframeAnimations.isEmpty()) {
- AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
-
- for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
- KeyframeAnimation* anim = it->second.get();
- if (!anim)
- continue;
- if (anim->postActive())
- finishedAnimations.append(anim->name().impl());
- }
-
- // Delete them
- size_t finishedAnimationCount = finishedAnimations.size();
- for (size_t i = 0; i < finishedAnimationCount; ++i)
- m_keyframeAnimations.remove(finishedAnimations[i]);
- }
-}
-
void CompositeAnimation::suspendAnimations()
{
if (m_isSuspended)
diff --git a/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.h b/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.h
index 739cfdc..b7db442 100644
--- a/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.h
+++ b/src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.h
@@ -74,8 +74,6 @@ public:
PassRefPtr<KeyframeAnimation> getAnimationForProperty(int property) const;
- void cleanupFinishedAnimations();
-
void overrideImplicitAnimations(int property);
void resumeOverriddenImplicitAnimations(int property);
diff --git a/src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.cpp b/src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.cpp
index 8edcd5a..8e6349d 100644
--- a/src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.cpp
@@ -212,6 +212,10 @@ bool ImplicitAnimation::affectsProperty(int property) const
bool ImplicitAnimation::isTargetPropertyEqual(int prop, const RenderStyle* targetStyle)
{
+ // We can get here for a transition that has not started yet. This would make m_toStyle unset and null.
+ // So we check that here (see <https://bugs.webkit.org/show_bug.cgi?id=26706>)
+ if (!m_toStyle)
+ return false;
return propertiesEqual(prop, m_toStyle.get(), targetStyle);
}
diff --git a/src/3rdparty/webkit/WebCore/page/qt/DragControllerQt.cpp b/src/3rdparty/webkit/WebCore/page/qt/DragControllerQt.cpp
index 1fe56b4..e6c7682 100644
--- a/src/3rdparty/webkit/WebCore/page/qt/DragControllerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/page/qt/DragControllerQt.cpp
@@ -31,8 +31,7 @@
#include "FrameView.h"
#include "Page.h"
-namespace WebCore
-{
+namespace WebCore {
// FIXME: These values are straight out of DragControllerMac, so probably have
// little correlation with Qt standards...
diff --git a/src/3rdparty/webkit/WebCore/page/win/DragControllerWin.cpp b/src/3rdparty/webkit/WebCore/page/win/DragControllerWin.cpp
index dca8ea2..f0404ff 100644
--- a/src/3rdparty/webkit/WebCore/page/win/DragControllerWin.cpp
+++ b/src/3rdparty/webkit/WebCore/page/win/DragControllerWin.cpp
@@ -50,7 +50,8 @@ DragOperation DragController::dragOperation(DragData* dragData)
return dragData->containsURL() && !m_didInitiateDrag ? DragOperationCopy : DragOperationNone;
}
-bool DragController::isCopyKeyDown() {
+bool DragController::isCopyKeyDown()
+{
return ::GetAsyncKeyState(VK_CONTROL);
}
diff --git a/src/3rdparty/webkit/WebCore/page/win/FrameWin.h b/src/3rdparty/webkit/WebCore/page/win/FrameWin.h
index 405c7b2..2924291 100644
--- a/src/3rdparty/webkit/WebCore/page/win/FrameWin.h
+++ b/src/3rdparty/webkit/WebCore/page/win/FrameWin.h
@@ -34,7 +34,7 @@ typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
HBITMAP imageFromSelection(Frame* frame, bool forceWhiteText);
- void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor,Vector<IntRect>& pages, int& pageHeight);
+ void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& pageHeight);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/CrossThreadCopier.h b/src/3rdparty/webkit/WebCore/platform/CrossThreadCopier.h
index e7b4c0e..d12d72d 100644
--- a/src/3rdparty/webkit/WebCore/platform/CrossThreadCopier.h
+++ b/src/3rdparty/webkit/WebCore/platform/CrossThreadCopier.h
@@ -32,6 +32,7 @@
#define CrossThreadCopier_h
#include <memory>
+#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Threading.h>
@@ -73,6 +74,14 @@ namespace WebCore {
}
};
+ template<typename T> struct CrossThreadCopierBase<false, PassOwnPtr<T> > {
+ typedef PassOwnPtr<T> Type;
+ static Type copy(const PassOwnPtr<T>& ownPtr)
+ {
+ return PassOwnPtr<T>(static_cast<T*>(ownPtr.release()));
+ }
+ };
+
template<typename T> struct CrossThreadCopierBase<false, std::auto_ptr<T> > {
typedef std::auto_ptr<T> Type;
static Type copy(const std::auto_ptr<T>& autoPtr)
diff --git a/src/3rdparty/webkit/WebCore/platform/DragImage.h b/src/3rdparty/webkit/WebCore/platform/DragImage.h
index 744e450..a9039db 100644
--- a/src/3rdparty/webkit/WebCore/platform/DragImage.h
+++ b/src/3rdparty/webkit/WebCore/platform/DragImage.h
@@ -46,6 +46,8 @@ typedef struct HBITMAP__* HBITMAP;
class wxDragImage;
#elif PLATFORM(CHROMIUM)
#include "DragImageRef.h"
+#elif PLATFORM(GTK)
+typedef struct _GdkPixbuf GdkPixbuf;
#endif
//We need to #define YOffset as it needs to be shared with WebKit
@@ -69,7 +71,7 @@ namespace WebCore {
#elif PLATFORM(WX)
typedef wxDragImage* DragImageRef;
#elif PLATFORM(GTK)
- typedef void* DragImageRef;
+ typedef GdkPixbuf* DragImageRef;
#endif
IntSize dragImageSize(DragImageRef);
diff --git a/src/3rdparty/webkit/WebCore/platform/FileSystem.h b/src/3rdparty/webkit/WebCore/platform/FileSystem.h
index 16afe8f..e23b6da 100644
--- a/src/3rdparty/webkit/WebCore/platform/FileSystem.h
+++ b/src/3rdparty/webkit/WebCore/platform/FileSystem.h
@@ -53,7 +53,7 @@
typedef const struct __CFData* CFDataRef;
-#if PLATFORM(WIN)
+#if PLATFORM(WIN_OS)
// These are to avoid including <winbase.h> in a header for Chromium
typedef void *HANDLE;
// Assuming STRICT
@@ -65,13 +65,15 @@ namespace WebCore {
class CString;
-#if PLATFORM(WIN)
-typedef HANDLE PlatformFileHandle;
-typedef HMODULE PlatformModule;
-// FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
-// avoid using Windows headers in headers. We'd rather move this into the .cpp.
-const PlatformFileHandle invalidPlatformFileHandle = reinterpret_cast<HANDLE>(-1);
+#if PLATFORM(QT)
+typedef QFile* PlatformFileHandle;
+const PlatformFileHandle invalidPlatformFileHandle = 0;
+#if defined(Q_WS_MAC)
+typedef CFBundleRef PlatformModule;
+typedef unsigned PlatformModuleVersion;
+#elif defined(Q_OS_WIN)
+typedef HMODULE PlatformModule;
struct PlatformModuleVersion {
unsigned leastSig;
unsigned mostSig;
@@ -89,15 +91,18 @@ struct PlatformModuleVersion {
}
};
-#elif PLATFORM(QT)
-
-typedef QFile* PlatformFileHandle;
-const PlatformFileHandle invalidPlatformFileHandle = 0;
-#if defined(Q_WS_MAC)
-typedef CFBundleRef PlatformModule;
+#else
+typedef QLibrary* PlatformModule;
typedef unsigned PlatformModuleVersion;
-#elif defined(Q_OS_WIN)
+#endif
+
+#elif PLATFORM(WIN_OS)
+typedef HANDLE PlatformFileHandle;
typedef HMODULE PlatformModule;
+// FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
+// avoid using Windows headers in headers. We'd rather move this into the .cpp.
+const PlatformFileHandle invalidPlatformFileHandle = reinterpret_cast<HANDLE>(-1);
+
struct PlatformModuleVersion {
unsigned leastSig;
unsigned mostSig;
@@ -116,11 +121,6 @@ struct PlatformModuleVersion {
};
#else
-typedef QLibrary* PlatformModule;
-typedef unsigned PlatformModuleVersion;
-#endif
-
-#else
typedef int PlatformFileHandle;
#if PLATFORM(GTK)
typedef GModule* PlatformModule;
diff --git a/src/3rdparty/webkit/WebCore/platform/LocalizedStrings.h b/src/3rdparty/webkit/WebCore/platform/LocalizedStrings.h
index b6ec878..7c586d3 100644
--- a/src/3rdparty/webkit/WebCore/platform/LocalizedStrings.h
+++ b/src/3rdparty/webkit/WebCore/platform/LocalizedStrings.h
@@ -132,6 +132,9 @@ namespace WebCore {
#endif
String imageTitle(const String& filename, const IntSize& size);
+
+ String mediaElementLoadingStateText();
+ String mediaElementLiveBroadcastStateText();
}
#endif
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index 9d3c128..ba6b61c 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -58,11 +58,12 @@ ScrollView::~ScrollView()
platformDestroy();
}
-void ScrollView::addChild(Widget* child)
+void ScrollView::addChild(PassRefPtr<Widget> prpChild)
{
+ Widget* child = prpChild.get();
ASSERT(child != this && !child->parent());
child->setParent(this);
- m_children.add(child);
+ m_children.add(prpChild);
if (child->platformWidget())
platformAddChild(child);
}
@@ -640,7 +641,7 @@ void ScrollView::setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppre
}
}
-Scrollbar* ScrollView::scrollbarUnderPoint(const IntPoint& windowPoint)
+Scrollbar* ScrollView::scrollbarAtPoint(const IntPoint& windowPoint)
{
if (platformWidget())
return 0;
@@ -709,8 +710,8 @@ void ScrollView::frameRectsChanged()
if (platformWidget())
return;
- HashSet<Widget*>::const_iterator end = m_children.end();
- for (HashSet<Widget*>::const_iterator current = m_children.begin(); current != end; ++current)
+ HashSet<RefPtr<Widget> >::const_iterator end = m_children.end();
+ for (HashSet<RefPtr<Widget> >::const_iterator current = m_children.begin(); current != end; ++current)
(*current)->frameRectsChanged();
}
@@ -802,6 +803,39 @@ bool ScrollView::scrollbarCornerPresent() const
(m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0);
}
+IntRect ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& localRect) const
+{
+ // Scrollbars won't be transformed within us
+ IntRect newRect = localRect;
+ newRect.move(scrollbar->x(), scrollbar->y());
+ return newRect;
+}
+
+IntRect ScrollView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
+{
+ IntRect newRect = parentRect;
+ // Scrollbars won't be transformed within us
+ newRect.move(-scrollbar->x(), -scrollbar->y());
+ return newRect;
+}
+
+// FIXME: test these on windows
+IntPoint ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& localPoint) const
+{
+ // Scrollbars won't be transformed within us
+ IntPoint newPoint = localPoint;
+ newPoint.move(scrollbar->x(), scrollbar->y());
+ return newPoint;
+}
+
+IntPoint ScrollView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
+{
+ IntPoint newPoint = parentPoint;
+ // Scrollbars won't be transformed within us
+ newPoint.move(-scrollbar->x(), -scrollbar->y());
+ return newPoint;
+}
+
void ScrollView::setParentVisible(bool visible)
{
if (isParentVisible() == visible)
@@ -812,8 +846,8 @@ void ScrollView::setParentVisible(bool visible)
if (!isSelfVisible())
return;
- HashSet<Widget*>::iterator end = m_children.end();
- for (HashSet<Widget*>::iterator it = m_children.begin(); it != end; ++it)
+ HashSet<RefPtr<Widget> >::iterator end = m_children.end();
+ for (HashSet<RefPtr<Widget> >::iterator it = m_children.begin(); it != end; ++it)
(*it)->setParentVisible(visible);
}
@@ -822,8 +856,8 @@ void ScrollView::show()
if (!isSelfVisible()) {
setSelfVisible(true);
if (isParentVisible()) {
- HashSet<Widget*>::iterator end = m_children.end();
- for (HashSet<Widget*>::iterator it = m_children.begin(); it != end; ++it)
+ HashSet<RefPtr<Widget> >::iterator end = m_children.end();
+ for (HashSet<RefPtr<Widget> >::iterator it = m_children.begin(); it != end; ++it)
(*it)->setParentVisible(true);
}
}
@@ -835,8 +869,8 @@ void ScrollView::hide()
{
if (isSelfVisible()) {
if (isParentVisible()) {
- HashSet<Widget*>::iterator end = m_children.end();
- for (HashSet<Widget*>::iterator it = m_children.begin(); it != end; ++it)
+ HashSet<RefPtr<Widget> >::iterator end = m_children.end();
+ for (HashSet<RefPtr<Widget> >::iterator it = m_children.begin(); it != end; ++it)
(*it)->setParentVisible(false);
}
setSelfVisible(false);
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 7f99a22..b950327 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -55,7 +55,6 @@ class Scrollbar;
class ScrollView : public Widget, public ScrollbarClient {
public:
- ScrollView();
~ScrollView();
// ScrollbarClient method. FrameView overrides the other two.
@@ -69,8 +68,8 @@ public:
virtual IntRect windowClipRect(bool clipToContents = true) const = 0;
// Methods for child manipulation and inspection.
- const HashSet<Widget*>* children() const { return &m_children; }
- void addChild(Widget*);
+ const HashSet<RefPtr<Widget> >* children() const { return &m_children; }
+ void addChild(PassRefPtr<Widget>);
void removeChild(Widget*);
// If the scroll view does not use a native widget, then it will have cross-platform Scrollbars. These methods
@@ -181,7 +180,7 @@ public:
virtual void setFrameRect(const IntRect&);
// For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32).
- Scrollbar* scrollbarUnderPoint(const IntPoint& windowPoint);
+ Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint);
// This method exists for scrollviews that need to handle wheel events manually.
// On Mac the underlying NSScrollView just does the scrolling, but on other platforms
@@ -221,7 +220,14 @@ public:
virtual bool scrollbarCornerPresent() const;
+ virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
+ virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
+ virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
+ virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
+
protected:
+ ScrollView();
+
virtual void repaintContentRectangle(const IntRect&, bool now = false);
virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
@@ -239,7 +245,7 @@ private:
ScrollbarMode m_verticalScrollbarMode;
bool m_prohibitsScrolling;
- HashSet<Widget*> m_children;
+ HashSet<RefPtr<Widget> > m_children;
// This bool is unused on Mac OS because we directly ask the platform widget
// whether it is safe to blit on scroll.
diff --git a/src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp b/src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp
index babf3d4..4574f63 100644
--- a/src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp
@@ -449,9 +449,36 @@ void Scrollbar::invalidateRect(const IntRect& rect)
m_client->invalidateScrollbarRect(this, rect);
}
-PlatformMouseEvent Scrollbar::transformEvent(const PlatformMouseEvent& event)
+IntRect Scrollbar::convertToContainingView(const IntRect& localRect) const
{
- return event;
+ if (m_client)
+ return m_client->convertFromScrollbarToContainingView(this, localRect);
+
+ return Widget::convertToContainingView(localRect);
+}
+
+IntRect Scrollbar::convertFromContainingView(const IntRect& parentRect) const
+{
+ if (m_client)
+ return m_client->convertFromContainingViewToScrollbar(this, parentRect);
+
+ return Widget::convertFromContainingView(parentRect);
+}
+
+IntPoint Scrollbar::convertToContainingView(const IntPoint& localPoint) const
+{
+ if (m_client)
+ return m_client->convertFromScrollbarToContainingView(this, localPoint);
+
+ return Widget::convertToContainingView(localPoint);
+}
+
+IntPoint Scrollbar::convertFromContainingView(const IntPoint& parentPoint) const
+{
+ if (m_client)
+ return m_client->convertFromContainingViewToScrollbar(this, parentPoint);
+
+ return Widget::convertFromContainingView(parentPoint);
}
}
diff --git a/src/3rdparty/webkit/WebCore/platform/Scrollbar.h b/src/3rdparty/webkit/WebCore/platform/Scrollbar.h
index 711ae36..67496f2 100644
--- a/src/3rdparty/webkit/WebCore/platform/Scrollbar.h
+++ b/src/3rdparty/webkit/WebCore/platform/Scrollbar.h
@@ -26,7 +26,6 @@
#ifndef Scrollbar_h
#define Scrollbar_h
-#include <wtf/RefCounted.h>
#include "ScrollTypes.h"
#include "Timer.h"
#include "Widget.h"
@@ -45,7 +44,7 @@ class PlatformMouseEvent;
const int cScrollbarPixelsPerLineStep = 40;
const int cAmountToKeepWhenPaging = 40;
-class Scrollbar : public Widget, public RefCounted<Scrollbar> {
+class Scrollbar : public Widget {
protected:
Scrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0);
@@ -110,10 +109,6 @@ public:
bool contextMenu(const PlatformMouseEvent& event);
#endif
- // Takes an event and accounts for any transforms that might occur on the scrollbar. Returns
- // a new event that has had all of the transforms applied.
- PlatformMouseEvent transformEvent(const PlatformMouseEvent&);
-
ScrollbarTheme* theme() const { return m_theme; }
virtual void setParent(ScrollView*);
@@ -126,13 +121,19 @@ public:
virtual void styleChanged() { }
+ virtual IntRect convertToContainingView(const IntRect&) const;
+ virtual IntRect convertFromContainingView(const IntRect&) const;
+
+ virtual IntPoint convertToContainingView(const IntPoint&) const;
+ virtual IntPoint convertFromContainingView(const IntPoint&) const;
+
private:
virtual bool isScrollbar() const { return true; }
protected:
virtual void updateThumbPosition();
virtual void updateThumbProportion();
-
+
void autoscrollTimerFired(Timer<Scrollbar>*);
void startTimerIfNeeded(double delay);
void stopTimerIfNeeded();
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollbarClient.h b/src/3rdparty/webkit/WebCore/platform/ScrollbarClient.h
index f720e95..6efe72e 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollbarClient.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollbarClient.h
@@ -27,12 +27,11 @@
#define ScrollbarClient_h
#include "IntRect.h"
+#include "Scrollbar.h"
#include <wtf/Vector.h>
namespace WebCore {
-class Scrollbar;
-
class ScrollbarClient {
public:
virtual ~ScrollbarClient() {}
@@ -45,6 +44,29 @@ public:
virtual bool scrollbarCornerPresent() const = 0;
virtual void getTickmarks(Vector<IntRect>&) const { }
+
+ // Convert points and rects between the scrollbar and its containing view.
+ // The client needs to implement these in order to be aware of layout effects
+ // like CSS transforms.
+ virtual IntRect convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
+ {
+ return scrollbar->Widget::convertToContainingView(scrollbarRect);
+ }
+
+ virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
+ {
+ return scrollbar->Widget::convertFromContainingView(parentRect);
+ }
+
+ virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
+ {
+ return scrollbar->Widget::convertToContainingView(scrollbarPoint);
+ }
+
+ virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
+ {
+ return scrollbar->Widget::convertFromContainingView(parentPoint);
+ }
};
}
diff --git a/src/3rdparty/webkit/WebCore/platform/Theme.h b/src/3rdparty/webkit/WebCore/platform/Theme.h
index 5574bd7..f211576 100644
--- a/src/3rdparty/webkit/WebCore/platform/Theme.h
+++ b/src/3rdparty/webkit/WebCore/platform/Theme.h
@@ -106,7 +106,7 @@ public:
virtual void inflateControlPaintRect(ControlPart, ControlStates, IntRect& /*zoomedRect*/, float /*zoomFactor*/) const { }
// This method is called once, from RenderTheme::adjustDefaultStyleSheet(), to let each platform adjust
- // the default CSS rules in html4.css.
+ // the default CSS rules in html.css.
static String defaultStyleSheet();
private:
diff --git a/src/3rdparty/webkit/WebCore/platform/ThemeTypes.h b/src/3rdparty/webkit/WebCore/platform/ThemeTypes.h
index ae85a63..b763675 100644
--- a/src/3rdparty/webkit/WebCore/platform/ThemeTypes.h
+++ b/src/3rdparty/webkit/WebCore/platform/ThemeTypes.h
@@ -43,12 +43,15 @@ enum ControlState {
typedef unsigned ControlStates;
+// Must follow CSSValueKeywords.in order
enum ControlPart {
NoControlPart, CheckboxPart, RadioPart, PushButtonPart, SquareButtonPart, ButtonPart,
ButtonBevelPart, DefaultButtonPart, ListboxPart, ListItemPart,
MediaFullscreenButtonPart, MediaMuteButtonPart, MediaPlayButtonPart, MediaSeekBackButtonPart,
- MediaSeekForwardButtonPart, MediaSliderPart, MediaSliderThumbPart, MediaTimelineContainerPart,
- MediaCurrentTimePart, MediaTimeRemainingPart,
+ MediaSeekForwardButtonPart, MediaRewindButtonPart, MediaReturnToRealtimeButtonPart,
+ MediaSliderPart,
+ MediaSliderThumbPart, MediaControlsBackgroundPart,
+ MediaCurrentTimePart, MediaTimeRemainingPart,
MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart,
SliderHorizontalPart, SliderVerticalPart, SliderThumbHorizontalPart,
SliderThumbVerticalPart, CaretPart, SearchFieldPart, SearchFieldDecorationPart,
diff --git a/src/3rdparty/webkit/WebCore/platform/Widget.cpp b/src/3rdparty/webkit/WebCore/platform/Widget.cpp
index a456431..5bb903b 100644
--- a/src/3rdparty/webkit/WebCore/platform/Widget.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/Widget.cpp
@@ -69,42 +69,61 @@ void Widget::removeFromParent()
parent()->removeChild(this);
}
-#if !PLATFORM(MAC)
+IntRect Widget::convertFromContainingWindow(const IntRect& windowRect) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ IntRect parentRect = parentScrollView->convertFromContainingWindow(windowRect);
+ return convertFromContainingView(parentRect);
+ }
+ return convertFromContainingWindowToRoot(this, windowRect);
+}
+
+IntRect Widget::convertToContainingWindow(const IntRect& localRect) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ IntRect parentRect = convertToContainingView(localRect);
+ return parentScrollView->convertToContainingWindow(parentRect);
+ }
+ return convertFromRootToContainingWindow(this, localRect);
+}
+
+IntPoint Widget::convertFromContainingWindow(const IntPoint& windowPoint) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ IntPoint parentPoint = parentScrollView->convertFromContainingWindow(windowPoint);
+ return convertFromContainingView(parentPoint);
+ }
+ return convertFromContainingWindowToRoot(this, windowPoint);
+}
-IntRect Widget::convertToContainingWindow(const IntRect& rect) const
+IntPoint Widget::convertToContainingWindow(const IntPoint& localPoint) const
{
- IntRect convertedRect = rect;
- convertedRect.setLocation(convertToContainingWindow(convertedRect.location()));
- return convertedRect;
+ if (const ScrollView* parentScrollView = parent()) {
+ IntPoint parentPoint = convertToContainingView(localPoint);
+ return parentScrollView->convertToContainingWindow(parentPoint);
+ }
+ return convertFromRootToContainingWindow(this, localPoint);
}
-IntPoint Widget::convertToContainingWindow(const IntPoint& point) const
+#if !PLATFORM(MAC)
+IntRect Widget::convertFromRootToContainingWindow(const Widget*, const IntRect& rect)
{
- IntPoint windowPoint = point;
- const Widget* childWidget = this;
- for (const ScrollView* parentScrollView = parent();
- parentScrollView;
- childWidget = parentScrollView, parentScrollView = parentScrollView->parent())
- windowPoint = parentScrollView->convertChildToSelf(childWidget, windowPoint);
- return windowPoint;
+ return rect;
}
-IntPoint Widget::convertFromContainingWindow(const IntPoint& point) const
+IntRect Widget::convertFromContainingWindowToRoot(const Widget*, const IntRect& rect)
{
- IntPoint widgetPoint = point;
- const Widget* childWidget = this;
- for (const ScrollView* parentScrollView = parent();
- parentScrollView;
- childWidget = parentScrollView, parentScrollView = parentScrollView->parent())
- widgetPoint = parentScrollView->convertSelfToChild(childWidget, widgetPoint);
- return widgetPoint;
+ return rect;
}
-IntRect Widget::convertFromContainingWindow(const IntRect& rect) const
+IntPoint Widget::convertFromRootToContainingWindow(const Widget*, const IntPoint& point)
{
- IntRect result = rect;
- result.setLocation(convertFromContainingWindow(rect.location()));
- return result;
+ return point;
+}
+
+IntPoint Widget::convertFromContainingWindowToRoot(const Widget*, const IntPoint& point)
+{
+ return point;
}
#endif
@@ -118,4 +137,41 @@ void Widget::retainPlatformWidget()
}
#endif
+IntRect Widget::convertToContainingView(const IntRect& localRect) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ IntRect parentRect(localRect);
+ parentRect.setLocation(parentScrollView->convertChildToSelf(this, localRect.location()));
+ return parentRect;
+ }
+ return localRect;
}
+
+IntRect Widget::convertFromContainingView(const IntRect& parentRect) const
+{
+ if (const ScrollView* parentScrollView = parent()) {
+ IntRect localRect = parentRect;
+ localRect.setLocation(parentScrollView->convertSelfToChild(this, localRect.location()));
+ return localRect;
+ }
+
+ return parentRect;
+}
+
+IntPoint Widget::convertToContainingView(const IntPoint& localPoint) const
+{
+ if (const ScrollView* parentScrollView = parent())
+ return parentScrollView->convertChildToSelf(this, localPoint);
+
+ return localPoint;
+}
+
+IntPoint Widget::convertFromContainingView(const IntPoint& parentPoint) const
+{
+ if (const ScrollView* parentScrollView = parent())
+ return parentScrollView->convertSelfToChild(this, parentPoint);
+
+ return parentPoint;
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/platform/Widget.h b/src/3rdparty/webkit/WebCore/platform/Widget.h
index b6c0054..5fd18fa 100644
--- a/src/3rdparty/webkit/WebCore/platform/Widget.h
+++ b/src/3rdparty/webkit/WebCore/platform/Widget.h
@@ -73,6 +73,8 @@ typedef wxWindow* PlatformWidget;
#include "IntRect.h"
#include "IntSize.h"
+#include <wtf/RefCounted.h>
+
namespace WebCore {
class Cursor;
@@ -81,7 +83,6 @@ class Font;
class GraphicsContext;
class PlatformMouseEvent;
class ScrollView;
-class WidgetClient;
class WidgetPrivate;
// The Widget class serves as a base class for three kinds of objects:
@@ -99,11 +100,11 @@ class WidgetPrivate;
// Scrollbar - Mac, Gtk
// Plugin - Mac, Windows (windowed only), Qt (windowed only, widget is an HWND on windows), Gtk (windowed only)
//
-class Widget {
+class Widget : public RefCounted<Widget> {
public:
Widget(PlatformWidget = 0);
virtual ~Widget();
-
+
PlatformWidget platformWidget() const { return m_widget; }
void setPlatformWidget(PlatformWidget widget)
{
@@ -164,9 +165,10 @@ public:
// up with an inaccurate rect. Always make sure to use the rect-based convertFromContainingWindow method
// when converting window rects.
IntRect convertToContainingWindow(const IntRect&) const;
- IntPoint convertToContainingWindow(const IntPoint&) const;
- IntPoint convertFromContainingWindow(const IntPoint&) const; // See comment above about when not to use this method.
IntRect convertFromContainingWindow(const IntRect&) const;
+
+ IntPoint convertToContainingWindow(const IntPoint&) const;
+ IntPoint convertFromContainingWindow(const IntPoint&) const;
virtual void frameRectsChanged() {}
@@ -179,12 +181,26 @@ public:
void removeFromSuperview();
#endif
+ // Virtual methods to convert points to/from the containing ScrollView
+ virtual IntRect convertToContainingView(const IntRect&) const;
+ virtual IntRect convertFromContainingView(const IntRect&) const;
+ virtual IntPoint convertToContainingView(const IntPoint&) const;
+ virtual IntPoint convertFromContainingView(const IntPoint&) const;
+
private:
void init(PlatformWidget); // Must be called by all Widget constructors to initialize cross-platform data.
void releasePlatformWidget();
void retainPlatformWidget();
+ // These methods are used to convert from the root widget to the containing window,
+ // which has behavior that may differ between platforms (e.g. Mac uses flipped window coordinates).
+ static IntRect convertFromRootToContainingWindow(const Widget* rootWidget, const IntRect&);
+ static IntRect convertFromContainingWindowToRoot(const Widget* rootWidget, const IntRect&);
+
+ static IntPoint convertFromRootToContainingWindow(const Widget* rootWidget, const IntPoint&);
+ static IntPoint convertFromContainingWindowToRoot(const Widget* rootWidget, const IntPoint&);
+
private:
ScrollView* m_parent;
PlatformWidget m_widget;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp
index 8933d7b..32aefc9 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp
@@ -86,7 +86,7 @@ void BitmapImage::destroyDecodedData(bool destroyAll)
destroyMetadataAndNotify(framesCleared);
- m_source.clear(destroyAll, clearBeforeFrame, m_data.get(), m_allDataReceived);
+ m_source.clear(destroyAll, clearBeforeFrame, data(), m_allDataReceived);
return;
}
@@ -163,7 +163,7 @@ bool BitmapImage::dataChanged(bool allDataReceived)
// Feed all the data we've seen so far to the image decoder.
m_allDataReceived = allDataReceived;
- m_source.setData(m_data.get(), allDataReceived);
+ m_source.setData(data(), allDataReceived);
// Clear the frame count.
m_haveFrameCount = false;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Color.h b/src/3rdparty/webkit/WebCore/platform/graphics/Color.h
index 032d0cb..7ac432f 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/Color.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/Color.h
@@ -145,7 +145,6 @@ inline bool operator!=(const Color& a, const Color& b)
return !(a == b);
}
-Color focusRingColor();
Color colorFromPremultipliedARGB(unsigned);
unsigned premultipliedARGBFromColor(const Color&);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp
index 0c442a2..2b85bfa 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp
@@ -193,6 +193,7 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_masksToBounds(false)
, m_drawsContent(false)
, m_paintingPhase(GraphicsLayerPaintAllMask)
+ , m_contentsOrientation(CompositingCoordinatesTopDown)
, m_parent(0)
#ifndef NDEBUG
, m_repaintCount(0)
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h
index ae51951..9407563 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h
@@ -293,6 +293,14 @@ public:
enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, CompositingCoordinatesBottomUp };
static CompositingCoordinatesOrientation compositingCoordinatesOrientation();
+ // Set the geometry orientation (top-down, or bottom-up) for this layer, which also controls sublayer geometry.
+ virtual void setGeometryOrientation(CompositingCoordinatesOrientation) { }
+ virtual CompositingCoordinatesOrientation geometryOrientation() const { return CompositingCoordinatesTopDown; }
+
+ // Flippedness of the contents of this layer. Does not affect sublayer geometry.
+ virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation) { m_contentsOrientation = orientation; }
+ virtual CompositingCoordinatesOrientation contentsOrientation() const { return m_contentsOrientation; }
+
#ifndef NDEBUG
static bool showDebugBorders();
static bool showRepaintCounter();
@@ -348,6 +356,7 @@ protected:
bool m_drawsContent : 1;
GraphicsLayerPaintingPhase m_paintingPhase;
+ CompositingCoordinatesOrientation m_contentsOrientation;
Vector<GraphicsLayer*> m_children;
GraphicsLayer* m_parent;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Image.h b/src/3rdparty/webkit/WebCore/platform/graphics/Image.h
index bb61043c..c0d07c9 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/Image.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/Image.h
@@ -31,9 +31,9 @@
#include "GraphicsTypes.h"
#include "ImageSource.h"
#include "IntRect.h"
-#include <wtf/RefPtr.h>
-#include <wtf/PassRefPtr.h>
#include "SharedBuffer.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
#if PLATFORM(MAC)
#ifdef __OBJC__
@@ -67,13 +67,13 @@ typedef struct _GdkPixbuf GdkPixbuf;
namespace WebCore {
-class TransformationMatrix;
class FloatPoint;
class FloatRect;
class FloatSize;
class GraphicsContext;
class SharedBuffer;
class String;
+class TransformationMatrix;
// This class gets notified when an image creates or destroys decoded frames and when it advances animation frames.
class ImageObserver;
@@ -81,6 +81,7 @@ class ImageObserver;
class Image : public RefCounted<Image> {
friend class GeneratedImage;
friend class GraphicsContext;
+
public:
virtual ~Image();
@@ -168,13 +169,8 @@ protected:
virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
const FloatPoint& phase, CompositeOperator, const FloatRect& destRect);
-#if PLATFORM(CG)
- // These are private to CG. Ideally they would be only in the .cpp file, but the callback requires access
- // to the private function nativeImageForCurrentFrame()
- static void drawPatternCallback(void* info, CGContext*);
-#endif
-
-protected:
+
+private:
RefPtr<SharedBuffer> m_data; // The encoded raw data for the image.
ImageObserver* m_imageObserver;
};
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h b/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h
index 1cae191..21af67b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h
@@ -80,6 +80,7 @@ public:
void setX(int x) { m_x = x; }
void setY(int y) { m_y = y; }
+ void move(const IntSize& s) { move(s.width(), s.height()); }
void move(int dx, int dy) { m_x += dx; m_y += dy; }
IntPoint expandedTo(const IntPoint& other) const
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
index a277675..21ce22d 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
@@ -437,6 +437,11 @@ void MediaPlayer::paint(GraphicsContext* p, const IntRect& r)
m_private->paint(p, r);
}
+void MediaPlayer::paintCurrentFrameInContext(GraphicsContext* p, const IntRect& r)
+{
+ m_private->paintCurrentFrameInContext(p, r);
+}
+
MediaPlayer::SupportsType MediaPlayer::supportsType(ContentType contentType)
{
String type = contentType.type();
@@ -490,6 +495,17 @@ bool MediaPlayer::supportsAcceleratedRendering() const
}
#endif // USE(ACCELERATED_COMPOSITING)
+bool MediaPlayer::hasSingleSecurityOrigin() const
+{
+ return m_private->hasSingleSecurityOrigin();
+}
+
+MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const
+{
+ return m_private->movieLoadType();
+}
+
+// Client callbacks.
void MediaPlayer::networkStateChanged()
{
if (m_mediaPlayerClient)
@@ -538,10 +554,6 @@ void MediaPlayer::rateChanged()
m_mediaPlayerClient->mediaPlayerRateChanged(this);
}
-bool MediaPlayer::hasSingleSecurityOrigin() const
-{
- return m_private->hasSingleSecurityOrigin();
}
-}
#endif
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h
index 187c701..9d9370b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h
@@ -160,6 +160,7 @@ public:
void setAutobuffer(bool);
void paint(GraphicsContext*, const IntRect&);
+ void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError };
NetworkState networkState();
@@ -167,6 +168,9 @@ public:
enum ReadyState { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureData, HaveEnoughData };
ReadyState readyState();
+ enum MovieLoadType { Unknown, Download, StoredStream, LiveStream };
+ MovieLoadType movieLoadType() const;
+
void networkStateChanged();
void readyStateChanged();
void volumeChanged();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h
index edbe125..753ccd2 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h
@@ -85,7 +85,9 @@ public:
virtual void setSize(const IntSize&) = 0;
- virtual void paint(GraphicsContext*, const IntRect&) = 0 ;
+ virtual void paint(GraphicsContext*, const IntRect&) = 0;
+
+ virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r) { paint(c, r); }
virtual void setAutobuffer(bool) { };
@@ -103,6 +105,9 @@ public:
#endif
virtual bool hasSingleSecurityOrigin() const { return false; }
+
+ virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlayer::Unknown; }
+
};
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
index 7569031..fde6ea3 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
@@ -298,7 +298,9 @@ void Path::clear()
bool Path::isEmpty() const
{
- return m_path->isEmpty();
+ // Don't use QPainterPath::isEmpty(), as that also returns true if there's only
+ // one initial MoveTo element in the path.
+ return m_path->elementCount() == 0;
}
String Path::debugString() const
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/LocalizedStringsMac.mm b/src/3rdparty/webkit/WebCore/platform/mac/LocalizedStringsMac.mm
index ebb6d93..fdd7df5 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/LocalizedStringsMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/LocalizedStringsMac.mm
@@ -697,4 +697,20 @@ String imageTitle(const String& filename, const IntSize& size)
return String();
}
+String mediaElementLoadingStateText()
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ return [[WebCoreViewFactory sharedFactory] mediaElementLoadingStateText];
+ END_BLOCK_OBJC_EXCEPTIONS;
+ return String();
+}
+
+String mediaElementLiveBroadcastStateText()
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ return [[WebCoreViewFactory sharedFactory] mediaElementLiveBroadcastStateText];
+ END_BLOCK_OBJC_EXCEPTIONS;
+ return String();
+}
+
}
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm b/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
index a3e743f..e7e12ac 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
@@ -26,6 +26,7 @@
#import "config.h"
#import "ThemeMac.h"
+#import "BlockExceptions.h"
#import "GraphicsContext.h"
#import "LocalCurrentGraphicsContext.h"
#import "ScrollView.h"
@@ -195,6 +196,8 @@ static NSButtonCell* checkbox(ControlStates states, const IntRect& zoomedRect, f
// FIXME: Share more code with radio buttons.
static void paintCheckbox(ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
+
// Determine the width and height needed for the control and prepare the cell for painting.
NSButtonCell* checkboxCell = checkbox(states, zoomedRect, zoomFactor);
@@ -218,6 +221,8 @@ static void paintCheckbox(ControlStates states, GraphicsContext* context, const
[checkboxCell setControlView:nil];
context->restore();
+
+ END_BLOCK_OBJC_EXCEPTIONS
}
// Radio Buttons
@@ -289,8 +294,10 @@ static void paintRadio(ControlStates states, GraphicsContext* context, const Int
context->translate(-inflatedRect.x(), -inflatedRect.y());
}
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
[radioCell drawWithFrame:NSRect(inflatedRect) inView:scrollView->documentView()];
[radioCell setControlView:nil];
+ END_BLOCK_OBJC_EXCEPTIONS
context->restore();
}
@@ -348,6 +355,8 @@ static NSButtonCell* button(ControlPart part, ControlStates states, const IntRec
static void paintButton(ControlPart part, ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
+
// Determine the width and height needed for the control and prepare the cell for painting.
NSButtonCell *buttonCell = button(part, states, zoomedRect, zoomFactor);
LocalCurrentGraphicsContext localContext(context);
@@ -391,6 +400,8 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
if (![previousDefaultButtonCell isEqual:buttonCell])
[window setDefaultButtonCell:previousDefaultButtonCell];
+
+ END_BLOCK_OBJC_EXCEPTIONS
}
// Theme overrides
@@ -479,6 +490,7 @@ LengthBox ThemeMac::controlPadding(ControlPart part, const Font& font, const Len
void ThemeMac::inflateControlPaintRect(ControlPart part, ControlStates states, IntRect& zoomedRect, float zoomFactor) const
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
switch (part) {
case CheckboxPart: {
// We inflate the rect as needed to account for padding included in the cell to accommodate the checkbox
@@ -520,6 +532,7 @@ void ThemeMac::inflateControlPaintRect(ControlPart part, ControlStates states, I
default:
break;
}
+ END_BLOCK_OBJC_EXCEPTIONS
}
void ThemeMac::paint(ControlPart part, ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView) const
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.h b/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.h
index cbe4aea..768899e 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.h
+++ b/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.h
@@ -104,8 +104,9 @@ extern void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
extern NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
extern NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
extern BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
-extern void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration);
-extern void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, BOOL active);
+extern void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
+ float duration, unsigned state);
+extern void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
extern NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
extern NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
extern NSString* (*wkGetMIMETypeForExtension)(NSString*);
@@ -122,6 +123,7 @@ extern int (*wkQTMovieDataRate)(QTMovie*);
extern float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
extern NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
extern float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
+extern int (*wkQTMovieGetType)(QTMovie* movie);
extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
@@ -134,6 +136,7 @@ extern void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
extern void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
extern void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
extern unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);
+extern BOOL (*wkIsLatchingWheelEvent)(NSEvent *);
#ifndef BUILDING_ON_TIGER
extern void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.mm b/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.mm
index 05d1da6..d0e276f 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.mm
@@ -39,9 +39,10 @@ void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
-void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration);
+void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
+ float duration, unsigned state);
BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
-void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, BOOL active);
+void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
@@ -56,6 +57,7 @@ int (*wkQTMovieDataRate)(QTMovie*);
float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
+int (*wkQTMovieGetType)(QTMovie* movie);
void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
void (*wkSetDragImage)(NSImage*, NSPoint offset);
@@ -78,6 +80,7 @@ void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
id (*wkCreateNSURLConnectionDelegateProxy)(void);
unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);
+BOOL (*wkIsLatchingWheelEvent)(NSEvent *);
#ifndef BUILDING_ON_TIGER
void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/WidgetMac.mm b/src/3rdparty/webkit/WebCore/platform/mac/WidgetMac.mm
index 1aaf4b2..8653a03 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/WidgetMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/WidgetMac.mm
@@ -283,72 +283,52 @@ void Widget::afterMouseDown(NSView *view, Widget* widget)
}
}
-IntPoint Widget::convertFromContainingWindow(const IntPoint& point) const
+// These are here to deal with flipped coords on Mac.
+IntRect Widget::convertFromRootToContainingWindow(const Widget* rootWidget, const IntRect& rect)
{
- if (!platformWidget()) {
- if (!parent())
- return point;
- IntPoint result = parent()->convertFromContainingWindow(point);
- result.move(parent()->scrollX() - x(), parent()->scrollY() - y());
- return result;
- }
-
+ if (!rootWidget->platformWidget())
+ return rect;
+
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- return IntPoint([platformWidget() convertPoint:point fromView:nil]);
+ return enclosingIntRect([rootWidget->platformWidget() convertRect:rect toView:nil]);
END_BLOCK_OBJC_EXCEPTIONS;
-
- return point;
+
+ return rect;
}
-IntRect Widget::convertFromContainingWindow(const IntRect& rect) const
+IntRect Widget::convertFromContainingWindowToRoot(const Widget* rootWidget, const IntRect& rect)
{
- if (!platformWidget()) {
- if (!parent())
- return rect;
- IntRect result = parent()->convertFromContainingWindow(rect);
- result.move(parent()->scrollX() - x(), parent()->scrollY() - y());
- return result;
- }
-
+ if (!rootWidget->platformWidget())
+ return rect;
+
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- return enclosingIntRect([platformWidget() convertRect:rect fromView:nil]);
+ return enclosingIntRect([rootWidget->platformWidget() convertRect:rect fromView:nil]);
END_BLOCK_OBJC_EXCEPTIONS;
-
+
return rect;
}
-IntRect Widget::convertToContainingWindow(const IntRect& r) const
+IntPoint Widget::convertFromRootToContainingWindow(const Widget* rootWidget, const IntPoint& point)
{
- if (!platformWidget()) {
- if (!parent())
- return r;
- IntRect result = r;
- result.move(parent()->scrollX() - x(), parent()->scrollY() - y());
- return parent()->convertToContainingWindow(result);
- }
-
+ if (!rootWidget->platformWidget())
+ return point;
+
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- return IntRect([platformWidget() convertRect:r toView:nil]);
+ return IntPoint([rootWidget->platformWidget() convertPoint:point toView:nil]);
END_BLOCK_OBJC_EXCEPTIONS;
-
- return r;
+ return point;
}
-
-IntPoint Widget::convertToContainingWindow(const IntPoint& p) const
+
+IntPoint Widget::convertFromContainingWindowToRoot(const Widget* rootWidget, const IntPoint& point)
{
- if (!platformWidget()) {
- if (!parent())
- return p;
- IntPoint result = p;
- result.move(parent()->scrollX() - x(), parent()->scrollY() - y());
- return parent()->convertToContainingWindow(result);
- }
-
+ if (!rootWidget->platformWidget())
+ return point;
+
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- return IntPoint([platformWidget() convertPoint:p toView:nil]);
+ return IntPoint([rootWidget->platformWidget() convertPoint:point fromView:nil]);
END_BLOCK_OBJC_EXCEPTIONS;
- return p;
+ return point;
}
void Widget::releasePlatformWidget()
diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h
index 8b0f476..676129a 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h
@@ -35,7 +35,7 @@
#include <CFNetwork/CFURLConnectionPriv.h>
#endif
-#if USE(WININET)
+#if USE(WININET) || (USE(CURL) && PLATFORM(WIN))
#include <winsock2.h>
#include <windows.h>
#endif
@@ -111,7 +111,6 @@ namespace WebCore {
#if USE(SOUP)
, m_msg(0)
, m_cancelled(false)
- , m_reportedHeaders(false)
, m_gfile(0)
, m_inputStream(0)
, m_cancellable(0)
@@ -194,7 +193,6 @@ namespace WebCore {
SoupMessage* m_msg;
ResourceResponse m_response;
bool m_cancelled;
- bool m_reportedHeaders;
GFile* m_gfile;
GInputStream* m_inputStream;
GCancellable* m_cancellable;
diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.cpp b/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.cpp
index a6d70fd..7f8a4e2 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.cpp
@@ -502,7 +502,7 @@ static bool isCacheHeaderSeparator(UChar c)
}
}
-bool isControlCharacter(UChar c)
+static bool isControlCharacter(UChar c)
{
return c < ' ' || c == 127;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.h
index 20165e7..7594c09 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.h
@@ -162,8 +162,6 @@ struct CrossThreadResourceResponseData {
time_t m_lastModifiedDate;
};
-bool isControlCharacter(UChar c);
-
} // namespace WebCore
#endif // ResourceResponseBase_h
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 2f980fa..898e5f4 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -225,9 +225,11 @@ void QNetworkReplyHandler::finish()
resetState();
start();
} else if (m_reply->error() != QNetworkReply::NoError
- // a web page that returns 403/404 can still have content
+ // 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::ContentNotFoundError
+ && 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());
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
index a17f3ab..bc9d2f4 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
@@ -96,7 +96,7 @@ String pathGetFileName(const String& path)
String directoryName(const String& path)
{
- return String(QFileInfo(path).baseName());
+ return String(QFileInfo(path).absolutePath());
}
Vector<String> listDirectory(const String& path, const String& filter)
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp
index a6c7513..57a5e99 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp
@@ -352,5 +352,15 @@ String imageTitle(const String& filename, const IntSize& size)
return QCoreApplication::translate("QWebPage", "%1 (%2x%3 pixels)", "Title string for images").arg(filename).arg(size.width()).arg(size.height());
}
+String mediaElementLoadingStateText()
+{
+ return QCoreApplication::translate("QWebPage", "Loading...", "Media controller status message when the media is loading");
+}
+
+String mediaElementLiveBroadcastStateText()
+{
+ return QCoreApplication::translate("QWebPage", "Live Broadcast", "Media controller status message when watching a live broadcast");
+}
+
}
// vim: ts=4 sw=4 et
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index 4a6df0a..0b42e5c 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -608,7 +608,7 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style,
Element* e) const
{
- // WORKAROUND because html4.css specifies -webkit-border-radius for <select> so we override it here
+ // WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius();
diff --git a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp
index 702cf02..d9b57b2 100644
--- a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp
@@ -29,6 +29,7 @@
#include "DatabaseAuthorizer.h"
#include "Logging.h"
+#include "SQLiteFileSystem.h"
#include "SQLiteStatement.h"
#include <sqlite3.h>
@@ -60,9 +61,7 @@ bool SQLiteDatabase::open(const String& filename)
{
close();
- // SQLite expects a null terminator on its UTF-16 strings.
- String path = filename;
- m_lastError = sqlite3_open16(path.charactersWithNullTermination(), &m_db);
+ m_lastError = SQLiteFileSystem::openDatabase(filename, &m_db);
if (m_lastError != SQLITE_OK) {
LOG_ERROR("SQLite database failed to load from %s\nCause - %s", filename.ascii().data(),
sqlite3_errmsg(m_db));
diff --git a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.cpp b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.cpp
new file mode 100644
index 0000000..8cd7e80
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.cpp
@@ -0,0 +1,123 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SQLiteFileSystem.h"
+
+#include "FileSystem.h"
+#include "SQLiteDatabase.h"
+#include "SQLiteStatement.h"
+#include <sqlite3.h>
+
+namespace WebCore {
+
+SQLiteFileSystem::SQLiteFileSystem()
+{
+}
+
+void SQLiteFileSystem::registerSQLiteVFS()
+{
+}
+
+int SQLiteFileSystem::openDatabase(const String& fileName, sqlite3** database)
+{
+ // SQLite expects a null terminator on its UTF-16 strings.
+ String path = fileName;
+ return sqlite3_open16(path.charactersWithNullTermination(), database);
+}
+
+String SQLiteFileSystem::getFileNameForNewDatabase(const String& dbDir, const String&,
+ const String&, SQLiteDatabase* db)
+{
+ // try to get the next sequence number from the given database
+ // if we can't get a number, return an empty string
+ SQLiteStatement sequenceStatement(*db, "SELECT seq FROM sqlite_sequence WHERE name='Databases';");
+ if (sequenceStatement.prepare() != SQLResultOk)
+ return String();
+ int result = sequenceStatement.step();
+ int64_t seq = 0;
+ if (result == SQLResultRow)
+ seq = sequenceStatement.getColumnInt64(0);
+ else if (result != SQLResultDone)
+ return String();
+ sequenceStatement.finalize();
+
+ // increment the number until we can use it to form a file name that doesn't exist
+ String fileName;
+ do {
+ ++seq;
+ fileName = pathByAppendingComponent(dbDir, String::format("%016llx.db", seq));
+ } while (fileExists(fileName));
+
+ return String::format("%016llx.db", seq);
+}
+
+String SQLiteFileSystem::appendDatabaseFileNameToPath(const String& path, const String& fileName)
+{
+ return pathByAppendingComponent(path, fileName);
+}
+
+bool SQLiteFileSystem::ensureDatabaseDirectoryExists(const String& path)
+{
+ if (path.isEmpty())
+ return false;
+ return makeAllDirectories(path);
+}
+
+bool SQLiteFileSystem::ensureDatabaseFileExists(const String& fileName, bool checkPathOnly)
+{
+ if (fileName.isEmpty())
+ return false;
+
+ if (checkPathOnly) {
+ String dir = directoryName(fileName);
+ return ensureDatabaseDirectoryExists(dir);
+ }
+
+ return fileExists(fileName);
+}
+
+bool SQLiteFileSystem::deleteEmptyDatabaseDirectory(const String& path)
+{
+ return deleteEmptyDirectory(path);
+}
+
+bool SQLiteFileSystem::deleteDatabaseFile(const String& fileName)
+{
+ return deleteFile(fileName);
+}
+
+long long SQLiteFileSystem::getDatabaseFileSize(const String& fileName)
+{
+ long long size;
+ return getFileSize(fileName, size) ? size : 0;
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.h b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.h
new file mode 100644
index 0000000..0a26e9d
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteFileSystem.h
@@ -0,0 +1,114 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLiteFileSystem_h
+#define SQLiteFileSystem_h
+
+#include "PlatformString.h"
+#include <wtf/Threading.h>
+
+struct sqlite3;
+
+namespace WebCore {
+
+class SQLiteDatabase;
+
+// A class that abstracts the file system related operations required
+// by the WebKit database code.
+class SQLiteFileSystem {
+public:
+ // Registers a user-defined SQLite VFS.
+ static void registerSQLiteVFS();
+
+ // Opens a database file.
+ //
+ // fileName - The name of the database file.
+ // database - The SQLite structure that represents the database stored
+ // in the given file.
+ static int openDatabase(const String& fileName, sqlite3** database);
+
+ // Returns the file name for a database.
+ //
+ // dbDir - The directory where all databases are stored.
+ // dbName - The name of the database.
+ // originIdentifier - The origin that wants to use this database.
+ // db - A database with a number generator used to create unique file names.
+ static String getFileNameForNewDatabase(const String& dbDir, const String& dbName,
+ const String& originIdentifier, SQLiteDatabase* db);
+
+ // Creates an absolute file path given a directory and a file name.
+ //
+ // path - The directory.
+ // fileName - The file name.
+ static String appendDatabaseFileNameToPath(const String& path, const String& fileName);
+
+ // Makes sure the given directory exists, by creating all missing directories
+ // on the given path.
+ //
+ // path - The directory.
+ static bool ensureDatabaseDirectoryExists(const String& path);
+
+ // If 'checkPathOnly' is false, then this method only checks if the given file exists.
+ // If 'checkPathOnly' is true, then this method makes sure all directories on the
+ // given path exist by creating the missing ones, and does not check if the file
+ // itself exists.
+ //
+ // Sometimes we expect a DB file to exist; other times, we're OK with creating a new
+ // DB file, but we want to make sure that the directory in which we want to put the
+ // new DB file exists. This method covers both cases.
+ //
+ // fileName - The file name.
+ // checkPathOnly - If true, we only make sure that the given directory exists.
+ // If false, we only check if the file exists.
+ static bool ensureDatabaseFileExists(const String& fileName, bool checkPathOnly);
+
+ // Deletes an empty database directory.
+ //
+ // path - The directory.
+ static bool deleteEmptyDatabaseDirectory(const String& path);
+
+ // Deletes a database file.
+ //
+ // fileName - The file name.
+ static bool deleteDatabaseFile(const String& fileName);
+
+ // Returns the size of the database file.
+ //
+ // fileName - The file name.
+ static long long getDatabaseFileSize(const String& fileName);
+
+private:
+ // do not instantiate this class
+ SQLiteFileSystem();
+}; // class SQLiteFileSystem
+
+} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorInternalICU.h b/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorInternalICU.h
index d4b25e7..68b7003 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorInternalICU.h
+++ b/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorInternalICU.h
@@ -21,10 +21,12 @@
#ifndef TextBreakIteratorInternalICU_h
#define TextBreakIteratorInternalICU_h
-#include <wtf/unicode/Unicode.h>
+// FIXME: Now that this handles locales for ICU, not just for text breaking,
+// this file and the various implementation files should be renamed.
namespace WebCore {
+ const char* currentSearchLocaleID();
const char* currentTextBreakLocaleID();
}
diff --git a/src/3rdparty/webkit/WebCore/platform/text/android/TextBreakIteratorInternalICU.cpp b/src/3rdparty/webkit/WebCore/platform/text/android/TextBreakIteratorInternalICU.cpp
index 9bebe74..9732e92 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/android/TextBreakIteratorInternalICU.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/text/android/TextBreakIteratorInternalICU.cpp
@@ -28,8 +28,15 @@
namespace WebCore {
+const char* currentSearchLocaleID()
+{
+ // FIXME: Should use system locale.
+ return "";
+}
+
const char* currentTextBreakLocaleID()
{
+ // FIXME: Should use system locale.
return "en_us";
}
diff --git a/src/3rdparty/webkit/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm b/src/3rdparty/webkit/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm
index 92983eb..5da10e0 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009 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
@@ -21,41 +21,79 @@
#include "config.h"
#include "TextBreakIteratorInternalICU.h"
+#include <wtf/RetainPtr.h>
+
namespace WebCore {
static const int maxLocaleStringLength = 32;
-// This code was swiped from the CarbonCore UnicodeUtilities. One change from that is to use the empty
-// string instead of the "old locale model" as the ultimate fallback. This change is per the UnicodeUtilities
-// engineer.
-static void getTextBreakLocale(char localeStringBuffer[maxLocaleStringLength])
+static inline RetainPtr<CFStringRef> textBreakLocalePreference()
{
- // Empty string means "root locale", which is what we use if we can't use a pref.
+ RetainPtr<CFPropertyListRef> locale(AdoptCF, CFPreferencesCopyValue(CFSTR("AppleTextBreakLocale"),
+ kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
+ if (!locale || CFGetTypeID(locale.get()) != CFStringGetTypeID())
+ return 0;
+ return static_cast<CFStringRef>(locale.get());
+}
- // We get the parts string from AppleTextBreakLocale pref.
- // If that fails then look for the first language in the AppleLanguages pref.
- CFStringRef prefLocaleStr = (CFStringRef)CFPreferencesCopyValue(CFSTR("AppleTextBreakLocale"),
- kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
- if (!prefLocaleStr) {
- CFArrayRef appleLangArr = (CFArrayRef)CFPreferencesCopyValue(CFSTR("AppleLanguages"),
- kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
- if (appleLangArr) {
- // Take the topmost language. Retain so that we can blindly release later.
- prefLocaleStr = (CFStringRef)CFArrayGetValueAtIndex(appleLangArr, 0);
- if (prefLocaleStr)
- CFRetain(prefLocaleStr);
- CFRelease(appleLangArr);
- }
- }
- if (prefLocaleStr) {
- // Canonicalize pref string in case it is not in the canonical format.
- CFStringRef canonLocaleCFStr = CFLocaleCreateCanonicalLanguageIdentifierFromString(kCFAllocatorDefault, prefLocaleStr);
- if (canonLocaleCFStr) {
- CFStringGetCString(canonLocaleCFStr, localeStringBuffer, maxLocaleStringLength, kCFStringEncodingASCII);
- CFRelease(canonLocaleCFStr);
- }
- CFRelease(prefLocaleStr);
+static RetainPtr<CFStringRef> topLanguagePreference()
+{
+ RetainPtr<CFPropertyListRef> languages(AdoptCF, CFPreferencesCopyValue(CFSTR("AppleLanguages"),
+ kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
+ if (!languages || CFGetTypeID(languages.get()) != CFArrayGetTypeID())
+ return 0;
+ CFArrayRef languagesArray = static_cast<CFArrayRef>(languages.get());
+ if (CFArrayGetCount(languagesArray) < 1)
+ return 0;
+ const void* value = CFArrayGetValueAtIndex(languagesArray, 0);
+ if (!value || CFGetTypeID(value) != CFStringGetTypeID())
+ return 0;
+ return static_cast<CFStringRef>(value);
+}
+
+static RetainPtr<CFStringRef> canonicalLanguageIdentifier(CFStringRef locale)
+{
+ if (!locale)
+ return 0;
+ RetainPtr<CFStringRef> canonicalLocale(AdoptCF,
+ CFLocaleCreateCanonicalLanguageIdentifierFromString(kCFAllocatorDefault, locale));
+ if (!canonicalLocale)
+ return locale;
+ return canonicalLocale;
+}
+
+static void getLocale(CFStringRef locale, char localeStringBuffer[maxLocaleStringLength])
+{
+ // Empty string means "root locale", and that is what we use if we can't get a preference.
+ localeStringBuffer[0] = 0;
+ if (!locale)
+ return;
+ CFStringGetCString(locale, localeStringBuffer, maxLocaleStringLength, kCFStringEncodingASCII);
+}
+
+static void getSearchLocale(char localeStringBuffer[maxLocaleStringLength])
+{
+ getLocale(canonicalLanguageIdentifier(topLanguagePreference().get()).get(), localeStringBuffer);
+}
+
+const char* currentSearchLocaleID()
+{
+ static char localeStringBuffer[maxLocaleStringLength];
+ static bool gotSearchLocale = false;
+ if (!gotSearchLocale) {
+ getSearchLocale(localeStringBuffer);
+ gotSearchLocale = true;
}
+ return localeStringBuffer;
+}
+
+static void getTextBreakLocale(char localeStringBuffer[maxLocaleStringLength])
+{
+ // If there is no text break locale, use the top language preference.
+ RetainPtr<CFStringRef> locale = textBreakLocalePreference();
+ if (!locale)
+ locale = topLanguagePreference();
+ getLocale(canonicalLanguageIdentifier(locale.get()).get(), localeStringBuffer);
}
const char* currentTextBreakLocaleID()
diff --git a/src/3rdparty/webkit/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp b/src/3rdparty/webkit/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp
index ce436df..e417e17 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp
@@ -23,6 +23,12 @@
namespace WebCore {
+const char* currentSearchLocaleID()
+{
+ // FIXME: Should use system locale.
+ return "";
+}
+
const char* currentTextBreakLocaleID()
{
// Using en_US_POSIX now so word selection in address field works as expected as before (double-clicking
diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp
index 2c5adc5..8737572 100644
--- a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp
@@ -239,8 +239,12 @@ void PluginView::performRequest(PluginRequest* request)
m_streams.add(stream);
stream->start();
} else {
+ // If the target frame is our frame, we could destroy the
+ // PluginView, so we protect it. <rdar://problem/6991251>
+ RefPtr<PluginView> protect(this);
+
m_parentFrame->loader()->load(request->frameLoadRequest().resourceRequest(), targetFrameName, false);
-
+
// FIXME: <rdar://problem/4807469> This should be sent when the document has finished loading
if (request->sendNotification()) {
PluginView::setCurrentPluginView(this);
@@ -481,6 +485,11 @@ PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance()
if (!m_plugin || !m_plugin->pluginFuncs()->getvalue)
return 0;
+ // On Windows, calling Java's NPN_GetValue can allow the message loop to
+ // run, allowing loading to take place or JavaScript to run. Protect the
+ // PluginView from destruction. <rdar://problem/6978804>
+ RefPtr<PluginView> protect(this);
+
NPError npErr;
{
PluginView::setCurrentPluginView(this);
@@ -491,6 +500,13 @@ PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance()
PluginView::setCurrentPluginView(0);
}
+ if (hasOneRef()) {
+ // The renderer for the PluginView was destroyed during the above call, and
+ // the PluginView will be destroyed when this function returns, so we
+ // return null.
+ return 0;
+ }
+
if (npErr != NPERR_NO_ERROR || !object)
return 0;
@@ -667,7 +683,7 @@ bool PluginView::isCallingPlugin()
return s_callingPlugin > 0;
}
-PluginView* PluginView::create(Frame* parentFrame, const IntSize& size, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
+PassRefPtr<PluginView> PluginView::create(Frame* parentFrame, const IntSize& size, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
// if we fail to find a plugin for this MIME type, findPlugin will search for
// a plugin by the file extension and update the MIME type, so pass a mutable String
@@ -680,7 +696,7 @@ PluginView* PluginView::create(Frame* parentFrame, const IntSize& size, Element*
plugin = PluginDatabase::installedPlugins()->findPlugin(url, mimeTypeCopy);
}
- return new PluginView(parentFrame, size, plugin, element, url, paramNames, paramValues, mimeTypeCopy, loadManually);
+ return adoptRef(new PluginView(parentFrame, size, plugin, element, url, paramNames, paramValues, mimeTypeCopy, loadManually));
}
void PluginView::freeStringArray(char** stringArray, int length)
diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.h b/src/3rdparty/webkit/WebCore/plugins/PluginView.h
index 41d986b..3ed6756 100644
--- a/src/3rdparty/webkit/WebCore/plugins/PluginView.h
+++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.h
@@ -108,7 +108,7 @@ namespace WebCore {
class PluginView : public Widget, private PluginStreamClient, public PluginManualLoader {
public:
- static PluginView* create(Frame* parentFrame, const IntSize&, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);
+ static PassRefPtr<PluginView> create(Frame* parentFrame, const IntSize&, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);
virtual ~PluginView();
PluginPackage* plugin() const { return m_plugin.get(); }
diff --git a/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp b/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp
index c59a9bb..ce0f859 100644
--- a/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp
@@ -373,10 +373,10 @@ void PluginView::setNPWindowIfNeeded()
m_npWindow.height = m_windowRect.height();
// TODO: (also clip against scrollbars, etc.)
- m_npWindow.clipRect.left = 0;
- m_npWindow.clipRect.top = 0;
- m_npWindow.clipRect.right = m_windowRect.width();
- m_npWindow.clipRect.bottom = m_windowRect.height();
+ m_npWindow.clipRect.left = max(0, m_windowRect.x());
+ m_npWindow.clipRect.top = max(0, m_windowRect.y());
+ m_npWindow.clipRect.right = m_windowRect.x() + m_windowRect.width();
+ m_npWindow.clipRect.bottom = m_windowRect.y() + m_windowRect.height();
PluginView::setCurrentPluginView(this);
JSC::JSLock::DropAllLocks dropAllLocks(false);
diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.cpp
index 27bf5b9..b79ca20 100644
--- a/src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.cpp
@@ -85,6 +85,9 @@ void PluginMessageThrottlerWin::messageThrottleTimerFired(Timer<PluginMessageThr
if (message == m_back)
m_back = 0;
+ // Protect the PluginView from destruction while calling its window proc.
+ // <rdar://problem/6930280>
+ RefPtr<PluginView> protect(m_pluginView);
::CallWindowProc(m_pluginView->pluginWndProc(), message->hWnd, message->msg, message->wParam, message->lParam);
freeMessage(message);
diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp
index b52553e..40d9b2a 100644
--- a/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp
@@ -81,9 +81,16 @@ bool PluginPackage::isPluginBlacklisted()
if (compareFileVersion(slPluginMinRequired) < 0)
return true;
- } else if (fileName() == "npmozax.dll")
+ } else if (fileName() == "npmozax.dll") {
// Bug 15217: Mozilla ActiveX control complains about missing xpcom_core.dll
return true;
+ } else if (name() == "Yahoo Application State Plugin") {
+ // https://bugs.webkit.org/show_bug.cgi?id=26860
+ // Bug in Yahoo Application State plug-in earlier than 1.0.0.6 leads to heap corruption.
+ static const PlatformModuleVersion yahooAppStatePluginMinRequired(0x00000006, 0x00010000);
+ if (compareFileVersion(yahooAppStatePluginMinRequired) < 0)
+ return true;
+ }
return false;
}
@@ -248,7 +255,7 @@ bool PluginPackage::load()
return false;
// Load the library
- m_module = ::LoadLibraryW(m_path.charactersWithNullTermination());
+ m_module = ::LoadLibraryExW(m_path.charactersWithNullTermination(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
if (!::SetCurrentDirectoryW(currentPath)) {
if (m_module)
diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp
index e477965..272a540 100644
--- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp
@@ -110,11 +110,6 @@ static BYTE* endPaint;
HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint)
{
-#if (COMPILER(MINGW))
- Q_UNUSED(hWnd)
- Q_UNUSED(lpPaint)
- return 0;
-#else
PluginView* pluginView = reinterpret_cast<PluginView*>(GetProp(hWnd, kWebPluginViewProperty));
if (pluginView && pluginView->m_wmPrintHDC) {
// We're secretly handling WM_PRINTCLIENT, so set up the PAINTSTRUCT so
@@ -125,6 +120,17 @@ HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint)
return pluginView->m_wmPrintHDC;
}
+#if COMPILER(GCC)
+ HDC result;
+ asm ("push %2\n"
+ "push %3\n"
+ "call *%4\n"
+ : "=a" (result)
+ : "a" (beginPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*beginPaint)
+ : "memory"
+ );
+ return result;
+#else
// Call through to the original BeginPaint.
__asm mov eax, beginPaintSysCall
__asm push lpPaint
@@ -135,11 +141,6 @@ HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint)
BOOL WINAPI PluginView::hookedEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint)
{
-#if (COMPILER(MINGW))
- Q_UNUSED(hWnd)
- Q_UNUSED(lpPaint)
- return FALSE;
-#else
PluginView* pluginView = reinterpret_cast<PluginView*>(GetProp(hWnd, kWebPluginViewProperty));
if (pluginView && pluginView->m_wmPrintHDC) {
// We're secretly handling WM_PRINTCLIENT, so we don't have to do any
@@ -147,15 +148,24 @@ BOOL WINAPI PluginView::hookedEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint)
return TRUE;
}
+#if COMPILER(GCC)
+ BOOL result;
+ asm ("push %2\n"
+ "push %3\n"
+ "call *%4\n"
+ : "=a" (result)
+ : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "g" (*endPaint)
+ );
+ return result;
+#else
// Call through to the original EndPaint.
__asm mov eax, endPaintSysCall
__asm push lpPaint
__asm push hWnd
__asm call endPaint
-#endif
+#endif
}
-#if (!COMPILER(MINGW))
static void hook(const char* module, const char* proc, unsigned& sysCallID, BYTE*& pProc, const void* pNewProc)
{
// See <http://www.fengyuan.com/article/wmprint.html> for an explanation of
@@ -163,7 +173,7 @@ static void hook(const char* module, const char* proc, unsigned& sysCallID, BYTE
HINSTANCE hMod = GetModuleHandleA(module);
- pProc = reinterpret_cast<BYTE*>(GetProcAddress(hMod, proc));
+ pProc = reinterpret_cast<BYTE*>(reinterpret_cast<ptrdiff_t>(GetProcAddress(hMod, proc)));
if (pProc[0] != 0xB8)
return;
@@ -193,10 +203,10 @@ static void setUpOffscreenPaintingHooks(HDC (WINAPI*hookedBeginPaint)(HWND, PAIN
// we hook into BeginPaint/EndPaint to allow their normal WM_PAINT handling
// to draw into a given HDC. Note that this hooking affects the entire
// process.
- hook("user32.dll", "BeginPaint", beginPaintSysCall, beginPaint, hookedBeginPaint);
- hook("user32.dll", "EndPaint", endPaintSysCall, endPaint, hookedEndPaint);
+ hook("user32.dll", "BeginPaint", beginPaintSysCall, beginPaint, reinterpret_cast<const void *>(reinterpret_cast<ptrdiff_t>(hookedBeginPaint)));
+ hook("user32.dll", "EndPaint", endPaintSysCall, endPaint, reinterpret_cast<const void *>(reinterpret_cast<ptrdiff_t>(hookedEndPaint)));
+
}
-#endif
static bool registerPluginView()
{
@@ -940,9 +950,8 @@ void PluginView::init()
if (m_isWindowed) {
registerPluginView();
-#if (!COMPILER(MINGW))
setUpOffscreenPaintingHooks(hookedBeginPaint, hookedEndPaint);
-#endif
+
DWORD flags = WS_CHILD;
if (isSelfVisible())
flags |= WS_VISIBLE;
diff --git a/src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.cpp b/src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.cpp
index 648e843..afb72cf 100644
--- a/src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.cpp
@@ -94,7 +94,7 @@ void AutoTableLayout::recalcColumn(int effCol)
w.setRawValue(32760);
if (w.isNegative())
w.setValue(0);
- switch(w.type()) {
+ switch (w.type()) {
case Fixed:
// ignore width=0
if (w.value() > 0 && (int)l.width.type() != Percent) {
@@ -573,7 +573,7 @@ void AutoTableLayout::layout()
int reduction = min(w, excess);
// the lines below might look inconsistent, but that's the way it's handled in mozilla
excess -= reduction;
- int newWidth = max(int (m_layoutStruct[i].effMinWidth), w - reduction);
+ int newWidth = max(static_cast<int>(m_layoutStruct[i].effMinWidth), w - reduction);
available += w - newWidth;
m_layoutStruct[i].calcWidth = newWidth;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineBox.cpp b/src/3rdparty/webkit/WebCore/rendering/InlineBox.cpp
index 2d956a8..bbf11b3 100644
--- a/src/3rdparty/webkit/WebCore/rendering/InlineBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/InlineBox.cpp
@@ -88,10 +88,10 @@ void InlineBox::showTreeForThis() const
int InlineBox::height() const
{
#if ENABLE(SVG)
- if (isSVG())
- return svgBoxHeight();
+ if (hasVirtualHeight())
+ return virtualHeight();
#endif
-
+
if (renderer()->isText())
return m_isText ? renderer()->style(m_firstLine)->font().height() : 0;
if (renderer()->isBox() && parent())
@@ -244,26 +244,26 @@ bool InlineBox::prevOnLineExists() const
return m_prevOnLineExists;
}
-InlineBox* InlineBox::firstLeafChild()
-{
- return this;
-}
-
-InlineBox* InlineBox::lastLeafChild()
-{
- return this;
-}
-
-InlineBox* InlineBox::nextLeafChild()
+InlineBox* InlineBox::nextLeafChild() const
{
- return parent() ? parent()->firstLeafChildAfterBox(this) : 0;
+ InlineBox* leaf = 0;
+ for (InlineBox* box = nextOnLine(); box && !leaf; box = box->nextOnLine())
+ leaf = box->isLeaf() ? box : static_cast<InlineFlowBox*>(box)->firstLeafChild();
+ if (!leaf && parent())
+ leaf = parent()->nextLeafChild();
+ return leaf;
}
-
-InlineBox* InlineBox::prevLeafChild()
+
+InlineBox* InlineBox::prevLeafChild() const
{
- return parent() ? parent()->lastLeafChildBeforeBox(this) : 0;
+ InlineBox* leaf = 0;
+ for (InlineBox* box = prevOnLine(); box && !leaf; box = box->prevOnLine())
+ leaf = box->isLeaf() ? box : static_cast<InlineFlowBox*>(box)->lastLeafChild();
+ if (!leaf && parent())
+ leaf = parent()->prevLeafChild();
+ return leaf;
}
-
+
RenderObject::SelectionState InlineBox::selectionState()
{
return renderer()->selectionState();
diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineBox.h b/src/3rdparty/webkit/WebCore/rendering/InlineBox.h
index 9585278..0f66edd 100644
--- a/src/3rdparty/webkit/WebCore/rendering/InlineBox.h
+++ b/src/3rdparty/webkit/WebCore/rendering/InlineBox.h
@@ -49,7 +49,7 @@ public:
, m_dirty(false)
, m_extracted(false)
#if ENABLE(SVG)
- , m_isSVG(false)
+ , m_hasVirtualHeight(false)
#endif
, m_endsWithBreak(false)
, m_hasSelectedChildren(false)
@@ -82,7 +82,7 @@ public:
, m_dirty(dirty)
, m_extracted(extracted)
#if ENABLE(SVG)
- , m_isSVG(false)
+ , m_hasVirtualHeight(false)
#endif
, m_endsWithBreak(false)
, m_hasSelectedChildren(false)
@@ -129,18 +129,22 @@ public:
#ifndef NDEBUG
void showTreeForThis() const;
#endif
+
+ bool isText() const { return m_isText; }
+ void setIsText(bool b) { m_isText = b; }
+
virtual bool isInlineBox() { return false; }
virtual bool isInlineFlowBox() const { return false; }
virtual bool isInlineTextBox() { return false; }
virtual bool isRootInlineBox() const { return false; }
#if ENABLE(SVG)
virtual bool isSVGRootInlineBox() { return false; }
- bool isSVG() const { return m_isSVG; }
- void setIsSVG(bool b) { m_isSVG = b; }
-#endif
- bool isText() const { return m_isText; }
- void setIsText(bool b) { m_isText = b; }
+ bool hasVirtualHeight() const { return m_hasVirtualHeight; }
+ void setHasVirtualHeight() { m_hasVirtualHeight = true; }
+ virtual int virtualHeight() const { ASSERT_NOT_REACHED(); return 0; }
+#endif
+
bool isConstructed() { return m_constructed; }
virtual void setConstructed()
{
@@ -171,10 +175,10 @@ public:
bool nextOnLineExists() const;
bool prevOnLineExists() const;
- virtual InlineBox* firstLeafChild();
- virtual InlineBox* lastLeafChild();
- InlineBox* nextLeafChild();
- InlineBox* prevLeafChild();
+ virtual bool isLeaf() const { return true; }
+
+ InlineBox* nextLeafChild() const;
+ InlineBox* prevLeafChild() const;
RenderObject* renderer() const { return m_renderer; }
@@ -201,6 +205,9 @@ public:
int height() const;
+ inline int baselinePosition(bool isRootLineBox) const { return renderer()->baselinePosition(m_firstLine, isRootLineBox); }
+ inline int lineHeight(bool isRootLineBox) const { return renderer()->lineHeight(m_firstLine, isRootLineBox); }
+
virtual int topOverflow() const { return y(); }
virtual int bottomOverflow() const { return y() + height(); }
virtual int leftOverflow() const { return x(); }
@@ -243,11 +250,6 @@ public:
return 0;
}
-protected:
-#if ENABLE(SVG)
- virtual int svgBoxHeight() const { return 0; }
-#endif
-
private:
InlineBox* m_next; // The next element on the same line as us.
InlineBox* m_prev; // The previous element on the same line as us.
@@ -272,10 +274,7 @@ private:
protected:
bool m_dirty : 1;
bool m_extracted : 1;
-
-#if ENABLE(SVG)
- bool m_isSVG : 1;
-#endif
+ bool m_hasVirtualHeight : 1;
// for RootInlineBox
bool m_endsWithBreak : 1; // Whether the line ends with a <br>.
diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp
index be6b966..e46ba38 100644
--- a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp
@@ -371,7 +371,7 @@ void InlineFlowBox::adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent,
if (curr->renderer()->isPositioned())
continue; // Positioned placeholders don't affect calculations.
if (curr->y() == PositionTop || curr->y() == PositionBottom) {
- int lineHeight = curr->renderer()->lineHeight(m_firstLine);
+ int lineHeight = curr->lineHeight(false);
if (curr->y() == PositionTop) {
if (maxAscent + maxDescent < lineHeight)
maxDescent = lineHeight - maxAscent;
@@ -404,11 +404,11 @@ void InlineFlowBox::computeLogicalBoxHeights(int& maxPositionTop, int& maxPositi
{
if (isRootInlineBox()) {
// Examine our root box.
- int lineHeight = renderer()->lineHeight(m_firstLine, true);
- int baseline = renderer()->baselinePosition(m_firstLine, true);
+ int height = lineHeight(true);
+ int baseline = baselinePosition(true);
if (hasTextChildren() || strictMode) {
int ascent = baseline;
- int descent = lineHeight - ascent;
+ int descent = height - ascent;
if (maxAscent < ascent)
maxAscent = ascent;
if (maxDescent < descent)
@@ -456,8 +456,8 @@ void InlineFlowBox::computeLogicalBoxHeights(int& maxPositionTop, int& maxPositi
}
}
} else {
- lineHeight = curr->renderer()->lineHeight(m_firstLine);
- baseline = curr->renderer()->baselinePosition(m_firstLine);
+ lineHeight = curr->lineHeight(false);
+ baseline = curr->baselinePosition(false);
}
curr->setY(verticalPositionForBox(curr, m_firstLine));
@@ -485,8 +485,8 @@ void InlineFlowBox::placeBoxesVertically(int yPos, int maxHeight, int maxAscent,
int& topPosition, int& bottomPosition, int& selectionTop, int& selectionBottom)
{
if (isRootInlineBox())
- setY(yPos + max(0, maxAscent - renderer()->baselinePosition(m_firstLine, true))); // Place our root box.
-
+ setY(yPos + max(0, maxAscent - baselinePosition(true))); // Place our root box.
+
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer()->isPositioned())
continue; // Positioned placeholders don't affect calculations.
@@ -501,11 +501,11 @@ void InlineFlowBox::placeBoxesVertically(int yPos, int maxHeight, int maxAscent,
if (curr->y() == PositionTop)
curr->setY(yPos);
else if (curr->y() == PositionBottom)
- curr->setY(yPos + maxHeight - curr->renderer()->lineHeight(m_firstLine));
+ curr->setY(yPos + maxHeight - curr->lineHeight(false));
else {
if ((isInlineFlow && !static_cast<InlineFlowBox*>(curr)->hasTextChildren()) && !curr->boxModelObject()->hasHorizontalBordersOrPadding() && !strictMode)
childAffectsTopBottomPos = false;
- int posAdjust = maxAscent - curr->renderer()->baselinePosition(m_firstLine);
+ int posAdjust = maxAscent - curr->baselinePosition(false);
if (!childAffectsTopBottomPos)
posAdjust = max(0, posAdjust);
curr->setY(curr->y() + yPos + posAdjust);
@@ -521,7 +521,8 @@ void InlineFlowBox::placeBoxesVertically(int yPos, int maxHeight, int maxAscent,
int overflowBottom = 0;
if (curr->isText() || curr->isInlineFlowBox()) {
const Font& font = curr->renderer()->style(m_firstLine)->font();
- newY += curr->renderer()->baselinePosition(m_firstLine) - font.ascent();
+ newY += curr->baselinePosition(false) - font.ascent();
+
for (ShadowData* shadow = curr->renderer()->style()->textShadow(); shadow; shadow = shadow->next) {
overflowTop = min(overflowTop, shadow->y - shadow->blur);
overflowBottom = max(overflowBottom, shadow->y + shadow->blur);
@@ -565,7 +566,7 @@ void InlineFlowBox::placeBoxesVertically(int yPos, int maxHeight, int maxAscent,
if (isRootInlineBox()) {
const Font& font = renderer()->style(m_firstLine)->font();
- setY(y() + renderer()->baselinePosition(m_firstLine, true) - font.ascent());
+ setY(y() + baselinePosition(true) - font.ascent());
if (hasTextChildren() || strictMode) {
selectionTop = min(selectionTop, y());
selectionBottom = max(selectionBottom, y() + height());
@@ -980,33 +981,19 @@ void InlineFlowBox::paintTextDecorations(RenderObject::PaintInfo& paintInfo, int
}
}
-InlineBox* InlineFlowBox::firstLeafChild()
-{
- return firstLeafChildAfterBox();
-}
-
-InlineBox* InlineFlowBox::lastLeafChild()
-{
- return lastLeafChildBeforeBox();
-}
-
-InlineBox* InlineFlowBox::firstLeafChildAfterBox(InlineBox* start)
+InlineBox* InlineFlowBox::firstLeafChild() const
{
InlineBox* leaf = 0;
- for (InlineBox* box = start ? start->nextOnLine() : firstChild(); box && !leaf; box = box->nextOnLine())
- leaf = box->firstLeafChild();
- if (start && !leaf && parent())
- return parent()->firstLeafChildAfterBox(this);
+ for (InlineBox* child = firstChild(); child && !leaf; child = child->nextOnLine())
+ leaf = child->isLeaf() ? child : static_cast<InlineFlowBox*>(child)->firstLeafChild();
return leaf;
}
-InlineBox* InlineFlowBox::lastLeafChildBeforeBox(InlineBox* start)
+InlineBox* InlineFlowBox::lastLeafChild() const
{
InlineBox* leaf = 0;
- for (InlineBox* box = start ? start->prevOnLine() : lastChild(); box && !leaf; box = box->prevOnLine())
- leaf = box->lastLeafChild();
- if (start && !leaf && parent())
- return parent()->lastLeafChildBeforeBox(this);
+ for (InlineBox* child = lastChild(); child && !leaf; child = child->prevOnLine())
+ leaf = child->isLeaf() ? child : static_cast<InlineFlowBox*>(child)->lastLeafChild();
return leaf;
}
@@ -1037,7 +1024,7 @@ int InlineFlowBox::placeEllipsisBox(bool ltr, int blockLeftEdge, int blockRightE
int visibleLeftEdge = blockLeftEdge;
int visibleRightEdge = blockRightEdge;
- while(box) {
+ while (box) {
int currResult = box->placeEllipsisBox(ltr, visibleLeftEdge, visibleRightEdge, ellipsisWidth, foundBox);
if (currResult != -1 && result == -1)
result = currResult;
diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h
index ab1b6f2..9bb1162 100644
--- a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h
+++ b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h
@@ -58,13 +58,13 @@ public:
InlineFlowBox* prevFlowBox() const { return static_cast<InlineFlowBox*>(m_prevLine); }
InlineFlowBox* nextFlowBox() const { return static_cast<InlineFlowBox*>(m_nextLine); }
- InlineBox* firstChild() { checkConsistency(); return m_firstChild; }
- InlineBox* lastChild() { checkConsistency(); return m_lastChild; }
+ InlineBox* firstChild() const { checkConsistency(); return m_firstChild; }
+ InlineBox* lastChild() const { checkConsistency(); return m_lastChild; }
- virtual InlineBox* firstLeafChild();
- virtual InlineBox* lastLeafChild();
- InlineBox* firstLeafChildAfterBox(InlineBox* start = 0);
- InlineBox* lastLeafChildBeforeBox(InlineBox* start = 0);
+ virtual bool isLeaf() const { return false; }
+
+ InlineBox* firstLeafChild() const;
+ InlineBox* lastLeafChild() const;
virtual void setConstructed()
{
diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp b/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp
index 53646f9..94dd4f3 100644
--- a/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp
@@ -753,8 +753,8 @@ void InlineTextBox::paintSpellingOrGrammarMarker(GraphicsContext* pt, int tx, in
void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int tx, int ty, DocumentMarker marker, RenderStyle* style, const Font& font)
{
- // Use same y positioning and height as for selection, so that when the selection and this highlight are on
- // the same word there are no pieces sticking out.
+ // Use same y positioning and height as for selection, so that when the selection and this highlight are on
+ // the same word there are no pieces sticking out.
int y = selectionTop();
int h = selectionHeight();
diff --git a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp
index fc2790c..74293e0 100644
--- a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp
@@ -32,6 +32,7 @@
#include "MediaControlElements.h"
+#include "LocalizedStrings.h"
#include "EventNames.h"
#include "FloatConversion.h"
#include "Frame.h"
@@ -40,6 +41,7 @@
#include "RenderMedia.h"
#include "RenderSlider.h"
#include "RenderTheme.h"
+#include "CString.h"
namespace WebCore {
@@ -74,51 +76,165 @@ void MediaControlShadowRootElement::updateStyle()
}
// ----------------------------
+
-MediaTextDisplayElement::MediaTextDisplayElement(Document* doc, PseudoId pseudo, HTMLMediaElement* mediaElement)
+MediaControlElement::MediaControlElement(Document* doc, PseudoId pseudo, HTMLMediaElement* mediaElement)
: HTMLDivElement(divTag, doc)
, m_mediaElement(mediaElement)
, m_pseudoStyleId(pseudo)
{
- RenderStyle* style = m_mediaElement->renderer()->getCachedPseudoStyle(m_pseudoStyleId);
- RenderObject* renderer = createRenderer(m_mediaElement->renderer()->renderArena(), style);
- if (renderer) {
- setRenderer(renderer);
- renderer->setStyle(style);
- }
- setAttached();
setInDocument(true);
}
-void MediaTextDisplayElement::attachToParent(Element* parent)
+void MediaControlElement::attachToParent(Element* parent)
{
parent->addChild(this);
- if (renderer() && parent->renderer())
- parent->renderer()->addChild(renderer());
}
-void MediaTextDisplayElement::update()
+void MediaControlElement::update()
{
if (renderer())
renderer()->updateFromElement();
updateStyle();
}
-void MediaTextDisplayElement::updateStyle()
+PassRefPtr<RenderStyle> MediaControlElement::styleForElement()
+{
+ RenderStyle* style = m_mediaElement->renderer()->getCachedPseudoStyle(m_pseudoStyleId);
+ if (!style)
+ return 0;
+
+ // text-decoration can't be overrided from CSS. So we do it here.
+ // See https://bugs.webkit.org/show_bug.cgi?id=27015
+ style->setTextDecoration(TDNONE);
+ style->setTextDecorationsInEffect(TDNONE);
+
+ return style;
+}
+
+bool MediaControlElement::rendererIsNeeded(RenderStyle* style)
+{
+ return HTMLDivElement::rendererIsNeeded(style) && parent() && parent()->renderer();
+}
+
+void MediaControlElement::attach()
{
- if (renderer() && m_mediaElement->renderer()) {
- RenderStyle* style = m_mediaElement->renderer()->getCachedPseudoStyle(m_pseudoStyleId);
- renderer()->setStyle(style);
+ RefPtr<RenderStyle> style = styleForElement();
+ if (!style)
+ return;
+ bool needsRenderer = rendererIsNeeded(style.get());
+ if (!needsRenderer)
+ return;
+ RenderObject* renderer = createRenderer(m_mediaElement->renderer()->renderArena(), style.get());
+ if (!renderer)
+ return;
+ renderer->setStyle(style.get());
+ setRenderer(renderer);
+ if (parent() && parent()->renderer()) {
+ // Find next sibling with a renderer to determine where to insert.
+ Node* sibling = nextSibling();
+ while (sibling && !sibling->renderer())
+ sibling = sibling->nextSibling();
+ parent()->renderer()->addChild(renderer, sibling ? sibling->renderer() : 0);
}
+ ContainerNode::attach();
}
-MediaTimeDisplayElement::MediaTimeDisplayElement(Document* doc, HTMLMediaElement* element, bool currentTime)
- : MediaTextDisplayElement(doc, currentTime ? MEDIA_CONTROLS_CURRENT_TIME_DISPLAY : MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, element)
+void MediaControlElement::updateStyle()
{
+ if (!m_mediaElement || !m_mediaElement->renderer())
+ return;
+
+ RefPtr<RenderStyle> style = styleForElement();
+ if (!style)
+ return;
+
+ bool needsRenderer = rendererIsNeeded(style.get()) && parent() && parent()->renderer();
+ if (renderer() && !needsRenderer)
+ detach();
+ else if (!renderer() && needsRenderer)
+ attach();
+ else if (renderer()) {
+ renderer()->setStyle(style.get());
+
+ // Make sure that if there is any innerText renderer, it is updated as well.
+ if (firstChild() && firstChild()->renderer())
+ firstChild()->renderer()->setStyle(style.get());
+ }
}
// ----------------------------
+MediaControlTimelineContainerElement::MediaControlTimelineContainerElement(Document* doc, HTMLMediaElement* element)
+: MediaControlElement(doc, MEDIA_CONTROLS_TIMELINE_CONTAINER, element)
+{
+}
+
+bool MediaControlTimelineContainerElement::rendererIsNeeded(RenderStyle* style)
+{
+ if (!MediaControlElement::rendererIsNeeded(style))
+ return false;
+
+ // This is for MediaControllerThemeClassic:
+ // If there is no style for MediaControlStatusDisplayElement style, don't hide
+ // the timeline.
+ if (!m_mediaElement->renderer()->getCachedPseudoStyle(MEDIA_CONTROLS_STATUS_DISPLAY))
+ return true;
+
+ float duration = m_mediaElement->duration();
+ return !isnan(duration) && !isinf(duration);
+}
+
+
+// ----------------------------
+
+MediaControlStatusDisplayElement::MediaControlStatusDisplayElement(Document* doc, HTMLMediaElement* element)
+: MediaControlElement(doc, MEDIA_CONTROLS_STATUS_DISPLAY, element)
+, m_stateBeingDisplayed(Nothing)
+{
+}
+
+void MediaControlStatusDisplayElement::update()
+{
+ MediaControlElement::update();
+
+ // Get the new state that we'll have to display.
+ StateBeingDisplayed newStateToDisplay = Nothing;
+
+ if (m_mediaElement->readyState() != HTMLMediaElement::HAVE_ENOUGH_DATA && !m_mediaElement->currentSrc().isEmpty())
+ newStateToDisplay = Loading;
+ else if (m_mediaElement->movieLoadType() == MediaPlayer::LiveStream)
+ newStateToDisplay = LiveBroadcast;
+
+ // Propagate only if needed.
+ if (newStateToDisplay == m_stateBeingDisplayed)
+ return;
+ m_stateBeingDisplayed = newStateToDisplay;
+
+ ExceptionCode e;
+ switch (m_stateBeingDisplayed) {
+ case Nothing:
+ setInnerText("", e);
+ break;
+ case Loading:
+ setInnerText(mediaElementLoadingStateText(), e);
+ break;
+ case LiveBroadcast:
+ setInnerText(mediaElementLiveBroadcastStateText(), e);
+ break;
+ }
+}
+
+bool MediaControlStatusDisplayElement::rendererIsNeeded(RenderStyle* style)
+{
+ if (!MediaControlElement::rendererIsNeeded(style))
+ return false;
+ float duration = m_mediaElement->duration();
+ return (isnan(duration) || isinf(duration));
+}
+
+// ----------------------------
+
MediaControlInputElement::MediaControlInputElement(Document* doc, PseudoId pseudo, const String& type, HTMLMediaElement* mediaElement, MediaControlElementType displayType)
: HTMLInputElement(inputTag, doc)
, m_mediaElement(mediaElement)
@@ -126,15 +242,12 @@ MediaControlInputElement::MediaControlInputElement(Document* doc, PseudoId pseud
, m_displayType(displayType)
{
setInputType(type);
- updateStyle();
setInDocument(true);
}
void MediaControlInputElement::attachToParent(Element* parent)
{
parent->addChild(this);
- if (renderer() && parent->renderer())
- parent->renderer()->addChild(renderer());
}
void MediaControlInputElement::update()
@@ -145,34 +258,58 @@ void MediaControlInputElement::update()
updateStyle();
}
+PassRefPtr<RenderStyle> MediaControlInputElement::styleForElement()
+{
+ return m_mediaElement->renderer()->getCachedPseudoStyle(m_pseudoStyleId);
+}
+
+bool MediaControlInputElement::rendererIsNeeded(RenderStyle* style)
+{
+ return HTMLInputElement::rendererIsNeeded(style) && parent() && parent()->renderer();
+}
+
+void MediaControlInputElement::attach()
+{
+ RefPtr<RenderStyle> style = styleForElement();
+ if (!style)
+ return;
+
+ bool needsRenderer = rendererIsNeeded(style.get());
+ if (!needsRenderer)
+ return;
+ RenderObject* renderer = createRenderer(m_mediaElement->renderer()->renderArena(), style.get());
+ if (!renderer)
+ return;
+ renderer->setStyle(style.get());
+ setRenderer(renderer);
+ if (parent() && parent()->renderer()) {
+ // Find next sibling with a renderer to determine where to insert.
+ Node* sibling = nextSibling();
+ while (sibling && !sibling->renderer())
+ sibling = sibling->nextSibling();
+ parent()->renderer()->addChild(renderer, sibling ? sibling->renderer() : 0);
+ }
+ ContainerNode::attach();
+}
+
void MediaControlInputElement::updateStyle()
{
if (!m_mediaElement || !m_mediaElement->renderer())
return;
- RenderStyle* style = m_mediaElement->renderer()->getCachedPseudoStyle(m_pseudoStyleId);
+ RefPtr<RenderStyle> style = styleForElement();
+ if (!style)
+ return;
- bool needsRenderer = rendererIsNeeded(style);
+ bool needsRenderer = rendererIsNeeded(style.get()) && parent() && parent()->renderer();
if (renderer() && !needsRenderer)
detach();
- else if (!renderer() && needsRenderer) {
- RenderObject* renderer = createRenderer(m_mediaElement->renderer()->renderArena(), style);
- if (!renderer)
- return;
- renderer->setStyle(style);
- setRenderer(renderer);
- setAttached();
- if (parent() && parent()->renderer()) {
- // Find next sibling with a renderer to determine where to insert.
- Node* sibling = nextSibling();
- while (sibling && !sibling->renderer())
- sibling = sibling->nextSibling();
- parent()->renderer()->addChild(renderer, sibling ? sibling->renderer() : 0);
- }
- } else if (renderer())
- renderer()->setStyle(style);
+ else if (!renderer() && needsRenderer)
+ attach();
+ else if (renderer())
+ renderer()->setStyle(style.get());
}
-
+
bool MediaControlInputElement::hitTest(const IntPoint& absPoint)
{
if (renderer() && renderer()->style()->hasAppearance())
@@ -283,6 +420,59 @@ void MediaControlSeekButtonElement::seekTimerFired(Timer<MediaControlSeekButtonE
m_mediaElement->setCurrentTime(m_mediaElement->currentTime() + seekTime, ec);
}
+void MediaControlSeekButtonElement::detach()
+{
+ if (m_capturing) {
+ if (Frame* frame = document()->frame())
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
+ }
+ MediaControlInputElement::detach();
+}
+
+
+// ----------------------------
+
+MediaControlRewindButtonElement::MediaControlRewindButtonElement(Document* doc, HTMLMediaElement* element)
+: MediaControlInputElement(doc, MEDIA_CONTROLS_REWIND_BUTTON, "button", element, MediaRewindButton)
+{
+}
+
+void MediaControlRewindButtonElement::defaultEventHandler(Event* event)
+{
+ if (event->type() == eventNames().clickEvent) {
+ m_mediaElement->rewind(30);
+ event->setDefaultHandled();
+ }
+ HTMLInputElement::defaultEventHandler(event);
+}
+
+bool MediaControlRewindButtonElement::rendererIsNeeded(RenderStyle* style)
+{
+ return MediaControlInputElement::rendererIsNeeded(style) && m_mediaElement->movieLoadType() != MediaPlayer::LiveStream;
+}
+
+
+// ----------------------------
+
+MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement(Document* doc, HTMLMediaElement* element)
+: MediaControlInputElement(doc, MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON, "button", element, MediaReturnToRealtimeButton)
+{
+}
+
+void MediaControlReturnToRealtimeButtonElement::defaultEventHandler(Event* event)
+{
+ if (event->type() == eventNames().clickEvent) {
+ m_mediaElement->returnToRealtime();
+ event->setDefaultHandled();
+ }
+ HTMLInputElement::defaultEventHandler(event);
+}
+
+bool MediaControlReturnToRealtimeButtonElement::rendererIsNeeded(RenderStyle* style)
+{
+ return MediaControlInputElement::rendererIsNeeded(style) && m_mediaElement->movieLoadType() == MediaPlayer::LiveStream;
+}
+
// ----------------------------
MediaControlTimelineElement::MediaControlTimelineElement(Document* document, HTMLMediaElement* element)
@@ -295,9 +485,9 @@ void MediaControlTimelineElement::defaultEventHandler(Event* event)
if (event->type() == eventNames().mousedownEvent)
m_mediaElement->beginScrubbing();
- HTMLInputElement::defaultEventHandler(event);
+ MediaControlInputElement::defaultEventHandler(event);
- if (event->type() == eventNames().mouseoverEvent || event->type() == eventNames().mouseoutEvent || event->type() == eventNames().mousemoveEvent ) {
+ if (event->type() == eventNames().mouseoverEvent || event->type() == eventNames().mouseoutEvent || event->type() == eventNames().mousemoveEvent) {
return;
}
@@ -322,6 +512,7 @@ void MediaControlTimelineElement::update(bool updateDuration)
setAttribute(maxAttr, String::number(isfinite(dur) ? dur : 0));
}
setValue(String::number(m_mediaElement->currentTime()));
+ MediaControlInputElement::update();
}
// ----------------------------
@@ -341,11 +532,42 @@ void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
bool MediaControlFullscreenButtonElement::rendererIsNeeded(RenderStyle* style)
{
- return m_mediaElement->supportsFullscreen() && MediaControlInputElement::rendererIsNeeded(style);
+ return MediaControlInputElement::rendererIsNeeded(style) && m_mediaElement->supportsFullscreen();
}
// ----------------------------
+MediaControlTimeDisplayElement::MediaControlTimeDisplayElement(Document* doc, PseudoId pseudo, HTMLMediaElement* element)
+ : MediaControlElement(doc, pseudo, element)
+ , m_isVisible(true)
+{
+}
+
+PassRefPtr<RenderStyle> MediaControlTimeDisplayElement::styleForElement()
+{
+ RefPtr<RenderStyle> style = MediaControlElement::styleForElement();
+ if (!m_isVisible) {
+ style = RenderStyle::clone(style.get());
+ style->setWidth(Length(0, Fixed));
+ }
+ return style;
+}
+
+void MediaControlTimeDisplayElement::setVisible(bool visible)
+{
+ // This function is used during the RenderMedia::layout()
+ // call, where we cannot change the renderer at this time.
+ if (!renderer() || !renderer()->style())
+ return;
+
+ if (visible == m_isVisible)
+ return;
+ m_isVisible = visible;
+ RefPtr<RenderStyle> style = styleForElement();
+ renderer()->setStyle(style.get());
+}
+
+
} //namespace WebCore
#endif // enable(video)
diff --git a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h
index eefb2ce..d5fa5d2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h
+++ b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 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
@@ -43,11 +43,24 @@ namespace WebCore {
class Event;
class Frame;
+// Must match WebKitSystemInterface.h
enum MediaControlElementType {
- MediaFullscreenButton, MediaMuteButton, MediaPlayButton,
- MediaSeekBackButton, MediaSeekForwardButton, MediaSlider, MediaSliderThumb,
- MediaUnMuteButton, MediaPauseButton, MediaTimelineContainer, MediaCurrentTimeDisplay,
- MediaTimeRemainingDisplay, MediaControlsPanel
+ MediaFullscreenButton = 0,
+ MediaMuteButton,
+ MediaPlayButton,
+ MediaSeekBackButton,
+ MediaSeekForwardButton,
+ MediaSlider,
+ MediaSliderThumb,
+ MediaRewindButton,
+ MediaReturnToRealtimeButton,
+ MediaUnMuteButton,
+ MediaPauseButton,
+ MediaTimelineContainer,
+ MediaCurrentTimeDisplay,
+ MediaTimeRemainingDisplay,
+ MediaStatusDisplay,
+ MediaControlsPanel
};
class MediaControlShadowRootElement : public HTMLDivElement {
@@ -63,15 +76,19 @@ private:
HTMLMediaElement* m_mediaElement;
};
- // ----------------------------
-
-class MediaTextDisplayElement : public HTMLDivElement
-{
+// ----------------------------
+
+class MediaControlElement : public HTMLDivElement {
public:
- MediaTextDisplayElement(Document*, PseudoId, HTMLMediaElement*);
+ MediaControlElement(Document*, PseudoId, HTMLMediaElement*);
+ virtual void attach();
+ virtual bool rendererIsNeeded(RenderStyle*);
+
+ virtual PassRefPtr<RenderStyle> styleForElement();
void attachToParent(Element*);
void update();
- void updateStyle();
+ virtual void updateStyle();
+
protected:
HTMLMediaElement* m_mediaElement;
PseudoId m_pseudoStyleId;
@@ -79,9 +96,22 @@ protected:
// ----------------------------
-class MediaTimeDisplayElement : public MediaTextDisplayElement {
+class MediaControlTimelineContainerElement : public MediaControlElement {
+public:
+ MediaControlTimelineContainerElement(Document*, HTMLMediaElement*);
+ virtual bool rendererIsNeeded(RenderStyle*);
+};
+
+// ----------------------------
+
+class MediaControlStatusDisplayElement : public MediaControlElement {
public:
- MediaTimeDisplayElement(Document*, HTMLMediaElement*, bool currentTime);
+ MediaControlStatusDisplayElement(Document*, HTMLMediaElement*);
+ virtual void update();
+ virtual bool rendererIsNeeded(RenderStyle*);
+private:
+ enum StateBeingDisplayed { Nothing, Loading, LiveBroadcast };
+ StateBeingDisplayed m_stateBeingDisplayed;
};
// ----------------------------
@@ -89,9 +119,14 @@ public:
class MediaControlInputElement : public HTMLInputElement {
public:
MediaControlInputElement(Document*, PseudoId, const String& type, HTMLMediaElement*, MediaControlElementType);
+ virtual void attach();
+ virtual bool rendererIsNeeded(RenderStyle*);
+
+ virtual PassRefPtr<RenderStyle> styleForElement();
void attachToParent(Element*);
void update();
- virtual void updateStyle();
+ void updateStyle();
+
bool hitTest(const IntPoint& absPoint);
MediaControlElementType displayType() const { return m_displayType; }
@@ -128,6 +163,7 @@ class MediaControlSeekButtonElement : public MediaControlInputElement {
public:
MediaControlSeekButtonElement(Document*, HTMLMediaElement*, bool forward);
virtual void defaultEventHandler(Event*);
+ virtual void detach();
void seekTimerFired(Timer<MediaControlSeekButtonElement>*);
private:
@@ -136,6 +172,24 @@ private:
bool m_capturing;
Timer<MediaControlSeekButtonElement> m_seekTimer;
};
+
+// ----------------------------
+
+class MediaControlRewindButtonElement : public MediaControlInputElement {
+public:
+ MediaControlRewindButtonElement(Document*, HTMLMediaElement*);
+ virtual void defaultEventHandler(Event*);
+ virtual bool rendererIsNeeded(RenderStyle*);
+};
+
+// ----------------------------
+
+class MediaControlReturnToRealtimeButtonElement : public MediaControlInputElement {
+public:
+ MediaControlReturnToRealtimeButtonElement(Document*, HTMLMediaElement*);
+ virtual void defaultEventHandler(Event*);
+ virtual bool rendererIsNeeded(RenderStyle*);
+};
// ----------------------------
@@ -157,14 +211,27 @@ public:
// ----------------------------
+class MediaControlTimeDisplayElement : public MediaControlElement {
+public:
+ MediaControlTimeDisplayElement(Document*, PseudoId, HTMLMediaElement*);
+ void setVisible(bool);
+ virtual PassRefPtr<RenderStyle> styleForElement();
+
+private:
+ bool m_isVisible;
+};
+
+// ----------------------------
+
class RenderMediaControlShadowRoot : public RenderBlock {
public:
RenderMediaControlShadowRoot(Element* e) : RenderBlock(e) { }
void setParent(RenderObject* p) { RenderObject::setParent(p); }
};
-
+
// ----------------------------
+
} //namespace WebCore
#endif // enable(video)
#endif // MediaControlElements_h
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderApplet.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderApplet.cpp
index a989d6f..062641e 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderApplet.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderApplet.cpp
@@ -26,6 +26,7 @@
#include "HTMLAppletElement.h"
#include "HTMLNames.h"
#include "HTMLParamElement.h"
+#include "Widget.h"
namespace WebCore {
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderArena.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderArena.cpp
index b7bfe4d..34325d4 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderArena.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderArena.cpp
@@ -39,7 +39,7 @@
#include <string.h>
#include <wtf/Assertions.h>
-#define ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
+#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
namespace WebCore {
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
index 98426ed..c949eda 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
@@ -84,6 +84,10 @@ static PercentHeightContainerMap* gPercentHeightContainerMap = 0;
typedef WTF::HashMap<RenderBlock*, ListHashSet<RenderInline*>*> ContinuationOutlineTableMap;
+typedef WTF::HashSet<RenderBlock*> DelayedUpdateScrollInfoSet;
+static int gDelayUpdateScrollInfo = 0;
+static DelayedUpdateScrollInfoSet* gDelayedUpdateScrollInfoSet = 0;
+
// Our MarginInfo state used when laying out block children.
RenderBlock::MarginInfo::MarginInfo(RenderBlock* block, int top, int bottom)
{
@@ -389,14 +393,14 @@ void RenderBlock::deleteLineBoxTree()
m_lineBoxes.deleteLineBoxTree(renderArena());
}
-RootInlineBox* RenderBlock::createRootBox()
+RootInlineBox* RenderBlock::createRootInlineBox()
{
return new (renderArena()) RootInlineBox(this);
}
-RootInlineBox* RenderBlock::createRootInlineBox()
+RootInlineBox* RenderBlock::createAndAppendRootInlineBox()
{
- RootInlineBox* rootBox = createRootBox();
+ RootInlineBox* rootBox = createRootInlineBox();
m_lineBoxes.appendLineBox(rootBox);
return rootBox;
}
@@ -688,6 +692,45 @@ bool RenderBlock::isSelfCollapsingBlock() const
return false;
}
+void RenderBlock::startDelayUpdateScrollInfo()
+{
+ if (gDelayUpdateScrollInfo == 0) {
+ ASSERT(!gDelayedUpdateScrollInfoSet);
+ gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet;
+ }
+ ASSERT(gDelayedUpdateScrollInfoSet);
+ ++gDelayUpdateScrollInfo;
+}
+
+void RenderBlock::finishDelayUpdateScrollInfo()
+{
+ --gDelayUpdateScrollInfo;
+ ASSERT(gDelayUpdateScrollInfo >= 0);
+ if (gDelayUpdateScrollInfo == 0) {
+ ASSERT(gDelayedUpdateScrollInfoSet);
+
+ for (DelayedUpdateScrollInfoSet::iterator it = gDelayedUpdateScrollInfoSet->begin(); it != gDelayedUpdateScrollInfoSet->end(); ++it) {
+ RenderBlock* block = *it;
+ if (block->hasOverflowClip()) {
+ block->layer()->updateScrollInfoAfterLayout();
+ }
+ }
+
+ delete gDelayedUpdateScrollInfoSet;
+ gDelayedUpdateScrollInfoSet = 0;
+ }
+}
+
+void RenderBlock::updateScrollInfoAfterLayout()
+{
+ if (hasOverflowClip()) {
+ if (gDelayUpdateScrollInfo)
+ gDelayedUpdateScrollInfoSet->add(this);
+ else
+ layer()->updateScrollInfoAfterLayout();
+ }
+}
+
void RenderBlock::layout()
{
// Update our first letter info now.
@@ -844,8 +887,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
// Update our scroll information if we're overflow:auto/scroll/hidden now that we know if
// we overflow or not.
- if (hasOverflowClip())
- layer()->updateScrollInfoAfterLayout();
+ updateScrollInfoAfterLayout();
// Repaint with our new bounds if they are different from our old bounds.
bool didFullRepaint = repainter.repaintAfterLayout();
@@ -1436,8 +1478,10 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
child->repaintDuringLayoutIfMoved(oldRect);
}
- if (!childHadLayout && child->checkForRepaintDuringLayout())
+ if (!childHadLayout && child->checkForRepaintDuringLayout()) {
child->repaint();
+ child->repaintOverhangingFloats(true);
+ }
ASSERT(oldLayoutDelta == view()->layoutDelta());
}
@@ -1465,8 +1509,7 @@ bool RenderBlock::layoutOnlyPositionedObjects()
statePusher.pop();
- if (hasOverflowClip())
- layer()->updateScrollInfoAfterLayout();
+ updateScrollInfoAfterLayout();
setNeedsLayout(false);
return true;
@@ -2421,10 +2464,10 @@ bool RenderBlock::positionNewFloats()
if (o->style()->floating() == FLEFT) {
int heightRemainingLeft = 1;
int heightRemainingRight = 1;
- int fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
- while (rightRelOffset(y,ro, false, &heightRemainingRight)-fx < fwidth) {
+ int fx = leftRelOffset(y, lo, false, &heightRemainingLeft);
+ while (rightRelOffset(y, ro, false, &heightRemainingRight)-fx < fwidth) {
y += min(heightRemainingLeft, heightRemainingRight);
- fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
+ fx = leftRelOffset(y, lo, false, &heightRemainingLeft);
}
fx = max(0, fx);
f->m_left = fx;
@@ -2432,8 +2475,8 @@ bool RenderBlock::positionNewFloats()
} else {
int heightRemainingLeft = 1;
int heightRemainingRight = 1;
- int fx = rightRelOffset(y,ro, false, &heightRemainingRight);
- while (fx - leftRelOffset(y,lo, false, &heightRemainingLeft) < fwidth) {
+ int fx = rightRelOffset(y, ro, false, &heightRemainingRight);
+ while (fx - leftRelOffset(y, lo, false, &heightRemainingLeft) < fwidth) {
y += min(heightRemainingLeft, heightRemainingRight);
fx = rightRelOffset(y, ro, false, &heightRemainingRight);
}
@@ -2458,7 +2501,7 @@ void RenderBlock::newLine(EClear clear)
positionNewFloats();
// set y position
int newY = 0;
- switch(clear)
+ switch (clear)
{
case CLEFT:
newY = leftBottom();
@@ -2629,12 +2672,12 @@ int
RenderBlock::floatBottom() const
{
if (!m_floatingObjects) return 0;
- int bottom=0;
+ int bottom = 0;
FloatingObject* r;
DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->m_bottom>bottom)
- bottom=r->m_bottom;
+ bottom = r->m_bottom;
return bottom;
}
@@ -2919,12 +2962,12 @@ int
RenderBlock::leftBottom()
{
if (!m_floatingObjects) return 0;
- int bottom=0;
+ int bottom = 0;
FloatingObject* r;
DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->m_bottom > bottom && r->type() == FloatingObject::FloatLeft)
- bottom=r->m_bottom;
+ bottom = r->m_bottom;
return bottom;
}
@@ -2933,12 +2976,12 @@ int
RenderBlock::rightBottom()
{
if (!m_floatingObjects) return 0;
- int bottom=0;
+ int bottom = 0;
FloatingObject* r;
DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->m_bottom>bottom && r->type() == FloatingObject::FloatRight)
- bottom=r->m_bottom;
+ bottom = r->m_bottom;
return bottom;
}
@@ -3246,12 +3289,12 @@ void RenderBlock::addVisualOverflow(const IntRect& r)
m_overflowHeight = max(m_overflowHeight, r.bottom());
}
-bool RenderBlock::isPointInOverflowControl(HitTestResult& result, int, int, int, int)
+bool RenderBlock::isPointInOverflowControl(HitTestResult& result, int _x, int _y, int _tx, int _ty)
{
if (!scrollsOverflow())
return false;
- return layer()->hitTestOverflowControls(result);
+ return layer()->hitTestOverflowControls(result, IntPoint(_x - _tx, _y - _ty));
}
bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
@@ -3900,8 +3943,7 @@ void RenderBlock::calcPrefWidths()
setPrefWidthsDirty(false);
}
-struct InlineMinMaxIterator
-{
+struct InlineMinMaxIterator {
/* InlineMinMaxIterator is a class that will iterate over all render objects that contribute to
inline min/max width calculations. Note the following about the way it walks:
(1) Positioned content is skipped (since it does not contribute to min/max width of a block)
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h
index 31eae7c8..871e439 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h
@@ -35,7 +35,6 @@
namespace WebCore {
class InlineIterator;
-class Position;
class RenderInline;
class RootInlineBox;
@@ -142,23 +141,26 @@ public:
virtual void updateBeforeAfterContent(PseudoId);
- RootInlineBox* createRootInlineBox();
+ RootInlineBox* createAndAppendRootInlineBox();
+ virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG and Ruby.
// Called to lay out the legend for a fieldset.
virtual RenderObject* layoutLegend(bool /*relayoutChildren*/) { return 0; }
- // the implementation of the following functions is in bidi.cpp
struct FloatWithRect {
FloatWithRect(RenderBox* f)
: object(f)
, rect(IntRect(f->x() - f->marginLeft(), f->y() - f->marginTop(), f->width() + f->marginLeft() + f->marginRight(), f->height() + f->marginTop() + f->marginBottom()))
+ , everHadLayout(f->m_everHadLayout)
{
}
RenderBox* object;
IntRect rect;
+ bool everHadLayout;
};
+ // The following functions' implementations are in RenderBlockLineLayout.cpp.
void bidiReorderLine(InlineBidiResolver&, const InlineIterator& end, bool previousLineBrokeCleanly);
RootInlineBox* determineStartPosition(bool& firstLine, bool& fullLayout, bool& previousLineBrokeCleanly,
InlineBidiResolver&, Vector<FloatWithRect>& floats, unsigned& numCleanFloats);
@@ -179,7 +181,7 @@ public:
void checkLinesForOverflow();
void deleteEllipsisLineBoxes();
void checkLinesForTextOverflow();
- // end bidi.cpp functions
+ // End of functions defined in RenderBlockLineLayout.cpp.
virtual void paint(PaintInfo&, int tx, int ty);
virtual void paintObject(PaintInfo&, int tx, int ty);
@@ -328,6 +330,14 @@ public:
// style from this RenderBlock.
RenderBlock* createAnonymousBlock() const;
+ // Delay update scrollbar until finishDelayRepaint() will be
+ // called. This function is used when a flexbox is layouting its
+ // descendant. If multiple startDelayRepaint() is called,
+ // finishDelayRepaint() will do nothing until finishDelayRepaint()
+ // is called same times.
+ static void startDelayUpdateScrollInfo();
+ static void finishDelayUpdateScrollInfo();
+
private:
void adjustPointToColumnContents(IntPoint&) const;
void adjustForBorderFit(int x, int& left, int& right) const; // Helper function for borderFitAdjust
@@ -342,7 +352,6 @@ protected:
virtual bool hasLineIfEmpty() const;
bool layoutOnlyPositionedObjects();
- virtual RootInlineBox* createRootBox(); // Subclassed by SVG.
private:
Position positionForBox(InlineBox*, bool start = true) const;
@@ -357,6 +366,8 @@ private:
bool expandsToEncloseOverhangingFloats() const;
+ void updateScrollInfoAfterLayout();
+
protected:
struct FloatingObject {
enum Type {
diff --git a/src/3rdparty/webkit/WebCore/rendering/bidi.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlockLineLayout.cpp
index 635ad9a..c243dc1 100644
--- a/src/3rdparty/webkit/WebCore/rendering/bidi.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All right reserved.
+ * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009 Apple Inc. All right reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -20,17 +20,13 @@
*/
#include "config.h"
-#include "bidi.h"
+#include "BidiResolver.h"
#include "CharacterNames.h"
-#include "Document.h"
-#include "Element.h"
-#include "FrameView.h"
#include "InlineTextBox.h"
#include "Logging.h"
#include "RenderArena.h"
#include "RenderInline.h"
-#include "RenderLayer.h"
#include "RenderListMarker.h"
#include "RenderView.h"
#include "break_lines.h"
@@ -70,7 +66,7 @@ public:
bool atEnd() const;
UChar current() const;
- WTF::Unicode::Direction direction() const;
+ Direction direction() const;
RenderBlock* block;
RenderObject* obj;
@@ -102,8 +98,35 @@ static int inlineWidth(RenderObject* child, bool start = true, bool end = true)
return extraWidth;
}
+struct BidiRun : BidiCharacterRun {
+ BidiRun(int start, int stop, RenderObject* object, BidiContext* context, Direction dir)
+ : BidiCharacterRun(start, stop, context, dir)
+ , m_object(object)
+ , m_box(0)
+ {
+ }
+
+ void destroy();
+
+ // Overloaded new operator.
+ void* operator new(size_t, RenderArena*) throw();
+
+ // Overridden to prevent the normal delete from being called.
+ void operator delete(void*, size_t);
+
+ BidiRun* next() { return static_cast<BidiRun*>(m_next); }
+
+private:
+ // The normal operator new is disallowed.
+ void* operator new(size_t) throw();
+
+public:
+ RenderObject* m_object;
+ InlineBox* m_box;
+};
+
#ifndef NDEBUG
-static WTF::RefCountedLeakCounter bidiRunCounter("BidiRun");
+static RefCountedLeakCounter bidiRunCounter("BidiRun");
static bool inBidiRunDestroy;
#endif
@@ -449,7 +472,7 @@ void InlineBidiResolver::appendRun()
static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRootLineBox, bool isOnlyRun = false)
{
if (isRootLineBox)
- return toRenderBlock(obj)->createRootInlineBox();
+ return toRenderBlock(obj)->createAndAppendRootInlineBox();
if (obj->isText()) {
InlineTextBox* textBox = toRenderText(obj)->createInlineTextBox();
@@ -463,7 +486,7 @@ static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo
if (obj->isBox())
return toRenderBox(obj)->createInlineBox();
- return toRenderInline(obj)->createInlineFlowBox();
+ return toRenderInline(obj)->createAndAppendInlineFlowBox();
}
static inline void dirtyLineBoxesForRenderer(RenderObject* o, bool fullLayout)
@@ -641,7 +664,7 @@ void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox, bool
// objects horizontally. The total width of the line can be increased if we end up
// justifying text.
int x = leftOffset(height(), firstLine);
- switch(textAlign) {
+ switch (textAlign) {
case LEFT:
case WEBKIT_LEFT:
// The direction of the block should determine what happens with wide lines. In
@@ -808,7 +831,6 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
// Figure out if we should clear out our line boxes.
// FIXME: Handle resize eventually!
- // FIXME: Do something better when floats are present.
bool fullLayout = !firstLineBox() || !firstChild() || selfNeedsLayout() || relayoutChildren;
if (fullLayout)
lineBoxes()->deleteLineBoxes(renderArena());
@@ -1120,6 +1142,17 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
}
lastFloat = m_floatingObjects->last();
}
+ size_t floatCount = floats.size();
+ // Floats that did not have layout did not repaint when we laid them out. They would have
+ // painted by now if they had moved, but if they stayed at (0, 0), they still need to be
+ // painted.
+ for (size_t i = 0; i < floatCount; ++i) {
+ if (!floats[i].everHadLayout) {
+ RenderBox* f = floats[i].object;
+ if (!f->x() && !f->y() && f->checkForRepaintDuringLayout())
+ f->repaint();
+ }
+ }
}
// Now add in the bottom border/padding.
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp
index ab0d153..4db5c55 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp
@@ -1562,7 +1562,7 @@ int RenderBox::calcReplacedWidthUsing(Length width) const
default:
return intrinsicSize().width();
}
- }
+}
int RenderBox::calcReplacedHeight() const
{
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp
index 8973e64..ced5a78 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp
@@ -1124,6 +1124,9 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
{
// FIXME: Deal with border-image. Would be great to use border-image as a mask.
+ if (context->paintingDisabled())
+ return;
+
IntRect rect(tx, ty, w, h);
bool hasBorderRadius = s->hasBorderRadius();
bool hasOpaqueBackground = s->backgroundColor().isValid() && s->backgroundColor().alpha() == 255;
@@ -1134,18 +1137,16 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
int shadowBlur = shadow->blur;
IntRect fillRect(rect);
- if (hasBorderRadius) {
- IntRect shadowRect(rect);
- shadowRect.inflate(shadowBlur);
- shadowRect.move(shadowOffset);
- context->clip(shadowRect);
-
- // Move the fill just outside the clip, adding 1 pixel separation so that the fill does not
- // bleed in (due to antialiasing) if the context is transformed.
- IntSize extraOffset(w + max(0, shadowOffset.width()) + shadowBlur + 1, 0);
- shadowOffset -= extraOffset;
- fillRect.move(extraOffset);
- }
+ IntRect shadowRect(rect);
+ shadowRect.inflate(shadowBlur);
+ shadowRect.move(shadowOffset);
+ context->clip(shadowRect);
+
+ // Move the fill just outside the clip, adding 1 pixel separation so that the fill does not
+ // bleed in (due to antialiasing) if the context is transformed.
+ IntSize extraOffset(w + max(0, shadowOffset.width()) + shadowBlur + 1, 0);
+ shadowOffset -= extraOffset;
+ fillRect.move(extraOffset);
context->setShadow(shadowOffset, shadowBlur, shadow->color);
if (hasBorderRadius) {
@@ -1157,12 +1158,50 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
IntSize bottomLeft = begin ? bottomLeftRadius : IntSize();
IntSize bottomRight = end ? bottomRightRadius : IntSize();
- if (!hasOpaqueBackground)
- context->clipOutRoundedRect(rect, topLeft, topRight, bottomLeft, bottomRight);
+ IntRect rectToClipOut = rect;
+ IntSize topLeftToClipOut = topLeft;
+ IntSize topRightToClipOut = topRight;
+ IntSize bottomLeftToClipOut = bottomLeft;
+ IntSize bottomRightToClipOut = bottomRight;
+
+ // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time
+ // when painting the shadow. On the other hand, it introduces subpixel gaps along the
+ // corners. Those are avoided by insetting the clipping path by one pixel.
+ if (hasOpaqueBackground) {
+ rectToClipOut.inflate(-1);
+
+ topLeftToClipOut.expand(-1, -1);
+ topLeftToClipOut.clampNegativeToZero();
+
+ topRightToClipOut.expand(-1, -1);
+ topRightToClipOut.clampNegativeToZero();
+
+ bottomLeftToClipOut.expand(-1, -1);
+ bottomLeftToClipOut.clampNegativeToZero();
+
+ bottomRightToClipOut.expand(-1, -1);
+ bottomRightToClipOut.clampNegativeToZero();
+ }
+
+ if (!rectToClipOut.isEmpty())
+ context->clipOutRoundedRect(rectToClipOut, topLeftToClipOut, topRightToClipOut, bottomLeftToClipOut, bottomRightToClipOut);
context->fillRoundedRect(fillRect, topLeft, topRight, bottomLeft, bottomRight, Color::black);
} else {
- if (!hasOpaqueBackground)
- context->clipOut(rect);
+ IntRect rectToClipOut = rect;
+
+ // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time
+ // when painting the shadow. On the other hand, it introduces subpixel gaps along the
+ // edges if they are not pixel-aligned. Those are avoided by insetting the clipping path
+ // by one pixel.
+ if (hasOpaqueBackground) {
+ TransformationMatrix currentTransformation = context->getCTM();
+ if (currentTransformation.a() != 1 || (currentTransformation.d() != 1 && currentTransformation.d() != -1)
+ || currentTransformation.b() || currentTransformation.c())
+ rectToClipOut.inflate(-1);
+ }
+
+ if (!rectToClipOut.isEmpty())
+ context->clipOut(rectToClipOut);
context->fillRect(fillRect, Color::black);
}
context->restore();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp
index b207a31..bdf723f 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp
@@ -24,12 +24,17 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "RenderDataGrid.h"
+#include "CSSStyleSelector.h"
#include "FocusController.h"
#include "Frame.h"
#include "GraphicsContext.h"
#include "Page.h"
+#include "RenderView.h"
#include "Scrollbar.h"
using std::min;
@@ -47,6 +52,42 @@ RenderDataGrid::~RenderDataGrid()
{
}
+void RenderDataGrid::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+{
+ RenderBlock::styleDidChange(diff, oldStyle);
+ recalcStyleForColumns();
+}
+
+void RenderDataGrid::recalcStyleForColumns()
+{
+ DataGridColumnList* columns = gridElement()->columns();
+ unsigned length = columns->length();
+ for (unsigned i = 0; i < length; ++i)
+ recalcStyleForColumn(columns->item(i));
+}
+
+void RenderDataGrid::recalcStyleForColumn(DataGridColumn* column)
+{
+ if (!column->columnStyle())
+ column->setColumnStyle(document()->styleSelector()->pseudoStyleForDataGridColumn(column, style()));
+ if (!column->headerStyle())
+ column->setHeaderStyle(document()->styleSelector()->pseudoStyleForDataGridColumnHeader(column, style()));
+}
+
+RenderStyle* RenderDataGrid::columnStyle(DataGridColumn* column)
+{
+ if (!column->columnStyle())
+ recalcStyleForColumn(column);
+ return column->columnStyle();
+}
+
+RenderStyle* RenderDataGrid::headerStyle(DataGridColumn* column)
+{
+ if (!column->headerStyle())
+ recalcStyleForColumn(column);
+ return column->headerStyle();
+}
+
void RenderDataGrid::calcPrefWidths()
{
m_minPrefWidth = 0;
@@ -77,6 +118,17 @@ void RenderDataGrid::calcPrefWidths()
setPrefWidthsDirty(false);
}
+void RenderDataGrid::layout()
+{
+ RenderBlock::layout();
+ layoutColumns();
+}
+
+void RenderDataGrid::layoutColumns()
+{
+ // FIXME: Implement.
+}
+
void RenderDataGrid::paintObject(PaintInfo& paintInfo, int tx, int ty)
{
if (style()->visibility() != VISIBLE)
@@ -92,14 +144,29 @@ void RenderDataGrid::paintObject(PaintInfo& paintInfo, int tx, int ty)
paintColumnHeaders(paintInfo, tx, ty);
}
-void RenderDataGrid::paintColumnHeaders(PaintInfo&, int, int)
+void RenderDataGrid::paintColumnHeaders(PaintInfo& paintInfo, int tx, int ty)
{
- gridElement()->columns();
-
+ DataGridColumnList* columns = gridElement()->columns();
+ unsigned length = columns->length();
+ for (unsigned i = 0; i < length; ++i) {
+ DataGridColumn* column = columns->item(i);
+ RenderStyle* columnStyle = headerStyle(column);
+
+ // Don't render invisible columns.
+ if (!columnStyle || columnStyle->display() == NONE || columnStyle->visibility() != VISIBLE)
+ continue;
+
+ // Paint the column header if it intersects the dirty rect.
+ IntRect columnRect(column->rect());
+ columnRect.move(tx, ty);
+ if (columnRect.intersects(paintInfo.rect))
+ paintColumnHeader(column, paintInfo, tx, ty);
+ }
}
-void RenderDataGrid::rebuildColumns()
+void RenderDataGrid::paintColumnHeader(DataGridColumn*, PaintInfo&, int, int)
{
+ // FIXME: Implement.
}
// Scrolling implementation functions
@@ -119,4 +186,65 @@ bool RenderDataGrid::isActive() const
return page && page->focusController()->isActive();
}
+
+IntRect RenderDataGrid::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return scrollbarRect;
+
+ IntRect rect = scrollbarRect;
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ rect.move(scrollbarLeft, scrollbarTop);
+
+ return view->frameView()->convertFromRenderer(this, rect);
}
+
+IntRect RenderDataGrid::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return parentRect;
+
+ IntRect rect = view->frameView()->convertToRenderer(this, parentRect);
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ rect.move(-scrollbarLeft, -scrollbarTop);
+ return rect;
+}
+
+IntPoint RenderDataGrid::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return scrollbarPoint;
+
+ IntPoint point = scrollbarPoint;
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ point.move(scrollbarLeft, scrollbarTop);
+
+ return view->frameView()->convertFromRenderer(this, point);
+}
+
+IntPoint RenderDataGrid::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return parentPoint;
+
+ IntPoint point = view->frameView()->convertToRenderer(this, parentPoint);
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ point.move(-scrollbarLeft, -scrollbarTop);
+ return point;
+}
+
+}
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.h b/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.h
index 6a4b32e..467edcc 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.h
@@ -26,6 +26,8 @@
#ifndef RenderDataGrid_h
#define RenderDataGrid_h
+#if ENABLE(DATAGRID)
+
#include "HTMLDataGridElement.h"
#include "RenderBlock.h"
#include "ScrollbarClient.h"
@@ -41,18 +43,24 @@ public:
~RenderDataGrid();
virtual const char* renderName() const { return "RenderDataGrid"; }
-
virtual bool canHaveChildren() const { return false; }
-
virtual void calcPrefWidths();
-
+ virtual void layout();
virtual void paintObject(PaintInfo&, int tx, int ty);
void columnsChanged();
private:
+ virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
+
+ RenderStyle* columnStyle(DataGridColumn*);
+ RenderStyle* headerStyle(DataGridColumn*);
+ void recalcStyleForColumns();
+ void recalcStyleForColumn(DataGridColumn*);
+
+ void layoutColumns();
void paintColumnHeaders(PaintInfo&, int tx, int ty);
- void rebuildColumns();
+ void paintColumnHeader(DataGridColumn*, PaintInfo&, int tx, int ty);
HTMLDataGridElement* gridElement() const { return static_cast<HTMLDataGridElement*>(node()); }
@@ -61,10 +69,16 @@ private:
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
virtual bool isActive() const;
virtual bool scrollbarCornerPresent() const { return false; } // We don't support resize on data grids yet. If we did this would have to change.
+ virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
+ virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
+ virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
+ virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
RefPtr<Scrollbar> m_vBar;
};
}
+#endif
+
#endif // RenderDataGrid_h
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp
index 1275882..393c237 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp
@@ -99,7 +99,7 @@ RenderObject* RenderFieldset::layoutLegend(bool relayoutChildren)
int b = borderTop();
int h = legend->height();
legend->setLocation(xPos, max((b-h)/2, 0));
- setHeight(max(b,h) + paddingTop());
+ setHeight(max(b, h) + paddingTop());
}
return legend;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp
index 1dcef36..65990f2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp
@@ -36,7 +36,8 @@ namespace WebCore {
class FlexBoxIterator {
public:
- FlexBoxIterator(RenderFlexibleBox* parent) {
+ FlexBoxIterator(RenderFlexibleBox* parent)
+ {
box = parent;
if (box->style()->boxOrient() == HORIZONTAL && box->style()->direction() == RTL)
forward = box->style()->boxDirection() != BNORMAL;
@@ -56,17 +57,20 @@ public:
reset();
}
- void reset() {
+ void reset()
+ {
current = 0;
currentOrdinal = forward ? 0 : lastOrdinal+1;
}
- RenderBox* first() {
+ RenderBox* first()
+ {
reset();
return next();
}
- RenderBox* next() {
+ RenderBox* next()
+ {
do {
if (!current) {
if (forward) {
@@ -336,7 +340,9 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
}
child = iterator.next();
}
-
+
+ RenderBlock::startDelayUpdateScrollInfo();
+
// We do 2 passes. The first pass is simply to lay everyone out at
// their preferred widths. The second pass handles flexing the children.
do {
@@ -561,7 +567,9 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
} while (haveFlex);
m_flexingChildren = false;
-
+
+ RenderBlock::finishDelayUpdateScrollInfo();
+
if (remainingSpace > 0 && ((style()->direction() == LTR && style()->boxPack() != BSTART) ||
(style()->direction() == RTL && style()->boxPack() != BEND))) {
// Children must be repositioned.
@@ -648,7 +656,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
{
int xPos = borderLeft() + paddingLeft();
int yPos = borderTop() + paddingTop();
- if( style()->direction() == RTL )
+ if (style()->direction() == RTL)
xPos = width() - paddingRight() - borderRight();
int toAdd = borderBottom() + paddingBottom() + horizontalScrollbarHeight();
bool heightSpecified = false;
@@ -789,6 +797,8 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
}
}
+ RenderBlock::startDelayUpdateScrollInfo();
+
// We do 2 passes. The first pass is simply to lay everyone out at
// their preferred widths. The second pass handles flexing the children.
// Our first pass is done without flexing. We simply lay the children
@@ -977,6 +987,8 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
}
} while (haveFlex);
+ RenderBlock::finishDelayUpdateScrollInfo();
+
if (style()->boxPack() != BSTART && remainingSpace > 0) {
// Children must be repositioned.
int offset = 0;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.cpp
index 5995117..57c8a2f 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.cpp
@@ -65,7 +65,7 @@ inline HTMLFrameSetElement* RenderFrameSet::frameSet() const
static Color borderStartEdgeColor()
{
- return Color(170,170,170);
+ return Color(170, 170, 170);
}
static Color borderEndEdgeColor()
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h b/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h
index 294e5df..713a248 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h
@@ -32,8 +32,7 @@ class MouseEvent;
enum FrameEdge { LeftFrameEdge, RightFrameEdge, TopFrameEdge, BottomFrameEdge };
-struct FrameEdgeInfo
-{
+struct FrameEdgeInfo {
FrameEdgeInfo(bool preventResize = false, bool allowBorder = true)
: m_preventResize(4)
, m_allowBorder(4)
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderImage.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderImage.cpp
index cd84a09..559406b 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderImage.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderImage.cpp
@@ -89,8 +89,7 @@ private:
Timer<RenderImage> m_highQualityRepaintTimer;
};
-class RenderImageScaleObserver
-{
+class RenderImageScaleObserver {
public:
static bool shouldImagePaintAtLowQuality(RenderImage*, const IntSize&);
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp
index 3965d94..f798a56 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp
@@ -749,14 +749,14 @@ void RenderInline::dirtyLineBoxes(bool fullLayout)
m_lineBoxes.dirtyLineBoxes();
}
-InlineFlowBox* RenderInline::createFlowBox()
+InlineFlowBox* RenderInline::createInlineFlowBox()
{
return new (renderArena()) InlineFlowBox(this);
}
-InlineFlowBox* RenderInline::createInlineFlowBox()
+InlineFlowBox* RenderInline::createAndAppendInlineFlowBox()
{
- InlineFlowBox* flowBox = createFlowBox();
+ InlineFlowBox* flowBox = createInlineFlowBox();
m_lineBoxes.appendLineBox(flowBox);
return flowBox;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderInline.h b/src/3rdparty/webkit/WebCore/rendering/RenderInline.h
index cf6b84b..5a10068 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderInline.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderInline.h
@@ -93,7 +93,9 @@ public:
return IntRect(0, 0, boundingBox.width(), boundingBox.height());
}
- InlineFlowBox* createInlineFlowBox();
+ InlineFlowBox* createAndAppendInlineFlowBox();
+ virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby
+
void dirtyLineBoxes(bool fullLayout);
virtual void dirtyLinesFromChangedChild(RenderObject* child) { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
@@ -132,7 +134,6 @@ public:
protected:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateBoxModelInfoFromStyle();
- virtual InlineFlowBox* createFlowBox(); // Subclassed by SVG
static RenderInline* cloneInline(RenderInline* src);
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
index ba85f1a..5de1bbf 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
@@ -167,7 +167,7 @@ RenderLayer::RenderLayer(RenderBoxModelObject* renderer)
, m_has3DTransformedDescendant(false)
#if USE(ACCELERATED_COMPOSITING)
, m_hasCompositingDescendant(false)
- , m_mustOverlayCompositedLayers(false)
+ , m_mustOverlapCompositedLayers(false)
#endif
, m_marquee(0)
, m_staticX(0)
@@ -231,7 +231,7 @@ void RenderLayer::rendererContentChanged()
{
// This can get called when video becomes accelerated, so the layers may change.
if (compositor()->updateLayerCompositingState(this))
- compositor()->setCompositingLayersNeedUpdate();
+ compositor()->setCompositingLayersNeedRebuild();
if (m_backing)
m_backing->rendererContentChanged();
@@ -255,17 +255,17 @@ void RenderLayer::setStaticY(int staticY)
renderer()->setChildNeedsLayout(true, false);
}
-void RenderLayer::updateLayerPositions(bool doFullRepaint, bool checkForRepaint)
+void RenderLayer::updateLayerPositions(UpdateLayerPositionsFlags flags)
{
- if (doFullRepaint) {
+ if (flags & DoFullRepaint) {
renderer()->repaint();
#if USE(ACCELERATED_COMPOSITING)
- checkForRepaint = false;
+ flags &= ~CheckForRepaint;
// We need the full repaint to propagate to child layers if we are hardware compositing.
if (!compositor()->inCompositingMode())
- doFullRepaint = false;
+ flags &= ~DoFullRepaint;
#else
- checkForRepaint = doFullRepaint = false;
+ flags &= ~(CheckForRepaint | DoFullRepaint);
#endif
}
@@ -292,7 +292,7 @@ void RenderLayer::updateLayerPositions(bool doFullRepaint, bool checkForRepaint)
RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
IntRect newRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
IntRect newOutlineBox = renderer()->outlineBoundsForRepaint(repaintContainer);
- if (checkForRepaint) {
+ if (flags & CheckForRepaint) {
if (view && !view->printing()) {
if (m_needsFullRepaint) {
renderer()->repaintUsingContainer(repaintContainer, m_repaintRect);
@@ -316,11 +316,11 @@ void RenderLayer::updateLayerPositions(bool doFullRepaint, bool checkForRepaint)
m_reflection->layout();
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
- child->updateLayerPositions(doFullRepaint, checkForRepaint);
+ child->updateLayerPositions(flags);
#if USE(ACCELERATED_COMPOSITING)
- if (isComposited())
- backing()->updateAfterLayout();
+ if ((flags & UpdateCompositingLayers) && isComposited())
+ backing()->updateAfterLayout(RenderLayerBacking::CompositingChildren);
#endif
// With all our children positioned, now update our marquee if we need to.
@@ -328,6 +328,13 @@ void RenderLayer::updateLayerPositions(bool doFullRepaint, bool checkForRepaint)
m_marquee->updateMarqueePosition();
}
+void RenderLayer::computeRepaintRects()
+{
+ RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
+ m_repaintRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
+ m_outlineBox = renderer()->outlineBoundsForRepaint(repaintContainer);
+}
+
void RenderLayer::updateTransform()
{
// hasTransform() on the renderer is also true when there is transform-style: preserve-3d or perspective set,
@@ -453,7 +460,7 @@ void RenderLayer::updateVisibilityStatus()
else {
do {
r = r->parent();
- if (r==renderer())
+ if (r == renderer())
r = 0;
} while (r && !r->nextSibling());
if (r)
@@ -1057,14 +1064,15 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repai
m_scrollX = newScrollX;
m_scrollY = y;
- // Update the positions of our child layers.
+ // Update the positions of our child layers. Don't have updateLayerPositions() update
+ // compositing layers, because we need to do a deep update from the compositing ancestor.
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
- child->updateLayerPositions(false, false);
+ child->updateLayerPositions(0);
#if USE(ACCELERATED_COMPOSITING)
if (compositor()->inCompositingMode()) {
if (RenderLayer* compositingAncestor = ancestorCompositingLayer())
- compositingAncestor->backing()->updateAfterLayout();
+ compositingAncestor->backing()->updateAfterLayout(RenderLayerBacking::AllDescendants);
}
#endif
@@ -1423,6 +1431,66 @@ bool RenderLayer::scrollbarCornerPresent() const
return !scrollCornerRect(this, renderBox()->borderBoxRect()).isEmpty();
}
+IntRect RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
+{
+ RenderView* view = renderer()->view();
+ if (!view)
+ return scrollbarRect;
+
+ IntRect rect = scrollbarRect;
+ rect.move(scrollbarOffset(scrollbar));
+
+ return view->frameView()->convertFromRenderer(renderer(), rect);
+}
+
+IntRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
+{
+ RenderView* view = renderer()->view();
+ if (!view)
+ return parentRect;
+
+ IntRect rect = view->frameView()->convertToRenderer(renderer(), parentRect);
+ rect.move(-scrollbarOffset(scrollbar));
+ return rect;
+}
+
+IntPoint RenderLayer::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
+{
+ RenderView* view = renderer()->view();
+ if (!view)
+ return scrollbarPoint;
+
+ IntPoint point = scrollbarPoint;
+ point.move(scrollbarOffset(scrollbar));
+ return view->frameView()->convertFromRenderer(renderer(), point);
+}
+
+IntPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
+{
+ RenderView* view = renderer()->view();
+ if (!view)
+ return parentPoint;
+
+ IntPoint point = view->frameView()->convertToRenderer(renderer(), parentPoint);
+
+ point.move(-scrollbarOffset(scrollbar));
+ return point;
+}
+
+IntSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const
+{
+ RenderBox* box = renderBox();
+
+ if (scrollbar == m_vBar.get())
+ return IntSize(box->width() - box->borderRight() - scrollbar->width(), box->borderTop());
+
+ if (scrollbar == m_hBar.get())
+ return IntSize(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height());
+
+ ASSERT_NOT_REACHED();
+ return IntSize();
+}
+
void RenderLayer::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
{
IntRect scrollRect = rect;
@@ -1834,34 +1902,29 @@ bool RenderLayer::isPointInResizeControl(const IntPoint& absolutePoint) const
return resizerCornerRect(this, localBounds).contains(localPoint);
}
-bool RenderLayer::hitTestOverflowControls(HitTestResult& result)
+bool RenderLayer::hitTestOverflowControls(HitTestResult& result, const IntPoint& localPoint)
{
if (!m_hBar && !m_vBar && (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE))
return false;
RenderBox* box = renderBox();
ASSERT(box);
-
- int x = 0;
- int y = 0;
- convertToLayerCoords(root(), x, y);
- IntRect absBounds(x, y, box->width(), box->height());
IntRect resizeControlRect;
if (renderer()->style()->resize() != RESIZE_NONE) {
- resizeControlRect = resizerCornerRect(this, absBounds);
- if (resizeControlRect.contains(result.point()))
+ resizeControlRect = resizerCornerRect(this, box->borderBoxRect());
+ if (resizeControlRect.contains(localPoint))
return true;
}
int resizeControlSize = max(resizeControlRect.height(), 0);
if (m_vBar) {
- IntRect vBarRect(absBounds.right() - box->borderRight() - m_vBar->width(),
- absBounds.y() + box->borderTop(),
+ IntRect vBarRect(box->width() - box->borderRight() - m_vBar->width(),
+ box->borderTop(),
m_vBar->width(),
- absBounds.height() - (box->borderTop() + box->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize));
- if (vBarRect.contains(result.point())) {
+ box->height() - (box->borderTop() + box->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize));
+ if (vBarRect.contains(localPoint)) {
result.setScrollbar(m_vBar.get());
return true;
}
@@ -1869,11 +1932,11 @@ bool RenderLayer::hitTestOverflowControls(HitTestResult& result)
resizeControlSize = max(resizeControlRect.width(), 0);
if (m_hBar) {
- IntRect hBarRect(absBounds.x() + box->borderLeft(),
- absBounds.bottom() - box->borderBottom() - m_hBar->height(),
- absBounds.width() - (box->borderLeft() + box->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize),
+ IntRect hBarRect(box->borderLeft(),
+ box->height() - box->borderBottom() - m_hBar->height(),
+ box->width() - (box->borderLeft() + box->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize),
m_hBar->height());
- if (hBarRect.contains(result.point())) {
+ if (hBarRect.contains(localPoint)) {
result.setScrollbar(m_hBar.get());
return true;
}
@@ -2046,7 +2109,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
int ty = y - renderBoxY();
// Ensure our lists are up-to-date.
- updateLayerListsIfNeeded();
+ updateCompositingAndLayerListsIfNeeded();
bool selectionOnly = paintRestriction == PaintRestrictionSelectionOnly || paintRestriction == PaintRestrictionSelectionOnlyBlackText;
bool forceBlackText = paintRestriction == PaintRestrictionSelectionOnlyBlackText;
@@ -2336,7 +2399,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
}
// Ensure our lists and 3d status are up-to-date.
- updateLayerListsIfNeeded();
+ updateCompositingAndLayerListsIfNeeded();
update3DTransformedDescendantStatus();
RefPtr<HitTestingTransformState> localTransformState;
@@ -2574,13 +2637,13 @@ void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, ClipRects& cl
}
if (renderer()->hasOverflowClip()) {
- IntRect newOverflowClip = toRenderBox(renderer())->overflowClipRect(x,y);
+ IntRect newOverflowClip = toRenderBox(renderer())->overflowClipRect(x, y);
clipRects.setOverflowClipRect(intersection(newOverflowClip, clipRects.overflowClipRect()));
if (renderer()->isPositioned() || renderer()->isRelPositioned())
clipRects.setPosClipRect(intersection(newOverflowClip, clipRects.posClipRect()));
}
if (renderer()->hasClip()) {
- IntRect newPosClip = toRenderBox(renderer())->clipRect(x,y);
+ IntRect newPosClip = toRenderBox(renderer())->clipRect(x, y);
clipRects.setPosClipRect(intersection(newPosClip, clipRects.posClipRect()));
clipRects.setOverflowClipRect(intersection(newPosClip, clipRects.overflowClipRect()));
clipRects.setFixedClipRect(intersection(newPosClip, clipRects.fixedClipRect()));
@@ -2630,10 +2693,10 @@ void RenderLayer::calculateRects(const RenderLayer* rootLayer, const IntRect& pa
if (renderer()->hasOverflowClip() || renderer()->hasClip()) {
// This layer establishes a clip of some kind.
if (renderer()->hasOverflowClip())
- foregroundRect.intersect(toRenderBox(renderer())->overflowClipRect(x,y));
+ foregroundRect.intersect(toRenderBox(renderer())->overflowClipRect(x, y));
if (renderer()->hasClip()) {
// Clip applies to *us* as well, so go ahead and update the damageRect.
- IntRect newPosClip = toRenderBox(renderer())->clipRect(x,y);
+ IntRect newPosClip = toRenderBox(renderer())->clipRect(x, y);
backgroundRect.intersect(newPosClip);
foregroundRect.intersect(newPosClip);
outlineRect.intersect(newPosClip);
@@ -2920,7 +2983,7 @@ void RenderLayer::dirtyZOrderLists()
#if USE(ACCELERATED_COMPOSITING)
if (!renderer()->documentBeingDestroyed())
- compositor()->setCompositingLayersNeedUpdate();
+ compositor()->setCompositingLayersNeedRebuild();
#endif
}
@@ -2939,7 +3002,7 @@ void RenderLayer::dirtyNormalFlowList()
#if USE(ACCELERATED_COMPOSITING)
if (!renderer()->documentBeingDestroyed())
- compositor()->setCompositingLayersNeedUpdate();
+ compositor()->setCompositingLayersNeedRebuild();
#endif
}
@@ -3009,6 +3072,12 @@ void RenderLayer::collectLayers(Vector<RenderLayer*>*& posBuffer, Vector<RenderL
void RenderLayer::updateLayerListsIfNeeded()
{
+ updateZOrderLists();
+ updateNormalFlowList();
+}
+
+void RenderLayer::updateCompositingAndLayerListsIfNeeded()
+{
#if USE(ACCELERATED_COMPOSITING)
if (compositor()->inCompositingMode()) {
if ((isStackingContext() && m_zOrderListsDirty) || m_normalFlowListDirty)
@@ -3016,8 +3085,7 @@ void RenderLayer::updateLayerListsIfNeeded()
return;
}
#endif
- updateZOrderLists();
- updateNormalFlowList();
+ updateLayerListsIfNeeded();
}
void RenderLayer::repaintIncludingDescendants()
@@ -3129,7 +3197,7 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle*)
updateTransform();
if (compositor()->updateLayerCompositingState(this))
- compositor()->setCompositingLayersNeedUpdate();
+ compositor()->setCompositingLayersNeedRebuild();
else if (m_backing)
m_backing->updateGraphicsLayerGeometry();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h
index 4feede8..1772c66 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h
@@ -264,7 +264,7 @@ public:
void positionOverflowControls(int tx, int ty);
bool isPointInResizeControl(const IntPoint& absolutePoint) const;
- bool hitTestOverflowControls(HitTestResult&);
+ bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const;
void paintOverflowControls(GraphicsContext*, int tx, int ty, const IntRect& damageRect);
@@ -294,7 +294,14 @@ public:
bool hasAcceleratedCompositing() const;
void updateLayerPosition();
- void updateLayerPositions(bool doFullRepaint = false, bool checkForRepaint = true);
+
+ enum UpdateLayerPositionsFlag {
+ DoFullRepaint = 1,
+ CheckForRepaint = 1 << 1,
+ UpdateCompositingLayers = 1 << 2,
+ };
+ typedef unsigned UpdateLayerPositionsFlags;
+ void updateLayerPositions(UpdateLayerPositionsFlags = DoFullRepaint | UpdateCompositingLayers);
void updateTransform();
@@ -375,6 +382,7 @@ public:
// Return a cached repaint rect, computed relative to the layer renderer's containerForRepaint.
IntRect repaintRect() const { return m_repaintRect; }
+ void computeRepaintRects();
void setNeedsFullRepaint(bool f = true) { m_needsFullRepaint = f; }
int staticX() const { return m_staticX; }
@@ -441,6 +449,7 @@ private:
void collectLayers(Vector<RenderLayer*>*&, Vector<RenderLayer*>*&);
void updateLayerListsIfNeeded();
+ void updateCompositingAndLayerListsIfNeeded();
enum PaintLayerFlag {
PaintLayerHaveTransparency = 1,
@@ -469,11 +478,18 @@ private:
bool shouldBeNormalFlowOnly() const;
+ // ScrollBarClient interface
virtual void valueChanged(Scrollbar*);
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
virtual bool isActive() const;
virtual bool scrollbarCornerPresent() const;
-
+ virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
+ virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
+ virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
+ virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
+
+ IntSize scrollbarOffset(const Scrollbar*) const;
+
void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow);
void childVisibilityChanged(bool newVisibility);
@@ -509,8 +525,8 @@ private:
bool hasCompositingDescendant() const { return m_hasCompositingDescendant; }
void setHasCompositingDescendant(bool b) { m_hasCompositingDescendant = b; }
- bool mustOverlayCompositedLayers() const { return m_mustOverlayCompositedLayers; }
- void setMustOverlayCompositedLayers(bool b) { m_mustOverlayCompositedLayers = b; }
+ bool mustOverlapCompositedLayers() const { return m_mustOverlapCompositedLayers; }
+ void setMustOverlapCompositedLayers(bool b) { m_mustOverlapCompositedLayers = b; }
#endif
private:
@@ -603,7 +619,7 @@ protected:
// in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
#if USE(ACCELERATED_COMPOSITING)
bool m_hasCompositingDescendant : 1;
- bool m_mustOverlayCompositedLayers : 1;
+ bool m_mustOverlapCompositedLayers : 1;
#endif
RenderMarquee* m_marquee; // Used by layers with overflow:marquee
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.cpp
index 1c6d43c..ce0ffb1 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.cpp
@@ -126,10 +126,10 @@ void RenderLayerBacking::updateLayerTransform()
m_graphicsLayer->setTransform(t);
}
-void RenderLayerBacking::updateAfterLayout()
+void RenderLayerBacking::updateAfterLayout(UpdateDepth updateDepth)
{
RenderLayerCompositor* layerCompositor = compositor();
- if (!layerCompositor->compositingLayersNeedUpdate()) {
+ if (!layerCompositor->compositingLayersNeedRebuild()) {
// Calling updateGraphicsLayerGeometry() here gives incorrect results, because the
// position of this layer's GraphicsLayer depends on the position of our compositing
// ancestor's GraphicsLayer. That cannot be determined until all the descendant
@@ -138,10 +138,12 @@ void RenderLayerBacking::updateAfterLayout()
// The solution is to update compositing children of this layer here,
// via updateCompositingChildrenGeometry().
setCompositedBounds(layerCompositor->calculateCompositedBounds(m_owningLayer, m_owningLayer));
- layerCompositor->updateCompositingChildrenGeometry(m_owningLayer, m_owningLayer);
+ layerCompositor->updateCompositingDescendantGeometry(m_owningLayer, m_owningLayer, updateDepth);
- if (!m_owningLayer->parent())
+ if (!m_owningLayer->parent()) {
+ updateGraphicsLayerGeometry();
layerCompositor->updateRootLayerPosition();
+ }
}
}
@@ -969,7 +971,11 @@ bool RenderLayerBacking::startAnimation(double beginTime, const Animation* anim,
if (hasOpacity && m_graphicsLayer->animateFloat(AnimatedPropertyOpacity, opacityVector, anim, beginTime))
didAnimateOpacity = true;
- return didAnimateTransform && didAnimateOpacity;
+ bool runningAcceleratedAnimation = didAnimateTransform && didAnimateOpacity;
+ if (runningAcceleratedAnimation)
+ compositor()->didStartAcceleratedAnimation();
+
+ return runningAcceleratedAnimation;
}
bool RenderLayerBacking::startTransition(double beginTime, int property, const RenderStyle* fromStyle, const RenderStyle* toStyle)
@@ -1003,6 +1009,9 @@ bool RenderLayerBacking::startTransition(double beginTime, int property, const R
didAnimate = true;
}
}
+
+ if (didAnimate)
+ compositor()->didStartAcceleratedAnimation();
return didAnimate;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.h
index 50a77db..25b1a31 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayerBacking.h
@@ -53,7 +53,8 @@ public:
RenderLayer* owningLayer() const { return m_owningLayer; }
- void updateAfterLayout();
+ enum UpdateDepth { CompositingChildren, AllDescendants };
+ void updateAfterLayout(UpdateDepth);
// Returns true if layer configuration changed.
bool updateGraphicsLayerConfiguration();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.cpp
index 8b07ca9..b7bccaa 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.cpp
@@ -75,20 +75,14 @@ struct CompositingState {
#endif
};
-static TransformationMatrix flipTransform()
-{
- TransformationMatrix flipper;
- flipper.flipY();
- return flipper;
-}
-
RenderLayerCompositor::RenderLayerCompositor(RenderView* renderView)
: m_renderView(renderView)
, m_rootPlatformLayer(0)
+ , m_hasAcceleratedCompositing(true)
+ , m_compositingConsultsOverlap(true)
, m_compositing(false)
, m_rootLayerAttached(false)
- , m_compositingLayersNeedUpdate(false)
- , m_hasAcceleratedCompositing(true)
+ , m_compositingLayersNeedRebuild(false)
#if PROFILE_LAYER_REBUILD
, m_rootLayerUpdateCount(0)
#endif // PROFILE_LAYER_REBUILD
@@ -120,21 +114,21 @@ void RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag()
{
bool hasAcceleratedCompositing = false;
if (Settings* settings = m_renderView->document()->settings())
- hasAcceleratedCompositing = settings-> acceleratedCompositingEnabled();
+ hasAcceleratedCompositing = settings->acceleratedCompositingEnabled();
if (hasAcceleratedCompositing != m_hasAcceleratedCompositing)
- setCompositingLayersNeedUpdate();
+ setCompositingLayersNeedRebuild();
m_hasAcceleratedCompositing = hasAcceleratedCompositing;
}
-void RenderLayerCompositor::setCompositingLayersNeedUpdate(bool needUpdate)
+void RenderLayerCompositor::setCompositingLayersNeedRebuild(bool needRebuild)
{
if (inCompositingMode()) {
- if (!m_compositingLayersNeedUpdate && needUpdate)
+ if (!m_compositingLayersNeedRebuild && needRebuild)
scheduleViewUpdate();
- m_compositingLayersNeedUpdate = needUpdate;
+ m_compositingLayersNeedRebuild = needRebuild;
}
}
@@ -150,14 +144,17 @@ void RenderLayerCompositor::scheduleViewUpdate()
void RenderLayerCompositor::updateCompositingLayers(RenderLayer* updateRoot)
{
- if (!m_compositingLayersNeedUpdate)
+ // When m_compositingConsultsOverlap is true, then layer positions affect compositing,
+ // so we can only bail here when we're not looking at overlap.
+ if (!m_compositingLayersNeedRebuild && !m_compositingConsultsOverlap)
return;
ASSERT(inCompositingMode());
+ bool needLayerRebuild = m_compositingLayersNeedRebuild;
if (!updateRoot) {
- // Only clear the flag if we're updating the entire hierarchy
- m_compositingLayersNeedUpdate = false;
+ // Only clear the flag if we're updating the entire hierarchy.
+ m_compositingLayersNeedRebuild = false;
updateRoot = rootRenderLayer();
}
@@ -173,13 +170,20 @@ void RenderLayerCompositor::updateCompositingLayers(RenderLayer* updateRoot)
// complex.
{
CompositingState compState(updateRoot);
- computeCompositingRequirements(updateRoot, compState);
+ bool layersChanged;
+ if (m_compositingConsultsOverlap) {
+ OverlapMap overlapTestRequestMap;
+ computeCompositingRequirements(updateRoot, &overlapTestRequestMap, compState, layersChanged);
+ } else
+ computeCompositingRequirements(updateRoot, 0, compState, layersChanged);
+
+ needLayerRebuild |= layersChanged;
}
// Now create and parent the compositing layers.
{
CompositingState compState(updateRoot);
- rebuildCompositingLayerTree(updateRoot, compState);
+ rebuildCompositingLayerTree(updateRoot, compState, needLayerRebuild);
}
#if PROFILE_LAYER_REBUILD
@@ -188,7 +192,7 @@ void RenderLayerCompositor::updateCompositingLayers(RenderLayer* updateRoot)
fprintf(stderr, "Update %d: computeCompositingRequirements for the world took %fms\n",
m_rootLayerUpdateCount, 1000.0 * (endTime - startTime));
#endif
- ASSERT(updateRoot || !m_compositingLayersNeedUpdate);
+ ASSERT(updateRoot || !m_compositingLayersNeedRebuild);
if (!hasAcceleratedCompositing())
enableCompositingMode(false);
@@ -200,6 +204,11 @@ bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR
if (needsToBeComposited(layer)) {
enableCompositingMode();
+
+ // 3D transforms turn off the testing of overlap.
+ if (requiresCompositingForTransform(layer->renderer()))
+ setCompositingConsultsOverlap(false);
+
if (!layer->backing()) {
// If we need to repaint, do so before making backing
@@ -214,6 +223,10 @@ bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR
layer->clearBacking();
layerChanged = true;
+ // The layer's cached repaints rects are relative to the repaint container, so change when
+ // compositing changes; we need to update them here.
+ layer->computeRepaintRects();
+
// If we need to repaint, do so now that we've removed the backing
if (shouldRepaint == CompositingChangeRepaintNow)
repaintOnCompositingChange(layer);
@@ -261,13 +274,20 @@ void RenderLayerCompositor::repaintOnCompositingChange(RenderLayer* layer)
// RenderLayers that are rendered by the composited RenderLayer.
IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer)
{
+ if (!layer->isSelfPaintingLayer())
+ return IntRect();
+
IntRect boundingBoxRect, unionBounds;
boundingBoxRect = unionBounds = layer->localBoundingBox();
- ASSERT(layer->isStackingContext() || (!layer->m_posZOrderList || layer->m_posZOrderList->size() == 0));
+ if (layer->renderer()->hasOverflowClip() || layer->renderer()->hasMask()) {
+ int ancestorRelX = 0, ancestorRelY = 0;
+ layer->convertToLayerCoords(ancestorLayer, ancestorRelX, ancestorRelY);
+ boundingBoxRect.move(ancestorRelX, ancestorRelY);
+ return boundingBoxRect;
+ }
- if (!layer->isSelfPaintingLayer())
- return IntRect();
+ ASSERT(layer->isStackingContext() || (!layer->m_posZOrderList || layer->m_posZOrderList->size() == 0));
if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
size_t listSize = negZOrderList->size();
@@ -317,7 +337,7 @@ IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* laye
void RenderLayerCompositor::layerWasAdded(RenderLayer* /*parent*/, RenderLayer* /*child*/)
{
- setCompositingLayersNeedUpdate();
+ setCompositingLayersNeedRebuild();
}
void RenderLayerCompositor::layerWillBeRemoved(RenderLayer* parent, RenderLayer* child)
@@ -343,7 +363,7 @@ void RenderLayerCompositor::layerWillBeRemoved(RenderLayer* parent, RenderLayer*
m_renderView->frameView()->setNeedsOneShotDrawingSynchronization();
}
- setCompositingLayersNeedUpdate();
+ setCompositingLayersNeedRebuild();
}
RenderLayer* RenderLayerCompositor::enclosingNonStackingClippingLayer(const RenderLayer* layer) const
@@ -358,6 +378,31 @@ RenderLayer* RenderLayerCompositor::enclosingNonStackingClippingLayer(const Rend
return 0;
}
+void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, RenderLayer* layer, IntRect& layerBounds, bool& boundsComputed)
+{
+ if (layer->isRootLayer())
+ return;
+
+ if (!boundsComputed) {
+ layerBounds = layer->renderer()->localToAbsoluteQuad(FloatRect(layer->localBoundingBox())).enclosingBoundingBox();
+ boundsComputed = true;
+ }
+
+ overlapMap.add(layer, layerBounds);
+}
+
+bool RenderLayerCompositor::overlapsCompositedLayers(OverlapMap& overlapMap, const IntRect& layerBounds)
+{
+ RenderLayerCompositor::OverlapMap::const_iterator end = overlapMap.end();
+ for (RenderLayerCompositor::OverlapMap::const_iterator it = overlapMap.begin(); it != end; ++it) {
+ const IntRect& bounds = it->second;
+ if (layerBounds.intersects(bounds))
+ return true;
+ }
+
+ return false;
+}
+
// Recurse through the layers in z-index and overflow order (which is equivalent to painting order)
// For the z-order children of a compositing layer:
// If a child layers has a compositing layer, then all subsequent layers must
@@ -367,7 +412,7 @@ RenderLayer* RenderLayerCompositor::enclosingNonStackingClippingLayer(const Rend
// must be compositing so that its contents render over that child.
// This implies that its positive z-index children must also be compositing.
//
-void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, struct CompositingState& compositingState)
+void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, OverlapMap* overlapMap, struct CompositingState& compositingState, bool& layersChanged)
{
layer->updateLayerPosition();
layer->updateZOrderLists();
@@ -375,7 +420,19 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
// Clear the flag
layer->setHasCompositingDescendant(false);
- layer->setMustOverlayCompositedLayers(compositingState.m_subtreeIsCompositing);
+
+ bool mustOverlapCompositedLayers = compositingState.m_subtreeIsCompositing;
+
+ bool haveComputedBounds = false;
+ IntRect absBounds;
+ if (overlapMap && mustOverlapCompositedLayers) {
+ // If we're testing for overlap, we only need to composite if we overlap something that is already composited.
+ absBounds = layer->renderer()->localToAbsoluteQuad(FloatRect(layer->localBoundingBox())).enclosingBoundingBox();
+ haveComputedBounds = true;
+ mustOverlapCompositedLayers &= overlapsCompositedLayers(*overlapMap, absBounds);
+ }
+
+ layer->setMustOverlapCompositedLayers(mustOverlapCompositedLayers);
// The children of this layer don't need to composite, unless there is
// a compositing layer among them, so start by inheriting the compositing
@@ -391,6 +448,8 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
compositingState.m_subtreeIsCompositing = true;
// This layer now acts as the ancestor for kids.
childState.m_compositingAncestor = layer;
+ if (overlapMap)
+ addToOverlapMap(*overlapMap, layer, absBounds, haveComputedBounds);
}
#if ENABLE(VIDEO)
@@ -407,14 +466,16 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i);
- computeCompositingRequirements(curLayer, childState);
+ computeCompositingRequirements(curLayer, overlapMap, childState, layersChanged);
// If we have to make a layer for this child, make one now so we can have a contents layer
// (since we need to ensure that the -ve z-order child renders underneath our contents).
if (childState.m_subtreeIsCompositing) {
// make layer compositing
- layer->setMustOverlayCompositedLayers(true);
+ layer->setMustOverlapCompositedLayers(true);
childState.m_compositingAncestor = layer;
+ if (overlapMap)
+ addToOverlapMap(*overlapMap, layer, absBounds, haveComputedBounds);
}
}
}
@@ -425,7 +486,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = normalFlowList->at(i);
- computeCompositingRequirements(curLayer, childState);
+ computeCompositingRequirements(curLayer, overlapMap, childState, layersChanged);
}
}
@@ -434,7 +495,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i);
- computeCompositingRequirements(curLayer, childState);
+ computeCompositingRequirements(curLayer, overlapMap, childState, layersChanged);
}
}
}
@@ -443,8 +504,11 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
// be composited. Also, if we have opacity < 1, then we need to be a layer so that
// the child layers are opaque, then rendered with opacity on this layer.
if (childState.m_subtreeIsCompositing &&
- (layer->renderer()->hasTransform() || layer->renderer()->style()->opacity() < 1))
- layer->setMustOverlayCompositedLayers(true);
+ (layer->renderer()->hasTransform() || layer->renderer()->style()->opacity() < 1)) {
+ layer->setMustOverlapCompositedLayers(true);
+ if (overlapMap)
+ addToOverlapMap(*overlapMap, layer, absBounds, haveComputedBounds);
+ }
// Subsequent layers in the parent stacking context also need to composite.
if (childState.m_subtreeIsCompositing)
@@ -460,7 +524,8 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, s
layer->setHasCompositingDescendant(childState.m_subtreeIsCompositing);
// Update backing now, so that we can use isComposited() reliably during tree traversal in rebuildCompositingLayerTree().
- updateBacking(layer, CompositingChangeRepaintNow);
+ if (updateBacking(layer, CompositingChangeRepaintNow))
+ layersChanged = true;
}
void RenderLayerCompositor::setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
@@ -515,7 +580,7 @@ bool RenderLayerCompositor::canAccelerateVideoRendering(RenderVideo* o) const
}
#endif
-void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, struct CompositingState& compositingState)
+void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, struct CompositingState& compositingState, bool updateHierarchy)
{
// Make the layer compositing if necessary, and set up clipping and content layers.
// Note that we can only do work here that is independent of whether the descendant layers
@@ -533,11 +598,12 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, stru
updateRootLayerPosition();
// FIXME: make this more incremental
- layerBacking->parentForSublayers()->removeAllChildren();
+ if (updateHierarchy)
+ layerBacking->parentForSublayers()->removeAllChildren();
}
// host the document layer in the RenderView's root layer
- if (layer->isRootLayer() && layer->isComposited())
+ if (updateHierarchy && layer->isRootLayer() && layer->isComposited())
parentInRootLayer(layer);
CompositingState childState = compositingState;
@@ -559,13 +625,13 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, stru
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i);
- rebuildCompositingLayerTree(curLayer, childState);
- if (curLayer->isComposited())
+ rebuildCompositingLayerTree(curLayer, childState, updateHierarchy);
+ if (updateHierarchy && curLayer->isComposited())
setCompositingParent(curLayer, childState.m_compositingAncestor);
}
}
- if (layerBacking && layerBacking->contentsLayer()) {
+ if (updateHierarchy && layerBacking && layerBacking->contentsLayer()) {
// we only have a contents layer if we have an m_layer
layerBacking->contentsLayer()->removeFromParent();
@@ -579,8 +645,8 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, stru
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = normalFlowList->at(i);
- rebuildCompositingLayerTree(curLayer, childState);
- if (curLayer->isComposited())
+ rebuildCompositingLayerTree(curLayer, childState, updateHierarchy);
+ if (updateHierarchy && curLayer->isComposited())
setCompositingParent(curLayer, childState.m_compositingAncestor);
}
}
@@ -590,8 +656,8 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, stru
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i);
- rebuildCompositingLayerTree(curLayer, childState);
- if (curLayer->isComposited())
+ rebuildCompositingLayerTree(curLayer, childState, updateHierarchy);
+ if (updateHierarchy && curLayer->isComposited())
setCompositingParent(curLayer, childState.m_compositingAncestor);
}
}
@@ -600,13 +666,14 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, stru
// Recurs down the RenderLayer tree until its finds the compositing descendants of compositingAncestor and updates their geometry.
-void RenderLayerCompositor::updateCompositingChildrenGeometry(RenderLayer* compositingAncestor, RenderLayer* layer)
+void RenderLayerCompositor::updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, RenderLayer* layer, RenderLayerBacking::UpdateDepth updateDepth)
{
if (layer != compositingAncestor) {
if (RenderLayerBacking* layerBacking = layer->backing()) {
layerBacking->setCompositedBounds(calculateCompositedBounds(layer, layer));
layerBacking->updateGraphicsLayerGeometry();
- return;
+ if (updateDepth == RenderLayerBacking::CompositingChildren)
+ return;
}
}
@@ -617,21 +684,21 @@ void RenderLayerCompositor::updateCompositingChildrenGeometry(RenderLayer* compo
if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i)
- updateCompositingChildrenGeometry(compositingAncestor, negZOrderList->at(i));
+ updateCompositingDescendantGeometry(compositingAncestor, negZOrderList->at(i), updateDepth);
}
}
if (Vector<RenderLayer*>* normalFlowList = layer->normalFlowList()) {
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i)
- updateCompositingChildrenGeometry(compositingAncestor, normalFlowList->at(i));
+ updateCompositingDescendantGeometry(compositingAncestor, normalFlowList->at(i), updateDepth);
}
if (layer->isStackingContext()) {
if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i)
- updateCompositingChildrenGeometry(compositingAncestor, posZOrderList->at(i));
+ updateCompositingDescendantGeometry(compositingAncestor, posZOrderList->at(i), updateDepth);
}
}
}
@@ -729,6 +796,14 @@ void RenderLayerCompositor::updateRootLayerPosition()
m_rootPlatformLayer->setSize(FloatSize(m_renderView->overflowWidth(), m_renderView->overflowHeight()));
}
+void RenderLayerCompositor::didStartAcceleratedAnimation()
+{
+ // If an accelerated animation or transition runs, we have to turn off overlap checking because
+ // we don't do layout for every frame, but we have to ensure that the layering is
+ // correct between the animating object and other objects on the page.
+ setCompositingConsultsOverlap(false);
+}
+
bool RenderLayerCompositor::has3DContent() const
{
return layerHas3DContent(rootRenderLayer());
@@ -739,7 +814,7 @@ bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer) const
if (!m_hasAcceleratedCompositing || !layer->isSelfPaintingLayer())
return false;
- return requiresCompositingLayer(layer) || layer->mustOverlayCompositedLayers();
+ return requiresCompositingLayer(layer) || layer->mustOverlapCompositedLayers();
}
// Note: this specifies whether the RL needs a compositing layer for intrinsic reasons.
@@ -847,9 +922,8 @@ void RenderLayerCompositor::ensureRootPlatformLayer()
m_rootPlatformLayer = GraphicsLayer::createGraphicsLayer(0);
m_rootPlatformLayer->setSize(FloatSize(m_renderView->overflowWidth(), m_renderView->overflowHeight()));
m_rootPlatformLayer->setPosition(FloatPoint(0, 0));
-
- if (GraphicsLayer::compositingCoordinatesOrientation() == GraphicsLayer::CompositingCoordinatesBottomUp)
- m_rootPlatformLayer->setChildrenTransform(flipTransform());
+ // The root layer does flipping if we need it on this platform.
+ m_rootPlatformLayer->setGeometryOrientation(GraphicsLayer::compositingCoordinatesOrientation());
// Need to clip to prevent transformed content showing outside this frame
m_rootPlatformLayer->setMasksToBounds(true);
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.h
index bcd6a3f..778eccc 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayerCompositor.h
@@ -27,6 +27,7 @@
#define RenderLayerCompositor_h
#include "RenderLayer.h"
+#include "RenderLayerBacking.h"
namespace WebCore {
@@ -63,9 +64,16 @@ public:
// Copy the acceleratedCompositingEnabledFlag from Settings
void cacheAcceleratedCompositingEnabledFlag();
- void setCompositingLayersNeedUpdate(bool needUpdate = true);
- bool compositingLayersNeedUpdate() const { return m_compositingLayersNeedUpdate; }
+ // Called when the layer hierarchy needs to be udpated (compositing layers have been
+ // created, destroyed or re-parented).
+ void setCompositingLayersNeedRebuild(bool needRebuild = true);
+ bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRebuild; }
+ // Controls whether or not to consult geometry when deciding which layers need
+ // to be composited. Defaults to true.
+ void setCompositingConsultsOverlap(bool b) { m_compositingConsultsOverlap = b; }
+ bool compositingConsultsOverlap() const { return m_compositingConsultsOverlap; }
+
void scheduleViewUpdate();
// Rebuild the tree of compositing layers
@@ -76,7 +84,7 @@ public:
bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = CompositingChangeRepaintNow);
// Update the geometry for compositing children of compositingAncestor.
- void updateCompositingChildrenGeometry(RenderLayer* compositingAncestor, RenderLayer* layer);
+ void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, RenderLayer* layer, RenderLayerBacking::UpdateDepth);
// Whether layer's backing needs a graphics layer to do clipping by an ancestor (non-stacking-context parent with overflow).
bool clippedByAncestor(RenderLayer*) const;
@@ -110,6 +118,8 @@ public:
void updateRootLayerPosition();
+ void didStartAcceleratedAnimation();
+
#if ENABLE(VIDEO)
// Use by RenderVideo to ask if it should try to use accelerated compositing.
bool canAccelerateVideoRendering(RenderVideo*) const;
@@ -131,8 +141,13 @@ private:
// Repaint the given rect (which is layer's coords), and regions of child layers that intersect that rect.
void recursiveRepaintLayerRect(RenderLayer* layer, const IntRect& rect);
- void computeCompositingRequirements(RenderLayer*, struct CompositingState&);
- void rebuildCompositingLayerTree(RenderLayer* layer, struct CompositingState&);
+ typedef HashMap<RenderLayer*, IntRect> OverlapMap;
+ static void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
+ static bool overlapsCompositedLayers(OverlapMap&, const IntRect& layerBounds);
+
+ // Returns true if any layer's compositing changed
+ void computeCompositingRequirements(RenderLayer*, OverlapMap*, struct CompositingState&, bool& layersChanged);
+ void rebuildCompositingLayerTree(RenderLayer* layer, struct CompositingState&, bool updateHierarchy);
// Hook compositing layers together
void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer);
@@ -153,10 +168,11 @@ private:
private:
RenderView* m_renderView;
GraphicsLayer* m_rootPlatformLayer;
+ bool m_hasAcceleratedCompositing;
+ bool m_compositingConsultsOverlap;
bool m_compositing;
bool m_rootLayerAttached;
- bool m_compositingLayersNeedUpdate;
- bool m_hasAcceleratedCompositing;
+ bool m_compositingLayersNeedRebuild;
#if PROFILE_LAYER_REBUILD
int m_rootLayerUpdateCount;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderListBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderListBox.cpp
index 83c569e..e6c28f7 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderListBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderListBox.cpp
@@ -370,7 +370,7 @@ bool RenderListBox::isPointInOverflowControl(HitTestResult& result, int _x, int
return false;
IntRect vertRect(_tx + width() - borderRight() - m_vBar->width(),
- _ty,
+ _ty + borderTop(),
m_vBar->width(),
height() - borderTop() - borderBottom());
@@ -416,22 +416,22 @@ void RenderListBox::panScroll(const IntPoint& panStartMousePosition)
int yDelta = currentMousePosition.y() - panStartMousePosition.y();
- // If the point is too far from the center we limit the speed
+ // If the point is too far from the center we limit the speed
yDelta = max(min(yDelta, maxSpeed), -maxSpeed);
- if(abs(yDelta) < iconRadius) // at the center we let the space for the icon
+ if (abs(yDelta) < iconRadius) // at the center we let the space for the icon
return;
if (yDelta > 0)
//offsetY = view()->viewHeight();
absOffset.move(0, listHeight());
- else if (yDelta < 0)
- yDelta--;
+ else if (yDelta < 0)
+ yDelta--;
// Let's attenuate the speed
yDelta /= speedReducer;
- IntPoint scrollPoint(0,0);
+ IntPoint scrollPoint(0, 0);
scrollPoint.setY(absOffset.y() + yDelta);
int newOffset = scrollToward(scrollPoint);
if (newOffset < 0)
@@ -623,6 +623,64 @@ void RenderListBox::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect&
repaintRectangle(scrollRect);
}
+IntRect RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& scrollbarRect) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return scrollbarRect;
+
+ IntRect rect = scrollbarRect;
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ rect.move(scrollbarLeft, scrollbarTop);
+
+ return view->frameView()->convertFromRenderer(this, rect);
+}
+
+IntRect RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return parentRect;
+
+ IntRect rect = view->frameView()->convertToRenderer(this, parentRect);
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ rect.move(-scrollbarLeft, -scrollbarTop);
+ return rect;
+}
+
+IntPoint RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return scrollbarPoint;
+
+ IntPoint point = scrollbarPoint;
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ point.move(scrollbarLeft, scrollbarTop);
+
+ return view->frameView()->convertFromRenderer(this, point);
+}
+
+IntPoint RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
+{
+ RenderView* view = this->view();
+ if (!view)
+ return parentPoint;
+
+ IntPoint point = view->frameView()->convertToRenderer(this, parentPoint);
+
+ int scrollbarLeft = width() - borderRight() - scrollbar->width();
+ int scrollbarTop = borderTop();
+ point.move(-scrollbarLeft, -scrollbarTop);
+ return point;
+}
+
PassRefPtr<Scrollbar> RenderListBox::createScrollbar()
{
RefPtr<Scrollbar> widget;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderListBox.h b/src/3rdparty/webkit/WebCore/rendering/RenderListBox.h
index b8c0540..dd257a8 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderListBox.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderListBox.h
@@ -101,6 +101,10 @@ private:
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
virtual bool isActive() const;
virtual bool scrollbarCornerPresent() const { return false; } // We don't support resize on list boxes yet. If we did this would have to change.
+ virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
+ virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
+ virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
+ virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
void setHasVerticalScrollbar(bool hasScrollbar);
PassRefPtr<Scrollbar> createScrollbar();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderMarquee.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderMarquee.cpp
index 48659f7..31a8305 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderMarquee.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderMarquee.cpp
@@ -235,7 +235,7 @@ void RenderMarquee::updateMarqueeStyle()
// to a marquee of 200px.
if (isHorizontal()) {
if (s->height().isFixed() && s->height().value() < s->fontSize())
- s->setHeight(Length(s->fontSize(),Fixed));
+ s->setHeight(Length(s->fontSize(), Fixed));
} else if (s->height().isAuto()) //vertical marquee with no specified height
s->setHeight(Length(200, Fixed));
@@ -309,4 +309,3 @@ void RenderMarquee::timerFired(Timer<RenderMarquee>*)
}
} // namespace WebCore
-
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderMedia.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderMedia.cpp
index b0eb097..b87e99d 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderMedia.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderMedia.cpp
@@ -45,7 +45,8 @@ using namespace HTMLNames;
static const double cTimeUpdateRepeatDelay = 0.2;
static const double cOpacityAnimationRepeatDelay = 0.05;
// FIXME get this from style
-static const double cOpacityAnimationDuration = 0.1;
+static const double cOpacityAnimationDurationFadeIn = 0.1;
+static const double cOpacityAnimationDurationFadeOut = 0.3;
RenderMedia::RenderMedia(HTMLMediaElement* video)
: RenderReplaced(video)
@@ -53,9 +54,9 @@ RenderMedia::RenderMedia(HTMLMediaElement* video)
, m_opacityAnimationTimer(this, &RenderMedia::opacityAnimationTimerFired)
, m_mouseOver(false)
, m_opacityAnimationStartTime(0)
+ , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
- , m_previousVisible(VISIBLE)
{
}
@@ -65,6 +66,7 @@ RenderMedia::RenderMedia(HTMLMediaElement* video, const IntSize& intrinsicSize)
, m_opacityAnimationTimer(this, &RenderMedia::opacityAnimationTimerFired)
, m_mouseOver(false)
, m_opacityAnimationStartTime(0)
+ , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
@@ -104,20 +106,32 @@ void RenderMedia::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
RenderReplaced::styleDidChange(diff, oldStyle);
if (m_controlsShadowRoot) {
- if (m_panel->renderer())
- m_panel->renderer()->setStyle(getCachedPseudoStyle(MEDIA_CONTROLS_PANEL));
-
- if (m_timelineContainer->renderer())
- m_timelineContainer->renderer()->setStyle(getCachedPseudoStyle(MEDIA_CONTROLS_TIMELINE_CONTAINER));
-
- m_muteButton->updateStyle();
- m_playButton->updateStyle();
- m_seekBackButton->updateStyle();
- m_seekForwardButton->updateStyle();
- m_timeline->updateStyle();
- m_fullscreenButton->updateStyle();
- m_currentTimeDisplay->updateStyle();
- m_timeRemainingDisplay->updateStyle();
+ if (m_panel)
+ m_panel->updateStyle();
+ if (m_muteButton)
+ m_muteButton->updateStyle();
+ if (m_playButton)
+ m_playButton->updateStyle();
+ if (m_seekBackButton)
+ m_seekBackButton->updateStyle();
+ if (m_seekForwardButton)
+ m_seekForwardButton->updateStyle();
+ if (m_rewindButton)
+ m_rewindButton->updateStyle();
+ if (m_returnToRealtimeButton)
+ m_returnToRealtimeButton->updateStyle();
+ if (m_statusDisplay)
+ m_statusDisplay->updateStyle();
+ if (m_timelineContainer)
+ m_timelineContainer->updateStyle();
+ if (m_timeline)
+ m_timeline->updateStyle();
+ if (m_fullscreenButton)
+ m_fullscreenButton->updateStyle();
+ if (m_currentTimeDisplay)
+ m_currentTimeDisplay->updateStyle();
+ if (m_timeRemainingDisplay)
+ m_timeRemainingDisplay->updateStyle();
}
}
@@ -132,6 +146,13 @@ void RenderMedia::layout()
return;
IntSize newSize = contentBoxRect().size();
if (newSize != oldSize || controlsRenderer->needsLayout()) {
+
+ if (m_currentTimeDisplay && m_timeRemainingDisplay) {
+ bool shouldShowTimeDisplays = shouldShowTimeDisplayControls();
+ m_currentTimeDisplay->setVisible(shouldShowTimeDisplays);
+ m_timeRemainingDisplay->setVisible(shouldShowTimeDisplays);
+ }
+
controlsRenderer->setLocation(borderLeft() + paddingLeft(), borderTop() + paddingTop());
controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed));
controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed));
@@ -151,17 +172,8 @@ void RenderMedia::createControlsShadowRoot()
void RenderMedia::createPanel()
{
ASSERT(!m_panel);
- RenderStyle* style = getCachedPseudoStyle(MEDIA_CONTROLS_PANEL);
- m_panel = new HTMLDivElement(HTMLNames::divTag, document());
- RenderObject* renderer = m_panel->createRenderer(renderArena(), style);
- if (renderer) {
- m_panel->setRenderer(renderer);
- renderer->setStyle(style);
- m_panel->setAttached();
- m_panel->setInDocument(true);
- m_controlsShadowRoot->addChild(m_panel);
- m_controlsShadowRoot->renderer()->addChild(renderer);
- }
+ m_panel = new MediaControlElement(document(), MEDIA_CONTROLS_PANEL, mediaElement());
+ m_panel->attachToParent(m_controlsShadowRoot.get());
}
void RenderMedia::createMuteButton()
@@ -192,20 +204,32 @@ void RenderMedia::createSeekForwardButton()
m_seekForwardButton->attachToParent(m_panel.get());
}
+void RenderMedia::createRewindButton()
+{
+ ASSERT(!m_rewindButton);
+ m_rewindButton = new MediaControlRewindButtonElement(document(), mediaElement());
+ m_rewindButton->attachToParent(m_panel.get());
+}
+
+void RenderMedia::createReturnToRealtimeButton()
+{
+ ASSERT(!m_returnToRealtimeButton);
+ m_returnToRealtimeButton = new MediaControlReturnToRealtimeButtonElement(document(), mediaElement());
+ m_returnToRealtimeButton->attachToParent(m_panel.get());
+}
+
+void RenderMedia::createStatusDisplay()
+{
+ ASSERT(!m_statusDisplay);
+ m_statusDisplay = new MediaControlStatusDisplayElement(document(), mediaElement());
+ m_statusDisplay->attachToParent(m_panel.get());
+}
+
void RenderMedia::createTimelineContainer()
{
ASSERT(!m_timelineContainer);
- RenderStyle* style = getCachedPseudoStyle(MEDIA_CONTROLS_TIMELINE_CONTAINER);
- m_timelineContainer = new HTMLDivElement(HTMLNames::divTag, document());
- RenderObject* renderer = m_timelineContainer->createRenderer(renderArena(), style);
- if (renderer) {
- m_timelineContainer->setRenderer(renderer);
- renderer->setStyle(style);
- m_timelineContainer->setAttached();
- m_timelineContainer->setInDocument(true);
- m_panel->addChild(m_timelineContainer);
- m_panel->renderer()->addChild(renderer);
- }
+ m_timelineContainer = new MediaControlTimelineContainerElement(document(), mediaElement());
+ m_timelineContainer->attachToParent(m_panel.get());
}
void RenderMedia::createTimeline()
@@ -215,18 +239,18 @@ void RenderMedia::createTimeline()
m_timeline->setAttribute(precisionAttr, "float");
m_timeline->attachToParent(m_timelineContainer.get());
}
-
+
void RenderMedia::createCurrentTimeDisplay()
{
ASSERT(!m_currentTimeDisplay);
- m_currentTimeDisplay = new MediaTimeDisplayElement(document(), mediaElement(), true);
+ m_currentTimeDisplay = new MediaControlTimeDisplayElement(document(), MEDIA_CONTROLS_CURRENT_TIME_DISPLAY, mediaElement());
m_currentTimeDisplay->attachToParent(m_timelineContainer.get());
}
void RenderMedia::createTimeRemainingDisplay()
{
ASSERT(!m_timeRemainingDisplay);
- m_timeRemainingDisplay = new MediaTimeDisplayElement(document(), mediaElement(), false);
+ m_timeRemainingDisplay = new MediaControlTimeDisplayElement(document(), MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, mediaElement());
m_timeRemainingDisplay->attachToParent(m_timelineContainer.get());
}
@@ -251,10 +275,13 @@ void RenderMedia::updateControls()
m_panel = 0;
m_muteButton = 0;
m_playButton = 0;
+ m_statusDisplay = 0;
m_timelineContainer = 0;
m_timeline = 0;
m_seekBackButton = 0;
m_seekForwardButton = 0;
+ m_rewindButton = 0;
+ m_returnToRealtimeButton = 0;
m_currentTimeDisplay = 0;
m_timeRemainingDisplay = 0;
m_fullscreenButton = 0;
@@ -269,34 +296,46 @@ void RenderMedia::updateControls()
if (!m_controlsShadowRoot) {
createControlsShadowRoot();
createPanel();
- if (m_panel && m_panel->renderer()) {
+ if (m_panel) {
+ createRewindButton();
createMuteButton();
createPlayButton();
+ createReturnToRealtimeButton();
+ createStatusDisplay();
createTimelineContainer();
createSeekBackButton();
createSeekForwardButton();
- createFullscreenButton();
- }
- if (m_timelineContainer && m_timelineContainer->renderer()) {
- createCurrentTimeDisplay();
- createTimeline();
- createTimeRemainingDisplay();
+ createFullscreenButton();
+ if (m_timelineContainer) {
+ createCurrentTimeDisplay();
+ createTimeline();
+ createTimeRemainingDisplay();
+ }
+ m_panel->attach();
}
}
if (media->canPlay()) {
if (m_timeUpdateTimer.isActive())
m_timeUpdateTimer.stop();
- } else if (style()->visibility() == VISIBLE && m_timeline && m_timeline->renderer() && m_timeline->renderer()->style()->display() != NONE ) {
+ } else if (style()->visibility() == VISIBLE && m_timeline && m_timeline->renderer() && m_timeline->renderer()->style()->display() != NONE) {
m_timeUpdateTimer.startRepeating(cTimeUpdateRepeatDelay);
}
- m_previousVisible = style()->visibility();
+ if (m_panel) {
+ // update() might alter the opacity of the element, especially if we are in the middle
+ // of an animation. This is the only element concerned as we animate only this element.
+ float opacityBeforeChangingStyle = m_panel->renderer() ? m_panel->renderer()->style()->opacity() : 0;
+ m_panel->update();
+ changeOpacity(m_panel.get(), opacityBeforeChangingStyle);
+ }
if (m_muteButton)
m_muteButton->update();
if (m_playButton)
m_playButton->update();
+ if (m_timelineContainer)
+ m_timelineContainer->update();
if (m_timeline)
m_timeline->update();
if (m_currentTimeDisplay)
@@ -307,8 +346,15 @@ void RenderMedia::updateControls()
m_seekBackButton->update();
if (m_seekForwardButton)
m_seekForwardButton->update();
+ if (m_rewindButton)
+ m_rewindButton->update();
+ if (m_returnToRealtimeButton)
+ m_returnToRealtimeButton->update();
+ if (m_statusDisplay)
+ m_statusDisplay->update();
if (m_fullscreenButton)
m_fullscreenButton->update();
+
updateTimeDisplay();
updateControlVisibility();
}
@@ -363,26 +409,34 @@ void RenderMedia::updateControlVisibility()
if (!media->hasVideo())
return;
- // do fading manually, css animations don't work well with shadow trees
- bool visible = style()->visibility() == VISIBLE && (m_mouseOver || media->canPlay());
- if (visible == (m_opacityAnimationTo > 0))
+ // Don't fade if the media element is not visible
+ if (style()->visibility() != VISIBLE)
return;
+
+ bool shouldHideController = !m_mouseOver && !media->canPlay();
+
+ // Do fading manually, css animations don't work with shadow trees
- if (style()->visibility() != m_previousVisible) {
- // don't fade gradually if it the element has just changed visibility
- m_previousVisible = style()->visibility();
- m_opacityAnimationTo = m_previousVisible == VISIBLE ? 1.0f : 0;
- changeOpacity(m_panel.get(), m_opacityAnimationTo);
+ float animateFrom = m_panel->renderer()->style()->opacity();
+ float animateTo = shouldHideController ? 0.0f : 1.0f;
+
+ if (animateFrom == animateTo)
return;
- }
- if (visible) {
- m_opacityAnimationFrom = m_panel->renderer()->style()->opacity();
- m_opacityAnimationTo = 1.0f;
- } else {
- m_opacityAnimationFrom = m_panel->renderer()->style()->opacity();
- m_opacityAnimationTo = 0;
+ if (m_opacityAnimationTimer.isActive()) {
+ if (m_opacityAnimationTo == animateTo)
+ return;
+ m_opacityAnimationTimer.stop();
}
+
+ if (animateFrom < animateTo)
+ m_opacityAnimationDuration = cOpacityAnimationDurationFadeIn;
+ else
+ m_opacityAnimationDuration = cOpacityAnimationDurationFadeOut;
+
+ m_opacityAnimationFrom = animateFrom;
+ m_opacityAnimationTo = animateTo;
+
m_opacityAnimationStartTime = currentTime();
m_opacityAnimationTimer.startRepeating(cOpacityAnimationRepeatDelay);
}
@@ -401,11 +455,11 @@ void RenderMedia::changeOpacity(HTMLElement* e, float opacity)
void RenderMedia::opacityAnimationTimerFired(Timer<RenderMedia>*)
{
double time = currentTime() - m_opacityAnimationStartTime;
- if (time >= cOpacityAnimationDuration) {
- time = cOpacityAnimationDuration;
+ if (time >= m_opacityAnimationDuration) {
+ time = m_opacityAnimationDuration;
m_opacityAnimationTimer.stop();
}
- float opacity = narrowPrecisionToFloat(m_opacityAnimationFrom + (m_opacityAnimationTo - m_opacityAnimationFrom) * time / cOpacityAnimationDuration);
+ float opacity = narrowPrecisionToFloat(m_opacityAnimationFrom + (m_opacityAnimationTo - m_opacityAnimationFrom) * time / m_opacityAnimationDuration);
changeOpacity(m_panel.get(), opacity);
}
@@ -426,6 +480,12 @@ void RenderMedia::forwardEvent(Event* event)
if (m_seekForwardButton && m_seekForwardButton->hitTest(point))
m_seekForwardButton->defaultEventHandler(event);
+ if (m_rewindButton && m_rewindButton->hitTest(point))
+ m_rewindButton->defaultEventHandler(event);
+
+ if (m_returnToRealtimeButton && m_returnToRealtimeButton->hitTest(point))
+ m_returnToRealtimeButton->defaultEventHandler(event);
+
if (m_timeline && m_timeline->hitTest(point))
m_timeline->defaultEventHandler(event);
@@ -473,6 +533,19 @@ int RenderMedia::leftmostPosition(bool includeOverflowInterior, bool includeSelf
return min(left, m_controlsShadowRoot->renderBox()->x() + m_controlsShadowRoot->renderBox()->leftmostPosition(includeOverflowInterior, includeSelf));
}
+
+// We want the timeline slider to be at least 100 pixels wide.
+static const int minWidthToDisplayTimeDisplays = 16 + 16 + 45 + 100 + 45 + 16 + 1;
+
+bool RenderMedia::shouldShowTimeDisplayControls() const
+{
+ if (!m_currentTimeDisplay && !m_timeRemainingDisplay)
+ return false;
+
+ int width = mediaElement()->renderBox()->width();
+ return width >= minWidthToDisplayTimeDisplays * style()->effectiveZoom();
+}
+
} // namespace WebCore
#endif
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderMedia.h b/src/3rdparty/webkit/WebCore/rendering/RenderMedia.h
index 6013d7b..e1149bb 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderMedia.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderMedia.h
@@ -38,9 +38,14 @@ class HTMLMediaElement;
class MediaControlMuteButtonElement;
class MediaControlPlayButtonElement;
class MediaControlSeekButtonElement;
+class MediaControlRewindButtonElement;
+class MediaControlReturnToRealtimeButtonElement;
class MediaControlTimelineElement;
class MediaControlFullscreenButtonElement;
-class MediaTimeDisplayElement;
+class MediaControlTimeDisplayElement;
+class MediaControlStatusDisplayElement;
+class MediaControlTimelineContainerElement;
+class MediaControlElement;
class MediaPlayer;
class RenderMedia : public RenderReplaced {
@@ -66,6 +71,8 @@ public:
static String formatTime(float time);
+ bool shouldShowTimeDisplayControls() const;
+
void updateFromElement();
void updatePlayer();
void updateControls();
@@ -85,6 +92,9 @@ private:
void createPlayButton();
void createSeekBackButton();
void createSeekForwardButton();
+ void createRewindButton();
+ void createReturnToRealtimeButton();
+ void createStatusDisplay();
void createTimelineContainer();
void createTimeline();
void createCurrentTimeDisplay();
@@ -100,16 +110,19 @@ private:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
RefPtr<HTMLElement> m_controlsShadowRoot;
- RefPtr<HTMLElement> m_panel;
+ RefPtr<MediaControlElement> m_panel;
RefPtr<MediaControlMuteButtonElement> m_muteButton;
RefPtr<MediaControlPlayButtonElement> m_playButton;
RefPtr<MediaControlSeekButtonElement> m_seekBackButton;
RefPtr<MediaControlSeekButtonElement> m_seekForwardButton;
+ RefPtr<MediaControlRewindButtonElement> m_rewindButton;
+ RefPtr<MediaControlReturnToRealtimeButtonElement> m_returnToRealtimeButton;
RefPtr<MediaControlTimelineElement> m_timeline;
RefPtr<MediaControlFullscreenButtonElement> m_fullscreenButton;
- RefPtr<HTMLElement> m_timelineContainer;
- RefPtr<MediaTimeDisplayElement> m_currentTimeDisplay;
- RefPtr<MediaTimeDisplayElement> m_timeRemainingDisplay;
+ RefPtr<MediaControlTimelineContainerElement> m_timelineContainer;
+ RefPtr<MediaControlTimeDisplayElement> m_currentTimeDisplay;
+ RefPtr<MediaControlTimeDisplayElement> m_timeRemainingDisplay;
+ RefPtr<MediaControlStatusDisplayElement> m_statusDisplay;
RenderObjectChildList m_children;
Node* m_lastUnderNode;
Node* m_nodeUnderMouse;
@@ -118,9 +131,9 @@ private:
Timer<RenderMedia> m_opacityAnimationTimer;
bool m_mouseOver;
double m_opacityAnimationStartTime;
+ double m_opacityAnimationDuration;
float m_opacityAnimationFrom;
float m_opacityAnimationTo;
- EVisibility m_previousVisible;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderMenuList.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderMenuList.cpp
index 4cd7b43..ed8c8ba 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderMenuList.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderMenuList.cpp
@@ -25,6 +25,7 @@
#include "RenderMenuList.h"
#include "CSSStyleSelector.h"
+#include "Frame.h"
#include "FrameView.h"
#include "HTMLNames.h"
#include "NodeRenderStyle.h"
@@ -296,6 +297,12 @@ void RenderMenuList::hidePopup()
void RenderMenuList::valueChanged(unsigned listIndex, bool fireOnChange)
{
+ // Check to ensure a page navigation has not occurred while
+ // the popup was up.
+ Document* doc = static_cast<Element*>(node())->document();
+ if (!doc || doc != doc->frame()->document())
+ return;
+
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
select->setSelectedIndexByUser(select->listToOptionIndex(listIndex), true, fireOnChange);
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp
index 098932a..adf6deb 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp
@@ -774,7 +774,7 @@ void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, int x1,
break;
case BSRight:
drawLineForBoxSide(graphicsContext, x1, y1 + max((adjbw1 * 2 + 1) / 3, 0),
- x1 + third, y2 - max(( adjbw2 * 2 + 1) / 3, 0),
+ x1 + third, y2 - max((adjbw2 * 2 + 1) / 3, 0),
s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
drawLineForBoxSide(graphicsContext, x2 - third, y1 + max((-adjbw1 * 2 + 1) / 3, 0),
x2, y2 - max((-adjbw2 * 2 + 1) / 3, 0),
@@ -1738,8 +1738,8 @@ IntSize RenderObject::offsetFromContainer(RenderObject* o) const
IntRect RenderObject::localCaretRect(InlineBox*, int, int* extraWidthToEndOfLine)
{
- if (extraWidthToEndOfLine)
- *extraWidthToEndOfLine = 0;
+ if (extraWidthToEndOfLine)
+ *extraWidthToEndOfLine = 0;
return IntRect();
}
@@ -1980,6 +1980,27 @@ void RenderObject::layout()
setNeedsLayout(false);
}
+PassRefPtr<RenderStyle> RenderObject::uncachedFirstLineStyle(RenderStyle* style) const
+{
+ if (!document()->usesFirstLineRules())
+ return 0;
+
+ ASSERT(!isText());
+
+ RefPtr<RenderStyle> result;
+
+ if (isBlockFlow()) {
+ if (RenderBlock* firstLineBlock = this->firstLineBlock())
+ result = firstLineBlock->getUncachedPseudoStyle(FIRST_LINE, style, firstLineBlock == this ? style : 0);
+ } else if (!isAnonymous() && isRenderInline()) {
+ RenderStyle* parentStyle = parent()->firstLineStyle();
+ if (parentStyle != parent()->style())
+ result = getUncachedPseudoStyle(FIRST_LINE_INHERITED, parentStyle, style);
+ }
+
+ return result.release();
+}
+
RenderStyle* RenderObject::firstLineStyleSlowCase() const
{
ASSERT(document()->usesFirstLineRules());
@@ -2016,13 +2037,15 @@ RenderStyle* RenderObject::getCachedPseudoStyle(PseudoId pseudo, RenderStyle* pa
return 0;
}
-PassRefPtr<RenderStyle> RenderObject::getUncachedPseudoStyle(PseudoId pseudo, RenderStyle* parentStyle) const
+PassRefPtr<RenderStyle> RenderObject::getUncachedPseudoStyle(PseudoId pseudo, RenderStyle* parentStyle, RenderStyle* ownStyle) const
{
- if (pseudo < FIRST_INTERNAL_PSEUDOID && !style()->hasPseudoStyle(pseudo))
+ if (pseudo < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style()->hasPseudoStyle(pseudo))
return 0;
- if (!parentStyle)
+ if (!parentStyle) {
+ ASSERT(!ownStyle);
parentStyle = style();
+ }
Node* n = node();
while (n && !n->isElementNode())
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderObject.h b/src/3rdparty/webkit/WebCore/rendering/RenderObject.h
index 311ef9c..911169d 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderObject.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderObject.h
@@ -382,7 +382,7 @@ public:
// The pseudo element style can be cached or uncached. Use the cached method if the pseudo element doesn't respect
// any pseudo classes (and therefore has no concept of changing state).
RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) const;
- PassRefPtr<RenderStyle> getUncachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) const;
+ PassRefPtr<RenderStyle> getUncachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0, RenderStyle* ownStyle = 0) const;
virtual void updateDragState(bool dragOn);
@@ -553,7 +553,11 @@ public:
RenderStyle* style() const { return m_style.get(); }
RenderStyle* firstLineStyle() const { return document()->usesFirstLineRules() ? firstLineStyleSlowCase() : style(); }
RenderStyle* style(bool firstLine) const { return firstLine ? firstLineStyle() : style(); }
-
+
+ // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style based off of a
+ // given new style, without accessing the cache.
+ PassRefPtr<RenderStyle> uncachedFirstLineStyle(RenderStyle*) const;
+
// Anonymous blocks that are part of of a continuation chain will return their inline continuation's outline style instead.
// This is typically only relevant when repainting.
virtual RenderStyle* outlineStyleForRepaint() const { return style(); }
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderPart.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderPart.cpp
index bcf9ef9..cb56c0c 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderPart.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderPart.cpp
@@ -41,13 +41,11 @@ RenderPart::~RenderPart()
clearWidget();
}
-void RenderPart::setWidget(Widget* widget)
+void RenderPart::setWidget(PassRefPtr<Widget> widget)
{
if (widget == this->widget())
return;
- if (widget && widget->isFrameView())
- static_cast<FrameView*>(widget)->ref();
RenderWidget::setWidget(widget);
// make sure the scrollbars are set correctly for restore
@@ -59,16 +57,4 @@ void RenderPart::viewCleared()
{
}
-void RenderPart::deleteWidget(Widget* widget)
-{
- // Since deref ends up calling setWidget back on us, need to make sure
- // that widget is already 0 so it won't do any work.
- ASSERT(!this->widget());
-
- if (widget && widget->isFrameView())
- static_cast<FrameView*>(widget)->deref();
- else
- delete widget;
-}
-
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderPart.h b/src/3rdparty/webkit/WebCore/rendering/RenderPart.h
index e47ead0..a1d2e2b 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderPart.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderPart.h
@@ -34,7 +34,7 @@ public:
bool hasFallbackContent() const { return m_hasFallbackContent; }
- virtual void setWidget(Widget*);
+ virtual void setWidget(PassRefPtr<Widget>);
virtual void viewCleared();
protected:
@@ -43,8 +43,6 @@ protected:
private:
virtual bool isRenderPart() const { return true; }
virtual const char* renderName() const { return "RenderPart"; }
-
- virtual void deleteWidget(Widget*);
};
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp
index e61ac8e..d9a0b62 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp
@@ -127,8 +127,7 @@ void RenderReplaced::paint(PaintInfo& paintInfo, int tx, int ty)
drawSelectionTint = false;
}
- bool clipToBorderRadius = style()->overflowX() != OVISIBLE && style()->hasBorderRadius();
- if (clipToBorderRadius) {
+ if (style()->hasBorderRadius()) {
// Push a clip if we have a border radius, since we want to round the foreground content that gets painted.
paintInfo.context->save();
@@ -141,7 +140,7 @@ void RenderReplaced::paint(PaintInfo& paintInfo, int tx, int ty)
paintReplaced(paintInfo, tx, ty);
- if (clipToBorderRadius)
+ if (style()->hasBorderRadius())
paintInfo.context->restore();
// The selection tint never gets clipped by border-radius rounding, since we want it to run right up to the edges of
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp
index b38352e..f494709 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp
@@ -2,7 +2,7 @@
Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
Copyright (C) 2006 Apple Computer, Inc.
Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
- Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
+ Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org>
Copyright (C) 2009, Google, Inc.
This library is free software; you can redistribute it and/or
@@ -59,7 +59,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s
float widthToHeightMultiplier = srcRect.height() / srcRect.width();
if (origDestHeight > (origDestWidth * widthToHeightMultiplier)) {
destRect.setHeight(origDestWidth * widthToHeightMultiplier);
- switch(aspectRatio->align()) {
+ switch (aspectRatio->align()) {
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
@@ -74,7 +74,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s
}
if (origDestWidth > (origDestHeight / widthToHeightMultiplier)) {
destRect.setWidth(origDestHeight / widthToHeightMultiplier);
- switch(aspectRatio->align()) {
+ switch (aspectRatio->align()) {
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
@@ -93,7 +93,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s
if (origDestHeight < (origDestWidth * widthToHeightMultiplier)) {
float destToSrcMultiplier = srcRect.width() / destRect.width();
srcRect.setHeight(destRect.height() * destToSrcMultiplier);
- switch(aspectRatio->align()) {
+ switch (aspectRatio->align()) {
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
@@ -110,7 +110,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s
if (origDestWidth < (origDestHeight / widthToHeightMultiplier)) {
float destToSrcMultiplier = srcRect.height() / destRect.height();
srcRect.setWidth(destRect.width() * destToSrcMultiplier);
- switch(aspectRatio->align()) {
+ switch (aspectRatio->align()) {
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
@@ -227,9 +227,7 @@ FloatRect RenderSVGImage::repaintRectInLocalCoordinates() const
void RenderSVGImage::imageChanged(WrappedImagePtr image, const IntRect* rect)
{
RenderImage::imageChanged(image, rect);
-
- // We override to invalidate a larger rect, since SVG images can draw outside their "bounds"
- repaintRectangle(absoluteClippedOverflowRect()); // FIXME: Isn't this just repaint()?
+ repaint();
}
IntRect RenderSVGImage::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer)
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.cpp
index 3c44dd8..cf97b52 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.cpp
@@ -39,10 +39,10 @@ RenderSVGInline::RenderSVGInline(Node* n)
{
}
-InlineFlowBox* RenderSVGInline::createFlowBox()
+InlineFlowBox* RenderSVGInline::createInlineFlowBox()
{
InlineFlowBox* box = new (renderArena()) SVGInlineFlowBox(this);
- box->setIsSVG(true);
+ box->setHasVirtualHeight();
return box;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.h b/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.h
index 1ff8d02..9f9f3f5 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.h
@@ -40,7 +40,7 @@ public:
virtual void absoluteQuads(Vector<FloatQuad>&);
private:
- virtual InlineFlowBox* createFlowBox();
+ virtual InlineFlowBox* createInlineFlowBox();
};
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.cpp
index b1a21d7..48d01ae 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.cpp
@@ -134,7 +134,7 @@ FloatQuad RenderSVGInlineText::computeRepaintQuadForRange(RenderBoxModelObject*
InlineTextBox* RenderSVGInlineText::createTextBox()
{
InlineTextBox* box = new (renderArena()) SVGInlineTextBox(this);
- box->setIsSVG(true);
+ box->setHasVirtualHeight();
return box;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
index 9e9809d..3919d7f 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
@@ -89,10 +89,10 @@ void RenderSVGText::layout()
setNeedsLayout(false);
}
-RootInlineBox* RenderSVGText::createRootBox()
+RootInlineBox* RenderSVGText::createRootInlineBox()
{
RootInlineBox* box = new (renderArena()) SVGRootInlineBox(this);
- box->setIsSVG(true);
+ box->setHasVirtualHeight();
return box;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
index c1f1430..088332e 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
@@ -65,7 +65,7 @@ private:
// FIXME: This can be removed when localTransform() is removed from RenderObject
virtual TransformationMatrix localTransform() const { return m_localTransform; }
- virtual RootInlineBox* createRootBox();
+ virtual RootInlineBox* createRootInlineBox();
TransformationMatrix m_localTransform;
};
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSlider.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSlider.cpp
index 610a060..7df7743 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSlider.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSlider.cpp
@@ -121,47 +121,57 @@ public:
bool inDragMode() const { return m_inDragMode; }
virtual void defaultEventHandler(Event*);
+ virtual void detach();
private:
virtual bool isShadowNode() const { return true; }
virtual Node* shadowParentNode() { return m_shadowParent; }
+ FloatPoint m_offsetToThumb;
Node* m_shadowParent;
- FloatPoint m_initialClickPoint; // initial click point in RenderSlider-local coordinates
- int m_initialPosition;
bool m_inDragMode;
};
SliderThumbElement::SliderThumbElement(Document* document, Node* shadowParent)
: HTMLDivElement(divTag, document)
, m_shadowParent(shadowParent)
- , m_initialPosition(0)
, m_inDragMode(false)
{
}
void SliderThumbElement::defaultEventHandler(Event* event)
{
+ if (!event->isMouseEvent()) {
+ HTMLDivElement::defaultEventHandler(event);
+ return;
+ }
+
+ MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
+ bool isLeftButton = mouseEvent->button() == LeftButton;
const AtomicString& eventType = event->type();
- if (eventType == eventNames().mousedownEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) {
- MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
- RenderSlider* slider;
- if (document()->frame() && renderer() &&
- (slider = static_cast<RenderSlider*>(renderer()->parent())) &&
- slider->mouseEventIsInThumb(mouseEvent)) {
-
- // Cache the initial point where the mouse down occurred, in slider coordinates
- m_initialClickPoint = slider->absoluteToLocal(mouseEvent->absoluteLocation(), false, true);
- // Cache the initial position of the thumb.
- m_initialPosition = slider->currentPosition();
- m_inDragMode = true;
-
- document()->frame()->eventHandler()->setCapturingMouseEventsNode(m_shadowParent);
-
- event->setDefaultHandled();
- return;
+
+ if (eventType == eventNames().mousedownEvent && isLeftButton) {
+ if (document()->frame() && renderer()) {
+ RenderSlider* slider = static_cast<RenderSlider*>(renderer()->parent());
+ if (slider) {
+ if (slider->mouseEventIsInThumb(mouseEvent)) {
+ // We selected the thumb, we want the cursor to always stay at
+ // the same position relative to the thumb.
+ m_offsetToThumb = slider->mouseEventOffsetToThumb(mouseEvent);
+ } else {
+ // We are outside the thumb, move the thumb to the point were
+ // we clicked. We'll be exactly at the center of the thumb.
+ m_offsetToThumb.setX(0);
+ m_offsetToThumb.setY(0);
+ }
+
+ m_inDragMode = true;
+ document()->frame()->eventHandler()->setCapturingMouseEventsNode(m_shadowParent);
+ event->setDefaultHandled();
+ return;
+ }
}
- } else if (eventType == eventNames().mouseupEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) {
+ } else if (eventType == eventNames().mouseupEvent && isLeftButton) {
if (m_inDragMode) {
if (Frame* frame = document()->frame())
frame->eventHandler()->setCapturingMouseEventsNode(0);
@@ -169,24 +179,31 @@ void SliderThumbElement::defaultEventHandler(Event* event)
event->setDefaultHandled();
return;
}
- } else if (eventType == eventNames().mousemoveEvent && event->isMouseEvent()) {
+ } else if (eventType == eventNames().mousemoveEvent) {
if (m_inDragMode && renderer() && renderer()->parent()) {
- // Move the slider
- MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
RenderSlider* slider = static_cast<RenderSlider*>(renderer()->parent());
-
- FloatPoint curPoint = slider->absoluteToLocal(mouseEvent->absoluteLocation(), false, true);
- IntPoint eventOffset(m_initialPosition + curPoint.x() - m_initialClickPoint.x() + renderBox()->width() / 2,
- m_initialPosition + curPoint.y() - m_initialClickPoint.y() + renderBox()->height() / 2);
- slider->setValueForPosition(slider->positionForOffset(eventOffset));
- event->setDefaultHandled();
- return;
+ if (slider) {
+ FloatPoint curPoint = slider->absoluteToLocal(mouseEvent->absoluteLocation(), false, true);
+ IntPoint eventOffset(curPoint.x() + m_offsetToThumb.x(), curPoint.y() + m_offsetToThumb.y());
+ slider->setValueForPosition(slider->positionForOffset(eventOffset));
+ event->setDefaultHandled();
+ return;
+ }
}
}
HTMLDivElement::defaultEventHandler(event);
}
+void SliderThumbElement::detach()
+{
+ if (m_inDragMode) {
+ if (Frame* frame = document()->frame())
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
+ }
+ HTMLDivElement::detach();
+}
+
RenderSlider::RenderSlider(HTMLInputElement* element)
: RenderBlock(element)
{
@@ -387,6 +404,17 @@ bool RenderSlider::mouseEventIsInThumb(MouseEvent* evt)
return thumbBounds.contains(roundedIntPoint(localPoint));
}
+FloatPoint RenderSlider::mouseEventOffsetToThumb(MouseEvent* evt)
+{
+ ASSERT(m_thumb && m_thumb->renderer());
+ FloatPoint localPoint = m_thumb->renderBox()->absoluteToLocal(evt->absoluteLocation(), false, true);
+ IntRect thumbBounds = m_thumb->renderBox()->borderBoxRect();
+ FloatPoint offset;
+ offset.setX(thumbBounds.x() + thumbBounds.width() / 2 - localPoint.x());
+ offset.setY(thumbBounds.y() + thumbBounds.height() / 2 - localPoint.y());
+ return offset;
+}
+
void RenderSlider::setValueForPosition(int position)
{
if (!m_thumb || !m_thumb->renderer())
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSlider.h b/src/3rdparty/webkit/WebCore/rendering/RenderSlider.h
index f1eab9c..779d82f 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSlider.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSlider.h
@@ -41,12 +41,13 @@ namespace WebCore {
virtual const char* renderName() const { return "RenderSlider"; }
virtual bool isSlider() const { return true; }
- virtual int baselinePosition( bool, bool ) const;
+ virtual int baselinePosition(bool, bool) const;
virtual void calcPrefWidths();
virtual void layout();
virtual void updateFromElement();
bool mouseEventIsInThumb(MouseEvent*);
+ FloatPoint mouseEventOffsetToThumb(MouseEvent*);
void setValueForPosition(int position);
void setPositionFromValue();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp
index 48b0d1c..5d70784 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp
@@ -882,8 +882,7 @@ int RenderTable::outerBorderBottom() const
bottomSection = m_foot;
else {
RenderObject* child;
- for (child = lastChild(); child && !child->isTableSection(); child = child->previousSibling())
- ;
+ for (child = lastChild(); child && !child->isTableSection(); child = child->previousSibling()) { }
bottomSection = child ? static_cast<RenderTableSection*>(child) : 0;
}
if (bottomSection) {
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTableCol.h b/src/3rdparty/webkit/WebCore/rendering/RenderTableCol.h
index 6b17ec4..12b6d9d 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTableCol.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTableCol.h
@@ -33,8 +33,7 @@
namespace WebCore {
-class RenderTableCol : public RenderBox
-{
+class RenderTableCol : public RenderBox {
public:
RenderTableCol(Node*);
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp
index 29c8c8a..9acd9b2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp
@@ -325,26 +325,14 @@ String RenderTextControl::text()
if (!m_innerText)
return "";
- Frame* frame = document()->frame();
- Text* compositionNode = frame ? frame->editor()->compositionNode() : 0;
-
Vector<UChar> result;
for (Node* n = m_innerText.get(); n; n = n->traverseNextNode(m_innerText.get())) {
if (n->hasTagName(brTag))
result.append(&newlineCharacter, 1);
else if (n->isTextNode()) {
- Text* text = static_cast<Text*>(n);
- String data = text->data();
- unsigned length = data.length();
- if (text != compositionNode)
- result.append(data.characters(), length);
- else {
- unsigned compositionStart = min(frame->editor()->compositionStart(), length);
- unsigned compositionEnd = min(max(compositionStart, frame->editor()->compositionEnd()), length);
- result.append(data.characters(), compositionStart);
- result.append(data.characters() + compositionEnd, length - compositionEnd);
- }
+ String data = static_cast<Text*>(n)->data();
+ result.append(data.characters(), data.length());
}
}
@@ -386,9 +374,6 @@ String RenderTextControl::textWithHardLineBreaks()
if (!box)
return "";
- Frame* frame = document()->frame();
- Text* compositionNode = frame ? frame->editor()->compositionNode() : 0;
-
Node* breakNode;
unsigned breakOffset;
RootInlineBox* line = box->root();
@@ -403,19 +388,7 @@ String RenderTextControl::textWithHardLineBreaks()
Text* text = static_cast<Text*>(n);
String data = text->data();
unsigned length = data.length();
- unsigned compositionStart = (text == compositionNode)
- ? min(frame->editor()->compositionStart(), length) : 0;
- unsigned compositionEnd = (text == compositionNode)
- ? min(max(compositionStart, frame->editor()->compositionEnd()), length) : 0;
unsigned position = 0;
- while (breakNode == n && breakOffset < compositionStart) {
- result.append(data.characters() + position, breakOffset - position);
- position = breakOffset;
- result.append(&newlineCharacter, 1);
- getNextSoftBreak(line, breakNode, breakOffset);
- }
- result.append(data.characters() + position, compositionStart - position);
- position = compositionEnd;
while (breakNode == n && breakOffset <= length) {
if (breakOffset > position) {
result.append(data.characters() + position, breakOffset - position);
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp
index a5db44e..9c022d6 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp
@@ -744,8 +744,8 @@ int RenderTextControlSingleLine::selectedIndex() const
bool RenderTextControlSingleLine::itemIsSeparator(unsigned listIndex) const
{
- // The separator will be the second to last item in our list.
- return static_cast<int>(listIndex) == (listSize() - 2);
+ // The separator will be the second to last item in our list.
+ return static_cast<int>(listIndex) == (listSize() - 2);
}
bool RenderTextControlSingleLine::itemIsLabel(unsigned listIndex) const
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp
index 517d911..23b6343 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp
@@ -42,6 +42,12 @@ namespace WebCore {
using namespace HTMLNames;
+static Color& customFocusRingColor()
+{
+ DEFINE_STATIC_LOCAL(Color, color, ());
+ return color;
+}
+
RenderTheme::RenderTheme()
#if USE(NEW_THEME)
: m_theme(platformTheme())
@@ -262,6 +268,10 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInf
return paintMediaSeekBackButton(o, paintInfo, r);
case MediaSeekForwardButtonPart:
return paintMediaSeekForwardButton(o, paintInfo, r);
+ case MediaRewindButtonPart:
+ return paintMediaRewindButton(o, paintInfo, r);
+ case MediaReturnToRealtimeButtonPart:
+ return paintMediaReturnToRealtimeButton(o, paintInfo, r);
case MediaSliderPart:
return paintMediaSliderTrack(o, paintInfo, r);
case MediaSliderThumbPart:
@@ -272,8 +282,8 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInf
return paintMediaTimeRemaining(o, paintInfo, r);
case MediaCurrentTimePart:
return paintMediaCurrentTime(o, paintInfo, r);
- case MediaTimelineContainerPart:
- return paintMediaTimelineContainer(o, paintInfo, r);
+ case MediaControlsBackgroundPart:
+ return paintMediaControlsBackground(o, paintInfo, r);
case MenulistButtonPart:
case TextFieldPart:
case TextAreaPart:
@@ -849,9 +859,14 @@ Color RenderTheme::platformInactiveTextSearchHighlightColor() const
return Color(255, 255, 0); // Yellow.
}
-Color RenderTheme::focusRingColor() const
+void RenderTheme::setCustomFocusRingColor(const Color& c)
+{
+ customFocusRingColor() = c;
+}
+
+Color RenderTheme::focusRingColor()
{
- return Color(0, 0, 0); // Black.
+ return customFocusRingColor().isValid() ? customFocusRingColor() : defaultTheme()->platformFocusRingColor();
}
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h
index a1519ce..795daa2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h
@@ -78,7 +78,7 @@ public:
// RenderThemeMac.cpp for Mac OS X.
// These methods return the theme's extra style sheets rules, to let each platform
- // adjust the default CSS rules in html4.css, quirks.css, or mediaControls.css
+ // adjust the default CSS rules in html.css, quirks.css, or mediaControls.css
virtual String extraDefaultStyleSheet() { return String(); }
virtual String extraQuirksStyleSheet() { return String(); }
#if ENABLE(VIDEO)
@@ -137,7 +137,9 @@ public:
virtual Color platformActiveTextSearchHighlightColor() const;
virtual Color platformInactiveTextSearchHighlightColor() const;
- virtual Color focusRingColor() const;
+ static Color focusRingColor();
+ virtual Color platformFocusRingColor() const { return Color(0, 0, 0); }
+ static void setCustomFocusRingColor(const Color&);
virtual void platformColorsDidChange();
@@ -242,7 +244,9 @@ protected:
virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
- virtual bool paintMediaTimelineContainer(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+ virtual bool paintMediaRewindButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+ virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+ virtual bool paintMediaControlsBackground(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
virtual bool paintMediaCurrentTime(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
virtual bool paintMediaTimeRemaining(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.h b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.h
index 5497d52..f8204cf 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.h
@@ -64,7 +64,7 @@ namespace WebCore {
virtual Color platformInactiveSelectionBackgroundColor() const;
virtual Color activeListBoxSelectionBackgroundColor() const;
- virtual Color focusRingColor() const;
+ virtual Color platformFocusRingColor() const;
virtual void platformColorsDidChange();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.mm b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.mm
index bd90831..efd28d9 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.mm
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumMac.mm
@@ -46,6 +46,7 @@
#import "Image.h"
#import "LocalCurrentGraphicsContext.h"
#import "MediaControlElements.h"
+#import "RenderMedia.h"
#import "RenderSlider.h"
#import "RenderView.h"
#import "SharedBuffer.h"
@@ -172,7 +173,7 @@ Color RenderThemeChromiumMac::activeListBoxSelectionBackgroundColor() const
return Color(static_cast<int>(255.0 * [color redComponent]), static_cast<int>(255.0 * [color greenComponent]), static_cast<int>(255.0 * [color blueComponent]));
}
-Color RenderThemeChromiumMac::focusRingColor() const
+Color RenderThemeChromiumMac::platformFocusRingColor() const
{
if (ChromiumBridge::layoutTestMode())
return oldAquaFocusRingColor();
@@ -1800,6 +1801,12 @@ typedef enum {
MediaControllerThemeClassic = 1,
MediaControllerThemeQT = 2
} MediaControllerThemeStyle;
+
+enum WKMediaControllerThemeState {
+ MediaUIPartDisabledFlag = 1 << 0,
+ MediaUIPartPressedFlag = 1 << 1,
+ MediaUIPartDrawEndCapsFlag = 1 << 3,
+};
#endif
bool RenderThemeChromiumMac::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
@@ -1810,7 +1817,8 @@ bool RenderThemeChromiumMac::paintMediaFullscreenButton(RenderObject* o, const R
return false;
LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(MediaFullscreenButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, node->active());
+ wkDrawMediaUIPart(MediaFullscreenButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r,
+ node->active() ? MediaUIPartPressedFlag : 0);
#endif
return false;
}
@@ -1828,7 +1836,8 @@ bool RenderThemeChromiumMac::paintMediaMuteButton(RenderObject* o, const RenderO
return false;
LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(mediaElement->muted() ? MediaUnMuteButton : MediaMuteButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, node->active());
+ wkDrawMediaUIPart(mediaElement->muted() ? MediaUnMuteButton : MediaMuteButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r,
+ node->active() ? MediaUIPartPressedFlag : 0);
#endif
return false;
}
@@ -1846,7 +1855,8 @@ bool RenderThemeChromiumMac::paintMediaPlayButton(RenderObject* o, const RenderO
return false;
LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(mediaElement->canPlay() ? MediaPlayButton : MediaPauseButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, node->active());
+ wkDrawMediaUIPart(mediaElement->canPlay() ? MediaPlayButton : MediaPauseButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r,
+ node->active() ? MediaUIPartPressedFlag : 0);
#endif
return false;
}
@@ -1859,7 +1869,8 @@ bool RenderThemeChromiumMac::paintMediaSeekBackButton(RenderObject* o, const Ren
return false;
LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(MediaSeekBackButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, node->active());
+ wkDrawMediaUIPart(MediaSeekBackButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r,
+ node->active() ? MediaUIPartPressedFlag : 0);
#endif
return false;
}
@@ -1872,7 +1883,8 @@ bool RenderThemeChromiumMac::paintMediaSeekForwardButton(RenderObject* o, const
return false;
LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(MediaSeekForwardButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, node->active());
+ wkDrawMediaUIPart(MediaSeekForwardButton, MediaControllerThemeClassic, paintInfo.context->platformContext(), r,
+ node->active() ? MediaUIPartPressedFlag : 0);
#endif
return false;
}
@@ -1898,7 +1910,8 @@ bool RenderThemeChromiumMac::paintMediaSliderTrack(RenderObject* o, const Render
currentTime = player->currentTime();
}
- wkDrawMediaSliderTrack(MediaControllerThemeClassic, paintInfo.context->platformContext(), r, timeLoaded, currentTime, duration);
+ bool shouldDrawEndCaps = !static_cast<RenderMedia*>(mediaElement->renderer())->shouldShowTimeDisplayControls();
+ wkDrawMediaSliderTrack(MediaControllerThemeClassic, paintInfo.context->platformContext(), r, timeLoaded, currentTime, duration, shouldDrawEndCaps ? MediaUIPartDrawEndCapsFlag : 0);
#endif
return false;
}
@@ -1911,7 +1924,8 @@ bool RenderThemeChromiumMac::paintMediaSliderThumb(RenderObject* o, const Render
return false;
LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(MediaSliderThumb, MediaControllerThemeClassic, paintInfo.context->platformContext(), r, node->active());
+ wkDrawMediaUIPart(MediaSliderThumb, MediaControllerThemeClassic, paintInfo.context->platformContext(), r,
+ node->active() ? MediaUIPartPressedFlag : 0);
#endif
return false;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp
index 1fb0cb2..95ffd02 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp
@@ -133,7 +133,7 @@ String RenderThemeChromiumSkia::extraMediaControlsStyleSheet()
bool RenderThemeChromiumSkia::supportsHover(const RenderStyle* style) const
{
- return true;
+ return true;
}
bool RenderThemeChromiumSkia::supportsFocusRing(const RenderStyle* style) const
@@ -162,7 +162,7 @@ Color RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor() const
return Color(0x32, 0x32, 0x32);
}
-Color RenderThemeChromiumSkia::focusRingColor() const
+Color RenderThemeChromiumSkia::platformFocusRingColor() const
{
static Color focusRingColor(229, 151, 0, 255);
return focusRingColor;
@@ -212,8 +212,16 @@ bool RenderThemeChromiumSkia::paintCheckbox(RenderObject* o, const RenderObject:
{
static Image* const checkedImage = Image::loadPlatformResource("linuxCheckboxOn").releaseRef();
static Image* const uncheckedImage = Image::loadPlatformResource("linuxCheckboxOff").releaseRef();
+ static Image* const disabledCheckedImage = Image::loadPlatformResource("linuxCheckboxDisabledOn").releaseRef();
+ static Image* const disabledUncheckedImage = Image::loadPlatformResource("linuxCheckboxDisabledOff").releaseRef();
+
+ Image* image;
+
+ if (this->isEnabled(o))
+ image = this->isChecked(o) ? checkedImage : uncheckedImage;
+ else
+ image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
- Image* image = this->isChecked(o) ? checkedImage : uncheckedImage;
i.context->drawImage(image, rect);
return false;
}
@@ -237,8 +245,15 @@ bool RenderThemeChromiumSkia::paintRadio(RenderObject* o, const RenderObject::Pa
{
static Image* const checkedImage = Image::loadPlatformResource("linuxRadioOn").releaseRef();
static Image* const uncheckedImage = Image::loadPlatformResource("linuxRadioOff").releaseRef();
+ static Image* const disabledCheckedImage = Image::loadPlatformResource("linuxRadioDisabledOn").releaseRef();
+ static Image* const disabledUncheckedImage = Image::loadPlatformResource("linuxRadioDisabledOff").releaseRef();
+
+ Image* image;
+ if (this->isEnabled(o))
+ image = this->isChecked(o) ? checkedImage : uncheckedImage;
+ else
+ image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
- Image* image = this->isChecked(o) ? checkedImage : uncheckedImage;
i.context->drawImage(image, rect);
return false;
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h
index b81d4fa..8be64e5 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h
@@ -54,7 +54,7 @@ namespace WebCore {
virtual Color platformInactiveSelectionBackgroundColor() const;
virtual Color platformActiveSelectionForegroundColor() const;
virtual Color platformInactiveSelectionForegroundColor() const;
- virtual Color focusRingColor() const;
+ virtual Color platformFocusRingColor() const;
// To change the blink interval, override caretBlinkIntervalInternal instead of this one so that we may share layout test code an intercepts.
virtual double caretBlinkInterval() const;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumWin.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumWin.cpp
index 4ed8d88..8459144 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumWin.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumWin.cpp
@@ -204,11 +204,11 @@ PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
bool RenderThemeChromiumWin::supportsFocusRing(const RenderStyle* style) const
{
- // Let webkit draw one of its halo rings around any focused element,
- // except push buttons. For buttons we use the windows PBS_DEFAULTED
- // styling to give it a blue border.
- return style->appearance() == ButtonPart
- || style->appearance() == PushButtonPart;
+ // Let webkit draw one of its halo rings around any focused element,
+ // except push buttons. For buttons we use the windows PBS_DEFAULTED
+ // styling to give it a blue border.
+ return style->appearance() == ButtonPart
+ || style->appearance() == PushButtonPart;
}
Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeMac.h b/src/3rdparty/webkit/WebCore/rendering/RenderThemeMac.h
index ba32105..85f141f 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeMac.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeMac.h
@@ -58,7 +58,7 @@ public:
virtual Color platformActiveListBoxSelectionForegroundColor() const;
virtual Color platformInactiveListBoxSelectionBackgroundColor() const;
virtual Color platformInactiveListBoxSelectionForegroundColor() const;
- virtual Color focusRingColor() const;
+ virtual Color platformFocusRingColor() const;
virtual ScrollbarControlSize scrollbarControlSizeForPart(ControlPart) { return SmallScrollbar; }
@@ -124,12 +124,13 @@ protected:
virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
- virtual bool paintMediaTimelineContainer(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaRewindButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaControlsBackground(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
virtual bool paintMediaCurrentTime(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
virtual bool paintMediaTimeRemaining(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
// Media controls
- virtual bool hitTestMediaControlPart(RenderObject*, const IntPoint& absPoint);
virtual String extraMediaControlsStyleSheet();
#endif
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.cpp
index 914f7ee..05facef 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.cpp
@@ -79,8 +79,10 @@ PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
// FIXME: This is called before Settings has been initialized by WebKit, so will return a
// potentially wrong answer the very first time it's called (see
// <https://bugs.webkit.org/show_bug.cgi?id=26493>).
- if (Settings::shouldPaintNativeControls())
+ if (Settings::shouldPaintNativeControls()) {
+ RenderTheme::setCustomFocusRingColor(safariTheme->platformFocusRingColor());
return windowsTheme; // keep the reference of one.
+ }
return safariTheme; // keep the reference of one.
}
@@ -160,7 +162,7 @@ Color RenderThemeSafari::activeListBoxSelectionBackgroundColor() const
return Color(56, 117, 215);
}
-Color RenderThemeSafari::focusRingColor() const
+Color RenderThemeSafari::platformFocusRingColor() const
{
static Color focusRingColor;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.h b/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.h
index 4685238..fb8ffb0 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.h
@@ -69,7 +69,7 @@ public:
virtual Color platformInactiveSelectionBackgroundColor() const;
virtual Color activeListBoxSelectionBackgroundColor() const;
- virtual Color focusRingColor() const;
+ virtual Color platformFocusRingColor() const;
// System fonts.
virtual void systemFont(int propId, FontDescription&) const;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderView.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderView.cpp
index 05d40bc..3b8a4fb 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderView.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderView.cpp
@@ -343,8 +343,8 @@ void RenderView::setMaximalOutlineSize(int o)
if (o != m_maximalOutlineSize) {
m_maximalOutlineSize = o;
- if (m_frameView)
- m_frameView->updateCompositingLayers(FrameView::ForcedCompositingUpdate);
+ // maximalOutlineSize affects compositing layer dimensions.
+ compositor()->setCompositingLayersNeedRebuild(); // FIXME: this really just needs to be a geometry update.
}
}
#endif
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
index ec2ee6a..16526ca 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
@@ -73,8 +73,8 @@ void RenderWidget::destroy()
if (m_widget) {
if (m_frameView)
- m_frameView->removeChild(m_widget);
- widgetRendererMap().remove(m_widget);
+ m_frameView->removeChild(m_widget.get());
+ widgetRendererMap().remove(m_widget.get());
}
// removes from override size map
@@ -113,17 +113,17 @@ void RenderWidget::setWidgetGeometry(const IntRect& frame)
}
}
-void RenderWidget::setWidget(Widget* widget)
+void RenderWidget::setWidget(PassRefPtr<Widget> widget)
{
if (widget != m_widget) {
if (m_widget) {
m_widget->removeFromParent();
- widgetRendererMap().remove(m_widget);
+ widgetRendererMap().remove(m_widget.get());
clearWidget();
}
m_widget = widget;
if (m_widget) {
- widgetRendererMap().add(m_widget, this);
+ widgetRendererMap().add(m_widget.get(), this);
// if we've already received a layout, apply the calculated space to the
// widget immediately, but we have to have really been full constructed (with a non-null
// style pointer).
@@ -135,7 +135,7 @@ void RenderWidget::setWidget(Widget* widget)
else
m_widget->show();
}
- m_frameView->addChild(m_widget);
+ m_frameView->addChild(m_widget.get());
}
}
}
@@ -182,8 +182,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
paintCustomHighlight(tx - x(), ty - y(), style()->highlight(), true);
#endif
- bool clipToBorderRadius = style()->overflowX() != OVISIBLE && style()->hasBorderRadius();
- if (clipToBorderRadius) {
+ if (style()->hasBorderRadius()) {
// Push a clip if we have a border radius, since we want to round the foreground content that gets painted.
paintInfo.context->save();
@@ -204,13 +203,13 @@ void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
// to paint itself. That way it will composite properly with z-indexed layers.
m_widget->paint(paintInfo.context, paintInfo.rect);
- if (m_widget->isFrameView() && paintInfo.overlapTestRequests && !static_cast<FrameView*>(m_widget)->useSlowRepaints()) {
+ if (m_widget->isFrameView() && paintInfo.overlapTestRequests && !static_cast<FrameView*>(m_widget.get())->useSlowRepaints()) {
ASSERT(!paintInfo.overlapTestRequests->contains(this));
paintInfo.overlapTestRequests->set(this, m_widget->frameRect());
}
}
- if (clipToBorderRadius)
+ if (style()->hasBorderRadius())
paintInfo.context->restore();
// Paint a partially transparent wash over selected widgets.
@@ -224,7 +223,7 @@ void RenderWidget::setOverlapTestResult(bool isOverlapped)
{
ASSERT(m_widget);
ASSERT(m_widget->isFrameView());
- static_cast<FrameView*>(m_widget)->setIsOverlapped(isOverlapped);
+ static_cast<FrameView*>(m_widget.get())->setIsOverlapped(isOverlapped);
}
void RenderWidget::deref(RenderArena *arena)
@@ -259,7 +258,7 @@ void RenderWidget::updateWidgetPosition()
// if the frame bounds got changed, or if view needs layout (possibly indicating
// content size is wrong) we have to do a layout to set the right widget size
if (m_widget->isFrameView()) {
- FrameView* frameView = static_cast<FrameView*>(m_widget);
+ FrameView* frameView = static_cast<FrameView*>(m_widget.get());
if (boundsChanged || frameView->needsLayout())
frameView->layout();
}
@@ -276,15 +275,7 @@ void RenderWidget::setSelectionState(SelectionState state)
void RenderWidget::clearWidget()
{
- Widget* widget = m_widget;
m_widget = 0;
- if (widget)
- deleteWidget(widget);
-}
-
-void RenderWidget::deleteWidget(Widget* widget)
-{
- delete widget;
}
RenderWidget* RenderWidget::find(const Widget* widget)
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.h b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.h
index d23dbb3..97d0b72 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.h
@@ -33,8 +33,8 @@ class RenderWidget : public RenderReplaced, private OverlapTestRequestClient {
public:
virtual ~RenderWidget();
- Widget* widget() const { return m_widget; }
- virtual void setWidget(Widget*);
+ Widget* widget() const { return m_widget.get(); }
+ virtual void setWidget(PassRefPtr<Widget>);
static RenderWidget* find(const Widget*);
@@ -57,7 +57,6 @@ private:
virtual void destroy();
virtual void setSelectionState(SelectionState);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
- virtual void deleteWidget(Widget*);
virtual void setOverlapTestResult(bool);
void setWidgetGeometry(const IntRect&);
@@ -65,7 +64,7 @@ private:
RenderArena* ref() { ++m_refCount; return renderArena(); }
void deref(RenderArena*);
- Widget* m_widget;
+ RefPtr<Widget> m_widget;
FrameView* m_frameView;
int m_refCount;
};
diff --git a/src/3rdparty/webkit/WebCore/rendering/RootInlineBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RootInlineBox.cpp
index ed125ee..e8f04da 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RootInlineBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RootInlineBox.cpp
@@ -355,8 +355,8 @@ static bool isEditableLeaf(InlineBox* leaf)
InlineBox* RootInlineBox::closestLeafChildForXPos(int x, bool onlyEditableLeaves)
{
- InlineBox* firstLeaf = firstLeafChildAfterBox();
- InlineBox* lastLeaf = lastLeafChildBeforeBox();
+ InlineBox* firstLeaf = firstLeafChild();
+ InlineBox* lastLeaf = lastLeafChild();
if (firstLeaf == lastLeaf && (!onlyEditableLeaves || isEditableLeaf(firstLeaf)))
return firstLeaf;
diff --git a/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.cpp b/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.cpp
index 8871a75..b53e3d9 100644
--- a/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.cpp
@@ -390,11 +390,11 @@ void SVGCharacterLayoutInfo::addStackContent(StackType type, const PositionedFlo
dyStackChanged = true;
dyStack.append(list);
break;
- case AngleStack:
+ case AngleStack:
angleStackChanged = true;
angleStack.append(list);
break;
- default:
+ default:
ASSERT_NOT_REACHED();
}
}
diff --git a/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.h b/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.h
index 0188b9d..b5b4f3e 100644
--- a/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.h
+++ b/src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.h
@@ -44,8 +44,7 @@ class SVGNumberList;
class SVGTextPositioningElement;
template<class Type>
-class PositionedVector : public Vector<Type>
-{
+class PositionedVector : public Vector<Type> {
public:
PositionedVector<Type>()
: m_position(0)
diff --git a/src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.h b/src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.h
index 1aa2637..f6eb87a 100644
--- a/src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.h
+++ b/src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.h
@@ -37,7 +37,7 @@ public:
{
}
- virtual int svgBoxHeight() const { return m_height; }
+ virtual int virtualHeight() const { return m_height; }
void setHeight(int h) { m_height = h; }
virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
diff --git a/src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.h b/src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.h
index 410218d..76837cc 100644
--- a/src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.h
+++ b/src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.h
@@ -38,7 +38,7 @@ namespace WebCore {
public:
SVGInlineTextBox(RenderObject* obj);
- virtual int svgBoxHeight() const { return m_height; }
+ virtual int virtualHeight() const { return m_height; }
void setHeight(int h) { m_height = h; }
virtual int selectionTop();
diff --git a/src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.h b/src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.h
index 735f755..65bade0 100644
--- a/src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.h
+++ b/src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.h
@@ -53,7 +53,7 @@ public:
virtual bool isSVGRootInlineBox() { return true; }
- virtual int svgBoxHeight() const { return m_height; }
+ virtual int virtualHeight() const { return m_height; }
void setHeight(int h) { m_height = h; }
virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
diff --git a/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp b/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
index cd067de..e205882 100644
--- a/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
@@ -172,6 +172,16 @@ SearchFieldCancelButtonElement::SearchFieldCancelButtonElement(Document* doc)
{
}
+void SearchFieldCancelButtonElement::detach()
+{
+ if (m_capturing) {
+ if (Frame* frame = document()->frame())
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
+ }
+ TextControlInnerElement::detach();
+}
+
+
void SearchFieldCancelButtonElement::defaultEventHandler(Event* evt)
{
// If the element is visible, on mouseup, clear the value, and set selection
diff --git a/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.h b/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.h
index 9e81ada..f72ddf2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.h
+++ b/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.h
@@ -32,8 +32,7 @@ namespace WebCore {
class String;
-class TextControlInnerElement : public HTMLDivElement
-{
+class TextControlInnerElement : public HTMLDivElement {
public:
TextControlInnerElement(Document*, Node* shadowParent = 0);
@@ -64,6 +63,7 @@ class SearchFieldCancelButtonElement : public TextControlInnerElement {
public:
SearchFieldCancelButtonElement(Document*);
virtual void defaultEventHandler(Event*);
+ virtual void detach();
private:
bool m_capturing;
};
diff --git a/src/3rdparty/webkit/WebCore/rendering/bidi.h b/src/3rdparty/webkit/WebCore/rendering/bidi.h
deleted file mode 100644
index 9058eeb..0000000
--- a/src/3rdparty/webkit/WebCore/rendering/bidi.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * This file is part of the html renderer for KDE.
- *
- * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2003 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef bidi_h
-#define bidi_h
-
-#include "BidiResolver.h"
-
-namespace WebCore {
-
-class RenderArena;
-class RenderBlock;
-class RenderObject;
-class InlineBox;
-
-struct BidiRun : BidiCharacterRun {
- BidiRun(int start, int stop, RenderObject* object, BidiContext* context, WTF::Unicode::Direction dir)
- : BidiCharacterRun(start, stop, context, dir)
- , m_object(object)
- , m_box(0)
- {
- }
-
- void destroy();
-
- // Overloaded new operator.
- void* operator new(size_t, RenderArena*) throw();
-
- // Overridden to prevent the normal delete from being called.
- void operator delete(void*, size_t);
-
- BidiRun* next() { return static_cast<BidiRun*>(m_next); }
-
-private:
- // The normal operator new is disallowed.
- void* operator new(size_t) throw();
-
-public:
- RenderObject* m_object;
- InlineBox* m_box;
-};
-
-} // namespace WebCore
-
-#endif // bidi_h
diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp
index e4027db..36255b8 100644
--- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp
@@ -225,6 +225,13 @@ RenderStyle* RenderStyle::addCachedPseudoStyle(PassRefPtr<RenderStyle> pseudo)
return m_cachedPseudoStyle.get();
}
+void RenderStyle::getPseudoStyleCache(PseudoStyleCache& cache) const
+{
+ ASSERT(cache.isEmpty());
+ for (RenderStyle* pseudoStyle = m_cachedPseudoStyle.get(); pseudoStyle; pseudoStyle = pseudoStyle->m_cachedPseudoStyle.get())
+ cache.append(pseudoStyle);
+}
+
bool RenderStyle::inheritedNotEqual(const RenderStyle* other) const
{
return inherited_flags != other->inherited_flags ||
diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h
index 46c91cd..6922c88 100644
--- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h
+++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h
@@ -307,6 +307,9 @@ public:
RenderStyle* getCachedPseudoStyle(PseudoId) const;
RenderStyle* addCachedPseudoStyle(PassRefPtr<RenderStyle>);
+ typedef Vector<RenderStyle*, 10> PseudoStyleCache;
+ void getPseudoStyleCache(PseudoStyleCache&) const;
+
bool affectedByHoverRules() const { return noninherited_flags._affectedByHover; }
bool affectedByActiveRules() const { return noninherited_flags._affectedByActive; }
bool affectedByDragRules() const { return noninherited_flags._affectedByDrag; }
@@ -788,7 +791,7 @@ public:
void setOverflowY(EOverflow v) { noninherited_flags._overflowY = v; }
void setVisibility(EVisibility v) { inherited_flags._visibility = v; }
void setVerticalAlign(EVerticalAlign v) { noninherited_flags._vertical_align = v; }
- void setVerticalAlignLength(Length l) { SET_VAR(box, vertical_align, l ) }
+ void setVerticalAlignLength(Length l) { SET_VAR(box, vertical_align, l) }
void setHasClip(bool b = true) { SET_VAR(visual, hasClip, b) }
void setClipLeft(Length v) { SET_VAR(visual, clip.m_left, v) }
@@ -797,7 +800,7 @@ public:
void setClipBottom(Length v) { SET_VAR(visual, clip.m_bottom, v) }
void setClip(Length top, Length right, Length bottom, Length left);
- void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags._unicodeBidi = b; }
+ void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags._unicodeBidi = b; }
void setClear(EClear v) { noninherited_flags._clear = v; }
void setTableLayout(ETableLayout v) { noninherited_flags._table_layout = v; }
@@ -884,7 +887,7 @@ public:
void setPaddingLeft(Length v) { SET_VAR(surround, padding.m_left, v) }
void setPaddingRight(Length v) { SET_VAR(surround, padding.m_right, v) }
- void setCursor( ECursor c ) { inherited_flags._cursor_style = c; }
+ void setCursor(ECursor c) { inherited_flags._cursor_style = c; }
void addCursor(CachedImage*, const IntPoint& = IntPoint());
void setCursorList(PassRefPtr<CursorList>);
void clearCursorList();
diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h
index 405cf7c..b08dd87 100644
--- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h
+++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h
@@ -69,7 +69,8 @@ enum PseudoId {
SLIDER_THUMB, SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, MEDIA_CONTROLS_PANEL,
MEDIA_CONTROLS_PLAY_BUTTON, MEDIA_CONTROLS_MUTE_BUTTON, MEDIA_CONTROLS_TIMELINE, MEDIA_CONTROLS_TIMELINE_CONTAINER,
MEDIA_CONTROLS_CURRENT_TIME_DISPLAY, MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, MEDIA_CONTROLS_SEEK_BACK_BUTTON,
- MEDIA_CONTROLS_SEEK_FORWARD_BUTTON, MEDIA_CONTROLS_FULLSCREEN_BUTTON,
+ MEDIA_CONTROLS_SEEK_FORWARD_BUTTON, MEDIA_CONTROLS_FULLSCREEN_BUTTON, MEDIA_CONTROLS_REWIND_BUTTON,
+ MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON, MEDIA_CONTROLS_STATUS_DISPLAY,
SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER,
FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON
@@ -109,7 +110,7 @@ enum EVerticalAlign {
TEXT_BOTTOM, TOP, BOTTOM, BASELINE_MIDDLE, LENGTH
};
-enum EClear{
+enum EClear {
CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3
};
diff --git a/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.h b/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.h
index cb504d2..b7bf026 100644
--- a/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.h
+++ b/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.h
@@ -60,13 +60,13 @@
#define SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(Data, Group, Variable, Type, Name, Initial) \
Data* Name() const { return Group->Variable.get(); } \
void set##Type(PassRefPtr<Data> obj) { \
- if(!(Group->Variable == obj)) \
+ if (!(Group->Variable == obj)) \
Group.access()->Variable = obj; \
} \
static Data* initial##Type() { return Initial; }
#define SVG_RS_SET_VARIABLE(Group, Variable, Value) \
- if(!(Group->Variable == Value)) \
+ if (!(Group->Variable == Value)) \
Group.access()->Variable = Value;
namespace WebCore {
diff --git a/src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.h b/src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.h
index 5f1077e..548ca72 100644
--- a/src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.h
+++ b/src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.h
@@ -44,7 +44,7 @@ public:
~StyleInheritedData();
bool operator==(const StyleInheritedData& o) const;
- bool operator!=( const StyleInheritedData& o) const
+ bool operator!=(const StyleInheritedData& o) const
{
return !(*this == o);
}
diff --git a/src/3rdparty/webkit/WebCore/storage/Database.cpp b/src/3rdparty/webkit/WebCore/storage/Database.cpp
index 53bccbe..2292a0a 100644
--- a/src/3rdparty/webkit/WebCore/storage/Database.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/Database.cpp
@@ -40,7 +40,6 @@
#include "DatabaseTracker.h"
#include "Document.h"
#include "ExceptionCode.h"
-#include "FileSystem.h"
#include "Frame.h"
#include "InspectorController.h"
#include "Logging.h"
@@ -48,6 +47,7 @@
#include "Page.h"
#include "OriginQuotaManager.h"
#include "SQLiteDatabase.h"
+#include "SQLiteFileSystem.h"
#include "SQLiteStatement.h"
#include "SQLResultSet.h"
#include <wtf/MainThread.h>
@@ -60,6 +60,9 @@
namespace WebCore {
+// If we sleep for more the 30 seconds while blocked on SQLITE_BUSY, give up.
+static const int maxSqliteBusyWaitTime = 30000;
+
const String& Database::databaseInfoTableName()
{
DEFINE_STATIC_LOCAL(String, name, ("__WebKitDatabaseInfoTable__"));
@@ -132,6 +135,7 @@ Database::Database(Document* document, const String& name, const String& expecte
, m_expectedVersion(expectedVersion)
, m_deleted(false)
, m_stopped(false)
+ , m_opened(false)
{
ASSERT(document);
m_securityOrigin = document->securityOrigin();
@@ -316,7 +320,13 @@ void Database::markAsDeletedAndClose()
void Database::close()
{
- m_sqliteDatabase.close();
+ if (m_opened) {
+ ASSERT(m_document->databaseThread());
+ ASSERT(currentThread() == document()->databaseThread()->getThreadID());
+ m_sqliteDatabase.close();
+ m_document->databaseThread()->recordDatabaseClosed(this);
+ m_opened = false;
+ }
}
void Database::stop()
@@ -338,10 +348,7 @@ void Database::stop()
unsigned long long Database::databaseSize() const
{
- long long size;
- if (!getFileSize(m_filename, size))
- size = 0;
- return size;
+ return SQLiteFileSystem::getDatabaseFileSize(m_filename);
}
unsigned long long Database::maximumSize() const
@@ -426,8 +433,13 @@ bool Database::performOpenAndVerify(ExceptionCode& e)
return false;
}
+ m_opened = true;
+ if (m_document->databaseThread())
+ m_document->databaseThread()->recordDatabaseOpen(this);
+
ASSERT(m_databaseAuthorizer);
m_sqliteDatabase.setAuthorizer(m_databaseAuthorizer);
+ m_sqliteDatabase.setBusyTimeout(maxSqliteBusyWaitTime);
if (!m_sqliteDatabase.tableExists(databaseInfoTableName())) {
if (!m_sqliteDatabase.executeCommand("CREATE TABLE " + databaseInfoTableName() + " (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,value TEXT NOT NULL ON CONFLICT FAIL);")) {
diff --git a/src/3rdparty/webkit/WebCore/storage/Database.h b/src/3rdparty/webkit/WebCore/storage/Database.h
index 385485a..0bdb37b 100644
--- a/src/3rdparty/webkit/WebCore/storage/Database.h
+++ b/src/3rdparty/webkit/WebCore/storage/Database.h
@@ -100,6 +100,7 @@ public:
bool deleted() const { return m_deleted; }
void close();
+ bool opened() const { return m_opened; }
void stop();
bool stopped() const { return m_stopped; }
@@ -141,6 +142,8 @@ private:
bool m_stopped;
+ bool m_opened;
+
SQLiteDatabase m_sqliteDatabase;
RefPtr<DatabaseAuthorizer> m_databaseAuthorizer;
diff --git a/src/3rdparty/webkit/WebCore/storage/DatabaseTask.h b/src/3rdparty/webkit/WebCore/storage/DatabaseTask.h
index a3814d7..4aef892 100644
--- a/src/3rdparty/webkit/WebCore/storage/DatabaseTask.h
+++ b/src/3rdparty/webkit/WebCore/storage/DatabaseTask.h
@@ -45,8 +45,7 @@ class SQLCallback;
class SQLTransaction;
class VersionChangeCallback;
-class DatabaseTask : public ThreadSafeShared<DatabaseTask>
-{
+class DatabaseTask : public ThreadSafeShared<DatabaseTask> {
friend class Database;
public:
virtual ~DatabaseTask();
@@ -76,8 +75,7 @@ private:
OwnPtr<ThreadCondition> m_synchronousCondition;
};
-class DatabaseOpenTask : public DatabaseTask
-{
+class DatabaseOpenTask : public DatabaseTask {
public:
static PassRefPtr<DatabaseOpenTask> create(Database* db) { return adoptRef(new DatabaseOpenTask(db)); }
@@ -96,8 +94,7 @@ private:
bool m_success;
};
-class DatabaseCloseTask : public DatabaseTask
-{
+class DatabaseCloseTask : public DatabaseTask {
public:
static PassRefPtr<DatabaseCloseTask> create(Database* db) { return adoptRef(new DatabaseCloseTask(db)); }
@@ -110,8 +107,7 @@ private:
#endif
};
-class DatabaseTransactionTask : public DatabaseTask
-{
+class DatabaseTransactionTask : public DatabaseTask {
public:
static PassRefPtr<DatabaseTransactionTask> create(PassRefPtr<SQLTransaction> transaction) { return adoptRef(new DatabaseTransactionTask(transaction)); }
@@ -129,8 +125,7 @@ private:
RefPtr<SQLTransaction> m_transaction;
};
-class DatabaseTableNamesTask : public DatabaseTask
-{
+class DatabaseTableNamesTask : public DatabaseTask {
public:
static PassRefPtr<DatabaseTableNamesTask> create(Database* db) { return adoptRef(new DatabaseTableNamesTask(db)); }
diff --git a/src/3rdparty/webkit/WebCore/storage/DatabaseThread.cpp b/src/3rdparty/webkit/WebCore/storage/DatabaseThread.cpp
index fab02a2..b6c9b5d 100644
--- a/src/3rdparty/webkit/WebCore/storage/DatabaseThread.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/DatabaseThread.cpp
@@ -99,6 +99,17 @@ void* DatabaseThread::databaseThread()
LOG(StorageAPI, "About to detach thread %i and clear the ref to DatabaseThread %p, which currently has %i ref(s)", m_threadID, this, refCount());
+ // Close the databases that we ran transactions on. This ensures that if any transactions are still open, they are rolled back and we don't leave the database in an
+ // inconsistent or locked state.
+ if (m_openDatabaseSet.size() > 0) {
+ // As the call to close will modify the original set, we must take a copy to iterate over.
+ DatabaseSet openSetCopy;
+ openSetCopy.swap(m_openDatabaseSet);
+ DatabaseSet::iterator end = openSetCopy.end();
+ for (DatabaseSet::iterator it = openSetCopy.begin(); it != end; ++it)
+ (*it)->close();
+ }
+
// Detach the thread so its resources are no longer of any concern to anyone else
detachThread(m_threadID);
@@ -108,6 +119,22 @@ void* DatabaseThread::databaseThread()
return 0;
}
+void DatabaseThread::recordDatabaseOpen(Database* database)
+{
+ ASSERT(currentThread() == m_threadID);
+ ASSERT(database);
+ ASSERT(!m_openDatabaseSet.contains(database));
+ m_openDatabaseSet.add(database);
+}
+
+void DatabaseThread::recordDatabaseClosed(Database* database)
+{
+ ASSERT(currentThread() == m_threadID);
+ ASSERT(database);
+ ASSERT(m_queue.killed() || m_openDatabaseSet.contains(database));
+ m_openDatabaseSet.remove(database);
+}
+
void DatabaseThread::scheduleTask(PassRefPtr<DatabaseTask> task)
{
m_queue.append(task);
diff --git a/src/3rdparty/webkit/WebCore/storage/DatabaseThread.h b/src/3rdparty/webkit/WebCore/storage/DatabaseThread.h
index 9f13c33..5aab5fd 100644
--- a/src/3rdparty/webkit/WebCore/storage/DatabaseThread.h
+++ b/src/3rdparty/webkit/WebCore/storage/DatabaseThread.h
@@ -56,6 +56,10 @@ public:
void scheduleImmediateTask(PassRefPtr<DatabaseTask>); // This just adds the task to the front of the queue - the caller needs to be extremely careful not to create deadlocks when waiting for completion.
void unscheduleDatabaseTasks(Database*);
+ void recordDatabaseOpen(Database*);
+ void recordDatabaseClosed(Database*);
+ ThreadIdentifier getThreadID() { return m_threadID; }
+
private:
DatabaseThread();
@@ -67,6 +71,10 @@ private:
RefPtr<DatabaseThread> m_selfRef;
MessageQueue<RefPtr<DatabaseTask> > m_queue;
+
+ // This set keeps track of the open databases that have been used on this thread.
+ typedef HashSet<RefPtr<Database> > DatabaseSet;
+ DatabaseSet m_openDatabaseSet;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp b/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp
index 9311bc6..4a64fe6 100644
--- a/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp
@@ -35,12 +35,12 @@
#include "Database.h"
#include "DatabaseTrackerClient.h"
#include "Document.h"
-#include "FileSystem.h"
#include "Logging.h"
#include "OriginQuotaManager.h"
#include "Page.h"
#include "SecurityOrigin.h"
#include "SecurityOriginHash.h"
+#include "SQLiteFileSystem.h"
#include "SQLiteStatement.h"
#include <wtf/MainThread.h>
#include <wtf/StdLibExtras.h>
@@ -69,6 +69,7 @@ DatabaseTracker::DatabaseTracker()
, m_thread(currentThread())
#endif
{
+ SQLiteFileSystem::registerSQLiteVFS();
}
void DatabaseTracker::setDatabaseDirectoryPath(const String& path)
@@ -87,9 +88,7 @@ const String& DatabaseTracker::databaseDirectoryPath() const
String DatabaseTracker::trackerDatabasePath() const
{
ASSERT(currentThread() == m_thread);
- if (m_databaseDirectoryPath.isEmpty())
- return String();
- return pathByAppendingComponent(m_databaseDirectoryPath, "Databases.db");
+ return SQLiteFileSystem::appendDatabaseFileNameToPath(m_databaseDirectoryPath, "Databases.db");
}
void DatabaseTracker::openTrackerDatabase(bool createIfDoesNotExist)
@@ -100,13 +99,9 @@ void DatabaseTracker::openTrackerDatabase(bool createIfDoesNotExist)
return;
String databasePath = trackerDatabasePath();
- if (databasePath.isEmpty())
- return;
-
- if (!createIfDoesNotExist && !fileExists(databasePath))
+ if (!SQLiteFileSystem::ensureDatabaseFileExists(databasePath, createIfDoesNotExist))
return;
- makeAllDirectories(m_databaseDirectoryPath);
if (!m_database.open(databasePath)) {
// FIXME: What do do here?
return;
@@ -190,9 +185,7 @@ bool DatabaseTracker::hasEntryForDatabase(SecurityOrigin* origin, const String&
String DatabaseTracker::originPath(SecurityOrigin* origin) const
{
ASSERT(currentThread() == m_thread);
- if (m_databaseDirectoryPath.isEmpty())
- return String();
- return pathByAppendingComponent(m_databaseDirectoryPath, origin->databaseIdentifier());
+ return SQLiteFileSystem::appendDatabaseFileNameToPath(m_databaseDirectoryPath, origin->databaseIdentifier());
}
String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String& name, bool createIfNotExists)
@@ -206,7 +199,7 @@ String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String
String originPath = this->originPath(origin);
// Make sure the path for this SecurityOrigin exists
- if (createIfNotExists && !makeAllDirectories(originPath))
+ if (createIfNotExists && !SQLiteFileSystem::ensureDatabaseDirectoryExists(originPath))
return String();
// See if we have a path for this database yet
@@ -224,7 +217,7 @@ String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String
int result = statement.step();
if (result == SQLResultRow)
- return pathByAppendingComponent(originPath, statement.getColumnText(0));
+ return SQLiteFileSystem::appendDatabaseFileNameToPath(originPath, statement.getColumnText(0));
if (!createIfNotExists)
return String();
@@ -241,33 +234,20 @@ String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String
return String();
result = sequenceStatement.step();
- // This has a range of 2^63 and starts at 0 for every time a user resets Safari -
- // I can't imagine it'd over overflow
- int64_t seq = 0;
- if (result == SQLResultRow) {
- seq = sequenceStatement.getColumnInt64(0);
- } else if (result != SQLResultDone)
- return String();
- sequenceStatement.finalize();
-
- String filename;
- do {
- ++seq;
- filename = pathByAppendingComponent(originPath, String::format("%016llx.db", seq));
- } while (fileExists(filename));
-
- if (!addDatabase(origin, name, String::format("%016llx.db", seq)))
+ String fileName = SQLiteFileSystem::getFileNameForNewDatabase(originPath, origin->databaseIdentifier(), name, &m_database);
+ if (!addDatabase(origin, name, fileName))
return String();
// If this origin's quota is being tracked (open handle to a database in this origin), add this new database
// to the quota manager now
+ String fullFilePath = SQLiteFileSystem::appendDatabaseFileNameToPath(originPath, fileName);
{
Locker<OriginQuotaManager> locker(originQuotaManager());
if (originQuotaManager().tracksOrigin(origin))
- originQuotaManager().addDatabase(origin, name, filename);
+ originQuotaManager().addDatabase(origin, name, fullFilePath);
}
- return filename;
+ return fullFilePath;
}
void DatabaseTracker::populateOrigins()
@@ -423,8 +403,7 @@ unsigned long long DatabaseTracker::usageForDatabase(const String& name, Securit
if (path.isEmpty())
return 0;
- long long size;
- return getFileSize(path, size) ? size : 0;
+ return SQLiteFileSystem::getDatabaseFileSize(path);
}
void DatabaseTracker::addOpenDatabase(Database* database)
@@ -665,7 +644,7 @@ void DatabaseTracker::deleteOrigin(SecurityOrigin* origin)
return;
}
- deleteEmptyDirectory(originPath(origin));
+ SQLiteFileSystem::deleteEmptyDatabaseDirectory(originPath(origin));
RefPtr<SecurityOrigin> originPossiblyLastReference = origin;
{
@@ -679,8 +658,8 @@ void DatabaseTracker::deleteOrigin(SecurityOrigin* origin)
if (m_quotaMap->isEmpty()) {
if (m_database.isOpen())
m_database.close();
- deleteFile(trackerDatabasePath());
- deleteEmptyDirectory(m_databaseDirectoryPath);
+ SQLiteFileSystem::deleteDatabaseFile(trackerDatabasePath());
+ SQLiteFileSystem::deleteEmptyDatabaseDirectory(m_databaseDirectoryPath);
}
}
@@ -763,7 +742,7 @@ bool DatabaseTracker::deleteDatabaseFile(SecurityOrigin* origin, const String& n
for (unsigned i = 0; i < deletedDatabases.size(); ++i)
deletedDatabases[i]->markAsDeletedAndClose();
- return deleteFile(fullPath);
+ return SQLiteFileSystem::deleteDatabaseFile(fullPath);
}
void DatabaseTracker::setClient(DatabaseTrackerClient* client)
diff --git a/src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.cpp b/src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.cpp
index 211ba69..5f4957f 100644
--- a/src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.cpp
@@ -30,7 +30,7 @@
#if ENABLE(DATABASE)
-#include "FileSystem.h"
+#include "SQLiteFileSystem.h"
namespace WebCore {
@@ -82,13 +82,9 @@ unsigned long long OriginUsageRecord::diskUsage()
const String& path = m_databaseMap.get(*iUnknown).filename;
ASSERT(!path.isEmpty());
- long long size;
- if (getFileSize(path, size))
- m_databaseMap.set(*iUnknown, DatabaseEntry(path, size));
- else {
- // When we can't determine the file size, we'll just have to assume the file is missing/inaccessible.
- m_databaseMap.set(*iUnknown, DatabaseEntry(path, 0));
- }
+ // When we can't determine the file size, we'll just have to assume the file is missing/inaccessible.
+ long long size = SQLiteFileSystem::getDatabaseFileSize(path);
+ m_databaseMap.set(*iUnknown, DatabaseEntry(path, size));
}
m_unknownSet.clear();
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp b/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp
index ac41447..11b3517 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp
@@ -26,228 +26,19 @@
#include "config.h"
#include "StorageArea.h"
+#if PLATFORM(CHROMIUM)
+#error "Chromium should not compile this file and instead define its own version of these factories that navigate the multi-process boundry."
+#endif
+
#if ENABLE(DOM_STORAGE)
-#include "EventNames.h"
-#include "ExceptionCode.h"
-#include "Frame.h"
-#include "Page.h"
-#include "PageGroup.h"
-#include "SecurityOrigin.h"
-#include "Settings.h"
-#include "StorageEvent.h"
-#include "StorageAreaSync.h"
-#include "StorageMap.h"
-#include "StorageSyncManager.h"
+#include "StorageAreaImpl.h"
namespace WebCore {
PassRefPtr<StorageArea> StorageArea::create(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
{
- return adoptRef(new StorageArea(storageType, origin, syncManager));
-}
-
-StorageArea::StorageArea(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
- : m_storageType(storageType)
- , m_securityOrigin(origin)
- , m_storageMap(StorageMap::create())
- , m_storageSyncManager(syncManager)
-#ifndef NDEBUG
- , m_isShutdown(false)
-#endif
-{
- ASSERT(m_securityOrigin);
- ASSERT(m_storageMap);
-
- // FIXME: If there's no backing storage for LocalStorage, the default WebKit behavior should be that of private browsing,
- // not silently ignoring it. https://bugs.webkit.org/show_bug.cgi?id=25894
- if (m_storageSyncManager) {
- m_storageAreaSync = StorageAreaSync::create(m_storageSyncManager, this);
- ASSERT(m_storageAreaSync);
- }
-}
-
-PassRefPtr<StorageArea> StorageArea::copy(SecurityOrigin* origin)
-{
- ASSERT(!m_isShutdown);
- return adoptRef(new StorageArea(origin, this));
-}
-
-StorageArea::StorageArea(SecurityOrigin* origin, StorageArea* area)
- : m_storageType(area->m_storageType)
- , m_securityOrigin(origin)
- , m_storageMap(area->m_storageMap)
- , m_storageSyncManager(area->m_storageSyncManager)
-#ifndef NDEBUG
- , m_isShutdown(area->m_isShutdown)
-#endif
-{
- ASSERT(m_securityOrigin);
- ASSERT(m_storageMap);
- ASSERT(!m_isShutdown);
-}
-
-unsigned StorageArea::length() const
-{
- ASSERT(!m_isShutdown);
- return m_storageMap->length();
-}
-
-String StorageArea::key(unsigned index, ExceptionCode& ec) const
-{
- ASSERT(!m_isShutdown);
- blockUntilImportComplete();
-
- String key;
-
- if (!m_storageMap->key(index, key)) {
- ec = INDEX_SIZE_ERR;
- return String();
- }
-
- return key;
-}
-
-String StorageArea::getItem(const String& key) const
-{
- ASSERT(!m_isShutdown);
- blockUntilImportComplete();
-
- return m_storageMap->getItem(key);
-}
-
-void StorageArea::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
-{
- ASSERT(!m_isShutdown);
- ASSERT(!value.isNull());
- blockUntilImportComplete();
-
- if (frame->page()->settings()->privateBrowsingEnabled()) {
- ec = QUOTA_EXCEEDED_ERR;
- return;
- }
-
- // FIXME: For LocalStorage where a disk quota will be enforced, here is where we need to do quota checking.
- // If we decide to enforce a memory quota for SessionStorage, this is where we'd do that, also.
- // if (<over quota>) {
- // ec = QUOTA_EXCEEDED_ERR;
- // return;
- // }
-
- String oldValue;
- RefPtr<StorageMap> newMap = m_storageMap->setItem(key, value, oldValue);
-
- if (newMap)
- m_storageMap = newMap.release();
-
- // Only notify the client if an item was actually changed
- if (oldValue != value) {
- if (m_storageAreaSync)
- m_storageAreaSync->scheduleItemForSync(key, value);
- dispatchStorageEvent(key, oldValue, value, frame);
- }
-}
-
-void StorageArea::removeItem(const String& key, Frame* frame)
-{
- ASSERT(!m_isShutdown);
- blockUntilImportComplete();
-
- if (frame->page()->settings()->privateBrowsingEnabled())
- return;
-
- String oldValue;
- RefPtr<StorageMap> newMap = m_storageMap->removeItem(key, oldValue);
- if (newMap)
- m_storageMap = newMap.release();
-
- // Only notify the client if an item was actually removed
- if (!oldValue.isNull()) {
- if (m_storageAreaSync)
- m_storageAreaSync->scheduleItemForSync(key, String());
- dispatchStorageEvent(key, oldValue, String(), frame);
- }
-}
-
-void StorageArea::clear(Frame* frame)
-{
- ASSERT(!m_isShutdown);
- blockUntilImportComplete();
-
- if (frame->page()->settings()->privateBrowsingEnabled())
- return;
-
- m_storageMap = StorageMap::create();
-
- if (m_storageAreaSync)
- m_storageAreaSync->scheduleClear();
- dispatchStorageEvent(String(), String(), String(), frame);
-}
-
-bool StorageArea::contains(const String& key) const
-{
- ASSERT(!m_isShutdown);
- blockUntilImportComplete();
-
- return m_storageMap->contains(key);
-}
-
-void StorageArea::importItem(const String& key, const String& value)
-{
- ASSERT(!m_isShutdown);
- m_storageMap->importItem(key, value);
-}
-
-void StorageArea::close()
-{
- if (m_storageAreaSync)
- m_storageAreaSync->scheduleFinalSync();
-
-#ifndef NDEBUG
- m_isShutdown = true;
-#endif
-}
-
-void StorageArea::blockUntilImportComplete() const
-{
- if (m_storageAreaSync)
- m_storageAreaSync->blockUntilImportComplete();
-}
-
-void StorageArea::dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame)
-{
- // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree
- // of any given page in the group or mutate the page group itself.
- Vector<RefPtr<Frame> > frames;
-
- // FIXME: When can this occur?
- Page* page = sourceFrame->page();
- if (!page)
- return;
-
- if (m_storageType == SessionStorage) {
- // Send events only to our page.
- for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- if (frame->document()->securityOrigin()->equal(securityOrigin()))
- frames.append(frame);
- }
-
- for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->documentURI(), sourceFrame->domWindow(), frames[i]->domWindow()->sessionStorage()));
- } else {
- // Send events to every page.
- const HashSet<Page*>& pages = page->group().pages();
- HashSet<Page*>::const_iterator end = pages.end();
- for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- if (frame->document()->securityOrigin()->equal(securityOrigin()))
- frames.append(frame);
- }
- }
-
- for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->documentURI(), sourceFrame->domWindow(), frames[i]->domWindow()->localStorage()));
- }
+ return StorageAreaImpl::create(storageType, origin, syncManager);
}
}
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageArea.h b/src/3rdparty/webkit/WebCore/storage/StorageArea.h
index 69e7882..31f716a 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageArea.h
+++ b/src/3rdparty/webkit/WebCore/storage/StorageArea.h
@@ -50,45 +50,27 @@ namespace WebCore {
typedef int ExceptionCode;
enum StorageType { LocalStorage, SessionStorage };
+ // This interface is required for Chromium since these actions need to be proxied between processes.
class StorageArea : public ThreadSafeShared<StorageArea> {
public:
static PassRefPtr<StorageArea> create(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>);
- PassRefPtr<StorageArea> copy(SecurityOrigin*);
+ virtual ~StorageArea() { }
+ virtual PassRefPtr<StorageArea> copy(SecurityOrigin*) = 0;
// The HTML5 DOM Storage API
- unsigned length() const;
- String key(unsigned index, ExceptionCode& ec) const;
- String getItem(const String& key) const;
- void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);
- void removeItem(const String& key, Frame* sourceFrame);
- void clear(Frame* sourceFrame);
+ virtual unsigned length() const = 0;
+ virtual String key(unsigned index, ExceptionCode& ec) const = 0;
+ virtual String getItem(const String& key) const = 0;
+ virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame) = 0;
+ virtual void removeItem(const String& key, Frame* sourceFrame) = 0;
+ virtual void clear(Frame* sourceFrame) = 0;
- bool contains(const String& key) const;
- void close();
+ virtual bool contains(const String& key) const = 0;
+ virtual void close() = 0;
// Could be called from a background thread.
- void importItem(const String& key, const String& value);
- SecurityOrigin* securityOrigin() { return m_securityOrigin.get(); }
-
- protected:
- StorageArea(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>);
- StorageArea(SecurityOrigin*, StorageArea*);
-
- private:
- void blockUntilImportComplete() const;
-
- void dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame);
-
- StorageType m_storageType;
- RefPtr<SecurityOrigin> m_securityOrigin;
- RefPtr<StorageMap> m_storageMap;
-
- RefPtr<StorageAreaSync> m_storageAreaSync;
- RefPtr<StorageSyncManager> m_storageSyncManager;
-
-#ifndef NDEBUG
- bool m_isShutdown;
-#endif
+ virtual void importItem(const String& key, const String& value) = 0;
+ virtual SecurityOrigin* securityOrigin() = 0;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp
new file mode 100644
index 0000000..ba31658
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp
@@ -0,0 +1,266 @@
+/*
+ * Copyright (C) 2008 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 INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "StorageAreaImpl.h"
+
+#if ENABLE(DOM_STORAGE)
+
+#include "DOMWindow.h"
+#include "EventNames.h"
+#include "ExceptionCode.h"
+#include "Frame.h"
+#include "Page.h"
+#include "PageGroup.h"
+#include "SecurityOrigin.h"
+#include "Settings.h"
+#include "StorageEvent.h"
+#include "StorageAreaSync.h"
+#include "StorageMap.h"
+#include "StorageSyncManager.h"
+
+namespace WebCore {
+
+PassRefPtr<StorageArea> StorageAreaImpl::create(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
+{
+ return adoptRef(new StorageAreaImpl(storageType, origin, syncManager));
+}
+
+StorageAreaImpl::~StorageAreaImpl()
+{
+}
+
+StorageAreaImpl::StorageAreaImpl(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
+ : m_storageType(storageType)
+ , m_securityOrigin(origin)
+ , m_storageMap(StorageMap::create())
+ , m_storageSyncManager(syncManager)
+#ifndef NDEBUG
+ , m_isShutdown(false)
+#endif
+{
+ ASSERT(m_securityOrigin);
+ ASSERT(m_storageMap);
+
+ // FIXME: If there's no backing storage for LocalStorage, the default WebKit behavior should be that of private browsing,
+ // not silently ignoring it. https://bugs.webkit.org/show_bug.cgi?id=25894
+ if (m_storageSyncManager) {
+ m_storageAreaSync = StorageAreaSync::create(m_storageSyncManager, this);
+ ASSERT(m_storageAreaSync);
+ }
+}
+
+PassRefPtr<StorageArea> StorageAreaImpl::copy(SecurityOrigin* origin)
+{
+ ASSERT(!m_isShutdown);
+ return adoptRef(new StorageAreaImpl(origin, this));
+}
+
+StorageAreaImpl::StorageAreaImpl(SecurityOrigin* origin, StorageAreaImpl* area)
+ : m_storageType(area->m_storageType)
+ , m_securityOrigin(origin)
+ , m_storageMap(area->m_storageMap)
+ , m_storageSyncManager(area->m_storageSyncManager)
+#ifndef NDEBUG
+ , m_isShutdown(area->m_isShutdown)
+#endif
+{
+ ASSERT(m_securityOrigin);
+ ASSERT(m_storageMap);
+ ASSERT(!m_isShutdown);
+}
+
+unsigned StorageAreaImpl::length() const
+{
+ ASSERT(!m_isShutdown);
+ return m_storageMap->length();
+}
+
+String StorageAreaImpl::key(unsigned index, ExceptionCode& ec) const
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ String key;
+
+ if (!m_storageMap->key(index, key)) {
+ ec = INDEX_SIZE_ERR;
+ return String();
+ }
+
+ return key;
+}
+
+String StorageAreaImpl::getItem(const String& key) const
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ return m_storageMap->getItem(key);
+}
+
+void StorageAreaImpl::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
+{
+ ASSERT(!m_isShutdown);
+ ASSERT(!value.isNull());
+ blockUntilImportComplete();
+
+ if (frame->page()->settings()->privateBrowsingEnabled()) {
+ ec = QUOTA_EXCEEDED_ERR;
+ return;
+ }
+
+ // FIXME: For LocalStorage where a disk quota will be enforced, here is where we need to do quota checking.
+ // If we decide to enforce a memory quota for SessionStorage, this is where we'd do that, also.
+ // if (<over quota>) {
+ // ec = QUOTA_EXCEEDED_ERR;
+ // return;
+ // }
+
+ String oldValue;
+ RefPtr<StorageMap> newMap = m_storageMap->setItem(key, value, oldValue);
+
+ if (newMap)
+ m_storageMap = newMap.release();
+
+ // Only notify the client if an item was actually changed
+ if (oldValue != value) {
+ if (m_storageAreaSync)
+ m_storageAreaSync->scheduleItemForSync(key, value);
+ dispatchStorageEvent(key, oldValue, value, frame);
+ }
+}
+
+void StorageAreaImpl::removeItem(const String& key, Frame* frame)
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ if (frame->page()->settings()->privateBrowsingEnabled())
+ return;
+
+ String oldValue;
+ RefPtr<StorageMap> newMap = m_storageMap->removeItem(key, oldValue);
+ if (newMap)
+ m_storageMap = newMap.release();
+
+ // Only notify the client if an item was actually removed
+ if (!oldValue.isNull()) {
+ if (m_storageAreaSync)
+ m_storageAreaSync->scheduleItemForSync(key, String());
+ dispatchStorageEvent(key, oldValue, String(), frame);
+ }
+}
+
+void StorageAreaImpl::clear(Frame* frame)
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ if (frame->page()->settings()->privateBrowsingEnabled())
+ return;
+
+ m_storageMap = StorageMap::create();
+
+ if (m_storageAreaSync)
+ m_storageAreaSync->scheduleClear();
+ dispatchStorageEvent(String(), String(), String(), frame);
+}
+
+bool StorageAreaImpl::contains(const String& key) const
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ return m_storageMap->contains(key);
+}
+
+void StorageAreaImpl::importItem(const String& key, const String& value)
+{
+ ASSERT(!m_isShutdown);
+ m_storageMap->importItem(key, value);
+}
+
+SecurityOrigin* StorageAreaImpl::securityOrigin()
+{
+ return m_securityOrigin.get();
+}
+
+void StorageAreaImpl::close()
+{
+ if (m_storageAreaSync)
+ m_storageAreaSync->scheduleFinalSync();
+
+#ifndef NDEBUG
+ m_isShutdown = true;
+#endif
+}
+
+void StorageAreaImpl::blockUntilImportComplete() const
+{
+ if (m_storageAreaSync)
+ m_storageAreaSync->blockUntilImportComplete();
+}
+
+void StorageAreaImpl::dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame)
+{
+ // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree
+ // of any given page in the group or mutate the page group itself.
+ Vector<RefPtr<Frame> > frames;
+
+ // FIXME: When can this occur?
+ Page* page = sourceFrame->page();
+ if (!page)
+ return;
+
+ if (m_storageType == SessionStorage) {
+ // Send events only to our page.
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (frame->document()->securityOrigin()->equal(securityOrigin()))
+ frames.append(frame);
+ }
+
+ for (unsigned i = 0; i < frames.size(); ++i)
+ frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->documentURI(), sourceFrame->domWindow(), frames[i]->domWindow()->sessionStorage()));
+ } else {
+ // Send events to every page.
+ const HashSet<Page*>& pages = page->group().pages();
+ HashSet<Page*>::const_iterator end = pages.end();
+ for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (frame->document()->securityOrigin()->equal(securityOrigin()))
+ frames.append(frame);
+ }
+ }
+
+ for (unsigned i = 0; i < frames.size(); ++i)
+ frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->documentURI(), sourceFrame->domWindow(), frames[i]->domWindow()->localStorage()));
+ }
+}
+
+}
+
+#endif // ENABLE(DOM_STORAGE)
+
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h
new file mode 100644
index 0000000..e2d14f1
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2008 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 INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef StorageAreaImpl_h
+#define StorageAreaImpl_h
+
+#if ENABLE(DOM_STORAGE)
+
+#include "StorageArea.h"
+
+namespace WebCore {
+
+ class StorageAreaImpl : public StorageArea {
+ public:
+ static PassRefPtr<StorageArea> create(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>);
+ virtual ~StorageAreaImpl();
+ virtual PassRefPtr<StorageArea> copy(SecurityOrigin*);
+
+ // The HTML5 DOM Storage API
+ virtual unsigned length() const;
+ virtual String key(unsigned index, ExceptionCode& ec) const;
+ virtual String getItem(const String& key) const;
+ virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);
+ virtual void removeItem(const String& key, Frame* sourceFrame);
+ virtual void clear(Frame* sourceFrame);
+
+ virtual bool contains(const String& key) const;
+ virtual void close();
+
+ // Could be called from a background thread.
+ void importItem(const String& key, const String& value);
+ SecurityOrigin* securityOrigin();
+
+ private:
+ StorageAreaImpl(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>);
+ StorageAreaImpl(SecurityOrigin*, StorageAreaImpl*);
+
+ void blockUntilImportComplete() const;
+
+ void dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame);
+
+ StorageType m_storageType;
+ RefPtr<SecurityOrigin> m_securityOrigin;
+ RefPtr<StorageMap> m_storageMap;
+
+ RefPtr<StorageAreaSync> m_storageAreaSync;
+ RefPtr<StorageSyncManager> m_storageSyncManager;
+
+#ifndef NDEBUG
+ bool m_isShutdown;
+#endif
+ };
+
+} // namespace WebCore
+
+#endif // ENABLE(DOM_STORAGE)
+
+#endif // StorageAreaImpl_h
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h b/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h
index fa10e63..a7f1082 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h
+++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h
@@ -37,7 +37,7 @@
namespace WebCore {
class Frame;
- class StorageArea;
+ class StorageArea;
class StorageSyncManager;
class StorageAreaSync : public RefCounted<StorageAreaSync> {
@@ -57,7 +57,6 @@ namespace WebCore {
private:
StorageAreaSync(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageArea> storageArea);
-
void dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame);
Timer<StorageAreaSync> m_syncTimer;
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.cpp b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.cpp
index d8d85a7..6fcae63 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.cpp
@@ -26,104 +26,26 @@
#include "config.h"
#include "StorageNamespace.h"
-#if ENABLE(DOM_STORAGE)
-
-#include <wtf/StdLibExtras.h>
+#include "StorageNamespaceImpl.h"
-namespace WebCore {
+#if PLATFORM(CHROMIUM)
+#error "Chromium should not compile this file and instead define its own version of these factories that navigate the multi-process boundry."
+#endif
-typedef HashMap<String, StorageNamespace*> LocalStorageNamespaceMap;
+#if ENABLE(DOM_STORAGE)
-static LocalStorageNamespaceMap& localStorageNamespaceMap()
-{
- DEFINE_STATIC_LOCAL(LocalStorageNamespaceMap, localStorageNamespaceMap, ());
- return localStorageNamespaceMap;
-}
+namespace WebCore {
PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path)
{
- const String lookupPath = path.isNull() ? String("") : path;
- LocalStorageNamespaceMap::iterator it = localStorageNamespaceMap().find(lookupPath);
- if (it == localStorageNamespaceMap().end()) {
- RefPtr<StorageNamespace> storageNamespace = adoptRef(new StorageNamespace(LocalStorage, lookupPath));
- localStorageNamespaceMap().set(lookupPath, storageNamespace.get());
- return storageNamespace.release();
- }
-
- return it->second;
+ return StorageNamespaceImpl::localStorageNamespace(path);
}
PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
{
- return adoptRef(new StorageNamespace(SessionStorage, String()));
-}
-
-StorageNamespace::StorageNamespace(StorageType storageType, const String& path)
- : m_storageType(storageType)
- , m_path(path.copy()) // FIXME: Is the .copy necessary?
- , m_syncManager(0)
-#ifndef NDEBUG
- , m_isShutdown(false)
-#endif
-{
- if (m_storageType == LocalStorage && !m_path.isEmpty())
- m_syncManager = StorageSyncManager::create(m_path);
-}
-
-StorageNamespace::~StorageNamespace()
-{
- ASSERT(isMainThread());
-
- if (m_storageType == LocalStorage) {
- ASSERT(localStorageNamespaceMap().get(m_path) == this);
- localStorageNamespaceMap().remove(m_path);
- }
-}
-
-PassRefPtr<StorageNamespace> StorageNamespace::copy()
-{
- ASSERT(isMainThread());
- ASSERT(!m_isShutdown);
-
- RefPtr<StorageNamespace> newNamespace = adoptRef(new StorageNamespace(m_storageType, m_path));
-
- StorageAreaMap::iterator end = m_storageAreaMap.end();
- for (StorageAreaMap::iterator i = m_storageAreaMap.begin(); i != end; ++i) {
- RefPtr<StorageArea> areaCopy = i->second->copy(i->first.get());
- newNamespace->m_storageAreaMap.set(i->first, areaCopy.release());
- }
-
- return newNamespace.release();
-}
-
-PassRefPtr<StorageArea> StorageNamespace::storageArea(SecurityOrigin* origin)
-{
- ASSERT(isMainThread());
- ASSERT(!m_isShutdown);
-
- RefPtr<StorageArea> storageArea;
- if (storageArea = m_storageAreaMap.get(origin))
- return storageArea.release();
-
- storageArea = StorageArea::create(m_storageType, origin, m_syncManager);
- m_storageAreaMap.set(origin, storageArea);
- return storageArea.release();
+ return StorageNamespaceImpl::sessionStorageNamespace();
}
-void StorageNamespace::close()
-{
- ASSERT(isMainThread());
- ASSERT(!m_isShutdown);
-
- StorageAreaMap::iterator end = m_storageAreaMap.end();
- for (StorageAreaMap::iterator it = m_storageAreaMap.begin(); it != end; ++it)
- it->second->close();
-
-#ifndef NDEBUG
- m_isShutdown = true;
-#endif
-}
+} // namespace WebCore
#endif // ENABLE(DOM_STORAGE)
-
-} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h
index 5621b01..687cea2 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h
@@ -39,32 +39,16 @@ namespace WebCore {
class StorageArea;
class StorageSyncManager;
+ // This interface is required for Chromium since these actions need to be proxied between processes.
class StorageNamespace : public RefCounted<StorageNamespace> {
public:
- ~StorageNamespace();
-
static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path);
static PassRefPtr<StorageNamespace> sessionStorageNamespace();
- PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
- PassRefPtr<StorageNamespace> copy();
- void close();
-
- private:
- StorageNamespace(StorageType, const String& path);
-
- typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea>, SecurityOriginHash> StorageAreaMap;
- StorageAreaMap m_storageAreaMap;
-
- StorageType m_storageType;
-
- // Only used if m_storageType == LocalStorage and the path was not "" in our constructor.
- String m_path;
- RefPtr<StorageSyncManager> m_syncManager;
-
-#ifndef NDEBUG
- bool m_isShutdown;
-#endif
+ virtual ~StorageNamespace() { }
+ virtual PassRefPtr<StorageArea> storageArea(SecurityOrigin*) = 0;
+ virtual PassRefPtr<StorageNamespace> copy() = 0;
+ virtual void close() = 0;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp
new file mode 100644
index 0000000..39ec27b
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2008 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 INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "StorageNamespaceImpl.h"
+
+#if ENABLE(DOM_STORAGE)
+
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+typedef HashMap<String, StorageNamespace*> LocalStorageNamespaceMap;
+
+static LocalStorageNamespaceMap& localStorageNamespaceMap()
+{
+ DEFINE_STATIC_LOCAL(LocalStorageNamespaceMap, localStorageNamespaceMap, ());
+ return localStorageNamespaceMap;
+}
+
+PassRefPtr<StorageNamespace> StorageNamespaceImpl::localStorageNamespace(const String& path)
+{
+ const String lookupPath = path.isNull() ? String("") : path;
+ LocalStorageNamespaceMap::iterator it = localStorageNamespaceMap().find(lookupPath);
+ if (it == localStorageNamespaceMap().end()) {
+ RefPtr<StorageNamespace> storageNamespace = adoptRef(new StorageNamespaceImpl(LocalStorage, lookupPath));
+ localStorageNamespaceMap().set(lookupPath, storageNamespace.get());
+ return storageNamespace.release();
+ }
+
+ return it->second;
+}
+
+PassRefPtr<StorageNamespace> StorageNamespaceImpl::sessionStorageNamespace()
+{
+ return adoptRef(new StorageNamespaceImpl(SessionStorage, String()));
+}
+
+StorageNamespaceImpl::StorageNamespaceImpl(StorageType storageType, const String& path)
+ : m_storageType(storageType)
+ , m_path(path.copy()) // FIXME: Is the .copy necessary?
+ , m_syncManager(0)
+#ifndef NDEBUG
+ , m_isShutdown(false)
+#endif
+{
+ if (m_storageType == LocalStorage && !m_path.isEmpty())
+ m_syncManager = StorageSyncManager::create(m_path);
+}
+
+StorageNamespaceImpl::~StorageNamespaceImpl()
+{
+ ASSERT(isMainThread());
+
+ if (m_storageType == LocalStorage) {
+ ASSERT(localStorageNamespaceMap().get(m_path) == this);
+ localStorageNamespaceMap().remove(m_path);
+ }
+}
+
+PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy()
+{
+ ASSERT(isMainThread());
+ ASSERT(!m_isShutdown);
+
+ StorageNamespaceImpl* newNamespace = new StorageNamespaceImpl(m_storageType, m_path);
+
+ StorageAreaMap::iterator end = m_storageAreaMap.end();
+ for (StorageAreaMap::iterator i = m_storageAreaMap.begin(); i != end; ++i) {
+ RefPtr<StorageArea> areaCopy = i->second->copy(i->first.get());
+ newNamespace->m_storageAreaMap.set(i->first, areaCopy.release());
+ }
+
+ return adoptRef(newNamespace);
+}
+
+PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(SecurityOrigin* origin)
+{
+ ASSERT(isMainThread());
+ ASSERT(!m_isShutdown);
+
+ RefPtr<StorageArea> storageArea;
+ if (storageArea = m_storageAreaMap.get(origin))
+ return storageArea.release();
+
+ storageArea = StorageArea::create(m_storageType, origin, m_syncManager);
+ m_storageAreaMap.set(origin, storageArea);
+ return storageArea.release();
+}
+
+void StorageNamespaceImpl::close()
+{
+ ASSERT(isMainThread());
+ ASSERT(!m_isShutdown);
+
+ StorageAreaMap::iterator end = m_storageAreaMap.end();
+ for (StorageAreaMap::iterator it = m_storageAreaMap.begin(); it != end; ++it)
+ it->second->close();
+
+#ifndef NDEBUG
+ m_isShutdown = true;
+#endif
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DOM_STORAGE)
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h
new file mode 100644
index 0000000..6c5a9dc
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008 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 INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef StorageNamespaceImpl_h
+#define StorageNamespaceImpl_h
+
+#if ENABLE(DOM_STORAGE)
+
+#include "StorageNamespace.h"
+
+namespace WebCore {
+
+ class StorageNamespaceImpl : public StorageNamespace {
+ public:
+ static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path);
+ static PassRefPtr<StorageNamespace> sessionStorageNamespace();
+
+ virtual ~StorageNamespaceImpl();
+ virtual PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
+ virtual PassRefPtr<StorageNamespace> copy();
+ virtual void close();
+
+ private:
+ StorageNamespaceImpl(StorageType, const String& path);
+
+ typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea>, SecurityOriginHash> StorageAreaMap;
+ StorageAreaMap m_storageAreaMap;
+
+ StorageType m_storageType;
+
+ // Only used if m_storageType == LocalStorage and the path was not "" in our constructor.
+ String m_path;
+ RefPtr<StorageSyncManager> m_syncManager;
+
+#ifndef NDEBUG
+ bool m_isShutdown;
+#endif
+ };
+
+} // namespace WebCore
+
+#endif // ENABLE(DOM_STORAGE)
+
+#endif // StorageNamespaceImpl_h
diff --git a/src/3rdparty/webkit/WebCore/svg/GradientAttributes.h b/src/3rdparty/webkit/WebCore/svg/GradientAttributes.h
index 2d7c32a..6b3408e 100644
--- a/src/3rdparty/webkit/WebCore/svg/GradientAttributes.h
+++ b/src/3rdparty/webkit/WebCore/svg/GradientAttributes.h
@@ -24,8 +24,7 @@
#if ENABLE(SVG)
-namespace WebCore
-{
+namespace WebCore {
struct GradientAttributes {
GradientAttributes()
: m_spreadMethod(SpreadMethodPad)
diff --git a/src/3rdparty/webkit/WebCore/svg/LinearGradientAttributes.h b/src/3rdparty/webkit/WebCore/svg/LinearGradientAttributes.h
index e640c03..fc59465 100644
--- a/src/3rdparty/webkit/WebCore/svg/LinearGradientAttributes.h
+++ b/src/3rdparty/webkit/WebCore/svg/LinearGradientAttributes.h
@@ -26,8 +26,7 @@
#if ENABLE(SVG)
-namespace WebCore
-{
+namespace WebCore {
struct LinearGradientAttributes : GradientAttributes {
LinearGradientAttributes()
: m_x1(0.0)
diff --git a/src/3rdparty/webkit/WebCore/svg/PatternAttributes.h b/src/3rdparty/webkit/WebCore/svg/PatternAttributes.h
index 2940baf..b43d87e 100644
--- a/src/3rdparty/webkit/WebCore/svg/PatternAttributes.h
+++ b/src/3rdparty/webkit/WebCore/svg/PatternAttributes.h
@@ -24,8 +24,7 @@
#if ENABLE(SVG)
-namespace WebCore
-{
+namespace WebCore {
struct PatternAttributes {
PatternAttributes()
: m_x()
diff --git a/src/3rdparty/webkit/WebCore/svg/RadialGradientAttributes.h b/src/3rdparty/webkit/WebCore/svg/RadialGradientAttributes.h
index 782ab49..273cd29 100644
--- a/src/3rdparty/webkit/WebCore/svg/RadialGradientAttributes.h
+++ b/src/3rdparty/webkit/WebCore/svg/RadialGradientAttributes.h
@@ -26,8 +26,7 @@
#if ENABLE(SVG)
-namespace WebCore
-{
+namespace WebCore {
struct RadialGradientAttributes : GradientAttributes {
RadialGradientAttributes()
: m_cx(0.5)
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.h b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.h
index 6b3faf6..88b994b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.h
@@ -25,12 +25,10 @@
#if ENABLE(SVG)
-namespace WebCore
-{
+namespace WebCore {
class SVGPathSegList;
- class SVGAnimatedPathData
- {
+ class SVGAnimatedPathData {
public:
SVGAnimatedPathData();
virtual ~SVGAnimatedPathData();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.h b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.h
index 58323c0..1e61057 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.h
@@ -25,12 +25,10 @@
#if ENABLE(SVG)
-namespace WebCore
-{
+namespace WebCore {
class SVGPointList;
- class SVGAnimatedPoints
- {
+ class SVGAnimatedPoints {
public:
SVGAnimatedPoints();
virtual ~SVGAnimatedPoints();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.h b/src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.h
index 120beb4..d43ed57 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.h
@@ -43,8 +43,7 @@ namespace WebCore {
class SVGAnimationElement : public SVGSMILElement,
public SVGTests,
public SVGExternalResourcesRequired,
- public ElementTimeControl
- {
+ public ElementTimeControl {
public:
SVGAnimationElement(const QualifiedName&, Document*);
virtual ~SVGAnimationElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.h b/src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.h
index ab7ea68..4043554 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.h
@@ -35,8 +35,7 @@ namespace WebCore {
class SVGClipPathElement : public SVGStyledTransformableElement,
public SVGTests,
public SVGLangSpace,
- public SVGExternalResourcesRequired
- {
+ public SVGExternalResourcesRequired {
public:
SVGClipPathElement(const QualifiedName&, Document*);
virtual ~SVGClipPathElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.cpp b/src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.cpp
index d7169e1..61645f4 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.cpp
@@ -89,13 +89,13 @@ void SVGDocumentExtensions::unpauseAnimations()
void SVGDocumentExtensions::reportWarning(const String& message)
{
if (Frame* frame = m_doc->frame())
- frame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, "Warning: " + message, m_doc->tokenizer() ? m_doc->tokenizer()->lineNumber() : 1, String());
+ frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Warning: " + message, m_doc->tokenizer() ? m_doc->tokenizer()->lineNumber() : 1, String());
}
void SVGDocumentExtensions::reportError(const String& message)
{
if (Frame* frame = m_doc->frame())
- frame->domWindow()->console()->addMessage(JSMessageSource, ErrorMessageLevel, "Error: " + message, m_doc->tokenizer() ? m_doc->tokenizer()->lineNumber() : 1, String());
+ frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error: " + message, m_doc->tokenizer() ? m_doc->tokenizer()->lineNumber() : 1, String());
}
void SVGDocumentExtensions::addPendingResource(const AtomicString& id, SVGStyledElement* obj)
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h b/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h
index 7c56792..c477718 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h
@@ -44,8 +44,7 @@ namespace WebCore {
// SVGElementInstance mimics Node, but without providing all its functionality
class SVGElementInstance : public TreeShared<SVGElementInstance>,
- public EventTarget
- {
+ public EventTarget {
public:
SVGElementInstance(SVGUseElement*, SVGElement* originalElement);
virtual ~SVGElementInstance();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.idl b/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.idl
index 3d88178..cd4213c 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.idl
+++ b/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.idl
@@ -31,7 +31,7 @@ module svg {
CustomListeners,
CustomMarkFunction,
CustomPushEventHandlerScope,
- GenerateToJS,
+ CustomToJS,
GenerateNativeConverter
] SVGElementInstance
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.cpp
index f78412c..0497ea9 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.cpp
@@ -69,7 +69,7 @@ bool SVGFEBlendElement::build(SVGResourceFilter* filterResource)
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
FilterEffect* input2 = filterResource->builder()->getEffectById(in2());
- if(!input1 || !input2)
+ if (!input1 || !input2)
return false;
RefPtr<FilterEffect> effect = FEBlend::create(input1, input2, static_cast<BlendModeType>(mode()));
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.h
index 70e5e06..bed649f 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.h
@@ -27,10 +27,8 @@
#include "FEBlend.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
-namespace WebCore
-{
- class SVGFEBlendElement : public SVGFilterPrimitiveStandardAttributes
- {
+namespace WebCore {
+ class SVGFEBlendElement : public SVGFilterPrimitiveStandardAttributes {
public:
SVGFEBlendElement(const QualifiedName&, Document*);
virtual ~SVGFEBlendElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.cpp
index 660f000..c2d605b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.cpp
@@ -69,7 +69,7 @@ bool SVGFEColorMatrixElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
Vector<float> _values;
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.cpp
index cad60dc..691d5cd 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.cpp
@@ -60,7 +60,7 @@ bool SVGFEComponentTransferElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
ComponentTransferFunction red;
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.cpp
index 2205243..6eec6ea 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.cpp
@@ -85,7 +85,7 @@ bool SVGFECompositeElement::build(SVGResourceFilter* filterResource)
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
FilterEffect* input2 = filterResource->builder()->getEffectById(in2());
- if(!input1 || !input2)
+ if (!input1 || !input2)
return false;
RefPtr<FilterEffect> effect = FEComposite::create(input1, input2, static_cast<CompositeOperationType>(_operator()),
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.cpp
index 00ff55a..edbd852 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.cpp
@@ -75,7 +75,7 @@ bool SVGFEDiffuseLightingElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
RefPtr<RenderStyle> filterStyle = styleForRenderer();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.cpp
index 8ac668c..adf02fe 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.cpp
@@ -77,7 +77,7 @@ bool SVGFEDisplacementMapElement::build(SVGResourceFilter* filterResource)
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
FilterEffect* input2 = filterResource->builder()->getEffectById(in2());
- if(!input1 || !input2)
+ if (!input1 || !input2)
return false;
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.h
index e340549..95f45c8 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.h
@@ -23,10 +23,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFELightElement.h"
-namespace WebCore
-{
- class SVGFEDistantLightElement : public SVGFELightElement
- {
+namespace WebCore {
+ class SVGFEDistantLightElement : public SVGFELightElement {
public:
SVGFEDistantLightElement(const QualifiedName&, Document*);
virtual ~SVGFEDistantLightElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.cpp
index e12b4e1..ae5ce94 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.cpp
@@ -55,7 +55,7 @@ bool SVGFEFloodElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input = filterResource->builder()->getEffectById(in1());
- if(!input)
+ if (!input)
return false;
RefPtr<RenderStyle> filterStyle = styleForRenderer();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.h
index 4a4cffc..ca4e18b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.h
@@ -27,10 +27,8 @@
#include "SVGFEFlood.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
-namespace WebCore
-{
- class SVGFEFloodElement : public SVGFilterPrimitiveStandardAttributes
- {
+namespace WebCore {
+ class SVGFEFloodElement : public SVGFilterPrimitiveStandardAttributes {
public:
SVGFEFloodElement(const QualifiedName&, Document*);
virtual ~SVGFEFloodElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.h
index 2c24039..8ec6b1c 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.h
@@ -26,10 +26,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGComponentTransferFunctionElement.h"
-namespace WebCore
-{
- class SVGFEFuncAElement : public SVGComponentTransferFunctionElement
- {
+namespace WebCore {
+ class SVGFEFuncAElement : public SVGComponentTransferFunctionElement {
public:
SVGFEFuncAElement(const QualifiedName&, Document*);
virtual ~SVGFEFuncAElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.h
index 1eb0889..5d86f87 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.h
@@ -26,10 +26,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGComponentTransferFunctionElement.h"
-namespace WebCore
-{
- class SVGFEFuncBElement : public SVGComponentTransferFunctionElement
- {
+namespace WebCore {
+ class SVGFEFuncBElement : public SVGComponentTransferFunctionElement {
public:
SVGFEFuncBElement(const QualifiedName&, Document*);
virtual ~SVGFEFuncBElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.h
index 973360e..9f5d3d7 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.h
@@ -26,10 +26,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGComponentTransferFunctionElement.h"
-namespace WebCore
-{
- class SVGFEFuncGElement : public SVGComponentTransferFunctionElement
- {
+namespace WebCore {
+ class SVGFEFuncGElement : public SVGComponentTransferFunctionElement {
public:
SVGFEFuncGElement(const QualifiedName&, Document*);
virtual ~SVGFEFuncGElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.h
index 3553954..0a0d115 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.h
@@ -26,10 +26,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGComponentTransferFunctionElement.h"
-namespace WebCore
-{
- class SVGFEFuncRElement : public SVGComponentTransferFunctionElement
- {
+namespace WebCore {
+ class SVGFEFuncRElement : public SVGComponentTransferFunctionElement {
public:
SVGFEFuncRElement(const QualifiedName&, Document*);
virtual ~SVGFEFuncRElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.cpp
index be3554f..4cddb5a 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.cpp
@@ -71,7 +71,7 @@ bool SVGFEGaussianBlurElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
RefPtr<FilterEffect> effect = FEGaussianBlur::create(input1, stdDeviationX(), stdDeviationY());
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.cpp
index ae69e0d..8122960 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.cpp
@@ -86,7 +86,7 @@ void SVGFEImageElement::notifyFinished(CachedResource*)
bool SVGFEImageElement::build(SVGResourceFilter* filterResource)
{
- if(!m_cachedImage)
+ if (!m_cachedImage)
return false;
RefPtr<FilterEffect> effect = FEImage::create(m_cachedImage.get());
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.cpp
index 0640066..cb3a781 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.cpp
@@ -49,7 +49,7 @@ bool SVGFEMergeElement::build(SVGResourceFilter* filterResource)
}
}
- if(mergeInputs.isEmpty())
+ if (mergeInputs.isEmpty())
return false;
RefPtr<FilterEffect> effect = FEMerge::create(mergeInputs);
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.cpp
index c7e4e77..945a9da 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.cpp
@@ -60,7 +60,7 @@ bool SVGFEOffsetElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
RefPtr<FilterEffect> effect = FEOffset::create(input1, dx(), dy());
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.h
index edb9f9d..b39fffa 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.h
@@ -23,10 +23,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFELightElement.h"
-namespace WebCore
-{
- class SVGFEPointLightElement : public SVGFELightElement
- {
+namespace WebCore {
+ class SVGFEPointLightElement : public SVGFELightElement {
public:
SVGFEPointLightElement(const QualifiedName&, Document*);
virtual ~SVGFEPointLightElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.cpp
index 36dd453..7afa4cc 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.cpp
@@ -90,7 +90,7 @@ bool SVGFESpecularLightingElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
RefPtr<RenderStyle> filterStyle = styleForRenderer();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.h b/src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.h
index 629e51a..440c664 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.h
@@ -23,10 +23,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFELightElement.h"
-namespace WebCore
-{
- class SVGFESpotLightElement : public SVGFELightElement
- {
+namespace WebCore {
+ class SVGFESpotLightElement : public SVGFELightElement {
public:
SVGFESpotLightElement(const QualifiedName&, Document*);
virtual ~SVGFESpotLightElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFETileElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFETileElement.cpp
index d5828eb..14af25f 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFETileElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFETileElement.cpp
@@ -55,7 +55,7 @@ bool SVGFETileElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
- if(!input1)
+ if (!input1)
return false;
RefPtr<FilterEffect> effect = FETile::create(input1);
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp
index 17c110c..cb31178 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp
@@ -59,8 +59,7 @@ void SVGLineElement::parseMappedAttribute(MappedAttribute* attr)
setX2BaseValue(SVGLength(LengthModeWidth, attr->value()));
else if (attr->name() == SVGNames::y2Attr)
setY2BaseValue(SVGLength(LengthModeHeight, attr->value()));
- else
- {
+ else {
if (SVGTests::parseMappedAttribute(attr))
return;
if (SVGLangSpace::parseMappedAttribute(attr))
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGList.h b/src/3rdparty/webkit/WebCore/svg/SVGList.h
index 5381598..c04c200 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGList.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGList.h
@@ -165,8 +165,7 @@ namespace WebCore {
};
template<typename Item>
- class SVGPODList : public SVGList<RefPtr<SVGPODListItem<Item> > >
- {
+ class SVGPODList : public SVGList<RefPtr<SVGPODListItem<Item> > > {
public:
Item initialize(Item newItem, ExceptionCode& ec)
{
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGListTraits.h b/src/3rdparty/webkit/WebCore/svg/SVGListTraits.h
index b028ad5..d96bc67 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGListTraits.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGListTraits.h
@@ -34,14 +34,12 @@ namespace WebCore {
struct SVGListTraits { };
template<typename Item>
- struct SVGListTraits<true, Item>
- {
+ struct SVGListTraits<true, Item> {
static Item nullItem() { return Item(); }
};
template<>
- struct SVGListTraits<false, double>
- {
+ struct SVGListTraits<false, double> {
static double nullItem() { return 0.0; }
};
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h b/src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h
index 1e84cc7..988cead 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h
@@ -32,8 +32,7 @@ namespace WebCore {
class SVGMPathElement : public SVGElement,
SVGURIReference,
- SVGExternalResourcesRequired
- {
+ SVGExternalResourcesRequired {
public:
SVGMPathElement(const QualifiedName&, Document*);
virtual ~SVGMPathElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.h b/src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.h
index 4bd87d6..63d0aae 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.h
@@ -26,10 +26,8 @@
#include "SVGElement.h"
-namespace WebCore
-{
- class SVGMetadataElement : public SVGElement
- {
+namespace WebCore {
+ class SVGMetadataElement : public SVGElement {
public:
SVGMetadataElement(const QualifiedName&, Document*);
virtual ~SVGMetadataElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.cpp b/src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.cpp
index 7d93f59..6f696e6 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.cpp
@@ -246,7 +246,7 @@ bool SVGPathParser::parseSVG(const String& s, bool process)
bool relative = false;
- switch(command)
+ switch (command)
{
case 'm':
relative = true;
@@ -625,7 +625,7 @@ void SVGPathParser::calculateArc(bool relative, double& curx, double& cury, doub
n_segs = (int) (int) ceil(fabs(th_arc / (piDouble * 0.5 + 0.001)));
- for(i = 0; i < n_segs; i++) {
+ for (i = 0; i < n_segs; i++) {
double sin_th, cos_th;
double a00, a01, a10, a11;
double x1, y1, x2, y2, x3, y3;
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGPathElement.h b/src/3rdparty/webkit/WebCore/svg/SVGPathElement.h
index a39e628..362a85b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGPathElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGPathElement.h
@@ -56,8 +56,7 @@ namespace WebCore {
public SVGTests,
public SVGLangSpace,
public SVGExternalResourcesRequired,
- public SVGAnimatedPathData
- {
+ public SVGAnimatedPathData {
public:
SVGPathElement(const QualifiedName&, Document*);
virtual ~SVGPathElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl b/src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl
index 597b01d..6754d2a 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl
+++ b/src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor, Polymorphic] SVGPathSeg {
+ interface [Conditional=SVG, CustomToJS, GenerateConstructor, Polymorphic] SVGPathSeg {
// Path Segment Types
const unsigned short PATHSEG_UNKNOWN = 0;
const unsigned short PATHSEG_CLOSEPATH = 1;
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.h b/src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.h
index eb74dea..190af9e 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.h
@@ -27,10 +27,8 @@
#include "SVGPathSeg.h"
-namespace WebCore
-{
- class SVGPathSegClosePath : public SVGPathSeg
- {
+namespace WebCore {
+ class SVGPathSegClosePath : public SVGPathSeg {
public:
static PassRefPtr<SVGPathSegClosePath> create() { return adoptRef(new SVGPathSegClosePath); }
virtual ~SVGPathSegClosePath();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h b/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h
index fe8575b..f92ed72 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h
@@ -33,8 +33,7 @@
#include "SVGTests.h"
#include "SVGZoomAndPan.h"
-namespace WebCore
-{
+namespace WebCore {
class SVGAngle;
class SVGLength;
class SVGTransform;
@@ -46,8 +45,7 @@ namespace WebCore
public SVGLangSpace,
public SVGExternalResourcesRequired,
public SVGFitToViewBox,
- public SVGZoomAndPan
- {
+ public SVGZoomAndPan {
public:
SVGSVGElement(const QualifiedName&, Document*);
virtual ~SVGSVGElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGSetElement.h b/src/3rdparty/webkit/WebCore/svg/SVGSetElement.h
index d47e003..fda6919 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGSetElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGSetElement.h
@@ -26,11 +26,9 @@
#include "SVGAnimateElement.h"
-namespace WebCore
-{
+namespace WebCore {
// SVGAnimateElement implements superset of the functionality.
- class SVGSetElement : public SVGAnimateElement
- {
+ class SVGSetElement : public SVGAnimateElement {
public:
SVGSetElement(const QualifiedName&, Document*);
};
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h b/src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h
index 82153d9..a2be835 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h
@@ -29,13 +29,11 @@
#include "SVGStyledTransformableElement.h"
#include "SVGTests.h"
-namespace WebCore
-{
+namespace WebCore {
class SVGSwitchElement : public SVGStyledTransformableElement,
public SVGTests,
public SVGLangSpace,
- public SVGExternalResourcesRequired
- {
+ public SVGExternalResourcesRequired {
public:
SVGSwitchElement(const QualifiedName&, Document*);
virtual ~SVGSwitchElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.cpp
index 0d8560a..54a4aa2 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.cpp
@@ -57,7 +57,7 @@ void SVGTextPathElement::parseMappedAttribute(MappedAttribute* attr)
else if (attr->name() == SVGNames::methodAttr) {
if (value == "align")
setSpacingBaseValue(SVG_TEXTPATH_METHODTYPE_ALIGN);
- else if(value == "stretch")
+ else if (value == "stretch")
setSpacingBaseValue(SVG_TEXTPATH_METHODTYPE_STRETCH);
} else if (attr->name() == SVGNames::spacingAttr) {
if (value == "auto")
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.h b/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.h
index e1dd938..4e8899a 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.h
@@ -27,8 +27,7 @@
#include "SVGURIReference.h"
-namespace WebCore
-{
+namespace WebCore {
enum SVGTextPathMethodType {
SVG_TEXTPATH_METHODTYPE_UNKNOWN = 0,
SVG_TEXTPATH_METHODTYPE_ALIGN = 1,
@@ -42,8 +41,7 @@ namespace WebCore
};
class SVGTextPathElement : public SVGTextContentElement,
- public SVGURIReference
- {
+ public SVGURIReference {
public:
// Forward declare these enums in the w3c naming scheme, for IDL generation
enum {
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h b/src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h
index cd4768c..e053a42 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h
@@ -27,11 +27,9 @@
#include "SVGLangSpace.h"
#include "SVGStyledElement.h"
-namespace WebCore
-{
+namespace WebCore {
class SVGTitleElement : public SVGStyledElement,
- public SVGLangSpace
- {
+ public SVGLangSpace {
public:
SVGTitleElement(const QualifiedName&, Document*);
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.cpp b/src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.cpp
index 34adc63..00b5387 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.cpp
@@ -35,6 +35,8 @@ namespace WebCore {
SVGTransformDistance::SVGTransformDistance()
: m_type(SVGTransform::SVG_TRANSFORM_UNKNOWN)
, m_angle(0)
+ , m_cx(0)
+ , m_cy(0)
{
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTransformList.cpp b/src/3rdparty/webkit/WebCore/svg/SVGTransformList.cpp
index ed457f4..648f1e9 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTransformList.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTransformList.cpp
@@ -26,7 +26,6 @@
#include "TransformationMatrix.h"
#include "SVGTransform.h"
#include "SVGSVGElement.h"
-#include "SVGTransformDistance.h"
#include "SVGTransformList.h"
using namespace WebCore;
@@ -65,23 +64,6 @@ SVGTransform SVGTransformList::concatenate() const
return SVGTransform(matrix);
}
-SVGTransform SVGTransformList::concatenateForType(SVGTransform::SVGTransformType type) const
-{
- unsigned int length = numberOfItems();
- if (!length)
- return SVGTransform();
-
- ExceptionCode ec = 0;
- SVGTransformDistance totalTransform;
- for (unsigned int i = 0; i < length; i++) {
- const SVGTransform& transform = getItem(i, ec);
- if (transform.type() == type)
- totalTransform.addSVGTransform(transform);
- }
-
- return totalTransform.addToSVGTransform(SVGTransform());
-}
-
String SVGTransformList::valueAsString() const
{
// TODO: We may want to build a real transform string, instead of concatting to a matrix(...).
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTransformList.h b/src/3rdparty/webkit/WebCore/svg/SVGTransformList.h
index 442016b..d095fe4 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTransformList.h
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTransformList.h
@@ -42,7 +42,6 @@ namespace WebCore {
// Internal use only
SVGTransform concatenate() const;
- SVGTransform concatenateForType(SVGTransform::SVGTransformType) const;
String valueAsString() const;
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGTransformable.cpp b/src/3rdparty/webkit/WebCore/svg/SVGTransformable.cpp
index 6dbfc1a..17344ea 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGTransformable.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGTransformable.cpp
@@ -154,12 +154,12 @@ bool SVGTransformable::parseTransformValue(unsigned type, const UChar*& ptr, con
return true;
}
-static const UChar skewXDesc[] = {'s','k','e','w', 'X'};
-static const UChar skewYDesc[] = {'s','k','e','w', 'Y'};
-static const UChar scaleDesc[] = {'s','c','a','l', 'e'};
-static const UChar translateDesc[] = {'t','r','a','n', 's', 'l', 'a', 't', 'e'};
-static const UChar rotateDesc[] = {'r','o','t','a', 't', 'e'};
-static const UChar matrixDesc[] = {'m','a','t','r', 'i', 'x'};
+static const UChar skewXDesc[] = {'s', 'k', 'e', 'w', 'X'};
+static const UChar skewYDesc[] = {'s', 'k', 'e', 'w', 'Y'};
+static const UChar scaleDesc[] = {'s', 'c', 'a', 'l', 'e'};
+static const UChar translateDesc[] = {'t', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e'};
+static const UChar rotateDesc[] = {'r', 'o', 't', 'a', 't', 'e'};
+static const UChar matrixDesc[] = {'m', 'a', 't', 'r', 'i', 'x'};
static inline bool parseAndSkipType(const UChar*& currTransform, const UChar* end, unsigned short& type)
{
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp b/src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp
index 6aa3857..b12b1c2 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp
@@ -82,7 +82,7 @@ const SVGElement* SVGViewSpec::contextElement() const
return m_contextElement;
}
-static const UChar svgViewSpec[] = {'s','v','g','V', 'i', 'e', 'w'};
+static const UChar svgViewSpec[] = {'s', 'v', 'g', 'V', 'i', 'e', 'w'};
static const UChar viewBoxSpec[] = {'v', 'i', 'e', 'w', 'B', 'o', 'x'};
static const UChar preserveAspectRatioSpec[] = {'p', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'A', 's', 'p', 'e', 'c', 't', 'R', 'a', 't', 'i', 'o'};
static const UChar transformSpec[] = {'t', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm'};
diff --git a/src/3rdparty/webkit/WebCore/svg/animation/SMILTime.cpp b/src/3rdparty/webkit/WebCore/svg/animation/SMILTime.cpp
index 70f9487..44e96a2 100644
--- a/src/3rdparty/webkit/WebCore/svg/animation/SMILTime.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/animation/SMILTime.cpp
@@ -35,7 +35,8 @@ const double SMILTime::unresolvedValue = DBL_MAX;
// Just a big value smaller than DBL_MAX. Our times are relative to 0, we don't really need the full range.
const double SMILTime::indefiniteValue = FLT_MAX;
-SMILTime WebCore::operator+(const SMILTime& a, const SMILTime& b) {
+SMILTime WebCore::operator+(const SMILTime& a, const SMILTime& b)
+{
if (a.isUnresolved() || b.isUnresolved())
return SMILTime::unresolved();
if (a.isIndefinite() || b.isIndefinite())
@@ -43,7 +44,8 @@ SMILTime WebCore::operator+(const SMILTime& a, const SMILTime& b) {
return a.value() + b.value();
}
-SMILTime WebCore::operator-(const SMILTime& a, const SMILTime& b) {
+SMILTime WebCore::operator-(const SMILTime& a, const SMILTime& b)
+{
if (a.isUnresolved() || b.isUnresolved())
return SMILTime::unresolved();
if (a.isIndefinite() || b.isIndefinite())
@@ -51,7 +53,8 @@ SMILTime WebCore::operator-(const SMILTime& a, const SMILTime& b) {
return a.value() - b.value();
}
-SMILTime WebCore::operator*(const SMILTime& a, const SMILTime& b) {
+SMILTime WebCore::operator*(const SMILTime& a, const SMILTime& b)
+{
if (a.isUnresolved() || b.isUnresolved())
return SMILTime::unresolved();
if (a.value() == 0 || b.value() == 0)
diff --git a/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.h b/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.h
index fac102e..b61f20d 100644
--- a/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.h
+++ b/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.h
@@ -38,8 +38,7 @@ namespace WebCore {
class SMILTimeContainer;
// This class implements SMIL interval timing model as needed for SVG animation.
- class SVGSMILElement : public SVGElement
- {
+ class SVGSMILElement : public SVGElement {
public:
SVGSMILElement(const QualifiedName&, Document*);
virtual ~SVGSMILElement();
diff --git a/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp b/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp
index 227b570..4efcf2e 100644
--- a/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp
@@ -222,7 +222,7 @@ NativeImagePtr SVGImage::nativeImageForCurrentFrame()
bool SVGImage::dataChanged(bool allDataReceived)
{
// Don't do anything if is an empty image.
- if (!m_data->size())
+ if (!data()->size())
return true;
if (allDataReceived) {
@@ -251,7 +251,7 @@ bool SVGImage::dataChanged(bool allDataReceived)
loader->commitProvisionalLoad(0);
loader->setResponseMIMEType("image/svg+xml");
loader->begin(KURL()); // create the empty document
- loader->write(m_data->data(), m_data->size());
+ loader->write(data()->data(), data()->size());
loader->end();
frame->view()->setTransparent(true); // SVG Images are transparent.
}
diff --git a/src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.cpp b/src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.cpp
index 82c10ba..049edc7 100644
--- a/src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.cpp
@@ -50,7 +50,8 @@ struct ResourceSet {
typedef HashMap<SVGStyledElement*, ResourceSet*> ResourceClientMap;
-static ResourceClientMap& clientMap() {
+static ResourceClientMap& clientMap()
+{
DEFINE_STATIC_LOCAL(ResourceClientMap, map, ());
return map;
}
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp
index 3713c59..0f49bd7 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp
@@ -34,6 +34,7 @@
#include "WMLInputElement.h"
#include "WMLIntrinsicEventHandler.h"
#include "WMLNames.h"
+#include "WMLSelectElement.h"
#include "WMLTemplateElement.h"
#include "WMLTimerElement.h"
#include "WMLVariables.h"
@@ -165,17 +166,14 @@ void WMLCardElement::handleIntrinsicEventIfNeeded()
if (m_eventTimer)
m_eventTimer->start();
- // FIXME: Initialize select elements in this card
for (Node* node = traverseNextNode(); node != 0; node = node->traverseNextNode()) {
if (!node->isElementNode())
continue;
if (node->hasTagName(inputTag))
static_cast<WMLInputElement*>(node)->initialize();
- /*
else if (node->hasTagName(selectTag))
static_cast<WMLSelectElement*>(node)->selectInitialOptions();
- */
}
}
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.cpp b/src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.cpp
index a228299..87c8003 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.cpp
@@ -61,7 +61,7 @@ void reportWMLError(Document* doc, WMLErrorCode error)
if (!console)
return;
- console->addMessage(WMLMessageSource, ErrorMessageLevel, errorMessage, 0, String());
+ console->addMessage(WMLMessageSource, LogMessageType, ErrorMessageLevel, errorMessage, 0, String());
}
}
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp b/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp
index 15ae9ca..1afc0c9 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp
@@ -54,7 +54,7 @@ void WMLPageState::reset()
m_page->backForwardList()->clearWmlPageHistory();
// reset implementation-specfic state if UA has
- m_historyLength = 1;
+ m_historyLength = 0;
}
bool WMLPageState::setNeedCheckDeckAccess(bool need)
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.cpp
index 7d001e1..ca43f69 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.cpp
@@ -59,7 +59,7 @@ String WMLPostfieldElement::name() const
String WMLPostfieldElement::value() const
{
- return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr));
+ return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr));
}
static inline CString encodedString(const TextEncoding& encoding, const String& data)
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp
index 5b5aed1..5e70098 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp
@@ -22,16 +22,21 @@
#if ENABLE(WML)
#include "WMLSelectElement.h"
-
+#include "CString.h"
#include "HTMLNames.h"
#include "MappedAttribute.h"
+#include "OptionElement.h"
#include "RenderListBox.h"
#include "RenderMenuList.h"
-
+#include "WMLDocument.h"
+#include "WMLNames.h"
+#include "WMLVariables.h"
#include <wtf/StdLibExtras.h>
namespace WebCore {
+using namespace WMLNames;
+
WMLSelectElement::WMLSelectElement(const QualifiedName& tagName, Document* document)
: WMLFormControlElement(tagName, document)
{
@@ -41,6 +46,17 @@ WMLSelectElement::~WMLSelectElement()
{
}
+String WMLSelectElement::title() const
+{
+ return substituteVariableReferences(getAttribute(HTMLNames::titleAttr), document());
+}
+
+const AtomicString& WMLSelectElement::formControlName() const
+{
+ AtomicString name = this->name();
+ return name.isNull() ? emptyAtom : name;
+}
+
const AtomicString& WMLSelectElement::formControlType() const
{
DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple"));
@@ -92,9 +108,14 @@ int WMLSelectElement::selectedIndex() const
return SelectElement::selectedIndex(m_data, this);
}
-void WMLSelectElement::setSelectedIndex(int index, bool deselect, bool fireOnChange)
+void WMLSelectElement::setSelectedIndex(int optionIndex, bool deselect)
+{
+ SelectElement::setSelectedIndex(m_data, this, optionIndex, deselect, false, false);
+}
+
+void WMLSelectElement::setSelectedIndexByUser(int optionIndex, bool deselect, bool fireOnChangeNow)
{
- SelectElement::setSelectedIndex(m_data, this, index, deselect, fireOnChange);
+ SelectElement::setSelectedIndex(m_data, this, optionIndex, deselect, fireOnChangeNow, true);
}
bool WMLSelectElement::saveFormControlState(String& value) const
@@ -151,6 +172,14 @@ void WMLSelectElement::reset()
void WMLSelectElement::defaultEventHandler(Event* event)
{
SelectElement::defaultEventHandler(m_data, this, event);
+
+ // FIXME: There must be a better place to update the page variable state. Investigate.
+ updateVariables();
+
+ if (event->defaultHandled())
+ return;
+
+ WMLFormControlElement::defaultEventHandler(event);
}
void WMLSelectElement::accessKeyAction(bool sendToAnyElement)
@@ -213,12 +242,311 @@ void WMLSelectElement::scrollToSelection()
SelectElement::scrollToSelection(m_data, this);
}
+void WMLSelectElement::selectInitialOptions()
+{
+ // Spec: Step 1 - the default option index is determined using iname and ivalue
+ calculateDefaultOptionIndices();
+
+ if (m_defaultOptionIndices.isEmpty())
+ return;
+
+ // Spec: Step 2 – initialise variables
+ initializeVariables();
+
+ // Spec: Step 3 – pre-select option(s) specified by the default option index
+ selectDefaultOptions();
+}
+
void WMLSelectElement::insertedIntoTree(bool deep)
{
SelectElement::insertedIntoTree(m_data, this);
WMLFormControlElement::insertedIntoTree(deep);
}
+void WMLSelectElement::calculateDefaultOptionIndices()
+{
+ WMLPageState* pageState = wmlPageStateForDocument(document());
+ if (!pageState)
+ return;
+
+ String variable;
+
+ // Spec: If the 'iname' attribute is specified and names a variable that is set,
+ // then the default option index is the validated value of that variable.
+ String iname = this->iname();
+ if (!iname.isEmpty()) {
+ variable = pageState->getVariable(iname);
+ if (!variable.isEmpty())
+ m_defaultOptionIndices = parseIndexValueString(variable);
+ }
+
+ // Spec: If the default option index is empty and the 'ivalue' attribute is specified,
+ // then the default option index is the validated attribute value.
+ String ivalue = this->ivalue();
+ if (m_defaultOptionIndices.isEmpty() && !ivalue.isEmpty())
+ m_defaultOptionIndices = parseIndexValueString(ivalue);
+
+ // Spec: If the default option index is empty, and the 'name' attribute is specified
+ // and the 'name' ttribute names a variable that is set, then for each value in the 'name'
+ // variable that is present as a value in the select's option elements, the index of the
+ // first option element containing that value is added to the default index if that
+ // index has not been previously added.
+ String name = this->name();
+ if (m_defaultOptionIndices.isEmpty() && !name.isEmpty()) {
+ variable = pageState->getVariable(name);
+ if (!variable.isEmpty())
+ m_defaultOptionIndices = valueStringToOptionIndices(variable);
+ }
+
+ String value = parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr));
+
+ // Spec: If the default option index is empty and the 'value' attribute is specified then
+ // for each value in the 'value' attribute that is present as a value in the select's
+ // option elements, the index of the first option element containing that value is added
+ // to the default index if that index has not been previously added.
+ if (m_defaultOptionIndices.isEmpty() && !value.isEmpty())
+ m_defaultOptionIndices = valueStringToOptionIndices(value);
+
+ // Spec: If the default option index is empty and the select is a multi-choice, then the
+ // default option index is set to zero. If the select is single-choice, then the default
+ // option index is set to one.
+ if (m_defaultOptionIndices.isEmpty())
+ m_defaultOptionIndices.append((unsigned) !m_data.multiple());
+}
+
+void WMLSelectElement::selectDefaultOptions()
+{
+ ASSERT(!m_defaultOptionIndices.isEmpty());
+
+ if (!m_data.multiple()) {
+ setSelectedIndex(m_defaultOptionIndices.first() - 1, false);
+ return;
+ }
+
+ Vector<unsigned>::const_iterator end = m_defaultOptionIndices.end();
+ for (Vector<unsigned>::const_iterator it = m_defaultOptionIndices.begin(); it != end; ++it)
+ setSelectedIndex((*it) - 1, false);
+}
+
+void WMLSelectElement::initializeVariables()
+{
+ ASSERT(!m_defaultOptionIndices.isEmpty());
+
+ WMLPageState* pageState = wmlPageStateForDocument(document());
+ if (!pageState)
+ return;
+
+ const Vector<Element*>& items = m_data.listItems(this);
+ if (items.isEmpty())
+ return;
+
+ // Spec: If the 'iname' attribute is specified, then the named variable is set with the default option index.
+ String iname = this->iname();
+ if (!iname.isEmpty())
+ pageState->storeVariable(iname, optionIndicesToString());
+
+ String name = this->name();
+ if (name.isEmpty())
+ return;
+
+ if (m_data.multiple()) {
+ // Spec: If the 'name' attribute is specified and the select is a multiple-choice element,
+ // then for each index greater than zero, the value of the 'value' attribute on the option
+ // element at the index is added to the name variable.
+ pageState->storeVariable(name, optionIndicesToValueString());
+ return;
+ }
+
+ // Spec: If the 'name' attribute is specified and the select is a single-choice element,
+ // then the named variable is set with the value of the 'value' attribute on the option
+ // element at the default option index.
+ unsigned optionIndex = m_defaultOptionIndices.first();
+ ASSERT(optionIndex >= 1);
+
+ int listIndex = optionToListIndex(optionIndex - 1);
+ ASSERT(listIndex >= 0);
+ ASSERT(listIndex < (int) items.size());
+
+ if (OptionElement* optionElement = toOptionElement(items[listIndex]))
+ pageState->storeVariable(name, optionElement->value());
+}
+
+void WMLSelectElement::updateVariables()
+{
+ WMLPageState* pageState = wmlPageStateForDocument(document());
+ if (!pageState)
+ return;
+
+ String name = this->name();
+ String iname = this->iname();
+ if (iname.isEmpty() && name.isEmpty())
+ return;
+
+ String nameString;
+ String inameString;
+
+ unsigned optionIndex = 0;
+ const Vector<Element*>& items = m_data.listItems(this);
+
+ for (unsigned i = 0; i < items.size(); ++i) {
+ OptionElement* optionElement = toOptionElement(items[i]);
+ if (!optionElement)
+ continue;
+
+ ++optionIndex;
+ if (!optionElement->selected())
+ continue;
+
+ if (!nameString.isEmpty())
+ nameString += ";";
+
+ if (!inameString.isEmpty())
+ inameString += ";";
+
+ nameString += optionElement->value();
+ inameString += String::number(optionIndex);
+ }
+
+ if (!name.isEmpty())
+ pageState->storeVariable(name, nameString);
+
+ if (!iname.isEmpty())
+ pageState->storeVariable(iname, inameString);
+}
+
+Vector<unsigned> WMLSelectElement::parseIndexValueString(const String& indexValue) const
+{
+ Vector<unsigned> indices;
+ if (indexValue.isEmpty())
+ return indices;
+
+ Vector<String> indexStrings;
+ indexValue.split(';', indexStrings);
+
+ bool ok = false;
+ unsigned optionCount = SelectElement::optionCount(m_data, this);
+
+ Vector<String>::const_iterator end = indexStrings.end();
+ for (Vector<String>::const_iterator it = indexStrings.begin(); it != end; ++it) {
+ unsigned parsedValue = (*it).toUIntStrict(&ok);
+ // Spec: Remove all non-integer indices from the value. Remove all out-of-range indices
+ // from the value, where out-of-range is defined as any index with a value greater than
+ // the number of options in the select or with a value less than one.
+ if (!ok || parsedValue < 1 || parsedValue > optionCount)
+ continue;
+
+ // Spec: Remove duplicate indices.
+ if (indices.find(parsedValue) == notFound)
+ indices.append(parsedValue);
+ }
+
+ return indices;
+}
+
+Vector<unsigned> WMLSelectElement::valueStringToOptionIndices(const String& value) const
+{
+ Vector<unsigned> indices;
+ if (value.isEmpty())
+ return indices;
+
+ const Vector<Element*>& items = m_data.listItems(this);
+ if (items.isEmpty())
+ return indices;
+
+ Vector<String> indexStrings;
+ value.split(';', indexStrings);
+
+ unsigned optionIndex = 0;
+
+ Vector<String>::const_iterator end = indexStrings.end();
+ for (Vector<String>::const_iterator it = indexStrings.begin(); it != end; ++it) {
+ String value = *it;
+
+ for (unsigned i = 0; i < items.size(); ++i) {
+ if (!isOptionElement(items[i]))
+ continue;
+
+ ++optionIndex;
+ if (OptionElement* optionElement = toOptionElement(items[i])) {
+ if (optionElement->value() == value) {
+ indices.append(optionIndex);
+ break;
+ }
+ }
+ }
+ }
+
+ return indices;
+}
+
+String WMLSelectElement::optionIndicesToValueString() const
+{
+ String valueString;
+ if (m_defaultOptionIndices.isEmpty())
+ return valueString;
+
+ const Vector<Element*>& items = m_data.listItems(this);
+ if (items.isEmpty())
+ return valueString;
+
+ Vector<unsigned>::const_iterator end = m_defaultOptionIndices.end();
+ for (Vector<unsigned>::const_iterator it = m_defaultOptionIndices.begin(); it != end; ++it) {
+ unsigned optionIndex = (*it);
+ if (optionIndex < 1 || optionIndex > items.size())
+ continue;
+
+ int listIndex = optionToListIndex((*it) - 1);
+ ASSERT(listIndex >= 0);
+ ASSERT(listIndex < (int) items.size());
+
+ if (OptionElement* optionElement = toOptionElement(items[listIndex])) {
+ if (!valueString.isEmpty())
+ valueString += ";";
+
+ valueString += optionElement->value();
+ }
+ }
+
+ return valueString;
+}
+
+String WMLSelectElement::optionIndicesToString() const
+{
+ String valueString;
+ if (m_defaultOptionIndices.isEmpty())
+ return valueString;
+
+ Vector<unsigned>::const_iterator end = m_defaultOptionIndices.end();
+ for (Vector<unsigned>::const_iterator it = m_defaultOptionIndices.begin(); it != end; ++it) {
+ if (!valueString.isEmpty())
+ valueString += ";";
+
+ valueString += String::number(*it);
+ }
+
+ return valueString;
+}
+
+String WMLSelectElement::name() const
+{
+ return parseValueForbiddingVariableReferences(getAttribute(HTMLNames::nameAttr));
+}
+
+String WMLSelectElement::value() const
+{
+ return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr));
+}
+
+String WMLSelectElement::iname() const
+{
+ return parseValueForbiddingVariableReferences(getAttribute(inameAttr));
+}
+
+String WMLSelectElement::ivalue() const
+{
+ return parseValueSubstitutingVariableReferences(getAttribute(ivalueAttr));
+}
+
}
#endif
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h
index 8d3e0f9..6cd3bcb 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h
@@ -32,6 +32,9 @@ public:
WMLSelectElement(const QualifiedName&, Document*);
virtual ~WMLSelectElement();
+ virtual String title() const;
+
+ virtual const AtomicString& formControlName() const;
virtual const AtomicString& formControlType() const;
virtual bool isKeyboardFocusable(KeyboardEvent*) const;
@@ -47,7 +50,8 @@ public:
virtual bool canStartSelection() const { return false; }
virtual int selectedIndex() const;
- virtual void setSelectedIndex(int index, bool deselect = true, bool fireOnChange = false);
+ virtual void setSelectedIndex(int index, bool deselect = true);
+ virtual void setSelectedIndexByUser(int index, bool deselect = true, bool fireOnChangeNow = false);
virtual int size() const { return m_data.size(); }
virtual bool multiple() const { return m_data.multiple(); }
@@ -81,11 +85,28 @@ public:
void accessKeySetSelectedIndex(int);
void setRecalcListItems();
void scrollToSelection();
+ void selectInitialOptions();
private:
virtual void insertedIntoTree(bool);
+ void calculateDefaultOptionIndices();
+ void selectDefaultOptions();
+ void initializeVariables();
+ void updateVariables();
+
+ Vector<unsigned> parseIndexValueString(const String&) const;
+ Vector<unsigned> valueStringToOptionIndices(const String&) const;
+ String optionIndicesToValueString() const;
+ String optionIndicesToString() const;
+
+ String name() const;
+ String value() const;
+ String iname() const;
+ String ivalue() const;
+
SelectElementData m_data;
+ Vector<unsigned> m_defaultOptionIndices;
};
}
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp
index f0c50cc..e59b070 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp
@@ -72,7 +72,7 @@ String WMLSetvarElement::name() const
String WMLSetvarElement::value() const
{
- return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr));
+ return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr));
}
}
diff --git a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp
new file mode 100644
index 0000000..120f78a
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp
@@ -0,0 +1,125 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "AbstractWorker.h"
+
+#include "Event.h"
+#include "EventException.h"
+#include "EventNames.h"
+
+namespace WebCore {
+
+AbstractWorker::AbstractWorker(ScriptExecutionContext* context)
+ : ActiveDOMObject(context, this)
+{
+}
+
+AbstractWorker::~AbstractWorker()
+{
+}
+
+void AbstractWorker::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> eventListener, bool)
+{
+ EventListenersMap::iterator iter = m_eventListeners.find(eventType);
+ if (iter == m_eventListeners.end()) {
+ ListenerVector listeners;
+ listeners.append(eventListener);
+ m_eventListeners.add(eventType, listeners);
+ } else {
+ ListenerVector& listeners = iter->second;
+ for (ListenerVector::iterator listenerIter = listeners.begin(); listenerIter != listeners.end(); ++listenerIter) {
+ if (*listenerIter == eventListener)
+ return;
+ }
+
+ listeners.append(eventListener);
+ m_eventListeners.add(eventType, listeners);
+ }
+}
+
+void AbstractWorker::removeEventListener(const AtomicString& eventType, EventListener* eventListener, bool)
+{
+ EventListenersMap::iterator iter = m_eventListeners.find(eventType);
+ if (iter == m_eventListeners.end())
+ return;
+
+ ListenerVector& listeners = iter->second;
+ for (ListenerVector::const_iterator listenerIter = listeners.begin(); listenerIter != listeners.end(); ++listenerIter) {
+ if (*listenerIter == eventListener) {
+ listeners.remove(listenerIter - listeners.begin());
+ return;
+ }
+ }
+}
+
+bool AbstractWorker::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec)
+{
+ if (!event || event->type().isEmpty()) {
+ ec = EventException::UNSPECIFIED_EVENT_TYPE_ERR;
+ return true;
+ }
+
+ ListenerVector listenersCopy = m_eventListeners.get(event->type());
+ for (ListenerVector::const_iterator listenerIter = listenersCopy.begin(); listenerIter != listenersCopy.end(); ++listenerIter) {
+ event->setTarget(this);
+ event->setCurrentTarget(this);
+ listenerIter->get()->handleEvent(event.get(), false);
+ }
+
+ return !event->defaultPrevented();
+}
+
+void AbstractWorker::dispatchLoadErrorEvent()
+{
+ RefPtr<Event> evt = Event::create(eventNames().errorEvent, false, true);
+ if (m_onErrorListener) {
+ evt->setTarget(this);
+ evt->setCurrentTarget(this);
+ m_onErrorListener->handleEvent(evt.get(), true);
+ }
+
+ ExceptionCode ec = 0;
+ dispatchEvent(evt.release(), ec);
+ ASSERT(!ec);
+}
+
+void AbstractWorker::dispatchScriptErrorEvent(const String&, const String&, int)
+{
+ //FIXME: Generate an ErrorEvent instead of a simple event
+ dispatchLoadErrorEvent();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h
new file mode 100644
index 0000000..89e4258
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h
@@ -0,0 +1,86 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AbstractWorker_h
+#define AbstractWorker_h
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "ActiveDOMObject.h"
+#include "AtomicStringHash.h"
+#include "EventListener.h"
+#include "EventTarget.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+ class ScriptExecutionContext;
+
+ class AbstractWorker : public RefCounted<AbstractWorker>, public ActiveDOMObject, public EventTarget {
+ public:
+ // EventTarget APIs
+ virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
+
+ virtual void addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
+ virtual void removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture);
+ virtual bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&);
+
+ // Utility routines to generate appropriate error events for loading and script exceptions.
+ void dispatchLoadErrorEvent();
+ void dispatchScriptErrorEvent(const String& errorMessage, const String& sourceURL, int);
+
+ void setOnerror(PassRefPtr<EventListener> eventListener) { m_onErrorListener = eventListener; }
+ EventListener* onerror() const { return m_onErrorListener.get(); }
+ typedef Vector<RefPtr<EventListener> > ListenerVector;
+ typedef HashMap<AtomicString, ListenerVector> EventListenersMap;
+ EventListenersMap& eventListeners() { return m_eventListeners; }
+
+ using RefCounted<AbstractWorker>::ref;
+ using RefCounted<AbstractWorker>::deref;
+
+ AbstractWorker(ScriptExecutionContext*);
+ virtual ~AbstractWorker();
+
+ private:
+
+ virtual void refEventTarget() { ref(); }
+ virtual void derefEventTarget() { deref(); }
+
+ RefPtr<EventListener> m_onErrorListener;
+ EventListenersMap m_eventListeners;
+ };
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
+
+#endif // AbstractWorker_h
diff --git a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl
new file mode 100644
index 0000000..1234c0d
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl
@@ -0,0 +1,52 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module threads {
+
+ interface [
+ Conditional=SHARED_WORKERS,
+ CustomMarkFunction,
+ CustomToJS,
+ GenerateConstructor
+ ] AbstractWorker {
+
+ attribute EventListener onerror;
+
+ [Custom] void addEventListener(in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+ [Custom] void removeEventListener(in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+ boolean dispatchEvent(in Event evt)
+ raises(EventException);
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/workers/GenericWorkerTask.h b/src/3rdparty/webkit/WebCore/workers/GenericWorkerTask.h
index 96b0e70..d6a9994 100644
--- a/src/3rdparty/webkit/WebCore/workers/GenericWorkerTask.h
+++ b/src/3rdparty/webkit/WebCore/workers/GenericWorkerTask.h
@@ -36,6 +36,7 @@
#include "CrossThreadCopier.h"
#include "ScriptExecutionContext.h"
#include <memory>
+#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/TypeTraits.h>
@@ -58,6 +59,10 @@ namespace WebCore {
typedef PassRefPtr<T> ParamType;
};
+ template<typename T> struct GenericWorkerTaskTraits<PassOwnPtr<T> > {
+ typedef PassOwnPtr<T> ParamType;
+ };
+
template<typename P1, typename MP1>
class GenericWorkerTask1 : public ScriptExecutionContext::Task {
public:
@@ -323,6 +328,56 @@ namespace WebCore {
P6 m_parameter6;
P7 m_parameter7;
};
+
+ template<typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3, typename P4, typename MP4, typename P5, typename MP5, typename P6, typename MP6, typename P7, typename MP7, typename P8, typename MP8>
+ class GenericWorkerTask8 : public ScriptExecutionContext::Task {
+ public:
+ typedef void (*Method)(ScriptExecutionContext*, MP1, MP2, MP3, MP4, MP5, MP6, MP7, MP8);
+ typedef GenericWorkerTask8<P1, MP1, P2, MP2, P3, MP3, P4, MP4, P5, MP5, P6, MP6, P7, MP7, P8, MP8> GenericWorkerTask;
+ typedef typename GenericWorkerTaskTraits<P1>::ParamType Param1;
+ typedef typename GenericWorkerTaskTraits<P2>::ParamType Param2;
+ typedef typename GenericWorkerTaskTraits<P3>::ParamType Param3;
+ typedef typename GenericWorkerTaskTraits<P4>::ParamType Param4;
+ typedef typename GenericWorkerTaskTraits<P5>::ParamType Param5;
+ typedef typename GenericWorkerTaskTraits<P6>::ParamType Param6;
+ typedef typename GenericWorkerTaskTraits<P7>::ParamType Param7;
+ typedef typename GenericWorkerTaskTraits<P8>::ParamType Param8;
+
+ static PassRefPtr<GenericWorkerTask> create(Method method, Param1 parameter1, Param2 parameter2, Param3 parameter3, Param4 parameter4, Param5 parameter5, Param6 parameter6, Param7 parameter7, Param8 parameter8)
+ {
+ return adoptRef(new GenericWorkerTask(method, parameter1, parameter2, parameter3, parameter4, parameter5, parameter6, parameter7, parameter8));
+ }
+
+ private:
+ GenericWorkerTask8(Method method, Param1 parameter1, Param2 parameter2, Param3 parameter3, Param4 parameter4, Param5 parameter5, Param6 parameter6, Param7 parameter7, Param8 parameter8)
+ : m_method(method)
+ , m_parameter1(parameter1)
+ , m_parameter2(parameter2)
+ , m_parameter3(parameter3)
+ , m_parameter4(parameter4)
+ , m_parameter5(parameter5)
+ , m_parameter6(parameter6)
+ , m_parameter7(parameter7)
+ , m_parameter8(parameter8)
+ {
+ }
+
+ virtual void performTask(ScriptExecutionContext* context)
+ {
+ (*m_method)(context, m_parameter1, m_parameter2, m_parameter3, m_parameter4, m_parameter5, m_parameter6, m_parameter7, m_parameter8);
+ }
+
+ private:
+ Method m_method;
+ P1 m_parameter1;
+ P2 m_parameter2;
+ P3 m_parameter3;
+ P4 m_parameter4;
+ P5 m_parameter5;
+ P6 m_parameter6;
+ P7 m_parameter7;
+ P8 m_parameter8;
+ };
template<typename P1, typename MP1>
PassRefPtr<ScriptExecutionContext::Task> createCallbackTask(
@@ -408,6 +463,21 @@ namespace WebCore {
CrossThreadCopier<P7>::copy(parameter7));
}
+ template<typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3, typename P4, typename MP4, typename P5, typename MP5, typename P6, typename MP6, typename P7, typename MP7, typename P8, typename MP8>
+ PassRefPtr<ScriptExecutionContext::Task> createCallbackTask(
+ void (*method)(ScriptExecutionContext*, MP1, MP2, MP3, MP4, MP5, MP6, MP7, MP8),
+ const P1& parameter1, const P2& parameter2, const P3& parameter3, const P4& parameter4, const P5& parameter5, const P6& parameter6, const P7& parameter7, const P8& parameter8)
+ {
+ return GenericWorkerTask8<typename CrossThreadCopier<P1>::Type, MP1, typename CrossThreadCopier<P2>::Type, MP2, typename CrossThreadCopier<P3>::Type, MP3,
+ typename CrossThreadCopier<P4>::Type, MP4, typename CrossThreadCopier<P5>::Type, MP5, typename CrossThreadCopier<P6>::Type, MP6,
+ typename CrossThreadCopier<P7>::Type, MP7, typename CrossThreadCopier<P8>::Type, MP8>::create(
+ method,
+ CrossThreadCopier<P1>::copy(parameter1), CrossThreadCopier<P2>::copy(parameter2),
+ CrossThreadCopier<P3>::copy(parameter3), CrossThreadCopier<P4>::copy(parameter4),
+ CrossThreadCopier<P5>::copy(parameter5), CrossThreadCopier<P6>::copy(parameter6),
+ CrossThreadCopier<P7>::copy(parameter7), CrossThreadCopier<P8>::copy(parameter8));
+ }
+
} // namespace WebCore
#endif // ENABLE(WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/workers/SharedWorker.cpp b/src/3rdparty/webkit/WebCore/workers/SharedWorker.cpp
new file mode 100644
index 0000000..e1d30d3
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/workers/SharedWorker.cpp
@@ -0,0 +1,52 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h"
+
+#if ENABLE(SHARED_WORKERS)
+
+#include "SharedWorker.h"
+
+#include "MessagePort.h"
+
+namespace WebCore {
+
+SharedWorker::SharedWorker(const String&, const String&, ScriptExecutionContext* context, ExceptionCode&)
+ : AbstractWorker(context)
+{
+ // Placeholder - ultimately we'll look up the worker in the SharedWorkerRepository.
+}
+
+SharedWorker::~SharedWorker()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SHARED_WORKERS)
diff --git a/src/3rdparty/webkit/WebCore/workers/SharedWorker.h b/src/3rdparty/webkit/WebCore/workers/SharedWorker.h
new file mode 100644
index 0000000..36c7d85
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/workers/SharedWorker.h
@@ -0,0 +1,61 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SharedWorker_h
+#define SharedWorker_h
+
+#include "AbstractWorker.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+
+namespace WebCore {
+
+ class SharedWorker : public AbstractWorker {
+ public:
+ static PassRefPtr<SharedWorker> create(const String& url, const String& name, ScriptExecutionContext* context, ExceptionCode& ec)
+ {
+ return adoptRef(new SharedWorker(url, name, context, ec));
+ }
+ ~SharedWorker();
+ MessagePort* port() const { return m_port.get(); }
+
+ virtual SharedWorker* toSharedWorker() { return this; }
+
+ private:
+ SharedWorker(const String& url, const String& name, ScriptExecutionContext*, ExceptionCode&);
+
+ RefPtr<MessagePort> m_port;
+ };
+
+} // namespace WebCore
+
+#endif // SharedWorker_h
diff --git a/src/3rdparty/webkit/WebCore/workers/SharedWorker.idl b/src/3rdparty/webkit/WebCore/workers/SharedWorker.idl
new file mode 100644
index 0000000..09475f7
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/workers/SharedWorker.idl
@@ -0,0 +1,42 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module threads {
+
+ interface [
+ Conditional=SHARED_WORKERS,
+ CustomMarkFunction,
+ GenerateNativeConverter,
+ GenerateToJS
+ ] SharedWorker : AbstractWorker {
+ readonly attribute MessagePort port;
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.cpp b/src/3rdparty/webkit/WebCore/workers/Worker.cpp
index a810dda..2e03e3d 100644
--- a/src/3rdparty/webkit/WebCore/workers/Worker.cpp
+++ b/src/3rdparty/webkit/WebCore/workers/Worker.cpp
@@ -77,9 +77,18 @@ Worker::~Worker()
m_contextProxy->workerObjectDestroyed();
}
-void Worker::postMessage(const String& message)
+void Worker::postMessage(const String& message, ExceptionCode& ec)
{
- m_contextProxy->postMessageToWorkerContext(message);
+ postMessage(message, 0, ec);
+}
+
+void Worker::postMessage(const String& message, MessagePort* messagePort, ExceptionCode& ec)
+{
+ // Disentangle the port in preparation for sending it to the remote context.
+ OwnPtr<MessagePortChannel> channel = messagePort ? messagePort->disentangle(ec) : 0;
+ if (ec)
+ return;
+ m_contextProxy->postMessageToWorkerContext(message, channel.release());
}
void Worker::terminate()
@@ -180,9 +189,9 @@ bool Worker::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec)
return !event->defaultPrevented();
}
-void Worker::dispatchMessage(const String& message)
+void Worker::dispatchMessage(const String& message, PassRefPtr<MessagePort> port)
{
- RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, 0);
+ RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, port);
if (m_onMessageListener.get()) {
evt->setTarget(this);
diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.h b/src/3rdparty/webkit/WebCore/workers/Worker.h
index bd9e556..1fcc8be 100644
--- a/src/3rdparty/webkit/WebCore/workers/Worker.h
+++ b/src/3rdparty/webkit/WebCore/workers/Worker.h
@@ -58,11 +58,12 @@ namespace WebCore {
virtual Worker* toWorker() { return this; }
- void postMessage(const String& message);
+ void postMessage(const String&, ExceptionCode&);
+ void postMessage(const String&, MessagePort*, ExceptionCode&);
void terminate();
- void dispatchMessage(const String&);
+ void dispatchMessage(const String&, PassRefPtr<MessagePort>);
void dispatchErrorEvent();
virtual bool canSuspend() const;
diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.idl b/src/3rdparty/webkit/WebCore/workers/Worker.idl
index 2ef9b62..e078e7c 100644
--- a/src/3rdparty/webkit/WebCore/workers/Worker.idl
+++ b/src/3rdparty/webkit/WebCore/workers/Worker.idl
@@ -30,7 +30,8 @@ module threads {
attribute EventListener onerror;
attribute EventListener onmessage;
- void postMessage(in DOMString message);
+ void postMessage(in DOMString message, in [Optional] MessagePort messagePort)
+ raises(DOMException);
void terminate();
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp
index fd05062..8e9fb97 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp
@@ -130,6 +130,14 @@ bool WorkerContext::hasPendingActivity() const
if (iter->first->hasPendingActivity())
return true;
}
+
+ // Keep the worker active as long as there is a MessagePort with pending activity or that is remotely entangled.
+ HashSet<MessagePort*>::const_iterator messagePortsEnd = messagePorts().end();
+ for (HashSet<MessagePort*>::const_iterator iter = messagePorts().begin(); iter != messagePortsEnd; ++iter) {
+ if ((*iter)->hasPendingActivity() || ((*iter)->isEntangled() && !(*iter)->locallyEntangledPort()))
+ return true;
+ }
+
return false;
}
@@ -138,9 +146,9 @@ void WorkerContext::reportException(const String& errorMessage, int lineNumber,
m_thread->workerObjectProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL);
}
-void WorkerContext::addMessage(MessageDestination destination, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
+void WorkerContext::addMessage(MessageDestination destination, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
{
- m_thread->workerObjectProxy().postConsoleMessageToWorkerObject(destination, source, level, message, lineNumber, sourceURL);
+ m_thread->workerObjectProxy().postConsoleMessageToWorkerObject(destination, source, type, level, message, lineNumber, sourceURL);
}
void WorkerContext::resourceRetrievedByXMLHttpRequest(unsigned long, const ScriptString&)
@@ -155,12 +163,20 @@ void WorkerContext::scriptImported(unsigned long, const String&)
notImplemented();
}
-void WorkerContext::postMessage(const String& message)
+void WorkerContext::postMessage(const String& message, ExceptionCode& ec)
+{
+ postMessage(message, 0, ec);
+}
+
+void WorkerContext::postMessage(const String& message, MessagePort* port, ExceptionCode& ec)
{
if (m_closing)
return;
-
- m_thread->workerObjectProxy().postMessageToWorkerObject(message);
+ // Disentangle the port in preparation for sending it to the remote context.
+ OwnPtr<MessagePortChannel> channel = port ? port->disentangle(ec) : 0;
+ if (ec)
+ return;
+ m_thread->workerObjectProxy().postMessageToWorkerObject(message, channel.release());
}
void WorkerContext::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> eventListener, bool)
@@ -239,11 +255,11 @@ void WorkerContext::clearInterval(int timeoutId)
DOMTimer::removeById(scriptExecutionContext(), timeoutId);
}
-void WorkerContext::dispatchMessage(const String& message)
+void WorkerContext::dispatchMessage(const String& message, PassRefPtr<MessagePort> port)
{
// Since close() stops the thread event loop, this should not ever get called while closing.
ASSERT(!m_closing);
- RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, 0);
+ RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, port);
if (m_onmessageListener.get()) {
evt->setTarget(this);
@@ -283,7 +299,7 @@ void WorkerContext::importScripts(const Vector<String>& urls, const String& call
}
scriptExecutionContext()->scriptImported(scriptLoader.identifier(), scriptLoader.script());
- scriptExecutionContext()->addMessage(InspectorControllerDestination, JSMessageSource, LogMessageLevel, "Worker script imported: \"" + *it + "\".", callerLine, callerURL);
+ scriptExecutionContext()->addMessage(InspectorControllerDestination, JSMessageSource, LogMessageType, LogMessageLevel, "Worker script imported: \"" + *it + "\".", callerLine, callerURL);
ScriptValue exception;
m_script->evaluate(ScriptSourceCode(scriptLoader.script(), *it), &exception);
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.h b/src/3rdparty/webkit/WebCore/workers/WorkerContext.h
index ce782f8..16f43fd 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.h
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.h
@@ -74,13 +74,12 @@ namespace WebCore {
bool hasPendingActivity() const;
virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL);
- virtual void addMessage(MessageDestination, MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
+ virtual void addMessage(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
virtual void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString);
virtual void scriptImported(unsigned long identifier, const String& sourceString);
virtual void postTask(PassRefPtr<Task>); // Executes the task on context's thread asynchronously.
-
// WorkerGlobalScope
WorkerContext* self() { return this; }
WorkerLocation* location() const;
@@ -90,9 +89,9 @@ namespace WebCore {
void importScripts(const Vector<String>& urls, const String& callerURL, int callerLine, ExceptionCode&);
WorkerNavigator* navigator() const;
-
// DedicatedWorkerGlobalScope
- void postMessage(const String& message);
+ void postMessage(const String&, ExceptionCode&);
+ void postMessage(const String&, MessagePort*, ExceptionCode&);
void setOnmessage(PassRefPtr<EventListener> eventListener) { m_onmessageListener = eventListener; }
EventListener* onmessage() const { return m_onmessageListener.get(); }
@@ -111,7 +110,7 @@ namespace WebCore {
typedef HashMap<AtomicString, ListenerVector> EventListenersMap;
EventListenersMap& eventListeners() { return m_eventListeners; }
- void dispatchMessage(const String&);
+ void dispatchMessage(const String&, PassRefPtr<MessagePort>);
// These methods are used for GC marking. See JSWorkerContext::mark() in
// JSWorkerContextCustom.cpp.
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl b/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl
index 9d5aa79..709410a 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl
@@ -41,7 +41,6 @@ module threads {
#endif
attribute [Replaceable] WorkerLocation location;
void close();
- // attribute EventListener onclose;
// attribute EventListener onerror;
// WorkerUtils
@@ -52,10 +51,10 @@ module threads {
// DedicatedWorkerGlobalScope
- void postMessage(in DOMString message);
+ void postMessage(in DOMString message, in [Optional] MessagePort messagePort)
+ raises(DOMException);
attribute EventListener onmessage;
-
// Timers
[Custom] long setTimeout(in TimeoutHandler handler, in long timeout);
// [Custom] long setTimeout(in DOMString code, in long timeout);
@@ -80,6 +79,9 @@ module threads {
attribute MessageEventConstructor MessageEvent;
attribute WorkerLocationConstructor WorkerLocation;
+#if ENABLE_CHANNEL_MESSAGING
+ attribute [JSCCustomGetter] MessageChannelConstructor MessageChannel;
+#endif
attribute [JSCCustomGetter] XMLHttpRequestConstructor XMLHttpRequest;
};
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContextProxy.h b/src/3rdparty/webkit/WebCore/workers/WorkerContextProxy.h
index c8f5761..f42527e 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerContextProxy.h
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerContextProxy.h
@@ -33,9 +33,12 @@
#if ENABLE(WORKERS)
+#include <wtf/PassOwnPtr.h>
+
namespace WebCore {
class KURL;
+ class MessagePortChannel;
class String;
class Worker;
@@ -50,7 +53,7 @@ namespace WebCore {
virtual void terminateWorkerContext() = 0;
- virtual void postMessageToWorkerContext(const String&) = 0;
+ virtual void postMessageToWorkerContext(const String&, PassOwnPtr<MessagePortChannel>) = 0;
virtual bool hasPendingActivity() const = 0;
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerLoaderProxy.h b/src/3rdparty/webkit/WebCore/workers/WorkerLoaderProxy.h
index b51f480..ac7cda1 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerLoaderProxy.h
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerLoaderProxy.h
@@ -33,11 +33,11 @@
#if ENABLE(WORKERS)
+#include "ScriptExecutionContext.h"
#include <wtf/PassRefPtr.h>
namespace WebCore {
- class ScriptExecutionContext::Task;
class String;
// A proxy to talk to the loader context. Normally, the document on the main thread
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp
index a6d0d5d..b6e1642 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp
@@ -44,14 +44,15 @@ namespace WebCore {
class MessageWorkerContextTask : public ScriptExecutionContext::Task {
public:
- static PassRefPtr<MessageWorkerContextTask> create(const String& message)
+ static PassRefPtr<MessageWorkerContextTask> create(const String& message, PassOwnPtr<MessagePortChannel> channel)
{
- return adoptRef(new MessageWorkerContextTask(message));
+ return adoptRef(new MessageWorkerContextTask(message, channel));
}
private:
- MessageWorkerContextTask(const String& message)
+ MessageWorkerContextTask(const String& message, PassOwnPtr<MessagePortChannel> channel)
: m_message(message.copy())
+ , m_channel(channel)
{
}
@@ -59,41 +60,52 @@ private:
{
ASSERT(scriptContext->isWorkerContext());
WorkerContext* context = static_cast<WorkerContext*>(scriptContext);
-
- context->dispatchMessage(m_message);
-
+ RefPtr<MessagePort> port;
+ if (m_channel) {
+ port = MessagePort::create(*scriptContext);
+ port->entangle(m_channel.release());
+ }
+ context->dispatchMessage(m_message, port.release());
context->thread()->workerObjectProxy().confirmMessageFromWorkerObject(context->hasPendingActivity());
}
private:
String m_message;
+ OwnPtr<MessagePortChannel> m_channel;
};
class MessageWorkerTask : public ScriptExecutionContext::Task {
public:
- static PassRefPtr<MessageWorkerTask> create(const String& message, WorkerMessagingProxy* messagingProxy)
+ static PassRefPtr<MessageWorkerTask> create(const String& message, PassOwnPtr<MessagePortChannel> channel, WorkerMessagingProxy* messagingProxy)
{
- return adoptRef(new MessageWorkerTask(message, messagingProxy));
+ return adoptRef(new MessageWorkerTask(message, channel, messagingProxy));
}
private:
- MessageWorkerTask(const String& message, WorkerMessagingProxy* messagingProxy)
+ MessageWorkerTask(const String& message, PassOwnPtr<MessagePortChannel> channel, WorkerMessagingProxy* messagingProxy)
: m_message(message.copy())
+ , m_channel(channel)
, m_messagingProxy(messagingProxy)
{
}
- virtual void performTask(ScriptExecutionContext*)
+ virtual void performTask(ScriptExecutionContext* scriptContext)
{
Worker* workerObject = m_messagingProxy->workerObject();
if (!workerObject || m_messagingProxy->askedToTerminate())
return;
- workerObject->dispatchMessage(m_message);
+ RefPtr<MessagePort> port;
+ if (m_channel) {
+ port = MessagePort::create(*scriptContext);
+ port->entangle(m_channel.release());
+ }
+ workerObject->dispatchMessage(m_message, port.release());
}
private:
String m_message;
+ OwnPtr<MessagePortChannel> m_channel;
WorkerMessagingProxy* m_messagingProxy;
};
@@ -205,21 +217,21 @@ void WorkerMessagingProxy::startWorkerContext(const KURL& scriptURL, const Strin
thread->start();
}
-void WorkerMessagingProxy::postMessageToWorkerObject(const String& message)
+void WorkerMessagingProxy::postMessageToWorkerObject(const String& message, PassOwnPtr<MessagePortChannel> channel)
{
- m_scriptExecutionContext->postTask(MessageWorkerTask::create(message, this));
+ m_scriptExecutionContext->postTask(MessageWorkerTask::create(message, channel, this));
}
-void WorkerMessagingProxy::postMessageToWorkerContext(const String& message)
+void WorkerMessagingProxy::postMessageToWorkerContext(const String& message, PassOwnPtr<MessagePortChannel> channel)
{
if (m_askedToTerminate)
return;
if (m_workerThread) {
++m_unconfirmedMessageCount;
- m_workerThread->runLoop().postTask(MessageWorkerContextTask::create(message));
+ m_workerThread->runLoop().postTask(MessageWorkerContextTask::create(message, channel));
} else
- m_queuedEarlyTasks.append(MessageWorkerContextTask::create(message));
+ m_queuedEarlyTasks.append(MessageWorkerContextTask::create(message, channel));
}
void WorkerMessagingProxy::postTaskForModeToWorkerContext(PassRefPtr<ScriptExecutionContext::Task> task, const String& mode)
@@ -243,16 +255,16 @@ void WorkerMessagingProxy::postExceptionToWorkerObject(const String& errorMessag
m_scriptExecutionContext->postTask(WorkerExceptionTask::create(errorMessage, lineNumber, sourceURL, this));
}
-static void postConsoleMessageTask(ScriptExecutionContext* context, WorkerMessagingProxy* messagingProxy, MessageDestination destination, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
+static void postConsoleMessageTask(ScriptExecutionContext* context, WorkerMessagingProxy* messagingProxy, MessageDestination destination, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
{
if (messagingProxy->askedToTerminate())
return;
- context->addMessage(destination, source, level, message, lineNumber, sourceURL);
+ context->addMessage(destination, source, type, level, message, lineNumber, sourceURL);
}
-void WorkerMessagingProxy::postConsoleMessageToWorkerObject(MessageDestination destination, MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)
+void WorkerMessagingProxy::postConsoleMessageToWorkerObject(MessageDestination destination, MessageSource source, MessageType type, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)
{
- m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageTask, this, destination, source, level, message, lineNumber, sourceURL));
+ m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageTask, this, destination, source, type, level, message, lineNumber, sourceURL));
}
void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<WorkerThread> workerThread)
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h
index 7fc9797..f9e1cd4 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h
@@ -34,12 +34,14 @@
#include "WorkerLoaderProxy.h"
#include "WorkerObjectProxy.h"
#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
+ class MessagePortChannel;
class ScriptExecutionContext;
class String;
class Worker;
@@ -53,15 +55,15 @@ namespace WebCore {
// (Only use these methods in the worker object thread.)
virtual void startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode);
virtual void terminateWorkerContext();
- virtual void postMessageToWorkerContext(const String& message);
+ virtual void postMessageToWorkerContext(const String&, PassOwnPtr<MessagePortChannel>);
virtual bool hasPendingActivity() const;
virtual void workerObjectDestroyed();
// Implementations of WorkerObjectProxy.
// (Only use these methods in the worker context thread.)
- virtual void postMessageToWorkerObject(const String& message);
+ virtual void postMessageToWorkerObject(const String&, PassOwnPtr<MessagePortChannel>);
virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL);
- virtual void postConsoleMessageToWorkerObject(MessageDestination, MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL);
+ virtual void postConsoleMessageToWorkerObject(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, int lineNumber, const String& sourceURL);
virtual void confirmMessageFromWorkerObject(bool hasPendingActivity);
virtual void reportPendingActivity(bool hasPendingActivity);
virtual void workerContextDestroyed();
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerObjectProxy.h b/src/3rdparty/webkit/WebCore/workers/WorkerObjectProxy.h
index 3b86028..c5f4456 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerObjectProxy.h
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerObjectProxy.h
@@ -35,8 +35,11 @@
#include "Console.h"
+#include <wtf/PassOwnPtr.h>
+
namespace WebCore {
+ class MessagePortChannel;
class String;
// A proxy to talk to the worker object.
@@ -44,11 +47,11 @@ namespace WebCore {
public:
virtual ~WorkerObjectProxy() {}
- virtual void postMessageToWorkerObject(const String&) = 0;
+ virtual void postMessageToWorkerObject(const String&, PassOwnPtr<MessagePortChannel>) = 0;
virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL) = 0;
- virtual void postConsoleMessageToWorkerObject(MessageDestination, MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) = 0;
+ virtual void postConsoleMessageToWorkerObject(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, int lineNumber, const String& sourceURL) = 0;
virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) = 0;
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp
index 1e5e510..b6f6487 100644
--- a/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp
+++ b/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp
@@ -125,8 +125,7 @@ String WorkerRunLoop::defaultMode()
return String();
}
-class RunLoopSetup : Noncopyable
-{
+class RunLoopSetup : Noncopyable {
public:
RunLoopSetup(WorkerRunLoop& runLoop)
: m_runLoop(runLoop)
diff --git a/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp b/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp
index 59cacbd..5e20252 100644
--- a/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "XMLHttpRequest.h"
+#include "Cache.h"
#include "CString.h"
#include "CrossOriginAccessControl.h"
#include "CrossOriginPreflightResultCache.h"
@@ -145,6 +146,7 @@ XMLHttpRequest::XMLHttpRequest(ScriptExecutionContext* context)
, m_uploadComplete(false)
, m_sameOriginRequest(true)
, m_inPreflight(false)
+ , m_didTellLoaderAboutRequest(false)
, m_receivedLength(0)
, m_lastSendLineNumber(0)
, m_exceptionCode(0)
@@ -154,6 +156,10 @@ XMLHttpRequest::XMLHttpRequest(ScriptExecutionContext* context)
XMLHttpRequest::~XMLHttpRequest()
{
+ if (m_didTellLoaderAboutRequest) {
+ cache()->loader()->nonCacheRequestComplete(m_url);
+ m_didTellLoaderAboutRequest = false;
+ }
if (m_upload)
m_upload->disconnectXMLHttpRequest();
}
@@ -681,6 +687,16 @@ void XMLHttpRequest::loadRequestAsynchronously(ResourceRequest& request)
// a request is in progress because we need to keep the listeners alive,
// and they are referenced by the JavaScript wrapper.
setPendingActivity(this);
+
+ // For now we should only balance the nonCached request count for main-thread XHRs and not
+ // Worker XHRs, as the Cache is not thread-safe.
+ // This will become irrelevant after https://bugs.webkit.org/show_bug.cgi?id=27165 is resolved.
+ if (!scriptExecutionContext()->isWorkerContext()) {
+ ASSERT(isMainThread());
+ ASSERT(!m_didTellLoaderAboutRequest);
+ cache()->loader()->nonCacheRequestInFlight(m_url);
+ m_didTellLoaderAboutRequest = true;
+ }
}
}
@@ -788,9 +804,9 @@ void XMLHttpRequest::dropProtection()
// can't be recouped until the load is done, so only
// report the extra cost at that point.
- if (JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext()))
- if (DOMObject* wrapper = getCachedDOMObjectWrapper(*globalObject->globalData(), this))
- JSC::Heap::heap(wrapper)->reportExtraMemoryCost(m_responseText.size() * 2);
+ if (JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext()))
+ if (DOMObject* wrapper = getCachedDOMObjectWrapper(*globalObject->globalData(), this))
+ JSC::Heap::heap(wrapper)->reportExtraMemoryCost(m_responseText.size() * 2);
#endif
unsetPendingActivity(this);
@@ -807,7 +823,7 @@ static void reportUnsafeUsage(ScriptExecutionContext* context, const String& mes
return;
// FIXME: It's not good to report the bad usage without indicating what source line it came from.
// We should pass additional parameters so we can tell the console where the mistake occurred.
- context->addMessage(ConsoleDestination, JSMessageSource, ErrorMessageLevel, message, 1, String());
+ context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String());
}
void XMLHttpRequest::setRequestHeader(const AtomicString& name, const String& value, ExceptionCode& ec)
@@ -961,6 +977,11 @@ String XMLHttpRequest::statusText(ExceptionCode& ec) const
void XMLHttpRequest::didFail(const ResourceError& error)
{
+ if (m_didTellLoaderAboutRequest) {
+ cache()->loader()->nonCacheRequestComplete(m_url);
+ m_didTellLoaderAboutRequest = false;
+ }
+
// If we are already in an error state, for instance we called abort(), bail out early.
if (m_error)
return;
@@ -982,6 +1003,11 @@ void XMLHttpRequest::didFailRedirectCheck()
void XMLHttpRequest::didFinishLoading(unsigned long identifier)
{
+ if (m_didTellLoaderAboutRequest) {
+ cache()->loader()->nonCacheRequestComplete(m_url);
+ m_didTellLoaderAboutRequest = false;
+ }
+
if (m_error)
return;
@@ -997,7 +1023,7 @@ void XMLHttpRequest::didFinishLoading(unsigned long identifier)
m_responseText += m_decoder->flush();
scriptExecutionContext()->resourceRetrievedByXMLHttpRequest(identifier, m_responseText);
- scriptExecutionContext()->addMessage(InspectorControllerDestination, JSMessageSource, LogMessageLevel, "XHR finished loading: \"" + m_url + "\".", m_lastSendLineNumber, m_lastSendURL);
+ scriptExecutionContext()->addMessage(InspectorControllerDestination, JSMessageSource, LogMessageType, LogMessageLevel, "XHR finished loading: \"" + m_url + "\".", m_lastSendLineNumber, m_lastSendURL);
bool hadLoader = m_loader;
m_loader = 0;
diff --git a/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h b/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h
index 6955c11..d581d3d 100644
--- a/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h
+++ b/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h
@@ -225,6 +225,7 @@ private:
bool m_sameOriginRequest;
bool m_allowAccess;
bool m_inPreflight;
+ bool m_didTellLoaderAboutRequest;
// Used for onprogress tracking
long long m_receivedLength;
diff --git a/src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp b/src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp
index 1f1d985..da39443 100644
--- a/src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp
@@ -667,12 +667,12 @@ Value FunRound::evaluate() const
return round(arg(0)->evaluate().toNumber());
}
-struct FunctionMapping {
- const char *name;
- FunctionRec function;
-};
static void createFunctionMap()
{
+ struct FunctionMapping {
+ const char *name;
+ FunctionRec function;
+ };
static const FunctionMapping functions[] = {
{ "boolean", { &createFunBoolean, 1 } },
{ "ceiling", { &createFunCeiling, 1 } },
diff --git a/src/3rdparty/webkit/WebCore/xml/XPathPath.h b/src/3rdparty/webkit/WebCore/xml/XPathPath.h
index dc77971..7dd17d9 100644
--- a/src/3rdparty/webkit/WebCore/xml/XPathPath.h
+++ b/src/3rdparty/webkit/WebCore/xml/XPathPath.h
@@ -72,8 +72,7 @@ namespace WebCore {
bool m_absolute;
};
- class Path : public Expression
- {
+ class Path : public Expression {
public:
Path(Filter*, LocationPath*);
virtual ~Path();
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp b/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp
index 3865124..a26fe77 100644
--- a/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp
@@ -99,7 +99,7 @@ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
break;
}
- console->addMessage(XMLMessageSource, level, error->message, error->line, error->file);
+ 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.
diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri
index 73a5e5c..73288ab 100644
--- a/src/3rdparty/webkit/WebKit.pri
+++ b/src/3rdparty/webkit/WebKit.pri
@@ -21,7 +21,11 @@ building-libs {
LIBS += -framework QtWebKit
QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
} else {
- LIBS += -lQtWebKit
+ win32-*|wince* {
+ LIBS += -lQtWebKit$${QT_MAJOR_VERSION}
+ } else {
+ LIBS += -lQtWebKit
+ }
}
}
DEPENDPATH += $$PWD/WebKit/qt/Api
diff --git a/src/3rdparty/webkit/WebKit/ChangeLog b/src/3rdparty/webkit/WebKit/ChangeLog
index f07a75c..cabdf46 100644
--- a/src/3rdparty/webkit/WebKit/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/ChangeLog
@@ -1,3 +1,42 @@
+2009-07-10 Adam Roben <aroben@apple.com>
+
+ Sort all our Xcode projects
+
+ Accomplished using sort-Xcode-project-file.
+
+ Requested by Dave Kilzer.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2009-07-02 Adam Roben <aroben@apple.com>
+
+ Fix warnings from update-webkit-localizable-strings
+
+ Rubber-stamped by Eric Carlson.
+
+ * English.lproj/Localizable.strings: Updated.
+
+2009-07-02 Adam Roben <aroben@apple.com>
+
+ Update StringsNotToBeLocalized.txt for (not so) recent changes
+
+ Bug 26926: StringsNotToBeLocalized.txt is out-of-date
+ <https://bugs.webkit.org/show_bug.cgi?id=26926>
+
+ Reviewed by John Sullivan.
+
+ * StringsNotToBeLocalized.txt:
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6518119>
+
+ Add localized strings for media controller status messages.
+
+ * English.lproj/Localizable.strings: Localized text.
+
2009-06-08 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
diff --git a/src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt b/src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt
index 003de11..7e593ca 100644
--- a/src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt
+++ b/src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt
@@ -402,7 +402,6 @@
"WebViewDidChangeTypingStyleNotification"
"WebViewDidEndEditingNotification"
"WebViewWindowClass"
-"WhatsNewPanel"
"Windows %d.%d"
"Windows 95"
"Windows 98"
@@ -465,7 +464,6 @@
"com.adobe.dreamweaver-9.0"
"com.alientechnology.Proteus"
"com.app4mac.KidsBrowsercom.app4mac.wKiosk"
-"com.apple."
"com.apple.Aperture"
"com.apple.AppKit"
"com.apple.Automator"
@@ -477,6 +475,7 @@
"com.apple.JavaAppletPlugin"
"com.apple.JavaPluginCocoa"
"com.apple.KeyboardUIModeDidChange"
+"com.apple.Mail"
"com.apple.QuickTime Plugin.plugin"
"com.apple.Safari"
"com.apple.WebCore"
@@ -496,7 +495,9 @@
"com.barebones.textwrangler"
"com.barebones.yojimbo"
"com.culturedcode.xyle"
+"com.e-frontier.shade10"
"com.equinux.iSale4"
+"com.equinux.iSale5"
"com.freeverse.bumpercar"
"com.growl.growlframework"
"com.intrarts.PandoraMan"
@@ -539,7 +540,6 @@
"https"
"https:"
"i"
-"iLifeWelcomePanel"
"icon.db"
"image.pict"
"image.png"
@@ -690,6 +690,8 @@ WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Enter"
WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Up"
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"height"
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"width"
+WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Menlo"
+WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Monaco"
WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Web Inspector 2"
WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector"
WebKit/mac/WebView/WebHTMLView.mm:"'%@'"
@@ -742,6 +744,7 @@ WebKit/win/ProgIDMacros.h:"WebKit."
WebKit/win/WebCache.cpp:"images"
WebKit/win/WebCache.cpp:"scripts"
WebKit/win/WebCache.cpp:"style sheets"
+WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Courier New"
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector "
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector"
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"inspector"
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/headers.pri b/src/3rdparty/webkit/WebKit/qt/Api/headers.pri
index e4bb618..d92eb1c 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/headers.pri
+++ b/src/3rdparty/webkit/WebKit/qt/Api/headers.pri
@@ -6,4 +6,6 @@ WEBKIT_API_HEADERS = $$PWD/qwebframe.h \
$$PWD/qwebhistoryinterface.h \
$$PWD/qwebdatabase.h \
$$PWD/qwebsecurityorigin.h \
- $$PWD/qwebelement.h
+ $$PWD/qwebelement.h \
+ $$PWD/qwebpluginfactory.h \
+ $$PWD/qwebhistory.h
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
index 2db9cd0..7e85eaa 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
@@ -149,7 +149,7 @@ QWebSecurityOrigin QWebDatabase::origin() const
}
/*!
- Removes the database, \a db, from its security origin. All data stored in this database
+ Removes the database \a db from its security origin. All data stored in this database
will be destroyed.
*/
void QWebDatabase::removeDatabase(const QWebDatabase &db)
@@ -160,6 +160,20 @@ void QWebDatabase::removeDatabase(const QWebDatabase &db)
}
/*!
+ \since 4.6
+
+ Deletes all web databases in the configured offline storage path.
+
+ \sa QWebSettings::setOfflineStoragePath()
+*/
+void QWebDatabase::removeAllDatabases()
+{
+#if ENABLE(DATABASE)
+ DatabaseTracker::tracker().deleteAllDatabases();
+#endif
+}
+
+/*!
Destroys the web database object. The data within this database is \b not destroyed.
*/
QWebDatabase::~QWebDatabase()
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h
index 4e832bb..5b4f704 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h
@@ -46,6 +46,7 @@ public:
QWebSecurityOrigin origin() const;
static void removeDatabase(const QWebDatabase &db);
+ static void removeAllDatabases();
private:
QWebDatabase(QWebDatabasePrivate* priv);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 381251d..29d380d 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -20,73 +20,71 @@
#include "config.h"
#include "qwebframe.h"
-#include "qwebpage.h"
-#include "qwebpage_p.h"
-#include "qwebframe_p.h"
-#include "qwebsecurityorigin.h"
-#include "qwebsecurityorigin_p.h"
-#include "qwebelement.h"
+#include "CallFrame.h"
+#include "Document.h"
#include "DocumentLoader.h"
+#include "DragData.h"
+#include "Element.h"
#include "FocusController.h"
-#include "FrameLoaderClientQt.h"
#include "Frame.h"
+#include "FrameLoaderClientQt.h"
#include "FrameTree.h"
#include "FrameView.h"
+#include "GCController.h"
+#include "GraphicsContext.h"
+#include "HTMLMetaElement.h"
+#include "HitTestResult.h"
#include "IconDatabase.h"
#include "InspectorController.h"
+#include "JSDOMBinding.h"
+#include "JSDOMWindowBase.h"
+#include "JSLock.h"
+#include "JSObject.h"
+#include "NodeList.h"
#include "Page.h"
+#include "PlatformMouseEvent.h"
+#include "PlatformWheelEvent.h"
+#include "PrintContext.h"
#include "PutPropertySlot.h"
-#include "ResourceRequest.h"
+#include "RenderTreeAsText.h"
#include "RenderView.h"
-#include "SelectionController.h"
+#include "ResourceRequest.h"
+#include "ScriptController.h"
+#include "ScriptSourceCode.h"
+#include "ScriptValue.h"
#include "Scrollbar.h"
-#include "PrintContext.h"
+#include "SelectionController.h"
#include "SubstituteData.h"
-
-#include "markup.h"
#include "htmlediting.h"
-#include "RenderTreeAsText.h"
-#include "Element.h"
-#include "Document.h"
-#include "DragData.h"
-#include "RenderView.h"
-#include "GraphicsContext.h"
-#include "PlatformMouseEvent.h"
-#include "PlatformWheelEvent.h"
-#include "GraphicsContext.h"
-#include "HitTestResult.h"
-
-#include "CallFrame.h"
-#include "JSDOMBinding.h"
-#include "JSDOMWindow.h"
-#include "JSLock.h"
-#include "JSObject.h"
+#include "markup.h"
#include "qt_instance.h"
#include "qt_runtime.h"
+#include "qwebelement.h"
+#include "qwebframe_p.h"
+#include "qwebpage.h"
+#include "qwebpage_p.h"
+#include "qwebsecurityorigin.h"
+#include "qwebsecurityorigin_p.h"
#include "runtime.h"
#include "runtime_object.h"
#include "runtime_root.h"
-#include "ScriptController.h"
-#include "ScriptSourceCode.h"
-#include "ScriptValue.h"
-
#include "wtf/HashMap.h"
-
+#include <QMultiMap>
#include <qdebug.h>
#include <qevent.h>
#include <qfileinfo.h>
#include <qpainter.h>
-#include <QMultiMap>
+#include <qprinter.h>
+#include <qregion.h>
+
+#if QT_VERSION < 0x040400
+#include "qwebnetworkinterface.h"
+#endif
+
#if QT_VERSION >= 0x040400
#include <qnetworkrequest.h>
-#else
-#include "qwebnetworkinterface.h"
#endif
-#include <qregion.h>
-#include <qprinter.h>
-#include "HTMLMetaElement.h"
-#include "NodeList.h"
using namespace WebCore;
@@ -166,27 +164,56 @@ int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame *qframe)
return controller->numberOfActiveAnimations();
}
-void QWebFramePrivate::init(QWebFrame *qframe, WebCore::Page *webcorePage, QWebFrameData *frameData)
+void QWEBKIT_EXPORT qt_drt_clearFrameName(QWebFrame* qFrame)
{
- q = qframe;
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ frame->tree()->clearName();
+}
- allowsScrolling = frameData->allowsScrolling;
- marginWidth = frameData->marginWidth;
- marginHeight = frameData->marginHeight;
+int QWEBKIT_EXPORT qt_drt_javaScriptObjectsCount()
+{
+ return JSDOMWindowBase::commonJSGlobalData()->heap.globalObjectCount();
+}
+
+void QWEBKIT_EXPORT qt_drt_garbageCollector_collect()
+{
+ gcController().garbageCollectNow();
+}
+void QWEBKIT_EXPORT qt_drt_garbageCollector_collectOnAlternateThread(bool waitUntilDone)
+{
+ gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone);
+}
+
+QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
+ WebCore::HTMLFrameOwnerElement* ownerFrameElement,
+ const WebCore::String& frameName)
+ : name(frameName)
+ , ownerElement(ownerFrameElement)
+ , page(parentPage)
+ , allowsScrolling(true)
+ , marginWidth(0)
+ , marginHeight(0)
+{
frameLoaderClient = new FrameLoaderClientQt();
- RefPtr<Frame> newFrame = Frame::create(webcorePage, frameData->ownerElement, frameLoaderClient);
- frame = newFrame.get();
- frameLoaderClient->setFrame(qframe, frame);
+ frame = Frame::create(page, ownerElement, frameLoaderClient);
// FIXME: All of the below should probably be moved over into WebCore
- frame->tree()->setName(frameData->name);
- if (QWebFrame* _parentFrame = parentFrame())
- QWebFramePrivate::core(_parentFrame)->tree()->appendChild(frame);
+ frame->tree()->setName(name);
+ if (parentFrame)
+ parentFrame->tree()->appendChild(frame);
+}
- // balanced by adoptRef in FrameLoaderClientQt::createFrame
- if (frameData->ownerElement)
- frame->ref();
+void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData)
+{
+ q = qframe;
+
+ allowsScrolling = frameData->allowsScrolling;
+ marginWidth = frameData->marginWidth;
+ marginHeight = frameData->marginHeight;
+ frame = frameData->frame.get();
+ frameLoaderClient = frameData->frameLoaderClient;
+ frameLoaderClient->setFrame(qframe, frame);
frame->init();
}
@@ -280,7 +307,7 @@ QWebFrame::QWebFrame(QWebPage *parent, QWebFrameData *frameData)
, d(new QWebFramePrivate)
{
d->page = parent;
- d->init(this, parent->d->page, frameData);
+ d->init(this, frameData);
if (!frameData->url.isEmpty()) {
WebCore::ResourceRequest request(frameData->url, frameData->referrer);
@@ -293,7 +320,7 @@ QWebFrame::QWebFrame(QWebFrame *parent, QWebFrameData *frameData)
, d(new QWebFramePrivate)
{
d->page = parent->d->page;
- d->init(this, parent->d->page->d->page, frameData);
+ d->init(this, frameData);
}
QWebFrame::~QWebFrame()
@@ -316,6 +343,8 @@ QWebFrame::~QWebFrame()
new URL, you should add them in a slot connected to the
javaScriptWindowObjectCleared() signal.
+ If Javascript is not enabled for this page, then this method does nothing.
+
The \a object will never be explicitly deleted by QtWebKit.
*/
void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object)
@@ -338,10 +367,15 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
new URL, you should add them in a slot connected to the
javaScriptWindowObjectCleared() signal.
+ If Javascript is not enabled for this page, then this method does nothing.
+
The ownership of \a object is specified using \a own.
*/
void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object, QScriptEngine::ValueOwnership ownership)
{
+ if (!page()->settings()->testAttribute(QWebSettings::JavascriptEnabled))
+ return;
+
JSC::JSLock lock(false);
JSDOMWindow* window = toJSDOMWindow(d->frame);
JSC::Bindings::RootObject* root = d->frame->script()->bindingRootObject();
@@ -487,6 +521,17 @@ QUrl QWebFrame::url() const
}
/*!
+ \property QWebFrame::baseUrl
+ \brief the base URL of the frame, can be used to resolve relative URLs
+ \since 4.6
+*/
+
+QUrl QWebFrame::baseUrl() const
+{
+ return d->frame->loader()->baseURL();
+}
+
+/*!
\property QWebFrame::icon
\brief the icon associated with this frame
@@ -933,6 +978,27 @@ qreal QWebFrame::zoomFactor() const
}
/*!
+ \property QWebFrame::focus
+ \since 4.6
+
+ Returns true if this frame has keyboard input focus; otherwise, returns false.
+*/
+bool QWebFrame::hasFocus() const
+{
+ return QWebFramePrivate::kit(d->frame->page()->focusController()->focusedFrame()) == this;
+}
+
+/*!
+ \since 4.6
+
+ Gives keyboard input focus to this frame.
+*/
+void QWebFrame::setFocus()
+{
+ QWebFramePrivate::core(this)->page()->focusController()->setFocusedFrame(QWebFramePrivate::core(this));
+}
+
+/*!
Returns the position of the frame relative to it's parent frame.
*/
QPoint QWebFrame::pos() const
@@ -1229,6 +1295,25 @@ QWebFrame* QWebFramePrivate::kit(WebCore::Frame* coreFrame)
*/
/*!
+ \fn void QWebFrame::loadStarted()
+ \since 4.6
+
+ This signal is emitted when a new load of this frame is started.
+
+ \sa loadFinished()
+*/
+
+/*!
+ \fn void QWebFrame::loadFinished(bool ok)
+ \since 4.6
+
+ This signal is emitted when a load of this frame is finished.
+ \a ok will indicate whether the load was successful or any error occurred.
+
+ \sa loadStarted()
+*/
+
+/*!
\class QWebHitTestResult
\since 4.4
\brief The QWebHitTestResult class provides information about the web
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
index 3ed453e..2c5309a 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
@@ -109,9 +109,11 @@ class QWEBKIT_EXPORT QWebFrame : public QObject
Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
Q_PROPERTY(QString title READ title)
Q_PROPERTY(QUrl url READ url WRITE setUrl)
+ Q_PROPERTY(QUrl baseUrl READ baseUrl)
Q_PROPERTY(QIcon icon READ icon)
Q_PROPERTY(QSize contentsSize READ contentsSize)
Q_PROPERTY(QPoint scrollPosition READ scrollPosition WRITE setScrollPosition)
+ Q_PROPERTY(bool focus READ hasFocus)
private:
QWebFrame(QWebPage *parent, QWebFrameData *frameData);
QWebFrame(QWebFrame *parent, QWebFrameData *frameData);
@@ -140,6 +142,7 @@ public:
QString title() const;
void setUrl(const QUrl &url);
QUrl url() const;
+ QUrl baseUrl() const;
QIcon icon() const;
QMultiMap<QString, QString> metaData() const;
@@ -171,6 +174,9 @@ public:
qreal zoomFactor() const;
void setZoomFactor(qreal factor);
+ bool hasFocus() const;
+ void setFocus();
+
QPoint pos() const;
QRect geometry() const;
QSize contentsSize() const;
@@ -204,6 +210,9 @@ Q_SIGNALS:
void contentsSizeChanged(const QSize &size);
+ void loadStarted();
+ void loadFinished(bool ok);
+
private:
friend class QWebPage;
friend class QWebPagePrivate;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
index 0c7da90..2b5c187 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
@@ -43,9 +43,16 @@ class QWebPage;
class QWebFrameData
{
public:
+ QWebFrameData(WebCore::Page*, WebCore::Frame* parentFrame = 0,
+ WebCore::HTMLFrameOwnerElement* = 0,
+ const WebCore::String& frameName = WebCore::String());
+
WebCore::KURL url;
WebCore::String name;
WebCore::HTMLFrameOwnerElement* ownerElement;
+ WebCore::Page* page;
+ RefPtr<WebCore::Frame> frame;
+ WebCore::FrameLoaderClientQt* frameLoaderClient;
WebCore::String referrer;
bool allowsScrolling;
@@ -67,8 +74,7 @@ public:
, marginWidth(-1)
, marginHeight(-1)
{}
- void init(QWebFrame *qframe, WebCore::Page *page,
- QWebFrameData *frameData);
+ void init(QWebFrame* qframe, QWebFrameData* frameData);
inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); }
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 5899a1b..3c2151b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -325,11 +325,7 @@ bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRe
void QWebPagePrivate::createMainFrame()
{
if (!mainFrame) {
- QWebFrameData frameData;
- frameData.ownerElement = 0;
- frameData.allowsScrolling = true;
- frameData.marginWidth = 0;
- frameData.marginHeight = 0;
+ QWebFrameData frameData(page);
mainFrame = new QWebFrame(q, &frameData);
emit q->frameCreated(mainFrame);
@@ -420,23 +416,6 @@ QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMen
}
#endif // QT_NO_CONTEXTMENU
-QWebFrame *QWebPagePrivate::frameAt(const QPoint &pos) const
-{
- QWebFrame *frame = mainFrame;
-
-redo:
- QList<QWebFrame*> children = frame->childFrames();
- for (int i = 0; i < children.size(); ++i) {
- if (children.at(i)->geometry().contains(pos)) {
- frame = children.at(i);
- goto redo;
- }
- }
- if (frame->geometry().contains(pos))
- return frame;
- return 0;
-}
-
void QWebPagePrivate::_q_webActionTriggered(bool checked)
{
QAction *a = qobject_cast<QAction *>(q->sender());
@@ -844,7 +823,7 @@ void QWebPagePrivate::focusInEvent(QFocusEvent *ev)
Frame *frame = focusController->focusedFrame();
focusController->setActive(true);
if (frame) {
- frame->selection()->setFocused(true);
+ focusController->setFocused(true);
} else {
focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame));
}
@@ -857,10 +836,7 @@ void QWebPagePrivate::focusOutEvent(QFocusEvent *ev)
// focusInEvent() we can re-activate the frame.
FocusController *focusController = page->focusController();
focusController->setActive(false);
- Frame *frame = focusController->focusedFrame();
- if (frame) {
- frame->selection()->setFocused(false);
- }
+ focusController->setFocused(false);
}
void QWebPagePrivate::dragEnterEvent(QDragEnterEvent *ev)
@@ -1337,6 +1313,23 @@ QWebFrame *QWebPage::currentFrame() const
return static_cast<WebCore::FrameLoaderClientQt *>(d->page->focusController()->focusedOrMainFrame()->loader()->client())->webFrame();
}
+
+/*!
+ \since 4.6
+
+ Returns the frame at the given point \a pos.
+
+ \sa mainFrame(), currentFrame()
+*/
+QWebFrame* QWebPage::frameAt(const QPoint& pos) const
+{
+ QWebFrame* webFrame = mainFrame();
+ if (!webFrame->geometry().contains(pos))
+ return 0;
+ QWebHitTestResult hitTestResult = webFrame->hitTestContent(pos);
+ return hitTestResult.frame();
+}
+
/*!
Returns a pointer to the view's history of navigated web pages.
*/
@@ -1430,6 +1423,28 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr
}
/*!
+ \fn bool QWebPage::shouldInterruptJavaScript()
+ \since 4.6
+ This function is called when a JavaScript program is running for a long period of time.
+
+ If the user wanted to stop the JavaScript the implementation should return true; otherwise false.
+
+ The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons.
+
+ \warning Because of binary compatibility constraints, this function is not virtual. If you want to
+ provide your own implementation in a QWebPage subclass, reimplement the shouldInterruptJavaScript()
+ slot in your subclass instead. QtWebKit will dynamically detect the slot and call it.
+*/
+bool QWebPage::shouldInterruptJavaScript()
+{
+#ifdef QT_NO_MESSAGEBOX
+ return false;
+#else
+ return QMessageBox::Yes == QMessageBox::information(d->view, tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
+#endif
+}
+
+/*!
This function is called whenever WebKit wants to create a new window of the given \a type, for
example when a JavaScript program requests to open a document in a new window.
@@ -2193,9 +2208,9 @@ bool QWebPage::swallowContextMenuEvent(QContextMenuEvent *event)
{
d->page->contextMenuController()->clearContextMenu();
- if (QWebFrame* webFrame = d->frameAt(event->pos())) {
+ if (QWebFrame* webFrame = frameAt(event->pos())) {
Frame* frame = QWebFramePrivate::core(webFrame);
- if (Scrollbar* scrollbar = frame->view()->scrollbarUnderPoint(PlatformMouseEvent(event, 1).pos())) {
+ if (Scrollbar* scrollbar = frame->view()->scrollbarAtPoint(PlatformMouseEvent(event, 1).pos())) {
return scrollbar->contextMenu(PlatformMouseEvent(event, 1));
}
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
index 86822d2..517a77c 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
@@ -193,6 +193,7 @@ public:
QWebFrame *mainFrame() const;
QWebFrame *currentFrame() const;
+ QWebFrame* frameAt(const QPoint& pos) const;
QWebHistory *history() const;
QWebSettings *settings() const;
@@ -287,6 +288,9 @@ public:
inline QWebPagePrivate* handle() const { return d; }
+public Q_SLOTS:
+ bool shouldInterruptJavaScript();
+
Q_SIGNALS:
void loadStarted();
void loadProgress(int progress);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
index 984bec1..3a3a674 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
@@ -75,9 +75,6 @@ public:
#ifndef QT_NO_CONTEXTMENU
QMenu *createContextMenu(const WebCore::ContextMenu *webcoreMenu, const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions);
#endif
-
- QWebFrame *frameAt(const QPoint &pos) const;
-
void _q_onLoadProgressChanged(int);
void _q_webActionTriggered(bool checked);
#ifndef NDEBUG
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index c634a7f..f5afbec 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -270,19 +270,24 @@ void QWebView::setPage(QWebPage *page)
'ftp'. The result is then passed through QUrl's tolerant parser, and
in the case or success, a valid QUrl is returned, or else a QUrl().
- Examples
- - webkit.org becomes http://webkit.org
- - ftp.webkit.org becomes ftp://ftp.webkit.org
- - localhost becomes http://localhost
- - /home/user/test.html becomes file:///home/user/test.html (if exists)
-
- Tips when dealing with URLs and strings
- - When creating a QString from a QByteArray or a char*, always use
- QString::fromUtf8().
- - Do not use QUrl(string), nor QUrl::toString() anywhere where the URL might
- be used, such as in the location bar, as those functions loose data.
- Instead use QUrl::fromEncoded() and QUrl::toEncoded(), respectively.
+ \section2 Examples:
+
+ \list
+ \o webkit.org becomes http://webkit.org
+ \o ftp.webkit.org becomes ftp://ftp.webkit.org
+ \o localhost becomes http://localhost
+ \o /home/user/test.html becomes file:///home/user/test.html (if exists)
+ \endlist
+ \section2 Tips when dealing with URLs and strings:
+
+ \list
+ \o When creating a QString from a QByteArray or a char*, always use
+ QString::fromUtf8().
+ \o Do not use QUrl(string), nor QUrl::toString() anywhere where the URL might
+ be used, such as in the location bar, as those functions loose data.
+ Instead use QUrl::fromEncoded() and QUrl::toEncoded(), respectively.
+ \endlist
*/
QUrl QWebView::guessUrlFromString(const QString &string)
{
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index dffa5e5..02aab77 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,341 @@
+2009-07-13 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix qdoc warnings for QWebPage::shouldInterruptJavaScript() and mention
+ how to re-implement it.
+
+ * Api/qwebpage.cpp:
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix crash with plugins when the plugin stream is cancelled.
+
+ Similar to r26667 handle the case where didReceiveResponse on the
+ plugin view results in failure to set up the stream and
+ setMainDocumentError being called instead. This will set the
+ m_pluginView back to 0 and we need check for it before calling
+ didReceiveData.
+
+ This was triggered by consecutive execution of
+ LayoutTests/plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
+ followed by LayoutTests/scrollbars/scrollbar-crash-on-refresh.html
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::committedLoad):
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Added QWebDatabase::removeAllDatabases, as a way to delete all
+ databases from the offline storage path.
+
+ Used by the Qt DRT.
+
+ * Api/qwebdatabase.cpp:
+ (QWebDatabase::removeAllDatabases):
+ * Api/qwebdatabase.h:
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Added loadStarted() and loadFinished() signals to QWebFrame,
+ to allow load tracking of individual frames, as opposed to
+ QWebPage's loadStarted/loadFinished signals that are emitted
+ whenever _any_ child frame loads/finishes.
+
+ * Api/qwebframe.cpp: Document new signals.
+ * Api/qwebframe.h: Add new signals.
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::setFrame): Connect new signals.
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Add hooks for the GCController JavaScript interface needed by the
+ Qt DRT.
+
+ Fixed sort order of includes in qwebframe.cpp.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_javaScriptObjectsCount):
+ (qt_drt_garbageCollector_collect):
+ (qt_drt_garbageCollector_collectOnAlternateThread):
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Add hooks for the GCController JavaScript interface needed by the
+ Qt DRT.
+
+ Fixed sort order of includes in qwebframe.cpp.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_javaScriptObjectsCount):
+ (qt_drt_garbageCollector_collect):
+ (qt_drt_garbageCollector_collectOnAlternateThread):
+
+2009-07-12 Brent Fulgham <bfulgham@gmail.com>
+
+ Speculative build fix after http://trac.webkit.org/changeset/45786.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::addMessageToConsole):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2009-07-10 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27136
+
+ Fix a bug where webkit hangs when executing infinite JavaScript loop.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::shouldInterruptJavaScript):
+ * Api/qwebpage.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::shouldInterruptJavaScript):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (JSTestPage::JSTestPage):
+ (JSTestPage::shouldInterruptJavaScript):
+ (tst_QWebPage::infiniteLoopJS):
+
+2009-07-10 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27108
+
+ Fix crash when in frame tree of a new frame before the new frame
+ has been installed in the frame tree, similar to r35088.
+
+ After calling Frame::init() the frame it may have been removed from the
+ frame tree again through JavaScript. Detect this by checking the page()
+ afterwards.
+
+ To make this check safe the Frame::init() code was moved into
+ QWebFrameData's constructor, where a RefPtr holds a reference to the frame.
+ After the check back in FrameLoaderClientQt we would hold the single
+ reference left and after release() the frame, its frame loader, its
+ client as well as the QWebFrame should have disappeared then.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::init): Only call Frame::init here, the rest is
+ done in QWebFrameData's constructor.
+ (QWebFrame::QWebFrame):
+ * Api/qwebframe_p.h: Adjust declaration.
+ (QWebFrameData::QWebFrameData): Create the Frame here.
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::createMainFrame): Adjust and simplify
+ to new QWebFrame constructor.
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createFrame): Adjust to
+ new QWebFrame construction using QWebFrameData and add the
+ check like in r35088.
+
+2009-07-09 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make Widget RefCounted to fix:
+
+ <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
+ at WebCore::Widget::afterMouseDown() after clicking To Do's close
+ box
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+ -and-
+ <rdar://problem/6991251> WER #13: Crash in WebKit!
+ WebCore::PluginView::performRequest+203 (1311461169)
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+ (WebCore::FrameLoaderClientQt::createJavaAppletWidget):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2009-07-08 Pradeepto Bhattacharya <pradeepto@kde.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Build fix.
+
+ * WebCoreSupport/FrameLoaderClientQt.h: Removed the slot slotCallPolicyFunction().
+
+2009-07-08 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27080
+
+ Fix DRT instability issues with fast/loader/submit-form-while-parsing-2.html
+
+ When the form is submitted we call the policy function in the frame
+ loader delayed with a queued connection. That queued connection
+ sometimes interferes with the javascript timeout set in the testcase.
+
+ Eliminate the entire delayed policy function mechanism and instead always
+ call back directly, like in the other ports. In most other places we called
+ the slot directly anyway.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Remove m_policyFunction.
+ (WebCore::FrameLoaderClientQt::callPolicyFunction): Call the policy function directly instead
+ of emitting the queued signal.
+ (WebCore::FrameLoaderClientQt::cancelPolicyCheck): Call callPolicyFunction directly.
+ (WebCore::FrameLoaderClientQt::dispatchWillSubmitForm): Ditto.
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): Ditto.
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction): Ditto.
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction): Ditto.
+ * WebCoreSupport/FrameLoaderClientQt.h: Remove m_policyFunction as well as the associated
+ signal.
+
+2009-07-07 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ Add Qt DRT hook for clearing the frame name.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_clearFrameName):
+
+2009-07-05 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ Fix two qdoc warnings.
+
+ Added missing \property for QWebFrame::hasFocus and added \a
+ tag for pos of QWebPage::frameAt.
+
+ * Api/qwebframe.cpp:
+ * Api/qwebpage.cpp:
+
+2009-07-04 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ Use the recently introduced FocusController::setFocused
+
+ Use the recently introduced FocusController::setFocused
+ in the Qt platform. The SelectionController will be updated
+ from within the FocusController now.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::focusInEvent):
+ (QWebPagePrivate::focusOutEvent):
+
+2009-07-02 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Improve documentation of QWebFrame::setFocus and hasFocus()
+ Added missing Q_PROPERTY for QWebFrame::hasFocus.
+
+ * Api/qwebframe.cpp: Clarify the docs.
+ * Api/qwebframe.h: add Q_PROPERTY(focus).
+
+2009-07-02 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Bug 26855: [Qt] New methods for QWebFrame to check and set focus.
+
+ Added new public methods QWebFrame::hasFocus() and QWebFrame::setFocus()
+ Added auto test.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::hasFocus):
+ (QWebFrame::setFocus):
+ * Api/qwebframe.h:
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-07-01 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by NOBODY.
+
+ Fix Qt segfault when javascript disabled.
+ If clients call addToJavaScriptWindowObject even though JavascriptEnabled is false
+ webkit will segfault on the assert:
+ ASSERTION FAILED: _rootObject
+ (../../../WebCore/bridge/runtime.cpp:52
+ JSC::Bindings::Instance::Instance(WTF::PassRefPtr<JSC::Bindings::RootObject>))
+ Fix is to ensure JavaScript is enabled when client calls addToJavaScriptWindowObject.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26906
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::addToJavaScriptWindowObject):
+
+2009-07-01 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Move some API headers from WebCore.pro to headers.pri so that they
+ get installed when running make install from the build directory.
+
+ * Api/headers.pri:
+
+2009-07-01 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ Fixed robotized QtLauncher to work when there is no index.html in the user's home.
+
+ * QtLauncher/main.cpp:
+ (main):
+
+2009-06-30 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Renamed scrollbarUnderPoint to scrollbarAtPoint to follow conventions.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::swallowContextMenuEvent):
+
+2009-06-30 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Adam Treat.
+
+ Bug 26422: [Qt] QWebPagePrivate::frameAt calculates wrong frame
+
+ Added a public method QWebPage::frameAt
+ Removed QWebPagePrivate::frameAt, which calcuated the wrong frame
+ Modified QWebPage::swallowContextMenuEvent to use the new frameAt method
+ New test case for frameAt added to tst_qwebpage.cpp
+
+ * Api/qwebpage.cpp:
+ (QWebPage::frameAt):
+ (QWebPage::swallowContextMenuEvent):
+ * Api/qwebpage.h:
+ * Api/qwebpage_p.h:
+ * tests/qwebpage/frametest/iframe.html: Added.
+ * tests/qwebpage/frametest/iframe2.html: Added.
+ * tests/qwebpage/frametest/iframe3.html: Added.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (frameAtHelper):
+ (tst_QWebPage::frameAt):
+ * tests/qwebpage/tst_qwebpage.qrc:
+
+2009-06-30 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add QWebFrame::baseUrl() function that exposes the base URL of a frame.
+ Autotests included.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::baseUrl):
+ * Api/qwebframe.h:
+ * tests/qwebframe/tst_qwebframe.cpp:
+
2009-06-29 Simon Hausmann <simon.hausmann@nokia.com>
Fix the Qt build, add missing isSpeaking() implementation to
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index d001035..c169a9f 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -228,7 +228,7 @@ void ChromeClientQt::setResizable(bool)
notImplemented();
}
-void ChromeClientQt::addMessageToConsole(MessageSource, MessageLevel, const String& message,
+void ChromeClientQt::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message,
unsigned int lineNumber, const String& sourceID)
{
QString x = message;
@@ -288,8 +288,9 @@ void ChromeClientQt::setStatusbarText(const String& msg)
bool ChromeClientQt::shouldInterruptJavaScript()
{
- notImplemented();
- return false;
+ bool shouldInterrupt = false;
+ QMetaObject::invokeMethod(m_webPage, "shouldInterruptJavaScript", Qt::DirectConnection, Q_RETURN_ARG(bool, shouldInterrupt));
+ return shouldInterrupt;
}
bool ChromeClientQt::tabsToLinks() const
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 9f2c1b5..67663fb 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -83,7 +83,7 @@ namespace WebCore {
virtual void setResizable(bool);
- virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message,
+ virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message,
unsigned int lineNumber, const String& sourceID);
virtual bool canRunBeforeUnloadConfirmPanel();
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index c6c4b9e..8e6ffed 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -144,10 +144,8 @@ FrameLoaderClientQt::FrameLoaderClientQt()
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
, m_firstData(false)
- , m_policyFunction(0)
, m_loadSucceeded(false)
{
- connect(this, SIGNAL(sigCallPolicyFunction(int)), this, SLOT(slotCallPolicyFunction(int)), Qt::QueuedConnection);
}
@@ -166,10 +164,14 @@ void FrameLoaderClientQt::setFrame(QWebFrame* webFrame, Frame* frame)
connect(this, SIGNAL(loadStarted()),
m_webFrame->page(), SIGNAL(loadStarted()));
+ connect(this, SIGNAL(loadStarted()),
+ m_webFrame, SIGNAL(loadStarted()));
connect(this, SIGNAL(loadProgress(int)),
m_webFrame->page(), SIGNAL(loadProgress(int)));
connect(this, SIGNAL(loadFinished(bool)),
m_webFrame->page(), SIGNAL(loadFinished(bool)));
+ connect(this, SIGNAL(loadFinished(bool)),
+ m_webFrame, SIGNAL(loadFinished(bool)));
connect(this, SIGNAL(titleChanged(const QString&)),
m_webFrame, SIGNAL(titleChanged(const QString&)));
}
@@ -181,20 +183,7 @@ QWebFrame* FrameLoaderClientQt::webFrame() const
void FrameLoaderClientQt::callPolicyFunction(FramePolicyFunction function, PolicyAction action)
{
- ASSERT(!m_policyFunction);
- ASSERT(function);
-
- m_policyFunction = function;
- emit sigCallPolicyFunction(action);
-}
-
-void FrameLoaderClientQt::slotCallPolicyFunction(int action)
-{
- if (!m_frame || !m_policyFunction)
- return;
- FramePolicyFunction function = m_policyFunction;
- m_policyFunction = 0;
- (m_frame->loader()->*function)(WebCore::PolicyAction(action));
+ (m_frame->loader()->*function)(action);
}
bool FrameLoaderClientQt::hasWebView() const
@@ -415,7 +404,6 @@ void FrameLoaderClientQt::dispatchShow()
void FrameLoaderClientQt::cancelPolicyCheck()
{
// qDebug() << "FrameLoaderClientQt::cancelPolicyCheck";
- m_policyFunction = 0;
}
@@ -423,7 +411,6 @@ void FrameLoaderClientQt::dispatchWillSubmitForm(FramePolicyFunction function,
PassRefPtr<FormState>)
{
notImplemented();
- Q_ASSERT(!m_policyFunction);
// FIXME: This is surely too simple
callPolicyFunction(function, PolicyUse);
}
@@ -692,6 +679,11 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c
if (m_pluginView) {
if (!m_hasSentResponseToPlugin) {
m_pluginView->didReceiveResponse(loader->response());
+ // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in
+ // setting up this stream can cause the main document load to be cancelled, setting m_pluginView
+ // to null
+ if (!m_pluginView)
+ return;
m_hasSentResponseToPlugin = true;
}
m_pluginView->didReceiveData(data, length);
@@ -887,19 +879,15 @@ WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage()
void FrameLoaderClientQt::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String& MIMEType, const WebCore::ResourceRequest&)
{
// we need to call directly here
- Q_ASSERT(!m_policyFunction);
- m_policyFunction = function;
if (canShowMIMEType(MIMEType))
- slotCallPolicyFunction(PolicyUse);
+ callPolicyFunction(function, PolicyUse);
else
- slotCallPolicyFunction(PolicyDownload);
+ callPolicyFunction(function, PolicyDownload);
}
void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState>, const WebCore::String&)
{
- Q_ASSERT(!m_policyFunction);
Q_ASSERT(m_webFrame);
- m_policyFunction = function;
#if QT_VERSION < 0x040400
QWebNetworkRequest r(request);
#else
@@ -916,17 +904,15 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunc
m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
}
- slotCallPolicyFunction(PolicyIgnore);
+ callPolicyFunction(function, PolicyIgnore);
return;
}
- slotCallPolicyFunction(PolicyUse);
+ callPolicyFunction(function, PolicyUse);
}
void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState>)
{
- Q_ASSERT(!m_policyFunction);
Q_ASSERT(m_webFrame);
- m_policyFunction = function;
#if QT_VERSION < 0x040400
QWebNetworkRequest r(request);
#else
@@ -943,10 +929,10 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFun
m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
}
- slotCallPolicyFunction(PolicyIgnore);
+ callPolicyFunction(function, PolicyIgnore);
return;
}
- slotCallPolicyFunction(PolicyUse);
+ callPolicyFunction(function, PolicyUse);
}
void FrameLoaderClientQt::dispatchUnableToImplementPolicy(const WebCore::ResourceError&)
@@ -971,32 +957,35 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
if (!m_webFrame)
return 0;
- QWebFrameData frameData;
+ QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name);
frameData.url = url;
- frameData.name = name;
- frameData.ownerElement = ownerElement;
frameData.referrer = referrer;
frameData.allowsScrolling = allowsScrolling;
frameData.marginWidth = marginWidth;
frameData.marginHeight = marginHeight;
- QWebFrame* webFrame = new QWebFrame(m_webFrame, &frameData);
- emit m_webFrame->page()->frameCreated(webFrame);
+ QPointer<QWebFrame> webFrame = new QWebFrame(m_webFrame, &frameData);
+ // The creation of the frame may have run arbitrary JavaScript that removed it from the page already.
+ if (!webFrame->d->frame->page()) {
+ frameData.frame.release();
+ ASSERT(webFrame.isNull());
+ return 0;
+ }
- RefPtr<Frame> childFrame = adoptRef(webFrame->d->frame);
+ emit m_webFrame->page()->frameCreated(webFrame);
// ### set override encoding if we have one
FrameLoadType loadType = m_frame->loader()->loadType();
FrameLoadType childLoadType = FrameLoadTypeRedirectWithLockedBackForwardList;
- childFrame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, childFrame.get());
+ frameData.frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
// The frame's onload handler may have removed it from the document.
- if (!childFrame->tree()->parent())
+ if (!frameData.frame->tree()->parent())
return 0;
- return childFrame.release();
+ return frameData.frame.release();
}
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& _mimeType)
@@ -1085,7 +1074,7 @@ public:
}
};
-Widget* FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,
+PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,
const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
// qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.prettyURL() << mimeType;
@@ -1149,7 +1138,7 @@ Widget* FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInE
QWidget* view = m_webFrame->page()->view();
if (view)
widget->setParent(view);
- QtPluginWidget* w = new QtPluginWidget();
+ RefPtr<QtPluginWidget> w = adoptRef(new QtPluginWidget());
w->setPlatformWidget(widget);
// Make sure it's invisible until properly placed into the layout
w->setFrameRect(IntRect(0, 0, 0, 0));
@@ -1158,7 +1147,7 @@ Widget* FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInE
// FIXME: make things work for widgetless plugins as well
delete object;
} else { // NPAPI Plugins
- PluginView* pluginView = PluginView::create(m_frame, pluginSize, element, url,
+ RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
paramNames, paramValues, mimeType, loadManually);
return pluginView;
}
@@ -1173,7 +1162,7 @@ void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget)
m_hasSentResponseToPlugin = false;
}
-Widget* FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL,
+PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL,
const Vector<String>& paramNames, const Vector<String>& paramValues)
{
notImplemented();
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 4d2dcbc..754d8bc 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -59,10 +59,7 @@ namespace WebCore {
friend class ::QWebFrame;
void callPolicyFunction(FramePolicyFunction function, PolicyAction action);
- private slots:
- void slotCallPolicyFunction(int);
signals:
- void sigCallPolicyFunction(int);
void loadStarted();
void loadProgress(int d);
void loadFinished(bool);
@@ -188,10 +185,10 @@ namespace WebCore {
virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ;
- virtual Widget* createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
+ virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
virtual void redirectDataToPlugin(Widget* pluginWidget);
- virtual Widget* createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
+ virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
virtual String overrideMediaType() const;
@@ -209,7 +206,6 @@ namespace WebCore {
QWebFrame *m_webFrame;
ResourceResponse m_response;
bool m_firstData;
- FramePolicyFunction m_policyFunction;
// Plugin view to redirect data to
WebCore::PluginView* m_pluginView;
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index cc4d313..c0e72be 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -582,6 +582,10 @@ private slots:
void jsByteArray();
void ownership();
void nullValue();
+ void baseUrl_data();
+ void baseUrl();
+ void hasSetFocus();
+
private:
QString evalJS(const QString&s) {
// Convert an undefined return variant to the string "undefined"
@@ -2413,5 +2417,61 @@ void tst_QWebFrame::nullValue()
QVERIFY(v.isNull());
}
+void tst_QWebFrame::baseUrl_data()
+{
+ QTest::addColumn<QString>("html");
+ QTest::addColumn<QUrl>("loadUrl");
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QUrl>("baseUrl");
+
+ QTest::newRow("null") << QString() << QUrl()
+ << QUrl("about:blank") << QUrl("about:blank");
+
+ QTest::newRow("foo") << QString() << QUrl("http://foobar.baz/")
+ << QUrl("http://foobar.baz/") << QUrl("http://foobar.baz/");
+
+ QString html = "<html>"
+ "<head>"
+ "<base href=\"http://foobaz.bar/\" />"
+ "</head>"
+ "</html>";
+ QTest::newRow("customBaseUrl") << html << QUrl("http://foobar.baz/")
+ << QUrl("http://foobar.baz/") << QUrl("http://foobaz.bar/");
+}
+
+void tst_QWebFrame::baseUrl()
+{
+ QFETCH(QString, html);
+ QFETCH(QUrl, loadUrl);
+ QFETCH(QUrl, url);
+ QFETCH(QUrl, baseUrl);
+
+ m_page->mainFrame()->setHtml(html, loadUrl);
+ QCOMPARE(m_page->mainFrame()->url(), url);
+ QCOMPARE(m_page->mainFrame()->baseUrl(), baseUrl);
+}
+
+void tst_QWebFrame::hasSetFocus()
+{
+ QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool)));
+ QUrl url = QUrl("qrc:///frametest/iframe.html");
+ m_page->mainFrame()->load(url);
+
+ ::waitForSignal(m_page, SIGNAL(loadFinished(bool)));
+
+ m_page->mainFrame()->setFocus();
+ QVERIFY(m_page->mainFrame()->hasFocus());
+
+ QList<QWebFrame*> children = m_page->mainFrame()->childFrames();
+ for (int i = 0; i < children.size(); ++i) {
+ children.at(i)->setFocus();
+ QVERIFY(children.at(i)->hasFocus());
+ QVERIFY(!m_page->mainFrame()->hasFocus());
+ }
+
+ m_page->mainFrame()->setFocus();
+ QVERIFY(m_page->mainFrame()->hasFocus());
+}
+
QTEST_MAIN(tst_QWebFrame)
#include "tst_qwebframe.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html
new file mode 100644
index 0000000..f17027c
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<p>top</p>
+<iframe src="iframe2.html" width="80%" height="30%"/>
+</body>
+</html>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html
new file mode 100644
index 0000000..5017435
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<p>another iframe</p>
+<iframe src="iframe3.html" width="80%" height="30%"></iframe>
+</body>
+</html>
+
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html
new file mode 100644
index 0000000..ed6ac5b
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<p>inner</p>
+</body>
+</html>
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 1d6a48e..6c3b296 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -92,6 +92,7 @@ private slots:
void cleanupTestCase();
void acceptNavigationRequest();
+ void infiniteLoopJS();
void loadFinished();
void acceptNavigationRequestWithNewWindow();
void userStyleSheet();
@@ -106,7 +107,7 @@ private slots:
void textSelection();
void textEditing();
void backActionUpdate();
-
+ void frameAt();
void requestCache();
private:
@@ -192,6 +193,26 @@ void tst_QWebPage::acceptNavigationRequest()
m_view->setPage(0);
}
+class JSTestPage : public QWebPage
+{
+Q_OBJECT
+public:
+ JSTestPage(QObject* parent = 0)
+ : QWebPage(parent) {}
+
+public slots:
+ bool shouldInterruptJavaScript() {
+ return true;
+ }
+};
+
+void tst_QWebPage::infiniteLoopJS()
+{
+ JSTestPage* newPage = new JSTestPage(m_view);
+ m_view->setPage(newPage);
+ m_view->setHtml(QString("<html><bodytest</body></html>"), QUrl());
+ m_view->page()->mainFrame()->evaluateJavaScript("var run = true;var a = 1;while(run){a++;}");
+}
void tst_QWebPage::loadFinished()
{
@@ -1116,5 +1137,32 @@ void tst_QWebPage::backActionUpdate()
QVERIFY(action->isEnabled());
}
+void frameAtHelper(QWebPage* webPage, QWebFrame* webFrame, QPoint framePosition)
+{
+ if (!webFrame)
+ return;
+
+ framePosition += QPoint(webFrame->pos());
+ QList<QWebFrame*> children = webFrame->childFrames();
+ for (int i = 0; i < children.size(); ++i) {
+ if (children.at(i)->childFrames().size() > 0)
+ frameAtHelper(webPage, children.at(i), framePosition);
+
+ QRect frameRect(children.at(i)->pos() + framePosition, children.at(i)->geometry().size());
+ QVERIFY(children.at(i) == webPage->frameAt(frameRect.topLeft()));
+ }
+}
+
+void tst_QWebPage::frameAt()
+{
+ QWebView webView;
+ QWebPage* webPage = webView.page();
+ QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
+ QUrl url = QUrl("qrc:///frametest/iframe.html");
+ webPage->mainFrame()->load(url);
+ QTRY_COMPARE(loadSpy.count(), 1);
+ frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos());
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
index 38c5232..3085ce2 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
@@ -2,6 +2,9 @@
<qresource>
<file>frametest/index.html</file>
<file>frametest/frame_a.html</file>
+ <file>frametest/iframe.html</file>
+ <file>frametest/iframe2.html</file>
+ <file>frametest/iframe3.html</file>
</qresource>
</RCC>
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 62dad6b..4fc9926 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -39,10 +39,6 @@
//#define QAX_NO_CLASSINFO
-#ifndef UNICODE
-#define UNICODE
-#endif
-
#define QT_CHECK_STATE
#include "qaxobject.h"
@@ -174,7 +170,7 @@ inline DISPID QAxMetaObject::dispIDofName(const QByteArray &name, IDispatch *dis
if (dispid == DISPID_UNKNOWN) {
// get the Dispatch ID from the object
QString unicodeName = QLatin1String(name);
- OLECHAR *names = (TCHAR*)unicodeName.utf16();
+ OLECHAR *names = (wchar_t*)unicodeName.utf16();
disp->GetIDsOfNames(IID_NULL, &names, 1, LOCALE_USER_DEFAULT, &dispid);
if (dispid != DISPID_UNKNOWN)
dispIDs.insert(name, dispid);
@@ -638,7 +634,7 @@ QByteArray QAxEventSink::findProperty(DISPID dispID)
UINT cNames;
typeinfo->GetNames(dispID, &names, 1, &cNames);
if (cNames) {
- propname = QString::fromUtf16((const ushort *)names).toLatin1();
+ propname = QString::fromWCharArray(names).toLatin1();
SysFreeString(names);
}
typeinfo->Release();
@@ -972,7 +968,7 @@ bool QAxBase::setControl(const QString &c)
QUuid uuid(search);
if (uuid.isNull()) {
CLSID clsid;
- HRESULT res = CLSIDFromProgID((WCHAR*)c.utf16(), &clsid);
+ HRESULT res = CLSIDFromProgID((wchar_t*)c.utf16(), &clsid);
if (res == S_OK)
search = QUuid(clsid).toString();
else {
@@ -1137,7 +1133,7 @@ QStringList QAxBase::verbs() const
while (enumVerbs->Next(1, &verb, &c) == S_OK) {
if (!verb.lpszVerbName)
continue;
- QString verbName = QString::fromUtf16((const ushort *)verb.lpszVerbName);
+ QString verbName = QString::fromWCharArray(verb.lpszVerbName);
if (!verbName.isEmpty())
d->verbs.insert(verbName, verb.lVerb);
}
@@ -1265,7 +1261,7 @@ bool QAxBase::initializeLicensedHelper(void *f, const QString &key, IUnknown **p
} else if (licinfo.fRuntimeKeyAvail) {
BSTR licenseKey;
factory2->RequestLicKey(0, &licenseKey);
- QString qlicenseKey = QString::fromUtf16((const ushort *)licenseKey);
+ QString qlicenseKey = QString::fromWCharArray(licenseKey);
SysFreeString(licenseKey);
qWarning("Use license key is '%s' to create object on unlicensed machine.",
qlicenseKey.toLatin1().constData());
@@ -1275,7 +1271,7 @@ bool QAxBase::initializeLicensedHelper(void *f, const QString &key, IUnknown **p
if (licinfo.fRuntimeKeyAvail) {
BSTR licenseKey;
factory2->RequestLicKey(0, &licenseKey);
- QString qlicenseKey = QString::fromUtf16((const ushort *)licenseKey);
+ QString qlicenseKey = QString::fromWCharArray(licenseKey);
SysFreeString(licenseKey);
if (qlicenseKey != key)
@@ -1435,7 +1431,7 @@ bool QAxBase::initializeRemote(IUnknown** ptr)
serverInfo.dwReserved1 = 0;
serverInfo.dwReserved2 = 0;
serverInfo.pAuthInfo = &authInfo;
- serverInfo.pwszName = (WCHAR*)server.utf16();
+ serverInfo.pwszName = (wchar_t*)server.utf16();
IClassFactory *factory = 0;
HRESULT res = CoGetClassObject(QUuid(clsid), CLSCTX_REMOTE_SERVER, &serverInfo, IID_IClassFactory, (void**)&factory);
@@ -1747,7 +1743,7 @@ QMetaObject *qax_readInterfaceInfo(ITypeLib *typeLib, ITypeInfo *typeInfo, const
if (S_OK != typeInfo->GetDocumentation(-1, &bstr, 0, 0, 0))
return 0;
- className = QString::fromUtf16((const ushort *)bstr);
+ className = QString::fromWCharArray(bstr);
SysFreeString(bstr);
generator.readEnumInfo();
@@ -1768,7 +1764,7 @@ QMetaObject *qax_readClassInfo(ITypeLib *typeLib, ITypeInfo *classInfo, const QM
if (S_OK != classInfo->GetDocumentation(-1, &bstr, 0, 0, 0))
return 0;
- className = QString::fromUtf16((const ushort *)bstr);
+ className = QString::fromWCharArray(bstr);
SysFreeString(bstr);
generator.readEnumInfo();
@@ -1795,7 +1791,7 @@ QMetaObject *qax_readClassInfo(ITypeLib *typeLib, ITypeInfo *classInfo, const QM
continue;
interfaceInfo->GetDocumentation(-1, &bstr, 0, 0, 0);
- QString interfaceName = QString::fromUtf16((const ushort *)bstr);
+ QString interfaceName = QString::fromWCharArray(bstr);
SysFreeString(bstr);
QByteArray key;
@@ -1843,7 +1839,7 @@ MetaObjectGenerator::MetaObjectGenerator(ITypeLib *tlib, ITypeInfo *tinfo)
typelib->AddRef();
BSTR bstr;
typelib->GetDocumentation(-1, &bstr, 0, 0, 0);
- current_typelib = QString::fromUtf16((const ushort *)bstr).toLatin1();
+ current_typelib = QString::fromWCharArray(bstr).toLatin1();
SysFreeString(bstr);
}
readClassInfo();
@@ -1891,13 +1887,13 @@ QByteArray MetaObjectGenerator::usertypeToString(const TYPEDESC &tdesc, ITypeInf
// get type library name
BSTR typelibname = 0;
usertypelib->GetDocumentation(-1, &typelibname, 0, 0, 0);
- QByteArray typeLibName = QString::fromUtf16((const ushort *)typelibname).toLatin1();
+ QByteArray typeLibName = QString::fromWCharArray(typelibname).toLatin1();
SysFreeString(typelibname);
// get type name
BSTR usertypename = 0;
usertypelib->GetDocumentation(index, &usertypename, 0, 0, 0);
- QByteArray userTypeName = QString::fromUtf16((const ushort *)usertypename).toLatin1();
+ QByteArray userTypeName = QString::fromWCharArray(usertypename).toLatin1();
SysFreeString(usertypename);
if (hasEnum(userTypeName)) // known enum?
@@ -2287,7 +2283,7 @@ void MetaObjectGenerator::readEnumInfo()
BSTR enumname;
QByteArray enumName;
if (typelib->GetDocumentation(i, &enumname, 0, 0, 0) == S_OK) {
- enumName = QString::fromUtf16((const ushort *)enumname).toLatin1();
+ enumName = QString::fromWCharArray(enumname).toLatin1();
SysFreeString(enumname);
} else {
enumName = "enum" + QByteArray::number(++enum_serial);
@@ -2310,7 +2306,7 @@ void MetaObjectGenerator::readEnumInfo()
UINT maxNamesOut;
enuminfo->GetNames(memid, &valuename, 1, &maxNamesOut);
if (maxNamesOut) {
- valueName = QString::fromUtf16((const ushort *)valuename).toLatin1();
+ valueName = QString::fromWCharArray(valuename).toLatin1();
SysFreeString(valuename);
} else {
valueName = "value" + QByteArray::number(valueindex++);
@@ -2467,7 +2463,7 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs)
QList<QByteArray> names;
int p;
for (p = 0; p < (int)maxNamesOut; ++p) {
- names << QString::fromUtf16((const ushort *)bstrNames[p]).toLatin1();
+ names << QString::fromWCharArray(bstrNames[p]).toLatin1();
SysFreeString(bstrNames[p]);
}
@@ -2594,7 +2590,7 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs)
// get function documentation
BSTR bstrDocu;
info->GetDocumentation(funcdesc->memid, 0, &bstrDocu, 0, 0);
- QString strDocu = QString::fromUtf16((const ushort*)bstrDocu);
+ QString strDocu = QString::fromWCharArray(bstrDocu);
SysFreeString(bstrDocu);
if (!!strDocu)
desc += '[' + strDocu + ']';
@@ -2641,7 +2637,7 @@ void MetaObjectGenerator::readVarsInfo(ITypeInfo *typeinfo, ushort nVars)
QByteArray variableName;
uint flags = 0;
- variableName = QString::fromUtf16((const ushort *)bstrName).toLatin1();
+ variableName = QString::fromWCharArray(bstrName).toLatin1();
SysFreeString(bstrName);
// get variable type
@@ -2677,7 +2673,7 @@ void MetaObjectGenerator::readVarsInfo(ITypeInfo *typeinfo, ushort nVars)
// get function documentation
BSTR bstrDocu;
info->GetDocumentation(vardesc->memid, 0, &bstrDocu, 0, 0);
- QString strDocu = QString::fromUtf16((const ushort*)bstrDocu);
+ QString strDocu = QString::fromWCharArray(bstrDocu);
SysFreeString(bstrDocu);
if (!!strDocu)
desc += '[' + strDocu + ']';
@@ -2800,7 +2796,7 @@ void MetaObjectGenerator::readEventInterface(ITypeInfo *eventinfo, IConnectionPo
QList<QByteArray> names;
int p;
for (p = 0; p < (int)maxNamesOut; ++p) {
- names << QString::fromUtf16((const ushort *)bstrNames[p]).toLatin1();
+ names << QString::fromWCharArray(bstrNames[p]).toLatin1();
SysFreeString(bstrNames[p]);
}
@@ -2824,7 +2820,7 @@ void MetaObjectGenerator::readEventInterface(ITypeInfo *eventinfo, IConnectionPo
// get function documentation
BSTR bstrDocu;
eventinfo->GetDocumentation(funcdesc->memid, 0, &bstrDocu, 0, 0);
- QString strDocu = QString::fromUtf16((const ushort*)bstrDocu);
+ QString strDocu = QString::fromWCharArray(bstrDocu);
SysFreeString(bstrDocu);
if (!!strDocu)
desc += '[' + strDocu + ']';
@@ -2982,7 +2978,7 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
if (typelib) {
BSTR bstr;
typelib->GetDocumentation(-1, &bstr, 0, 0, 0);
- current_typelib = QString::fromUtf16((const ushort *)bstr).toLatin1();
+ current_typelib = QString::fromWCharArray(bstr).toLatin1();
SysFreeString(bstr);
}
if (d->tryCache && tryCache())
@@ -3391,9 +3387,9 @@ static bool checkHRESULT(HRESULT hres, EXCEPINFO *exc, QAxBase *that, const QStr
exc->pfnDeferredFillIn(exc);
code = exc->wCode ? exc->wCode : exc->scode;
- source = QString::fromUtf16((const ushort *)exc->bstrSource);
- desc = QString::fromUtf16((const ushort *)exc->bstrDescription);
- help = QString::fromUtf16((const ushort *)exc->bstrHelpFile);
+ source = QString::fromWCharArray(exc->bstrSource);
+ desc = QString::fromWCharArray(exc->bstrDescription);
+ help = QString::fromWCharArray(exc->bstrHelpFile);
uint helpContext = exc->dwHelpContext;
if (helpContext && !help.isEmpty())
@@ -4228,7 +4224,7 @@ public:
if (!var)
return E_POINTER;
- QString property = QString::fromUtf16((const ushort *)name);
+ QString property = QString::fromWCharArray(name);
QVariant qvar = map.value(property);
QVariantToVARIANT(qvar, *var);
return S_OK;
@@ -4237,7 +4233,7 @@ public:
{
if (!var)
return E_POINTER;
- QString property = QString::fromUtf16((const ushort *)name);
+ QString property = QString::fromWCharArray(name);
QVariant qvar = VARIANTToQVariant(*var, 0);
map[property] = qvar;
diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp
index 39d5121..a654a8f 100644
--- a/src/activeqt/container/qaxdump.cpp
+++ b/src/activeqt/container/qaxdump.cpp
@@ -66,8 +66,8 @@ QString qax_docuFromName(ITypeInfo *typeInfo, const QString &name)
BSTR docStringBstr, helpFileBstr;
ulong helpContext;
HRESULT hres = typeInfo->GetDocumentation(memId, 0, &docStringBstr, &helpContext, &helpFileBstr);
- QString docString = QString::fromUtf16((const ushort *)docStringBstr);
- QString helpFile = QString::fromUtf16((const ushort *)helpFileBstr);
+ QString docString = QString::fromWCharArray(docStringBstr);
+ QString helpFile = QString::fromWCharArray(helpFileBstr);
SysFreeString(docStringBstr);
SysFreeString(helpFileBstr);
if (hres == S_OK) {
diff --git a/src/activeqt/container/qaxobject.cpp b/src/activeqt/container/qaxobject.cpp
index 3526f93..63bdd5e 100644
--- a/src/activeqt/container/qaxobject.cpp
+++ b/src/activeqt/container/qaxobject.cpp
@@ -37,10 +37,6 @@
**
****************************************************************************/
-#ifndef UNICODE
-#define UNICODE
-#endif
-
#include "qaxobject.h"
#ifndef QT_NO_WIN_ACTIVEQT
@@ -126,7 +122,7 @@ QAxObject::~QAxObject()
}
/*!
- \reimp
+ \internal
*/
const QMetaObject *QAxObject::metaObject() const
{
@@ -134,7 +130,7 @@ const QMetaObject *QAxObject::metaObject() const
}
/*!
- \reimp
+ \internal
*/
const QMetaObject *QAxObject::parentMetaObject() const
{
@@ -152,7 +148,7 @@ void *QAxObject::qt_metacast(const char *cname)
}
/*!
- \reimp
+ \internal
*/
const char *QAxObject::className() const
{
@@ -160,7 +156,7 @@ const char *QAxObject::className() const
}
/*!
- \reimp
+ \internal
*/
int QAxObject::qt_metacall(QMetaObject::Call call, int id, void **v)
{
diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp
index dcfc84b..2ee08b3 100644
--- a/src/activeqt/container/qaxscript.cpp
+++ b/src/activeqt/container/qaxscript.cpp
@@ -37,10 +37,6 @@
**
****************************************************************************/
-#ifndef UNICODE
-#define UNICODE
-#endif
-
#include "qaxscript.h"
#ifndef QT_NO_WIN_ACTIVEQT
@@ -194,7 +190,7 @@ HRESULT WINAPI QAxScriptSite::GetItemInfo(LPCOLESTR pstrName, DWORD mask, IUnkno
else if (mask & SCRIPTINFO_ITYPEINFO)
return E_POINTER;
- QAxBase *object = script->findObject(QString::fromUtf16((const ushort*)pstrName));
+ QAxBase *object = script->findObject(QString::fromWCharArray(pstrName));
if (!object)
return TYPE_E_ELEMENTNOTFOUND;
@@ -236,9 +232,9 @@ HRESULT WINAPI QAxScriptSite::OnScriptTerminate(const VARIANT *result, const EXC
emit script->finished(VARIANTToQVariant(*result, 0));
if (exception)
emit script->finished(exception->wCode,
- QString::fromUtf16((const ushort*)exception->bstrSource),
- QString::fromUtf16((const ushort*)exception->bstrDescription),
- QString::fromUtf16((const ushort*)exception->bstrHelpFile)
+ QString::fromWCharArray(exception->bstrSource),
+ QString::fromWCharArray(exception->bstrDescription),
+ QString::fromWCharArray(exception->bstrHelpFile)
);
return S_OK;
}
@@ -287,14 +283,14 @@ HRESULT WINAPI QAxScriptSite::OnScriptError(IActiveScriptError *error)
error->GetSourcePosition(&context, &lineNumber, &charPos);
HRESULT hres = error->GetSourceLineText(&bstrLineText);
if (hres == S_OK) {
- lineText = QString::fromUtf16((const ushort*)bstrLineText);
+ lineText = QString::fromWCharArray(bstrLineText);
SysFreeString(bstrLineText);
}
SysFreeString(exception.bstrSource);
SysFreeString(exception.bstrDescription);
SysFreeString(exception.bstrHelpFile);
- emit script->error(exception.wCode, QString::fromUtf16((const ushort*)exception.bstrDescription), lineNumber, lineText);
+ emit script->error(exception.wCode, QString::fromWCharArray(exception.bstrDescription), lineNumber, lineText);
return S_OK;
}
@@ -463,7 +459,7 @@ bool QAxScriptEngine::initialize(IUnknown **ptr)
return false;
CLSID clsid;
- HRESULT hres = CLSIDFromProgID((WCHAR*)script_language.utf16(), &clsid);
+ HRESULT hres = CLSIDFromProgID((wchar_t*)script_language.utf16(), &clsid);
if(FAILED(hres))
return false;
@@ -609,7 +605,7 @@ void QAxScriptEngine::addItem(const QString &name)
if (!engine)
return;
- engine->AddNamedItem((WCHAR*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);
+ engine->AddNamedItem((wchar_t*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);
#endif
}
@@ -1173,7 +1169,7 @@ bool QAxScriptManager::registerEngine(const QString &name, const QString &extens
return false;
CLSID clsid;
- HRESULT hres = CLSIDFromProgID((WCHAR*)name.utf16(), &clsid);
+ HRESULT hres = CLSIDFromProgID((wchar_t*)name.utf16(), &clsid);
if (hres != S_OK)
return false;
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index 5de39e4..a0c725d 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -52,54 +52,46 @@ public:
: QAbstractListModel(parent)
{
HKEY classes_key;
- QT_WA_INLINE(
- RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &classes_key),
- RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &classes_key));
+ RegOpenKeyEx(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &classes_key);
if (!classes_key)
return;
DWORD index = 0;
LONG result = 0;
- TCHAR buffer[256];
- DWORD szBuffer = sizeof(buffer);
+ wchar_t buffer[256];
+ DWORD szBuffer = sizeof(buffer) / sizeof(wchar_t);
FILETIME ft;
do {
- result = QT_WA_INLINE(
- RegEnumKeyExW(classes_key, index, (wchar_t*)&buffer, &szBuffer, 0, 0, 0, &ft),
- RegEnumKeyExA(classes_key, index, (char*)&buffer, &szBuffer, 0, 0, 0, &ft));
- szBuffer = sizeof(buffer);
+ result = RegEnumKeyEx(classes_key, index, buffer, &szBuffer, 0, 0, 0, &ft);
+ szBuffer = sizeof(buffer) / sizeof(wchar_t);
if (result == ERROR_SUCCESS) {
HKEY sub_key;
- QString clsid = QT_WA_INLINE(QString::fromUtf16((ushort*)buffer), QString::fromLocal8Bit((char*)buffer));
- result = QT_WA_INLINE(
- RegOpenKeyExW(classes_key, reinterpret_cast<const wchar_t *>(QString(clsid + "\\Control").utf16()), 0, KEY_READ, &sub_key),
- RegOpenKeyA(classes_key, QString(clsid + QLatin1String("\\Control")).toLocal8Bit(), &sub_key));
+ QString clsid = QString::fromWCharArray(buffer);
+ result = RegOpenKeyEx(classes_key, reinterpret_cast<const wchar_t *>(QString(clsid + "\\Control").utf16()), 0, KEY_READ, &sub_key);
if (result == ERROR_SUCCESS) {
RegCloseKey(sub_key);
- QT_WA_INLINE(
- RegistryQueryValueW(classes_key, buffer, (LPBYTE)buffer, &szBuffer),
- RegQueryValueA(classes_key, (char*)buffer, (char*)buffer, (LONG*)&szBuffer));
- QString name = QT_WA_INLINE(QString::fromUtf16((ushort*)buffer, szBuffer / sizeof(TCHAR)) , QString::fromLocal8Bit((char*)buffer, szBuffer));
+ RegistryQueryValue(classes_key, buffer, (LPBYTE)buffer, &szBuffer);
+ QString name = QString::fromWCharArray(buffer);
controls << name;
clsids.insert(name, clsid);
}
result = ERROR_SUCCESS;
}
- szBuffer = sizeof(buffer);
+ szBuffer = sizeof(buffer) / sizeof(wchar_t);
++index;
} while (result == ERROR_SUCCESS);
RegCloseKey(classes_key);
controls.sort();
}
- LONG RegistryQueryValueW(HKEY hKey, LPCWSTR lpSubKey, LPBYTE lpData, LPDWORD lpcbData)
+ LONG RegistryQueryValue(HKEY hKey, LPCWSTR lpSubKey, LPBYTE lpData, LPDWORD lpcbData)
{
LONG ret = ERROR_FILE_NOT_FOUND;
HKEY hSubKey = NULL;
- RegOpenKeyExW(hKey, lpSubKey, 0, KEY_READ, &hSubKey);
+ RegOpenKeyEx(hKey, lpSubKey, 0, KEY_READ, &hSubKey);
if (hSubKey) {
- ret = RegQueryValueExW(hSubKey, 0, 0, 0, lpData, lpcbData);
+ ret = RegQueryValueEx(hSubKey, 0, 0, 0, lpData, lpcbData);
RegCloseKey(hSubKey);
}
return ret;
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index ebec872..ae468ef 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -37,11 +37,6 @@
**
****************************************************************************/
-#ifndef UNICODE
-#define UNICODE
-#endif
-
-
#include "qaxwidget.h"
#ifndef QT_NO_WIN_ACTIVEQT
@@ -470,7 +465,7 @@ static QAbstractEventDispatcher::EventFilter previous_filter = 0;
#if defined(Q_WS_WINCE)
static int filter_ref = 0;
#else
-static const char *qaxatom = "QAxContainer4_Atom";
+static const wchar_t *qaxatom = L"QAxContainer4_Atom";
#endif
// The filter procedure listening to user interaction on the control
@@ -714,7 +709,7 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
BSTR userType;
HRESULT result = m_spOleObject->GetUserType(USERCLASSTYPE_SHORT, &userType);
if (result == S_OK) {
- widget->setWindowTitle(QString::fromUtf16((const ushort *)userType));
+ widget->setWindowTitle(QString::fromWCharArray(userType));
CoTaskMemFree(userType);
}
} else {
@@ -984,10 +979,7 @@ HRESULT WINAPI QAxClientSite::TranslateAccelerator(LPMSG lpMsg, DWORD /*grfModif
eventTranslated = false;
if (lpMsg->message == WM_KEYDOWN && !lpMsg->wParam)
return S_OK;
- QT_WA_INLINE(
- SendMessage(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam),
- SendMessageA(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam)
- );
+ SendMessage(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam);
return S_OK;
}
@@ -1173,15 +1165,15 @@ HRESULT WINAPI QAxClientSite::InsertMenus(HMENU /*hmenuShared*/, LPOLEMENUGROUPW
#endif
}
-static int menuItemEntry(HMENU menu, int index, MENUITEMINFOA item, QString &text, QPixmap &/*icon*/)
+static int menuItemEntry(HMENU menu, int index, MENUITEMINFO item, QString &text, QPixmap &/*icon*/)
{
if (item.fType == MFT_STRING && item.cch) {
- char *titlebuf = new char[item.cch+1];
+ wchar_t *titlebuf = new wchar_t[item.cch + 1];
item.dwTypeData = titlebuf;
item.cch++;
- ::GetMenuItemInfoA(menu, index, true, &item);
- text = QString::fromLocal8Bit(titlebuf);
- delete []titlebuf;
+ ::GetMenuItemInfo(menu, index, true, &item);
+ text = QString::fromWCharArray(titlebuf);
+ delete [] titlebuf;
return MFT_STRING;
}
#if 0
@@ -1191,7 +1183,7 @@ static int menuItemEntry(HMENU menu, int index, MENUITEMINFOA item, QString &tex
GetBitmapDimensionEx(hbm, &bmsize);
QPixmap pixmap(1,1);
QSize sz(MAP_LOGHIM_TO_PIX(bmsize.cx, pixmap.logicalDpiX()),
- MAP_LOGHIM_TO_PIX(bmsize.cy, pixmap.logicalDpiY()));
+ MAP_LOGHIM_TO_PIX(bmsize.cy, pixmap.logicalDpiY()));
pixmap.resize(bmsize.cx, bmsize.cy);
if (!pixmap.isNull()) {
@@ -1215,11 +1207,11 @@ QMenu *QAxClientSite::generatePopup(HMENU subMenu, QWidget *parent)
if (count)
popup = new QMenu(parent);
for (int i = 0; i < count; ++i) {
- MENUITEMINFOA item;
- memset(&item, 0, sizeof(MENUITEMINFOA));
- item.cbSize = sizeof(MENUITEMINFOA);
+ MENUITEMINFO item;
+ memset(&item, 0, sizeof(MENUITEMINFO));
+ item.cbSize = sizeof(MENUITEMINFO);
item.fMask = MIIM_ID | MIIM_TYPE | MIIM_SUBMENU;
- ::GetMenuItemInfoA(subMenu, i, true, &item);
+ ::GetMenuItemInfo(subMenu, i, true, &item);
QAction *action = 0;
QMenu *popupMenu = 0;
@@ -1295,11 +1287,11 @@ HRESULT WINAPI QAxClientSite::SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND
int count = GetMenuItemCount(hmenuShared);
for (int i = 0; i < count; ++i) {
- MENUITEMINFOA item;
- memset(&item, 0, sizeof(MENUITEMINFOA));
- item.cbSize = sizeof(MENUITEMINFOA);
+ MENUITEMINFO item;
+ memset(&item, 0, sizeof(MENUITEMINFO));
+ item.cbSize = sizeof(MENUITEMINFO);
item.fMask = MIIM_ID | MIIM_TYPE | MIIM_SUBMENU;
- ::GetMenuItemInfoA(hmenuShared, i, true, &item);
+ ::GetMenuItemInfo(hmenuShared, i, true, &item);
QAction *action = 0;
QMenu *popupMenu = 0;
@@ -1379,7 +1371,7 @@ int QAxClientSite::qt_metacall(QMetaObject::Call call, int isignal, void **argv)
OleMenuItem oleItem = menuItemMap.value(action);
if (oleItem.hMenu)
- ::PostMessageA(m_menuOwner, WM_COMMAND, oleItem.id, 0);
+ ::PostMessage(m_menuOwner, WM_COMMAND, oleItem.id, 0);
return -1;
#endif
}
@@ -1404,7 +1396,7 @@ HRESULT WINAPI QAxClientSite::RemoveMenus(HMENU /*hmenuShared*/)
HRESULT WINAPI QAxClientSite::SetStatusText(LPCOLESTR pszStatusText)
{
- QStatusTipEvent tip(QString::fromUtf16((const ushort *)(BSTR)pszStatusText));
+ QStatusTipEvent tip(QString::fromWCharArray(pszStatusText));
QApplication::sendEvent(widget, &tip);
return S_OK;
}
@@ -1513,7 +1505,7 @@ HRESULT WINAPI QAxClientSite::SetActiveObject(IOleInPlaceActiveObject *pActiveOb
AX_DEBUG(QAxClientSite::SetActiveObject);
if (pszObjName && widget)
- widget->setWindowTitle(QString::fromUtf16((const ushort *)(BSTR)pszObjName));
+ widget->setWindowTitle(QString::fromWCharArray(pszObjName));
if (m_spInPlaceActiveObject) {
if (!inPlaceModelessEnabled)
@@ -1952,12 +1944,12 @@ bool QAxWidget::createHostWindow(bool initialized, const QByteArray &data)
container->activateObject(initialized, data);
#if !defined(Q_OS_WINCE)
- ATOM filter_ref = FindAtomA(qaxatom);
+ ATOM filter_ref = FindAtom(qaxatom);
#endif
if (!filter_ref)
previous_filter = QAbstractEventDispatcher::instance()->setEventFilter(axc_FilterProc);
#if !defined(Q_OS_WINCE)
- AddAtomA(qaxatom);
+ AddAtom(qaxatom);
#else
++filter_ref;
#endif
@@ -1992,10 +1984,10 @@ void QAxWidget::clear()
return;
if (!control().isEmpty()) {
#if !defined(Q_OS_WINCE)
- ATOM filter_ref = FindAtomA(qaxatom);
+ ATOM filter_ref = FindAtom(qaxatom);
if (filter_ref)
DeleteAtom(filter_ref);
- filter_ref = FindAtomA(qaxatom);
+ filter_ref = FindAtom(qaxatom);
if (!filter_ref) {
#else
if (!filter_ref && !--filter_ref) {
@@ -2042,7 +2034,7 @@ bool QAxWidget::doVerb(const QString &verb)
*/
/*!
- \reimp
+ \internal
*/
const QMetaObject *QAxWidget::metaObject() const
{
@@ -2050,7 +2042,7 @@ const QMetaObject *QAxWidget::metaObject() const
}
/*!
- \reimp
+ \internal
*/
const QMetaObject *QAxWidget::parentMetaObject() const
{
@@ -2068,7 +2060,7 @@ void *QAxWidget::qt_metacast(const char *cname)
}
/*!
- \reimp
+ \internal
*/
const char *QAxWidget::className() const
{
@@ -2076,7 +2068,7 @@ const char *QAxWidget::className() const
}
/*!
- \reimp
+ \internal
*/
int QAxWidget::qt_metacall(QMetaObject::Call call, int id, void **v)
{
diff --git a/src/activeqt/control/qaxfactory.cpp b/src/activeqt/control/qaxfactory.cpp
index c65fbb8..742e93e 100644
--- a/src/activeqt/control/qaxfactory.cpp
+++ b/src/activeqt/control/qaxfactory.cpp
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
-extern char qAxModuleFilename[MAX_PATH];
+extern wchar_t qAxModuleFilename[MAX_PATH];
/*!
\class QAxFactory
@@ -277,7 +277,7 @@ bool QAxFactory::validateLicenseKey(const QString &key, const QString &licenseKe
return true;
if (licenseKey.isEmpty()) {
- QString licFile(QFile::decodeName(qAxModuleFilename));
+ QString licFile(QString::fromWCharArray(qAxModuleFilename));
int lastDot = licFile.lastIndexOf(QLatin1Char('.'));
licFile = licFile.left(lastDot) + QLatin1String(".lic");
if (QFile::exists(licFile))
@@ -360,7 +360,7 @@ bool QAxFactory::isServer()
return qAxIsServer;
}
-extern char qAxModuleFilename[MAX_PATH];
+extern wchar_t qAxModuleFilename[MAX_PATH];
/*!
Returns the directory that contains the server binary.
@@ -372,7 +372,7 @@ extern char qAxModuleFilename[MAX_PATH];
*/
QString QAxFactory::serverDirPath()
{
- return QFileInfo(QString::fromLocal8Bit(qAxModuleFilename)).absolutePath();
+ return QFileInfo(QString::fromWCharArray(qAxModuleFilename)).absolutePath();
}
/*!
@@ -384,7 +384,7 @@ QString QAxFactory::serverDirPath()
*/
QString QAxFactory::serverFilePath()
{
- return QString::fromLocal8Bit(qAxModuleFilename);
+ return QString::fromWCharArray(qAxModuleFilename);
}
/*!
@@ -492,7 +492,7 @@ bool QAxFactory::registerActiveObject(QObject *object)
if (qstricmp(object->metaObject()->classInfo(object->metaObject()->indexOfClassInfo("RegisterObject")).value(), "yes"))
return false;
- if (!QString::fromLocal8Bit(qAxModuleFilename).toLower().endsWith(QLatin1String(".exe")))
+ if (!QString::fromWCharArray(qAxModuleFilename).toLower().endsWith(QLatin1String(".exe")))
return false;
ActiveObject *active = new ActiveObject(object, qAxFactory());
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index 5f0a05b..e6b0c17 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
bool qAxIsServer = false;
HANDLE qAxInstance = 0;
ITypeLib *qAxTypeLibrary = 0;
-char qAxModuleFilename[MAX_PATH];
+wchar_t qAxModuleFilename[MAX_PATH];
bool qAxOutProcServer = false;
// The QAxFactory instance
@@ -116,19 +116,19 @@ QString qAxInit()
InitializeCriticalSection(&qAxModuleSection);
- libFile = QString::fromLocal8Bit(qAxModuleFilename);
+ libFile = QString::fromWCharArray(qAxModuleFilename);
libFile = libFile.toLower();
- if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
+ if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
return libFile;
int lastDot = libFile.lastIndexOf(QLatin1Char('.'));
libFile = libFile.left(lastDot) + QLatin1String(".tlb");
- if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
+ if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
return libFile;
lastDot = libFile.lastIndexOf(QLatin1Char('.'));
libFile = libFile.left(lastDot) + QLatin1String(".olb");
- if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
+ if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
return libFile;
libFile = QString();
@@ -207,7 +207,7 @@ QString qax_clean_type(const QString &type, const QMetaObject *mo)
HRESULT UpdateRegistry(BOOL bRegister)
{
qAxIsServer = false;
- QString file = QString::fromLocal8Bit(qAxModuleFilename);
+ QString file = QString::fromWCharArray(qAxModuleFilename);
QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1);
QString module = file.right(file.length() - path.length());
module = module.left(module.lastIndexOf(QLatin1Char('.')));
@@ -229,7 +229,7 @@ HRESULT UpdateRegistry(BOOL bRegister)
typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor);
if (bRegister)
- RegisterTypeLib(qAxTypeLibrary, (TCHAR*)libFile.utf16(), 0);
+ RegisterTypeLib(qAxTypeLibrary, (wchar_t*)libFile.utf16(), 0);
else
UnRegisterTypeLib(libAttr->guid, libAttr->wMajorVerNum, libAttr->wMinorVerNum, libAttr->lcid, libAttr->syskind);
@@ -351,6 +351,10 @@ HRESULT UpdateRegistry(BOOL bRegister)
qAxFactory()->registerClass(*key, &settings);
}
} else {
+ if (qAxOutProcServer) {
+ settings.remove(QLatin1String("/AppID/") + appId + QLatin1String("/."));
+ settings.remove(QLatin1String("/AppID/") + module + QLatin1String(".EXE"));
+ }
QStringList keys = qAxFactory()->featureList();
for (QStringList::Iterator key = keys.begin(); key != keys.end(); ++key) {
QString className = *key;
@@ -1067,7 +1071,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
QFile file(outfile);
file.remove();
- QString filebase = QString::fromLocal8Bit(qAxModuleFilename);
+ QString filebase = QString::fromWCharArray(qAxModuleFilename);
filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.')));
QString appID = qAxFactory()->appID().toString().toUpper();
@@ -1103,7 +1107,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
out << "/****************************************************************************" << endl;
out << "** Interface definition generated for ActiveQt project" << endl;
out << "**" << endl;
- out << "** '" << qAxModuleFilename << '\'' << endl;
+ out << "** '" << QString::fromWCharArray(qAxModuleFilename) << '\'' << endl;
out << "**" << endl;
out << "** Created: " << QDateTime::currentDateTime().toString() << endl;
out << "**" << endl;
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 2cac004..d7a8e07 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -788,17 +788,9 @@ bool qax_winEventFilter(void *message)
QAxServerBase *axbase = 0;
while (!axbase && baseHwnd) {
#ifdef GWLP_USERDATA
- QT_WA({
- axbase = (QAxServerBase*)GetWindowLongPtrW(baseHwnd, GWLP_USERDATA);
- }, {
- axbase = (QAxServerBase*)GetWindowLongPtrA(baseHwnd, GWLP_USERDATA);
- });
+ axbase = (QAxServerBase*)GetWindowLongPtr(baseHwnd, GWLP_USERDATA);
#else
- QT_WA({
- axbase = (QAxServerBase*)GetWindowLongW(baseHwnd, GWL_USERDATA);
- }, {
- axbase = (QAxServerBase*)GetWindowLongA(baseHwnd, GWL_USERDATA);
- });
+ axbase = (QAxServerBase*)GetWindowLong(baseHwnd, GWL_USERDATA);
#endif
baseHwnd = ::GetParent(baseHwnd);
@@ -905,11 +897,7 @@ public:
// hook into eventloop; this allows a server to create his own QApplication object
if (!qax_hhook && qax_ownQApp) {
- QT_WA({
- qax_hhook = SetWindowsHookExW(WH_GETMESSAGE, axs_FilterProc, 0, GetCurrentThreadId());
- }, {
- qax_hhook = SetWindowsHookExA(WH_GETMESSAGE, axs_FilterProc, 0, GetCurrentThreadId());
- });
+ qax_hhook = SetWindowsHookEx(WH_GETMESSAGE, axs_FilterProc, 0, GetCurrentThreadId());
}
HRESULT res;
@@ -983,7 +971,7 @@ public:
HRESULT WINAPI CreateInstanceLic(IUnknown *pUnkOuter, IUnknown *pUnkReserved, REFIID iid, BSTR bKey, PVOID *ppObject)
{
- QString licenseKey = QString::fromUtf16((const ushort *)bKey);
+ QString licenseKey = QString::fromWCharArray(bKey);
if (!qAxFactory()->validateLicenseKey(className, licenseKey))
return CLASS_E_NOTLICENSED;
return CreateInstanceHelper(pUnkOuter, iid, ppObject);
@@ -1303,15 +1291,11 @@ bool QAxServerBase::internalCreate()
internalBind();
if (isWidget) {
- if (!stayTopLevel) {
- QEvent e(QEvent::EmbeddingControl);
- QApplication::sendEvent(qt.widget, &e);
- QT_WA({
- ::SetWindowLongW(qt.widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
- }, {
- ::SetWindowLongA(qt.widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
- });
- }
+ if (!stayTopLevel) {
+ QEvent e(QEvent::EmbeddingControl);
+ QApplication::sendEvent(qt.widget, &e);
+ ::SetWindowLong(qt.widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ }
qt.widget->setAttribute(Qt::WA_QuitOnClose, false);
qt.widget->move(0, 0);
@@ -1368,52 +1352,26 @@ class HackWidget : public QWidget
LRESULT CALLBACK QAxServerBase::ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_CREATE) {
- QAxServerBase *that;
- QT_WA({
- CREATESTRUCTW *cs = (CREATESTRUCTW*)lParam;
- that = (QAxServerBase*)cs->lpCreateParams;
- }, {
- CREATESTRUCTA *cs = (CREATESTRUCTA*)lParam;
- that = (QAxServerBase*)cs->lpCreateParams;
- });
+ CREATESTRUCT *cs = (CREATESTRUCT*)lParam;
+ QAxServerBase *that = (QAxServerBase*)cs->lpCreateParams;
#ifdef GWLP_USERDATA
- QT_WA({
- SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)that);
- }, {
- SetWindowLongPtrA(hWnd, GWLP_USERDATA, (LONG_PTR)that);
- });
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)that);
#else
- QT_WA({
- SetWindowLongW(hWnd, GWL_USERDATA, (LONG)that);
- }, {
- SetWindowLongA(hWnd, GWL_USERDATA, (LONG)that);
- });
+ SetWindowLong(hWnd, GWL_USERDATA, (LONG)that);
#endif
- that->m_hWnd = hWnd;
+ that->m_hWnd = hWnd;
- QT_WA({
- return ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
- }, {
- return ::DefWindowProcA(hWnd, uMsg, wParam, lParam);
- });
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
}
QAxServerBase *that = 0;
#ifdef GWLP_USERDATA
- QT_WA({
- that = (QAxServerBase*)GetWindowLongPtrW(hWnd, GWLP_USERDATA);
- }, {
- that = (QAxServerBase*)GetWindowLongPtrA(hWnd, GWLP_USERDATA);
- });
+ that = (QAxServerBase*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
#else
- QT_WA({
- that = (QAxServerBase*)GetWindowLongW(hWnd, GWL_USERDATA);
- }, {
- that = (QAxServerBase*)GetWindowLongA(hWnd, GWL_USERDATA);
- });
+ that = (QAxServerBase*)GetWindowLong(hWnd, GWL_USERDATA);
#endif
if (that) {
@@ -1563,11 +1521,7 @@ LRESULT CALLBACK QAxServerBase::ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam,
}
}
- QT_WA({
- return ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
- }, {
- return ::DefWindowProcA(hWnd, uMsg, wParam, lParam);
- });
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
}
/*!
@@ -1583,54 +1537,29 @@ HWND QAxServerBase::create(HWND hWndParent, RECT& rcPos)
QString cn(QLatin1String("QAxControl"));
cn += QString::number((int)ActiveXProc);
if (!atom) {
- QT_WA({
- WNDCLASSW wcTemp;
- wcTemp.style = CS_DBLCLKS;
- wcTemp.cbClsExtra = 0;
- wcTemp.cbWndExtra = 0;
- wcTemp.hbrBackground = 0;
- wcTemp.hCursor = 0;
- wcTemp.hIcon = 0;
- wcTemp.hInstance = hInst;
- wcTemp.lpszClassName = (wchar_t*)cn.utf16();
- wcTemp.lpszMenuName = 0;
- wcTemp.lpfnWndProc = ActiveXProc;
-
- atom = RegisterClassW(&wcTemp);
- }, {
- QByteArray cna = cn.toLatin1();
- WNDCLASSA wcTemp;
- wcTemp.style = CS_DBLCLKS;
- wcTemp.cbClsExtra = 0;
- wcTemp.cbWndExtra = 0;
- wcTemp.hbrBackground = 0;
- wcTemp.hCursor = 0;
- wcTemp.hIcon = 0;
- wcTemp.hInstance = hInst;
- wcTemp.lpszClassName = cna.data();
- wcTemp.lpszMenuName = 0;
- wcTemp.lpfnWndProc = ActiveXProc;
-
- atom = RegisterClassA(&wcTemp);
- });
+ WNDCLASS wcTemp;
+ wcTemp.style = CS_DBLCLKS;
+ wcTemp.cbClsExtra = 0;
+ wcTemp.cbWndExtra = 0;
+ wcTemp.hbrBackground = 0;
+ wcTemp.hCursor = 0;
+ wcTemp.hIcon = 0;
+ wcTemp.hInstance = hInst;
+ wcTemp.lpszClassName = (wchar_t*)cn.utf16();
+ wcTemp.lpszMenuName = 0;
+ wcTemp.lpfnWndProc = ActiveXProc;
+
+ atom = RegisterClass(&wcTemp);
}
LeaveCriticalSection(&createWindowSection);
if (!atom && GetLastError() != ERROR_CLASS_ALREADY_EXISTS)
return 0;
Q_ASSERT(!m_hWnd);
- HWND hWnd = 0;
- QT_WA({
- hWnd = ::CreateWindowW((wchar_t*)cn.utf16(), 0,
- WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
- rcPos.left, rcPos.top, rcPos.right - rcPos.left,
- rcPos.bottom - rcPos.top, hWndParent, 0, hInst, this);
- }, {
- hWnd = ::CreateWindowA(cn.toLatin1().data(), 0,
- WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
- rcPos.left, rcPos.top, rcPos.right - rcPos.left,
- rcPos.bottom - rcPos.top, hWndParent, 0, hInst, this);
- });
+ HWND hWnd = ::CreateWindow((wchar_t*)cn.utf16(), 0,
+ WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ rcPos.left, rcPos.top, rcPos.right - rcPos.left,
+ rcPos.bottom - rcPos.top, hWndParent, 0, hInst, this);
Q_ASSERT(m_hWnd == hWnd);
@@ -1676,11 +1605,7 @@ HMENU QAxServerBase::createPopup(QMenu *popup, HMENU oldMenu)
actionMap.remove(itemId);
actionMap.insert(itemId, action);
}
- QT_WA({
- AppendMenuW(popupMenu, flags, itemId, (TCHAR*)action->text().utf16());
- }, {
- AppendMenuA(popupMenu, flags, itemId, action->text().toLocal8Bit());
- });
+ AppendMenu(popupMenu, flags, itemId, (const wchar_t *)action->text().utf16());
}
if (oldMenu)
DrawMenuBar(hwndMenuOwner);
@@ -1726,11 +1651,7 @@ void QAxServerBase::createMenu(QMenuBar *menuBar)
itemId = static_cast<ushort>(reinterpret_cast<ulong>(action));
actionMap.insert(itemId, action);
}
- QT_WA({
- AppendMenuW(hmenuShared, flags, itemId, (TCHAR*)action->text().utf16());
- } , {
- AppendMenuA(hmenuShared, flags, itemId, action->text().toLocal8Bit());
- });
+ AppendMenu(hmenuShared, flags, itemId, (const wchar_t *)action->text().utf16());
}
OLEMENUGROUPWIDTHS menuWidths = {0,edit,0,object,0,help};
@@ -2397,7 +2318,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
if (!cname)
return res;
- name = QString::fromUtf16((const ushort *)bname).toLatin1();
+ name = QString::fromWCharArray(bname).toLatin1();
SysFreeString(bname);
}
}
@@ -2799,7 +2720,7 @@ HRESULT WINAPI QAxServerBase::Load(IStream *pStm)
bool openAsText = false;
QByteArray qtarray;
if (hres == S_OK) {
- QString streamName = QString::fromUtf16((const ushort *)stat.pwcsName);
+ QString streamName = QString::fromWCharArray(stat.pwcsName);
CoTaskMemFree(stat.pwcsName);
openAsText = streamName == QLatin1String("SomeStreamName");
if (stat.cbSize.HighPart) // more than 4GB - too large!
@@ -2940,7 +2861,7 @@ HRESULT WINAPI QAxServerBase::Load(IStorage *pStg)
*/
streamName += QLatin1String("_Stream4.2");
- pStg->OpenStream((const WCHAR *)streamName.utf16(), 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &spStream);
+ pStg->OpenStream((const wchar_t *)streamName.utf16(), 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &spStream);
if (!spStream) // support for streams saved with 4.1 and earlier
pStg->OpenStream(L"SomeStreamName", 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &spStream);
if (!spStream)
@@ -2963,7 +2884,7 @@ HRESULT WINAPI QAxServerBase::Save(IStorage *pStg, BOOL fSameAsLoad)
*/
streamName += QLatin1String("_Stream4.2");
- pStg->CreateStream((const WCHAR *)streamName.utf16(), STGM_CREATE | STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &spStream);
+ pStg->CreateStream((const wchar_t *)streamName.utf16(), STGM_CREATE | STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &spStream);
if (!spStream)
return E_FAIL;
@@ -3079,7 +3000,7 @@ HRESULT WINAPI QAxServerBase::SaveCompleted(LPCOLESTR fileName)
if (qt.object->metaObject()->indexOfClassInfo("MIME") == -1)
return E_NOTIMPL;
- currentFileName = QString::fromUtf16(reinterpret_cast<const ushort *>(fileName));
+ currentFileName = QString::fromWCharArray(fileName);
return S_OK;
}
@@ -3097,7 +3018,7 @@ HRESULT WINAPI QAxServerBase::GetCurFile(LPOLESTR *currentFile)
if (!malloc)
return E_OUTOFMEMORY;
- *currentFile = static_cast<WCHAR *>(malloc->Alloc(currentFileName.length() * 2));
+ *currentFile = static_cast<wchar_t *>(malloc->Alloc(currentFileName.length() * 2));
malloc->Release();
memcpy(*currentFile, currentFileName.unicode(), currentFileName.length() * 2);
@@ -3117,7 +3038,7 @@ HRESULT WINAPI QAxServerBase::Load(LPCOLESTR fileName, DWORD mode)
return E_NOTIMPL;
}
- QString loadFileName = QString::fromUtf16(reinterpret_cast<const ushort *>(fileName));
+ QString loadFileName = QString::fromWCharArray(fileName);
QString fileExtension = loadFileName.mid(loadFileName.lastIndexOf(QLatin1Char('.')) + 1);
QFile file(loadFileName);
@@ -3162,7 +3083,7 @@ HRESULT WINAPI QAxServerBase::Save(LPCOLESTR fileName, BOOL fRemember)
return E_NOTIMPL;
}
- QString saveFileName = QString::fromUtf16(reinterpret_cast<const ushort *>(fileName));
+ QString saveFileName = QString::fromWCharArray(fileName);
QString fileExtension = saveFileName.mid(saveFileName.lastIndexOf(QLatin1Char('.')) + 1);
QFile file(saveFileName);
@@ -3220,7 +3141,7 @@ HRESULT WINAPI QAxServerBase::Draw(DWORD dwAspect, LONG lindex, void *pvAspect,
bool bDeleteDC = false;
if (!hicTargetDev) {
- hicTargetDev = ::CreateDCA("DISPLAY", NULL, NULL, NULL);
+ hicTargetDev = ::CreateDC(L"DISPLAY", NULL, NULL, NULL);
bDeleteDC = (hicTargetDev != hdcDraw);
}
@@ -3383,7 +3304,7 @@ HRESULT WINAPI QAxServerBase::OnAmbientPropertyChange(DISPID dispID)
case DISPID_AMBIENT_DISPLAYNAME:
if (var.vt != VT_BSTR || !isWidget)
break;
- qt.widget->setWindowTitle(QString::fromUtf16((const ushort *)var.bstrVal));
+ qt.widget->setWindowTitle(QString::fromWCharArray(var.bstrVal));
break;
case DISPID_AMBIENT_FONT:
if (var.vt != VT_DISPATCH || !isWidget)
diff --git a/src/activeqt/control/qaxserverdll.cpp b/src/activeqt/control/qaxserverdll.cpp
index 375028d..512c408 100644
--- a/src/activeqt/control/qaxserverdll.cpp
+++ b/src/activeqt/control/qaxserverdll.cpp
@@ -50,7 +50,7 @@ bool qax_ownQApp = false;
HHOOK qax_hhook = 0;
// in qaxserver.cpp
-extern char qAxModuleFilename[MAX_PATH];
+extern wchar_t qAxModuleFilename[MAX_PATH];
extern bool qAxIsServer;
extern ITypeLib *qAxTypeLibrary;
extern unsigned long qAxLockCount();
@@ -120,7 +120,7 @@ STDAPI DllCanUnloadNow()
EXTERN_C BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved)
{
- GetModuleFileNameA(hInstance, qAxModuleFilename, MAX_PATH-1);
+ GetModuleFileName(hInstance, qAxModuleFilename, MAX_PATH);
qAxInstance = hInstance;
qAxIsServer = true;
diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp
index 8f20d97..d465746 100644
--- a/src/activeqt/control/qaxservermain.cpp
+++ b/src/activeqt/control/qaxservermain.cpp
@@ -66,7 +66,7 @@ extern bool qAxActivity;
extern HANDLE qAxInstance;
extern bool qAxIsServer;
extern bool qAxOutProcServer;
-extern char qAxModuleFilename[MAX_PATH];
+extern wchar_t qAxModuleFilename[MAX_PATH];
extern QString qAxInit();
extern void qAxCleanup();
extern HRESULT UpdateRegistry(BOOL bRegister);
@@ -105,7 +105,7 @@ static DWORD WINAPI MonitorProc(void* pv)
static bool StartMonitor()
{
dwThreadID = GetCurrentThreadId();
- hEventShutdown = CreateEventA(0, false, false, 0);
+ hEventShutdown = CreateEvent(0, false, false, 0);
if (hEventShutdown == 0)
return false;
DWORD dwThreadID;
@@ -203,17 +203,10 @@ EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR,
QT_USE_NAMESPACE
qAxOutProcServer = true;
- GetModuleFileNameA(0, qAxModuleFilename, MAX_PATH-1);
+ GetModuleFileName(0, qAxModuleFilename, MAX_PATH);
qAxInstance = hInstance;
- QByteArray cmdParam;
- QT_WA({
- LPTSTR cmdline = GetCommandLineW();
- cmdParam = QString::fromUtf16((const ushort *)cmdline).toLocal8Bit();
- }, {
- cmdParam = GetCommandLineA();
- });
-
+ QByteArray cmdParam = QString::fromWCharArray(GetCommandLine()).toLocal8Bit();
QList<QByteArray> cmds = cmdParam.split(' ');
QByteArray unprocessed;
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index 916fcca..49aa99c 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -37,11 +37,6 @@
**
****************************************************************************/
-#ifndef UNICODE
-#define UNICODE
-#endif
-
-
#include <ocidl.h>
#include <olectl.h>
@@ -123,7 +118,7 @@ static QFont IFontToQFont(IFont *f)
f->get_Strikethrough(&strike);
f->get_Underline(&underline);
f->get_Weight(&weight);
- QFont font(QString::fromUtf16((const ushort *)name), size.Lo/9750, weight / 97, italic);
+ QFont font(QString::fromWCharArray(name), size.Lo/9750, weight / 97, italic);
font.setBold(bold);
font.setStrikeOut(strike);
font.setUnderline(underline);
@@ -925,10 +920,10 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
QVariant var;
switch(arg.vt) {
case VT_BSTR:
- var = QString::fromUtf16((const ushort *)arg.bstrVal);
+ var = QString::fromWCharArray(arg.bstrVal);
break;
case VT_BSTR|VT_BYREF:
- var = QString::fromUtf16((const ushort *)*arg.pbstrVal);
+ var = QString::fromWCharArray(*arg.pbstrVal);
break;
case VT_BOOL:
var = QVariant((bool)arg.boolVal);
@@ -1245,7 +1240,7 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
for (long i = lBound; i <= uBound; ++i) {
BSTR bstr;
SafeArrayGetElement(array, &i, &bstr);
- strings << QString::fromUtf16((const ushort *)bstr);
+ strings << QString::fromWCharArray(bstr);
SysFreeString(bstr);
}
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 3720984..ced86d2 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -254,8 +254,17 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
int oldCurrentLoop = currentLoop;
QAbstractAnimation::Direction oldDirection = direction;
- state = newState;
+ // check if we should Rewind
+ if ((newState == QAbstractAnimation::Paused || newState == QAbstractAnimation::Running)
+ && oldState == QAbstractAnimation::Stopped) {
+ //here we reset the time if needed
+ //we don't call setCurrentTime because this might change the way the animation
+ //behaves: changing the state or changing the current value
+ totalCurrentTime = currentTime =(direction == QAbstractAnimation::Forward) ?
+ 0 : (loopCount == -1 ? q->duration() : q->totalDuration());
+ }
+ state = newState;
QPointer<QAbstractAnimation> guard(q);
guard->updateState(oldState, newState);
@@ -268,36 +277,22 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
if (guard)
emit guard->stateChanged(oldState, newState);
- // Enter running state.
switch (state)
{
case QAbstractAnimation::Paused:
case QAbstractAnimation::Running:
- {
- // Rewind
- if (oldState == QAbstractAnimation::Stopped) {
- if (guard) {
- if (direction == QAbstractAnimation::Forward)
- q->setCurrentTime(0);
- else
- q->setCurrentTime(loopCount == -1 ? q->duration() : q->totalDuration());
- }
-
- // Check if the setCurrentTime() function called stop().
- // This can happen for a 0-duration animation
- if (state == QAbstractAnimation::Stopped)
- return;
- }
-
- // Register timer if our parent is not running.
- if (state == QAbstractAnimation::Running && guard) {
- if (!group || group->state() == QAbstractAnimation::Stopped) {
- QUnifiedTimer::instance()->registerAnimation(q);
- }
- } else {
- //new state is paused
- QUnifiedTimer::instance()->unregisterAnimation(q);
+ //this ensures that the value is updated now that the animation is running
+ if(oldState == QAbstractAnimation::Stopped && guard)
+ guard->setCurrentTime(currentTime);
+
+ // Register timer if our parent is not running.
+ if (state == QAbstractAnimation::Running && guard) {
+ if (!group || group->state() == QAbstractAnimation::Stopped) {
+ QUnifiedTimer::instance()->registerAnimation(q);
}
+ } else {
+ //new state is paused
+ QUnifiedTimer::instance()->unregisterAnimation(q);
}
break;
case QAbstractAnimation::Stopped:
@@ -625,8 +620,8 @@ void QAbstractAnimation::start(DeletionPolicy policy)
Q_D(QAbstractAnimation);
if (d->state == Running)
return;
- d->setState(Running);
d->deleteWhenStopped = policy;
+ d->setState(Running);
}
/*!
@@ -648,9 +643,8 @@ void QAbstractAnimation::stop()
/*!
Pauses the animation. When the animation is paused, state() returns Paused.
- The currenttime will remain unchanged until resume() or start() is called.
- If you want to continue from the current time, call resume().
-
+ The value of currentTime will remain unchanged until resume() or start()
+ is called. If you want to continue from the current time, call resume().
\sa start(), state(), resume()
*/
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 00def55..0d8402e 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -58,6 +58,8 @@
#include <QtCore/qtimer.h>
#include <private/qobject_p.h>
+#ifndef QT_NO_ANIMATION
+
QT_BEGIN_NAMESPACE
class QAnimationGroup;
@@ -147,4 +149,7 @@ private:
};
QT_END_NAMESPACE
-#endif
+
+#endif //QT_NO_ANIMATION
+
+#endif //QABSTRACTANIMATION_P_H
diff --git a/src/corelib/animation/qanimationgroup_p.h b/src/corelib/animation/qanimationgroup_p.h
index 8e668f0..01252c5 100644
--- a/src/corelib/animation/qanimationgroup_p.h
+++ b/src/corelib/animation/qanimationgroup_p.h
@@ -59,6 +59,8 @@
#include "private/qabstractanimation_p.h"
+#ifndef QT_NO_ANIMATION
+
QT_BEGIN_NAMESPACE
class QAnimationGroupPrivate : public QAbstractAnimationPrivate
@@ -76,4 +78,6 @@ public:
QT_END_NAMESPACE
+#endif //QT_NO_ANIMATION
+
#endif //QANIMATIONGROUP_P_H
diff --git a/src/corelib/animation/qparallelanimationgroup_p.h b/src/corelib/animation/qparallelanimationgroup_p.h
index 201eb16..949a9b2 100644
--- a/src/corelib/animation/qparallelanimationgroup_p.h
+++ b/src/corelib/animation/qparallelanimationgroup_p.h
@@ -57,6 +57,8 @@
#include "private/qanimationgroup_p.h"
#include <QtCore/QHash>
+#ifndef QT_NO_ANIMATION
+
QT_BEGIN_NAMESPACE
class QParallelAnimationGroupPrivate : public QAnimationGroupPrivate
@@ -82,4 +84,6 @@ public:
QT_END_NAMESPACE
+#endif //QT_NO_ANIMATION
+
#endif //QPARALLELANIMATIONGROUP_P_H
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 7526a81..5f224aa 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -100,10 +100,6 @@
QT_BEGIN_NAMESPACE
-typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
-typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
-Q_GLOBAL_STATIC(QPropertyAnimationHash, _q_runningAnimations)
-
void QPropertyAnimationPrivate::updateMetaProperty()
{
if (!target || propertyName.isEmpty())
@@ -286,19 +282,21 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState,
QPropertyAnimation *animToStop = 0;
{
- QPropertyAnimationHash * hash = _q_runningAnimations();
- QMutexLocker locker(QMutexPool::globalInstanceGet(hash));
+ QMutexLocker locker(QMutexPool::globalInstanceGet(&staticMetaObject));
+ typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
+ typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
+ static QPropertyAnimationHash hash;
QPropertyAnimationPair key(d->target, d->propertyName);
if (newState == Running) {
d->updateMetaProperty();
- animToStop = hash->value(key, 0);
- hash->insert(key, this);
+ animToStop = hash.value(key, 0);
+ hash.insert(key, this);
// update the default start value
if (oldState == Stopped) {
d->setDefaultStartValue(d->target->property(d->propertyName.constData()));
}
- } else if (hash->value(key) == this) {
- hash->remove(key);
+ } else if (hash.value(key) == this) {
+ hash.remove(key);
}
}
diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h
index 68b2519..a2ae5ec 100644
--- a/src/corelib/animation/qpropertyanimation_p.h
+++ b/src/corelib/animation/qpropertyanimation_p.h
@@ -58,6 +58,8 @@
#include "private/qvariantanimation_p.h"
+#ifndef QT_NO_ANIMATION
+
QT_BEGIN_NAMESPACE
class QPropertyAnimationPrivate : public QVariantAnimationPrivate
@@ -86,4 +88,6 @@ public:
QT_END_NAMESPACE
-#endif
+#endif //QT_NO_ANIMATION
+
+#endif //QPROPERTYANIMATION_P_H
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 5932e7c..05dc307 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -269,8 +269,10 @@ QSequentialAnimationGroup::~QSequentialAnimationGroup()
/*!
Adds a pause of \a msecs to this animation group.
- The pause is considered as a special type of animation, thus count() will be
+ The pause is considered as a special type of animation, thus
+ \l{QAnimationGroup::animationCount()}{animationCount} will be
increased by one.
+
\sa insertPauseAt(), QAnimationGroup::addAnimation()
*/
QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)
diff --git a/src/corelib/animation/qsequentialanimationgroup_p.h b/src/corelib/animation/qsequentialanimationgroup_p.h
index 555b696..8db79a0 100644
--- a/src/corelib/animation/qsequentialanimationgroup_p.h
+++ b/src/corelib/animation/qsequentialanimationgroup_p.h
@@ -56,6 +56,7 @@
#include "qsequentialanimationgroup.h"
#include "private/qanimationgroup_p.h"
+#ifndef QT_NO_ANIMATION
QT_BEGIN_NAMESPACE
@@ -108,4 +109,6 @@ public:
QT_END_NAMESPACE
+#endif //QT_NO_ANIMATION
+
#endif //QSEQUENTIALANIMATIONGROUP_P_H
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index b2d52d5..3e397ca 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -62,7 +62,7 @@ class Q_CORE_EXPORT QVariantAnimation : public QAbstractAnimation
Q_OBJECT
Q_PROPERTY(QVariant startValue READ startValue WRITE setStartValue)
Q_PROPERTY(QVariant endValue READ endValue WRITE setEndValue)
- Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY currentValueChanged)
+ Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY valueChanged)
Q_PROPERTY(int duration READ duration WRITE setDuration)
Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve)
diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h
index b848e12..69e23dc 100644
--- a/src/corelib/animation/qvariantanimation_p.h
+++ b/src/corelib/animation/qvariantanimation_p.h
@@ -60,6 +60,8 @@
#include "private/qabstractanimation_p.h"
+#ifndef QT_NO_ANIMATION
+
QT_BEGIN_NAMESPACE
class QVariantAnimationPrivate : public QAbstractAnimationPrivate
@@ -120,4 +122,6 @@ template<typename T > inline QVariant _q_interpolateVariant(const T &from, const
QT_END_NAMESPACE
+#endif //QT_NO_ANIMATION
+
#endif //QANIMATION_P_H
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
index 1bf76ea..188ac8c 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
@@ -225,10 +225,11 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState
char *inBytes = const_cast<char *>(chars);
#endif
+ QByteArray in;
if (remainingCount) {
// we have to prepend the remaining bytes from the previous conversion
inBytesLeft += remainingCount;
- QByteArray in(inBytesLeft, Qt::Uninitialized);
+ in.resize(inBytesLeft);
inBytes = in.data();
memcpy(in.data(), remainingBuffer, remainingCount);
@@ -362,9 +363,10 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
inBytes = const_cast<char *>(reinterpret_cast<const char *>(uc));
inBytesLeft = len * sizeof(QChar);
+ QByteArray in;
if (convState && convState->remainingChars) {
// we have one surrogate char to be prepended
- QByteArray in(sizeof(QChar) + len, Qt::Uninitialized);
+ in.resize(sizeof(QChar) + len);
inBytes = in.data();
QChar remaining = convState->state_data[0];
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index d4e5d44..f49e34a 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -99,6 +99,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QTextCodecFactoryInterface_iid, QLatin1String("/codecs")))
#endif
+static char qtolower(register char c)
+{ if (c >= 'A' && c <= 'Z') return c + 0x20; return c; }
+static bool qisalnum(register char c)
+{ return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
static bool nameMatch(const QByteArray &name, const QByteArray &test)
{
@@ -111,21 +115,21 @@ static bool nameMatch(const QByteArray &name, const QByteArray &test)
// if the letters and numbers are the same, we have a match
while (*n != '\0') {
- if (isalnum((uchar)*n)) {
+ if (qisalnum(*n)) {
for (;;) {
if (*h == '\0')
return false;
- if (isalnum((uchar)*h))
+ if (qisalnum(*h))
break;
++h;
}
- if (tolower((uchar)*n) != tolower((uchar)*h))
+ if (qtolower(*n) != qtolower(*h))
return false;
++h;
}
++n;
}
- while (*h && !isalnum((uchar)*h))
+ while (*h && !qisalnum(*h))
++h;
return (*h == '\0');
}
@@ -233,9 +237,9 @@ QString QWindowsLocalCodec::convertToUnicode(const char *chars, int length, Conv
return QString();
const int wclen_auto = 4096;
- WCHAR wc_auto[wclen_auto];
+ wchar_t wc_auto[wclen_auto];
int wclen = wclen_auto;
- WCHAR *wc = wc_auto;
+ wchar_t *wc = wc_auto;
int len;
QString sp;
bool prepend = false;
@@ -275,7 +279,7 @@ QString QWindowsLocalCodec::convertToUnicode(const char *chars, int length, Conv
} else {
wclen = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
mb, mblen, 0, 0);
- wc = new WCHAR[wclen];
+ wc = new wchar_t[wclen];
// and try again...
}
} else if (r == ERROR_NO_UNICODE_TRANSLATION) {
@@ -341,7 +345,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
const char *next = 0;
QString s;
while((next = CharNextExA(CP_ACP, mb, 0)) != mb) {
- WCHAR wc[2] ={0};
+ wchar_t wc[2] ={0};
int charlength = next - mb;
int len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, mb, charlength, wc, 2);
if (len>0) {
@@ -1042,16 +1046,10 @@ QList<int> QTextCodec::availableMibs()
This might be needed for some applications that want to use their
own mechanism for setting the locale.
- Setting this codec is not supported on DOS based Windows.
-
\sa codecForLocale()
*/
void QTextCodec::setCodecForLocale(QTextCodec *c)
{
-#ifdef Q_WS_WIN
- if (QSysInfo::WindowsVersion& QSysInfo::WV_DOS_based)
- return;
-#endif
localeMapper = c;
if (!localeMapper)
setupLocaleMapper();
@@ -1538,9 +1536,13 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba, QTextCodec *defaultCo
}
/*!
- \overload
+ \overload
- If the codec cannot be detected, this overload returns a Latin-1 QTextCodec.
+ Tries to detect the encoding of the provided snippet of HTML in
+ the given byte array, \a ba, by checking the BOM (Byte Order Mark)
+ and the content-type meta header and returns a QTextCodec instance
+ that is capable of decoding the html to unicode. If the codec cannot
+ be detected, this overload returns a Latin-1 QTextCodec.
*/
QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba)
{
@@ -1552,10 +1554,13 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba)
Tries to detect the encoding of the provided snippet \a ba by
using the BOM (Byte Order Mark) and returns a QTextCodec instance
- that is capable of decoding the text to unicode. If the codec
+ that is capable of decoding the text to unicode. If the codec
cannot be detected from the content provided, \a defaultCodec is
returned.
+ The behavior of this function is undefined if \a ba is not
+ encoded in unicode.
+
\sa codecForHtml()
*/
QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec)
@@ -1593,9 +1598,17 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaul
}
/*!
- \overload
+ \overload
- If the codec cannot be detected, this overload returns a Latin-1 QTextCodec.
+ Tries to detect the encoding of the provided snippet \a ba by
+ using the BOM (Byte Order Mark) and returns a QTextCodec instance
+ that is capable of decoding the text to unicode. If the codec
+ cannot be detected, this overload returns a Latin-1 QTextCodec.
+
+ The behavior of this function is undefined if \a ba is not
+ encoded in unicode.
+
+ \sa codecForHtml()
*/
QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)
{
diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h
index 499c0f9..5c82735 100644
--- a/src/corelib/codecs/qtextcodec_p.h
+++ b/src/corelib/codecs/qtextcodec_p.h
@@ -77,6 +77,33 @@ struct QTextCodecUnalignedPointer
}
};
+#else
+
+class QTextCodec
+{
+public:
+ enum ConversionFlag {
+ DefaultConversion,
+ ConvertInvalidToNull = 0x80000000,
+ IgnoreHeader = 0x1,
+ FreeFunction = 0x2
+ };
+ Q_DECLARE_FLAGS(ConversionFlags, ConversionFlag)
+
+ struct ConverterState {
+ ConverterState(ConversionFlags f = DefaultConversion)
+ : flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; }
+ ~ConverterState() { }
+ ConversionFlags flags;
+ int remainingChars;
+ int invalidChars;
+ uint state_data[3];
+ void *d;
+ private:
+ Q_DISABLE_COPY(ConverterState)
+ };
+};
+
#endif //QT_NO_TEXTCODEC
QT_END_NAMESPACE
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index abae6f7..abcc07c 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -44,23 +44,19 @@
#include "qendian.h"
#include "qchar.h"
-#ifndef QT_NO_TEXTCODEC
-
QT_BEGIN_NAMESPACE
-QUtf8Codec::~QUtf8Codec()
-{
-}
+enum { Endian = 0, Data = 1 };
-QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const
+QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state)
{
uchar replacement = '?';
int rlen = 3*len;
int surrogate_high = -1;
if (state) {
- if (state->flags & ConvertInvalidToNull)
+ if (state->flags & QTextCodec::ConvertInvalidToNull)
replacement = 0;
- if (!(state->flags & IgnoreHeader))
+ if (!(state->flags & QTextCodec::IgnoreHeader))
rlen += 3;
if (state->remainingChars)
surrogate_high = state->state_data[0];
@@ -71,7 +67,7 @@ QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterSta
uchar* cursor = (uchar*)rstr.data();
const QChar *ch = uc;
int invalid = 0;
- if (state && !(state->flags & IgnoreHeader)) {
+ if (state && !(state->flags & QTextCodec::IgnoreHeader)) {
*cursor++ = 0xef;
*cursor++ = 0xbb;
*cursor++ = 0xbf;
@@ -133,7 +129,7 @@ QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterSta
rstr.resize(cursor - (const uchar*)rstr.constData());
if (state) {
state->invalidChars += invalid;
- state->flags |= IgnoreHeader;
+ state->flags |= QTextCodec::IgnoreHeader;
state->remainingChars = 0;
if (surrogate_high >= 0) {
state->remainingChars = 1;
@@ -143,18 +139,18 @@ QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterSta
return rstr;
}
-void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, ConverterState *state) const
+QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state)
{
bool headerdone = false;
- QChar replacement = QChar::ReplacementCharacter;
+ ushort replacement = QChar::ReplacementCharacter;
int need = 0;
int error = -1;
uint uc = 0;
uint min_uc = 0;
if (state) {
- if (state->flags & IgnoreHeader)
+ if (state->flags & QTextCodec::IgnoreHeader)
headerdone = true;
- if (state->flags & ConvertInvalidToNull)
+ if (state->flags & QTextCodec::ConvertInvalidToNull)
replacement = QChar::Null;
need = state->remainingChars;
if (need) {
@@ -170,40 +166,28 @@ void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, C
headerdone = true;
}
- int originalLength = target->length();
- QString &result = *target;
- result.resize(originalLength + len + 1); // worst case
- QChar *qch = result.data() + originalLength;
+ QString result(need + len + 1, Qt::Uninitialized); // worst case
+ ushort *qch = (ushort *)result.unicode();
uchar ch;
int invalid = 0;
- for (int i=0; i<len; i++) {
+ for (int i = 0; i < len; ++i) {
ch = chars[i];
if (need) {
if ((ch&0xc0) == 0x80) {
uc = (uc << 6) | (ch & 0x3f);
- need--;
+ --need;
if (!need) {
// utf-8 bom composes into 0xfeff code point
if (!headerdone && uc == 0xfeff) {
// dont do anything, just skip the BOM
} else if (uc > 0xffff && uc < 0x110000) {
// surrogate pair
- uc -= 0x10000;
- unsigned short high = uc/0x400 + 0xd800;
- unsigned short low = uc%0x400 + 0xdc00;
-
- // resize if necessary
- long where = qch - result.unicode();
- if (where + 2 >= result.length()) {
- result.resize(where + 2);
- qch = result.data() + where;
- }
-
- *qch++ = QChar(high);
- *qch++ = QChar(low);
+ Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length());
+ *qch++ = QChar::highSurrogate(uc);
+ *qch++ = QChar::lowSurrogate(uc);
} else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
- // error
+ // error: overlong sequence, UTF16 surrogate or BOM
*qch++ = replacement;
++invalid;
} else {
@@ -221,7 +205,7 @@ void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, C
}
} else {
if (ch < 128) {
- *qch++ = QLatin1Char(ch);
+ *qch++ = ushort(ch);
headerdone = true;
} else if ((ch & 0xe0) == 0xc0) {
uc = ch & 0x1f;
@@ -255,57 +239,35 @@ void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, C
++invalid;
}
}
- result.truncate(qch - result.unicode());
+ result.truncate(qch - (ushort *)result.unicode());
if (state) {
state->invalidChars += invalid;
state->remainingChars = need;
if (headerdone)
- state->flags |= IgnoreHeader;
+ state->flags |= QTextCodec::IgnoreHeader;
state->state_data[0] = need ? uc : 0;
state->state_data[1] = need ? min_uc : 0;
}
-}
-
-QString QUtf8Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const
-{
- QString result;
- convertToUnicode(&result, chars, len, state);
return result;
}
-QByteArray QUtf8Codec::name() const
-{
- return "UTF-8";
-}
-
-int QUtf8Codec::mibEnum() const
-{
- return 106;
-}
-
-enum { Endian = 0, Data = 1 };
-
-QUtf16Codec::~QUtf16Codec()
-{
-}
-
-QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const
+QByteArray QUtf16::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e)
{
- Endianness endian = e;
+ DataEndianness endian = e;
int length = 2*len;
- if (!state || (!(state->flags & IgnoreHeader))) {
+ if (!state || (!(state->flags & QTextCodec::IgnoreHeader))) {
length += 2;
}
- if (e == Detect) {
- endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE;
+ if (e == DetectEndianness) {
+ endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
}
QByteArray d;
d.resize(length);
char *data = d.data();
- if (!state || !(state->flags & IgnoreHeader)) {
+ if (!state || !(state->flags & QTextCodec::IgnoreHeader)) {
QChar bom(QChar::ByteOrderMark);
- if (endian == BE) {
+ if (endian == BigEndianness) {
data[0] = bom.row();
data[1] = bom.cell();
} else {
@@ -314,7 +276,7 @@ QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt
}
data += 2;
}
- if (endian == BE) {
+ if (endian == BigEndianness) {
for (int i = 0; i < len; ++i) {
*(data++) = uc[i].row();
*(data++) = uc[i].cell();
@@ -328,35 +290,35 @@ QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt
if (state) {
state->remainingChars = 0;
- state->flags |= IgnoreHeader;
+ state->flags |= QTextCodec::IgnoreHeader;
}
return d;
}
-QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const
+QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e)
{
- Endianness endian = e;
+ DataEndianness endian = e;
bool half = false;
uchar buf = 0;
bool headerdone = false;
if (state) {
- headerdone = state->flags & IgnoreHeader;
- if (endian == Detect)
- endian = (Endianness)state->state_data[Endian];
+ headerdone = state->flags & QTextCodec::IgnoreHeader;
+ if (endian == DetectEndianness)
+ endian = (DataEndianness)state->state_data[Endian];
if (state->remainingChars) {
half = true;
buf = state->state_data[Data];
}
}
- if (headerdone && endian == Detect)
- endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE;
+ if (headerdone && endian == DetectEndianness)
+ endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
QString result(len, Qt::Uninitialized); // worst case
QChar *qch = (QChar *)result.unicode();
while (len--) {
if (half) {
QChar ch;
- if (endian == LE) {
+ if (endian == LittleEndianness) {
ch.setRow(*chars++);
ch.setCell(buf);
} else {
@@ -364,17 +326,17 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState
ch.setCell(*chars++);
}
if (!headerdone) {
- if (endian == Detect) {
- if (ch == QChar::ByteOrderSwapped && endian != BE) {
- endian = LE;
- } else if (ch == QChar::ByteOrderMark && endian != LE) {
+ if (endian == DetectEndianness) {
+ if (ch == QChar::ByteOrderSwapped && endian != BigEndianness) {
+ endian = LittleEndianness;
+ } else if (ch == QChar::ByteOrderMark && endian != LittleEndianness) {
// ignore BOM
- endian = BE;
+ endian = BigEndianness;
} else {
if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
- endian = BE;
+ endian = BigEndianness;
} else {
- endian = LE;
+ endian = LittleEndianness;
ch = QChar((ch.unicode() >> 8) | ((ch.unicode() & 0xff) << 8));
}
*qch++ = ch;
@@ -396,7 +358,7 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState
if (state) {
if (headerdone)
- state->flags |= IgnoreHeader;
+ state->flags |= QTextCodec::IgnoreHeader;
state->state_data[Endian] = endian;
if (half) {
state->remainingChars = 1;
@@ -409,72 +371,21 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState
return result;
}
-int QUtf16Codec::mibEnum() const
-{
- return 1015;
-}
-
-QByteArray QUtf16Codec::name() const
-{
- return "UTF-16";
-}
-
-QList<QByteArray> QUtf16Codec::aliases() const
-{
- return QList<QByteArray>();
-}
-
-int QUtf16BECodec::mibEnum() const
-{
- return 1013;
-}
-
-QByteArray QUtf16BECodec::name() const
-{
- return "UTF-16BE";
-}
-
-QList<QByteArray> QUtf16BECodec::aliases() const
-{
- QList<QByteArray> list;
- return list;
-}
-
-int QUtf16LECodec::mibEnum() const
-{
- return 1014;
-}
-
-QByteArray QUtf16LECodec::name() const
-{
- return "UTF-16LE";
-}
-
-QList<QByteArray> QUtf16LECodec::aliases() const
-{
- QList<QByteArray> list;
- return list;
-}
-
-QUtf32Codec::~QUtf32Codec()
-{
-}
-
-QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const
+QByteArray QUtf32::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e)
{
- Endianness endian = e;
+ DataEndianness endian = e;
int length = 4*len;
- if (!state || (!(state->flags & IgnoreHeader))) {
+ if (!state || (!(state->flags & QTextCodec::IgnoreHeader))) {
length += 4;
}
- if (e == Detect) {
- endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE;
+ if (e == DetectEndianness) {
+ endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
}
QByteArray d(length, Qt::Uninitialized);
char *data = d.data();
- if (!state || !(state->flags & IgnoreHeader)) {
- if (endian == BE) {
+ if (!state || !(state->flags & QTextCodec::IgnoreHeader)) {
+ if (endian == BigEndianness) {
data[0] = 0;
data[1] = 0;
data[2] = (char)0xfe;
@@ -487,7 +398,7 @@ QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt
}
data += 4;
}
- if (endian == BE) {
+ if (endian == BigEndianness) {
for (int i = 0; i < len; ++i) {
uint cp = uc[i].unicode();
if (uc[i].isHighSurrogate() && i < len - 1)
@@ -511,59 +422,59 @@ QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt
if (state) {
state->remainingChars = 0;
- state->flags |= IgnoreHeader;
+ state->flags |= QTextCodec::IgnoreHeader;
}
return d;
}
-QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const
+QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e)
{
- Endianness endian = e;
+ DataEndianness endian = e;
uchar tuple[4];
int num = 0;
bool headerdone = false;
if (state) {
- headerdone = state->flags & IgnoreHeader;
- if (endian == Detect) {
- endian = (Endianness)state->state_data[Endian];
+ headerdone = state->flags & QTextCodec::IgnoreHeader;
+ if (endian == DetectEndianness) {
+ endian = (DataEndianness)state->state_data[Endian];
}
num = state->remainingChars;
memcpy(tuple, &state->state_data[Data], 4);
}
- if (headerdone && endian == Detect)
- endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE;
+ if (headerdone && endian == DetectEndianness)
+ endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
QString result;
result.resize((num + len) >> 2 << 1); // worst case
QChar *qch = (QChar *)result.unicode();
-
+
const char *end = chars + len;
while (chars < end) {
tuple[num++] = *chars++;
if (num == 4) {
if (!headerdone) {
- if (endian == Detect) {
- if (endian == Detect) {
- if (tuple[0] == 0xff && tuple[1] == 0xfe && tuple[2] == 0 && tuple[3] == 0 && endian != BE) {
- endian = LE;
+ if (endian == DetectEndianness) {
+ if (endian == DetectEndianness) {
+ if (tuple[0] == 0xff && tuple[1] == 0xfe && tuple[2] == 0 && tuple[3] == 0 && endian != BigEndianness) {
+ endian = LittleEndianness;
num = 0;
continue;
- } else if (tuple[0] == 0 && tuple[1] == 0 && tuple[2] == 0xfe && tuple[3] == 0xff && endian != LE) {
- endian = BE;
+ } else if (tuple[0] == 0 && tuple[1] == 0 && tuple[2] == 0xfe && tuple[3] == 0xff && endian != LittleEndianness) {
+ endian = BigEndianness;
num = 0;
continue;
} else if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
- endian = BE;
+ endian = BigEndianness;
} else {
- endian = LE;
+ endian = LittleEndianness;
}
}
- } else if (((endian == BE) ? qFromBigEndian<quint32>(tuple) : qFromLittleEndian<quint32>(tuple)) == QChar::ByteOrderMark) {
+ } else if (((endian == BigEndianness) ? qFromBigEndian<quint32>(tuple) : qFromLittleEndian<quint32>(tuple)) == QChar::ByteOrderMark) {
num = 0;
continue;
}
}
- uint code = (endian == BE) ? qFromBigEndian<quint32>(tuple) : qFromLittleEndian<quint32>(tuple);
+ uint code = (endian == BigEndianness) ? qFromBigEndian<quint32>(tuple) : qFromLittleEndian<quint32>(tuple);
if (code >= 0x10000) {
*qch++ = QChar::highSurrogate(code);
*qch++ = QChar::lowSurrogate(code);
@@ -574,10 +485,10 @@ QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState
}
}
result.truncate(qch - result.unicode());
-
+
if (state) {
if (headerdone)
- state->flags |= IgnoreHeader;
+ state->flags |= QTextCodec::IgnoreHeader;
state->state_data[Endian] = endian;
state->remainingChars = num;
memcpy(&state->state_data[Data], tuple, 4);
@@ -585,6 +496,113 @@ QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState
return result;
}
+
+#ifndef QT_NO_TEXTCODEC
+
+QUtf8Codec::~QUtf8Codec()
+{
+}
+
+QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const
+{
+ return QUtf8::convertFromUnicode(uc, len, state);
+}
+
+void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, ConverterState *state) const
+{
+ *target += QUtf8::convertToUnicode(chars, len, state);
+}
+
+QString QUtf8Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const
+{
+ return QUtf8::convertToUnicode(chars, len, state);
+}
+
+QByteArray QUtf8Codec::name() const
+{
+ return "UTF-8";
+}
+
+int QUtf8Codec::mibEnum() const
+{
+ return 106;
+}
+
+QUtf16Codec::~QUtf16Codec()
+{
+}
+
+QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const
+{
+ return QUtf16::convertFromUnicode(uc, len, state, e);
+}
+
+QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const
+{
+ return QUtf16::convertToUnicode(chars, len, state, e);
+}
+
+int QUtf16Codec::mibEnum() const
+{
+ return 1015;
+}
+
+QByteArray QUtf16Codec::name() const
+{
+ return "UTF-16";
+}
+
+QList<QByteArray> QUtf16Codec::aliases() const
+{
+ return QList<QByteArray>();
+}
+
+int QUtf16BECodec::mibEnum() const
+{
+ return 1013;
+}
+
+QByteArray QUtf16BECodec::name() const
+{
+ return "UTF-16BE";
+}
+
+QList<QByteArray> QUtf16BECodec::aliases() const
+{
+ QList<QByteArray> list;
+ return list;
+}
+
+int QUtf16LECodec::mibEnum() const
+{
+ return 1014;
+}
+
+QByteArray QUtf16LECodec::name() const
+{
+ return "UTF-16LE";
+}
+
+QList<QByteArray> QUtf16LECodec::aliases() const
+{
+ QList<QByteArray> list;
+ return list;
+}
+
+QUtf32Codec::~QUtf32Codec()
+{
+}
+
+QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const
+{
+ return QUtf32::convertFromUnicode(uc, len, state, e);
+}
+
+QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const
+{
+ return QUtf32::convertToUnicode(chars, len, state, e);
+}
+
int QUtf32Codec::mibEnum() const
{
return 1017;
@@ -633,7 +651,6 @@ QList<QByteArray> QUtf32LECodec::aliases() const
return list;
}
+#endif //QT_NO_TEXTCODEC
QT_END_NAMESPACE
-
-#endif //QT_NO_TEXTCODEC
diff --git a/src/corelib/codecs/qutfcodec_p.h b/src/corelib/codecs/qutfcodec_p.h
index 749f5be..4f8f92e 100644
--- a/src/corelib/codecs/qutfcodec_p.h
+++ b/src/corelib/codecs/qutfcodec_p.h
@@ -54,9 +54,35 @@
//
#include "QtCore/qtextcodec.h"
+#include "private/qtextcodec_p.h"
QT_BEGIN_NAMESPACE
+enum DataEndianness
+{
+ DetectEndianness,
+ BigEndianness,
+ LittleEndianness
+};
+
+struct QUtf8
+{
+ static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *);
+ static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *);
+};
+
+struct QUtf16
+{
+ static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness);
+ static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness);
+};
+
+struct QUtf32
+{
+ static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness);
+ static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness);
+};
+
#ifndef QT_NO_TEXTCODEC
class QUtf8Codec : public QTextCodec {
@@ -73,13 +99,8 @@ public:
class QUtf16Codec : public QTextCodec {
protected:
- enum Endianness {
- Detect,
- BE,
- LE
- };
public:
- QUtf16Codec() { e = Detect; }
+ QUtf16Codec() { e = DetectEndianness; }
~QUtf16Codec();
QByteArray name() const;
@@ -90,12 +111,12 @@ public:
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
protected:
- Endianness e;
+ DataEndianness e;
};
class QUtf16BECodec : public QUtf16Codec {
public:
- QUtf16BECodec() : QUtf16Codec() { e = BE; }
+ QUtf16BECodec() : QUtf16Codec() { e = BigEndianness; }
QByteArray name() const;
QList<QByteArray> aliases() const;
int mibEnum() const;
@@ -103,21 +124,15 @@ public:
class QUtf16LECodec : public QUtf16Codec {
public:
- QUtf16LECodec() : QUtf16Codec() { e = LE; }
+ QUtf16LECodec() : QUtf16Codec() { e = LittleEndianness; }
QByteArray name() const;
QList<QByteArray> aliases() const;
int mibEnum() const;
};
class QUtf32Codec : public QTextCodec {
-protected:
- enum Endianness {
- Detect,
- BE,
- LE
- };
public:
- QUtf32Codec() { e = Detect; }
+ QUtf32Codec() { e = DetectEndianness; }
~QUtf32Codec();
QByteArray name() const;
@@ -128,12 +143,12 @@ public:
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
protected:
- Endianness e;
+ DataEndianness e;
};
class QUtf32BECodec : public QUtf32Codec {
public:
- QUtf32BECodec() : QUtf32Codec() { e = BE; }
+ QUtf32BECodec() : QUtf32Codec() { e = BigEndianness; }
QByteArray name() const;
QList<QByteArray> aliases() const;
int mibEnum() const;
@@ -141,7 +156,7 @@ public:
class QUtf32LECodec : public QUtf32Codec {
public:
- QUtf32LECodec() : QUtf32Codec() { e = LE; }
+ QUtf32LECodec() : QUtf32Codec() { e = LittleEndianness; }
QByteArray name() const;
QList<QByteArray> aliases() const;
int mibEnum() const;
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
index a26cc07..ee1ed3a 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
@@ -42,20 +42,14 @@
#include "qtconcurrentiteratekernel.h"
#if defined(Q_OS_MAC)
-
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <unistd.h>
-
#elif defined(Q_OS_UNIX)
-
#include <time.h>
#include <unistd.h>
-
#elif defined(Q_OS_WIN)
-
-#include <windows.h>
-
+#include <qt_windows.h>
#endif
diff --git a/src/corelib/concurrent/qtconcurrentmap.cpp b/src/corelib/concurrent/qtconcurrentmap.cpp
index b8c753a..797f335 100644
--- a/src/corelib/concurrent/qtconcurrentmap.cpp
+++ b/src/corelib/concurrent/qtconcurrentmap.cpp
@@ -41,13 +41,14 @@
/*!
\namespace QtConcurrent
+ \inmodule QtCore
\since 4.4
\brief The QtConcurrent namespace provides high-level APIs that make it
possible to write multi-threaded programs without using low-level
threading primitives.
See the \l {threads.html#qtconcurrent-intro}{Qt Concurrent} section in the \l{threads.html}{threading} documentation.
-
+ \inheaderfile QtCore
\ingroup thread
*/
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index bb639fe..f7d6514 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -915,7 +915,7 @@ QT_BEGIN_NAMESPACE
\fn bool qt_winUnicode()
\relates <QtGlobal>
- Use QSysInfo::WindowsVersion and QSysInfo::WV_DOS_based instead.
+ This function always returns true.
\sa QSysInfo
*/
@@ -1620,15 +1620,11 @@ QSysInfo::WinVersion QSysInfo::windowsVersion()
if (winver)
return winver;
winver = QSysInfo::WV_NT;
-#ifndef Q_OS_WINCE
- OSVERSIONINFOA osver;
- osver.dwOSVersionInfoSize = sizeof(osver);
- GetVersionExA(&osver);
-#else
- DWORD qt_cever = 0;
OSVERSIONINFOW osver;
osver.dwOSVersionInfoSize = sizeof(osver);
GetVersionEx(&osver);
+#ifdef Q_OS_WINCE
+ DWORD qt_cever = 0;
qt_cever = osver.dwMajorVersion * 100;
qt_cever += osver.dwMinorVersion * 10;
#endif
@@ -1672,7 +1668,7 @@ QSysInfo::WinVersion QSysInfo::windowsVersion()
winver = QSysInfo::WV_WINDOWS7;
} else {
qWarning("Qt: Untested Windows version %d.%d detected!",
- osver.dwMajorVersion, osver.dwMinorVersion);
+ int(osver.dwMajorVersion), int(osver.dwMinorVersion));
winver = QSysInfo::WV_NT_based;
}
}
@@ -1904,29 +1900,16 @@ QString qt_error_string(int errorCode)
break;
default: {
#ifdef Q_OS_WIN
- QT_WA({
- unsigned short *string = 0;
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errorCode,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR)&string,
- 0,
- NULL);
- ret = QString::fromUtf16(string);
- LocalFree((HLOCAL)string);
- }, {
- char *string = 0;
- FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errorCode,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR)&string,
- 0,
- NULL);
- ret = QString::fromLocal8Bit(string);
- LocalFree((HLOCAL)string);
- });
+ wchar_t *string = 0;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ errorCode,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ string,
+ 0,
+ NULL);
+ ret = QString::fromWCharArray(string);
+ LocalFree((HLOCAL)string);
if (ret.isEmpty() && errorCode == ERROR_MOD_NOT_FOUND)
ret = QString::fromLatin1("The specified module could not be found.");
@@ -2476,6 +2459,62 @@ int qrand()
*/
/*!
+ \fn QString qtTrId(const char *id, int n = -1)
+ \relates <QtGlobal>
+ \reentrant
+ \since 4.6
+
+ Returns a translated string identified by \a id.
+ If no matching string is found, the id itself is returned. This
+ should not happen under normal conditions.
+
+ If \a n >= 0, all occurrences of \c %n in the resulting string
+ are replaced with a decimal representation of \a n. In addition,
+ depending on \a n's value, the translation text may vary.
+
+ Meta data and comments can be passed as documented for QObject::tr().
+ In addition, it is possible to supply a source string template like that:
+
+ \tt{//% <C string>}
+
+ or
+
+ \tt{\begincomment% <C string> \endcomment}
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp qttrid
+
+ Creating QM files suitable for use with this function requires passing
+ the \c -idbased option to the \c lrelease tool.
+
+ \warning This method is reentrant only if all translators are
+ installed \e before calling this method. Installing or removing
+ translators while performing translations is not supported. Doing
+ so will probably result in crashes or other undesirable behavior.
+
+ \sa QObject::tr(), QCoreApplication::translate(), {Internationalization with Qt}
+*/
+
+/*!
+ \macro QT_TRID_NOOP(id)
+ \relates <QtGlobal>
+ \since 4.6
+
+ Marks \a id for dynamic translation.
+ The only purpose of this macro is to provide an anchor for attaching
+ meta data like to qtTrId().
+
+ The macro expands to \a id.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp qttrid_noop
+
+ \sa qtTrId(), {Internationalization with Qt}
+*/
+
+/*!
\macro QT_POINTER_SIZE
\relates <QtGlobal>
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index afc3f58..0ef48fa 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -147,7 +147,7 @@ namespace QT_NAMESPACE {}
MSDOS - MS-DOS and Windows
OS2 - OS/2
OS2EMX - XFree86 on OS/2 (not PM)
- WIN32 - Win32 (Windows 95/98/ME and Windows NT/2000/XP)
+ WIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008)
WINCE - WinCE (Windows CE 5.0)
CYGWIN - Cygwin
SOLARIS - Sun Solaris
@@ -705,7 +705,7 @@ namespace QT_NAMESPACE {}
# define Q_DECL_ALIGNED(n) __attribute__((aligned(n)))
# endif
# if __HP_aCC-0 >= 062000
-# define Q_DECL_EXPORT __attribute__((visibility("default"))
+# define Q_DECL_EXPORT __attribute__((visibility("default")))
# define Q_DECL_IMPORT Q_DECL_EXPORT
# endif
# else
@@ -1416,21 +1416,13 @@ inline QT3_SUPPORT bool qSysInfo(int *wordSize, bool *bigEndian)
#if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN)
#if defined(QT3_SUPPORT)
-inline QT3_SUPPORT bool qt_winUnicode() { return !(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based); }
+inline QT3_SUPPORT bool qt_winUnicode() { return true; }
inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; }
#endif
-#ifdef Q_OS_WINCE
-#define QT_WA(uni, ansi) uni
-#define QT_WA_INLINE(uni, ansi) (uni)
-#elif defined(UNICODE)
-#define QT_WA(uni, ansi) if (!(QSysInfo::windowsVersion() & QSysInfo::WV_DOS_based)) { uni } else { ansi }
+#define QT_WA(unicode, ansi) unicode
+#define QT_WA_INLINE(unicode, ansi) (unicode)
-#define QT_WA_INLINE(uni, ansi) (!(QSysInfo::windowsVersion() & QSysInfo::WV_DOS_based) ? uni : ansi)
-#else
-#define QT_WA(uni, ansi) ansi
-#define QT_WA_INLINE(uni, ansi) ansi
-#endif
#endif /* Q_WS_WIN */
#ifndef Q_OUTOFLINE_TEMPLATE
@@ -2070,7 +2062,7 @@ public:
inline bool operator!() const { return !i; }
- inline bool testFlag(Enum f) const { return (i & f) == f; }
+ inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == f ); }
};
#define Q_DECLARE_FLAGS(Flags, Enum)\
@@ -2206,6 +2198,18 @@ inline const QForeachContainer<T> *qForeachContainer(const QForeachContainerBase
#define QT_TRANSLATE_NOOP_UTF8(scope, x) (x)
#define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment}
#define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment}
+
+#ifndef QT_NO_TRANSLATION // ### This should enclose the NOOPs above
+
+// Defined in qcoreapplication.cpp
+// The better name qTrId() is reserved for an upcoming function which would
+// return a much more powerful QStringFormatter instead of a QString.
+Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1);
+
+#define QT_TRID_NOOP(id) id
+
+#endif // QT_NO_TRANSLATION
+
#define QDOC_PROPERTY(text)
/*
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 0006026..7770fd6 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1410,7 +1410,8 @@ public:
ToolButtonIconOnly,
ToolButtonTextOnly,
ToolButtonTextBesideIcon,
- ToolButtonTextUnderIcon
+ ToolButtonTextUnderIcon,
+ ToolButtonFollowStyle
};
enum LayoutDirection {
@@ -1562,18 +1563,6 @@ public:
};
Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
- enum GestureType
- {
- UnknownGesture,
- TapGesture,
- DoubleTapGesture,
- TrippleTapGesture,
- TapAndHoldGesture,
- PanGesture,
- PinchGesture
- };
-
-
enum GestureState
{
NoGesture,
@@ -1582,23 +1571,6 @@ public:
GestureFinished = 3
};
- enum DirectionType
- {
- NoDirection = 0,
- LeftDownDirection = 1,
- DownLeftDirection = LeftDownDirection,
- DownDirection = 2,
- RightDownDirection = 3,
- DownRightDirection = RightDownDirection,
- LeftDirection = 4,
- RightDirection = 6,
- LeftUpDirection = 7,
- UpLeftDirection = LeftUpDirection,
- UpDirection = 8,
- RightUpDirection = 9,
- UpRightDirection = RightUpDirection
- };
-
}
#ifdef Q_MOC_RUN
;
diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index 5df57e5..fc7d75e 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -53,6 +53,13 @@
#endif
#endif
+#if defined(Q_CC_MINGW)
+// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
+#ifndef WINVER
+#define WINVER 0x500
+#endif
+#endif
+
#include <windows.h>
#ifdef _WIN32_WCE
@@ -60,7 +67,6 @@
#endif
// already defined when compiled with WINVER >= 0x0500
-// and we only use them in Qt::WV_2000 and Qt::WV_98
#ifndef SPI_SETMENUANIMATION
#define SPI_SETMENUANIMATION 0x1003
#endif
@@ -100,6 +106,9 @@
#ifndef SPI_GETKEYBOARDCUES
#define SPI_GETKEYBOARDCUES 0x100A
#endif
+#ifndef SPI_GETGRADIENTCAPTIONS
+#define SPI_GETGRADIENTCAPTIONS 0x1008
+#endif
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
#endif
@@ -112,5 +121,31 @@
#ifndef ETO_PDY
#define ETO_PDY 0x2000
#endif
+#ifndef COLOR_GRADIENTACTIVECAPTION
+#define COLOR_GRADIENTACTIVECAPTION 27
+#endif
+#ifndef COLOR_GRADIENTINACTIVECAPTION
+#define COLOR_GRADIENTINACTIVECAPTION 28
+#endif
+
+// already defined when compiled with WINVER >= 0x0600
+#ifndef SPI_GETFLATMENU
+#define SPI_GETFLATMENU 0x1022
+#endif
+#ifndef CS_DROPSHADOW
+#define CS_DROPSHADOW 0x00020000
+#endif
+#ifndef CLEARTYPE_QUALITY
+#define CLEARTYPE_QUALITY 5
+#endif
+
+#ifdef Q_WS_WINCE
+#ifndef LR_DEFAULTSIZE
+#define LR_DEFAULTSIZE 0
+#endif
+#ifndef LR_SHARED
+#define LR_SHARED 0
+#endif
+#endif // Q_WS_WINCE
#endif // QT_WINDOWS_H
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index aed5b82..3883d30 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -452,7 +452,7 @@ qint64 QBuffer::writeData(const char *data, qint64 len)
*/
void QBuffer::connectNotify(const char *signal)
{
- if (strcmp(signal + 1, "readyRead()") == 0 || strcmp(signal + 1, "bytesWritten(qint64)"))
+ if (strcmp(signal + 1, "readyRead()") == 0 || strcmp(signal + 1, "bytesWritten(qint64)") == 0)
d_func()->signalConnectionCount++;
}
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index 582d657..c9c80bb 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -106,7 +106,7 @@ public:
QDir::Filters filters, QDirIterator::IteratorFlags flags);
~QDirIteratorPrivate();
- void pushSubDirectory(const QString &path, const QStringList &nameFilters,
+ void pushSubDirectory(const QFileInfo &fileInfo, const QStringList &nameFilters,
QDir::Filters filters);
void advance();
bool shouldFollowDirectory(const QFileInfo &);
@@ -119,7 +119,6 @@ public:
QFileInfo nextFileInfo;
//This fileinfo is the current that we will return from the public API
QFileInfo currentFileInfo;
- QString currentFilePath;
QDirIterator::IteratorFlags iteratorFlags;
QDir::Filters filters;
QStringList nameFilters;
@@ -142,8 +141,7 @@ QDirIteratorPrivate::QDirIteratorPrivate(const QString &path, const QStringList
this->filters = filters;
this->nameFilters = nameFilters;
- pushSubDirectory(nextFileInfo.isSymLink() ? nextFileInfo.canonicalFilePath() : path,
- nameFilters, filters);
+ pushSubDirectory(nextFileInfo, nameFilters, filters);
}
/*!
@@ -157,19 +155,19 @@ QDirIteratorPrivate::~QDirIteratorPrivate()
/*!
\internal
*/
-void QDirIteratorPrivate::pushSubDirectory(const QString &path, const QStringList &nameFilters,
+void QDirIteratorPrivate::pushSubDirectory(const QFileInfo &fileInfo, const QStringList &nameFilters,
QDir::Filters filters)
{
- if (iteratorFlags & QDirIterator::FollowSymlinks) {
- if (nextFileInfo.filePath() != path)
- nextFileInfo.setFile(path);
- if (nextFileInfo.isSymLink()) {
- visitedLinks << nextFileInfo.canonicalFilePath();
- } else {
- visitedLinks << nextFileInfo.absoluteFilePath();
- }
- }
-
+ QString path = fileInfo.filePath();
+
+#ifdef Q_OS_WIN
+ if (fileInfo.isSymLink())
+ path = fileInfo.canonicalFilePath();
+#endif
+
+ if (iteratorFlags & QDirIterator::FollowSymlinks)
+ visitedLinks << fileInfo.canonicalFilePath();
+
if (engine || (engine = QAbstractFileEngine::create(this->path))) {
engine->setFileName(path);
QAbstractFileEngineIterator *it = engine->beginEntryList(filters, nameFilters);
@@ -187,23 +185,12 @@ void QDirIteratorPrivate::pushSubDirectory(const QString &path, const QStringLis
*/
void QDirIteratorPrivate::advance()
{
- // Store the current entry
- if (!fileEngineIterators.isEmpty())
- currentFilePath = fileEngineIterators.top()->currentFilePath();
-
// Advance to the next entry
if (followNextDir) {
// Start by navigating into the current directory.
- followNextDir = false;
-
QAbstractFileEngineIterator *it = fileEngineIterators.top();
-
- QString subDir = it->currentFilePath();
-#ifdef Q_OS_WIN
- if (nextFileInfo.isSymLink())
- subDir = nextFileInfo.canonicalFilePath();
-#endif
- pushSubDirectory(subDir, it->nameFilters(), it->filters());
+ pushSubDirectory(it->currentFileInfo(), it->nameFilters(), it->filters());
+ followNextDir = false;
}
while (!fileEngineIterators.isEmpty()) {
@@ -222,17 +209,8 @@ void QDirIteratorPrivate::advance()
//We found a matching entry.
return;
- } else if (iteratorFlags & QDirIterator::Subdirectories) {
-
- if (!shouldFollowDirectory(info))
- continue;
- QString subDir = it->currentFilePath();
-#ifdef Q_OS_WIN
- if (info.isSymLink())
- subDir = info.canonicalFilePath();
-#endif
- pushSubDirectory(subDir, it->nameFilters(), it->filters());
-
+ } else if (shouldFollowDirectory(info)) {
+ pushSubDirectory(info, it->nameFilters(), it->filters());
foundDirectory = true;
break;
}
@@ -252,17 +230,15 @@ bool QDirIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo)
// If we're doing flat iteration, we're done.
if (!(iteratorFlags & QDirIterator::Subdirectories))
return false;
-
+
// Never follow non-directory entries
if (!fileInfo.isDir())
return false;
-
// Never follow . and ..
if (fileInfo.fileName() == QLatin1String(".") || fileInfo.fileName() == QLatin1String(".."))
return false;
-
// Check symlinks
if (fileInfo.isSymLink() && !(iteratorFlags & QDirIterator::FollowSymlinks)) {
// Follow symlinks only if FollowSymlinks was passed
@@ -272,10 +248,9 @@ bool QDirIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo)
// Stop link loops
if (visitedLinks.contains(fileInfo.canonicalFilePath()))
return false;
-
+
return true;
}
-
/*!
\internal
@@ -368,7 +343,7 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
|| (doExecutable && !fi.isExecutable()))) {
return false;
}
-
+
return true;
}
@@ -445,7 +420,7 @@ QDirIterator::QDirIterator(const QString &path, IteratorFlags flags)
passed to the flags.
\warning This constructor expects \c flags to be left at its default value. Use the
- constructors that do not take the \a filters argument instead.
+ constructors that do not take the \a filters argument instead.
\sa hasNext(), next(), IteratorFlags
*/
@@ -500,13 +475,12 @@ bool QDirIterator::hasNext() const
/*!
Returns the file name for the current directory entry, without the path
- prepended. If the current entry is invalid (i.e., isValid() returns
- false), a null QString is returned.
+ prepended.
+
+ This function is convenient when iterating a single directory. When using
+ the QDirIterator::Subdirectories flag, you can use filePath() to get the
+ full path.
- This function is provided for the convenience when iterating single
- directories. For recursive iteration, you should call filePath() or
- fileInfo() instead.
-
\sa filePath(), fileInfo()
*/
QString QDirIterator::fileName() const
@@ -515,20 +489,17 @@ QString QDirIterator::fileName() const
}
/*!
- Returns the full file path for the current directory entry. If the current
- entry is invalid (i.e., isValid() returns false), a null QString is
- returned.
+ Returns the full file path for the current directory entry.
\sa fileInfo(), fileName()
*/
QString QDirIterator::filePath() const
{
- return d->currentFilePath;
+ return d->currentFileInfo.filePath();
}
/*!
- Returns a QFileInfo for the current directory entry. If the current entry
- is invalid (i.e., isValid() returns false), a null QFileInfo is returned.
+ Returns a QFileInfo for the current directory entry.
\sa filePath(), fileName()
*/
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 4c1c21a..c50bb51 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -117,11 +117,7 @@ bool QFileInfoPrivate::hasAccess(Access access) const
if (access == ExecuteAccess)
return getFileFlags(QAbstractFileEngine::ExeUserPerm);
- QT_WA( {
- return ::_waccess((TCHAR *)QFSFileEnginePrivate::longFileName(data->fileName).utf16(), mode) == 0;
- } , {
- return QT_ACCESS(QFSFileEnginePrivate::win95Name(data->fileName), mode) == 0;
- } );
+ return ::_waccess((wchar_t*)QFSFileEnginePrivate::longFileName(data->fileName).utf16(), mode) == 0;
#endif
return false;
}
diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp
index c68af85..6df3746 100644
--- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_dnotify.cpp
@@ -59,6 +59,8 @@
#include <fcntl.h>
#include <time.h>
+#include "private/qcore_unix_p.h"
+
#ifdef QT_LINUXBASE
/* LSB doesn't standardize these */
@@ -80,7 +82,7 @@ static void (*qfswd_old_sigio_handler)(int) = 0;
static void (*qfswd_old_sigio_action)(int, siginfo_t *, void *) = 0;
static void qfswd_sigio_monitor(int signum, siginfo_t *i, void *v)
{
- ::write(qfswd_fileChanged_pipe[1], &i->si_fd, sizeof(int));
+ qt_safe_write(qfswd_fileChanged_pipe[1], reinterpret_cast<char*>(&i->si_fd), sizeof(int));
if (qfswd_old_sigio_handler && qfswd_old_sigio_handler != SIG_IGN)
qfswd_old_sigio_handler(signum);
@@ -121,9 +123,7 @@ QDnotifySignalThread::QDnotifySignalThread()
{
moveToThread(this);
- ::pipe(qfswd_fileChanged_pipe);
- ::fcntl(qfswd_fileChanged_pipe[0], F_SETFL,
- ::fcntl(qfswd_fileChanged_pipe[0], F_GETFL) | O_NONBLOCK);
+ qt_safe_pipe(qfswd_fileChanged_pipe, O_NONBLOCK);
struct sigaction oldAction;
struct sigaction action;
@@ -181,7 +181,7 @@ void QDnotifySignalThread::run()
void QDnotifySignalThread::readFromDnotify()
{
int fd;
- int readrv = ::read(qfswd_fileChanged_pipe[0], &fd,sizeof(int));
+ int readrv = qt_safe_read(qfswd_fileChanged_pipe[0], reinterpret_cast<char*>(&fd), sizeof(int));
// Only expect EAGAIN or EINTR. Other errors are assumed to be impossible.
if(readrv != -1) {
Q_ASSERT(readrv == sizeof(int));
@@ -207,9 +207,9 @@ QDnotifyFileSystemWatcherEngine::~QDnotifyFileSystemWatcherEngine()
for(QHash<int, Directory>::ConstIterator iter = fdToDirectory.constBegin();
iter != fdToDirectory.constEnd();
++iter) {
- ::close(iter->fd);
+ qt_safe_close(iter->fd);
if(iter->parentFd)
- ::close(iter->parentFd);
+ qt_safe_close(iter->parentFd);
}
}
@@ -353,7 +353,7 @@ QStringList QDnotifyFileSystemWatcherEngine::removePaths(const QStringList &path
if(!directory.isMonitored && directory.files.isEmpty()) {
// No longer needed
- ::close(directory.fd);
+ qt_safe_close(directory.fd);
pathToFD.remove(directory.path);
fdToDirectory.remove(fd);
}
@@ -419,9 +419,9 @@ void QDnotifyFileSystemWatcherEngine::refresh(int fd)
}
if(!directory.isMonitored && directory.files.isEmpty()) {
- ::close(directory.fd);
+ qt_safe_close(directory.fd);
if(directory.parentFd) {
- ::close(directory.parentFd);
+ qt_safe_close(directory.parentFd);
parentToFD.remove(directory.parentFd);
}
fdToDirectory.erase(iter);
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 401e545..9d08228 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -44,6 +44,8 @@
#ifndef QT_NO_FILESYSTEMWATCHER
+#include "private/qcore_unix_p.h"
+
#include <qdebug.h>
#include <qfile.h>
#include <qfileinfo.h>
@@ -62,62 +64,80 @@
# define __NR_inotify_init 291
# define __NR_inotify_add_watch 292
# define __NR_inotify_rm_watch 293
+# define __NR_inotify_init1 332
#elif defined(__x86_64__)
# define __NR_inotify_init 253
# define __NR_inotify_add_watch 254
# define __NR_inotify_rm_watch 255
+# define __NR_inotify_init1 294
#elif defined(__powerpc__) || defined(__powerpc64__)
# define __NR_inotify_init 275
# define __NR_inotify_add_watch 276
# define __NR_inotify_rm_watch 277
+# define __NR_inotify_init1 318
#elif defined (__ia64__)
# define __NR_inotify_init 1277
# define __NR_inotify_add_watch 1278
# define __NR_inotify_rm_watch 1279
+# define __NR_inotify_init1 1318
#elif defined (__s390__) || defined (__s390x__)
# define __NR_inotify_init 284
# define __NR_inotify_add_watch 285
# define __NR_inotify_rm_watch 286
+# define __NR_inotify_init1 324
#elif defined (__alpha__)
# define __NR_inotify_init 444
# define __NR_inotify_add_watch 445
# define __NR_inotify_rm_watch 446
+// no inotify_init1 for the Alpha
#elif defined (__sparc__) || defined (__sparc64__)
# define __NR_inotify_init 151
# define __NR_inotify_add_watch 152
# define __NR_inotify_rm_watch 156
+# define __NR_inotify_init1 322
#elif defined (__arm__)
# define __NR_inotify_init 316
# define __NR_inotify_add_watch 317
# define __NR_inotify_rm_watch 318
+# define __NR_inotify_init1 360
#elif defined (__sh__)
# define __NR_inotify_init 290
# define __NR_inotify_add_watch 291
# define __NR_inotify_rm_watch 292
+# define __NR_inotify_init1 332
#elif defined (__sh64__)
# define __NR_inotify_init 318
# define __NR_inotify_add_watch 319
# define __NR_inotify_rm_watch 320
+# define __NR_inotify_init1 360
#elif defined (__mips__)
# define __NR_inotify_init 284
# define __NR_inotify_add_watch 285
# define __NR_inotify_rm_watch 286
+# define __NR_inotify_init1 329
#elif defined (__hppa__)
# define __NR_inotify_init 269
# define __NR_inotify_add_watch 270
# define __NR_inotify_rm_watch 271
+# define __NR_inotify_init1 314
#elif defined (__avr32__)
# define __NR_inotify_init 240
# define __NR_inotify_add_watch 241
# define __NR_inotify_rm_watch 242
+// no inotify_init1 for AVR32
#elif defined (__mc68000__)
# define __NR_inotify_init 284
# define __NR_inotify_add_watch 285
# define __NR_inotify_rm_watch 286
+# define __NR_inotify_init1 328
#else
# error "This architecture is not supported. Please talk to qt-bugs@trolltech.com"
#endif
+#if !defined(IN_CLOEXEC) && defined(O_CLOEXEC) && defined(__NR_inotify_init1)
+# define IN_CLOEXEC O_CLOEXEC
+#endif
+
QT_BEGIN_NAMESPACE
#ifdef QT_LINUXBASE
@@ -140,6 +160,13 @@ static inline int inotify_rm_watch(int fd, __u32 wd)
return syscall(__NR_inotify_rm_watch, fd, wd);
}
+#ifdef IN_CLOEXEC
+static inline int inotify_init1(int flags)
+{
+ return syscall(__NR_inotify_init1, flags);
+}
+#endif
+
// the following struct and values are documented in linux/inotify.h
extern "C" {
@@ -185,9 +212,16 @@ QT_BEGIN_NAMESPACE
QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create()
{
- int fd = inotify_init();
- if (fd <= 0)
- return 0;
+ register int fd = -1;
+#ifdef IN_CLOEXEC
+ fd = inotify_init1(IN_CLOEXEC);
+#endif
+ if (fd == -1) {
+ fd = inotify_init();
+ if (fd == -1)
+ return 0;
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+ }
return new QInotifyFileSystemWatcherEngine(fd);
}
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index ed42c34..dfed6a4 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -43,6 +43,7 @@
#include "qfilesystemwatcher.h"
#include "qfilesystemwatcher_kqueue_p.h"
+#include "private/qcore_unix_p.h"
#include <qdebug.h>
#include <qfile.h>
@@ -124,9 +125,9 @@ QStringList QKqueueFileSystemWatcherEngine::addPaths(const QStringList &paths,
QString path = it.next();
int fd;
#if defined(O_EVTONLY)
- fd = ::open(QFile::encodeName(path), O_EVTONLY);
+ fd = qt_safe_open(QFile::encodeName(path), O_EVTONLY);
#else
- fd = ::open(QFile::encodeName(path), O_RDONLY);
+ fd = qt_safe_open(QFile::encodeName(path), O_RDONLY);
#endif
if (fd == -1) {
perror("QKqueueFileSystemWatcherEngine::addPaths: open");
diff --git a/src/corelib/io/qfilesystemwatcher_p.h b/src/corelib/io/qfilesystemwatcher_p.h
index 850e150..83be197 100644
--- a/src/corelib/io/qfilesystemwatcher_p.h
+++ b/src/corelib/io/qfilesystemwatcher_p.h
@@ -69,13 +69,14 @@ class QFileSystemWatcherEngine : public QThread
Q_OBJECT
protected:
- inline QFileSystemWatcherEngine()
+ inline QFileSystemWatcherEngine(bool move = true)
{
- moveToThread(this);
+ if (move)
+ moveToThread(this);
}
public:
- // fills \a files and \a directires with the \a paths it could
+ // fills \a files and \a directories with the \a paths it could
// watch, and returns a list of paths this engine could not watch
virtual QStringList addPaths(const QStringList &paths,
QStringList *files,
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 9a3aeae..9eeef02 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -53,25 +53,268 @@
QT_BEGIN_NAMESPACE
+void QWindowsFileSystemWatcherEngine::stop()
+{
+ foreach(QWindowsFileSystemWatcherEngineThread *thread, threads)
+ thread->stop();
+}
+
QWindowsFileSystemWatcherEngine::QWindowsFileSystemWatcherEngine()
- : msg(0)
+ : QFileSystemWatcherEngine(false)
{
- HANDLE h = QT_WA_INLINE(CreateEventW(0, false, false, 0),
- CreateEventA(0, false, false, 0));
- if (h != INVALID_HANDLE_VALUE) {
- handles.reserve(MAXIMUM_WAIT_OBJECTS);
- handles.append(h);
- }
}
QWindowsFileSystemWatcherEngine::~QWindowsFileSystemWatcherEngine()
{
- if (handles.isEmpty())
+ if (threads.isEmpty())
return;
- stop();
- wait();
+ foreach(QWindowsFileSystemWatcherEngineThread *thread, threads) {
+ thread->stop();
+ thread->wait();
+ delete thread;
+ }
+}
+
+QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
+ QStringList *files,
+ QStringList *directories)
+{
+ // qDebug()<<"Adding"<<paths.count()<<"to existing"<<(files->count() + directories->count())<<"watchers";
+ QStringList p = paths;
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ QString normalPath = path;
+ if ((normalPath.endsWith(QLatin1Char('/')) || normalPath.endsWith(QLatin1Char('\\')))
+#ifdef Q_OS_WINCE
+ && normalPath.size() > 1)
+#else
+ )
+#endif
+ normalPath.chop(1);
+ QFileInfo fileInfo(normalPath.toLower());
+ if (!fileInfo.exists())
+ continue;
+
+ bool isDir = fileInfo.isDir();
+ if (isDir) {
+ if (directories->contains(path))
+ continue;
+ } else {
+ if (files->contains(path))
+ continue;
+ }
+
+ // qDebug()<<"Looking for a thread/handle for"<<normalPath;
+
+ const QString absolutePath = isDir ? fileInfo.absoluteFilePath() : fileInfo.absolutePath();
+ const uint flags = isDir
+ ? (FILE_NOTIFY_CHANGE_DIR_NAME
+ | FILE_NOTIFY_CHANGE_FILE_NAME)
+ : (FILE_NOTIFY_CHANGE_DIR_NAME
+ | FILE_NOTIFY_CHANGE_FILE_NAME
+ | FILE_NOTIFY_CHANGE_ATTRIBUTES
+ | FILE_NOTIFY_CHANGE_SIZE
+ | FILE_NOTIFY_CHANGE_LAST_WRITE
+ | FILE_NOTIFY_CHANGE_SECURITY);
+
+ QWindowsFileSystemWatcherEngine::PathInfo pathInfo;
+ pathInfo.absolutePath = absolutePath;
+ pathInfo.isDir = isDir;
+ pathInfo.path = path;
+ pathInfo = fileInfo;
+
+ // Look for a thread
+ QWindowsFileSystemWatcherEngineThread *thread = 0;
+ QWindowsFileSystemWatcherEngine::Handle handle;
+ QList<QWindowsFileSystemWatcherEngineThread *>::const_iterator jt, end;
+ end = threads.constEnd();
+ for(jt = threads.constBegin(); jt != end; ++jt) {
+ thread = *jt;
+ QMutexLocker locker(&(thread->mutex));
+
+ handle = thread->handleForDir.value(absolutePath);
+ if (handle.handle != INVALID_HANDLE_VALUE && handle.flags == flags) {
+ // found a thread now insert...
+ // qDebug()<<" Found a thread"<<thread;
+
+ QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> &h
+ = thread->pathInfoForHandle[handle.handle];
+ if (!h.contains(fileInfo.absoluteFilePath())) {
+ thread->pathInfoForHandle[handle.handle].insert(fileInfo.absoluteFilePath(), pathInfo);
+ if (isDir)
+ directories->append(path);
+ else
+ files->append(path);
+ }
+ it.remove();
+ thread->wakeup();
+ break;
+ }
+ }
+
+ // no thread found, first create a handle
+ if (handle.handle == INVALID_HANDLE_VALUE || handle.flags != flags) {
+ // qDebug()<<" No thread found";
+ // Volume and folder paths need a trailing slash for proper notification
+ // (e.g. "c:" -> "c:/").
+ const QString effectiveAbsolutePath =
+ isDir ? (absolutePath + QLatin1Char('/')) : absolutePath;
+
+ handle.handle = FindFirstChangeNotification((wchar_t*) QDir::toNativeSeparators(effectiveAbsolutePath).utf16(), false, flags);
+ handle.flags = flags;
+ if (handle.handle == INVALID_HANDLE_VALUE)
+ continue;
+
+ // now look for a thread to insert
+ bool found = false;
+ foreach(QWindowsFileSystemWatcherEngineThread *thread, threads) {
+ QMutexLocker(&(thread->mutex));
+ if (thread->handles.count() < MAXIMUM_WAIT_OBJECTS) {
+ // qDebug() << " Added handle" << handle.handle << "for" << absolutePath << "to watch" << fileInfo.absoluteFilePath();
+ // qDebug()<< " to existing thread"<<thread;
+ thread->handles.append(handle.handle);
+ thread->handleForDir.insert(absolutePath, handle);
+
+ thread->pathInfoForHandle[handle.handle].insert(fileInfo.absoluteFilePath(), pathInfo);
+ if (isDir)
+ directories->append(path);
+ else
+ files->append(path);
+
+ it.remove();
+ found = true;
+ thread->wakeup();
+ break;
+ }
+ }
+ if (!found) {
+ QWindowsFileSystemWatcherEngineThread *thread = new QWindowsFileSystemWatcherEngineThread();
+ //qDebug()<<" ###Creating new thread"<<thread<<"("<<(threads.count()+1)<<"threads)";
+ thread->handles.append(handle.handle);
+ thread->handleForDir.insert(absolutePath, handle);
+
+ thread->pathInfoForHandle[handle.handle].insert(fileInfo.absoluteFilePath(), pathInfo);
+ if (isDir)
+ directories->append(path);
+ else
+ files->append(path);
+
+ connect(thread, SIGNAL(fileChanged(const QString &, bool)),
+ this, SIGNAL(fileChanged(const QString &, bool)));
+ connect(thread, SIGNAL(directoryChanged(const QString &, bool)),
+ this, SIGNAL(directoryChanged(const QString &, bool)));
+
+ thread->msg = '@';
+ thread->start();
+ threads.append(thread);
+ it.remove();
+ }
+ }
+ }
+ return p;
+}
+
+QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &paths,
+ QStringList *files,
+ QStringList *directories)
+{
+ // qDebug()<<"removePaths"<<paths;
+ QStringList p = paths;
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ QString normalPath = path;
+ if (normalPath.endsWith(QLatin1Char('/')) || normalPath.endsWith(QLatin1Char('\\')))
+ normalPath.chop(1);
+ QFileInfo fileInfo(normalPath.toLower());
+ // qDebug()<<"removing"<<normalPath;
+ QString absolutePath = fileInfo.absoluteFilePath();
+ QList<QWindowsFileSystemWatcherEngineThread *>::iterator jt, end;
+ end = threads.end();
+ for(jt = threads.begin(); jt!= end; ++jt) {
+ QWindowsFileSystemWatcherEngineThread *thread = *jt;
+ if (*jt == 0)
+ continue;
+
+ QMutexLocker locker(&(thread->mutex));
+
+ QWindowsFileSystemWatcherEngine::Handle handle = thread->handleForDir.value(absolutePath);
+ if (handle.handle == INVALID_HANDLE_VALUE) {
+ // perhaps path is a file?
+ absolutePath = fileInfo.absolutePath();
+ handle = thread->handleForDir.value(absolutePath);
+ }
+ if (handle.handle != INVALID_HANDLE_VALUE) {
+ QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> &h =
+ thread->pathInfoForHandle[handle.handle];
+ if (h.remove(fileInfo.absoluteFilePath())) {
+ // ###
+ files->removeAll(path);
+ directories->removeAll(path);
+
+ if (h.isEmpty()) {
+ // qDebug() << "Closing handle" << handle.handle;
+ FindCloseChangeNotification(handle.handle); // This one might generate a notification
+
+ int indexOfHandle = thread->handles.indexOf(handle.handle);
+ Q_ASSERT(indexOfHandle != -1);
+ thread->handles.remove(indexOfHandle);
+
+ thread->handleForDir.remove(absolutePath);
+ // h is now invalid
+
+ it.remove();
+
+ if (thread->handleForDir.isEmpty()) {
+ // qDebug()<<"Stopping thread "<<thread;
+ locker.unlock();
+ thread->stop();
+ thread->wait();
+ locker.relock();
+ // We can't delete the thread until the mutex locker is
+ // out of scope
+ }
+ }
+ }
+ // Found the file, go to next one
+ break;
+ }
+ }
+ }
+
+ // Remove all threads that we stopped
+ QList<QWindowsFileSystemWatcherEngineThread *>::iterator jt, end;
+ end = threads.end();
+ for(jt = threads.begin(); jt != end; ++jt) {
+ if (!(*jt)->isRunning()) {
+ delete *jt;
+ *jt = 0;
+ }
+ }
+
+ threads.removeAll(0);
+ return p;
+}
+
+///////////
+// QWindowsFileSystemWatcherEngineThread
+///////////
+QWindowsFileSystemWatcherEngineThread::QWindowsFileSystemWatcherEngineThread()
+ : msg(0)
+{
+ if (HANDLE h = CreateEvent(0, false, false, 0)) {
+ handles.reserve(MAXIMUM_WAIT_OBJECTS);
+ handles.append(h);
+ }
+ moveToThread(this);
+}
+
+
+QWindowsFileSystemWatcherEngineThread::~QWindowsFileSystemWatcherEngineThread()
+{
CloseHandle(handles.at(0));
handles[0] = INVALID_HANDLE_VALUE;
@@ -82,13 +325,13 @@ QWindowsFileSystemWatcherEngine::~QWindowsFileSystemWatcherEngine()
}
}
-void QWindowsFileSystemWatcherEngine::run()
+void QWindowsFileSystemWatcherEngineThread::run()
{
QMutexLocker locker(&mutex);
forever {
QVector<HANDLE> handlesCopy = handles;
locker.unlock();
- // qDebug() << "QWindowsFileSystemWatcherEngine: waiting on" << handlesCopy.count() << "handles";
+ // qDebug() << "QWindowsFileSystemWatcherThread"<<this<<"waiting on" << handlesCopy.count() << "handles";
DWORD r = WaitForMultipleObjects(handlesCopy.count(), handlesCopy.constData(), false, INFINITE);
locker.relock();
do {
@@ -96,7 +339,7 @@ void QWindowsFileSystemWatcherEngine::run()
int m = msg;
msg = 0;
if (m == 'q') {
- // qDebug() << "thread told to quit";
+ // qDebug() << "thread"<<this<<"told to quit";
return;
}
if (m != '@') {
@@ -111,15 +354,15 @@ void QWindowsFileSystemWatcherEngine::run()
// When removing a path, FindCloseChangeNotification might actually fire a notification
// for some reason, so we must check if the handle exist in the handles vector
if (handles.contains(handle)) {
- // qDebug("Acknowledged handle: %d, %p", at, handle);
+ // qDebug()<<"thread"<<this<<"Acknowledged handle:"<<at<<handle;
if (!FindNextChangeNotification(handle)) {
- qErrnoWarning("QFileSystemWatcher: FindNextChangeNotification failed");
+ qErrnoWarning("QFileSystemWatcher: FindNextChangeNotification failed!!");
}
- QHash<QString, PathInfo> &h = pathInfoForHandle[handle];
- QMutableHashIterator<QString, PathInfo> it(h);
+ QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> &h = pathInfoForHandle[handle];
+ QMutableHashIterator<QString, QWindowsFileSystemWatcherEngine::PathInfo> it(h);
while (it.hasNext()) {
- QHash<QString, PathInfo>::iterator x = it.next();
+ QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo>::iterator x = it.next();
QString absolutePath = x.value().absolutePath;
QFileInfo fileInfo(x.value().path);
// qDebug() << "checking" << x.key();
@@ -164,166 +407,14 @@ void QWindowsFileSystemWatcherEngine::run()
}
}
-QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
- if (handles.isEmpty() || handles.count() == MAXIMUM_WAIT_OBJECTS)
- return paths;
-
- QMutexLocker locker(&mutex);
-
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- QString normalPath = path;
- if ((normalPath.endsWith(QLatin1Char('/')) || normalPath.endsWith(QLatin1Char('\\')))
-#ifdef Q_OS_WINCE
- && normalPath.size() > 1)
-#else
- )
-#endif
- normalPath.chop(1);
- QFileInfo fileInfo(normalPath.toLower());
- if (!fileInfo.exists())
- continue;
-
- bool isDir = fileInfo.isDir();
- if (isDir) {
- if (directories->contains(path))
- continue;
- } else {
- if (files->contains(path))
- continue;
- }
-
- const QString absolutePath = isDir ? fileInfo.absoluteFilePath() : fileInfo.absolutePath();
- const uint flags = isDir
- ? (FILE_NOTIFY_CHANGE_DIR_NAME
- | FILE_NOTIFY_CHANGE_FILE_NAME)
- : (FILE_NOTIFY_CHANGE_DIR_NAME
- | FILE_NOTIFY_CHANGE_FILE_NAME
- | FILE_NOTIFY_CHANGE_ATTRIBUTES
- | FILE_NOTIFY_CHANGE_SIZE
- | FILE_NOTIFY_CHANGE_LAST_WRITE
- | FILE_NOTIFY_CHANGE_SECURITY);
-
- Handle handle = handleForDir.value(absolutePath);
- if (handle.handle == INVALID_HANDLE_VALUE || handle.flags != flags) {
- // Volume and folder paths need a trailing slash for proper notification
- // (e.g. "c:" -> "c:/").
- const QString effectiveAbsolutePath =
- isDir ? (absolutePath + QLatin1Char('/')) : absolutePath;
-
- QT_WA({
- handle.handle = FindFirstChangeNotificationW((TCHAR *) QDir::toNativeSeparators(effectiveAbsolutePath).utf16(),
- false, flags);
- },{
- handle.handle = FindFirstChangeNotificationA(QDir::toNativeSeparators(effectiveAbsolutePath).toLocal8Bit(),
- false, flags);
- })
- handle.flags = flags;
- if (handle.handle == INVALID_HANDLE_VALUE)
- continue;
- // qDebug() << "Added handle" << handle << "for" << absolutePath << "to watch" << fileInfo.absoluteFilePath();
- handles.append(handle.handle);
- handleForDir.insert(absolutePath, handle);
- }
-
- PathInfo pathInfo;
- pathInfo.absolutePath = absolutePath;
- pathInfo.isDir = isDir;
- pathInfo.path = path;
- pathInfo = fileInfo;
- QHash<QString, PathInfo> &h = pathInfoForHandle[handle.handle];
- if (!h.contains(fileInfo.absoluteFilePath())) {
- pathInfoForHandle[handle.handle].insert(fileInfo.absoluteFilePath(), pathInfo);
- if (isDir)
- directories->append(path);
- else
- files->append(path);
- }
-
- it.remove();
- }
-
- if (!isRunning()) {
- msg = '@';
- start();
- } else {
- wakeup();
- }
-
- return p;
-}
-
-QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
- QMutexLocker locker(&mutex);
-
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- QString normalPath = path;
- if (normalPath.endsWith(QLatin1Char('/')) || normalPath.endsWith(QLatin1Char('\\')))
- normalPath.chop(1);
- QFileInfo fileInfo(normalPath.toLower());
-
- QString absolutePath = fileInfo.absoluteFilePath();
- Handle handle = handleForDir.value(absolutePath);
- if (handle.handle == INVALID_HANDLE_VALUE) {
- // perhaps path is a file?
- absolutePath = fileInfo.absolutePath();
- handle = handleForDir.value(absolutePath);
- if (handle.handle == INVALID_HANDLE_VALUE)
- continue;
- }
-
- QHash<QString, PathInfo> &h = pathInfoForHandle[handle.handle];
- if (h.remove(fileInfo.absoluteFilePath())) {
- // ###
- files->removeAll(path);
- directories->removeAll(path);
-
- if (h.isEmpty()) {
- // qDebug() << "Closing handle" << handle;
- FindCloseChangeNotification(handle.handle); // This one might generate a notification
-
- int indexOfHandle = handles.indexOf(handle.handle);
- Q_ASSERT(indexOfHandle != -1);
- handles.remove(indexOfHandle);
-
- handleForDir.remove(absolutePath);
- // h is now invalid
-
- it.remove();
- }
- }
- }
-
- if (handleForDir.isEmpty()) {
- stop();
- locker.unlock();
- wait();
- locker.relock();
- } else {
- wakeup();
- }
-
- return p;
-}
-void QWindowsFileSystemWatcherEngine::stop()
+void QWindowsFileSystemWatcherEngineThread::stop()
{
msg = 'q';
SetEvent(handles.at(0));
}
-void QWindowsFileSystemWatcherEngine::wakeup()
+void QWindowsFileSystemWatcherEngineThread::wakeup()
{
msg = '@';
SetEvent(handles.at(0));
diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h
index d0eecfc..405d255 100644
--- a/src/corelib/io/qfilesystemwatcher_win_p.h
+++ b/src/corelib/io/qfilesystemwatcher_win_p.h
@@ -57,7 +57,7 @@
#ifndef QT_NO_FILESYSTEMWATCHER
-#include <windows.h>
+#include <qt_windows.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qfile.h>
@@ -68,27 +68,24 @@
QT_BEGIN_NAMESPACE
+class QWindowsFileSystemWatcherEngineThread;
+
+// Even though QWindowsFileSystemWatcherEngine is derived of QThread
+// via QFileSystemWatcher, it does not start a thread.
+// Instead QWindowsFileSystemWatcher creates QWindowsFileSystemWatcherEngineThreads
+// to do the actually watching.
class QWindowsFileSystemWatcherEngine : public QFileSystemWatcherEngine
{
Q_OBJECT
-
public:
QWindowsFileSystemWatcherEngine();
~QWindowsFileSystemWatcherEngine();
- void run();
-
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
void stop();
-private:
- void wakeup();
-
- QMutex mutex;
- QVector<HANDLE> handles;
- int msg;
class Handle
{
@@ -97,13 +94,12 @@ private:
uint flags;
Handle()
- : handle(INVALID_HANDLE_VALUE), flags(0u)
+ : handle(INVALID_HANDLE_VALUE), flags(0u)
{ }
Handle(const Handle &other)
- : handle(other.handle), flags(other.flags)
+ : handle(other.handle), flags(other.flags)
{ }
};
- QHash<QString, Handle> handleForDir;
class PathInfo {
public:
@@ -118,7 +114,7 @@ private:
QDateTime lastModified;
PathInfo &operator=(const QFileInfo &fileInfo)
- {
+ {
ownerId = fileInfo.ownerId();
groupId = fileInfo.groupId();
permissions = fileInfo.permissions();
@@ -134,8 +130,35 @@ private:
|| lastModified != fileInfo.lastModified());
}
};
- QHash<HANDLE, QHash<QString, PathInfo> > pathInfoForHandle;
+private:
+ QList<QWindowsFileSystemWatcherEngineThread *> threads;
+
+};
+
+class QWindowsFileSystemWatcherEngineThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ QWindowsFileSystemWatcherEngineThread();
+ ~QWindowsFileSystemWatcherEngineThread();
+ void run();
+ void stop();
+ void wakeup();
+
+ QMutex mutex;
+ QVector<HANDLE> handles;
+ int msg;
+
+ QHash<QString, QWindowsFileSystemWatcherEngine::Handle> handleForDir;
+
+ QHash<HANDLE, QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> > pathInfoForHandle;
+
+Q_SIGNALS:
+ void fileChanged(const QString &path, bool removed);
+ void directoryChanged(const QString &path, bool removed);
};
+
#endif // QT_NO_FILESYSTEMWATCHER
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index e32b818..3a43ec7 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -44,12 +44,16 @@
#include "qdatetime.h"
#include "qdiriterator.h"
#include "qset.h"
+#include <QtCore/qdebug.h>
#ifndef QT_NO_FSFILEENGINE
#if !defined(Q_OS_WINCE)
#include <errno.h>
#endif
+#if defined(Q_OS_UNIX)
+#include "private/qcore_unix_p.h"
+#endif
#include <stdio.h>
QT_BEGIN_NAMESPACE
@@ -568,7 +572,7 @@ bool QFSFileEnginePrivate::seekFdFh(qint64 pos)
} else {
// Unbuffered stdio mode.
if (QT_LSEEK(fd, pos, SEEK_SET) == -1) {
- qWarning("QFile::at: Cannot set file position %lld", pos);
+ qWarning() << "QFile::at: Cannot set file position" << pos;
q->setError(QFile::PositionError, qt_error_string(errno));
return false;
}
diff --git a/src/corelib/io/qfsfileengine_iterator_win.cpp b/src/corelib/io/qfsfileengine_iterator_win.cpp
index 2336542..dd4ddf3 100644
--- a/src/corelib/io/qfsfileengine_iterator_win.cpp
+++ b/src/corelib/io/qfsfileengine_iterator_win.cpp
@@ -79,11 +79,7 @@ void QFSFileEngineIteratorPlatformSpecificData::saveCurrentFileName()
it->currentEntry = uncShares.at(uncShareIndex - 1);
} else {
// Local directory
- QT_WA({
- it->currentEntry = QString::fromUtf16((unsigned short *)findData.cFileName);
- } , {
- it->currentEntry = QString::fromLocal8Bit((const char *)findData.cFileName);
- });
+ it->currentEntry = QString::fromWCharArray(findData.cFileName);
}
}
@@ -97,17 +93,10 @@ void QFSFileEngineIterator::advance()
if (platform->uncFallback) {
++platform->uncShareIndex;
} else if (platform->findFileHandle != INVALID_HANDLE_VALUE) {
- QT_WA({
- if (!FindNextFile(platform->findFileHandle, &platform->findData)) {
- platform->done = true;
- FindClose(platform->findFileHandle);
- }
- } , {
- if (!FindNextFileA(platform->findFileHandle, (WIN32_FIND_DATAA *)&platform->findData)) {
- platform->done = true;
- FindClose(platform->findFileHandle);
- }
- });
+ if (!FindNextFile(platform->findFileHandle, &platform->findData)) {
+ platform->done = true;
+ FindClose(platform->findFileHandle);
+ }
}
}
@@ -141,15 +130,8 @@ bool QFSFileEngineIterator::hasNext() const
path.append(QLatin1Char('/'));
path.append(QLatin1String("*.*"));
- QT_WA({
- QString fileName = QFSFileEnginePrivate::longFileName(path);
- platform->findFileHandle = FindFirstFileW((TCHAR *)fileName.utf16(),
- &platform->findData);
- }, {
- // Cast is safe, since char is at end of WIN32_FIND_DATA
- platform->findFileHandle = FindFirstFileA(QFSFileEnginePrivate::win95Name(path),
- (WIN32_FIND_DATAA*)&platform->findData);
- });
+ QString fileName = QFSFileEnginePrivate::longFileName(path);
+ platform->findFileHandle = FindFirstFile((const wchar_t *)fileName.utf16(), &platform->findData);
if (platform->findFileHandle == INVALID_HANDLE_VALUE) {
if (path.startsWith(QLatin1String("//"))) {
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 5aef229..864599f 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -72,7 +72,6 @@ class QFSFileEnginePrivate : public QAbstractFileEnginePrivate
public:
#ifdef Q_WS_WIN
- static QByteArray win95Name(const QString &path);
static QString longFileName(const QString &path);
#endif
static QString canonicalized(const QString &path);
@@ -151,8 +150,7 @@ public:
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
static void resolveLibs();
- static bool resolveUNCLibs_NT();
- static bool resolveUNCLibs_9x();
+ static bool resolveUNCLibs();
static bool uncListSharesOnServer(const QString &server, QStringList *list);
#endif
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 4743a47..47e3db0 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -42,6 +42,7 @@
#include "qplatformdefs.h"
#include "qabstractfileengine.h"
#include "private/qfsfileengine_p.h"
+#include "private/qcore_unix_p.h"
#ifndef QT_NO_FSFILEENGINE
@@ -90,6 +91,12 @@ static QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString &
if (flags & QIODevice::ReadOnly)
mode += '+';
}
+
+#if defined(__GLIBC__) && (__GLIBC__ * 0x100 + __GLIBC_MINOR__) >= 0x0207
+ // must be glibc >= 2.7
+ mode += 'e';
+#endif
+
return mode;
}
@@ -118,12 +125,6 @@ static int openModeToOpenFlags(QIODevice::OpenMode mode)
oflags |= QT_OPEN_TRUNC;
}
-#ifdef O_CLOEXEC
- // supported on Linux >= 2.6.23; avoids one extra system call
- // and avoids a race condition: if another thread forks, we could
- // end up leaking a file descriptor...
- oflags |= O_CLOEXEC;
-#endif
return oflags;
}
@@ -177,11 +178,6 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode)
}
}
-#ifndef O_CLOEXEC
- // not needed on Linux >= 2.6.23
- setCloseOnExec(fd); // ignore failure
-#endif
-
// Seek to the end when in Append mode.
if (flags & QFile::Append) {
int ret;
@@ -462,7 +458,7 @@ bool QFSFileEngine::caseSensitive() const
bool QFSFileEngine::setCurrentPath(const QString &path)
{
int r;
- r = ::chdir(QFile::encodeName(path));
+ r = QT_CHDIR(QFile::encodeName(path));
return r >= 0;
}
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index eef39e4..53f0144 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -109,9 +109,9 @@ static QString qfsPrivateCurrentDir = QLatin1String("");
QT_BEGIN_INCLUDE_NAMESPACE
typedef DWORD (WINAPI *PtrGetNamedSecurityInfoW)(LPWSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*);
static PtrGetNamedSecurityInfoW ptrGetNamedSecurityInfoW = 0;
-typedef DECLSPEC_IMPORT BOOL (WINAPI *PtrLookupAccountSidW)(LPCWSTR, PSID, LPWSTR, LPDWORD, LPWSTR, LPDWORD, PSID_NAME_USE);
+typedef BOOL (WINAPI *PtrLookupAccountSidW)(LPCWSTR, PSID, LPWSTR, LPDWORD, LPWSTR, LPDWORD, PSID_NAME_USE);
static PtrLookupAccountSidW ptrLookupAccountSidW = 0;
-typedef DECLSPEC_IMPORT BOOL (WINAPI *PtrAllocateAndInitializeSid)(PSID_IDENTIFIER_AUTHORITY, BYTE, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, PSID*);
+typedef BOOL (WINAPI *PtrAllocateAndInitializeSid)(PSID_IDENTIFIER_AUTHORITY, BYTE, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, PSID*);
static PtrAllocateAndInitializeSid ptrAllocateAndInitializeSid = 0;
typedef VOID (WINAPI *PtrBuildTrusteeWithSidW)(PTRUSTEE_W, PSID);
static PtrBuildTrusteeWithSidW ptrBuildTrusteeWithSidW = 0;
@@ -119,7 +119,7 @@ typedef VOID (WINAPI *PtrBuildTrusteeWithNameW)(PTRUSTEE_W, unsigned short*);
static PtrBuildTrusteeWithNameW ptrBuildTrusteeWithNameW = 0;
typedef DWORD (WINAPI *PtrGetEffectiveRightsFromAclW)(PACL, PTRUSTEE_W, OUT PACCESS_MASK);
static PtrGetEffectiveRightsFromAclW ptrGetEffectiveRightsFromAclW = 0;
-typedef DECLSPEC_IMPORT PVOID (WINAPI *PtrFreeSid)(PSID);
+typedef PVOID (WINAPI *PtrFreeSid)(PSID);
static PtrFreeSid ptrFreeSid = 0;
static TRUSTEE_W currentUserTrusteeW;
@@ -152,66 +152,64 @@ void QFSFileEnginePrivate::resolveLibs()
triedResolve = true;
#if !defined(Q_OS_WINCE)
- if(QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) {
- HINSTANCE advapiHnd = LoadLibraryW(L"advapi32");
- if (advapiHnd) {
- ptrGetNamedSecurityInfoW = (PtrGetNamedSecurityInfoW)GetProcAddress(advapiHnd, "GetNamedSecurityInfoW");
- ptrLookupAccountSidW = (PtrLookupAccountSidW)GetProcAddress(advapiHnd, "LookupAccountSidW");
- ptrAllocateAndInitializeSid = (PtrAllocateAndInitializeSid)GetProcAddress(advapiHnd, "AllocateAndInitializeSid");
- ptrBuildTrusteeWithSidW = (PtrBuildTrusteeWithSidW)GetProcAddress(advapiHnd, "BuildTrusteeWithSidW");
- ptrBuildTrusteeWithNameW = (PtrBuildTrusteeWithNameW)GetProcAddress(advapiHnd, "BuildTrusteeWithNameW");
- ptrGetEffectiveRightsFromAclW = (PtrGetEffectiveRightsFromAclW)GetProcAddress(advapiHnd, "GetEffectiveRightsFromAclW");
- ptrFreeSid = (PtrFreeSid)GetProcAddress(advapiHnd, "FreeSid");
- }
- if (ptrBuildTrusteeWithNameW) {
- HINSTANCE versionHnd = LoadLibraryW(L"version");
- if (versionHnd) {
- typedef DWORD (WINAPI *PtrGetFileVersionInfoSizeW)(LPWSTR lptstrFilename,LPDWORD lpdwHandle);
- PtrGetFileVersionInfoSizeW ptrGetFileVersionInfoSizeW = (PtrGetFileVersionInfoSizeW)GetProcAddress(versionHnd, "GetFileVersionInfoSizeW");
- typedef BOOL (WINAPI *PtrGetFileVersionInfoW)(LPWSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
- PtrGetFileVersionInfoW ptrGetFileVersionInfoW = (PtrGetFileVersionInfoW)GetProcAddress(versionHnd, "GetFileVersionInfoW");
- typedef BOOL (WINAPI *PtrVerQueryValueW)(const LPVOID pBlock,LPWSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
- PtrVerQueryValueW ptrVerQueryValueW = (PtrVerQueryValueW)GetProcAddress(versionHnd, "VerQueryValueW");
- if(ptrGetFileVersionInfoSizeW && ptrGetFileVersionInfoW && ptrVerQueryValueW) {
- DWORD fakeHandle;
- DWORD versionSize = ptrGetFileVersionInfoSizeW(L"secur32.dll", &fakeHandle);
- if(versionSize) {
- LPVOID versionData;
- versionData = malloc(versionSize);
- if(ptrGetFileVersionInfoW(L"secur32.dll", 0, versionSize, versionData)) {
- UINT puLen;
- VS_FIXEDFILEINFO *pLocalInfo;
- if(ptrVerQueryValueW(versionData, L"\\", (void**)&pLocalInfo, &puLen)) {
- WORD wVer1, wVer2, wVer3, wVer4;
- wVer1 = HIWORD(pLocalInfo->dwFileVersionMS);
- wVer2 = LOWORD(pLocalInfo->dwFileVersionMS);
- wVer3 = HIWORD(pLocalInfo->dwFileVersionLS);
- wVer4 = LOWORD(pLocalInfo->dwFileVersionLS);
- // It will not work with secur32.dll version 5.0.2195.2862
- if(!(wVer1 == 5 && wVer2 == 0 && wVer3 == 2195 && (wVer4 == 2862 || wVer4 == 4587))) {
- HINSTANCE userHnd = LoadLibraryW(L"secur32");
- if (userHnd) {
- typedef BOOL (WINAPI *PtrGetUserNameExW)(EXTENDED_NAME_FORMAT nameFormat, ushort* lpBuffer, LPDWORD nSize);
- PtrGetUserNameExW ptrGetUserNameExW = (PtrGetUserNameExW)GetProcAddress(userHnd, "GetUserNameExW");
- if(ptrGetUserNameExW) {
- static TCHAR buffer[258];
- DWORD bufferSize = 257;
- ptrGetUserNameExW(NameSamCompatible, (ushort*)buffer, &bufferSize);
- ptrBuildTrusteeWithNameW(&currentUserTrusteeW, (ushort*)buffer);
- }
- FreeLibrary(userHnd);
+ HINSTANCE advapiHnd = LoadLibraryW(L"advapi32");
+ if (advapiHnd) {
+ ptrGetNamedSecurityInfoW = (PtrGetNamedSecurityInfoW)GetProcAddress(advapiHnd, "GetNamedSecurityInfoW");
+ ptrLookupAccountSidW = (PtrLookupAccountSidW)GetProcAddress(advapiHnd, "LookupAccountSidW");
+ ptrAllocateAndInitializeSid = (PtrAllocateAndInitializeSid)GetProcAddress(advapiHnd, "AllocateAndInitializeSid");
+ ptrBuildTrusteeWithSidW = (PtrBuildTrusteeWithSidW)GetProcAddress(advapiHnd, "BuildTrusteeWithSidW");
+ ptrBuildTrusteeWithNameW = (PtrBuildTrusteeWithNameW)GetProcAddress(advapiHnd, "BuildTrusteeWithNameW");
+ ptrGetEffectiveRightsFromAclW = (PtrGetEffectiveRightsFromAclW)GetProcAddress(advapiHnd, "GetEffectiveRightsFromAclW");
+ ptrFreeSid = (PtrFreeSid)GetProcAddress(advapiHnd, "FreeSid");
+ }
+ if (ptrBuildTrusteeWithNameW) {
+ HINSTANCE versionHnd = LoadLibraryW(L"version");
+ if (versionHnd) {
+ typedef DWORD (WINAPI *PtrGetFileVersionInfoSizeW)(LPCWSTR lptstrFilename,LPDWORD lpdwHandle);
+ PtrGetFileVersionInfoSizeW ptrGetFileVersionInfoSizeW = (PtrGetFileVersionInfoSizeW)GetProcAddress(versionHnd, "GetFileVersionInfoSizeW");
+ typedef BOOL (WINAPI *PtrGetFileVersionInfoW)(LPCWSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
+ PtrGetFileVersionInfoW ptrGetFileVersionInfoW = (PtrGetFileVersionInfoW)GetProcAddress(versionHnd, "GetFileVersionInfoW");
+ typedef BOOL (WINAPI *PtrVerQueryValueW)(const LPVOID pBlock,LPCWSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
+ PtrVerQueryValueW ptrVerQueryValueW = (PtrVerQueryValueW)GetProcAddress(versionHnd, "VerQueryValueW");
+ if(ptrGetFileVersionInfoSizeW && ptrGetFileVersionInfoW && ptrVerQueryValueW) {
+ DWORD fakeHandle;
+ DWORD versionSize = ptrGetFileVersionInfoSizeW(L"secur32.dll", &fakeHandle);
+ if(versionSize) {
+ LPVOID versionData;
+ versionData = malloc(versionSize);
+ if(ptrGetFileVersionInfoW(L"secur32.dll", 0, versionSize, versionData)) {
+ UINT puLen;
+ VS_FIXEDFILEINFO *pLocalInfo;
+ if(ptrVerQueryValueW(versionData, L"\\", (void**)&pLocalInfo, &puLen)) {
+ WORD wVer1, wVer2, wVer3, wVer4;
+ wVer1 = HIWORD(pLocalInfo->dwFileVersionMS);
+ wVer2 = LOWORD(pLocalInfo->dwFileVersionMS);
+ wVer3 = HIWORD(pLocalInfo->dwFileVersionLS);
+ wVer4 = LOWORD(pLocalInfo->dwFileVersionLS);
+ // It will not work with secur32.dll version 5.0.2195.2862
+ if(!(wVer1 == 5 && wVer2 == 0 && wVer3 == 2195 && (wVer4 == 2862 || wVer4 == 4587))) {
+ HINSTANCE userHnd = LoadLibraryW(L"secur32");
+ if (userHnd) {
+ typedef BOOL (WINAPI *PtrGetUserNameExW)(EXTENDED_NAME_FORMAT nameFormat, ushort* lpBuffer, LPDWORD nSize);
+ PtrGetUserNameExW ptrGetUserNameExW = (PtrGetUserNameExW)GetProcAddress(userHnd, "GetUserNameExW");
+ if(ptrGetUserNameExW) {
+ static wchar_t buffer[258];
+ DWORD bufferSize = 257;
+ ptrGetUserNameExW(NameSamCompatible, (ushort*)buffer, &bufferSize);
+ ptrBuildTrusteeWithNameW(&currentUserTrusteeW, (ushort*)buffer);
}
+ FreeLibrary(userHnd);
}
}
}
- free(versionData);
}
+ free(versionData);
}
- FreeLibrary(versionHnd);
}
+ FreeLibrary(versionHnd);
}
ptrOpenProcessToken = (PtrOpenProcessToken)GetProcAddress(advapiHnd, "OpenProcessToken");
- HINSTANCE userenvHnd = LoadLibraryW(L"userenv");
+ HINSTANCE userenvHnd = LoadLibraryW(L"userenv");
if (userenvHnd) {
ptrGetUserProfileDirectoryW = (PtrGetUserProfileDirectoryW)GetProcAddress(userenvHnd, "GetUserProfileDirectoryW");
}
@@ -225,120 +223,60 @@ void QFSFileEnginePrivate::resolveLibs()
#endif // QT_NO_LIBRARY
// UNC functions NT
-typedef DWORD (WINAPI *PtrNetShareEnum_NT)(LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
-static PtrNetShareEnum_NT ptrNetShareEnum_NT = 0;
-typedef DWORD (WINAPI *PtrNetApiBufferFree_NT)(LPVOID);
-static PtrNetApiBufferFree_NT ptrNetApiBufferFree_NT = 0;
-typedef struct _SHARE_INFO_1_NT {
+typedef DWORD (WINAPI *PtrNetShareEnum)(LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
+static PtrNetShareEnum ptrNetShareEnum = 0;
+typedef DWORD (WINAPI *PtrNetApiBufferFree)(LPVOID);
+static PtrNetApiBufferFree ptrNetApiBufferFree = 0;
+typedef struct _SHARE_INFO_1 {
LPWSTR shi1_netname;
DWORD shi1_type;
LPWSTR shi1_remark;
-} SHARE_INFO_1_NT;
+} SHARE_INFO_1;
-bool QFSFileEnginePrivate::resolveUNCLibs_NT()
+bool QFSFileEnginePrivate::resolveUNCLibs()
{
static bool triedResolve = false;
if (!triedResolve) {
#ifndef QT_NO_THREAD
QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
if (triedResolve) {
- return ptrNetShareEnum_NT && ptrNetApiBufferFree_NT;
+ return ptrNetShareEnum && ptrNetApiBufferFree;
}
#endif
triedResolve = true;
#if !defined(Q_OS_WINCE)
HINSTANCE hLib = LoadLibraryW(L"Netapi32");
if (hLib) {
- ptrNetShareEnum_NT = (PtrNetShareEnum_NT)GetProcAddress(hLib, "NetShareEnum");
- if (ptrNetShareEnum_NT)
- ptrNetApiBufferFree_NT = (PtrNetApiBufferFree_NT)GetProcAddress(hLib, "NetApiBufferFree");
- }
-#endif
- }
- return ptrNetShareEnum_NT && ptrNetApiBufferFree_NT;
-}
-
-// UNC functions 9x
-typedef DWORD (WINAPI *PtrNetShareEnum_9x)(const char FAR *, short, char FAR *, unsigned short, unsigned short FAR *, unsigned short FAR *);
-static PtrNetShareEnum_9x ptrNetShareEnum_9x = 0;
-#ifdef LM20_NNLEN
-# define LM20_NNLEN_9x LM20_NNLEN
-#else
-# define LM20_NNLEN_9x 12
-#endif
-typedef struct _SHARE_INFO_1_9x {
- char shi1_netname[LM20_NNLEN_9x+1];
- char shi1_pad1;
- unsigned short shi1_type;
- char FAR* shi1_remark;
-} SHARE_INFO_1_9x;
-
-bool QFSFileEnginePrivate::resolveUNCLibs_9x()
-{
- static bool triedResolve = false;
- if (!triedResolve) {
-#ifndef QT_NO_THREAD
- QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
- if (triedResolve) {
- return ptrNetShareEnum_9x;
+ ptrNetShareEnum = (PtrNetShareEnum)GetProcAddress(hLib, "NetShareEnum");
+ if (ptrNetShareEnum)
+ ptrNetApiBufferFree = (PtrNetApiBufferFree)GetProcAddress(hLib, "NetApiBufferFree");
}
#endif
- triedResolve = true;
-#if !defined(Q_OS_WINCE)
- HINSTANCE hLib = LoadLibraryA("Svrapi");
- if (hLib)
- ptrNetShareEnum_9x = (PtrNetShareEnum_9x)GetProcAddress(hLib, "NetShareEnum");
-#endif
}
- return ptrNetShareEnum_9x;
+ return ptrNetShareEnum && ptrNetApiBufferFree;
}
bool QFSFileEnginePrivate::uncListSharesOnServer(const QString &server, QStringList *list)
{
- if (resolveUNCLibs_NT()) {
- SHARE_INFO_1_NT *BufPtr, *p;
+ if (resolveUNCLibs()) {
+ SHARE_INFO_1 *BufPtr, *p;
DWORD res;
DWORD er=0,tr=0,resume=0, i;
do {
- res = ptrNetShareEnum_NT((wchar_t*)server.utf16(), 1, (LPBYTE *)&BufPtr, DWORD(-1), &er, &tr, &resume);
+ res = ptrNetShareEnum((wchar_t*)server.utf16(), 1, (LPBYTE *)&BufPtr, DWORD(-1), &er, &tr, &resume);
if (res == ERROR_SUCCESS || res == ERROR_MORE_DATA) {
p=BufPtr;
for (i = 1; i <= er; ++i) {
if (list && p->shi1_type == 0)
- list->append(QString::fromUtf16((unsigned short *)p->shi1_netname));
+ list->append(QString::fromWCharArray(p->shi1_netname));
p++;
}
}
- ptrNetApiBufferFree_NT(BufPtr);
+ ptrNetApiBufferFree(BufPtr);
} while (res==ERROR_MORE_DATA);
return res == ERROR_SUCCESS;
- } else if (resolveUNCLibs_9x()) {
- SHARE_INFO_1_9x *pBuf = 0;
- short cbBuffer;
- unsigned short nEntriesRead = 0;
- unsigned short nTotalEntries = 0;
- short numBuffs = 20;
- DWORD nStatus = 0;
- do {
- cbBuffer = numBuffs * sizeof(SHARE_INFO_1_9x);
- pBuf = (SHARE_INFO_1_9x *)malloc(cbBuffer);
- if (pBuf) {
- nStatus = ptrNetShareEnum_9x(server.toLocal8Bit().constData(), 1, (char FAR *)pBuf, cbBuffer, &nEntriesRead, &nTotalEntries);
- if ((nStatus == ERROR_SUCCESS)) {
- for (int i = 0; i < nEntriesRead; ++i) {
- if (list && pBuf[i].shi1_type == 0)
- list->append(QString::fromLocal8Bit(pBuf[i].shi1_netname));
- }
- free(pBuf);
- break;
- }
- free(pBuf);
- numBuffs *=2;
- }
- } while (nStatus == ERROR_MORE_DATA);
- return nStatus == ERROR_SUCCESS;
}
return false;
}
@@ -399,39 +337,19 @@ static bool uncShareExists(const QString &server)
return false;
}
-#if !defined(Q_OS_WINCE)
-// If you change this function, remember to also change the UNICODE version
-static QString nativeAbsoluteFilePathA(const QString &path)
-{
- QString ret;
- QVarLengthArray<char, MAX_PATH> buf(MAX_PATH);
- char *fileName = 0;
- QByteArray ba = path.toLocal8Bit();
- DWORD retLen = GetFullPathNameA(ba.constData(), buf.size(), buf.data(), &fileName);
- if (retLen > (DWORD)buf.size()) {
- buf.resize(retLen);
- retLen = GetFullPathNameA(ba.constData(), buf.size(), buf.data(), &fileName);
- }
- if (retLen != 0)
- ret = QString::fromLocal8Bit(buf.data(), retLen);
- return ret;
-}
-#endif
-
-// If you change this function, remember to also change the NON-UNICODE version
-static QString nativeAbsoluteFilePathW(const QString &path)
+static QString nativeAbsoluteFilePathCore(const QString &path)
{
QString ret;
#if !defined(Q_OS_WINCE)
QVarLengthArray<wchar_t, MAX_PATH> buf(MAX_PATH);
wchar_t *fileName = 0;
- DWORD retLen = GetFullPathNameW((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
+ DWORD retLen = GetFullPathName((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
if (retLen > (DWORD)buf.size()) {
buf.resize(retLen);
- retLen = GetFullPathNameW((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
+ retLen = GetFullPathName((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
}
if (retLen != 0)
- ret = QString::fromUtf16((unsigned short *)buf.data(), retLen);
+ ret = QString::fromWCharArray(buf.data(), retLen);
#else
if (path.startsWith(QLatin1Char('/')) || path.startsWith(QLatin1Char('\\')))
ret = QDir::toNativeSeparators(path);
@@ -443,7 +361,7 @@ static QString nativeAbsoluteFilePathW(const QString &path)
static QString nativeAbsoluteFilePath(const QString &path)
{
- QString absPath = QT_WA_INLINE(nativeAbsoluteFilePathW(path), nativeAbsoluteFilePathA(path));
+ QString absPath = nativeAbsoluteFilePathCore(path);
// This is really ugly, but GetFullPathName strips off whitespace at the end.
// If you for instance write ". " in the lineedit of QFileDialog,
// (which is an invalid filename) this function will strip the space off and viola,
@@ -461,26 +379,6 @@ static QString nativeAbsoluteFilePath(const QString &path)
return absPath;
}
-QByteArray QFSFileEnginePrivate::win95Name(const QString &path)
-{
- QString ret(path);
- if(path.length() > 1 && path[0] == QLatin1Char('/') && path[1] == QLatin1Char('/')) {
- // Win95 cannot handle slash-slash needs slosh-slosh.
- ret[0] = QLatin1Char('\\');
- ret[1] = QLatin1Char('\\');
- int n = ret.indexOf(QLatin1Char('/'));
- if(n >= 0)
- ret[n] = QLatin1Char('\\');
- } else if(path.length() > 3 && path[2] == QLatin1Char('/') && path[3] == QLatin1Char('/')) {
- ret[2] = QLatin1Char('\\');
- ret.remove(3, 1);
- int n = ret.indexOf(QLatin1Char('/'));
- if(n >= 0)
- ret[n] = QLatin1Char('\\');
- }
- return ret.toLocal8Bit();
-}
-
/*!
\internal
*/
@@ -507,13 +405,8 @@ QString QFSFileEnginePrivate::longFileName(const QString &path)
*/
void QFSFileEnginePrivate::nativeInitFileName()
{
- QT_WA({
- QString path = longFileName(QDir::toNativeSeparators(fixIfRelativeUncPath(filePath)));
- nativeFilePath = QByteArray((const char *)path.utf16(), path.size() * 2 + 1);
- }, {
- QString path = fixIfRelativeUncPath(filePath);
- nativeFilePath = win95Name(path).replace('/', '\\');
- });
+ QString path = longFileName(QDir::toNativeSeparators(fixIfRelativeUncPath(filePath)));
+ nativeFilePath = QByteArray((const char *)path.utf16(), path.size() * 2 + 1);
}
/*
@@ -539,23 +432,13 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode)
? OPEN_ALWAYS : OPEN_EXISTING;
// Create the file handle.
- QT_WA({
- fileHandle = CreateFileW((TCHAR *)nativeFilePath.constData(),
- accessRights,
- shareMode,
- &securityAtts,
- creationDisp,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- }, {
- fileHandle = CreateFileA(nativeFilePath.constData(),
- accessRights,
- shareMode,
- &securityAtts,
- creationDisp,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- });
+ fileHandle = CreateFile((const wchar_t*)nativeFilePath.constData(),
+ accessRights,
+ shareMode,
+ &securityAtts,
+ creationDisp,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
// Bail out on error.
if (fileHandle == INVALID_HANDLE_VALUE) {
@@ -641,15 +524,32 @@ qint64 QFSFileEnginePrivate::nativeSize() const
// Not-open mode, where the file name is known: We'll check the
// file system directly.
if (openMode == QIODevice::NotOpen && !nativeFilePath.isEmpty()) {
- bool ok = false;
WIN32_FILE_ATTRIBUTE_DATA attribData;
- QT_WA({
- ok = ::GetFileAttributesExW((TCHAR *)nativeFilePath.constData(),
+ bool ok = ::GetFileAttributesEx((const wchar_t*)nativeFilePath.constData(),
GetFileExInfoStandard, &attribData);
- } , {
- ok = ::GetFileAttributesExA(nativeFilePath.constData(),
- GetFileExInfoStandard, &attribData);
- });
+ if (!ok) {
+ int errorCode = GetLastError();
+ if (errorCode != ERROR_INVALID_NAME
+ && errorCode != ERROR_FILE_NOT_FOUND && errorCode != ERROR_PATH_NOT_FOUND) {
+ QByteArray path = nativeFilePath;
+ // path for the FindFirstFile should not end with a trailing slash
+ while (path.endsWith('\\'))
+ path.chop(1);
+
+ // FindFirstFile can not handle drives
+ if (!path.endsWith(':')) {
+ WIN32_FIND_DATA findData;
+ HANDLE hFind = ::FindFirstFile((const wchar_t*)path.constData(),
+ &findData);
+ if (hFind != INVALID_HANDLE_VALUE) {
+ ::FindClose(hFind);
+ ok = true;
+ attribData.nFileSizeHigh = findData.nFileSizeHigh;
+ attribData.nFileSizeLow = findData.nFileSizeLow;
+ }
+ }
+ }
+ }
if (ok) {
qint64 size = attribData.nFileSizeHigh;
size <<= 32;
@@ -711,28 +611,28 @@ qint64 QFSFileEnginePrivate::nativePos() const
if (fileHandle == INVALID_HANDLE_VALUE)
return 0;
-#if !defined(QT_NO_LIBRARY)
+#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_WINCE)
QFSFileEnginePrivate::resolveLibs();
if (!ptrSetFilePointerEx) {
#endif
- DWORD newFilePointer = SetFilePointer(fileHandle, 0, NULL, FILE_CURRENT);
- if (newFilePointer == 0xFFFFFFFF) {
+ LARGE_INTEGER filepos;
+ filepos.HighPart = 0;
+ DWORD newFilePointer = SetFilePointer(fileHandle, 0, &filepos.HighPart, FILE_CURRENT);
+ if (newFilePointer == 0xFFFFFFFF && GetLastError() != NO_ERROR) {
thatQ->setError(QFile::UnspecifiedError, qt_error_string());
return 0;
}
- // Note: returns <4GB; does not work with large files. This is the
- // case for MOC, UIC, qmake and other bootstrapped tools, and for
- // Win9x/ME.
- return qint64(newFilePointer);
-#if !defined(QT_NO_LIBRARY)
+ // Note: This is the case for MOC, UIC, qmake and other
+ // bootstrapped tools, and for Windows CE.
+ filepos.LowPart = newFilePointer;
+ return filepos.QuadPart;
+#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_WINCE)
}
- // This approach supports large files.
LARGE_INTEGER currentFilePos;
LARGE_INTEGER offset;
- offset.LowPart = 0;
- offset.HighPart = 0;
+ offset.QuadPart = 0;
if (!ptrSetFilePointerEx(fileHandle, offset, &currentFilePos, FILE_CURRENT)) {
thatQ->setError(QFile::UnspecifiedError, qt_error_string());
return 0;
@@ -755,28 +655,27 @@ bool QFSFileEnginePrivate::nativeSeek(qint64 pos)
return seekFdFh(pos);
}
-#if !defined(QT_NO_LIBRARY)
+#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_WINCE)
QFSFileEnginePrivate::resolveLibs();
if (!ptrSetFilePointerEx) {
#endif
- LONG seekToPos = LONG(pos); // <- lossy
- DWORD newFilePointer = SetFilePointer(fileHandle, seekToPos, NULL, FILE_BEGIN);
- if (newFilePointer == 0xFFFFFFFF) {
- thatQ->setError(QFile::UnspecifiedError, qt_error_string());
+ DWORD newFilePointer;
+ LARGE_INTEGER *li = reinterpret_cast<LARGE_INTEGER*>(&pos);
+ newFilePointer = SetFilePointer(fileHandle, li->LowPart, &li->HighPart, FILE_BEGIN);
+ if (newFilePointer == 0xFFFFFFFF && GetLastError() != NO_ERROR) {
+ thatQ->setError(QFile::PositionError, qt_error_string());
return false;
}
- // Note: does not work with large files. This is the case for MOC,
- // UIC, qmake and other bootstrapped tools, and for Win9x/ME.
+ // Note: This is the case for MOC, UIC, qmake and other
+ // bootstrapped tools, and for Windows CE.
return true;
-#if !defined(QT_NO_LIBRARY)
+#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_WINCE)
}
- // This approach supports large files.
LARGE_INTEGER currentFilePos;
LARGE_INTEGER offset;
- offset.LowPart = (unsigned int)(quint64(pos) & Q_UINT64_C(0xffffffff));
- offset.HighPart = (unsigned int)((quint64(pos) >> 32) & Q_UINT64_C(0xffffffff));
+ offset.QuadPart = pos;
if (ptrSetFilePointerEx(fileHandle, offset, &currentFilePos, FILE_BEGIN) == 0) {
thatQ->setError(QFile::UnspecifiedError, qt_error_string());
return false;
@@ -949,35 +848,21 @@ bool QFSFileEnginePrivate::nativeIsSequential() const
bool QFSFileEngine::remove()
{
Q_D(QFSFileEngine);
- QT_WA({
- return ::DeleteFileW((TCHAR*)QFSFileEnginePrivate::longFileName(d->filePath).utf16()) != 0;
- } , {
- return ::DeleteFileA(QFSFileEnginePrivate::win95Name(d->filePath)) != 0;
- });
+ return ::DeleteFile((wchar_t*)QFSFileEnginePrivate::longFileName(d->filePath).utf16()) != 0;
}
bool QFSFileEngine::copy(const QString &copyName)
{
Q_D(QFSFileEngine);
- QT_WA({
- return ::CopyFileW((TCHAR*)QFSFileEnginePrivate::longFileName(d->filePath).utf16(),
- (TCHAR*)QFSFileEnginePrivate::longFileName(copyName).utf16(), true) != 0;
- } , {
- return ::CopyFileA(QFSFileEnginePrivate::win95Name(d->filePath),
- QFSFileEnginePrivate::win95Name(copyName), true) != 0;
- });
+ return ::CopyFile((wchar_t*)QFSFileEnginePrivate::longFileName(d->filePath).utf16(),
+ (wchar_t*)QFSFileEnginePrivate::longFileName(copyName).utf16(), true) != 0;
}
bool QFSFileEngine::rename(const QString &newName)
{
Q_D(QFSFileEngine);
- QT_WA({
- return ::MoveFileW((TCHAR*)QFSFileEnginePrivate::longFileName(d->filePath).utf16(),
- (TCHAR*)QFSFileEnginePrivate::longFileName(newName).utf16()) != 0;
- } , {
- return ::MoveFileA(QFSFileEnginePrivate::win95Name(d->filePath),
- QFSFileEnginePrivate::win95Name(newName)) != 0;
- });
+ return ::MoveFile((wchar_t*)QFSFileEnginePrivate::longFileName(d->filePath).utf16(),
+ (wchar_t*)QFSFileEnginePrivate::longFileName(newName).utf16()) != 0;
}
static inline bool mkDir(const QString &path)
@@ -1001,20 +886,12 @@ static inline bool mkDir(const QString &path)
if (platformId == 1 && QFSFileEnginePrivate::longFileName(path).size() > 256)
return false;
#endif
- QT_WA({
- return ::CreateDirectoryW((TCHAR*)QFSFileEnginePrivate::longFileName(path).utf16(), 0);
- } , {
- return ::CreateDirectoryA(QFSFileEnginePrivate::win95Name(QFileInfo(path).absoluteFilePath()), 0);
- });
+ return ::CreateDirectory((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16(), 0);
}
static inline bool rmDir(const QString &path)
{
- QT_WA({
- return ::RemoveDirectoryW((TCHAR*)QFSFileEnginePrivate::longFileName(path).utf16());
- } , {
- return ::RemoveDirectoryA(QFSFileEnginePrivate::win95Name(QFileInfo(path).absoluteFilePath()));
- });
+ return ::RemoveDirectory((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16());
}
static inline bool isDirPath(const QString &dirPath, bool *existed)
@@ -1023,12 +900,27 @@ static inline bool isDirPath(const QString &dirPath, bool *existed)
if (path.length() == 2 &&path.at(1) == QLatin1Char(':'))
path += QLatin1Char('\\');
- DWORD fileAttrib = INVALID_FILE_ATTRIBUTES;
- QT_WA({
- fileAttrib = ::GetFileAttributesW((TCHAR*)QFSFileEnginePrivate::longFileName(path).utf16());
- } , {
- fileAttrib = ::GetFileAttributesA(QFSFileEnginePrivate::win95Name(QFileInfo(path).absoluteFilePath()));
- });
+ DWORD fileAttrib = ::GetFileAttributes((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16());
+ if (fileAttrib == INVALID_FILE_ATTRIBUTES) {
+ int errorCode = GetLastError();
+ if (errorCode != ERROR_INVALID_NAME
+ && errorCode != ERROR_FILE_NOT_FOUND && errorCode != ERROR_PATH_NOT_FOUND) {
+ // path for the FindFirstFile should not end with a trailing slash
+ while (path.endsWith(QLatin1Char('\\')))
+ path.chop(1);
+
+ // FindFirstFile can not handle drives
+ if (!path.endsWith(QLatin1Char(':'))) {
+ WIN32_FIND_DATA findData;
+ HANDLE hFind = ::FindFirstFile((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16(),
+ &findData);
+ if (hFind != INVALID_HANDLE_VALUE) {
+ ::FindClose(hFind);
+ fileAttrib = findData.dwFileAttributes;
+ }
+ }
+ }
+ }
if (existed)
*existed = fileAttrib != INVALID_FILE_ATTRIBUTES;
@@ -1110,16 +1002,10 @@ bool QFSFileEngine::setCurrentPath(const QString &path)
return false;
#if !defined(Q_OS_WINCE)
- int r;
- QT_WA({
- r = ::SetCurrentDirectoryW((WCHAR*)path.utf16());
- } , {
- r = ::SetCurrentDirectoryA(QFSFileEnginePrivate::win95Name(path));
- });
- return r != 0;
+ return ::SetCurrentDirectory((wchar_t*)path.utf16()) != 0;
#else
- qfsPrivateCurrentDir = QFSFileEnginePrivate::longFileName(path);
- return true;
+ qfsPrivateCurrentDir = QFSFileEnginePrivate::longFileName(path);
+ return true;
#endif
}
@@ -1132,48 +1018,34 @@ QString QFSFileEngine::currentPath(const QString &fileName)
fileName.at(0).isLetter() && fileName.at(1) == QLatin1Char(':')) {
int drv = fileName.toUpper().at(0).toLatin1() - 'A' + 1;
if (_getdrive() != drv) {
- QT_WA({
- TCHAR buf[PATH_MAX];
- ::_wgetdcwd(drv, buf, PATH_MAX);
- ret.setUtf16((ushort*)buf, uint(::wcslen(buf)));
- }, {
- char buf[PATH_MAX];
- ::_getdcwd(drv, buf, PATH_MAX);
- ret = QString::fromLatin1(buf);
- });
+ wchar_t buf[PATH_MAX];
+ ::_wgetdcwd(drv, buf, PATH_MAX);
+ ret = QString::fromWCharArray(buf);
}
}
if (ret.isEmpty()) {
//just the pwd
- QT_WA({
- DWORD size = 0;
- WCHAR currentName[PATH_MAX];
- size = ::GetCurrentDirectoryW(PATH_MAX, currentName);
- if (size !=0) {
- if (size > PATH_MAX) {
- WCHAR * newCurrentName = new WCHAR[size];
- if (::GetCurrentDirectoryW(PATH_MAX, newCurrentName) != 0)
- ret = QString::fromUtf16((ushort*)newCurrentName);
- delete [] newCurrentName;
- } else {
- ret = QString::fromUtf16((ushort*)currentName);
- }
+ DWORD size = 0;
+ wchar_t currentName[PATH_MAX];
+ size = ::GetCurrentDirectory(PATH_MAX, currentName);
+ if (size != 0) {
+ if (size > PATH_MAX) {
+ wchar_t *newCurrentName = new wchar_t[size];
+ if (::GetCurrentDirectory(PATH_MAX, newCurrentName) != 0)
+ ret = QString::fromWCharArray(newCurrentName);
+ delete [] newCurrentName;
+ } else {
+ ret = QString::fromWCharArray(currentName);
}
- } , {
- DWORD size = 0;
- char currentName[PATH_MAX];
- size = ::GetCurrentDirectoryA(PATH_MAX, currentName);
- if (size !=0)
- ret = QString::fromLocal8Bit(currentName);
- });
+ }
}
if (ret.length() >= 2 && ret[1] == QLatin1Char(':'))
ret[0] = ret.at(0).toUpper(); // Force uppercase drive letters.
return QDir::fromNativeSeparators(ret);
#else
- Q_UNUSED(fileName);
- if (qfsPrivateCurrentDir.isEmpty())
- qfsPrivateCurrentDir = QCoreApplication::applicationDirPath();
+ Q_UNUSED(fileName);
+ if (qfsPrivateCurrentDir.isEmpty())
+ qfsPrivateCurrentDir = QCoreApplication::applicationDirPath();
return QDir::fromNativeSeparators(qfsPrivateCurrentDir);
#endif
@@ -1183,35 +1055,27 @@ QString QFSFileEngine::homePath()
{
QString ret;
#if !defined(QT_NO_LIBRARY)
- QT_WA (
- {
- QFSFileEnginePrivate::resolveLibs();
- if (ptrOpenProcessToken && ptrGetUserProfileDirectoryW) {
- HANDLE hnd = ::GetCurrentProcess();
- HANDLE token = 0;
- BOOL ok = ::ptrOpenProcessToken(hnd, TOKEN_QUERY, &token);
- if (ok) {
- DWORD dwBufferSize = 0;
- // First call, to determine size of the strings (with '\0').
- ok = ::ptrGetUserProfileDirectoryW(token, NULL, &dwBufferSize);
- if (!ok && dwBufferSize != 0) { // We got the required buffer size
- wchar_t *userDirectory = new wchar_t[dwBufferSize];
- // Second call, now we can fill the allocated buffer.
- ok = ::ptrGetUserProfileDirectoryW(token, userDirectory, &dwBufferSize);
- if (ok)
- ret = QString::fromUtf16((ushort*)userDirectory);
-
- delete [] userDirectory;
- }
- ::CloseHandle(token);
- }
- }
- }
- ,
- {
- // GetUserProfileDirectory is only available from NT 4.0,
- // so fall through for Win98 and friends version.
- })
+ QFSFileEnginePrivate::resolveLibs();
+ if (ptrOpenProcessToken && ptrGetUserProfileDirectoryW) {
+ HANDLE hnd = ::GetCurrentProcess();
+ HANDLE token = 0;
+ BOOL ok = ::ptrOpenProcessToken(hnd, TOKEN_QUERY, &token);
+ if (ok) {
+ DWORD dwBufferSize = 0;
+ // First call, to determine size of the strings (with '\0').
+ ok = ::ptrGetUserProfileDirectoryW(token, NULL, &dwBufferSize);
+ if (!ok && dwBufferSize != 0) { // We got the required buffer size
+ wchar_t *userDirectory = new wchar_t[dwBufferSize];
+ // Second call, now we can fill the allocated buffer.
+ ok = ::ptrGetUserProfileDirectoryW(token, userDirectory, &dwBufferSize);
+ if (ok)
+ ret = QString::fromWCharArray(userDirectory);
+
+ delete [] userDirectory;
+ }
+ ::CloseHandle(token);
+ }
+ }
#endif
if(ret.isEmpty() || !QFile::exists(ret)) {
ret = QString::fromLocal8Bit(qgetenv("USERPROFILE").constData());
@@ -1251,17 +1115,10 @@ QString QFSFileEngine::rootPath()
QString QFSFileEngine::tempPath()
{
- QString ret;
- int success;
- QT_WA({
- wchar_t tempPath[MAX_PATH];
- success = GetTempPathW(MAX_PATH, tempPath);
- ret = QString::fromUtf16((ushort*)tempPath);
- } , {
- char tempPath[MAX_PATH];
- success = GetTempPathA(MAX_PATH, tempPath);
- ret = QString::fromLocal8Bit(tempPath);
- });
+ wchar_t tempPath[MAX_PATH];
+ int success = GetTempPath(MAX_PATH, tempPath);
+ QString ret = QString::fromWCharArray(tempPath);
+
if (ret.isEmpty() || !success) {
#if !defined(Q_OS_WINCE)
ret = QString::fromLatin1("c:/tmp");
@@ -1285,7 +1142,7 @@ QFileInfoList QFSFileEngine::drives()
#elif defined(Q_OS_OS2EMX)
quint32 driveBits, cur;
if(DosQueryCurrentDisk(&cur,&driveBits) != NO_ERROR)
- exit(1);
+ exit(1);
driveBits &= 0x3ffffff;
#endif
char driveName[] = "A:/";
@@ -1327,18 +1184,35 @@ bool QFSFileEnginePrivate::doStat() const
}
}
#else
- DWORD tmpAttributes = GetFileAttributesW((TCHAR*)QFSFileEnginePrivate::longFileName(fname).utf16());
+ DWORD tmpAttributes = GetFileAttributes((wchar_t*)QFSFileEnginePrivate::longFileName(fname).utf16());
if (tmpAttributes != -1) {
fileAttrib = tmpAttributes;
could_stat = true;
}
#endif
} else {
- QT_WA({
- fileAttrib = GetFileAttributesW((TCHAR*)QFSFileEnginePrivate::longFileName(fname).utf16());
- } , {
- fileAttrib = GetFileAttributesA(QFSFileEnginePrivate::win95Name(QFileInfo(fname).absoluteFilePath()));
- });
+ fileAttrib = GetFileAttributes((wchar_t*)QFSFileEnginePrivate::longFileName(fname).utf16());
+ if (fileAttrib == INVALID_FILE_ATTRIBUTES) {
+ int errorCode = GetLastError();
+ if (errorCode != ERROR_INVALID_NAME
+ && errorCode != ERROR_FILE_NOT_FOUND && errorCode != ERROR_PATH_NOT_FOUND) {
+ QString path = QDir::toNativeSeparators(fname);
+ // path for the FindFirstFile should not end with a trailing slash
+ while (path.endsWith(QLatin1Char('\\')))
+ path.chop(1);
+
+ // FindFirstFile can not handle drives
+ if (!path.endsWith(QLatin1Char(':'))) {
+ WIN32_FIND_DATA findData;
+ HANDLE hFind = ::FindFirstFile((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16(),
+ &findData);
+ if (hFind != INVALID_HANDLE_VALUE) {
+ ::FindClose(hFind);
+ fileAttrib = findData.dwFileAttributes;
+ }
+ }
+ }
+ }
could_stat = fileAttrib != INVALID_FILE_ATTRIBUTES;
if (!could_stat) {
#if !defined(Q_OS_WINCE)
@@ -1398,74 +1272,39 @@ static QString readLink(const QString &link)
#if !defined(Q_OS_WINCE)
#if !defined(QT_NO_LIBRARY)
QString ret;
- QT_WA({
- bool neededCoInit = false;
- IShellLink *psl; // pointer to IShellLink i/f
- HRESULT hres;
- WIN32_FIND_DATA wfd;
- TCHAR szGotPath[MAX_PATH];
- // Get pointer to the IShellLink interface.
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
- IID_IShellLink, (LPVOID *)&psl);
- if(hres == CO_E_NOTINITIALIZED) { // COM was not initialized
- neededCoInit = true;
- CoInitialize(NULL);
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
- IID_IShellLink, (LPVOID *)&psl);
- }
- if(SUCCEEDED(hres)) { // Get pointer to the IPersistFile interface.
- IPersistFile *ppf;
- hres = psl->QueryInterface(IID_IPersistFile, (LPVOID *)&ppf);
- if(SUCCEEDED(hres)) {
- hres = ppf->Load((LPOLESTR)link.utf16(), STGM_READ);
- //The original path of the link is retrieved. If the file/folder
- //was moved, the return value still have the old path.
- if(SUCCEEDED(hres)) {
- if (psl->GetPath(szGotPath, MAX_PATH, &wfd, SLGP_UNCPRIORITY) == NOERROR)
- ret = QString::fromUtf16((ushort*)szGotPath);
- }
- ppf->Release();
- }
- psl->Release();
- }
- if(neededCoInit)
- CoUninitialize();
- } , {
- bool neededCoInit = false;
- IShellLinkA *psl; // pointer to IShellLink i/f
- HRESULT hres;
- WIN32_FIND_DATAA wfd;
- char szGotPath[MAX_PATH];
- // Get pointer to the IShellLink interface.
+ bool neededCoInit = false;
+ IShellLink *psl; // pointer to IShellLink i/f
+ WIN32_FIND_DATA wfd;
+ wchar_t szGotPath[MAX_PATH];
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
- IID_IShellLinkA, (LPVOID *)&psl);
+ // Get pointer to the IShellLink interface.
+ HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *)&psl);
- if(hres == CO_E_NOTINITIALIZED) { // COM was not initialized
- neededCoInit = true;
- CoInitialize(NULL);
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
- IID_IShellLinkA, (LPVOID *)&psl);
- }
- if(SUCCEEDED(hres)) { // Get pointer to the IPersistFile interface.
- IPersistFile *ppf;
- hres = psl->QueryInterface(IID_IPersistFile, (LPVOID *)&ppf);
- if(SUCCEEDED(hres)) {
- hres = ppf->Load((LPOLESTR)QFileInfo(link).absoluteFilePath().utf16(), STGM_READ);
- //The original path of the link is retrieved. If the file/folder
- //was moved, the return value still have the old path.
- if(SUCCEEDED(hres)) {
- if (psl->GetPath((char*)szGotPath, MAX_PATH, &wfd, SLGP_UNCPRIORITY) == NOERROR)
- ret = QString::fromLocal8Bit(szGotPath);
- }
- ppf->Release();
+ if (hres == CO_E_NOTINITIALIZED) { // COM was not initialized
+ neededCoInit = true;
+ CoInitialize(NULL);
+ hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+ IID_IShellLink, (LPVOID *)&psl);
+ }
+ if (SUCCEEDED(hres)) { // Get pointer to the IPersistFile interface.
+ IPersistFile *ppf;
+ hres = psl->QueryInterface(IID_IPersistFile, (LPVOID *)&ppf);
+ if(SUCCEEDED(hres)) {
+ hres = ppf->Load((LPOLESTR)link.utf16(), STGM_READ);
+ //The original path of the link is retrieved. If the file/folder
+ //was moved, the return value still have the old path.
+ if(SUCCEEDED(hres)) {
+ if (psl->GetPath(szGotPath, MAX_PATH, &wfd, SLGP_UNCPRIORITY) == NOERROR)
+ ret = QString::fromWCharArray(szGotPath);
}
- psl->Release();
+ ppf->Release();
}
- if(neededCoInit)
- CoUninitialize();
- });
+ psl->Release();
+ }
+ if (neededCoInit)
+ CoUninitialize();
+
return ret;
#else
Q_UNUSED(link);
@@ -1475,7 +1314,7 @@ static QString readLink(const QString &link)
wchar_t target[MAX_PATH];
QString result;
if (SHGetShortcutTarget((wchar_t*)QFileInfo(link).absoluteFilePath().replace(QLatin1Char('/'),QLatin1Char('\\')).utf16(), target, MAX_PATH)) {
- result = QString::fromUtf16(reinterpret_cast<const ushort *> (target));
+ result = QString::fromWCharArray(target);
if (result.startsWith(QLatin1Char('"')))
result.remove(0,1);
if (result.endsWith(QLatin1Char('"')))
@@ -1502,76 +1341,37 @@ bool QFSFileEngine::link(const QString &newName)
QString linkName = newName;
//### assume that they add .lnk
- QT_WA({
- HRESULT hres;
- IShellLink *psl;
- bool neededCoInit = false;
+ IShellLink *psl;
+ bool neededCoInit = false;
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
- if(hres == CO_E_NOTINITIALIZED) { // COM was not initialized
- neededCoInit = true;
- CoInitialize(NULL);
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
- }
- if (SUCCEEDED(hres)) {
- hres = psl->SetPath((wchar_t *)fileName(AbsoluteName).replace(QLatin1Char('/'), QLatin1Char('\\')).utf16());
- if (SUCCEEDED(hres)) {
- hres = psl->SetWorkingDirectory((wchar_t *)fileName(AbsolutePathName).replace(QLatin1Char('/'), QLatin1Char('\\')).utf16());
- if (SUCCEEDED(hres)) {
- IPersistFile *ppf;
- hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
- if (SUCCEEDED(hres)) {
- hres = ppf->Save((TCHAR*)linkName.utf16(), TRUE);
- if (SUCCEEDED(hres))
- ret = true;
- ppf->Release();
- }
- }
- }
- psl->Release();
- }
- if(neededCoInit)
- CoUninitialize();
- } , {
- // the SetPath() call _sometimes_ changes the current path and when it does it sometimes
- // does not let us change it back unless we call currentPath() many times.
- QString cwd = currentPath();
- HRESULT hres;
- IShellLinkA *psl;
- bool neededCoInit = false;
+ HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
+ if (hres == CO_E_NOTINITIALIZED) { // COM was not initialized
+ neededCoInit = true;
+ CoInitialize(NULL);
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
- if(hres == CO_E_NOTINITIALIZED) { // COM was not initialized
- neededCoInit = true;
- CoInitialize(NULL);
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
- }
+ }
+
+ if (SUCCEEDED(hres)) {
+ hres = psl->SetPath((wchar_t *)fileName(AbsoluteName).replace(QLatin1Char('/'), QLatin1Char('\\')).utf16());
if (SUCCEEDED(hres)) {
- currentPath();
- hres = psl->SetPath((char *)QString::fromLocal8Bit(QFSFileEnginePrivate::win95Name(fileName(AbsoluteName))).utf16());
- currentPath();
+ hres = psl->SetWorkingDirectory((wchar_t *)fileName(AbsolutePathName).replace(QLatin1Char('/'), QLatin1Char('\\')).utf16());
if (SUCCEEDED(hres)) {
- hres = psl->SetWorkingDirectory((char *)QString::fromLocal8Bit(QFSFileEnginePrivate::win95Name(fileName(AbsolutePathName))).utf16());
- currentPath();
+ IPersistFile *ppf;
+ hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
if (SUCCEEDED(hres)) {
- IPersistFile *ppf;
- hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
- if (SUCCEEDED(hres)) {
- currentPath();
- hres = ppf->Save((LPCOLESTR)linkName.utf16(), TRUE);
- currentPath();
- if (SUCCEEDED(hres))
- ret = true;
- ppf->Release();
- }
+ hres = ppf->Save((wchar_t*)linkName.utf16(), TRUE);
+ if (SUCCEEDED(hres))
+ ret = true;
+ ppf->Release();
}
- psl->Release();
}
}
- if(neededCoInit)
+ psl->Release();
+ }
+ if(neededCoInit)
CoUninitialize();
- setCurrentPath(cwd);
- });
+
return ret;
#else
Q_UNUSED(newName);
@@ -1598,9 +1398,9 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
#if !defined(QT_NO_LIBRARY)
if((qt_ntfs_permission_lookup > 0) && ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_NT)) {
- PSID pOwner = 0;
- PSID pGroup = 0;
- PACL pDacl;
+ PSID pOwner = 0;
+ PSID pGroup = 0;
+ PACL pDacl;
PSECURITY_DESCRIPTOR pSD;
ACCESS_MASK access_mask;
@@ -1610,42 +1410,42 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
QString fname = filePath.endsWith(QLatin1String(".lnk")) ? readLink(filePath) : filePath;
DWORD res = ptrGetNamedSecurityInfoW((wchar_t*)fname.utf16(), SE_FILE_OBJECT,
- OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
- &pOwner, &pGroup, &pDacl, 0, &pSD);
+ OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
+ &pOwner, &pGroup, &pDacl, 0, &pSD);
if(res == ERROR_SUCCESS) {
TRUSTEE_W trustee;
{ //user
if(ptrGetEffectiveRightsFromAclW(pDacl, &currentUserTrusteeW, &access_mask) != ERROR_SUCCESS)
access_mask = (ACCESS_MASK)-1;
- if(access_mask & ReadMask)
- ret |= QAbstractFileEngine::ReadUserPerm;
- if(access_mask & WriteMask)
- ret |= QAbstractFileEngine::WriteUserPerm;
- if(access_mask & ExecMask)
- ret |= QAbstractFileEngine::ExeUserPerm;
+ if(access_mask & ReadMask)
+ ret |= QAbstractFileEngine::ReadUserPerm;
+ if(access_mask & WriteMask)
+ ret |= QAbstractFileEngine::WriteUserPerm;
+ if(access_mask & ExecMask)
+ ret |= QAbstractFileEngine::ExeUserPerm;
}
{ //owner
ptrBuildTrusteeWithSidW(&trustee, pOwner);
if(ptrGetEffectiveRightsFromAclW(pDacl, &trustee, &access_mask) != ERROR_SUCCESS)
access_mask = (ACCESS_MASK)-1;
- if(access_mask & ReadMask)
- ret |= QAbstractFileEngine::ReadOwnerPerm;
- if(access_mask & WriteMask)
- ret |= QAbstractFileEngine::WriteOwnerPerm;
- if(access_mask & ExecMask)
- ret |= QAbstractFileEngine::ExeOwnerPerm;
+ if(access_mask & ReadMask)
+ ret |= QAbstractFileEngine::ReadOwnerPerm;
+ if(access_mask & WriteMask)
+ ret |= QAbstractFileEngine::WriteOwnerPerm;
+ if(access_mask & ExecMask)
+ ret |= QAbstractFileEngine::ExeOwnerPerm;
}
{ //group
ptrBuildTrusteeWithSidW(&trustee, pGroup);
if(ptrGetEffectiveRightsFromAclW(pDacl, &trustee, &access_mask) != ERROR_SUCCESS)
access_mask = (ACCESS_MASK)-1;
- if(access_mask & ReadMask)
- ret |= QAbstractFileEngine::ReadGroupPerm;
- if(access_mask & WriteMask)
- ret |= QAbstractFileEngine::WriteGroupPerm;
- if(access_mask & ExecMask)
- ret |= QAbstractFileEngine::ExeGroupPerm;
+ if(access_mask & ReadMask)
+ ret |= QAbstractFileEngine::ReadGroupPerm;
+ if(access_mask & WriteMask)
+ ret |= QAbstractFileEngine::WriteGroupPerm;
+ if(access_mask & ExecMask)
+ ret |= QAbstractFileEngine::ExeGroupPerm;
}
{ //other (world)
// Create SID for Everyone (World)
@@ -1655,12 +1455,12 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
ptrBuildTrusteeWithSidW(&trustee, pWorld);
if(ptrGetEffectiveRightsFromAclW(pDacl, &trustee, &access_mask) != ERROR_SUCCESS)
access_mask = (ACCESS_MASK)-1; // ###
- if(access_mask & ReadMask)
- ret |= QAbstractFileEngine::ReadOtherPerm;
- if(access_mask & WriteMask)
- ret |= QAbstractFileEngine::WriteOtherPerm;
- if(access_mask & ExecMask)
- ret |= QAbstractFileEngine::ExeOtherPerm;
+ if(access_mask & ReadMask)
+ ret |= QAbstractFileEngine::ReadOtherPerm;
+ if(access_mask & WriteMask)
+ ret |= QAbstractFileEngine::WriteOtherPerm;
+ if(access_mask & ExecMask)
+ ret |= QAbstractFileEngine::ExeOtherPerm;
}
ptrFreeSid(pWorld);
}
@@ -1670,13 +1470,13 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
} else
#endif
{
- //### what to do with permissions if we don't use ntfs or are not on a NT system
- // for now just add all permissions and what about exe missions ??
- // also qt_ntfs_permission_lookup is now not set by defualt ... should it ?
- ret |= QAbstractFileEngine::ReadOtherPerm | QAbstractFileEngine::ReadGroupPerm
- | QAbstractFileEngine::ReadOwnerPerm | QAbstractFileEngine::ReadUserPerm
- | QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::WriteOwnerPerm
- | QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm;
+ //### what to do with permissions if we don't use NTFS
+ // for now just add all permissions and what about exe missions ??
+ // also qt_ntfs_permission_lookup is now not set by defualt ... should it ?
+ ret |= QAbstractFileEngine::ReadOtherPerm | QAbstractFileEngine::ReadGroupPerm
+ | QAbstractFileEngine::ReadOwnerPerm | QAbstractFileEngine::ReadUserPerm
+ | QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::WriteOwnerPerm
+ | QAbstractFileEngine::WriteGroupPerm | QAbstractFileEngine::WriteOtherPerm;
}
if (doStat()) {
@@ -1783,8 +1583,8 @@ QString QFSFileEngine::fileName(FileName file) const
if (!isRelativePath()) {
#if !defined(Q_OS_WINCE)
- if (d->filePath.size() > 2 && d->filePath.at(1) == QLatin1Char(':')
- && d->filePath.at(2) != QLatin1Char('/') || // It's a drive-relative path, so Z:a.txt -> Z:\currentpath\a.txt
+ if ((d->filePath.size() > 2 && d->filePath.at(1) == QLatin1Char(':')
+ && d->filePath.at(2) != QLatin1Char('/')) || // It's a drive-relative path, so Z:a.txt -> Z:\currentpath\a.txt
d->filePath.startsWith(QLatin1Char('/')) // It's a absolute path to the current drive, so \a.txt -> Z:\a.txt
) {
ret = QDir::fromNativeSeparators(nativeAbsoluteFilePath(d->filePath));
@@ -1911,13 +1711,9 @@ bool QFSFileEngine::setPermissions(uint perms)
return false;
#if !defined(Q_OS_WINCE)
- QT_WA({
- ret = ::_wchmod((TCHAR*)d->filePath.utf16(), mode) == 0;
- } , {
- ret = ::_chmod(d->filePath.toLocal8Bit(), mode) == 0;
- });
+ ret = ::_wchmod((wchar_t*)d->filePath.utf16(), mode) == 0;
#else
- ret = ::_wchmod((TCHAR*)d->longFileName(d->filePath).utf16(), mode);
+ ret = ::_wchmod((wchar_t*)d->longFileName(d->filePath).utf16(), mode);
#endif
return ret;
}
@@ -1960,34 +1756,33 @@ bool QFSFileEngine::setSize(qint64 size)
static inline QDateTime fileTimeToQDateTime(const FILETIME *time)
{
QDateTime ret;
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based || QSysInfo::WindowsVersion & QSysInfo::WV_CE_based) {
- // SystemTimeToTzSpecificLocalTime is not available on Win98/ME so we have to pull it off ourselves.
- SYSTEMTIME systime;
- FILETIME ftime;
- systime.wYear = 1970;
- systime.wMonth = 1;
- systime.wDay = 1;
- systime.wHour = 0;
- systime.wMinute = 0;
- systime.wSecond = 0;
- systime.wMilliseconds = 0;
- systime.wDayOfWeek = 4;
- SystemTimeToFileTime(&systime, &ftime);
- unsigned __int64 acttime = (unsigned __int64)time->dwHighDateTime << 32 | time->dwLowDateTime;
- FileTimeToSystemTime(time, &systime);
- unsigned __int64 time1970 = (unsigned __int64)ftime.dwHighDateTime << 32 | ftime.dwLowDateTime;
- unsigned __int64 difftime = acttime - time1970;
- difftime /= 10000000;
- ret.setTime_t((unsigned int)difftime);
- } else {
-#ifndef Q_OS_WINCE
- SYSTEMTIME sTime, lTime;
- FileTimeToSystemTime(time, &sTime);
- SystemTimeToTzSpecificLocalTime(0, &sTime, &lTime);
- ret.setDate(QDate(lTime.wYear, lTime.wMonth, lTime.wDay));
- ret.setTime(QTime(lTime.wHour, lTime.wMinute, lTime.wSecond, lTime.wMilliseconds));
+
+#if defined(Q_OS_WINCE)
+ SYSTEMTIME systime;
+ FILETIME ftime;
+ systime.wYear = 1970;
+ systime.wMonth = 1;
+ systime.wDay = 1;
+ systime.wHour = 0;
+ systime.wMinute = 0;
+ systime.wSecond = 0;
+ systime.wMilliseconds = 0;
+ systime.wDayOfWeek = 4;
+ SystemTimeToFileTime(&systime, &ftime);
+ unsigned __int64 acttime = (unsigned __int64)time->dwHighDateTime << 32 | time->dwLowDateTime;
+ FileTimeToSystemTime(time, &systime);
+ unsigned __int64 time1970 = (unsigned __int64)ftime.dwHighDateTime << 32 | ftime.dwLowDateTime;
+ unsigned __int64 difftime = acttime - time1970;
+ difftime /= 10000000;
+ ret.setTime_t((unsigned int)difftime);
+#else
+ SYSTEMTIME sTime, lTime;
+ FileTimeToSystemTime(time, &sTime);
+ SystemTimeToTzSpecificLocalTime(0, &sTime, &lTime);
+ ret.setDate(QDate(lTime.wYear, lTime.wMonth, lTime.wDay));
+ ret.setTime(QTime(lTime.wHour, lTime.wMinute, lTime.wSecond, lTime.wMilliseconds));
#endif
- }
+
return ret;
}
@@ -2011,13 +1806,32 @@ QDateTime QFSFileEngine::fileTime(FileTime time) const
}
#endif
} else {
- bool ok = false;
WIN32_FILE_ATTRIBUTE_DATA attribData;
- QT_WA({
- ok = ::GetFileAttributesExW((TCHAR*)QFSFileEnginePrivate::longFileName(d->filePath).utf16(), GetFileExInfoStandard, &attribData);
- } , {
- ok = ::GetFileAttributesExA(QFSFileEnginePrivate::win95Name(QFileInfo(d->filePath).absoluteFilePath()), GetFileExInfoStandard, &attribData);
- });
+ bool ok = ::GetFileAttributesEx((wchar_t*)QFSFileEnginePrivate::longFileName(d->filePath).utf16(), GetFileExInfoStandard, &attribData);
+ if (!ok) {
+ int errorCode = GetLastError();
+ if (errorCode != ERROR_INVALID_NAME
+ && errorCode != ERROR_FILE_NOT_FOUND && errorCode != ERROR_PATH_NOT_FOUND) {
+ QString path = QDir::toNativeSeparators(d->filePath);
+ // path for the FindFirstFile should not end with a trailing slash
+ while (path.endsWith(QLatin1Char('\\')))
+ path.chop(1);
+
+ // FindFirstFile can not handle drives
+ if (!path.endsWith(QLatin1Char(':'))) {
+ WIN32_FIND_DATA findData;
+ HANDLE hFind = ::FindFirstFile((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16(),
+ &findData);
+ if (hFind != INVALID_HANDLE_VALUE) {
+ ::FindClose(hFind);
+ ok = true;
+ attribData.ftCreationTime = findData.ftCreationTime;
+ attribData.ftLastWriteTime = findData.ftLastWriteTime;
+ attribData.ftLastAccessTime = findData.ftLastAccessTime;
+ }
+ }
+ }
+ }
if (ok) {
if(time == CreationTime)
ret = fileTimeToQDateTime(&attribData.ftCreationTime);
@@ -2037,11 +1851,11 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
Q_UNUSED(flags);
if (openMode == QFile::NotOpen) {
q->setError(QFile::PermissionsError, qt_error_string());
- return 0;
+ return 0;
}
if (offset == 0 && size == 0) {
q->setError(QFile::UnspecifiedError, qt_error_string());
- return 0;
+ return 0;
}
@@ -2054,7 +1868,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
#ifdef Q_USE_DEPRECATED_MAP_API
nativeClose();
if (fileMapHandle == INVALID_HANDLE_VALUE) {
- fileMapHandle = CreateFileForMappingW((TCHAR *)nativeFilePath.constData(),
+ fileMapHandle = CreateFileForMapping((const wchar_t*)nativeFilePath.constData(),
GENERIC_READ | (openMode & QIODevice::WriteOnly ? GENERIC_WRITE : 0),
0,
NULL,
@@ -2069,21 +1883,14 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
#endif
// first create the file mapping handle
- HANDLE mapHandle = 0;
DWORD protection = (openMode & QIODevice::WriteOnly) ? PAGE_READWRITE : PAGE_READONLY;
- QT_WA({
- mapHandle = ::CreateFileMappingW(handle, 0, protection,
- 0, 0, 0);
- },{
- mapHandle = ::CreateFileMappingA(handle, 0, protection,
- 0, 0, 0);
- });
+ HANDLE mapHandle = ::CreateFileMapping(handle, 0, protection, 0, 0, 0);
if (mapHandle == NULL) {
q->setError(QFile::PermissionsError, qt_error_string());
#ifdef Q_USE_DEPRECATED_MAP_API
mapHandleClose();
#endif
- return 0;
+ return 0;
}
// setup args to map
@@ -2112,7 +1919,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
switch(GetLastError()) {
case ERROR_ACCESS_DENIED:
q->setError(QFile::PermissionsError, qt_error_string());
- break;
+ break;
case ERROR_INVALID_PARAMETER:
// size are out of bounds
default:
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 49869a4..fafce07 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -84,6 +84,7 @@ QT_END_NAMESPACE
#include "qprocess.h"
#include "qprocess_p.h"
+#include "private/qcore_unix_p.h"
#ifdef Q_OS_MAC
#include <private/qcore_mac_p.h>
@@ -114,78 +115,11 @@ static inline char *strdup(const char *data)
}
#endif
-static qint64 qt_native_read(int fd, char *data, qint64 maxlen)
-{
- qint64 ret = 0;
- do {
- ret = ::read(fd, data, maxlen);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
-static qint64 qt_native_write(int fd, const char *data, qint64 len)
-{
- qint64 ret = 0;
- do {
- ret = ::write(fd, data, len);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
-static void qt_native_close(int fd)
-{
- int ret;
- do {
- ret = ::close(fd);
- } while (ret == -1 && errno == EINTR);
-}
-
-static void qt_native_dup2(int oldfd, int newfd)
-{
- int ret;
- do {
- ret = ::dup2(oldfd, newfd);
- } while (ret == -1 && errno == EINTR);
-}
-
-static void qt_native_chdir(const char *path)
-{
- int ret;
- do {
- ret = ::chdir(path);
- } while (ret == -1 && errno == EINTR);
-}
-
-static void qt_native_execve(const char *filename, char *const argv[],
- char *const envp[])
-{
- int ret;
- do {
- ret = ::execve(filename, argv, envp);
- } while (ret == -1 && errno == EINTR);
-}
-
-static void qt_native_execv(const char *path, char *const argv[])
-{
- int ret;
- do {
- ret = ::execv(path, argv);
- } while (ret == -1 && errno == EINTR);
-}
-
-static void qt_native_execvp(const char *file, char *const argv[])
-{
- int ret;
- do {
- ret = ::execvp(file, argv);
- } while (ret == -1 && errno == EINTR);
-}
-
static int qt_qprocess_deadChild_pipe[2];
static void (*qt_sa_old_sigchld_handler)(int) = 0;
static void qt_sa_sigchld_handler(int signum)
{
- qt_native_write(qt_qprocess_deadChild_pipe[1], "", 1);
+ qt_safe_write(qt_qprocess_deadChild_pipe[1], "", 1);
#if defined (QPROCESS_DEBUG)
fprintf(stderr, "*** SIGCHLD\n");
#endif
@@ -194,6 +128,13 @@ static void qt_sa_sigchld_handler(int signum)
qt_sa_old_sigchld_handler(signum);
}
+static inline void add_fd(int &nfds, int fd, fd_set *fdset)
+{
+ FD_SET(fd, fdset);
+ if ((fd) > nfds)
+ nfds = fd;
+}
+
struct QProcessInfo {
QProcess *process;
int deathPipe;
@@ -231,13 +172,7 @@ QProcessManager::QProcessManager()
// initialize the dead child pipe and make it non-blocking. in the
// extremely unlikely event that the pipe fills up, we do not under any
// circumstances want to block.
- ::pipe(qt_qprocess_deadChild_pipe);
- ::fcntl(qt_qprocess_deadChild_pipe[0], F_SETFD, FD_CLOEXEC);
- ::fcntl(qt_qprocess_deadChild_pipe[1], F_SETFD, FD_CLOEXEC);
- ::fcntl(qt_qprocess_deadChild_pipe[0], F_SETFL,
- ::fcntl(qt_qprocess_deadChild_pipe[0], F_GETFL) | O_NONBLOCK);
- ::fcntl(qt_qprocess_deadChild_pipe[1], F_SETFL,
- ::fcntl(qt_qprocess_deadChild_pipe[1], F_GETFL) | O_NONBLOCK);
+ qt_safe_pipe(qt_qprocess_deadChild_pipe, O_NONBLOCK);
// set up the SIGCHLD handler, which writes a single byte to the dead
// child pipe every time a child dies.
@@ -254,13 +189,13 @@ QProcessManager::QProcessManager()
QProcessManager::~QProcessManager()
{
// notify the thread that we're shutting down.
- qt_native_write(qt_qprocess_deadChild_pipe[1], "@", 1);
- qt_native_close(qt_qprocess_deadChild_pipe[1]);
+ qt_safe_write(qt_qprocess_deadChild_pipe[1], "@", 1);
+ qt_safe_close(qt_qprocess_deadChild_pipe[1]);
wait();
// on certain unixes, closing the reading end of the pipe will cause
// select in run() to block forever, rather than return with EBADF.
- qt_native_close(qt_qprocess_deadChild_pipe[0]);
+ qt_safe_close(qt_qprocess_deadChild_pipe[0]);
qt_qprocess_deadChild_pipe[0] = -1;
qt_qprocess_deadChild_pipe[1] = -1;
@@ -304,7 +239,7 @@ void QProcessManager::run()
// signals may have been delivered in the meantime, to avoid race
// conditions.
char c;
- if (qt_native_read(qt_qprocess_deadChild_pipe[0], &c, 1) < 0 || c == '@')
+ if (qt_safe_read(qt_qprocess_deadChild_pipe[0], &c, 1) < 0 || c == '@')
break;
// catch any and all children that we can.
@@ -323,7 +258,7 @@ void QProcessManager::catchDeadChildren()
// notify all children that they may have died. they need to run
// waitpid() in their own thread.
QProcessInfo *info = it.value();
- qt_native_write(info->deathPipe, "", 1);
+ qt_safe_write(info->deathPipe, "", 1);
#if defined (QPROCESS_DEBUG)
qDebug() << "QProcessManager::run() sending death notice to" << info->process;
@@ -382,25 +317,23 @@ void QProcessManager::unlock()
static void qt_create_pipe(int *pipe)
{
if (pipe[0] != -1)
- qt_native_close(pipe[0]);
+ qt_safe_close(pipe[0]);
if (pipe[1] != -1)
- qt_native_close(pipe[1]);
- if (::pipe(pipe) != 0) {
+ qt_safe_close(pipe[1]);
+ if (qt_safe_pipe(pipe) != 0) {
qWarning("QProcessPrivate::createPipe: Cannot create pipe %p: %s",
pipe, qPrintable(qt_error_string(errno)));
}
- ::fcntl(pipe[0], F_SETFD, FD_CLOEXEC);
- ::fcntl(pipe[1], F_SETFD, FD_CLOEXEC);
}
void QProcessPrivate::destroyPipe(int *pipe)
{
if (pipe[1] != -1) {
- qt_native_close(pipe[1]);
+ qt_safe_close(pipe[1]);
pipe[1] = -1;
}
if (pipe[0] != -1) {
- qt_native_close(pipe[0]);
+ qt_safe_close(pipe[0]);
pipe[0] = -1;
}
}
@@ -453,7 +386,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
if (&channel == &stdinChannel) {
// try to open in read-only mode
channel.pipe[1] = -1;
- if ( (channel.pipe[0] = QT_OPEN(fname, O_RDONLY)) != -1)
+ if ( (channel.pipe[0] = qt_safe_open(fname, O_RDONLY)) != -1)
return true; // success
q->setErrorString(QProcess::tr("Could not open input redirection for reading"));
@@ -465,7 +398,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
mode |= O_TRUNC;
channel.pipe[0] = -1;
- if ( (channel.pipe[1] = QT_OPEN(fname, mode, 0666)) != -1)
+ if ( (channel.pipe[1] = qt_safe_open(fname, mode, 0666)) != -1)
return true; // success
q->setErrorString(QProcess::tr("Could not open output redirection for writing"));
@@ -586,8 +519,6 @@ void QProcessPrivate::startProcess()
return;
qt_create_pipe(childStartedPipe);
qt_create_pipe(deathPipe);
- ::fcntl(deathPipe[0], F_SETFD, FD_CLOEXEC);
- ::fcntl(deathPipe[1], F_SETFD, FD_CLOEXEC);
if (threadData->eventDispatcher) {
startupSocketNotifier = new QSocketNotifier(childStartedPipe[0],
@@ -728,11 +659,11 @@ void QProcessPrivate::startProcess()
// parent
// close the ends we don't use and make all pipes non-blocking
::fcntl(deathPipe[0], F_SETFL, ::fcntl(deathPipe[0], F_GETFL) | O_NONBLOCK);
- qt_native_close(childStartedPipe[1]);
+ qt_safe_close(childStartedPipe[1]);
childStartedPipe[1] = -1;
if (stdinChannel.pipe[0] != -1) {
- qt_native_close(stdinChannel.pipe[0]);
+ qt_safe_close(stdinChannel.pipe[0]);
stdinChannel.pipe[0] = -1;
}
@@ -740,7 +671,7 @@ void QProcessPrivate::startProcess()
::fcntl(stdinChannel.pipe[1], F_SETFL, ::fcntl(stdinChannel.pipe[1], F_GETFL) | O_NONBLOCK);
if (stdoutChannel.pipe[1] != -1) {
- qt_native_close(stdoutChannel.pipe[1]);
+ qt_safe_close(stdoutChannel.pipe[1]);
stdoutChannel.pipe[1] = -1;
}
@@ -748,7 +679,7 @@ void QProcessPrivate::startProcess()
::fcntl(stdoutChannel.pipe[0], F_SETFL, ::fcntl(stdoutChannel.pipe[0], F_GETFL) | O_NONBLOCK);
if (stderrChannel.pipe[1] != -1) {
- qt_native_close(stderrChannel.pipe[1]);
+ qt_safe_close(stderrChannel.pipe[1]);
stderrChannel.pipe[1] = -1;
}
if (stderrChannel.pipe[0] != -1)
@@ -761,35 +692,34 @@ void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv
Q_Q(QProcess);
- // copy the stdin socket
- qt_native_dup2(stdinChannel.pipe[0], fileno(stdin));
+ // copy the stdin socket (without closing on exec)
+ qt_safe_dup2(stdinChannel.pipe[0], fileno(stdin), 0);
// copy the stdout and stderr if asked to
if (processChannelMode != QProcess::ForwardedChannels) {
- qt_native_dup2(stdoutChannel.pipe[1], fileno(stdout));
+ qt_safe_dup2(stdoutChannel.pipe[1], fileno(stdout), 0);
// merge stdout and stderr if asked to
if (processChannelMode == QProcess::MergedChannels) {
- qt_native_dup2(fileno(stdout), fileno(stderr));
+ qt_safe_dup2(fileno(stdout), fileno(stderr), 0);
} else {
- qt_native_dup2(stderrChannel.pipe[1], fileno(stderr));
+ qt_safe_dup2(stderrChannel.pipe[1], fileno(stderr), 0);
}
}
// make sure this fd is closed if execvp() succeeds
- qt_native_close(childStartedPipe[0]);
- ::fcntl(childStartedPipe[1], F_SETFD, FD_CLOEXEC);
+ qt_safe_close(childStartedPipe[0]);
// enter the working directory
if (workingDir)
- qt_native_chdir(workingDir);
+ QT_CHDIR(workingDir);
// this is a virtual call, and it base behavior is to do nothing.
q->setupChildProcess();
// execute the process
if (!envp) {
- qt_native_execvp(argv[0], argv);
+ qt_safe_execvp(argv[0], argv);
} else {
if (path) {
char **arg = path;
@@ -798,14 +728,14 @@ void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv
#if defined (QPROCESS_DEBUG)
fprintf(stderr, "QProcessPrivate::execChild() searching / starting %s\n", argv[0]);
#endif
- qt_native_execve(argv[0], argv, envp);
+ qt_safe_execve(argv[0], argv, envp);
++arg;
}
} else {
#if defined (QPROCESS_DEBUG)
fprintf(stderr, "QProcessPrivate::execChild() starting %s\n", argv[0]);
#endif
- qt_native_execve(argv[0], argv, envp);
+ qt_safe_execve(argv[0], argv, envp);
}
}
@@ -813,21 +743,21 @@ void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv
#if defined (QPROCESS_DEBUG)
fprintf(stderr, "QProcessPrivate::execChild() failed, notifying parent process\n");
#endif
- qt_native_write(childStartedPipe[1], "", 1);
- qt_native_close(childStartedPipe[1]);
+ qt_safe_write(childStartedPipe[1], "", 1);
+ qt_safe_close(childStartedPipe[1]);
childStartedPipe[1] = -1;
}
bool QProcessPrivate::processStarted()
{
char c;
- int i = qt_native_read(childStartedPipe[0], &c, 1);
+ int i = qt_safe_read(childStartedPipe[0], &c, 1);
if (startupSocketNotifier) {
startupSocketNotifier->setEnabled(false);
startupSocketNotifier->deleteLater();
startupSocketNotifier = 0;
}
- qt_native_close(childStartedPipe[0]);
+ qt_safe_close(childStartedPipe[0]);
childStartedPipe[0] = -1;
#if defined (QPROCESS_DEBUG)
@@ -862,7 +792,7 @@ qint64 QProcessPrivate::bytesAvailableFromStderr() const
qint64 QProcessPrivate::readFromStdout(char *data, qint64 maxlen)
{
- qint64 bytesRead = qt_native_read(stdoutChannel.pipe[0], data, maxlen);
+ qint64 bytesRead = qt_safe_read(stdoutChannel.pipe[0], data, maxlen);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::readFromStdout(%p \"%s\", %lld) == %lld",
data, qt_prettyDebug(data, bytesRead, 16).constData(), maxlen, bytesRead);
@@ -872,7 +802,7 @@ qint64 QProcessPrivate::readFromStdout(char *data, qint64 maxlen)
qint64 QProcessPrivate::readFromStderr(char *data, qint64 maxlen)
{
- qint64 bytesRead = qt_native_read(stderrChannel.pipe[0], data, maxlen);
+ qint64 bytesRead = qt_safe_read(stderrChannel.pipe[0], data, maxlen);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::readFromStderr(%p \"%s\", %lld) == %lld",
data, qt_prettyDebug(data, bytesRead, 16).constData(), maxlen, bytesRead);
@@ -896,7 +826,7 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
{
qt_ignore_sigpipe();
- qint64 written = qt_native_write(stdinChannel.pipe[1], data, maxlen);
+ qint64 written = qt_safe_write(stdinChannel.pipe[1], data, maxlen);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::writeToStdin(%p \"%s\", %lld) == %lld",
data, qt_prettyDebug(data, maxlen, 16).constData(), maxlen, written);
@@ -922,17 +852,15 @@ void QProcessPrivate::killProcess()
::kill(pid_t(pid), SIGKILL);
}
-static int qt_native_select(fd_set *fdread, fd_set *fdwrite, int timeout)
+static int select_msecs(int nfds, fd_set *fdread, fd_set *fdwrite, int timeout)
{
+ if (timeout < 0)
+ return qt_safe_select(nfds, fdread, fdwrite, 0, 0);
+
struct timeval tv;
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
-
- int ret;
- do {
- ret = select(FD_SETSIZE, fdread, fdwrite, 0, timeout < 0 ? 0 : &tv);
- } while (ret < 0 && (errno == EINTR));
- return ret;
+ return qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
}
/*
@@ -960,11 +888,7 @@ bool QProcessPrivate::waitForStarted(int msecs)
fd_set fds;
FD_ZERO(&fds);
FD_SET(childStartedPipe[0], &fds);
- int ret;
- do {
- ret = qt_native_select(&fds, 0, msecs);
- } while (ret < 0 && errno == EINTR);
- if (ret == 0) {
+ if (select_msecs(childStartedPipe[0] + 1, &fds, 0, msecs) == 0) {
processError = QProcess::Timedout;
q->setErrorString(QProcess::tr("Process operation timed out"));
#if defined (QPROCESS_DEBUG)
@@ -997,24 +921,23 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
+ int nfds = deathPipe[0];
+ FD_SET(deathPipe[0], &fdread);
+
if (processState == QProcess::Starting)
- FD_SET(childStartedPipe[0], &fdread);
+ add_fd(nfds, childStartedPipe[0], &fdread);
if (stdoutChannel.pipe[0] != -1)
- FD_SET(stdoutChannel.pipe[0], &fdread);
+ add_fd(nfds, stdoutChannel.pipe[0], &fdread);
if (stderrChannel.pipe[0] != -1)
- FD_SET(stderrChannel.pipe[0], &fdread);
-
- FD_SET(deathPipe[0], &fdread);
+ add_fd(nfds, stderrChannel.pipe[0], &fdread);
if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
- FD_SET(stdinChannel.pipe[1], &fdwrite);
+ add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
- int ret = qt_native_select(&fdread, &fdwrite, timeout);
+ int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
if (ret < 0) {
- if (errno == EINTR)
- continue;
break;
}
if (ret == 0) {
@@ -1070,24 +993,24 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
+ int nfds = deathPipe[0];
+ FD_SET(deathPipe[0], &fdread);
+
if (processState == QProcess::Starting)
- FD_SET(childStartedPipe[0], &fdread);
+ add_fd(nfds, childStartedPipe[0], &fdread);
if (stdoutChannel.pipe[0] != -1)
- FD_SET(stdoutChannel.pipe[0], &fdread);
+ add_fd(nfds, stdoutChannel.pipe[0], &fdread);
if (stderrChannel.pipe[0] != -1)
- FD_SET(stderrChannel.pipe[0], &fdread);
+ add_fd(nfds, stderrChannel.pipe[0], &fdread);
- FD_SET(deathPipe[0], &fdread);
if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
- FD_SET(stdinChannel.pipe[1], &fdwrite);
+ add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
- int ret = qt_native_select(&fdread, &fdwrite, timeout);
+ int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
if (ret < 0) {
- if (errno == EINTR)
- continue;
break;
}
@@ -1133,29 +1056,28 @@ bool QProcessPrivate::waitForFinished(int msecs)
forever {
fd_set fdread;
fd_set fdwrite;
+ int nfds = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
if (processState == QProcess::Starting)
- FD_SET(childStartedPipe[0], &fdread);
+ add_fd(nfds, childStartedPipe[0], &fdread);
if (stdoutChannel.pipe[0] != -1)
- FD_SET(stdoutChannel.pipe[0], &fdread);
+ add_fd(nfds, stdoutChannel.pipe[0], &fdread);
if (stderrChannel.pipe[0] != -1)
- FD_SET(stderrChannel.pipe[0], &fdread);
+ add_fd(nfds, stderrChannel.pipe[0], &fdread);
if (processState == QProcess::Running)
- FD_SET(deathPipe[0], &fdread);
+ add_fd(nfds, deathPipe[0], &fdread);
if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
- FD_SET(stdinChannel.pipe[1], &fdwrite);
+ add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
- int ret = qt_native_select(&fdread, &fdwrite, timeout);
+ int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
if (ret < 0) {
- if (errno == EINTR)
- continue;
break;
}
if (ret == 0) {
@@ -1190,12 +1112,7 @@ bool QProcessPrivate::waitForWrite(int msecs)
fd_set fdwrite;
FD_ZERO(&fdwrite);
FD_SET(stdinChannel.pipe[1], &fdwrite);
-
- int ret;
- do {
- ret = qt_native_select(0, &fdwrite, msecs < 0 ? 0 : msecs) == 1;
- } while (ret < 0 && errno == EINTR);
- return ret == 1;
+ return select_msecs(stdinChannel.pipe[1] + 1, 0, &fdwrite, msecs < 0 ? 0 : msecs) == 1;
}
void QProcessPrivate::findExitCode()
@@ -1210,15 +1127,11 @@ bool QProcessPrivate::waitForDeadChild()
// read a byte from the death pipe
char c;
- qt_native_read(deathPipe[0], &c, 1);
+ qt_safe_read(deathPipe[0], &c, 1);
// check if our process is dead
int exitStatus;
- pid_t waitResult = 0;
- do {
- waitResult = waitpid(pid_t(pid), &exitStatus, WNOHANG);
- } while ((waitResult == -1 && errno == EINTR));
- if (waitResult > 0) {
+ if (qt_safe_waitpid(pid_t(pid), &exitStatus, WNOHANG) > 0) {
processManager()->remove(q);
crashed = !WIFEXITED(exitStatus);
exitCode = WEXITSTATUS(exitStatus);
@@ -1262,16 +1175,15 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
::setsid();
- qt_native_close(startedPipe[0]);
- qt_native_close(pidPipe[0]);
+ qt_safe_close(startedPipe[0]);
+ qt_safe_close(pidPipe[0]);
pid_t doubleForkPid = qt_fork();
if (doubleForkPid == 0) {
- ::fcntl(startedPipe[1], F_SETFD, FD_CLOEXEC);
- qt_native_close(pidPipe[1]);
+ qt_safe_close(pidPipe[1]);
if (!encodedWorkingDirectory.isEmpty())
- qt_native_chdir(encodedWorkingDirectory.constData());
+ QT_CHDIR(encodedWorkingDirectory.constData());
char **argv = new char *[arguments.size() + 2];
for (int i = 0; i < arguments.size(); ++i) {
@@ -1292,13 +1204,13 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
if (!tmp.endsWith('/')) tmp += '/';
tmp += QFile::encodeName(program);
argv[0] = tmp.data();
- qt_native_execv(argv[0], argv);
+ qt_safe_execv(argv[0], argv);
}
}
} else {
QByteArray tmp = QFile::encodeName(program);
argv[0] = tmp.data();
- qt_native_execv(argv[0], argv);
+ qt_safe_execv(argv[0], argv);
}
struct sigaction noaction;
@@ -1308,8 +1220,8 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
// '\1' means execv failed
char c = '\1';
- qt_native_write(startedPipe[1], &c, 1);
- qt_native_close(startedPipe[1]);
+ qt_safe_write(startedPipe[1], &c, 1);
+ qt_safe_close(startedPipe[1]);
::_exit(1);
} else if (doubleForkPid == -1) {
struct sigaction noaction;
@@ -1319,40 +1231,39 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
// '\2' means internal error
char c = '\2';
- qt_native_write(startedPipe[1], &c, 1);
+ qt_safe_write(startedPipe[1], &c, 1);
}
- qt_native_close(startedPipe[1]);
- qt_native_write(pidPipe[1], (const char *)&doubleForkPid, sizeof(pid_t));
- qt_native_chdir("/");
+ qt_safe_close(startedPipe[1]);
+ qt_safe_write(pidPipe[1], (const char *)&doubleForkPid, sizeof(pid_t));
+ QT_CHDIR("/");
::_exit(1);
}
- qt_native_close(startedPipe[1]);
- qt_native_close(pidPipe[1]);
+ qt_safe_close(startedPipe[1]);
+ qt_safe_close(pidPipe[1]);
if (childPid == -1) {
- qt_native_close(startedPipe[0]);
- qt_native_close(pidPipe[0]);
+ qt_safe_close(startedPipe[0]);
+ qt_safe_close(pidPipe[0]);
return false;
}
char reply = '\0';
- int startResult = qt_native_read(startedPipe[0], &reply, 1);
+ int startResult = qt_safe_read(startedPipe[0], &reply, 1);
int result;
- qt_native_close(startedPipe[0]);
- while (::waitpid(childPid, &result, 0) == -1 && errno == EINTR)
- { }
+ qt_safe_close(startedPipe[0]);
+ qt_safe_waitpid(childPid, &result, 0);
bool success = (startResult != -1 && reply == '\0');
if (success && pid) {
pid_t actualPid = 0;
- if (qt_native_read(pidPipe[0], (char *)&actualPid, sizeof(pid_t)) == sizeof(pid_t)) {
+ if (qt_safe_read(pidPipe[0], (char *)&actualPid, sizeof(pid_t)) == sizeof(pid_t)) {
*pid = actualPid;
} else {
*pid = 0;
}
}
- qt_native_close(pidPipe[0]);
+ qt_safe_close(pidPipe[0]);
return success;
}
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index d028df1..eae17b4 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -54,7 +54,7 @@
#include <private/qthread_p.h>
#include <qdebug.h>
-#include "private/qfsfileengine_p.h" // for longFileName and win95FileName
+#include "private/qfsfileengine_p.h" // for longFileName
#ifndef QT_NO_PROCESS
@@ -122,25 +122,15 @@ bool QProcessPrivate::createChannel(Channel &channel)
if (&channel == &stdinChannel) {
// try to open in read-only mode
channel.pipe[1] = INVALID_Q_PIPE;
- QT_WA({
- channel.pipe[0] =
- CreateFileW((TCHAR*)QFSFileEnginePrivate::longFileName(channel.file).utf16(),
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &secAtt,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- }, {
- channel.pipe[0] =
- CreateFileA(QFSFileEnginePrivate::win95Name(channel.file),
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &secAtt,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- });
+ channel.pipe[0] =
+ CreateFile((const wchar_t*)QFSFileEnginePrivate::longFileName(channel.file).utf16(),
+ GENERIC_READ,
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ &secAtt,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
+
if (channel.pipe[0] != INVALID_Q_PIPE)
return true;
@@ -148,31 +138,15 @@ bool QProcessPrivate::createChannel(Channel &channel)
} else {
// open in write mode
channel.pipe[0] = INVALID_Q_PIPE;
- DWORD creation;
- if (channel.append)
- creation = OPEN_ALWAYS;
- else
- creation = CREATE_ALWAYS;
-
- QT_WA({
- channel.pipe[1] =
- CreateFileW((TCHAR*)QFSFileEnginePrivate::longFileName(channel.file).utf16(),
- GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &secAtt,
- creation,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- }, {
- channel.pipe[1] =
- CreateFileA(QFSFileEnginePrivate::win95Name(channel.file),
- GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &secAtt,
- creation,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- });
+ channel.pipe[1] =
+ CreateFile((const wchar_t *)QFSFileEnginePrivate::longFileName(channel.file).utf16(),
+ GENERIC_WRITE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ &secAtt,
+ channel.append ? OPEN_ALWAYS : CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
+
if (channel.pipe[1] != INVALID_Q_PIPE) {
if (channel.append) {
SetFilePointer(channel.pipe[1], 0, NULL, FILE_END);
@@ -327,56 +301,37 @@ static QByteArray qt_create_environment(const QHash<QString, QString> *environme
int pos = 0;
QHash<QString, QString>::ConstIterator it = copy.constBegin(),
end = copy.constEnd();
-#ifdef UNICODE
- if (!(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)) {
- static const TCHAR equal = L'=';
- static const TCHAR nul = L'\0';
-
- for ( ; it != end; ++it) {
- uint tmpSize = sizeof(TCHAR) * (it.key().length() + it.value().length() + 2);
- // ignore empty strings
- if (tmpSize == sizeof(TCHAR)*2)
- continue;
- envlist.resize(envlist.size() + tmpSize);
-
- tmpSize = it.key().length() * sizeof(TCHAR);
- memcpy(envlist.data()+pos, it.key().utf16(), tmpSize);
- pos += tmpSize;
-
- memcpy(envlist.data()+pos, &equal, sizeof(TCHAR));
- pos += sizeof(TCHAR);
-
- tmpSize = it.value().length() * sizeof(TCHAR);
- memcpy(envlist.data()+pos, it.value().utf16(), tmpSize);
- pos += tmpSize;
-
- memcpy(envlist.data()+pos, &nul, sizeof(TCHAR));
- pos += sizeof(TCHAR);
- }
- // add the 2 terminating 0 (actually 4, just to be on the safe side)
- envlist.resize( envlist.size()+4 );
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- } else
-#endif // UNICODE
- {
- for ( ; it != end; it++) {
- QByteArray tmp = it.key().toLocal8Bit();
- tmp.append('=');
- tmp.append(it.value().toLocal8Bit());
-
- uint tmpSize = tmp.length() + 1;
- envlist.resize(envlist.size() + tmpSize);
- memcpy(envlist.data()+pos, tmp.data(), tmpSize);
- pos += tmpSize;
- }
- // add the terminating 0 (actually 2, just to be on the safe side)
- envlist.resize(envlist.size()+2);
- envlist[pos++] = 0;
- envlist[pos++] = 0;
+
+ static const wchar_t equal = L'=';
+ static const wchar_t nul = L'\0';
+
+ for ( ; it != end; ++it) {
+ uint tmpSize = sizeof(wchar_t) * (it.key().length() + it.value().length() + 2);
+ // ignore empty strings
+ if (tmpSize == sizeof(wchar_t) * 2)
+ continue;
+ envlist.resize(envlist.size() + tmpSize);
+
+ tmpSize = it.key().length() * sizeof(wchar_t);
+ memcpy(envlist.data()+pos, it.key().utf16(), tmpSize);
+ pos += tmpSize;
+
+ memcpy(envlist.data()+pos, &equal, sizeof(wchar_t));
+ pos += sizeof(wchar_t);
+
+ tmpSize = it.value().length() * sizeof(wchar_t);
+ memcpy(envlist.data()+pos, it.value().utf16(), tmpSize);
+ pos += tmpSize;
+
+ memcpy(envlist.data()+pos, &nul, sizeof(wchar_t));
+ pos += sizeof(wchar_t);
}
+ // add the 2 terminating 0 (actually 4, just to be on the safe side)
+ envlist.resize( envlist.size()+4 );
+ envlist[pos++] = 0;
+ envlist[pos++] = 0;
+ envlist[pos++] = 0;
+ envlist[pos++] = 0;
}
return envlist;
}
@@ -417,58 +372,33 @@ void QProcessPrivate::startProcess()
qDebug(" pass environment : %s", environment.isEmpty() ? "no" : "yes");
#endif
- DWORD dwCreationFlags = 0;
- if (!(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based))
- dwCreationFlags |= CREATE_NO_WINDOW;
+ DWORD dwCreationFlags = CREATE_NO_WINDOW;
-#ifdef UNICODE
- if (!(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)) {
#if defined(Q_OS_WINCE)
QString fullPathProgram = program;
if (!QDir::isAbsolutePath(fullPathProgram))
fullPathProgram = QFileInfo(fullPathProgram).absoluteFilePath();
fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\'));
- success = CreateProcessW((WCHAR*)fullPathProgram.utf16(),
- (WCHAR*)args.utf16(),
- 0, 0, false, 0, 0, 0, 0, pid);
+ success = CreateProcess((wchar_t*)fullPathProgram.utf16(),
+ (wchar_t*)args.utf16(),
+ 0, 0, false, 0, 0, 0, 0, pid);
#else
dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- 0, 0, 0,
- STARTF_USESTDHANDLES,
- 0, 0, 0,
- stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1]
+ (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
+ 0, 0, 0,
+ STARTF_USESTDHANDLES,
+ 0, 0, 0,
+ stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1]
};
- success = CreateProcessW(0, (WCHAR*)args.utf16(),
- 0, 0, TRUE, dwCreationFlags,
- environment ? envlist.data() : 0,
- workingDirectory.isEmpty() ? 0
- : (WCHAR*)QDir::toNativeSeparators(workingDirectory).utf16(),
- &startupInfo, pid);
-#endif
- } else
-#endif // UNICODE
- {
-#ifndef Q_OS_WINCE
- STARTUPINFOA startupInfo = { sizeof( STARTUPINFOA ), 0, 0, 0,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- 0, 0, 0,
- STARTF_USESTDHANDLES,
- 0, 0, 0,
- stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1]
- };
-
- success = CreateProcessA(0, args.toLocal8Bit().data(),
- 0, 0, TRUE, dwCreationFlags, environment ? envlist.data() : 0,
- workingDirectory.isEmpty() ? 0
- : QDir::toNativeSeparators(workingDirectory).toLocal8Bit().data(),
- &startupInfo, pid);
-#endif // Q_OS_WINCE
- }
-#ifndef Q_OS_WINCE
+ success = CreateProcess(0, (wchar_t*)args.utf16(),
+ 0, 0, TRUE, dwCreationFlags,
+ environment ? envlist.data() : 0,
+ workingDirectory.isEmpty() ? 0
+ : (wchar_t*)QDir::toNativeSeparators(workingDirectory).utf16(),
+ &startupInfo, pid);
+
if (stdinChannel.pipe[0] != INVALID_Q_PIPE) {
CloseHandle(stdinChannel.pipe[0]);
stdinChannel.pipe[0] = INVALID_Q_PIPE;
@@ -508,7 +438,7 @@ void QProcessPrivate::startProcess()
}
// give the process a chance to start ...
- Sleep(SLEEPMIN*2);
+ Sleep(SLEEPMIN * 2);
_q_startupNotification();
}
@@ -882,42 +812,25 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
PROCESS_INFORMATION pinfo;
-#ifdef UNICODE
- if (!(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)) {
#if defined(Q_OS_WINCE)
QString fullPathProgram = program;
if (!QDir::isAbsolutePath(fullPathProgram))
fullPathProgram.prepend(QDir::currentPath().append(QLatin1Char('/')));
fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\'));
- success = CreateProcessW((WCHAR*)fullPathProgram.utf16(),
- (WCHAR*)args.utf16(),
- 0, 0, false, CREATE_NEW_CONSOLE, 0, 0, 0, &pinfo);
+ success = CreateProcess((wchar_t*)fullPathProgram.utf16(),
+ (wchar_t*)args.utf16(),
+ 0, 0, false, CREATE_NEW_CONSOLE, 0, 0, 0, &pinfo);
#else
STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
- success = CreateProcessW(0, (WCHAR*)args.utf16(),
- 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
- workingDir.isEmpty() ? (const WCHAR *)0 : (const WCHAR *)workingDir.utf16(),
- &startupInfo, &pinfo);
-#endif
- } else
-#endif // UNICODE
- {
-#ifndef Q_OS_WINCE
- STARTUPINFOA startupInfo = { sizeof( STARTUPINFOA ), 0, 0, 0,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
- success = CreateProcessA(0, args.toLocal8Bit().data(),
- 0, 0, FALSE, CREATE_NEW_CONSOLE, 0,
- workingDir.isEmpty() ? (LPCSTR)0 : workingDir.toLocal8Bit().constData(),
+ success = CreateProcess(0, (wchar_t*)args.utf16(),
+ 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
+ workingDir.isEmpty() ? 0 : (wchar_t*)workingDir.utf16(),
&startupInfo, &pinfo);
#endif // Q_OS_WINCE
- }
if (success) {
CloseHandle(pinfo.hThread);
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index fe8764d..a70b92f 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -56,6 +56,10 @@
#include <qplatformdefs.h>
#include "private/qabstractfileengine_p.h"
+#ifdef Q_OS_UNIX
+# include "private/qcore_unix_p.h"
+#endif
+
//#define DEBUG_RESOURCE_MATCH
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 3f8dc36f..7de5030 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1037,33 +1037,16 @@ static QString windowsConfigPath(int type)
// This only happens when bootstrapping qmake.
#ifndef Q_OS_WINCE
QLibrary library(QLatin1String("shell32"));
- QT_WA( {
- typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, LPTSTR, int, BOOL);
- GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve("SHGetSpecialFolderPathW");
- if (SHGetSpecialFolderPath) {
- TCHAR path[MAX_PATH];
- SHGetSpecialFolderPath(0, path, type, FALSE);
- result = QString::fromUtf16((ushort*)path);
- }
- } , {
- typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, char*, int, BOOL);
- GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve("SHGetSpecialFolderPathA");
- if (SHGetSpecialFolderPath) {
- char path[MAX_PATH];
- SHGetSpecialFolderPath(0, path, type, FALSE);
- result = QString::fromLocal8Bit(path);
- }
- } );
#else
QLibrary library(QLatin1String("coredll"));
- typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, LPTSTR, int, BOOL);
- GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve("SHGetSpecialFolderPath");
+#endif // Q_OS_WINCE
+ typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, LPWSTR, int, BOOL);
+ GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve("SHGetSpecialFolderPathW");
if (SHGetSpecialFolderPath) {
wchar_t path[MAX_PATH];
SHGetSpecialFolderPath(0, path, type, FALSE);
- result = QString::fromUtf16((ushort*)path);
+ result = QString::fromWCharArray(path);
}
-#endif // Q_OS_WINCE
#endif // QT_NO_QOBJECT
@@ -1459,11 +1442,7 @@ void QConfFileSettingsPrivate::syncConfFile(int confFileNo)
QString writeSemName = QLatin1String("QSettingsWriteSem ");
writeSemName.append(file.fileName());
- QT_WA( {
- writeSemaphore = CreateSemaphoreW(0, 1, 1, reinterpret_cast<const wchar_t *>(writeSemName.utf16()));
- } , {
- writeSemaphore = CreateSemaphoreA(0, 1, 1, writeSemName.toLocal8Bit());
- } );
+ writeSemaphore = CreateSemaphore(0, 1, 1, reinterpret_cast<const wchar_t *>(writeSemName.utf16()));
if (writeSemaphore) {
WaitForSingleObject(writeSemaphore, INFINITE);
@@ -1479,11 +1458,7 @@ void QConfFileSettingsPrivate::syncConfFile(int confFileNo)
QString readSemName(QLatin1String("QSettingsReadSem "));
readSemName.append(file.fileName());
- QT_WA( {
- readSemaphore = CreateSemaphoreW(0, FileLockSemMax, FileLockSemMax, reinterpret_cast<const wchar_t *>(readSemName.utf16()));
- } , {
- readSemaphore = CreateSemaphoreA(0, FileLockSemMax, FileLockSemMax, readSemName.toLocal8Bit());
- } );
+ readSemaphore = CreateSemaphore(0, FileLockSemMax, FileLockSemMax, reinterpret_cast<const wchar_t *>(readSemName.utf16()));
if (readSemaphore) {
for (int i = 0; i < numReadLocks; ++i)
diff --git a/src/corelib/io/qsettings_win.cpp b/src/corelib/io/qsettings_win.cpp
index 0cbcc10..1e1509d 100644
--- a/src/corelib/io/qsettings_win.cpp
+++ b/src/corelib/io/qsettings_win.cpp
@@ -130,24 +130,13 @@ static void mergeKeySets(NameSet *dest, const QStringList &src)
static QString errorCodeToString(DWORD errorCode)
{
- QString result;
- QT_WA({
- wchar_t *data = 0;
- FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- 0, errorCode, 0,
- data, 0, 0);
- result = QString::fromUtf16(reinterpret_cast<const ushort *> (data));
- if (data != 0)
- LocalFree(data);
- }, {
- char *data = 0;
- FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- 0, errorCode, 0,
- (char *)&data, 0, 0);
- result = QString::fromLocal8Bit(data);
- if (data != 0)
- LocalFree(data);
- })
+ wchar_t *data = 0;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0, errorCode, 0, data, 0, 0);
+ QString result = QString::fromWCharArray(data);
+
+ if (data != 0)
+ LocalFree(data);
+
if (result.endsWith(QLatin1Char('\n')))
result.truncate(result.length() - 1);
@@ -158,15 +147,8 @@ static QString errorCodeToString(DWORD errorCode)
static HKEY openKey(HKEY parentHandle, REGSAM perms, const QString &rSubKey)
{
HKEY resultHandle = 0;
-
- LONG res;
- QT_WA( {
- res = RegOpenKeyExW(parentHandle, reinterpret_cast<const wchar_t *>(rSubKey.utf16()),
- 0, perms, &resultHandle);
- } , {
- res = RegOpenKeyExA(parentHandle, rSubKey.toLocal8Bit(),
+ LONG res = RegOpenKeyEx(parentHandle, reinterpret_cast<const wchar_t *>(rSubKey.utf16()),
0, perms, &resultHandle);
- } );
if (res == ERROR_SUCCESS)
return resultHandle;
@@ -183,14 +165,8 @@ static HKEY createOrOpenKey(HKEY parentHandle, REGSAM perms, const QString &rSub
return resultHandle;
// try to create it
- LONG res;
- QT_WA( {
- res = RegCreateKeyExW(parentHandle, reinterpret_cast<const wchar_t *>(rSubKey.utf16()), 0, 0,
- REG_OPTION_NON_VOLATILE, perms, 0, &resultHandle, 0);
- } , {
- res = RegCreateKeyExA(parentHandle, rSubKey.toLocal8Bit(), 0, 0,
+ LONG res = RegCreateKeyEx(parentHandle, reinterpret_cast<const wchar_t *>(rSubKey.utf16()), 0, 0,
REG_OPTION_NON_VOLATILE, perms, 0, &resultHandle, 0);
- } );
if (res == ERROR_SUCCESS)
return resultHandle;
@@ -225,20 +201,14 @@ static HKEY createOrOpenKey(HKEY parentHandle, const QString &rSubKey, bool *rea
static QStringList childKeysOrGroups(HKEY parentHandle, QSettingsPrivate::ChildSpec spec)
{
QStringList result;
- LONG res;
DWORD numKeys;
DWORD maxKeySize;
DWORD numSubgroups;
DWORD maxSubgroupSize;
// Find the number of keys and subgroups, as well as the max of their lengths.
- QT_WA( {
- res = RegQueryInfoKeyW(parentHandle, 0, 0, 0, &numSubgroups, &maxSubgroupSize, 0,
+ LONG res = RegQueryInfoKey(parentHandle, 0, 0, 0, &numSubgroups, &maxSubgroupSize, 0,
&numKeys, &maxKeySize, 0, 0, 0);
- }, {
- res = RegQueryInfoKeyA(parentHandle, 0, 0, 0, &numSubgroups, &maxSubgroupSize, 0,
- &numKeys, &maxKeySize, 0, 0, 0);
- } );
if (res != ERROR_SUCCESS) {
qWarning("QSettings: RegQueryInfoKey() failed: %s", errorCodeToString(res).toLatin1().data());
@@ -258,36 +228,21 @@ static QStringList childKeysOrGroups(HKEY parentHandle, QSettingsPrivate::ChildS
m = maxSubgroupSize;
}
- /* Windows NT/2000/XP: The size does not include the terminating null character.
- Windows Me/98/95: The size includes the terminating null character. */
+ /* The size does not include the terminating null character. */
++m;
// Get the list
- QByteArray buff(m*sizeof(ushort), 0);
+ QByteArray buff(m * sizeof(wchar_t), 0);
for (int i = 0; i < n; ++i) {
QString item;
- QT_WA( {
- DWORD l = buff.size() / sizeof(ushort);
- if (spec == QSettingsPrivate::ChildKeys) {
- res = RegEnumValueW(parentHandle, i,
- reinterpret_cast<wchar_t *>(buff.data()),
- &l, 0, 0, 0, 0);
- } else {
- res = RegEnumKeyExW(parentHandle, i,
- reinterpret_cast<wchar_t *>(buff.data()),
- &l, 0, 0, 0, 0);
- }
- if (res == ERROR_SUCCESS)
- item = QString::fromUtf16(reinterpret_cast<ushort*>(buff.data()), l);
- }, {
- DWORD l = buff.size();
- if (spec == QSettingsPrivate::ChildKeys)
- res = RegEnumValueA(parentHandle, i, buff.data(), &l, 0, 0, 0, 0);
- else
- res = RegEnumKeyExA(parentHandle, i, buff.data(), &l, 0, 0, 0, 0);
- if (res == ERROR_SUCCESS)
- item = QString::fromLocal8Bit(buff.data(), l);
- } );
+ DWORD l = buff.size() / sizeof(wchar_t);
+ if (spec == QSettingsPrivate::ChildKeys) {
+ res = RegEnumValue(parentHandle, i, reinterpret_cast<wchar_t *>(buff.data()), &l, 0, 0, 0, 0);
+ } else {
+ res = RegEnumKeyEx(parentHandle, i, reinterpret_cast<wchar_t *>(buff.data()), &l, 0, 0, 0, 0);
+ }
+ if (res == ERROR_SUCCESS)
+ item = QString::fromWCharArray((const wchar_t *)buff.constData(), l);
if (res != ERROR_SUCCESS) {
qWarning("QSettings: RegEnumValue failed: %s", errorCodeToString(res).toLatin1().data());
@@ -342,12 +297,7 @@ static void deleteChildGroups(HKEY parentHandle)
RegCloseKey(childGroupHandle);
// delete group itself
- LONG res;
- QT_WA( {
- res = RegDeleteKeyW(parentHandle, reinterpret_cast<const wchar_t *>(group.utf16()));
- }, {
- res = RegDeleteKeyA(parentHandle, group.toLocal8Bit());
- } );
+ LONG res = RegDeleteKey(parentHandle, reinterpret_cast<const wchar_t *>(group.utf16()));
if (res != ERROR_SUCCESS) {
qWarning("QSettings: RegDeleteKey failed on subkey \"%s\": %s",
group.toLatin1().data(), errorCodeToString(res).toLatin1().data());
@@ -519,12 +469,7 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa
// get the size and type of the value
DWORD dataType;
DWORD dataSize;
- LONG res;
- QT_WA( {
- res = RegQueryValueExW(handle, reinterpret_cast<const wchar_t *>(rSubkeyName.utf16()), 0, &dataType, 0, &dataSize);
- }, {
- res = RegQueryValueExA(handle, rSubkeyName.toLocal8Bit(), 0, &dataType, 0, &dataSize);
- } );
+ LONG res = RegQueryValueEx(handle, reinterpret_cast<const wchar_t *>(rSubkeyName.utf16()), 0, &dataType, 0, &dataSize);
if (res != ERROR_SUCCESS) {
RegCloseKey(handle);
return false;
@@ -532,13 +477,8 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa
// get the value
QByteArray data(dataSize, 0);
- QT_WA( {
- res = RegQueryValueExW(handle, reinterpret_cast<const wchar_t *>(rSubkeyName.utf16()), 0, 0,
- reinterpret_cast<unsigned char*>(data.data()), &dataSize);
- }, {
- res = RegQueryValueExA(handle, rSubkeyName.toLocal8Bit(), 0, 0,
- reinterpret_cast<unsigned char*>(data.data()), &dataSize);
- } );
+ res = RegQueryValueEx(handle, reinterpret_cast<const wchar_t *>(rSubkeyName.utf16()), 0, 0,
+ reinterpret_cast<unsigned char*>(data.data()), &dataSize);
if (res != ERROR_SUCCESS) {
RegCloseKey(handle);
return false;
@@ -549,11 +489,7 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa
case REG_SZ: {
QString s;
if (dataSize) {
- QT_WA( {
- s = QString::fromUtf16(((const ushort*)data.constData()));
- }, {
- s = QString::fromLocal8Bit(data.constData());
- } );
+ s = QString::fromWCharArray(((const wchar_t *)data.constData()));
}
if (value != 0)
*value = stringToVariant(s);
@@ -565,12 +501,7 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa
if (dataSize) {
int i = 0;
for (;;) {
- QString s;
- QT_WA( {
- s = QString::fromUtf16((const ushort*)data.constData() + i);
- }, {
- s = QString::fromLocal8Bit(data.constData() + i);
- } );
+ QString s = QString::fromWCharArray((const wchar_t *)data.constData() + i);
i += s.length() + 1;
if (s.isEmpty())
@@ -587,11 +518,7 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa
case REG_BINARY: {
QString s;
if (dataSize) {
- QT_WA( {
- s = QString::fromUtf16((const ushort*)data.constData(), data.size()/2);
- }, {
- s = QString::fromLocal8Bit(data.constData(), data.size());
- } );
+ s = QString::fromWCharArray((const wchar_t *)data.constData(), data.size() / 2);
}
if (value != 0)
*value = stringToVariant(s);
@@ -635,13 +562,8 @@ QWinSettingsPrivate::~QWinSettingsPrivate()
#if defined(Q_OS_WINCE)
remove(regList.at(0).key());
#else
- DWORD res;
QString emptyKey;
- QT_WA( {
- res = RegDeleteKeyW(writeHandle(), reinterpret_cast<const wchar_t *>(emptyKey.utf16()));
- }, {
- res = RegDeleteKeyA(writeHandle(), emptyKey.toLocal8Bit());
- } );
+ DWORD res = RegDeleteKey(writeHandle(), reinterpret_cast<const wchar_t *>(emptyKey.utf16()));
if (res != ERROR_SUCCESS) {
qWarning("QSettings: Failed to delete key \"%s\": %s",
regList.at(0).key().toLatin1().data(), errorCodeToString(res).toLatin1().data());
@@ -666,11 +588,7 @@ void QWinSettingsPrivate::remove(const QString &uKey)
LONG res;
HKEY handle = openKey(writeHandle(), registryPermissions, keyPath(rKey));
if (handle != 0) {
- QT_WA( {
- res = RegDeleteValueW(handle, reinterpret_cast<const wchar_t *>(keyName(rKey).utf16()));
- }, {
- res = RegDeleteValueA(handle, keyName(rKey).toLocal8Bit());
- } );
+ res = RegDeleteValue(handle, reinterpret_cast<const wchar_t *>(keyName(rKey).utf16()));
RegCloseKey(handle);
}
@@ -685,12 +603,7 @@ void QWinSettingsPrivate::remove(const QString &uKey)
for (int i = 0; i < childKeys.size(); ++i) {
QString group = childKeys.at(i);
- LONG res;
- QT_WA( {
- res = RegDeleteValueW(handle, reinterpret_cast<const wchar_t *>(group.utf16()));
- }, {
- res = RegDeleteValueA(handle, group.toLocal8Bit());
- } );
+ LONG res = RegDeleteValue(handle, reinterpret_cast<const wchar_t *>(group.utf16()));
if (res != ERROR_SUCCESS) {
qWarning("QSettings: RegDeleteValue failed on subkey \"%s\": %s",
group.toLatin1().data(), errorCodeToString(res).toLatin1().data());
@@ -701,11 +614,7 @@ void QWinSettingsPrivate::remove(const QString &uKey)
// For WinCE always Close the handle first.
RegCloseKey(handle);
#endif
- QT_WA( {
- res = RegDeleteKeyW(writeHandle(), reinterpret_cast<const wchar_t *>(rKey.utf16()));
- }, {
- res = RegDeleteKeyA(writeHandle(), rKey.toLocal8Bit());
- } );
+ res = RegDeleteKey(writeHandle(), reinterpret_cast<const wchar_t *>(rKey.utf16()));
if (res != ERROR_SUCCESS) {
qWarning("QSettings: RegDeleteKey failed on key \"%s\": %s",
@@ -761,27 +670,15 @@ void QWinSettingsPrivate::set(const QString &uKey, const QVariant &value)
if (type == REG_BINARY) {
QString s = variantToString(value);
- QT_WA( {
- regValueBuff = QByteArray((const char*)s.utf16(), s.length()*2);
- }, {
- regValueBuff = QByteArray((const char*)s.toLocal8Bit(), s.length());
- } );
+ regValueBuff = QByteArray((const char*)s.utf16(), s.length() * 2);
} else {
QStringList::const_iterator it = l.constBegin();
for (; it != l.constEnd(); ++it) {
const QString &s = *it;
- QT_WA( {
- regValueBuff += QByteArray((const char*)s.utf16(), (s.length() + 1)*2);
- }, {
- regValueBuff += QByteArray((const char*)s.toLocal8Bit(), s.length() + 1);
- } );
+ regValueBuff += QByteArray((const char*)s.utf16(), (s.length() + 1) * 2);
}
- QT_WA( {
- regValueBuff.append((char)0);
- regValueBuff.append((char)0);
- }, {
- regValueBuff.append((char)0);
- } );
+ regValueBuff.append((char)0);
+ regValueBuff.append((char)0);
}
break;
}
@@ -794,21 +691,6 @@ void QWinSettingsPrivate::set(const QString &uKey, const QVariant &value)
}
case QVariant::ByteArray:
- // On Win95/98/Me QString::toLocal8Bit() fails to handle chars > 0x7F. So we don't go through variantToString() at all.
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- QByteArray ba = value.toByteArray();
- regValueBuff = "@ByteArray(";
- regValueBuff += ba;
- regValueBuff += ')';
- if (ba.contains('\0')) {
- type = REG_BINARY;
- } else {
- type = REG_SZ;
- regValueBuff += '\0';
- }
-
- break;
- }
// fallthrough intended
default: {
@@ -817,33 +699,18 @@ void QWinSettingsPrivate::set(const QString &uKey, const QVariant &value)
QString s = variantToString(value);
type = stringContainsNullChar(s) ? REG_BINARY : REG_SZ;
if (type == REG_BINARY) {
- QT_WA( {
- regValueBuff = QByteArray((const char*)s.utf16(), s.length()*2);
- }, {
- regValueBuff = QByteArray((const char*)s.toLocal8Bit(), s.length());
- } );
+ regValueBuff = QByteArray((const char*)s.utf16(), s.length() * 2);
} else {
- QT_WA( {
- regValueBuff = QByteArray((const char*)s.utf16(), (s.length() + 1)*2);
- }, {
- regValueBuff = QByteArray((const char*)s.toLocal8Bit(), s.length() + 1);
- } );
+ regValueBuff = QByteArray((const char*)s.utf16(), (s.length() + 1) * 2);
}
break;
}
}
// set the value
- LONG res;
- QT_WA( {
- res = RegSetValueExW(handle, reinterpret_cast<const wchar_t *>(keyName(rKey).utf16()), 0, type,
- reinterpret_cast<const unsigned char*>(regValueBuff.constData()),
- regValueBuff.size());
- }, {
- res = RegSetValueExA(handle, keyName(rKey).toLocal8Bit(), 0, type,
+ LONG res = RegSetValueEx(handle, reinterpret_cast<const wchar_t *>(keyName(rKey).utf16()), 0, type,
reinterpret_cast<const unsigned char*>(regValueBuff.constData()),
regValueBuff.size());
- } );
if (res == ERROR_SUCCESS) {
deleteWriteHandleOnExit = false;
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 1b2f777..b520bee 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -60,6 +60,10 @@
#include <time.h>
#include <ctype.h>
+#if defined(Q_OS_UNIX)
+# include "private/qcore_unix_p.h" // overrides QT_OPEN
+#endif
+
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
# include <process.h>
# if defined(_MSC_VER) && _MSC_VER >= 1400
@@ -72,7 +76,6 @@
# include "qfunctions_wince.h"
#endif
-
QT_BEGIN_NAMESPACE
/*
@@ -208,8 +211,9 @@ static int _gettemp(char *path, int *doopen, int domkdir, int slen)
if ((*doopen =
QT_OPEN(targetPath.toLocal8Bit(), O_CREAT|O_EXCL|O_RDWR
# else // CE
+ // this is Unix or older MSVC
if ((*doopen =
- open(path, QT_OPEN_CREAT|O_EXCL|QT_OPEN_RDWR
+ QT_OPEN(path, QT_OPEN_CREAT|O_EXCL|QT_OPEN_RDWR
# endif
# ifdef QT_LARGEFILE_SUPPORT
|QT_OPEN_LARGEFILE
@@ -219,18 +223,9 @@ static int _gettemp(char *path, int *doopen, int domkdir, int slen)
# elif defined(Q_OS_WIN)
|O_BINARY
# endif
-# ifdef O_CLOEXEC
- // supported on Linux >= 2.6.23; avoids one extra system call
- // and avoids a race condition: if another thread forks, we could
- // end up leaking a file descriptor...
- |O_CLOEXEC
-# endif
, 0600)) >= 0)
#endif // WIN && !CE
{
-#if defined(Q_OS_UNIX) && !defined(O_CLOEXEC)
- fcntl(*doopen, F_SETFD, FD_CLOEXEC);
-#endif
return 1;
}
if (errno != EEXIST)
@@ -341,6 +336,8 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
Q_D(QFSFileEngine);
Q_ASSERT(!isReallyOpen());
+ openMode |= QIODevice::ReadWrite;
+
if (!filePathIsTemplate)
return QFSFileEngine::open(openMode);
@@ -758,7 +755,6 @@ bool QTemporaryFile::open(OpenMode flags)
}
}
- flags |= QIODevice::ReadWrite;
if (QFile::open(flags)) {
d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName);
return true;
diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri
index ecef555..8759578 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -88,10 +88,12 @@ mac {
unix {
SOURCES += \
+ kernel/qcore_unix.cpp \
kernel/qcrashhandler.cpp \
kernel/qsharedmemory_unix.cpp \
kernel/qsystemsemaphore_unix.cpp
HEADERS += \
+ kernel/qcore_unix_p.h \
kernel/qcrashhandler_p.h
contains(QT_CONFIG, glib) {
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index a98d005..e2682f5 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -398,20 +398,23 @@ void QAbstractEventDispatcher::closingDown()
*/
/*!
- Sets the event filter \a filter. Returns a pointer to the filter
- function previously defined.
-
- The event filter is a function that receives all messages taken
- from the system event loop before the event is dispatched to the
- respective target. This includes messages that are not sent to Qt
+ Replaces the event filter function for this
+ QAbstractEventDispatcher with \a filter and returns the replaced
+ event filter function. Only the current event filter function is
+ called. If you want to use both filter functions, save the
+ replaced EventFilter in a place where yours can call it.
+
+ The event filter function set here is called for all messages
+ taken from the system event loop before the event is dispatched to
+ the respective target, including the messages not meant for Qt
objects.
- The function can return true to stop the event to be processed by
- Qt, or false to continue with the standard event processing.
+ The event filter function should return true if the message should
+ be filtered, (i.e. stopped). It should return false to allow
+ processing the message to continue.
- Only one filter can be defined, but the filter can use the return
- value to call the previously set event filter. By default, no
- filter is set (i.e. the function returns 0).
+ By default, no event filter function is set (i.e., this function
+ returns a null EventFilter the first time it is called).
*/
QAbstractEventDispatcher::EventFilter QAbstractEventDispatcher::setEventFilter(EventFilter filter)
{
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 914f44f..1c3371f 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1407,7 +1407,7 @@ QMap<int, QVariant> QAbstractItemModel::itemData(const QModelIndex &index) const
QMap<int, QVariant> roles;
for (int i = 0; i < Qt::UserRole; ++i) {
QVariant variantData = data(index, i);
- if (variantData.type() != QVariant::Invalid)
+ if (variantData.isValid())
roles.insert(i, variantData);
}
return roles;
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
new file mode 100644
index 0000000..c5b0fc7
--- /dev/null
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -0,0 +1,194 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcore_unix_p.h"
+
+#include <sys/select.h>
+#include <sys/time.h>
+#include <stdlib.h>
+
+#include "qeventdispatcher_unix_p.h" // for the timeval operators
+
+#if !defined(QT_NO_CLOCK_MONOTONIC)
+# if defined(QT_BOOTSTRAPPED)
+# define QT_NO_CLOCK_MONOTONIC
+# endif
+#endif
+
+QT_BEGIN_NAMESPACE
+
+static inline timeval gettime()
+{
+ timeval tv;
+#ifndef QT_NO_CLOCK_MONOTONIC
+ // use the monotonic clock
+ static volatile bool monotonicClockDisabled = false;
+ struct timespec ts;
+ if (!monotonicClockDisabled) {
+ if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1) {
+ monotonicClockDisabled = true;
+ } else {
+ tv.tv_sec = ts.tv_sec;
+ tv.tv_usec = ts.tv_nsec / 1000;
+ return tv;
+ }
+ }
+#endif
+ // use gettimeofday
+ ::gettimeofday(&tv, 0);
+ return tv;
+}
+
+static inline bool time_update(struct timeval *tv, const struct timeval &start,
+ const struct timeval &timeout)
+{
+ struct timeval now = gettime();
+ if (now < start) {
+ // clock reset, give up
+ return false;
+ }
+
+ *tv = timeout + start - now;
+ return true;
+}
+
+int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
+ const struct timeval *orig_timeout)
+{
+ if (!orig_timeout) {
+ // no timeout -> block forever
+ register int ret;
+ EINTR_LOOP(ret, select(nfds, fdread, fdwrite, fdexcept, 0));
+ return ret;
+ }
+
+ timeval start = gettime();
+ timeval timeout = *orig_timeout;
+
+ // loop and recalculate the timeout as needed
+ int ret;
+ forever {
+ ret = ::select(nfds, fdread, fdwrite, fdexcept, &timeout);
+ if (ret != -1 || errno != EINTR)
+ return ret;
+
+ // recalculate the timeout
+ if (!time_update(&timeout, start, *orig_timeout)) {
+ // clock reset, fake timeout error
+ return 0;
+ }
+ }
+}
+
+QT_END_NAMESPACE
+
+#ifdef Q_OS_LINUX
+// Don't wait for libc to supply the calls we need
+// Make syscalls directly
+
+# if defined(__GLIBC__) && (__GLIBC__ * 0x100 + __GLIBC_MINOR__) >= 0x0204
+// glibc 2.4 has syscall(...)
+# include <sys/syscall.h>
+# include <asm/unistd.h>
+# else
+// no syscall(...)
+static inline int syscall(...) { errno = ENOSYS; return -1;}
+# endif
+
+# ifndef __NR_dup3
+# if defined(__i386__)
+# define __NR_dup3 330
+# define __NR_pipe2 331
+# elif defined(__x86_64__)
+# define __NR_dup3 292
+# define __NR_pipe2 293
+# elif defined(__ia64__)
+# define __NR_dup3 1316
+# define __NR_pipe2 1317
+# else
+// set the syscalls to absurd numbers so that they'll cause ENOSYS errors
+# warning "Please port the pipe2/dup3 code to this platform"
+# define __NR_dup3 -1
+# define __NR_pipe2 -1
+# endif
+# endif
+
+# if !defined(__NR_socketcall) && !defined(__NR_accept4)
+# if defined(__x86_64__)
+# define __NR_accept4 288
+# elif defined(__ia64__)
+// not assigned yet to IA-64
+# define __NR_accept4 -1
+# else
+// set the syscalls to absurd numbers so that they'll cause ENOSYS errors
+# warning "Please port the accept4 code to this platform"
+# define __NR_accept4 -1
+# endif
+# endif
+
+QT_BEGIN_NAMESPACE
+namespace QtLibcSupplement {
+ int pipe2(int pipes[], int flags)
+ {
+ return syscall(__NR_pipe2, pipes, flags);
+ }
+
+ int dup3(int oldfd, int newfd, int flags)
+ {
+ return syscall(__NR_dup3, oldfd, newfd, flags);
+ }
+
+ int accept4(int s, sockaddr *addr, QT_SOCKLEN_T *addrlen, int flags)
+ {
+# if defined(__NR_socketcall)
+ // This platform uses socketcall() instead of raw syscalls
+ // the SYS_ACCEPT4 number is cross-platform: 18
+ return syscall(__NR_socketcall, 18, &s);
+# else
+ return syscall(__NR_accept4, s, addr, addrlen, flags);
+# endif
+
+ Q_UNUSED(addr); Q_UNUSED(addrlen); Q_UNUSED(flags); // they're actually used
+ }
+}
+QT_END_NAMESPACE
+#endif // Q_OS_LINUX
+
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
new file mode 100644
index 0000000..dd97841
--- /dev/null
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -0,0 +1,275 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCORE_UNIX_P_H
+#define QCORE_UNIX_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of Qt code on Unix. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qplatformdefs.h"
+
+#ifndef Q_OS_UNIX
+# error "qcore_unix_p.h included on a non-Unix system"
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <sys/wait.h>
+#include <errno.h>
+#include <fcntl.h>
+
+struct sockaddr;
+
+#if defined(Q_OS_LINUX) && defined(__GLIBC__) && (__GLIBC__ * 0x100 + __GLIBC_MINOR__) >= 0x0204
+// Linux supports thread-safe FD_CLOEXEC
+# define QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC 1
+
+// add defines for the consts for Linux
+# ifndef O_CLOEXEC
+# define O_CLOEXEC 02000000
+# endif
+# ifndef FD_DUPFD_CLOEXEC
+# define F_DUPFD_CLOEXEC 1030
+# endif
+# ifndef SOCK_CLOEXEC
+# define SOCK_CLOEXEC O_CLOEXEC
+# endif
+# ifndef SOCK_NONBLOCK
+# define SOCK_NONBLOCK O_NONBLOCK
+# endif
+# ifndef MSG_CMSG_CLOEXEC
+# define MSG_CMSG_CLOEXEC 0x40000000
+# endif
+
+QT_BEGIN_NAMESPACE
+namespace QtLibcSupplement {
+ Q_CORE_EXPORT int accept4(int, sockaddr *, QT_SOCKLEN_T *, int flags);
+ Q_CORE_EXPORT int dup3(int oldfd, int newfd, int flags);
+ Q_CORE_EXPORT int pipe2(int pipes[], int flags);
+}
+QT_END_NAMESPACE
+using namespace QT_PREPEND_NAMESPACE(QtLibcSupplement);
+
+#else
+# define QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC 0
+#endif
+
+#define EINTR_LOOP(var, cmd) \
+ do { \
+ var = cmd; \
+ } while (var == -1 && errno == EINTR)
+
+QT_BEGIN_NAMESPACE
+
+// don't call QT_OPEN or ::open
+// call qt_safe_open
+static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 0777)
+{
+#ifdef O_CLOEXEC
+ flags |= O_CLOEXEC;
+#endif
+ register int fd;
+ EINTR_LOOP(fd, QT_OPEN(pathname, flags, mode));
+
+ // unknown flags are ignored, so we have no way of verifying if
+ // O_CLOEXEC was accepted
+ if (fd != -1)
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+ return fd;
+}
+#undef QT_OPEN
+#define QT_OPEN qt_safe_open
+
+// don't call ::pipe
+// call qt_safe_pipe
+static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
+{
+#ifdef O_CLOEXEC
+ Q_ASSERT((flags & ~(O_CLOEXEC | O_NONBLOCK)) == 0);
+#else
+ Q_ASSERT((flags & ~O_NONBLOCK) == 0);
+#endif
+
+ register int ret;
+#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC
+ // use pipe2
+ flags |= O_CLOEXEC;
+ ret = ::pipe2(pipefd, flags); // pipe2 is Linux-specific and is documented not to return EINTR
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+#endif
+
+ ret = ::pipe(pipefd);
+ if (ret == -1)
+ return -1;
+
+ ::fcntl(pipefd[0], F_SETFD, FD_CLOEXEC);
+ ::fcntl(pipefd[1], F_SETFD, FD_CLOEXEC);
+
+ // set non-block too?
+ if (flags & O_NONBLOCK) {
+ ::fcntl(pipefd[0], F_SETFL, ::fcntl(pipefd[0], F_GETFL) | O_NONBLOCK);
+ ::fcntl(pipefd[1], F_SETFL, ::fcntl(pipefd[1], F_GETFL) | O_NONBLOCK);
+ }
+
+ return 0;
+}
+
+// don't call dup or fcntl(F_DUPFD)
+static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC)
+{
+ Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
+
+ register int ret;
+#ifdef F_DUPFD_CLOEXEC
+ // use this fcntl
+ if (flags & FD_CLOEXEC) {
+ ret = ::fcntl(oldfd, F_DUPFD_CLOEXEC, atleast);
+ if (ret != -1 || errno != EINVAL)
+ return ret;
+ }
+#endif
+
+ // use F_DUPFD
+ ret = ::fcntl(oldfd, F_DUPFD, atleast);
+
+ if (flags && ret != -1)
+ ::fcntl(ret, F_SETFD, flags);
+ return ret;
+}
+
+// don't call dup2
+// call qt_safe_dup2
+static inline int qt_safe_dup2(int oldfd, int newfd, int flags = FD_CLOEXEC)
+{
+ Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
+
+ register int ret;
+#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC
+ // use dup3
+ if (flags & FD_CLOEXEC) {
+ EINTR_LOOP(ret, ::dup3(oldfd, newfd, O_CLOEXEC));
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+ }
+#endif
+ EINTR_LOOP(ret, ::dup2(oldfd, newfd));
+ if (ret == -1)
+ return -1;
+
+ if (flags)
+ ::fcntl(newfd, F_SETFD, flags);
+ return 0;
+}
+
+static inline qint64 qt_safe_read(int fd, void *data, qint64 maxlen)
+{
+ qint64 ret = 0;
+ EINTR_LOOP(ret, QT_READ(fd, data, maxlen));
+ return ret;
+}
+#undef QT_READ
+#define QT_READ qt_safe_read
+
+static inline qint64 qt_safe_write(int fd, const void *data, qint64 len)
+{
+ qint64 ret = 0;
+ EINTR_LOOP(ret, QT_WRITE(fd, data, len));
+ return ret;
+}
+#undef QT_WRITE
+#define QT_WRITE qt_safe_write
+
+static inline int qt_safe_close(int fd)
+{
+ register int ret;
+ EINTR_LOOP(ret, QT_CLOSE(fd));
+ return ret;
+}
+#undef QT_CLOSE
+#define QT_CLOSE qt_safe_close
+
+static inline int qt_safe_execve(const char *filename, char *const argv[],
+ char *const envp[])
+{
+ register int ret;
+ EINTR_LOOP(ret, ::execve(filename, argv, envp));
+ return ret;
+}
+
+static inline int qt_safe_execv(const char *path, char *const argv[])
+{
+ register int ret;
+ EINTR_LOOP(ret, ::execv(path, argv));
+ return ret;
+}
+
+static inline int qt_safe_execvp(const char *file, char *const argv[])
+{
+ register int ret;
+ EINTR_LOOP(ret, ::execvp(file, argv));
+ return ret;
+}
+
+static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
+{
+ register int ret;
+ EINTR_LOOP(ret, ::waitpid(pid, status, options));
+ return ret;
+}
+
+Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
+ const struct timeval *tv);
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index e6a471c..706dc54 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1675,6 +1675,12 @@ QString QCoreApplication::translate(const char *context, const char *sourceText,
return result;
}
+// Declared in qglobal.h
+QString qtTrId(const char *id, int n)
+{
+ return QCoreApplication::translate(0, id, 0, QCoreApplication::UnicodeUTF8, n);
+}
+
bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator)
{
return QCoreApplication::self
@@ -1741,21 +1747,8 @@ QString QCoreApplication::applicationFilePath()
if (!d->cachedApplicationFilePath.isNull())
return d->cachedApplicationFilePath;
-#if defined( Q_WS_WIN )
- QFileInfo filePath;
- QT_WA({
- wchar_t module_name[MAX_PATH+1];
- GetModuleFileNameW(0, module_name, MAX_PATH);
- module_name[MAX_PATH] = 0;
- filePath = QString::fromUtf16((ushort *)module_name);
- }, {
- char module_name[MAX_PATH+1];
- GetModuleFileNameA(0, module_name, MAX_PATH);
- module_name[MAX_PATH] = 0;
- filePath = QString::fromLocal8Bit(module_name);
- });
-
- d->cachedApplicationFilePath = filePath.filePath();
+#if defined(Q_WS_WIN)
+ d->cachedApplicationFilePath = QFileInfo(qAppFileName()).filePath();
return d->cachedApplicationFilePath;
#elif defined(Q_WS_MAC)
QString qAppFileName_str = qAppFileName();
@@ -1902,13 +1895,13 @@ QStringList QCoreApplication::arguments()
return list;
}
#ifdef Q_OS_WIN
- QString cmdline = QT_WA_INLINE(QString::fromUtf16((unsigned short *)GetCommandLineW()), QString::fromLocal8Bit(GetCommandLineA()));
+ QString cmdline = QString::fromWCharArray(GetCommandLine());
#if defined(Q_OS_WINCE)
wchar_t tempFilename[MAX_PATH+1];
- if (GetModuleFileNameW(0, tempFilename, MAX_PATH)) {
+ if (GetModuleFileName(0, tempFilename, MAX_PATH)) {
tempFilename[MAX_PATH] = 0;
- cmdline.prepend(QLatin1Char('\"') + QString::fromUtf16((unsigned short *)tempFilename) + QLatin1String("\" "));
+ cmdline.prepend(QLatin1Char('\"') + QString::fromWCharArray(tempFilename) + QLatin1String("\" "));
}
#endif // Q_OS_WINCE
@@ -2190,21 +2183,37 @@ void QCoreApplication::removeLibraryPath(const QString &path)
/*!
\fn EventFilter QCoreApplication::setEventFilter(EventFilter filter)
- Sets the event filter \a filter. Returns a pointer to the filter
- function previously defined.
-
- The event filter is a function that is called for every message
- received in all threads. This does \e not include messages to
+ Replaces the event filter function for the QCoreApplication with
+ \a filter and returns the pointer to the replaced event filter
+ function. Only the current event filter function is called. If you
+ want to use both filter functions, save the replaced EventFilter
+ in a place where yours can call it.
+
+ The event filter function set here is called for all messages
+ received by all threads meant for all Qt objects. It is \e not
+ called for messages that are not meant for Qt objects.
+
+ The event filter function should return true if the message should
+ be filtered, (i.e. stopped). It should return false to allow
+ processing the message to continue.
+
+ By default, no event filter function is set (i.e., this function
+ returns a null EventFilter the first time it is called).
+
+ \note The filter function set here receives native messages,
+ i.e. MSG or XEvent structs, that are going to Qt objects. It is
+ called by QCoreApplication::filterEvent(). If the filter function
+ returns false to indicate the message should be processed further,
+ the native message can then be translated into a QEvent and
+ handled by the standard Qt \l{QEvent} {event} filering, e.g.
+ QObject::installEventFilter().
+
+ \note The filter function set here is different form the filter
+ function set via QAbstractEventDispatcher::setEventFilter(), which
+ gets all messages received by its thread, even messages meant for
objects that are not handled by Qt.
- The function can return true to stop the event to be processed by
- Qt, or false to continue with the standard event processing.
-
- Only one filter can be defined, but the filter can use the return
- value to call the previously set event filter. By default, no
- filter is set (i.e., the function returns 0).
-
- \sa installEventFilter()
+ \sa QObject::installEventFilter(), QAbstractEventDispatcher::setEventFilter()
*/
QCoreApplication::EventFilter
QCoreApplication::setEventFilter(QCoreApplication::EventFilter filter)
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index 7a35340..bf5716a 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -45,14 +45,15 @@
#include "qt_windows.h"
#include "qvector.h"
#include "qmutex.h"
+#include "qfileinfo.h"
#include "qcorecmdlineargs_p.h"
#include <private/qthread_p.h>
#include <ctype.h>
QT_BEGIN_NAMESPACE
-char appFileName[MAX_PATH+1]; // application file name
-char theAppName[MAX_PATH+1]; // application name
+char appFileName[MAX_PATH]; // application file name
+char theAppName[MAX_PATH]; // application name
HINSTANCE appInst = 0; // handle to app instance
HINSTANCE appPrevInst = 0; // handle to prev app instance
int appCmdShow = 0;
@@ -73,48 +74,69 @@ Q_CORE_EXPORT int qWinAppCmdShow() // get main window sho
return appCmdShow;
}
+Q_CORE_EXPORT QString qAppFileName() // get application file name
+{
+ // We do MAX_PATH + 2 here, and request with MAX_PATH + 1, so we can handle all paths
+ // up to, and including MAX_PATH size perfectly fine with string termination, as well
+ // as easily detect if the file path is indeed larger than MAX_PATH, in which case we
+ // need to use the heap instead. This is a work-around, since contrary to what the
+ // MSDN documentation states, GetModuleFileName sometimes doesn't set the
+ // ERROR_INSUFFICIENT_BUFFER error number, and we thus cannot rely on this value if
+ // GetModuleFileName(0, buffer, MAX_PATH) == MAX_PATH.
+ // GetModuleFileName(0, buffer, MAX_PATH + 1) == MAX_PATH just means we hit the normal
+ // file path limit, and we handle it normally, if the result is MAX_PATH + 1, we use
+ // heap (even if the result _might_ be exactly MAX_PATH + 1, but that's ok).
+ wchar_t buffer[MAX_PATH + 2];
+ DWORD v = GetModuleFileName(0, buffer, MAX_PATH + 1);
+ buffer[MAX_PATH + 1] = 0;
+
+ if (v == 0)
+ return QString();
+ else if (v <= MAX_PATH)
+ return QString::fromWCharArray(buffer);
+
+ // MAX_PATH sized buffer wasn't large enough to contain the full path, use heap
+ wchar_t *b = 0;
+ int i = 1;
+ size_t size;
+ do {
+ ++i;
+ size = MAX_PATH * i;
+ b = reinterpret_cast<wchar_t *>(realloc(b, (size + 1) * sizeof(wchar_t)));
+ if (b)
+ v = GetModuleFileName(NULL, b, size);
+ } while (b && v == size);
+
+ if (b)
+ *(b + size) = 0;
+ QString res = QString::fromWCharArray(b);
+ free(b);
+
+ return res;
+}
void set_winapp_name()
{
static bool already_set = false;
if (!already_set) {
already_set = true;
-#ifndef Q_OS_WINCE
- GetModuleFileNameA(0, appFileName, sizeof(appFileName));
- appFileName[sizeof(appFileName)-1] = 0;
-#else
- QString afm;
- afm.resize(sizeof(appFileName));
- afm.resize(GetModuleFileName(0, (wchar_t *) (afm.unicode()), sizeof(appFileName)));
- memcpy(appFileName, afm.toLatin1(), sizeof(appFileName));
-#endif
- const char *p = strrchr(appFileName, '\\'); // skip path
- if (p)
- memcpy(theAppName, p+1, qstrlen(p));
- int l = qstrlen(theAppName);
- if ((l > 4) && !qstricmp(theAppName + l - 4, ".exe"))
- theAppName[l-4] = '\0'; // drop .exe extension
-
- if (appInst == 0) {
- QT_WA({
- appInst = GetModuleHandle(0);
- }, {
- appInst = GetModuleHandleA(0);
- });
- }
- }
-}
-Q_CORE_EXPORT QString qAppFileName() // get application file name
-{
- return QString::fromLatin1(appFileName);
+ QString moduleName = qAppFileName();
+
+ QByteArray filePath = moduleName.toLocal8Bit();
+ QByteArray fileName = QFileInfo(moduleName).baseName().toLocal8Bit();
+
+ memcpy(appFileName, filePath.constData(), filePath.length());
+ memcpy(theAppName, fileName.constData(), fileName.length());
+
+ if (appInst == 0)
+ appInst = GetModuleHandle(0);
+ }
}
QString QCoreApplicationPrivate::appName() const
{
- if (!theAppName[0])
- set_winapp_name();
- return QString::fromLatin1(theAppName);
+ return QFileInfo(qAppFileName()).baseName();
}
class QWinMsgHandlerCriticalSection
@@ -145,15 +167,11 @@ Q_CORE_EXPORT void qWinMsgHandler(QtMsgType t, const char* str)
str = "(null)";
staticCriticalSection.lock();
- QT_WA({
- QString s(QString::fromLocal8Bit(str));
- s += QLatin1Char('\n');
- OutputDebugStringW((TCHAR*)s.utf16());
- }, {
- QByteArray s(str);
- s += '\n';
- OutputDebugStringA(s.data());
- })
+
+ QString s(QString::fromLocal8Bit(str));
+ s += QLatin1Char('\n');
+ OutputDebugString((wchar_t*)s.utf16());
+
staticCriticalSection.unlock();
}
@@ -262,7 +280,7 @@ QT_END_INCLUDE_NAMESPACE
// The values below should never change. Note that none of the usual
// WM_...FIRST & WM_...LAST values are in the list, as they normally have other
// WM_... representations
-struct {
+struct KnownWM {
uint WM;
const char* str;
} knownWM[] =
@@ -564,7 +582,7 @@ struct {
{ 0,0 }}; // End of known messages
// Looks up the WM_ message in the table above
-const char* findWMstr(uint msg)
+static const char* findWMstr(uint msg)
{
uint i = 0;
const char* result = 0;
diff --git a/src/corelib/kernel/qcorecmdlineargs_p.h b/src/corelib/kernel/qcorecmdlineargs_p.h
index c0dd813..a012b4e 100644
--- a/src/corelib/kernel/qcorecmdlineargs_p.h
+++ b/src/corelib/kernel/qcorecmdlineargs_p.h
@@ -135,9 +135,9 @@ static inline QStringList qWinCmdArgs(QString cmdLine) // not const-ref: this mi
QStringList args;
int argc = 0;
- QVector<ushort*> argv = qWinCmdLine<ushort>((ushort*)cmdLine.utf16(), cmdLine.length(), argc);
+ QVector<wchar_t*> argv = qWinCmdLine<wchar_t>((wchar_t *)cmdLine.utf16(), cmdLine.length(), argc);
for (int a = 0; a < argc; ++a) {
- args << QString::fromUtf16(argv[a]);
+ args << QString::fromWCharArray(argv[a]);
}
return args;
@@ -147,10 +147,7 @@ static inline QStringList qCmdLineArgs(int argc, char *argv[])
{
Q_UNUSED(argc)
Q_UNUSED(argv)
- QString cmdLine = QT_WA_INLINE(
- QString::fromUtf16((unsigned short*)GetCommandLineW()),
- QString::fromLocal8Bit(GetCommandLineA())
- );
+ QString cmdLine = QString::fromWCharArray(GetCommandLine());
return qWinCmdArgs(cmdLine);
}
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 504ae84..a682fad9 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -219,14 +219,13 @@ QT_BEGIN_NAMESPACE
\value WindowStateChange The \l{QWidget::windowState()}{window's state} (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent).
\value WindowTitleChange The window title has changed.
\value WindowUnblocked The window is unblocked after a modal dialog exited.
+ \value Wrapped The event is a wrapper for, i.e., contains, another event (QWrappedEvent).
\value ZOrderChange The widget's z-order has changed. This event is never sent to top level windows.
\value KeyboardLayoutChange The keyboard layout has changed.
\value DynamicPropertyChange A dynamic property was added, changed or removed from the object.
\value TouchBegin Beginning of a sequence of touch-screen and/or track-pad events (QTouchEvent)
\value TouchUpdate Touch-screen event (QTouchEvent)
\value TouchEnd End of touch-event sequence (QTouchEvent)
- \value Gesture A gesture has occured.
- \value GraphicsSceneGesture A gesture has occured on a graphics scene.
User events should have values between \c User and \c{MaxUser}:
@@ -269,8 +268,8 @@ QT_BEGIN_NAMESPACE
\omitvalue NetworkReplyUpdated
\omitvalue FutureCallOut
\omitvalue CocoaRequestModal
- \omitvalue Wrapped
\omitvalue Signal
+ \omitvalue WinGesture
*/
/*!
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index 4929c51..1d86f47 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -276,8 +276,7 @@ public:
TouchUpdate = 195,
TouchEnd = 196,
- Gesture = 197,
- GraphicsSceneGesture = 198,
+ WinGesture = 197,
// 512 reserved for Qt Jambi's MetaCall event
// 513 reserved for Qt Jambi's DeleteOnMainThread event
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index 161398e..9deb78f 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -49,6 +49,7 @@
#include "qeventdispatcher_unix_p.h"
#include <private/qthread_p.h>
#include <private/qcoreapplication_p.h>
+#include <private/qcore_unix_p.h>
#include <errno.h>
#include <stdio.h>
@@ -58,6 +59,10 @@
# include <sys/times.h>
#endif
+#ifdef Q_OS_MAC
+#include <mach/mach_time.h>
+#endif
+
QT_BEGIN_NAMESPACE
Q_CORE_EXPORT bool qt_disable_lowpriority_timers=false;
@@ -76,6 +81,7 @@ static void signalHandler(int sig)
}
+#ifdef Q_OS_INTEGRITY
static void initThreadPipeFD(int fd)
{
int ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
@@ -90,7 +96,7 @@ static void initThreadPipeFD(int fd)
if (ret == -1)
perror("QEventDispatcherUNIXPrivate: Unable to set flags on thread pipe");
}
-
+#endif
QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate()
{
@@ -102,13 +108,13 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate()
// INTEGRITY doesn't like a "select" on pipes, so use socketpair instead
if (socketpair(AF_INET, SOCK_STREAM, PF_INET, thread_pipe) == -1)
perror("QEventDispatcherUNIXPrivate(): Unable to create socket pair");
-#else
- if (pipe(thread_pipe) == -1)
- perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe");
-#endif
initThreadPipeFD(thread_pipe[0]);
initThreadPipeFD(thread_pipe[1]);
+#else
+ if (qt_safe_pipe(thread_pipe, O_NONBLOCK) == -1)
+ perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe");
+#endif
sn_highest = -1;
@@ -257,7 +263,7 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags,
QTimerInfoList::QTimerInfoList()
{
-#if (_POSIX_MONOTONIC_CLOCK-0 <= 0)
+#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC)
useMonotonicTimers = false;
# if (_POSIX_MONOTONIC_CLOCK == 0)
@@ -285,6 +291,9 @@ QTimerInfoList::QTimerInfoList()
msPerTick = 0;
}
#else
+# if defined(Q_OS_MAC)
+ useMonotonicTimers = true;
+# endif
// using monotonic timers unconditionally
getTime(currentTime);
#endif
@@ -333,7 +342,19 @@ bool QTimerInfoList::timeChanged(timeval *delta)
void QTimerInfoList::getTime(timeval &t)
{
-#if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED)
+#if defined(Q_OS_MAC)
+ {
+ static mach_timebase_info_data_t info = {0,0};
+ if (info.denom == 0)
+ mach_timebase_info(&info);
+
+ uint64_t cpu_time = mach_absolute_time();
+ uint64_t nsecs = cpu_time * (info.numer / info.denom);
+ t.tv_sec = nsecs * 1e-9;
+ t.tv_usec = nsecs * 1e-3 - (t.tv_sec * 1e6);
+ return;
+ }
+#elif !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED)
if (useMonotonicTimers) {
timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index cb1549c..33b66f5 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -355,8 +355,7 @@ QEventDispatcherWin32Private::QEventDispatcherWin32Private()
{
resolveTimerAPI();
- wakeUpNotifier.setHandle(QT_WA_INLINE(CreateEventW(0, FALSE, FALSE, 0),
- CreateEventA(0, FALSE, FALSE, 0)));
+ wakeUpNotifier.setHandle(CreateEvent(0, FALSE, FALSE, 0));
if (!wakeUpNotifier.handle())
qWarning("QEventDispatcher: Creating QEventDispatcherWin32Private wakeup event failed");
}
@@ -367,13 +366,8 @@ QEventDispatcherWin32Private::~QEventDispatcherWin32Private()
CloseHandle(wakeUpNotifier.handle());
if (internalHwnd)
DestroyWindow(internalHwnd);
- QByteArray className = "QEventDispatcherWin32_Internal_Widget" + QByteArray::number(quintptr(qt_internal_proc));
-#if !defined(Q_OS_WINCE)
- UnregisterClassA(className.constData(), qWinAppInst());
-#else
- UnregisterClassW(reinterpret_cast<const wchar_t *> (QString::fromLatin1(className.constData()).utf16())
- , qWinAppInst());
-#endif
+ QString className = QLatin1String("QEventDispatcherWin32_Internal_Widget") + QString::number(quintptr(qt_internal_proc));
+ UnregisterClass((wchar_t*)className.utf16(), qWinAppInst());
}
void QEventDispatcherWin32Private::activateEventNotifier(QWinEventNotifier * wen)
@@ -382,18 +376,24 @@ void QEventDispatcherWin32Private::activateEventNotifier(QWinEventNotifier * wen
QCoreApplication::sendEvent(wen, &event);
}
-
+// ### Qt 5: remove
Q_CORE_EXPORT bool winPeekMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin,
UINT wMsgFilterMax, UINT wRemoveMsg)
{
- QT_WA({ return PeekMessage(msg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); } ,
- { return PeekMessageA(msg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); });
+ return PeekMessage(msg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
}
+// ### Qt 5: remove
Q_CORE_EXPORT bool winPostMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- QT_WA({ return PostMessage(hWnd, msg, wParam, lParam); } ,
- { return PostMessageA(hWnd, msg, wParam, lParam); });
+ return PostMessage(hWnd, msg, wParam, lParam);
+}
+
+// ### Qt 5: remove
+Q_CORE_EXPORT bool winGetMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin,
+ UINT wMsgFilterMax)
+{
+ return GetMessage(msg, hWnd, wMsgFilterMin, wMsgFilterMax);
}
// This function is called by a workerthread
@@ -443,10 +443,10 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
#ifdef GWLP_USERDATA
QEventDispatcherWin32 *eventDispatcher =
- (QEventDispatcherWin32 *) GetWindowLongPtrA(hwnd, GWLP_USERDATA);
+ (QEventDispatcherWin32 *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
#else
QEventDispatcherWin32 *eventDispatcher =
- (QEventDispatcherWin32 *) GetWindowLongA(hwnd, GWL_USERDATA);
+ (QEventDispatcherWin32 *) GetWindowLong(hwnd, GWL_USERDATA);
#endif
if (eventDispatcher) {
QEventDispatcherWin32Private *d = eventDispatcher->d_func();
@@ -494,54 +494,35 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatcher)
{
- HINSTANCE hi = qWinAppInst();
-#if defined(Q_OS_WINCE)
+ // make sure that multiple Qt's can coexist in the same process
+ QString className = QLatin1String("QEventDispatcherWin32_Internal_Widget") + QString::number(quintptr(qt_internal_proc));
+
WNDCLASS wc;
-#else
- WNDCLASSA wc;
-#endif
wc.style = 0;
wc.lpfnWndProc = qt_internal_proc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
- wc.hInstance = hi;
+ wc.hInstance = qWinAppInst();
wc.hIcon = 0;
wc.hCursor = 0;
wc.hbrBackground = 0;
wc.lpszMenuName = NULL;
+ wc.lpszClassName = reinterpret_cast<const wchar_t *> (className.utf16());
- // make sure that multiple Qt's can coexist in the same process
- QByteArray className = "QEventDispatcherWin32_Internal_Widget" + QByteArray::number(quintptr(qt_internal_proc));
-#if defined(Q_OS_WINCE)
- QString tmp = QString::fromLatin1(className.data());
- wc.lpszClassName = reinterpret_cast<const wchar_t *> (tmp.utf16());
RegisterClass(&wc);
HWND wnd = CreateWindow(wc.lpszClassName, // classname
- wc.lpszClassName, // window name
- 0, // style
- 0, 0, 0, 0, // geometry
- 0, // parent
- 0, // menu handle
- hi, // application
- 0); // windows creation data.
-#else
- wc.lpszClassName = className.constData();
- RegisterClassA(&wc);
- HWND wnd = CreateWindowA(wc.lpszClassName, // classname
- wc.lpszClassName, // window name
- 0, // style
- 0, 0, 0, 0, // geometry
- 0, // parent
- 0, // menu handle
- hi, // application
- 0); // windows creation data.
-#endif
-
+ wc.lpszClassName, // window name
+ 0, // style
+ 0, 0, 0, 0, // geometry
+ 0, // parent
+ 0, // menu handle
+ qWinAppInst(), // application
+ 0); // windows creation data.
#ifdef GWLP_USERDATA
- SetWindowLongPtrA(wnd, GWLP_USERDATA, (LONG_PTR)eventDispatcher);
+ SetWindowLongPtr(wnd, GWLP_USERDATA, (LONG_PTR)eventDispatcher);
#else
- SetWindowLongA(wnd, GWL_USERDATA, (LONG)eventDispatcher);
+ SetWindowLong(wnd, GWL_USERDATA, (LONG)eventDispatcher);
#endif
if (!wnd) {
@@ -690,7 +671,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
haveMessage = true;
msg = d->queuedSocketEvents.takeFirst();
} else {
- haveMessage = winPeekMessage(&msg, 0, 0, 0, PM_REMOVE);
+ haveMessage = PeekMessage(&msg, 0, 0, 0, PM_REMOVE);
if (haveMessage && (flags & QEventLoop::ExcludeUserInputEvents)
&& ((msg.message >= WM_KEYFIRST
&& msg.message <= WM_KEYLAST)
@@ -738,11 +719,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
if (!filterEvent(&msg)) {
TranslateMessage(&msg);
- QT_WA({
- DispatchMessage(&msg);
- } , {
- DispatchMessageA(&msg);
- });
+ DispatchMessage(&msg);
}
} else if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
@@ -781,7 +758,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
bool QEventDispatcherWin32::hasPendingEvents()
{
MSG msg;
- return qGlobalPostedEventsCount() || winPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
+ return qGlobalPostedEventsCount() || PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
}
void QEventDispatcherWin32::registerSocketNotifier(QSocketNotifier *notifier)
diff --git a/src/corelib/kernel/qfunctions_wince.cpp b/src/corelib/kernel/qfunctions_wince.cpp
index 2c47adb..5680ad5 100644
--- a/src/corelib/kernel/qfunctions_wince.cpp
+++ b/src/corelib/kernel/qfunctions_wince.cpp
@@ -108,7 +108,7 @@ int qt_wince__getdrive( void )
return 1;
}
-int qt_wince__waccess( const WCHAR *path, int pmode )
+int qt_wince__waccess( const wchar_t *path, int pmode )
{
DWORD res = GetFileAttributes( path );
if ( 0xFFFFFFFF == res )
@@ -118,7 +118,7 @@ int qt_wince__waccess( const WCHAR *path, int pmode )
return -1;
if ( (pmode & X_OK) && !(res & FILE_ATTRIBUTE_DIRECTORY) ) {
- QString file = QString::fromUtf16(reinterpret_cast<const ushort *> (path));
+ QString file = QString::fromWCharArray(path);
if ( !(file.endsWith(QString::fromLatin1(".exe")) ||
file.endsWith(QString::fromLatin1(".com"))) )
return -1;
@@ -130,12 +130,12 @@ int qt_wince__waccess( const WCHAR *path, int pmode )
int qt_wince_open( const char *filename, int oflag, int pmode )
{
QString fn( QString::fromLatin1(filename) );
- return _wopen( (WCHAR*)fn.utf16(), oflag, pmode );
+ return _wopen( (wchar_t*)fn.utf16(), oflag, pmode );
}
-int qt_wince__wopen( const WCHAR *filename, int oflag, int /*pmode*/ )
+int qt_wince__wopen( const wchar_t *filename, int oflag, int /*pmode*/ )
{
- WCHAR *flag;
+ wchar_t *flag;
if ( oflag & _O_APPEND ) {
if ( oflag & _O_WRONLY ) {
@@ -290,7 +290,7 @@ bool qt_wince__chmod(const char *file, int mode)
return _wchmod( reinterpret_cast<const wchar_t *> (QString::fromLatin1(file).utf16()), mode);
}
-bool qt_wince__wchmod(const WCHAR *file, int mode)
+bool qt_wince__wchmod(const wchar_t *file, int mode)
{
// ### Does not work properly, what about just adding one property?
if(mode&_S_IWRITE) {
diff --git a/src/corelib/kernel/qfunctions_wince.h b/src/corelib/kernel/qfunctions_wince.h
index 307e17b..41cb641 100644
--- a/src/corelib/kernel/qfunctions_wince.h
+++ b/src/corelib/kernel/qfunctions_wince.h
@@ -175,8 +175,8 @@ typedef int mode_t;
extern int errno;
int qt_wince__getdrive( void );
-int qt_wince__waccess( const WCHAR *path, int pmode );
-int qt_wince__wopen( const WCHAR *filename, int oflag, int pmode );
+int qt_wince__waccess( const wchar_t *path, int pmode );
+int qt_wince__wopen( const wchar_t *filename, int oflag, int pmode );
long qt_wince__lseek( int handle, long offset, int origin );
int qt_wince__read( int handle, void *buffer, unsigned int count );
int qt_wince__write( int handle, const void *buffer, unsigned int count );
@@ -204,7 +204,7 @@ int qt_wince_SetErrorMode(int);
#endif
bool qt_wince__chmod(const char *file, int mode);
-bool qt_wince__wchmod(const WCHAR *file, int mode);
+bool qt_wince__wchmod(const wchar_t *file, int mode);
#pragma warning(disable: 4273)
HANDLE qt_wince_CreateFileA(LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h
index 348957f..7a77d56 100644
--- a/src/corelib/kernel/qmath.h
+++ b/src/corelib/kernel/qmath.h
@@ -132,6 +132,10 @@ inline qreal qPow(qreal x, qreal y)
return pow(x, y);
}
+#ifndef M_PI
+#define M_PI (3.14159265358979323846)
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 215f6ae..08cecaf 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -2136,8 +2136,15 @@ QVariant QMetaProperty::read(const QObject *object) const
return QVariant();
}
}
+
+ // the status variable is changed by qt_metacall to indicate what it did
+ // this feature is currently only used by QtDBus and should not be depended
+ // upon. Don't change it without looking into QDBusAbstractInterface first
+ // -1 (unchanged): normal qt_metacall, result stored in argv[0]
+ // changed: result stored directly in value
+ int status = -1;
QVariant value;
- void *argv[2] = { 0, &value };
+ void *argv[] = { 0, &value, &status };
if (t == QVariant::LastType) {
argv[0] = &value;
} else {
@@ -2147,8 +2154,8 @@ QVariant QMetaProperty::read(const QObject *object) const
const_cast<QObject*>(object)->qt_metacall(QMetaObject::ReadProperty,
idx + mobj->propertyOffset(),
argv);
- if (argv[1] == 0)
- // "value" was changed
+
+ if (status != -1)
return value;
if (t != QVariant::LastType && argv[0] != value.data())
// pointer or reference
@@ -2206,13 +2213,19 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const
return false;
}
- void *argv[2] = { 0, &v };
+ // the status variable is changed by qt_metacall to indicate what it did
+ // this feature is currently only used by QtDBus and should not be depended
+ // upon. Don't change it without looking into QDBusAbstractInterface first
+ // -1 (unchanged): normal qt_metacall, result stored in argv[0]
+ // changed: result stored directly in value, return the value of status
+ int status = -1;
+ void *argv[] = { 0, &v, &status };
if (t == QVariant::LastType)
argv[0] = &v;
else
argv[0] = v.data();
object->qt_metacall(QMetaObject::WriteProperty, idx + mobj->propertyOffset(), argv);
- return true;
+ return status;
}
/*!
@@ -2291,6 +2304,8 @@ QMetaMethod QMetaProperty::notifySignal() const
}
/*!
+ \since 4.6
+
Returns the index of the property change notifying signal if one was
specified, otherwise returns -1.
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 91266db..6d9daec 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -430,16 +430,15 @@ int QMetaType::registerType(const char *typeName, Destructor destructor,
#endif
QWriteLocker locker(customTypesLock());
- static int currentIdx = User;
int idx = qMetaTypeType_unlocked(normalizedTypeName);
if (!idx) {
- idx = currentIdx++;
- ct->resize(ct->count() + 1);
- QCustomTypeInfo &inf = (*ct)[idx - User];
+ QCustomTypeInfo inf;
inf.typeName = normalizedTypeName;
inf.constr = constructor;
inf.destr = destructor;
+ idx = ct->size() + User;
+ ct->append(inf);
}
return idx;
}
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index 3d2a7cb..4a1ba9f 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -105,7 +105,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
Q_Q(const QMimeData);
QVariant data = q->retrieveData(format, type);
- if (data.type() == type || data.type() == QVariant::Invalid)
+ if (data.type() == type || !data.isValid())
return data;
// provide more conversion possiblities than just what QVariant provides
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 9dc25c7..eb1bd0b 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -565,7 +565,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object)
\l uic generates code that invokes this function to enable
auto-connection to be performed between widgets on forms created
with \QD. More information about using auto-connection with \QD is
- given in the \l{Using a Designer .ui File in Your Application} section of
+ given in the \l{Using a Designer UI File in Your Application} section of
the \QD manual.
\section2 Dynamic Properties
@@ -2086,6 +2086,34 @@ void QObject::deleteLater()
\snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 17
+ \section1 Meta Data
+
+ Additional data can be attached to each translatable message.
+ The syntax:
+
+ \tt{//= <id>}
+
+ can be used to give the message a unique identifier to support tools
+ which need it.
+ The syntax:
+
+ \tt{//~ <field name> <field contents>}
+
+ can be used to attach meta data to the message. The field name should consist
+ of a domain prefix (possibly the conventional file extension of the file format
+ the field is inspired by), a hyphen and the actual field name in
+ underscore-delimited notation. For storage in TS files, the field name together
+ with the prefix "extra-" will form an XML element name. The field contents will
+ be XML-escaped, but otherwise appear verbatim as the element's contents.
+ Any number of unique fields can be added to each message.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp meta data
+
+ Meta data appearing right in front of a magic TRANSLATOR comment applies to the
+ whole TS file.
+
\section1 Character Encodings
You can set the encoding for \a sourceText by calling QTextCodec::setCodecForTr().
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index 5299972..05369c4 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -59,6 +59,8 @@
#include <fcntl.h>
#include <unistd.h>
+#include "private/qcore_unix_p.h"
+
QT_BEGIN_NAMESPACE
QSharedMemoryPrivate::QSharedMemoryPrivate()
@@ -83,7 +85,7 @@ void QSharedMemoryPrivate::setErrorString(const QString &function)
error = QSharedMemory::AlreadyExists;
break;
case ENOENT:
- errorString = QSharedMemory::tr("%1: doesn't exists").arg(function);
+ errorString = QSharedMemory::tr("%1: doesn't exist").arg(function);
error = QSharedMemory::NotFound;
break;
case EMFILE:
@@ -122,7 +124,7 @@ key_t QSharedMemoryPrivate::handle()
// ftok requires that an actual file exists somewhere
QString fileName = makePlatformSafeKey(key);
if (!QFile::exists(fileName)) {
- errorString = QSharedMemory::tr("%1: unix key file doesn't exists").arg(QLatin1String("QSharedMemory::handle:"));
+ errorString = QSharedMemory::tr("%1: UNIX key file doesn't exist").arg(QLatin1String("QSharedMemory::handle:"));
error = QSharedMemory::NotFound;
return 0;
}
@@ -153,7 +155,7 @@ int QSharedMemoryPrivate::createUnixKeyFile(const QString &fileName)
if (QFile::exists(fileName))
return 0;
- int fd = open(QFile::encodeName(fileName).constData(),
+ int fd = qt_safe_open(QFile::encodeName(fileName).constData(),
O_EXCL | O_CREAT | O_RDWR, 0640);
if (-1 == fd) {
if (errno == EEXIST)
diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
index d963a6d..ae64806 100644
--- a/src/corelib/kernel/qsharedmemory_win.cpp
+++ b/src/corelib/kernel/qsharedmemory_win.cpp
@@ -71,7 +71,7 @@ void QSharedMemoryPrivate::setErrorString(const QString &function)
case ERROR_INVALID_PARAMETER:
#endif
error = QSharedMemory::NotFound;
- errorString = QSharedMemory::tr("%1: doesn't exists").arg(function);
+ errorString = QSharedMemory::tr("%1: doesn't exist").arg(function);
break;
case ERROR_COMMITMENT_LIMIT:
error = QSharedMemory::InvalidSize;
@@ -106,16 +106,11 @@ HANDLE QSharedMemoryPrivate::handle()
return false;
}
#ifndef Q_OS_WINCE
- QT_WA({
- hand = OpenFileMappingW(FILE_MAP_ALL_ACCESS, false, (TCHAR*)safeKey.utf16());
- }, {
- hand = OpenFileMappingA(FILE_MAP_ALL_ACCESS, false, safeKey.toLocal8Bit().constData());
- });
+ hand = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, (wchar_t*)safeKey.utf16());
#else
// This works for opening a mapping too, but always opens it with read/write access in
// attach as it seems.
- hand = CreateFileMappingW(INVALID_HANDLE_VALUE,
- 0, PAGE_READWRITE, 0, 0, (TCHAR*)safeKey.utf16());
+ hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, 0, (wchar_t*)safeKey.utf16());
#endif
if (!hand) {
setErrorString(function);
@@ -148,13 +143,7 @@ bool QSharedMemoryPrivate::create(int size)
}
// Create the file mapping.
- QT_WA( {
- hand = CreateFileMappingW(INVALID_HANDLE_VALUE,
- 0, PAGE_READWRITE, 0, size, (TCHAR*)safeKey.utf16());
- }, {
- hand = CreateFileMappingA(INVALID_HANDLE_VALUE,
- 0, PAGE_READWRITE, 0, size, safeKey.toLocal8Bit().constData());
- } );
+ hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, (wchar_t*)safeKey.utf16());
setErrorString(function);
// hand is valid when it already exists unlike unix so explicitly check
diff --git a/src/corelib/kernel/qsystemsemaphore_win.cpp b/src/corelib/kernel/qsystemsemaphore_win.cpp
index 4e03ddf..1102258 100644
--- a/src/corelib/kernel/qsystemsemaphore_win.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_win.cpp
@@ -87,11 +87,7 @@ HANDLE QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode)
// Create it if it doesn't already exists.
if (semaphore == 0) {
QString safeName = makeKeyFileName();
- QT_WA({
- semaphore = CreateSemaphoreW(0, initialValue, MAXLONG, (TCHAR*)safeName.utf16());
- }, {
- semaphore = CreateSemaphoreA(0, initialValue, MAXLONG, safeName.toLocal8Bit().constData());
- });
+ semaphore = CreateSemaphore(0, initialValue, MAXLONG, (wchar_t*)safeName.utf16());
if (semaphore == NULL)
setErrorString(QLatin1String("QSystemSemaphore::handle"));
}
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index d2a0b3a..2ee9d26 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -103,9 +103,8 @@ QT_BEGIN_NAMESPACE
Note that QTimer's accuracy depends on the underlying operating
system and hardware. Most platforms support an accuracy of
- 1 millisecond, but Windows 98 supports only 55. If Qt is
- unable to deliver the requested number of timer clicks, it will
- silently discard some.
+ 1 millisecond. If Qt is unable to deliver the requested number of
+ timer clicks, it will silently discard some.
An alternative to using QTimer is to call QObject::startTimer()
for your object and reimplement the QObject::timerEvent() event
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 64cf16e..dc1b530 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -58,6 +58,7 @@
#if defined(Q_OS_UNIX)
#define QT_USE_MMAP
+#include "private/qcore_unix_p.h"
#endif
// most of the headers below are already included in qplatformdefs.h
@@ -502,7 +503,7 @@ bool QTranslator::load(const QString & filename, const QString & directory,
\overload load()
\fn bool QTranslator::load(const uchar *data, int len)
- Loads the .qm file data \a data of length \a len into the
+ Loads the QM file data \a data of length \a len into the
translator.
The data is not copied. The caller must be able to guarantee that \a data
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 8bf70cb..2ef9de4 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1905,7 +1905,7 @@ void QVariant::load(QDataStream &s)
create(static_cast<int>(u), 0);
d.is_null = is_null;
- if (d.type == QVariant::Invalid) {
+ if (!isValid()) {
// Since we wrote something, we should read something
QString x;
s >> x;
@@ -1949,7 +1949,7 @@ void QVariant::save(QDataStream &s) const
s << QMetaType::typeName(userType());
}
- if (d.type == QVariant::Invalid) {
+ if (!isValid()) {
s << QString();
return;
}
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 4d465dc..8f364ba 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -623,11 +623,7 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
#endif
if (!pHnd) {
#ifdef Q_OS_WIN
- QT_WA({
- hTempModule = ::LoadLibraryExW((wchar_t*)QDir::toNativeSeparators(fileName).utf16(), 0, DONT_RESOLVE_DLL_REFERENCES);
- } , {
- temporary_load = load_sys();
- });
+ hTempModule = ::LoadLibraryEx((wchar_t*)QDir::toNativeSeparators(fileName).utf16(), 0, DONT_RESOLVE_DLL_REFERENCES);
#else
temporary_load = load_sys();
#endif
@@ -641,7 +637,7 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
QtPluginQueryVerificationDataFunction qtPluginQueryVerificationDataFunction = hTempModule
? (QtPluginQueryVerificationDataFunction)
#ifdef Q_OS_WINCE
- ::GetProcAddressW(hTempModule, L"qt_plugin_query_verification_data")
+ ::GetProcAddress(hTempModule, L"qt_plugin_query_verification_data")
#else
::GetProcAddress(hTempModule, "qt_plugin_query_verification_data")
#endif
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
index 43eeafa..847c0d2 100644
--- a/src/corelib/plugin/qlibrary_win.cpp
+++ b/src/corelib/plugin/qlibrary_win.cpp
@@ -67,30 +67,18 @@ bool QLibraryPrivate::load_sys()
//avoid 'Bad Image' message box
UINT oldmode = SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
- QT_WA({
- pHnd = LoadLibraryW((TCHAR*)QDir::toNativeSeparators(attempt).utf16());
- } , {
- pHnd = LoadLibraryA(QFile::encodeName(QDir::toNativeSeparators(attempt)).data());
- });
-
+ pHnd = LoadLibrary((wchar_t*)QDir::toNativeSeparators(attempt).utf16());
+
if (pluginState != IsAPlugin) {
#if defined(Q_OS_WINCE)
if (!pHnd && ::GetLastError() == ERROR_MOD_NOT_FOUND) {
QString secondAttempt = fileName;
- QT_WA({
- pHnd = LoadLibraryW((TCHAR*)QDir::toNativeSeparators(secondAttempt).utf16());
- } , {
- pHnd = LoadLibraryA(QFile::encodeName(QDir::toNativeSeparators(secondAttempt)).data());
- });
+ pHnd = LoadLibrary((wchar_t*)QDir::toNativeSeparators(secondAttempt).utf16());
}
#endif
if (!pHnd && ::GetLastError() == ERROR_MOD_NOT_FOUND) {
attempt += QLatin1String(".dll");
- QT_WA({
- pHnd = LoadLibraryW((TCHAR*)QDir::toNativeSeparators(attempt).utf16());
- } , {
- pHnd = LoadLibraryA(QFile::encodeName(QDir::toNativeSeparators(attempt)).data());
- });
+ pHnd = LoadLibrary((wchar_t*)QDir::toNativeSeparators(attempt).utf16());
}
}
@@ -100,15 +88,11 @@ bool QLibraryPrivate::load_sys()
}
if (pHnd) {
errorString.clear();
- QT_WA({
- TCHAR buffer[MAX_PATH + 1];
- ::GetModuleFileNameW(pHnd, buffer, MAX_PATH);
- attempt = QString::fromUtf16(reinterpret_cast<const ushort *>(&buffer));
- }, {
- char buffer[MAX_PATH + 1];
- ::GetModuleFileNameA(pHnd, buffer, MAX_PATH);
- attempt = QString::fromLocal8Bit(buffer);
- });
+
+ wchar_t buffer[MAX_PATH];
+ ::GetModuleFileName(pHnd, buffer, MAX_PATH);
+ attempt = QString::fromWCharArray(buffer);
+
const QDir dir = QFileInfo(fileName).dir();
const QString realfilename = attempt.mid(attempt.lastIndexOf(QLatin1Char('\\')) + 1);
if (dir.path() == QLatin1String("."))
diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h
index ff2b412..233b4f9 100644
--- a/src/corelib/plugin/qplugin.h
+++ b/src/corelib/plugin/qplugin.h
@@ -63,21 +63,6 @@ typedef QObject *(*QtPluginInstanceFunction)();
void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunction function);
-struct qt_plugin_instance_deleter
-{
- qt_plugin_instance_deleter(QPointer<QObject> &instance)
- : instance_(instance)
- {
- }
-
- ~qt_plugin_instance_deleter()
- {
- delete instance_;
- }
-
- QPointer<QObject> &instance_;
-};
-
#define Q_IMPORT_PLUGIN(PLUGIN) \
extern QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGIN(); \
class Static##PLUGIN##PluginInstance{ \
@@ -91,10 +76,8 @@ struct qt_plugin_instance_deleter
#define Q_PLUGIN_INSTANCE(IMPLEMENTATION) \
{ \
static QT_PREPEND_NAMESPACE(QPointer)<QT_PREPEND_NAMESPACE(QObject)> _instance; \
- if (!_instance) { \
- static QT_PREPEND_NAMESPACE(qt_plugin_instance_deleter) deleter(_instance); \
+ if (!_instance) \
_instance = new IMPLEMENTATION; \
- } \
return _instance; \
}
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp
index 670aa7d..c040c58 100644
--- a/src/corelib/statemachine/qabstracttransition.cpp
+++ b/src/corelib/statemachine/qabstracttransition.cpp
@@ -330,6 +330,18 @@ QList<QAbstractAnimation*> QAbstractTransition::animations() const
This function is called to determine whether the given \a event should cause
this transition to trigger. Reimplement this function and return true if the
event should trigger the transition, otherwise return false.
+
+
+ Note that \a event is a QWrappedEvent, which contains a clone of
+ the event generated by Qt. For instance, if you want to check a
+ key press event, do the following:
+
+ \snippet doc/src/snippets/statemachine/eventtest.cpp 0
+
+ You need to check if \a event is a QWrappedEvent because Qt also
+ uses other events for internal reasons; you don't need to concern
+ yourself with these in any case.
+
*/
/*!
diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp
index f2022a5..ae79735 100644
--- a/src/corelib/thread/qmutex_win.cpp
+++ b/src/corelib/thread/qmutex_win.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <windows.h>
+#include <qt_windows.h>
#include "qmutex.h"
#include <qatomic.h>
@@ -50,19 +50,7 @@ QT_BEGIN_NAMESPACE
QMutexPrivate::QMutexPrivate(QMutex::RecursionMode mode)
: recursive(mode == QMutex::Recursive), contenders(0), lastSpinCount(0), owner(0), count(0)
{
- if (QSysInfo::WindowsVersion == 0) {
- // mutex was created before initializing WindowsVersion. this
- // can happen when creating the resource file engine handler,
- // for example. try again with just the A version
-#ifdef Q_OS_WINCE
- event = CreateEventW(0, FALSE, FALSE, 0);
-#else
- event = CreateEventA(0, FALSE, FALSE, 0);
-#endif
- } else {
- event = QT_WA_INLINE(CreateEventW(0, FALSE, FALSE, 0),
- CreateEventA(0, FALSE, FALSE, 0));
- }
+ event = CreateEvent(0, FALSE, FALSE, 0);
if (!event)
qWarning("QMutexPrivate::QMutexPrivate: Cannot create event");
}
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 24522f2..2e31c6d 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -261,9 +261,14 @@ void QAdoptedThread::run()
Returns the thread handle of the currently executing thread.
\warning The handle returned by this function is used for internal
- purposes and should not be used in any application code. On
- Windows, the returned value is a pseudo-handle for the current
- thread that cannot be used for numerical comparison.
+ purposes and should not be used in any application code.
+
+ \warning On Windows, the returned value is a pseudo-handle for the
+ current thread. It can't be used for numerical comparison. i.e.,
+ this function returns the DWORD (Windows-Thread ID) returned by
+ the Win32 function getCurrentThreadId(), not the HANDLE
+ (Windows-Thread HANDLE) returned by the Win32 function
+ getCurrentThread().
*/
/*!
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index b5bdba3..32b680e 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -54,7 +54,7 @@
#include <private/qcoreapplication_p.h>
#include <private/qeventdispatcher_win_p.h>
-#include <windows.h>
+#include <qt_windows.h>
#ifndef Q_OS_WINCE
@@ -163,8 +163,7 @@ void qt_watch_adopted_thread(const HANDLE adoptedThreadHandle, QThread *qthread)
// Start watcher thread if it is not already running.
if (qt_adopted_thread_watcher_handle == 0) {
if (qt_adopted_thread_wakeup == 0) {
- qt_adopted_thread_wakeup = QT_WA_INLINE(CreateEventW(0, false, false, 0),
- CreateEventA(0, false, false, 0));
+ qt_adopted_thread_wakeup = CreateEvent(0, false, false, 0);
qt_adopted_thread_handles.prepend(qt_adopted_thread_wakeup);
}
@@ -364,11 +363,10 @@ int QThread::idealThreadCount()
void QThread::yieldCurrentThread()
{
#ifndef Q_OS_WINCE
- if (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)
- SwitchToThread();
- else
+ SwitchToThread();
+#else
+ ::Sleep(0);
#endif
- ::Sleep(0);
}
void QThread::sleep(unsigned long secs)
@@ -419,17 +417,11 @@ void QThread::start(Priority priority)
return;
}
- // Since Win 9x will have problems if the priority is idle or time critical
- // we have to use the closest one instead
int prio;
d->priority = priority;
switch (d->priority) {
case IdlePriority:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- prio = THREAD_PRIORITY_LOWEST;
- } else {
- prio = THREAD_PRIORITY_IDLE;
- }
+ prio = THREAD_PRIORITY_IDLE;
break;
case LowestPriority:
@@ -453,11 +445,7 @@ void QThread::start(Priority priority)
break;
case TimeCriticalPriority:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- prio = THREAD_PRIORITY_HIGHEST;
- } else {
- prio = THREAD_PRIORITY_TIME_CRITICAL;
- }
+ prio = THREAD_PRIORITY_TIME_CRITICAL;
break;
case InheritPriority:
@@ -563,17 +551,11 @@ void QThread::setPriority(Priority priority)
// copied from start() with a few modifications:
- // Since Win 9x will have problems if the priority is idle or time critical
- // we have to use the closest one instead
int prio;
d->priority = priority;
switch (d->priority) {
case IdlePriority:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- prio = THREAD_PRIORITY_LOWEST;
- } else {
- prio = THREAD_PRIORITY_IDLE;
- }
+ prio = THREAD_PRIORITY_IDLE;
break;
case LowestPriority:
@@ -597,11 +579,7 @@ void QThread::setPriority(Priority priority)
break;
case TimeCriticalPriority:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- prio = THREAD_PRIORITY_HIGHEST;
- } else {
- prio = THREAD_PRIORITY_TIME_CRITICAL;
- }
+ prio = THREAD_PRIORITY_TIME_CRITICAL;
break;
case InheritPriority:
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp
index 9129fb6..b0146d2 100644
--- a/src/corelib/thread/qwaitcondition_win.cpp
+++ b/src/corelib/thread/qwaitcondition_win.cpp
@@ -64,11 +64,7 @@ class QWaitConditionEvent
public:
inline QWaitConditionEvent() : priority(0), wokenUp(false)
{
- QT_WA ({
- event = CreateEvent(NULL, TRUE, FALSE, NULL);
- }, {
- event = CreateEventA(NULL, TRUE, FALSE, NULL);
- });
+ event = CreateEvent(NULL, TRUE, FALSE, NULL);
}
inline ~QWaitConditionEvent() { CloseHandle(event); }
int priority;
diff --git a/src/corelib/tools/qbytedata_p.h b/src/corelib/tools/qbytedata_p.h
new file mode 100644
index 0000000..cc10ea2
--- /dev/null
+++ b/src/corelib/tools/qbytedata_p.h
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBYTEDATA_H
+#define QBYTEDATA_H
+
+#include <qbytearray.h>
+
+
+QT_BEGIN_NAMESPACE
+
+// this class handles a list of QByteArrays. It is a variant of QRingBuffer
+// that avoid malloc/realloc/memcpy.
+class QByteDataBuffer
+{
+private:
+ QList<QByteArray> buffers;
+ qint64 bufferCompleteSize;
+public:
+ QByteDataBuffer() : bufferCompleteSize(0)
+ {
+ }
+
+ ~QByteDataBuffer()
+ {
+ clear();
+ }
+
+ inline void append(QByteDataBuffer& other)
+ {
+ if (other.isEmpty())
+ return;
+
+ buffers.append(other.buffers);
+ bufferCompleteSize += other.byteAmount();
+ }
+
+
+ inline void append(QByteArray& bd)
+ {
+ if (bd.isEmpty())
+ return;
+
+ buffers.append(bd);
+ bufferCompleteSize += bd.size();
+ }
+
+ inline void prepend(QByteArray& bd)
+ {
+ if (bd.isEmpty())
+ return;
+
+ buffers.prepend(bd);
+ bufferCompleteSize += bd.size();
+ }
+
+ // return the first QByteData. User of this function has to qFree() its .data!
+ // preferably use this function to read data.
+ inline QByteArray read()
+ {
+ bufferCompleteSize -= buffers.first().size();
+ return buffers.takeFirst();
+ }
+
+ // return everything. User of this function has to qFree() its .data!
+ // avoid to use this, it might malloc and memcpy.
+ inline QByteArray readAll()
+ {
+ return read(byteAmount());
+ }
+
+ // return amount. User of this function has to qFree() its .data!
+ // avoid to use this, it might malloc and memcpy.
+ inline QByteArray read(qint64 amount)
+ {
+ amount = qMin(byteAmount(), amount);
+ QByteArray byteData;
+ byteData.resize(amount);
+ read(byteData.data(), byteData.size());
+ return byteData;
+ }
+
+ // return amount bytes. User of this function has to qFree() its .data!
+ // avoid to use this, it will memcpy.
+ qint64 read(char* dst, qint64 amount)
+ {
+ amount = qMin(amount, byteAmount());
+ qint64 originalAmount = amount;
+ char *writeDst = dst;
+
+ while (amount > 0) {
+ QByteArray first = buffers.takeFirst();
+ if (amount >= first.size()) {
+ // take it completely
+ bufferCompleteSize -= first.size();
+ amount -= first.size();
+ memcpy(writeDst, first.constData(), first.size());
+ writeDst += first.size();
+ first.clear();
+ } else {
+ // take a part of it & it is the last one to take
+ bufferCompleteSize -= amount;
+ memcpy(writeDst, first.constData(), amount);
+
+ qint64 newFirstSize = first.size() - amount;
+ QByteArray newFirstData;
+ newFirstData.resize(newFirstSize);
+ memcpy(newFirstData.data(), first.constData() + amount, newFirstSize);
+ buffers.prepend(newFirstData);
+
+ amount = 0;
+ first.clear();
+ }
+ }
+
+ return originalAmount;
+ }
+
+ inline char getChar()
+ {
+ char c;
+ read(&c, 1);
+ return c;
+ }
+
+ inline void clear()
+ {
+ buffers.clear();
+ bufferCompleteSize = 0;
+ }
+
+ // The byte count of all QByteArrays
+ inline qint64 byteAmount() const
+ {
+ return bufferCompleteSize;
+ }
+
+ // the number of QByteArrays
+ inline qint64 bufferCount() const
+ {
+ return buffers.length();
+ }
+
+ inline bool isEmpty() const
+ {
+ return byteAmount() == 0;
+ }
+
+ inline qint64 sizeNextBlock() const
+ {
+ if(buffers.isEmpty())
+ return 0;
+ else
+ return buffers.first().size();
+ }
+
+ inline QByteArray& operator[](int i)
+ {
+ return buffers[i];
+ }
+};
+
+QT_END_NAMESPACE
+
+#endif // QBYTEDATA_H
diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp
index e738ec8..f42b7a0 100644
--- a/src/corelib/tools/qcontiguouscache.cpp
+++ b/src/corelib/tools/qcontiguouscache.cpp
@@ -61,6 +61,7 @@ void QContiguousCacheData::dump() const
\ingroup tools
\ingroup shared
\reentrant
+ \since 4.6
The QContiguousCache class provides an efficient way of caching items for
display in a user interface view. Unlike QCache, it adds a restriction
@@ -95,7 +96,7 @@ MyRecord record(int row) const
in the case where the requested row is a long way from the currently cached
items. If there is a gap between where the new item is inserted and the currently
cached items then the existing cached items are first removed to retain
- the contiguous nature of the cache. Hence it is important to take some care then
+ the contiguous nature of the cache. Hence it is important to take some care then
when using insert() in order to avoid unwanted clearing of the cache.
The range of valid indexes for the QContiguousCache class are from
@@ -104,9 +105,9 @@ MyRecord record(int row) const
than INT_MAX can result in the indexes of the cache being invalid.
When the cache indexes are invalid it is important to call
normalizeIndexes() before calling any of containsIndex(), firstIndex(),
- lastIndex(), at() or the [] operator. Calling these
- functions when the cache has invalid indexes will result in undefined
- behavior. The indexes can be checked by using areIndexesValid()
+ lastIndex(), at() or \l{QContiguousCache::operator[]()}{operator[]()}.
+ Calling these functions when the cache has invalid indexes will result in
+ undefined behavior. The indexes can be checked by using areIndexesValid()
In most cases the indexes will not exceed 0 to INT_MAX, and
normalizeIndexes() will not need to be used.
@@ -190,8 +191,6 @@ MyRecord record(int row) const
/*! \fn int QContiguousCache::count() const
- \overload
-
Same as size().
*/
@@ -258,14 +257,15 @@ MyRecord record(int row) const
/*! \fn T &QContiguousCache::operator[](int i)
- Returns the item at index position \a i as a modifiable reference. If
+ Returns the item at index position \a i as a modifiable reference. If
the cache does not contain an item at the given index position \a i
then it will first insert an empty item at that position.
In most cases it is better to use either at() or insert().
- Note that using non-const operators can cause QContiguousCache to do a deep
- copy.
+ \note This non-const overload of operator[] requires QContiguousCache
+ to make a deep copy. Use at() for read-only access to a non-const
+ QContiguousCache.
\sa insert(), at()
*/
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 6674717..2c2418c 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -49,7 +49,7 @@
#include "qregexp.h"
#include "qdebug.h"
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
-#include <windows.h>
+#include <qt_windows.h>
#endif
#ifndef Q_WS_WIN
#include <locale.h>
@@ -2503,16 +2503,9 @@ QString QDateTime::toString(Qt::DateFormat f) const
buf += QLatin1Char(' ');
buf += QString::number(d->date.day());
#else
- QString winstr;
- QT_WA({
- TCHAR out[255];
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ILDATE, out, 255);
- winstr = QString::fromUtf16((ushort*)out);
- } , {
- char out[255];
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ILDATE, (char*)&out, 255);
- winstr = QString::fromLocal8Bit(out);
- });
+ wchar_t out[255];
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ILDATE, out, 255);
+ QString winstr = QString::fromWCharArray(out);
switch (winstr.toInt()) {
case 1:
buf = d->date.shortDayName(d->date.dayOfWeek());
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 8c1a0ff..296d5a0 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -386,15 +386,8 @@ static QString winIso3116CtryName(LCID id = LOCALE_USER_DEFAULT);
static QString getWinLocaleInfo(LCTYPE type)
{
- int cnt = 0;
-
LCID id = GetUserDefaultLCID();
-
- QT_WA({
- cnt = GetLocaleInfoW(id, type, 0, 0)*2;
- } , {
- cnt = GetLocaleInfoA(id, type, 0, 0);
- });
+ int cnt = GetLocaleInfo(id, type, 0, 0) * 2;
if (cnt == 0) {
qWarning("QLocale: empty windows locale info (%d)", (int)type);
@@ -403,27 +396,14 @@ static QString getWinLocaleInfo(LCTYPE type)
QByteArray buff(cnt, 0);
- QT_WA({
- cnt = GetLocaleInfoW(id, type,
- reinterpret_cast<wchar_t*>(buff.data()),
- buff.size()/2);
- } , {
- cnt = GetLocaleInfoA(id, type,
- buff.data(), buff.size());
- });
+ cnt = GetLocaleInfo(id, type, reinterpret_cast<wchar_t*>(buff.data()), buff.size() / 2);
if (cnt == 0) {
qWarning("QLocale: empty windows locale info (%d)", (int)type);
return QString();
}
- QString result;
- QT_WA({
- result = QString::fromUtf16(reinterpret_cast<ushort*>(buff.data()));
- } , {
- result = QString::fromLocal8Bit(buff.data());
- });
- return result;
+ return QString::fromWCharArray(reinterpret_cast<const wchar_t *>(buff.data()));
}
QByteArray getWinLocaleName(LCID id = LOCALE_USER_DEFAULT)
@@ -433,8 +413,8 @@ QByteArray getWinLocaleName(LCID id = LOCALE_USER_DEFAULT)
result = envVarLocale();
QChar lang[3];
QChar cntry[2];
- if ( result == "C" || !result.isEmpty()
- && splitLocaleName(QString::fromLocal8Bit(result), lang, cntry) ) {
+ if ( result == "C" || (!result.isEmpty()
+ && splitLocaleName(QString::fromLocal8Bit(result), lang, cntry)) ) {
long id = 0;
bool ok = false;
id = qstrtoll(result.data(), 0, 0, &ok);
@@ -445,20 +425,19 @@ QByteArray getWinLocaleName(LCID id = LOCALE_USER_DEFAULT)
}
}
- if (QSysInfo::WindowsVersion == QSysInfo::WV_95
- || (QSysInfo::WindowsVersion & QSysInfo::WV_CE_based)) {
- result = winLangCodeToIsoName(id != LOCALE_USER_DEFAULT ? id : GetUserDefaultLCID());
- } else {
- if (id == LOCALE_USER_DEFAULT)
- id = GetUserDefaultLCID();
- QString resultuage = winIso639LangName(id);
- QString country = winIso3116CtryName(id);
- result = resultuage.toLatin1();
- if (!country.isEmpty()) {
- result += '_';
- result += country.toLatin1();
- }
+#if defined(Q_OS_WINCE)
+ result = winLangCodeToIsoName(id != LOCALE_USER_DEFAULT ? id : GetUserDefaultLCID());
+#else
+ if (id == LOCALE_USER_DEFAULT)
+ id = GetUserDefaultLCID();
+ QString resultuage = winIso639LangName(id);
+ QString country = winIso3116CtryName(id);
+ result = resultuage.toLatin1();
+ if (!country.isEmpty()) {
+ result += '_';
+ result += country.toLatin1();
}
+#endif
return result;
}
@@ -544,15 +523,9 @@ static QString winDateToString(const QDate &date, DWORD flags)
LCID id = GetUserDefaultLCID();
- QT_WA({
- TCHAR buf[255];
- if (GetDateFormatW(id, flags, &st, 0, buf, 255))
- return QString::fromUtf16((ushort*)buf);
- } , {
- char buf[255];
- if (GetDateFormatA(id, flags, &st, 0, (char*)&buf, 255))
- return QString::fromLocal8Bit(buf);
- });
+ wchar_t buf[255];
+ if (GetDateFormat(id, flags, &st, 0, buf, 255))
+ return QString::fromWCharArray(buf);
return QString();
}
@@ -569,15 +542,9 @@ static QString winTimeToString(const QTime &time)
DWORD flags = 0;
LCID id = GetUserDefaultLCID();
- QT_WA({
- TCHAR buf[255];
- if (GetTimeFormatW(id, flags, &st, 0, buf, 255))
- return QString::fromUtf16((ushort*)buf);
- } , {
- char buf[255];
- if (GetTimeFormatA(id, flags, &st, 0, (char*)&buf, 255))
- return QString::fromLocal8Bit(buf);
- });
+ wchar_t buf[255];
+ if (GetTimeFormat(id, flags, &st, 0, buf, 255))
+ return QString::fromWCharArray(buf);
return QString();
}
@@ -626,12 +593,10 @@ static QString winMonthName(int month, bool short_format)
static QLocale::MeasurementSystem winSystemMeasurementSystem()
{
LCID id = GetUserDefaultLCID();
- TCHAR output[2];
+ wchar_t output[2];
if (GetLocaleInfo(id, LOCALE_IMEASURE, output, 2)) {
- QString iMeasure = QT_WA_INLINE(
- QString::fromUtf16(reinterpret_cast<ushort*>(output)),
- QString::fromLocal8Bit(reinterpret_cast<char*>(output)));
+ QString iMeasure = QString::fromWCharArray(output);
if (iMeasure == QLatin1String("1")) {
return QLocale::ImperialSystem;
}
@@ -643,12 +608,10 @@ static QLocale::MeasurementSystem winSystemMeasurementSystem()
static QString winSystemAMText()
{
LCID id = GetUserDefaultLCID();
- TCHAR output[15]; // maximum length including terminating zero character for Win2003+
+ wchar_t output[15]; // maximum length including terminating zero character for Win2003+
if (GetLocaleInfo(id, LOCALE_S1159, output, 15)) {
- return QT_WA_INLINE(
- QString::fromUtf16(reinterpret_cast<ushort*>(output)),
- QString::fromLocal8Bit(reinterpret_cast<char*>(output)));
+ return QString::fromWCharArray(output);
}
return QString();
@@ -657,12 +620,10 @@ static QString winSystemAMText()
static QString winSystemPMText()
{
LCID id = GetUserDefaultLCID();
- TCHAR output[15]; // maximum length including terminating zero character for Win2003+
+ wchar_t output[15]; // maximum length including terminating zero character for Win2003+
if (GetLocaleInfo(id, LOCALE_S2359, output, 15)) {
- return QT_WA_INLINE(
- QString::fromUtf16(reinterpret_cast<ushort*>(output)),
- QString::fromLocal8Bit(reinterpret_cast<char*>(output)));
+ return QString::fromWCharArray(output);
}
return QString();
@@ -766,9 +727,6 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
return QVariant();
}
-/* Win95 doesn't have a function to return the ISO lang/country name of the user's locale.
- Instead it can return a "Windows code". This maps windows codes to ISO country names. */
-
struct WindowsToISOListElt {
ushort windows_code;
char iso_name[6];
@@ -924,15 +882,9 @@ static QString winIso639LangName(LCID id)
// Windows returns the wrong ISO639 for some languages, we need to detect them here using
// the language code
QString lang_code;
- QT_WA({
- TCHAR out[256];
- if (GetLocaleInfoW(id, LOCALE_ILANGUAGE, out, 255))
- lang_code = QString::fromUtf16((ushort*)out);
- } , {
- char out[256];
- if (GetLocaleInfoA(id, LOCALE_ILANGUAGE, out, 255))
- lang_code = QString::fromLocal8Bit(out);
- });
+ wchar_t out[256];
+ if (GetLocaleInfo(id, LOCALE_ILANGUAGE, out, 255))
+ lang_code = QString::fromWCharArray(out);
if (!lang_code.isEmpty()) {
const char *endptr;
@@ -954,15 +906,8 @@ static QString winIso639LangName(LCID id)
return result;
// not one of the problematic languages - do the usual lookup
- QT_WA({
- TCHAR out[256];
- if (GetLocaleInfoW(id, LOCALE_SISO639LANGNAME , out, 255))
- result = QString::fromUtf16((ushort*)out);
- } , {
- char out[256];
- if (GetLocaleInfoA(id, LOCALE_SISO639LANGNAME, out, 255))
- result = QString::fromLocal8Bit(out);
- });
+ if (GetLocaleInfo(id, LOCALE_SISO639LANGNAME , out, 255))
+ result = QString::fromWCharArray(out);
return result;
}
@@ -971,15 +916,9 @@ static QString winIso3116CtryName(LCID id)
{
QString result;
- QT_WA({
- TCHAR out[256];
- if (GetLocaleInfoW(id, LOCALE_SISO3166CTRYNAME, out, 255))
- result = QString::fromUtf16((ushort*)out);
- } , {
- char out[256];
- if (GetLocaleInfoA(id, LOCALE_SISO3166CTRYNAME, out, 255))
- result = QString::fromLocal8Bit(out);
- });
+ wchar_t out[256];
+ if (GetLocaleInfo(id, LOCALE_SISO3166CTRYNAME, out, 255))
+ result = QString::fromWCharArray(out);
return result;
}
@@ -2689,7 +2628,7 @@ static QString timeZone()
DWORD res = GetTimeZoneInformation(&info);
if (res == TIME_ZONE_ID_UNKNOWN)
return QString();
- return QString::fromUtf16(reinterpret_cast<const ushort *> (info.StandardName));
+ return QString::fromWCharArray(info.StandardName);
#elif defined(Q_OS_WIN)
_tzset();
# if defined(_MSC_VER) && _MSC_VER >= 1400
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index 49afdca..af60f52 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -444,6 +444,8 @@ QDebug operator<<(QDebug d, const QPointF &p)
/*!
+ \since 4.6
+
Returns the sum of the absolute values of x() and y(),
traditionally known as the "Manhattan length" of the vector from
the origin to the point.
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 3108f31..3527308 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -70,6 +70,8 @@ int qFindString(const QChar *haystack, int haystackLen, int from,
#define RXERR_LEFTDELIM QT_TRANSLATE_NOOP("QRegExp", "missing left delim")
#define RXERR_END QT_TRANSLATE_NOOP("QRegExp", "unexpected end")
#define RXERR_LIMIT QT_TRANSLATE_NOOP("QRegExp", "met internal limit")
+#define RXERR_INTERVAL QT_TRANSLATE_NOOP("QRegExp", "invalid interval")
+#define RXERR_CATEGORY QT_TRANSLATE_NOOP("QRegExp", "invalid category")
/*
WARNING! Be sure to read qregexp.tex before modifying this file.
@@ -1116,6 +1118,7 @@ private:
bool valid; // is the regular expression valid?
Qt::CaseSensitivity cs; // case sensitive?
bool greedyQuantifiers; // RegExp2?
+ bool xmlSchemaExtensions;
#ifndef QT_NO_REGEXP_BACKREF
int nbrefs; // number of back-references
#endif
@@ -1193,6 +1196,8 @@ private:
friend class Box;
+ void setupCategoriesRangeMap();
+
/*
This is the lexical analyzer for regular expressions.
*/
@@ -1232,6 +1237,7 @@ private:
int yyTok; // the last token read
bool yyMayCapture; // set this to false to disable capturing
+ QHash<QByteArray, QPair<int, int> > categoriesRangeMap; // fast lookup hash for xml schema extensions
friend struct QRegExpMatchState;
};
@@ -1253,7 +1259,8 @@ struct QRegExpLookahead
#endif
QRegExpEngine::QRegExpEngine(const QRegExpEngineKey &key)
- : cs(key.cs), greedyQuantifiers(key.patternSyntax == QRegExp::RegExp2)
+ : cs(key.cs), greedyQuantifiers(key.patternSyntax == QRegExp::RegExp2),
+ xmlSchemaExtensions(false)
{
setup();
@@ -1268,6 +1275,8 @@ QRegExpEngine::QRegExpEngine(const QRegExpEngineKey &key)
case QRegExp::FixedString:
rx = QRegExp::escape(key.pattern);
break;
+ case QRegExp::W3CXmlSchema11:
+ xmlSchemaExtensions = true;
default:
rx = key.pattern;
}
@@ -1479,9 +1488,8 @@ int QRegExpEngine::anchorAlternation(int a, int b)
return Anchor_Alternation | (n - 1);
#endif
- aa.resize(n + 1);
- aa[n].a = a;
- aa[n].b = b;
+ QRegExpAnchorAlternation element = {a, b};
+ aa.append(element);
return Anchor_Alternation | n;
}
@@ -2621,6 +2629,152 @@ void QRegExpEngine::Box::addAnchorsToEngine(const Box &to) const
}
}
+void QRegExpEngine::setupCategoriesRangeMap()
+{
+ categoriesRangeMap.insert("IsBasicLatin", qMakePair(0x0000, 0x007F));
+ categoriesRangeMap.insert("IsLatin-1Supplement", qMakePair(0x0080, 0x00FF));
+ categoriesRangeMap.insert("IsLatinExtended-A", qMakePair(0x0100, 0x017F));
+ categoriesRangeMap.insert("IsLatinExtended-B", qMakePair(0x0180, 0x024F));
+ categoriesRangeMap.insert("IsIPAExtensions", qMakePair(0x0250, 0x02AF));
+ categoriesRangeMap.insert("IsSpacingModifierLetters", qMakePair(0x02B0, 0x02FF));
+ categoriesRangeMap.insert("IsCombiningDiacriticalMarks", qMakePair(0x0300, 0x036F));
+ categoriesRangeMap.insert("IsGreek", qMakePair(0x0370, 0x03FF));
+ categoriesRangeMap.insert("IsCyrillic", qMakePair(0x0400, 0x04FF));
+ categoriesRangeMap.insert("IsCyrillicSupplement", qMakePair(0x0500, 0x052F));
+ categoriesRangeMap.insert("IsArmenian", qMakePair(0x0530, 0x058F));
+ categoriesRangeMap.insert("IsHebrew", qMakePair(0x0590, 0x05FF));
+ categoriesRangeMap.insert("IsArabic", qMakePair(0x0600, 0x06FF));
+ categoriesRangeMap.insert("IsSyriac", qMakePair(0x0700, 0x074F));
+ categoriesRangeMap.insert("IsArabicSupplement", qMakePair(0x0750, 0x077F));
+ categoriesRangeMap.insert("IsThaana", qMakePair(0x0780, 0x07BF));
+ categoriesRangeMap.insert("IsDevanagari", qMakePair(0x0900, 0x097F));
+ categoriesRangeMap.insert("IsBengali", qMakePair(0x0980, 0x09FF));
+ categoriesRangeMap.insert("IsGurmukhi", qMakePair(0x0A00, 0x0A7F));
+ categoriesRangeMap.insert("IsGujarati", qMakePair(0x0A80, 0x0AFF));
+ categoriesRangeMap.insert("IsOriya", qMakePair(0x0B00, 0x0B7F));
+ categoriesRangeMap.insert("IsTamil", qMakePair(0x0B80, 0x0BFF));
+ categoriesRangeMap.insert("IsTelugu", qMakePair(0x0C00, 0x0C7F));
+ categoriesRangeMap.insert("IsKannada", qMakePair(0x0C80, 0x0CFF));
+ categoriesRangeMap.insert("IsMalayalam", qMakePair(0x0D00, 0x0D7F));
+ categoriesRangeMap.insert("IsSinhala", qMakePair(0x0D80, 0x0DFF));
+ categoriesRangeMap.insert("IsThai", qMakePair(0x0E00, 0x0E7F));
+ categoriesRangeMap.insert("IsLao", qMakePair(0x0E80, 0x0EFF));
+ categoriesRangeMap.insert("IsTibetan", qMakePair(0x0F00, 0x0FFF));
+ categoriesRangeMap.insert("IsMyanmar", qMakePair(0x1000, 0x109F));
+ categoriesRangeMap.insert("IsGeorgian", qMakePair(0x10A0, 0x10FF));
+ categoriesRangeMap.insert("IsHangulJamo", qMakePair(0x1100, 0x11FF));
+ categoriesRangeMap.insert("IsEthiopic", qMakePair(0x1200, 0x137F));
+ categoriesRangeMap.insert("IsEthiopicSupplement", qMakePair(0x1380, 0x139F));
+ categoriesRangeMap.insert("IsCherokee", qMakePair(0x13A0, 0x13FF));
+ categoriesRangeMap.insert("IsUnifiedCanadianAboriginalSyllabics", qMakePair(0x1400, 0x167F));
+ categoriesRangeMap.insert("IsOgham", qMakePair(0x1680, 0x169F));
+ categoriesRangeMap.insert("IsRunic", qMakePair(0x16A0, 0x16FF));
+ categoriesRangeMap.insert("IsTagalog", qMakePair(0x1700, 0x171F));
+ categoriesRangeMap.insert("IsHanunoo", qMakePair(0x1720, 0x173F));
+ categoriesRangeMap.insert("IsBuhid", qMakePair(0x1740, 0x175F));
+ categoriesRangeMap.insert("IsTagbanwa", qMakePair(0x1760, 0x177F));
+ categoriesRangeMap.insert("IsKhmer", qMakePair(0x1780, 0x17FF));
+ categoriesRangeMap.insert("IsMongolian", qMakePair(0x1800, 0x18AF));
+ categoriesRangeMap.insert("IsLimbu", qMakePair(0x1900, 0x194F));
+ categoriesRangeMap.insert("IsTaiLe", qMakePair(0x1950, 0x197F));
+ categoriesRangeMap.insert("IsNewTaiLue", qMakePair(0x1980, 0x19DF));
+ categoriesRangeMap.insert("IsKhmerSymbols", qMakePair(0x19E0, 0x19FF));
+ categoriesRangeMap.insert("IsBuginese", qMakePair(0x1A00, 0x1A1F));
+ categoriesRangeMap.insert("IsPhoneticExtensions", qMakePair(0x1D00, 0x1D7F));
+ categoriesRangeMap.insert("IsPhoneticExtensionsSupplement", qMakePair(0x1D80, 0x1DBF));
+ categoriesRangeMap.insert("IsCombiningDiacriticalMarksSupplement", qMakePair(0x1DC0, 0x1DFF));
+ categoriesRangeMap.insert("IsLatinExtendedAdditional", qMakePair(0x1E00, 0x1EFF));
+ categoriesRangeMap.insert("IsGreekExtended", qMakePair(0x1F00, 0x1FFF));
+ categoriesRangeMap.insert("IsGeneralPunctuation", qMakePair(0x2000, 0x206F));
+ categoriesRangeMap.insert("IsSuperscriptsandSubscripts", qMakePair(0x2070, 0x209F));
+ categoriesRangeMap.insert("IsCurrencySymbols", qMakePair(0x20A0, 0x20CF));
+ categoriesRangeMap.insert("IsCombiningMarksforSymbols", qMakePair(0x20D0, 0x20FF));
+ categoriesRangeMap.insert("IsLetterlikeSymbols", qMakePair(0x2100, 0x214F));
+ categoriesRangeMap.insert("IsNumberForms", qMakePair(0x2150, 0x218F));
+ categoriesRangeMap.insert("IsArrows", qMakePair(0x2190, 0x21FF));
+ categoriesRangeMap.insert("IsMathematicalOperators", qMakePair(0x2200, 0x22FF));
+ categoriesRangeMap.insert("IsMiscellaneousTechnical", qMakePair(0x2300, 0x23FF));
+ categoriesRangeMap.insert("IsControlPictures", qMakePair(0x2400, 0x243F));
+ categoriesRangeMap.insert("IsOpticalCharacterRecognition", qMakePair(0x2440, 0x245F));
+ categoriesRangeMap.insert("IsEnclosedAlphanumerics", qMakePair(0x2460, 0x24FF));
+ categoriesRangeMap.insert("IsBoxDrawing", qMakePair(0x2500, 0x257F));
+ categoriesRangeMap.insert("IsBlockElements", qMakePair(0x2580, 0x259F));
+ categoriesRangeMap.insert("IsGeometricShapes", qMakePair(0x25A0, 0x25FF));
+ categoriesRangeMap.insert("IsMiscellaneousSymbols", qMakePair(0x2600, 0x26FF));
+ categoriesRangeMap.insert("IsDingbats", qMakePair(0x2700, 0x27BF));
+ categoriesRangeMap.insert("IsMiscellaneousMathematicalSymbols-A", qMakePair(0x27C0, 0x27EF));
+ categoriesRangeMap.insert("IsSupplementalArrows-A", qMakePair(0x27F0, 0x27FF));
+ categoriesRangeMap.insert("IsBraillePatterns", qMakePair(0x2800, 0x28FF));
+ categoriesRangeMap.insert("IsSupplementalArrows-B", qMakePair(0x2900, 0x297F));
+ categoriesRangeMap.insert("IsMiscellaneousMathematicalSymbols-B", qMakePair(0x2980, 0x29FF));
+ categoriesRangeMap.insert("IsSupplementalMathematicalOperators", qMakePair(0x2A00, 0x2AFF));
+ categoriesRangeMap.insert("IsMiscellaneousSymbolsandArrows", qMakePair(0x2B00, 0x2BFF));
+ categoriesRangeMap.insert("IsGlagolitic", qMakePair(0x2C00, 0x2C5F));
+ categoriesRangeMap.insert("IsCoptic", qMakePair(0x2C80, 0x2CFF));
+ categoriesRangeMap.insert("IsGeorgianSupplement", qMakePair(0x2D00, 0x2D2F));
+ categoriesRangeMap.insert("IsTifinagh", qMakePair(0x2D30, 0x2D7F));
+ categoriesRangeMap.insert("IsEthiopicExtended", qMakePair(0x2D80, 0x2DDF));
+ categoriesRangeMap.insert("IsSupplementalPunctuation", qMakePair(0x2E00, 0x2E7F));
+ categoriesRangeMap.insert("IsCJKRadicalsSupplement", qMakePair(0x2E80, 0x2EFF));
+ categoriesRangeMap.insert("IsKangxiRadicals", qMakePair(0x2F00, 0x2FDF));
+ categoriesRangeMap.insert("IsIdeographicDescriptionCharacters", qMakePair(0x2FF0, 0x2FFF));
+ categoriesRangeMap.insert("IsCJKSymbolsandPunctuation", qMakePair(0x3000, 0x303F));
+ categoriesRangeMap.insert("IsHiragana", qMakePair(0x3040, 0x309F));
+ categoriesRangeMap.insert("IsKatakana", qMakePair(0x30A0, 0x30FF));
+ categoriesRangeMap.insert("IsBopomofo", qMakePair(0x3100, 0x312F));
+ categoriesRangeMap.insert("IsHangulCompatibilityJamo", qMakePair(0x3130, 0x318F));
+ categoriesRangeMap.insert("IsKanbun", qMakePair(0x3190, 0x319F));
+ categoriesRangeMap.insert("IsBopomofoExtended", qMakePair(0x31A0, 0x31BF));
+ categoriesRangeMap.insert("IsCJKStrokes", qMakePair(0x31C0, 0x31EF));
+ categoriesRangeMap.insert("IsKatakanaPhoneticExtensions", qMakePair(0x31F0, 0x31FF));
+ categoriesRangeMap.insert("IsEnclosedCJKLettersandMonths", qMakePair(0x3200, 0x32FF));
+ categoriesRangeMap.insert("IsCJKCompatibility", qMakePair(0x3300, 0x33FF));
+ categoriesRangeMap.insert("IsCJKUnifiedIdeographsExtensionA", qMakePair(0x3400, 0x4DB5));
+ categoriesRangeMap.insert("IsYijingHexagramSymbols", qMakePair(0x4DC0, 0x4DFF));
+ categoriesRangeMap.insert("IsCJKUnifiedIdeographs", qMakePair(0x4E00, 0x9FFF));
+ categoriesRangeMap.insert("IsYiSyllables", qMakePair(0xA000, 0xA48F));
+ categoriesRangeMap.insert("IsYiRadicals", qMakePair(0xA490, 0xA4CF));
+ categoriesRangeMap.insert("IsModifierToneLetters", qMakePair(0xA700, 0xA71F));
+ categoriesRangeMap.insert("IsSylotiNagri", qMakePair(0xA800, 0xA82F));
+ categoriesRangeMap.insert("IsHangulSyllables", qMakePair(0xAC00, 0xD7A3));
+ categoriesRangeMap.insert("IsPrivateUse", qMakePair(0xE000, 0xF8FF));
+ categoriesRangeMap.insert("IsCJKCompatibilityIdeographs", qMakePair(0xF900, 0xFAFF));
+ categoriesRangeMap.insert("IsAlphabeticPresentationForms", qMakePair(0xFB00, 0xFB4F));
+ categoriesRangeMap.insert("IsArabicPresentationForms-A", qMakePair(0xFB50, 0xFDFF));
+ categoriesRangeMap.insert("IsVariationSelectors", qMakePair(0xFE00, 0xFE0F));
+ categoriesRangeMap.insert("IsVerticalForms", qMakePair(0xFE10, 0xFE1F));
+ categoriesRangeMap.insert("IsCombiningHalfMarks", qMakePair(0xFE20, 0xFE2F));
+ categoriesRangeMap.insert("IsCJKCompatibilityForms", qMakePair(0xFE30, 0xFE4F));
+ categoriesRangeMap.insert("IsSmallFormVariants", qMakePair(0xFE50, 0xFE6F));
+ categoriesRangeMap.insert("IsArabicPresentationForms-B", qMakePair(0xFE70, 0xFEFF));
+ categoriesRangeMap.insert("IsHalfwidthandFullwidthForms", qMakePair(0xFF00, 0xFFEF));
+ categoriesRangeMap.insert("IsSpecials", qMakePair(0xFFF0, 0xFFFF));
+ categoriesRangeMap.insert("IsLinearBSyllabary", qMakePair(0x10000, 0x1007F));
+ categoriesRangeMap.insert("IsLinearBIdeograms", qMakePair(0x10080, 0x100FF));
+ categoriesRangeMap.insert("IsAegeanNumbers", qMakePair(0x10100, 0x1013F));
+ categoriesRangeMap.insert("IsAncientGreekNumbers", qMakePair(0x10140, 0x1018F));
+ categoriesRangeMap.insert("IsOldItalic", qMakePair(0x10300, 0x1032F));
+ categoriesRangeMap.insert("IsGothic", qMakePair(0x10330, 0x1034F));
+ categoriesRangeMap.insert("IsUgaritic", qMakePair(0x10380, 0x1039F));
+ categoriesRangeMap.insert("IsOldPersian", qMakePair(0x103A0, 0x103DF));
+ categoriesRangeMap.insert("IsDeseret", qMakePair(0x10400, 0x1044F));
+ categoriesRangeMap.insert("IsShavian", qMakePair(0x10450, 0x1047F));
+ categoriesRangeMap.insert("IsOsmanya", qMakePair(0x10480, 0x104AF));
+ categoriesRangeMap.insert("IsCypriotSyllabary", qMakePair(0x10800, 0x1083F));
+ categoriesRangeMap.insert("IsKharoshthi", qMakePair(0x10A00, 0x10A5F));
+ categoriesRangeMap.insert("IsByzantineMusicalSymbols", qMakePair(0x1D000, 0x1D0FF));
+ categoriesRangeMap.insert("IsMusicalSymbols", qMakePair(0x1D100, 0x1D1FF));
+ categoriesRangeMap.insert("IsAncientGreekMusicalNotation", qMakePair(0x1D200, 0x1D24F));
+ categoriesRangeMap.insert("IsTaiXuanJingSymbols", qMakePair(0x1D300, 0x1D35F));
+ categoriesRangeMap.insert("IsMathematicalAlphanumericSymbols", qMakePair(0x1D400, 0x1D7FF));
+ categoriesRangeMap.insert("IsCJKUnifiedIdeographsExtensionB", qMakePair(0x20000, 0x2A6DF));
+ categoriesRangeMap.insert("IsCJKCompatibilityIdeographsSupplement", qMakePair(0x2F800, 0x2FA1F));
+ categoriesRangeMap.insert("IsTags", qMakePair(0xE0000, 0xE007F));
+ categoriesRangeMap.insert("IsVariationSelectorsSupplement", qMakePair(0xE0100, 0xE01EF));
+ categoriesRangeMap.insert("IsSupplementaryPrivateUseArea-A", qMakePair(0xF0000, 0xFFFFF));
+ categoriesRangeMap.insert("IsSupplementaryPrivateUseArea-B", qMakePair(0x100000, 0x10FFFF));
+}
+
int QRegExpEngine::getChar()
{
return (yyPos == yyLen) ? EOS : yyIn[yyPos++].unicode();
@@ -2713,6 +2867,177 @@ int QRegExpEngine::getEscape()
yyCharClass->addCategories(0x000f807e);
yyCharClass->addSingleton(0x005f); // '_'
return Tok_CharClass;
+ case 'I':
+ if (xmlSchemaExtensions) {
+ yyCharClass->setNegative(!yyCharClass->negative());
+ // fall through
+ }
+ case 'i':
+ if (xmlSchemaExtensions) {
+ yyCharClass->addCategories(0x000f807e);
+ yyCharClass->addSingleton(0x003a); // ':'
+ yyCharClass->addSingleton(0x005f); // '_'
+ yyCharClass->addRange(0x0041, 0x005a); // [A-Z]
+ yyCharClass->addRange(0x0061, 0x007a); // [a-z]
+ yyCharClass->addRange(0xc0, 0xd6);
+ yyCharClass->addRange(0xd8, 0xf6);
+ yyCharClass->addRange(0xf8, 0x2ff);
+ yyCharClass->addRange(0x370, 0x37d);
+ yyCharClass->addRange(0x37f, 0x1fff);
+ yyCharClass->addRange(0x200c, 0x200d);
+ yyCharClass->addRange(0x2070, 0x218f);
+ yyCharClass->addRange(0x2c00, 0x2fef);
+ yyCharClass->addRange(0x3001, 0xd7ff);
+ yyCharClass->addRange(0xf900, 0xfdcf);
+ yyCharClass->addRange(0xfdf0, 0xfffd);
+ yyCharClass->addRange((ushort)0x10000, (ushort)0xeffff);
+ }
+ return Tok_CharClass;
+ case 'C':
+ if (xmlSchemaExtensions) {
+ yyCharClass->setNegative(!yyCharClass->negative());
+ // fall through
+ }
+ case 'c':
+ if (xmlSchemaExtensions) {
+ yyCharClass->addCategories(0x000f807e);
+ yyCharClass->addSingleton(0x002d); // '-'
+ yyCharClass->addSingleton(0x002e); // '.'
+ yyCharClass->addSingleton(0x003a); // ':'
+ yyCharClass->addSingleton(0x005f); // '_'
+ yyCharClass->addSingleton(0xb7);
+ yyCharClass->addRange(0x0030, 0x0039); // [0-9]
+ yyCharClass->addRange(0x0041, 0x005a); // [A-Z]
+ yyCharClass->addRange(0x0061, 0x007a); // [a-z]
+ yyCharClass->addRange(0xc0, 0xd6);
+ yyCharClass->addRange(0xd8, 0xf6);
+ yyCharClass->addRange(0xf8, 0x2ff);
+ yyCharClass->addRange(0x370, 0x37d);
+ yyCharClass->addRange(0x37f, 0x1fff);
+ yyCharClass->addRange(0x200c, 0x200d);
+ yyCharClass->addRange(0x2070, 0x218f);
+ yyCharClass->addRange(0x2c00, 0x2fef);
+ yyCharClass->addRange(0x3001, 0xd7ff);
+ yyCharClass->addRange(0xf900, 0xfdcf);
+ yyCharClass->addRange(0xfdf0, 0xfffd);
+ yyCharClass->addRange((ushort)0x10000, (ushort)0xeffff);
+ yyCharClass->addRange(0x0300, 0x036f);
+ yyCharClass->addRange(0x203f, 0x2040);
+ }
+ return Tok_CharClass;
+ case 'P':
+ if (xmlSchemaExtensions) {
+ yyCharClass->setNegative(!yyCharClass->negative());
+ // fall through
+ }
+ case 'p':
+ if (xmlSchemaExtensions) {
+ if (yyCh != '{') {
+ error(RXERR_CHARCLASS);
+ return Tok_CharClass;
+ }
+
+ QByteArray category;
+ yyCh = getChar();
+ while (yyCh != '}') {
+ if (yyCh == EOS) {
+ error(RXERR_END);
+ return Tok_CharClass;
+ }
+ category.append(yyCh);
+ yyCh = getChar();
+ }
+ yyCh = getChar(); // skip closing '}'
+
+ if (category == "M") {
+ yyCharClass->addCategories(0x0000000e);
+ } else if (category == "Mn") {
+ yyCharClass->addCategories(0x00000002);
+ } else if (category == "Mc") {
+ yyCharClass->addCategories(0x00000004);
+ } else if (category == "Me") {
+ yyCharClass->addCategories(0x00000008);
+ } else if (category == "N") {
+ yyCharClass->addCategories(0x00000070);
+ } else if (category == "Nd") {
+ yyCharClass->addCategories(0x00000010);
+ } else if (category == "Nl") {
+ yyCharClass->addCategories(0x00000020);
+ } else if (category == "No") {
+ yyCharClass->addCategories(0x00000040);
+ } else if (category == "Z") {
+ yyCharClass->addCategories(0x00000380);
+ } else if (category == "Zs") {
+ yyCharClass->addCategories(0x00000080);
+ } else if (category == "Zl") {
+ yyCharClass->addCategories(0x00000100);
+ } else if (category == "Zp") {
+ yyCharClass->addCategories(0x00000200);
+ } else if (category == "C") {
+ yyCharClass->addCategories(0x00006c00);
+ } else if (category == "Cc") {
+ yyCharClass->addCategories(0x00000400);
+ } else if (category == "Cf") {
+ yyCharClass->addCategories(0x00000800);
+ } else if (category == "Cs") {
+ yyCharClass->addCategories(0x00001000);
+ } else if (category == "Co") {
+ yyCharClass->addCategories(0x00002000);
+ } else if (category == "Cn") {
+ yyCharClass->addCategories(0x00004000);
+ } else if (category == "L") {
+ yyCharClass->addCategories(0x000f8000);
+ } else if (category == "Lu") {
+ yyCharClass->addCategories(0x00008000);
+ } else if (category == "Ll") {
+ yyCharClass->addCategories(0x00010000);
+ } else if (category == "Lt") {
+ yyCharClass->addCategories(0x00020000);
+ } else if (category == "Lm") {
+ yyCharClass->addCategories(0x00040000);
+ } else if (category == "Lo") {
+ yyCharClass->addCategories(0x00080000);
+ } else if (category == "P") {
+ yyCharClass->addCategories(0x4f580780);
+ } else if (category == "Pc") {
+ yyCharClass->addCategories(0x00100000);
+ } else if (category == "Pd") {
+ yyCharClass->addCategories(0x00200000);
+ } else if (category == "Ps") {
+ yyCharClass->addCategories(0x00400000);
+ } else if (category == "Pe") {
+ yyCharClass->addCategories(0x00800000);
+ } else if (category == "Pi") {
+ yyCharClass->addCategories(0x01000000);
+ } else if (category == "Pf") {
+ yyCharClass->addCategories(0x02000000);
+ } else if (category == "Po") {
+ yyCharClass->addCategories(0x04000000);
+ } else if (category == "S") {
+ yyCharClass->addCategories(0x78000000);
+ } else if (category == "Sm") {
+ yyCharClass->addCategories(0x08000000);
+ } else if (category == "Sc") {
+ yyCharClass->addCategories(0x10000000);
+ } else if (category == "Sk") {
+ yyCharClass->addCategories(0x20000000);
+ } else if (category == "So") {
+ yyCharClass->addCategories(0x40000000);
+ } else if (category.startsWith("Is")) {
+ if (categoriesRangeMap.isEmpty())
+ setupCategoriesRangeMap();
+
+ if (categoriesRangeMap.contains(category)) {
+ const QPair<int, int> range = categoriesRangeMap.value(category);
+ yyCharClass->addRange(range.first, range.second);
+ } else {
+ error(RXERR_CATEGORY);
+ }
+ } else {
+ error(RXERR_CATEGORY);
+ }
+ }
+ return Tok_CharClass;
#endif
#ifndef QT_NO_REGEXP_ESCAPE
case 'x':
@@ -2934,7 +3259,7 @@ int QRegExpEngine::getToken()
yyMaxRep = getRep(InftyRep);
}
if (yyMaxRep < yyMinRep)
- qSwap(yyMinRep, yyMaxRep);
+ error(RXERR_INTERVAL);
if (yyCh != '}')
error(RXERR_REPETITION);
yyCh = getChar();
@@ -3296,7 +3621,7 @@ static void prepareEngine_helper(QRegExpPrivate *priv)
{
bool initMatchState = !priv->eng;
#if !defined(QT_NO_REGEXP_OPTIM)
- if (!priv->eng) {
+ if (!priv->eng && globalEngineCache()) {
QMutexLocker locker(mutex());
priv->eng = globalEngineCache()->take(priv->engineKey);
if (priv->eng != 0)
@@ -3374,6 +3699,9 @@ static void invalidateEngine(QRegExpPrivate *priv)
equivalent to using the RegExp pattern on a string in
which all metacharacters are escaped using escape().
+ \value W3CXmlSchema11 The pattern is a regular expression as
+ defined by the W3C XML Schema 1.1 specification.
+
\sa setPatternSyntax()
*/
diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h
index 057eec2..16682a3 100644
--- a/src/corelib/tools/qregexp.h
+++ b/src/corelib/tools/qregexp.h
@@ -61,7 +61,7 @@ class QStringList;
class Q_CORE_EXPORT QRegExp
{
public:
- enum PatternSyntax { RegExp, Wildcard, FixedString, RegExp2 };
+ enum PatternSyntax { RegExp, Wildcard, FixedString, RegExp2, W3CXmlSchema11 };
enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
QRegExp();
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index b8e08ac..008c068 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -301,6 +301,54 @@ public:
return read(size());
}
+ // read an unspecified amount (will read the first buffer)
+ inline QByteArray read() {
+ if (bufferSize == 0)
+ return QByteArray();
+
+ // multiple buffers, just take the first one
+ if (head == 0 && tailBuffer != 0) {
+ QByteArray qba = buffers.takeFirst();
+ --tailBuffer;
+ bufferSize -= qba.length();
+ return qba;
+ }
+
+ // one buffer with good value for head. Just take it.
+ if (head == 0 && tailBuffer == 0) {
+ QByteArray qba = buffers.takeFirst();
+ qba.resize(tail);
+ buffers << QByteArray();
+ bufferSize = 0;
+ tail = 0;
+ return qba;
+ }
+
+ // Bad case: We have to memcpy.
+ // We can avoid by initializing the QRingBuffer with basicBlockSize of 0
+ // and only using this read() function.
+ QByteArray qba(readPointer(), nextDataBlockSize());
+ buffers.removeFirst();
+ head = 0;
+ if (tailBuffer == 0) {
+ buffers << QByteArray();
+ tail = 0;
+ } else {
+ --tailBuffer;
+ }
+ bufferSize -= qba.length();
+ return qba;
+ }
+
+ // append a new buffer to the end
+ inline void append(const QByteArray &qba) {
+ buffers[tailBuffer].resize(tail);
+ buffers << qba;
+ ++tailBuffer;
+ tail = qba.length();
+ bufferSize += qba.length();
+ }
+
inline QByteArray peek(int maxLength) const {
int bytesToRead = qMin(size(), maxLength);
if(maxLength <= 0)
@@ -355,7 +403,7 @@ public:
private:
QList<QByteArray> buffers;
int head, tail;
- int tailBuffer;
+ int tailBuffer; // always buffers.size() - 1
int basicBlockSize;
int bufferSize;
};
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index ba62ce1..85085c5 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -340,6 +340,24 @@
*/
/*!
+ \fn QSharedPointer<X> QSharedPointer::objectCast() const
+ \since 4.6
+
+ Performs a \l qobject_cast() from this pointer's type to \tt X and
+ returns a QSharedPointer that shares the reference. If this
+ function is used to up-cast, then QSharedPointer will perform a \tt
+ qobject_cast, which means that if the object being pointed by this
+ QSharedPointer is not of type \tt X, the returned object will be
+ null.
+
+ Note: the template type \c X must have the same const and volatile
+ qualifiers as the template of this object, or the cast will
+ fail. Use constCast() if you need to drop those qualifiers.
+
+ \sa qSharedPointerObjectCast()
+*/
+
+/*!
\fn QWeakPointer<T> QSharedPointer::toWeakRef() const
Returns a weak reference object that shares the pointer referenced
@@ -718,6 +736,47 @@
*/
/*!
+ \fn QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &other)
+ \relates QSharedPointer
+ \since 4.6
+
+ Returns a shared pointer to the pointer held by \a other, using a
+ \l qobject_cast() to type \tt X to obtain an internal pointer of the
+ appropriate type. If the \tt qobject_cast fails, the object
+ returned will be null.
+
+ Note that \tt X must have the same cv-qualifiers (\tt const and
+ \tt volatile) that \tt T has, or the code will fail to
+ compile. Use qSharedPointerConstCast to cast away the constness.
+
+ \sa QSharedPointer::objectCast(), qSharedPointerCast(), qSharedPointerConstCast()
+*/
+
+/*!
+ \fn QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &other)
+ \relates QSharedPointer
+ \relates QWeakPointer
+ \since 4.6
+
+ Returns a shared pointer to the pointer held by \a other, using a
+ \l qobject_cast() to type \tt X to obtain an internal pointer of the
+ appropriate type. If the \tt qobject_cast fails, the object
+ returned will be null.
+
+ The \a other object is converted first to a strong reference. If
+ that conversion fails (because the object it's pointing to has
+ already been deleted), this function also returns a null
+ QSharedPointer.
+
+ Note that \tt X must have the same cv-qualifiers (\tt const and
+ \tt volatile) that \tt T has, or the code will fail to
+ compile. Use qSharedPointerConstCast to cast away the constness.
+
+ \sa QWeakPointer::toStrongRef(), qSharedPointerCast(), qSharedPointerConstCast()
+*/
+
+
+/*!
\fn QWeakPointer<X> qWeakPointerCast(const QWeakPointer<T> &other)
\relates QWeakPointer
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h
index cd6bc62..abd83ad 100644
--- a/src/corelib/tools/qsharedpointer.h
+++ b/src/corelib/tools/qsharedpointer.h
@@ -93,6 +93,7 @@ public:
template <class X> QSharedPointer<X> staticCast() const;
template <class X> QSharedPointer<X> dynamicCast() const;
template <class X> QSharedPointer<X> constCast() const;
+ template <class X> QSharedPointer<X> objectCast() const;
};
template <class T>
@@ -136,6 +137,8 @@ template <class X, class T> QSharedPointer<X> qSharedPointerDynamicCast(const QS
template <class X, class T> QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer<T> &src);
template <class X, class T> QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src);
template <class X, class T> QSharedPointer<X> qSharedPointerConstCast(const QWeakPointer<T> &src);
+template <class X, class T> QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src);
+template <class X, class T> QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &src);
template <class X, class T> QWeakPointer<X> qWeakPointerCast(const QWeakPointer<T> &src);
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 2797622..739a949 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -49,6 +49,7 @@
#endif
#include <QtCore/qatomic.h>
+#include <QtCore/qobject.h> // for qobject_cast
QT_BEGIN_HEADER
@@ -83,6 +84,11 @@ QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &ptr);
template <class X, class T>
QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &ptr);
+#ifndef QT_NO_QOBJECT
+template <class X, class T>
+QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &ptr);
+#endif
+
namespace QtSharedPointer {
template <class T> class InternalRefCount;
template <class T> class ExternalRefCount;
@@ -122,7 +128,7 @@ namespace QtSharedPointer {
inline T *operator->() const { return data(); }
protected:
- inline Basic() : value(0 * sizeof(T)) { }
+ inline Basic() : value(0) { }
// ~Basic();
inline void verifyReconstruction(const T *ptr)
@@ -330,6 +336,14 @@ public:
return qSharedPointerConstCast<X, T>(*this);
}
+#ifndef QT_NO_QOBJECT
+ template <class X>
+ QSharedPointer<X> objectCast() const
+ {
+ return qSharedPointerObjectCast<X, T>(*this);
+ }
+#endif
+
inline void clear() { *this = QSharedPointer<T>(); }
QWeakPointer<T> toWeakRef() const;
@@ -545,6 +559,43 @@ QWeakPointer<X> qWeakPointerCast(const QSharedPointer<T> &src)
return qSharedPointerCast<X, T>(src).toWeakRef();
}
+#ifndef QT_NO_QOBJECT
+template <class X, class T>
+Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src)
+{
+ register X *ptr = qobject_cast<X *>(src.data());
+ return QtSharedPointer::copyAndSetPointer(ptr, src);
+}
+template <class X, class T>
+Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerObjectCast<X>(src.toStrongRef());
+}
+
+# ifndef QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION
+namespace QtSharedPointer {
+ template <class T> struct RemovePointer;
+ template <class T> struct RemovePointer<T *> { typedef T Type; };
+ template <class T> struct RemovePointer<QSharedPointer<T> > { typedef T Type; };
+ template <class T> struct RemovePointer<QWeakPointer<T> > { typedef T Type; };
+}
+
+template <class X, class T>
+inline QSharedPointer<typename QtSharedPointer::RemovePointer<X>::Type>
+qobject_cast(const QSharedPointer<T> &src)
+{
+ return qSharedPointerObjectCast<typename QtSharedPointer::RemovePointer<X>::Type, T>(src);
+}
+template <class X, class T>
+inline QSharedPointer<typename QtSharedPointer::RemovePointer<X>::Type>
+qobject_cast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerObjectCast<typename QtSharedPointer::RemovePointer<X>::Type, T>(src);
+}
+# endif
+
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 71482f5..b97ba45 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -45,6 +45,7 @@
#ifndef QT_NO_TEXTCODEC
#include <qtextcodec.h>
#endif
+#include <private/qutfcodec_p.h>
#include <qdatastream.h>
#include <qlist.h>
#include "qlocale.h"
@@ -964,7 +965,8 @@ int QString::toWCharArray(wchar_t *array) const
Constructs a string initialized with the first \a size characters
of the QChar array \a unicode.
- QString makes a deep copy of the string data.
+ QString makes a deep copy of the string data. The unicode data is copied as
+ is and the Byte Order Mark is preserved if present.
*/
QString::QString(const QChar *unicode, int size)
{
@@ -3480,7 +3482,7 @@ QByteArray QString::toAscii() const
return toLatin1();
}
-#ifndef Q_WS_MAC
+#if !defined(Q_WS_MAC) && defined(Q_OS_UNIX)
static QByteArray toLocal8Bit_helper(const QChar *data, int length)
{
#ifndef QT_NO_TEXTCODEC
@@ -3714,13 +3716,13 @@ QByteArray qt_winQString2MB(const QChar *ch, int uclen)
BOOL used_def;
QByteArray mb(4096, 0);
int len;
- while (!(len=WideCharToMultiByte(CP_ACP, 0, (const WCHAR*)ch, uclen,
+ while (!(len=WideCharToMultiByte(CP_ACP, 0, (const wchar_t*)ch, uclen,
mb.data(), mb.size()-1, 0, &used_def)))
{
int r = GetLastError();
if (r == ERROR_INSUFFICIENT_BUFFER) {
mb.resize(1+WideCharToMultiByte(CP_ACP, 0,
- (const WCHAR*)ch, uclen,
+ (const wchar_t*)ch, uclen,
0, 0, 0, &used_def));
// and try again...
} else {
@@ -3741,9 +3743,9 @@ QString qt_winMB2QString(const char *mb, int mblen)
if (!mb || !mblen)
return QString();
const int wclen_auto = 4096;
- WCHAR wc_auto[wclen_auto];
+ wchar_t wc_auto[wclen_auto];
int wclen = wclen_auto;
- WCHAR *wc = wc_auto;
+ wchar_t *wc = wc_auto;
int len;
while (!(len=MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
mb, mblen, wc, wclen)))
@@ -3756,7 +3758,7 @@ QString qt_winMB2QString(const char *mb, int mblen)
} else {
wclen = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
mb, mblen, 0, 0);
- wc = new WCHAR[wclen];
+ wc = new wchar_t[wclen];
// and try again...
}
} else {
@@ -3799,11 +3801,6 @@ QString QString::fromLocal8Bit(const char *str, int size)
return QString();
if (size == 0 || (!*str && size < 0))
return QLatin1String("");
-#if defined(Q_OS_WIN32)
- if(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- return qt_winMB2QString(str, size);
- }
-#endif
#if !defined(QT_NO_TEXTCODEC)
if (size < 0)
size = qstrlen(str);
@@ -3848,74 +3845,7 @@ QString QString::fromUtf8(const char *str, int size)
if (size < 0)
size = qstrlen(str);
- QString result(size, Qt::Uninitialized); // worst case
- ushort *qch = result.d->data;
- uint uc = 0;
- uint min_uc = 0;
- int need = 0;
- int error = -1;
- uchar ch;
- int i = 0;
-
- // skip utf8-encoded byte order mark
- if (size >= 3
- && (uchar)str[0] == 0xef && (uchar)str[1] == 0xbb && (uchar)str[2] == 0xbf)
- i += 3;
-
- for (; i < size; ++i) {
- ch = str[i];
- if (need) {
- if ((ch&0xc0) == 0x80) {
- uc = (uc << 6) | (ch & 0x3f);
- need--;
- if (!need) {
- if (uc > 0xffffU && uc < 0x110000U) {
- // surrogate pair
- *qch++ = QChar::highSurrogate(uc);
- uc = QChar::lowSurrogate(uc);
- } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
- // overlong seqence, UTF16 surrogate or BOM
- uc = QChar::ReplacementCharacter;
- }
- *qch++ = uc;
- }
- } else {
- i = error;
- need = 0;
- *qch++ = QChar::ReplacementCharacter;
- }
- } else {
- if (ch < 128) {
- *qch++ = ch;
- } else if ((ch & 0xe0) == 0xc0) {
- uc = ch & 0x1f;
- need = 1;
- error = i;
- min_uc = 0x80;
- } else if ((ch & 0xf0) == 0xe0) {
- uc = ch & 0x0f;
- need = 2;
- error = i;
- min_uc = 0x800;
- } else if ((ch&0xf8) == 0xf0) {
- uc = ch & 0x07;
- need = 3;
- error = i;
- min_uc = 0x10000;
- } else {
- // Error
- *qch++ = QChar::ReplacementCharacter;
- }
- }
- }
- if (need) {
- // we have some invalid characters remaining we need to add to the string
- for (int i = error; i < size; ++i)
- *qch++ = QChar::ReplacementCharacter;
- }
-
- result.truncate(qch - result.d->data);
- return result;
+ return QUtf8::convertToUnicode(str, size, 0);
}
/*!
@@ -3938,7 +3868,7 @@ QString QString::fromUtf16(const ushort *unicode, int size)
while (unicode[size] != 0)
++size;
}
- return QString((const QChar *)unicode, size);
+ return QUtf16::convertToUnicode((const char *)unicode, size*2, 0);
}
@@ -3962,20 +3892,7 @@ QString QString::fromUcs4(const uint *unicode, int size)
while (unicode[size] != 0)
++size;
}
-
- QString s(size * 2, Qt::Uninitialized); // worst case
- ushort *uc = s.d->data;
- for (int i = 0; i < size; ++i) {
- uint u = unicode[i];
- if (u > 0xffff) {
- // decompose into a surrogate pair
- *uc++ = QChar::highSurrogate(u);
- u = QChar::lowSurrogate(u);
- }
- *uc++ = u;
- }
- s.resize(uc - s.d->data);
- return s;
+ return QUtf32::convertToUnicode((const char *)unicode, size*4, 0);
}
/*!
@@ -4697,16 +4614,7 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1,
return ucstrcmp(data1, length1, data2, length2);
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
- int res;
- QT_WA({
- const TCHAR* s1 = (TCHAR*)data1;
- const TCHAR* s2 = (TCHAR*)data2;
- res = CompareStringW(GetUserDefaultLCID(), 0, s1, length1, s2, length2);
- } , {
- QByteArray s1 = toLocal8Bit_helper(data1, length1);
- QByteArray s2 = toLocal8Bit_helper(data2, length2);
- res = CompareStringA(GetUserDefaultLCID(), 0, s1.data(), s1.length(), s2.data(), s2.length());
- });
+ int res = CompareString(GetUserDefaultLCID(), 0, (wchar_t*)data1, length1, (wchar_t*)data2, length2);
switch (res) {
case CSTR_LESS_THAN:
@@ -6565,7 +6473,7 @@ QString QString::arg(qlonglong a, int fieldWidth, int base, const QChar &fillCha
ArgEscapeData d = findArgEscapes(*this);
if (d.occurrences == 0) {
- qWarning("QString::arg: Argument missing: %s, %lld", toLocal8Bit().data(), a);
+ qWarning() << "QString::arg: Argument missing:" << *this << ',' << a;
return *this;
}
@@ -6608,7 +6516,7 @@ QString QString::arg(qulonglong a, int fieldWidth, int base, const QChar &fillCh
ArgEscapeData d = findArgEscapes(*this);
if (d.occurrences == 0) {
- qWarning("QString::arg: Argument missing: %s, %llu", toLocal8Bit().data(), a);
+ qWarning() << "QString::arg: Argument missing:" << *this << ',' << a;
return *this;
}
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 6bb0d8e..235c603 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -1235,6 +1235,8 @@ inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef
QT_END_NAMESPACE
+QT_END_HEADER
+
#ifdef QT_USE_FAST_CONCATENATION
#include <QtCore/qstringbuilder.h>
#endif
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index 852c072..3b43253 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -69,7 +69,7 @@ private:
};
-template <typename T> class QConcatenable {};
+template <typename T> struct QConcatenable {};
template <typename A, typename B>
class QStringBuilder
@@ -202,6 +202,18 @@ template <> struct QConcatenable<const char *>
*out++ = QLatin1Char(*a++);
}
};
+
+template <> struct QConcatenable<QByteArray>
+{
+ typedef QByteArray type;
+ static int size(const QByteArray &ba) { return qstrnlen(ba.constData(), ba.size()); }
+ static inline void appendTo(const QByteArray &ba, QChar *&out)
+ {
+ const char *data = ba.constData();
+ while (*data)
+ *out++ = QLatin1Char(*data++);
+ }
+};
#endif
template <typename A, typename B>
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 04aed39..e32fc03 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -555,6 +555,8 @@ void QTimeLine::setCurveShape(CurveShape shape)
/*!
\property QTimeLine::easingCurve
+ \since 4.6
+
Specifies the easing curve that the timeline will use.
If both easing curve and curveShape are set, the last set property will
override the previous one. (If valueForTime() is reimplemented it will
diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp
index 11ae801..c103016 100644
--- a/src/corelib/tools/qunicodetables.cpp
+++ b/src/corelib/tools/qunicodetables.cpp
@@ -46,3374 +46,3374 @@ QT_BEGIN_NAMESPACE
static const unsigned short uc_property_trie[] = {
// 0x11000
- 6256, 6288, 6320, 6352, 6384, 6416, 6448, 6480,
- 6512, 6544, 6576, 6608, 6640, 6672, 6704, 6736,
- 6768, 6800, 6832, 6864, 6896, 6928, 6960, 6992,
- 7024, 7056, 7088, 7120, 7152, 7184, 7216, 7248,
- 7280, 7312, 7344, 6512, 7376, 6512, 7408, 7440,
- 7472, 7504, 7536, 7568, 7600, 7632, 7664, 7696,
- 7728, 7760, 7792, 7824, 7856, 7888, 7920, 7952,
- 7984, 8016, 8048, 8080, 8112, 8144, 8176, 8208,
- 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
- 8272, 8304, 8336, 8368, 8400, 8432, 8464, 8496,
- 8528, 8560, 8592, 8624, 8656, 8688, 8720, 8752,
- 8400, 8784, 8816, 8848, 8880, 8912, 8944, 8976,
- 9008, 9040, 9072, 9104, 9136, 9168, 9200, 9232,
- 9136, 9264, 9296, 9104, 9328, 9360, 9392, 9424,
- 9456, 9488, 9520, 9552, 9584, 9616, 9648, 9552,
- 9680, 9712, 9744, 9776, 9808, 9840, 9872, 9552,
-
- 9904, 9936, 9968, 9552, 9552, 10000, 10032, 10064,
- 10096, 10096, 10128, 10160, 10160, 10192, 10224, 10256,
- 10288, 10320, 10352, 10320, 10384, 10416, 10448, 10480,
- 10512, 10320, 10544, 10576, 10608, 10320, 10320, 10640,
- 10672, 10320, 10320, 10320, 10320, 10320, 10320, 10320,
- 10320, 10320, 10320, 10320, 10320, 10320, 10320, 10320,
- 10320, 10320, 10320, 10704, 10736, 10320, 10320, 10768,
- 10800, 10832, 10864, 10896, 9904, 10928, 10960, 10992,
- 11024, 10320, 11056, 11088, 10320, 11120, 9552, 9552,
- 11152, 11184, 11216, 11248, 11280, 11312, 11344, 11376,
- 11408, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 11440, 11472, 11504, 11536, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 11568, 11600, 11632, 11664, 11696, 11728, 11760, 11792,
- 6512, 6512, 6512, 6512, 11824, 6512, 6512, 11856,
- 11888, 11920, 11952, 11984, 12016, 12048, 12080, 12112,
-
- 12144, 12176, 12208, 12240, 12272, 12304, 12336, 12368,
- 12400, 12432, 12464, 12496, 12528, 12560, 12592, 12624,
- 12656, 12688, 12720, 12752, 12784, 12816, 12848, 12880,
- 12912, 12944, 12976, 13008, 13040, 13072, 13104, 13136,
- 13168, 13200, 13232, 13264, 13296, 13328, 13360, 13392,
- 13168, 13168, 13168, 13168, 13424, 13456, 13488, 13520,
- 13552, 13168, 13168, 13584, 13616, 13648, 9552, 9552,
- 13680, 13712, 13744, 13776, 13808, 13840, 13872, 13904,
- 13936, 13936, 13936, 13936, 13936, 13936, 13936, 13936,
- 13968, 13968, 13968, 13968, 14000, 14032, 14064, 14096,
- 13968, 14128, 13968, 14160, 14192, 14224, 14256, 14288,
- 14320, 14352, 9552, 9552, 9552, 9552, 9552, 9552,
- 14384, 14416, 14448, 14480, 14512, 14512, 14512, 14544,
- 14576, 14608, 14640, 14672, 14704, 14736, 14736, 9552,
- 14768, 9552, 9552, 9552, 14800, 14832, 14832, 14864,
- 14832, 14832, 14832, 14832, 14832, 14832, 14896, 14928,
-
- 14960, 14992, 15024, 15056, 15088, 15120, 15152, 15184,
- 15216, 15248, 15280, 15280, 15312, 15344, 15376, 15408,
- 15440, 15472, 15504, 15536, 15472, 15568, 15600, 15632,
- 15664, 15664, 15664, 15696, 15664, 15664, 15728, 15760,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
-
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
- 15792, 15792, 15792, 15792, 15792, 15824, 11376, 11376,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
-
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
-
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
-
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
-
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
-
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 15856, 15856, 15856, 15856, 15888, 9552, 9552,
-
- 15920, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
- 15952, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
- 15952, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
- 15952, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
- 15952, 15952, 15952, 15952, 15984, 16016, 16048, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 16080, 16112, 9552, 9552, 9552, 9552, 9552, 9552,
- 16144, 16176, 16208, 16240, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
- 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
- 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
- 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
-
- 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
- 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
- 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
- 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
- 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
- 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
- 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
- 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
- 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
- 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
- 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
- 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
- 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
- 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
-
- 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
- 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
- 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
- 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
- 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
- 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
- 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
- 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
- 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
- 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
- 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
- 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
- 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
-
- 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
- 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
- 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
- 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
- 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
- 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
- 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
- 16304, 16336, 16368, 16400, 16432, 16496, 9552, 9552,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
- 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
-
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
-
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
- 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
- 15856, 16592, 16624, 16656, 16688, 16688, 16720, 9552,
- 16752, 16784, 16816, 16848, 16848, 16880, 16912, 16848,
- 16848, 16848, 16848, 16848, 16848, 16848, 16848, 16848,
- 16848, 16944, 16976, 16848, 17008, 16848, 17040, 17072,
- 17104, 17136, 17168, 17200, 16848, 16848, 16848, 17232,
- 17264, 17296, 17328, 17360, 17392, 17424, 17456, 17488,
-
- 17520, 17552, 17584, 9552, 17616, 17616, 17616, 17648,
- 17680, 17712, 17744, 17776, 17808, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 17840, 17872, 17904, 9552, 17936, 14640, 17968, 9552,
- 18000, 18032, 18064, 17616, 18096, 18128, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
- 18160, 18192, 8240, 8240, 8240, 8240, 8240, 8240,
- 18224, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
- 18256, 18288, 18320, 8240, 8240, 8240, 8240, 8240,
- 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
- 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
- 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
- 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
- 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 6256, 6288, 6320, 6352, 6384, 6416, 6448, 6480,
+ 6512, 6544, 6576, 6608, 6640, 6672, 6704, 6736,
+ 6768, 6800, 6832, 6864, 6896, 6928, 6960, 6992,
+ 7024, 7056, 7088, 7120, 7152, 7184, 7216, 7248,
+ 7280, 7312, 7344, 6512, 7376, 6512, 7408, 7440,
+ 7472, 7504, 7536, 7568, 7600, 7632, 7664, 7696,
+ 7728, 7760, 7792, 7824, 7856, 7888, 7920, 7952,
+ 7984, 8016, 8048, 8080, 8112, 8144, 8176, 8208,
+ 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 8272, 8304, 8336, 8368, 8400, 8432, 8464, 8496,
+ 8528, 8560, 8592, 8624, 8656, 8688, 8720, 8752,
+ 8400, 8784, 8816, 8848, 8880, 8912, 8944, 8976,
+ 9008, 9040, 9072, 9104, 9136, 9168, 9200, 9232,
+ 9136, 9264, 9296, 9104, 9328, 9360, 9392, 9424,
+ 9456, 9488, 9520, 9552, 9584, 9616, 9648, 9552,
+ 9680, 9712, 9744, 9776, 9808, 9840, 9872, 9552,
+
+ 9904, 9936, 9968, 9552, 9552, 10000, 10032, 10064,
+ 10096, 10096, 10128, 10160, 10160, 10192, 10224, 10256,
+ 10288, 10320, 10352, 10320, 10384, 10416, 10448, 10480,
+ 10512, 10320, 10544, 10576, 10608, 10320, 10320, 10640,
+ 10672, 10320, 10320, 10320, 10320, 10320, 10320, 10320,
+ 10320, 10320, 10320, 10320, 10320, 10320, 10320, 10320,
+ 10320, 10320, 10320, 10704, 10736, 10320, 10320, 10768,
+ 10800, 10832, 10864, 10896, 9904, 10928, 10960, 10992,
+ 11024, 10320, 11056, 11088, 10320, 11120, 9552, 9552,
+ 11152, 11184, 11216, 11248, 11280, 11312, 11344, 11376,
+ 11408, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 11440, 11472, 11504, 11536, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 11568, 11600, 11632, 11664, 11696, 11728, 11760, 11792,
+ 6512, 6512, 6512, 6512, 11824, 6512, 6512, 11856,
+ 11888, 11920, 11952, 11984, 12016, 12048, 12080, 12112,
+
+ 12144, 12176, 12208, 12240, 12272, 12304, 12336, 12368,
+ 12400, 12432, 12464, 12496, 12528, 12560, 12592, 12624,
+ 12656, 12688, 12720, 12752, 12784, 12816, 12848, 12880,
+ 12912, 12944, 12976, 13008, 13040, 13072, 13104, 13136,
+ 13168, 13200, 13232, 13264, 13296, 13328, 13360, 13392,
+ 13168, 13168, 13168, 13168, 13424, 13456, 13488, 13520,
+ 13552, 13168, 13168, 13584, 13616, 13648, 9552, 9552,
+ 13680, 13712, 13744, 13776, 13808, 13840, 13872, 13904,
+ 13936, 13936, 13936, 13936, 13936, 13936, 13936, 13936,
+ 13968, 13968, 13968, 13968, 14000, 14032, 14064, 14096,
+ 13968, 14128, 13968, 14160, 14192, 14224, 14256, 14288,
+ 14320, 14352, 9552, 9552, 9552, 9552, 9552, 9552,
+ 14384, 14416, 14448, 14480, 14512, 14512, 14512, 14544,
+ 14576, 14608, 14640, 14672, 14704, 14736, 14736, 9552,
+ 14768, 9552, 9552, 9552, 14800, 14832, 14832, 14864,
+ 14832, 14832, 14832, 14832, 14832, 14832, 14896, 14928,
+
+ 14960, 14992, 15024, 15056, 15088, 15120, 15152, 15184,
+ 15216, 15248, 15280, 15280, 15312, 15344, 15376, 15408,
+ 15440, 15472, 15504, 15536, 15472, 15568, 15600, 15632,
+ 15664, 15664, 15664, 15696, 15664, 15664, 15728, 15760,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15792, 15792, 15792,
+ 15792, 15792, 15792, 15792, 15792, 15824, 11376, 11376,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 15856, 15856, 15856, 15856, 15888, 9552, 9552,
+
+ 15920, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
+ 15952, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
+ 15952, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
+ 15952, 15952, 15952, 15952, 15952, 15952, 15952, 15952,
+ 15952, 15952, 15952, 15952, 15984, 16016, 16048, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 16080, 16112, 9552, 9552, 9552, 9552, 9552, 9552,
+ 16144, 16176, 16208, 16240, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+ 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
+ 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
+ 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
+
+ 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
+ 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
+ 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+ 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
+ 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
+ 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
+ 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
+ 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
+ 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+ 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
+ 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
+ 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
+ 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
+ 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
+
+ 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+ 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
+ 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
+ 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
+ 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
+ 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
+ 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+ 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
+ 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
+ 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
+ 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
+ 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
+ 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+
+ 16304, 16336, 16368, 16400, 16432, 16464, 16272, 16304,
+ 16336, 16368, 16400, 16432, 16464, 16272, 16304, 16336,
+ 16368, 16400, 16432, 16464, 16272, 16304, 16336, 16368,
+ 16400, 16432, 16464, 16272, 16304, 16336, 16368, 16400,
+ 16432, 16464, 16272, 16304, 16336, 16368, 16400, 16432,
+ 16464, 16272, 16304, 16336, 16368, 16400, 16432, 16464,
+ 16272, 16304, 16336, 16368, 16400, 16432, 16464, 16272,
+ 16304, 16336, 16368, 16400, 16432, 16496, 9552, 9552,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+ 16528, 16528, 16528, 16528, 16528, 16528, 16528, 16528,
+
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 16560, 16560, 16560, 16560, 16560, 16560, 16560, 16560,
+ 15856, 15856, 15856, 15856, 15856, 15856, 15856, 15856,
+ 15856, 16592, 16624, 16656, 16688, 16688, 16720, 9552,
+ 16752, 16784, 16816, 16848, 16848, 16880, 16912, 16848,
+ 16848, 16848, 16848, 16848, 16848, 16848, 16848, 16848,
+ 16848, 16944, 16976, 16848, 17008, 16848, 17040, 17072,
+ 17104, 17136, 17168, 17200, 16848, 16848, 16848, 17232,
+ 17264, 17296, 17328, 17360, 17392, 17424, 17456, 17488,
+
+ 17520, 17552, 17584, 9552, 17616, 17616, 17616, 17648,
+ 17680, 17712, 17744, 17776, 17808, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 17840, 17872, 17904, 9552, 17936, 14640, 17968, 9552,
+ 18000, 18032, 18064, 17616, 18096, 18128, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 9552, 9552, 9552, 9552, 9552, 9552, 9552, 9552,
+ 18160, 18192, 8240, 8240, 8240, 8240, 8240, 8240,
+ 18224, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 18256, 18288, 18320, 8240, 8240, 8240, 8240, 8240,
+ 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
+ 8240, 8240, 8240, 8240, 8240, 8240, 8240, 8240,
// 0x11000 - 0x110000
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18608, 18608, 18608, 18864, 19120, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 19376, 19632, 19888, 20144, 20400, 20656, 20912, 21168,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
-
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
- 21680, 21680, 21680, 21680, 21680, 21680, 21936, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 21680, 21680, 22192, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 22448, 22704, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
-
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
- 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
-
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 23216,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
-
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
- 22960, 22960, 22960, 22960, 22960, 22960, 22960, 23216,
-
-
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 2, 3, 4, 5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 6, 6, 7,
-
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 14, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 9,
-
- 14, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 39, 40, 41, 42, 43,
-
- 42, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 39, 45, 41, 36, 0,
-
- 0, 0, 0, 0, 0, 46, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-
- 47, 14, 48, 12, 12, 12, 49, 49,
- 42, 49, 50, 51, 36, 52, 49, 42,
- 53, 54, 55, 56, 57, 58, 49, 59,
- 42, 60, 50, 61, 62, 62, 62, 14,
-
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 36,
- 38, 38, 38, 38, 38, 38, 38, 63,
-
- 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 36,
- 44, 44, 44, 44, 44, 44, 44, 64,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 67, 68, 65, 66, 65, 66, 65, 66,
- 50, 65, 66, 65, 66, 65, 66, 65,
-
- 66, 65, 66, 65, 66, 65, 66, 65,
- 66, 69, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 70, 65, 66, 65, 66, 65, 66, 71,
-
- 72, 73, 65, 66, 65, 66, 74, 65,
- 66, 75, 75, 65, 66, 50, 76, 77,
- 78, 65, 66, 75, 79, 80, 81, 82,
- 65, 66, 83, 50, 81, 84, 85, 86,
-
- 65, 66, 65, 66, 65, 66, 87, 65,
- 66, 87, 50, 50, 65, 66, 87, 65,
- 66, 88, 88, 65, 66, 65, 66, 89,
- 65, 66, 50, 90, 65, 66, 50, 91,
-
- 90, 90, 90, 90, 92, 93, 94, 92,
- 93, 94, 92, 93, 94, 65, 66, 65,
- 66, 65, 66, 65, 66, 65, 66, 65,
- 66, 65, 66, 65, 66, 95, 65, 66,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 96, 92, 93, 94, 65, 66, 97, 98,
- 99, 100, 65, 66, 65, 66, 65, 66,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 99, 100, 99, 100, 99, 100, 99, 100,
-
- 101, 102, 99, 100, 99, 100, 99, 100,
- 99, 100, 99, 100, 99, 100, 99, 100,
- 99, 100, 99, 100, 102, 102, 102, 103,
- 103, 103, 104, 105, 106, 107, 108, 103,
-
- 103, 105, 109, 110, 111, 112, 113, 109,
- 113, 109, 113, 109, 113, 109, 113, 109,
- 50, 50, 50, 114, 115, 50, 116, 116,
- 50, 117, 50, 118, 50, 50, 50, 50,
-
- 116, 50, 50, 119, 50, 50, 50, 50,
- 120, 121, 50, 122, 50, 50, 50, 121,
- 50, 50, 123, 50, 50, 124, 50, 50,
- 50, 50, 50, 50, 50, 125, 50, 50,
-
- 126, 50, 50, 126, 50, 50, 50, 50,
- 126, 127, 128, 128, 129, 50, 50, 50,
- 50, 50, 130, 50, 90, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50,
-
- 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 131, 131, 131, 131, 131, 102, 102,
- 132, 132, 132, 132, 132, 132, 132, 132,
- 132, 133, 133, 134, 134, 134, 134, 134,
-
- 132, 132, 42, 42, 42, 42, 133, 133,
- 135, 133, 133, 133, 135, 133, 133, 133,
- 134, 134, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 136,
-
- 132, 132, 132, 132, 132, 42, 42, 42,
- 42, 42, 136, 136, 136, 136, 137, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
-
- 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 139, 139, 139, 140, 141, 141,
- 141, 141, 140, 142, 141, 141, 141, 141,
-
- 141, 143, 143, 141, 141, 141, 141, 143,
- 143, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 144, 144, 144, 144,
- 144, 141, 141, 141, 141, 139, 139, 139,
-
- 139, 139, 139, 139, 139, 145, 146, 147,
- 147, 147, 146, 146, 146, 147, 147, 148,
- 149, 149, 149, 150, 150, 150, 150, 149,
- 151, 152, 152, 153, 154, 155, 155, 156,
-
- 157, 157, 158, 159, 159, 159, 159, 159,
- 159, 159, 159, 159, 159, 159, 159, 159,
- 160, 160, 160, 160, 42, 42, 160, 160,
- 160, 160, 132, 161, 161, 161, 34, 160,
-
- 160, 160, 160, 160, 42, 42, 162, 14,
- 163, 163, 163, 160, 164, 160, 165, 165,
- 166, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
-
- 38, 38, 160, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 167, 168, 168, 168,
- 169, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44,
-
- 44, 44, 170, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 171, 172, 172, 160,
- 173, 174, 175, 175, 175, 176, 177, 131,
- 178, 179, 65, 100, 65, 100, 65, 100,
-
- 65, 100, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 180, 181, 182, 50, 183, 184, 185, 186,
- 187, 188, 186, 187, 103, 189, 189, 189,
-
- 190, 191, 191, 191, 191, 191, 191, 191,
- 191, 191, 191, 191, 191, 190, 191, 191,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
-
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44,
-
- 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44,
- 192, 181, 181, 181, 181, 181, 181, 181,
- 181, 181, 181, 181, 181, 192, 181, 181,
-
- 65, 66, 193, 139, 139, 139, 139, 160,
- 194, 194, 178, 179, 99, 100, 99, 100,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
-
- 195, 65, 66, 65, 66, 178, 179, 65,
- 66, 178, 179, 65, 66, 178, 179, 196,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 99, 100, 65, 66,
- 65, 66, 65, 66, 65, 66, 105, 106,
- 65, 66, 113, 109, 113, 109, 113, 109,
-
- 178, 179, 178, 179, 178, 179, 178, 179,
- 178, 179, 178, 179, 178, 179, 178, 179,
- 113, 109, 113, 109, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 197, 197, 197, 197, 197, 197, 197,
- 197, 197, 197, 197, 197, 197, 197, 197,
-
- 197, 197, 197, 197, 197, 197, 197, 197,
- 197, 197, 197, 197, 197, 197, 197, 197,
- 197, 197, 197, 197, 197, 197, 197, 160,
- 160, 134, 198, 198, 199, 198, 199, 198,
-
- 160, 200, 200, 200, 200, 200, 200, 200,
- 200, 200, 200, 200, 200, 200, 200, 200,
- 200, 200, 200, 200, 200, 200, 200, 200,
- 200, 200, 200, 200, 200, 200, 200, 200,
-
- 200, 200, 200, 200, 200, 200, 200, 201,
- 160, 202, 203, 160, 160, 160, 160, 160,
- 204, 205, 206, 206, 206, 206, 205, 206,
- 206, 206, 207, 205, 206, 206, 206, 206,
-
- 206, 206, 152, 205, 205, 205, 205, 205,
- 206, 206, 205, 206, 206, 207, 208, 206,
- 209, 210, 211, 212, 213, 214, 215, 216,
- 217, 218, 219, 220, 221, 222, 223, 224,
-
- 225, 226, 227, 225, 206, 152, 228, 229,
- 204, 204, 204, 204, 204, 204, 204, 204,
- 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230,
-
- 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 204, 204, 204, 204, 204,
- 230, 230, 230, 231, 232, 204, 204, 204,
- 204, 204, 204, 204, 204, 204, 204, 204,
-
- 233, 233, 233, 233, 234, 234, 234, 234,
- 234, 234, 234, 235, 236, 237, 238, 238,
- 149, 149, 149, 149, 149, 149, 234, 234,
- 234, 234, 234, 239, 234, 234, 240, 241,
-
- 234, 242, 243, 243, 243, 243, 244, 243,
- 244, 243, 244, 244, 244, 244, 244, 243,
- 243, 243, 243, 244, 244, 244, 244, 244,
- 244, 244, 244, 234, 234, 234, 234, 234,
-
- 245, 244, 244, 244, 244, 244, 244, 244,
- 243, 244, 244, 246, 247, 248, 249, 250,
- 251, 252, 253, 146, 146, 147, 150, 149,
- 149, 153, 153, 153, 152, 153, 153, 234,
-
- 254, 255, 256, 257, 258, 259, 260, 261,
- 262, 263, 264, 265, 265, 266, 267, 267,
- 268, 243, 243, 243, 242, 243, 243, 243,
- 244, 244, 244, 244, 244, 244, 244, 244,
-
- 244, 244, 244, 244, 244, 244, 244, 244,
- 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 244, 244, 244, 244, 244, 244,
-
- 244, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244,
- 269, 269, 244, 244, 244, 244, 244, 269,
-
- 243, 244, 244, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 244, 243, 244, 270,
- 244, 244, 243, 243, 241, 243, 139, 139,
- 139, 139, 139, 139, 139, 271, 272, 139,
-
- 139, 139, 139, 141, 139, 273, 273, 139,
- 139, 49, 141, 139, 139, 141, 274, 274,
- 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 269, 269, 269, 275, 275, 276,
-
- 277, 277, 277, 278, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 278, 234, 279,
- 270, 280, 269, 269, 269, 270, 270, 270,
- 270, 270, 269, 269, 269, 269, 270, 269,
-
- 269, 269, 269, 269, 269, 269, 269, 269,
- 270, 269, 270, 269, 270, 276, 276, 274,
- 146, 147, 146, 146, 147, 146, 146, 147,
- 147, 147, 146, 147, 147, 146, 147, 146,
-
- 146, 146, 147, 146, 147, 146, 147, 146,
- 147, 146, 146, 234, 234, 274, 276, 276,
- 281, 281, 281, 281, 281, 281, 281, 281,
- 281, 282, 282, 282, 281, 281, 281, 281,
-
- 281, 281, 281, 281, 281, 281, 281, 281,
- 281, 281, 281, 282, 282, 281, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
-
- 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283,
-
- 283, 283, 283, 283, 283, 283, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 285, 234, 234, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
-
- 286, 287, 288, 289, 290, 291, 292, 293,
- 294, 295, 296, 296, 296, 296, 296, 296,
- 296, 296, 296, 296, 296, 296, 296, 296,
- 296, 296, 296, 296, 296, 296, 296, 296,
-
- 296, 296, 296, 296, 296, 296, 296, 296,
- 296, 296, 296, 297, 297, 297, 297, 297,
- 297, 297, 298, 297, 299, 299, 300, 301,
- 302, 303, 304, 204, 204, 204, 204, 204,
-
- 204, 204, 204, 204, 204, 204, 204, 204,
- 204, 204, 204, 204, 204, 204, 204, 204,
- 204, 204, 204, 204, 204, 204, 204, 204,
- 204, 204, 204, 204, 204, 204, 204, 204,
-
- 160, 305, 305, 306, 307, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 160, 160, 308, 90, 306, 306,
-
- 306, 305, 305, 305, 305, 305, 305, 305,
- 305, 306, 306, 306, 306, 309, 160, 160,
- 90, 139, 141, 139, 139, 160, 160, 160,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 305, 305, 310, 310, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 198, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 321, 321, 322, 321, 321,
-
- 160, 305, 306, 306, 160, 90, 90, 90,
- 90, 90, 90, 90, 90, 160, 160, 90,
- 90, 160, 160, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 160, 160, 160, 90, 90,
- 90, 90, 160, 160, 308, 307, 323, 306,
-
- 306, 305, 305, 305, 305, 160, 160, 306,
- 306, 160, 160, 306, 306, 309, 322, 160,
- 160, 160, 160, 160, 160, 160, 160, 323,
- 160, 160, 160, 160, 90, 90, 160, 90,
-
- 90, 90, 305, 305, 160, 160, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 90, 90, 12, 12, 324, 324, 324, 324,
- 324, 324, 193, 160, 160, 160, 160, 160,
-
- 160, 325, 305, 326, 160, 90, 90, 90,
- 90, 90, 90, 160, 160, 160, 160, 90,
- 90, 160, 160, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 160, 90, 90, 160,
- 90, 90, 160, 160, 308, 160, 306, 306,
-
- 306, 305, 305, 160, 160, 160, 160, 305,
- 305, 160, 160, 305, 305, 309, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 90, 90, 90, 90, 160, 90, 160,
-
- 160, 160, 160, 160, 160, 160, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 305, 305, 90, 90, 90, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 305, 305, 306, 160, 90, 90, 90,
- 90, 90, 90, 90, 307, 90, 160, 90,
- 90, 90, 160, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 160, 90, 90, 90,
- 90, 90, 160, 160, 308, 90, 306, 306,
-
- 306, 305, 305, 305, 305, 305, 160, 305,
- 305, 306, 160, 306, 306, 309, 160, 160,
- 90, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 90, 307, 325, 325, 160, 160, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 160, 327, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 160, 307, 90, 90,
- 90, 90, 160, 160, 308, 90, 323, 305,
-
- 306, 305, 305, 305, 160, 160, 160, 306,
- 306, 160, 160, 306, 306, 309, 160, 160,
- 160, 160, 160, 160, 160, 160, 305, 323,
- 160, 160, 160, 160, 90, 90, 160, 90,
-
- 90, 90, 160, 160, 160, 160, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 193, 307, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 305, 90, 160, 90, 90, 90,
- 90, 90, 90, 160, 160, 160, 90, 90,
- 90, 160, 90, 90, 90, 90, 160, 160,
- 160, 90, 90, 160, 90, 160, 90, 90,
-
- 160, 160, 160, 90, 90, 160, 160, 160,
- 90, 90, 90, 160, 160, 160, 90, 90,
- 90, 90, 90, 90, 90, 90, 322, 90,
- 90, 90, 160, 160, 160, 160, 323, 306,
-
- 305, 306, 306, 160, 160, 160, 306, 306,
- 306, 160, 306, 306, 306, 309, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 323,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 328, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 324, 324, 324, 238, 238, 238, 238, 238,
- 238, 327, 238, 160, 160, 160, 160, 160,
-
- 160, 306, 306, 306, 160, 90, 90, 90,
- 90, 90, 90, 90, 90, 160, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 160, 90, 90, 90,
- 90, 90, 160, 160, 160, 160, 305, 305,
-
- 305, 306, 306, 306, 306, 160, 305, 305,
- 305, 160, 305, 305, 305, 309, 160, 160,
- 160, 160, 160, 160, 160, 329, 330, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 90, 90, 160, 160, 160, 160, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 306, 306, 160, 90, 90, 90,
- 90, 90, 90, 90, 90, 160, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 160, 90, 90, 90,
- 90, 90, 160, 160, 331, 307, 306, 332,
-
- 306, 306, 323, 306, 306, 160, 332, 306,
- 306, 160, 306, 306, 305, 309, 160, 160,
- 160, 160, 160, 160, 160, 323, 323, 160,
- 160, 160, 160, 160, 160, 160, 90, 160,
-
- 90, 90, 333, 333, 160, 160, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320,
- 160, 300, 300, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 160, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 160, 160, 160, 160, 323, 306,
-
- 306, 305, 305, 305, 160, 160, 306, 306,
- 306, 160, 306, 306, 306, 309, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 323,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 334, 334, 160, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 160,
- 160, 160, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 160, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 160, 335, 160, 160,
-
- 335, 335, 335, 335, 335, 335, 335, 160,
- 160, 160, 336, 160, 160, 160, 160, 337,
- 334, 334, 284, 284, 284, 160, 284, 160,
- 334, 334, 334, 334, 334, 334, 334, 337,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 334, 334, 338, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 339, 339, 339, 339, 339, 339, 339,
- 339, 339, 339, 339, 339, 339, 339, 339,
- 339, 339, 339, 339, 339, 339, 339, 339,
- 339, 339, 339, 339, 339, 339, 339, 339,
-
- 339, 339, 339, 339, 339, 339, 339, 339,
- 339, 339, 339, 339, 339, 339, 339, 339,
- 339, 340, 339, 339, 340, 340, 340, 340,
- 341, 341, 342, 160, 160, 160, 160, 12,
-
- 339, 339, 339, 339, 339, 339, 343, 340,
- 344, 344, 344, 344, 340, 340, 340, 198,
- 311, 312, 313, 314, 315, 316, 317, 318,
- 319, 320, 345, 345, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 339, 339, 160, 339, 160, 160, 339,
- 339, 160, 339, 160, 160, 339, 160, 160,
- 160, 160, 160, 160, 339, 339, 339, 339,
- 160, 339, 339, 339, 339, 339, 339, 339,
-
- 160, 339, 339, 339, 160, 339, 160, 339,
- 160, 160, 339, 339, 160, 339, 339, 339,
- 339, 340, 339, 339, 340, 340, 340, 340,
- 346, 346, 160, 340, 340, 339, 160, 160,
-
- 339, 339, 339, 339, 339, 160, 343, 160,
- 347, 347, 347, 347, 340, 340, 160, 160,
- 311, 312, 313, 314, 315, 316, 317, 318,
- 319, 320, 160, 160, 339, 339, 160, 160,
-
- 348, 349, 349, 349, 350, 351, 350, 350,
- 352, 350, 350, 353, 352, 354, 354, 354,
- 354, 354, 352, 355, 356, 355, 355, 355,
- 205, 205, 355, 355, 355, 355, 355, 355,
-
- 357, 358, 359, 360, 361, 362, 363, 364,
- 365, 366, 367, 367, 367, 367, 367, 367,
- 367, 367, 367, 367, 368, 205, 355, 205,
- 355, 369, 370, 371, 370, 371, 372, 372,
-
- 348, 348, 348, 348, 348, 348, 348, 348,
- 160, 348, 348, 348, 348, 348, 348, 348,
- 348, 348, 348, 348, 348, 348, 348, 348,
- 348, 348, 348, 348, 348, 348, 348, 348,
-
- 348, 348, 348, 348, 348, 348, 348, 348,
- 348, 348, 335, 160, 160, 160, 160, 160,
- 160, 373, 374, 375, 376, 375, 375, 375,
- 375, 375, 374, 374, 374, 374, 375, 377,
-
- 374, 375, 206, 206, 378, 353, 206, 206,
- 348, 348, 348, 348, 160, 160, 160, 160,
- 375, 375, 375, 375, 375, 375, 284, 375,
- 160, 375, 375, 375, 375, 375, 375, 375,
-
- 375, 375, 375, 375, 375, 375, 375, 375,
- 375, 375, 375, 375, 375, 375, 284, 284,
- 284, 375, 375, 375, 375, 375, 375, 375,
- 284, 375, 284, 284, 284, 160, 379, 379,
-
- 380, 380, 380, 380, 380, 380, 147, 380,
- 380, 380, 380, 380, 380, 160, 160, 380,
- 381, 381, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 382, 382, 382, 382, 382, 382, 382, 382,
- 382, 382, 382, 382, 382, 382, 382, 382,
- 382, 382, 382, 382, 382, 382, 382, 382,
- 382, 382, 382, 382, 382, 382, 382, 382,
-
- 382, 382, 160, 382, 382, 382, 382, 382,
- 160, 382, 382, 160, 383, 384, 384, 384,
- 384, 383, 384, 160, 160, 160, 384, 385,
- 383, 386, 160, 160, 160, 160, 160, 160,
-
- 387, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 397, 397, 338, 338, 338, 338,
- 382, 382, 382, 382, 382, 382, 383, 383,
- 384, 384, 160, 160, 160, 160, 160, 160,
-
- 398, 398, 398, 398, 398, 398, 398, 398,
- 398, 398, 398, 398, 398, 398, 398, 398,
- 398, 398, 398, 398, 398, 398, 398, 398,
- 398, 398, 398, 398, 398, 398, 398, 398,
-
- 398, 398, 398, 398, 398, 398, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 399,
- 399, 322, 322, 198, 400, 160, 160, 160,
-
- 401, 401, 401, 401, 401, 401, 401, 401,
- 401, 401, 401, 401, 401, 401, 401, 401,
- 401, 401, 401, 401, 401, 401, 401, 401,
- 401, 401, 401, 401, 401, 401, 401, 401,
-
- 401, 401, 401, 401, 401, 401, 401, 401,
- 401, 401, 401, 401, 401, 401, 401, 401,
- 401, 401, 401, 401, 401, 401, 401, 401,
- 401, 401, 160, 160, 160, 160, 160, 401,
-
- 402, 402, 402, 402, 402, 402, 402, 402,
- 402, 402, 402, 402, 402, 402, 402, 402,
- 402, 402, 402, 402, 402, 402, 402, 402,
- 402, 402, 402, 402, 402, 402, 402, 402,
-
- 402, 402, 402, 160, 160, 160, 160, 160,
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
-
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
-
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 160, 160, 160, 160, 160, 160,
-
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 160, 335, 335, 335, 335, 160, 160,
- 335, 335, 335, 335, 335, 335, 335, 160,
- 335, 160, 335, 335, 335, 335, 160, 160,
-
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 160, 335, 335, 335, 335, 160, 160,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 160, 335, 335, 335, 335, 160, 160,
- 335, 335, 335, 335, 335, 335, 335, 160,
-
- 335, 160, 335, 335, 335, 335, 160, 160,
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 335, 335, 335, 335, 335, 335, 160,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 160, 335, 335, 335, 335, 160, 160,
- 335, 335, 335, 335, 335, 335, 335, 322,
-
- 335, 335, 335, 335, 335, 335, 335, 322,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 160, 160, 160, 160, 153,
-
- 404, 405, 406, 338, 338, 338, 338, 406,
- 406, 407, 408, 409, 410, 411, 412, 413,
- 414, 415, 416, 416, 416, 416, 416, 416,
- 416, 416, 416, 416, 416, 160, 160, 160,
-
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 160, 160, 160, 160, 160, 160,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 338, 406, 335,
- 335, 335, 335, 335, 335, 335, 335, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 418, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 419, 420, 160, 160, 160,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 405, 405, 405, 421, 421,
- 421, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 399, 399, 399, 399, 399, 399, 399, 399,
- 399, 399, 399, 399, 399, 160, 399, 399,
- 399, 399, 422, 422, 423, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 399, 399, 399, 399, 399, 399, 399, 399,
- 399, 399, 399, 399, 399, 399, 399, 399,
- 399, 399, 422, 422, 423, 424, 424, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 399, 399, 399, 399, 399, 399, 399, 399,
- 399, 399, 399, 399, 399, 399, 399, 399,
- 399, 399, 422, 422, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 399, 399, 399, 399, 399, 399, 399, 399,
- 399, 399, 399, 399, 399, 160, 399, 399,
- 399, 160, 422, 422, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 382, 382, 382, 382, 382, 382, 382, 382,
- 382, 382, 382, 382, 382, 382, 382, 382,
- 382, 382, 382, 382, 425, 425, 383, 384,
- 384, 384, 384, 384, 384, 384, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 384, 383,
- 383, 384, 384, 384, 384, 384, 384, 384,
- 384, 384, 386, 384, 405, 405, 426, 427,
- 405, 338, 405, 428, 382, 429, 160, 160,
-
- 387, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 160, 160, 160, 160, 160, 160,
- 430, 430, 430, 430, 430, 430, 430, 430,
- 430, 430, 160, 160, 160, 160, 160, 160,
-
- 431, 431, 432, 433, 432, 432, 434, 431,
- 432, 433, 431, 284, 284, 284, 435, 160,
- 387, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 160, 160, 160, 160, 160, 160,
-
- 335, 335, 335, 137, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 335, 335, 335, 335, 335, 335, 335,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 335, 335, 335, 335, 335, 335, 335, 335,
- 335, 436, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 160, 160, 160,
-
- 325, 325, 325, 326, 326, 326, 326, 325,
- 325, 437, 437, 437, 160, 160, 160, 160,
- 326, 326, 325, 326, 326, 326, 326, 326,
- 326, 438, 149, 150, 160, 160, 160, 160,
-
- 238, 160, 160, 160, 439, 439, 440, 441,
- 442, 443, 444, 445, 446, 447, 448, 449,
- 450, 450, 450, 450, 450, 450, 450, 450,
- 450, 450, 450, 450, 450, 450, 450, 450,
-
- 450, 450, 450, 450, 450, 450, 450, 450,
- 450, 450, 450, 450, 450, 450, 160, 160,
- 450, 450, 450, 450, 450, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 451, 451, 451, 451, 451, 451, 451, 451,
- 451, 451, 451, 451, 451, 451, 451, 451,
- 451, 451, 451, 451, 451, 451, 451, 451,
- 451, 451, 451, 451, 451, 451, 451, 451,
-
- 451, 451, 451, 451, 451, 451, 451, 451,
- 451, 451, 160, 160, 160, 160, 160, 160,
- 452, 452, 452, 452, 452, 452, 452, 452,
- 452, 452, 452, 452, 452, 452, 452, 452,
-
- 452, 451, 451, 451, 451, 451, 451, 451,
- 452, 452, 160, 160, 160, 160, 160, 160,
- 328, 453, 454, 455, 456, 457, 458, 459,
- 460, 461, 160, 160, 160, 160, 462, 462,
-
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
-
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 153,
- 152, 463, 463, 463, 160, 160, 464, 465,
-
- 333, 333, 333, 333, 466, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
-
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 467, 466, 333, 333,
- 333, 333, 333, 466, 333, 466, 466, 466,
-
- 466, 466, 333, 466, 468, 321, 321, 321,
- 321, 321, 321, 321, 160, 160, 160, 160,
- 469, 470, 471, 472, 473, 474, 475, 476,
- 477, 478, 479, 479, 480, 480, 479, 479,
-
- 480, 481, 481, 481, 481, 481, 481, 481,
- 481, 481, 481, 297, 298, 297, 297, 297,
- 297, 297, 297, 297, 481, 481, 481, 481,
- 481, 481, 481, 481, 481, 160, 160, 160,
-
- 102, 102, 102, 102, 102, 102, 102, 102,
- 102, 102, 102, 102, 102, 102, 102, 102,
- 102, 102, 102, 102, 102, 102, 102, 102,
- 102, 102, 102, 102, 102, 102, 102, 102,
-
- 102, 102, 102, 102, 102, 102, 102, 102,
- 102, 102, 102, 102, 482, 482, 482, 482,
- 482, 482, 482, 482, 482, 482, 482, 482,
- 482, 482, 482, 482, 482, 482, 482, 482,
-
- 482, 482, 482, 482, 482, 482, 482, 482,
- 482, 482, 482, 482, 482, 482, 482, 482,
- 482, 482, 482, 482, 482, 482, 482, 482,
- 482, 482, 482, 482, 482, 482, 482, 482,
-
- 482, 482, 102, 102, 102, 102, 102, 102,
- 102, 102, 102, 102, 103, 103, 103, 103,
- 103, 103, 103, 103, 103, 103, 103, 103,
- 483, 103, 103, 103, 103, 484, 103, 103,
-
- 103, 103, 103, 103, 103, 103, 103, 103,
- 103, 103, 103, 103, 103, 103, 103, 103,
- 103, 103, 103, 103, 103, 103, 103, 103,
- 103, 103, 103, 483, 483, 483, 483, 483,
-
- 483, 483, 483, 483, 483, 483, 483, 483,
- 483, 483, 483, 483, 483, 483, 483, 483,
- 483, 483, 483, 483, 483, 483, 483, 483,
- 483, 483, 483, 483, 483, 483, 483, 483,
-
- 153, 153, 152, 153, 297, 297, 297, 297,
- 297, 297, 298, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 297, 298,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 485, 486,
- 487, 488, 489, 490, 160, 160, 160, 160,
-
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 65, 66, 65, 66, 65, 66,
- 65, 66, 160, 160, 160, 160, 160, 160,
-
- 491, 491, 491, 491, 491, 491, 491, 491,
- 492, 492, 492, 492, 492, 492, 492, 492,
- 491, 491, 491, 491, 491, 491, 160, 160,
- 492, 492, 492, 492, 492, 492, 160, 160,
-
- 491, 491, 491, 491, 491, 491, 491, 491,
- 492, 492, 492, 492, 492, 492, 492, 492,
- 491, 491, 491, 491, 491, 491, 491, 491,
- 492, 492, 492, 492, 492, 492, 492, 492,
-
- 491, 491, 491, 491, 491, 491, 160, 160,
- 492, 492, 492, 492, 492, 492, 160, 160,
- 493, 491, 494, 491, 495, 491, 496, 491,
- 160, 492, 160, 492, 160, 492, 160, 492,
-
- 491, 491, 491, 491, 491, 491, 491, 491,
- 492, 492, 492, 492, 492, 492, 492, 492,
- 497, 497, 498, 498, 498, 498, 499, 499,
- 500, 500, 501, 501, 502, 502, 160, 160,
-
- 503, 504, 505, 506, 507, 508, 509, 510,
- 511, 512, 513, 514, 515, 516, 517, 518,
- 519, 520, 521, 522, 523, 524, 525, 526,
- 527, 528, 529, 530, 531, 532, 533, 534,
-
- 535, 536, 537, 538, 539, 540, 541, 542,
- 543, 544, 545, 546, 547, 548, 549, 550,
- 491, 491, 551, 552, 553, 160, 554, 555,
- 492, 492, 556, 556, 557, 42, 558, 42,
-
- 42, 42, 559, 560, 561, 160, 562, 563,
- 564, 564, 564, 564, 565, 42, 42, 42,
- 491, 491, 566, 567, 160, 160, 568, 569,
- 492, 492, 570, 570, 160, 42, 42, 42,
-
- 491, 491, 571, 572, 573, 182, 574, 575,
- 492, 492, 576, 576, 577, 42, 42, 42,
- 160, 160, 578, 579, 580, 160, 581, 582,
- 583, 583, 584, 584, 585, 42, 42, 160,
-
- 586, 586, 586, 586, 586, 586, 586, 587,
- 586, 586, 586, 588, 589, 590, 591, 592,
- 593, 594, 593, 593, 595, 596, 14, 14,
- 597, 598, 599, 600, 597, 601, 599, 600,
-
- 14, 14, 14, 14, 602, 602, 602, 603,
- 604, 605, 606, 607, 608, 609, 610, 611,
- 13, 13, 13, 13, 13, 612, 612, 612,
- 14, 597, 601, 14, 613, 613, 14, 43,
-
- 43, 14, 14, 14, 614, 16, 17, 615,
- 616, 616, 431, 431, 431, 431, 617, 617,
- 617, 617, 185, 618, 619, 620, 621, 617,
- 621, 621, 621, 621, 620, 621, 621, 622,
-
- 623, 624, 624, 624, 160, 160, 160, 160,
- 160, 160, 625, 625, 625, 625, 625, 625,
- 626, 627, 160, 160, 628, 629, 630, 631,
- 632, 633, 634, 634, 36, 16, 17, 50,
-
- 626, 60, 55, 56, 628, 629, 630, 631,
- 632, 633, 634, 634, 36, 16, 17, 160,
- 483, 483, 483, 483, 483, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 12, 12, 12, 12, 12, 12, 12, 48,
- 12, 12, 12, 635, 636, 428, 428, 428,
- 637, 637, 638, 638, 638, 638, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 139, 139, 144, 144, 139, 139, 139, 139,
- 144, 144, 144, 139, 139, 272, 272, 272,
-
- 272, 139, 194, 194, 639, 640, 640, 159,
- 641, 159, 640, 642, 298, 298, 298, 298,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 49, 49, 175, 643, 49, 49, 49, 175,
- 49, 643, 50, 175, 175, 175, 50, 50,
- 175, 175, 175, 50, 49, 175, 644, 49,
- 49, 175, 175, 175, 175, 175, 49, 49,
-
- 49, 49, 49, 49, 175, 49, 645, 49,
- 175, 49, 646, 647, 175, 175, 648, 50,
- 175, 175, 649, 175, 50, 90, 90, 90,
- 90, 131, 650, 238, 103, 627, 651, 651,
-
- 185, 185, 185, 185, 185, 651, 627, 627,
- 627, 627, 652, 185, 417, 300, 653, 160,
- 160, 160, 160, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
-
- 654, 654, 654, 654, 654, 654, 654, 654,
- 654, 654, 654, 654, 654, 654, 654, 654,
- 655, 655, 655, 655, 655, 655, 655, 655,
- 655, 655, 655, 655, 655, 655, 655, 655,
-
- 656, 656, 656, 99, 109, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 36, 36, 36, 36, 36, 49, 49, 49,
- 49, 49, 36, 36, 49, 49, 49, 49,
-
- 36, 49, 49, 36, 49, 49, 36, 49,
- 49, 49, 49, 49, 49, 49, 36, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 36, 36,
- 49, 49, 36, 49, 36, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 650, 650, 650, 650, 650,
- 650, 650, 650, 650, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
-
- 36, 36, 36, 36, 36, 36, 36, 36,
- 657, 657, 657, 658, 658, 658, 36, 36,
- 36, 36, 18, 54, 36, 659, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36,
-
- 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 660, 661, 36, 36,
-
- 36, 36, 36, 662, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 660, 661, 660, 661, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36,
-
- 36, 36, 36, 36, 660, 661, 660, 661,
- 660, 661, 660, 661, 36, 36, 660, 661,
- 660, 661, 660, 661, 660, 661, 660, 661,
- 660, 661, 660, 661, 660, 661, 660, 661,
-
- 660, 661, 660, 661, 660, 661, 660, 661,
- 660, 661, 660, 661, 36, 36, 36, 660,
- 661, 660, 661, 36, 36, 36, 36, 36,
- 663, 36, 36, 36, 36, 36, 36, 36,
-
- 36, 36, 660, 661, 36, 36, 664, 36,
- 665, 666, 36, 666, 36, 36, 36, 36,
- 660, 661, 660, 661, 660, 661, 660, 661,
- 36, 36, 36, 36, 36, 36, 36, 36,
-
- 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 660, 661, 660, 661, 667, 36, 36,
- 660, 661, 36, 36, 36, 36, 660, 661,
- 660, 661, 660, 661, 660, 661, 660, 661,
-
- 660, 661, 660, 661, 660, 661, 660, 661,
- 660, 661, 660, 661, 660, 661, 36, 36,
- 660, 661, 668, 668, 668, 185, 669, 669,
- 185, 185, 670, 670, 670, 671, 671, 185,
-
- 49, 650, 49, 49, 49, 49, 49, 49,
- 660, 661, 660, 661, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 36, 36, 49, 49, 49, 49, 49, 49,
- 49, 16, 17, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
-
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
-
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 650, 185, 650, 650, 650,
-
- 650, 650, 650, 650, 650, 650, 650, 650,
- 650, 650, 650, 650, 650, 650, 650, 650,
- 650, 650, 650, 650, 650, 380, 650, 650,
- 650, 650, 650, 185, 185, 185, 185, 185,
-
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 652, 652, 652, 652,
- 652, 652, 652, 652, 652, 652, 652, 652,
-
- 652, 652, 652, 652, 652, 652, 652, 652,
- 652, 652, 652, 652, 652, 652, 652, 238,
- 238, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 672, 672, 672, 672,
-
- 672, 672, 300, 300, 300, 300, 300, 300,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 650, 650, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 673, 674, 675, 676, 677, 678, 679, 680,
- 681, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 673, 674, 675, 676,
- 677, 678, 679, 680, 681, 62, 62, 62,
-
- 62, 62, 62, 62, 62, 62, 62, 62,
- 60, 55, 56, 628, 629, 630, 631, 632,
- 633, 682, 682, 682, 682, 682, 682, 682,
- 682, 682, 682, 682, 193, 193, 193, 193,
-
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 193, 193,
- 193, 193, 193, 193, 193, 193, 683, 683,
- 683, 683, 683, 683, 683, 683, 683, 683,
-
- 683, 683, 683, 683, 683, 683, 683, 683,
- 683, 683, 683, 683, 683, 683, 683, 683,
- 684, 684, 684, 684, 684, 684, 684, 684,
- 684, 684, 684, 684, 684, 684, 684, 684,
-
- 684, 684, 684, 684, 684, 684, 684, 684,
- 684, 684, 685, 686, 686, 686, 686, 686,
- 686, 686, 686, 686, 686, 687, 688, 689,
- 690, 691, 692, 693, 694, 695, 686, 696,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 652, 652,
- 652, 652, 652, 652, 652, 652, 652, 652,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 36,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 36, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 650, 650, 650, 650, 650, 650, 650, 650,
- 185, 185, 185, 185, 185, 185, 185, 185,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 238, 238, 652, 652,
- 417, 650, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 36,
- 650, 650, 652, 652, 652, 652, 652, 652,
- 652, 652, 652, 652, 652, 652, 417, 417,
-
- 652, 652, 652, 652, 652, 652, 652, 652,
- 652, 652, 238, 238, 238, 238, 238, 238,
- 238, 238, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 160, 160, 160,
-
- 238, 238, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 404, 417, 417, 417,
- 417, 417, 300, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 49, 49, 49, 49, 160, 49, 49,
- 49, 49, 160, 160, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 160, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 160, 49, 160, 49,
- 49, 49, 49, 160, 160, 160, 49, 160,
- 49, 49, 49, 697, 697, 697, 697, 160,
-
- 160, 49, 698, 698, 49, 49, 49, 49,
- 699, 700, 699, 700, 699, 700, 699, 700,
- 699, 700, 699, 700, 699, 700, 673, 674,
- 675, 676, 677, 678, 679, 680, 681, 62,
-
- 673, 674, 675, 676, 677, 678, 679, 680,
- 681, 62, 673, 674, 675, 676, 677, 678,
- 679, 680, 681, 62, 49, 160, 160, 160,
- 49, 49, 49, 49, 49, 49, 49, 49,
-
- 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49,
- 160, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 160,
-
- 701, 701, 701, 702, 703, 704, 705, 672,
- 672, 672, 672, 160, 160, 160, 160, 160,
- 185, 185, 185, 185, 185, 706, 707, 185,
- 185, 185, 185, 185, 185, 706, 707, 185,
-
- 185, 185, 706, 707, 706, 707, 699, 700,
- 699, 700, 699, 700, 160, 160, 160, 160,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
-
- 380, 380, 380, 380, 380, 380, 380, 380,
- 380, 380, 380, 380, 380, 380, 380, 380,
- 380, 380, 380, 380, 380, 380, 380, 380,
- 380, 380, 380, 380, 380, 380, 380, 380,
-
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
-
- 185, 185, 185, 699, 700, 699, 700, 699,
- 700, 699, 700, 699, 700, 708, 709, 710,
- 711, 699, 700, 699, 700, 699, 700, 699,
- 700, 185, 185, 185, 185, 185, 185, 185,
-
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 712, 185, 185, 185, 185, 185, 185, 185,
-
- 706, 707, 185, 185, 706, 707, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 706,
- 707, 706, 707, 185, 706, 707, 185, 185,
- 699, 700, 699, 700, 185, 185, 185, 185,
-
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 713, 185, 185,
- 706, 707, 185, 185, 699, 700, 185, 185,
-
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 706, 707, 706, 707, 185,
- 185, 185, 185, 185, 706, 707, 185, 185,
- 185, 185, 185, 185, 706, 707, 185, 185,
-
- 185, 185, 185, 185, 706, 707, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185,
- 185, 706, 707, 185, 185, 706, 707, 706,
-
- 707, 706, 707, 706, 707, 185, 185, 185,
- 185, 185, 185, 706, 707, 185, 185, 185,
- 185, 706, 707, 706, 707, 706, 707, 706,
- 707, 706, 707, 706, 707, 185, 185, 185,
-
- 185, 706, 707, 185, 185, 185, 706, 707,
- 706, 707, 706, 707, 706, 707, 185, 706,
- 707, 185, 185, 706, 707, 185, 185, 185,
- 185, 185, 185, 706, 707, 706, 707, 706,
-
- 707, 706, 707, 706, 707, 706, 707, 185,
- 185, 185, 185, 185, 185, 706, 707, 706,
- 707, 706, 707, 706, 707, 706, 707, 185,
- 185, 185, 185, 185, 185, 185, 714, 185,
-
- 185, 185, 185, 715, 716, 715, 185, 185,
- 185, 185, 185, 185, 706, 707, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 706,
- 707, 706, 707, 185, 185, 185, 185, 185,
-
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 417, 417,
- 417, 417, 417, 417, 300, 300, 300, 300,
- 300, 300, 300, 160, 160, 160, 160, 160,
-
- 300, 300, 300, 300, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 717, 717, 717, 717, 717, 717, 717, 717,
- 717, 717, 717, 717, 717, 717, 717, 717,
- 717, 717, 717, 717, 717, 717, 717, 717,
- 717, 717, 717, 717, 717, 717, 717, 717,
-
- 717, 717, 717, 717, 717, 717, 717, 717,
- 717, 717, 717, 717, 717, 717, 717, 160,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 718,
-
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 160,
-
- 113, 109, 719, 720, 721, 722, 723, 113,
- 109, 113, 109, 113, 109, 160, 160, 160,
- 160, 160, 160, 160, 724, 113, 109, 724,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 105, 106, 105, 106, 105, 106, 105, 106,
- 105, 106, 105, 106, 105, 106, 105, 106,
- 105, 106, 105, 106, 105, 106, 105, 106,
- 105, 106, 105, 106, 105, 106, 105, 106,
-
- 105, 106, 105, 106, 103, 417, 417, 417,
- 417, 417, 417, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 621, 621, 621, 621, 725, 621, 621,
-
- 726, 726, 726, 726, 726, 726, 726, 726,
- 726, 726, 726, 726, 726, 726, 726, 726,
- 726, 726, 726, 726, 726, 726, 726, 726,
- 726, 726, 726, 726, 726, 726, 726, 726,
-
- 726, 726, 726, 726, 726, 726, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
-
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
-
- 322, 322, 322, 322, 322, 322, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 400,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 322, 322, 322, 322, 322, 322, 322, 160,
- 322, 322, 322, 322, 322, 322, 322, 160,
- 322, 322, 322, 322, 322, 322, 322, 160,
- 322, 322, 322, 322, 322, 322, 322, 160,
-
- 727, 727, 728, 729, 728, 729, 727, 727,
- 727, 728, 729, 727, 728, 729, 621, 621,
- 621, 621, 621, 621, 621, 621, 620, 730,
- 160, 160, 160, 160, 728, 729, 160, 160,
-
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 160, 731, 731, 731, 731, 731,
-
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
-
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 160, 160, 160, 160,
-
- 732, 733, 734, 735, 736, 737, 738, 739,
- 16, 17, 16, 17, 16, 17, 16, 17,
- 16, 17, 736, 736, 16, 17, 16, 17,
- 16, 17, 16, 17, 740, 16, 17, 741,
-
- 736, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 742, 743, 140, 744, 745, 745,
- 746, 747, 747, 747, 747, 747, 736, 736,
- 748, 748, 748, 749, 750, 751, 731, 736,
-
- 160, 752, 738, 752, 738, 752, 738, 752,
- 738, 752, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
-
- 738, 738, 738, 752, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
-
- 738, 738, 738, 752, 738, 752, 738, 752,
- 738, 738, 738, 738, 738, 738, 752, 738,
- 738, 738, 738, 738, 738, 753, 753, 160,
- 160, 754, 754, 755, 755, 756, 756, 757,
-
- 758, 759, 760, 759, 760, 759, 760, 759,
- 760, 759, 760, 760, 760, 760, 760, 760,
- 760, 760, 760, 760, 760, 760, 760, 760,
- 760, 760, 760, 760, 760, 760, 760, 760,
-
- 760, 760, 760, 759, 760, 760, 760, 760,
- 760, 760, 760, 760, 760, 760, 760, 760,
- 760, 760, 760, 760, 760, 760, 760, 760,
- 760, 760, 760, 760, 760, 760, 760, 760,
-
- 760, 760, 760, 759, 760, 759, 760, 759,
- 760, 760, 760, 760, 760, 760, 759, 760,
- 760, 760, 760, 760, 760, 759, 759, 760,
- 760, 760, 760, 761, 762, 762, 762, 763,
-
- 160, 160, 160, 160, 160, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
-
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 160, 160, 160,
- 160, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
-
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 764,
-
- 764, 764, 764, 764, 764, 764, 764, 764,
- 764, 764, 764, 764, 764, 764, 764, 160,
- 765, 765, 766, 766, 766, 766, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
-
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 769, 769, 769, 769, 769, 769, 769, 769,
- 769, 769, 769, 769, 769, 769, 769, 769,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 770, 770, 160,
-
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
-
- 765, 765, 765, 765, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 770, 771, 771, 771, 771, 771, 771, 771,
- 771, 771, 771, 771, 771, 771, 771, 771,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 770, 770, 768, 765,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 771, 771, 771, 771, 771, 771, 771,
- 771, 771, 771, 771, 771, 771, 771, 771,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 770, 770, 770, 770,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 160,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 770,
- 770, 770, 770, 765, 765, 765, 765, 765,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 770, 770,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 770,
-
- 772, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 772, 772,
-
- 772, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 738, 738,
-
- 738, 738, 738, 738, 738, 738, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 160, 160, 160, 160,
-
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 774, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
-
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 767, 767, 767,
-
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 767, 160, 160, 160,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
-
- 731, 731, 775, 775, 731, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
- 731, 731, 731, 731, 775, 731, 731, 731,
- 731, 731, 731, 731, 731, 731, 731, 731,
-
- 731, 775, 731, 731, 731, 775, 731, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 776, 776, 776, 776, 776, 776, 776, 776,
- 776, 776, 776, 776, 776, 776, 776, 776,
- 776, 776, 776, 776, 776, 776, 776, 777,
- 777, 777, 777, 160, 160, 160, 160, 160,
-
- 778, 778, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 322, 322, 779, 322, 322, 322, 780, 322,
- 322, 322, 322, 781, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322,
-
- 322, 322, 322, 463, 463, 781, 781, 463,
- 417, 417, 417, 417, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
-
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 782, 782, 303, 303,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 783, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 783, 784, 784, 784,
-
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 783, 784, 784, 784, 784, 784, 784, 784,
-
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 783, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
-
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 783, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
-
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 783, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
-
- 784, 784, 784, 784, 784, 784, 784, 784,
- 783, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
-
- 784, 784, 784, 784, 783, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
- 784, 784, 784, 784, 784, 784, 784, 784,
-
- 784, 784, 784, 784, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
-
- 786, 786, 786, 786, 786, 786, 786, 786,
- 786, 786, 786, 786, 786, 786, 786, 786,
- 786, 786, 786, 786, 786, 786, 786, 786,
- 786, 786, 786, 786, 786, 786, 786, 786,
-
- 738, 738, 738, 738, 738, 738, 738, 738,
- 738, 738, 738, 738, 738, 738, 160, 160,
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
-
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
-
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 160, 160, 160, 160, 160,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
-
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
-
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 160, 160, 160, 160, 160, 160,
-
- 788, 789, 790, 791, 792, 793, 794, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 795, 796, 797, 798, 799,
- 160, 160, 160, 160, 160, 800, 801, 230,
-
- 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 634, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 204,
- 230, 230, 230, 230, 230, 204, 230, 204,
-
- 230, 230, 204, 230, 230, 204, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
-
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
-
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 234, 234, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
-
- 234, 234, 234, 234, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
- 234, 234, 234, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
-
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 599, 741,
-
- 234, 234, 234, 234, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
-
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 234, 234, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
-
- 242, 242, 242, 242, 242, 242, 242, 242,
- 234, 234, 234, 234, 234, 234, 234, 234,
- 802, 802, 802, 802, 802, 802, 802, 802,
- 802, 802, 802, 802, 802, 802, 802, 802,
-
- 802, 802, 802, 802, 802, 802, 802, 802,
- 802, 802, 802, 802, 802, 802, 802, 802,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 803, 238, 234, 234,
-
- 422, 422, 422, 422, 422, 422, 422, 422,
- 422, 422, 422, 422, 422, 422, 422, 422,
- 804, 805, 805, 804, 804, 806, 806, 807,
- 808, 809, 160, 160, 160, 160, 160, 160,
-
- 139, 139, 139, 139, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 735, 746, 746, 810, 810, 599, 741, 599,
- 741, 599, 741, 599, 741, 599, 741, 599,
-
- 741, 599, 741, 599, 741, 751, 751, 811,
- 812, 735, 735, 735, 735, 810, 810, 810,
- 813, 735, 814, 160, 761, 815, 9, 9,
- 746, 16, 17, 16, 17, 16, 17, 816,
-
- 735, 735, 817, 818, 819, 820, 821, 160,
- 735, 12, 13, 735, 160, 160, 160, 160,
- 242, 242, 242, 285, 242, 234, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
-
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 234, 234, 822,
-
- 160, 9, 735, 816, 12, 13, 735, 735,
- 16, 17, 735, 817, 813, 818, 814, 823,
- 824, 825, 826, 827, 828, 829, 830, 831,
- 832, 833, 815, 761, 834, 821, 835, 9,
-
- 735, 836, 836, 836, 836, 836, 836, 836,
- 836, 836, 836, 836, 836, 836, 836, 836,
- 836, 836, 836, 836, 836, 836, 836, 836,
- 836, 836, 836, 39, 735, 41, 837, 810,
-
- 837, 838, 838, 838, 838, 838, 838, 838,
- 838, 838, 838, 838, 838, 838, 838, 838,
- 838, 838, 838, 838, 838, 838, 838, 838,
- 838, 838, 838, 39, 821, 41, 821, 699,
-
- 700, 734, 16, 17, 733, 761, 839, 759,
- 759, 759, 759, 759, 759, 759, 759, 759,
- 762, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
-
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 762, 762,
-
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 160,
-
- 160, 160, 90, 90, 90, 90, 90, 90,
- 160, 160, 90, 90, 90, 90, 90, 90,
- 160, 160, 90, 90, 90, 90, 90, 90,
- 160, 160, 90, 90, 90, 160, 160, 160,
-
- 48, 12, 821, 837, 736, 12, 12, 160,
- 49, 36, 36, 36, 36, 49, 49, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 840, 840, 840, 841, 49, 842, 842,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 160, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
-
- 307, 307, 307, 307, 307, 307, 307, 160,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 160, 307, 307, 160, 307,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 160, 160,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 160, 160,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 160, 160, 160, 160, 160,
-
- 843, 844, 845, 160, 160, 160, 160, 846,
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 846, 846, 846, 846,
-
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 160, 160, 160, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
-
- 848, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 848, 848, 848,
-
- 848, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 725, 725, 725,
- 725, 417, 417, 417, 417, 417, 417, 417,
-
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 725, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 160,
-
- 850, 850, 850, 850, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
-
- 849, 851, 849, 849, 849, 849, 849, 849,
- 849, 849, 851, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 160, 843,
-
- 322, 322, 322, 322, 160, 160, 160, 160,
- 322, 322, 322, 322, 322, 322, 322, 322,
- 464, 852, 852, 852, 852, 852, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
-
- 853, 853, 853, 853, 853, 853, 854, 854,
- 855, 855, 855, 855, 855, 855, 855, 855,
- 855, 855, 855, 855, 855, 855, 855, 855,
- 855, 855, 855, 855, 855, 855, 855, 855,
-
- 855, 855, 855, 855, 855, 855, 855, 855,
- 855, 855, 855, 855, 855, 855, 856, 856,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
-
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 307, 307,
- 307, 307, 307, 307, 307, 307, 160, 160,
-
- 440, 441, 442, 443, 444, 445, 446, 447,
- 448, 449, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 857, 857, 857, 857, 857, 857, 204, 204,
- 857, 204, 857, 857, 857, 857, 857, 857,
- 857, 857, 857, 857, 857, 857, 857, 857,
- 857, 857, 857, 857, 857, 857, 857, 857,
-
- 857, 857, 857, 857, 857, 857, 857, 857,
- 857, 857, 857, 857, 857, 857, 857, 857,
- 857, 857, 857, 857, 857, 857, 204, 857,
- 857, 204, 204, 204, 857, 204, 204, 857,
-
- 858, 858, 858, 858, 858, 858, 858, 858,
- 858, 858, 858, 858, 858, 858, 858, 858,
- 858, 858, 858, 858, 858, 858, 859, 859,
- 859, 859, 204, 204, 204, 204, 204, 860,
-
- 861, 781, 781, 781, 204, 781, 781, 204,
- 204, 204, 204, 204, 781, 152, 781, 153,
- 861, 861, 861, 861, 204, 861, 861, 861,
- 204, 861, 861, 861, 861, 861, 861, 861,
-
- 861, 861, 861, 861, 861, 861, 861, 861,
- 861, 861, 861, 861, 861, 861, 861, 861,
- 861, 861, 861, 861, 204, 204, 204, 204,
- 153, 642, 152, 204, 204, 204, 204, 780,
-
- 862, 863, 864, 865, 866, 866, 866, 866,
- 204, 204, 204, 204, 204, 204, 204, 204,
- 867, 867, 867, 867, 867, 867, 867, 867,
- 868, 204, 204, 204, 204, 204, 204, 204,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
-
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 869, 869, 869, 869, 869,
- 869, 869, 869, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 480, 480, 480, 480, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 160,
- 160, 160, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 871, 872, 873,
- 873, 873, 870, 870, 870, 874, 871, 871,
- 871, 871, 871, 875, 875, 875, 875, 875,
- 875, 875, 875, 876, 876, 876, 876, 876,
- 876, 876, 876, 870, 870, 877, 877, 877,
- 877, 877, 876, 876, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 877, 877, 877, 877, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 417, 417, 417, 417, 417, 417,
- 417, 417, 153, 153, 153, 417, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 878, 878, 878, 878, 878, 878, 878, 878,
- 878, 878, 878, 878, 878, 878, 878, 878,
- 878, 878, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 880, 880,
- 880, 880, 880, 880, 880, 160, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 879, 160, 879, 879,
- 160, 160, 879, 160, 160, 879, 879, 160,
- 160, 879, 879, 879, 879, 160, 879, 879,
- 879, 879, 879, 879, 879, 879, 880, 880,
- 880, 880, 160, 880, 160, 880, 880, 880,
- 880, 102, 880, 880, 160, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
-
- 880, 880, 880, 880, 879, 879, 160, 879,
- 879, 879, 879, 160, 160, 879, 879, 879,
- 879, 879, 879, 879, 879, 160, 879, 879,
- 879, 879, 879, 879, 879, 160, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 879, 879, 160, 879, 879, 879, 879, 160,
- 879, 879, 879, 879, 879, 160, 879, 160,
- 160, 160, 879, 879, 879, 879, 879, 879,
- 879, 160, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
-
- 880, 880, 880, 880, 880, 880, 880, 880,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 103, 103, 160, 160,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 881, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 881, 880, 880, 880, 880,
- 880, 880, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 881, 880, 880, 880, 880,
-
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 881, 880, 880,
- 880, 880, 880, 880, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 881, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 881,
- 880, 880, 880, 880, 880, 880, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 881, 880, 880, 880, 880, 880, 880,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 881, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 881, 880, 880, 880, 880,
- 880, 880, 882, 724, 160, 160, 883, 884,
- 885, 886, 887, 888, 889, 890, 891, 892,
- 883, 884, 885, 886, 887, 888, 889, 890,
- 891, 892, 883, 884, 885, 886, 887, 888,
- 889, 890, 891, 892, 883, 884, 885, 886,
- 887, 888, 889, 890, 891, 892, 883, 884,
- 885, 886, 887, 888, 889, 890, 891, 892,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 893, 893,
-
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
-
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 894, 894,
- 894, 894, 894, 894, 894, 894, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 875, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 875, 875, 875, 875, 875, 875, 875, 875,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
-
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 893, 893,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18608, 18608, 18608, 18864, 19120, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 19376, 19632, 19888, 20144, 20400, 20656, 20912, 21168,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21680, 21680,
+ 21680, 21680, 21680, 21680, 21680, 21680, 21936, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 21680, 21680, 22192, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 22448, 22704, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 18352,
+ 18352, 18352, 18352, 18352, 18352, 18352, 18352, 21424,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 23216,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 22960,
+ 22960, 22960, 22960, 22960, 22960, 22960, 22960, 23216,
+
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 2, 3, 4, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 6, 6, 7,
+
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 14, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 9,
+
+ 14, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 39, 40, 41, 42, 43,
+
+ 42, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 39, 45, 41, 36, 0,
+
+ 0, 0, 0, 0, 0, 46, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 47, 14, 48, 12, 12, 12, 49, 49,
+ 42, 49, 50, 51, 36, 52, 49, 42,
+ 53, 54, 55, 56, 57, 58, 49, 59,
+ 42, 60, 50, 61, 62, 62, 62, 14,
+
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 36,
+ 38, 38, 38, 38, 38, 38, 38, 63,
+
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 36,
+ 44, 44, 44, 44, 44, 44, 44, 64,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 67, 68, 65, 66, 65, 66, 65, 66,
+ 50, 65, 66, 65, 66, 65, 66, 65,
+
+ 66, 65, 66, 65, 66, 65, 66, 65,
+ 66, 69, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 70, 65, 66, 65, 66, 65, 66, 71,
+
+ 72, 73, 65, 66, 65, 66, 74, 65,
+ 66, 75, 75, 65, 66, 50, 76, 77,
+ 78, 65, 66, 75, 79, 80, 81, 82,
+ 65, 66, 83, 50, 81, 84, 85, 86,
+
+ 65, 66, 65, 66, 65, 66, 87, 65,
+ 66, 87, 50, 50, 65, 66, 87, 65,
+ 66, 88, 88, 65, 66, 65, 66, 89,
+ 65, 66, 50, 90, 65, 66, 50, 91,
+
+ 90, 90, 90, 90, 92, 93, 94, 92,
+ 93, 94, 92, 93, 94, 65, 66, 65,
+ 66, 65, 66, 65, 66, 65, 66, 65,
+ 66, 65, 66, 65, 66, 95, 65, 66,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 96, 92, 93, 94, 65, 66, 97, 98,
+ 99, 100, 65, 66, 65, 66, 65, 66,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 99, 100, 99, 100, 99, 100, 99, 100,
+
+ 101, 102, 99, 100, 99, 100, 99, 100,
+ 99, 100, 99, 100, 99, 100, 99, 100,
+ 99, 100, 99, 100, 102, 102, 102, 103,
+ 103, 103, 104, 105, 106, 107, 108, 103,
+
+ 103, 105, 109, 110, 111, 112, 113, 109,
+ 113, 109, 113, 109, 113, 109, 113, 109,
+ 50, 50, 50, 114, 115, 50, 116, 116,
+ 50, 117, 50, 118, 50, 50, 50, 50,
+
+ 116, 50, 50, 119, 50, 50, 50, 50,
+ 120, 121, 50, 122, 50, 50, 50, 121,
+ 50, 50, 123, 50, 50, 124, 50, 50,
+ 50, 50, 50, 50, 50, 125, 50, 50,
+
+ 126, 50, 50, 126, 50, 50, 50, 50,
+ 126, 127, 128, 128, 129, 50, 50, 50,
+ 50, 50, 130, 50, 90, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50,
+
+ 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 131, 131, 131, 131, 131, 102, 102,
+ 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 133, 133, 134, 134, 134, 134, 134,
+
+ 132, 132, 42, 42, 42, 42, 133, 133,
+ 135, 133, 133, 133, 135, 133, 133, 133,
+ 134, 134, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 136,
+
+ 132, 132, 132, 132, 132, 42, 42, 42,
+ 42, 42, 136, 136, 136, 136, 137, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138,
+
+ 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 140, 141, 141,
+ 141, 141, 140, 142, 141, 141, 141, 141,
+
+ 141, 143, 143, 141, 141, 141, 141, 143,
+ 143, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 144, 144, 144, 144,
+ 144, 141, 141, 141, 141, 139, 139, 139,
+
+ 139, 139, 139, 139, 139, 145, 146, 147,
+ 147, 147, 146, 146, 146, 147, 147, 148,
+ 149, 149, 149, 150, 150, 150, 150, 149,
+ 151, 152, 152, 153, 154, 155, 155, 156,
+
+ 157, 157, 158, 159, 159, 159, 159, 159,
+ 159, 159, 159, 159, 159, 159, 159, 159,
+ 160, 160, 160, 160, 42, 42, 160, 160,
+ 160, 160, 132, 161, 161, 161, 34, 160,
+
+ 160, 160, 160, 160, 42, 42, 162, 14,
+ 163, 163, 163, 160, 164, 160, 165, 165,
+ 166, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 160, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 167, 168, 168, 168,
+ 169, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+
+ 44, 44, 170, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 171, 172, 172, 160,
+ 173, 174, 175, 175, 175, 176, 177, 131,
+ 178, 179, 65, 100, 65, 100, 65, 100,
+
+ 65, 100, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 180, 181, 182, 50, 183, 184, 185, 186,
+ 187, 188, 186, 187, 103, 189, 189, 189,
+
+ 190, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 190, 191, 191,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44,
+ 192, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 192, 193, 193,
+
+ 65, 66, 194, 139, 139, 139, 139, 160,
+ 195, 195, 178, 179, 99, 100, 99, 100,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+
+ 196, 65, 66, 65, 66, 178, 179, 65,
+ 66, 178, 179, 65, 66, 178, 179, 197,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 99, 100, 65, 66,
+ 65, 66, 65, 66, 65, 66, 105, 106,
+ 65, 66, 113, 109, 113, 109, 113, 109,
+
+ 178, 179, 178, 179, 178, 179, 178, 179,
+ 178, 179, 178, 179, 178, 179, 178, 179,
+ 113, 109, 113, 109, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198,
+
+ 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 160,
+ 160, 134, 199, 199, 200, 199, 200, 199,
+
+ 160, 201, 201, 201, 201, 201, 201, 201,
+ 201, 201, 201, 201, 201, 201, 201, 201,
+ 201, 201, 201, 201, 201, 201, 201, 201,
+ 201, 201, 201, 201, 201, 201, 201, 201,
+
+ 201, 201, 201, 201, 201, 201, 201, 202,
+ 160, 203, 204, 160, 160, 160, 160, 160,
+ 205, 206, 207, 207, 207, 207, 206, 207,
+ 207, 207, 208, 206, 207, 207, 207, 207,
+
+ 207, 207, 152, 206, 206, 206, 206, 206,
+ 207, 207, 206, 207, 207, 208, 209, 207,
+ 210, 211, 212, 213, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225,
+
+ 226, 227, 228, 226, 207, 152, 229, 230,
+ 205, 205, 205, 205, 205, 205, 205, 205,
+ 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231,
+
+ 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 205, 205, 205, 205, 205,
+ 231, 231, 231, 232, 233, 205, 205, 205,
+ 205, 205, 205, 205, 205, 205, 205, 205,
+
+ 234, 234, 234, 234, 235, 235, 235, 235,
+ 235, 235, 235, 236, 237, 238, 239, 239,
+ 149, 149, 149, 149, 149, 149, 235, 235,
+ 235, 235, 235, 240, 235, 235, 241, 242,
+
+ 235, 243, 244, 244, 244, 244, 245, 244,
+ 245, 244, 245, 245, 245, 245, 245, 244,
+ 244, 244, 244, 245, 245, 245, 245, 245,
+ 245, 245, 245, 235, 235, 235, 235, 235,
+
+ 246, 245, 245, 245, 245, 245, 245, 245,
+ 244, 245, 245, 247, 248, 249, 250, 251,
+ 252, 253, 254, 146, 146, 147, 150, 149,
+ 149, 153, 153, 153, 152, 153, 153, 235,
+
+ 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 266, 267, 268, 268,
+ 269, 244, 244, 244, 243, 244, 244, 244,
+ 245, 245, 245, 245, 245, 245, 245, 245,
+
+ 245, 245, 245, 245, 245, 245, 245, 245,
+ 244, 244, 244, 244, 244, 244, 244, 244,
+ 244, 244, 244, 244, 244, 244, 244, 244,
+ 244, 244, 245, 245, 245, 245, 245, 245,
+
+ 245, 245, 245, 245, 245, 245, 245, 245,
+ 245, 245, 245, 245, 245, 245, 245, 245,
+ 245, 245, 245, 245, 245, 245, 245, 245,
+ 270, 270, 245, 245, 245, 245, 245, 270,
+
+ 244, 245, 245, 244, 244, 244, 244, 244,
+ 244, 244, 244, 244, 245, 244, 245, 271,
+ 245, 245, 244, 244, 242, 244, 139, 139,
+ 139, 139, 139, 139, 139, 272, 273, 139,
+
+ 139, 139, 139, 141, 139, 274, 274, 139,
+ 139, 49, 141, 139, 139, 141, 275, 275,
+ 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 270, 270, 270, 276, 276, 277,
+
+ 278, 278, 278, 279, 279, 279, 279, 279,
+ 279, 279, 279, 279, 279, 279, 235, 280,
+ 271, 281, 270, 270, 270, 271, 271, 271,
+ 271, 271, 270, 270, 270, 270, 271, 270,
+
+ 270, 270, 270, 270, 270, 270, 270, 270,
+ 271, 270, 271, 270, 271, 277, 277, 275,
+ 146, 147, 146, 146, 147, 146, 146, 147,
+ 147, 147, 146, 147, 147, 146, 147, 146,
+
+ 146, 146, 147, 146, 147, 146, 147, 146,
+ 147, 146, 146, 235, 235, 275, 277, 277,
+ 282, 282, 282, 282, 282, 282, 282, 282,
+ 282, 283, 283, 283, 282, 282, 282, 282,
+
+ 282, 282, 282, 282, 282, 282, 282, 282,
+ 282, 282, 282, 283, 283, 282, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+
+ 284, 284, 284, 284, 284, 284, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 286, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+
+ 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 297, 297, 297, 297, 297,
+ 297, 297, 297, 297, 297, 297, 297, 297,
+ 297, 297, 297, 297, 297, 297, 297, 297,
+
+ 297, 297, 297, 297, 297, 297, 297, 297,
+ 297, 297, 297, 298, 298, 298, 298, 298,
+ 298, 298, 299, 298, 300, 300, 301, 302,
+ 303, 304, 305, 205, 205, 205, 205, 205,
+
+ 205, 205, 205, 205, 205, 205, 205, 205,
+ 205, 205, 205, 205, 205, 205, 205, 205,
+ 205, 205, 205, 205, 205, 205, 205, 205,
+ 205, 205, 205, 205, 205, 205, 205, 205,
+
+ 160, 306, 306, 307, 308, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 160, 160, 309, 90, 307, 307,
+
+ 307, 306, 306, 306, 306, 306, 306, 306,
+ 306, 307, 307, 307, 307, 310, 160, 160,
+ 90, 139, 141, 139, 139, 160, 160, 160,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 306, 306, 311, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 199, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 322, 322, 323, 322, 322,
+
+ 160, 306, 307, 307, 160, 90, 90, 90,
+ 90, 90, 90, 90, 90, 160, 160, 90,
+ 90, 160, 160, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 160, 160, 160, 90, 90,
+ 90, 90, 160, 160, 309, 308, 324, 307,
+
+ 307, 306, 306, 306, 306, 160, 160, 307,
+ 307, 160, 160, 307, 307, 310, 323, 160,
+ 160, 160, 160, 160, 160, 160, 160, 324,
+ 160, 160, 160, 160, 90, 90, 160, 90,
+
+ 90, 90, 306, 306, 160, 160, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 90, 90, 12, 12, 325, 325, 325, 325,
+ 325, 325, 194, 160, 160, 160, 160, 160,
+
+ 160, 326, 306, 327, 160, 90, 90, 90,
+ 90, 90, 90, 160, 160, 160, 160, 90,
+ 90, 160, 160, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 160, 90, 90, 160,
+ 90, 90, 160, 160, 309, 160, 307, 307,
+
+ 307, 306, 306, 160, 160, 160, 160, 306,
+ 306, 160, 160, 306, 306, 310, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 90, 90, 90, 90, 160, 90, 160,
+
+ 160, 160, 160, 160, 160, 160, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 306, 306, 90, 90, 90, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 306, 306, 307, 160, 90, 90, 90,
+ 90, 90, 90, 90, 308, 90, 160, 90,
+ 90, 90, 160, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 160, 90, 90, 90,
+ 90, 90, 160, 160, 309, 90, 307, 307,
+
+ 307, 306, 306, 306, 306, 306, 160, 306,
+ 306, 307, 160, 307, 307, 310, 160, 160,
+ 90, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 90, 308, 326, 326, 160, 160, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 160, 328, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 160, 308, 90, 90,
+ 90, 90, 160, 160, 309, 90, 324, 306,
+
+ 307, 306, 306, 306, 160, 160, 160, 307,
+ 307, 160, 160, 307, 307, 310, 160, 160,
+ 160, 160, 160, 160, 160, 160, 306, 324,
+ 160, 160, 160, 160, 90, 90, 160, 90,
+
+ 90, 90, 160, 160, 160, 160, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 194, 308, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 306, 90, 160, 90, 90, 90,
+ 90, 90, 90, 160, 160, 160, 90, 90,
+ 90, 160, 90, 90, 90, 90, 160, 160,
+ 160, 90, 90, 160, 90, 160, 90, 90,
+
+ 160, 160, 160, 90, 90, 160, 160, 160,
+ 90, 90, 90, 160, 160, 160, 90, 90,
+ 90, 90, 90, 90, 90, 90, 323, 90,
+ 90, 90, 160, 160, 160, 160, 324, 307,
+
+ 306, 307, 307, 160, 160, 160, 307, 307,
+ 307, 160, 307, 307, 307, 310, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 324,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 329, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 325, 325, 325, 239, 239, 239, 239, 239,
+ 239, 328, 239, 160, 160, 160, 160, 160,
+
+ 160, 307, 307, 307, 160, 90, 90, 90,
+ 90, 90, 90, 90, 90, 160, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 160, 90, 90, 90,
+ 90, 90, 160, 160, 160, 160, 306, 306,
+
+ 306, 307, 307, 307, 307, 160, 306, 306,
+ 306, 160, 306, 306, 306, 310, 160, 160,
+ 160, 160, 160, 160, 160, 330, 331, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 90, 90, 160, 160, 160, 160, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 307, 307, 160, 90, 90, 90,
+ 90, 90, 90, 90, 90, 160, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 160, 90, 90, 90,
+ 90, 90, 160, 160, 332, 308, 307, 333,
+
+ 307, 307, 324, 307, 307, 160, 333, 307,
+ 307, 160, 307, 307, 306, 310, 160, 160,
+ 160, 160, 160, 160, 160, 324, 324, 160,
+ 160, 160, 160, 160, 160, 160, 90, 160,
+
+ 90, 90, 334, 334, 160, 160, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321,
+ 160, 301, 301, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 160, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 160, 160, 160, 160, 324, 307,
+
+ 307, 306, 306, 306, 160, 160, 307, 307,
+ 307, 160, 307, 307, 307, 310, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 324,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 335, 335, 160, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 160,
+ 160, 160, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 160, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 160, 336, 160, 160,
+
+ 336, 336, 336, 336, 336, 336, 336, 160,
+ 160, 160, 337, 160, 160, 160, 160, 338,
+ 335, 335, 285, 285, 285, 160, 285, 160,
+ 335, 335, 335, 335, 335, 335, 335, 338,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 335, 335, 339, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 340, 340, 340, 340, 340, 340, 340,
+ 340, 340, 340, 340, 340, 340, 340, 340,
+ 340, 340, 340, 340, 340, 340, 340, 340,
+ 340, 340, 340, 340, 340, 340, 340, 340,
+
+ 340, 340, 340, 340, 340, 340, 340, 340,
+ 340, 340, 340, 340, 340, 340, 340, 340,
+ 340, 341, 340, 340, 341, 341, 341, 341,
+ 342, 342, 343, 160, 160, 160, 160, 12,
+
+ 340, 340, 340, 340, 340, 340, 344, 341,
+ 345, 345, 345, 345, 341, 341, 341, 199,
+ 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 346, 346, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 340, 340, 160, 340, 160, 160, 340,
+ 340, 160, 340, 160, 160, 340, 160, 160,
+ 160, 160, 160, 160, 340, 340, 340, 340,
+ 160, 340, 340, 340, 340, 340, 340, 340,
+
+ 160, 340, 340, 340, 160, 340, 160, 340,
+ 160, 160, 340, 340, 160, 340, 340, 340,
+ 340, 341, 340, 340, 341, 341, 341, 341,
+ 347, 347, 160, 341, 341, 340, 160, 160,
+
+ 340, 340, 340, 340, 340, 160, 344, 160,
+ 348, 348, 348, 348, 341, 341, 160, 160,
+ 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 160, 160, 340, 340, 160, 160,
+
+ 349, 350, 350, 350, 351, 352, 351, 351,
+ 353, 351, 351, 354, 353, 355, 355, 355,
+ 355, 355, 353, 356, 357, 356, 356, 356,
+ 206, 206, 356, 356, 356, 356, 356, 356,
+
+ 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 368, 368, 368, 368, 368,
+ 368, 368, 368, 368, 369, 206, 356, 206,
+ 356, 370, 371, 372, 371, 372, 373, 373,
+
+ 349, 349, 349, 349, 349, 349, 349, 349,
+ 160, 349, 349, 349, 349, 349, 349, 349,
+ 349, 349, 349, 349, 349, 349, 349, 349,
+ 349, 349, 349, 349, 349, 349, 349, 349,
+
+ 349, 349, 349, 349, 349, 349, 349, 349,
+ 349, 349, 336, 160, 160, 160, 160, 160,
+ 160, 374, 375, 376, 377, 376, 376, 376,
+ 376, 376, 375, 375, 375, 375, 376, 378,
+
+ 375, 376, 207, 207, 379, 354, 207, 207,
+ 349, 349, 349, 349, 160, 160, 160, 160,
+ 376, 376, 376, 376, 376, 376, 285, 376,
+ 160, 376, 376, 376, 376, 376, 376, 376,
+
+ 376, 376, 376, 376, 376, 376, 376, 376,
+ 376, 376, 376, 376, 376, 376, 285, 285,
+ 285, 376, 376, 376, 376, 376, 376, 376,
+ 285, 376, 285, 285, 285, 160, 380, 380,
+
+ 381, 381, 381, 381, 381, 381, 147, 381,
+ 381, 381, 381, 381, 381, 160, 160, 381,
+ 382, 382, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, 383, 383, 383,
+
+ 383, 383, 160, 383, 383, 383, 383, 383,
+ 160, 383, 383, 160, 384, 385, 385, 385,
+ 385, 384, 385, 160, 160, 160, 385, 386,
+ 384, 387, 160, 160, 160, 160, 160, 160,
+
+ 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 398, 339, 339, 339, 339,
+ 383, 383, 383, 383, 383, 383, 384, 384,
+ 385, 385, 160, 160, 160, 160, 160, 160,
+
+ 399, 399, 399, 399, 399, 399, 399, 399,
+ 399, 399, 399, 399, 399, 399, 399, 399,
+ 399, 399, 399, 399, 399, 399, 399, 399,
+ 399, 399, 399, 399, 399, 399, 399, 399,
+
+ 399, 399, 399, 399, 399, 399, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 400,
+ 400, 323, 323, 199, 401, 160, 160, 160,
+
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 160, 160, 160, 160, 160, 402,
+
+ 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403,
+
+ 403, 403, 403, 160, 160, 160, 160, 160,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 160, 160, 160, 160, 160, 160,
+
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 160, 336, 336, 336, 336, 160, 160,
+ 336, 336, 336, 336, 336, 336, 336, 160,
+ 336, 160, 336, 336, 336, 336, 160, 160,
+
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 160, 336, 336, 336, 336, 160, 160,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 160, 336, 336, 336, 336, 160, 160,
+ 336, 336, 336, 336, 336, 336, 336, 160,
+
+ 336, 160, 336, 336, 336, 336, 160, 160,
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 336, 336, 336, 336, 336, 336, 160,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 160, 336, 336, 336, 336, 160, 160,
+ 336, 336, 336, 336, 336, 336, 336, 323,
+
+ 336, 336, 336, 336, 336, 336, 336, 323,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 160, 160, 160, 160, 153,
+
+ 405, 406, 407, 339, 339, 339, 339, 407,
+ 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 417, 417, 417, 417, 417,
+ 417, 417, 417, 417, 417, 160, 160, 160,
+
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 160, 160, 160, 160, 160, 160,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 339, 407, 336,
+ 336, 336, 336, 336, 336, 336, 336, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 419, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 420, 421, 160, 160, 160,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 406, 406, 406, 422, 422,
+ 422, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 400, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 400, 400, 400, 160, 400, 400,
+ 400, 400, 423, 423, 424, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 400, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 423, 423, 424, 425, 425, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 400, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 423, 423, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 400, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 400, 400, 400, 160, 400, 400,
+ 400, 160, 423, 423, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 426, 426, 384, 385,
+ 385, 385, 385, 385, 385, 385, 384, 384,
+
+ 384, 384, 384, 384, 384, 384, 385, 384,
+ 384, 385, 385, 385, 385, 385, 385, 385,
+ 385, 385, 387, 385, 406, 406, 427, 428,
+ 406, 339, 406, 429, 383, 430, 160, 160,
+
+ 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 160, 160, 160, 160, 160, 160,
+ 431, 431, 431, 431, 431, 431, 431, 431,
+ 431, 431, 160, 160, 160, 160, 160, 160,
+
+ 432, 432, 433, 434, 433, 433, 435, 432,
+ 433, 434, 432, 285, 285, 285, 436, 160,
+ 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 160, 160, 160, 160, 160, 160,
+
+ 336, 336, 336, 137, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 437, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 160, 160, 160,
+
+ 326, 326, 326, 327, 327, 327, 327, 326,
+ 326, 438, 438, 438, 160, 160, 160, 160,
+ 327, 327, 326, 327, 327, 327, 327, 327,
+ 327, 439, 149, 150, 160, 160, 160, 160,
+
+ 239, 160, 160, 160, 440, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 451, 451, 451, 451, 451, 451, 451,
+ 451, 451, 451, 451, 451, 451, 451, 451,
+
+ 451, 451, 451, 451, 451, 451, 451, 451,
+ 451, 451, 451, 451, 451, 451, 160, 160,
+ 451, 451, 451, 451, 451, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 160, 160, 160, 160, 160, 160,
+ 453, 453, 453, 453, 453, 453, 453, 453,
+ 453, 453, 453, 453, 453, 453, 453, 453,
+
+ 453, 452, 452, 452, 452, 452, 452, 452,
+ 453, 453, 160, 160, 160, 160, 160, 160,
+ 329, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 160, 160, 160, 160, 463, 463,
+
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 153,
+ 152, 464, 464, 464, 160, 160, 465, 466,
+
+ 334, 334, 334, 334, 467, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 468, 467, 334, 334,
+ 334, 334, 334, 467, 334, 467, 467, 467,
+
+ 467, 467, 334, 467, 469, 322, 322, 322,
+ 322, 322, 322, 322, 160, 160, 160, 160,
+ 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 480, 481, 481, 480, 480,
+
+ 481, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 298, 299, 298, 298, 298,
+ 298, 298, 298, 298, 482, 482, 482, 482,
+ 482, 482, 482, 482, 482, 160, 160, 160,
+
+ 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+
+ 483, 483, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 103, 103, 103, 103,
+ 103, 103, 103, 103, 103, 103, 103, 103,
+ 484, 103, 103, 103, 103, 485, 103, 103,
+
+ 103, 103, 103, 103, 103, 103, 103, 103,
+ 103, 103, 103, 103, 103, 103, 103, 103,
+ 103, 103, 103, 103, 103, 103, 103, 103,
+ 103, 103, 103, 484, 484, 484, 484, 484,
+
+ 484, 484, 484, 484, 484, 484, 484, 484,
+ 484, 484, 484, 484, 484, 484, 484, 484,
+ 484, 484, 484, 484, 484, 484, 484, 484,
+ 484, 484, 484, 484, 484, 484, 484, 484,
+
+ 153, 153, 152, 153, 298, 298, 298, 298,
+ 298, 298, 299, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 298, 299,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 486, 487,
+ 488, 489, 490, 491, 160, 160, 160, 160,
+
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 65, 66, 65, 66, 65, 66,
+ 65, 66, 160, 160, 160, 160, 160, 160,
+
+ 492, 492, 492, 492, 492, 492, 492, 492,
+ 493, 493, 493, 493, 493, 493, 493, 493,
+ 492, 492, 492, 492, 492, 492, 160, 160,
+ 493, 493, 493, 493, 493, 493, 160, 160,
+
+ 492, 492, 492, 492, 492, 492, 492, 492,
+ 493, 493, 493, 493, 493, 493, 493, 493,
+ 492, 492, 492, 492, 492, 492, 492, 492,
+ 493, 493, 493, 493, 493, 493, 493, 493,
+
+ 492, 492, 492, 492, 492, 492, 160, 160,
+ 493, 493, 493, 493, 493, 493, 160, 160,
+ 494, 492, 495, 492, 496, 492, 497, 492,
+ 160, 493, 160, 493, 160, 493, 160, 493,
+
+ 492, 492, 492, 492, 492, 492, 492, 492,
+ 493, 493, 493, 493, 493, 493, 493, 493,
+ 498, 498, 499, 499, 499, 499, 500, 500,
+ 501, 501, 502, 502, 503, 503, 160, 160,
+
+ 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535,
+
+ 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551,
+ 492, 492, 552, 553, 554, 160, 555, 556,
+ 493, 493, 557, 557, 558, 42, 559, 42,
+
+ 42, 42, 560, 561, 562, 160, 563, 564,
+ 565, 565, 565, 565, 566, 42, 42, 42,
+ 492, 492, 567, 568, 160, 160, 569, 570,
+ 493, 493, 571, 571, 160, 42, 42, 42,
+
+ 492, 492, 572, 573, 574, 182, 575, 576,
+ 493, 493, 577, 577, 578, 42, 42, 42,
+ 160, 160, 579, 580, 581, 160, 582, 583,
+ 584, 584, 585, 585, 586, 42, 42, 160,
+
+ 587, 587, 587, 587, 587, 587, 587, 588,
+ 587, 587, 587, 589, 590, 591, 592, 593,
+ 594, 595, 594, 594, 596, 597, 14, 14,
+ 598, 599, 600, 601, 598, 602, 600, 601,
+
+ 14, 14, 14, 14, 603, 603, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612,
+ 13, 13, 13, 13, 13, 613, 613, 613,
+ 14, 598, 602, 14, 614, 614, 14, 43,
+
+ 43, 14, 14, 14, 615, 16, 17, 616,
+ 617, 617, 432, 432, 432, 432, 618, 618,
+ 618, 618, 185, 619, 620, 621, 622, 618,
+ 622, 622, 622, 622, 621, 622, 622, 623,
+
+ 624, 625, 625, 625, 160, 160, 160, 160,
+ 160, 160, 626, 626, 626, 626, 626, 626,
+ 627, 628, 160, 160, 629, 630, 631, 632,
+ 633, 634, 635, 635, 36, 16, 17, 50,
+
+ 627, 60, 55, 56, 629, 630, 631, 632,
+ 633, 634, 635, 635, 36, 16, 17, 160,
+ 484, 484, 484, 484, 484, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 12, 12, 12, 12, 12, 12, 12, 48,
+ 12, 12, 12, 636, 637, 429, 429, 429,
+ 638, 638, 639, 639, 639, 639, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 139, 139, 144, 144, 139, 139, 139, 139,
+ 144, 144, 144, 139, 139, 273, 273, 273,
+
+ 273, 139, 195, 195, 640, 641, 641, 159,
+ 642, 159, 641, 643, 299, 299, 299, 299,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 49, 49, 175, 644, 49, 49, 49, 175,
+ 49, 644, 50, 175, 175, 175, 50, 50,
+ 175, 175, 175, 50, 49, 175, 645, 49,
+ 49, 175, 175, 175, 175, 175, 49, 49,
+
+ 49, 49, 49, 49, 175, 49, 646, 49,
+ 175, 49, 647, 648, 175, 175, 649, 50,
+ 175, 175, 650, 175, 50, 90, 90, 90,
+ 90, 131, 651, 239, 103, 628, 652, 652,
+
+ 185, 185, 185, 185, 185, 652, 628, 628,
+ 628, 628, 653, 185, 418, 301, 654, 160,
+ 160, 160, 160, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62,
+
+ 655, 655, 655, 655, 655, 655, 655, 655,
+ 655, 655, 655, 655, 655, 655, 655, 655,
+ 656, 656, 656, 656, 656, 656, 656, 656,
+ 656, 656, 656, 656, 656, 656, 656, 656,
+
+ 657, 657, 657, 99, 109, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 36, 36, 36, 36, 36, 49, 49, 49,
+ 49, 49, 36, 36, 49, 49, 49, 49,
+
+ 36, 49, 49, 36, 49, 49, 36, 49,
+ 49, 49, 49, 49, 49, 49, 36, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 36, 36,
+ 49, 49, 36, 49, 36, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 651, 651, 651, 651, 651,
+ 651, 651, 651, 651, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+
+ 36, 36, 36, 36, 36, 36, 36, 36,
+ 658, 658, 658, 659, 659, 659, 36, 36,
+ 36, 36, 18, 54, 36, 660, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36,
+
+ 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 661, 662, 36, 36,
+
+ 36, 36, 36, 663, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 661, 662, 661, 662, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36,
+
+ 36, 36, 36, 36, 661, 662, 661, 662,
+ 661, 662, 661, 662, 36, 36, 661, 662,
+ 661, 662, 661, 662, 661, 662, 661, 662,
+ 661, 662, 661, 662, 661, 662, 661, 662,
+
+ 661, 662, 661, 662, 661, 662, 661, 662,
+ 661, 662, 661, 662, 36, 36, 36, 661,
+ 662, 661, 662, 36, 36, 36, 36, 36,
+ 664, 36, 36, 36, 36, 36, 36, 36,
+
+ 36, 36, 661, 662, 36, 36, 665, 36,
+ 666, 667, 36, 667, 36, 36, 36, 36,
+ 661, 662, 661, 662, 661, 662, 661, 662,
+ 36, 36, 36, 36, 36, 36, 36, 36,
+
+ 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 661, 662, 661, 662, 668, 36, 36,
+ 661, 662, 36, 36, 36, 36, 661, 662,
+ 661, 662, 661, 662, 661, 662, 661, 662,
+
+ 661, 662, 661, 662, 661, 662, 661, 662,
+ 661, 662, 661, 662, 661, 662, 36, 36,
+ 661, 662, 669, 669, 669, 185, 670, 670,
+ 185, 185, 671, 671, 671, 672, 672, 185,
+
+ 49, 651, 49, 49, 49, 49, 49, 49,
+ 661, 662, 661, 662, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 36, 36, 49, 49, 49, 49, 49, 49,
+ 49, 16, 17, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 651, 185, 651, 651, 651,
+
+ 651, 651, 651, 651, 651, 651, 651, 651,
+ 651, 651, 651, 651, 651, 651, 651, 651,
+ 651, 651, 651, 651, 651, 381, 651, 651,
+ 651, 651, 651, 185, 185, 185, 185, 185,
+
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 653, 653, 653, 653,
+ 653, 653, 653, 653, 653, 653, 653, 653,
+
+ 653, 653, 653, 653, 653, 653, 653, 653,
+ 653, 653, 653, 653, 653, 653, 653, 239,
+ 239, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 673, 673, 673, 673,
+
+ 673, 673, 301, 301, 301, 301, 301, 301,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 651, 651, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 62, 62, 62,
+
+ 62, 62, 62, 62, 62, 62, 62, 62,
+ 60, 55, 56, 629, 630, 631, 632, 633,
+ 634, 683, 683, 683, 683, 683, 683, 683,
+ 683, 683, 683, 683, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 684, 684,
+ 684, 684, 684, 684, 684, 684, 684, 684,
+
+ 684, 684, 684, 684, 684, 684, 684, 684,
+ 684, 684, 684, 684, 684, 684, 684, 684,
+ 685, 685, 685, 685, 685, 685, 685, 685,
+ 685, 685, 685, 685, 685, 685, 685, 685,
+
+ 685, 685, 685, 685, 685, 685, 685, 685,
+ 685, 685, 686, 687, 687, 687, 687, 687,
+ 687, 687, 687, 687, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 687, 697,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 653, 653,
+ 653, 653, 653, 653, 653, 653, 653, 653,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 36,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 36, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 651, 651, 651, 651, 651, 651, 651, 651,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 239, 239, 653, 653,
+ 418, 651, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 36,
+ 651, 651, 653, 653, 653, 653, 653, 653,
+ 653, 653, 653, 653, 653, 653, 418, 418,
+
+ 653, 653, 653, 653, 653, 653, 653, 653,
+ 653, 653, 239, 239, 239, 239, 239, 239,
+ 239, 239, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 160, 160, 160,
+
+ 239, 239, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 405, 418, 418, 418,
+ 418, 418, 301, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 49, 49, 49, 49, 160, 49, 49,
+ 49, 49, 160, 160, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 160, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 160, 49, 160, 49,
+ 49, 49, 49, 160, 160, 160, 49, 160,
+ 49, 49, 49, 698, 698, 698, 698, 160,
+
+ 160, 49, 699, 699, 49, 49, 49, 49,
+ 700, 701, 700, 701, 700, 701, 700, 701,
+ 700, 701, 700, 701, 700, 701, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 62,
+
+ 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 62, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 62, 49, 160, 160, 160,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 160, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 160,
+
+ 702, 702, 702, 703, 704, 705, 706, 673,
+ 673, 673, 673, 160, 160, 160, 160, 160,
+ 185, 185, 185, 185, 185, 707, 708, 185,
+ 185, 185, 185, 185, 185, 707, 708, 185,
+
+ 185, 185, 707, 708, 707, 708, 700, 701,
+ 700, 701, 700, 701, 160, 160, 160, 160,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+
+ 381, 381, 381, 381, 381, 381, 381, 381,
+ 381, 381, 381, 381, 381, 381, 381, 381,
+ 381, 381, 381, 381, 381, 381, 381, 381,
+ 381, 381, 381, 381, 381, 381, 381, 381,
+
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+
+ 185, 185, 185, 700, 701, 700, 701, 700,
+ 701, 700, 701, 700, 701, 709, 710, 711,
+ 712, 700, 701, 700, 701, 700, 701, 700,
+ 701, 185, 185, 185, 185, 185, 185, 185,
+
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 713, 185, 185, 185, 185, 185, 185, 185,
+
+ 707, 708, 185, 185, 707, 708, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 707,
+ 708, 707, 708, 185, 707, 708, 185, 185,
+ 700, 701, 700, 701, 185, 185, 185, 185,
+
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 714, 185, 185,
+ 707, 708, 185, 185, 700, 701, 185, 185,
+
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 707, 708, 707, 708, 185,
+ 185, 185, 185, 185, 707, 708, 185, 185,
+ 185, 185, 185, 185, 707, 708, 185, 185,
+
+ 185, 185, 185, 185, 707, 708, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 707, 708, 185, 185, 707, 708, 707,
+
+ 708, 707, 708, 707, 708, 185, 185, 185,
+ 185, 185, 185, 707, 708, 185, 185, 185,
+ 185, 707, 708, 707, 708, 707, 708, 707,
+ 708, 707, 708, 707, 708, 185, 185, 185,
+
+ 185, 707, 708, 185, 185, 185, 707, 708,
+ 707, 708, 707, 708, 707, 708, 185, 707,
+ 708, 185, 185, 707, 708, 185, 185, 185,
+ 185, 185, 185, 707, 708, 707, 708, 707,
+
+ 708, 707, 708, 707, 708, 707, 708, 185,
+ 185, 185, 185, 185, 185, 707, 708, 707,
+ 708, 707, 708, 707, 708, 707, 708, 185,
+ 185, 185, 185, 185, 185, 185, 715, 185,
+
+ 185, 185, 185, 716, 717, 716, 185, 185,
+ 185, 185, 185, 185, 707, 708, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 707,
+ 708, 707, 708, 185, 185, 185, 185, 185,
+
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 418, 418,
+ 418, 418, 418, 418, 301, 301, 301, 301,
+ 301, 301, 301, 160, 160, 160, 160, 160,
+
+ 301, 301, 301, 301, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 718, 718, 718, 718, 718, 718, 718, 718,
+ 718, 718, 718, 718, 718, 718, 718, 718,
+ 718, 718, 718, 718, 718, 718, 718, 718,
+ 718, 718, 718, 718, 718, 718, 718, 718,
+
+ 718, 718, 718, 718, 718, 718, 718, 718,
+ 718, 718, 718, 718, 718, 718, 718, 160,
+ 719, 719, 719, 719, 719, 719, 719, 719,
+ 719, 719, 719, 719, 719, 719, 719, 719,
+
+ 719, 719, 719, 719, 719, 719, 719, 719,
+ 719, 719, 719, 719, 719, 719, 719, 719,
+ 719, 719, 719, 719, 719, 719, 719, 719,
+ 719, 719, 719, 719, 719, 719, 719, 160,
+
+ 113, 109, 720, 721, 722, 723, 724, 113,
+ 109, 113, 109, 113, 109, 160, 160, 160,
+ 160, 160, 160, 160, 725, 113, 109, 725,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 105, 106, 105, 106, 105, 106, 105, 106,
+ 105, 106, 105, 106, 105, 106, 105, 106,
+ 105, 106, 105, 106, 105, 106, 105, 106,
+ 105, 106, 105, 106, 105, 106, 105, 106,
+
+ 105, 106, 105, 106, 103, 418, 418, 418,
+ 418, 418, 418, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 622, 622, 622, 622, 726, 622, 622,
+
+ 727, 727, 727, 727, 727, 727, 727, 727,
+ 727, 727, 727, 727, 727, 727, 727, 727,
+ 727, 727, 727, 727, 727, 727, 727, 727,
+ 727, 727, 727, 727, 727, 727, 727, 727,
+
+ 727, 727, 727, 727, 727, 727, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+
+ 323, 323, 323, 323, 323, 323, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 401,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 323, 323, 323, 323, 323, 323, 323, 160,
+ 323, 323, 323, 323, 323, 323, 323, 160,
+ 323, 323, 323, 323, 323, 323, 323, 160,
+ 323, 323, 323, 323, 323, 323, 323, 160,
+
+ 728, 728, 729, 730, 729, 730, 728, 728,
+ 728, 729, 730, 728, 729, 730, 622, 622,
+ 622, 622, 622, 622, 622, 622, 621, 731,
+ 160, 160, 160, 160, 729, 730, 160, 160,
+
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 160, 732, 732, 732, 732, 732,
+
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 160, 160, 160, 160,
+
+ 733, 734, 735, 736, 737, 738, 739, 740,
+ 16, 17, 16, 17, 16, 17, 16, 17,
+ 16, 17, 737, 737, 16, 17, 16, 17,
+ 16, 17, 16, 17, 741, 16, 17, 742,
+
+ 737, 740, 740, 740, 740, 740, 740, 740,
+ 740, 740, 743, 744, 140, 745, 746, 746,
+ 747, 748, 748, 748, 748, 748, 737, 737,
+ 749, 749, 749, 750, 751, 752, 732, 737,
+
+ 160, 753, 739, 753, 739, 753, 739, 753,
+ 739, 753, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+
+ 739, 739, 739, 753, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+
+ 739, 739, 739, 753, 739, 753, 739, 753,
+ 739, 739, 739, 739, 739, 739, 753, 739,
+ 739, 739, 739, 739, 739, 754, 754, 160,
+ 160, 755, 755, 756, 756, 757, 757, 758,
+
+ 759, 760, 761, 760, 761, 760, 761, 760,
+ 761, 760, 761, 761, 761, 761, 761, 761,
+ 761, 761, 761, 761, 761, 761, 761, 761,
+ 761, 761, 761, 761, 761, 761, 761, 761,
+
+ 761, 761, 761, 760, 761, 761, 761, 761,
+ 761, 761, 761, 761, 761, 761, 761, 761,
+ 761, 761, 761, 761, 761, 761, 761, 761,
+ 761, 761, 761, 761, 761, 761, 761, 761,
+
+ 761, 761, 761, 760, 761, 760, 761, 760,
+ 761, 761, 761, 761, 761, 761, 760, 761,
+ 761, 761, 761, 761, 761, 760, 760, 761,
+ 761, 761, 761, 762, 763, 763, 763, 764,
+
+ 160, 160, 160, 160, 160, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 160, 160, 160,
+ 160, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 765, 765, 160,
+ 766, 766, 767, 767, 767, 767, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 769, 769, 769, 769, 769, 769, 769, 769,
+ 769, 769, 769, 769, 769, 769, 769, 769,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 770, 770, 770, 770, 770, 770, 770, 770,
+ 770, 770, 770, 770, 770, 770, 770, 770,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 771, 771, 160,
+
+ 767, 767, 767, 767, 767, 767, 767, 767,
+ 767, 767, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+
+ 766, 766, 766, 766, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 771, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 771, 771, 769, 766,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 771, 771, 771, 771,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 160,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 771,
+ 771, 771, 771, 766, 766, 766, 766, 766,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 771, 771,
+
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 771,
+
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 773, 773,
+
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+
+ 739, 739, 739, 739, 739, 739, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 160, 160, 160, 160,
+
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 775, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 160, 160, 160,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+
+ 732, 732, 776, 776, 732, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, 776, 732, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+
+ 732, 776, 732, 732, 732, 776, 732, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 777, 777, 777, 777, 777, 777, 777, 777,
+ 777, 777, 777, 777, 777, 777, 777, 777,
+ 777, 777, 777, 777, 777, 777, 777, 778,
+ 778, 778, 778, 160, 160, 160, 160, 160,
+
+ 779, 779, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 323, 323, 780, 323, 323, 323, 781, 323,
+ 323, 323, 323, 782, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+
+ 323, 323, 323, 464, 464, 782, 782, 464,
+ 418, 418, 418, 418, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 783, 783, 304, 304,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 784, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 784, 785, 785, 785,
+
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 784, 785, 785, 785, 785, 785, 785, 785,
+
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 784, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 784, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 784, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 784, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+
+ 785, 785, 785, 785, 784, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+
+ 785, 785, 785, 785, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+
+ 787, 787, 787, 787, 787, 787, 787, 787,
+ 787, 787, 787, 787, 787, 787, 787, 787,
+ 787, 787, 787, 787, 787, 787, 787, 787,
+ 787, 787, 787, 787, 787, 787, 787, 787,
+
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 160, 160,
+ 788, 788, 788, 788, 788, 788, 788, 788,
+ 788, 788, 788, 788, 788, 788, 788, 788,
+
+ 788, 788, 788, 788, 788, 788, 788, 788,
+ 788, 788, 788, 788, 788, 788, 788, 788,
+ 788, 788, 788, 788, 788, 788, 788, 788,
+ 788, 788, 788, 788, 788, 788, 788, 788,
+
+ 788, 788, 788, 788, 788, 788, 788, 788,
+ 788, 788, 788, 160, 160, 160, 160, 160,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 160, 160, 160, 160, 160, 160,
+
+ 789, 790, 791, 792, 793, 794, 795, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 796, 797, 798, 799, 800,
+ 160, 160, 160, 160, 160, 801, 802, 231,
+
+ 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 635, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 205,
+ 231, 231, 231, 231, 231, 205, 231, 205,
+
+ 231, 231, 205, 231, 231, 205, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 600, 742,
+
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 235, 235, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 803, 803, 803, 803, 803, 803, 803, 803,
+ 803, 803, 803, 803, 803, 803, 803, 803,
+
+ 803, 803, 803, 803, 803, 803, 803, 803,
+ 803, 803, 803, 803, 803, 803, 803, 803,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 804, 239, 235, 235,
+
+ 423, 423, 423, 423, 423, 423, 423, 423,
+ 423, 423, 423, 423, 423, 423, 423, 423,
+ 805, 806, 806, 805, 805, 807, 807, 808,
+ 809, 810, 160, 160, 160, 160, 160, 160,
+
+ 139, 139, 139, 139, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 736, 747, 747, 811, 811, 600, 742, 600,
+ 742, 600, 742, 600, 742, 600, 742, 600,
+
+ 742, 600, 742, 600, 742, 752, 752, 812,
+ 813, 736, 736, 736, 736, 811, 811, 811,
+ 814, 736, 815, 160, 762, 816, 9, 9,
+ 747, 16, 17, 16, 17, 16, 17, 817,
+
+ 736, 736, 818, 819, 820, 821, 822, 160,
+ 736, 12, 13, 736, 160, 160, 160, 160,
+ 243, 243, 243, 286, 243, 235, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 235, 235, 823,
+
+ 160, 9, 736, 817, 12, 13, 736, 736,
+ 16, 17, 736, 818, 814, 819, 815, 824,
+ 825, 826, 827, 828, 829, 830, 831, 832,
+ 833, 834, 816, 762, 835, 822, 836, 9,
+
+ 736, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 39, 736, 41, 838, 811,
+
+ 838, 839, 839, 839, 839, 839, 839, 839,
+ 839, 839, 839, 839, 839, 839, 839, 839,
+ 839, 839, 839, 839, 839, 839, 839, 839,
+ 839, 839, 839, 39, 822, 41, 822, 700,
+
+ 701, 735, 16, 17, 734, 762, 840, 760,
+ 760, 760, 760, 760, 760, 760, 760, 760,
+ 763, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, 840, 763, 763,
+
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 160,
+
+ 160, 160, 90, 90, 90, 90, 90, 90,
+ 160, 160, 90, 90, 90, 90, 90, 90,
+ 160, 160, 90, 90, 90, 90, 90, 90,
+ 160, 160, 90, 90, 90, 160, 160, 160,
+
+ 48, 12, 822, 838, 737, 12, 12, 160,
+ 49, 36, 36, 36, 36, 49, 49, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 841, 841, 841, 842, 49, 843, 843,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 160, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 308, 308, 308, 308, 160,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 160, 308, 308, 160, 308,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 160, 160,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 160, 160,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 160, 160, 160, 160, 160,
+
+ 844, 845, 846, 160, 160, 160, 160, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 160, 160, 160, 848,
+ 848, 848, 848, 848, 848, 848, 848, 848,
+
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 726, 726, 726,
+ 726, 418, 418, 418, 418, 418, 418, 418,
+
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 726, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 160,
+
+ 851, 851, 851, 851, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+
+ 850, 852, 850, 850, 850, 850, 850, 850,
+ 850, 850, 852, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 160, 844,
+
+ 323, 323, 323, 323, 160, 160, 160, 160,
+ 323, 323, 323, 323, 323, 323, 323, 323,
+ 465, 853, 853, 853, 853, 853, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+
+ 854, 854, 854, 854, 854, 854, 855, 855,
+ 856, 856, 856, 856, 856, 856, 856, 856,
+ 856, 856, 856, 856, 856, 856, 856, 856,
+ 856, 856, 856, 856, 856, 856, 856, 856,
+
+ 856, 856, 856, 856, 856, 856, 856, 856,
+ 856, 856, 856, 856, 856, 856, 857, 857,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 160, 160,
+
+ 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 858, 858, 858, 858, 858, 858, 205, 205,
+ 858, 205, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 205, 858,
+ 858, 205, 205, 205, 858, 205, 205, 858,
+
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 860, 860,
+ 860, 860, 205, 205, 205, 205, 205, 861,
+
+ 862, 782, 782, 782, 205, 782, 782, 205,
+ 205, 205, 205, 205, 782, 152, 782, 153,
+ 862, 862, 862, 862, 205, 862, 862, 862,
+ 205, 862, 862, 862, 862, 862, 862, 862,
+
+ 862, 862, 862, 862, 862, 862, 862, 862,
+ 862, 862, 862, 862, 862, 862, 862, 862,
+ 862, 862, 862, 862, 205, 205, 205, 205,
+ 153, 643, 152, 205, 205, 205, 205, 781,
+
+ 863, 864, 865, 866, 867, 867, 867, 867,
+ 205, 205, 205, 205, 205, 205, 205, 205,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 869, 205, 205, 205, 205, 205, 205, 205,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 481, 481, 481, 481, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 160,
+ 160, 160, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 872, 873, 874,
+ 874, 874, 871, 871, 871, 875, 872, 872,
+ 872, 872, 872, 876, 876, 876, 876, 876,
+ 876, 876, 876, 877, 877, 877, 877, 877,
+ 877, 877, 877, 871, 871, 878, 878, 878,
+ 878, 878, 877, 877, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 878, 878, 878, 878, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 153, 153, 153, 418, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 879, 879, 879, 879, 879, 879, 879, 879,
+ 879, 879, 879, 879, 879, 879, 879, 879,
+ 879, 879, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 881, 881,
+ 881, 881, 881, 881, 881, 160, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 880, 160, 880, 880,
+ 160, 160, 880, 160, 160, 880, 880, 160,
+ 160, 880, 880, 880, 880, 160, 880, 880,
+ 880, 880, 880, 880, 880, 880, 881, 881,
+ 881, 881, 160, 881, 160, 881, 881, 881,
+ 881, 102, 881, 881, 160, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+
+ 881, 881, 881, 881, 880, 880, 160, 880,
+ 880, 880, 880, 160, 160, 880, 880, 880,
+ 880, 880, 880, 880, 880, 160, 880, 880,
+ 880, 880, 880, 880, 880, 160, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 880, 880, 160, 880, 880, 880, 880, 160,
+ 880, 880, 880, 880, 880, 160, 880, 160,
+ 160, 160, 880, 880, 880, 880, 880, 880,
+ 880, 160, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 103, 103, 160, 160,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 882, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 882, 881, 881, 881, 881,
+ 881, 881, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 882, 881, 881, 881, 881,
+
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 882, 881, 881,
+ 881, 881, 881, 881, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 882, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 882,
+ 881, 881, 881, 881, 881, 881, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 882,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 882, 881, 881, 881, 881, 881, 881,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 880, 880, 880, 880, 880, 880, 880,
+ 880, 882, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 882, 881, 881, 881, 881,
+ 881, 881, 883, 725, 160, 160, 884, 885,
+ 886, 887, 888, 889, 890, 891, 892, 893,
+ 884, 885, 886, 887, 888, 889, 890, 891,
+ 892, 893, 884, 885, 886, 887, 888, 889,
+ 890, 891, 892, 893, 884, 885, 886, 887,
+ 888, 889, 890, 891, 892, 893, 884, 885,
+ 886, 887, 888, 889, 890, 891, 892, 893,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 894, 894,
+
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 895, 895,
+ 895, 895, 895, 895, 895, 895, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 876, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 896, 896,
+ 896, 896, 896, 896, 896, 896, 894, 894,
};
#define GET_PROP_INDEX(ucs4) \
@@ -3618,6 +3618,7 @@ static const QUnicodeTables::Properties uc_properties [] = {
{ 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 80, 0, 0, 80, 0, 3, 5},
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 80, 0, 0, 80, 0, 3, 5},
{ 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, -80, -80, 0, 0, 3, 4},
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -80, -80, 0, 0, 3, 4},
{ 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 19, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 15, 0, 0, 15, 0, 3, 5},
@@ -4335,13 +4336,13 @@ static inline const QUnicodeTables::Properties *qGetProp(ushort ucs2)
return uc_properties + index;
}
-Q_CORE_EXPORT const QUnicodeTables::Properties* QT_FASTCALL QUnicodeTables::properties(uint ucs4)
+Q_CORE_EXPORT const QUnicodeTables::Properties * QT_FASTCALL QUnicodeTables::properties(uint ucs4)
{
int index = GET_PROP_INDEX(ucs4);
return uc_properties + index;
}
-Q_CORE_EXPORT const QUnicodeTables::Properties* QT_FASTCALL QUnicodeTables::properties(ushort ucs2)
+Q_CORE_EXPORT const QUnicodeTables::Properties * QT_FASTCALL QUnicodeTables::properties(ushort ucs2)
{
int index = GET_PROP_INDEX_UCS2(ucs2);
return uc_properties + index;
@@ -4382,1446 +4383,1446 @@ static const ushort specialCaseMap [] = {
static const unsigned short uc_decomposition_trie[] = {
// 0 - 0x3400
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1564, 1580, 1596, 1612, 1628, 1644,
- 1660, 1676, 1692, 1708, 1724, 1740, 1756, 1772,
- 1548, 1548, 1788, 1804, 1820, 1836, 1852, 1868,
- 1884, 1900, 1916, 1932, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1948, 1548, 1964, 1980, 1548,
- 1548, 1548, 1548, 1548, 1996, 1548, 1548, 2012,
- 2028, 2044, 2060, 2076, 2092, 2108, 1548, 2124,
- 2140, 2156, 1548, 2172, 1548, 2188, 1548, 2204,
- 1548, 1548, 1548, 1548, 2220, 2236, 2252, 2268,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 2284, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 2300, 1548, 1548, 1548, 1548, 2316,
- 1548, 1548, 1548, 1548, 2332, 2348, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 2364, 2380, 1548, 2396, 1548, 1548,
- 1548, 1548, 1548, 1548, 2412, 2428, 1548, 1548,
- 1548, 1548, 1548, 2444, 1548, 2460, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 2476, 2492, 1548, 1548,
- 1548, 2508, 1548, 1548, 2524, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 2540, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 2556, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 2572, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 2588, 1548, 1548,
- 1548, 1548, 1548, 2604, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 2620, 1548, 2636, 1548, 1548,
- 2652, 1548, 1548, 1548, 2668, 2684, 2700, 2716,
- 2732, 2748, 2764, 2780, 1548, 1548, 1548, 1548,
-
- 1548, 1548, 2796, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 2812,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 2828, 2844, 1548, 2860, 2876, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 2892, 2908, 2924, 2940, 2956, 2972,
- 1548, 2988, 3004, 3020, 1548, 1548, 1548, 1548,
- 3036, 3052, 3068, 3084, 3100, 3116, 3132, 3148,
- 3164, 3180, 3196, 3212, 3228, 3244, 3260, 3276,
- 3292, 3308, 3324, 3340, 3356, 3372, 3388, 3404,
- 3420, 3436, 3452, 3468, 3484, 3500, 3516, 3532,
-
- 3548, 3564, 3580, 3596, 3612, 3628, 1548, 3644,
- 3660, 3676, 3692, 1548, 1548, 1548, 1548, 1548,
- 3708, 3724, 3740, 3756, 3772, 3788, 3804, 3820,
- 1548, 3836, 3852, 1548, 3868, 1548, 1548, 1548,
- 3884, 1548, 3900, 3916, 3932, 1548, 3948, 3964,
- 3980, 1548, 3996, 1548, 1548, 1548, 4012, 1548,
- 1548, 1548, 4028, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 4044, 4060,
- 4076, 4092, 4108, 4124, 4140, 4156, 4172, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 4188, 1548, 1548, 1548, 1548, 1548, 1548, 4204,
- 1548, 1548, 1548, 1548, 1548, 4220, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 4236, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
- 1548, 4252, 1548, 1548, 1548, 1548, 1548, 4268,
- 4284, 4300, 4316, 4332, 4348, 4364, 4380, 4396,
- 4412, 4428, 4444, 4460, 4476, 4492, 1548, 1548,
-
- 4508, 1548, 1548, 4524, 4540, 4556, 4572, 4588,
- 1548, 4604, 4620, 4636, 4652, 4668, 1548, 4684,
- 1548, 1548, 1548, 4700, 4716, 4732, 4748, 4764,
- 4780, 4796, 1548, 1548, 1548, 1548, 1548, 1548,
- 4812, 4828, 4844, 4860, 4876, 4892, 4908, 4924,
- 4940, 4956, 4972, 4988, 5004, 5020, 5036, 5052,
- 5068, 5084, 5100, 5116, 5132, 5148, 5164, 5180,
- 5196, 5212, 5228, 5244, 5260, 5276, 5292, 5308,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1564, 1580, 1596, 1612, 1628, 1644,
+ 1660, 1676, 1692, 1708, 1724, 1740, 1756, 1772,
+ 1548, 1548, 1788, 1804, 1820, 1836, 1852, 1868,
+ 1884, 1900, 1916, 1932, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1948, 1548, 1964, 1980, 1548,
+ 1548, 1548, 1548, 1548, 1996, 1548, 1548, 2012,
+ 2028, 2044, 2060, 2076, 2092, 2108, 1548, 2124,
+ 2140, 2156, 1548, 2172, 1548, 2188, 1548, 2204,
+ 1548, 1548, 1548, 1548, 2220, 2236, 2252, 2268,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 2284, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 2300, 1548, 1548, 1548, 1548, 2316,
+ 1548, 1548, 1548, 1548, 2332, 2348, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 2364, 2380, 1548, 2396, 1548, 1548,
+ 1548, 1548, 1548, 1548, 2412, 2428, 1548, 1548,
+ 1548, 1548, 1548, 2444, 1548, 2460, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 2476, 2492, 1548, 1548,
+ 1548, 2508, 1548, 1548, 2524, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 2540, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 2556, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 2572, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 2588, 1548, 1548,
+ 1548, 1548, 1548, 2604, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 2620, 1548, 2636, 1548, 1548,
+ 2652, 1548, 1548, 1548, 2668, 2684, 2700, 2716,
+ 2732, 2748, 2764, 2780, 1548, 1548, 1548, 1548,
+
+ 1548, 1548, 2796, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 2812,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 2828, 2844, 1548, 2860, 2876, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 2892, 2908, 2924, 2940, 2956, 2972,
+ 1548, 2988, 3004, 3020, 1548, 1548, 1548, 1548,
+ 3036, 3052, 3068, 3084, 3100, 3116, 3132, 3148,
+ 3164, 3180, 3196, 3212, 3228, 3244, 3260, 3276,
+ 3292, 3308, 3324, 3340, 3356, 3372, 3388, 3404,
+ 3420, 3436, 3452, 3468, 3484, 3500, 3516, 3532,
+
+ 3548, 3564, 3580, 3596, 3612, 3628, 1548, 3644,
+ 3660, 3676, 3692, 1548, 1548, 1548, 1548, 1548,
+ 3708, 3724, 3740, 3756, 3772, 3788, 3804, 3820,
+ 1548, 3836, 3852, 1548, 3868, 1548, 1548, 1548,
+ 3884, 1548, 3900, 3916, 3932, 1548, 3948, 3964,
+ 3980, 1548, 3996, 1548, 1548, 1548, 4012, 1548,
+ 1548, 1548, 4028, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 4044, 4060,
+ 4076, 4092, 4108, 4124, 4140, 4156, 4172, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 4188, 1548, 1548, 1548, 1548, 1548, 1548, 4204,
+ 1548, 1548, 1548, 1548, 1548, 4220, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 4236, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548,
+ 1548, 4252, 1548, 1548, 1548, 1548, 1548, 4268,
+ 4284, 4300, 4316, 4332, 4348, 4364, 4380, 4396,
+ 4412, 4428, 4444, 4460, 4476, 4492, 1548, 1548,
+
+ 4508, 1548, 1548, 4524, 4540, 4556, 4572, 4588,
+ 1548, 4604, 4620, 4636, 4652, 4668, 1548, 4684,
+ 1548, 1548, 1548, 4700, 4716, 4732, 4748, 4764,
+ 4780, 4796, 1548, 1548, 1548, 1548, 1548, 1548,
+ 4812, 4828, 4844, 4860, 4876, 4892, 4908, 4924,
+ 4940, 4956, 4972, 4988, 5004, 5020, 5036, 5052,
+ 5068, 5084, 5100, 5116, 5132, 5148, 5164, 5180,
+ 5196, 5212, 5228, 5244, 5260, 5276, 5292, 5308,
// 0x3400 - 0x30000
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
-
- 5324, 5324, 5324, 5324, 5324, 5580, 5836, 6092,
- 6348, 6604, 6860, 7116, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 7372, 5324, 5324,
- 7628, 7884, 8140, 8396, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
-
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
- 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
-
- 5324, 5324, 5324, 5324, 8652, 8908, 9164, 5324,
- 5324, 5324, 5324, 5324,
-
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x2, 0xffff, 0x5, 0xffff, 0xffff, 0xffff, 0xffff, 0x7,
-
- 0xffff, 0xffff, 0xa, 0xc, 0xe, 0x11, 0xffff, 0xffff,
- 0x13, 0x16, 0x18, 0xffff, 0x1a, 0x1e, 0x22, 0xffff,
-
- 0x26, 0x29, 0x2c, 0x2f, 0x32, 0x35, 0xffff, 0x38,
- 0x3b, 0x3e, 0x41, 0x44, 0x47, 0x4a, 0x4d, 0x50,
-
- 0xffff, 0x53, 0x56, 0x59, 0x5c, 0x5f, 0x62, 0xffff,
- 0xffff, 0x65, 0x68, 0x6b, 0x6e, 0x71, 0xffff, 0xffff,
-
- 0x74, 0x77, 0x7a, 0x7d, 0x80, 0x83, 0xffff, 0x86,
- 0x89, 0x8c, 0x8f, 0x92, 0x95, 0x98, 0x9b, 0x9e,
-
- 0xffff, 0xa1, 0xa4, 0xa7, 0xaa, 0xad, 0xb0, 0xffff,
- 0xffff, 0xb3, 0xb6, 0xb9, 0xbc, 0xbf, 0xffff, 0xc2,
-
- 0xc5, 0xc8, 0xcb, 0xce, 0xd1, 0xd4, 0xd7, 0xda,
- 0xdd, 0xe0, 0xe3, 0xe6, 0xe9, 0xec, 0xef, 0xf2,
-
- 0xffff, 0xffff, 0xf5, 0xf8, 0xfb, 0xfe, 0x101, 0x104,
- 0x107, 0x10a, 0x10d, 0x110, 0x113, 0x116, 0x119, 0x11c,
-
- 0x11f, 0x122, 0x125, 0x128, 0x12b, 0x12e, 0xffff, 0xffff,
- 0x131, 0x134, 0x137, 0x13a, 0x13d, 0x140, 0x143, 0x146,
-
- 0x149, 0xffff, 0x14c, 0x14f, 0x152, 0x155, 0x158, 0x15b,
- 0xffff, 0x15e, 0x161, 0x164, 0x167, 0x16a, 0x16d, 0x170,
-
- 0x173, 0xffff, 0xffff, 0x176, 0x179, 0x17c, 0x17f, 0x182,
- 0x185, 0x188, 0xffff, 0xffff, 0x18b, 0x18e, 0x191, 0x194,
-
- 0x197, 0x19a, 0xffff, 0xffff, 0x19d, 0x1a0, 0x1a3, 0x1a6,
- 0x1a9, 0x1ac, 0x1af, 0x1b2, 0x1b5, 0x1b8, 0x1bb, 0x1be,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+
+ 5324, 5324, 5324, 5324, 5324, 5580, 5836, 6092,
+ 6348, 6604, 6860, 7116, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 7372, 5324, 5324,
+ 7628, 7884, 8140, 8396, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+ 5324, 5324, 5324, 5324, 5324, 5324, 5324, 5324,
+
+ 5324, 5324, 5324, 5324, 8652, 8908, 9164, 5324,
+ 5324, 5324, 5324, 5324,
+
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x2, 0xffff, 0x5, 0xffff, 0xffff, 0xffff, 0xffff, 0x7,
+
+ 0xffff, 0xffff, 0xa, 0xc, 0xe, 0x11, 0xffff, 0xffff,
+ 0x13, 0x16, 0x18, 0xffff, 0x1a, 0x1e, 0x22, 0xffff,
+
+ 0x26, 0x29, 0x2c, 0x2f, 0x32, 0x35, 0xffff, 0x38,
+ 0x3b, 0x3e, 0x41, 0x44, 0x47, 0x4a, 0x4d, 0x50,
+
+ 0xffff, 0x53, 0x56, 0x59, 0x5c, 0x5f, 0x62, 0xffff,
+ 0xffff, 0x65, 0x68, 0x6b, 0x6e, 0x71, 0xffff, 0xffff,
+
+ 0x74, 0x77, 0x7a, 0x7d, 0x80, 0x83, 0xffff, 0x86,
+ 0x89, 0x8c, 0x8f, 0x92, 0x95, 0x98, 0x9b, 0x9e,
+
+ 0xffff, 0xa1, 0xa4, 0xa7, 0xaa, 0xad, 0xb0, 0xffff,
+ 0xffff, 0xb3, 0xb6, 0xb9, 0xbc, 0xbf, 0xffff, 0xc2,
+
+ 0xc5, 0xc8, 0xcb, 0xce, 0xd1, 0xd4, 0xd7, 0xda,
+ 0xdd, 0xe0, 0xe3, 0xe6, 0xe9, 0xec, 0xef, 0xf2,
+
+ 0xffff, 0xffff, 0xf5, 0xf8, 0xfb, 0xfe, 0x101, 0x104,
+ 0x107, 0x10a, 0x10d, 0x110, 0x113, 0x116, 0x119, 0x11c,
+
+ 0x11f, 0x122, 0x125, 0x128, 0x12b, 0x12e, 0xffff, 0xffff,
+ 0x131, 0x134, 0x137, 0x13a, 0x13d, 0x140, 0x143, 0x146,
+
+ 0x149, 0xffff, 0x14c, 0x14f, 0x152, 0x155, 0x158, 0x15b,
+ 0xffff, 0x15e, 0x161, 0x164, 0x167, 0x16a, 0x16d, 0x170,
+
+ 0x173, 0xffff, 0xffff, 0x176, 0x179, 0x17c, 0x17f, 0x182,
+ 0x185, 0x188, 0xffff, 0xffff, 0x18b, 0x18e, 0x191, 0x194,
+
+ 0x197, 0x19a, 0xffff, 0xffff, 0x19d, 0x1a0, 0x1a3, 0x1a6,
+ 0x1a9, 0x1ac, 0x1af, 0x1b2, 0x1b5, 0x1b8, 0x1bb, 0x1be,
- 0x1c1, 0x1c4, 0x1c7, 0x1ca, 0x1cd, 0x1d0, 0xffff, 0xffff,
- 0x1d3, 0x1d6, 0x1d9, 0x1dc, 0x1df, 0x1e2, 0x1e5, 0x1e8,
+ 0x1c1, 0x1c4, 0x1c7, 0x1ca, 0x1cd, 0x1d0, 0xffff, 0xffff,
+ 0x1d3, 0x1d6, 0x1d9, 0x1dc, 0x1df, 0x1e2, 0x1e5, 0x1e8,
- 0x1eb, 0x1ee, 0x1f1, 0x1f4, 0x1f7, 0x1fa, 0x1fd, 0x200,
- 0x203, 0x206, 0x209, 0x20c, 0x20f, 0x212, 0x215, 0x218,
+ 0x1eb, 0x1ee, 0x1f1, 0x1f4, 0x1f7, 0x1fa, 0x1fd, 0x200,
+ 0x203, 0x206, 0x209, 0x20c, 0x20f, 0x212, 0x215, 0x218,
- 0x21a, 0x21d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x220,
+ 0x21a, 0x21d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x220,
- 0x223, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x223, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x226, 0x229, 0x22c, 0x22f,
- 0x232, 0x235, 0x238, 0x23b, 0x23e, 0x241, 0x244, 0x247,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x226, 0x229, 0x22c, 0x22f,
+ 0x232, 0x235, 0x238, 0x23b, 0x23e, 0x241, 0x244, 0x247,
- 0x24a, 0x24d, 0x250, 0x253, 0x256, 0x259, 0x25c, 0x25f,
- 0x262, 0x265, 0x268, 0x26b, 0x26e, 0xffff, 0x271, 0x274,
+ 0x24a, 0x24d, 0x250, 0x253, 0x256, 0x259, 0x25c, 0x25f,
+ 0x262, 0x265, 0x268, 0x26b, 0x26e, 0xffff, 0x271, 0x274,
- 0x277, 0x27a, 0x27d, 0x280, 0xffff, 0xffff, 0x283, 0x286,
- 0x289, 0x28c, 0x28f, 0x292, 0x295, 0x298, 0x29b, 0x29e,
+ 0x277, 0x27a, 0x27d, 0x280, 0xffff, 0xffff, 0x283, 0x286,
+ 0x289, 0x28c, 0x28f, 0x292, 0x295, 0x298, 0x29b, 0x29e,
- 0x2a1, 0x2a4, 0x2a7, 0x2aa, 0x2ad, 0x2b0, 0xffff, 0xffff,
- 0x2b3, 0x2b6, 0x2b9, 0x2bc, 0x2bf, 0x2c2, 0x2c5, 0x2c8,
+ 0x2a1, 0x2a4, 0x2a7, 0x2aa, 0x2ad, 0x2b0, 0xffff, 0xffff,
+ 0x2b3, 0x2b6, 0x2b9, 0x2bc, 0x2bf, 0x2c2, 0x2c5, 0x2c8,
- 0x2cb, 0x2ce, 0x2d1, 0x2d4, 0x2d7, 0x2da, 0x2dd, 0x2e0,
- 0x2e3, 0x2e6, 0x2e9, 0x2ec, 0x2ef, 0x2f2, 0x2f5, 0x2f8,
+ 0x2cb, 0x2ce, 0x2d1, 0x2d4, 0x2d7, 0x2da, 0x2dd, 0x2e0,
+ 0x2e3, 0x2e6, 0x2e9, 0x2ec, 0x2ef, 0x2f2, 0x2f5, 0x2f8,
- 0x2fb, 0x2fe, 0x301, 0x304, 0x307, 0x30a, 0x30d, 0x310,
- 0x313, 0x316, 0x319, 0x31c, 0xffff, 0xffff, 0x31f, 0x322,
+ 0x2fb, 0x2fe, 0x301, 0x304, 0x307, 0x30a, 0x30d, 0x310,
+ 0x313, 0x316, 0x319, 0x31c, 0xffff, 0xffff, 0x31f, 0x322,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x325, 0x328,
- 0x32b, 0x32e, 0x331, 0x334, 0x337, 0x33a, 0x33d, 0x340,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x325, 0x328,
+ 0x32b, 0x32e, 0x331, 0x334, 0x337, 0x33a, 0x33d, 0x340,
- 0x343, 0x346, 0x349, 0x34c, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x343, 0x346, 0x349, 0x34c, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x34f, 0x351, 0x353, 0x355, 0x357, 0x359, 0x35b, 0x35d,
- 0x35f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x34f, 0x351, 0x353, 0x355, 0x357, 0x359, 0x35b, 0x35d,
+ 0x35f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x361, 0x364, 0x367, 0x36a, 0x36d, 0x370, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x361, 0x364, 0x367, 0x36a, 0x36d, 0x370, 0xffff, 0xffff,
- 0x373, 0x375, 0x377, 0x379, 0x37b, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x373, 0x375, 0x377, 0x379, 0x37b, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x37d, 0x37f, 0xffff, 0x381, 0x383, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x37d, 0x37f, 0xffff, 0x381, 0x383, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x386, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x388, 0xffff, 0xffff, 0xffff, 0x38b, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x386, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x388, 0xffff, 0xffff, 0xffff, 0x38b, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x38d, 0x390, 0x393, 0x396,
- 0x398, 0x39b, 0x39e, 0xffff, 0x3a1, 0xffff, 0x3a4, 0x3a7,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x38d, 0x390, 0x393, 0x396,
+ 0x398, 0x39b, 0x39e, 0xffff, 0x3a1, 0xffff, 0x3a4, 0x3a7,
- 0x3aa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3aa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x3ad, 0x3b0, 0x3b3, 0x3b6, 0x3b9, 0x3bc,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x3ad, 0x3b0, 0x3b3, 0x3b6, 0x3b9, 0x3bc,
- 0x3bf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3bf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x3c2, 0x3c5, 0x3c8, 0x3cb, 0x3ce, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x3c2, 0x3c5, 0x3c8, 0x3cb, 0x3ce, 0xffff,
- 0x3d1, 0x3d3, 0x3d5, 0x3d7, 0x3da, 0x3dd, 0x3df, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3d1, 0x3d3, 0x3d5, 0x3d7, 0x3da, 0x3dd, 0x3df, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x3e1, 0x3e3, 0x3e5, 0xffff, 0x3e7, 0x3e9, 0xffff, 0xffff,
- 0xffff, 0x3eb, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3e1, 0x3e3, 0x3e5, 0xffff, 0x3e7, 0x3e9, 0xffff, 0xffff,
+ 0xffff, 0x3eb, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x3ed, 0x3f0, 0xffff, 0x3f3, 0xffff, 0xffff, 0xffff, 0x3f6,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x3f9, 0x3fc, 0x3ff, 0xffff,
+ 0x3ed, 0x3f0, 0xffff, 0x3f3, 0xffff, 0xffff, 0xffff, 0x3f6,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x3f9, 0x3fc, 0x3ff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x402, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x402, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x405, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x405, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x408, 0x40b, 0xffff, 0x40e, 0xffff, 0xffff, 0xffff, 0x411,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x414, 0x417, 0x41a, 0xffff,
+ 0x408, 0x40b, 0xffff, 0x40e, 0xffff, 0xffff, 0xffff, 0x411,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x414, 0x417, 0x41a, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x41d, 0x420,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x41d, 0x420,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x423, 0x426, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x423, 0x426, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x429, 0x42c, 0x42f, 0x432, 0xffff, 0xffff, 0x435, 0x438,
- 0xffff, 0xffff, 0x43b, 0x43e, 0x441, 0x444, 0x447, 0x44a,
+ 0x429, 0x42c, 0x42f, 0x432, 0xffff, 0xffff, 0x435, 0x438,
+ 0xffff, 0xffff, 0x43b, 0x43e, 0x441, 0x444, 0x447, 0x44a,
- 0xffff, 0xffff, 0x44d, 0x450, 0x453, 0x456, 0x459, 0x45c,
- 0xffff, 0xffff, 0x45f, 0x462, 0x465, 0x468, 0x46b, 0x46e,
+ 0xffff, 0xffff, 0x44d, 0x450, 0x453, 0x456, 0x459, 0x45c,
+ 0xffff, 0xffff, 0x45f, 0x462, 0x465, 0x468, 0x46b, 0x46e,
- 0x471, 0x474, 0x477, 0x47a, 0x47d, 0x480, 0xffff, 0xffff,
- 0x483, 0x486, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x471, 0x474, 0x477, 0x47a, 0x47d, 0x480, 0xffff, 0xffff,
+ 0x483, 0x486, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x489,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x489,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x48c, 0x48f, 0x492, 0x495, 0x498, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x48c, 0x48f, 0x492, 0x495, 0x498, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x49b, 0x49e, 0x4a1,
- 0x4a4, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x49b, 0x49e, 0x4a1,
+ 0x4a4, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x4a7, 0xffff, 0x4aa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x4a7, 0xffff, 0x4aa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x4ad, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x4ad, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x4b0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x4b0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x4b3, 0xffff, 0xffff, 0x4b6, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x4b3, 0xffff, 0xffff, 0x4b6, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x4b9, 0x4bc, 0x4bf, 0x4c2, 0x4c5, 0x4c8, 0x4cb, 0x4ce,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x4b9, 0x4bc, 0x4bf, 0x4c2, 0x4c5, 0x4c8, 0x4cb, 0x4ce,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x4d1, 0x4d4, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x4d1, 0x4d4, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x4d7, 0x4da, 0xffff, 0x4dd,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x4d7, 0x4da, 0xffff, 0x4dd,
- 0xffff, 0xffff, 0xffff, 0x4e0, 0xffff, 0xffff, 0x4e3, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x4e0, 0xffff, 0xffff, 0x4e3, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x4e6, 0x4e9, 0x4ec, 0xffff, 0xffff, 0x4ef, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x4e6, 0x4e9, 0x4ec, 0xffff, 0xffff, 0x4ef, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x4f2, 0xffff, 0xffff, 0x4f5, 0x4f8, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x4f2, 0xffff, 0xffff, 0x4f5, 0x4f8, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x4fb, 0x4fe, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x4fb, 0x4fe, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x501, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x501, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x504, 0x507, 0x50a, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x504, 0x507, 0x50a, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x50d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x50d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x510, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x513,
- 0x516, 0xffff, 0x519, 0x51c, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x510, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x513,
+ 0x516, 0xffff, 0x519, 0x51c, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x51f, 0x522, 0x525, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x51f, 0x522, 0x525, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x528, 0xffff, 0x52b, 0x52e, 0x531, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x528, 0xffff, 0x52b, 0x52e, 0x531, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x534, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x534, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x537, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x537, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x53a, 0x53d, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x53a, 0x53d, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x540, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x540, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x542, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x545, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x542, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x545, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x548, 0xffff, 0xffff, 0xffff, 0xffff, 0x54b,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x54e, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x548, 0xffff, 0xffff, 0xffff, 0xffff, 0x54b,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x54e, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x551, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x551, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x554, 0xffff, 0x557, 0x55a, 0x55d,
- 0x560, 0x563, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x554, 0xffff, 0x557, 0x55a, 0x55d,
+ 0x560, 0x563, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x566, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x566, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x569, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x56c, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x569, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x56c, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x56f, 0xffff, 0xffff, 0xffff, 0xffff, 0x572,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x575, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x56f, 0xffff, 0xffff, 0xffff, 0xffff, 0x572,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x575, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x578, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x578, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x57b, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x57b, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x57e, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x57e, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x580, 0xffff,
- 0x583, 0xffff, 0x586, 0xffff, 0x589, 0xffff, 0x58c, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x580, 0xffff,
+ 0x583, 0xffff, 0x586, 0xffff, 0x589, 0xffff, 0x58c, 0xffff,
- 0xffff, 0xffff, 0x58f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x58f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x592, 0xffff, 0x595, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x592, 0xffff, 0x595, 0xffff, 0xffff,
- 0x598, 0x59b, 0xffff, 0x59e, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x598, 0x59b, 0xffff, 0x59e, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x5a1, 0x5a3, 0x5a5, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x5a1, 0x5a3, 0x5a5, 0xffff,
- 0x5a7, 0x5a9, 0x5ab, 0x5ad, 0x5af, 0x5b1, 0x5b3, 0x5b5,
- 0x5b7, 0x5b9, 0x5bb, 0xffff, 0x5bd, 0x5bf, 0x5c1, 0x5c3,
+ 0x5a7, 0x5a9, 0x5ab, 0x5ad, 0x5af, 0x5b1, 0x5b3, 0x5b5,
+ 0x5b7, 0x5b9, 0x5bb, 0xffff, 0x5bd, 0x5bf, 0x5c1, 0x5c3,
- 0x5c5, 0x5c7, 0x5c9, 0x5cb, 0x5cd, 0x5cf, 0x5d1, 0x5d3,
- 0x5d5, 0x5d7, 0x5d9, 0x5db, 0x5dd, 0x5df, 0xffff, 0x5e1,
+ 0x5c5, 0x5c7, 0x5c9, 0x5cb, 0x5cd, 0x5cf, 0x5d1, 0x5d3,
+ 0x5d5, 0x5d7, 0x5d9, 0x5db, 0x5dd, 0x5df, 0xffff, 0x5e1,
- 0x5e3, 0x5e5, 0x5e7, 0x5e9, 0x5eb, 0x5ed, 0x5ef, 0x5f1,
- 0x5f3, 0x5f5, 0x5f7, 0x5f9, 0x5fb, 0x5fd, 0x5ff, 0x601,
+ 0x5e3, 0x5e5, 0x5e7, 0x5e9, 0x5eb, 0x5ed, 0x5ef, 0x5f1,
+ 0x5f3, 0x5f5, 0x5f7, 0x5f9, 0x5fb, 0x5fd, 0x5ff, 0x601,
- 0x603, 0x605, 0x607, 0x609, 0x60b, 0x60d, 0x60f, 0x611,
- 0x613, 0x615, 0x617, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x603, 0x605, 0x607, 0x609, 0x60b, 0x60d, 0x60f, 0x611,
+ 0x613, 0x615, 0x617, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x619, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x619, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x61b, 0x61d, 0x61f, 0x621, 0x623,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x61b, 0x61d, 0x61f, 0x621, 0x623,
- 0x625, 0x627, 0x629, 0x62b, 0x62d, 0x62f, 0x631, 0x633,
- 0x635, 0x637, 0x639, 0x63b, 0x63d, 0x63f, 0x641, 0x643,
+ 0x625, 0x627, 0x629, 0x62b, 0x62d, 0x62f, 0x631, 0x633,
+ 0x635, 0x637, 0x639, 0x63b, 0x63d, 0x63f, 0x641, 0x643,
- 0x645, 0x647, 0x649, 0x64b, 0x64d, 0x64f, 0x651, 0x653,
- 0x655, 0x657, 0x659, 0x65b, 0x65d, 0x65f, 0x661, 0x663,
+ 0x645, 0x647, 0x649, 0x64b, 0x64d, 0x64f, 0x651, 0x653,
+ 0x655, 0x657, 0x659, 0x65b, 0x65d, 0x65f, 0x661, 0x663,
- 0x665, 0x668, 0x66b, 0x66e, 0x671, 0x674, 0x677, 0x67a,
- 0x67d, 0x680, 0x683, 0x686, 0x689, 0x68c, 0x68f, 0x692,
+ 0x665, 0x668, 0x66b, 0x66e, 0x671, 0x674, 0x677, 0x67a,
+ 0x67d, 0x680, 0x683, 0x686, 0x689, 0x68c, 0x68f, 0x692,
- 0x695, 0x698, 0x69b, 0x69e, 0x6a1, 0x6a4, 0x6a7, 0x6aa,
- 0x6ad, 0x6b0, 0x6b3, 0x6b6, 0x6b9, 0x6bc, 0x6bf, 0x6c2,
+ 0x695, 0x698, 0x69b, 0x69e, 0x6a1, 0x6a4, 0x6a7, 0x6aa,
+ 0x6ad, 0x6b0, 0x6b3, 0x6b6, 0x6b9, 0x6bc, 0x6bf, 0x6c2,
- 0x6c5, 0x6c8, 0x6cb, 0x6ce, 0x6d1, 0x6d4, 0x6d7, 0x6da,
- 0x6dd, 0x6e0, 0x6e3, 0x6e6, 0x6e9, 0x6ec, 0x6ef, 0x6f2,
+ 0x6c5, 0x6c8, 0x6cb, 0x6ce, 0x6d1, 0x6d4, 0x6d7, 0x6da,
+ 0x6dd, 0x6e0, 0x6e3, 0x6e6, 0x6e9, 0x6ec, 0x6ef, 0x6f2,
- 0x6f5, 0x6f8, 0x6fb, 0x6fe, 0x701, 0x704, 0x707, 0x70a,
- 0x70d, 0x710, 0x713, 0x716, 0x719, 0x71c, 0x71f, 0x722,
+ 0x6f5, 0x6f8, 0x6fb, 0x6fe, 0x701, 0x704, 0x707, 0x70a,
+ 0x70d, 0x710, 0x713, 0x716, 0x719, 0x71c, 0x71f, 0x722,
- 0x725, 0x728, 0x72b, 0x72e, 0x731, 0x734, 0x737, 0x73a,
- 0x73d, 0x740, 0x743, 0x746, 0x749, 0x74c, 0x74f, 0x752,
+ 0x725, 0x728, 0x72b, 0x72e, 0x731, 0x734, 0x737, 0x73a,
+ 0x73d, 0x740, 0x743, 0x746, 0x749, 0x74c, 0x74f, 0x752,
- 0x755, 0x758, 0x75b, 0x75e, 0x761, 0x764, 0x767, 0x76a,
- 0x76d, 0x770, 0x773, 0x776, 0x779, 0x77c, 0x77f, 0x782,
+ 0x755, 0x758, 0x75b, 0x75e, 0x761, 0x764, 0x767, 0x76a,
+ 0x76d, 0x770, 0x773, 0x776, 0x779, 0x77c, 0x77f, 0x782,
- 0x785, 0x788, 0x78b, 0x78e, 0x791, 0x794, 0x797, 0x79a,
- 0x79d, 0x7a0, 0x7a3, 0x7a6, 0x7a9, 0x7ac, 0x7af, 0x7b2,
+ 0x785, 0x788, 0x78b, 0x78e, 0x791, 0x794, 0x797, 0x79a,
+ 0x79d, 0x7a0, 0x7a3, 0x7a6, 0x7a9, 0x7ac, 0x7af, 0x7b2,
- 0x7b5, 0x7b8, 0x7bb, 0x7be, 0x7c1, 0x7c4, 0x7c7, 0x7ca,
- 0x7cd, 0x7d0, 0x7d3, 0x7d6, 0x7d9, 0x7dc, 0x7df, 0x7e2,
+ 0x7b5, 0x7b8, 0x7bb, 0x7be, 0x7c1, 0x7c4, 0x7c7, 0x7ca,
+ 0x7cd, 0x7d0, 0x7d3, 0x7d6, 0x7d9, 0x7dc, 0x7df, 0x7e2,
- 0x7e5, 0x7e8, 0x7eb, 0x7ee, 0x7f1, 0x7f4, 0x7f7, 0x7fa,
- 0x7fd, 0x800, 0x803, 0x806, 0x809, 0x80c, 0x80f, 0x812,
+ 0x7e5, 0x7e8, 0x7eb, 0x7ee, 0x7f1, 0x7f4, 0x7f7, 0x7fa,
+ 0x7fd, 0x800, 0x803, 0x806, 0x809, 0x80c, 0x80f, 0x812,
- 0x815, 0x818, 0x81b, 0x81e, 0x821, 0x824, 0x827, 0x82a,
- 0x82d, 0x830, 0x833, 0x836, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x815, 0x818, 0x81b, 0x81e, 0x821, 0x824, 0x827, 0x82a,
+ 0x82d, 0x830, 0x833, 0x836, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x839, 0x83c, 0x83f, 0x842, 0x845, 0x848, 0x84b, 0x84e,
- 0x851, 0x854, 0x857, 0x85a, 0x85d, 0x860, 0x863, 0x866,
+ 0x839, 0x83c, 0x83f, 0x842, 0x845, 0x848, 0x84b, 0x84e,
+ 0x851, 0x854, 0x857, 0x85a, 0x85d, 0x860, 0x863, 0x866,
- 0x869, 0x86c, 0x86f, 0x872, 0x875, 0x878, 0x87b, 0x87e,
- 0x881, 0x884, 0x887, 0x88a, 0x88d, 0x890, 0x893, 0x896,
+ 0x869, 0x86c, 0x86f, 0x872, 0x875, 0x878, 0x87b, 0x87e,
+ 0x881, 0x884, 0x887, 0x88a, 0x88d, 0x890, 0x893, 0x896,
- 0x899, 0x89c, 0x89f, 0x8a2, 0x8a5, 0x8a8, 0x8ab, 0x8ae,
- 0x8b1, 0x8b4, 0x8b7, 0x8ba, 0x8bd, 0x8c0, 0x8c3, 0x8c6,
+ 0x899, 0x89c, 0x89f, 0x8a2, 0x8a5, 0x8a8, 0x8ab, 0x8ae,
+ 0x8b1, 0x8b4, 0x8b7, 0x8ba, 0x8bd, 0x8c0, 0x8c3, 0x8c6,
- 0x8c9, 0x8cc, 0x8cf, 0x8d2, 0x8d5, 0x8d8, 0x8db, 0x8de,
- 0x8e1, 0x8e4, 0x8e7, 0x8ea, 0x8ed, 0x8f0, 0x8f3, 0x8f6,
+ 0x8c9, 0x8cc, 0x8cf, 0x8d2, 0x8d5, 0x8d8, 0x8db, 0x8de,
+ 0x8e1, 0x8e4, 0x8e7, 0x8ea, 0x8ed, 0x8f0, 0x8f3, 0x8f6,
- 0x8f9, 0x8fc, 0x8ff, 0x902, 0x905, 0x908, 0x90b, 0x90e,
- 0x911, 0x914, 0x917, 0x91a, 0x91d, 0x920, 0x923, 0x926,
+ 0x8f9, 0x8fc, 0x8ff, 0x902, 0x905, 0x908, 0x90b, 0x90e,
+ 0x911, 0x914, 0x917, 0x91a, 0x91d, 0x920, 0x923, 0x926,
- 0x929, 0x92c, 0x92f, 0x932, 0x935, 0x938, 0x93b, 0x93e,
- 0x941, 0x944, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x929, 0x92c, 0x92f, 0x932, 0x935, 0x938, 0x93b, 0x93e,
+ 0x941, 0x944, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x947, 0x94a, 0x94d, 0x950, 0x953, 0x956, 0x959, 0x95c,
- 0x95f, 0x962, 0x965, 0x968, 0x96b, 0x96e, 0x971, 0x974,
+ 0x947, 0x94a, 0x94d, 0x950, 0x953, 0x956, 0x959, 0x95c,
+ 0x95f, 0x962, 0x965, 0x968, 0x96b, 0x96e, 0x971, 0x974,
- 0x977, 0x97a, 0x97d, 0x980, 0x983, 0x986, 0xffff, 0xffff,
- 0x989, 0x98c, 0x98f, 0x992, 0x995, 0x998, 0xffff, 0xffff,
+ 0x977, 0x97a, 0x97d, 0x980, 0x983, 0x986, 0xffff, 0xffff,
+ 0x989, 0x98c, 0x98f, 0x992, 0x995, 0x998, 0xffff, 0xffff,
- 0x99b, 0x99e, 0x9a1, 0x9a4, 0x9a7, 0x9aa, 0x9ad, 0x9b0,
- 0x9b3, 0x9b6, 0x9b9, 0x9bc, 0x9bf, 0x9c2, 0x9c5, 0x9c8,
+ 0x99b, 0x99e, 0x9a1, 0x9a4, 0x9a7, 0x9aa, 0x9ad, 0x9b0,
+ 0x9b3, 0x9b6, 0x9b9, 0x9bc, 0x9bf, 0x9c2, 0x9c5, 0x9c8,
- 0x9cb, 0x9ce, 0x9d1, 0x9d4, 0x9d7, 0x9da, 0x9dd, 0x9e0,
- 0x9e3, 0x9e6, 0x9e9, 0x9ec, 0x9ef, 0x9f2, 0x9f5, 0x9f8,
+ 0x9cb, 0x9ce, 0x9d1, 0x9d4, 0x9d7, 0x9da, 0x9dd, 0x9e0,
+ 0x9e3, 0x9e6, 0x9e9, 0x9ec, 0x9ef, 0x9f2, 0x9f5, 0x9f8,
- 0x9fb, 0x9fe, 0xa01, 0xa04, 0xa07, 0xa0a, 0xffff, 0xffff,
- 0xa0d, 0xa10, 0xa13, 0xa16, 0xa19, 0xa1c, 0xffff, 0xffff,
+ 0x9fb, 0x9fe, 0xa01, 0xa04, 0xa07, 0xa0a, 0xffff, 0xffff,
+ 0xa0d, 0xa10, 0xa13, 0xa16, 0xa19, 0xa1c, 0xffff, 0xffff,
- 0xa1f, 0xa22, 0xa25, 0xa28, 0xa2b, 0xa2e, 0xa31, 0xa34,
- 0xffff, 0xa37, 0xffff, 0xa3a, 0xffff, 0xa3d, 0xffff, 0xa40,
+ 0xa1f, 0xa22, 0xa25, 0xa28, 0xa2b, 0xa2e, 0xa31, 0xa34,
+ 0xffff, 0xa37, 0xffff, 0xa3a, 0xffff, 0xa3d, 0xffff, 0xa40,
- 0xa43, 0xa46, 0xa49, 0xa4c, 0xa4f, 0xa52, 0xa55, 0xa58,
- 0xa5b, 0xa5e, 0xa61, 0xa64, 0xa67, 0xa6a, 0xa6d, 0xa70,
+ 0xa43, 0xa46, 0xa49, 0xa4c, 0xa4f, 0xa52, 0xa55, 0xa58,
+ 0xa5b, 0xa5e, 0xa61, 0xa64, 0xa67, 0xa6a, 0xa6d, 0xa70,
- 0xa73, 0xa76, 0xa78, 0xa7b, 0xa7d, 0xa80, 0xa82, 0xa85,
- 0xa87, 0xa8a, 0xa8c, 0xa8f, 0xa91, 0xa94, 0xffff, 0xffff,
+ 0xa73, 0xa76, 0xa78, 0xa7b, 0xa7d, 0xa80, 0xa82, 0xa85,
+ 0xa87, 0xa8a, 0xa8c, 0xa8f, 0xa91, 0xa94, 0xffff, 0xffff,
- 0xa96, 0xa99, 0xa9c, 0xa9f, 0xaa2, 0xaa5, 0xaa8, 0xaab,
- 0xaae, 0xab1, 0xab4, 0xab7, 0xaba, 0xabd, 0xac0, 0xac3,
+ 0xa96, 0xa99, 0xa9c, 0xa9f, 0xaa2, 0xaa5, 0xaa8, 0xaab,
+ 0xaae, 0xab1, 0xab4, 0xab7, 0xaba, 0xabd, 0xac0, 0xac3,
- 0xac6, 0xac9, 0xacc, 0xacf, 0xad2, 0xad5, 0xad8, 0xadb,
- 0xade, 0xae1, 0xae4, 0xae7, 0xaea, 0xaed, 0xaf0, 0xaf3,
+ 0xac6, 0xac9, 0xacc, 0xacf, 0xad2, 0xad5, 0xad8, 0xadb,
+ 0xade, 0xae1, 0xae4, 0xae7, 0xaea, 0xaed, 0xaf0, 0xaf3,
- 0xaf6, 0xaf9, 0xafc, 0xaff, 0xb02, 0xb05, 0xb08, 0xb0b,
- 0xb0e, 0xb11, 0xb14, 0xb17, 0xb1a, 0xb1d, 0xb20, 0xb23,
+ 0xaf6, 0xaf9, 0xafc, 0xaff, 0xb02, 0xb05, 0xb08, 0xb0b,
+ 0xb0e, 0xb11, 0xb14, 0xb17, 0xb1a, 0xb1d, 0xb20, 0xb23,
- 0xb26, 0xb29, 0xb2c, 0xb2f, 0xb32, 0xffff, 0xb35, 0xb38,
- 0xb3b, 0xb3e, 0xb41, 0xb44, 0xb46, 0xb49, 0xb4c, 0xb4e,
+ 0xb26, 0xb29, 0xb2c, 0xb2f, 0xb32, 0xffff, 0xb35, 0xb38,
+ 0xb3b, 0xb3e, 0xb41, 0xb44, 0xb46, 0xb49, 0xb4c, 0xb4e,
- 0xb51, 0xb54, 0xb57, 0xb5a, 0xb5d, 0xffff, 0xb60, 0xb63,
- 0xb66, 0xb69, 0xb6b, 0xb6e, 0xb70, 0xb73, 0xb76, 0xb79,
+ 0xb51, 0xb54, 0xb57, 0xb5a, 0xb5d, 0xffff, 0xb60, 0xb63,
+ 0xb66, 0xb69, 0xb6b, 0xb6e, 0xb70, 0xb73, 0xb76, 0xb79,
- 0xb7c, 0xb7f, 0xb82, 0xb85, 0xffff, 0xffff, 0xb87, 0xb8a,
- 0xb8d, 0xb90, 0xb93, 0xb96, 0xffff, 0xb98, 0xb9b, 0xb9e,
+ 0xb7c, 0xb7f, 0xb82, 0xb85, 0xffff, 0xffff, 0xb87, 0xb8a,
+ 0xb8d, 0xb90, 0xb93, 0xb96, 0xffff, 0xb98, 0xb9b, 0xb9e,
- 0xba1, 0xba4, 0xba7, 0xbaa, 0xbac, 0xbaf, 0xbb2, 0xbb5,
- 0xbb8, 0xbbb, 0xbbe, 0xbc1, 0xbc3, 0xbc6, 0xbc9, 0xbcb,
+ 0xba1, 0xba4, 0xba7, 0xbaa, 0xbac, 0xbaf, 0xbb2, 0xbb5,
+ 0xbb8, 0xbbb, 0xbbe, 0xbc1, 0xbc3, 0xbc6, 0xbc9, 0xbcb,
- 0xffff, 0xffff, 0xbcd, 0xbd0, 0xbd3, 0xffff, 0xbd6, 0xbd9,
- 0xbdc, 0xbdf, 0xbe1, 0xbe4, 0xbe6, 0xbe9, 0xbeb, 0xffff,
+ 0xffff, 0xffff, 0xbcd, 0xbd0, 0xbd3, 0xffff, 0xbd6, 0xbd9,
+ 0xbdc, 0xbdf, 0xbe1, 0xbe4, 0xbe6, 0xbe9, 0xbeb, 0xffff,
- 0xbee, 0xbf0, 0xbf2, 0xbf4, 0xbf6, 0xbf8, 0xbfa, 0xbfc,
- 0xbfe, 0xc00, 0xc02, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xbee, 0xbf0, 0xbf2, 0xbf4, 0xbf6, 0xbf8, 0xbfa, 0xbfc,
+ 0xbfe, 0xc00, 0xc02, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xc04, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc06,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xc04, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc06,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xc09, 0xc0b, 0xc0e, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc12,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xc09, 0xc0b, 0xc0e, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc12,
- 0xffff, 0xffff, 0xffff, 0xc14, 0xc17, 0xffff, 0xc1b, 0xc1e,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xc22, 0xffff, 0xc25, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xc14, 0xc17, 0xffff, 0xc1b, 0xc1e,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xc22, 0xffff, 0xc25, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc28,
- 0xc2b, 0xc2e, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc28,
+ 0xc2b, 0xc2e, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc31,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc36,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc31,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xc36,
- 0xc38, 0xc3a, 0xffff, 0xffff, 0xc3c, 0xc3e, 0xc40, 0xc42,
- 0xc44, 0xc46, 0xc48, 0xc4a, 0xc4c, 0xc4e, 0xc50, 0xc52,
+ 0xc38, 0xc3a, 0xffff, 0xffff, 0xc3c, 0xc3e, 0xc40, 0xc42,
+ 0xc44, 0xc46, 0xc48, 0xc4a, 0xc4c, 0xc4e, 0xc50, 0xc52,
- 0xc54, 0xc56, 0xc58, 0xc5a, 0xc5c, 0xc5e, 0xc60, 0xc62,
- 0xc64, 0xc66, 0xc68, 0xc6a, 0xc6c, 0xc6e, 0xc70, 0xffff,
+ 0xc54, 0xc56, 0xc58, 0xc5a, 0xc5c, 0xc5e, 0xc60, 0xc62,
+ 0xc64, 0xc66, 0xc68, 0xc6a, 0xc6c, 0xc6e, 0xc70, 0xffff,
- 0xc72, 0xc74, 0xc76, 0xc78, 0xc7a, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xc72, 0xc74, 0xc76, 0xc78, 0xc7a, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xc7c, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xc7c, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xc7f, 0xc83, 0xc87, 0xc89, 0xffff, 0xc8c, 0xc90, 0xc94,
- 0xffff, 0xc96, 0xc99, 0xc9b, 0xc9d, 0xc9f, 0xca1, 0xca3,
+ 0xc7f, 0xc83, 0xc87, 0xc89, 0xffff, 0xc8c, 0xc90, 0xc94,
+ 0xffff, 0xc96, 0xc99, 0xc9b, 0xc9d, 0xc9f, 0xca1, 0xca3,
- 0xca5, 0xca7, 0xca9, 0xcab, 0xffff, 0xcad, 0xcaf, 0xffff,
- 0xffff, 0xcb2, 0xcb4, 0xcb6, 0xcb8, 0xcba, 0xffff, 0xffff,
+ 0xca5, 0xca7, 0xca9, 0xcab, 0xffff, 0xcad, 0xcaf, 0xffff,
+ 0xffff, 0xcb2, 0xcb4, 0xcb6, 0xcb8, 0xcba, 0xffff, 0xffff,
- 0xcbc, 0xcbf, 0xcc3, 0xffff, 0xcc6, 0xffff, 0xcc8, 0xffff,
- 0xcca, 0xffff, 0xccc, 0xcce, 0xcd0, 0xcd2, 0xffff, 0xcd4,
+ 0xcbc, 0xcbf, 0xcc3, 0xffff, 0xcc6, 0xffff, 0xcc8, 0xffff,
+ 0xcca, 0xffff, 0xccc, 0xcce, 0xcd0, 0xcd2, 0xffff, 0xcd4,
- 0xcd6, 0xcd8, 0xffff, 0xcda, 0xcdc, 0xcde, 0xce0, 0xce2,
- 0xce4, 0xce6, 0xffff, 0xce8, 0xcec, 0xcee, 0xcf0, 0xcf2,
+ 0xcd6, 0xcd8, 0xffff, 0xcda, 0xcdc, 0xcde, 0xce0, 0xce2,
+ 0xce4, 0xce6, 0xffff, 0xce8, 0xcec, 0xcee, 0xcf0, 0xcf2,
- 0xcf4, 0xffff, 0xffff, 0xffff, 0xffff, 0xcf6, 0xcf8, 0xcfa,
- 0xcfc, 0xcfe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xcf4, 0xffff, 0xffff, 0xffff, 0xffff, 0xcf6, 0xcf8, 0xcfa,
+ 0xcfc, 0xcfe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xd00, 0xd04, 0xd08, 0xd0c, 0xd10,
- 0xd14, 0xd18, 0xd1c, 0xd20, 0xd24, 0xd28, 0xd2c, 0xd30,
+ 0xffff, 0xffff, 0xffff, 0xd00, 0xd04, 0xd08, 0xd0c, 0xd10,
+ 0xd14, 0xd18, 0xd1c, 0xd20, 0xd24, 0xd28, 0xd2c, 0xd30,
- 0xd33, 0xd35, 0xd38, 0xd3c, 0xd3f, 0xd41, 0xd44, 0xd48,
- 0xd4d, 0xd50, 0xd52, 0xd55, 0xd59, 0xd5b, 0xd5d, 0xd5f,
+ 0xd33, 0xd35, 0xd38, 0xd3c, 0xd3f, 0xd41, 0xd44, 0xd48,
+ 0xd4d, 0xd50, 0xd52, 0xd55, 0xd59, 0xd5b, 0xd5d, 0xd5f,
- 0xd61, 0xd63, 0xd66, 0xd6a, 0xd6d, 0xd6f, 0xd72, 0xd76,
- 0xd7b, 0xd7e, 0xd80, 0xd83, 0xd87, 0xd89, 0xd8b, 0xd8d,
+ 0xd61, 0xd63, 0xd66, 0xd6a, 0xd6d, 0xd6f, 0xd72, 0xd76,
+ 0xd7b, 0xd7e, 0xd80, 0xd83, 0xd87, 0xd89, 0xd8b, 0xd8d,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xd8f, 0xd92, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xd8f, 0xd92, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xd95, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xd95, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xd98, 0xd9b, 0xd9e,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xd98, 0xd9b, 0xd9e,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xda1, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xda4, 0xffff, 0xffff, 0xda7, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xda1, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xda4, 0xffff, 0xffff, 0xda7, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xdaa, 0xffff, 0xdad, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xdb0, 0xdb3, 0xffff, 0xdb7,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xdaa, 0xffff, 0xdad, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xdb0, 0xdb3, 0xffff, 0xdb7,
- 0xdba, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xdba, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xdbe, 0xffff, 0xffff, 0xdc1, 0xffff, 0xffff, 0xdc4,
- 0xffff, 0xdc7, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xdbe, 0xffff, 0xffff, 0xdc1, 0xffff, 0xffff, 0xdc4,
+ 0xffff, 0xdc7, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xdca, 0xffff, 0xdcd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xdd0, 0xdd3, 0xdd6,
+ 0xdca, 0xffff, 0xdcd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xdd0, 0xdd3, 0xdd6,
- 0xdd9, 0xddc, 0xffff, 0xffff, 0xddf, 0xde2, 0xffff, 0xffff,
- 0xde5, 0xde8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xdd9, 0xddc, 0xffff, 0xffff, 0xddf, 0xde2, 0xffff, 0xffff,
+ 0xde5, 0xde8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xdeb, 0xdee, 0xffff, 0xffff, 0xdf1, 0xdf4, 0xffff, 0xffff,
- 0xdf7, 0xdfa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xdeb, 0xdee, 0xffff, 0xffff, 0xdf1, 0xdf4, 0xffff, 0xffff,
+ 0xdf7, 0xdfa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xdfd, 0xe00, 0xe03, 0xe06,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xdfd, 0xe00, 0xe03, 0xe06,
- 0xe09, 0xe0c, 0xe0f, 0xe12, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xe15, 0xe18, 0xe1b, 0xe1e, 0xffff, 0xffff,
+ 0xe09, 0xe0c, 0xe0f, 0xe12, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xe15, 0xe18, 0xe1b, 0xe1e, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xe21, 0xe23, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xe21, 0xe23, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xe25, 0xe27, 0xe29, 0xe2b, 0xe2d, 0xe2f, 0xe31, 0xe33,
- 0xe35, 0xe37, 0xe3a, 0xe3d, 0xe40, 0xe43, 0xe46, 0xe49,
+ 0xe25, 0xe27, 0xe29, 0xe2b, 0xe2d, 0xe2f, 0xe31, 0xe33,
+ 0xe35, 0xe37, 0xe3a, 0xe3d, 0xe40, 0xe43, 0xe46, 0xe49,
- 0xe4c, 0xe4f, 0xe52, 0xe55, 0xe58, 0xe5c, 0xe60, 0xe64,
- 0xe68, 0xe6c, 0xe70, 0xe74, 0xe78, 0xe7c, 0xe81, 0xe86,
+ 0xe4c, 0xe4f, 0xe52, 0xe55, 0xe58, 0xe5c, 0xe60, 0xe64,
+ 0xe68, 0xe6c, 0xe70, 0xe74, 0xe78, 0xe7c, 0xe81, 0xe86,
- 0xe8b, 0xe90, 0xe95, 0xe9a, 0xe9f, 0xea4, 0xea9, 0xeae,
- 0xeb3, 0xeb6, 0xeb9, 0xebc, 0xebf, 0xec2, 0xec5, 0xec8,
+ 0xe8b, 0xe90, 0xe95, 0xe9a, 0xe9f, 0xea4, 0xea9, 0xeae,
+ 0xeb3, 0xeb6, 0xeb9, 0xebc, 0xebf, 0xec2, 0xec5, 0xec8,
- 0xecb, 0xece, 0xed2, 0xed6, 0xeda, 0xede, 0xee2, 0xee6,
- 0xeea, 0xeee, 0xef2, 0xef6, 0xefa, 0xefe, 0xf02, 0xf06,
+ 0xecb, 0xece, 0xed2, 0xed6, 0xeda, 0xede, 0xee2, 0xee6,
+ 0xeea, 0xeee, 0xef2, 0xef6, 0xefa, 0xefe, 0xf02, 0xf06,
- 0xf0a, 0xf0e, 0xf12, 0xf16, 0xf1a, 0xf1e, 0xf22, 0xf26,
- 0xf2a, 0xf2e, 0xf32, 0xf36, 0xf3a, 0xf3e, 0xf42, 0xf46,
+ 0xf0a, 0xf0e, 0xf12, 0xf16, 0xf1a, 0xf1e, 0xf22, 0xf26,
+ 0xf2a, 0xf2e, 0xf32, 0xf36, 0xf3a, 0xf3e, 0xf42, 0xf46,
- 0xf4a, 0xf4e, 0xf52, 0xf56, 0xf5a, 0xf5e, 0xf62, 0xf64,
- 0xf66, 0xf68, 0xf6a, 0xf6c, 0xf6e, 0xf70, 0xf72, 0xf74,
+ 0xf4a, 0xf4e, 0xf52, 0xf56, 0xf5a, 0xf5e, 0xf62, 0xf64,
+ 0xf66, 0xf68, 0xf6a, 0xf6c, 0xf6e, 0xf70, 0xf72, 0xf74,
- 0xf76, 0xf78, 0xf7a, 0xf7c, 0xf7e, 0xf80, 0xf82, 0xf84,
- 0xf86, 0xf88, 0xf8a, 0xf8c, 0xf8e, 0xf90, 0xf92, 0xf94,
+ 0xf76, 0xf78, 0xf7a, 0xf7c, 0xf7e, 0xf80, 0xf82, 0xf84,
+ 0xf86, 0xf88, 0xf8a, 0xf8c, 0xf8e, 0xf90, 0xf92, 0xf94,
- 0xf96, 0xf98, 0xf9a, 0xf9c, 0xf9e, 0xfa0, 0xfa2, 0xfa4,
- 0xfa6, 0xfa8, 0xfaa, 0xfac, 0xfae, 0xfb0, 0xfb2, 0xfb4,
+ 0xf96, 0xf98, 0xf9a, 0xf9c, 0xf9e, 0xfa0, 0xfa2, 0xfa4,
+ 0xfa6, 0xfa8, 0xfaa, 0xfac, 0xfae, 0xfb0, 0xfb2, 0xfb4,
- 0xfb6, 0xfb8, 0xfba, 0xfbc, 0xfbe, 0xfc0, 0xfc2, 0xfc4,
- 0xfc6, 0xfc8, 0xfca, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xfb6, 0xfb8, 0xfba, 0xfbc, 0xfbe, 0xfc0, 0xfc2, 0xfc4,
+ 0xfc6, 0xfc8, 0xfca, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xfcc, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xfcc, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xfd1, 0xfd5, 0xfd8, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xfd1, 0xfd5, 0xfd8, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xfdc, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xfdc, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfdf,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfdf,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe1,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe1,
- 0xffff, 0xffff, 0xffff, 0xfe3, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xfe3, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xfe5, 0xfe7, 0xfe9, 0xfeb, 0xfed, 0xfef, 0xff1, 0xff3,
- 0xff5, 0xff7, 0xff9, 0xffb, 0xffd, 0xfff, 0x1001, 0x1003,
+ 0xfe5, 0xfe7, 0xfe9, 0xfeb, 0xfed, 0xfef, 0xff1, 0xff3,
+ 0xff5, 0xff7, 0xff9, 0xffb, 0xffd, 0xfff, 0x1001, 0x1003,
- 0x1005, 0x1007, 0x1009, 0x100b, 0x100d, 0x100f, 0x1011, 0x1013,
- 0x1015, 0x1017, 0x1019, 0x101b, 0x101d, 0x101f, 0x1021, 0x1023,
+ 0x1005, 0x1007, 0x1009, 0x100b, 0x100d, 0x100f, 0x1011, 0x1013,
+ 0x1015, 0x1017, 0x1019, 0x101b, 0x101d, 0x101f, 0x1021, 0x1023,
- 0x1025, 0x1027, 0x1029, 0x102b, 0x102d, 0x102f, 0x1031, 0x1033,
- 0x1035, 0x1037, 0x1039, 0x103b, 0x103d, 0x103f, 0x1041, 0x1043,
+ 0x1025, 0x1027, 0x1029, 0x102b, 0x102d, 0x102f, 0x1031, 0x1033,
+ 0x1035, 0x1037, 0x1039, 0x103b, 0x103d, 0x103f, 0x1041, 0x1043,
- 0x1045, 0x1047, 0x1049, 0x104b, 0x104d, 0x104f, 0x1051, 0x1053,
- 0x1055, 0x1057, 0x1059, 0x105b, 0x105d, 0x105f, 0x1061, 0x1063,
+ 0x1045, 0x1047, 0x1049, 0x104b, 0x104d, 0x104f, 0x1051, 0x1053,
+ 0x1055, 0x1057, 0x1059, 0x105b, 0x105d, 0x105f, 0x1061, 0x1063,
- 0x1065, 0x1067, 0x1069, 0x106b, 0x106d, 0x106f, 0x1071, 0x1073,
- 0x1075, 0x1077, 0x1079, 0x107b, 0x107d, 0x107f, 0x1081, 0x1083,
+ 0x1065, 0x1067, 0x1069, 0x106b, 0x106d, 0x106f, 0x1071, 0x1073,
+ 0x1075, 0x1077, 0x1079, 0x107b, 0x107d, 0x107f, 0x1081, 0x1083,
- 0x1085, 0x1087, 0x1089, 0x108b, 0x108d, 0x108f, 0x1091, 0x1093,
- 0x1095, 0x1097, 0x1099, 0x109b, 0x109d, 0x109f, 0x10a1, 0x10a3,
+ 0x1085, 0x1087, 0x1089, 0x108b, 0x108d, 0x108f, 0x1091, 0x1093,
+ 0x1095, 0x1097, 0x1099, 0x109b, 0x109d, 0x109f, 0x10a1, 0x10a3,
- 0x10a5, 0x10a7, 0x10a9, 0x10ab, 0x10ad, 0x10af, 0x10b1, 0x10b3,
- 0x10b5, 0x10b7, 0x10b9, 0x10bb, 0x10bd, 0x10bf, 0x10c1, 0x10c3,
+ 0x10a5, 0x10a7, 0x10a9, 0x10ab, 0x10ad, 0x10af, 0x10b1, 0x10b3,
+ 0x10b5, 0x10b7, 0x10b9, 0x10bb, 0x10bd, 0x10bf, 0x10c1, 0x10c3,
- 0x10c5, 0x10c7, 0x10c9, 0x10cb, 0x10cd, 0x10cf, 0x10d1, 0x10d3,
- 0x10d5, 0x10d7, 0x10d9, 0x10db, 0x10dd, 0x10df, 0x10e1, 0x10e3,
+ 0x10c5, 0x10c7, 0x10c9, 0x10cb, 0x10cd, 0x10cf, 0x10d1, 0x10d3,
+ 0x10d5, 0x10d7, 0x10d9, 0x10db, 0x10dd, 0x10df, 0x10e1, 0x10e3,
- 0x10e5, 0x10e7, 0x10e9, 0x10eb, 0x10ed, 0x10ef, 0x10f1, 0x10f3,
- 0x10f5, 0x10f7, 0x10f9, 0x10fb, 0x10fd, 0x10ff, 0x1101, 0x1103,
+ 0x10e5, 0x10e7, 0x10e9, 0x10eb, 0x10ed, 0x10ef, 0x10f1, 0x10f3,
+ 0x10f5, 0x10f7, 0x10f9, 0x10fb, 0x10fd, 0x10ff, 0x1101, 0x1103,
- 0x1105, 0x1107, 0x1109, 0x110b, 0x110d, 0x110f, 0x1111, 0x1113,
- 0x1115, 0x1117, 0x1119, 0x111b, 0x111d, 0x111f, 0x1121, 0x1123,
+ 0x1105, 0x1107, 0x1109, 0x110b, 0x110d, 0x110f, 0x1111, 0x1113,
+ 0x1115, 0x1117, 0x1119, 0x111b, 0x111d, 0x111f, 0x1121, 0x1123,
- 0x1125, 0x1127, 0x1129, 0x112b, 0x112d, 0x112f, 0x1131, 0x1133,
- 0x1135, 0x1137, 0x1139, 0x113b, 0x113d, 0x113f, 0x1141, 0x1143,
+ 0x1125, 0x1127, 0x1129, 0x112b, 0x112d, 0x112f, 0x1131, 0x1133,
+ 0x1135, 0x1137, 0x1139, 0x113b, 0x113d, 0x113f, 0x1141, 0x1143,
- 0x1145, 0x1147, 0x1149, 0x114b, 0x114d, 0x114f, 0x1151, 0x1153,
- 0x1155, 0x1157, 0x1159, 0x115b, 0x115d, 0x115f, 0x1161, 0x1163,
+ 0x1145, 0x1147, 0x1149, 0x114b, 0x114d, 0x114f, 0x1151, 0x1153,
+ 0x1155, 0x1157, 0x1159, 0x115b, 0x115d, 0x115f, 0x1161, 0x1163,
- 0x1165, 0x1167, 0x1169, 0x116b, 0x116d, 0x116f, 0x1171, 0x1173,
- 0x1175, 0x1177, 0x1179, 0x117b, 0x117d, 0x117f, 0x1181, 0x1183,
+ 0x1165, 0x1167, 0x1169, 0x116b, 0x116d, 0x116f, 0x1171, 0x1173,
+ 0x1175, 0x1177, 0x1179, 0x117b, 0x117d, 0x117f, 0x1181, 0x1183,
- 0x1185, 0x1187, 0x1189, 0x118b, 0x118d, 0x118f, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x1185, 0x1187, 0x1189, 0x118b, 0x118d, 0x118f, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x1191, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x1191, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1193, 0xffff,
- 0x1195, 0x1197, 0x1199, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1193, 0xffff,
+ 0x1195, 0x1197, 0x1199, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x119b, 0xffff, 0x119e, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x119b, 0xffff, 0x119e, 0xffff,
- 0x11a1, 0xffff, 0x11a4, 0xffff, 0x11a7, 0xffff, 0x11aa, 0xffff,
- 0x11ad, 0xffff, 0x11b0, 0xffff, 0x11b3, 0xffff, 0x11b6, 0xffff,
+ 0x11a1, 0xffff, 0x11a4, 0xffff, 0x11a7, 0xffff, 0x11aa, 0xffff,
+ 0x11ad, 0xffff, 0x11b0, 0xffff, 0x11b3, 0xffff, 0x11b6, 0xffff,
- 0x11b9, 0xffff, 0x11bc, 0xffff, 0xffff, 0x11bf, 0xffff, 0x11c2,
- 0xffff, 0x11c5, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x11b9, 0xffff, 0x11bc, 0xffff, 0xffff, 0x11bf, 0xffff, 0x11c2,
+ 0xffff, 0x11c5, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x11c8, 0x11cb, 0xffff, 0x11ce, 0x11d1, 0xffff, 0x11d4, 0x11d7,
- 0xffff, 0x11da, 0x11dd, 0xffff, 0x11e0, 0x11e3, 0xffff, 0xffff,
+ 0x11c8, 0x11cb, 0xffff, 0x11ce, 0x11d1, 0xffff, 0x11d4, 0x11d7,
+ 0xffff, 0x11da, 0x11dd, 0xffff, 0x11e0, 0x11e3, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x11e6, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x11e9, 0x11ec, 0xffff, 0x11ef, 0x11f2,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x11e6, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x11e9, 0x11ec, 0xffff, 0x11ef, 0x11f2,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x11f5, 0xffff, 0x11f8, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x11f5, 0xffff, 0x11f8, 0xffff,
- 0x11fb, 0xffff, 0x11fe, 0xffff, 0x1201, 0xffff, 0x1204, 0xffff,
- 0x1207, 0xffff, 0x120a, 0xffff, 0x120d, 0xffff, 0x1210, 0xffff,
+ 0x11fb, 0xffff, 0x11fe, 0xffff, 0x1201, 0xffff, 0x1204, 0xffff,
+ 0x1207, 0xffff, 0x120a, 0xffff, 0x120d, 0xffff, 0x1210, 0xffff,
- 0x1213, 0xffff, 0x1216, 0xffff, 0xffff, 0x1219, 0xffff, 0x121c,
- 0xffff, 0x121f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x1213, 0xffff, 0x1216, 0xffff, 0xffff, 0x1219, 0xffff, 0x121c,
+ 0xffff, 0x121f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x1222, 0x1225, 0xffff, 0x1228, 0x122b, 0xffff, 0x122e, 0x1231,
- 0xffff, 0x1234, 0x1237, 0xffff, 0x123a, 0x123d, 0xffff, 0xffff,
+ 0x1222, 0x1225, 0xffff, 0x1228, 0x122b, 0xffff, 0x122e, 0x1231,
+ 0xffff, 0x1234, 0x1237, 0xffff, 0x123a, 0x123d, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x1240, 0xffff, 0xffff, 0x1243,
- 0x1246, 0x1249, 0x124c, 0xffff, 0xffff, 0xffff, 0x124f, 0x1252,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x1240, 0xffff, 0xffff, 0x1243,
+ 0x1246, 0x1249, 0x124c, 0xffff, 0xffff, 0xffff, 0x124f, 0x1252,
- 0xffff, 0x1255, 0x1257, 0x1259, 0x125b, 0x125d, 0x125f, 0x1261,
- 0x1263, 0x1265, 0x1267, 0x1269, 0x126b, 0x126d, 0x126f, 0x1271,
+ 0xffff, 0x1255, 0x1257, 0x1259, 0x125b, 0x125d, 0x125f, 0x1261,
+ 0x1263, 0x1265, 0x1267, 0x1269, 0x126b, 0x126d, 0x126f, 0x1271,
- 0x1273, 0x1275, 0x1277, 0x1279, 0x127b, 0x127d, 0x127f, 0x1281,
- 0x1283, 0x1285, 0x1287, 0x1289, 0x128b, 0x128d, 0x128f, 0x1291,
+ 0x1273, 0x1275, 0x1277, 0x1279, 0x127b, 0x127d, 0x127f, 0x1281,
+ 0x1283, 0x1285, 0x1287, 0x1289, 0x128b, 0x128d, 0x128f, 0x1291,
- 0x1293, 0x1295, 0x1297, 0x1299, 0x129b, 0x129d, 0x129f, 0x12a1,
- 0x12a3, 0x12a5, 0x12a7, 0x12a9, 0x12ab, 0x12ad, 0x12af, 0x12b1,
+ 0x1293, 0x1295, 0x1297, 0x1299, 0x129b, 0x129d, 0x129f, 0x12a1,
+ 0x12a3, 0x12a5, 0x12a7, 0x12a9, 0x12ab, 0x12ad, 0x12af, 0x12b1,
- 0x12b3, 0x12b5, 0x12b7, 0x12b9, 0x12bb, 0x12bd, 0x12bf, 0x12c1,
- 0x12c3, 0x12c5, 0x12c7, 0x12c9, 0x12cb, 0x12cd, 0x12cf, 0x12d1,
+ 0x12b3, 0x12b5, 0x12b7, 0x12b9, 0x12bb, 0x12bd, 0x12bf, 0x12c1,
+ 0x12c3, 0x12c5, 0x12c7, 0x12c9, 0x12cb, 0x12cd, 0x12cf, 0x12d1,
- 0x12d3, 0x12d5, 0x12d7, 0x12d9, 0x12db, 0x12dd, 0x12df, 0x12e1,
- 0x12e3, 0x12e5, 0x12e7, 0x12e9, 0x12eb, 0x12ed, 0x12ef, 0x12f1,
+ 0x12d3, 0x12d5, 0x12d7, 0x12d9, 0x12db, 0x12dd, 0x12df, 0x12e1,
+ 0x12e3, 0x12e5, 0x12e7, 0x12e9, 0x12eb, 0x12ed, 0x12ef, 0x12f1,
- 0x12f3, 0x12f5, 0x12f7, 0x12f9, 0x12fb, 0x12fd, 0x12ff, 0x1301,
- 0x1303, 0x1305, 0x1307, 0x1309, 0x130b, 0x130d, 0x130f, 0xffff,
+ 0x12f3, 0x12f5, 0x12f7, 0x12f9, 0x12fb, 0x12fd, 0x12ff, 0x1301,
+ 0x1303, 0x1305, 0x1307, 0x1309, 0x130b, 0x130d, 0x130f, 0xffff,
- 0xffff, 0xffff, 0x1311, 0x1313, 0x1315, 0x1317, 0x1319, 0x131b,
- 0x131d, 0x131f, 0x1321, 0x1323, 0x1325, 0x1327, 0x1329, 0x132b,
+ 0xffff, 0xffff, 0x1311, 0x1313, 0x1315, 0x1317, 0x1319, 0x131b,
+ 0x131d, 0x131f, 0x1321, 0x1323, 0x1325, 0x1327, 0x1329, 0x132b,
- 0x132d, 0x1331, 0x1335, 0x1339, 0x133d, 0x1341, 0x1345, 0x1349,
- 0x134d, 0x1351, 0x1355, 0x1359, 0x135d, 0x1361, 0x1365, 0x136a,
+ 0x132d, 0x1331, 0x1335, 0x1339, 0x133d, 0x1341, 0x1345, 0x1349,
+ 0x134d, 0x1351, 0x1355, 0x1359, 0x135d, 0x1361, 0x1365, 0x136a,
- 0x136f, 0x1374, 0x1379, 0x137e, 0x1383, 0x1388, 0x138d, 0x1392,
- 0x1397, 0x139c, 0x13a1, 0x13a6, 0x13ab, 0x13b0, 0x13b8, 0xffff,
+ 0x136f, 0x1374, 0x1379, 0x137e, 0x1383, 0x1388, 0x138d, 0x1392,
+ 0x1397, 0x139c, 0x13a1, 0x13a6, 0x13ab, 0x13b0, 0x13b8, 0xffff,
- 0x13bf, 0x13c3, 0x13c7, 0x13cb, 0x13cf, 0x13d3, 0x13d7, 0x13db,
- 0x13df, 0x13e3, 0x13e7, 0x13eb, 0x13ef, 0x13f3, 0x13f7, 0x13fb,
+ 0x13bf, 0x13c3, 0x13c7, 0x13cb, 0x13cf, 0x13d3, 0x13d7, 0x13db,
+ 0x13df, 0x13e3, 0x13e7, 0x13eb, 0x13ef, 0x13f3, 0x13f7, 0x13fb,
- 0x13ff, 0x1403, 0x1407, 0x140b, 0x140f, 0x1413, 0x1417, 0x141b,
- 0x141f, 0x1423, 0x1427, 0x142b, 0x142f, 0x1433, 0x1437, 0x143b,
+ 0x13ff, 0x1403, 0x1407, 0x140b, 0x140f, 0x1413, 0x1417, 0x141b,
+ 0x141f, 0x1423, 0x1427, 0x142b, 0x142f, 0x1433, 0x1437, 0x143b,
- 0x143f, 0x1443, 0x1447, 0x144b, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x143f, 0x1443, 0x1447, 0x144b, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x144f, 0x1453, 0x1456, 0x1459, 0x145c, 0x145f, 0x1462, 0x1465,
- 0x1468, 0x146b, 0x146e, 0x1471, 0x1474, 0x1477, 0x147a, 0x147d,
+ 0x144f, 0x1453, 0x1456, 0x1459, 0x145c, 0x145f, 0x1462, 0x1465,
+ 0x1468, 0x146b, 0x146e, 0x1471, 0x1474, 0x1477, 0x147a, 0x147d,
- 0x1480, 0x1482, 0x1484, 0x1486, 0x1488, 0x148a, 0x148c, 0x148e,
- 0x1490, 0x1492, 0x1494, 0x1496, 0x1498, 0x149a, 0x149c, 0x149f,
+ 0x1480, 0x1482, 0x1484, 0x1486, 0x1488, 0x148a, 0x148c, 0x148e,
+ 0x1490, 0x1492, 0x1494, 0x1496, 0x1498, 0x149a, 0x149c, 0x149f,
- 0x14a2, 0x14a5, 0x14a8, 0x14ab, 0x14ae, 0x14b1, 0x14b4, 0x14b7,
- 0x14ba, 0x14bd, 0x14c0, 0x14c3, 0x14c6, 0x14cc, 0x14d1, 0xffff,
+ 0x14a2, 0x14a5, 0x14a8, 0x14ab, 0x14ae, 0x14b1, 0x14b4, 0x14b7,
+ 0x14ba, 0x14bd, 0x14c0, 0x14c3, 0x14c6, 0x14cc, 0x14d1, 0xffff,
- 0x14d4, 0x14d6, 0x14d8, 0x14da, 0x14dc, 0x14de, 0x14e0, 0x14e2,
- 0x14e4, 0x14e6, 0x14e8, 0x14ea, 0x14ec, 0x14ee, 0x14f0, 0x14f2,
+ 0x14d4, 0x14d6, 0x14d8, 0x14da, 0x14dc, 0x14de, 0x14e0, 0x14e2,
+ 0x14e4, 0x14e6, 0x14e8, 0x14ea, 0x14ec, 0x14ee, 0x14f0, 0x14f2,
- 0x14f4, 0x14f6, 0x14f8, 0x14fa, 0x14fc, 0x14fe, 0x1500, 0x1502,
- 0x1504, 0x1506, 0x1508, 0x150a, 0x150c, 0x150e, 0x1510, 0x1512,
+ 0x14f4, 0x14f6, 0x14f8, 0x14fa, 0x14fc, 0x14fe, 0x1500, 0x1502,
+ 0x1504, 0x1506, 0x1508, 0x150a, 0x150c, 0x150e, 0x1510, 0x1512,
- 0x1514, 0x1516, 0x1518, 0x151a, 0x151c, 0x151e, 0x1520, 0x1522,
- 0x1524, 0x1526, 0x1528, 0x152a, 0x152c, 0x152e, 0x1530, 0x1532,
+ 0x1514, 0x1516, 0x1518, 0x151a, 0x151c, 0x151e, 0x1520, 0x1522,
+ 0x1524, 0x1526, 0x1528, 0x152a, 0x152c, 0x152e, 0x1530, 0x1532,
- 0x1534, 0x1536, 0x1539, 0x153c, 0x153f, 0x1542, 0x1545, 0x1548,
- 0x154b, 0x154e, 0x1551, 0x1554, 0x1557, 0x155a, 0x155d, 0x1560,
+ 0x1534, 0x1536, 0x1539, 0x153c, 0x153f, 0x1542, 0x1545, 0x1548,
+ 0x154b, 0x154e, 0x1551, 0x1554, 0x1557, 0x155a, 0x155d, 0x1560,
- 0x1563, 0x1566, 0x1569, 0x156c, 0x156f, 0x1572, 0x1575, 0x1578,
- 0x157b, 0x157e, 0x1582, 0x1586, 0x158a, 0x158d, 0x1591, 0x1594,
+ 0x1563, 0x1566, 0x1569, 0x156c, 0x156f, 0x1572, 0x1575, 0x1578,
+ 0x157b, 0x157e, 0x1582, 0x1586, 0x158a, 0x158d, 0x1591, 0x1594,
- 0x1598, 0x159a, 0x159c, 0x159e, 0x15a0, 0x15a2, 0x15a4, 0x15a6,
- 0x15a8, 0x15aa, 0x15ac, 0x15ae, 0x15b0, 0x15b2, 0x15b4, 0x15b6,
+ 0x1598, 0x159a, 0x159c, 0x159e, 0x15a0, 0x15a2, 0x15a4, 0x15a6,
+ 0x15a8, 0x15aa, 0x15ac, 0x15ae, 0x15b0, 0x15b2, 0x15b4, 0x15b6,
- 0x15b8, 0x15ba, 0x15bc, 0x15be, 0x15c0, 0x15c2, 0x15c4, 0x15c6,
- 0x15c8, 0x15ca, 0x15cc, 0x15ce, 0x15d0, 0x15d2, 0x15d4, 0x15d6,
+ 0x15b8, 0x15ba, 0x15bc, 0x15be, 0x15c0, 0x15c2, 0x15c4, 0x15c6,
+ 0x15c8, 0x15ca, 0x15cc, 0x15ce, 0x15d0, 0x15d2, 0x15d4, 0x15d6,
- 0x15d8, 0x15da, 0x15dc, 0x15de, 0x15e0, 0x15e2, 0x15e4, 0x15e6,
- 0x15e8, 0x15ea, 0x15ec, 0x15ee, 0x15f0, 0x15f2, 0x15f4, 0xffff,
+ 0x15d8, 0x15da, 0x15dc, 0x15de, 0x15e0, 0x15e2, 0x15e4, 0x15e6,
+ 0x15e8, 0x15ea, 0x15ec, 0x15ee, 0x15f0, 0x15f2, 0x15f4, 0xffff,
- 0x15f6, 0x15fb, 0x1600, 0x1605, 0x1609, 0x160e, 0x1612, 0x1616,
- 0x161c, 0x1621, 0x1625, 0x1629, 0x162d, 0x1632, 0x1637, 0x163b,
+ 0x15f6, 0x15fb, 0x1600, 0x1605, 0x1609, 0x160e, 0x1612, 0x1616,
+ 0x161c, 0x1621, 0x1625, 0x1629, 0x162d, 0x1632, 0x1637, 0x163b,
- 0x163f, 0x1642, 0x1646, 0x164b, 0x1650, 0x1653, 0x1659, 0x1660,
- 0x1666, 0x166a, 0x1670, 0x1676, 0x167b, 0x167f, 0x1683, 0x1687,
-
- 0x168c, 0x1692, 0x1697, 0x169b, 0x169f, 0x16a3, 0x16a6, 0x16a9,
- 0x16ac, 0x16af, 0x16b3, 0x16b7, 0x16bd, 0x16c1, 0x16c6, 0x16cc,
-
- 0x16d0, 0x16d3, 0x16d6, 0x16dc, 0x16e1, 0x16e7, 0x16eb, 0x16f1,
- 0x16f4, 0x16f8, 0x16fc, 0x1700, 0x1704, 0x1708, 0x170d, 0x1711,
-
- 0x1714, 0x1718, 0x171c, 0x1720, 0x1725, 0x1729, 0x172d, 0x1731,
- 0x1737, 0x173c, 0x173f, 0x1745, 0x1748, 0x174d, 0x1752, 0x1756,
-
- 0x175a, 0x175e, 0x1763, 0x1766, 0x176a, 0x176f, 0x1772, 0x1778,
- 0x177c, 0x177f, 0x1782, 0x1785, 0x1788, 0x178b, 0x178e, 0x1791,
-
- 0x1794, 0x1797, 0x179a, 0x179e, 0x17a2, 0x17a6, 0x17aa, 0x17ae,
- 0x17b2, 0x17b6, 0x17ba, 0x17be, 0x17c2, 0x17c6, 0x17ca, 0x17ce,
-
- 0x17d2, 0x17d6, 0x17da, 0x17dd, 0x17e0, 0x17e4, 0x17e7, 0x17ea,
- 0x17ed, 0x17f1, 0x17f5, 0x17f8, 0x17fb, 0x17fe, 0x1801, 0x1804,
-
- 0x1809, 0x180c, 0x180f, 0x1812, 0x1815, 0x1818, 0x181b, 0x181e,
- 0x1821, 0x1825, 0x182a, 0x182d, 0x1830, 0x1833, 0x1836, 0x1839,
-
- 0x183c, 0x183f, 0x1843, 0x1847, 0x184b, 0x184f, 0x1852, 0x1855,
- 0x1858, 0x185b, 0x185e, 0x1861, 0x1864, 0x1867, 0x186a, 0x186d,
-
- 0x1871, 0x1875, 0x1878, 0x187c, 0x1880, 0x1884, 0x1887, 0x188b,
- 0x188f, 0x1894, 0x1897, 0x189b, 0x189f, 0x18a3, 0x18a7, 0x18ad,
-
- 0x18b4, 0x18b7, 0x18ba, 0x18bd, 0x18c0, 0x18c3, 0x18c6, 0x18c9,
- 0x18cc, 0x18cf, 0x18d2, 0x18d5, 0x18d8, 0x18db, 0x18de, 0x18e1,
-
- 0x18e4, 0x18e7, 0x18ea, 0x18ef, 0x18f2, 0x18f5, 0x18f8, 0x18fd,
- 0x1901, 0x1904, 0x1907, 0x190a, 0x190d, 0x1910, 0x1913, 0x1916,
-
- 0x1919, 0x191c, 0x191f, 0x1923, 0x1926, 0x1929, 0x192d, 0x1931,
- 0x1934, 0x1939, 0x193d, 0x1940, 0x1943, 0x1946, 0x1949, 0x194d,
-
- 0x1951, 0x1954, 0x1957, 0x195a, 0x195d, 0x1960, 0x1963, 0x1966,
- 0x1969, 0x196c, 0x1970, 0x1974, 0x1978, 0x197c, 0x1980, 0x1984,
-
- 0x1988, 0x198c, 0x1990, 0x1994, 0x1998, 0x199c, 0x19a0, 0x19a4,
- 0x19a8, 0x19ac, 0x19b0, 0x19b4, 0x19b8, 0x19bc, 0x19c0, 0x19c4,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0x19c8, 0x19ca, 0x19cc, 0x19ce, 0x19d0, 0x19d2, 0x19d4, 0x19d6,
- 0x19d8, 0x19da, 0x19dc, 0x19de, 0x19e0, 0x19e2, 0x19e4, 0x19e6,
- 0x19e8, 0x19ea, 0x19ec, 0x19ee, 0x19f0, 0x19f2, 0x19f4, 0x19f6,
- 0x19f8, 0x19fa, 0x19fc, 0x19fe, 0x1a00, 0x1a02, 0x1a04, 0x1a06,
- 0x1a08, 0x1a0a, 0x1a0c, 0x1a0e, 0x1a10, 0x1a12, 0x1a14, 0x1a16,
- 0x1a18, 0x1a1a, 0x1a1c, 0x1a1e, 0x1a20, 0x1a22, 0x1a24, 0x1a26,
- 0x1a28, 0x1a2a, 0x1a2c, 0x1a2e, 0x1a30, 0x1a32, 0x1a34, 0x1a36,
- 0x1a38, 0x1a3a, 0x1a3c, 0x1a3e, 0x1a40, 0x1a42, 0x1a44, 0x1a46,
- 0x1a48, 0x1a4a, 0x1a4c, 0x1a4e, 0x1a50, 0x1a52, 0x1a54, 0x1a56,
- 0x1a58, 0x1a5a, 0x1a5c, 0x1a5e, 0x1a60, 0x1a62, 0x1a64, 0x1a66,
- 0x1a68, 0x1a6a, 0x1a6c, 0x1a6e, 0x1a70, 0x1a72, 0x1a74, 0x1a76,
- 0x1a78, 0x1a7a, 0x1a7c, 0x1a7e, 0x1a80, 0x1a82, 0x1a84, 0x1a86,
- 0x1a88, 0x1a8a, 0x1a8c, 0x1a8e, 0x1a90, 0x1a92, 0x1a94, 0x1a96,
- 0x1a98, 0x1a9a, 0x1a9c, 0x1a9e, 0x1aa0, 0x1aa2, 0x1aa4, 0x1aa6,
- 0x1aa8, 0x1aaa, 0x1aac, 0x1aae, 0x1ab0, 0x1ab2, 0x1ab4, 0x1ab6,
- 0x1ab8, 0x1aba, 0x1abc, 0x1abe, 0x1ac0, 0x1ac2, 0x1ac4, 0x1ac6,
- 0x1ac8, 0x1aca, 0x1acc, 0x1ace, 0x1ad0, 0x1ad2, 0x1ad4, 0x1ad6,
- 0x1ad8, 0x1ada, 0x1adc, 0x1ade, 0x1ae0, 0x1ae2, 0x1ae4, 0x1ae6,
- 0x1ae8, 0x1aea, 0x1aec, 0x1aee, 0x1af0, 0x1af2, 0x1af4, 0x1af6,
- 0x1af8, 0x1afa, 0x1afc, 0x1afe, 0x1b00, 0x1b02, 0x1b04, 0x1b06,
- 0x1b08, 0x1b0a, 0x1b0c, 0x1b0e, 0x1b10, 0x1b12, 0x1b14, 0x1b16,
- 0x1b18, 0x1b1a, 0x1b1c, 0x1b1e, 0x1b20, 0x1b22, 0x1b24, 0x1b26,
- 0x1b28, 0x1b2a, 0x1b2c, 0x1b2e, 0x1b30, 0x1b32, 0x1b34, 0x1b36,
- 0x1b38, 0x1b3a, 0x1b3c, 0x1b3e, 0x1b40, 0x1b42, 0x1b44, 0x1b46,
- 0x1b48, 0x1b4a, 0x1b4c, 0x1b4e, 0x1b50, 0x1b52, 0x1b54, 0x1b56,
- 0x1b58, 0x1b5a, 0x1b5c, 0x1b5e, 0x1b60, 0x1b62, 0x1b64, 0x1b66,
- 0x1b68, 0x1b6a, 0x1b6c, 0x1b6e, 0x1b70, 0x1b72, 0x1b74, 0x1b76,
- 0x1b78, 0x1b7a, 0x1b7c, 0x1b7e, 0x1b80, 0x1b82, 0x1b84, 0x1b86,
- 0x1b88, 0x1b8a, 0x1b8c, 0x1b8e, 0x1b90, 0x1b92, 0x1b94, 0x1b96,
- 0x1b98, 0x1b9a, 0x1b9c, 0x1b9e, 0x1ba0, 0x1ba2, 0x1ba4, 0x1ba6,
- 0x1ba8, 0x1baa, 0x1bac, 0x1bae, 0x1bb0, 0x1bb2, 0x1bb4, 0x1bb6,
- 0x1bb8, 0x1bba, 0x1bbc, 0x1bbe, 0x1bc0, 0x1bc2, 0x1bc4, 0x1bc6,
-
- 0x1bc8, 0x1bca, 0x1bcc, 0x1bce, 0x1bd0, 0x1bd2, 0x1bd4, 0x1bd6,
- 0x1bd8, 0x1bda, 0x1bdc, 0x1bde, 0x1be0, 0x1be2, 0xffff, 0xffff,
- 0x1be4, 0xffff, 0x1be6, 0xffff, 0xffff, 0x1be8, 0x1bea, 0x1bec,
- 0x1bee, 0x1bf0, 0x1bf2, 0x1bf4, 0x1bf6, 0x1bf8, 0x1bfa, 0xffff,
- 0x1bfc, 0xffff, 0x1bfe, 0xffff, 0xffff, 0x1c00, 0x1c02, 0xffff,
- 0xffff, 0xffff, 0x1c04, 0x1c06, 0x1c08, 0x1c0a, 0xffff, 0xffff,
- 0x1c0c, 0x1c0e, 0x1c10, 0x1c12, 0x1c14, 0x1c16, 0x1c18, 0x1c1a,
- 0x1c1c, 0x1c1e, 0x1c20, 0x1c22, 0x1c24, 0x1c26, 0x1c28, 0x1c2a,
- 0x1c2c, 0x1c2e, 0x1c30, 0x1c32, 0x1c34, 0x1c36, 0x1c38, 0x1c3a,
- 0x1c3c, 0x1c3e, 0x1c40, 0x1c42, 0x1c44, 0x1c46, 0x1c48, 0x1c4a,
- 0x1c4c, 0x1c4e, 0x1c50, 0x1c52, 0x1c54, 0x1c56, 0x1c58, 0x1c5a,
- 0x1c5c, 0x1c5e, 0x1c60, 0x1c62, 0x1c64, 0x1c66, 0x1c68, 0x1c6a,
- 0x1c6c, 0x1c6e, 0x1c70, 0x1c72, 0x1c74, 0x1c76, 0x1c78, 0x1c7a,
- 0x1c7c, 0x1c7e, 0x1c80, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x1c82, 0x1c84, 0x1c86, 0x1c88, 0x1c8a, 0x1c8c, 0x1c8e, 0x1c90,
- 0x1c92, 0x1c94, 0x1c96, 0x1c98, 0x1c9a, 0x1c9c, 0x1c9e, 0x1ca0,
- 0x1ca2, 0x1ca4, 0x1ca6, 0x1ca8, 0x1caa, 0x1cac, 0x1cae, 0x1cb0,
- 0x1cb2, 0x1cb4, 0x1cb6, 0x1cb8, 0x1cba, 0x1cbc, 0x1cbe, 0x1cc0,
- 0x1cc2, 0x1cc4, 0x1cc6, 0x1cc8, 0x1cca, 0x1ccc, 0x1cce, 0x1cd0,
- 0x1cd2, 0x1cd4, 0x1cd6, 0x1cd8, 0x1cda, 0x1cdc, 0x1cde, 0x1ce0,
- 0x1ce2, 0x1ce4, 0x1ce6, 0x1ce8, 0x1cea, 0x1cec, 0x1cee, 0x1cf0,
- 0x1cf2, 0x1cf4, 0x1cf6, 0x1cf8, 0x1cfa, 0x1cfc, 0x1cfe, 0x1d00,
- 0x1d02, 0x1d04, 0x1d06, 0x1d08, 0x1d0a, 0x1d0c, 0x1d0e, 0x1d10,
- 0x1d12, 0x1d14, 0x1d16, 0x1d18, 0x1d1a, 0x1d1c, 0x1d1e, 0x1d20,
- 0x1d22, 0x1d24, 0x1d26, 0x1d28, 0x1d2a, 0x1d2c, 0x1d2e, 0x1d30,
- 0x1d32, 0x1d34, 0x1d36, 0x1d38, 0x1d3a, 0x1d3c, 0x1d3e, 0x1d40,
- 0x1d43, 0x1d46, 0x1d49, 0x1d4b, 0x1d4d, 0x1d4f, 0x1d52, 0x1d55,
- 0x1d58, 0x1d5a, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0x1d5c, 0x1d5f, 0x1d62, 0x1d65, 0x1d69, 0x1d6d, 0x1d70, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x1d73, 0x1d76, 0x1d79, 0x1d7c, 0x1d7f,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1d82, 0xffff, 0x1d85,
- 0x1d88, 0x1d8a, 0x1d8c, 0x1d8e, 0x1d90, 0x1d92, 0x1d94, 0x1d96,
- 0x1d98, 0x1d9a, 0x1d9c, 0x1d9f, 0x1da2, 0x1da5, 0x1da8, 0x1dab,
- 0x1dae, 0x1db1, 0x1db4, 0x1db7, 0x1dba, 0x1dbd, 0x1dc0, 0xffff,
- 0x1dc3, 0x1dc6, 0x1dc9, 0x1dcc, 0x1dcf, 0xffff, 0x1dd2, 0xffff,
- 0x1dd5, 0x1dd8, 0xffff, 0x1ddb, 0x1dde, 0xffff, 0x1de1, 0x1de4,
- 0x1de7, 0x1dea, 0x1ded, 0x1df0, 0x1df3, 0x1df6, 0x1df9, 0x1dfc,
- 0x1dff, 0x1e01, 0x1e03, 0x1e05, 0x1e07, 0x1e09, 0x1e0b, 0x1e0d,
- 0x1e0f, 0x1e11, 0x1e13, 0x1e15, 0x1e17, 0x1e19, 0x1e1b, 0x1e1d,
- 0x1e1f, 0x1e21, 0x1e23, 0x1e25, 0x1e27, 0x1e29, 0x1e2b, 0x1e2d,
- 0x1e2f, 0x1e31, 0x1e33, 0x1e35, 0x1e37, 0x1e39, 0x1e3b, 0x1e3d,
- 0x1e3f, 0x1e41, 0x1e43, 0x1e45, 0x1e47, 0x1e49, 0x1e4b, 0x1e4d,
- 0x1e4f, 0x1e51, 0x1e53, 0x1e55, 0x1e57, 0x1e59, 0x1e5b, 0x1e5d,
- 0x1e5f, 0x1e61, 0x1e63, 0x1e65, 0x1e67, 0x1e69, 0x1e6b, 0x1e6d,
- 0x1e6f, 0x1e71, 0x1e73, 0x1e75, 0x1e77, 0x1e79, 0x1e7b, 0x1e7d,
- 0x1e7f, 0x1e81, 0x1e83, 0x1e85, 0x1e87, 0x1e89, 0x1e8b, 0x1e8d,
- 0x1e8f, 0x1e91, 0x1e93, 0x1e95, 0x1e97, 0x1e99, 0x1e9b, 0x1e9d,
- 0x1e9f, 0x1ea1, 0x1ea3, 0x1ea5, 0x1ea7, 0x1ea9, 0x1eab, 0x1ead,
- 0x1eaf, 0x1eb1, 0x1eb3, 0x1eb5, 0x1eb7, 0x1eb9, 0x1ebb, 0x1ebd,
- 0x1ebf, 0x1ec1, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x1ec3, 0x1ec5, 0x1ec7, 0x1ec9, 0x1ecb,
- 0x1ecd, 0x1ecf, 0x1ed1, 0x1ed3, 0x1ed5, 0x1ed7, 0x1ed9, 0x1edb,
- 0x1edd, 0x1edf, 0x1ee1, 0x1ee3, 0x1ee5, 0x1ee7, 0x1ee9, 0x1eeb,
- 0x1eed, 0x1eef, 0x1ef1, 0x1ef4, 0x1ef7, 0x1efa, 0x1efd, 0x1f00,
- 0x1f03, 0x1f06, 0x1f09, 0x1f0c, 0x1f0f, 0x1f12, 0x1f15, 0x1f18,
- 0x1f1b, 0x1f1e, 0x1f21, 0x1f24, 0x1f27, 0x1f29, 0x1f2b, 0x1f2d,
-
- 0x1f2f, 0x1f32, 0x1f35, 0x1f38, 0x1f3b, 0x1f3e, 0x1f41, 0x1f44,
- 0x1f47, 0x1f4a, 0x1f4d, 0x1f50, 0x1f53, 0x1f56, 0x1f59, 0x1f5c,
- 0x1f5f, 0x1f62, 0x1f65, 0x1f68, 0x1f6b, 0x1f6e, 0x1f71, 0x1f74,
- 0x1f77, 0x1f7a, 0x1f7d, 0x1f80, 0x1f83, 0x1f86, 0x1f89, 0x1f8c,
- 0x1f8f, 0x1f92, 0x1f95, 0x1f98, 0x1f9b, 0x1f9e, 0x1fa1, 0x1fa4,
- 0x1fa7, 0x1faa, 0x1fad, 0x1fb0, 0x1fb3, 0x1fb6, 0x1fb9, 0x1fbc,
- 0x1fbf, 0x1fc2, 0x1fc5, 0x1fc8, 0x1fcb, 0x1fce, 0x1fd1, 0x1fd4,
- 0x1fd7, 0x1fda, 0x1fdd, 0x1fe0, 0x1fe3, 0x1fe6, 0x1fe9, 0x1fec,
- 0x1fef, 0x1ff2, 0x1ff5, 0x1ff8, 0x1ffb, 0x1ffe, 0x2001, 0x2004,
- 0x2007, 0x200a, 0x200d, 0x2010, 0x2013, 0x2016, 0x2019, 0x201c,
- 0x201f, 0x2022, 0x2025, 0x2028, 0x202b, 0x202e, 0x2031, 0x2034,
- 0x2037, 0x203a, 0x203d, 0x2040, 0x2043, 0x2046, 0x2049, 0x204d,
- 0x2051, 0x2055, 0x2059, 0x205d, 0x2061, 0x2064, 0x2067, 0x206a,
- 0x206d, 0x2070, 0x2073, 0x2076, 0x2079, 0x207c, 0x207f, 0x2082,
- 0x2085, 0x2088, 0x208b, 0x208e, 0x2091, 0x2094, 0x2097, 0x209a,
- 0x209d, 0x20a0, 0x20a3, 0x20a6, 0x20a9, 0x20ac, 0x20af, 0x20b2,
- 0x20b5, 0x20b8, 0x20bb, 0x20be, 0x20c1, 0x20c4, 0x20c7, 0x20ca,
- 0x20cd, 0x20d0, 0x20d3, 0x20d6, 0x20d9, 0x20dc, 0x20df, 0x20e2,
- 0x20e5, 0x20e8, 0x20eb, 0x20ee, 0x20f1, 0x20f4, 0x20f7, 0x20fa,
- 0x20fd, 0x2100, 0x2103, 0x2106, 0x2109, 0x210c, 0x210f, 0x2112,
- 0x2115, 0x2118, 0x211b, 0x211e, 0x2121, 0x2124, 0x2127, 0x212a,
- 0x212d, 0x2130, 0x2133, 0x2136, 0x2139, 0x213c, 0x213f, 0x2142,
- 0x2145, 0x2148, 0x214b, 0x214e, 0x2151, 0x2154, 0x2157, 0x215a,
- 0x215d, 0x2160, 0x2163, 0x2166, 0x2169, 0x216c, 0x216f, 0x2172,
- 0x2175, 0x2178, 0x217b, 0x217e, 0x2181, 0x2184, 0x2187, 0x218a,
- 0x218d, 0x2190, 0x2193, 0x2196, 0x2199, 0x219c, 0x219f, 0x21a2,
- 0x21a5, 0x21a8, 0x21ab, 0x21ae, 0x21b1, 0x21b4, 0x21b7, 0x21ba,
- 0x21bd, 0x21c0, 0x21c3, 0x21c6, 0x21c9, 0x21cc, 0x21cf, 0x21d2,
- 0x21d5, 0x21d8, 0x21db, 0x21de, 0x21e1, 0x21e4, 0x21e7, 0x21ea,
- 0x21ed, 0x21f0, 0x21f3, 0x21f6, 0x21f9, 0x21fc, 0x21ff, 0x2202,
- 0x2205, 0x2208, 0x220b, 0x220f, 0x2213, 0x2217, 0x221a, 0x221d,
- 0x2220, 0x2223, 0x2226, 0x2229, 0x222c, 0x222f, 0x2232, 0x2235,
-
- 0x2238, 0x223b, 0x223e, 0x2241, 0x2244, 0x2247, 0x224a, 0x224d,
- 0x2250, 0x2253, 0x2256, 0x2259, 0x225c, 0x225f, 0x2262, 0x2265,
- 0x2268, 0x226b, 0x226e, 0x2271, 0x2274, 0x2277, 0x227a, 0x227d,
- 0x2280, 0x2283, 0x2286, 0x2289, 0x228c, 0x228f, 0x2292, 0x2295,
- 0x2298, 0x229b, 0x229e, 0x22a1, 0x22a4, 0x22a7, 0x22aa, 0x22ad,
- 0x22b0, 0x22b3, 0x22b6, 0x22b9, 0x22bc, 0x22bf, 0x22c2, 0x22c5,
- 0x22c8, 0x22cb, 0x22ce, 0x22d1, 0x22d4, 0x22d7, 0x22da, 0x22dd,
- 0x22e0, 0x22e3, 0x22e6, 0x22e9, 0x22ec, 0x22ef, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x22f2, 0x22f6, 0x22fa, 0x22fe, 0x2302, 0x2306, 0x230a, 0x230e,
- 0x2312, 0x2316, 0x231a, 0x231e, 0x2322, 0x2326, 0x232a, 0x232e,
- 0x2332, 0x2336, 0x233a, 0x233e, 0x2342, 0x2346, 0x234a, 0x234e,
- 0x2352, 0x2356, 0x235a, 0x235e, 0x2362, 0x2366, 0x236a, 0x236e,
- 0x2372, 0x2376, 0x237a, 0x237e, 0x2382, 0x2386, 0x238a, 0x238e,
- 0x2392, 0x2396, 0x239a, 0x239e, 0x23a2, 0x23a6, 0x23aa, 0x23ae,
- 0x23b2, 0x23b6, 0x23ba, 0x23be, 0x23c2, 0x23c6, 0x23ca, 0x23ce,
- 0x23d2, 0x23d6, 0x23da, 0x23de, 0x23e2, 0x23e6, 0x23ea, 0x23ee,
- 0xffff, 0xffff, 0x23f2, 0x23f6, 0x23fa, 0x23fe, 0x2402, 0x2406,
- 0x240a, 0x240e, 0x2412, 0x2416, 0x241a, 0x241e, 0x2422, 0x2426,
- 0x242a, 0x242e, 0x2432, 0x2436, 0x243a, 0x243e, 0x2442, 0x2446,
- 0x244a, 0x244e, 0x2452, 0x2456, 0x245a, 0x245e, 0x2462, 0x2466,
- 0x246a, 0x246e, 0x2472, 0x2476, 0x247a, 0x247e, 0x2482, 0x2486,
- 0x248a, 0x248e, 0x2492, 0x2496, 0x249a, 0x249e, 0x24a2, 0x24a6,
- 0x24aa, 0x24ae, 0x24b2, 0x24b6, 0x24ba, 0x24be, 0x24c2, 0x24c6,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x24ca, 0x24ce, 0x24d2, 0x24d7, 0x24dc, 0x24e1, 0x24e6, 0x24eb,
- 0x24f0, 0x24f5, 0x24f9, 0x250c, 0x2515, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x251a, 0x251c, 0x251e, 0x2520, 0x2522, 0x2524, 0x2526, 0x2528,
- 0x252a, 0x252c, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x252e, 0x2530, 0x2532, 0x2534, 0x2536, 0x2538, 0x253a, 0x253c,
- 0x253e, 0x2540, 0x2542, 0x2544, 0x2546, 0x2548, 0x254a, 0x254c,
- 0x254e, 0x2550, 0x2552, 0x2554, 0x2556, 0xffff, 0xffff, 0x2558,
- 0x255a, 0x255c, 0x255e, 0x2560, 0x2562, 0x2564, 0x2566, 0x2568,
- 0x256a, 0x256c, 0x256e, 0xffff, 0x2570, 0x2572, 0x2574, 0x2576,
- 0x2578, 0x257a, 0x257c, 0x257e, 0x2580, 0x2582, 0x2584, 0x2586,
- 0x2588, 0x258a, 0x258c, 0x258e, 0x2590, 0x2592, 0x2594, 0xffff,
- 0x2596, 0x2598, 0x259a, 0x259c, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x259e, 0x25a1, 0x25a4, 0xffff, 0x25a7, 0xffff, 0x25aa, 0x25ad,
- 0x25b0, 0x25b3, 0x25b6, 0x25b9, 0x25bc, 0x25bf, 0x25c2, 0x25c5,
- 0x25c8, 0x25ca, 0x25cc, 0x25ce, 0x25d0, 0x25d2, 0x25d4, 0x25d6,
- 0x25d8, 0x25da, 0x25dc, 0x25de, 0x25e0, 0x25e2, 0x25e4, 0x25e6,
- 0x25e8, 0x25ea, 0x25ec, 0x25ee, 0x25f0, 0x25f2, 0x25f4, 0x25f6,
- 0x25f8, 0x25fa, 0x25fc, 0x25fe, 0x2600, 0x2602, 0x2604, 0x2606,
- 0x2608, 0x260a, 0x260c, 0x260e, 0x2610, 0x2612, 0x2614, 0x2616,
- 0x2618, 0x261a, 0x261c, 0x261e, 0x2620, 0x2622, 0x2624, 0x2626,
- 0x2628, 0x262a, 0x262c, 0x262e, 0x2630, 0x2632, 0x2634, 0x2636,
- 0x2638, 0x263a, 0x263c, 0x263e, 0x2640, 0x2642, 0x2644, 0x2646,
- 0x2648, 0x264a, 0x264c, 0x264e, 0x2650, 0x2652, 0x2654, 0x2656,
- 0x2658, 0x265a, 0x265c, 0x265e, 0x2660, 0x2662, 0x2664, 0x2666,
- 0x2668, 0x266a, 0x266c, 0x266e, 0x2670, 0x2672, 0x2674, 0x2676,
- 0x2678, 0x267a, 0x267c, 0x267e, 0x2680, 0x2682, 0x2684, 0x2686,
- 0x2688, 0x268a, 0x268c, 0x268e, 0x2690, 0x2692, 0x2694, 0x2696,
- 0x2698, 0x269a, 0x269c, 0x269e, 0x26a0, 0x26a2, 0x26a4, 0x26a6,
- 0x26a8, 0x26aa, 0x26ac, 0x26ae, 0x26b0, 0x26b2, 0x26b5, 0x26b8,
- 0x26bb, 0x26be, 0x26c1, 0x26c4, 0x26c7, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0x26ca, 0x26cc, 0x26ce, 0x26d0, 0x26d2, 0x26d4, 0x26d6,
- 0x26d8, 0x26da, 0x26dc, 0x26de, 0x26e0, 0x26e2, 0x26e4, 0x26e6,
- 0x26e8, 0x26ea, 0x26ec, 0x26ee, 0x26f0, 0x26f2, 0x26f4, 0x26f6,
- 0x26f8, 0x26fa, 0x26fc, 0x26fe, 0x2700, 0x2702, 0x2704, 0x2706,
- 0x2708, 0x270a, 0x270c, 0x270e, 0x2710, 0x2712, 0x2714, 0x2716,
- 0x2718, 0x271a, 0x271c, 0x271e, 0x2720, 0x2722, 0x2724, 0x2726,
- 0x2728, 0x272a, 0x272c, 0x272e, 0x2730, 0x2732, 0x2734, 0x2736,
- 0x2738, 0x273a, 0x273c, 0x273e, 0x2740, 0x2742, 0x2744, 0x2746,
- 0x2748, 0x274a, 0x274c, 0x274e, 0x2750, 0x2752, 0x2754, 0x2756,
- 0x2758, 0x275a, 0x275c, 0x275e, 0x2760, 0x2762, 0x2764, 0x2766,
- 0x2768, 0x276a, 0x276c, 0x276e, 0x2770, 0x2772, 0x2774, 0x2776,
- 0x2778, 0x277a, 0x277c, 0x277e, 0x2780, 0x2782, 0x2784, 0x2786,
- 0x2788, 0x278a, 0x278c, 0x278e, 0x2790, 0x2792, 0x2794, 0x2796,
- 0x2798, 0x279a, 0x279c, 0x279e, 0x27a0, 0x27a2, 0x27a4, 0x27a6,
- 0x27a8, 0x27aa, 0x27ac, 0x27ae, 0x27b0, 0x27b2, 0x27b4, 0x27b6,
- 0x27b8, 0x27ba, 0x27bc, 0x27be, 0x27c0, 0x27c2, 0x27c4, 0x27c6,
- 0x27c8, 0x27ca, 0x27cc, 0x27ce, 0x27d0, 0x27d2, 0x27d4, 0x27d6,
- 0x27d8, 0x27da, 0x27dc, 0x27de, 0x27e0, 0x27e2, 0x27e4, 0x27e6,
- 0x27e8, 0x27ea, 0x27ec, 0x27ee, 0x27f0, 0x27f2, 0x27f4, 0x27f6,
- 0x27f8, 0x27fa, 0x27fc, 0x27fe, 0x2800, 0x2802, 0x2804, 0x2806,
- 0x2808, 0x280a, 0x280c, 0x280e, 0x2810, 0x2812, 0x2814, 0x2816,
- 0x2818, 0x281a, 0x281c, 0x281e, 0x2820, 0x2822, 0x2824, 0x2826,
- 0x2828, 0x282a, 0x282c, 0x282e, 0x2830, 0x2832, 0x2834, 0x2836,
- 0x2838, 0x283a, 0x283c, 0x283e, 0x2840, 0x2842, 0x2844, 0xffff,
- 0xffff, 0xffff, 0x2846, 0x2848, 0x284a, 0x284c, 0x284e, 0x2850,
- 0xffff, 0xffff, 0x2852, 0x2854, 0x2856, 0x2858, 0x285a, 0x285c,
- 0xffff, 0xffff, 0x285e, 0x2860, 0x2862, 0x2864, 0x2866, 0x2868,
- 0xffff, 0xffff, 0x286a, 0x286c, 0x286e, 0xffff, 0xffff, 0xffff,
- 0x2870, 0x2872, 0x2874, 0x2876, 0x2878, 0x287a, 0x287c, 0xffff,
- 0x287e, 0x2880, 0x2882, 0x2884, 0x2886, 0x2888, 0x288a, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x288c, 0x2891,
- 0x2896, 0x289b, 0x28a0, 0x28a5, 0x28aa, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x28af, 0x28b4, 0x28b9, 0x28be, 0x28c3,
- 0x28c8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0x28cd, 0x28cf, 0x28d1, 0x28d3, 0x28d5, 0x28d7, 0x28d9, 0x28db,
- 0x28dd, 0x28df, 0x28e1, 0x28e3, 0x28e5, 0x28e7, 0x28e9, 0x28eb,
- 0x28ed, 0x28ef, 0x28f1, 0x28f3, 0x28f5, 0x28f7, 0x28f9, 0x28fb,
- 0x28fd, 0x28ff, 0x2901, 0x2903, 0x2905, 0x2907, 0x2909, 0x290b,
- 0x290d, 0x290f, 0x2911, 0x2913, 0x2915, 0x2917, 0x2919, 0x291b,
- 0x291d, 0x291f, 0x2921, 0x2923, 0x2925, 0x2927, 0x2929, 0x292b,
- 0x292d, 0x292f, 0x2931, 0x2933, 0x2935, 0x2937, 0x2939, 0x293b,
- 0x293d, 0x293f, 0x2941, 0x2943, 0x2945, 0x2947, 0x2949, 0x294b,
- 0x294d, 0x294f, 0x2951, 0x2953, 0x2955, 0x2957, 0x2959, 0x295b,
- 0x295d, 0x295f, 0x2961, 0x2963, 0x2965, 0x2967, 0x2969, 0x296b,
- 0x296d, 0x296f, 0x2971, 0x2973, 0x2975, 0xffff, 0x2977, 0x2979,
- 0x297b, 0x297d, 0x297f, 0x2981, 0x2983, 0x2985, 0x2987, 0x2989,
- 0x298b, 0x298d, 0x298f, 0x2991, 0x2993, 0x2995, 0x2997, 0x2999,
- 0x299b, 0x299d, 0x299f, 0x29a1, 0x29a3, 0x29a5, 0x29a7, 0x29a9,
- 0x29ab, 0x29ad, 0x29af, 0x29b1, 0x29b3, 0x29b5, 0x29b7, 0x29b9,
- 0x29bb, 0x29bd, 0x29bf, 0x29c1, 0x29c3, 0x29c5, 0x29c7, 0x29c9,
- 0x29cb, 0x29cd, 0x29cf, 0x29d1, 0x29d3, 0x29d5, 0x29d7, 0x29d9,
- 0x29db, 0x29dd, 0x29df, 0x29e1, 0x29e3, 0x29e5, 0x29e7, 0x29e9,
- 0x29eb, 0x29ed, 0x29ef, 0x29f1, 0x29f3, 0x29f5, 0x29f7, 0x29f9,
- 0x29fb, 0x29fd, 0x29ff, 0x2a01, 0x2a03, 0xffff, 0x2a05, 0x2a07,
- 0xffff, 0xffff, 0x2a09, 0xffff, 0xffff, 0x2a0b, 0x2a0d, 0xffff,
- 0xffff, 0x2a0f, 0x2a11, 0x2a13, 0x2a15, 0xffff, 0x2a17, 0x2a19,
- 0x2a1b, 0x2a1d, 0x2a1f, 0x2a21, 0x2a23, 0x2a25, 0x2a27, 0x2a29,
- 0x2a2b, 0x2a2d, 0xffff, 0x2a2f, 0xffff, 0x2a31, 0x2a33, 0x2a35,
- 0x2a37, 0x2a39, 0x2a3b, 0x2a3d, 0xffff, 0x2a3f, 0x2a41, 0x2a43,
- 0x2a45, 0x2a47, 0x2a49, 0x2a4b, 0x2a4d, 0x2a4f, 0x2a51, 0x2a53,
- 0x2a55, 0x2a57, 0x2a59, 0x2a5b, 0x2a5d, 0x2a5f, 0x2a61, 0x2a63,
- 0x2a65, 0x2a67, 0x2a69, 0x2a6b, 0x2a6d, 0x2a6f, 0x2a71, 0x2a73,
- 0x2a75, 0x2a77, 0x2a79, 0x2a7b, 0x2a7d, 0x2a7f, 0x2a81, 0x2a83,
- 0x2a85, 0x2a87, 0x2a89, 0x2a8b, 0x2a8d, 0x2a8f, 0x2a91, 0x2a93,
- 0x2a95, 0x2a97, 0x2a99, 0x2a9b, 0x2a9d, 0x2a9f, 0x2aa1, 0x2aa3,
- 0x2aa5, 0x2aa7, 0x2aa9, 0x2aab, 0x2aad, 0x2aaf, 0x2ab1, 0x2ab3,
-
- 0x2ab5, 0x2ab7, 0x2ab9, 0x2abb, 0x2abd, 0x2abf, 0xffff, 0x2ac1,
- 0x2ac3, 0x2ac5, 0x2ac7, 0xffff, 0xffff, 0x2ac9, 0x2acb, 0x2acd,
- 0x2acf, 0x2ad1, 0x2ad3, 0x2ad5, 0x2ad7, 0xffff, 0x2ad9, 0x2adb,
- 0x2add, 0x2adf, 0x2ae1, 0x2ae3, 0x2ae5, 0xffff, 0x2ae7, 0x2ae9,
- 0x2aeb, 0x2aed, 0x2aef, 0x2af1, 0x2af3, 0x2af5, 0x2af7, 0x2af9,
- 0x2afb, 0x2afd, 0x2aff, 0x2b01, 0x2b03, 0x2b05, 0x2b07, 0x2b09,
- 0x2b0b, 0x2b0d, 0x2b0f, 0x2b11, 0x2b13, 0x2b15, 0x2b17, 0x2b19,
- 0x2b1b, 0x2b1d, 0xffff, 0x2b1f, 0x2b21, 0x2b23, 0x2b25, 0xffff,
- 0x2b27, 0x2b29, 0x2b2b, 0x2b2d, 0x2b2f, 0xffff, 0x2b31, 0xffff,
- 0xffff, 0xffff, 0x2b33, 0x2b35, 0x2b37, 0x2b39, 0x2b3b, 0x2b3d,
- 0x2b3f, 0xffff, 0x2b41, 0x2b43, 0x2b45, 0x2b47, 0x2b49, 0x2b4b,
- 0x2b4d, 0x2b4f, 0x2b51, 0x2b53, 0x2b55, 0x2b57, 0x2b59, 0x2b5b,
- 0x2b5d, 0x2b5f, 0x2b61, 0x2b63, 0x2b65, 0x2b67, 0x2b69, 0x2b6b,
- 0x2b6d, 0x2b6f, 0x2b71, 0x2b73, 0x2b75, 0x2b77, 0x2b79, 0x2b7b,
- 0x2b7d, 0x2b7f, 0x2b81, 0x2b83, 0x2b85, 0x2b87, 0x2b89, 0x2b8b,
- 0x2b8d, 0x2b8f, 0x2b91, 0x2b93, 0x2b95, 0x2b97, 0x2b99, 0x2b9b,
- 0x2b9d, 0x2b9f, 0x2ba1, 0x2ba3, 0x2ba5, 0x2ba7, 0x2ba9, 0x2bab,
- 0x2bad, 0x2baf, 0x2bb1, 0x2bb3, 0x2bb5, 0x2bb7, 0x2bb9, 0x2bbb,
- 0x2bbd, 0x2bbf, 0x2bc1, 0x2bc3, 0x2bc5, 0x2bc7, 0x2bc9, 0x2bcb,
- 0x2bcd, 0x2bcf, 0x2bd1, 0x2bd3, 0x2bd5, 0x2bd7, 0x2bd9, 0x2bdb,
- 0x2bdd, 0x2bdf, 0x2be1, 0x2be3, 0x2be5, 0x2be7, 0x2be9, 0x2beb,
- 0x2bed, 0x2bef, 0x2bf1, 0x2bf3, 0x2bf5, 0x2bf7, 0x2bf9, 0x2bfb,
- 0x2bfd, 0x2bff, 0x2c01, 0x2c03, 0x2c05, 0x2c07, 0x2c09, 0x2c0b,
- 0x2c0d, 0x2c0f, 0x2c11, 0x2c13, 0x2c15, 0x2c17, 0x2c19, 0x2c1b,
- 0x2c1d, 0x2c1f, 0x2c21, 0x2c23, 0x2c25, 0x2c27, 0x2c29, 0x2c2b,
- 0x2c2d, 0x2c2f, 0x2c31, 0x2c33, 0x2c35, 0x2c37, 0x2c39, 0x2c3b,
- 0x2c3d, 0x2c3f, 0x2c41, 0x2c43, 0x2c45, 0x2c47, 0x2c49, 0x2c4b,
- 0x2c4d, 0x2c4f, 0x2c51, 0x2c53, 0x2c55, 0x2c57, 0x2c59, 0x2c5b,
- 0x2c5d, 0x2c5f, 0x2c61, 0x2c63, 0x2c65, 0x2c67, 0x2c69, 0x2c6b,
- 0x2c6d, 0x2c6f, 0x2c71, 0x2c73, 0x2c75, 0x2c77, 0x2c79, 0x2c7b,
- 0x2c7d, 0x2c7f, 0x2c81, 0x2c83, 0x2c85, 0x2c87, 0x2c89, 0x2c8b,
- 0x2c8d, 0x2c8f, 0x2c91, 0x2c93, 0x2c95, 0x2c97, 0x2c99, 0x2c9b,
-
- 0x2c9d, 0x2c9f, 0x2ca1, 0x2ca3, 0x2ca5, 0x2ca7, 0x2ca9, 0x2cab,
- 0x2cad, 0x2caf, 0x2cb1, 0x2cb3, 0x2cb5, 0x2cb7, 0x2cb9, 0x2cbb,
- 0x2cbd, 0x2cbf, 0x2cc1, 0x2cc3, 0x2cc5, 0x2cc7, 0x2cc9, 0x2ccb,
- 0x2ccd, 0x2ccf, 0x2cd1, 0x2cd3, 0x2cd5, 0x2cd7, 0x2cd9, 0x2cdb,
- 0x2cdd, 0x2cdf, 0x2ce1, 0x2ce3, 0x2ce5, 0x2ce7, 0x2ce9, 0x2ceb,
- 0x2ced, 0x2cef, 0x2cf1, 0x2cf3, 0x2cf5, 0x2cf7, 0x2cf9, 0x2cfb,
- 0x2cfd, 0x2cff, 0x2d01, 0x2d03, 0x2d05, 0x2d07, 0x2d09, 0x2d0b,
- 0x2d0d, 0x2d0f, 0x2d11, 0x2d13, 0x2d15, 0x2d17, 0x2d19, 0x2d1b,
- 0x2d1d, 0x2d1f, 0x2d21, 0x2d23, 0x2d25, 0x2d27, 0x2d29, 0x2d2b,
- 0x2d2d, 0x2d2f, 0x2d31, 0x2d33, 0x2d35, 0x2d37, 0x2d39, 0x2d3b,
- 0x2d3d, 0x2d3f, 0x2d41, 0x2d43, 0x2d45, 0x2d47, 0x2d49, 0x2d4b,
- 0x2d4d, 0x2d4f, 0x2d51, 0x2d53, 0x2d55, 0x2d57, 0x2d59, 0x2d5b,
- 0x2d5d, 0x2d5f, 0x2d61, 0x2d63, 0x2d65, 0x2d67, 0x2d69, 0x2d6b,
- 0x2d6d, 0x2d6f, 0x2d71, 0x2d73, 0x2d75, 0x2d77, 0x2d79, 0x2d7b,
- 0x2d7d, 0x2d7f, 0x2d81, 0x2d83, 0x2d85, 0x2d87, 0x2d89, 0x2d8b,
- 0x2d8d, 0x2d8f, 0x2d91, 0x2d93, 0x2d95, 0x2d97, 0x2d99, 0x2d9b,
- 0x2d9d, 0x2d9f, 0x2da1, 0x2da3, 0x2da5, 0x2da7, 0x2da9, 0x2dab,
- 0x2dad, 0x2daf, 0x2db1, 0x2db3, 0x2db5, 0x2db7, 0x2db9, 0x2dbb,
- 0x2dbd, 0x2dbf, 0x2dc1, 0x2dc3, 0x2dc5, 0x2dc7, 0x2dc9, 0x2dcb,
- 0x2dcd, 0x2dcf, 0x2dd1, 0x2dd3, 0x2dd5, 0x2dd7, 0x2dd9, 0x2ddb,
- 0x2ddd, 0x2ddf, 0x2de1, 0x2de3, 0x2de5, 0x2de7, 0xffff, 0xffff,
- 0x2de9, 0x2deb, 0x2ded, 0x2def, 0x2df1, 0x2df3, 0x2df5, 0x2df7,
- 0x2df9, 0x2dfb, 0x2dfd, 0x2dff, 0x2e01, 0x2e03, 0x2e05, 0x2e07,
- 0x2e09, 0x2e0b, 0x2e0d, 0x2e0f, 0x2e11, 0x2e13, 0x2e15, 0x2e17,
- 0x2e19, 0x2e1b, 0x2e1d, 0x2e1f, 0x2e21, 0x2e23, 0x2e25, 0x2e27,
- 0x2e29, 0x2e2b, 0x2e2d, 0x2e2f, 0x2e31, 0x2e33, 0x2e35, 0x2e37,
- 0x2e39, 0x2e3b, 0x2e3d, 0x2e3f, 0x2e41, 0x2e43, 0x2e45, 0x2e47,
- 0x2e49, 0x2e4b, 0x2e4d, 0x2e4f, 0x2e51, 0x2e53, 0x2e55, 0x2e57,
- 0x2e59, 0x2e5b, 0x2e5d, 0x2e5f, 0x2e61, 0x2e63, 0x2e65, 0x2e67,
- 0x2e69, 0x2e6b, 0x2e6d, 0x2e6f, 0x2e71, 0x2e73, 0x2e75, 0x2e77,
- 0x2e79, 0x2e7b, 0x2e7d, 0x2e7f, 0x2e81, 0x2e83, 0x2e85, 0x2e87,
- 0x2e89, 0x2e8b, 0x2e8d, 0x2e8f, 0x2e91, 0x2e93, 0x2e95, 0x2e97,
-
- 0x2e99, 0x2e9b, 0x2e9d, 0x2e9f, 0x2ea1, 0x2ea3, 0x2ea5, 0x2ea7,
- 0x2ea9, 0x2eab, 0x2ead, 0x2eaf, 0x2eb1, 0x2eb3, 0x2eb5, 0x2eb7,
- 0x2eb9, 0x2ebb, 0x2ebd, 0x2ebf, 0x2ec1, 0x2ec3, 0x2ec5, 0x2ec7,
- 0x2ec9, 0x2ecb, 0x2ecd, 0x2ecf, 0x2ed1, 0x2ed3, 0x2ed5, 0x2ed7,
- 0x2ed9, 0x2edb, 0x2edd, 0x2edf, 0x2ee1, 0x2ee3, 0x2ee5, 0x2ee7,
- 0x2ee9, 0x2eeb, 0x2eed, 0x2eef, 0x2ef1, 0x2ef3, 0x2ef5, 0x2ef7,
- 0x2ef9, 0x2efb, 0x2efd, 0x2eff, 0x2f01, 0x2f03, 0x2f05, 0x2f07,
- 0x2f09, 0x2f0b, 0x2f0d, 0x2f0f, 0x2f11, 0x2f13, 0x2f15, 0x2f17,
- 0x2f19, 0x2f1b, 0x2f1d, 0x2f1f, 0x2f21, 0x2f23, 0x2f25, 0x2f27,
- 0x2f29, 0x2f2b, 0x2f2d, 0x2f2f, 0x2f31, 0x2f33, 0x2f35, 0x2f37,
- 0x2f39, 0x2f3b, 0x2f3d, 0x2f3f, 0x2f41, 0x2f43, 0x2f45, 0x2f47,
- 0x2f49, 0x2f4b, 0x2f4d, 0x2f4f, 0x2f51, 0x2f53, 0x2f55, 0x2f57,
- 0x2f59, 0x2f5b, 0x2f5d, 0x2f5f, 0x2f61, 0x2f63, 0x2f65, 0x2f67,
- 0x2f69, 0x2f6b, 0x2f6d, 0x2f6f, 0x2f71, 0x2f73, 0x2f75, 0x2f77,
- 0x2f79, 0x2f7b, 0x2f7d, 0x2f7f, 0x2f81, 0x2f83, 0x2f85, 0x2f87,
- 0x2f89, 0x2f8b, 0x2f8d, 0x2f8f, 0x2f91, 0x2f93, 0x2f95, 0x2f97,
- 0x2f99, 0x2f9b, 0x2f9d, 0x2f9f, 0x2fa1, 0x2fa3, 0x2fa5, 0x2fa7,
- 0x2fa9, 0x2fab, 0x2fad, 0x2faf, 0x2fb1, 0x2fb3, 0x2fb5, 0x2fb7,
- 0x2fb9, 0x2fbb, 0x2fbd, 0x2fbf, 0x2fc1, 0x2fc3, 0x2fc5, 0x2fc7,
- 0x2fc9, 0x2fcb, 0x2fcd, 0x2fcf, 0x2fd1, 0x2fd3, 0x2fd5, 0x2fd7,
- 0x2fd9, 0x2fdb, 0x2fdd, 0x2fdf, 0x2fe1, 0x2fe3, 0x2fe5, 0x2fe7,
- 0x2fe9, 0x2feb, 0x2fed, 0x2fef, 0x2ff1, 0x2ff3, 0x2ff5, 0x2ff7,
- 0x2ff9, 0x2ffb, 0x2ffd, 0x2fff, 0x3001, 0x3003, 0x3005, 0x3007,
- 0x3009, 0x300b, 0x300d, 0x300f, 0x3011, 0x3013, 0x3015, 0x3017,
- 0x3019, 0x301b, 0x301d, 0x301f, 0x3021, 0x3023, 0x3025, 0x3027,
- 0x3029, 0x302b, 0x302d, 0x302f, 0xffff, 0xffff, 0x3031, 0x3033,
- 0x3035, 0x3037, 0x3039, 0x303b, 0x303d, 0x303f, 0x3041, 0x3043,
- 0x3045, 0x3047, 0x3049, 0x304b, 0x304d, 0x304f, 0x3051, 0x3053,
- 0x3055, 0x3057, 0x3059, 0x305b, 0x305d, 0x305f, 0x3061, 0x3063,
- 0x3065, 0x3067, 0x3069, 0x306b, 0x306d, 0x306f, 0x3071, 0x3073,
- 0x3075, 0x3077, 0x3079, 0x307b, 0x307d, 0x307f, 0x3081, 0x3083,
- 0x3085, 0x3087, 0x3089, 0x308b, 0x308d, 0x308f, 0x3091, 0x3093,
-
- 0x3095, 0x3097, 0x3099, 0x309b, 0x309e, 0x30a0, 0x30a2, 0x30a4,
- 0x30a6, 0x30a8, 0x30aa, 0x30ac, 0x30ae, 0x30b0, 0x30b3, 0x30b5,
- 0x30b7, 0x30b9, 0x30bb, 0x30be, 0x30c0, 0x30c2, 0x30c4, 0x30c7,
- 0x30c9, 0x30cb, 0x30cd, 0x30cf, 0x30d1, 0x30d4, 0x30d6, 0x30d8,
- 0x30da, 0x30dc, 0x30de, 0x30e0, 0x30e2, 0x30e4, 0x30e6, 0x30e8,
- 0x30ea, 0x30ec, 0x30ee, 0x30f0, 0x30f2, 0x30f4, 0x30f6, 0x30f8,
- 0x30fa, 0x30fc, 0x30fe, 0x3100, 0x3102, 0x3105, 0x3107, 0x3109,
- 0x310b, 0x310e, 0x3110, 0x3112, 0x3114, 0x3116, 0x3118, 0x311a,
- 0x311c, 0x311e, 0x3120, 0x3122, 0x3124, 0x3126, 0x3128, 0x312a,
- 0x312c, 0x312e, 0x3130, 0x3132, 0x3134, 0x3136, 0x3138, 0x313a,
- 0x313c, 0x313e, 0x3140, 0x3142, 0x3144, 0x3146, 0x3148, 0x314a,
- 0x314c, 0x314e, 0x3151, 0x3153, 0x3155, 0x3157, 0x3159, 0x315b,
- 0x315d, 0x3160, 0x3163, 0x3165, 0x3167, 0x3169, 0x316b, 0x316d,
- 0x316f, 0x3171, 0x3173, 0x3175, 0x3177, 0x317a, 0x317c, 0x317e,
- 0x3180, 0x3182, 0x3185, 0x3187, 0x3189, 0x318b, 0x318d, 0x318f,
- 0x3191, 0x3193, 0x3195, 0x3197, 0x319a, 0x319c, 0x319f, 0x31a1,
- 0x31a3, 0x31a5, 0x31a7, 0x31a9, 0x31ab, 0x31ad, 0x31af, 0x31b1,
- 0x31b3, 0x31b5, 0x31b8, 0x31ba, 0x31bc, 0x31be, 0x31c0, 0x31c2,
- 0x31c5, 0x31c7, 0x31ca, 0x31cd, 0x31cf, 0x31d1, 0x31d3, 0x31d5,
- 0x31d8, 0x31db, 0x31dd, 0x31df, 0x31e1, 0x31e3, 0x31e5, 0x31e7,
- 0x31e9, 0x31eb, 0x31ed, 0x31ef, 0x31f1, 0x31f4, 0x31f6, 0x31f8,
- 0x31fa, 0x31fc, 0x31fe, 0x3200, 0x3202, 0x3204, 0x3206, 0x3208,
- 0x320a, 0x320c, 0x320e, 0x3210, 0x3212, 0x3214, 0x3216, 0x3218,
- 0x321a, 0x321d, 0x321f, 0x3221, 0x3223, 0x3225, 0x3227, 0x322a,
- 0x322c, 0x322e, 0x3230, 0x3232, 0x3234, 0x3236, 0x3238, 0x323a,
- 0x323c, 0x323e, 0x3240, 0x3243, 0x3245, 0x3247, 0x3249, 0x324b,
- 0x324d, 0x324f, 0x3251, 0x3253, 0x3255, 0x3257, 0x3259, 0x325b,
- 0x325d, 0x325f, 0x3261, 0x3263, 0x3265, 0x3267, 0x326a, 0x326c,
- 0x326e, 0x3270, 0x3272, 0x3274, 0x3277, 0x3279, 0x327b, 0x327d,
- 0x327f, 0x3281, 0x3283, 0x3285, 0x3287, 0x328a, 0x328c, 0x328e,
- 0x3290, 0x3293, 0x3295, 0x3297, 0x3299, 0x329b, 0x329d, 0x329f,
- 0x32a2, 0x32a5, 0x32a8, 0x32aa, 0x32ad, 0x32af, 0x32b1, 0x32b3,
-
- 0x32b5, 0x32b7, 0x32b9, 0x32bb, 0x32bd, 0x32bf, 0x32c1, 0x32c4,
- 0x32c6, 0x32c8, 0x32ca, 0x32cc, 0x32ce, 0x32d0, 0x32d3, 0x32d5,
- 0x32d7, 0x32da, 0x32dd, 0x32df, 0x32e1, 0x32e3, 0x32e5, 0x32e7,
- 0x32e9, 0x32eb, 0x32ed, 0x32ef, 0x32f2, 0x32f4, 0x32f7, 0x32f9,
- 0x32fc, 0x32fe, 0x3300, 0x3302, 0x3305, 0x3307, 0x3309, 0x330c,
- 0x330f, 0x3311, 0x3313, 0x3315, 0x3317, 0x3319, 0x331b, 0x331d,
- 0x331f, 0x3321, 0x3323, 0x3325, 0x3327, 0x3329, 0x332c, 0x332e,
- 0x3331, 0x3333, 0x3336, 0x3338, 0x333b, 0x333e, 0x3341, 0x3343,
- 0x3345, 0x3347, 0x334a, 0x334d, 0x3350, 0x3353, 0x3355, 0x3357,
- 0x3359, 0x335b, 0x335d, 0x335f, 0x3361, 0x3363, 0x3366, 0x3368,
- 0x336a, 0x336c, 0x336e, 0x3371, 0x3373, 0x3376, 0x3379, 0x337b,
- 0x337d, 0x337f, 0x3381, 0x3383, 0x3385, 0x3388, 0x338b, 0x338e,
- 0x3390, 0x3392, 0x3395, 0x3397, 0x3399, 0x339b, 0x339e, 0x33a0,
- 0x33a2, 0x33a4, 0x33a6, 0x33a8, 0x33ab, 0x33ad, 0x33af, 0x33b1,
- 0x33b3, 0x33b5, 0x33b7, 0x33ba, 0x33bd, 0x33bf, 0x33c2, 0x33c4,
- 0x33c7, 0x33c9, 0x33cb, 0x33cd, 0x33d0, 0x33d3, 0x33d5, 0x33d8,
- 0x33da, 0x33dd, 0x33df, 0x33e1, 0x33e3, 0x33e5, 0x33e7, 0x33e9,
- 0x33ec, 0x33ef, 0x33f2, 0x33f5, 0x33f7, 0x33f9, 0x33fb, 0x33fd,
- 0x33ff, 0x3401, 0x3403, 0x3405, 0x3407, 0x3409, 0x340b, 0x340d,
- 0x3410, 0x3412, 0x3414, 0x3416, 0x3418, 0x341a, 0x341c, 0x341e,
- 0x3420, 0x3422, 0x3424, 0x3426, 0x3428, 0x342b, 0x342e, 0x3431,
- 0x3433, 0x3435, 0x3437, 0x3439, 0x343c, 0x343e, 0x3441, 0x3443,
- 0x3445, 0x3448, 0x344b, 0x344d, 0x344f, 0x3451, 0x3453, 0x3455,
- 0x3457, 0x3459, 0x345b, 0x345d, 0x345f, 0x3461, 0x3463, 0x3465,
- 0x3467, 0x3469, 0x346b, 0x346d, 0x346f, 0x3471, 0x3474, 0x3476,
- 0x3478, 0x347a, 0x347c, 0x347e, 0x3481, 0x3484, 0x3486, 0x3488,
- 0x348a, 0x348c, 0x348e, 0x3490, 0x3493, 0x3495, 0x3497, 0x3499,
- 0x349b, 0x349e, 0x34a1, 0x34a3, 0x34a5, 0x34a7, 0x34aa, 0x34ac,
- 0x34ae, 0x34b1, 0x34b4, 0x34b6, 0x34b8, 0x34ba, 0x34bd, 0x34bf,
- 0x34c1, 0x34c3, 0x34c5, 0x34c7, 0x34c9, 0x34cb, 0x34ce, 0x34d0,
- 0x34d2, 0x34d4, 0x34d7, 0x34d9, 0x34db, 0x34dd, 0x34df, 0x34e2,
- 0x34e5, 0x34e7, 0x34e9, 0x34eb, 0x34ee, 0x34f0, 0x34f3, 0x34f5,
-
- 0x34f7, 0x34f9, 0x34fc, 0x34fe, 0x3500, 0x3502, 0x3504, 0x3506,
- 0x3508, 0x350a, 0x350d, 0x350f, 0x3511, 0x3513, 0x3515, 0x3517,
- 0x3519, 0x351c, 0x351e, 0x3521, 0x3524, 0x3527, 0x3529, 0x352b,
- 0x352d, 0x352f, 0x3531, 0x3533, 0x3535, 0x3537, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x163f, 0x1642, 0x1646, 0x164b, 0x1650, 0x1653, 0x1659, 0x1660,
+ 0x1666, 0x166a, 0x1670, 0x1676, 0x167b, 0x167f, 0x1683, 0x1687,
+
+ 0x168c, 0x1692, 0x1697, 0x169b, 0x169f, 0x16a3, 0x16a6, 0x16a9,
+ 0x16ac, 0x16af, 0x16b3, 0x16b7, 0x16bd, 0x16c1, 0x16c6, 0x16cc,
+
+ 0x16d0, 0x16d3, 0x16d6, 0x16dc, 0x16e1, 0x16e7, 0x16eb, 0x16f1,
+ 0x16f4, 0x16f8, 0x16fc, 0x1700, 0x1704, 0x1708, 0x170d, 0x1711,
+
+ 0x1714, 0x1718, 0x171c, 0x1720, 0x1725, 0x1729, 0x172d, 0x1731,
+ 0x1737, 0x173c, 0x173f, 0x1745, 0x1748, 0x174d, 0x1752, 0x1756,
+
+ 0x175a, 0x175e, 0x1763, 0x1766, 0x176a, 0x176f, 0x1772, 0x1778,
+ 0x177c, 0x177f, 0x1782, 0x1785, 0x1788, 0x178b, 0x178e, 0x1791,
+
+ 0x1794, 0x1797, 0x179a, 0x179e, 0x17a2, 0x17a6, 0x17aa, 0x17ae,
+ 0x17b2, 0x17b6, 0x17ba, 0x17be, 0x17c2, 0x17c6, 0x17ca, 0x17ce,
+
+ 0x17d2, 0x17d6, 0x17da, 0x17dd, 0x17e0, 0x17e4, 0x17e7, 0x17ea,
+ 0x17ed, 0x17f1, 0x17f5, 0x17f8, 0x17fb, 0x17fe, 0x1801, 0x1804,
+
+ 0x1809, 0x180c, 0x180f, 0x1812, 0x1815, 0x1818, 0x181b, 0x181e,
+ 0x1821, 0x1825, 0x182a, 0x182d, 0x1830, 0x1833, 0x1836, 0x1839,
+
+ 0x183c, 0x183f, 0x1843, 0x1847, 0x184b, 0x184f, 0x1852, 0x1855,
+ 0x1858, 0x185b, 0x185e, 0x1861, 0x1864, 0x1867, 0x186a, 0x186d,
+
+ 0x1871, 0x1875, 0x1878, 0x187c, 0x1880, 0x1884, 0x1887, 0x188b,
+ 0x188f, 0x1894, 0x1897, 0x189b, 0x189f, 0x18a3, 0x18a7, 0x18ad,
+
+ 0x18b4, 0x18b7, 0x18ba, 0x18bd, 0x18c0, 0x18c3, 0x18c6, 0x18c9,
+ 0x18cc, 0x18cf, 0x18d2, 0x18d5, 0x18d8, 0x18db, 0x18de, 0x18e1,
+
+ 0x18e4, 0x18e7, 0x18ea, 0x18ef, 0x18f2, 0x18f5, 0x18f8, 0x18fd,
+ 0x1901, 0x1904, 0x1907, 0x190a, 0x190d, 0x1910, 0x1913, 0x1916,
+
+ 0x1919, 0x191c, 0x191f, 0x1923, 0x1926, 0x1929, 0x192d, 0x1931,
+ 0x1934, 0x1939, 0x193d, 0x1940, 0x1943, 0x1946, 0x1949, 0x194d,
+
+ 0x1951, 0x1954, 0x1957, 0x195a, 0x195d, 0x1960, 0x1963, 0x1966,
+ 0x1969, 0x196c, 0x1970, 0x1974, 0x1978, 0x197c, 0x1980, 0x1984,
+
+ 0x1988, 0x198c, 0x1990, 0x1994, 0x1998, 0x199c, 0x19a0, 0x19a4,
+ 0x19a8, 0x19ac, 0x19b0, 0x19b4, 0x19b8, 0x19bc, 0x19c0, 0x19c4,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0x19c8, 0x19ca, 0x19cc, 0x19ce, 0x19d0, 0x19d2, 0x19d4, 0x19d6,
+ 0x19d8, 0x19da, 0x19dc, 0x19de, 0x19e0, 0x19e2, 0x19e4, 0x19e6,
+ 0x19e8, 0x19ea, 0x19ec, 0x19ee, 0x19f0, 0x19f2, 0x19f4, 0x19f6,
+ 0x19f8, 0x19fa, 0x19fc, 0x19fe, 0x1a00, 0x1a02, 0x1a04, 0x1a06,
+ 0x1a08, 0x1a0a, 0x1a0c, 0x1a0e, 0x1a10, 0x1a12, 0x1a14, 0x1a16,
+ 0x1a18, 0x1a1a, 0x1a1c, 0x1a1e, 0x1a20, 0x1a22, 0x1a24, 0x1a26,
+ 0x1a28, 0x1a2a, 0x1a2c, 0x1a2e, 0x1a30, 0x1a32, 0x1a34, 0x1a36,
+ 0x1a38, 0x1a3a, 0x1a3c, 0x1a3e, 0x1a40, 0x1a42, 0x1a44, 0x1a46,
+ 0x1a48, 0x1a4a, 0x1a4c, 0x1a4e, 0x1a50, 0x1a52, 0x1a54, 0x1a56,
+ 0x1a58, 0x1a5a, 0x1a5c, 0x1a5e, 0x1a60, 0x1a62, 0x1a64, 0x1a66,
+ 0x1a68, 0x1a6a, 0x1a6c, 0x1a6e, 0x1a70, 0x1a72, 0x1a74, 0x1a76,
+ 0x1a78, 0x1a7a, 0x1a7c, 0x1a7e, 0x1a80, 0x1a82, 0x1a84, 0x1a86,
+ 0x1a88, 0x1a8a, 0x1a8c, 0x1a8e, 0x1a90, 0x1a92, 0x1a94, 0x1a96,
+ 0x1a98, 0x1a9a, 0x1a9c, 0x1a9e, 0x1aa0, 0x1aa2, 0x1aa4, 0x1aa6,
+ 0x1aa8, 0x1aaa, 0x1aac, 0x1aae, 0x1ab0, 0x1ab2, 0x1ab4, 0x1ab6,
+ 0x1ab8, 0x1aba, 0x1abc, 0x1abe, 0x1ac0, 0x1ac2, 0x1ac4, 0x1ac6,
+ 0x1ac8, 0x1aca, 0x1acc, 0x1ace, 0x1ad0, 0x1ad2, 0x1ad4, 0x1ad6,
+ 0x1ad8, 0x1ada, 0x1adc, 0x1ade, 0x1ae0, 0x1ae2, 0x1ae4, 0x1ae6,
+ 0x1ae8, 0x1aea, 0x1aec, 0x1aee, 0x1af0, 0x1af2, 0x1af4, 0x1af6,
+ 0x1af8, 0x1afa, 0x1afc, 0x1afe, 0x1b00, 0x1b02, 0x1b04, 0x1b06,
+ 0x1b08, 0x1b0a, 0x1b0c, 0x1b0e, 0x1b10, 0x1b12, 0x1b14, 0x1b16,
+ 0x1b18, 0x1b1a, 0x1b1c, 0x1b1e, 0x1b20, 0x1b22, 0x1b24, 0x1b26,
+ 0x1b28, 0x1b2a, 0x1b2c, 0x1b2e, 0x1b30, 0x1b32, 0x1b34, 0x1b36,
+ 0x1b38, 0x1b3a, 0x1b3c, 0x1b3e, 0x1b40, 0x1b42, 0x1b44, 0x1b46,
+ 0x1b48, 0x1b4a, 0x1b4c, 0x1b4e, 0x1b50, 0x1b52, 0x1b54, 0x1b56,
+ 0x1b58, 0x1b5a, 0x1b5c, 0x1b5e, 0x1b60, 0x1b62, 0x1b64, 0x1b66,
+ 0x1b68, 0x1b6a, 0x1b6c, 0x1b6e, 0x1b70, 0x1b72, 0x1b74, 0x1b76,
+ 0x1b78, 0x1b7a, 0x1b7c, 0x1b7e, 0x1b80, 0x1b82, 0x1b84, 0x1b86,
+ 0x1b88, 0x1b8a, 0x1b8c, 0x1b8e, 0x1b90, 0x1b92, 0x1b94, 0x1b96,
+ 0x1b98, 0x1b9a, 0x1b9c, 0x1b9e, 0x1ba0, 0x1ba2, 0x1ba4, 0x1ba6,
+ 0x1ba8, 0x1baa, 0x1bac, 0x1bae, 0x1bb0, 0x1bb2, 0x1bb4, 0x1bb6,
+ 0x1bb8, 0x1bba, 0x1bbc, 0x1bbe, 0x1bc0, 0x1bc2, 0x1bc4, 0x1bc6,
+
+ 0x1bc8, 0x1bca, 0x1bcc, 0x1bce, 0x1bd0, 0x1bd2, 0x1bd4, 0x1bd6,
+ 0x1bd8, 0x1bda, 0x1bdc, 0x1bde, 0x1be0, 0x1be2, 0xffff, 0xffff,
+ 0x1be4, 0xffff, 0x1be6, 0xffff, 0xffff, 0x1be8, 0x1bea, 0x1bec,
+ 0x1bee, 0x1bf0, 0x1bf2, 0x1bf4, 0x1bf6, 0x1bf8, 0x1bfa, 0xffff,
+ 0x1bfc, 0xffff, 0x1bfe, 0xffff, 0xffff, 0x1c00, 0x1c02, 0xffff,
+ 0xffff, 0xffff, 0x1c04, 0x1c06, 0x1c08, 0x1c0a, 0xffff, 0xffff,
+ 0x1c0c, 0x1c0e, 0x1c10, 0x1c12, 0x1c14, 0x1c16, 0x1c18, 0x1c1a,
+ 0x1c1c, 0x1c1e, 0x1c20, 0x1c22, 0x1c24, 0x1c26, 0x1c28, 0x1c2a,
+ 0x1c2c, 0x1c2e, 0x1c30, 0x1c32, 0x1c34, 0x1c36, 0x1c38, 0x1c3a,
+ 0x1c3c, 0x1c3e, 0x1c40, 0x1c42, 0x1c44, 0x1c46, 0x1c48, 0x1c4a,
+ 0x1c4c, 0x1c4e, 0x1c50, 0x1c52, 0x1c54, 0x1c56, 0x1c58, 0x1c5a,
+ 0x1c5c, 0x1c5e, 0x1c60, 0x1c62, 0x1c64, 0x1c66, 0x1c68, 0x1c6a,
+ 0x1c6c, 0x1c6e, 0x1c70, 0x1c72, 0x1c74, 0x1c76, 0x1c78, 0x1c7a,
+ 0x1c7c, 0x1c7e, 0x1c80, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x1c82, 0x1c84, 0x1c86, 0x1c88, 0x1c8a, 0x1c8c, 0x1c8e, 0x1c90,
+ 0x1c92, 0x1c94, 0x1c96, 0x1c98, 0x1c9a, 0x1c9c, 0x1c9e, 0x1ca0,
+ 0x1ca2, 0x1ca4, 0x1ca6, 0x1ca8, 0x1caa, 0x1cac, 0x1cae, 0x1cb0,
+ 0x1cb2, 0x1cb4, 0x1cb6, 0x1cb8, 0x1cba, 0x1cbc, 0x1cbe, 0x1cc0,
+ 0x1cc2, 0x1cc4, 0x1cc6, 0x1cc8, 0x1cca, 0x1ccc, 0x1cce, 0x1cd0,
+ 0x1cd2, 0x1cd4, 0x1cd6, 0x1cd8, 0x1cda, 0x1cdc, 0x1cde, 0x1ce0,
+ 0x1ce2, 0x1ce4, 0x1ce6, 0x1ce8, 0x1cea, 0x1cec, 0x1cee, 0x1cf0,
+ 0x1cf2, 0x1cf4, 0x1cf6, 0x1cf8, 0x1cfa, 0x1cfc, 0x1cfe, 0x1d00,
+ 0x1d02, 0x1d04, 0x1d06, 0x1d08, 0x1d0a, 0x1d0c, 0x1d0e, 0x1d10,
+ 0x1d12, 0x1d14, 0x1d16, 0x1d18, 0x1d1a, 0x1d1c, 0x1d1e, 0x1d20,
+ 0x1d22, 0x1d24, 0x1d26, 0x1d28, 0x1d2a, 0x1d2c, 0x1d2e, 0x1d30,
+ 0x1d32, 0x1d34, 0x1d36, 0x1d38, 0x1d3a, 0x1d3c, 0x1d3e, 0x1d40,
+ 0x1d43, 0x1d46, 0x1d49, 0x1d4b, 0x1d4d, 0x1d4f, 0x1d52, 0x1d55,
+ 0x1d58, 0x1d5a, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0x1d5c, 0x1d5f, 0x1d62, 0x1d65, 0x1d69, 0x1d6d, 0x1d70, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x1d73, 0x1d76, 0x1d79, 0x1d7c, 0x1d7f,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1d82, 0xffff, 0x1d85,
+ 0x1d88, 0x1d8a, 0x1d8c, 0x1d8e, 0x1d90, 0x1d92, 0x1d94, 0x1d96,
+ 0x1d98, 0x1d9a, 0x1d9c, 0x1d9f, 0x1da2, 0x1da5, 0x1da8, 0x1dab,
+ 0x1dae, 0x1db1, 0x1db4, 0x1db7, 0x1dba, 0x1dbd, 0x1dc0, 0xffff,
+ 0x1dc3, 0x1dc6, 0x1dc9, 0x1dcc, 0x1dcf, 0xffff, 0x1dd2, 0xffff,
+ 0x1dd5, 0x1dd8, 0xffff, 0x1ddb, 0x1dde, 0xffff, 0x1de1, 0x1de4,
+ 0x1de7, 0x1dea, 0x1ded, 0x1df0, 0x1df3, 0x1df6, 0x1df9, 0x1dfc,
+ 0x1dff, 0x1e01, 0x1e03, 0x1e05, 0x1e07, 0x1e09, 0x1e0b, 0x1e0d,
+ 0x1e0f, 0x1e11, 0x1e13, 0x1e15, 0x1e17, 0x1e19, 0x1e1b, 0x1e1d,
+ 0x1e1f, 0x1e21, 0x1e23, 0x1e25, 0x1e27, 0x1e29, 0x1e2b, 0x1e2d,
+ 0x1e2f, 0x1e31, 0x1e33, 0x1e35, 0x1e37, 0x1e39, 0x1e3b, 0x1e3d,
+ 0x1e3f, 0x1e41, 0x1e43, 0x1e45, 0x1e47, 0x1e49, 0x1e4b, 0x1e4d,
+ 0x1e4f, 0x1e51, 0x1e53, 0x1e55, 0x1e57, 0x1e59, 0x1e5b, 0x1e5d,
+ 0x1e5f, 0x1e61, 0x1e63, 0x1e65, 0x1e67, 0x1e69, 0x1e6b, 0x1e6d,
+ 0x1e6f, 0x1e71, 0x1e73, 0x1e75, 0x1e77, 0x1e79, 0x1e7b, 0x1e7d,
+ 0x1e7f, 0x1e81, 0x1e83, 0x1e85, 0x1e87, 0x1e89, 0x1e8b, 0x1e8d,
+ 0x1e8f, 0x1e91, 0x1e93, 0x1e95, 0x1e97, 0x1e99, 0x1e9b, 0x1e9d,
+ 0x1e9f, 0x1ea1, 0x1ea3, 0x1ea5, 0x1ea7, 0x1ea9, 0x1eab, 0x1ead,
+ 0x1eaf, 0x1eb1, 0x1eb3, 0x1eb5, 0x1eb7, 0x1eb9, 0x1ebb, 0x1ebd,
+ 0x1ebf, 0x1ec1, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x1ec3, 0x1ec5, 0x1ec7, 0x1ec9, 0x1ecb,
+ 0x1ecd, 0x1ecf, 0x1ed1, 0x1ed3, 0x1ed5, 0x1ed7, 0x1ed9, 0x1edb,
+ 0x1edd, 0x1edf, 0x1ee1, 0x1ee3, 0x1ee5, 0x1ee7, 0x1ee9, 0x1eeb,
+ 0x1eed, 0x1eef, 0x1ef1, 0x1ef4, 0x1ef7, 0x1efa, 0x1efd, 0x1f00,
+ 0x1f03, 0x1f06, 0x1f09, 0x1f0c, 0x1f0f, 0x1f12, 0x1f15, 0x1f18,
+ 0x1f1b, 0x1f1e, 0x1f21, 0x1f24, 0x1f27, 0x1f29, 0x1f2b, 0x1f2d,
+
+ 0x1f2f, 0x1f32, 0x1f35, 0x1f38, 0x1f3b, 0x1f3e, 0x1f41, 0x1f44,
+ 0x1f47, 0x1f4a, 0x1f4d, 0x1f50, 0x1f53, 0x1f56, 0x1f59, 0x1f5c,
+ 0x1f5f, 0x1f62, 0x1f65, 0x1f68, 0x1f6b, 0x1f6e, 0x1f71, 0x1f74,
+ 0x1f77, 0x1f7a, 0x1f7d, 0x1f80, 0x1f83, 0x1f86, 0x1f89, 0x1f8c,
+ 0x1f8f, 0x1f92, 0x1f95, 0x1f98, 0x1f9b, 0x1f9e, 0x1fa1, 0x1fa4,
+ 0x1fa7, 0x1faa, 0x1fad, 0x1fb0, 0x1fb3, 0x1fb6, 0x1fb9, 0x1fbc,
+ 0x1fbf, 0x1fc2, 0x1fc5, 0x1fc8, 0x1fcb, 0x1fce, 0x1fd1, 0x1fd4,
+ 0x1fd7, 0x1fda, 0x1fdd, 0x1fe0, 0x1fe3, 0x1fe6, 0x1fe9, 0x1fec,
+ 0x1fef, 0x1ff2, 0x1ff5, 0x1ff8, 0x1ffb, 0x1ffe, 0x2001, 0x2004,
+ 0x2007, 0x200a, 0x200d, 0x2010, 0x2013, 0x2016, 0x2019, 0x201c,
+ 0x201f, 0x2022, 0x2025, 0x2028, 0x202b, 0x202e, 0x2031, 0x2034,
+ 0x2037, 0x203a, 0x203d, 0x2040, 0x2043, 0x2046, 0x2049, 0x204d,
+ 0x2051, 0x2055, 0x2059, 0x205d, 0x2061, 0x2064, 0x2067, 0x206a,
+ 0x206d, 0x2070, 0x2073, 0x2076, 0x2079, 0x207c, 0x207f, 0x2082,
+ 0x2085, 0x2088, 0x208b, 0x208e, 0x2091, 0x2094, 0x2097, 0x209a,
+ 0x209d, 0x20a0, 0x20a3, 0x20a6, 0x20a9, 0x20ac, 0x20af, 0x20b2,
+ 0x20b5, 0x20b8, 0x20bb, 0x20be, 0x20c1, 0x20c4, 0x20c7, 0x20ca,
+ 0x20cd, 0x20d0, 0x20d3, 0x20d6, 0x20d9, 0x20dc, 0x20df, 0x20e2,
+ 0x20e5, 0x20e8, 0x20eb, 0x20ee, 0x20f1, 0x20f4, 0x20f7, 0x20fa,
+ 0x20fd, 0x2100, 0x2103, 0x2106, 0x2109, 0x210c, 0x210f, 0x2112,
+ 0x2115, 0x2118, 0x211b, 0x211e, 0x2121, 0x2124, 0x2127, 0x212a,
+ 0x212d, 0x2130, 0x2133, 0x2136, 0x2139, 0x213c, 0x213f, 0x2142,
+ 0x2145, 0x2148, 0x214b, 0x214e, 0x2151, 0x2154, 0x2157, 0x215a,
+ 0x215d, 0x2160, 0x2163, 0x2166, 0x2169, 0x216c, 0x216f, 0x2172,
+ 0x2175, 0x2178, 0x217b, 0x217e, 0x2181, 0x2184, 0x2187, 0x218a,
+ 0x218d, 0x2190, 0x2193, 0x2196, 0x2199, 0x219c, 0x219f, 0x21a2,
+ 0x21a5, 0x21a8, 0x21ab, 0x21ae, 0x21b1, 0x21b4, 0x21b7, 0x21ba,
+ 0x21bd, 0x21c0, 0x21c3, 0x21c6, 0x21c9, 0x21cc, 0x21cf, 0x21d2,
+ 0x21d5, 0x21d8, 0x21db, 0x21de, 0x21e1, 0x21e4, 0x21e7, 0x21ea,
+ 0x21ed, 0x21f0, 0x21f3, 0x21f6, 0x21f9, 0x21fc, 0x21ff, 0x2202,
+ 0x2205, 0x2208, 0x220b, 0x220f, 0x2213, 0x2217, 0x221a, 0x221d,
+ 0x2220, 0x2223, 0x2226, 0x2229, 0x222c, 0x222f, 0x2232, 0x2235,
+
+ 0x2238, 0x223b, 0x223e, 0x2241, 0x2244, 0x2247, 0x224a, 0x224d,
+ 0x2250, 0x2253, 0x2256, 0x2259, 0x225c, 0x225f, 0x2262, 0x2265,
+ 0x2268, 0x226b, 0x226e, 0x2271, 0x2274, 0x2277, 0x227a, 0x227d,
+ 0x2280, 0x2283, 0x2286, 0x2289, 0x228c, 0x228f, 0x2292, 0x2295,
+ 0x2298, 0x229b, 0x229e, 0x22a1, 0x22a4, 0x22a7, 0x22aa, 0x22ad,
+ 0x22b0, 0x22b3, 0x22b6, 0x22b9, 0x22bc, 0x22bf, 0x22c2, 0x22c5,
+ 0x22c8, 0x22cb, 0x22ce, 0x22d1, 0x22d4, 0x22d7, 0x22da, 0x22dd,
+ 0x22e0, 0x22e3, 0x22e6, 0x22e9, 0x22ec, 0x22ef, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x22f2, 0x22f6, 0x22fa, 0x22fe, 0x2302, 0x2306, 0x230a, 0x230e,
+ 0x2312, 0x2316, 0x231a, 0x231e, 0x2322, 0x2326, 0x232a, 0x232e,
+ 0x2332, 0x2336, 0x233a, 0x233e, 0x2342, 0x2346, 0x234a, 0x234e,
+ 0x2352, 0x2356, 0x235a, 0x235e, 0x2362, 0x2366, 0x236a, 0x236e,
+ 0x2372, 0x2376, 0x237a, 0x237e, 0x2382, 0x2386, 0x238a, 0x238e,
+ 0x2392, 0x2396, 0x239a, 0x239e, 0x23a2, 0x23a6, 0x23aa, 0x23ae,
+ 0x23b2, 0x23b6, 0x23ba, 0x23be, 0x23c2, 0x23c6, 0x23ca, 0x23ce,
+ 0x23d2, 0x23d6, 0x23da, 0x23de, 0x23e2, 0x23e6, 0x23ea, 0x23ee,
+ 0xffff, 0xffff, 0x23f2, 0x23f6, 0x23fa, 0x23fe, 0x2402, 0x2406,
+ 0x240a, 0x240e, 0x2412, 0x2416, 0x241a, 0x241e, 0x2422, 0x2426,
+ 0x242a, 0x242e, 0x2432, 0x2436, 0x243a, 0x243e, 0x2442, 0x2446,
+ 0x244a, 0x244e, 0x2452, 0x2456, 0x245a, 0x245e, 0x2462, 0x2466,
+ 0x246a, 0x246e, 0x2472, 0x2476, 0x247a, 0x247e, 0x2482, 0x2486,
+ 0x248a, 0x248e, 0x2492, 0x2496, 0x249a, 0x249e, 0x24a2, 0x24a6,
+ 0x24aa, 0x24ae, 0x24b2, 0x24b6, 0x24ba, 0x24be, 0x24c2, 0x24c6,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x24ca, 0x24ce, 0x24d2, 0x24d7, 0x24dc, 0x24e1, 0x24e6, 0x24eb,
+ 0x24f0, 0x24f5, 0x24f9, 0x250c, 0x2515, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x251a, 0x251c, 0x251e, 0x2520, 0x2522, 0x2524, 0x2526, 0x2528,
+ 0x252a, 0x252c, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x252e, 0x2530, 0x2532, 0x2534, 0x2536, 0x2538, 0x253a, 0x253c,
+ 0x253e, 0x2540, 0x2542, 0x2544, 0x2546, 0x2548, 0x254a, 0x254c,
+ 0x254e, 0x2550, 0x2552, 0x2554, 0x2556, 0xffff, 0xffff, 0x2558,
+ 0x255a, 0x255c, 0x255e, 0x2560, 0x2562, 0x2564, 0x2566, 0x2568,
+ 0x256a, 0x256c, 0x256e, 0xffff, 0x2570, 0x2572, 0x2574, 0x2576,
+ 0x2578, 0x257a, 0x257c, 0x257e, 0x2580, 0x2582, 0x2584, 0x2586,
+ 0x2588, 0x258a, 0x258c, 0x258e, 0x2590, 0x2592, 0x2594, 0xffff,
+ 0x2596, 0x2598, 0x259a, 0x259c, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x259e, 0x25a1, 0x25a4, 0xffff, 0x25a7, 0xffff, 0x25aa, 0x25ad,
+ 0x25b0, 0x25b3, 0x25b6, 0x25b9, 0x25bc, 0x25bf, 0x25c2, 0x25c5,
+ 0x25c8, 0x25ca, 0x25cc, 0x25ce, 0x25d0, 0x25d2, 0x25d4, 0x25d6,
+ 0x25d8, 0x25da, 0x25dc, 0x25de, 0x25e0, 0x25e2, 0x25e4, 0x25e6,
+ 0x25e8, 0x25ea, 0x25ec, 0x25ee, 0x25f0, 0x25f2, 0x25f4, 0x25f6,
+ 0x25f8, 0x25fa, 0x25fc, 0x25fe, 0x2600, 0x2602, 0x2604, 0x2606,
+ 0x2608, 0x260a, 0x260c, 0x260e, 0x2610, 0x2612, 0x2614, 0x2616,
+ 0x2618, 0x261a, 0x261c, 0x261e, 0x2620, 0x2622, 0x2624, 0x2626,
+ 0x2628, 0x262a, 0x262c, 0x262e, 0x2630, 0x2632, 0x2634, 0x2636,
+ 0x2638, 0x263a, 0x263c, 0x263e, 0x2640, 0x2642, 0x2644, 0x2646,
+ 0x2648, 0x264a, 0x264c, 0x264e, 0x2650, 0x2652, 0x2654, 0x2656,
+ 0x2658, 0x265a, 0x265c, 0x265e, 0x2660, 0x2662, 0x2664, 0x2666,
+ 0x2668, 0x266a, 0x266c, 0x266e, 0x2670, 0x2672, 0x2674, 0x2676,
+ 0x2678, 0x267a, 0x267c, 0x267e, 0x2680, 0x2682, 0x2684, 0x2686,
+ 0x2688, 0x268a, 0x268c, 0x268e, 0x2690, 0x2692, 0x2694, 0x2696,
+ 0x2698, 0x269a, 0x269c, 0x269e, 0x26a0, 0x26a2, 0x26a4, 0x26a6,
+ 0x26a8, 0x26aa, 0x26ac, 0x26ae, 0x26b0, 0x26b2, 0x26b5, 0x26b8,
+ 0x26bb, 0x26be, 0x26c1, 0x26c4, 0x26c7, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0x26ca, 0x26cc, 0x26ce, 0x26d0, 0x26d2, 0x26d4, 0x26d6,
+ 0x26d8, 0x26da, 0x26dc, 0x26de, 0x26e0, 0x26e2, 0x26e4, 0x26e6,
+ 0x26e8, 0x26ea, 0x26ec, 0x26ee, 0x26f0, 0x26f2, 0x26f4, 0x26f6,
+ 0x26f8, 0x26fa, 0x26fc, 0x26fe, 0x2700, 0x2702, 0x2704, 0x2706,
+ 0x2708, 0x270a, 0x270c, 0x270e, 0x2710, 0x2712, 0x2714, 0x2716,
+ 0x2718, 0x271a, 0x271c, 0x271e, 0x2720, 0x2722, 0x2724, 0x2726,
+ 0x2728, 0x272a, 0x272c, 0x272e, 0x2730, 0x2732, 0x2734, 0x2736,
+ 0x2738, 0x273a, 0x273c, 0x273e, 0x2740, 0x2742, 0x2744, 0x2746,
+ 0x2748, 0x274a, 0x274c, 0x274e, 0x2750, 0x2752, 0x2754, 0x2756,
+ 0x2758, 0x275a, 0x275c, 0x275e, 0x2760, 0x2762, 0x2764, 0x2766,
+ 0x2768, 0x276a, 0x276c, 0x276e, 0x2770, 0x2772, 0x2774, 0x2776,
+ 0x2778, 0x277a, 0x277c, 0x277e, 0x2780, 0x2782, 0x2784, 0x2786,
+ 0x2788, 0x278a, 0x278c, 0x278e, 0x2790, 0x2792, 0x2794, 0x2796,
+ 0x2798, 0x279a, 0x279c, 0x279e, 0x27a0, 0x27a2, 0x27a4, 0x27a6,
+ 0x27a8, 0x27aa, 0x27ac, 0x27ae, 0x27b0, 0x27b2, 0x27b4, 0x27b6,
+ 0x27b8, 0x27ba, 0x27bc, 0x27be, 0x27c0, 0x27c2, 0x27c4, 0x27c6,
+ 0x27c8, 0x27ca, 0x27cc, 0x27ce, 0x27d0, 0x27d2, 0x27d4, 0x27d6,
+ 0x27d8, 0x27da, 0x27dc, 0x27de, 0x27e0, 0x27e2, 0x27e4, 0x27e6,
+ 0x27e8, 0x27ea, 0x27ec, 0x27ee, 0x27f0, 0x27f2, 0x27f4, 0x27f6,
+ 0x27f8, 0x27fa, 0x27fc, 0x27fe, 0x2800, 0x2802, 0x2804, 0x2806,
+ 0x2808, 0x280a, 0x280c, 0x280e, 0x2810, 0x2812, 0x2814, 0x2816,
+ 0x2818, 0x281a, 0x281c, 0x281e, 0x2820, 0x2822, 0x2824, 0x2826,
+ 0x2828, 0x282a, 0x282c, 0x282e, 0x2830, 0x2832, 0x2834, 0x2836,
+ 0x2838, 0x283a, 0x283c, 0x283e, 0x2840, 0x2842, 0x2844, 0xffff,
+ 0xffff, 0xffff, 0x2846, 0x2848, 0x284a, 0x284c, 0x284e, 0x2850,
+ 0xffff, 0xffff, 0x2852, 0x2854, 0x2856, 0x2858, 0x285a, 0x285c,
+ 0xffff, 0xffff, 0x285e, 0x2860, 0x2862, 0x2864, 0x2866, 0x2868,
+ 0xffff, 0xffff, 0x286a, 0x286c, 0x286e, 0xffff, 0xffff, 0xffff,
+ 0x2870, 0x2872, 0x2874, 0x2876, 0x2878, 0x287a, 0x287c, 0xffff,
+ 0x287e, 0x2880, 0x2882, 0x2884, 0x2886, 0x2888, 0x288a, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x288c, 0x2891,
+ 0x2896, 0x289b, 0x28a0, 0x28a5, 0x28aa, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x28af, 0x28b4, 0x28b9, 0x28be, 0x28c3,
+ 0x28c8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0x28cd, 0x28cf, 0x28d1, 0x28d3, 0x28d5, 0x28d7, 0x28d9, 0x28db,
+ 0x28dd, 0x28df, 0x28e1, 0x28e3, 0x28e5, 0x28e7, 0x28e9, 0x28eb,
+ 0x28ed, 0x28ef, 0x28f1, 0x28f3, 0x28f5, 0x28f7, 0x28f9, 0x28fb,
+ 0x28fd, 0x28ff, 0x2901, 0x2903, 0x2905, 0x2907, 0x2909, 0x290b,
+ 0x290d, 0x290f, 0x2911, 0x2913, 0x2915, 0x2917, 0x2919, 0x291b,
+ 0x291d, 0x291f, 0x2921, 0x2923, 0x2925, 0x2927, 0x2929, 0x292b,
+ 0x292d, 0x292f, 0x2931, 0x2933, 0x2935, 0x2937, 0x2939, 0x293b,
+ 0x293d, 0x293f, 0x2941, 0x2943, 0x2945, 0x2947, 0x2949, 0x294b,
+ 0x294d, 0x294f, 0x2951, 0x2953, 0x2955, 0x2957, 0x2959, 0x295b,
+ 0x295d, 0x295f, 0x2961, 0x2963, 0x2965, 0x2967, 0x2969, 0x296b,
+ 0x296d, 0x296f, 0x2971, 0x2973, 0x2975, 0xffff, 0x2977, 0x2979,
+ 0x297b, 0x297d, 0x297f, 0x2981, 0x2983, 0x2985, 0x2987, 0x2989,
+ 0x298b, 0x298d, 0x298f, 0x2991, 0x2993, 0x2995, 0x2997, 0x2999,
+ 0x299b, 0x299d, 0x299f, 0x29a1, 0x29a3, 0x29a5, 0x29a7, 0x29a9,
+ 0x29ab, 0x29ad, 0x29af, 0x29b1, 0x29b3, 0x29b5, 0x29b7, 0x29b9,
+ 0x29bb, 0x29bd, 0x29bf, 0x29c1, 0x29c3, 0x29c5, 0x29c7, 0x29c9,
+ 0x29cb, 0x29cd, 0x29cf, 0x29d1, 0x29d3, 0x29d5, 0x29d7, 0x29d9,
+ 0x29db, 0x29dd, 0x29df, 0x29e1, 0x29e3, 0x29e5, 0x29e7, 0x29e9,
+ 0x29eb, 0x29ed, 0x29ef, 0x29f1, 0x29f3, 0x29f5, 0x29f7, 0x29f9,
+ 0x29fb, 0x29fd, 0x29ff, 0x2a01, 0x2a03, 0xffff, 0x2a05, 0x2a07,
+ 0xffff, 0xffff, 0x2a09, 0xffff, 0xffff, 0x2a0b, 0x2a0d, 0xffff,
+ 0xffff, 0x2a0f, 0x2a11, 0x2a13, 0x2a15, 0xffff, 0x2a17, 0x2a19,
+ 0x2a1b, 0x2a1d, 0x2a1f, 0x2a21, 0x2a23, 0x2a25, 0x2a27, 0x2a29,
+ 0x2a2b, 0x2a2d, 0xffff, 0x2a2f, 0xffff, 0x2a31, 0x2a33, 0x2a35,
+ 0x2a37, 0x2a39, 0x2a3b, 0x2a3d, 0xffff, 0x2a3f, 0x2a41, 0x2a43,
+ 0x2a45, 0x2a47, 0x2a49, 0x2a4b, 0x2a4d, 0x2a4f, 0x2a51, 0x2a53,
+ 0x2a55, 0x2a57, 0x2a59, 0x2a5b, 0x2a5d, 0x2a5f, 0x2a61, 0x2a63,
+ 0x2a65, 0x2a67, 0x2a69, 0x2a6b, 0x2a6d, 0x2a6f, 0x2a71, 0x2a73,
+ 0x2a75, 0x2a77, 0x2a79, 0x2a7b, 0x2a7d, 0x2a7f, 0x2a81, 0x2a83,
+ 0x2a85, 0x2a87, 0x2a89, 0x2a8b, 0x2a8d, 0x2a8f, 0x2a91, 0x2a93,
+ 0x2a95, 0x2a97, 0x2a99, 0x2a9b, 0x2a9d, 0x2a9f, 0x2aa1, 0x2aa3,
+ 0x2aa5, 0x2aa7, 0x2aa9, 0x2aab, 0x2aad, 0x2aaf, 0x2ab1, 0x2ab3,
+
+ 0x2ab5, 0x2ab7, 0x2ab9, 0x2abb, 0x2abd, 0x2abf, 0xffff, 0x2ac1,
+ 0x2ac3, 0x2ac5, 0x2ac7, 0xffff, 0xffff, 0x2ac9, 0x2acb, 0x2acd,
+ 0x2acf, 0x2ad1, 0x2ad3, 0x2ad5, 0x2ad7, 0xffff, 0x2ad9, 0x2adb,
+ 0x2add, 0x2adf, 0x2ae1, 0x2ae3, 0x2ae5, 0xffff, 0x2ae7, 0x2ae9,
+ 0x2aeb, 0x2aed, 0x2aef, 0x2af1, 0x2af3, 0x2af5, 0x2af7, 0x2af9,
+ 0x2afb, 0x2afd, 0x2aff, 0x2b01, 0x2b03, 0x2b05, 0x2b07, 0x2b09,
+ 0x2b0b, 0x2b0d, 0x2b0f, 0x2b11, 0x2b13, 0x2b15, 0x2b17, 0x2b19,
+ 0x2b1b, 0x2b1d, 0xffff, 0x2b1f, 0x2b21, 0x2b23, 0x2b25, 0xffff,
+ 0x2b27, 0x2b29, 0x2b2b, 0x2b2d, 0x2b2f, 0xffff, 0x2b31, 0xffff,
+ 0xffff, 0xffff, 0x2b33, 0x2b35, 0x2b37, 0x2b39, 0x2b3b, 0x2b3d,
+ 0x2b3f, 0xffff, 0x2b41, 0x2b43, 0x2b45, 0x2b47, 0x2b49, 0x2b4b,
+ 0x2b4d, 0x2b4f, 0x2b51, 0x2b53, 0x2b55, 0x2b57, 0x2b59, 0x2b5b,
+ 0x2b5d, 0x2b5f, 0x2b61, 0x2b63, 0x2b65, 0x2b67, 0x2b69, 0x2b6b,
+ 0x2b6d, 0x2b6f, 0x2b71, 0x2b73, 0x2b75, 0x2b77, 0x2b79, 0x2b7b,
+ 0x2b7d, 0x2b7f, 0x2b81, 0x2b83, 0x2b85, 0x2b87, 0x2b89, 0x2b8b,
+ 0x2b8d, 0x2b8f, 0x2b91, 0x2b93, 0x2b95, 0x2b97, 0x2b99, 0x2b9b,
+ 0x2b9d, 0x2b9f, 0x2ba1, 0x2ba3, 0x2ba5, 0x2ba7, 0x2ba9, 0x2bab,
+ 0x2bad, 0x2baf, 0x2bb1, 0x2bb3, 0x2bb5, 0x2bb7, 0x2bb9, 0x2bbb,
+ 0x2bbd, 0x2bbf, 0x2bc1, 0x2bc3, 0x2bc5, 0x2bc7, 0x2bc9, 0x2bcb,
+ 0x2bcd, 0x2bcf, 0x2bd1, 0x2bd3, 0x2bd5, 0x2bd7, 0x2bd9, 0x2bdb,
+ 0x2bdd, 0x2bdf, 0x2be1, 0x2be3, 0x2be5, 0x2be7, 0x2be9, 0x2beb,
+ 0x2bed, 0x2bef, 0x2bf1, 0x2bf3, 0x2bf5, 0x2bf7, 0x2bf9, 0x2bfb,
+ 0x2bfd, 0x2bff, 0x2c01, 0x2c03, 0x2c05, 0x2c07, 0x2c09, 0x2c0b,
+ 0x2c0d, 0x2c0f, 0x2c11, 0x2c13, 0x2c15, 0x2c17, 0x2c19, 0x2c1b,
+ 0x2c1d, 0x2c1f, 0x2c21, 0x2c23, 0x2c25, 0x2c27, 0x2c29, 0x2c2b,
+ 0x2c2d, 0x2c2f, 0x2c31, 0x2c33, 0x2c35, 0x2c37, 0x2c39, 0x2c3b,
+ 0x2c3d, 0x2c3f, 0x2c41, 0x2c43, 0x2c45, 0x2c47, 0x2c49, 0x2c4b,
+ 0x2c4d, 0x2c4f, 0x2c51, 0x2c53, 0x2c55, 0x2c57, 0x2c59, 0x2c5b,
+ 0x2c5d, 0x2c5f, 0x2c61, 0x2c63, 0x2c65, 0x2c67, 0x2c69, 0x2c6b,
+ 0x2c6d, 0x2c6f, 0x2c71, 0x2c73, 0x2c75, 0x2c77, 0x2c79, 0x2c7b,
+ 0x2c7d, 0x2c7f, 0x2c81, 0x2c83, 0x2c85, 0x2c87, 0x2c89, 0x2c8b,
+ 0x2c8d, 0x2c8f, 0x2c91, 0x2c93, 0x2c95, 0x2c97, 0x2c99, 0x2c9b,
+
+ 0x2c9d, 0x2c9f, 0x2ca1, 0x2ca3, 0x2ca5, 0x2ca7, 0x2ca9, 0x2cab,
+ 0x2cad, 0x2caf, 0x2cb1, 0x2cb3, 0x2cb5, 0x2cb7, 0x2cb9, 0x2cbb,
+ 0x2cbd, 0x2cbf, 0x2cc1, 0x2cc3, 0x2cc5, 0x2cc7, 0x2cc9, 0x2ccb,
+ 0x2ccd, 0x2ccf, 0x2cd1, 0x2cd3, 0x2cd5, 0x2cd7, 0x2cd9, 0x2cdb,
+ 0x2cdd, 0x2cdf, 0x2ce1, 0x2ce3, 0x2ce5, 0x2ce7, 0x2ce9, 0x2ceb,
+ 0x2ced, 0x2cef, 0x2cf1, 0x2cf3, 0x2cf5, 0x2cf7, 0x2cf9, 0x2cfb,
+ 0x2cfd, 0x2cff, 0x2d01, 0x2d03, 0x2d05, 0x2d07, 0x2d09, 0x2d0b,
+ 0x2d0d, 0x2d0f, 0x2d11, 0x2d13, 0x2d15, 0x2d17, 0x2d19, 0x2d1b,
+ 0x2d1d, 0x2d1f, 0x2d21, 0x2d23, 0x2d25, 0x2d27, 0x2d29, 0x2d2b,
+ 0x2d2d, 0x2d2f, 0x2d31, 0x2d33, 0x2d35, 0x2d37, 0x2d39, 0x2d3b,
+ 0x2d3d, 0x2d3f, 0x2d41, 0x2d43, 0x2d45, 0x2d47, 0x2d49, 0x2d4b,
+ 0x2d4d, 0x2d4f, 0x2d51, 0x2d53, 0x2d55, 0x2d57, 0x2d59, 0x2d5b,
+ 0x2d5d, 0x2d5f, 0x2d61, 0x2d63, 0x2d65, 0x2d67, 0x2d69, 0x2d6b,
+ 0x2d6d, 0x2d6f, 0x2d71, 0x2d73, 0x2d75, 0x2d77, 0x2d79, 0x2d7b,
+ 0x2d7d, 0x2d7f, 0x2d81, 0x2d83, 0x2d85, 0x2d87, 0x2d89, 0x2d8b,
+ 0x2d8d, 0x2d8f, 0x2d91, 0x2d93, 0x2d95, 0x2d97, 0x2d99, 0x2d9b,
+ 0x2d9d, 0x2d9f, 0x2da1, 0x2da3, 0x2da5, 0x2da7, 0x2da9, 0x2dab,
+ 0x2dad, 0x2daf, 0x2db1, 0x2db3, 0x2db5, 0x2db7, 0x2db9, 0x2dbb,
+ 0x2dbd, 0x2dbf, 0x2dc1, 0x2dc3, 0x2dc5, 0x2dc7, 0x2dc9, 0x2dcb,
+ 0x2dcd, 0x2dcf, 0x2dd1, 0x2dd3, 0x2dd5, 0x2dd7, 0x2dd9, 0x2ddb,
+ 0x2ddd, 0x2ddf, 0x2de1, 0x2de3, 0x2de5, 0x2de7, 0xffff, 0xffff,
+ 0x2de9, 0x2deb, 0x2ded, 0x2def, 0x2df1, 0x2df3, 0x2df5, 0x2df7,
+ 0x2df9, 0x2dfb, 0x2dfd, 0x2dff, 0x2e01, 0x2e03, 0x2e05, 0x2e07,
+ 0x2e09, 0x2e0b, 0x2e0d, 0x2e0f, 0x2e11, 0x2e13, 0x2e15, 0x2e17,
+ 0x2e19, 0x2e1b, 0x2e1d, 0x2e1f, 0x2e21, 0x2e23, 0x2e25, 0x2e27,
+ 0x2e29, 0x2e2b, 0x2e2d, 0x2e2f, 0x2e31, 0x2e33, 0x2e35, 0x2e37,
+ 0x2e39, 0x2e3b, 0x2e3d, 0x2e3f, 0x2e41, 0x2e43, 0x2e45, 0x2e47,
+ 0x2e49, 0x2e4b, 0x2e4d, 0x2e4f, 0x2e51, 0x2e53, 0x2e55, 0x2e57,
+ 0x2e59, 0x2e5b, 0x2e5d, 0x2e5f, 0x2e61, 0x2e63, 0x2e65, 0x2e67,
+ 0x2e69, 0x2e6b, 0x2e6d, 0x2e6f, 0x2e71, 0x2e73, 0x2e75, 0x2e77,
+ 0x2e79, 0x2e7b, 0x2e7d, 0x2e7f, 0x2e81, 0x2e83, 0x2e85, 0x2e87,
+ 0x2e89, 0x2e8b, 0x2e8d, 0x2e8f, 0x2e91, 0x2e93, 0x2e95, 0x2e97,
+
+ 0x2e99, 0x2e9b, 0x2e9d, 0x2e9f, 0x2ea1, 0x2ea3, 0x2ea5, 0x2ea7,
+ 0x2ea9, 0x2eab, 0x2ead, 0x2eaf, 0x2eb1, 0x2eb3, 0x2eb5, 0x2eb7,
+ 0x2eb9, 0x2ebb, 0x2ebd, 0x2ebf, 0x2ec1, 0x2ec3, 0x2ec5, 0x2ec7,
+ 0x2ec9, 0x2ecb, 0x2ecd, 0x2ecf, 0x2ed1, 0x2ed3, 0x2ed5, 0x2ed7,
+ 0x2ed9, 0x2edb, 0x2edd, 0x2edf, 0x2ee1, 0x2ee3, 0x2ee5, 0x2ee7,
+ 0x2ee9, 0x2eeb, 0x2eed, 0x2eef, 0x2ef1, 0x2ef3, 0x2ef5, 0x2ef7,
+ 0x2ef9, 0x2efb, 0x2efd, 0x2eff, 0x2f01, 0x2f03, 0x2f05, 0x2f07,
+ 0x2f09, 0x2f0b, 0x2f0d, 0x2f0f, 0x2f11, 0x2f13, 0x2f15, 0x2f17,
+ 0x2f19, 0x2f1b, 0x2f1d, 0x2f1f, 0x2f21, 0x2f23, 0x2f25, 0x2f27,
+ 0x2f29, 0x2f2b, 0x2f2d, 0x2f2f, 0x2f31, 0x2f33, 0x2f35, 0x2f37,
+ 0x2f39, 0x2f3b, 0x2f3d, 0x2f3f, 0x2f41, 0x2f43, 0x2f45, 0x2f47,
+ 0x2f49, 0x2f4b, 0x2f4d, 0x2f4f, 0x2f51, 0x2f53, 0x2f55, 0x2f57,
+ 0x2f59, 0x2f5b, 0x2f5d, 0x2f5f, 0x2f61, 0x2f63, 0x2f65, 0x2f67,
+ 0x2f69, 0x2f6b, 0x2f6d, 0x2f6f, 0x2f71, 0x2f73, 0x2f75, 0x2f77,
+ 0x2f79, 0x2f7b, 0x2f7d, 0x2f7f, 0x2f81, 0x2f83, 0x2f85, 0x2f87,
+ 0x2f89, 0x2f8b, 0x2f8d, 0x2f8f, 0x2f91, 0x2f93, 0x2f95, 0x2f97,
+ 0x2f99, 0x2f9b, 0x2f9d, 0x2f9f, 0x2fa1, 0x2fa3, 0x2fa5, 0x2fa7,
+ 0x2fa9, 0x2fab, 0x2fad, 0x2faf, 0x2fb1, 0x2fb3, 0x2fb5, 0x2fb7,
+ 0x2fb9, 0x2fbb, 0x2fbd, 0x2fbf, 0x2fc1, 0x2fc3, 0x2fc5, 0x2fc7,
+ 0x2fc9, 0x2fcb, 0x2fcd, 0x2fcf, 0x2fd1, 0x2fd3, 0x2fd5, 0x2fd7,
+ 0x2fd9, 0x2fdb, 0x2fdd, 0x2fdf, 0x2fe1, 0x2fe3, 0x2fe5, 0x2fe7,
+ 0x2fe9, 0x2feb, 0x2fed, 0x2fef, 0x2ff1, 0x2ff3, 0x2ff5, 0x2ff7,
+ 0x2ff9, 0x2ffb, 0x2ffd, 0x2fff, 0x3001, 0x3003, 0x3005, 0x3007,
+ 0x3009, 0x300b, 0x300d, 0x300f, 0x3011, 0x3013, 0x3015, 0x3017,
+ 0x3019, 0x301b, 0x301d, 0x301f, 0x3021, 0x3023, 0x3025, 0x3027,
+ 0x3029, 0x302b, 0x302d, 0x302f, 0xffff, 0xffff, 0x3031, 0x3033,
+ 0x3035, 0x3037, 0x3039, 0x303b, 0x303d, 0x303f, 0x3041, 0x3043,
+ 0x3045, 0x3047, 0x3049, 0x304b, 0x304d, 0x304f, 0x3051, 0x3053,
+ 0x3055, 0x3057, 0x3059, 0x305b, 0x305d, 0x305f, 0x3061, 0x3063,
+ 0x3065, 0x3067, 0x3069, 0x306b, 0x306d, 0x306f, 0x3071, 0x3073,
+ 0x3075, 0x3077, 0x3079, 0x307b, 0x307d, 0x307f, 0x3081, 0x3083,
+ 0x3085, 0x3087, 0x3089, 0x308b, 0x308d, 0x308f, 0x3091, 0x3093,
+
+ 0x3095, 0x3097, 0x3099, 0x309b, 0x309e, 0x30a0, 0x30a2, 0x30a4,
+ 0x30a6, 0x30a8, 0x30aa, 0x30ac, 0x30ae, 0x30b0, 0x30b3, 0x30b5,
+ 0x30b7, 0x30b9, 0x30bb, 0x30be, 0x30c0, 0x30c2, 0x30c4, 0x30c7,
+ 0x30c9, 0x30cb, 0x30cd, 0x30cf, 0x30d1, 0x30d4, 0x30d6, 0x30d8,
+ 0x30da, 0x30dc, 0x30de, 0x30e0, 0x30e2, 0x30e4, 0x30e6, 0x30e8,
+ 0x30ea, 0x30ec, 0x30ee, 0x30f0, 0x30f2, 0x30f4, 0x30f6, 0x30f8,
+ 0x30fa, 0x30fc, 0x30fe, 0x3100, 0x3102, 0x3105, 0x3107, 0x3109,
+ 0x310b, 0x310e, 0x3110, 0x3112, 0x3114, 0x3116, 0x3118, 0x311a,
+ 0x311c, 0x311e, 0x3120, 0x3122, 0x3124, 0x3126, 0x3128, 0x312a,
+ 0x312c, 0x312e, 0x3130, 0x3132, 0x3134, 0x3136, 0x3138, 0x313a,
+ 0x313c, 0x313e, 0x3140, 0x3142, 0x3144, 0x3146, 0x3148, 0x314a,
+ 0x314c, 0x314e, 0x3151, 0x3153, 0x3155, 0x3157, 0x3159, 0x315b,
+ 0x315d, 0x3160, 0x3163, 0x3165, 0x3167, 0x3169, 0x316b, 0x316d,
+ 0x316f, 0x3171, 0x3173, 0x3175, 0x3177, 0x317a, 0x317c, 0x317e,
+ 0x3180, 0x3182, 0x3185, 0x3187, 0x3189, 0x318b, 0x318d, 0x318f,
+ 0x3191, 0x3193, 0x3195, 0x3197, 0x319a, 0x319c, 0x319f, 0x31a1,
+ 0x31a3, 0x31a5, 0x31a7, 0x31a9, 0x31ab, 0x31ad, 0x31af, 0x31b1,
+ 0x31b3, 0x31b5, 0x31b8, 0x31ba, 0x31bc, 0x31be, 0x31c0, 0x31c2,
+ 0x31c5, 0x31c7, 0x31ca, 0x31cd, 0x31cf, 0x31d1, 0x31d3, 0x31d5,
+ 0x31d8, 0x31db, 0x31dd, 0x31df, 0x31e1, 0x31e3, 0x31e5, 0x31e7,
+ 0x31e9, 0x31eb, 0x31ed, 0x31ef, 0x31f1, 0x31f4, 0x31f6, 0x31f8,
+ 0x31fa, 0x31fc, 0x31fe, 0x3200, 0x3202, 0x3204, 0x3206, 0x3208,
+ 0x320a, 0x320c, 0x320e, 0x3210, 0x3212, 0x3214, 0x3216, 0x3218,
+ 0x321a, 0x321d, 0x321f, 0x3221, 0x3223, 0x3225, 0x3227, 0x322a,
+ 0x322c, 0x322e, 0x3230, 0x3232, 0x3234, 0x3236, 0x3238, 0x323a,
+ 0x323c, 0x323e, 0x3240, 0x3243, 0x3245, 0x3247, 0x3249, 0x324b,
+ 0x324d, 0x324f, 0x3251, 0x3253, 0x3255, 0x3257, 0x3259, 0x325b,
+ 0x325d, 0x325f, 0x3261, 0x3263, 0x3265, 0x3267, 0x326a, 0x326c,
+ 0x326e, 0x3270, 0x3272, 0x3274, 0x3277, 0x3279, 0x327b, 0x327d,
+ 0x327f, 0x3281, 0x3283, 0x3285, 0x3287, 0x328a, 0x328c, 0x328e,
+ 0x3290, 0x3293, 0x3295, 0x3297, 0x3299, 0x329b, 0x329d, 0x329f,
+ 0x32a2, 0x32a5, 0x32a8, 0x32aa, 0x32ad, 0x32af, 0x32b1, 0x32b3,
+
+ 0x32b5, 0x32b7, 0x32b9, 0x32bb, 0x32bd, 0x32bf, 0x32c1, 0x32c4,
+ 0x32c6, 0x32c8, 0x32ca, 0x32cc, 0x32ce, 0x32d0, 0x32d3, 0x32d5,
+ 0x32d7, 0x32da, 0x32dd, 0x32df, 0x32e1, 0x32e3, 0x32e5, 0x32e7,
+ 0x32e9, 0x32eb, 0x32ed, 0x32ef, 0x32f2, 0x32f4, 0x32f7, 0x32f9,
+ 0x32fc, 0x32fe, 0x3300, 0x3302, 0x3305, 0x3307, 0x3309, 0x330c,
+ 0x330f, 0x3311, 0x3313, 0x3315, 0x3317, 0x3319, 0x331b, 0x331d,
+ 0x331f, 0x3321, 0x3323, 0x3325, 0x3327, 0x3329, 0x332c, 0x332e,
+ 0x3331, 0x3333, 0x3336, 0x3338, 0x333b, 0x333e, 0x3341, 0x3343,
+ 0x3345, 0x3347, 0x334a, 0x334d, 0x3350, 0x3353, 0x3355, 0x3357,
+ 0x3359, 0x335b, 0x335d, 0x335f, 0x3361, 0x3363, 0x3366, 0x3368,
+ 0x336a, 0x336c, 0x336e, 0x3371, 0x3373, 0x3376, 0x3379, 0x337b,
+ 0x337d, 0x337f, 0x3381, 0x3383, 0x3385, 0x3388, 0x338b, 0x338e,
+ 0x3390, 0x3392, 0x3395, 0x3397, 0x3399, 0x339b, 0x339e, 0x33a0,
+ 0x33a2, 0x33a4, 0x33a6, 0x33a8, 0x33ab, 0x33ad, 0x33af, 0x33b1,
+ 0x33b3, 0x33b5, 0x33b7, 0x33ba, 0x33bd, 0x33bf, 0x33c2, 0x33c4,
+ 0x33c7, 0x33c9, 0x33cb, 0x33cd, 0x33d0, 0x33d3, 0x33d5, 0x33d8,
+ 0x33da, 0x33dd, 0x33df, 0x33e1, 0x33e3, 0x33e5, 0x33e7, 0x33e9,
+ 0x33ec, 0x33ef, 0x33f2, 0x33f5, 0x33f7, 0x33f9, 0x33fb, 0x33fd,
+ 0x33ff, 0x3401, 0x3403, 0x3405, 0x3407, 0x3409, 0x340b, 0x340d,
+ 0x3410, 0x3412, 0x3414, 0x3416, 0x3418, 0x341a, 0x341c, 0x341e,
+ 0x3420, 0x3422, 0x3424, 0x3426, 0x3428, 0x342b, 0x342e, 0x3431,
+ 0x3433, 0x3435, 0x3437, 0x3439, 0x343c, 0x343e, 0x3441, 0x3443,
+ 0x3445, 0x3448, 0x344b, 0x344d, 0x344f, 0x3451, 0x3453, 0x3455,
+ 0x3457, 0x3459, 0x345b, 0x345d, 0x345f, 0x3461, 0x3463, 0x3465,
+ 0x3467, 0x3469, 0x346b, 0x346d, 0x346f, 0x3471, 0x3474, 0x3476,
+ 0x3478, 0x347a, 0x347c, 0x347e, 0x3481, 0x3484, 0x3486, 0x3488,
+ 0x348a, 0x348c, 0x348e, 0x3490, 0x3493, 0x3495, 0x3497, 0x3499,
+ 0x349b, 0x349e, 0x34a1, 0x34a3, 0x34a5, 0x34a7, 0x34aa, 0x34ac,
+ 0x34ae, 0x34b1, 0x34b4, 0x34b6, 0x34b8, 0x34ba, 0x34bd, 0x34bf,
+ 0x34c1, 0x34c3, 0x34c5, 0x34c7, 0x34c9, 0x34cb, 0x34ce, 0x34d0,
+ 0x34d2, 0x34d4, 0x34d7, 0x34d9, 0x34db, 0x34dd, 0x34df, 0x34e2,
+ 0x34e5, 0x34e7, 0x34e9, 0x34eb, 0x34ee, 0x34f0, 0x34f3, 0x34f5,
+
+ 0x34f7, 0x34f9, 0x34fc, 0x34fe, 0x3500, 0x3502, 0x3504, 0x3506,
+ 0x3508, 0x350a, 0x350d, 0x350f, 0x3511, 0x3513, 0x3515, 0x3517,
+ 0x3519, 0x351c, 0x351e, 0x3521, 0x3524, 0x3527, 0x3529, 0x352b,
+ 0x352d, 0x352f, 0x3531, 0x3533, 0x3535, 0x3537, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
};
#define GET_DECOMPOSITION_INDEX(ucs4) \
@@ -5833,2113 +5834,2113 @@ static const unsigned short uc_decomposition_trie[] = {
static const unsigned short uc_decomposition_map[] = {
- 0x103, 0x20, 0x210, 0x20, 0x308, 0x109, 0x61, 0x210,
- 0x20, 0x304, 0x109, 0x32, 0x109, 0x33, 0x210, 0x20,
- 0x301, 0x110, 0x3bc, 0x210, 0x20, 0x327, 0x109, 0x31,
- 0x109, 0x6f, 0x311, 0x31, 0x2044, 0x34, 0x311, 0x31,
- 0x2044, 0x32, 0x311, 0x33, 0x2044, 0x34, 0x201, 0x41,
- 0x300, 0x201, 0x41, 0x301, 0x201, 0x41, 0x302, 0x201,
- 0x41, 0x303, 0x201, 0x41, 0x308, 0x201, 0x41, 0x30a,
- 0x201, 0x43, 0x327, 0x201, 0x45, 0x300, 0x201, 0x45,
- 0x301, 0x201, 0x45, 0x302, 0x201, 0x45, 0x308, 0x201,
- 0x49, 0x300, 0x201, 0x49, 0x301, 0x201, 0x49, 0x302,
- 0x201, 0x49, 0x308, 0x201, 0x4e, 0x303, 0x201, 0x4f,
- 0x300, 0x201, 0x4f, 0x301, 0x201, 0x4f, 0x302, 0x201,
- 0x4f, 0x303, 0x201, 0x4f, 0x308, 0x201, 0x55, 0x300,
- 0x201, 0x55, 0x301, 0x201, 0x55, 0x302, 0x201, 0x55,
- 0x308, 0x201, 0x59, 0x301, 0x201, 0x61, 0x300, 0x201,
- 0x61, 0x301, 0x201, 0x61, 0x302, 0x201, 0x61, 0x303,
- 0x201, 0x61, 0x308, 0x201, 0x61, 0x30a, 0x201, 0x63,
- 0x327, 0x201, 0x65, 0x300, 0x201, 0x65, 0x301, 0x201,
- 0x65, 0x302, 0x201, 0x65, 0x308, 0x201, 0x69, 0x300,
- 0x201, 0x69, 0x301, 0x201, 0x69, 0x302, 0x201, 0x69,
- 0x308, 0x201, 0x6e, 0x303, 0x201, 0x6f, 0x300, 0x201,
- 0x6f, 0x301, 0x201, 0x6f, 0x302, 0x201, 0x6f, 0x303,
- 0x201, 0x6f, 0x308, 0x201, 0x75, 0x300, 0x201, 0x75,
- 0x301, 0x201, 0x75, 0x302, 0x201, 0x75, 0x308, 0x201,
- 0x79, 0x301, 0x201, 0x79, 0x308, 0x201, 0x41, 0x304,
- 0x201, 0x61, 0x304, 0x201, 0x41, 0x306, 0x201, 0x61,
- 0x306, 0x201, 0x41, 0x328, 0x201, 0x61, 0x328, 0x201,
- 0x43, 0x301, 0x201, 0x63, 0x301, 0x201, 0x43, 0x302,
- 0x201, 0x63, 0x302, 0x201, 0x43, 0x307, 0x201, 0x63,
- 0x307, 0x201, 0x43, 0x30c, 0x201, 0x63, 0x30c, 0x201,
- 0x44, 0x30c, 0x201, 0x64, 0x30c, 0x201, 0x45, 0x304,
- 0x201, 0x65, 0x304, 0x201, 0x45, 0x306, 0x201, 0x65,
- 0x306, 0x201, 0x45, 0x307, 0x201, 0x65, 0x307, 0x201,
- 0x45, 0x328, 0x201, 0x65, 0x328, 0x201, 0x45, 0x30c,
- 0x201, 0x65, 0x30c, 0x201, 0x47, 0x302, 0x201, 0x67,
- 0x302, 0x201, 0x47, 0x306, 0x201, 0x67, 0x306, 0x201,
- 0x47, 0x307, 0x201, 0x67, 0x307, 0x201, 0x47, 0x327,
- 0x201, 0x67, 0x327, 0x201, 0x48, 0x302, 0x201, 0x68,
- 0x302, 0x201, 0x49, 0x303, 0x201, 0x69, 0x303, 0x201,
- 0x49, 0x304, 0x201, 0x69, 0x304, 0x201, 0x49, 0x306,
- 0x201, 0x69, 0x306, 0x201, 0x49, 0x328, 0x201, 0x69,
- 0x328, 0x201, 0x49, 0x307, 0x210, 0x49, 0x4a, 0x210,
- 0x69, 0x6a, 0x201, 0x4a, 0x302, 0x201, 0x6a, 0x302,
- 0x201, 0x4b, 0x327, 0x201, 0x6b, 0x327, 0x201, 0x4c,
- 0x301, 0x201, 0x6c, 0x301, 0x201, 0x4c, 0x327, 0x201,
- 0x6c, 0x327, 0x201, 0x4c, 0x30c, 0x201, 0x6c, 0x30c,
- 0x210, 0x4c, 0xb7, 0x210, 0x6c, 0xb7, 0x201, 0x4e,
- 0x301, 0x201, 0x6e, 0x301, 0x201, 0x4e, 0x327, 0x201,
- 0x6e, 0x327, 0x201, 0x4e, 0x30c, 0x201, 0x6e, 0x30c,
- 0x210, 0x2bc, 0x6e, 0x201, 0x4f, 0x304, 0x201, 0x6f,
- 0x304, 0x201, 0x4f, 0x306, 0x201, 0x6f, 0x306, 0x201,
- 0x4f, 0x30b, 0x201, 0x6f, 0x30b, 0x201, 0x52, 0x301,
- 0x201, 0x72, 0x301, 0x201, 0x52, 0x327, 0x201, 0x72,
- 0x327, 0x201, 0x52, 0x30c, 0x201, 0x72, 0x30c, 0x201,
- 0x53, 0x301, 0x201, 0x73, 0x301, 0x201, 0x53, 0x302,
- 0x201, 0x73, 0x302, 0x201, 0x53, 0x327, 0x201, 0x73,
- 0x327, 0x201, 0x53, 0x30c, 0x201, 0x73, 0x30c, 0x201,
- 0x54, 0x327, 0x201, 0x74, 0x327, 0x201, 0x54, 0x30c,
- 0x201, 0x74, 0x30c, 0x201, 0x55, 0x303, 0x201, 0x75,
- 0x303, 0x201, 0x55, 0x304, 0x201, 0x75, 0x304, 0x201,
- 0x55, 0x306, 0x201, 0x75, 0x306, 0x201, 0x55, 0x30a,
- 0x201, 0x75, 0x30a, 0x201, 0x55, 0x30b, 0x201, 0x75,
- 0x30b, 0x201, 0x55, 0x328, 0x201, 0x75, 0x328, 0x201,
- 0x57, 0x302, 0x201, 0x77, 0x302, 0x201, 0x59, 0x302,
- 0x201, 0x79, 0x302, 0x201, 0x59, 0x308, 0x201, 0x5a,
- 0x301, 0x201, 0x7a, 0x301, 0x201, 0x5a, 0x307, 0x201,
- 0x7a, 0x307, 0x201, 0x5a, 0x30c, 0x201, 0x7a, 0x30c,
- 0x110, 0x73, 0x201, 0x4f, 0x31b, 0x201, 0x6f, 0x31b,
- 0x201, 0x55, 0x31b, 0x201, 0x75, 0x31b, 0x210, 0x44,
- 0x17d, 0x210, 0x44, 0x17e, 0x210, 0x64, 0x17e, 0x210,
- 0x4c, 0x4a, 0x210, 0x4c, 0x6a, 0x210, 0x6c, 0x6a,
- 0x210, 0x4e, 0x4a, 0x210, 0x4e, 0x6a, 0x210, 0x6e,
- 0x6a, 0x201, 0x41, 0x30c, 0x201, 0x61, 0x30c, 0x201,
- 0x49, 0x30c, 0x201, 0x69, 0x30c, 0x201, 0x4f, 0x30c,
- 0x201, 0x6f, 0x30c, 0x201, 0x55, 0x30c, 0x201, 0x75,
- 0x30c, 0x201, 0xdc, 0x304, 0x201, 0xfc, 0x304, 0x201,
- 0xdc, 0x301, 0x201, 0xfc, 0x301, 0x201, 0xdc, 0x30c,
- 0x201, 0xfc, 0x30c, 0x201, 0xdc, 0x300, 0x201, 0xfc,
- 0x300, 0x201, 0xc4, 0x304, 0x201, 0xe4, 0x304, 0x201,
- 0x226, 0x304, 0x201, 0x227, 0x304, 0x201, 0xc6, 0x304,
- 0x201, 0xe6, 0x304, 0x201, 0x47, 0x30c, 0x201, 0x67,
- 0x30c, 0x201, 0x4b, 0x30c, 0x201, 0x6b, 0x30c, 0x201,
- 0x4f, 0x328, 0x201, 0x6f, 0x328, 0x201, 0x1ea, 0x304,
- 0x201, 0x1eb, 0x304, 0x201, 0x1b7, 0x30c, 0x201, 0x292,
- 0x30c, 0x201, 0x6a, 0x30c, 0x210, 0x44, 0x5a, 0x210,
- 0x44, 0x7a, 0x210, 0x64, 0x7a, 0x201, 0x47, 0x301,
- 0x201, 0x67, 0x301, 0x201, 0x4e, 0x300, 0x201, 0x6e,
- 0x300, 0x201, 0xc5, 0x301, 0x201, 0xe5, 0x301, 0x201,
- 0xc6, 0x301, 0x201, 0xe6, 0x301, 0x201, 0xd8, 0x301,
- 0x201, 0xf8, 0x301, 0x201, 0x41, 0x30f, 0x201, 0x61,
- 0x30f, 0x201, 0x41, 0x311, 0x201, 0x61, 0x311, 0x201,
- 0x45, 0x30f, 0x201, 0x65, 0x30f, 0x201, 0x45, 0x311,
- 0x201, 0x65, 0x311, 0x201, 0x49, 0x30f, 0x201, 0x69,
- 0x30f, 0x201, 0x49, 0x311, 0x201, 0x69, 0x311, 0x201,
- 0x4f, 0x30f, 0x201, 0x6f, 0x30f, 0x201, 0x4f, 0x311,
- 0x201, 0x6f, 0x311, 0x201, 0x52, 0x30f, 0x201, 0x72,
- 0x30f, 0x201, 0x52, 0x311, 0x201, 0x72, 0x311, 0x201,
- 0x55, 0x30f, 0x201, 0x75, 0x30f, 0x201, 0x55, 0x311,
- 0x201, 0x75, 0x311, 0x201, 0x53, 0x326, 0x201, 0x73,
- 0x326, 0x201, 0x54, 0x326, 0x201, 0x74, 0x326, 0x201,
- 0x48, 0x30c, 0x201, 0x68, 0x30c, 0x201, 0x41, 0x307,
- 0x201, 0x61, 0x307, 0x201, 0x45, 0x327, 0x201, 0x65,
- 0x327, 0x201, 0xd6, 0x304, 0x201, 0xf6, 0x304, 0x201,
- 0xd5, 0x304, 0x201, 0xf5, 0x304, 0x201, 0x4f, 0x307,
- 0x201, 0x6f, 0x307, 0x201, 0x22e, 0x304, 0x201, 0x22f,
- 0x304, 0x201, 0x59, 0x304, 0x201, 0x79, 0x304, 0x109,
- 0x68, 0x109, 0x266, 0x109, 0x6a, 0x109, 0x72, 0x109,
- 0x279, 0x109, 0x27b, 0x109, 0x281, 0x109, 0x77, 0x109,
- 0x79, 0x210, 0x20, 0x306, 0x210, 0x20, 0x307, 0x210,
- 0x20, 0x30a, 0x210, 0x20, 0x328, 0x210, 0x20, 0x303,
- 0x210, 0x20, 0x30b, 0x109, 0x263, 0x109, 0x6c, 0x109,
- 0x73, 0x109, 0x78, 0x109, 0x295, 0x101, 0x300, 0x101,
- 0x301, 0x101, 0x313, 0x201, 0x308, 0x301, 0x101, 0x2b9,
- 0x210, 0x20, 0x345, 0x101, 0x3b, 0x210, 0x20, 0x301,
- 0x201, 0xa8, 0x301, 0x201, 0x391, 0x301, 0x101, 0xb7,
- 0x201, 0x395, 0x301, 0x201, 0x397, 0x301, 0x201, 0x399,
- 0x301, 0x201, 0x39f, 0x301, 0x201, 0x3a5, 0x301, 0x201,
- 0x3a9, 0x301, 0x201, 0x3ca, 0x301, 0x201, 0x399, 0x308,
- 0x201, 0x3a5, 0x308, 0x201, 0x3b1, 0x301, 0x201, 0x3b5,
- 0x301, 0x201, 0x3b7, 0x301, 0x201, 0x3b9, 0x301, 0x201,
- 0x3cb, 0x301, 0x201, 0x3b9, 0x308, 0x201, 0x3c5, 0x308,
- 0x201, 0x3bf, 0x301, 0x201, 0x3c5, 0x301, 0x201, 0x3c9,
- 0x301, 0x110, 0x3b2, 0x110, 0x3b8, 0x110, 0x3a5, 0x201,
- 0x3d2, 0x301, 0x201, 0x3d2, 0x308, 0x110, 0x3c6, 0x110,
- 0x3c0, 0x110, 0x3ba, 0x110, 0x3c1, 0x110, 0x3c2, 0x110,
- 0x398, 0x110, 0x3b5, 0x110, 0x3a3, 0x201, 0x415, 0x300,
- 0x201, 0x415, 0x308, 0x201, 0x413, 0x301, 0x201, 0x406,
- 0x308, 0x201, 0x41a, 0x301, 0x201, 0x418, 0x300, 0x201,
- 0x423, 0x306, 0x201, 0x418, 0x306, 0x201, 0x438, 0x306,
- 0x201, 0x435, 0x300, 0x201, 0x435, 0x308, 0x201, 0x433,
- 0x301, 0x201, 0x456, 0x308, 0x201, 0x43a, 0x301, 0x201,
- 0x438, 0x300, 0x201, 0x443, 0x306, 0x201, 0x474, 0x30f,
- 0x201, 0x475, 0x30f, 0x201, 0x416, 0x306, 0x201, 0x436,
- 0x306, 0x201, 0x410, 0x306, 0x201, 0x430, 0x306, 0x201,
- 0x410, 0x308, 0x201, 0x430, 0x308, 0x201, 0x415, 0x306,
- 0x201, 0x435, 0x306, 0x201, 0x4d8, 0x308, 0x201, 0x4d9,
- 0x308, 0x201, 0x416, 0x308, 0x201, 0x436, 0x308, 0x201,
- 0x417, 0x308, 0x201, 0x437, 0x308, 0x201, 0x418, 0x304,
- 0x201, 0x438, 0x304, 0x201, 0x418, 0x308, 0x201, 0x438,
- 0x308, 0x201, 0x41e, 0x308, 0x201, 0x43e, 0x308, 0x201,
- 0x4e8, 0x308, 0x201, 0x4e9, 0x308, 0x201, 0x42d, 0x308,
- 0x201, 0x44d, 0x308, 0x201, 0x423, 0x304, 0x201, 0x443,
- 0x304, 0x201, 0x423, 0x308, 0x201, 0x443, 0x308, 0x201,
- 0x423, 0x30b, 0x201, 0x443, 0x30b, 0x201, 0x427, 0x308,
- 0x201, 0x447, 0x308, 0x201, 0x42b, 0x308, 0x201, 0x44b,
- 0x308, 0x210, 0x565, 0x582, 0x201, 0x627, 0x653, 0x201,
- 0x627, 0x654, 0x201, 0x648, 0x654, 0x201, 0x627, 0x655,
- 0x201, 0x64a, 0x654, 0x210, 0x627, 0x674, 0x210, 0x648,
- 0x674, 0x210, 0x6c7, 0x674, 0x210, 0x64a, 0x674, 0x201,
- 0x6d5, 0x654, 0x201, 0x6c1, 0x654, 0x201, 0x6d2, 0x654,
- 0x201, 0x928, 0x93c, 0x201, 0x930, 0x93c, 0x201, 0x933,
- 0x93c, 0x201, 0x915, 0x93c, 0x201, 0x916, 0x93c, 0x201,
- 0x917, 0x93c, 0x201, 0x91c, 0x93c, 0x201, 0x921, 0x93c,
- 0x201, 0x922, 0x93c, 0x201, 0x92b, 0x93c, 0x201, 0x92f,
- 0x93c, 0x201, 0x9c7, 0x9be, 0x201, 0x9c7, 0x9d7, 0x201,
- 0x9a1, 0x9bc, 0x201, 0x9a2, 0x9bc, 0x201, 0x9af, 0x9bc,
- 0x201, 0xa32, 0xa3c, 0x201, 0xa38, 0xa3c, 0x201, 0xa16,
- 0xa3c, 0x201, 0xa17, 0xa3c, 0x201, 0xa1c, 0xa3c, 0x201,
- 0xa2b, 0xa3c, 0x201, 0xb47, 0xb56, 0x201, 0xb47, 0xb3e,
- 0x201, 0xb47, 0xb57, 0x201, 0xb21, 0xb3c, 0x201, 0xb22,
- 0xb3c, 0x201, 0xb92, 0xbd7, 0x201, 0xbc6, 0xbbe, 0x201,
- 0xbc7, 0xbbe, 0x201, 0xbc6, 0xbd7, 0x201, 0xc46, 0xc56,
- 0x201, 0xcbf, 0xcd5, 0x201, 0xcc6, 0xcd5, 0x201, 0xcc6,
- 0xcd6, 0x201, 0xcc6, 0xcc2, 0x201, 0xcca, 0xcd5, 0x201,
- 0xd46, 0xd3e, 0x201, 0xd47, 0xd3e, 0x201, 0xd46, 0xd57,
- 0x201, 0xdd9, 0xdca, 0x201, 0xdd9, 0xdcf, 0x201, 0xddc,
- 0xdca, 0x201, 0xdd9, 0xddf, 0x210, 0xe4d, 0xe32, 0x210,
- 0xecd, 0xeb2, 0x210, 0xeab, 0xe99, 0x210, 0xeab, 0xea1,
- 0x103, 0xf0b, 0x201, 0xf42, 0xfb7, 0x201, 0xf4c, 0xfb7,
- 0x201, 0xf51, 0xfb7, 0x201, 0xf56, 0xfb7, 0x201, 0xf5b,
- 0xfb7, 0x201, 0xf40, 0xfb5, 0x201, 0xf71, 0xf72, 0x201,
- 0xf71, 0xf74, 0x201, 0xfb2, 0xf80, 0x210, 0xfb2, 0xf81,
- 0x201, 0xfb3, 0xf80, 0x210, 0xfb3, 0xf81, 0x201, 0xf71,
- 0xf80, 0x201, 0xf92, 0xfb7, 0x201, 0xf9c, 0xfb7, 0x201,
- 0xfa1, 0xfb7, 0x201, 0xfa6, 0xfb7, 0x201, 0xfab, 0xfb7,
- 0x201, 0xf90, 0xfb5, 0x201, 0x1025, 0x102e, 0x109, 0x10dc,
- 0x201, 0x1b05, 0x1b35, 0x201, 0x1b07, 0x1b35, 0x201, 0x1b09,
- 0x1b35, 0x201, 0x1b0b, 0x1b35, 0x201, 0x1b0d, 0x1b35, 0x201,
- 0x1b11, 0x1b35, 0x201, 0x1b3a, 0x1b35, 0x201, 0x1b3c, 0x1b35,
- 0x201, 0x1b3e, 0x1b35, 0x201, 0x1b3f, 0x1b35, 0x201, 0x1b42,
- 0x1b35, 0x109, 0x41, 0x109, 0xc6, 0x109, 0x42, 0x109,
- 0x44, 0x109, 0x45, 0x109, 0x18e, 0x109, 0x47, 0x109,
- 0x48, 0x109, 0x49, 0x109, 0x4a, 0x109, 0x4b, 0x109,
- 0x4c, 0x109, 0x4d, 0x109, 0x4e, 0x109, 0x4f, 0x109,
- 0x222, 0x109, 0x50, 0x109, 0x52, 0x109, 0x54, 0x109,
- 0x55, 0x109, 0x57, 0x109, 0x61, 0x109, 0x250, 0x109,
- 0x251, 0x109, 0x1d02, 0x109, 0x62, 0x109, 0x64, 0x109,
- 0x65, 0x109, 0x259, 0x109, 0x25b, 0x109, 0x25c, 0x109,
- 0x67, 0x109, 0x6b, 0x109, 0x6d, 0x109, 0x14b, 0x109,
- 0x6f, 0x109, 0x254, 0x109, 0x1d16, 0x109, 0x1d17, 0x109,
- 0x70, 0x109, 0x74, 0x109, 0x75, 0x109, 0x1d1d, 0x109,
- 0x26f, 0x109, 0x76, 0x109, 0x1d25, 0x109, 0x3b2, 0x109,
- 0x3b3, 0x109, 0x3b4, 0x109, 0x3c6, 0x109, 0x3c7, 0x10a,
- 0x69, 0x10a, 0x72, 0x10a, 0x75, 0x10a, 0x76, 0x10a,
- 0x3b2, 0x10a, 0x3b3, 0x10a, 0x3c1, 0x10a, 0x3c6, 0x10a,
- 0x3c7, 0x109, 0x43d, 0x109, 0x252, 0x109, 0x63, 0x109,
- 0x255, 0x109, 0xf0, 0x109, 0x25c, 0x109, 0x66, 0x109,
- 0x25f, 0x109, 0x261, 0x109, 0x265, 0x109, 0x268, 0x109,
- 0x269, 0x109, 0x26a, 0x109, 0x1d7b, 0x109, 0x29d, 0x109,
- 0x26d, 0x109, 0x1d85, 0x109, 0x29f, 0x109, 0x271, 0x109,
- 0x270, 0x109, 0x272, 0x109, 0x273, 0x109, 0x274, 0x109,
- 0x275, 0x109, 0x278, 0x109, 0x282, 0x109, 0x283, 0x109,
- 0x1ab, 0x109, 0x289, 0x109, 0x28a, 0x109, 0x1d1c, 0x109,
- 0x28b, 0x109, 0x28c, 0x109, 0x7a, 0x109, 0x290, 0x109,
- 0x291, 0x109, 0x292, 0x109, 0x3b8, 0x201, 0x41, 0x325,
- 0x201, 0x61, 0x325, 0x201, 0x42, 0x307, 0x201, 0x62,
- 0x307, 0x201, 0x42, 0x323, 0x201, 0x62, 0x323, 0x201,
- 0x42, 0x331, 0x201, 0x62, 0x331, 0x201, 0xc7, 0x301,
- 0x201, 0xe7, 0x301, 0x201, 0x44, 0x307, 0x201, 0x64,
- 0x307, 0x201, 0x44, 0x323, 0x201, 0x64, 0x323, 0x201,
- 0x44, 0x331, 0x201, 0x64, 0x331, 0x201, 0x44, 0x327,
- 0x201, 0x64, 0x327, 0x201, 0x44, 0x32d, 0x201, 0x64,
- 0x32d, 0x201, 0x112, 0x300, 0x201, 0x113, 0x300, 0x201,
- 0x112, 0x301, 0x201, 0x113, 0x301, 0x201, 0x45, 0x32d,
- 0x201, 0x65, 0x32d, 0x201, 0x45, 0x330, 0x201, 0x65,
- 0x330, 0x201, 0x228, 0x306, 0x201, 0x229, 0x306, 0x201,
- 0x46, 0x307, 0x201, 0x66, 0x307, 0x201, 0x47, 0x304,
- 0x201, 0x67, 0x304, 0x201, 0x48, 0x307, 0x201, 0x68,
- 0x307, 0x201, 0x48, 0x323, 0x201, 0x68, 0x323, 0x201,
- 0x48, 0x308, 0x201, 0x68, 0x308, 0x201, 0x48, 0x327,
- 0x201, 0x68, 0x327, 0x201, 0x48, 0x32e, 0x201, 0x68,
- 0x32e, 0x201, 0x49, 0x330, 0x201, 0x69, 0x330, 0x201,
- 0xcf, 0x301, 0x201, 0xef, 0x301, 0x201, 0x4b, 0x301,
- 0x201, 0x6b, 0x301, 0x201, 0x4b, 0x323, 0x201, 0x6b,
- 0x323, 0x201, 0x4b, 0x331, 0x201, 0x6b, 0x331, 0x201,
- 0x4c, 0x323, 0x201, 0x6c, 0x323, 0x201, 0x1e36, 0x304,
- 0x201, 0x1e37, 0x304, 0x201, 0x4c, 0x331, 0x201, 0x6c,
- 0x331, 0x201, 0x4c, 0x32d, 0x201, 0x6c, 0x32d, 0x201,
- 0x4d, 0x301, 0x201, 0x6d, 0x301, 0x201, 0x4d, 0x307,
- 0x201, 0x6d, 0x307, 0x201, 0x4d, 0x323, 0x201, 0x6d,
- 0x323, 0x201, 0x4e, 0x307, 0x201, 0x6e, 0x307, 0x201,
- 0x4e, 0x323, 0x201, 0x6e, 0x323, 0x201, 0x4e, 0x331,
- 0x201, 0x6e, 0x331, 0x201, 0x4e, 0x32d, 0x201, 0x6e,
- 0x32d, 0x201, 0xd5, 0x301, 0x201, 0xf5, 0x301, 0x201,
- 0xd5, 0x308, 0x201, 0xf5, 0x308, 0x201, 0x14c, 0x300,
- 0x201, 0x14d, 0x300, 0x201, 0x14c, 0x301, 0x201, 0x14d,
- 0x301, 0x201, 0x50, 0x301, 0x201, 0x70, 0x301, 0x201,
- 0x50, 0x307, 0x201, 0x70, 0x307, 0x201, 0x52, 0x307,
- 0x201, 0x72, 0x307, 0x201, 0x52, 0x323, 0x201, 0x72,
- 0x323, 0x201, 0x1e5a, 0x304, 0x201, 0x1e5b, 0x304, 0x201,
- 0x52, 0x331, 0x201, 0x72, 0x331, 0x201, 0x53, 0x307,
- 0x201, 0x73, 0x307, 0x201, 0x53, 0x323, 0x201, 0x73,
- 0x323, 0x201, 0x15a, 0x307, 0x201, 0x15b, 0x307, 0x201,
- 0x160, 0x307, 0x201, 0x161, 0x307, 0x201, 0x1e62, 0x307,
- 0x201, 0x1e63, 0x307, 0x201, 0x54, 0x307, 0x201, 0x74,
- 0x307, 0x201, 0x54, 0x323, 0x201, 0x74, 0x323, 0x201,
- 0x54, 0x331, 0x201, 0x74, 0x331, 0x201, 0x54, 0x32d,
- 0x201, 0x74, 0x32d, 0x201, 0x55, 0x324, 0x201, 0x75,
- 0x324, 0x201, 0x55, 0x330, 0x201, 0x75, 0x330, 0x201,
- 0x55, 0x32d, 0x201, 0x75, 0x32d, 0x201, 0x168, 0x301,
- 0x201, 0x169, 0x301, 0x201, 0x16a, 0x308, 0x201, 0x16b,
- 0x308, 0x201, 0x56, 0x303, 0x201, 0x76, 0x303, 0x201,
- 0x56, 0x323, 0x201, 0x76, 0x323, 0x201, 0x57, 0x300,
- 0x201, 0x77, 0x300, 0x201, 0x57, 0x301, 0x201, 0x77,
- 0x301, 0x201, 0x57, 0x308, 0x201, 0x77, 0x308, 0x201,
- 0x57, 0x307, 0x201, 0x77, 0x307, 0x201, 0x57, 0x323,
- 0x201, 0x77, 0x323, 0x201, 0x58, 0x307, 0x201, 0x78,
- 0x307, 0x201, 0x58, 0x308, 0x201, 0x78, 0x308, 0x201,
- 0x59, 0x307, 0x201, 0x79, 0x307, 0x201, 0x5a, 0x302,
- 0x201, 0x7a, 0x302, 0x201, 0x5a, 0x323, 0x201, 0x7a,
- 0x323, 0x201, 0x5a, 0x331, 0x201, 0x7a, 0x331, 0x201,
- 0x68, 0x331, 0x201, 0x74, 0x308, 0x201, 0x77, 0x30a,
- 0x201, 0x79, 0x30a, 0x210, 0x61, 0x2be, 0x201, 0x17f,
- 0x307, 0x201, 0x41, 0x323, 0x201, 0x61, 0x323, 0x201,
- 0x41, 0x309, 0x201, 0x61, 0x309, 0x201, 0xc2, 0x301,
- 0x201, 0xe2, 0x301, 0x201, 0xc2, 0x300, 0x201, 0xe2,
- 0x300, 0x201, 0xc2, 0x309, 0x201, 0xe2, 0x309, 0x201,
- 0xc2, 0x303, 0x201, 0xe2, 0x303, 0x201, 0x1ea0, 0x302,
- 0x201, 0x1ea1, 0x302, 0x201, 0x102, 0x301, 0x201, 0x103,
- 0x301, 0x201, 0x102, 0x300, 0x201, 0x103, 0x300, 0x201,
- 0x102, 0x309, 0x201, 0x103, 0x309, 0x201, 0x102, 0x303,
- 0x201, 0x103, 0x303, 0x201, 0x1ea0, 0x306, 0x201, 0x1ea1,
- 0x306, 0x201, 0x45, 0x323, 0x201, 0x65, 0x323, 0x201,
- 0x45, 0x309, 0x201, 0x65, 0x309, 0x201, 0x45, 0x303,
- 0x201, 0x65, 0x303, 0x201, 0xca, 0x301, 0x201, 0xea,
- 0x301, 0x201, 0xca, 0x300, 0x201, 0xea, 0x300, 0x201,
- 0xca, 0x309, 0x201, 0xea, 0x309, 0x201, 0xca, 0x303,
- 0x201, 0xea, 0x303, 0x201, 0x1eb8, 0x302, 0x201, 0x1eb9,
- 0x302, 0x201, 0x49, 0x309, 0x201, 0x69, 0x309, 0x201,
- 0x49, 0x323, 0x201, 0x69, 0x323, 0x201, 0x4f, 0x323,
- 0x201, 0x6f, 0x323, 0x201, 0x4f, 0x309, 0x201, 0x6f,
- 0x309, 0x201, 0xd4, 0x301, 0x201, 0xf4, 0x301, 0x201,
- 0xd4, 0x300, 0x201, 0xf4, 0x300, 0x201, 0xd4, 0x309,
- 0x201, 0xf4, 0x309, 0x201, 0xd4, 0x303, 0x201, 0xf4,
- 0x303, 0x201, 0x1ecc, 0x302, 0x201, 0x1ecd, 0x302, 0x201,
- 0x1a0, 0x301, 0x201, 0x1a1, 0x301, 0x201, 0x1a0, 0x300,
- 0x201, 0x1a1, 0x300, 0x201, 0x1a0, 0x309, 0x201, 0x1a1,
- 0x309, 0x201, 0x1a0, 0x303, 0x201, 0x1a1, 0x303, 0x201,
- 0x1a0, 0x323, 0x201, 0x1a1, 0x323, 0x201, 0x55, 0x323,
- 0x201, 0x75, 0x323, 0x201, 0x55, 0x309, 0x201, 0x75,
- 0x309, 0x201, 0x1af, 0x301, 0x201, 0x1b0, 0x301, 0x201,
- 0x1af, 0x300, 0x201, 0x1b0, 0x300, 0x201, 0x1af, 0x309,
- 0x201, 0x1b0, 0x309, 0x201, 0x1af, 0x303, 0x201, 0x1b0,
- 0x303, 0x201, 0x1af, 0x323, 0x201, 0x1b0, 0x323, 0x201,
- 0x59, 0x300, 0x201, 0x79, 0x300, 0x201, 0x59, 0x323,
- 0x201, 0x79, 0x323, 0x201, 0x59, 0x309, 0x201, 0x79,
- 0x309, 0x201, 0x59, 0x303, 0x201, 0x79, 0x303, 0x201,
- 0x3b1, 0x313, 0x201, 0x3b1, 0x314, 0x201, 0x1f00, 0x300,
- 0x201, 0x1f01, 0x300, 0x201, 0x1f00, 0x301, 0x201, 0x1f01,
- 0x301, 0x201, 0x1f00, 0x342, 0x201, 0x1f01, 0x342, 0x201,
- 0x391, 0x313, 0x201, 0x391, 0x314, 0x201, 0x1f08, 0x300,
- 0x201, 0x1f09, 0x300, 0x201, 0x1f08, 0x301, 0x201, 0x1f09,
- 0x301, 0x201, 0x1f08, 0x342, 0x201, 0x1f09, 0x342, 0x201,
- 0x3b5, 0x313, 0x201, 0x3b5, 0x314, 0x201, 0x1f10, 0x300,
- 0x201, 0x1f11, 0x300, 0x201, 0x1f10, 0x301, 0x201, 0x1f11,
- 0x301, 0x201, 0x395, 0x313, 0x201, 0x395, 0x314, 0x201,
- 0x1f18, 0x300, 0x201, 0x1f19, 0x300, 0x201, 0x1f18, 0x301,
- 0x201, 0x1f19, 0x301, 0x201, 0x3b7, 0x313, 0x201, 0x3b7,
- 0x314, 0x201, 0x1f20, 0x300, 0x201, 0x1f21, 0x300, 0x201,
- 0x1f20, 0x301, 0x201, 0x1f21, 0x301, 0x201, 0x1f20, 0x342,
- 0x201, 0x1f21, 0x342, 0x201, 0x397, 0x313, 0x201, 0x397,
- 0x314, 0x201, 0x1f28, 0x300, 0x201, 0x1f29, 0x300, 0x201,
- 0x1f28, 0x301, 0x201, 0x1f29, 0x301, 0x201, 0x1f28, 0x342,
- 0x201, 0x1f29, 0x342, 0x201, 0x3b9, 0x313, 0x201, 0x3b9,
- 0x314, 0x201, 0x1f30, 0x300, 0x201, 0x1f31, 0x300, 0x201,
- 0x1f30, 0x301, 0x201, 0x1f31, 0x301, 0x201, 0x1f30, 0x342,
- 0x201, 0x1f31, 0x342, 0x201, 0x399, 0x313, 0x201, 0x399,
- 0x314, 0x201, 0x1f38, 0x300, 0x201, 0x1f39, 0x300, 0x201,
- 0x1f38, 0x301, 0x201, 0x1f39, 0x301, 0x201, 0x1f38, 0x342,
- 0x201, 0x1f39, 0x342, 0x201, 0x3bf, 0x313, 0x201, 0x3bf,
- 0x314, 0x201, 0x1f40, 0x300, 0x201, 0x1f41, 0x300, 0x201,
- 0x1f40, 0x301, 0x201, 0x1f41, 0x301, 0x201, 0x39f, 0x313,
- 0x201, 0x39f, 0x314, 0x201, 0x1f48, 0x300, 0x201, 0x1f49,
- 0x300, 0x201, 0x1f48, 0x301, 0x201, 0x1f49, 0x301, 0x201,
- 0x3c5, 0x313, 0x201, 0x3c5, 0x314, 0x201, 0x1f50, 0x300,
- 0x201, 0x1f51, 0x300, 0x201, 0x1f50, 0x301, 0x201, 0x1f51,
- 0x301, 0x201, 0x1f50, 0x342, 0x201, 0x1f51, 0x342, 0x201,
- 0x3a5, 0x314, 0x201, 0x1f59, 0x300, 0x201, 0x1f59, 0x301,
- 0x201, 0x1f59, 0x342, 0x201, 0x3c9, 0x313, 0x201, 0x3c9,
- 0x314, 0x201, 0x1f60, 0x300, 0x201, 0x1f61, 0x300, 0x201,
- 0x1f60, 0x301, 0x201, 0x1f61, 0x301, 0x201, 0x1f60, 0x342,
- 0x201, 0x1f61, 0x342, 0x201, 0x3a9, 0x313, 0x201, 0x3a9,
- 0x314, 0x201, 0x1f68, 0x300, 0x201, 0x1f69, 0x300, 0x201,
- 0x1f68, 0x301, 0x201, 0x1f69, 0x301, 0x201, 0x1f68, 0x342,
- 0x201, 0x1f69, 0x342, 0x201, 0x3b1, 0x300, 0x101, 0x3ac,
- 0x201, 0x3b5, 0x300, 0x101, 0x3ad, 0x201, 0x3b7, 0x300,
- 0x101, 0x3ae, 0x201, 0x3b9, 0x300, 0x101, 0x3af, 0x201,
- 0x3bf, 0x300, 0x101, 0x3cc, 0x201, 0x3c5, 0x300, 0x101,
- 0x3cd, 0x201, 0x3c9, 0x300, 0x101, 0x3ce, 0x201, 0x1f00,
- 0x345, 0x201, 0x1f01, 0x345, 0x201, 0x1f02, 0x345, 0x201,
- 0x1f03, 0x345, 0x201, 0x1f04, 0x345, 0x201, 0x1f05, 0x345,
- 0x201, 0x1f06, 0x345, 0x201, 0x1f07, 0x345, 0x201, 0x1f08,
- 0x345, 0x201, 0x1f09, 0x345, 0x201, 0x1f0a, 0x345, 0x201,
- 0x1f0b, 0x345, 0x201, 0x1f0c, 0x345, 0x201, 0x1f0d, 0x345,
- 0x201, 0x1f0e, 0x345, 0x201, 0x1f0f, 0x345, 0x201, 0x1f20,
- 0x345, 0x201, 0x1f21, 0x345, 0x201, 0x1f22, 0x345, 0x201,
- 0x1f23, 0x345, 0x201, 0x1f24, 0x345, 0x201, 0x1f25, 0x345,
- 0x201, 0x1f26, 0x345, 0x201, 0x1f27, 0x345, 0x201, 0x1f28,
- 0x345, 0x201, 0x1f29, 0x345, 0x201, 0x1f2a, 0x345, 0x201,
- 0x1f2b, 0x345, 0x201, 0x1f2c, 0x345, 0x201, 0x1f2d, 0x345,
- 0x201, 0x1f2e, 0x345, 0x201, 0x1f2f, 0x345, 0x201, 0x1f60,
- 0x345, 0x201, 0x1f61, 0x345, 0x201, 0x1f62, 0x345, 0x201,
- 0x1f63, 0x345, 0x201, 0x1f64, 0x345, 0x201, 0x1f65, 0x345,
- 0x201, 0x1f66, 0x345, 0x201, 0x1f67, 0x345, 0x201, 0x1f68,
- 0x345, 0x201, 0x1f69, 0x345, 0x201, 0x1f6a, 0x345, 0x201,
- 0x1f6b, 0x345, 0x201, 0x1f6c, 0x345, 0x201, 0x1f6d, 0x345,
- 0x201, 0x1f6e, 0x345, 0x201, 0x1f6f, 0x345, 0x201, 0x3b1,
- 0x306, 0x201, 0x3b1, 0x304, 0x201, 0x1f70, 0x345, 0x201,
- 0x3b1, 0x345, 0x201, 0x3ac, 0x345, 0x201, 0x3b1, 0x342,
- 0x201, 0x1fb6, 0x345, 0x201, 0x391, 0x306, 0x201, 0x391,
- 0x304, 0x201, 0x391, 0x300, 0x101, 0x386, 0x201, 0x391,
- 0x345, 0x210, 0x20, 0x313, 0x101, 0x3b9, 0x210, 0x20,
- 0x313, 0x210, 0x20, 0x342, 0x201, 0xa8, 0x342, 0x201,
- 0x1f74, 0x345, 0x201, 0x3b7, 0x345, 0x201, 0x3ae, 0x345,
- 0x201, 0x3b7, 0x342, 0x201, 0x1fc6, 0x345, 0x201, 0x395,
- 0x300, 0x101, 0x388, 0x201, 0x397, 0x300, 0x101, 0x389,
- 0x201, 0x397, 0x345, 0x201, 0x1fbf, 0x300, 0x201, 0x1fbf,
- 0x301, 0x201, 0x1fbf, 0x342, 0x201, 0x3b9, 0x306, 0x201,
- 0x3b9, 0x304, 0x201, 0x3ca, 0x300, 0x101, 0x390, 0x201,
- 0x3b9, 0x342, 0x201, 0x3ca, 0x342, 0x201, 0x399, 0x306,
- 0x201, 0x399, 0x304, 0x201, 0x399, 0x300, 0x101, 0x38a,
- 0x201, 0x1ffe, 0x300, 0x201, 0x1ffe, 0x301, 0x201, 0x1ffe,
- 0x342, 0x201, 0x3c5, 0x306, 0x201, 0x3c5, 0x304, 0x201,
- 0x3cb, 0x300, 0x101, 0x3b0, 0x201, 0x3c1, 0x313, 0x201,
- 0x3c1, 0x314, 0x201, 0x3c5, 0x342, 0x201, 0x3cb, 0x342,
- 0x201, 0x3a5, 0x306, 0x201, 0x3a5, 0x304, 0x201, 0x3a5,
- 0x300, 0x101, 0x38e, 0x201, 0x3a1, 0x314, 0x201, 0xa8,
- 0x300, 0x101, 0x385, 0x101, 0x60, 0x201, 0x1f7c, 0x345,
- 0x201, 0x3c9, 0x345, 0x201, 0x3ce, 0x345, 0x201, 0x3c9,
- 0x342, 0x201, 0x1ff6, 0x345, 0x201, 0x39f, 0x300, 0x101,
- 0x38c, 0x201, 0x3a9, 0x300, 0x101, 0x38f, 0x201, 0x3a9,
- 0x345, 0x101, 0xb4, 0x210, 0x20, 0x314, 0x101, 0x2002,
- 0x101, 0x2003, 0x110, 0x20, 0x110, 0x20, 0x110, 0x20,
- 0x110, 0x20, 0x110, 0x20, 0x103, 0x20, 0x110, 0x20,
- 0x110, 0x20, 0x110, 0x20, 0x103, 0x2010, 0x210, 0x20,
- 0x333, 0x110, 0x2e, 0x210, 0x2e, 0x2e, 0x310, 0x2e,
- 0x2e, 0x2e, 0x103, 0x20, 0x210, 0x2032, 0x2032, 0x310,
- 0x2032, 0x2032, 0x2032, 0x210, 0x2035, 0x2035, 0x310, 0x2035,
- 0x2035, 0x2035, 0x210, 0x21, 0x21, 0x210, 0x20, 0x305,
- 0x210, 0x3f, 0x3f, 0x210, 0x3f, 0x21, 0x210, 0x21,
- 0x3f, 0x410, 0x2032, 0x2032, 0x2032, 0x2032, 0x110, 0x20,
- 0x109, 0x30, 0x109, 0x69, 0x109, 0x34, 0x109, 0x35,
- 0x109, 0x36, 0x109, 0x37, 0x109, 0x38, 0x109, 0x39,
- 0x109, 0x2b, 0x109, 0x2212, 0x109, 0x3d, 0x109, 0x28,
- 0x109, 0x29, 0x109, 0x6e, 0x10a, 0x30, 0x10a, 0x31,
- 0x10a, 0x32, 0x10a, 0x33, 0x10a, 0x34, 0x10a, 0x35,
- 0x10a, 0x36, 0x10a, 0x37, 0x10a, 0x38, 0x10a, 0x39,
- 0x10a, 0x2b, 0x10a, 0x2212, 0x10a, 0x3d, 0x10a, 0x28,
- 0x10a, 0x29, 0x10a, 0x61, 0x10a, 0x65, 0x10a, 0x6f,
- 0x10a, 0x78, 0x10a, 0x259, 0x210, 0x52, 0x73, 0x310,
- 0x61, 0x2f, 0x63, 0x310, 0x61, 0x2f, 0x73, 0x102,
- 0x43, 0x210, 0xb0, 0x43, 0x310, 0x63, 0x2f, 0x6f,
- 0x310, 0x63, 0x2f, 0x75, 0x110, 0x190, 0x210, 0xb0,
- 0x46, 0x102, 0x67, 0x102, 0x48, 0x102, 0x48, 0x102,
- 0x48, 0x102, 0x68, 0x102, 0x127, 0x102, 0x49, 0x102,
- 0x49, 0x102, 0x4c, 0x102, 0x6c, 0x102, 0x4e, 0x210,
- 0x4e, 0x6f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52,
- 0x102, 0x52, 0x102, 0x52, 0x209, 0x53, 0x4d, 0x310,
- 0x54, 0x45, 0x4c, 0x209, 0x54, 0x4d, 0x102, 0x5a,
- 0x101, 0x3a9, 0x102, 0x5a, 0x101, 0x4b, 0x101, 0xc5,
- 0x102, 0x42, 0x102, 0x43, 0x102, 0x65, 0x102, 0x45,
- 0x102, 0x46, 0x102, 0x4d, 0x102, 0x6f, 0x110, 0x5d0,
- 0x110, 0x5d1, 0x110, 0x5d2, 0x110, 0x5d3, 0x102, 0x69,
- 0x310, 0x46, 0x41, 0x58, 0x102, 0x3c0, 0x102, 0x3b3,
- 0x102, 0x393, 0x102, 0x3a0, 0x102, 0x2211, 0x102, 0x44,
- 0x102, 0x64, 0x102, 0x65, 0x102, 0x69, 0x102, 0x6a,
- 0x311, 0x31, 0x2044, 0x33, 0x311, 0x32, 0x2044, 0x33,
- 0x311, 0x31, 0x2044, 0x35, 0x311, 0x32, 0x2044, 0x35,
- 0x311, 0x33, 0x2044, 0x35, 0x311, 0x34, 0x2044, 0x35,
- 0x311, 0x31, 0x2044, 0x36, 0x311, 0x35, 0x2044, 0x36,
- 0x311, 0x31, 0x2044, 0x38, 0x311, 0x33, 0x2044, 0x38,
- 0x311, 0x35, 0x2044, 0x38, 0x311, 0x37, 0x2044, 0x38,
- 0x211, 0x31, 0x2044, 0x110, 0x49, 0x210, 0x49, 0x49,
- 0x310, 0x49, 0x49, 0x49, 0x210, 0x49, 0x56, 0x110,
- 0x56, 0x210, 0x56, 0x49, 0x310, 0x56, 0x49, 0x49,
- 0x410, 0x56, 0x49, 0x49, 0x49, 0x210, 0x49, 0x58,
- 0x110, 0x58, 0x210, 0x58, 0x49, 0x310, 0x58, 0x49,
- 0x49, 0x110, 0x4c, 0x110, 0x43, 0x110, 0x44, 0x110,
- 0x4d, 0x110, 0x69, 0x210, 0x69, 0x69, 0x310, 0x69,
- 0x69, 0x69, 0x210, 0x69, 0x76, 0x110, 0x76, 0x210,
- 0x76, 0x69, 0x310, 0x76, 0x69, 0x69, 0x410, 0x76,
- 0x69, 0x69, 0x69, 0x210, 0x69, 0x78, 0x110, 0x78,
- 0x210, 0x78, 0x69, 0x310, 0x78, 0x69, 0x69, 0x110,
- 0x6c, 0x110, 0x63, 0x110, 0x64, 0x110, 0x6d, 0x201,
- 0x2190, 0x338, 0x201, 0x2192, 0x338, 0x201, 0x2194, 0x338,
- 0x201, 0x21d0, 0x338, 0x201, 0x21d4, 0x338, 0x201, 0x21d2,
- 0x338, 0x201, 0x2203, 0x338, 0x201, 0x2208, 0x338, 0x201,
- 0x220b, 0x338, 0x201, 0x2223, 0x338, 0x201, 0x2225, 0x338,
- 0x210, 0x222b, 0x222b, 0x310, 0x222b, 0x222b, 0x222b, 0x210,
- 0x222e, 0x222e, 0x310, 0x222e, 0x222e, 0x222e, 0x201, 0x223c,
- 0x338, 0x201, 0x2243, 0x338, 0x201, 0x2245, 0x338, 0x201,
- 0x2248, 0x338, 0x201, 0x3d, 0x338, 0x201, 0x2261, 0x338,
- 0x201, 0x224d, 0x338, 0x201, 0x3c, 0x338, 0x201, 0x3e,
- 0x338, 0x201, 0x2264, 0x338, 0x201, 0x2265, 0x338, 0x201,
- 0x2272, 0x338, 0x201, 0x2273, 0x338, 0x201, 0x2276, 0x338,
- 0x201, 0x2277, 0x338, 0x201, 0x227a, 0x338, 0x201, 0x227b,
- 0x338, 0x201, 0x2282, 0x338, 0x201, 0x2283, 0x338, 0x201,
- 0x2286, 0x338, 0x201, 0x2287, 0x338, 0x201, 0x22a2, 0x338,
- 0x201, 0x22a8, 0x338, 0x201, 0x22a9, 0x338, 0x201, 0x22ab,
- 0x338, 0x201, 0x227c, 0x338, 0x201, 0x227d, 0x338, 0x201,
- 0x2291, 0x338, 0x201, 0x2292, 0x338, 0x201, 0x22b2, 0x338,
- 0x201, 0x22b3, 0x338, 0x201, 0x22b4, 0x338, 0x201, 0x22b5,
- 0x338, 0x101, 0x3008, 0x101, 0x3009, 0x108, 0x31, 0x108,
- 0x32, 0x108, 0x33, 0x108, 0x34, 0x108, 0x35, 0x108,
- 0x36, 0x108, 0x37, 0x108, 0x38, 0x108, 0x39, 0x208,
- 0x31, 0x30, 0x208, 0x31, 0x31, 0x208, 0x31, 0x32,
- 0x208, 0x31, 0x33, 0x208, 0x31, 0x34, 0x208, 0x31,
- 0x35, 0x208, 0x31, 0x36, 0x208, 0x31, 0x37, 0x208,
- 0x31, 0x38, 0x208, 0x31, 0x39, 0x208, 0x32, 0x30,
- 0x310, 0x28, 0x31, 0x29, 0x310, 0x28, 0x32, 0x29,
- 0x310, 0x28, 0x33, 0x29, 0x310, 0x28, 0x34, 0x29,
- 0x310, 0x28, 0x35, 0x29, 0x310, 0x28, 0x36, 0x29,
- 0x310, 0x28, 0x37, 0x29, 0x310, 0x28, 0x38, 0x29,
- 0x310, 0x28, 0x39, 0x29, 0x410, 0x28, 0x31, 0x30,
- 0x29, 0x410, 0x28, 0x31, 0x31, 0x29, 0x410, 0x28,
- 0x31, 0x32, 0x29, 0x410, 0x28, 0x31, 0x33, 0x29,
- 0x410, 0x28, 0x31, 0x34, 0x29, 0x410, 0x28, 0x31,
- 0x35, 0x29, 0x410, 0x28, 0x31, 0x36, 0x29, 0x410,
- 0x28, 0x31, 0x37, 0x29, 0x410, 0x28, 0x31, 0x38,
- 0x29, 0x410, 0x28, 0x31, 0x39, 0x29, 0x410, 0x28,
- 0x32, 0x30, 0x29, 0x210, 0x31, 0x2e, 0x210, 0x32,
- 0x2e, 0x210, 0x33, 0x2e, 0x210, 0x34, 0x2e, 0x210,
- 0x35, 0x2e, 0x210, 0x36, 0x2e, 0x210, 0x37, 0x2e,
- 0x210, 0x38, 0x2e, 0x210, 0x39, 0x2e, 0x310, 0x31,
- 0x30, 0x2e, 0x310, 0x31, 0x31, 0x2e, 0x310, 0x31,
- 0x32, 0x2e, 0x310, 0x31, 0x33, 0x2e, 0x310, 0x31,
- 0x34, 0x2e, 0x310, 0x31, 0x35, 0x2e, 0x310, 0x31,
- 0x36, 0x2e, 0x310, 0x31, 0x37, 0x2e, 0x310, 0x31,
- 0x38, 0x2e, 0x310, 0x31, 0x39, 0x2e, 0x310, 0x32,
- 0x30, 0x2e, 0x310, 0x28, 0x61, 0x29, 0x310, 0x28,
- 0x62, 0x29, 0x310, 0x28, 0x63, 0x29, 0x310, 0x28,
- 0x64, 0x29, 0x310, 0x28, 0x65, 0x29, 0x310, 0x28,
- 0x66, 0x29, 0x310, 0x28, 0x67, 0x29, 0x310, 0x28,
- 0x68, 0x29, 0x310, 0x28, 0x69, 0x29, 0x310, 0x28,
- 0x6a, 0x29, 0x310, 0x28, 0x6b, 0x29, 0x310, 0x28,
- 0x6c, 0x29, 0x310, 0x28, 0x6d, 0x29, 0x310, 0x28,
- 0x6e, 0x29, 0x310, 0x28, 0x6f, 0x29, 0x310, 0x28,
- 0x70, 0x29, 0x310, 0x28, 0x71, 0x29, 0x310, 0x28,
- 0x72, 0x29, 0x310, 0x28, 0x73, 0x29, 0x310, 0x28,
- 0x74, 0x29, 0x310, 0x28, 0x75, 0x29, 0x310, 0x28,
- 0x76, 0x29, 0x310, 0x28, 0x77, 0x29, 0x310, 0x28,
- 0x78, 0x29, 0x310, 0x28, 0x79, 0x29, 0x310, 0x28,
- 0x7a, 0x29, 0x108, 0x41, 0x108, 0x42, 0x108, 0x43,
- 0x108, 0x44, 0x108, 0x45, 0x108, 0x46, 0x108, 0x47,
- 0x108, 0x48, 0x108, 0x49, 0x108, 0x4a, 0x108, 0x4b,
- 0x108, 0x4c, 0x108, 0x4d, 0x108, 0x4e, 0x108, 0x4f,
- 0x108, 0x50, 0x108, 0x51, 0x108, 0x52, 0x108, 0x53,
- 0x108, 0x54, 0x108, 0x55, 0x108, 0x56, 0x108, 0x57,
- 0x108, 0x58, 0x108, 0x59, 0x108, 0x5a, 0x108, 0x61,
- 0x108, 0x62, 0x108, 0x63, 0x108, 0x64, 0x108, 0x65,
- 0x108, 0x66, 0x108, 0x67, 0x108, 0x68, 0x108, 0x69,
- 0x108, 0x6a, 0x108, 0x6b, 0x108, 0x6c, 0x108, 0x6d,
- 0x108, 0x6e, 0x108, 0x6f, 0x108, 0x70, 0x108, 0x71,
- 0x108, 0x72, 0x108, 0x73, 0x108, 0x74, 0x108, 0x75,
- 0x108, 0x76, 0x108, 0x77, 0x108, 0x78, 0x108, 0x79,
- 0x108, 0x7a, 0x108, 0x30, 0x410, 0x222b, 0x222b, 0x222b,
- 0x222b, 0x310, 0x3a, 0x3a, 0x3d, 0x210, 0x3d, 0x3d,
- 0x310, 0x3d, 0x3d, 0x3d, 0x201, 0x2add, 0x338, 0x109,
- 0x2d61, 0x110, 0x6bcd, 0x110, 0x9f9f, 0x110, 0x4e00, 0x110,
- 0x4e28, 0x110, 0x4e36, 0x110, 0x4e3f, 0x110, 0x4e59, 0x110,
- 0x4e85, 0x110, 0x4e8c, 0x110, 0x4ea0, 0x110, 0x4eba, 0x110,
- 0x513f, 0x110, 0x5165, 0x110, 0x516b, 0x110, 0x5182, 0x110,
- 0x5196, 0x110, 0x51ab, 0x110, 0x51e0, 0x110, 0x51f5, 0x110,
- 0x5200, 0x110, 0x529b, 0x110, 0x52f9, 0x110, 0x5315, 0x110,
- 0x531a, 0x110, 0x5338, 0x110, 0x5341, 0x110, 0x535c, 0x110,
- 0x5369, 0x110, 0x5382, 0x110, 0x53b6, 0x110, 0x53c8, 0x110,
- 0x53e3, 0x110, 0x56d7, 0x110, 0x571f, 0x110, 0x58eb, 0x110,
- 0x5902, 0x110, 0x590a, 0x110, 0x5915, 0x110, 0x5927, 0x110,
- 0x5973, 0x110, 0x5b50, 0x110, 0x5b80, 0x110, 0x5bf8, 0x110,
- 0x5c0f, 0x110, 0x5c22, 0x110, 0x5c38, 0x110, 0x5c6e, 0x110,
- 0x5c71, 0x110, 0x5ddb, 0x110, 0x5de5, 0x110, 0x5df1, 0x110,
- 0x5dfe, 0x110, 0x5e72, 0x110, 0x5e7a, 0x110, 0x5e7f, 0x110,
- 0x5ef4, 0x110, 0x5efe, 0x110, 0x5f0b, 0x110, 0x5f13, 0x110,
- 0x5f50, 0x110, 0x5f61, 0x110, 0x5f73, 0x110, 0x5fc3, 0x110,
- 0x6208, 0x110, 0x6236, 0x110, 0x624b, 0x110, 0x652f, 0x110,
- 0x6534, 0x110, 0x6587, 0x110, 0x6597, 0x110, 0x65a4, 0x110,
- 0x65b9, 0x110, 0x65e0, 0x110, 0x65e5, 0x110, 0x66f0, 0x110,
- 0x6708, 0x110, 0x6728, 0x110, 0x6b20, 0x110, 0x6b62, 0x110,
- 0x6b79, 0x110, 0x6bb3, 0x110, 0x6bcb, 0x110, 0x6bd4, 0x110,
- 0x6bdb, 0x110, 0x6c0f, 0x110, 0x6c14, 0x110, 0x6c34, 0x110,
- 0x706b, 0x110, 0x722a, 0x110, 0x7236, 0x110, 0x723b, 0x110,
- 0x723f, 0x110, 0x7247, 0x110, 0x7259, 0x110, 0x725b, 0x110,
- 0x72ac, 0x110, 0x7384, 0x110, 0x7389, 0x110, 0x74dc, 0x110,
- 0x74e6, 0x110, 0x7518, 0x110, 0x751f, 0x110, 0x7528, 0x110,
- 0x7530, 0x110, 0x758b, 0x110, 0x7592, 0x110, 0x7676, 0x110,
- 0x767d, 0x110, 0x76ae, 0x110, 0x76bf, 0x110, 0x76ee, 0x110,
- 0x77db, 0x110, 0x77e2, 0x110, 0x77f3, 0x110, 0x793a, 0x110,
- 0x79b8, 0x110, 0x79be, 0x110, 0x7a74, 0x110, 0x7acb, 0x110,
- 0x7af9, 0x110, 0x7c73, 0x110, 0x7cf8, 0x110, 0x7f36, 0x110,
- 0x7f51, 0x110, 0x7f8a, 0x110, 0x7fbd, 0x110, 0x8001, 0x110,
- 0x800c, 0x110, 0x8012, 0x110, 0x8033, 0x110, 0x807f, 0x110,
- 0x8089, 0x110, 0x81e3, 0x110, 0x81ea, 0x110, 0x81f3, 0x110,
- 0x81fc, 0x110, 0x820c, 0x110, 0x821b, 0x110, 0x821f, 0x110,
- 0x826e, 0x110, 0x8272, 0x110, 0x8278, 0x110, 0x864d, 0x110,
- 0x866b, 0x110, 0x8840, 0x110, 0x884c, 0x110, 0x8863, 0x110,
- 0x897e, 0x110, 0x898b, 0x110, 0x89d2, 0x110, 0x8a00, 0x110,
- 0x8c37, 0x110, 0x8c46, 0x110, 0x8c55, 0x110, 0x8c78, 0x110,
- 0x8c9d, 0x110, 0x8d64, 0x110, 0x8d70, 0x110, 0x8db3, 0x110,
- 0x8eab, 0x110, 0x8eca, 0x110, 0x8f9b, 0x110, 0x8fb0, 0x110,
- 0x8fb5, 0x110, 0x9091, 0x110, 0x9149, 0x110, 0x91c6, 0x110,
- 0x91cc, 0x110, 0x91d1, 0x110, 0x9577, 0x110, 0x9580, 0x110,
- 0x961c, 0x110, 0x96b6, 0x110, 0x96b9, 0x110, 0x96e8, 0x110,
- 0x9751, 0x110, 0x975e, 0x110, 0x9762, 0x110, 0x9769, 0x110,
- 0x97cb, 0x110, 0x97ed, 0x110, 0x97f3, 0x110, 0x9801, 0x110,
- 0x98a8, 0x110, 0x98db, 0x110, 0x98df, 0x110, 0x9996, 0x110,
- 0x9999, 0x110, 0x99ac, 0x110, 0x9aa8, 0x110, 0x9ad8, 0x110,
- 0x9adf, 0x110, 0x9b25, 0x110, 0x9b2f, 0x110, 0x9b32, 0x110,
- 0x9b3c, 0x110, 0x9b5a, 0x110, 0x9ce5, 0x110, 0x9e75, 0x110,
- 0x9e7f, 0x110, 0x9ea5, 0x110, 0x9ebb, 0x110, 0x9ec3, 0x110,
- 0x9ecd, 0x110, 0x9ed1, 0x110, 0x9ef9, 0x110, 0x9efd, 0x110,
- 0x9f0e, 0x110, 0x9f13, 0x110, 0x9f20, 0x110, 0x9f3b, 0x110,
- 0x9f4a, 0x110, 0x9f52, 0x110, 0x9f8d, 0x110, 0x9f9c, 0x110,
- 0x9fa0, 0x10c, 0x20, 0x110, 0x3012, 0x110, 0x5341, 0x110,
- 0x5344, 0x110, 0x5345, 0x201, 0x304b, 0x3099, 0x201, 0x304d,
- 0x3099, 0x201, 0x304f, 0x3099, 0x201, 0x3051, 0x3099, 0x201,
- 0x3053, 0x3099, 0x201, 0x3055, 0x3099, 0x201, 0x3057, 0x3099,
- 0x201, 0x3059, 0x3099, 0x201, 0x305b, 0x3099, 0x201, 0x305d,
- 0x3099, 0x201, 0x305f, 0x3099, 0x201, 0x3061, 0x3099, 0x201,
- 0x3064, 0x3099, 0x201, 0x3066, 0x3099, 0x201, 0x3068, 0x3099,
- 0x201, 0x306f, 0x3099, 0x201, 0x306f, 0x309a, 0x201, 0x3072,
- 0x3099, 0x201, 0x3072, 0x309a, 0x201, 0x3075, 0x3099, 0x201,
- 0x3075, 0x309a, 0x201, 0x3078, 0x3099, 0x201, 0x3078, 0x309a,
- 0x201, 0x307b, 0x3099, 0x201, 0x307b, 0x309a, 0x201, 0x3046,
- 0x3099, 0x210, 0x20, 0x3099, 0x210, 0x20, 0x309a, 0x201,
- 0x309d, 0x3099, 0x20b, 0x3088, 0x308a, 0x201, 0x30ab, 0x3099,
- 0x201, 0x30ad, 0x3099, 0x201, 0x30af, 0x3099, 0x201, 0x30b1,
- 0x3099, 0x201, 0x30b3, 0x3099, 0x201, 0x30b5, 0x3099, 0x201,
- 0x30b7, 0x3099, 0x201, 0x30b9, 0x3099, 0x201, 0x30bb, 0x3099,
- 0x201, 0x30bd, 0x3099, 0x201, 0x30bf, 0x3099, 0x201, 0x30c1,
- 0x3099, 0x201, 0x30c4, 0x3099, 0x201, 0x30c6, 0x3099, 0x201,
- 0x30c8, 0x3099, 0x201, 0x30cf, 0x3099, 0x201, 0x30cf, 0x309a,
- 0x201, 0x30d2, 0x3099, 0x201, 0x30d2, 0x309a, 0x201, 0x30d5,
- 0x3099, 0x201, 0x30d5, 0x309a, 0x201, 0x30d8, 0x3099, 0x201,
- 0x30d8, 0x309a, 0x201, 0x30db, 0x3099, 0x201, 0x30db, 0x309a,
- 0x201, 0x30a6, 0x3099, 0x201, 0x30ef, 0x3099, 0x201, 0x30f0,
- 0x3099, 0x201, 0x30f1, 0x3099, 0x201, 0x30f2, 0x3099, 0x201,
- 0x30fd, 0x3099, 0x20b, 0x30b3, 0x30c8, 0x110, 0x1100, 0x110,
- 0x1101, 0x110, 0x11aa, 0x110, 0x1102, 0x110, 0x11ac, 0x110,
- 0x11ad, 0x110, 0x1103, 0x110, 0x1104, 0x110, 0x1105, 0x110,
- 0x11b0, 0x110, 0x11b1, 0x110, 0x11b2, 0x110, 0x11b3, 0x110,
- 0x11b4, 0x110, 0x11b5, 0x110, 0x111a, 0x110, 0x1106, 0x110,
- 0x1107, 0x110, 0x1108, 0x110, 0x1121, 0x110, 0x1109, 0x110,
- 0x110a, 0x110, 0x110b, 0x110, 0x110c, 0x110, 0x110d, 0x110,
- 0x110e, 0x110, 0x110f, 0x110, 0x1110, 0x110, 0x1111, 0x110,
- 0x1112, 0x110, 0x1161, 0x110, 0x1162, 0x110, 0x1163, 0x110,
- 0x1164, 0x110, 0x1165, 0x110, 0x1166, 0x110, 0x1167, 0x110,
- 0x1168, 0x110, 0x1169, 0x110, 0x116a, 0x110, 0x116b, 0x110,
- 0x116c, 0x110, 0x116d, 0x110, 0x116e, 0x110, 0x116f, 0x110,
- 0x1170, 0x110, 0x1171, 0x110, 0x1172, 0x110, 0x1173, 0x110,
- 0x1174, 0x110, 0x1175, 0x110, 0x1160, 0x110, 0x1114, 0x110,
- 0x1115, 0x110, 0x11c7, 0x110, 0x11c8, 0x110, 0x11cc, 0x110,
- 0x11ce, 0x110, 0x11d3, 0x110, 0x11d7, 0x110, 0x11d9, 0x110,
- 0x111c, 0x110, 0x11dd, 0x110, 0x11df, 0x110, 0x111d, 0x110,
- 0x111e, 0x110, 0x1120, 0x110, 0x1122, 0x110, 0x1123, 0x110,
- 0x1127, 0x110, 0x1129, 0x110, 0x112b, 0x110, 0x112c, 0x110,
- 0x112d, 0x110, 0x112e, 0x110, 0x112f, 0x110, 0x1132, 0x110,
- 0x1136, 0x110, 0x1140, 0x110, 0x1147, 0x110, 0x114c, 0x110,
- 0x11f1, 0x110, 0x11f2, 0x110, 0x1157, 0x110, 0x1158, 0x110,
- 0x1159, 0x110, 0x1184, 0x110, 0x1185, 0x110, 0x1188, 0x110,
- 0x1191, 0x110, 0x1192, 0x110, 0x1194, 0x110, 0x119e, 0x110,
- 0x11a1, 0x109, 0x4e00, 0x109, 0x4e8c, 0x109, 0x4e09, 0x109,
- 0x56db, 0x109, 0x4e0a, 0x109, 0x4e2d, 0x109, 0x4e0b, 0x109,
- 0x7532, 0x109, 0x4e59, 0x109, 0x4e19, 0x109, 0x4e01, 0x109,
- 0x5929, 0x109, 0x5730, 0x109, 0x4eba, 0x310, 0x28, 0x1100,
- 0x29, 0x310, 0x28, 0x1102, 0x29, 0x310, 0x28, 0x1103,
- 0x29, 0x310, 0x28, 0x1105, 0x29, 0x310, 0x28, 0x1106,
- 0x29, 0x310, 0x28, 0x1107, 0x29, 0x310, 0x28, 0x1109,
- 0x29, 0x310, 0x28, 0x110b, 0x29, 0x310, 0x28, 0x110c,
- 0x29, 0x310, 0x28, 0x110e, 0x29, 0x310, 0x28, 0x110f,
- 0x29, 0x310, 0x28, 0x1110, 0x29, 0x310, 0x28, 0x1111,
- 0x29, 0x310, 0x28, 0x1112, 0x29, 0x410, 0x28, 0x1100,
- 0x1161, 0x29, 0x410, 0x28, 0x1102, 0x1161, 0x29, 0x410,
- 0x28, 0x1103, 0x1161, 0x29, 0x410, 0x28, 0x1105, 0x1161,
- 0x29, 0x410, 0x28, 0x1106, 0x1161, 0x29, 0x410, 0x28,
- 0x1107, 0x1161, 0x29, 0x410, 0x28, 0x1109, 0x1161, 0x29,
- 0x410, 0x28, 0x110b, 0x1161, 0x29, 0x410, 0x28, 0x110c,
- 0x1161, 0x29, 0x410, 0x28, 0x110e, 0x1161, 0x29, 0x410,
- 0x28, 0x110f, 0x1161, 0x29, 0x410, 0x28, 0x1110, 0x1161,
- 0x29, 0x410, 0x28, 0x1111, 0x1161, 0x29, 0x410, 0x28,
- 0x1112, 0x1161, 0x29, 0x410, 0x28, 0x110c, 0x116e, 0x29,
- 0x710, 0x28, 0x110b, 0x1169, 0x110c, 0x1165, 0x11ab, 0x29,
- 0x610, 0x28, 0x110b, 0x1169, 0x1112, 0x116e, 0x29, 0x310,
- 0x28, 0x4e00, 0x29, 0x310, 0x28, 0x4e8c, 0x29, 0x310,
- 0x28, 0x4e09, 0x29, 0x310, 0x28, 0x56db, 0x29, 0x310,
- 0x28, 0x4e94, 0x29, 0x310, 0x28, 0x516d, 0x29, 0x310,
- 0x28, 0x4e03, 0x29, 0x310, 0x28, 0x516b, 0x29, 0x310,
- 0x28, 0x4e5d, 0x29, 0x310, 0x28, 0x5341, 0x29, 0x310,
- 0x28, 0x6708, 0x29, 0x310, 0x28, 0x706b, 0x29, 0x310,
- 0x28, 0x6c34, 0x29, 0x310, 0x28, 0x6728, 0x29, 0x310,
- 0x28, 0x91d1, 0x29, 0x310, 0x28, 0x571f, 0x29, 0x310,
- 0x28, 0x65e5, 0x29, 0x310, 0x28, 0x682a, 0x29, 0x310,
- 0x28, 0x6709, 0x29, 0x310, 0x28, 0x793e, 0x29, 0x310,
- 0x28, 0x540d, 0x29, 0x310, 0x28, 0x7279, 0x29, 0x310,
- 0x28, 0x8ca1, 0x29, 0x310, 0x28, 0x795d, 0x29, 0x310,
- 0x28, 0x52b4, 0x29, 0x310, 0x28, 0x4ee3, 0x29, 0x310,
- 0x28, 0x547c, 0x29, 0x310, 0x28, 0x5b66, 0x29, 0x310,
- 0x28, 0x76e3, 0x29, 0x310, 0x28, 0x4f01, 0x29, 0x310,
- 0x28, 0x8cc7, 0x29, 0x310, 0x28, 0x5354, 0x29, 0x310,
- 0x28, 0x796d, 0x29, 0x310, 0x28, 0x4f11, 0x29, 0x310,
- 0x28, 0x81ea, 0x29, 0x310, 0x28, 0x81f3, 0x29, 0x30f,
- 0x50, 0x54, 0x45, 0x208, 0x32, 0x31, 0x208, 0x32,
- 0x32, 0x208, 0x32, 0x33, 0x208, 0x32, 0x34, 0x208,
- 0x32, 0x35, 0x208, 0x32, 0x36, 0x208, 0x32, 0x37,
- 0x208, 0x32, 0x38, 0x208, 0x32, 0x39, 0x208, 0x33,
- 0x30, 0x208, 0x33, 0x31, 0x208, 0x33, 0x32, 0x208,
- 0x33, 0x33, 0x208, 0x33, 0x34, 0x208, 0x33, 0x35,
- 0x108, 0x1100, 0x108, 0x1102, 0x108, 0x1103, 0x108, 0x1105,
- 0x108, 0x1106, 0x108, 0x1107, 0x108, 0x1109, 0x108, 0x110b,
- 0x108, 0x110c, 0x108, 0x110e, 0x108, 0x110f, 0x108, 0x1110,
- 0x108, 0x1111, 0x108, 0x1112, 0x208, 0x1100, 0x1161, 0x208,
- 0x1102, 0x1161, 0x208, 0x1103, 0x1161, 0x208, 0x1105, 0x1161,
- 0x208, 0x1106, 0x1161, 0x208, 0x1107, 0x1161, 0x208, 0x1109,
- 0x1161, 0x208, 0x110b, 0x1161, 0x208, 0x110c, 0x1161, 0x208,
- 0x110e, 0x1161, 0x208, 0x110f, 0x1161, 0x208, 0x1110, 0x1161,
- 0x208, 0x1111, 0x1161, 0x208, 0x1112, 0x1161, 0x508, 0x110e,
- 0x1161, 0x11b7, 0x1100, 0x1169, 0x408, 0x110c, 0x116e, 0x110b,
- 0x1174, 0x208, 0x110b, 0x116e, 0x108, 0x4e00, 0x108, 0x4e8c,
- 0x108, 0x4e09, 0x108, 0x56db, 0x108, 0x4e94, 0x108, 0x516d,
- 0x108, 0x4e03, 0x108, 0x516b, 0x108, 0x4e5d, 0x108, 0x5341,
- 0x108, 0x6708, 0x108, 0x706b, 0x108, 0x6c34, 0x108, 0x6728,
- 0x108, 0x91d1, 0x108, 0x571f, 0x108, 0x65e5, 0x108, 0x682a,
- 0x108, 0x6709, 0x108, 0x793e, 0x108, 0x540d, 0x108, 0x7279,
- 0x108, 0x8ca1, 0x108, 0x795d, 0x108, 0x52b4, 0x108, 0x79d8,
- 0x108, 0x7537, 0x108, 0x5973, 0x108, 0x9069, 0x108, 0x512a,
- 0x108, 0x5370, 0x108, 0x6ce8, 0x108, 0x9805, 0x108, 0x4f11,
- 0x108, 0x5199, 0x108, 0x6b63, 0x108, 0x4e0a, 0x108, 0x4e2d,
- 0x108, 0x4e0b, 0x108, 0x5de6, 0x108, 0x53f3, 0x108, 0x533b,
- 0x108, 0x5b97, 0x108, 0x5b66, 0x108, 0x76e3, 0x108, 0x4f01,
- 0x108, 0x8cc7, 0x108, 0x5354, 0x108, 0x591c, 0x208, 0x33,
- 0x36, 0x208, 0x33, 0x37, 0x208, 0x33, 0x38, 0x208,
- 0x33, 0x39, 0x208, 0x34, 0x30, 0x208, 0x34, 0x31,
- 0x208, 0x34, 0x32, 0x208, 0x34, 0x33, 0x208, 0x34,
- 0x34, 0x208, 0x34, 0x35, 0x208, 0x34, 0x36, 0x208,
- 0x34, 0x37, 0x208, 0x34, 0x38, 0x208, 0x34, 0x39,
- 0x208, 0x35, 0x30, 0x210, 0x31, 0x6708, 0x210, 0x32,
- 0x6708, 0x210, 0x33, 0x6708, 0x210, 0x34, 0x6708, 0x210,
- 0x35, 0x6708, 0x210, 0x36, 0x6708, 0x210, 0x37, 0x6708,
- 0x210, 0x38, 0x6708, 0x210, 0x39, 0x6708, 0x310, 0x31,
- 0x30, 0x6708, 0x310, 0x31, 0x31, 0x6708, 0x310, 0x31,
- 0x32, 0x6708, 0x20f, 0x48, 0x67, 0x30f, 0x65, 0x72,
- 0x67, 0x20f, 0x65, 0x56, 0x30f, 0x4c, 0x54, 0x44,
- 0x108, 0x30a2, 0x108, 0x30a4, 0x108, 0x30a6, 0x108, 0x30a8,
- 0x108, 0x30aa, 0x108, 0x30ab, 0x108, 0x30ad, 0x108, 0x30af,
- 0x108, 0x30b1, 0x108, 0x30b3, 0x108, 0x30b5, 0x108, 0x30b7,
- 0x108, 0x30b9, 0x108, 0x30bb, 0x108, 0x30bd, 0x108, 0x30bf,
- 0x108, 0x30c1, 0x108, 0x30c4, 0x108, 0x30c6, 0x108, 0x30c8,
- 0x108, 0x30ca, 0x108, 0x30cb, 0x108, 0x30cc, 0x108, 0x30cd,
- 0x108, 0x30ce, 0x108, 0x30cf, 0x108, 0x30d2, 0x108, 0x30d5,
- 0x108, 0x30d8, 0x108, 0x30db, 0x108, 0x30de, 0x108, 0x30df,
- 0x108, 0x30e0, 0x108, 0x30e1, 0x108, 0x30e2, 0x108, 0x30e4,
- 0x108, 0x30e6, 0x108, 0x30e8, 0x108, 0x30e9, 0x108, 0x30ea,
- 0x108, 0x30eb, 0x108, 0x30ec, 0x108, 0x30ed, 0x108, 0x30ef,
- 0x108, 0x30f0, 0x108, 0x30f1, 0x108, 0x30f2, 0x40f, 0x30a2,
- 0x30d1, 0x30fc, 0x30c8, 0x40f, 0x30a2, 0x30eb, 0x30d5, 0x30a1,
- 0x40f, 0x30a2, 0x30f3, 0x30da, 0x30a2, 0x30f, 0x30a2, 0x30fc,
- 0x30eb, 0x40f, 0x30a4, 0x30cb, 0x30f3, 0x30b0, 0x30f, 0x30a4,
- 0x30f3, 0x30c1, 0x30f, 0x30a6, 0x30a9, 0x30f3, 0x50f, 0x30a8,
- 0x30b9, 0x30af, 0x30fc, 0x30c9, 0x40f, 0x30a8, 0x30fc, 0x30ab,
- 0x30fc, 0x30f, 0x30aa, 0x30f3, 0x30b9, 0x30f, 0x30aa, 0x30fc,
- 0x30e0, 0x30f, 0x30ab, 0x30a4, 0x30ea, 0x40f, 0x30ab, 0x30e9,
- 0x30c3, 0x30c8, 0x40f, 0x30ab, 0x30ed, 0x30ea, 0x30fc, 0x30f,
- 0x30ac, 0x30ed, 0x30f3, 0x30f, 0x30ac, 0x30f3, 0x30de, 0x20f,
- 0x30ae, 0x30ac, 0x30f, 0x30ae, 0x30cb, 0x30fc, 0x40f, 0x30ad,
- 0x30e5, 0x30ea, 0x30fc, 0x40f, 0x30ae, 0x30eb, 0x30c0, 0x30fc,
- 0x20f, 0x30ad, 0x30ed, 0x50f, 0x30ad, 0x30ed, 0x30b0, 0x30e9,
- 0x30e0, 0x60f, 0x30ad, 0x30ed, 0x30e1, 0x30fc, 0x30c8, 0x30eb,
- 0x50f, 0x30ad, 0x30ed, 0x30ef, 0x30c3, 0x30c8, 0x30f, 0x30b0,
- 0x30e9, 0x30e0, 0x50f, 0x30b0, 0x30e9, 0x30e0, 0x30c8, 0x30f3,
- 0x50f, 0x30af, 0x30eb, 0x30bc, 0x30a4, 0x30ed, 0x40f, 0x30af,
- 0x30ed, 0x30fc, 0x30cd, 0x30f, 0x30b1, 0x30fc, 0x30b9, 0x30f,
- 0x30b3, 0x30eb, 0x30ca, 0x30f, 0x30b3, 0x30fc, 0x30dd, 0x40f,
- 0x30b5, 0x30a4, 0x30af, 0x30eb, 0x50f, 0x30b5, 0x30f3, 0x30c1,
- 0x30fc, 0x30e0, 0x40f, 0x30b7, 0x30ea, 0x30f3, 0x30b0, 0x30f,
- 0x30bb, 0x30f3, 0x30c1, 0x30f, 0x30bb, 0x30f3, 0x30c8, 0x30f,
- 0x30c0, 0x30fc, 0x30b9, 0x20f, 0x30c7, 0x30b7, 0x20f, 0x30c9,
- 0x30eb, 0x20f, 0x30c8, 0x30f3, 0x20f, 0x30ca, 0x30ce, 0x30f,
- 0x30ce, 0x30c3, 0x30c8, 0x30f, 0x30cf, 0x30a4, 0x30c4, 0x50f,
- 0x30d1, 0x30fc, 0x30bb, 0x30f3, 0x30c8, 0x30f, 0x30d1, 0x30fc,
- 0x30c4, 0x40f, 0x30d0, 0x30fc, 0x30ec, 0x30eb, 0x50f, 0x30d4,
- 0x30a2, 0x30b9, 0x30c8, 0x30eb, 0x30f, 0x30d4, 0x30af, 0x30eb,
- 0x20f, 0x30d4, 0x30b3, 0x20f, 0x30d3, 0x30eb, 0x50f, 0x30d5,
- 0x30a1, 0x30e9, 0x30c3, 0x30c9, 0x40f, 0x30d5, 0x30a3, 0x30fc,
- 0x30c8, 0x50f, 0x30d6, 0x30c3, 0x30b7, 0x30a7, 0x30eb, 0x30f,
- 0x30d5, 0x30e9, 0x30f3, 0x50f, 0x30d8, 0x30af, 0x30bf, 0x30fc,
- 0x30eb, 0x20f, 0x30da, 0x30bd, 0x30f, 0x30da, 0x30cb, 0x30d2,
- 0x30f, 0x30d8, 0x30eb, 0x30c4, 0x30f, 0x30da, 0x30f3, 0x30b9,
- 0x30f, 0x30da, 0x30fc, 0x30b8, 0x30f, 0x30d9, 0x30fc, 0x30bf,
- 0x40f, 0x30dd, 0x30a4, 0x30f3, 0x30c8, 0x30f, 0x30dc, 0x30eb,
- 0x30c8, 0x20f, 0x30db, 0x30f3, 0x30f, 0x30dd, 0x30f3, 0x30c9,
- 0x30f, 0x30db, 0x30fc, 0x30eb, 0x30f, 0x30db, 0x30fc, 0x30f3,
- 0x40f, 0x30de, 0x30a4, 0x30af, 0x30ed, 0x30f, 0x30de, 0x30a4,
- 0x30eb, 0x30f, 0x30de, 0x30c3, 0x30cf, 0x30f, 0x30de, 0x30eb,
- 0x30af, 0x50f, 0x30de, 0x30f3, 0x30b7, 0x30e7, 0x30f3, 0x40f,
- 0x30df, 0x30af, 0x30ed, 0x30f3, 0x20f, 0x30df, 0x30ea, 0x50f,
- 0x30df, 0x30ea, 0x30d0, 0x30fc, 0x30eb, 0x20f, 0x30e1, 0x30ac,
- 0x40f, 0x30e1, 0x30ac, 0x30c8, 0x30f3, 0x40f, 0x30e1, 0x30fc,
- 0x30c8, 0x30eb, 0x30f, 0x30e4, 0x30fc, 0x30c9, 0x30f, 0x30e4,
- 0x30fc, 0x30eb, 0x30f, 0x30e6, 0x30a2, 0x30f3, 0x40f, 0x30ea,
- 0x30c3, 0x30c8, 0x30eb, 0x20f, 0x30ea, 0x30e9, 0x30f, 0x30eb,
- 0x30d4, 0x30fc, 0x40f, 0x30eb, 0x30fc, 0x30d6, 0x30eb, 0x20f,
- 0x30ec, 0x30e0, 0x50f, 0x30ec, 0x30f3, 0x30c8, 0x30b2, 0x30f3,
- 0x30f, 0x30ef, 0x30c3, 0x30c8, 0x210, 0x30, 0x70b9, 0x210,
- 0x31, 0x70b9, 0x210, 0x32, 0x70b9, 0x210, 0x33, 0x70b9,
- 0x210, 0x34, 0x70b9, 0x210, 0x35, 0x70b9, 0x210, 0x36,
- 0x70b9, 0x210, 0x37, 0x70b9, 0x210, 0x38, 0x70b9, 0x210,
- 0x39, 0x70b9, 0x310, 0x31, 0x30, 0x70b9, 0x310, 0x31,
- 0x31, 0x70b9, 0x310, 0x31, 0x32, 0x70b9, 0x310, 0x31,
- 0x33, 0x70b9, 0x310, 0x31, 0x34, 0x70b9, 0x310, 0x31,
- 0x35, 0x70b9, 0x310, 0x31, 0x36, 0x70b9, 0x310, 0x31,
- 0x37, 0x70b9, 0x310, 0x31, 0x38, 0x70b9, 0x310, 0x31,
- 0x39, 0x70b9, 0x310, 0x32, 0x30, 0x70b9, 0x310, 0x32,
- 0x31, 0x70b9, 0x310, 0x32, 0x32, 0x70b9, 0x310, 0x32,
- 0x33, 0x70b9, 0x310, 0x32, 0x34, 0x70b9, 0x30f, 0x68,
- 0x50, 0x61, 0x20f, 0x64, 0x61, 0x20f, 0x41, 0x55,
- 0x30f, 0x62, 0x61, 0x72, 0x20f, 0x6f, 0x56, 0x20f,
- 0x70, 0x63, 0x20f, 0x64, 0x6d, 0x30f, 0x64, 0x6d,
- 0xb2, 0x30f, 0x64, 0x6d, 0xb3, 0x20f, 0x49, 0x55,
- 0x20f, 0x5e73, 0x6210, 0x20f, 0x662d, 0x548c, 0x20f, 0x5927,
- 0x6b63, 0x20f, 0x660e, 0x6cbb, 0x40f, 0x682a, 0x5f0f, 0x4f1a,
- 0x793e, 0x20f, 0x70, 0x41, 0x20f, 0x6e, 0x41, 0x20f,
- 0x3bc, 0x41, 0x20f, 0x6d, 0x41, 0x20f, 0x6b, 0x41,
- 0x20f, 0x4b, 0x42, 0x20f, 0x4d, 0x42, 0x20f, 0x47,
- 0x42, 0x30f, 0x63, 0x61, 0x6c, 0x40f, 0x6b, 0x63,
- 0x61, 0x6c, 0x20f, 0x70, 0x46, 0x20f, 0x6e, 0x46,
- 0x20f, 0x3bc, 0x46, 0x20f, 0x3bc, 0x67, 0x20f, 0x6d,
- 0x67, 0x20f, 0x6b, 0x67, 0x20f, 0x48, 0x7a, 0x30f,
- 0x6b, 0x48, 0x7a, 0x30f, 0x4d, 0x48, 0x7a, 0x30f,
- 0x47, 0x48, 0x7a, 0x30f, 0x54, 0x48, 0x7a, 0x20f,
- 0x3bc, 0x2113, 0x20f, 0x6d, 0x2113, 0x20f, 0x64, 0x2113,
- 0x20f, 0x6b, 0x2113, 0x20f, 0x66, 0x6d, 0x20f, 0x6e,
- 0x6d, 0x20f, 0x3bc, 0x6d, 0x20f, 0x6d, 0x6d, 0x20f,
- 0x63, 0x6d, 0x20f, 0x6b, 0x6d, 0x30f, 0x6d, 0x6d,
- 0xb2, 0x30f, 0x63, 0x6d, 0xb2, 0x20f, 0x6d, 0xb2,
- 0x30f, 0x6b, 0x6d, 0xb2, 0x30f, 0x6d, 0x6d, 0xb3,
- 0x30f, 0x63, 0x6d, 0xb3, 0x20f, 0x6d, 0xb3, 0x30f,
- 0x6b, 0x6d, 0xb3, 0x30f, 0x6d, 0x2215, 0x73, 0x40f,
- 0x6d, 0x2215, 0x73, 0xb2, 0x20f, 0x50, 0x61, 0x30f,
- 0x6b, 0x50, 0x61, 0x30f, 0x4d, 0x50, 0x61, 0x30f,
- 0x47, 0x50, 0x61, 0x30f, 0x72, 0x61, 0x64, 0x50f,
- 0x72, 0x61, 0x64, 0x2215, 0x73, 0x60f, 0x72, 0x61,
- 0x64, 0x2215, 0x73, 0xb2, 0x20f, 0x70, 0x73, 0x20f,
- 0x6e, 0x73, 0x20f, 0x3bc, 0x73, 0x20f, 0x6d, 0x73,
- 0x20f, 0x70, 0x56, 0x20f, 0x6e, 0x56, 0x20f, 0x3bc,
- 0x56, 0x20f, 0x6d, 0x56, 0x20f, 0x6b, 0x56, 0x20f,
- 0x4d, 0x56, 0x20f, 0x70, 0x57, 0x20f, 0x6e, 0x57,
- 0x20f, 0x3bc, 0x57, 0x20f, 0x6d, 0x57, 0x20f, 0x6b,
- 0x57, 0x20f, 0x4d, 0x57, 0x20f, 0x6b, 0x3a9, 0x20f,
- 0x4d, 0x3a9, 0x40f, 0x61, 0x2e, 0x6d, 0x2e, 0x20f,
- 0x42, 0x71, 0x20f, 0x63, 0x63, 0x20f, 0x63, 0x64,
- 0x40f, 0x43, 0x2215, 0x6b, 0x67, 0x30f, 0x43, 0x6f,
- 0x2e, 0x20f, 0x64, 0x42, 0x20f, 0x47, 0x79, 0x20f,
- 0x68, 0x61, 0x20f, 0x48, 0x50, 0x20f, 0x69, 0x6e,
- 0x20f, 0x4b, 0x4b, 0x20f, 0x4b, 0x4d, 0x20f, 0x6b,
- 0x74, 0x20f, 0x6c, 0x6d, 0x20f, 0x6c, 0x6e, 0x30f,
- 0x6c, 0x6f, 0x67, 0x20f, 0x6c, 0x78, 0x20f, 0x6d,
- 0x62, 0x30f, 0x6d, 0x69, 0x6c, 0x30f, 0x6d, 0x6f,
- 0x6c, 0x20f, 0x50, 0x48, 0x40f, 0x70, 0x2e, 0x6d,
- 0x2e, 0x30f, 0x50, 0x50, 0x4d, 0x20f, 0x50, 0x52,
- 0x20f, 0x73, 0x72, 0x20f, 0x53, 0x76, 0x20f, 0x57,
- 0x62, 0x30f, 0x56, 0x2215, 0x6d, 0x30f, 0x41, 0x2215,
- 0x6d, 0x210, 0x31, 0x65e5, 0x210, 0x32, 0x65e5, 0x210,
- 0x33, 0x65e5, 0x210, 0x34, 0x65e5, 0x210, 0x35, 0x65e5,
- 0x210, 0x36, 0x65e5, 0x210, 0x37, 0x65e5, 0x210, 0x38,
- 0x65e5, 0x210, 0x39, 0x65e5, 0x310, 0x31, 0x30, 0x65e5,
- 0x310, 0x31, 0x31, 0x65e5, 0x310, 0x31, 0x32, 0x65e5,
- 0x310, 0x31, 0x33, 0x65e5, 0x310, 0x31, 0x34, 0x65e5,
- 0x310, 0x31, 0x35, 0x65e5, 0x310, 0x31, 0x36, 0x65e5,
- 0x310, 0x31, 0x37, 0x65e5, 0x310, 0x31, 0x38, 0x65e5,
- 0x310, 0x31, 0x39, 0x65e5, 0x310, 0x32, 0x30, 0x65e5,
- 0x310, 0x32, 0x31, 0x65e5, 0x310, 0x32, 0x32, 0x65e5,
- 0x310, 0x32, 0x33, 0x65e5, 0x310, 0x32, 0x34, 0x65e5,
- 0x310, 0x32, 0x35, 0x65e5, 0x310, 0x32, 0x36, 0x65e5,
- 0x310, 0x32, 0x37, 0x65e5, 0x310, 0x32, 0x38, 0x65e5,
- 0x310, 0x32, 0x39, 0x65e5, 0x310, 0x33, 0x30, 0x65e5,
- 0x310, 0x33, 0x31, 0x65e5, 0x30f, 0x67, 0x61, 0x6c,
- 0x101, 0x8c48, 0x101, 0x66f4, 0x101, 0x8eca, 0x101, 0x8cc8,
- 0x101, 0x6ed1, 0x101, 0x4e32, 0x101, 0x53e5, 0x101, 0x9f9c,
- 0x101, 0x9f9c, 0x101, 0x5951, 0x101, 0x91d1, 0x101, 0x5587,
- 0x101, 0x5948, 0x101, 0x61f6, 0x101, 0x7669, 0x101, 0x7f85,
- 0x101, 0x863f, 0x101, 0x87ba, 0x101, 0x88f8, 0x101, 0x908f,
- 0x101, 0x6a02, 0x101, 0x6d1b, 0x101, 0x70d9, 0x101, 0x73de,
- 0x101, 0x843d, 0x101, 0x916a, 0x101, 0x99f1, 0x101, 0x4e82,
- 0x101, 0x5375, 0x101, 0x6b04, 0x101, 0x721b, 0x101, 0x862d,
- 0x101, 0x9e1e, 0x101, 0x5d50, 0x101, 0x6feb, 0x101, 0x85cd,
- 0x101, 0x8964, 0x101, 0x62c9, 0x101, 0x81d8, 0x101, 0x881f,
- 0x101, 0x5eca, 0x101, 0x6717, 0x101, 0x6d6a, 0x101, 0x72fc,
- 0x101, 0x90ce, 0x101, 0x4f86, 0x101, 0x51b7, 0x101, 0x52de,
- 0x101, 0x64c4, 0x101, 0x6ad3, 0x101, 0x7210, 0x101, 0x76e7,
- 0x101, 0x8001, 0x101, 0x8606, 0x101, 0x865c, 0x101, 0x8def,
- 0x101, 0x9732, 0x101, 0x9b6f, 0x101, 0x9dfa, 0x101, 0x788c,
- 0x101, 0x797f, 0x101, 0x7da0, 0x101, 0x83c9, 0x101, 0x9304,
- 0x101, 0x9e7f, 0x101, 0x8ad6, 0x101, 0x58df, 0x101, 0x5f04,
- 0x101, 0x7c60, 0x101, 0x807e, 0x101, 0x7262, 0x101, 0x78ca,
- 0x101, 0x8cc2, 0x101, 0x96f7, 0x101, 0x58d8, 0x101, 0x5c62,
- 0x101, 0x6a13, 0x101, 0x6dda, 0x101, 0x6f0f, 0x101, 0x7d2f,
- 0x101, 0x7e37, 0x101, 0x964b, 0x101, 0x52d2, 0x101, 0x808b,
- 0x101, 0x51dc, 0x101, 0x51cc, 0x101, 0x7a1c, 0x101, 0x7dbe,
- 0x101, 0x83f1, 0x101, 0x9675, 0x101, 0x8b80, 0x101, 0x62cf,
- 0x101, 0x6a02, 0x101, 0x8afe, 0x101, 0x4e39, 0x101, 0x5be7,
- 0x101, 0x6012, 0x101, 0x7387, 0x101, 0x7570, 0x101, 0x5317,
- 0x101, 0x78fb, 0x101, 0x4fbf, 0x101, 0x5fa9, 0x101, 0x4e0d,
- 0x101, 0x6ccc, 0x101, 0x6578, 0x101, 0x7d22, 0x101, 0x53c3,
- 0x101, 0x585e, 0x101, 0x7701, 0x101, 0x8449, 0x101, 0x8aaa,
- 0x101, 0x6bba, 0x101, 0x8fb0, 0x101, 0x6c88, 0x101, 0x62fe,
- 0x101, 0x82e5, 0x101, 0x63a0, 0x101, 0x7565, 0x101, 0x4eae,
- 0x101, 0x5169, 0x101, 0x51c9, 0x101, 0x6881, 0x101, 0x7ce7,
- 0x101, 0x826f, 0x101, 0x8ad2, 0x101, 0x91cf, 0x101, 0x52f5,
- 0x101, 0x5442, 0x101, 0x5973, 0x101, 0x5eec, 0x101, 0x65c5,
- 0x101, 0x6ffe, 0x101, 0x792a, 0x101, 0x95ad, 0x101, 0x9a6a,
- 0x101, 0x9e97, 0x101, 0x9ece, 0x101, 0x529b, 0x101, 0x66c6,
- 0x101, 0x6b77, 0x101, 0x8f62, 0x101, 0x5e74, 0x101, 0x6190,
- 0x101, 0x6200, 0x101, 0x649a, 0x101, 0x6f23, 0x101, 0x7149,
- 0x101, 0x7489, 0x101, 0x79ca, 0x101, 0x7df4, 0x101, 0x806f,
- 0x101, 0x8f26, 0x101, 0x84ee, 0x101, 0x9023, 0x101, 0x934a,
- 0x101, 0x5217, 0x101, 0x52a3, 0x101, 0x54bd, 0x101, 0x70c8,
- 0x101, 0x88c2, 0x101, 0x8aaa, 0x101, 0x5ec9, 0x101, 0x5ff5,
- 0x101, 0x637b, 0x101, 0x6bae, 0x101, 0x7c3e, 0x101, 0x7375,
- 0x101, 0x4ee4, 0x101, 0x56f9, 0x101, 0x5be7, 0x101, 0x5dba,
- 0x101, 0x601c, 0x101, 0x73b2, 0x101, 0x7469, 0x101, 0x7f9a,
- 0x101, 0x8046, 0x101, 0x9234, 0x101, 0x96f6, 0x101, 0x9748,
- 0x101, 0x9818, 0x101, 0x4f8b, 0x101, 0x79ae, 0x101, 0x91b4,
- 0x101, 0x96b8, 0x101, 0x60e1, 0x101, 0x4e86, 0x101, 0x50da,
- 0x101, 0x5bee, 0x101, 0x5c3f, 0x101, 0x6599, 0x101, 0x6a02,
- 0x101, 0x71ce, 0x101, 0x7642, 0x101, 0x84fc, 0x101, 0x907c,
- 0x101, 0x9f8d, 0x101, 0x6688, 0x101, 0x962e, 0x101, 0x5289,
- 0x101, 0x677b, 0x101, 0x67f3, 0x101, 0x6d41, 0x101, 0x6e9c,
- 0x101, 0x7409, 0x101, 0x7559, 0x101, 0x786b, 0x101, 0x7d10,
- 0x101, 0x985e, 0x101, 0x516d, 0x101, 0x622e, 0x101, 0x9678,
- 0x101, 0x502b, 0x101, 0x5d19, 0x101, 0x6dea, 0x101, 0x8f2a,
- 0x101, 0x5f8b, 0x101, 0x6144, 0x101, 0x6817, 0x101, 0x7387,
- 0x101, 0x9686, 0x101, 0x5229, 0x101, 0x540f, 0x101, 0x5c65,
- 0x101, 0x6613, 0x101, 0x674e, 0x101, 0x68a8, 0x101, 0x6ce5,
- 0x101, 0x7406, 0x101, 0x75e2, 0x101, 0x7f79, 0x101, 0x88cf,
- 0x101, 0x88e1, 0x101, 0x91cc, 0x101, 0x96e2, 0x101, 0x533f,
- 0x101, 0x6eba, 0x101, 0x541d, 0x101, 0x71d0, 0x101, 0x7498,
- 0x101, 0x85fa, 0x101, 0x96a3, 0x101, 0x9c57, 0x101, 0x9e9f,
- 0x101, 0x6797, 0x101, 0x6dcb, 0x101, 0x81e8, 0x101, 0x7acb,
- 0x101, 0x7b20, 0x101, 0x7c92, 0x101, 0x72c0, 0x101, 0x7099,
- 0x101, 0x8b58, 0x101, 0x4ec0, 0x101, 0x8336, 0x101, 0x523a,
- 0x101, 0x5207, 0x101, 0x5ea6, 0x101, 0x62d3, 0x101, 0x7cd6,
- 0x101, 0x5b85, 0x101, 0x6d1e, 0x101, 0x66b4, 0x101, 0x8f3b,
- 0x101, 0x884c, 0x101, 0x964d, 0x101, 0x898b, 0x101, 0x5ed3,
- 0x101, 0x5140, 0x101, 0x55c0, 0x101, 0x585a, 0x101, 0x6674,
- 0x101, 0x51de, 0x101, 0x732a, 0x101, 0x76ca, 0x101, 0x793c,
- 0x101, 0x795e, 0x101, 0x7965, 0x101, 0x798f, 0x101, 0x9756,
- 0x101, 0x7cbe, 0x101, 0x7fbd, 0x101, 0x8612, 0x101, 0x8af8,
- 0x101, 0x9038, 0x101, 0x90fd, 0x101, 0x98ef, 0x101, 0x98fc,
- 0x101, 0x9928, 0x101, 0x9db4, 0x101, 0x4fae, 0x101, 0x50e7,
- 0x101, 0x514d, 0x101, 0x52c9, 0x101, 0x52e4, 0x101, 0x5351,
- 0x101, 0x559d, 0x101, 0x5606, 0x101, 0x5668, 0x101, 0x5840,
- 0x101, 0x58a8, 0x101, 0x5c64, 0x101, 0x5c6e, 0x101, 0x6094,
- 0x101, 0x6168, 0x101, 0x618e, 0x101, 0x61f2, 0x101, 0x654f,
- 0x101, 0x65e2, 0x101, 0x6691, 0x101, 0x6885, 0x101, 0x6d77,
- 0x101, 0x6e1a, 0x101, 0x6f22, 0x101, 0x716e, 0x101, 0x722b,
- 0x101, 0x7422, 0x101, 0x7891, 0x101, 0x793e, 0x101, 0x7949,
- 0x101, 0x7948, 0x101, 0x7950, 0x101, 0x7956, 0x101, 0x795d,
- 0x101, 0x798d, 0x101, 0x798e, 0x101, 0x7a40, 0x101, 0x7a81,
- 0x101, 0x7bc0, 0x101, 0x7df4, 0x101, 0x7e09, 0x101, 0x7e41,
- 0x101, 0x7f72, 0x101, 0x8005, 0x101, 0x81ed, 0x101, 0x8279,
- 0x101, 0x8279, 0x101, 0x8457, 0x101, 0x8910, 0x101, 0x8996,
- 0x101, 0x8b01, 0x101, 0x8b39, 0x101, 0x8cd3, 0x101, 0x8d08,
- 0x101, 0x8fb6, 0x101, 0x9038, 0x101, 0x96e3, 0x101, 0x97ff,
- 0x101, 0x983b, 0x101, 0x4e26, 0x101, 0x51b5, 0x101, 0x5168,
- 0x101, 0x4f80, 0x101, 0x5145, 0x101, 0x5180, 0x101, 0x52c7,
- 0x101, 0x52fa, 0x101, 0x559d, 0x101, 0x5555, 0x101, 0x5599,
- 0x101, 0x55e2, 0x101, 0x585a, 0x101, 0x58b3, 0x101, 0x5944,
- 0x101, 0x5954, 0x101, 0x5a62, 0x101, 0x5b28, 0x101, 0x5ed2,
- 0x101, 0x5ed9, 0x101, 0x5f69, 0x101, 0x5fad, 0x101, 0x60d8,
- 0x101, 0x614e, 0x101, 0x6108, 0x101, 0x618e, 0x101, 0x6160,
- 0x101, 0x61f2, 0x101, 0x6234, 0x101, 0x63c4, 0x101, 0x641c,
- 0x101, 0x6452, 0x101, 0x6556, 0x101, 0x6674, 0x101, 0x6717,
- 0x101, 0x671b, 0x101, 0x6756, 0x101, 0x6b79, 0x101, 0x6bba,
- 0x101, 0x6d41, 0x101, 0x6edb, 0x101, 0x6ecb, 0x101, 0x6f22,
- 0x101, 0x701e, 0x101, 0x716e, 0x101, 0x77a7, 0x101, 0x7235,
- 0x101, 0x72af, 0x101, 0x732a, 0x101, 0x7471, 0x101, 0x7506,
- 0x101, 0x753b, 0x101, 0x761d, 0x101, 0x761f, 0x101, 0x76ca,
- 0x101, 0x76db, 0x101, 0x76f4, 0x101, 0x774a, 0x101, 0x7740,
- 0x101, 0x78cc, 0x101, 0x7ab1, 0x101, 0x7bc0, 0x101, 0x7c7b,
- 0x101, 0x7d5b, 0x101, 0x7df4, 0x101, 0x7f3e, 0x101, 0x8005,
- 0x101, 0x8352, 0x101, 0x83ef, 0x101, 0x8779, 0x101, 0x8941,
- 0x101, 0x8986, 0x101, 0x8996, 0x101, 0x8abf, 0x101, 0x8af8,
- 0x101, 0x8acb, 0x101, 0x8b01, 0x101, 0x8afe, 0x101, 0x8aed,
- 0x101, 0x8b39, 0x101, 0x8b8a, 0x101, 0x8d08, 0x101, 0x8f38,
- 0x101, 0x9072, 0x101, 0x9199, 0x101, 0x9276, 0x101, 0x967c,
- 0x101, 0x96e3, 0x101, 0x9756, 0x101, 0x97db, 0x101, 0x97ff,
- 0x101, 0x980b, 0x101, 0x983b, 0x101, 0x9b12, 0x101, 0x9f9c,
- 0x201, 0xd84a, 0xdc4a, 0x201, 0xd84a, 0xdc44, 0x201, 0xd84c,
- 0xdfd5, 0x101, 0x3b9d, 0x101, 0x4018, 0x101, 0x4039, 0x201,
- 0xd854, 0xde49, 0x201, 0xd857, 0xdcd0, 0x201, 0xd85f, 0xded3,
- 0x101, 0x9f43, 0x101, 0x9f8e, 0x210, 0x66, 0x66, 0x210,
- 0x66, 0x69, 0x210, 0x66, 0x6c, 0x310, 0x66, 0x66,
- 0x69, 0x310, 0x66, 0x66, 0x6c, 0x210, 0x17f, 0x74,
- 0x210, 0x73, 0x74, 0x210, 0x574, 0x576, 0x210, 0x574,
- 0x565, 0x210, 0x574, 0x56b, 0x210, 0x57e, 0x576, 0x210,
- 0x574, 0x56d, 0x201, 0x5d9, 0x5b4, 0x201, 0x5f2, 0x5b7,
- 0x102, 0x5e2, 0x102, 0x5d0, 0x102, 0x5d3, 0x102, 0x5d4,
- 0x102, 0x5db, 0x102, 0x5dc, 0x102, 0x5dd, 0x102, 0x5e8,
- 0x102, 0x5ea, 0x102, 0x2b, 0x201, 0x5e9, 0x5c1, 0x201,
- 0x5e9, 0x5c2, 0x201, 0xfb49, 0x5c1, 0x201, 0xfb49, 0x5c2,
- 0x201, 0x5d0, 0x5b7, 0x201, 0x5d0, 0x5b8, 0x201, 0x5d0,
- 0x5bc, 0x201, 0x5d1, 0x5bc, 0x201, 0x5d2, 0x5bc, 0x201,
- 0x5d3, 0x5bc, 0x201, 0x5d4, 0x5bc, 0x201, 0x5d5, 0x5bc,
- 0x201, 0x5d6, 0x5bc, 0x201, 0x5d8, 0x5bc, 0x201, 0x5d9,
- 0x5bc, 0x201, 0x5da, 0x5bc, 0x201, 0x5db, 0x5bc, 0x201,
- 0x5dc, 0x5bc, 0x201, 0x5de, 0x5bc, 0x201, 0x5e0, 0x5bc,
- 0x201, 0x5e1, 0x5bc, 0x201, 0x5e3, 0x5bc, 0x201, 0x5e4,
- 0x5bc, 0x201, 0x5e6, 0x5bc, 0x201, 0x5e7, 0x5bc, 0x201,
- 0x5e8, 0x5bc, 0x201, 0x5e9, 0x5bc, 0x201, 0x5ea, 0x5bc,
- 0x201, 0x5d5, 0x5b9, 0x201, 0x5d1, 0x5bf, 0x201, 0x5db,
- 0x5bf, 0x201, 0x5e4, 0x5bf, 0x210, 0x5d0, 0x5dc, 0x107,
- 0x671, 0x106, 0x671, 0x107, 0x67b, 0x106, 0x67b, 0x104,
- 0x67b, 0x105, 0x67b, 0x107, 0x67e, 0x106, 0x67e, 0x104,
- 0x67e, 0x105, 0x67e, 0x107, 0x680, 0x106, 0x680, 0x104,
- 0x680, 0x105, 0x680, 0x107, 0x67a, 0x106, 0x67a, 0x104,
- 0x67a, 0x105, 0x67a, 0x107, 0x67f, 0x106, 0x67f, 0x104,
- 0x67f, 0x105, 0x67f, 0x107, 0x679, 0x106, 0x679, 0x104,
- 0x679, 0x105, 0x679, 0x107, 0x6a4, 0x106, 0x6a4, 0x104,
- 0x6a4, 0x105, 0x6a4, 0x107, 0x6a6, 0x106, 0x6a6, 0x104,
- 0x6a6, 0x105, 0x6a6, 0x107, 0x684, 0x106, 0x684, 0x104,
- 0x684, 0x105, 0x684, 0x107, 0x683, 0x106, 0x683, 0x104,
- 0x683, 0x105, 0x683, 0x107, 0x686, 0x106, 0x686, 0x104,
- 0x686, 0x105, 0x686, 0x107, 0x687, 0x106, 0x687, 0x104,
- 0x687, 0x105, 0x687, 0x107, 0x68d, 0x106, 0x68d, 0x107,
- 0x68c, 0x106, 0x68c, 0x107, 0x68e, 0x106, 0x68e, 0x107,
- 0x688, 0x106, 0x688, 0x107, 0x698, 0x106, 0x698, 0x107,
- 0x691, 0x106, 0x691, 0x107, 0x6a9, 0x106, 0x6a9, 0x104,
- 0x6a9, 0x105, 0x6a9, 0x107, 0x6af, 0x106, 0x6af, 0x104,
- 0x6af, 0x105, 0x6af, 0x107, 0x6b3, 0x106, 0x6b3, 0x104,
- 0x6b3, 0x105, 0x6b3, 0x107, 0x6b1, 0x106, 0x6b1, 0x104,
- 0x6b1, 0x105, 0x6b1, 0x107, 0x6ba, 0x106, 0x6ba, 0x107,
- 0x6bb, 0x106, 0x6bb, 0x104, 0x6bb, 0x105, 0x6bb, 0x107,
- 0x6c0, 0x106, 0x6c0, 0x107, 0x6c1, 0x106, 0x6c1, 0x104,
- 0x6c1, 0x105, 0x6c1, 0x107, 0x6be, 0x106, 0x6be, 0x104,
- 0x6be, 0x105, 0x6be, 0x107, 0x6d2, 0x106, 0x6d2, 0x107,
- 0x6d3, 0x106, 0x6d3, 0x107, 0x6ad, 0x106, 0x6ad, 0x104,
- 0x6ad, 0x105, 0x6ad, 0x107, 0x6c7, 0x106, 0x6c7, 0x107,
- 0x6c6, 0x106, 0x6c6, 0x107, 0x6c8, 0x106, 0x6c8, 0x107,
- 0x677, 0x107, 0x6cb, 0x106, 0x6cb, 0x107, 0x6c5, 0x106,
- 0x6c5, 0x107, 0x6c9, 0x106, 0x6c9, 0x107, 0x6d0, 0x106,
- 0x6d0, 0x104, 0x6d0, 0x105, 0x6d0, 0x104, 0x649, 0x105,
- 0x649, 0x207, 0x626, 0x627, 0x206, 0x626, 0x627, 0x207,
- 0x626, 0x6d5, 0x206, 0x626, 0x6d5, 0x207, 0x626, 0x648,
- 0x206, 0x626, 0x648, 0x207, 0x626, 0x6c7, 0x206, 0x626,
- 0x6c7, 0x207, 0x626, 0x6c6, 0x206, 0x626, 0x6c6, 0x207,
- 0x626, 0x6c8, 0x206, 0x626, 0x6c8, 0x207, 0x626, 0x6d0,
- 0x206, 0x626, 0x6d0, 0x204, 0x626, 0x6d0, 0x207, 0x626,
- 0x649, 0x206, 0x626, 0x649, 0x204, 0x626, 0x649, 0x107,
- 0x6cc, 0x106, 0x6cc, 0x104, 0x6cc, 0x105, 0x6cc, 0x207,
- 0x626, 0x62c, 0x207, 0x626, 0x62d, 0x207, 0x626, 0x645,
- 0x207, 0x626, 0x649, 0x207, 0x626, 0x64a, 0x207, 0x628,
- 0x62c, 0x207, 0x628, 0x62d, 0x207, 0x628, 0x62e, 0x207,
- 0x628, 0x645, 0x207, 0x628, 0x649, 0x207, 0x628, 0x64a,
- 0x207, 0x62a, 0x62c, 0x207, 0x62a, 0x62d, 0x207, 0x62a,
- 0x62e, 0x207, 0x62a, 0x645, 0x207, 0x62a, 0x649, 0x207,
- 0x62a, 0x64a, 0x207, 0x62b, 0x62c, 0x207, 0x62b, 0x645,
- 0x207, 0x62b, 0x649, 0x207, 0x62b, 0x64a, 0x207, 0x62c,
- 0x62d, 0x207, 0x62c, 0x645, 0x207, 0x62d, 0x62c, 0x207,
- 0x62d, 0x645, 0x207, 0x62e, 0x62c, 0x207, 0x62e, 0x62d,
- 0x207, 0x62e, 0x645, 0x207, 0x633, 0x62c, 0x207, 0x633,
- 0x62d, 0x207, 0x633, 0x62e, 0x207, 0x633, 0x645, 0x207,
- 0x635, 0x62d, 0x207, 0x635, 0x645, 0x207, 0x636, 0x62c,
- 0x207, 0x636, 0x62d, 0x207, 0x636, 0x62e, 0x207, 0x636,
- 0x645, 0x207, 0x637, 0x62d, 0x207, 0x637, 0x645, 0x207,
- 0x638, 0x645, 0x207, 0x639, 0x62c, 0x207, 0x639, 0x645,
- 0x207, 0x63a, 0x62c, 0x207, 0x63a, 0x645, 0x207, 0x641,
- 0x62c, 0x207, 0x641, 0x62d, 0x207, 0x641, 0x62e, 0x207,
- 0x641, 0x645, 0x207, 0x641, 0x649, 0x207, 0x641, 0x64a,
- 0x207, 0x642, 0x62d, 0x207, 0x642, 0x645, 0x207, 0x642,
- 0x649, 0x207, 0x642, 0x64a, 0x207, 0x643, 0x627, 0x207,
- 0x643, 0x62c, 0x207, 0x643, 0x62d, 0x207, 0x643, 0x62e,
- 0x207, 0x643, 0x644, 0x207, 0x643, 0x645, 0x207, 0x643,
- 0x649, 0x207, 0x643, 0x64a, 0x207, 0x644, 0x62c, 0x207,
- 0x644, 0x62d, 0x207, 0x644, 0x62e, 0x207, 0x644, 0x645,
- 0x207, 0x644, 0x649, 0x207, 0x644, 0x64a, 0x207, 0x645,
- 0x62c, 0x207, 0x645, 0x62d, 0x207, 0x645, 0x62e, 0x207,
- 0x645, 0x645, 0x207, 0x645, 0x649, 0x207, 0x645, 0x64a,
- 0x207, 0x646, 0x62c, 0x207, 0x646, 0x62d, 0x207, 0x646,
- 0x62e, 0x207, 0x646, 0x645, 0x207, 0x646, 0x649, 0x207,
- 0x646, 0x64a, 0x207, 0x647, 0x62c, 0x207, 0x647, 0x645,
- 0x207, 0x647, 0x649, 0x207, 0x647, 0x64a, 0x207, 0x64a,
- 0x62c, 0x207, 0x64a, 0x62d, 0x207, 0x64a, 0x62e, 0x207,
- 0x64a, 0x645, 0x207, 0x64a, 0x649, 0x207, 0x64a, 0x64a,
- 0x207, 0x630, 0x670, 0x207, 0x631, 0x670, 0x207, 0x649,
- 0x670, 0x307, 0x20, 0x64c, 0x651, 0x307, 0x20, 0x64d,
- 0x651, 0x307, 0x20, 0x64e, 0x651, 0x307, 0x20, 0x64f,
- 0x651, 0x307, 0x20, 0x650, 0x651, 0x307, 0x20, 0x651,
- 0x670, 0x206, 0x626, 0x631, 0x206, 0x626, 0x632, 0x206,
- 0x626, 0x645, 0x206, 0x626, 0x646, 0x206, 0x626, 0x649,
- 0x206, 0x626, 0x64a, 0x206, 0x628, 0x631, 0x206, 0x628,
- 0x632, 0x206, 0x628, 0x645, 0x206, 0x628, 0x646, 0x206,
- 0x628, 0x649, 0x206, 0x628, 0x64a, 0x206, 0x62a, 0x631,
- 0x206, 0x62a, 0x632, 0x206, 0x62a, 0x645, 0x206, 0x62a,
- 0x646, 0x206, 0x62a, 0x649, 0x206, 0x62a, 0x64a, 0x206,
- 0x62b, 0x631, 0x206, 0x62b, 0x632, 0x206, 0x62b, 0x645,
- 0x206, 0x62b, 0x646, 0x206, 0x62b, 0x649, 0x206, 0x62b,
- 0x64a, 0x206, 0x641, 0x649, 0x206, 0x641, 0x64a, 0x206,
- 0x642, 0x649, 0x206, 0x642, 0x64a, 0x206, 0x643, 0x627,
- 0x206, 0x643, 0x644, 0x206, 0x643, 0x645, 0x206, 0x643,
- 0x649, 0x206, 0x643, 0x64a, 0x206, 0x644, 0x645, 0x206,
- 0x644, 0x649, 0x206, 0x644, 0x64a, 0x206, 0x645, 0x627,
- 0x206, 0x645, 0x645, 0x206, 0x646, 0x631, 0x206, 0x646,
- 0x632, 0x206, 0x646, 0x645, 0x206, 0x646, 0x646, 0x206,
- 0x646, 0x649, 0x206, 0x646, 0x64a, 0x206, 0x649, 0x670,
- 0x206, 0x64a, 0x631, 0x206, 0x64a, 0x632, 0x206, 0x64a,
- 0x645, 0x206, 0x64a, 0x646, 0x206, 0x64a, 0x649, 0x206,
- 0x64a, 0x64a, 0x204, 0x626, 0x62c, 0x204, 0x626, 0x62d,
- 0x204, 0x626, 0x62e, 0x204, 0x626, 0x645, 0x204, 0x626,
- 0x647, 0x204, 0x628, 0x62c, 0x204, 0x628, 0x62d, 0x204,
- 0x628, 0x62e, 0x204, 0x628, 0x645, 0x204, 0x628, 0x647,
- 0x204, 0x62a, 0x62c, 0x204, 0x62a, 0x62d, 0x204, 0x62a,
- 0x62e, 0x204, 0x62a, 0x645, 0x204, 0x62a, 0x647, 0x204,
- 0x62b, 0x645, 0x204, 0x62c, 0x62d, 0x204, 0x62c, 0x645,
- 0x204, 0x62d, 0x62c, 0x204, 0x62d, 0x645, 0x204, 0x62e,
- 0x62c, 0x204, 0x62e, 0x645, 0x204, 0x633, 0x62c, 0x204,
- 0x633, 0x62d, 0x204, 0x633, 0x62e, 0x204, 0x633, 0x645,
- 0x204, 0x635, 0x62d, 0x204, 0x635, 0x62e, 0x204, 0x635,
- 0x645, 0x204, 0x636, 0x62c, 0x204, 0x636, 0x62d, 0x204,
- 0x636, 0x62e, 0x204, 0x636, 0x645, 0x204, 0x637, 0x62d,
- 0x204, 0x638, 0x645, 0x204, 0x639, 0x62c, 0x204, 0x639,
- 0x645, 0x204, 0x63a, 0x62c, 0x204, 0x63a, 0x645, 0x204,
- 0x641, 0x62c, 0x204, 0x641, 0x62d, 0x204, 0x641, 0x62e,
- 0x204, 0x641, 0x645, 0x204, 0x642, 0x62d, 0x204, 0x642,
- 0x645, 0x204, 0x643, 0x62c, 0x204, 0x643, 0x62d, 0x204,
- 0x643, 0x62e, 0x204, 0x643, 0x644, 0x204, 0x643, 0x645,
- 0x204, 0x644, 0x62c, 0x204, 0x644, 0x62d, 0x204, 0x644,
- 0x62e, 0x204, 0x644, 0x645, 0x204, 0x644, 0x647, 0x204,
- 0x645, 0x62c, 0x204, 0x645, 0x62d, 0x204, 0x645, 0x62e,
- 0x204, 0x645, 0x645, 0x204, 0x646, 0x62c, 0x204, 0x646,
- 0x62d, 0x204, 0x646, 0x62e, 0x204, 0x646, 0x645, 0x204,
- 0x646, 0x647, 0x204, 0x647, 0x62c, 0x204, 0x647, 0x645,
- 0x204, 0x647, 0x670, 0x204, 0x64a, 0x62c, 0x204, 0x64a,
- 0x62d, 0x204, 0x64a, 0x62e, 0x204, 0x64a, 0x645, 0x204,
- 0x64a, 0x647, 0x205, 0x626, 0x645, 0x205, 0x626, 0x647,
- 0x205, 0x628, 0x645, 0x205, 0x628, 0x647, 0x205, 0x62a,
- 0x645, 0x205, 0x62a, 0x647, 0x205, 0x62b, 0x645, 0x205,
- 0x62b, 0x647, 0x205, 0x633, 0x645, 0x205, 0x633, 0x647,
- 0x205, 0x634, 0x645, 0x205, 0x634, 0x647, 0x205, 0x643,
- 0x644, 0x205, 0x643, 0x645, 0x205, 0x644, 0x645, 0x205,
- 0x646, 0x645, 0x205, 0x646, 0x647, 0x205, 0x64a, 0x645,
- 0x205, 0x64a, 0x647, 0x305, 0x640, 0x64e, 0x651, 0x305,
- 0x640, 0x64f, 0x651, 0x305, 0x640, 0x650, 0x651, 0x207,
- 0x637, 0x649, 0x207, 0x637, 0x64a, 0x207, 0x639, 0x649,
- 0x207, 0x639, 0x64a, 0x207, 0x63a, 0x649, 0x207, 0x63a,
- 0x64a, 0x207, 0x633, 0x649, 0x207, 0x633, 0x64a, 0x207,
- 0x634, 0x649, 0x207, 0x634, 0x64a, 0x207, 0x62d, 0x649,
- 0x207, 0x62d, 0x64a, 0x207, 0x62c, 0x649, 0x207, 0x62c,
- 0x64a, 0x207, 0x62e, 0x649, 0x207, 0x62e, 0x64a, 0x207,
- 0x635, 0x649, 0x207, 0x635, 0x64a, 0x207, 0x636, 0x649,
- 0x207, 0x636, 0x64a, 0x207, 0x634, 0x62c, 0x207, 0x634,
- 0x62d, 0x207, 0x634, 0x62e, 0x207, 0x634, 0x645, 0x207,
- 0x634, 0x631, 0x207, 0x633, 0x631, 0x207, 0x635, 0x631,
- 0x207, 0x636, 0x631, 0x206, 0x637, 0x649, 0x206, 0x637,
- 0x64a, 0x206, 0x639, 0x649, 0x206, 0x639, 0x64a, 0x206,
- 0x63a, 0x649, 0x206, 0x63a, 0x64a, 0x206, 0x633, 0x649,
- 0x206, 0x633, 0x64a, 0x206, 0x634, 0x649, 0x206, 0x634,
- 0x64a, 0x206, 0x62d, 0x649, 0x206, 0x62d, 0x64a, 0x206,
- 0x62c, 0x649, 0x206, 0x62c, 0x64a, 0x206, 0x62e, 0x649,
- 0x206, 0x62e, 0x64a, 0x206, 0x635, 0x649, 0x206, 0x635,
- 0x64a, 0x206, 0x636, 0x649, 0x206, 0x636, 0x64a, 0x206,
- 0x634, 0x62c, 0x206, 0x634, 0x62d, 0x206, 0x634, 0x62e,
- 0x206, 0x634, 0x645, 0x206, 0x634, 0x631, 0x206, 0x633,
- 0x631, 0x206, 0x635, 0x631, 0x206, 0x636, 0x631, 0x204,
- 0x634, 0x62c, 0x204, 0x634, 0x62d, 0x204, 0x634, 0x62e,
- 0x204, 0x634, 0x645, 0x204, 0x633, 0x647, 0x204, 0x634,
- 0x647, 0x204, 0x637, 0x645, 0x205, 0x633, 0x62c, 0x205,
- 0x633, 0x62d, 0x205, 0x633, 0x62e, 0x205, 0x634, 0x62c,
- 0x205, 0x634, 0x62d, 0x205, 0x634, 0x62e, 0x205, 0x637,
- 0x645, 0x205, 0x638, 0x645, 0x206, 0x627, 0x64b, 0x207,
- 0x627, 0x64b, 0x304, 0x62a, 0x62c, 0x645, 0x306, 0x62a,
- 0x62d, 0x62c, 0x304, 0x62a, 0x62d, 0x62c, 0x304, 0x62a,
- 0x62d, 0x645, 0x304, 0x62a, 0x62e, 0x645, 0x304, 0x62a,
- 0x645, 0x62c, 0x304, 0x62a, 0x645, 0x62d, 0x304, 0x62a,
- 0x645, 0x62e, 0x306, 0x62c, 0x645, 0x62d, 0x304, 0x62c,
- 0x645, 0x62d, 0x306, 0x62d, 0x645, 0x64a, 0x306, 0x62d,
- 0x645, 0x649, 0x304, 0x633, 0x62d, 0x62c, 0x304, 0x633,
- 0x62c, 0x62d, 0x306, 0x633, 0x62c, 0x649, 0x306, 0x633,
- 0x645, 0x62d, 0x304, 0x633, 0x645, 0x62d, 0x304, 0x633,
- 0x645, 0x62c, 0x306, 0x633, 0x645, 0x645, 0x304, 0x633,
- 0x645, 0x645, 0x306, 0x635, 0x62d, 0x62d, 0x304, 0x635,
- 0x62d, 0x62d, 0x306, 0x635, 0x645, 0x645, 0x306, 0x634,
- 0x62d, 0x645, 0x304, 0x634, 0x62d, 0x645, 0x306, 0x634,
- 0x62c, 0x64a, 0x306, 0x634, 0x645, 0x62e, 0x304, 0x634,
- 0x645, 0x62e, 0x306, 0x634, 0x645, 0x645, 0x304, 0x634,
- 0x645, 0x645, 0x306, 0x636, 0x62d, 0x649, 0x306, 0x636,
- 0x62e, 0x645, 0x304, 0x636, 0x62e, 0x645, 0x306, 0x637,
- 0x645, 0x62d, 0x304, 0x637, 0x645, 0x62d, 0x304, 0x637,
- 0x645, 0x645, 0x306, 0x637, 0x645, 0x64a, 0x306, 0x639,
- 0x62c, 0x645, 0x306, 0x639, 0x645, 0x645, 0x304, 0x639,
- 0x645, 0x645, 0x306, 0x639, 0x645, 0x649, 0x306, 0x63a,
- 0x645, 0x645, 0x306, 0x63a, 0x645, 0x64a, 0x306, 0x63a,
- 0x645, 0x649, 0x306, 0x641, 0x62e, 0x645, 0x304, 0x641,
- 0x62e, 0x645, 0x306, 0x642, 0x645, 0x62d, 0x306, 0x642,
- 0x645, 0x645, 0x306, 0x644, 0x62d, 0x645, 0x306, 0x644,
- 0x62d, 0x64a, 0x306, 0x644, 0x62d, 0x649, 0x304, 0x644,
- 0x62c, 0x62c, 0x306, 0x644, 0x62c, 0x62c, 0x306, 0x644,
- 0x62e, 0x645, 0x304, 0x644, 0x62e, 0x645, 0x306, 0x644,
- 0x645, 0x62d, 0x304, 0x644, 0x645, 0x62d, 0x304, 0x645,
- 0x62d, 0x62c, 0x304, 0x645, 0x62d, 0x645, 0x306, 0x645,
- 0x62d, 0x64a, 0x304, 0x645, 0x62c, 0x62d, 0x304, 0x645,
- 0x62c, 0x645, 0x304, 0x645, 0x62e, 0x62c, 0x304, 0x645,
- 0x62e, 0x645, 0x304, 0x645, 0x62c, 0x62e, 0x304, 0x647,
- 0x645, 0x62c, 0x304, 0x647, 0x645, 0x645, 0x304, 0x646,
- 0x62d, 0x645, 0x306, 0x646, 0x62d, 0x649, 0x306, 0x646,
- 0x62c, 0x645, 0x304, 0x646, 0x62c, 0x645, 0x306, 0x646,
- 0x62c, 0x649, 0x306, 0x646, 0x645, 0x64a, 0x306, 0x646,
- 0x645, 0x649, 0x306, 0x64a, 0x645, 0x645, 0x304, 0x64a,
- 0x645, 0x645, 0x306, 0x628, 0x62e, 0x64a, 0x306, 0x62a,
- 0x62c, 0x64a, 0x306, 0x62a, 0x62c, 0x649, 0x306, 0x62a,
- 0x62e, 0x64a, 0x306, 0x62a, 0x62e, 0x649, 0x306, 0x62a,
- 0x645, 0x64a, 0x306, 0x62a, 0x645, 0x649, 0x306, 0x62c,
- 0x645, 0x64a, 0x306, 0x62c, 0x62d, 0x649, 0x306, 0x62c,
- 0x645, 0x649, 0x306, 0x633, 0x62e, 0x649, 0x306, 0x635,
- 0x62d, 0x64a, 0x306, 0x634, 0x62d, 0x64a, 0x306, 0x636,
- 0x62d, 0x64a, 0x306, 0x644, 0x62c, 0x64a, 0x306, 0x644,
- 0x645, 0x64a, 0x306, 0x64a, 0x62d, 0x64a, 0x306, 0x64a,
- 0x62c, 0x64a, 0x306, 0x64a, 0x645, 0x64a, 0x306, 0x645,
- 0x645, 0x64a, 0x306, 0x642, 0x645, 0x64a, 0x306, 0x646,
- 0x62d, 0x64a, 0x304, 0x642, 0x645, 0x62d, 0x304, 0x644,
- 0x62d, 0x645, 0x306, 0x639, 0x645, 0x64a, 0x306, 0x643,
- 0x645, 0x64a, 0x304, 0x646, 0x62c, 0x62d, 0x306, 0x645,
- 0x62e, 0x64a, 0x304, 0x644, 0x62c, 0x645, 0x306, 0x643,
- 0x645, 0x645, 0x306, 0x644, 0x62c, 0x645, 0x306, 0x646,
- 0x62c, 0x62d, 0x306, 0x62c, 0x62d, 0x64a, 0x306, 0x62d,
- 0x62c, 0x64a, 0x306, 0x645, 0x62c, 0x64a, 0x306, 0x641,
- 0x645, 0x64a, 0x306, 0x628, 0x62d, 0x64a, 0x304, 0x643,
- 0x645, 0x645, 0x304, 0x639, 0x62c, 0x645, 0x304, 0x635,
- 0x645, 0x645, 0x306, 0x633, 0x62e, 0x64a, 0x306, 0x646,
- 0x62c, 0x64a, 0x307, 0x635, 0x644, 0x6d2, 0x307, 0x642,
- 0x644, 0x6d2, 0x407, 0x627, 0x644, 0x644, 0x647, 0x407,
- 0x627, 0x643, 0x628, 0x631, 0x407, 0x645, 0x62d, 0x645,
- 0x62f, 0x407, 0x635, 0x644, 0x639, 0x645, 0x407, 0x631,
- 0x633, 0x648, 0x644, 0x407, 0x639, 0x644, 0x64a, 0x647,
- 0x407, 0x648, 0x633, 0x644, 0x645, 0x307, 0x635, 0x644,
- 0x649, 0x1207, 0x635, 0x644, 0x649, 0x20, 0x627, 0x644,
- 0x644, 0x647, 0x20, 0x639, 0x644, 0x64a, 0x647, 0x20,
- 0x648, 0x633, 0x644, 0x645, 0x807, 0x62c, 0x644, 0x20,
- 0x62c, 0x644, 0x627, 0x644, 0x647, 0x407, 0x631, 0x6cc,
- 0x627, 0x644, 0x10b, 0x2c, 0x10b, 0x3001, 0x10b, 0x3002,
- 0x10b, 0x3a, 0x10b, 0x3b, 0x10b, 0x21, 0x10b, 0x3f,
- 0x10b, 0x3016, 0x10b, 0x3017, 0x10b, 0x2026, 0x10b, 0x2025,
- 0x10b, 0x2014, 0x10b, 0x2013, 0x10b, 0x5f, 0x10b, 0x5f,
- 0x10b, 0x28, 0x10b, 0x29, 0x10b, 0x7b, 0x10b, 0x7d,
- 0x10b, 0x3014, 0x10b, 0x3015, 0x10b, 0x3010, 0x10b, 0x3011,
- 0x10b, 0x300a, 0x10b, 0x300b, 0x10b, 0x3008, 0x10b, 0x3009,
- 0x10b, 0x300c, 0x10b, 0x300d, 0x10b, 0x300e, 0x10b, 0x300f,
- 0x10b, 0x5b, 0x10b, 0x5d, 0x110, 0x203e, 0x110, 0x203e,
- 0x110, 0x203e, 0x110, 0x203e, 0x110, 0x5f, 0x110, 0x5f,
- 0x110, 0x5f, 0x10e, 0x2c, 0x10e, 0x3001, 0x10e, 0x2e,
- 0x10e, 0x3b, 0x10e, 0x3a, 0x10e, 0x3f, 0x10e, 0x21,
- 0x10e, 0x2014, 0x10e, 0x28, 0x10e, 0x29, 0x10e, 0x7b,
- 0x10e, 0x7d, 0x10e, 0x3014, 0x10e, 0x3015, 0x10e, 0x23,
- 0x10e, 0x26, 0x10e, 0x2a, 0x10e, 0x2b, 0x10e, 0x2d,
- 0x10e, 0x3c, 0x10e, 0x3e, 0x10e, 0x3d, 0x10e, 0x5c,
- 0x10e, 0x24, 0x10e, 0x25, 0x10e, 0x40, 0x207, 0x20,
- 0x64b, 0x205, 0x640, 0x64b, 0x207, 0x20, 0x64c, 0x207,
- 0x20, 0x64d, 0x207, 0x20, 0x64e, 0x205, 0x640, 0x64e,
- 0x207, 0x20, 0x64f, 0x205, 0x640, 0x64f, 0x207, 0x20,
- 0x650, 0x205, 0x640, 0x650, 0x207, 0x20, 0x651, 0x205,
- 0x640, 0x651, 0x207, 0x20, 0x652, 0x205, 0x640, 0x652,
- 0x107, 0x621, 0x107, 0x622, 0x106, 0x622, 0x107, 0x623,
- 0x106, 0x623, 0x107, 0x624, 0x106, 0x624, 0x107, 0x625,
- 0x106, 0x625, 0x107, 0x626, 0x106, 0x626, 0x104, 0x626,
- 0x105, 0x626, 0x107, 0x627, 0x106, 0x627, 0x107, 0x628,
- 0x106, 0x628, 0x104, 0x628, 0x105, 0x628, 0x107, 0x629,
- 0x106, 0x629, 0x107, 0x62a, 0x106, 0x62a, 0x104, 0x62a,
- 0x105, 0x62a, 0x107, 0x62b, 0x106, 0x62b, 0x104, 0x62b,
- 0x105, 0x62b, 0x107, 0x62c, 0x106, 0x62c, 0x104, 0x62c,
- 0x105, 0x62c, 0x107, 0x62d, 0x106, 0x62d, 0x104, 0x62d,
- 0x105, 0x62d, 0x107, 0x62e, 0x106, 0x62e, 0x104, 0x62e,
- 0x105, 0x62e, 0x107, 0x62f, 0x106, 0x62f, 0x107, 0x630,
- 0x106, 0x630, 0x107, 0x631, 0x106, 0x631, 0x107, 0x632,
- 0x106, 0x632, 0x107, 0x633, 0x106, 0x633, 0x104, 0x633,
- 0x105, 0x633, 0x107, 0x634, 0x106, 0x634, 0x104, 0x634,
- 0x105, 0x634, 0x107, 0x635, 0x106, 0x635, 0x104, 0x635,
- 0x105, 0x635, 0x107, 0x636, 0x106, 0x636, 0x104, 0x636,
- 0x105, 0x636, 0x107, 0x637, 0x106, 0x637, 0x104, 0x637,
- 0x105, 0x637, 0x107, 0x638, 0x106, 0x638, 0x104, 0x638,
- 0x105, 0x638, 0x107, 0x639, 0x106, 0x639, 0x104, 0x639,
- 0x105, 0x639, 0x107, 0x63a, 0x106, 0x63a, 0x104, 0x63a,
- 0x105, 0x63a, 0x107, 0x641, 0x106, 0x641, 0x104, 0x641,
- 0x105, 0x641, 0x107, 0x642, 0x106, 0x642, 0x104, 0x642,
- 0x105, 0x642, 0x107, 0x643, 0x106, 0x643, 0x104, 0x643,
- 0x105, 0x643, 0x107, 0x644, 0x106, 0x644, 0x104, 0x644,
- 0x105, 0x644, 0x107, 0x645, 0x106, 0x645, 0x104, 0x645,
- 0x105, 0x645, 0x107, 0x646, 0x106, 0x646, 0x104, 0x646,
- 0x105, 0x646, 0x107, 0x647, 0x106, 0x647, 0x104, 0x647,
- 0x105, 0x647, 0x107, 0x648, 0x106, 0x648, 0x107, 0x649,
- 0x106, 0x649, 0x107, 0x64a, 0x106, 0x64a, 0x104, 0x64a,
- 0x105, 0x64a, 0x207, 0x644, 0x622, 0x206, 0x644, 0x622,
- 0x207, 0x644, 0x623, 0x206, 0x644, 0x623, 0x207, 0x644,
- 0x625, 0x206, 0x644, 0x625, 0x207, 0x644, 0x627, 0x206,
- 0x644, 0x627, 0x10c, 0x21, 0x10c, 0x22, 0x10c, 0x23,
- 0x10c, 0x24, 0x10c, 0x25, 0x10c, 0x26, 0x10c, 0x27,
- 0x10c, 0x28, 0x10c, 0x29, 0x10c, 0x2a, 0x10c, 0x2b,
- 0x10c, 0x2c, 0x10c, 0x2d, 0x10c, 0x2e, 0x10c, 0x2f,
- 0x10c, 0x30, 0x10c, 0x31, 0x10c, 0x32, 0x10c, 0x33,
- 0x10c, 0x34, 0x10c, 0x35, 0x10c, 0x36, 0x10c, 0x37,
- 0x10c, 0x38, 0x10c, 0x39, 0x10c, 0x3a, 0x10c, 0x3b,
- 0x10c, 0x3c, 0x10c, 0x3d, 0x10c, 0x3e, 0x10c, 0x3f,
- 0x10c, 0x40, 0x10c, 0x41, 0x10c, 0x42, 0x10c, 0x43,
- 0x10c, 0x44, 0x10c, 0x45, 0x10c, 0x46, 0x10c, 0x47,
- 0x10c, 0x48, 0x10c, 0x49, 0x10c, 0x4a, 0x10c, 0x4b,
- 0x10c, 0x4c, 0x10c, 0x4d, 0x10c, 0x4e, 0x10c, 0x4f,
- 0x10c, 0x50, 0x10c, 0x51, 0x10c, 0x52, 0x10c, 0x53,
- 0x10c, 0x54, 0x10c, 0x55, 0x10c, 0x56, 0x10c, 0x57,
- 0x10c, 0x58, 0x10c, 0x59, 0x10c, 0x5a, 0x10c, 0x5b,
- 0x10c, 0x5c, 0x10c, 0x5d, 0x10c, 0x5e, 0x10c, 0x5f,
- 0x10c, 0x60, 0x10c, 0x61, 0x10c, 0x62, 0x10c, 0x63,
- 0x10c, 0x64, 0x10c, 0x65, 0x10c, 0x66, 0x10c, 0x67,
- 0x10c, 0x68, 0x10c, 0x69, 0x10c, 0x6a, 0x10c, 0x6b,
- 0x10c, 0x6c, 0x10c, 0x6d, 0x10c, 0x6e, 0x10c, 0x6f,
- 0x10c, 0x70, 0x10c, 0x71, 0x10c, 0x72, 0x10c, 0x73,
- 0x10c, 0x74, 0x10c, 0x75, 0x10c, 0x76, 0x10c, 0x77,
- 0x10c, 0x78, 0x10c, 0x79, 0x10c, 0x7a, 0x10c, 0x7b,
- 0x10c, 0x7c, 0x10c, 0x7d, 0x10c, 0x7e, 0x10c, 0x2985,
- 0x10c, 0x2986, 0x10d, 0x3002, 0x10d, 0x300c, 0x10d, 0x300d,
- 0x10d, 0x3001, 0x10d, 0x30fb, 0x10d, 0x30f2, 0x10d, 0x30a1,
- 0x10d, 0x30a3, 0x10d, 0x30a5, 0x10d, 0x30a7, 0x10d, 0x30a9,
- 0x10d, 0x30e3, 0x10d, 0x30e5, 0x10d, 0x30e7, 0x10d, 0x30c3,
- 0x10d, 0x30fc, 0x10d, 0x30a2, 0x10d, 0x30a4, 0x10d, 0x30a6,
- 0x10d, 0x30a8, 0x10d, 0x30aa, 0x10d, 0x30ab, 0x10d, 0x30ad,
- 0x10d, 0x30af, 0x10d, 0x30b1, 0x10d, 0x30b3, 0x10d, 0x30b5,
- 0x10d, 0x30b7, 0x10d, 0x30b9, 0x10d, 0x30bb, 0x10d, 0x30bd,
- 0x10d, 0x30bf, 0x10d, 0x30c1, 0x10d, 0x30c4, 0x10d, 0x30c6,
- 0x10d, 0x30c8, 0x10d, 0x30ca, 0x10d, 0x30cb, 0x10d, 0x30cc,
- 0x10d, 0x30cd, 0x10d, 0x30ce, 0x10d, 0x30cf, 0x10d, 0x30d2,
- 0x10d, 0x30d5, 0x10d, 0x30d8, 0x10d, 0x30db, 0x10d, 0x30de,
- 0x10d, 0x30df, 0x10d, 0x30e0, 0x10d, 0x30e1, 0x10d, 0x30e2,
- 0x10d, 0x30e4, 0x10d, 0x30e6, 0x10d, 0x30e8, 0x10d, 0x30e9,
- 0x10d, 0x30ea, 0x10d, 0x30eb, 0x10d, 0x30ec, 0x10d, 0x30ed,
- 0x10d, 0x30ef, 0x10d, 0x30f3, 0x10d, 0x3099, 0x10d, 0x309a,
- 0x10d, 0x3164, 0x10d, 0x3131, 0x10d, 0x3132, 0x10d, 0x3133,
- 0x10d, 0x3134, 0x10d, 0x3135, 0x10d, 0x3136, 0x10d, 0x3137,
- 0x10d, 0x3138, 0x10d, 0x3139, 0x10d, 0x313a, 0x10d, 0x313b,
- 0x10d, 0x313c, 0x10d, 0x313d, 0x10d, 0x313e, 0x10d, 0x313f,
- 0x10d, 0x3140, 0x10d, 0x3141, 0x10d, 0x3142, 0x10d, 0x3143,
- 0x10d, 0x3144, 0x10d, 0x3145, 0x10d, 0x3146, 0x10d, 0x3147,
- 0x10d, 0x3148, 0x10d, 0x3149, 0x10d, 0x314a, 0x10d, 0x314b,
- 0x10d, 0x314c, 0x10d, 0x314d, 0x10d, 0x314e, 0x10d, 0x314f,
- 0x10d, 0x3150, 0x10d, 0x3151, 0x10d, 0x3152, 0x10d, 0x3153,
- 0x10d, 0x3154, 0x10d, 0x3155, 0x10d, 0x3156, 0x10d, 0x3157,
- 0x10d, 0x3158, 0x10d, 0x3159, 0x10d, 0x315a, 0x10d, 0x315b,
- 0x10d, 0x315c, 0x10d, 0x315d, 0x10d, 0x315e, 0x10d, 0x315f,
- 0x10d, 0x3160, 0x10d, 0x3161, 0x10d, 0x3162, 0x10d, 0x3163,
- 0x10c, 0xa2, 0x10c, 0xa3, 0x10c, 0xac, 0x10c, 0xaf,
- 0x10c, 0xa6, 0x10c, 0xa5, 0x10c, 0x20a9, 0x10d, 0x2502,
- 0x10d, 0x2190, 0x10d, 0x2191, 0x10d, 0x2192, 0x10d, 0x2193,
- 0x10d, 0x25a0, 0x10d, 0x25cb, 0x401, 0xd834, 0xdd57, 0xd834,
- 0xdd65, 0x401, 0xd834, 0xdd58, 0xd834, 0xdd65, 0x401, 0xd834,
- 0xdd5f, 0xd834, 0xdd6e, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd6f,
- 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd70, 0x401, 0xd834, 0xdd5f,
- 0xd834, 0xdd71, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd72, 0x401,
- 0xd834, 0xddb9, 0xd834, 0xdd65, 0x401, 0xd834, 0xddba, 0xd834,
- 0xdd65, 0x401, 0xd834, 0xddbb, 0xd834, 0xdd6e, 0x401, 0xd834,
- 0xddbc, 0xd834, 0xdd6e, 0x401, 0xd834, 0xddbb, 0xd834, 0xdd6f,
- 0x401, 0xd834, 0xddbc, 0xd834, 0xdd6f, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x43, 0x102,
- 0x44, 0x102, 0x47, 0x102, 0x4a, 0x102, 0x4b, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x66, 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102,
- 0x6b, 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102,
- 0x4d, 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102,
- 0x51, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x44, 0x102, 0x45, 0x102, 0x46, 0x102, 0x47, 0x102,
- 0x49, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102,
- 0x4d, 0x102, 0x4f, 0x102, 0x53, 0x102, 0x54, 0x102,
- 0x55, 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102,
- 0x59, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
- 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
- 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
- 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
- 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
- 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
- 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x131, 0x102,
- 0x237, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393, 0x102,
- 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397, 0x102,
- 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102,
- 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102,
- 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102,
- 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102,
- 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102,
- 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102,
- 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102,
- 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102,
- 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102,
- 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102,
- 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102,
- 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102,
- 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x391, 0x102,
- 0x392, 0x102, 0x393, 0x102, 0x394, 0x102, 0x395, 0x102,
- 0x396, 0x102, 0x397, 0x102, 0x398, 0x102, 0x399, 0x102,
- 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102, 0x39d, 0x102,
- 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102, 0x3a1, 0x102,
- 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5, 0x102,
- 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9, 0x102,
- 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3, 0x102,
- 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7, 0x102,
- 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb, 0x102,
- 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102, 0x3bf, 0x102,
- 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3, 0x102,
- 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7, 0x102,
- 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102, 0x3f5, 0x102,
- 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1, 0x102,
- 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393, 0x102,
- 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397, 0x102,
- 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102,
- 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102,
- 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102,
- 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102,
- 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102,
- 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102,
- 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102,
- 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102,
- 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102,
- 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102,
- 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102,
- 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102,
- 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x391, 0x102,
- 0x392, 0x102, 0x393, 0x102, 0x394, 0x102, 0x395, 0x102,
- 0x396, 0x102, 0x397, 0x102, 0x398, 0x102, 0x399, 0x102,
- 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102, 0x39d, 0x102,
- 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102, 0x3a1, 0x102,
- 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5, 0x102,
- 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9, 0x102,
- 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3, 0x102,
- 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7, 0x102,
- 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb, 0x102,
- 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102, 0x3bf, 0x102,
- 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3, 0x102,
- 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7, 0x102,
- 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102, 0x3f5, 0x102,
- 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1, 0x102,
- 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393, 0x102,
- 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397, 0x102,
- 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102,
- 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102,
- 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102,
- 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102,
- 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102,
- 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102,
- 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102,
- 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102,
- 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102,
- 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102,
- 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102,
- 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102,
- 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x3dc, 0x102,
- 0x3dd, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32, 0x102,
- 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36, 0x102,
- 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x30, 0x102,
- 0x31, 0x102, 0x32, 0x102, 0x33, 0x102, 0x34, 0x102,
- 0x35, 0x102, 0x36, 0x102, 0x37, 0x102, 0x38, 0x102,
- 0x39, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32, 0x102,
- 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36, 0x102,
- 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x30, 0x102,
- 0x31, 0x102, 0x32, 0x102, 0x33, 0x102, 0x34, 0x102,
- 0x35, 0x102, 0x36, 0x102, 0x37, 0x102, 0x38, 0x102,
- 0x39, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32, 0x102,
- 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36, 0x102,
- 0x37, 0x102, 0x38, 0x102, 0x39, 0x101, 0x4e3d, 0x101,
- 0x4e38, 0x101, 0x4e41, 0x201, 0xd840, 0xdd22, 0x101, 0x4f60,
- 0x101, 0x4fae, 0x101, 0x4fbb, 0x101, 0x5002, 0x101, 0x507a,
- 0x101, 0x5099, 0x101, 0x50e7, 0x101, 0x50cf, 0x101, 0x349e,
- 0x201, 0xd841, 0xde3a, 0x101, 0x514d, 0x101, 0x5154, 0x101,
- 0x5164, 0x101, 0x5177, 0x201, 0xd841, 0xdd1c, 0x101, 0x34b9,
- 0x101, 0x5167, 0x101, 0x518d, 0x201, 0xd841, 0xdd4b, 0x101,
- 0x5197, 0x101, 0x51a4, 0x101, 0x4ecc, 0x101, 0x51ac, 0x101,
- 0x51b5, 0x201, 0xd864, 0xdddf, 0x101, 0x51f5, 0x101, 0x5203,
- 0x101, 0x34df, 0x101, 0x523b, 0x101, 0x5246, 0x101, 0x5272,
- 0x101, 0x5277, 0x101, 0x3515, 0x101, 0x52c7, 0x101, 0x52c9,
- 0x101, 0x52e4, 0x101, 0x52fa, 0x101, 0x5305, 0x101, 0x5306,
- 0x101, 0x5317, 0x101, 0x5349, 0x101, 0x5351, 0x101, 0x535a,
- 0x101, 0x5373, 0x101, 0x537d, 0x101, 0x537f, 0x101, 0x537f,
- 0x101, 0x537f, 0x201, 0xd842, 0xde2c, 0x101, 0x7070, 0x101,
- 0x53ca, 0x101, 0x53df, 0x201, 0xd842, 0xdf63, 0x101, 0x53eb,
- 0x101, 0x53f1, 0x101, 0x5406, 0x101, 0x549e, 0x101, 0x5438,
- 0x101, 0x5448, 0x101, 0x5468, 0x101, 0x54a2, 0x101, 0x54f6,
- 0x101, 0x5510, 0x101, 0x5553, 0x101, 0x5563, 0x101, 0x5584,
- 0x101, 0x5584, 0x101, 0x5599, 0x101, 0x55ab, 0x101, 0x55b3,
- 0x101, 0x55c2, 0x101, 0x5716, 0x101, 0x5606, 0x101, 0x5717,
- 0x101, 0x5651, 0x101, 0x5674, 0x101, 0x5207, 0x101, 0x58ee,
- 0x101, 0x57ce, 0x101, 0x57f4, 0x101, 0x580d, 0x101, 0x578b,
- 0x101, 0x5832, 0x101, 0x5831, 0x101, 0x58ac, 0x201, 0xd845,
- 0xdce4, 0x101, 0x58f2, 0x101, 0x58f7, 0x101, 0x5906, 0x101,
- 0x591a, 0x101, 0x5922, 0x101, 0x5962, 0x201, 0xd845, 0xdea8,
- 0x201, 0xd845, 0xdeea, 0x101, 0x59ec, 0x101, 0x5a1b, 0x101,
- 0x5a27, 0x101, 0x59d8, 0x101, 0x5a66, 0x101, 0x36ee, 0x101,
- 0x36fc, 0x101, 0x5b08, 0x101, 0x5b3e, 0x101, 0x5b3e, 0x201,
- 0xd846, 0xddc8, 0x101, 0x5bc3, 0x101, 0x5bd8, 0x101, 0x5be7,
- 0x101, 0x5bf3, 0x201, 0xd846, 0xdf18, 0x101, 0x5bff, 0x101,
- 0x5c06, 0x101, 0x5f53, 0x101, 0x5c22, 0x101, 0x3781, 0x101,
- 0x5c60, 0x101, 0x5c6e, 0x101, 0x5cc0, 0x101, 0x5c8d, 0x201,
- 0xd847, 0xdde4, 0x101, 0x5d43, 0x201, 0xd847, 0xdde6, 0x101,
- 0x5d6e, 0x101, 0x5d6b, 0x101, 0x5d7c, 0x101, 0x5de1, 0x101,
- 0x5de2, 0x101, 0x382f, 0x101, 0x5dfd, 0x101, 0x5e28, 0x101,
- 0x5e3d, 0x101, 0x5e69, 0x101, 0x3862, 0x201, 0xd848, 0xdd83,
- 0x101, 0x387c, 0x101, 0x5eb0, 0x101, 0x5eb3, 0x101, 0x5eb6,
- 0x101, 0x5eca, 0x201, 0xd868, 0xdf92, 0x101, 0x5efe, 0x201,
- 0xd848, 0xdf31, 0x201, 0xd848, 0xdf31, 0x101, 0x8201, 0x101,
- 0x5f22, 0x101, 0x5f22, 0x101, 0x38c7, 0x201, 0xd84c, 0xdeb8,
- 0x201, 0xd858, 0xddda, 0x101, 0x5f62, 0x101, 0x5f6b, 0x101,
- 0x38e3, 0x101, 0x5f9a, 0x101, 0x5fcd, 0x101, 0x5fd7, 0x101,
- 0x5ff9, 0x101, 0x6081, 0x101, 0x393a, 0x101, 0x391c, 0x101,
- 0x6094, 0x201, 0xd849, 0xded4, 0x101, 0x60c7, 0x101, 0x6148,
- 0x101, 0x614c, 0x101, 0x614e, 0x101, 0x614c, 0x101, 0x617a,
- 0x101, 0x618e, 0x101, 0x61b2, 0x101, 0x61a4, 0x101, 0x61af,
- 0x101, 0x61de, 0x101, 0x61f2, 0x101, 0x61f6, 0x101, 0x6210,
- 0x101, 0x621b, 0x101, 0x625d, 0x101, 0x62b1, 0x101, 0x62d4,
- 0x101, 0x6350, 0x201, 0xd84a, 0xdf0c, 0x101, 0x633d, 0x101,
- 0x62fc, 0x101, 0x6368, 0x101, 0x6383, 0x101, 0x63e4, 0x201,
- 0xd84a, 0xdff1, 0x101, 0x6422, 0x101, 0x63c5, 0x101, 0x63a9,
- 0x101, 0x3a2e, 0x101, 0x6469, 0x101, 0x647e, 0x101, 0x649d,
- 0x101, 0x6477, 0x101, 0x3a6c, 0x101, 0x654f, 0x101, 0x656c,
- 0x201, 0xd84c, 0xdc0a, 0x101, 0x65e3, 0x101, 0x66f8, 0x101,
- 0x6649, 0x101, 0x3b19, 0x101, 0x6691, 0x101, 0x3b08, 0x101,
- 0x3ae4, 0x101, 0x5192, 0x101, 0x5195, 0x101, 0x6700, 0x101,
- 0x669c, 0x101, 0x80ad, 0x101, 0x43d9, 0x101, 0x6717, 0x101,
- 0x671b, 0x101, 0x6721, 0x101, 0x675e, 0x101, 0x6753, 0x201,
- 0xd84c, 0xdfc3, 0x101, 0x3b49, 0x101, 0x67fa, 0x101, 0x6785,
- 0x101, 0x6852, 0x101, 0x6885, 0x201, 0xd84d, 0xdc6d, 0x101,
- 0x688e, 0x101, 0x681f, 0x101, 0x6914, 0x101, 0x3b9d, 0x101,
- 0x6942, 0x101, 0x69a3, 0x101, 0x69ea, 0x101, 0x6aa8, 0x201,
- 0xd84d, 0xdea3, 0x101, 0x6adb, 0x101, 0x3c18, 0x101, 0x6b21,
- 0x201, 0xd84e, 0xdca7, 0x101, 0x6b54, 0x101, 0x3c4e, 0x101,
- 0x6b72, 0x101, 0x6b9f, 0x101, 0x6bba, 0x101, 0x6bbb, 0x201,
- 0xd84e, 0xde8d, 0x201, 0xd847, 0xdd0b, 0x201, 0xd84e, 0xdefa,
- 0x101, 0x6c4e, 0x201, 0xd84f, 0xdcbc, 0x101, 0x6cbf, 0x101,
- 0x6ccd, 0x101, 0x6c67, 0x101, 0x6d16, 0x101, 0x6d3e, 0x101,
- 0x6d77, 0x101, 0x6d41, 0x101, 0x6d69, 0x101, 0x6d78, 0x101,
- 0x6d85, 0x201, 0xd84f, 0xdd1e, 0x101, 0x6d34, 0x101, 0x6e2f,
- 0x101, 0x6e6e, 0x101, 0x3d33, 0x101, 0x6ecb, 0x101, 0x6ec7,
- 0x201, 0xd84f, 0xded1, 0x101, 0x6df9, 0x101, 0x6f6e, 0x201,
- 0xd84f, 0xdf5e, 0x201, 0xd84f, 0xdf8e, 0x101, 0x6fc6, 0x101,
- 0x7039, 0x101, 0x701e, 0x101, 0x701b, 0x101, 0x3d96, 0x101,
- 0x704a, 0x101, 0x707d, 0x101, 0x7077, 0x101, 0x70ad, 0x201,
- 0xd841, 0xdd25, 0x101, 0x7145, 0x201, 0xd850, 0xde63, 0x101,
- 0x719c, 0x201, 0xd850, 0xdfab, 0x101, 0x7228, 0x101, 0x7235,
- 0x101, 0x7250, 0x201, 0xd851, 0xde08, 0x101, 0x7280, 0x101,
- 0x7295, 0x201, 0xd851, 0xdf35, 0x201, 0xd852, 0xdc14, 0x101,
- 0x737a, 0x101, 0x738b, 0x101, 0x3eac, 0x101, 0x73a5, 0x101,
- 0x3eb8, 0x101, 0x3eb8, 0x101, 0x7447, 0x101, 0x745c, 0x101,
- 0x7471, 0x101, 0x7485, 0x101, 0x74ca, 0x101, 0x3f1b, 0x101,
- 0x7524, 0x201, 0xd853, 0xdc36, 0x101, 0x753e, 0x201, 0xd853,
- 0xdc92, 0x101, 0x7570, 0x201, 0xd848, 0xdd9f, 0x101, 0x7610,
- 0x201, 0xd853, 0xdfa1, 0x201, 0xd853, 0xdfb8, 0x201, 0xd854,
- 0xdc44, 0x101, 0x3ffc, 0x101, 0x4008, 0x101, 0x76f4, 0x201,
- 0xd854, 0xdcf3, 0x201, 0xd854, 0xdcf2, 0x201, 0xd854, 0xdd19,
- 0x201, 0xd854, 0xdd33, 0x101, 0x771e, 0x101, 0x771f, 0x101,
- 0x771f, 0x101, 0x774a, 0x101, 0x4039, 0x101, 0x778b, 0x101,
- 0x4046, 0x101, 0x4096, 0x201, 0xd855, 0xdc1d, 0x101, 0x784e,
- 0x101, 0x788c, 0x101, 0x78cc, 0x101, 0x40e3, 0x201, 0xd855,
- 0xde26, 0x101, 0x7956, 0x201, 0xd855, 0xde9a, 0x201, 0xd855,
- 0xdec5, 0x101, 0x798f, 0x101, 0x79eb, 0x101, 0x412f, 0x101,
- 0x7a40, 0x101, 0x7a4a, 0x101, 0x7a4f, 0x201, 0xd856, 0xdd7c,
- 0x201, 0xd856, 0xdea7, 0x201, 0xd856, 0xdea7, 0x101, 0x7aee,
- 0x101, 0x4202, 0x201, 0xd856, 0xdfab, 0x101, 0x7bc6, 0x101,
- 0x7bc9, 0x101, 0x4227, 0x201, 0xd857, 0xdc80, 0x101, 0x7cd2,
- 0x101, 0x42a0, 0x101, 0x7ce8, 0x101, 0x7ce3, 0x101, 0x7d00,
- 0x201, 0xd857, 0xdf86, 0x101, 0x7d63, 0x101, 0x4301, 0x101,
- 0x7dc7, 0x101, 0x7e02, 0x101, 0x7e45, 0x101, 0x4334, 0x201,
- 0xd858, 0xde28, 0x201, 0xd858, 0xde47, 0x101, 0x4359, 0x201,
- 0xd858, 0xded9, 0x101, 0x7f7a, 0x201, 0xd858, 0xdf3e, 0x101,
- 0x7f95, 0x101, 0x7ffa, 0x101, 0x8005, 0x201, 0xd859, 0xdcda,
- 0x201, 0xd859, 0xdd23, 0x101, 0x8060, 0x201, 0xd859, 0xdda8,
- 0x101, 0x8070, 0x201, 0xd84c, 0xdf5f, 0x101, 0x43d5, 0x101,
- 0x80b2, 0x101, 0x8103, 0x101, 0x440b, 0x101, 0x813e, 0x101,
- 0x5ab5, 0x201, 0xd859, 0xdfa7, 0x201, 0xd859, 0xdfb5, 0x201,
- 0xd84c, 0xdf93, 0x201, 0xd84c, 0xdf9c, 0x101, 0x8201, 0x101,
- 0x8204, 0x101, 0x8f9e, 0x101, 0x446b, 0x101, 0x8291, 0x101,
- 0x828b, 0x101, 0x829d, 0x101, 0x52b3, 0x101, 0x82b1, 0x101,
- 0x82b3, 0x101, 0x82bd, 0x101, 0x82e6, 0x201, 0xd85a, 0xdf3c,
- 0x101, 0x82e5, 0x101, 0x831d, 0x101, 0x8363, 0x101, 0x83ad,
- 0x101, 0x8323, 0x101, 0x83bd, 0x101, 0x83e7, 0x101, 0x8457,
- 0x101, 0x8353, 0x101, 0x83ca, 0x101, 0x83cc, 0x101, 0x83dc,
- 0x201, 0xd85b, 0xdc36, 0x201, 0xd85b, 0xdd6b, 0x201, 0xd85b,
- 0xdcd5, 0x101, 0x452b, 0x101, 0x84f1, 0x101, 0x84f3, 0x101,
- 0x8516, 0x201, 0xd85c, 0xdfca, 0x101, 0x8564, 0x201, 0xd85b,
- 0xdf2c, 0x101, 0x455d, 0x101, 0x4561, 0x201, 0xd85b, 0xdfb1,
- 0x201, 0xd85c, 0xdcd2, 0x101, 0x456b, 0x101, 0x8650, 0x101,
- 0x865c, 0x101, 0x8667, 0x101, 0x8669, 0x101, 0x86a9, 0x101,
- 0x8688, 0x101, 0x870e, 0x101, 0x86e2, 0x101, 0x8779, 0x101,
- 0x8728, 0x101, 0x876b, 0x101, 0x8786, 0x101, 0x45d7, 0x101,
- 0x87e1, 0x101, 0x8801, 0x101, 0x45f9, 0x101, 0x8860, 0x101,
- 0x8863, 0x201, 0xd85d, 0xde67, 0x101, 0x88d7, 0x101, 0x88de,
- 0x101, 0x4635, 0x101, 0x88fa, 0x101, 0x34bb, 0x201, 0xd85e,
- 0xdcae, 0x201, 0xd85e, 0xdd66, 0x101, 0x46be, 0x101, 0x46c7,
- 0x101, 0x8aa0, 0x101, 0x8aed, 0x101, 0x8b8a, 0x101, 0x8c55,
- 0x201, 0xd85f, 0xdca8, 0x101, 0x8cab, 0x101, 0x8cc1, 0x101,
- 0x8d1b, 0x101, 0x8d77, 0x201, 0xd85f, 0xdf2f, 0x201, 0xd842,
- 0xdc04, 0x101, 0x8dcb, 0x101, 0x8dbc, 0x101, 0x8df0, 0x201,
- 0xd842, 0xdcde, 0x101, 0x8ed4, 0x101, 0x8f38, 0x201, 0xd861,
- 0xddd2, 0x201, 0xd861, 0xdded, 0x101, 0x9094, 0x101, 0x90f1,
- 0x101, 0x9111, 0x201, 0xd861, 0xdf2e, 0x101, 0x911b, 0x101,
- 0x9238, 0x101, 0x92d7, 0x101, 0x92d8, 0x101, 0x927c, 0x101,
- 0x93f9, 0x101, 0x9415, 0x201, 0xd862, 0xdffa, 0x101, 0x958b,
- 0x101, 0x4995, 0x101, 0x95b7, 0x201, 0xd863, 0xdd77, 0x101,
- 0x49e6, 0x101, 0x96c3, 0x101, 0x5db2, 0x101, 0x9723, 0x201,
- 0xd864, 0xdd45, 0x201, 0xd864, 0xde1a, 0x101, 0x4a6e, 0x101,
- 0x4a76, 0x101, 0x97e0, 0x201, 0xd865, 0xdc0a, 0x101, 0x4ab2,
- 0x201, 0xd865, 0xdc96, 0x101, 0x980b, 0x101, 0x980b, 0x101,
- 0x9829, 0x201, 0xd865, 0xddb6, 0x101, 0x98e2, 0x101, 0x4b33,
- 0x101, 0x9929, 0x101, 0x99a7, 0x101, 0x99c2, 0x101, 0x99fe,
- 0x101, 0x4bce, 0x201, 0xd866, 0xdf30, 0x101, 0x9b12, 0x101,
- 0x9c40, 0x101, 0x9cfd, 0x101, 0x4cce, 0x101, 0x4ced, 0x101,
- 0x9d67, 0x201, 0xd868, 0xdcce, 0x101, 0x4cf8, 0x201, 0xd868,
- 0xdd05, 0x201, 0xd868, 0xde0e, 0x201, 0xd868, 0xde91, 0x101,
- 0x9ebb, 0x101, 0x4d56, 0x101, 0x9ef9, 0x101, 0x9efe, 0x101,
- 0x9f05, 0x101, 0x9f0f, 0x101, 0x9f16, 0x101, 0x9f3b, 0x201,
- 0xd869, 0xde00,
+ 0x103, 0x20, 0x210, 0x20, 0x308, 0x109, 0x61, 0x210,
+ 0x20, 0x304, 0x109, 0x32, 0x109, 0x33, 0x210, 0x20,
+ 0x301, 0x110, 0x3bc, 0x210, 0x20, 0x327, 0x109, 0x31,
+ 0x109, 0x6f, 0x311, 0x31, 0x2044, 0x34, 0x311, 0x31,
+ 0x2044, 0x32, 0x311, 0x33, 0x2044, 0x34, 0x201, 0x41,
+ 0x300, 0x201, 0x41, 0x301, 0x201, 0x41, 0x302, 0x201,
+ 0x41, 0x303, 0x201, 0x41, 0x308, 0x201, 0x41, 0x30a,
+ 0x201, 0x43, 0x327, 0x201, 0x45, 0x300, 0x201, 0x45,
+ 0x301, 0x201, 0x45, 0x302, 0x201, 0x45, 0x308, 0x201,
+ 0x49, 0x300, 0x201, 0x49, 0x301, 0x201, 0x49, 0x302,
+ 0x201, 0x49, 0x308, 0x201, 0x4e, 0x303, 0x201, 0x4f,
+ 0x300, 0x201, 0x4f, 0x301, 0x201, 0x4f, 0x302, 0x201,
+ 0x4f, 0x303, 0x201, 0x4f, 0x308, 0x201, 0x55, 0x300,
+ 0x201, 0x55, 0x301, 0x201, 0x55, 0x302, 0x201, 0x55,
+ 0x308, 0x201, 0x59, 0x301, 0x201, 0x61, 0x300, 0x201,
+ 0x61, 0x301, 0x201, 0x61, 0x302, 0x201, 0x61, 0x303,
+ 0x201, 0x61, 0x308, 0x201, 0x61, 0x30a, 0x201, 0x63,
+ 0x327, 0x201, 0x65, 0x300, 0x201, 0x65, 0x301, 0x201,
+ 0x65, 0x302, 0x201, 0x65, 0x308, 0x201, 0x69, 0x300,
+ 0x201, 0x69, 0x301, 0x201, 0x69, 0x302, 0x201, 0x69,
+ 0x308, 0x201, 0x6e, 0x303, 0x201, 0x6f, 0x300, 0x201,
+ 0x6f, 0x301, 0x201, 0x6f, 0x302, 0x201, 0x6f, 0x303,
+ 0x201, 0x6f, 0x308, 0x201, 0x75, 0x300, 0x201, 0x75,
+ 0x301, 0x201, 0x75, 0x302, 0x201, 0x75, 0x308, 0x201,
+ 0x79, 0x301, 0x201, 0x79, 0x308, 0x201, 0x41, 0x304,
+ 0x201, 0x61, 0x304, 0x201, 0x41, 0x306, 0x201, 0x61,
+ 0x306, 0x201, 0x41, 0x328, 0x201, 0x61, 0x328, 0x201,
+ 0x43, 0x301, 0x201, 0x63, 0x301, 0x201, 0x43, 0x302,
+ 0x201, 0x63, 0x302, 0x201, 0x43, 0x307, 0x201, 0x63,
+ 0x307, 0x201, 0x43, 0x30c, 0x201, 0x63, 0x30c, 0x201,
+ 0x44, 0x30c, 0x201, 0x64, 0x30c, 0x201, 0x45, 0x304,
+ 0x201, 0x65, 0x304, 0x201, 0x45, 0x306, 0x201, 0x65,
+ 0x306, 0x201, 0x45, 0x307, 0x201, 0x65, 0x307, 0x201,
+ 0x45, 0x328, 0x201, 0x65, 0x328, 0x201, 0x45, 0x30c,
+ 0x201, 0x65, 0x30c, 0x201, 0x47, 0x302, 0x201, 0x67,
+ 0x302, 0x201, 0x47, 0x306, 0x201, 0x67, 0x306, 0x201,
+ 0x47, 0x307, 0x201, 0x67, 0x307, 0x201, 0x47, 0x327,
+ 0x201, 0x67, 0x327, 0x201, 0x48, 0x302, 0x201, 0x68,
+ 0x302, 0x201, 0x49, 0x303, 0x201, 0x69, 0x303, 0x201,
+ 0x49, 0x304, 0x201, 0x69, 0x304, 0x201, 0x49, 0x306,
+ 0x201, 0x69, 0x306, 0x201, 0x49, 0x328, 0x201, 0x69,
+ 0x328, 0x201, 0x49, 0x307, 0x210, 0x49, 0x4a, 0x210,
+ 0x69, 0x6a, 0x201, 0x4a, 0x302, 0x201, 0x6a, 0x302,
+ 0x201, 0x4b, 0x327, 0x201, 0x6b, 0x327, 0x201, 0x4c,
+ 0x301, 0x201, 0x6c, 0x301, 0x201, 0x4c, 0x327, 0x201,
+ 0x6c, 0x327, 0x201, 0x4c, 0x30c, 0x201, 0x6c, 0x30c,
+ 0x210, 0x4c, 0xb7, 0x210, 0x6c, 0xb7, 0x201, 0x4e,
+ 0x301, 0x201, 0x6e, 0x301, 0x201, 0x4e, 0x327, 0x201,
+ 0x6e, 0x327, 0x201, 0x4e, 0x30c, 0x201, 0x6e, 0x30c,
+ 0x210, 0x2bc, 0x6e, 0x201, 0x4f, 0x304, 0x201, 0x6f,
+ 0x304, 0x201, 0x4f, 0x306, 0x201, 0x6f, 0x306, 0x201,
+ 0x4f, 0x30b, 0x201, 0x6f, 0x30b, 0x201, 0x52, 0x301,
+ 0x201, 0x72, 0x301, 0x201, 0x52, 0x327, 0x201, 0x72,
+ 0x327, 0x201, 0x52, 0x30c, 0x201, 0x72, 0x30c, 0x201,
+ 0x53, 0x301, 0x201, 0x73, 0x301, 0x201, 0x53, 0x302,
+ 0x201, 0x73, 0x302, 0x201, 0x53, 0x327, 0x201, 0x73,
+ 0x327, 0x201, 0x53, 0x30c, 0x201, 0x73, 0x30c, 0x201,
+ 0x54, 0x327, 0x201, 0x74, 0x327, 0x201, 0x54, 0x30c,
+ 0x201, 0x74, 0x30c, 0x201, 0x55, 0x303, 0x201, 0x75,
+ 0x303, 0x201, 0x55, 0x304, 0x201, 0x75, 0x304, 0x201,
+ 0x55, 0x306, 0x201, 0x75, 0x306, 0x201, 0x55, 0x30a,
+ 0x201, 0x75, 0x30a, 0x201, 0x55, 0x30b, 0x201, 0x75,
+ 0x30b, 0x201, 0x55, 0x328, 0x201, 0x75, 0x328, 0x201,
+ 0x57, 0x302, 0x201, 0x77, 0x302, 0x201, 0x59, 0x302,
+ 0x201, 0x79, 0x302, 0x201, 0x59, 0x308, 0x201, 0x5a,
+ 0x301, 0x201, 0x7a, 0x301, 0x201, 0x5a, 0x307, 0x201,
+ 0x7a, 0x307, 0x201, 0x5a, 0x30c, 0x201, 0x7a, 0x30c,
+ 0x110, 0x73, 0x201, 0x4f, 0x31b, 0x201, 0x6f, 0x31b,
+ 0x201, 0x55, 0x31b, 0x201, 0x75, 0x31b, 0x210, 0x44,
+ 0x17d, 0x210, 0x44, 0x17e, 0x210, 0x64, 0x17e, 0x210,
+ 0x4c, 0x4a, 0x210, 0x4c, 0x6a, 0x210, 0x6c, 0x6a,
+ 0x210, 0x4e, 0x4a, 0x210, 0x4e, 0x6a, 0x210, 0x6e,
+ 0x6a, 0x201, 0x41, 0x30c, 0x201, 0x61, 0x30c, 0x201,
+ 0x49, 0x30c, 0x201, 0x69, 0x30c, 0x201, 0x4f, 0x30c,
+ 0x201, 0x6f, 0x30c, 0x201, 0x55, 0x30c, 0x201, 0x75,
+ 0x30c, 0x201, 0xdc, 0x304, 0x201, 0xfc, 0x304, 0x201,
+ 0xdc, 0x301, 0x201, 0xfc, 0x301, 0x201, 0xdc, 0x30c,
+ 0x201, 0xfc, 0x30c, 0x201, 0xdc, 0x300, 0x201, 0xfc,
+ 0x300, 0x201, 0xc4, 0x304, 0x201, 0xe4, 0x304, 0x201,
+ 0x226, 0x304, 0x201, 0x227, 0x304, 0x201, 0xc6, 0x304,
+ 0x201, 0xe6, 0x304, 0x201, 0x47, 0x30c, 0x201, 0x67,
+ 0x30c, 0x201, 0x4b, 0x30c, 0x201, 0x6b, 0x30c, 0x201,
+ 0x4f, 0x328, 0x201, 0x6f, 0x328, 0x201, 0x1ea, 0x304,
+ 0x201, 0x1eb, 0x304, 0x201, 0x1b7, 0x30c, 0x201, 0x292,
+ 0x30c, 0x201, 0x6a, 0x30c, 0x210, 0x44, 0x5a, 0x210,
+ 0x44, 0x7a, 0x210, 0x64, 0x7a, 0x201, 0x47, 0x301,
+ 0x201, 0x67, 0x301, 0x201, 0x4e, 0x300, 0x201, 0x6e,
+ 0x300, 0x201, 0xc5, 0x301, 0x201, 0xe5, 0x301, 0x201,
+ 0xc6, 0x301, 0x201, 0xe6, 0x301, 0x201, 0xd8, 0x301,
+ 0x201, 0xf8, 0x301, 0x201, 0x41, 0x30f, 0x201, 0x61,
+ 0x30f, 0x201, 0x41, 0x311, 0x201, 0x61, 0x311, 0x201,
+ 0x45, 0x30f, 0x201, 0x65, 0x30f, 0x201, 0x45, 0x311,
+ 0x201, 0x65, 0x311, 0x201, 0x49, 0x30f, 0x201, 0x69,
+ 0x30f, 0x201, 0x49, 0x311, 0x201, 0x69, 0x311, 0x201,
+ 0x4f, 0x30f, 0x201, 0x6f, 0x30f, 0x201, 0x4f, 0x311,
+ 0x201, 0x6f, 0x311, 0x201, 0x52, 0x30f, 0x201, 0x72,
+ 0x30f, 0x201, 0x52, 0x311, 0x201, 0x72, 0x311, 0x201,
+ 0x55, 0x30f, 0x201, 0x75, 0x30f, 0x201, 0x55, 0x311,
+ 0x201, 0x75, 0x311, 0x201, 0x53, 0x326, 0x201, 0x73,
+ 0x326, 0x201, 0x54, 0x326, 0x201, 0x74, 0x326, 0x201,
+ 0x48, 0x30c, 0x201, 0x68, 0x30c, 0x201, 0x41, 0x307,
+ 0x201, 0x61, 0x307, 0x201, 0x45, 0x327, 0x201, 0x65,
+ 0x327, 0x201, 0xd6, 0x304, 0x201, 0xf6, 0x304, 0x201,
+ 0xd5, 0x304, 0x201, 0xf5, 0x304, 0x201, 0x4f, 0x307,
+ 0x201, 0x6f, 0x307, 0x201, 0x22e, 0x304, 0x201, 0x22f,
+ 0x304, 0x201, 0x59, 0x304, 0x201, 0x79, 0x304, 0x109,
+ 0x68, 0x109, 0x266, 0x109, 0x6a, 0x109, 0x72, 0x109,
+ 0x279, 0x109, 0x27b, 0x109, 0x281, 0x109, 0x77, 0x109,
+ 0x79, 0x210, 0x20, 0x306, 0x210, 0x20, 0x307, 0x210,
+ 0x20, 0x30a, 0x210, 0x20, 0x328, 0x210, 0x20, 0x303,
+ 0x210, 0x20, 0x30b, 0x109, 0x263, 0x109, 0x6c, 0x109,
+ 0x73, 0x109, 0x78, 0x109, 0x295, 0x101, 0x300, 0x101,
+ 0x301, 0x101, 0x313, 0x201, 0x308, 0x301, 0x101, 0x2b9,
+ 0x210, 0x20, 0x345, 0x101, 0x3b, 0x210, 0x20, 0x301,
+ 0x201, 0xa8, 0x301, 0x201, 0x391, 0x301, 0x101, 0xb7,
+ 0x201, 0x395, 0x301, 0x201, 0x397, 0x301, 0x201, 0x399,
+ 0x301, 0x201, 0x39f, 0x301, 0x201, 0x3a5, 0x301, 0x201,
+ 0x3a9, 0x301, 0x201, 0x3ca, 0x301, 0x201, 0x399, 0x308,
+ 0x201, 0x3a5, 0x308, 0x201, 0x3b1, 0x301, 0x201, 0x3b5,
+ 0x301, 0x201, 0x3b7, 0x301, 0x201, 0x3b9, 0x301, 0x201,
+ 0x3cb, 0x301, 0x201, 0x3b9, 0x308, 0x201, 0x3c5, 0x308,
+ 0x201, 0x3bf, 0x301, 0x201, 0x3c5, 0x301, 0x201, 0x3c9,
+ 0x301, 0x110, 0x3b2, 0x110, 0x3b8, 0x110, 0x3a5, 0x201,
+ 0x3d2, 0x301, 0x201, 0x3d2, 0x308, 0x110, 0x3c6, 0x110,
+ 0x3c0, 0x110, 0x3ba, 0x110, 0x3c1, 0x110, 0x3c2, 0x110,
+ 0x398, 0x110, 0x3b5, 0x110, 0x3a3, 0x201, 0x415, 0x300,
+ 0x201, 0x415, 0x308, 0x201, 0x413, 0x301, 0x201, 0x406,
+ 0x308, 0x201, 0x41a, 0x301, 0x201, 0x418, 0x300, 0x201,
+ 0x423, 0x306, 0x201, 0x418, 0x306, 0x201, 0x438, 0x306,
+ 0x201, 0x435, 0x300, 0x201, 0x435, 0x308, 0x201, 0x433,
+ 0x301, 0x201, 0x456, 0x308, 0x201, 0x43a, 0x301, 0x201,
+ 0x438, 0x300, 0x201, 0x443, 0x306, 0x201, 0x474, 0x30f,
+ 0x201, 0x475, 0x30f, 0x201, 0x416, 0x306, 0x201, 0x436,
+ 0x306, 0x201, 0x410, 0x306, 0x201, 0x430, 0x306, 0x201,
+ 0x410, 0x308, 0x201, 0x430, 0x308, 0x201, 0x415, 0x306,
+ 0x201, 0x435, 0x306, 0x201, 0x4d8, 0x308, 0x201, 0x4d9,
+ 0x308, 0x201, 0x416, 0x308, 0x201, 0x436, 0x308, 0x201,
+ 0x417, 0x308, 0x201, 0x437, 0x308, 0x201, 0x418, 0x304,
+ 0x201, 0x438, 0x304, 0x201, 0x418, 0x308, 0x201, 0x438,
+ 0x308, 0x201, 0x41e, 0x308, 0x201, 0x43e, 0x308, 0x201,
+ 0x4e8, 0x308, 0x201, 0x4e9, 0x308, 0x201, 0x42d, 0x308,
+ 0x201, 0x44d, 0x308, 0x201, 0x423, 0x304, 0x201, 0x443,
+ 0x304, 0x201, 0x423, 0x308, 0x201, 0x443, 0x308, 0x201,
+ 0x423, 0x30b, 0x201, 0x443, 0x30b, 0x201, 0x427, 0x308,
+ 0x201, 0x447, 0x308, 0x201, 0x42b, 0x308, 0x201, 0x44b,
+ 0x308, 0x210, 0x565, 0x582, 0x201, 0x627, 0x653, 0x201,
+ 0x627, 0x654, 0x201, 0x648, 0x654, 0x201, 0x627, 0x655,
+ 0x201, 0x64a, 0x654, 0x210, 0x627, 0x674, 0x210, 0x648,
+ 0x674, 0x210, 0x6c7, 0x674, 0x210, 0x64a, 0x674, 0x201,
+ 0x6d5, 0x654, 0x201, 0x6c1, 0x654, 0x201, 0x6d2, 0x654,
+ 0x201, 0x928, 0x93c, 0x201, 0x930, 0x93c, 0x201, 0x933,
+ 0x93c, 0x201, 0x915, 0x93c, 0x201, 0x916, 0x93c, 0x201,
+ 0x917, 0x93c, 0x201, 0x91c, 0x93c, 0x201, 0x921, 0x93c,
+ 0x201, 0x922, 0x93c, 0x201, 0x92b, 0x93c, 0x201, 0x92f,
+ 0x93c, 0x201, 0x9c7, 0x9be, 0x201, 0x9c7, 0x9d7, 0x201,
+ 0x9a1, 0x9bc, 0x201, 0x9a2, 0x9bc, 0x201, 0x9af, 0x9bc,
+ 0x201, 0xa32, 0xa3c, 0x201, 0xa38, 0xa3c, 0x201, 0xa16,
+ 0xa3c, 0x201, 0xa17, 0xa3c, 0x201, 0xa1c, 0xa3c, 0x201,
+ 0xa2b, 0xa3c, 0x201, 0xb47, 0xb56, 0x201, 0xb47, 0xb3e,
+ 0x201, 0xb47, 0xb57, 0x201, 0xb21, 0xb3c, 0x201, 0xb22,
+ 0xb3c, 0x201, 0xb92, 0xbd7, 0x201, 0xbc6, 0xbbe, 0x201,
+ 0xbc7, 0xbbe, 0x201, 0xbc6, 0xbd7, 0x201, 0xc46, 0xc56,
+ 0x201, 0xcbf, 0xcd5, 0x201, 0xcc6, 0xcd5, 0x201, 0xcc6,
+ 0xcd6, 0x201, 0xcc6, 0xcc2, 0x201, 0xcca, 0xcd5, 0x201,
+ 0xd46, 0xd3e, 0x201, 0xd47, 0xd3e, 0x201, 0xd46, 0xd57,
+ 0x201, 0xdd9, 0xdca, 0x201, 0xdd9, 0xdcf, 0x201, 0xddc,
+ 0xdca, 0x201, 0xdd9, 0xddf, 0x210, 0xe4d, 0xe32, 0x210,
+ 0xecd, 0xeb2, 0x210, 0xeab, 0xe99, 0x210, 0xeab, 0xea1,
+ 0x103, 0xf0b, 0x201, 0xf42, 0xfb7, 0x201, 0xf4c, 0xfb7,
+ 0x201, 0xf51, 0xfb7, 0x201, 0xf56, 0xfb7, 0x201, 0xf5b,
+ 0xfb7, 0x201, 0xf40, 0xfb5, 0x201, 0xf71, 0xf72, 0x201,
+ 0xf71, 0xf74, 0x201, 0xfb2, 0xf80, 0x210, 0xfb2, 0xf81,
+ 0x201, 0xfb3, 0xf80, 0x210, 0xfb3, 0xf81, 0x201, 0xf71,
+ 0xf80, 0x201, 0xf92, 0xfb7, 0x201, 0xf9c, 0xfb7, 0x201,
+ 0xfa1, 0xfb7, 0x201, 0xfa6, 0xfb7, 0x201, 0xfab, 0xfb7,
+ 0x201, 0xf90, 0xfb5, 0x201, 0x1025, 0x102e, 0x109, 0x10dc,
+ 0x201, 0x1b05, 0x1b35, 0x201, 0x1b07, 0x1b35, 0x201, 0x1b09,
+ 0x1b35, 0x201, 0x1b0b, 0x1b35, 0x201, 0x1b0d, 0x1b35, 0x201,
+ 0x1b11, 0x1b35, 0x201, 0x1b3a, 0x1b35, 0x201, 0x1b3c, 0x1b35,
+ 0x201, 0x1b3e, 0x1b35, 0x201, 0x1b3f, 0x1b35, 0x201, 0x1b42,
+ 0x1b35, 0x109, 0x41, 0x109, 0xc6, 0x109, 0x42, 0x109,
+ 0x44, 0x109, 0x45, 0x109, 0x18e, 0x109, 0x47, 0x109,
+ 0x48, 0x109, 0x49, 0x109, 0x4a, 0x109, 0x4b, 0x109,
+ 0x4c, 0x109, 0x4d, 0x109, 0x4e, 0x109, 0x4f, 0x109,
+ 0x222, 0x109, 0x50, 0x109, 0x52, 0x109, 0x54, 0x109,
+ 0x55, 0x109, 0x57, 0x109, 0x61, 0x109, 0x250, 0x109,
+ 0x251, 0x109, 0x1d02, 0x109, 0x62, 0x109, 0x64, 0x109,
+ 0x65, 0x109, 0x259, 0x109, 0x25b, 0x109, 0x25c, 0x109,
+ 0x67, 0x109, 0x6b, 0x109, 0x6d, 0x109, 0x14b, 0x109,
+ 0x6f, 0x109, 0x254, 0x109, 0x1d16, 0x109, 0x1d17, 0x109,
+ 0x70, 0x109, 0x74, 0x109, 0x75, 0x109, 0x1d1d, 0x109,
+ 0x26f, 0x109, 0x76, 0x109, 0x1d25, 0x109, 0x3b2, 0x109,
+ 0x3b3, 0x109, 0x3b4, 0x109, 0x3c6, 0x109, 0x3c7, 0x10a,
+ 0x69, 0x10a, 0x72, 0x10a, 0x75, 0x10a, 0x76, 0x10a,
+ 0x3b2, 0x10a, 0x3b3, 0x10a, 0x3c1, 0x10a, 0x3c6, 0x10a,
+ 0x3c7, 0x109, 0x43d, 0x109, 0x252, 0x109, 0x63, 0x109,
+ 0x255, 0x109, 0xf0, 0x109, 0x25c, 0x109, 0x66, 0x109,
+ 0x25f, 0x109, 0x261, 0x109, 0x265, 0x109, 0x268, 0x109,
+ 0x269, 0x109, 0x26a, 0x109, 0x1d7b, 0x109, 0x29d, 0x109,
+ 0x26d, 0x109, 0x1d85, 0x109, 0x29f, 0x109, 0x271, 0x109,
+ 0x270, 0x109, 0x272, 0x109, 0x273, 0x109, 0x274, 0x109,
+ 0x275, 0x109, 0x278, 0x109, 0x282, 0x109, 0x283, 0x109,
+ 0x1ab, 0x109, 0x289, 0x109, 0x28a, 0x109, 0x1d1c, 0x109,
+ 0x28b, 0x109, 0x28c, 0x109, 0x7a, 0x109, 0x290, 0x109,
+ 0x291, 0x109, 0x292, 0x109, 0x3b8, 0x201, 0x41, 0x325,
+ 0x201, 0x61, 0x325, 0x201, 0x42, 0x307, 0x201, 0x62,
+ 0x307, 0x201, 0x42, 0x323, 0x201, 0x62, 0x323, 0x201,
+ 0x42, 0x331, 0x201, 0x62, 0x331, 0x201, 0xc7, 0x301,
+ 0x201, 0xe7, 0x301, 0x201, 0x44, 0x307, 0x201, 0x64,
+ 0x307, 0x201, 0x44, 0x323, 0x201, 0x64, 0x323, 0x201,
+ 0x44, 0x331, 0x201, 0x64, 0x331, 0x201, 0x44, 0x327,
+ 0x201, 0x64, 0x327, 0x201, 0x44, 0x32d, 0x201, 0x64,
+ 0x32d, 0x201, 0x112, 0x300, 0x201, 0x113, 0x300, 0x201,
+ 0x112, 0x301, 0x201, 0x113, 0x301, 0x201, 0x45, 0x32d,
+ 0x201, 0x65, 0x32d, 0x201, 0x45, 0x330, 0x201, 0x65,
+ 0x330, 0x201, 0x228, 0x306, 0x201, 0x229, 0x306, 0x201,
+ 0x46, 0x307, 0x201, 0x66, 0x307, 0x201, 0x47, 0x304,
+ 0x201, 0x67, 0x304, 0x201, 0x48, 0x307, 0x201, 0x68,
+ 0x307, 0x201, 0x48, 0x323, 0x201, 0x68, 0x323, 0x201,
+ 0x48, 0x308, 0x201, 0x68, 0x308, 0x201, 0x48, 0x327,
+ 0x201, 0x68, 0x327, 0x201, 0x48, 0x32e, 0x201, 0x68,
+ 0x32e, 0x201, 0x49, 0x330, 0x201, 0x69, 0x330, 0x201,
+ 0xcf, 0x301, 0x201, 0xef, 0x301, 0x201, 0x4b, 0x301,
+ 0x201, 0x6b, 0x301, 0x201, 0x4b, 0x323, 0x201, 0x6b,
+ 0x323, 0x201, 0x4b, 0x331, 0x201, 0x6b, 0x331, 0x201,
+ 0x4c, 0x323, 0x201, 0x6c, 0x323, 0x201, 0x1e36, 0x304,
+ 0x201, 0x1e37, 0x304, 0x201, 0x4c, 0x331, 0x201, 0x6c,
+ 0x331, 0x201, 0x4c, 0x32d, 0x201, 0x6c, 0x32d, 0x201,
+ 0x4d, 0x301, 0x201, 0x6d, 0x301, 0x201, 0x4d, 0x307,
+ 0x201, 0x6d, 0x307, 0x201, 0x4d, 0x323, 0x201, 0x6d,
+ 0x323, 0x201, 0x4e, 0x307, 0x201, 0x6e, 0x307, 0x201,
+ 0x4e, 0x323, 0x201, 0x6e, 0x323, 0x201, 0x4e, 0x331,
+ 0x201, 0x6e, 0x331, 0x201, 0x4e, 0x32d, 0x201, 0x6e,
+ 0x32d, 0x201, 0xd5, 0x301, 0x201, 0xf5, 0x301, 0x201,
+ 0xd5, 0x308, 0x201, 0xf5, 0x308, 0x201, 0x14c, 0x300,
+ 0x201, 0x14d, 0x300, 0x201, 0x14c, 0x301, 0x201, 0x14d,
+ 0x301, 0x201, 0x50, 0x301, 0x201, 0x70, 0x301, 0x201,
+ 0x50, 0x307, 0x201, 0x70, 0x307, 0x201, 0x52, 0x307,
+ 0x201, 0x72, 0x307, 0x201, 0x52, 0x323, 0x201, 0x72,
+ 0x323, 0x201, 0x1e5a, 0x304, 0x201, 0x1e5b, 0x304, 0x201,
+ 0x52, 0x331, 0x201, 0x72, 0x331, 0x201, 0x53, 0x307,
+ 0x201, 0x73, 0x307, 0x201, 0x53, 0x323, 0x201, 0x73,
+ 0x323, 0x201, 0x15a, 0x307, 0x201, 0x15b, 0x307, 0x201,
+ 0x160, 0x307, 0x201, 0x161, 0x307, 0x201, 0x1e62, 0x307,
+ 0x201, 0x1e63, 0x307, 0x201, 0x54, 0x307, 0x201, 0x74,
+ 0x307, 0x201, 0x54, 0x323, 0x201, 0x74, 0x323, 0x201,
+ 0x54, 0x331, 0x201, 0x74, 0x331, 0x201, 0x54, 0x32d,
+ 0x201, 0x74, 0x32d, 0x201, 0x55, 0x324, 0x201, 0x75,
+ 0x324, 0x201, 0x55, 0x330, 0x201, 0x75, 0x330, 0x201,
+ 0x55, 0x32d, 0x201, 0x75, 0x32d, 0x201, 0x168, 0x301,
+ 0x201, 0x169, 0x301, 0x201, 0x16a, 0x308, 0x201, 0x16b,
+ 0x308, 0x201, 0x56, 0x303, 0x201, 0x76, 0x303, 0x201,
+ 0x56, 0x323, 0x201, 0x76, 0x323, 0x201, 0x57, 0x300,
+ 0x201, 0x77, 0x300, 0x201, 0x57, 0x301, 0x201, 0x77,
+ 0x301, 0x201, 0x57, 0x308, 0x201, 0x77, 0x308, 0x201,
+ 0x57, 0x307, 0x201, 0x77, 0x307, 0x201, 0x57, 0x323,
+ 0x201, 0x77, 0x323, 0x201, 0x58, 0x307, 0x201, 0x78,
+ 0x307, 0x201, 0x58, 0x308, 0x201, 0x78, 0x308, 0x201,
+ 0x59, 0x307, 0x201, 0x79, 0x307, 0x201, 0x5a, 0x302,
+ 0x201, 0x7a, 0x302, 0x201, 0x5a, 0x323, 0x201, 0x7a,
+ 0x323, 0x201, 0x5a, 0x331, 0x201, 0x7a, 0x331, 0x201,
+ 0x68, 0x331, 0x201, 0x74, 0x308, 0x201, 0x77, 0x30a,
+ 0x201, 0x79, 0x30a, 0x210, 0x61, 0x2be, 0x201, 0x17f,
+ 0x307, 0x201, 0x41, 0x323, 0x201, 0x61, 0x323, 0x201,
+ 0x41, 0x309, 0x201, 0x61, 0x309, 0x201, 0xc2, 0x301,
+ 0x201, 0xe2, 0x301, 0x201, 0xc2, 0x300, 0x201, 0xe2,
+ 0x300, 0x201, 0xc2, 0x309, 0x201, 0xe2, 0x309, 0x201,
+ 0xc2, 0x303, 0x201, 0xe2, 0x303, 0x201, 0x1ea0, 0x302,
+ 0x201, 0x1ea1, 0x302, 0x201, 0x102, 0x301, 0x201, 0x103,
+ 0x301, 0x201, 0x102, 0x300, 0x201, 0x103, 0x300, 0x201,
+ 0x102, 0x309, 0x201, 0x103, 0x309, 0x201, 0x102, 0x303,
+ 0x201, 0x103, 0x303, 0x201, 0x1ea0, 0x306, 0x201, 0x1ea1,
+ 0x306, 0x201, 0x45, 0x323, 0x201, 0x65, 0x323, 0x201,
+ 0x45, 0x309, 0x201, 0x65, 0x309, 0x201, 0x45, 0x303,
+ 0x201, 0x65, 0x303, 0x201, 0xca, 0x301, 0x201, 0xea,
+ 0x301, 0x201, 0xca, 0x300, 0x201, 0xea, 0x300, 0x201,
+ 0xca, 0x309, 0x201, 0xea, 0x309, 0x201, 0xca, 0x303,
+ 0x201, 0xea, 0x303, 0x201, 0x1eb8, 0x302, 0x201, 0x1eb9,
+ 0x302, 0x201, 0x49, 0x309, 0x201, 0x69, 0x309, 0x201,
+ 0x49, 0x323, 0x201, 0x69, 0x323, 0x201, 0x4f, 0x323,
+ 0x201, 0x6f, 0x323, 0x201, 0x4f, 0x309, 0x201, 0x6f,
+ 0x309, 0x201, 0xd4, 0x301, 0x201, 0xf4, 0x301, 0x201,
+ 0xd4, 0x300, 0x201, 0xf4, 0x300, 0x201, 0xd4, 0x309,
+ 0x201, 0xf4, 0x309, 0x201, 0xd4, 0x303, 0x201, 0xf4,
+ 0x303, 0x201, 0x1ecc, 0x302, 0x201, 0x1ecd, 0x302, 0x201,
+ 0x1a0, 0x301, 0x201, 0x1a1, 0x301, 0x201, 0x1a0, 0x300,
+ 0x201, 0x1a1, 0x300, 0x201, 0x1a0, 0x309, 0x201, 0x1a1,
+ 0x309, 0x201, 0x1a0, 0x303, 0x201, 0x1a1, 0x303, 0x201,
+ 0x1a0, 0x323, 0x201, 0x1a1, 0x323, 0x201, 0x55, 0x323,
+ 0x201, 0x75, 0x323, 0x201, 0x55, 0x309, 0x201, 0x75,
+ 0x309, 0x201, 0x1af, 0x301, 0x201, 0x1b0, 0x301, 0x201,
+ 0x1af, 0x300, 0x201, 0x1b0, 0x300, 0x201, 0x1af, 0x309,
+ 0x201, 0x1b0, 0x309, 0x201, 0x1af, 0x303, 0x201, 0x1b0,
+ 0x303, 0x201, 0x1af, 0x323, 0x201, 0x1b0, 0x323, 0x201,
+ 0x59, 0x300, 0x201, 0x79, 0x300, 0x201, 0x59, 0x323,
+ 0x201, 0x79, 0x323, 0x201, 0x59, 0x309, 0x201, 0x79,
+ 0x309, 0x201, 0x59, 0x303, 0x201, 0x79, 0x303, 0x201,
+ 0x3b1, 0x313, 0x201, 0x3b1, 0x314, 0x201, 0x1f00, 0x300,
+ 0x201, 0x1f01, 0x300, 0x201, 0x1f00, 0x301, 0x201, 0x1f01,
+ 0x301, 0x201, 0x1f00, 0x342, 0x201, 0x1f01, 0x342, 0x201,
+ 0x391, 0x313, 0x201, 0x391, 0x314, 0x201, 0x1f08, 0x300,
+ 0x201, 0x1f09, 0x300, 0x201, 0x1f08, 0x301, 0x201, 0x1f09,
+ 0x301, 0x201, 0x1f08, 0x342, 0x201, 0x1f09, 0x342, 0x201,
+ 0x3b5, 0x313, 0x201, 0x3b5, 0x314, 0x201, 0x1f10, 0x300,
+ 0x201, 0x1f11, 0x300, 0x201, 0x1f10, 0x301, 0x201, 0x1f11,
+ 0x301, 0x201, 0x395, 0x313, 0x201, 0x395, 0x314, 0x201,
+ 0x1f18, 0x300, 0x201, 0x1f19, 0x300, 0x201, 0x1f18, 0x301,
+ 0x201, 0x1f19, 0x301, 0x201, 0x3b7, 0x313, 0x201, 0x3b7,
+ 0x314, 0x201, 0x1f20, 0x300, 0x201, 0x1f21, 0x300, 0x201,
+ 0x1f20, 0x301, 0x201, 0x1f21, 0x301, 0x201, 0x1f20, 0x342,
+ 0x201, 0x1f21, 0x342, 0x201, 0x397, 0x313, 0x201, 0x397,
+ 0x314, 0x201, 0x1f28, 0x300, 0x201, 0x1f29, 0x300, 0x201,
+ 0x1f28, 0x301, 0x201, 0x1f29, 0x301, 0x201, 0x1f28, 0x342,
+ 0x201, 0x1f29, 0x342, 0x201, 0x3b9, 0x313, 0x201, 0x3b9,
+ 0x314, 0x201, 0x1f30, 0x300, 0x201, 0x1f31, 0x300, 0x201,
+ 0x1f30, 0x301, 0x201, 0x1f31, 0x301, 0x201, 0x1f30, 0x342,
+ 0x201, 0x1f31, 0x342, 0x201, 0x399, 0x313, 0x201, 0x399,
+ 0x314, 0x201, 0x1f38, 0x300, 0x201, 0x1f39, 0x300, 0x201,
+ 0x1f38, 0x301, 0x201, 0x1f39, 0x301, 0x201, 0x1f38, 0x342,
+ 0x201, 0x1f39, 0x342, 0x201, 0x3bf, 0x313, 0x201, 0x3bf,
+ 0x314, 0x201, 0x1f40, 0x300, 0x201, 0x1f41, 0x300, 0x201,
+ 0x1f40, 0x301, 0x201, 0x1f41, 0x301, 0x201, 0x39f, 0x313,
+ 0x201, 0x39f, 0x314, 0x201, 0x1f48, 0x300, 0x201, 0x1f49,
+ 0x300, 0x201, 0x1f48, 0x301, 0x201, 0x1f49, 0x301, 0x201,
+ 0x3c5, 0x313, 0x201, 0x3c5, 0x314, 0x201, 0x1f50, 0x300,
+ 0x201, 0x1f51, 0x300, 0x201, 0x1f50, 0x301, 0x201, 0x1f51,
+ 0x301, 0x201, 0x1f50, 0x342, 0x201, 0x1f51, 0x342, 0x201,
+ 0x3a5, 0x314, 0x201, 0x1f59, 0x300, 0x201, 0x1f59, 0x301,
+ 0x201, 0x1f59, 0x342, 0x201, 0x3c9, 0x313, 0x201, 0x3c9,
+ 0x314, 0x201, 0x1f60, 0x300, 0x201, 0x1f61, 0x300, 0x201,
+ 0x1f60, 0x301, 0x201, 0x1f61, 0x301, 0x201, 0x1f60, 0x342,
+ 0x201, 0x1f61, 0x342, 0x201, 0x3a9, 0x313, 0x201, 0x3a9,
+ 0x314, 0x201, 0x1f68, 0x300, 0x201, 0x1f69, 0x300, 0x201,
+ 0x1f68, 0x301, 0x201, 0x1f69, 0x301, 0x201, 0x1f68, 0x342,
+ 0x201, 0x1f69, 0x342, 0x201, 0x3b1, 0x300, 0x101, 0x3ac,
+ 0x201, 0x3b5, 0x300, 0x101, 0x3ad, 0x201, 0x3b7, 0x300,
+ 0x101, 0x3ae, 0x201, 0x3b9, 0x300, 0x101, 0x3af, 0x201,
+ 0x3bf, 0x300, 0x101, 0x3cc, 0x201, 0x3c5, 0x300, 0x101,
+ 0x3cd, 0x201, 0x3c9, 0x300, 0x101, 0x3ce, 0x201, 0x1f00,
+ 0x345, 0x201, 0x1f01, 0x345, 0x201, 0x1f02, 0x345, 0x201,
+ 0x1f03, 0x345, 0x201, 0x1f04, 0x345, 0x201, 0x1f05, 0x345,
+ 0x201, 0x1f06, 0x345, 0x201, 0x1f07, 0x345, 0x201, 0x1f08,
+ 0x345, 0x201, 0x1f09, 0x345, 0x201, 0x1f0a, 0x345, 0x201,
+ 0x1f0b, 0x345, 0x201, 0x1f0c, 0x345, 0x201, 0x1f0d, 0x345,
+ 0x201, 0x1f0e, 0x345, 0x201, 0x1f0f, 0x345, 0x201, 0x1f20,
+ 0x345, 0x201, 0x1f21, 0x345, 0x201, 0x1f22, 0x345, 0x201,
+ 0x1f23, 0x345, 0x201, 0x1f24, 0x345, 0x201, 0x1f25, 0x345,
+ 0x201, 0x1f26, 0x345, 0x201, 0x1f27, 0x345, 0x201, 0x1f28,
+ 0x345, 0x201, 0x1f29, 0x345, 0x201, 0x1f2a, 0x345, 0x201,
+ 0x1f2b, 0x345, 0x201, 0x1f2c, 0x345, 0x201, 0x1f2d, 0x345,
+ 0x201, 0x1f2e, 0x345, 0x201, 0x1f2f, 0x345, 0x201, 0x1f60,
+ 0x345, 0x201, 0x1f61, 0x345, 0x201, 0x1f62, 0x345, 0x201,
+ 0x1f63, 0x345, 0x201, 0x1f64, 0x345, 0x201, 0x1f65, 0x345,
+ 0x201, 0x1f66, 0x345, 0x201, 0x1f67, 0x345, 0x201, 0x1f68,
+ 0x345, 0x201, 0x1f69, 0x345, 0x201, 0x1f6a, 0x345, 0x201,
+ 0x1f6b, 0x345, 0x201, 0x1f6c, 0x345, 0x201, 0x1f6d, 0x345,
+ 0x201, 0x1f6e, 0x345, 0x201, 0x1f6f, 0x345, 0x201, 0x3b1,
+ 0x306, 0x201, 0x3b1, 0x304, 0x201, 0x1f70, 0x345, 0x201,
+ 0x3b1, 0x345, 0x201, 0x3ac, 0x345, 0x201, 0x3b1, 0x342,
+ 0x201, 0x1fb6, 0x345, 0x201, 0x391, 0x306, 0x201, 0x391,
+ 0x304, 0x201, 0x391, 0x300, 0x101, 0x386, 0x201, 0x391,
+ 0x345, 0x210, 0x20, 0x313, 0x101, 0x3b9, 0x210, 0x20,
+ 0x313, 0x210, 0x20, 0x342, 0x201, 0xa8, 0x342, 0x201,
+ 0x1f74, 0x345, 0x201, 0x3b7, 0x345, 0x201, 0x3ae, 0x345,
+ 0x201, 0x3b7, 0x342, 0x201, 0x1fc6, 0x345, 0x201, 0x395,
+ 0x300, 0x101, 0x388, 0x201, 0x397, 0x300, 0x101, 0x389,
+ 0x201, 0x397, 0x345, 0x201, 0x1fbf, 0x300, 0x201, 0x1fbf,
+ 0x301, 0x201, 0x1fbf, 0x342, 0x201, 0x3b9, 0x306, 0x201,
+ 0x3b9, 0x304, 0x201, 0x3ca, 0x300, 0x101, 0x390, 0x201,
+ 0x3b9, 0x342, 0x201, 0x3ca, 0x342, 0x201, 0x399, 0x306,
+ 0x201, 0x399, 0x304, 0x201, 0x399, 0x300, 0x101, 0x38a,
+ 0x201, 0x1ffe, 0x300, 0x201, 0x1ffe, 0x301, 0x201, 0x1ffe,
+ 0x342, 0x201, 0x3c5, 0x306, 0x201, 0x3c5, 0x304, 0x201,
+ 0x3cb, 0x300, 0x101, 0x3b0, 0x201, 0x3c1, 0x313, 0x201,
+ 0x3c1, 0x314, 0x201, 0x3c5, 0x342, 0x201, 0x3cb, 0x342,
+ 0x201, 0x3a5, 0x306, 0x201, 0x3a5, 0x304, 0x201, 0x3a5,
+ 0x300, 0x101, 0x38e, 0x201, 0x3a1, 0x314, 0x201, 0xa8,
+ 0x300, 0x101, 0x385, 0x101, 0x60, 0x201, 0x1f7c, 0x345,
+ 0x201, 0x3c9, 0x345, 0x201, 0x3ce, 0x345, 0x201, 0x3c9,
+ 0x342, 0x201, 0x1ff6, 0x345, 0x201, 0x39f, 0x300, 0x101,
+ 0x38c, 0x201, 0x3a9, 0x300, 0x101, 0x38f, 0x201, 0x3a9,
+ 0x345, 0x101, 0xb4, 0x210, 0x20, 0x314, 0x101, 0x2002,
+ 0x101, 0x2003, 0x110, 0x20, 0x110, 0x20, 0x110, 0x20,
+ 0x110, 0x20, 0x110, 0x20, 0x103, 0x20, 0x110, 0x20,
+ 0x110, 0x20, 0x110, 0x20, 0x103, 0x2010, 0x210, 0x20,
+ 0x333, 0x110, 0x2e, 0x210, 0x2e, 0x2e, 0x310, 0x2e,
+ 0x2e, 0x2e, 0x103, 0x20, 0x210, 0x2032, 0x2032, 0x310,
+ 0x2032, 0x2032, 0x2032, 0x210, 0x2035, 0x2035, 0x310, 0x2035,
+ 0x2035, 0x2035, 0x210, 0x21, 0x21, 0x210, 0x20, 0x305,
+ 0x210, 0x3f, 0x3f, 0x210, 0x3f, 0x21, 0x210, 0x21,
+ 0x3f, 0x410, 0x2032, 0x2032, 0x2032, 0x2032, 0x110, 0x20,
+ 0x109, 0x30, 0x109, 0x69, 0x109, 0x34, 0x109, 0x35,
+ 0x109, 0x36, 0x109, 0x37, 0x109, 0x38, 0x109, 0x39,
+ 0x109, 0x2b, 0x109, 0x2212, 0x109, 0x3d, 0x109, 0x28,
+ 0x109, 0x29, 0x109, 0x6e, 0x10a, 0x30, 0x10a, 0x31,
+ 0x10a, 0x32, 0x10a, 0x33, 0x10a, 0x34, 0x10a, 0x35,
+ 0x10a, 0x36, 0x10a, 0x37, 0x10a, 0x38, 0x10a, 0x39,
+ 0x10a, 0x2b, 0x10a, 0x2212, 0x10a, 0x3d, 0x10a, 0x28,
+ 0x10a, 0x29, 0x10a, 0x61, 0x10a, 0x65, 0x10a, 0x6f,
+ 0x10a, 0x78, 0x10a, 0x259, 0x210, 0x52, 0x73, 0x310,
+ 0x61, 0x2f, 0x63, 0x310, 0x61, 0x2f, 0x73, 0x102,
+ 0x43, 0x210, 0xb0, 0x43, 0x310, 0x63, 0x2f, 0x6f,
+ 0x310, 0x63, 0x2f, 0x75, 0x110, 0x190, 0x210, 0xb0,
+ 0x46, 0x102, 0x67, 0x102, 0x48, 0x102, 0x48, 0x102,
+ 0x48, 0x102, 0x68, 0x102, 0x127, 0x102, 0x49, 0x102,
+ 0x49, 0x102, 0x4c, 0x102, 0x6c, 0x102, 0x4e, 0x210,
+ 0x4e, 0x6f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52,
+ 0x102, 0x52, 0x102, 0x52, 0x209, 0x53, 0x4d, 0x310,
+ 0x54, 0x45, 0x4c, 0x209, 0x54, 0x4d, 0x102, 0x5a,
+ 0x101, 0x3a9, 0x102, 0x5a, 0x101, 0x4b, 0x101, 0xc5,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x65, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x4d, 0x102, 0x6f, 0x110, 0x5d0,
+ 0x110, 0x5d1, 0x110, 0x5d2, 0x110, 0x5d3, 0x102, 0x69,
+ 0x310, 0x46, 0x41, 0x58, 0x102, 0x3c0, 0x102, 0x3b3,
+ 0x102, 0x393, 0x102, 0x3a0, 0x102, 0x2211, 0x102, 0x44,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x69, 0x102, 0x6a,
+ 0x311, 0x31, 0x2044, 0x33, 0x311, 0x32, 0x2044, 0x33,
+ 0x311, 0x31, 0x2044, 0x35, 0x311, 0x32, 0x2044, 0x35,
+ 0x311, 0x33, 0x2044, 0x35, 0x311, 0x34, 0x2044, 0x35,
+ 0x311, 0x31, 0x2044, 0x36, 0x311, 0x35, 0x2044, 0x36,
+ 0x311, 0x31, 0x2044, 0x38, 0x311, 0x33, 0x2044, 0x38,
+ 0x311, 0x35, 0x2044, 0x38, 0x311, 0x37, 0x2044, 0x38,
+ 0x211, 0x31, 0x2044, 0x110, 0x49, 0x210, 0x49, 0x49,
+ 0x310, 0x49, 0x49, 0x49, 0x210, 0x49, 0x56, 0x110,
+ 0x56, 0x210, 0x56, 0x49, 0x310, 0x56, 0x49, 0x49,
+ 0x410, 0x56, 0x49, 0x49, 0x49, 0x210, 0x49, 0x58,
+ 0x110, 0x58, 0x210, 0x58, 0x49, 0x310, 0x58, 0x49,
+ 0x49, 0x110, 0x4c, 0x110, 0x43, 0x110, 0x44, 0x110,
+ 0x4d, 0x110, 0x69, 0x210, 0x69, 0x69, 0x310, 0x69,
+ 0x69, 0x69, 0x210, 0x69, 0x76, 0x110, 0x76, 0x210,
+ 0x76, 0x69, 0x310, 0x76, 0x69, 0x69, 0x410, 0x76,
+ 0x69, 0x69, 0x69, 0x210, 0x69, 0x78, 0x110, 0x78,
+ 0x210, 0x78, 0x69, 0x310, 0x78, 0x69, 0x69, 0x110,
+ 0x6c, 0x110, 0x63, 0x110, 0x64, 0x110, 0x6d, 0x201,
+ 0x2190, 0x338, 0x201, 0x2192, 0x338, 0x201, 0x2194, 0x338,
+ 0x201, 0x21d0, 0x338, 0x201, 0x21d4, 0x338, 0x201, 0x21d2,
+ 0x338, 0x201, 0x2203, 0x338, 0x201, 0x2208, 0x338, 0x201,
+ 0x220b, 0x338, 0x201, 0x2223, 0x338, 0x201, 0x2225, 0x338,
+ 0x210, 0x222b, 0x222b, 0x310, 0x222b, 0x222b, 0x222b, 0x210,
+ 0x222e, 0x222e, 0x310, 0x222e, 0x222e, 0x222e, 0x201, 0x223c,
+ 0x338, 0x201, 0x2243, 0x338, 0x201, 0x2245, 0x338, 0x201,
+ 0x2248, 0x338, 0x201, 0x3d, 0x338, 0x201, 0x2261, 0x338,
+ 0x201, 0x224d, 0x338, 0x201, 0x3c, 0x338, 0x201, 0x3e,
+ 0x338, 0x201, 0x2264, 0x338, 0x201, 0x2265, 0x338, 0x201,
+ 0x2272, 0x338, 0x201, 0x2273, 0x338, 0x201, 0x2276, 0x338,
+ 0x201, 0x2277, 0x338, 0x201, 0x227a, 0x338, 0x201, 0x227b,
+ 0x338, 0x201, 0x2282, 0x338, 0x201, 0x2283, 0x338, 0x201,
+ 0x2286, 0x338, 0x201, 0x2287, 0x338, 0x201, 0x22a2, 0x338,
+ 0x201, 0x22a8, 0x338, 0x201, 0x22a9, 0x338, 0x201, 0x22ab,
+ 0x338, 0x201, 0x227c, 0x338, 0x201, 0x227d, 0x338, 0x201,
+ 0x2291, 0x338, 0x201, 0x2292, 0x338, 0x201, 0x22b2, 0x338,
+ 0x201, 0x22b3, 0x338, 0x201, 0x22b4, 0x338, 0x201, 0x22b5,
+ 0x338, 0x101, 0x3008, 0x101, 0x3009, 0x108, 0x31, 0x108,
+ 0x32, 0x108, 0x33, 0x108, 0x34, 0x108, 0x35, 0x108,
+ 0x36, 0x108, 0x37, 0x108, 0x38, 0x108, 0x39, 0x208,
+ 0x31, 0x30, 0x208, 0x31, 0x31, 0x208, 0x31, 0x32,
+ 0x208, 0x31, 0x33, 0x208, 0x31, 0x34, 0x208, 0x31,
+ 0x35, 0x208, 0x31, 0x36, 0x208, 0x31, 0x37, 0x208,
+ 0x31, 0x38, 0x208, 0x31, 0x39, 0x208, 0x32, 0x30,
+ 0x310, 0x28, 0x31, 0x29, 0x310, 0x28, 0x32, 0x29,
+ 0x310, 0x28, 0x33, 0x29, 0x310, 0x28, 0x34, 0x29,
+ 0x310, 0x28, 0x35, 0x29, 0x310, 0x28, 0x36, 0x29,
+ 0x310, 0x28, 0x37, 0x29, 0x310, 0x28, 0x38, 0x29,
+ 0x310, 0x28, 0x39, 0x29, 0x410, 0x28, 0x31, 0x30,
+ 0x29, 0x410, 0x28, 0x31, 0x31, 0x29, 0x410, 0x28,
+ 0x31, 0x32, 0x29, 0x410, 0x28, 0x31, 0x33, 0x29,
+ 0x410, 0x28, 0x31, 0x34, 0x29, 0x410, 0x28, 0x31,
+ 0x35, 0x29, 0x410, 0x28, 0x31, 0x36, 0x29, 0x410,
+ 0x28, 0x31, 0x37, 0x29, 0x410, 0x28, 0x31, 0x38,
+ 0x29, 0x410, 0x28, 0x31, 0x39, 0x29, 0x410, 0x28,
+ 0x32, 0x30, 0x29, 0x210, 0x31, 0x2e, 0x210, 0x32,
+ 0x2e, 0x210, 0x33, 0x2e, 0x210, 0x34, 0x2e, 0x210,
+ 0x35, 0x2e, 0x210, 0x36, 0x2e, 0x210, 0x37, 0x2e,
+ 0x210, 0x38, 0x2e, 0x210, 0x39, 0x2e, 0x310, 0x31,
+ 0x30, 0x2e, 0x310, 0x31, 0x31, 0x2e, 0x310, 0x31,
+ 0x32, 0x2e, 0x310, 0x31, 0x33, 0x2e, 0x310, 0x31,
+ 0x34, 0x2e, 0x310, 0x31, 0x35, 0x2e, 0x310, 0x31,
+ 0x36, 0x2e, 0x310, 0x31, 0x37, 0x2e, 0x310, 0x31,
+ 0x38, 0x2e, 0x310, 0x31, 0x39, 0x2e, 0x310, 0x32,
+ 0x30, 0x2e, 0x310, 0x28, 0x61, 0x29, 0x310, 0x28,
+ 0x62, 0x29, 0x310, 0x28, 0x63, 0x29, 0x310, 0x28,
+ 0x64, 0x29, 0x310, 0x28, 0x65, 0x29, 0x310, 0x28,
+ 0x66, 0x29, 0x310, 0x28, 0x67, 0x29, 0x310, 0x28,
+ 0x68, 0x29, 0x310, 0x28, 0x69, 0x29, 0x310, 0x28,
+ 0x6a, 0x29, 0x310, 0x28, 0x6b, 0x29, 0x310, 0x28,
+ 0x6c, 0x29, 0x310, 0x28, 0x6d, 0x29, 0x310, 0x28,
+ 0x6e, 0x29, 0x310, 0x28, 0x6f, 0x29, 0x310, 0x28,
+ 0x70, 0x29, 0x310, 0x28, 0x71, 0x29, 0x310, 0x28,
+ 0x72, 0x29, 0x310, 0x28, 0x73, 0x29, 0x310, 0x28,
+ 0x74, 0x29, 0x310, 0x28, 0x75, 0x29, 0x310, 0x28,
+ 0x76, 0x29, 0x310, 0x28, 0x77, 0x29, 0x310, 0x28,
+ 0x78, 0x29, 0x310, 0x28, 0x79, 0x29, 0x310, 0x28,
+ 0x7a, 0x29, 0x108, 0x41, 0x108, 0x42, 0x108, 0x43,
+ 0x108, 0x44, 0x108, 0x45, 0x108, 0x46, 0x108, 0x47,
+ 0x108, 0x48, 0x108, 0x49, 0x108, 0x4a, 0x108, 0x4b,
+ 0x108, 0x4c, 0x108, 0x4d, 0x108, 0x4e, 0x108, 0x4f,
+ 0x108, 0x50, 0x108, 0x51, 0x108, 0x52, 0x108, 0x53,
+ 0x108, 0x54, 0x108, 0x55, 0x108, 0x56, 0x108, 0x57,
+ 0x108, 0x58, 0x108, 0x59, 0x108, 0x5a, 0x108, 0x61,
+ 0x108, 0x62, 0x108, 0x63, 0x108, 0x64, 0x108, 0x65,
+ 0x108, 0x66, 0x108, 0x67, 0x108, 0x68, 0x108, 0x69,
+ 0x108, 0x6a, 0x108, 0x6b, 0x108, 0x6c, 0x108, 0x6d,
+ 0x108, 0x6e, 0x108, 0x6f, 0x108, 0x70, 0x108, 0x71,
+ 0x108, 0x72, 0x108, 0x73, 0x108, 0x74, 0x108, 0x75,
+ 0x108, 0x76, 0x108, 0x77, 0x108, 0x78, 0x108, 0x79,
+ 0x108, 0x7a, 0x108, 0x30, 0x410, 0x222b, 0x222b, 0x222b,
+ 0x222b, 0x310, 0x3a, 0x3a, 0x3d, 0x210, 0x3d, 0x3d,
+ 0x310, 0x3d, 0x3d, 0x3d, 0x201, 0x2add, 0x338, 0x109,
+ 0x2d61, 0x110, 0x6bcd, 0x110, 0x9f9f, 0x110, 0x4e00, 0x110,
+ 0x4e28, 0x110, 0x4e36, 0x110, 0x4e3f, 0x110, 0x4e59, 0x110,
+ 0x4e85, 0x110, 0x4e8c, 0x110, 0x4ea0, 0x110, 0x4eba, 0x110,
+ 0x513f, 0x110, 0x5165, 0x110, 0x516b, 0x110, 0x5182, 0x110,
+ 0x5196, 0x110, 0x51ab, 0x110, 0x51e0, 0x110, 0x51f5, 0x110,
+ 0x5200, 0x110, 0x529b, 0x110, 0x52f9, 0x110, 0x5315, 0x110,
+ 0x531a, 0x110, 0x5338, 0x110, 0x5341, 0x110, 0x535c, 0x110,
+ 0x5369, 0x110, 0x5382, 0x110, 0x53b6, 0x110, 0x53c8, 0x110,
+ 0x53e3, 0x110, 0x56d7, 0x110, 0x571f, 0x110, 0x58eb, 0x110,
+ 0x5902, 0x110, 0x590a, 0x110, 0x5915, 0x110, 0x5927, 0x110,
+ 0x5973, 0x110, 0x5b50, 0x110, 0x5b80, 0x110, 0x5bf8, 0x110,
+ 0x5c0f, 0x110, 0x5c22, 0x110, 0x5c38, 0x110, 0x5c6e, 0x110,
+ 0x5c71, 0x110, 0x5ddb, 0x110, 0x5de5, 0x110, 0x5df1, 0x110,
+ 0x5dfe, 0x110, 0x5e72, 0x110, 0x5e7a, 0x110, 0x5e7f, 0x110,
+ 0x5ef4, 0x110, 0x5efe, 0x110, 0x5f0b, 0x110, 0x5f13, 0x110,
+ 0x5f50, 0x110, 0x5f61, 0x110, 0x5f73, 0x110, 0x5fc3, 0x110,
+ 0x6208, 0x110, 0x6236, 0x110, 0x624b, 0x110, 0x652f, 0x110,
+ 0x6534, 0x110, 0x6587, 0x110, 0x6597, 0x110, 0x65a4, 0x110,
+ 0x65b9, 0x110, 0x65e0, 0x110, 0x65e5, 0x110, 0x66f0, 0x110,
+ 0x6708, 0x110, 0x6728, 0x110, 0x6b20, 0x110, 0x6b62, 0x110,
+ 0x6b79, 0x110, 0x6bb3, 0x110, 0x6bcb, 0x110, 0x6bd4, 0x110,
+ 0x6bdb, 0x110, 0x6c0f, 0x110, 0x6c14, 0x110, 0x6c34, 0x110,
+ 0x706b, 0x110, 0x722a, 0x110, 0x7236, 0x110, 0x723b, 0x110,
+ 0x723f, 0x110, 0x7247, 0x110, 0x7259, 0x110, 0x725b, 0x110,
+ 0x72ac, 0x110, 0x7384, 0x110, 0x7389, 0x110, 0x74dc, 0x110,
+ 0x74e6, 0x110, 0x7518, 0x110, 0x751f, 0x110, 0x7528, 0x110,
+ 0x7530, 0x110, 0x758b, 0x110, 0x7592, 0x110, 0x7676, 0x110,
+ 0x767d, 0x110, 0x76ae, 0x110, 0x76bf, 0x110, 0x76ee, 0x110,
+ 0x77db, 0x110, 0x77e2, 0x110, 0x77f3, 0x110, 0x793a, 0x110,
+ 0x79b8, 0x110, 0x79be, 0x110, 0x7a74, 0x110, 0x7acb, 0x110,
+ 0x7af9, 0x110, 0x7c73, 0x110, 0x7cf8, 0x110, 0x7f36, 0x110,
+ 0x7f51, 0x110, 0x7f8a, 0x110, 0x7fbd, 0x110, 0x8001, 0x110,
+ 0x800c, 0x110, 0x8012, 0x110, 0x8033, 0x110, 0x807f, 0x110,
+ 0x8089, 0x110, 0x81e3, 0x110, 0x81ea, 0x110, 0x81f3, 0x110,
+ 0x81fc, 0x110, 0x820c, 0x110, 0x821b, 0x110, 0x821f, 0x110,
+ 0x826e, 0x110, 0x8272, 0x110, 0x8278, 0x110, 0x864d, 0x110,
+ 0x866b, 0x110, 0x8840, 0x110, 0x884c, 0x110, 0x8863, 0x110,
+ 0x897e, 0x110, 0x898b, 0x110, 0x89d2, 0x110, 0x8a00, 0x110,
+ 0x8c37, 0x110, 0x8c46, 0x110, 0x8c55, 0x110, 0x8c78, 0x110,
+ 0x8c9d, 0x110, 0x8d64, 0x110, 0x8d70, 0x110, 0x8db3, 0x110,
+ 0x8eab, 0x110, 0x8eca, 0x110, 0x8f9b, 0x110, 0x8fb0, 0x110,
+ 0x8fb5, 0x110, 0x9091, 0x110, 0x9149, 0x110, 0x91c6, 0x110,
+ 0x91cc, 0x110, 0x91d1, 0x110, 0x9577, 0x110, 0x9580, 0x110,
+ 0x961c, 0x110, 0x96b6, 0x110, 0x96b9, 0x110, 0x96e8, 0x110,
+ 0x9751, 0x110, 0x975e, 0x110, 0x9762, 0x110, 0x9769, 0x110,
+ 0x97cb, 0x110, 0x97ed, 0x110, 0x97f3, 0x110, 0x9801, 0x110,
+ 0x98a8, 0x110, 0x98db, 0x110, 0x98df, 0x110, 0x9996, 0x110,
+ 0x9999, 0x110, 0x99ac, 0x110, 0x9aa8, 0x110, 0x9ad8, 0x110,
+ 0x9adf, 0x110, 0x9b25, 0x110, 0x9b2f, 0x110, 0x9b32, 0x110,
+ 0x9b3c, 0x110, 0x9b5a, 0x110, 0x9ce5, 0x110, 0x9e75, 0x110,
+ 0x9e7f, 0x110, 0x9ea5, 0x110, 0x9ebb, 0x110, 0x9ec3, 0x110,
+ 0x9ecd, 0x110, 0x9ed1, 0x110, 0x9ef9, 0x110, 0x9efd, 0x110,
+ 0x9f0e, 0x110, 0x9f13, 0x110, 0x9f20, 0x110, 0x9f3b, 0x110,
+ 0x9f4a, 0x110, 0x9f52, 0x110, 0x9f8d, 0x110, 0x9f9c, 0x110,
+ 0x9fa0, 0x10c, 0x20, 0x110, 0x3012, 0x110, 0x5341, 0x110,
+ 0x5344, 0x110, 0x5345, 0x201, 0x304b, 0x3099, 0x201, 0x304d,
+ 0x3099, 0x201, 0x304f, 0x3099, 0x201, 0x3051, 0x3099, 0x201,
+ 0x3053, 0x3099, 0x201, 0x3055, 0x3099, 0x201, 0x3057, 0x3099,
+ 0x201, 0x3059, 0x3099, 0x201, 0x305b, 0x3099, 0x201, 0x305d,
+ 0x3099, 0x201, 0x305f, 0x3099, 0x201, 0x3061, 0x3099, 0x201,
+ 0x3064, 0x3099, 0x201, 0x3066, 0x3099, 0x201, 0x3068, 0x3099,
+ 0x201, 0x306f, 0x3099, 0x201, 0x306f, 0x309a, 0x201, 0x3072,
+ 0x3099, 0x201, 0x3072, 0x309a, 0x201, 0x3075, 0x3099, 0x201,
+ 0x3075, 0x309a, 0x201, 0x3078, 0x3099, 0x201, 0x3078, 0x309a,
+ 0x201, 0x307b, 0x3099, 0x201, 0x307b, 0x309a, 0x201, 0x3046,
+ 0x3099, 0x210, 0x20, 0x3099, 0x210, 0x20, 0x309a, 0x201,
+ 0x309d, 0x3099, 0x20b, 0x3088, 0x308a, 0x201, 0x30ab, 0x3099,
+ 0x201, 0x30ad, 0x3099, 0x201, 0x30af, 0x3099, 0x201, 0x30b1,
+ 0x3099, 0x201, 0x30b3, 0x3099, 0x201, 0x30b5, 0x3099, 0x201,
+ 0x30b7, 0x3099, 0x201, 0x30b9, 0x3099, 0x201, 0x30bb, 0x3099,
+ 0x201, 0x30bd, 0x3099, 0x201, 0x30bf, 0x3099, 0x201, 0x30c1,
+ 0x3099, 0x201, 0x30c4, 0x3099, 0x201, 0x30c6, 0x3099, 0x201,
+ 0x30c8, 0x3099, 0x201, 0x30cf, 0x3099, 0x201, 0x30cf, 0x309a,
+ 0x201, 0x30d2, 0x3099, 0x201, 0x30d2, 0x309a, 0x201, 0x30d5,
+ 0x3099, 0x201, 0x30d5, 0x309a, 0x201, 0x30d8, 0x3099, 0x201,
+ 0x30d8, 0x309a, 0x201, 0x30db, 0x3099, 0x201, 0x30db, 0x309a,
+ 0x201, 0x30a6, 0x3099, 0x201, 0x30ef, 0x3099, 0x201, 0x30f0,
+ 0x3099, 0x201, 0x30f1, 0x3099, 0x201, 0x30f2, 0x3099, 0x201,
+ 0x30fd, 0x3099, 0x20b, 0x30b3, 0x30c8, 0x110, 0x1100, 0x110,
+ 0x1101, 0x110, 0x11aa, 0x110, 0x1102, 0x110, 0x11ac, 0x110,
+ 0x11ad, 0x110, 0x1103, 0x110, 0x1104, 0x110, 0x1105, 0x110,
+ 0x11b0, 0x110, 0x11b1, 0x110, 0x11b2, 0x110, 0x11b3, 0x110,
+ 0x11b4, 0x110, 0x11b5, 0x110, 0x111a, 0x110, 0x1106, 0x110,
+ 0x1107, 0x110, 0x1108, 0x110, 0x1121, 0x110, 0x1109, 0x110,
+ 0x110a, 0x110, 0x110b, 0x110, 0x110c, 0x110, 0x110d, 0x110,
+ 0x110e, 0x110, 0x110f, 0x110, 0x1110, 0x110, 0x1111, 0x110,
+ 0x1112, 0x110, 0x1161, 0x110, 0x1162, 0x110, 0x1163, 0x110,
+ 0x1164, 0x110, 0x1165, 0x110, 0x1166, 0x110, 0x1167, 0x110,
+ 0x1168, 0x110, 0x1169, 0x110, 0x116a, 0x110, 0x116b, 0x110,
+ 0x116c, 0x110, 0x116d, 0x110, 0x116e, 0x110, 0x116f, 0x110,
+ 0x1170, 0x110, 0x1171, 0x110, 0x1172, 0x110, 0x1173, 0x110,
+ 0x1174, 0x110, 0x1175, 0x110, 0x1160, 0x110, 0x1114, 0x110,
+ 0x1115, 0x110, 0x11c7, 0x110, 0x11c8, 0x110, 0x11cc, 0x110,
+ 0x11ce, 0x110, 0x11d3, 0x110, 0x11d7, 0x110, 0x11d9, 0x110,
+ 0x111c, 0x110, 0x11dd, 0x110, 0x11df, 0x110, 0x111d, 0x110,
+ 0x111e, 0x110, 0x1120, 0x110, 0x1122, 0x110, 0x1123, 0x110,
+ 0x1127, 0x110, 0x1129, 0x110, 0x112b, 0x110, 0x112c, 0x110,
+ 0x112d, 0x110, 0x112e, 0x110, 0x112f, 0x110, 0x1132, 0x110,
+ 0x1136, 0x110, 0x1140, 0x110, 0x1147, 0x110, 0x114c, 0x110,
+ 0x11f1, 0x110, 0x11f2, 0x110, 0x1157, 0x110, 0x1158, 0x110,
+ 0x1159, 0x110, 0x1184, 0x110, 0x1185, 0x110, 0x1188, 0x110,
+ 0x1191, 0x110, 0x1192, 0x110, 0x1194, 0x110, 0x119e, 0x110,
+ 0x11a1, 0x109, 0x4e00, 0x109, 0x4e8c, 0x109, 0x4e09, 0x109,
+ 0x56db, 0x109, 0x4e0a, 0x109, 0x4e2d, 0x109, 0x4e0b, 0x109,
+ 0x7532, 0x109, 0x4e59, 0x109, 0x4e19, 0x109, 0x4e01, 0x109,
+ 0x5929, 0x109, 0x5730, 0x109, 0x4eba, 0x310, 0x28, 0x1100,
+ 0x29, 0x310, 0x28, 0x1102, 0x29, 0x310, 0x28, 0x1103,
+ 0x29, 0x310, 0x28, 0x1105, 0x29, 0x310, 0x28, 0x1106,
+ 0x29, 0x310, 0x28, 0x1107, 0x29, 0x310, 0x28, 0x1109,
+ 0x29, 0x310, 0x28, 0x110b, 0x29, 0x310, 0x28, 0x110c,
+ 0x29, 0x310, 0x28, 0x110e, 0x29, 0x310, 0x28, 0x110f,
+ 0x29, 0x310, 0x28, 0x1110, 0x29, 0x310, 0x28, 0x1111,
+ 0x29, 0x310, 0x28, 0x1112, 0x29, 0x410, 0x28, 0x1100,
+ 0x1161, 0x29, 0x410, 0x28, 0x1102, 0x1161, 0x29, 0x410,
+ 0x28, 0x1103, 0x1161, 0x29, 0x410, 0x28, 0x1105, 0x1161,
+ 0x29, 0x410, 0x28, 0x1106, 0x1161, 0x29, 0x410, 0x28,
+ 0x1107, 0x1161, 0x29, 0x410, 0x28, 0x1109, 0x1161, 0x29,
+ 0x410, 0x28, 0x110b, 0x1161, 0x29, 0x410, 0x28, 0x110c,
+ 0x1161, 0x29, 0x410, 0x28, 0x110e, 0x1161, 0x29, 0x410,
+ 0x28, 0x110f, 0x1161, 0x29, 0x410, 0x28, 0x1110, 0x1161,
+ 0x29, 0x410, 0x28, 0x1111, 0x1161, 0x29, 0x410, 0x28,
+ 0x1112, 0x1161, 0x29, 0x410, 0x28, 0x110c, 0x116e, 0x29,
+ 0x710, 0x28, 0x110b, 0x1169, 0x110c, 0x1165, 0x11ab, 0x29,
+ 0x610, 0x28, 0x110b, 0x1169, 0x1112, 0x116e, 0x29, 0x310,
+ 0x28, 0x4e00, 0x29, 0x310, 0x28, 0x4e8c, 0x29, 0x310,
+ 0x28, 0x4e09, 0x29, 0x310, 0x28, 0x56db, 0x29, 0x310,
+ 0x28, 0x4e94, 0x29, 0x310, 0x28, 0x516d, 0x29, 0x310,
+ 0x28, 0x4e03, 0x29, 0x310, 0x28, 0x516b, 0x29, 0x310,
+ 0x28, 0x4e5d, 0x29, 0x310, 0x28, 0x5341, 0x29, 0x310,
+ 0x28, 0x6708, 0x29, 0x310, 0x28, 0x706b, 0x29, 0x310,
+ 0x28, 0x6c34, 0x29, 0x310, 0x28, 0x6728, 0x29, 0x310,
+ 0x28, 0x91d1, 0x29, 0x310, 0x28, 0x571f, 0x29, 0x310,
+ 0x28, 0x65e5, 0x29, 0x310, 0x28, 0x682a, 0x29, 0x310,
+ 0x28, 0x6709, 0x29, 0x310, 0x28, 0x793e, 0x29, 0x310,
+ 0x28, 0x540d, 0x29, 0x310, 0x28, 0x7279, 0x29, 0x310,
+ 0x28, 0x8ca1, 0x29, 0x310, 0x28, 0x795d, 0x29, 0x310,
+ 0x28, 0x52b4, 0x29, 0x310, 0x28, 0x4ee3, 0x29, 0x310,
+ 0x28, 0x547c, 0x29, 0x310, 0x28, 0x5b66, 0x29, 0x310,
+ 0x28, 0x76e3, 0x29, 0x310, 0x28, 0x4f01, 0x29, 0x310,
+ 0x28, 0x8cc7, 0x29, 0x310, 0x28, 0x5354, 0x29, 0x310,
+ 0x28, 0x796d, 0x29, 0x310, 0x28, 0x4f11, 0x29, 0x310,
+ 0x28, 0x81ea, 0x29, 0x310, 0x28, 0x81f3, 0x29, 0x30f,
+ 0x50, 0x54, 0x45, 0x208, 0x32, 0x31, 0x208, 0x32,
+ 0x32, 0x208, 0x32, 0x33, 0x208, 0x32, 0x34, 0x208,
+ 0x32, 0x35, 0x208, 0x32, 0x36, 0x208, 0x32, 0x37,
+ 0x208, 0x32, 0x38, 0x208, 0x32, 0x39, 0x208, 0x33,
+ 0x30, 0x208, 0x33, 0x31, 0x208, 0x33, 0x32, 0x208,
+ 0x33, 0x33, 0x208, 0x33, 0x34, 0x208, 0x33, 0x35,
+ 0x108, 0x1100, 0x108, 0x1102, 0x108, 0x1103, 0x108, 0x1105,
+ 0x108, 0x1106, 0x108, 0x1107, 0x108, 0x1109, 0x108, 0x110b,
+ 0x108, 0x110c, 0x108, 0x110e, 0x108, 0x110f, 0x108, 0x1110,
+ 0x108, 0x1111, 0x108, 0x1112, 0x208, 0x1100, 0x1161, 0x208,
+ 0x1102, 0x1161, 0x208, 0x1103, 0x1161, 0x208, 0x1105, 0x1161,
+ 0x208, 0x1106, 0x1161, 0x208, 0x1107, 0x1161, 0x208, 0x1109,
+ 0x1161, 0x208, 0x110b, 0x1161, 0x208, 0x110c, 0x1161, 0x208,
+ 0x110e, 0x1161, 0x208, 0x110f, 0x1161, 0x208, 0x1110, 0x1161,
+ 0x208, 0x1111, 0x1161, 0x208, 0x1112, 0x1161, 0x508, 0x110e,
+ 0x1161, 0x11b7, 0x1100, 0x1169, 0x408, 0x110c, 0x116e, 0x110b,
+ 0x1174, 0x208, 0x110b, 0x116e, 0x108, 0x4e00, 0x108, 0x4e8c,
+ 0x108, 0x4e09, 0x108, 0x56db, 0x108, 0x4e94, 0x108, 0x516d,
+ 0x108, 0x4e03, 0x108, 0x516b, 0x108, 0x4e5d, 0x108, 0x5341,
+ 0x108, 0x6708, 0x108, 0x706b, 0x108, 0x6c34, 0x108, 0x6728,
+ 0x108, 0x91d1, 0x108, 0x571f, 0x108, 0x65e5, 0x108, 0x682a,
+ 0x108, 0x6709, 0x108, 0x793e, 0x108, 0x540d, 0x108, 0x7279,
+ 0x108, 0x8ca1, 0x108, 0x795d, 0x108, 0x52b4, 0x108, 0x79d8,
+ 0x108, 0x7537, 0x108, 0x5973, 0x108, 0x9069, 0x108, 0x512a,
+ 0x108, 0x5370, 0x108, 0x6ce8, 0x108, 0x9805, 0x108, 0x4f11,
+ 0x108, 0x5199, 0x108, 0x6b63, 0x108, 0x4e0a, 0x108, 0x4e2d,
+ 0x108, 0x4e0b, 0x108, 0x5de6, 0x108, 0x53f3, 0x108, 0x533b,
+ 0x108, 0x5b97, 0x108, 0x5b66, 0x108, 0x76e3, 0x108, 0x4f01,
+ 0x108, 0x8cc7, 0x108, 0x5354, 0x108, 0x591c, 0x208, 0x33,
+ 0x36, 0x208, 0x33, 0x37, 0x208, 0x33, 0x38, 0x208,
+ 0x33, 0x39, 0x208, 0x34, 0x30, 0x208, 0x34, 0x31,
+ 0x208, 0x34, 0x32, 0x208, 0x34, 0x33, 0x208, 0x34,
+ 0x34, 0x208, 0x34, 0x35, 0x208, 0x34, 0x36, 0x208,
+ 0x34, 0x37, 0x208, 0x34, 0x38, 0x208, 0x34, 0x39,
+ 0x208, 0x35, 0x30, 0x210, 0x31, 0x6708, 0x210, 0x32,
+ 0x6708, 0x210, 0x33, 0x6708, 0x210, 0x34, 0x6708, 0x210,
+ 0x35, 0x6708, 0x210, 0x36, 0x6708, 0x210, 0x37, 0x6708,
+ 0x210, 0x38, 0x6708, 0x210, 0x39, 0x6708, 0x310, 0x31,
+ 0x30, 0x6708, 0x310, 0x31, 0x31, 0x6708, 0x310, 0x31,
+ 0x32, 0x6708, 0x20f, 0x48, 0x67, 0x30f, 0x65, 0x72,
+ 0x67, 0x20f, 0x65, 0x56, 0x30f, 0x4c, 0x54, 0x44,
+ 0x108, 0x30a2, 0x108, 0x30a4, 0x108, 0x30a6, 0x108, 0x30a8,
+ 0x108, 0x30aa, 0x108, 0x30ab, 0x108, 0x30ad, 0x108, 0x30af,
+ 0x108, 0x30b1, 0x108, 0x30b3, 0x108, 0x30b5, 0x108, 0x30b7,
+ 0x108, 0x30b9, 0x108, 0x30bb, 0x108, 0x30bd, 0x108, 0x30bf,
+ 0x108, 0x30c1, 0x108, 0x30c4, 0x108, 0x30c6, 0x108, 0x30c8,
+ 0x108, 0x30ca, 0x108, 0x30cb, 0x108, 0x30cc, 0x108, 0x30cd,
+ 0x108, 0x30ce, 0x108, 0x30cf, 0x108, 0x30d2, 0x108, 0x30d5,
+ 0x108, 0x30d8, 0x108, 0x30db, 0x108, 0x30de, 0x108, 0x30df,
+ 0x108, 0x30e0, 0x108, 0x30e1, 0x108, 0x30e2, 0x108, 0x30e4,
+ 0x108, 0x30e6, 0x108, 0x30e8, 0x108, 0x30e9, 0x108, 0x30ea,
+ 0x108, 0x30eb, 0x108, 0x30ec, 0x108, 0x30ed, 0x108, 0x30ef,
+ 0x108, 0x30f0, 0x108, 0x30f1, 0x108, 0x30f2, 0x40f, 0x30a2,
+ 0x30d1, 0x30fc, 0x30c8, 0x40f, 0x30a2, 0x30eb, 0x30d5, 0x30a1,
+ 0x40f, 0x30a2, 0x30f3, 0x30da, 0x30a2, 0x30f, 0x30a2, 0x30fc,
+ 0x30eb, 0x40f, 0x30a4, 0x30cb, 0x30f3, 0x30b0, 0x30f, 0x30a4,
+ 0x30f3, 0x30c1, 0x30f, 0x30a6, 0x30a9, 0x30f3, 0x50f, 0x30a8,
+ 0x30b9, 0x30af, 0x30fc, 0x30c9, 0x40f, 0x30a8, 0x30fc, 0x30ab,
+ 0x30fc, 0x30f, 0x30aa, 0x30f3, 0x30b9, 0x30f, 0x30aa, 0x30fc,
+ 0x30e0, 0x30f, 0x30ab, 0x30a4, 0x30ea, 0x40f, 0x30ab, 0x30e9,
+ 0x30c3, 0x30c8, 0x40f, 0x30ab, 0x30ed, 0x30ea, 0x30fc, 0x30f,
+ 0x30ac, 0x30ed, 0x30f3, 0x30f, 0x30ac, 0x30f3, 0x30de, 0x20f,
+ 0x30ae, 0x30ac, 0x30f, 0x30ae, 0x30cb, 0x30fc, 0x40f, 0x30ad,
+ 0x30e5, 0x30ea, 0x30fc, 0x40f, 0x30ae, 0x30eb, 0x30c0, 0x30fc,
+ 0x20f, 0x30ad, 0x30ed, 0x50f, 0x30ad, 0x30ed, 0x30b0, 0x30e9,
+ 0x30e0, 0x60f, 0x30ad, 0x30ed, 0x30e1, 0x30fc, 0x30c8, 0x30eb,
+ 0x50f, 0x30ad, 0x30ed, 0x30ef, 0x30c3, 0x30c8, 0x30f, 0x30b0,
+ 0x30e9, 0x30e0, 0x50f, 0x30b0, 0x30e9, 0x30e0, 0x30c8, 0x30f3,
+ 0x50f, 0x30af, 0x30eb, 0x30bc, 0x30a4, 0x30ed, 0x40f, 0x30af,
+ 0x30ed, 0x30fc, 0x30cd, 0x30f, 0x30b1, 0x30fc, 0x30b9, 0x30f,
+ 0x30b3, 0x30eb, 0x30ca, 0x30f, 0x30b3, 0x30fc, 0x30dd, 0x40f,
+ 0x30b5, 0x30a4, 0x30af, 0x30eb, 0x50f, 0x30b5, 0x30f3, 0x30c1,
+ 0x30fc, 0x30e0, 0x40f, 0x30b7, 0x30ea, 0x30f3, 0x30b0, 0x30f,
+ 0x30bb, 0x30f3, 0x30c1, 0x30f, 0x30bb, 0x30f3, 0x30c8, 0x30f,
+ 0x30c0, 0x30fc, 0x30b9, 0x20f, 0x30c7, 0x30b7, 0x20f, 0x30c9,
+ 0x30eb, 0x20f, 0x30c8, 0x30f3, 0x20f, 0x30ca, 0x30ce, 0x30f,
+ 0x30ce, 0x30c3, 0x30c8, 0x30f, 0x30cf, 0x30a4, 0x30c4, 0x50f,
+ 0x30d1, 0x30fc, 0x30bb, 0x30f3, 0x30c8, 0x30f, 0x30d1, 0x30fc,
+ 0x30c4, 0x40f, 0x30d0, 0x30fc, 0x30ec, 0x30eb, 0x50f, 0x30d4,
+ 0x30a2, 0x30b9, 0x30c8, 0x30eb, 0x30f, 0x30d4, 0x30af, 0x30eb,
+ 0x20f, 0x30d4, 0x30b3, 0x20f, 0x30d3, 0x30eb, 0x50f, 0x30d5,
+ 0x30a1, 0x30e9, 0x30c3, 0x30c9, 0x40f, 0x30d5, 0x30a3, 0x30fc,
+ 0x30c8, 0x50f, 0x30d6, 0x30c3, 0x30b7, 0x30a7, 0x30eb, 0x30f,
+ 0x30d5, 0x30e9, 0x30f3, 0x50f, 0x30d8, 0x30af, 0x30bf, 0x30fc,
+ 0x30eb, 0x20f, 0x30da, 0x30bd, 0x30f, 0x30da, 0x30cb, 0x30d2,
+ 0x30f, 0x30d8, 0x30eb, 0x30c4, 0x30f, 0x30da, 0x30f3, 0x30b9,
+ 0x30f, 0x30da, 0x30fc, 0x30b8, 0x30f, 0x30d9, 0x30fc, 0x30bf,
+ 0x40f, 0x30dd, 0x30a4, 0x30f3, 0x30c8, 0x30f, 0x30dc, 0x30eb,
+ 0x30c8, 0x20f, 0x30db, 0x30f3, 0x30f, 0x30dd, 0x30f3, 0x30c9,
+ 0x30f, 0x30db, 0x30fc, 0x30eb, 0x30f, 0x30db, 0x30fc, 0x30f3,
+ 0x40f, 0x30de, 0x30a4, 0x30af, 0x30ed, 0x30f, 0x30de, 0x30a4,
+ 0x30eb, 0x30f, 0x30de, 0x30c3, 0x30cf, 0x30f, 0x30de, 0x30eb,
+ 0x30af, 0x50f, 0x30de, 0x30f3, 0x30b7, 0x30e7, 0x30f3, 0x40f,
+ 0x30df, 0x30af, 0x30ed, 0x30f3, 0x20f, 0x30df, 0x30ea, 0x50f,
+ 0x30df, 0x30ea, 0x30d0, 0x30fc, 0x30eb, 0x20f, 0x30e1, 0x30ac,
+ 0x40f, 0x30e1, 0x30ac, 0x30c8, 0x30f3, 0x40f, 0x30e1, 0x30fc,
+ 0x30c8, 0x30eb, 0x30f, 0x30e4, 0x30fc, 0x30c9, 0x30f, 0x30e4,
+ 0x30fc, 0x30eb, 0x30f, 0x30e6, 0x30a2, 0x30f3, 0x40f, 0x30ea,
+ 0x30c3, 0x30c8, 0x30eb, 0x20f, 0x30ea, 0x30e9, 0x30f, 0x30eb,
+ 0x30d4, 0x30fc, 0x40f, 0x30eb, 0x30fc, 0x30d6, 0x30eb, 0x20f,
+ 0x30ec, 0x30e0, 0x50f, 0x30ec, 0x30f3, 0x30c8, 0x30b2, 0x30f3,
+ 0x30f, 0x30ef, 0x30c3, 0x30c8, 0x210, 0x30, 0x70b9, 0x210,
+ 0x31, 0x70b9, 0x210, 0x32, 0x70b9, 0x210, 0x33, 0x70b9,
+ 0x210, 0x34, 0x70b9, 0x210, 0x35, 0x70b9, 0x210, 0x36,
+ 0x70b9, 0x210, 0x37, 0x70b9, 0x210, 0x38, 0x70b9, 0x210,
+ 0x39, 0x70b9, 0x310, 0x31, 0x30, 0x70b9, 0x310, 0x31,
+ 0x31, 0x70b9, 0x310, 0x31, 0x32, 0x70b9, 0x310, 0x31,
+ 0x33, 0x70b9, 0x310, 0x31, 0x34, 0x70b9, 0x310, 0x31,
+ 0x35, 0x70b9, 0x310, 0x31, 0x36, 0x70b9, 0x310, 0x31,
+ 0x37, 0x70b9, 0x310, 0x31, 0x38, 0x70b9, 0x310, 0x31,
+ 0x39, 0x70b9, 0x310, 0x32, 0x30, 0x70b9, 0x310, 0x32,
+ 0x31, 0x70b9, 0x310, 0x32, 0x32, 0x70b9, 0x310, 0x32,
+ 0x33, 0x70b9, 0x310, 0x32, 0x34, 0x70b9, 0x30f, 0x68,
+ 0x50, 0x61, 0x20f, 0x64, 0x61, 0x20f, 0x41, 0x55,
+ 0x30f, 0x62, 0x61, 0x72, 0x20f, 0x6f, 0x56, 0x20f,
+ 0x70, 0x63, 0x20f, 0x64, 0x6d, 0x30f, 0x64, 0x6d,
+ 0xb2, 0x30f, 0x64, 0x6d, 0xb3, 0x20f, 0x49, 0x55,
+ 0x20f, 0x5e73, 0x6210, 0x20f, 0x662d, 0x548c, 0x20f, 0x5927,
+ 0x6b63, 0x20f, 0x660e, 0x6cbb, 0x40f, 0x682a, 0x5f0f, 0x4f1a,
+ 0x793e, 0x20f, 0x70, 0x41, 0x20f, 0x6e, 0x41, 0x20f,
+ 0x3bc, 0x41, 0x20f, 0x6d, 0x41, 0x20f, 0x6b, 0x41,
+ 0x20f, 0x4b, 0x42, 0x20f, 0x4d, 0x42, 0x20f, 0x47,
+ 0x42, 0x30f, 0x63, 0x61, 0x6c, 0x40f, 0x6b, 0x63,
+ 0x61, 0x6c, 0x20f, 0x70, 0x46, 0x20f, 0x6e, 0x46,
+ 0x20f, 0x3bc, 0x46, 0x20f, 0x3bc, 0x67, 0x20f, 0x6d,
+ 0x67, 0x20f, 0x6b, 0x67, 0x20f, 0x48, 0x7a, 0x30f,
+ 0x6b, 0x48, 0x7a, 0x30f, 0x4d, 0x48, 0x7a, 0x30f,
+ 0x47, 0x48, 0x7a, 0x30f, 0x54, 0x48, 0x7a, 0x20f,
+ 0x3bc, 0x2113, 0x20f, 0x6d, 0x2113, 0x20f, 0x64, 0x2113,
+ 0x20f, 0x6b, 0x2113, 0x20f, 0x66, 0x6d, 0x20f, 0x6e,
+ 0x6d, 0x20f, 0x3bc, 0x6d, 0x20f, 0x6d, 0x6d, 0x20f,
+ 0x63, 0x6d, 0x20f, 0x6b, 0x6d, 0x30f, 0x6d, 0x6d,
+ 0xb2, 0x30f, 0x63, 0x6d, 0xb2, 0x20f, 0x6d, 0xb2,
+ 0x30f, 0x6b, 0x6d, 0xb2, 0x30f, 0x6d, 0x6d, 0xb3,
+ 0x30f, 0x63, 0x6d, 0xb3, 0x20f, 0x6d, 0xb3, 0x30f,
+ 0x6b, 0x6d, 0xb3, 0x30f, 0x6d, 0x2215, 0x73, 0x40f,
+ 0x6d, 0x2215, 0x73, 0xb2, 0x20f, 0x50, 0x61, 0x30f,
+ 0x6b, 0x50, 0x61, 0x30f, 0x4d, 0x50, 0x61, 0x30f,
+ 0x47, 0x50, 0x61, 0x30f, 0x72, 0x61, 0x64, 0x50f,
+ 0x72, 0x61, 0x64, 0x2215, 0x73, 0x60f, 0x72, 0x61,
+ 0x64, 0x2215, 0x73, 0xb2, 0x20f, 0x70, 0x73, 0x20f,
+ 0x6e, 0x73, 0x20f, 0x3bc, 0x73, 0x20f, 0x6d, 0x73,
+ 0x20f, 0x70, 0x56, 0x20f, 0x6e, 0x56, 0x20f, 0x3bc,
+ 0x56, 0x20f, 0x6d, 0x56, 0x20f, 0x6b, 0x56, 0x20f,
+ 0x4d, 0x56, 0x20f, 0x70, 0x57, 0x20f, 0x6e, 0x57,
+ 0x20f, 0x3bc, 0x57, 0x20f, 0x6d, 0x57, 0x20f, 0x6b,
+ 0x57, 0x20f, 0x4d, 0x57, 0x20f, 0x6b, 0x3a9, 0x20f,
+ 0x4d, 0x3a9, 0x40f, 0x61, 0x2e, 0x6d, 0x2e, 0x20f,
+ 0x42, 0x71, 0x20f, 0x63, 0x63, 0x20f, 0x63, 0x64,
+ 0x40f, 0x43, 0x2215, 0x6b, 0x67, 0x30f, 0x43, 0x6f,
+ 0x2e, 0x20f, 0x64, 0x42, 0x20f, 0x47, 0x79, 0x20f,
+ 0x68, 0x61, 0x20f, 0x48, 0x50, 0x20f, 0x69, 0x6e,
+ 0x20f, 0x4b, 0x4b, 0x20f, 0x4b, 0x4d, 0x20f, 0x6b,
+ 0x74, 0x20f, 0x6c, 0x6d, 0x20f, 0x6c, 0x6e, 0x30f,
+ 0x6c, 0x6f, 0x67, 0x20f, 0x6c, 0x78, 0x20f, 0x6d,
+ 0x62, 0x30f, 0x6d, 0x69, 0x6c, 0x30f, 0x6d, 0x6f,
+ 0x6c, 0x20f, 0x50, 0x48, 0x40f, 0x70, 0x2e, 0x6d,
+ 0x2e, 0x30f, 0x50, 0x50, 0x4d, 0x20f, 0x50, 0x52,
+ 0x20f, 0x73, 0x72, 0x20f, 0x53, 0x76, 0x20f, 0x57,
+ 0x62, 0x30f, 0x56, 0x2215, 0x6d, 0x30f, 0x41, 0x2215,
+ 0x6d, 0x210, 0x31, 0x65e5, 0x210, 0x32, 0x65e5, 0x210,
+ 0x33, 0x65e5, 0x210, 0x34, 0x65e5, 0x210, 0x35, 0x65e5,
+ 0x210, 0x36, 0x65e5, 0x210, 0x37, 0x65e5, 0x210, 0x38,
+ 0x65e5, 0x210, 0x39, 0x65e5, 0x310, 0x31, 0x30, 0x65e5,
+ 0x310, 0x31, 0x31, 0x65e5, 0x310, 0x31, 0x32, 0x65e5,
+ 0x310, 0x31, 0x33, 0x65e5, 0x310, 0x31, 0x34, 0x65e5,
+ 0x310, 0x31, 0x35, 0x65e5, 0x310, 0x31, 0x36, 0x65e5,
+ 0x310, 0x31, 0x37, 0x65e5, 0x310, 0x31, 0x38, 0x65e5,
+ 0x310, 0x31, 0x39, 0x65e5, 0x310, 0x32, 0x30, 0x65e5,
+ 0x310, 0x32, 0x31, 0x65e5, 0x310, 0x32, 0x32, 0x65e5,
+ 0x310, 0x32, 0x33, 0x65e5, 0x310, 0x32, 0x34, 0x65e5,
+ 0x310, 0x32, 0x35, 0x65e5, 0x310, 0x32, 0x36, 0x65e5,
+ 0x310, 0x32, 0x37, 0x65e5, 0x310, 0x32, 0x38, 0x65e5,
+ 0x310, 0x32, 0x39, 0x65e5, 0x310, 0x33, 0x30, 0x65e5,
+ 0x310, 0x33, 0x31, 0x65e5, 0x30f, 0x67, 0x61, 0x6c,
+ 0x101, 0x8c48, 0x101, 0x66f4, 0x101, 0x8eca, 0x101, 0x8cc8,
+ 0x101, 0x6ed1, 0x101, 0x4e32, 0x101, 0x53e5, 0x101, 0x9f9c,
+ 0x101, 0x9f9c, 0x101, 0x5951, 0x101, 0x91d1, 0x101, 0x5587,
+ 0x101, 0x5948, 0x101, 0x61f6, 0x101, 0x7669, 0x101, 0x7f85,
+ 0x101, 0x863f, 0x101, 0x87ba, 0x101, 0x88f8, 0x101, 0x908f,
+ 0x101, 0x6a02, 0x101, 0x6d1b, 0x101, 0x70d9, 0x101, 0x73de,
+ 0x101, 0x843d, 0x101, 0x916a, 0x101, 0x99f1, 0x101, 0x4e82,
+ 0x101, 0x5375, 0x101, 0x6b04, 0x101, 0x721b, 0x101, 0x862d,
+ 0x101, 0x9e1e, 0x101, 0x5d50, 0x101, 0x6feb, 0x101, 0x85cd,
+ 0x101, 0x8964, 0x101, 0x62c9, 0x101, 0x81d8, 0x101, 0x881f,
+ 0x101, 0x5eca, 0x101, 0x6717, 0x101, 0x6d6a, 0x101, 0x72fc,
+ 0x101, 0x90ce, 0x101, 0x4f86, 0x101, 0x51b7, 0x101, 0x52de,
+ 0x101, 0x64c4, 0x101, 0x6ad3, 0x101, 0x7210, 0x101, 0x76e7,
+ 0x101, 0x8001, 0x101, 0x8606, 0x101, 0x865c, 0x101, 0x8def,
+ 0x101, 0x9732, 0x101, 0x9b6f, 0x101, 0x9dfa, 0x101, 0x788c,
+ 0x101, 0x797f, 0x101, 0x7da0, 0x101, 0x83c9, 0x101, 0x9304,
+ 0x101, 0x9e7f, 0x101, 0x8ad6, 0x101, 0x58df, 0x101, 0x5f04,
+ 0x101, 0x7c60, 0x101, 0x807e, 0x101, 0x7262, 0x101, 0x78ca,
+ 0x101, 0x8cc2, 0x101, 0x96f7, 0x101, 0x58d8, 0x101, 0x5c62,
+ 0x101, 0x6a13, 0x101, 0x6dda, 0x101, 0x6f0f, 0x101, 0x7d2f,
+ 0x101, 0x7e37, 0x101, 0x964b, 0x101, 0x52d2, 0x101, 0x808b,
+ 0x101, 0x51dc, 0x101, 0x51cc, 0x101, 0x7a1c, 0x101, 0x7dbe,
+ 0x101, 0x83f1, 0x101, 0x9675, 0x101, 0x8b80, 0x101, 0x62cf,
+ 0x101, 0x6a02, 0x101, 0x8afe, 0x101, 0x4e39, 0x101, 0x5be7,
+ 0x101, 0x6012, 0x101, 0x7387, 0x101, 0x7570, 0x101, 0x5317,
+ 0x101, 0x78fb, 0x101, 0x4fbf, 0x101, 0x5fa9, 0x101, 0x4e0d,
+ 0x101, 0x6ccc, 0x101, 0x6578, 0x101, 0x7d22, 0x101, 0x53c3,
+ 0x101, 0x585e, 0x101, 0x7701, 0x101, 0x8449, 0x101, 0x8aaa,
+ 0x101, 0x6bba, 0x101, 0x8fb0, 0x101, 0x6c88, 0x101, 0x62fe,
+ 0x101, 0x82e5, 0x101, 0x63a0, 0x101, 0x7565, 0x101, 0x4eae,
+ 0x101, 0x5169, 0x101, 0x51c9, 0x101, 0x6881, 0x101, 0x7ce7,
+ 0x101, 0x826f, 0x101, 0x8ad2, 0x101, 0x91cf, 0x101, 0x52f5,
+ 0x101, 0x5442, 0x101, 0x5973, 0x101, 0x5eec, 0x101, 0x65c5,
+ 0x101, 0x6ffe, 0x101, 0x792a, 0x101, 0x95ad, 0x101, 0x9a6a,
+ 0x101, 0x9e97, 0x101, 0x9ece, 0x101, 0x529b, 0x101, 0x66c6,
+ 0x101, 0x6b77, 0x101, 0x8f62, 0x101, 0x5e74, 0x101, 0x6190,
+ 0x101, 0x6200, 0x101, 0x649a, 0x101, 0x6f23, 0x101, 0x7149,
+ 0x101, 0x7489, 0x101, 0x79ca, 0x101, 0x7df4, 0x101, 0x806f,
+ 0x101, 0x8f26, 0x101, 0x84ee, 0x101, 0x9023, 0x101, 0x934a,
+ 0x101, 0x5217, 0x101, 0x52a3, 0x101, 0x54bd, 0x101, 0x70c8,
+ 0x101, 0x88c2, 0x101, 0x8aaa, 0x101, 0x5ec9, 0x101, 0x5ff5,
+ 0x101, 0x637b, 0x101, 0x6bae, 0x101, 0x7c3e, 0x101, 0x7375,
+ 0x101, 0x4ee4, 0x101, 0x56f9, 0x101, 0x5be7, 0x101, 0x5dba,
+ 0x101, 0x601c, 0x101, 0x73b2, 0x101, 0x7469, 0x101, 0x7f9a,
+ 0x101, 0x8046, 0x101, 0x9234, 0x101, 0x96f6, 0x101, 0x9748,
+ 0x101, 0x9818, 0x101, 0x4f8b, 0x101, 0x79ae, 0x101, 0x91b4,
+ 0x101, 0x96b8, 0x101, 0x60e1, 0x101, 0x4e86, 0x101, 0x50da,
+ 0x101, 0x5bee, 0x101, 0x5c3f, 0x101, 0x6599, 0x101, 0x6a02,
+ 0x101, 0x71ce, 0x101, 0x7642, 0x101, 0x84fc, 0x101, 0x907c,
+ 0x101, 0x9f8d, 0x101, 0x6688, 0x101, 0x962e, 0x101, 0x5289,
+ 0x101, 0x677b, 0x101, 0x67f3, 0x101, 0x6d41, 0x101, 0x6e9c,
+ 0x101, 0x7409, 0x101, 0x7559, 0x101, 0x786b, 0x101, 0x7d10,
+ 0x101, 0x985e, 0x101, 0x516d, 0x101, 0x622e, 0x101, 0x9678,
+ 0x101, 0x502b, 0x101, 0x5d19, 0x101, 0x6dea, 0x101, 0x8f2a,
+ 0x101, 0x5f8b, 0x101, 0x6144, 0x101, 0x6817, 0x101, 0x7387,
+ 0x101, 0x9686, 0x101, 0x5229, 0x101, 0x540f, 0x101, 0x5c65,
+ 0x101, 0x6613, 0x101, 0x674e, 0x101, 0x68a8, 0x101, 0x6ce5,
+ 0x101, 0x7406, 0x101, 0x75e2, 0x101, 0x7f79, 0x101, 0x88cf,
+ 0x101, 0x88e1, 0x101, 0x91cc, 0x101, 0x96e2, 0x101, 0x533f,
+ 0x101, 0x6eba, 0x101, 0x541d, 0x101, 0x71d0, 0x101, 0x7498,
+ 0x101, 0x85fa, 0x101, 0x96a3, 0x101, 0x9c57, 0x101, 0x9e9f,
+ 0x101, 0x6797, 0x101, 0x6dcb, 0x101, 0x81e8, 0x101, 0x7acb,
+ 0x101, 0x7b20, 0x101, 0x7c92, 0x101, 0x72c0, 0x101, 0x7099,
+ 0x101, 0x8b58, 0x101, 0x4ec0, 0x101, 0x8336, 0x101, 0x523a,
+ 0x101, 0x5207, 0x101, 0x5ea6, 0x101, 0x62d3, 0x101, 0x7cd6,
+ 0x101, 0x5b85, 0x101, 0x6d1e, 0x101, 0x66b4, 0x101, 0x8f3b,
+ 0x101, 0x884c, 0x101, 0x964d, 0x101, 0x898b, 0x101, 0x5ed3,
+ 0x101, 0x5140, 0x101, 0x55c0, 0x101, 0x585a, 0x101, 0x6674,
+ 0x101, 0x51de, 0x101, 0x732a, 0x101, 0x76ca, 0x101, 0x793c,
+ 0x101, 0x795e, 0x101, 0x7965, 0x101, 0x798f, 0x101, 0x9756,
+ 0x101, 0x7cbe, 0x101, 0x7fbd, 0x101, 0x8612, 0x101, 0x8af8,
+ 0x101, 0x9038, 0x101, 0x90fd, 0x101, 0x98ef, 0x101, 0x98fc,
+ 0x101, 0x9928, 0x101, 0x9db4, 0x101, 0x4fae, 0x101, 0x50e7,
+ 0x101, 0x514d, 0x101, 0x52c9, 0x101, 0x52e4, 0x101, 0x5351,
+ 0x101, 0x559d, 0x101, 0x5606, 0x101, 0x5668, 0x101, 0x5840,
+ 0x101, 0x58a8, 0x101, 0x5c64, 0x101, 0x5c6e, 0x101, 0x6094,
+ 0x101, 0x6168, 0x101, 0x618e, 0x101, 0x61f2, 0x101, 0x654f,
+ 0x101, 0x65e2, 0x101, 0x6691, 0x101, 0x6885, 0x101, 0x6d77,
+ 0x101, 0x6e1a, 0x101, 0x6f22, 0x101, 0x716e, 0x101, 0x722b,
+ 0x101, 0x7422, 0x101, 0x7891, 0x101, 0x793e, 0x101, 0x7949,
+ 0x101, 0x7948, 0x101, 0x7950, 0x101, 0x7956, 0x101, 0x795d,
+ 0x101, 0x798d, 0x101, 0x798e, 0x101, 0x7a40, 0x101, 0x7a81,
+ 0x101, 0x7bc0, 0x101, 0x7df4, 0x101, 0x7e09, 0x101, 0x7e41,
+ 0x101, 0x7f72, 0x101, 0x8005, 0x101, 0x81ed, 0x101, 0x8279,
+ 0x101, 0x8279, 0x101, 0x8457, 0x101, 0x8910, 0x101, 0x8996,
+ 0x101, 0x8b01, 0x101, 0x8b39, 0x101, 0x8cd3, 0x101, 0x8d08,
+ 0x101, 0x8fb6, 0x101, 0x9038, 0x101, 0x96e3, 0x101, 0x97ff,
+ 0x101, 0x983b, 0x101, 0x4e26, 0x101, 0x51b5, 0x101, 0x5168,
+ 0x101, 0x4f80, 0x101, 0x5145, 0x101, 0x5180, 0x101, 0x52c7,
+ 0x101, 0x52fa, 0x101, 0x559d, 0x101, 0x5555, 0x101, 0x5599,
+ 0x101, 0x55e2, 0x101, 0x585a, 0x101, 0x58b3, 0x101, 0x5944,
+ 0x101, 0x5954, 0x101, 0x5a62, 0x101, 0x5b28, 0x101, 0x5ed2,
+ 0x101, 0x5ed9, 0x101, 0x5f69, 0x101, 0x5fad, 0x101, 0x60d8,
+ 0x101, 0x614e, 0x101, 0x6108, 0x101, 0x618e, 0x101, 0x6160,
+ 0x101, 0x61f2, 0x101, 0x6234, 0x101, 0x63c4, 0x101, 0x641c,
+ 0x101, 0x6452, 0x101, 0x6556, 0x101, 0x6674, 0x101, 0x6717,
+ 0x101, 0x671b, 0x101, 0x6756, 0x101, 0x6b79, 0x101, 0x6bba,
+ 0x101, 0x6d41, 0x101, 0x6edb, 0x101, 0x6ecb, 0x101, 0x6f22,
+ 0x101, 0x701e, 0x101, 0x716e, 0x101, 0x77a7, 0x101, 0x7235,
+ 0x101, 0x72af, 0x101, 0x732a, 0x101, 0x7471, 0x101, 0x7506,
+ 0x101, 0x753b, 0x101, 0x761d, 0x101, 0x761f, 0x101, 0x76ca,
+ 0x101, 0x76db, 0x101, 0x76f4, 0x101, 0x774a, 0x101, 0x7740,
+ 0x101, 0x78cc, 0x101, 0x7ab1, 0x101, 0x7bc0, 0x101, 0x7c7b,
+ 0x101, 0x7d5b, 0x101, 0x7df4, 0x101, 0x7f3e, 0x101, 0x8005,
+ 0x101, 0x8352, 0x101, 0x83ef, 0x101, 0x8779, 0x101, 0x8941,
+ 0x101, 0x8986, 0x101, 0x8996, 0x101, 0x8abf, 0x101, 0x8af8,
+ 0x101, 0x8acb, 0x101, 0x8b01, 0x101, 0x8afe, 0x101, 0x8aed,
+ 0x101, 0x8b39, 0x101, 0x8b8a, 0x101, 0x8d08, 0x101, 0x8f38,
+ 0x101, 0x9072, 0x101, 0x9199, 0x101, 0x9276, 0x101, 0x967c,
+ 0x101, 0x96e3, 0x101, 0x9756, 0x101, 0x97db, 0x101, 0x97ff,
+ 0x101, 0x980b, 0x101, 0x983b, 0x101, 0x9b12, 0x101, 0x9f9c,
+ 0x201, 0xd84a, 0xdc4a, 0x201, 0xd84a, 0xdc44, 0x201, 0xd84c,
+ 0xdfd5, 0x101, 0x3b9d, 0x101, 0x4018, 0x101, 0x4039, 0x201,
+ 0xd854, 0xde49, 0x201, 0xd857, 0xdcd0, 0x201, 0xd85f, 0xded3,
+ 0x101, 0x9f43, 0x101, 0x9f8e, 0x210, 0x66, 0x66, 0x210,
+ 0x66, 0x69, 0x210, 0x66, 0x6c, 0x310, 0x66, 0x66,
+ 0x69, 0x310, 0x66, 0x66, 0x6c, 0x210, 0x17f, 0x74,
+ 0x210, 0x73, 0x74, 0x210, 0x574, 0x576, 0x210, 0x574,
+ 0x565, 0x210, 0x574, 0x56b, 0x210, 0x57e, 0x576, 0x210,
+ 0x574, 0x56d, 0x201, 0x5d9, 0x5b4, 0x201, 0x5f2, 0x5b7,
+ 0x102, 0x5e2, 0x102, 0x5d0, 0x102, 0x5d3, 0x102, 0x5d4,
+ 0x102, 0x5db, 0x102, 0x5dc, 0x102, 0x5dd, 0x102, 0x5e8,
+ 0x102, 0x5ea, 0x102, 0x2b, 0x201, 0x5e9, 0x5c1, 0x201,
+ 0x5e9, 0x5c2, 0x201, 0xfb49, 0x5c1, 0x201, 0xfb49, 0x5c2,
+ 0x201, 0x5d0, 0x5b7, 0x201, 0x5d0, 0x5b8, 0x201, 0x5d0,
+ 0x5bc, 0x201, 0x5d1, 0x5bc, 0x201, 0x5d2, 0x5bc, 0x201,
+ 0x5d3, 0x5bc, 0x201, 0x5d4, 0x5bc, 0x201, 0x5d5, 0x5bc,
+ 0x201, 0x5d6, 0x5bc, 0x201, 0x5d8, 0x5bc, 0x201, 0x5d9,
+ 0x5bc, 0x201, 0x5da, 0x5bc, 0x201, 0x5db, 0x5bc, 0x201,
+ 0x5dc, 0x5bc, 0x201, 0x5de, 0x5bc, 0x201, 0x5e0, 0x5bc,
+ 0x201, 0x5e1, 0x5bc, 0x201, 0x5e3, 0x5bc, 0x201, 0x5e4,
+ 0x5bc, 0x201, 0x5e6, 0x5bc, 0x201, 0x5e7, 0x5bc, 0x201,
+ 0x5e8, 0x5bc, 0x201, 0x5e9, 0x5bc, 0x201, 0x5ea, 0x5bc,
+ 0x201, 0x5d5, 0x5b9, 0x201, 0x5d1, 0x5bf, 0x201, 0x5db,
+ 0x5bf, 0x201, 0x5e4, 0x5bf, 0x210, 0x5d0, 0x5dc, 0x107,
+ 0x671, 0x106, 0x671, 0x107, 0x67b, 0x106, 0x67b, 0x104,
+ 0x67b, 0x105, 0x67b, 0x107, 0x67e, 0x106, 0x67e, 0x104,
+ 0x67e, 0x105, 0x67e, 0x107, 0x680, 0x106, 0x680, 0x104,
+ 0x680, 0x105, 0x680, 0x107, 0x67a, 0x106, 0x67a, 0x104,
+ 0x67a, 0x105, 0x67a, 0x107, 0x67f, 0x106, 0x67f, 0x104,
+ 0x67f, 0x105, 0x67f, 0x107, 0x679, 0x106, 0x679, 0x104,
+ 0x679, 0x105, 0x679, 0x107, 0x6a4, 0x106, 0x6a4, 0x104,
+ 0x6a4, 0x105, 0x6a4, 0x107, 0x6a6, 0x106, 0x6a6, 0x104,
+ 0x6a6, 0x105, 0x6a6, 0x107, 0x684, 0x106, 0x684, 0x104,
+ 0x684, 0x105, 0x684, 0x107, 0x683, 0x106, 0x683, 0x104,
+ 0x683, 0x105, 0x683, 0x107, 0x686, 0x106, 0x686, 0x104,
+ 0x686, 0x105, 0x686, 0x107, 0x687, 0x106, 0x687, 0x104,
+ 0x687, 0x105, 0x687, 0x107, 0x68d, 0x106, 0x68d, 0x107,
+ 0x68c, 0x106, 0x68c, 0x107, 0x68e, 0x106, 0x68e, 0x107,
+ 0x688, 0x106, 0x688, 0x107, 0x698, 0x106, 0x698, 0x107,
+ 0x691, 0x106, 0x691, 0x107, 0x6a9, 0x106, 0x6a9, 0x104,
+ 0x6a9, 0x105, 0x6a9, 0x107, 0x6af, 0x106, 0x6af, 0x104,
+ 0x6af, 0x105, 0x6af, 0x107, 0x6b3, 0x106, 0x6b3, 0x104,
+ 0x6b3, 0x105, 0x6b3, 0x107, 0x6b1, 0x106, 0x6b1, 0x104,
+ 0x6b1, 0x105, 0x6b1, 0x107, 0x6ba, 0x106, 0x6ba, 0x107,
+ 0x6bb, 0x106, 0x6bb, 0x104, 0x6bb, 0x105, 0x6bb, 0x107,
+ 0x6c0, 0x106, 0x6c0, 0x107, 0x6c1, 0x106, 0x6c1, 0x104,
+ 0x6c1, 0x105, 0x6c1, 0x107, 0x6be, 0x106, 0x6be, 0x104,
+ 0x6be, 0x105, 0x6be, 0x107, 0x6d2, 0x106, 0x6d2, 0x107,
+ 0x6d3, 0x106, 0x6d3, 0x107, 0x6ad, 0x106, 0x6ad, 0x104,
+ 0x6ad, 0x105, 0x6ad, 0x107, 0x6c7, 0x106, 0x6c7, 0x107,
+ 0x6c6, 0x106, 0x6c6, 0x107, 0x6c8, 0x106, 0x6c8, 0x107,
+ 0x677, 0x107, 0x6cb, 0x106, 0x6cb, 0x107, 0x6c5, 0x106,
+ 0x6c5, 0x107, 0x6c9, 0x106, 0x6c9, 0x107, 0x6d0, 0x106,
+ 0x6d0, 0x104, 0x6d0, 0x105, 0x6d0, 0x104, 0x649, 0x105,
+ 0x649, 0x207, 0x626, 0x627, 0x206, 0x626, 0x627, 0x207,
+ 0x626, 0x6d5, 0x206, 0x626, 0x6d5, 0x207, 0x626, 0x648,
+ 0x206, 0x626, 0x648, 0x207, 0x626, 0x6c7, 0x206, 0x626,
+ 0x6c7, 0x207, 0x626, 0x6c6, 0x206, 0x626, 0x6c6, 0x207,
+ 0x626, 0x6c8, 0x206, 0x626, 0x6c8, 0x207, 0x626, 0x6d0,
+ 0x206, 0x626, 0x6d0, 0x204, 0x626, 0x6d0, 0x207, 0x626,
+ 0x649, 0x206, 0x626, 0x649, 0x204, 0x626, 0x649, 0x107,
+ 0x6cc, 0x106, 0x6cc, 0x104, 0x6cc, 0x105, 0x6cc, 0x207,
+ 0x626, 0x62c, 0x207, 0x626, 0x62d, 0x207, 0x626, 0x645,
+ 0x207, 0x626, 0x649, 0x207, 0x626, 0x64a, 0x207, 0x628,
+ 0x62c, 0x207, 0x628, 0x62d, 0x207, 0x628, 0x62e, 0x207,
+ 0x628, 0x645, 0x207, 0x628, 0x649, 0x207, 0x628, 0x64a,
+ 0x207, 0x62a, 0x62c, 0x207, 0x62a, 0x62d, 0x207, 0x62a,
+ 0x62e, 0x207, 0x62a, 0x645, 0x207, 0x62a, 0x649, 0x207,
+ 0x62a, 0x64a, 0x207, 0x62b, 0x62c, 0x207, 0x62b, 0x645,
+ 0x207, 0x62b, 0x649, 0x207, 0x62b, 0x64a, 0x207, 0x62c,
+ 0x62d, 0x207, 0x62c, 0x645, 0x207, 0x62d, 0x62c, 0x207,
+ 0x62d, 0x645, 0x207, 0x62e, 0x62c, 0x207, 0x62e, 0x62d,
+ 0x207, 0x62e, 0x645, 0x207, 0x633, 0x62c, 0x207, 0x633,
+ 0x62d, 0x207, 0x633, 0x62e, 0x207, 0x633, 0x645, 0x207,
+ 0x635, 0x62d, 0x207, 0x635, 0x645, 0x207, 0x636, 0x62c,
+ 0x207, 0x636, 0x62d, 0x207, 0x636, 0x62e, 0x207, 0x636,
+ 0x645, 0x207, 0x637, 0x62d, 0x207, 0x637, 0x645, 0x207,
+ 0x638, 0x645, 0x207, 0x639, 0x62c, 0x207, 0x639, 0x645,
+ 0x207, 0x63a, 0x62c, 0x207, 0x63a, 0x645, 0x207, 0x641,
+ 0x62c, 0x207, 0x641, 0x62d, 0x207, 0x641, 0x62e, 0x207,
+ 0x641, 0x645, 0x207, 0x641, 0x649, 0x207, 0x641, 0x64a,
+ 0x207, 0x642, 0x62d, 0x207, 0x642, 0x645, 0x207, 0x642,
+ 0x649, 0x207, 0x642, 0x64a, 0x207, 0x643, 0x627, 0x207,
+ 0x643, 0x62c, 0x207, 0x643, 0x62d, 0x207, 0x643, 0x62e,
+ 0x207, 0x643, 0x644, 0x207, 0x643, 0x645, 0x207, 0x643,
+ 0x649, 0x207, 0x643, 0x64a, 0x207, 0x644, 0x62c, 0x207,
+ 0x644, 0x62d, 0x207, 0x644, 0x62e, 0x207, 0x644, 0x645,
+ 0x207, 0x644, 0x649, 0x207, 0x644, 0x64a, 0x207, 0x645,
+ 0x62c, 0x207, 0x645, 0x62d, 0x207, 0x645, 0x62e, 0x207,
+ 0x645, 0x645, 0x207, 0x645, 0x649, 0x207, 0x645, 0x64a,
+ 0x207, 0x646, 0x62c, 0x207, 0x646, 0x62d, 0x207, 0x646,
+ 0x62e, 0x207, 0x646, 0x645, 0x207, 0x646, 0x649, 0x207,
+ 0x646, 0x64a, 0x207, 0x647, 0x62c, 0x207, 0x647, 0x645,
+ 0x207, 0x647, 0x649, 0x207, 0x647, 0x64a, 0x207, 0x64a,
+ 0x62c, 0x207, 0x64a, 0x62d, 0x207, 0x64a, 0x62e, 0x207,
+ 0x64a, 0x645, 0x207, 0x64a, 0x649, 0x207, 0x64a, 0x64a,
+ 0x207, 0x630, 0x670, 0x207, 0x631, 0x670, 0x207, 0x649,
+ 0x670, 0x307, 0x20, 0x64c, 0x651, 0x307, 0x20, 0x64d,
+ 0x651, 0x307, 0x20, 0x64e, 0x651, 0x307, 0x20, 0x64f,
+ 0x651, 0x307, 0x20, 0x650, 0x651, 0x307, 0x20, 0x651,
+ 0x670, 0x206, 0x626, 0x631, 0x206, 0x626, 0x632, 0x206,
+ 0x626, 0x645, 0x206, 0x626, 0x646, 0x206, 0x626, 0x649,
+ 0x206, 0x626, 0x64a, 0x206, 0x628, 0x631, 0x206, 0x628,
+ 0x632, 0x206, 0x628, 0x645, 0x206, 0x628, 0x646, 0x206,
+ 0x628, 0x649, 0x206, 0x628, 0x64a, 0x206, 0x62a, 0x631,
+ 0x206, 0x62a, 0x632, 0x206, 0x62a, 0x645, 0x206, 0x62a,
+ 0x646, 0x206, 0x62a, 0x649, 0x206, 0x62a, 0x64a, 0x206,
+ 0x62b, 0x631, 0x206, 0x62b, 0x632, 0x206, 0x62b, 0x645,
+ 0x206, 0x62b, 0x646, 0x206, 0x62b, 0x649, 0x206, 0x62b,
+ 0x64a, 0x206, 0x641, 0x649, 0x206, 0x641, 0x64a, 0x206,
+ 0x642, 0x649, 0x206, 0x642, 0x64a, 0x206, 0x643, 0x627,
+ 0x206, 0x643, 0x644, 0x206, 0x643, 0x645, 0x206, 0x643,
+ 0x649, 0x206, 0x643, 0x64a, 0x206, 0x644, 0x645, 0x206,
+ 0x644, 0x649, 0x206, 0x644, 0x64a, 0x206, 0x645, 0x627,
+ 0x206, 0x645, 0x645, 0x206, 0x646, 0x631, 0x206, 0x646,
+ 0x632, 0x206, 0x646, 0x645, 0x206, 0x646, 0x646, 0x206,
+ 0x646, 0x649, 0x206, 0x646, 0x64a, 0x206, 0x649, 0x670,
+ 0x206, 0x64a, 0x631, 0x206, 0x64a, 0x632, 0x206, 0x64a,
+ 0x645, 0x206, 0x64a, 0x646, 0x206, 0x64a, 0x649, 0x206,
+ 0x64a, 0x64a, 0x204, 0x626, 0x62c, 0x204, 0x626, 0x62d,
+ 0x204, 0x626, 0x62e, 0x204, 0x626, 0x645, 0x204, 0x626,
+ 0x647, 0x204, 0x628, 0x62c, 0x204, 0x628, 0x62d, 0x204,
+ 0x628, 0x62e, 0x204, 0x628, 0x645, 0x204, 0x628, 0x647,
+ 0x204, 0x62a, 0x62c, 0x204, 0x62a, 0x62d, 0x204, 0x62a,
+ 0x62e, 0x204, 0x62a, 0x645, 0x204, 0x62a, 0x647, 0x204,
+ 0x62b, 0x645, 0x204, 0x62c, 0x62d, 0x204, 0x62c, 0x645,
+ 0x204, 0x62d, 0x62c, 0x204, 0x62d, 0x645, 0x204, 0x62e,
+ 0x62c, 0x204, 0x62e, 0x645, 0x204, 0x633, 0x62c, 0x204,
+ 0x633, 0x62d, 0x204, 0x633, 0x62e, 0x204, 0x633, 0x645,
+ 0x204, 0x635, 0x62d, 0x204, 0x635, 0x62e, 0x204, 0x635,
+ 0x645, 0x204, 0x636, 0x62c, 0x204, 0x636, 0x62d, 0x204,
+ 0x636, 0x62e, 0x204, 0x636, 0x645, 0x204, 0x637, 0x62d,
+ 0x204, 0x638, 0x645, 0x204, 0x639, 0x62c, 0x204, 0x639,
+ 0x645, 0x204, 0x63a, 0x62c, 0x204, 0x63a, 0x645, 0x204,
+ 0x641, 0x62c, 0x204, 0x641, 0x62d, 0x204, 0x641, 0x62e,
+ 0x204, 0x641, 0x645, 0x204, 0x642, 0x62d, 0x204, 0x642,
+ 0x645, 0x204, 0x643, 0x62c, 0x204, 0x643, 0x62d, 0x204,
+ 0x643, 0x62e, 0x204, 0x643, 0x644, 0x204, 0x643, 0x645,
+ 0x204, 0x644, 0x62c, 0x204, 0x644, 0x62d, 0x204, 0x644,
+ 0x62e, 0x204, 0x644, 0x645, 0x204, 0x644, 0x647, 0x204,
+ 0x645, 0x62c, 0x204, 0x645, 0x62d, 0x204, 0x645, 0x62e,
+ 0x204, 0x645, 0x645, 0x204, 0x646, 0x62c, 0x204, 0x646,
+ 0x62d, 0x204, 0x646, 0x62e, 0x204, 0x646, 0x645, 0x204,
+ 0x646, 0x647, 0x204, 0x647, 0x62c, 0x204, 0x647, 0x645,
+ 0x204, 0x647, 0x670, 0x204, 0x64a, 0x62c, 0x204, 0x64a,
+ 0x62d, 0x204, 0x64a, 0x62e, 0x204, 0x64a, 0x645, 0x204,
+ 0x64a, 0x647, 0x205, 0x626, 0x645, 0x205, 0x626, 0x647,
+ 0x205, 0x628, 0x645, 0x205, 0x628, 0x647, 0x205, 0x62a,
+ 0x645, 0x205, 0x62a, 0x647, 0x205, 0x62b, 0x645, 0x205,
+ 0x62b, 0x647, 0x205, 0x633, 0x645, 0x205, 0x633, 0x647,
+ 0x205, 0x634, 0x645, 0x205, 0x634, 0x647, 0x205, 0x643,
+ 0x644, 0x205, 0x643, 0x645, 0x205, 0x644, 0x645, 0x205,
+ 0x646, 0x645, 0x205, 0x646, 0x647, 0x205, 0x64a, 0x645,
+ 0x205, 0x64a, 0x647, 0x305, 0x640, 0x64e, 0x651, 0x305,
+ 0x640, 0x64f, 0x651, 0x305, 0x640, 0x650, 0x651, 0x207,
+ 0x637, 0x649, 0x207, 0x637, 0x64a, 0x207, 0x639, 0x649,
+ 0x207, 0x639, 0x64a, 0x207, 0x63a, 0x649, 0x207, 0x63a,
+ 0x64a, 0x207, 0x633, 0x649, 0x207, 0x633, 0x64a, 0x207,
+ 0x634, 0x649, 0x207, 0x634, 0x64a, 0x207, 0x62d, 0x649,
+ 0x207, 0x62d, 0x64a, 0x207, 0x62c, 0x649, 0x207, 0x62c,
+ 0x64a, 0x207, 0x62e, 0x649, 0x207, 0x62e, 0x64a, 0x207,
+ 0x635, 0x649, 0x207, 0x635, 0x64a, 0x207, 0x636, 0x649,
+ 0x207, 0x636, 0x64a, 0x207, 0x634, 0x62c, 0x207, 0x634,
+ 0x62d, 0x207, 0x634, 0x62e, 0x207, 0x634, 0x645, 0x207,
+ 0x634, 0x631, 0x207, 0x633, 0x631, 0x207, 0x635, 0x631,
+ 0x207, 0x636, 0x631, 0x206, 0x637, 0x649, 0x206, 0x637,
+ 0x64a, 0x206, 0x639, 0x649, 0x206, 0x639, 0x64a, 0x206,
+ 0x63a, 0x649, 0x206, 0x63a, 0x64a, 0x206, 0x633, 0x649,
+ 0x206, 0x633, 0x64a, 0x206, 0x634, 0x649, 0x206, 0x634,
+ 0x64a, 0x206, 0x62d, 0x649, 0x206, 0x62d, 0x64a, 0x206,
+ 0x62c, 0x649, 0x206, 0x62c, 0x64a, 0x206, 0x62e, 0x649,
+ 0x206, 0x62e, 0x64a, 0x206, 0x635, 0x649, 0x206, 0x635,
+ 0x64a, 0x206, 0x636, 0x649, 0x206, 0x636, 0x64a, 0x206,
+ 0x634, 0x62c, 0x206, 0x634, 0x62d, 0x206, 0x634, 0x62e,
+ 0x206, 0x634, 0x645, 0x206, 0x634, 0x631, 0x206, 0x633,
+ 0x631, 0x206, 0x635, 0x631, 0x206, 0x636, 0x631, 0x204,
+ 0x634, 0x62c, 0x204, 0x634, 0x62d, 0x204, 0x634, 0x62e,
+ 0x204, 0x634, 0x645, 0x204, 0x633, 0x647, 0x204, 0x634,
+ 0x647, 0x204, 0x637, 0x645, 0x205, 0x633, 0x62c, 0x205,
+ 0x633, 0x62d, 0x205, 0x633, 0x62e, 0x205, 0x634, 0x62c,
+ 0x205, 0x634, 0x62d, 0x205, 0x634, 0x62e, 0x205, 0x637,
+ 0x645, 0x205, 0x638, 0x645, 0x206, 0x627, 0x64b, 0x207,
+ 0x627, 0x64b, 0x304, 0x62a, 0x62c, 0x645, 0x306, 0x62a,
+ 0x62d, 0x62c, 0x304, 0x62a, 0x62d, 0x62c, 0x304, 0x62a,
+ 0x62d, 0x645, 0x304, 0x62a, 0x62e, 0x645, 0x304, 0x62a,
+ 0x645, 0x62c, 0x304, 0x62a, 0x645, 0x62d, 0x304, 0x62a,
+ 0x645, 0x62e, 0x306, 0x62c, 0x645, 0x62d, 0x304, 0x62c,
+ 0x645, 0x62d, 0x306, 0x62d, 0x645, 0x64a, 0x306, 0x62d,
+ 0x645, 0x649, 0x304, 0x633, 0x62d, 0x62c, 0x304, 0x633,
+ 0x62c, 0x62d, 0x306, 0x633, 0x62c, 0x649, 0x306, 0x633,
+ 0x645, 0x62d, 0x304, 0x633, 0x645, 0x62d, 0x304, 0x633,
+ 0x645, 0x62c, 0x306, 0x633, 0x645, 0x645, 0x304, 0x633,
+ 0x645, 0x645, 0x306, 0x635, 0x62d, 0x62d, 0x304, 0x635,
+ 0x62d, 0x62d, 0x306, 0x635, 0x645, 0x645, 0x306, 0x634,
+ 0x62d, 0x645, 0x304, 0x634, 0x62d, 0x645, 0x306, 0x634,
+ 0x62c, 0x64a, 0x306, 0x634, 0x645, 0x62e, 0x304, 0x634,
+ 0x645, 0x62e, 0x306, 0x634, 0x645, 0x645, 0x304, 0x634,
+ 0x645, 0x645, 0x306, 0x636, 0x62d, 0x649, 0x306, 0x636,
+ 0x62e, 0x645, 0x304, 0x636, 0x62e, 0x645, 0x306, 0x637,
+ 0x645, 0x62d, 0x304, 0x637, 0x645, 0x62d, 0x304, 0x637,
+ 0x645, 0x645, 0x306, 0x637, 0x645, 0x64a, 0x306, 0x639,
+ 0x62c, 0x645, 0x306, 0x639, 0x645, 0x645, 0x304, 0x639,
+ 0x645, 0x645, 0x306, 0x639, 0x645, 0x649, 0x306, 0x63a,
+ 0x645, 0x645, 0x306, 0x63a, 0x645, 0x64a, 0x306, 0x63a,
+ 0x645, 0x649, 0x306, 0x641, 0x62e, 0x645, 0x304, 0x641,
+ 0x62e, 0x645, 0x306, 0x642, 0x645, 0x62d, 0x306, 0x642,
+ 0x645, 0x645, 0x306, 0x644, 0x62d, 0x645, 0x306, 0x644,
+ 0x62d, 0x64a, 0x306, 0x644, 0x62d, 0x649, 0x304, 0x644,
+ 0x62c, 0x62c, 0x306, 0x644, 0x62c, 0x62c, 0x306, 0x644,
+ 0x62e, 0x645, 0x304, 0x644, 0x62e, 0x645, 0x306, 0x644,
+ 0x645, 0x62d, 0x304, 0x644, 0x645, 0x62d, 0x304, 0x645,
+ 0x62d, 0x62c, 0x304, 0x645, 0x62d, 0x645, 0x306, 0x645,
+ 0x62d, 0x64a, 0x304, 0x645, 0x62c, 0x62d, 0x304, 0x645,
+ 0x62c, 0x645, 0x304, 0x645, 0x62e, 0x62c, 0x304, 0x645,
+ 0x62e, 0x645, 0x304, 0x645, 0x62c, 0x62e, 0x304, 0x647,
+ 0x645, 0x62c, 0x304, 0x647, 0x645, 0x645, 0x304, 0x646,
+ 0x62d, 0x645, 0x306, 0x646, 0x62d, 0x649, 0x306, 0x646,
+ 0x62c, 0x645, 0x304, 0x646, 0x62c, 0x645, 0x306, 0x646,
+ 0x62c, 0x649, 0x306, 0x646, 0x645, 0x64a, 0x306, 0x646,
+ 0x645, 0x649, 0x306, 0x64a, 0x645, 0x645, 0x304, 0x64a,
+ 0x645, 0x645, 0x306, 0x628, 0x62e, 0x64a, 0x306, 0x62a,
+ 0x62c, 0x64a, 0x306, 0x62a, 0x62c, 0x649, 0x306, 0x62a,
+ 0x62e, 0x64a, 0x306, 0x62a, 0x62e, 0x649, 0x306, 0x62a,
+ 0x645, 0x64a, 0x306, 0x62a, 0x645, 0x649, 0x306, 0x62c,
+ 0x645, 0x64a, 0x306, 0x62c, 0x62d, 0x649, 0x306, 0x62c,
+ 0x645, 0x649, 0x306, 0x633, 0x62e, 0x649, 0x306, 0x635,
+ 0x62d, 0x64a, 0x306, 0x634, 0x62d, 0x64a, 0x306, 0x636,
+ 0x62d, 0x64a, 0x306, 0x644, 0x62c, 0x64a, 0x306, 0x644,
+ 0x645, 0x64a, 0x306, 0x64a, 0x62d, 0x64a, 0x306, 0x64a,
+ 0x62c, 0x64a, 0x306, 0x64a, 0x645, 0x64a, 0x306, 0x645,
+ 0x645, 0x64a, 0x306, 0x642, 0x645, 0x64a, 0x306, 0x646,
+ 0x62d, 0x64a, 0x304, 0x642, 0x645, 0x62d, 0x304, 0x644,
+ 0x62d, 0x645, 0x306, 0x639, 0x645, 0x64a, 0x306, 0x643,
+ 0x645, 0x64a, 0x304, 0x646, 0x62c, 0x62d, 0x306, 0x645,
+ 0x62e, 0x64a, 0x304, 0x644, 0x62c, 0x645, 0x306, 0x643,
+ 0x645, 0x645, 0x306, 0x644, 0x62c, 0x645, 0x306, 0x646,
+ 0x62c, 0x62d, 0x306, 0x62c, 0x62d, 0x64a, 0x306, 0x62d,
+ 0x62c, 0x64a, 0x306, 0x645, 0x62c, 0x64a, 0x306, 0x641,
+ 0x645, 0x64a, 0x306, 0x628, 0x62d, 0x64a, 0x304, 0x643,
+ 0x645, 0x645, 0x304, 0x639, 0x62c, 0x645, 0x304, 0x635,
+ 0x645, 0x645, 0x306, 0x633, 0x62e, 0x64a, 0x306, 0x646,
+ 0x62c, 0x64a, 0x307, 0x635, 0x644, 0x6d2, 0x307, 0x642,
+ 0x644, 0x6d2, 0x407, 0x627, 0x644, 0x644, 0x647, 0x407,
+ 0x627, 0x643, 0x628, 0x631, 0x407, 0x645, 0x62d, 0x645,
+ 0x62f, 0x407, 0x635, 0x644, 0x639, 0x645, 0x407, 0x631,
+ 0x633, 0x648, 0x644, 0x407, 0x639, 0x644, 0x64a, 0x647,
+ 0x407, 0x648, 0x633, 0x644, 0x645, 0x307, 0x635, 0x644,
+ 0x649, 0x1207, 0x635, 0x644, 0x649, 0x20, 0x627, 0x644,
+ 0x644, 0x647, 0x20, 0x639, 0x644, 0x64a, 0x647, 0x20,
+ 0x648, 0x633, 0x644, 0x645, 0x807, 0x62c, 0x644, 0x20,
+ 0x62c, 0x644, 0x627, 0x644, 0x647, 0x407, 0x631, 0x6cc,
+ 0x627, 0x644, 0x10b, 0x2c, 0x10b, 0x3001, 0x10b, 0x3002,
+ 0x10b, 0x3a, 0x10b, 0x3b, 0x10b, 0x21, 0x10b, 0x3f,
+ 0x10b, 0x3016, 0x10b, 0x3017, 0x10b, 0x2026, 0x10b, 0x2025,
+ 0x10b, 0x2014, 0x10b, 0x2013, 0x10b, 0x5f, 0x10b, 0x5f,
+ 0x10b, 0x28, 0x10b, 0x29, 0x10b, 0x7b, 0x10b, 0x7d,
+ 0x10b, 0x3014, 0x10b, 0x3015, 0x10b, 0x3010, 0x10b, 0x3011,
+ 0x10b, 0x300a, 0x10b, 0x300b, 0x10b, 0x3008, 0x10b, 0x3009,
+ 0x10b, 0x300c, 0x10b, 0x300d, 0x10b, 0x300e, 0x10b, 0x300f,
+ 0x10b, 0x5b, 0x10b, 0x5d, 0x110, 0x203e, 0x110, 0x203e,
+ 0x110, 0x203e, 0x110, 0x203e, 0x110, 0x5f, 0x110, 0x5f,
+ 0x110, 0x5f, 0x10e, 0x2c, 0x10e, 0x3001, 0x10e, 0x2e,
+ 0x10e, 0x3b, 0x10e, 0x3a, 0x10e, 0x3f, 0x10e, 0x21,
+ 0x10e, 0x2014, 0x10e, 0x28, 0x10e, 0x29, 0x10e, 0x7b,
+ 0x10e, 0x7d, 0x10e, 0x3014, 0x10e, 0x3015, 0x10e, 0x23,
+ 0x10e, 0x26, 0x10e, 0x2a, 0x10e, 0x2b, 0x10e, 0x2d,
+ 0x10e, 0x3c, 0x10e, 0x3e, 0x10e, 0x3d, 0x10e, 0x5c,
+ 0x10e, 0x24, 0x10e, 0x25, 0x10e, 0x40, 0x207, 0x20,
+ 0x64b, 0x205, 0x640, 0x64b, 0x207, 0x20, 0x64c, 0x207,
+ 0x20, 0x64d, 0x207, 0x20, 0x64e, 0x205, 0x640, 0x64e,
+ 0x207, 0x20, 0x64f, 0x205, 0x640, 0x64f, 0x207, 0x20,
+ 0x650, 0x205, 0x640, 0x650, 0x207, 0x20, 0x651, 0x205,
+ 0x640, 0x651, 0x207, 0x20, 0x652, 0x205, 0x640, 0x652,
+ 0x107, 0x621, 0x107, 0x622, 0x106, 0x622, 0x107, 0x623,
+ 0x106, 0x623, 0x107, 0x624, 0x106, 0x624, 0x107, 0x625,
+ 0x106, 0x625, 0x107, 0x626, 0x106, 0x626, 0x104, 0x626,
+ 0x105, 0x626, 0x107, 0x627, 0x106, 0x627, 0x107, 0x628,
+ 0x106, 0x628, 0x104, 0x628, 0x105, 0x628, 0x107, 0x629,
+ 0x106, 0x629, 0x107, 0x62a, 0x106, 0x62a, 0x104, 0x62a,
+ 0x105, 0x62a, 0x107, 0x62b, 0x106, 0x62b, 0x104, 0x62b,
+ 0x105, 0x62b, 0x107, 0x62c, 0x106, 0x62c, 0x104, 0x62c,
+ 0x105, 0x62c, 0x107, 0x62d, 0x106, 0x62d, 0x104, 0x62d,
+ 0x105, 0x62d, 0x107, 0x62e, 0x106, 0x62e, 0x104, 0x62e,
+ 0x105, 0x62e, 0x107, 0x62f, 0x106, 0x62f, 0x107, 0x630,
+ 0x106, 0x630, 0x107, 0x631, 0x106, 0x631, 0x107, 0x632,
+ 0x106, 0x632, 0x107, 0x633, 0x106, 0x633, 0x104, 0x633,
+ 0x105, 0x633, 0x107, 0x634, 0x106, 0x634, 0x104, 0x634,
+ 0x105, 0x634, 0x107, 0x635, 0x106, 0x635, 0x104, 0x635,
+ 0x105, 0x635, 0x107, 0x636, 0x106, 0x636, 0x104, 0x636,
+ 0x105, 0x636, 0x107, 0x637, 0x106, 0x637, 0x104, 0x637,
+ 0x105, 0x637, 0x107, 0x638, 0x106, 0x638, 0x104, 0x638,
+ 0x105, 0x638, 0x107, 0x639, 0x106, 0x639, 0x104, 0x639,
+ 0x105, 0x639, 0x107, 0x63a, 0x106, 0x63a, 0x104, 0x63a,
+ 0x105, 0x63a, 0x107, 0x641, 0x106, 0x641, 0x104, 0x641,
+ 0x105, 0x641, 0x107, 0x642, 0x106, 0x642, 0x104, 0x642,
+ 0x105, 0x642, 0x107, 0x643, 0x106, 0x643, 0x104, 0x643,
+ 0x105, 0x643, 0x107, 0x644, 0x106, 0x644, 0x104, 0x644,
+ 0x105, 0x644, 0x107, 0x645, 0x106, 0x645, 0x104, 0x645,
+ 0x105, 0x645, 0x107, 0x646, 0x106, 0x646, 0x104, 0x646,
+ 0x105, 0x646, 0x107, 0x647, 0x106, 0x647, 0x104, 0x647,
+ 0x105, 0x647, 0x107, 0x648, 0x106, 0x648, 0x107, 0x649,
+ 0x106, 0x649, 0x107, 0x64a, 0x106, 0x64a, 0x104, 0x64a,
+ 0x105, 0x64a, 0x207, 0x644, 0x622, 0x206, 0x644, 0x622,
+ 0x207, 0x644, 0x623, 0x206, 0x644, 0x623, 0x207, 0x644,
+ 0x625, 0x206, 0x644, 0x625, 0x207, 0x644, 0x627, 0x206,
+ 0x644, 0x627, 0x10c, 0x21, 0x10c, 0x22, 0x10c, 0x23,
+ 0x10c, 0x24, 0x10c, 0x25, 0x10c, 0x26, 0x10c, 0x27,
+ 0x10c, 0x28, 0x10c, 0x29, 0x10c, 0x2a, 0x10c, 0x2b,
+ 0x10c, 0x2c, 0x10c, 0x2d, 0x10c, 0x2e, 0x10c, 0x2f,
+ 0x10c, 0x30, 0x10c, 0x31, 0x10c, 0x32, 0x10c, 0x33,
+ 0x10c, 0x34, 0x10c, 0x35, 0x10c, 0x36, 0x10c, 0x37,
+ 0x10c, 0x38, 0x10c, 0x39, 0x10c, 0x3a, 0x10c, 0x3b,
+ 0x10c, 0x3c, 0x10c, 0x3d, 0x10c, 0x3e, 0x10c, 0x3f,
+ 0x10c, 0x40, 0x10c, 0x41, 0x10c, 0x42, 0x10c, 0x43,
+ 0x10c, 0x44, 0x10c, 0x45, 0x10c, 0x46, 0x10c, 0x47,
+ 0x10c, 0x48, 0x10c, 0x49, 0x10c, 0x4a, 0x10c, 0x4b,
+ 0x10c, 0x4c, 0x10c, 0x4d, 0x10c, 0x4e, 0x10c, 0x4f,
+ 0x10c, 0x50, 0x10c, 0x51, 0x10c, 0x52, 0x10c, 0x53,
+ 0x10c, 0x54, 0x10c, 0x55, 0x10c, 0x56, 0x10c, 0x57,
+ 0x10c, 0x58, 0x10c, 0x59, 0x10c, 0x5a, 0x10c, 0x5b,
+ 0x10c, 0x5c, 0x10c, 0x5d, 0x10c, 0x5e, 0x10c, 0x5f,
+ 0x10c, 0x60, 0x10c, 0x61, 0x10c, 0x62, 0x10c, 0x63,
+ 0x10c, 0x64, 0x10c, 0x65, 0x10c, 0x66, 0x10c, 0x67,
+ 0x10c, 0x68, 0x10c, 0x69, 0x10c, 0x6a, 0x10c, 0x6b,
+ 0x10c, 0x6c, 0x10c, 0x6d, 0x10c, 0x6e, 0x10c, 0x6f,
+ 0x10c, 0x70, 0x10c, 0x71, 0x10c, 0x72, 0x10c, 0x73,
+ 0x10c, 0x74, 0x10c, 0x75, 0x10c, 0x76, 0x10c, 0x77,
+ 0x10c, 0x78, 0x10c, 0x79, 0x10c, 0x7a, 0x10c, 0x7b,
+ 0x10c, 0x7c, 0x10c, 0x7d, 0x10c, 0x7e, 0x10c, 0x2985,
+ 0x10c, 0x2986, 0x10d, 0x3002, 0x10d, 0x300c, 0x10d, 0x300d,
+ 0x10d, 0x3001, 0x10d, 0x30fb, 0x10d, 0x30f2, 0x10d, 0x30a1,
+ 0x10d, 0x30a3, 0x10d, 0x30a5, 0x10d, 0x30a7, 0x10d, 0x30a9,
+ 0x10d, 0x30e3, 0x10d, 0x30e5, 0x10d, 0x30e7, 0x10d, 0x30c3,
+ 0x10d, 0x30fc, 0x10d, 0x30a2, 0x10d, 0x30a4, 0x10d, 0x30a6,
+ 0x10d, 0x30a8, 0x10d, 0x30aa, 0x10d, 0x30ab, 0x10d, 0x30ad,
+ 0x10d, 0x30af, 0x10d, 0x30b1, 0x10d, 0x30b3, 0x10d, 0x30b5,
+ 0x10d, 0x30b7, 0x10d, 0x30b9, 0x10d, 0x30bb, 0x10d, 0x30bd,
+ 0x10d, 0x30bf, 0x10d, 0x30c1, 0x10d, 0x30c4, 0x10d, 0x30c6,
+ 0x10d, 0x30c8, 0x10d, 0x30ca, 0x10d, 0x30cb, 0x10d, 0x30cc,
+ 0x10d, 0x30cd, 0x10d, 0x30ce, 0x10d, 0x30cf, 0x10d, 0x30d2,
+ 0x10d, 0x30d5, 0x10d, 0x30d8, 0x10d, 0x30db, 0x10d, 0x30de,
+ 0x10d, 0x30df, 0x10d, 0x30e0, 0x10d, 0x30e1, 0x10d, 0x30e2,
+ 0x10d, 0x30e4, 0x10d, 0x30e6, 0x10d, 0x30e8, 0x10d, 0x30e9,
+ 0x10d, 0x30ea, 0x10d, 0x30eb, 0x10d, 0x30ec, 0x10d, 0x30ed,
+ 0x10d, 0x30ef, 0x10d, 0x30f3, 0x10d, 0x3099, 0x10d, 0x309a,
+ 0x10d, 0x3164, 0x10d, 0x3131, 0x10d, 0x3132, 0x10d, 0x3133,
+ 0x10d, 0x3134, 0x10d, 0x3135, 0x10d, 0x3136, 0x10d, 0x3137,
+ 0x10d, 0x3138, 0x10d, 0x3139, 0x10d, 0x313a, 0x10d, 0x313b,
+ 0x10d, 0x313c, 0x10d, 0x313d, 0x10d, 0x313e, 0x10d, 0x313f,
+ 0x10d, 0x3140, 0x10d, 0x3141, 0x10d, 0x3142, 0x10d, 0x3143,
+ 0x10d, 0x3144, 0x10d, 0x3145, 0x10d, 0x3146, 0x10d, 0x3147,
+ 0x10d, 0x3148, 0x10d, 0x3149, 0x10d, 0x314a, 0x10d, 0x314b,
+ 0x10d, 0x314c, 0x10d, 0x314d, 0x10d, 0x314e, 0x10d, 0x314f,
+ 0x10d, 0x3150, 0x10d, 0x3151, 0x10d, 0x3152, 0x10d, 0x3153,
+ 0x10d, 0x3154, 0x10d, 0x3155, 0x10d, 0x3156, 0x10d, 0x3157,
+ 0x10d, 0x3158, 0x10d, 0x3159, 0x10d, 0x315a, 0x10d, 0x315b,
+ 0x10d, 0x315c, 0x10d, 0x315d, 0x10d, 0x315e, 0x10d, 0x315f,
+ 0x10d, 0x3160, 0x10d, 0x3161, 0x10d, 0x3162, 0x10d, 0x3163,
+ 0x10c, 0xa2, 0x10c, 0xa3, 0x10c, 0xac, 0x10c, 0xaf,
+ 0x10c, 0xa6, 0x10c, 0xa5, 0x10c, 0x20a9, 0x10d, 0x2502,
+ 0x10d, 0x2190, 0x10d, 0x2191, 0x10d, 0x2192, 0x10d, 0x2193,
+ 0x10d, 0x25a0, 0x10d, 0x25cb, 0x401, 0xd834, 0xdd57, 0xd834,
+ 0xdd65, 0x401, 0xd834, 0xdd58, 0xd834, 0xdd65, 0x401, 0xd834,
+ 0xdd5f, 0xd834, 0xdd6e, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd6f,
+ 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd70, 0x401, 0xd834, 0xdd5f,
+ 0xd834, 0xdd71, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd72, 0x401,
+ 0xd834, 0xddb9, 0xd834, 0xdd65, 0x401, 0xd834, 0xddba, 0xd834,
+ 0xdd65, 0x401, 0xd834, 0xddbb, 0xd834, 0xdd6e, 0x401, 0xd834,
+ 0xddbc, 0xd834, 0xdd6e, 0x401, 0xd834, 0xddbb, 0xd834, 0xdd6f,
+ 0x401, 0xd834, 0xddbc, 0xd834, 0xdd6f, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
+ 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
+ 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
+ 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
+ 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
+ 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
+ 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
+ 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
+ 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
+ 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
+ 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
+ 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
+ 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
+ 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
+ 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
+ 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
+ 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
+ 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x43, 0x102,
+ 0x44, 0x102, 0x47, 0x102, 0x4a, 0x102, 0x4b, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
+ 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
+ 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
+ 0x66, 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102,
+ 0x6b, 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
+ 0x47, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102,
+ 0x4d, 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102,
+ 0x51, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
+ 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
+ 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
+ 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
+ 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
+ 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
+ 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
+ 0x44, 0x102, 0x45, 0x102, 0x46, 0x102, 0x47, 0x102,
+ 0x49, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102,
+ 0x4d, 0x102, 0x4f, 0x102, 0x53, 0x102, 0x54, 0x102,
+ 0x55, 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102,
+ 0x59, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102,
+ 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102,
+ 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102,
+ 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
+ 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
+ 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
+ 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
+ 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102,
+ 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102,
+ 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
+ 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102,
+ 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102,
+ 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102,
+ 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x131, 0x102,
+ 0x237, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393, 0x102,
+ 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397, 0x102,
+ 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102,
+ 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102,
+ 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102,
+ 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102,
+ 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102,
+ 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102,
+ 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102,
+ 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102,
+ 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102,
+ 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102,
+ 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102,
+ 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102,
+ 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x391, 0x102,
+ 0x392, 0x102, 0x393, 0x102, 0x394, 0x102, 0x395, 0x102,
+ 0x396, 0x102, 0x397, 0x102, 0x398, 0x102, 0x399, 0x102,
+ 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102, 0x39d, 0x102,
+ 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102, 0x3a1, 0x102,
+ 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5, 0x102,
+ 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9, 0x102,
+ 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3, 0x102,
+ 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7, 0x102,
+ 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb, 0x102,
+ 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102, 0x3bf, 0x102,
+ 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3, 0x102,
+ 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7, 0x102,
+ 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102, 0x3f5, 0x102,
+ 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1, 0x102,
+ 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393, 0x102,
+ 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397, 0x102,
+ 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102,
+ 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102,
+ 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102,
+ 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102,
+ 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102,
+ 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102,
+ 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102,
+ 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102,
+ 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102,
+ 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102,
+ 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102,
+ 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102,
+ 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x391, 0x102,
+ 0x392, 0x102, 0x393, 0x102, 0x394, 0x102, 0x395, 0x102,
+ 0x396, 0x102, 0x397, 0x102, 0x398, 0x102, 0x399, 0x102,
+ 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102, 0x39d, 0x102,
+ 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102, 0x3a1, 0x102,
+ 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5, 0x102,
+ 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9, 0x102,
+ 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3, 0x102,
+ 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7, 0x102,
+ 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb, 0x102,
+ 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102, 0x3bf, 0x102,
+ 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3, 0x102,
+ 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7, 0x102,
+ 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102, 0x3f5, 0x102,
+ 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1, 0x102,
+ 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393, 0x102,
+ 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397, 0x102,
+ 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102,
+ 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102,
+ 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102,
+ 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102,
+ 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102,
+ 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102,
+ 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102,
+ 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102,
+ 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102,
+ 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102,
+ 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102,
+ 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102,
+ 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x3dc, 0x102,
+ 0x3dd, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32, 0x102,
+ 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36, 0x102,
+ 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x30, 0x102,
+ 0x31, 0x102, 0x32, 0x102, 0x33, 0x102, 0x34, 0x102,
+ 0x35, 0x102, 0x36, 0x102, 0x37, 0x102, 0x38, 0x102,
+ 0x39, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32, 0x102,
+ 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36, 0x102,
+ 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x30, 0x102,
+ 0x31, 0x102, 0x32, 0x102, 0x33, 0x102, 0x34, 0x102,
+ 0x35, 0x102, 0x36, 0x102, 0x37, 0x102, 0x38, 0x102,
+ 0x39, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32, 0x102,
+ 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36, 0x102,
+ 0x37, 0x102, 0x38, 0x102, 0x39, 0x101, 0x4e3d, 0x101,
+ 0x4e38, 0x101, 0x4e41, 0x201, 0xd840, 0xdd22, 0x101, 0x4f60,
+ 0x101, 0x4fae, 0x101, 0x4fbb, 0x101, 0x5002, 0x101, 0x507a,
+ 0x101, 0x5099, 0x101, 0x50e7, 0x101, 0x50cf, 0x101, 0x349e,
+ 0x201, 0xd841, 0xde3a, 0x101, 0x514d, 0x101, 0x5154, 0x101,
+ 0x5164, 0x101, 0x5177, 0x201, 0xd841, 0xdd1c, 0x101, 0x34b9,
+ 0x101, 0x5167, 0x101, 0x518d, 0x201, 0xd841, 0xdd4b, 0x101,
+ 0x5197, 0x101, 0x51a4, 0x101, 0x4ecc, 0x101, 0x51ac, 0x101,
+ 0x51b5, 0x201, 0xd864, 0xdddf, 0x101, 0x51f5, 0x101, 0x5203,
+ 0x101, 0x34df, 0x101, 0x523b, 0x101, 0x5246, 0x101, 0x5272,
+ 0x101, 0x5277, 0x101, 0x3515, 0x101, 0x52c7, 0x101, 0x52c9,
+ 0x101, 0x52e4, 0x101, 0x52fa, 0x101, 0x5305, 0x101, 0x5306,
+ 0x101, 0x5317, 0x101, 0x5349, 0x101, 0x5351, 0x101, 0x535a,
+ 0x101, 0x5373, 0x101, 0x537d, 0x101, 0x537f, 0x101, 0x537f,
+ 0x101, 0x537f, 0x201, 0xd842, 0xde2c, 0x101, 0x7070, 0x101,
+ 0x53ca, 0x101, 0x53df, 0x201, 0xd842, 0xdf63, 0x101, 0x53eb,
+ 0x101, 0x53f1, 0x101, 0x5406, 0x101, 0x549e, 0x101, 0x5438,
+ 0x101, 0x5448, 0x101, 0x5468, 0x101, 0x54a2, 0x101, 0x54f6,
+ 0x101, 0x5510, 0x101, 0x5553, 0x101, 0x5563, 0x101, 0x5584,
+ 0x101, 0x5584, 0x101, 0x5599, 0x101, 0x55ab, 0x101, 0x55b3,
+ 0x101, 0x55c2, 0x101, 0x5716, 0x101, 0x5606, 0x101, 0x5717,
+ 0x101, 0x5651, 0x101, 0x5674, 0x101, 0x5207, 0x101, 0x58ee,
+ 0x101, 0x57ce, 0x101, 0x57f4, 0x101, 0x580d, 0x101, 0x578b,
+ 0x101, 0x5832, 0x101, 0x5831, 0x101, 0x58ac, 0x201, 0xd845,
+ 0xdce4, 0x101, 0x58f2, 0x101, 0x58f7, 0x101, 0x5906, 0x101,
+ 0x591a, 0x101, 0x5922, 0x101, 0x5962, 0x201, 0xd845, 0xdea8,
+ 0x201, 0xd845, 0xdeea, 0x101, 0x59ec, 0x101, 0x5a1b, 0x101,
+ 0x5a27, 0x101, 0x59d8, 0x101, 0x5a66, 0x101, 0x36ee, 0x101,
+ 0x36fc, 0x101, 0x5b08, 0x101, 0x5b3e, 0x101, 0x5b3e, 0x201,
+ 0xd846, 0xddc8, 0x101, 0x5bc3, 0x101, 0x5bd8, 0x101, 0x5be7,
+ 0x101, 0x5bf3, 0x201, 0xd846, 0xdf18, 0x101, 0x5bff, 0x101,
+ 0x5c06, 0x101, 0x5f53, 0x101, 0x5c22, 0x101, 0x3781, 0x101,
+ 0x5c60, 0x101, 0x5c6e, 0x101, 0x5cc0, 0x101, 0x5c8d, 0x201,
+ 0xd847, 0xdde4, 0x101, 0x5d43, 0x201, 0xd847, 0xdde6, 0x101,
+ 0x5d6e, 0x101, 0x5d6b, 0x101, 0x5d7c, 0x101, 0x5de1, 0x101,
+ 0x5de2, 0x101, 0x382f, 0x101, 0x5dfd, 0x101, 0x5e28, 0x101,
+ 0x5e3d, 0x101, 0x5e69, 0x101, 0x3862, 0x201, 0xd848, 0xdd83,
+ 0x101, 0x387c, 0x101, 0x5eb0, 0x101, 0x5eb3, 0x101, 0x5eb6,
+ 0x101, 0x5eca, 0x201, 0xd868, 0xdf92, 0x101, 0x5efe, 0x201,
+ 0xd848, 0xdf31, 0x201, 0xd848, 0xdf31, 0x101, 0x8201, 0x101,
+ 0x5f22, 0x101, 0x5f22, 0x101, 0x38c7, 0x201, 0xd84c, 0xdeb8,
+ 0x201, 0xd858, 0xddda, 0x101, 0x5f62, 0x101, 0x5f6b, 0x101,
+ 0x38e3, 0x101, 0x5f9a, 0x101, 0x5fcd, 0x101, 0x5fd7, 0x101,
+ 0x5ff9, 0x101, 0x6081, 0x101, 0x393a, 0x101, 0x391c, 0x101,
+ 0x6094, 0x201, 0xd849, 0xded4, 0x101, 0x60c7, 0x101, 0x6148,
+ 0x101, 0x614c, 0x101, 0x614e, 0x101, 0x614c, 0x101, 0x617a,
+ 0x101, 0x618e, 0x101, 0x61b2, 0x101, 0x61a4, 0x101, 0x61af,
+ 0x101, 0x61de, 0x101, 0x61f2, 0x101, 0x61f6, 0x101, 0x6210,
+ 0x101, 0x621b, 0x101, 0x625d, 0x101, 0x62b1, 0x101, 0x62d4,
+ 0x101, 0x6350, 0x201, 0xd84a, 0xdf0c, 0x101, 0x633d, 0x101,
+ 0x62fc, 0x101, 0x6368, 0x101, 0x6383, 0x101, 0x63e4, 0x201,
+ 0xd84a, 0xdff1, 0x101, 0x6422, 0x101, 0x63c5, 0x101, 0x63a9,
+ 0x101, 0x3a2e, 0x101, 0x6469, 0x101, 0x647e, 0x101, 0x649d,
+ 0x101, 0x6477, 0x101, 0x3a6c, 0x101, 0x654f, 0x101, 0x656c,
+ 0x201, 0xd84c, 0xdc0a, 0x101, 0x65e3, 0x101, 0x66f8, 0x101,
+ 0x6649, 0x101, 0x3b19, 0x101, 0x6691, 0x101, 0x3b08, 0x101,
+ 0x3ae4, 0x101, 0x5192, 0x101, 0x5195, 0x101, 0x6700, 0x101,
+ 0x669c, 0x101, 0x80ad, 0x101, 0x43d9, 0x101, 0x6717, 0x101,
+ 0x671b, 0x101, 0x6721, 0x101, 0x675e, 0x101, 0x6753, 0x201,
+ 0xd84c, 0xdfc3, 0x101, 0x3b49, 0x101, 0x67fa, 0x101, 0x6785,
+ 0x101, 0x6852, 0x101, 0x6885, 0x201, 0xd84d, 0xdc6d, 0x101,
+ 0x688e, 0x101, 0x681f, 0x101, 0x6914, 0x101, 0x3b9d, 0x101,
+ 0x6942, 0x101, 0x69a3, 0x101, 0x69ea, 0x101, 0x6aa8, 0x201,
+ 0xd84d, 0xdea3, 0x101, 0x6adb, 0x101, 0x3c18, 0x101, 0x6b21,
+ 0x201, 0xd84e, 0xdca7, 0x101, 0x6b54, 0x101, 0x3c4e, 0x101,
+ 0x6b72, 0x101, 0x6b9f, 0x101, 0x6bba, 0x101, 0x6bbb, 0x201,
+ 0xd84e, 0xde8d, 0x201, 0xd847, 0xdd0b, 0x201, 0xd84e, 0xdefa,
+ 0x101, 0x6c4e, 0x201, 0xd84f, 0xdcbc, 0x101, 0x6cbf, 0x101,
+ 0x6ccd, 0x101, 0x6c67, 0x101, 0x6d16, 0x101, 0x6d3e, 0x101,
+ 0x6d77, 0x101, 0x6d41, 0x101, 0x6d69, 0x101, 0x6d78, 0x101,
+ 0x6d85, 0x201, 0xd84f, 0xdd1e, 0x101, 0x6d34, 0x101, 0x6e2f,
+ 0x101, 0x6e6e, 0x101, 0x3d33, 0x101, 0x6ecb, 0x101, 0x6ec7,
+ 0x201, 0xd84f, 0xded1, 0x101, 0x6df9, 0x101, 0x6f6e, 0x201,
+ 0xd84f, 0xdf5e, 0x201, 0xd84f, 0xdf8e, 0x101, 0x6fc6, 0x101,
+ 0x7039, 0x101, 0x701e, 0x101, 0x701b, 0x101, 0x3d96, 0x101,
+ 0x704a, 0x101, 0x707d, 0x101, 0x7077, 0x101, 0x70ad, 0x201,
+ 0xd841, 0xdd25, 0x101, 0x7145, 0x201, 0xd850, 0xde63, 0x101,
+ 0x719c, 0x201, 0xd850, 0xdfab, 0x101, 0x7228, 0x101, 0x7235,
+ 0x101, 0x7250, 0x201, 0xd851, 0xde08, 0x101, 0x7280, 0x101,
+ 0x7295, 0x201, 0xd851, 0xdf35, 0x201, 0xd852, 0xdc14, 0x101,
+ 0x737a, 0x101, 0x738b, 0x101, 0x3eac, 0x101, 0x73a5, 0x101,
+ 0x3eb8, 0x101, 0x3eb8, 0x101, 0x7447, 0x101, 0x745c, 0x101,
+ 0x7471, 0x101, 0x7485, 0x101, 0x74ca, 0x101, 0x3f1b, 0x101,
+ 0x7524, 0x201, 0xd853, 0xdc36, 0x101, 0x753e, 0x201, 0xd853,
+ 0xdc92, 0x101, 0x7570, 0x201, 0xd848, 0xdd9f, 0x101, 0x7610,
+ 0x201, 0xd853, 0xdfa1, 0x201, 0xd853, 0xdfb8, 0x201, 0xd854,
+ 0xdc44, 0x101, 0x3ffc, 0x101, 0x4008, 0x101, 0x76f4, 0x201,
+ 0xd854, 0xdcf3, 0x201, 0xd854, 0xdcf2, 0x201, 0xd854, 0xdd19,
+ 0x201, 0xd854, 0xdd33, 0x101, 0x771e, 0x101, 0x771f, 0x101,
+ 0x771f, 0x101, 0x774a, 0x101, 0x4039, 0x101, 0x778b, 0x101,
+ 0x4046, 0x101, 0x4096, 0x201, 0xd855, 0xdc1d, 0x101, 0x784e,
+ 0x101, 0x788c, 0x101, 0x78cc, 0x101, 0x40e3, 0x201, 0xd855,
+ 0xde26, 0x101, 0x7956, 0x201, 0xd855, 0xde9a, 0x201, 0xd855,
+ 0xdec5, 0x101, 0x798f, 0x101, 0x79eb, 0x101, 0x412f, 0x101,
+ 0x7a40, 0x101, 0x7a4a, 0x101, 0x7a4f, 0x201, 0xd856, 0xdd7c,
+ 0x201, 0xd856, 0xdea7, 0x201, 0xd856, 0xdea7, 0x101, 0x7aee,
+ 0x101, 0x4202, 0x201, 0xd856, 0xdfab, 0x101, 0x7bc6, 0x101,
+ 0x7bc9, 0x101, 0x4227, 0x201, 0xd857, 0xdc80, 0x101, 0x7cd2,
+ 0x101, 0x42a0, 0x101, 0x7ce8, 0x101, 0x7ce3, 0x101, 0x7d00,
+ 0x201, 0xd857, 0xdf86, 0x101, 0x7d63, 0x101, 0x4301, 0x101,
+ 0x7dc7, 0x101, 0x7e02, 0x101, 0x7e45, 0x101, 0x4334, 0x201,
+ 0xd858, 0xde28, 0x201, 0xd858, 0xde47, 0x101, 0x4359, 0x201,
+ 0xd858, 0xded9, 0x101, 0x7f7a, 0x201, 0xd858, 0xdf3e, 0x101,
+ 0x7f95, 0x101, 0x7ffa, 0x101, 0x8005, 0x201, 0xd859, 0xdcda,
+ 0x201, 0xd859, 0xdd23, 0x101, 0x8060, 0x201, 0xd859, 0xdda8,
+ 0x101, 0x8070, 0x201, 0xd84c, 0xdf5f, 0x101, 0x43d5, 0x101,
+ 0x80b2, 0x101, 0x8103, 0x101, 0x440b, 0x101, 0x813e, 0x101,
+ 0x5ab5, 0x201, 0xd859, 0xdfa7, 0x201, 0xd859, 0xdfb5, 0x201,
+ 0xd84c, 0xdf93, 0x201, 0xd84c, 0xdf9c, 0x101, 0x8201, 0x101,
+ 0x8204, 0x101, 0x8f9e, 0x101, 0x446b, 0x101, 0x8291, 0x101,
+ 0x828b, 0x101, 0x829d, 0x101, 0x52b3, 0x101, 0x82b1, 0x101,
+ 0x82b3, 0x101, 0x82bd, 0x101, 0x82e6, 0x201, 0xd85a, 0xdf3c,
+ 0x101, 0x82e5, 0x101, 0x831d, 0x101, 0x8363, 0x101, 0x83ad,
+ 0x101, 0x8323, 0x101, 0x83bd, 0x101, 0x83e7, 0x101, 0x8457,
+ 0x101, 0x8353, 0x101, 0x83ca, 0x101, 0x83cc, 0x101, 0x83dc,
+ 0x201, 0xd85b, 0xdc36, 0x201, 0xd85b, 0xdd6b, 0x201, 0xd85b,
+ 0xdcd5, 0x101, 0x452b, 0x101, 0x84f1, 0x101, 0x84f3, 0x101,
+ 0x8516, 0x201, 0xd85c, 0xdfca, 0x101, 0x8564, 0x201, 0xd85b,
+ 0xdf2c, 0x101, 0x455d, 0x101, 0x4561, 0x201, 0xd85b, 0xdfb1,
+ 0x201, 0xd85c, 0xdcd2, 0x101, 0x456b, 0x101, 0x8650, 0x101,
+ 0x865c, 0x101, 0x8667, 0x101, 0x8669, 0x101, 0x86a9, 0x101,
+ 0x8688, 0x101, 0x870e, 0x101, 0x86e2, 0x101, 0x8779, 0x101,
+ 0x8728, 0x101, 0x876b, 0x101, 0x8786, 0x101, 0x45d7, 0x101,
+ 0x87e1, 0x101, 0x8801, 0x101, 0x45f9, 0x101, 0x8860, 0x101,
+ 0x8863, 0x201, 0xd85d, 0xde67, 0x101, 0x88d7, 0x101, 0x88de,
+ 0x101, 0x4635, 0x101, 0x88fa, 0x101, 0x34bb, 0x201, 0xd85e,
+ 0xdcae, 0x201, 0xd85e, 0xdd66, 0x101, 0x46be, 0x101, 0x46c7,
+ 0x101, 0x8aa0, 0x101, 0x8aed, 0x101, 0x8b8a, 0x101, 0x8c55,
+ 0x201, 0xd85f, 0xdca8, 0x101, 0x8cab, 0x101, 0x8cc1, 0x101,
+ 0x8d1b, 0x101, 0x8d77, 0x201, 0xd85f, 0xdf2f, 0x201, 0xd842,
+ 0xdc04, 0x101, 0x8dcb, 0x101, 0x8dbc, 0x101, 0x8df0, 0x201,
+ 0xd842, 0xdcde, 0x101, 0x8ed4, 0x101, 0x8f38, 0x201, 0xd861,
+ 0xddd2, 0x201, 0xd861, 0xdded, 0x101, 0x9094, 0x101, 0x90f1,
+ 0x101, 0x9111, 0x201, 0xd861, 0xdf2e, 0x101, 0x911b, 0x101,
+ 0x9238, 0x101, 0x92d7, 0x101, 0x92d8, 0x101, 0x927c, 0x101,
+ 0x93f9, 0x101, 0x9415, 0x201, 0xd862, 0xdffa, 0x101, 0x958b,
+ 0x101, 0x4995, 0x101, 0x95b7, 0x201, 0xd863, 0xdd77, 0x101,
+ 0x49e6, 0x101, 0x96c3, 0x101, 0x5db2, 0x101, 0x9723, 0x201,
+ 0xd864, 0xdd45, 0x201, 0xd864, 0xde1a, 0x101, 0x4a6e, 0x101,
+ 0x4a76, 0x101, 0x97e0, 0x201, 0xd865, 0xdc0a, 0x101, 0x4ab2,
+ 0x201, 0xd865, 0xdc96, 0x101, 0x980b, 0x101, 0x980b, 0x101,
+ 0x9829, 0x201, 0xd865, 0xddb6, 0x101, 0x98e2, 0x101, 0x4b33,
+ 0x101, 0x9929, 0x101, 0x99a7, 0x101, 0x99c2, 0x101, 0x99fe,
+ 0x101, 0x4bce, 0x201, 0xd866, 0xdf30, 0x101, 0x9b12, 0x101,
+ 0x9c40, 0x101, 0x9cfd, 0x101, 0x4cce, 0x101, 0x4ced, 0x101,
+ 0x9d67, 0x201, 0xd868, 0xdcce, 0x101, 0x4cf8, 0x201, 0xd868,
+ 0xdd05, 0x201, 0xd868, 0xde0e, 0x201, 0xd868, 0xde91, 0x101,
+ 0x9ebb, 0x101, 0x4d56, 0x101, 0x9ef9, 0x101, 0x9efe, 0x101,
+ 0x9f05, 0x101, 0x9f0f, 0x101, 0x9f16, 0x101, 0x9f3b, 0x201,
+ 0xd869, 0xde00,
};
static const unsigned short uc_ligature_trie[] = {
// 0 - 0x3100
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 424, 456, 488, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 520, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 552, 392, 392, 392, 584, 616, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 648, 680, 392, 392, 712, 744, 392,
- 392, 392, 776, 392, 392, 392, 808, 392,
- 392, 840, 872, 392, 392, 392, 904, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
-
- 392, 936, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 968, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
-
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
-
- 392, 392, 392, 392, 1000, 392, 392, 392,
-
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0x0, 0xa9, 0x194, 0x1d5, 0x20e, 0xffff, 0x267, 0x2a8,
- 0x305, 0x372, 0x3a3, 0x3b0, 0x3bd, 0xffff, 0xffff, 0x408,
- 0xffff, 0x425, 0xffff, 0x43e, 0x45b, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x47c, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0x485, 0x4da, 0x4df, 0x4e4, 0x4ed,
- 0x51a, 0xffff, 0xffff, 0xffff, 0xffff, 0x52f, 0x548, 0xffff,
- 0x54d, 0x55a, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x57d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0x5d6, 0xffff, 0xffff, 0x611, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x690, 0x693, 0x6a0, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x6a3, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6aa, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6ad,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6b0, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6b3, 0x6b6,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6b9, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6be,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6c3, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0x6c6, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6c9, 0x6d0, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6d3, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6d8,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x6db, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e0,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e3,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e6, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e9, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x700, 0x761, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 424, 456, 488, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 520, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 552, 392, 392, 392, 584, 616, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 648, 680, 392, 392, 712, 744, 392,
+ 392, 392, 776, 392, 392, 392, 808, 392,
+ 392, 840, 872, 392, 392, 392, 904, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+
+ 392, 936, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 968, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+ 392, 392, 392, 392, 392, 392, 392, 392,
+
+ 392, 392, 392, 392, 1000, 392, 392, 392,
+
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0x0, 0xa9, 0x194, 0x1d5, 0x20e, 0xffff, 0x267, 0x2a8,
+ 0x305, 0x372, 0x3a3, 0x3b0, 0x3bd, 0xffff, 0xffff, 0x408,
+ 0xffff, 0x425, 0xffff, 0x43e, 0x45b, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x47c, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0x485, 0x4da, 0x4df, 0x4e4, 0x4ed,
+ 0x51a, 0xffff, 0xffff, 0xffff, 0xffff, 0x52f, 0x548, 0xffff,
+ 0x54d, 0x55a, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x57d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0x5d6, 0xffff, 0xffff, 0x611, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x690, 0x693, 0x6a0, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x6a3, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6aa, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6ad,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6b0, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6b3, 0x6b6,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6b9, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6be,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6c3, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0x6c6, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6c9, 0x6d0, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6d3, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6d8,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x6db, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e0,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e3,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e6, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x6e9, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x700, 0x761, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
};
#define GET_LIGATURE_INDEX(u2) (u2 < 0x3100 ? uc_ligature_trie[uc_ligature_trie[u2>>5] + (u2 & 0x1f)] : 0xffff);
static const unsigned short uc_ligature_map [] = {
- 0x54, 0x41, 0xc0, 0x45, 0xc8, 0x49, 0xcc, 0x4e,
- 0x1f8, 0x4f, 0xd2, 0x55, 0xd9, 0x57, 0x1e80, 0x59,
- 0x1ef2, 0x61, 0xe0, 0x65, 0xe8, 0x69, 0xec, 0x6e,
- 0x1f9, 0x6f, 0xf2, 0x75, 0xf9, 0x77, 0x1e81, 0x79,
- 0x1ef3, 0xa8, 0x1fed, 0xc2, 0x1ea6, 0xca, 0x1ec0, 0xd4,
- 0x1ed2, 0xdc, 0x1db, 0xe2, 0x1ea7, 0xea, 0x1ec1, 0xf4,
- 0x1ed3, 0xfc, 0x1dc, 0x102, 0x1eb0, 0x103, 0x1eb1, 0x112,
- 0x1e14, 0x113, 0x1e15, 0x14c, 0x1e50, 0x14d, 0x1e51, 0x1a0,
- 0x1edc, 0x1a1, 0x1edd, 0x1af, 0x1eea, 0x1b0, 0x1eeb, 0x391,
- 0x1fba, 0x395, 0x1fc8, 0x397, 0x1fca, 0x399, 0x1fda, 0x39f,
- 0x1ff8, 0x3a5, 0x1fea, 0x3a9, 0x1ffa, 0x3b1, 0x1f70, 0x3b5,
- 0x1f72, 0x3b7, 0x1f74, 0x3b9, 0x1f76, 0x3bf, 0x1f78, 0x3c5,
- 0x1f7a, 0x3c9, 0x1f7c, 0x3ca, 0x1fd2, 0x3cb, 0x1fe2, 0x415,
- 0x400, 0x418, 0x40d, 0x435, 0x450, 0x438, 0x45d, 0x1f00,
- 0x1f02, 0x1f01, 0x1f03, 0x1f08, 0x1f0a, 0x1f09, 0x1f0b, 0x1f10,
- 0x1f12, 0x1f11, 0x1f13, 0x1f18, 0x1f1a, 0x1f19, 0x1f1b, 0x1f20,
- 0x1f22, 0x1f21, 0x1f23, 0x1f28, 0x1f2a, 0x1f29, 0x1f2b, 0x1f30,
- 0x1f32, 0x1f31, 0x1f33, 0x1f38, 0x1f3a, 0x1f39, 0x1f3b, 0x1f40,
- 0x1f42, 0x1f41, 0x1f43, 0x1f48, 0x1f4a, 0x1f49, 0x1f4b, 0x1f50,
- 0x1f52, 0x1f51, 0x1f53, 0x1f59, 0x1f5b, 0x1f60, 0x1f62, 0x1f61,
- 0x1f63, 0x1f68, 0x1f6a, 0x1f69, 0x1f6b, 0x1fbf, 0x1fcd, 0x1ffe,
- 0x1fdd, 0x75, 0x41, 0xc1, 0x43, 0x106, 0x45, 0xc9,
- 0x47, 0x1f4, 0x49, 0xcd, 0x4b, 0x1e30, 0x4c, 0x139,
- 0x4d, 0x1e3e, 0x4e, 0x143, 0x4f, 0xd3, 0x50, 0x1e54,
- 0x52, 0x154, 0x53, 0x15a, 0x55, 0xda, 0x57, 0x1e82,
- 0x59, 0xdd, 0x5a, 0x179, 0x61, 0xe1, 0x63, 0x107,
- 0x65, 0xe9, 0x67, 0x1f5, 0x69, 0xed, 0x6b, 0x1e31,
- 0x6c, 0x13a, 0x6d, 0x1e3f, 0x6e, 0x144, 0x6f, 0xf3,
- 0x70, 0x1e55, 0x72, 0x155, 0x73, 0x15b, 0x75, 0xfa,
- 0x77, 0x1e83, 0x79, 0xfd, 0x7a, 0x17a, 0xa8, 0x385,
- 0xc2, 0x1ea4, 0xc5, 0x1fa, 0xc6, 0x1fc, 0xc7, 0x1e08,
- 0xca, 0x1ebe, 0xcf, 0x1e2e, 0xd4, 0x1ed0, 0xd5, 0x1e4c,
- 0xd8, 0x1fe, 0xdc, 0x1d7, 0xe2, 0x1ea5, 0xe5, 0x1fb,
- 0xe6, 0x1fd, 0xe7, 0x1e09, 0xea, 0x1ebf, 0xef, 0x1e2f,
- 0xf4, 0x1ed1, 0xf5, 0x1e4d, 0xf8, 0x1ff, 0xfc, 0x1d8,
- 0x102, 0x1eae, 0x103, 0x1eaf, 0x112, 0x1e16, 0x113, 0x1e17,
- 0x14c, 0x1e52, 0x14d, 0x1e53, 0x168, 0x1e78, 0x169, 0x1e79,
- 0x1a0, 0x1eda, 0x1a1, 0x1edb, 0x1af, 0x1ee8, 0x1b0, 0x1ee9,
- 0x391, 0x386, 0x395, 0x388, 0x397, 0x389, 0x399, 0x38a,
- 0x39f, 0x38c, 0x3a5, 0x38e, 0x3a9, 0x38f, 0x3b1, 0x3ac,
- 0x3b5, 0x3ad, 0x3b7, 0x3ae, 0x3b9, 0x3af, 0x3bf, 0x3cc,
- 0x3c5, 0x3cd, 0x3c9, 0x3ce, 0x3ca, 0x390, 0x3cb, 0x3b0,
- 0x3d2, 0x3d3, 0x413, 0x403, 0x41a, 0x40c, 0x433, 0x453,
- 0x43a, 0x45c, 0x1f00, 0x1f04, 0x1f01, 0x1f05, 0x1f08, 0x1f0c,
- 0x1f09, 0x1f0d, 0x1f10, 0x1f14, 0x1f11, 0x1f15, 0x1f18, 0x1f1c,
- 0x1f19, 0x1f1d, 0x1f20, 0x1f24, 0x1f21, 0x1f25, 0x1f28, 0x1f2c,
- 0x1f29, 0x1f2d, 0x1f30, 0x1f34, 0x1f31, 0x1f35, 0x1f38, 0x1f3c,
- 0x1f39, 0x1f3d, 0x1f40, 0x1f44, 0x1f41, 0x1f45, 0x1f48, 0x1f4c,
- 0x1f49, 0x1f4d, 0x1f50, 0x1f54, 0x1f51, 0x1f55, 0x1f59, 0x1f5d,
- 0x1f60, 0x1f64, 0x1f61, 0x1f65, 0x1f68, 0x1f6c, 0x1f69, 0x1f6d,
- 0x1fbf, 0x1fce, 0x1ffe, 0x1fde, 0x20, 0x41, 0xc2, 0x43,
- 0x108, 0x45, 0xca, 0x47, 0x11c, 0x48, 0x124, 0x49,
- 0xce, 0x4a, 0x134, 0x4f, 0xd4, 0x53, 0x15c, 0x55,
- 0xdb, 0x57, 0x174, 0x59, 0x176, 0x5a, 0x1e90, 0x61,
- 0xe2, 0x63, 0x109, 0x65, 0xea, 0x67, 0x11d, 0x68,
- 0x125, 0x69, 0xee, 0x6a, 0x135, 0x6f, 0xf4, 0x73,
- 0x15d, 0x75, 0xfb, 0x77, 0x175, 0x79, 0x177, 0x7a,
- 0x1e91, 0x1ea0, 0x1eac, 0x1ea1, 0x1ead, 0x1eb8, 0x1ec6, 0x1eb9,
- 0x1ec7, 0x1ecc, 0x1ed8, 0x1ecd, 0x1ed9, 0x1c, 0x41, 0xc3,
- 0x45, 0x1ebc, 0x49, 0x128, 0x4e, 0xd1, 0x4f, 0xd5,
- 0x55, 0x168, 0x56, 0x1e7c, 0x59, 0x1ef8, 0x61, 0xe3,
- 0x65, 0x1ebd, 0x69, 0x129, 0x6e, 0xf1, 0x6f, 0xf5,
- 0x75, 0x169, 0x76, 0x1e7d, 0x79, 0x1ef9, 0xc2, 0x1eaa,
- 0xca, 0x1ec4, 0xd4, 0x1ed6, 0xe2, 0x1eab, 0xea, 0x1ec5,
- 0xf4, 0x1ed7, 0x102, 0x1eb4, 0x103, 0x1eb5, 0x1a0, 0x1ee0,
- 0x1a1, 0x1ee1, 0x1af, 0x1eee, 0x1b0, 0x1eef, 0x2c, 0x41,
- 0x100, 0x45, 0x112, 0x47, 0x1e20, 0x49, 0x12a, 0x4f,
- 0x14c, 0x55, 0x16a, 0x59, 0x232, 0x61, 0x101, 0x65,
- 0x113, 0x67, 0x1e21, 0x69, 0x12b, 0x6f, 0x14d, 0x75,
- 0x16b, 0x79, 0x233, 0xc4, 0x1de, 0xc6, 0x1e2, 0xd5,
- 0x22c, 0xd6, 0x22a, 0xdc, 0x1d5, 0xe4, 0x1df, 0xe6,
- 0x1e3, 0xf5, 0x22d, 0xf6, 0x22b, 0xfc, 0x1d6, 0x1ea,
- 0x1ec, 0x1eb, 0x1ed, 0x226, 0x1e0, 0x227, 0x1e1, 0x22e,
- 0x230, 0x22f, 0x231, 0x391, 0x1fb9, 0x399, 0x1fd9, 0x3a5,
- 0x1fe9, 0x3b1, 0x1fb1, 0x3b9, 0x1fd1, 0x3c5, 0x1fe1, 0x418,
- 0x4e2, 0x423, 0x4ee, 0x438, 0x4e3, 0x443, 0x4ef, 0x1e36,
- 0x1e38, 0x1e37, 0x1e39, 0x1e5a, 0x1e5c, 0x1e5b, 0x1e5d, 0x20,
- 0x41, 0x102, 0x45, 0x114, 0x47, 0x11e, 0x49, 0x12c,
- 0x4f, 0x14e, 0x55, 0x16c, 0x61, 0x103, 0x65, 0x115,
- 0x67, 0x11f, 0x69, 0x12d, 0x6f, 0x14f, 0x75, 0x16d,
- 0x228, 0x1e1c, 0x229, 0x1e1d, 0x391, 0x1fb8, 0x399, 0x1fd8,
- 0x3a5, 0x1fe8, 0x3b1, 0x1fb0, 0x3b9, 0x1fd0, 0x3c5, 0x1fe0,
- 0x410, 0x4d0, 0x415, 0x4d6, 0x416, 0x4c1, 0x418, 0x419,
- 0x423, 0x40e, 0x430, 0x4d1, 0x435, 0x4d7, 0x436, 0x4c2,
- 0x438, 0x439, 0x443, 0x45e, 0x1ea0, 0x1eb6, 0x1ea1, 0x1eb7,
- 0x2e, 0x41, 0x226, 0x42, 0x1e02, 0x43, 0x10a, 0x44,
- 0x1e0a, 0x45, 0x116, 0x46, 0x1e1e, 0x47, 0x120, 0x48,
- 0x1e22, 0x49, 0x130, 0x4d, 0x1e40, 0x4e, 0x1e44, 0x4f,
- 0x22e, 0x50, 0x1e56, 0x52, 0x1e58, 0x53, 0x1e60, 0x54,
- 0x1e6a, 0x57, 0x1e86, 0x58, 0x1e8a, 0x59, 0x1e8e, 0x5a,
- 0x17b, 0x61, 0x227, 0x62, 0x1e03, 0x63, 0x10b, 0x64,
- 0x1e0b, 0x65, 0x117, 0x66, 0x1e1f, 0x67, 0x121, 0x68,
- 0x1e23, 0x6d, 0x1e41, 0x6e, 0x1e45, 0x6f, 0x22f, 0x70,
- 0x1e57, 0x72, 0x1e59, 0x73, 0x1e61, 0x74, 0x1e6b, 0x77,
- 0x1e87, 0x78, 0x1e8b, 0x79, 0x1e8f, 0x7a, 0x17c, 0x15a,
- 0x1e64, 0x15b, 0x1e65, 0x160, 0x1e66, 0x161, 0x1e67, 0x17f,
- 0x1e9b, 0x1e62, 0x1e68, 0x1e63, 0x1e69, 0x36, 0x41, 0xc4,
- 0x45, 0xcb, 0x48, 0x1e26, 0x49, 0xcf, 0x4f, 0xd6,
- 0x55, 0xdc, 0x57, 0x1e84, 0x58, 0x1e8c, 0x59, 0x178,
- 0x61, 0xe4, 0x65, 0xeb, 0x68, 0x1e27, 0x69, 0xef,
- 0x6f, 0xf6, 0x74, 0x1e97, 0x75, 0xfc, 0x77, 0x1e85,
- 0x78, 0x1e8d, 0x79, 0xff, 0xd5, 0x1e4e, 0xf5, 0x1e4f,
- 0x16a, 0x1e7a, 0x16b, 0x1e7b, 0x399, 0x3aa, 0x3a5, 0x3ab,
- 0x3b9, 0x3ca, 0x3c5, 0x3cb, 0x3d2, 0x3d4, 0x406, 0x407,
- 0x410, 0x4d2, 0x415, 0x401, 0x416, 0x4dc, 0x417, 0x4de,
- 0x418, 0x4e4, 0x41e, 0x4e6, 0x423, 0x4f0, 0x427, 0x4f4,
- 0x42b, 0x4f8, 0x42d, 0x4ec, 0x430, 0x4d3, 0x435, 0x451,
- 0x436, 0x4dd, 0x437, 0x4df, 0x438, 0x4e5, 0x43e, 0x4e7,
- 0x443, 0x4f1, 0x447, 0x4f5, 0x44b, 0x4f9, 0x44d, 0x4ed,
- 0x456, 0x457, 0x4d8, 0x4da, 0x4d9, 0x4db, 0x4e8, 0x4ea,
- 0x4e9, 0x4eb, 0x18, 0x41, 0x1ea2, 0x45, 0x1eba, 0x49,
- 0x1ec8, 0x4f, 0x1ece, 0x55, 0x1ee6, 0x59, 0x1ef6, 0x61,
- 0x1ea3, 0x65, 0x1ebb, 0x69, 0x1ec9, 0x6f, 0x1ecf, 0x75,
- 0x1ee7, 0x79, 0x1ef7, 0xc2, 0x1ea8, 0xca, 0x1ec2, 0xd4,
- 0x1ed4, 0xe2, 0x1ea9, 0xea, 0x1ec3, 0xf4, 0x1ed5, 0x102,
- 0x1eb2, 0x103, 0x1eb3, 0x1a0, 0x1ede, 0x1a1, 0x1edf, 0x1af,
- 0x1eec, 0x1b0, 0x1eed, 0x6, 0x41, 0xc5, 0x55, 0x16e,
- 0x61, 0xe5, 0x75, 0x16f, 0x77, 0x1e98, 0x79, 0x1e99,
- 0x6, 0x4f, 0x150, 0x55, 0x170, 0x6f, 0x151, 0x75,
- 0x171, 0x423, 0x4f2, 0x443, 0x4f3, 0x25, 0x41, 0x1cd,
- 0x43, 0x10c, 0x44, 0x10e, 0x45, 0x11a, 0x47, 0x1e6,
- 0x48, 0x21e, 0x49, 0x1cf, 0x4b, 0x1e8, 0x4c, 0x13d,
- 0x4e, 0x147, 0x4f, 0x1d1, 0x52, 0x158, 0x53, 0x160,
- 0x54, 0x164, 0x55, 0x1d3, 0x5a, 0x17d, 0x61, 0x1ce,
- 0x63, 0x10d, 0x64, 0x10f, 0x65, 0x11b, 0x67, 0x1e7,
- 0x68, 0x21f, 0x69, 0x1d0, 0x6a, 0x1f0, 0x6b, 0x1e9,
- 0x6c, 0x13e, 0x6e, 0x148, 0x6f, 0x1d2, 0x72, 0x159,
- 0x73, 0x161, 0x74, 0x165, 0x75, 0x1d4, 0x7a, 0x17e,
- 0xdc, 0x1d9, 0xfc, 0x1da, 0x1b7, 0x1ee, 0x292, 0x1ef,
- 0xe, 0x41, 0x200, 0x45, 0x204, 0x49, 0x208, 0x4f,
- 0x20c, 0x52, 0x210, 0x55, 0x214, 0x61, 0x201, 0x65,
- 0x205, 0x69, 0x209, 0x6f, 0x20d, 0x72, 0x211, 0x75,
- 0x215, 0x474, 0x476, 0x475, 0x477, 0xc, 0x41, 0x202,
- 0x45, 0x206, 0x49, 0x20a, 0x4f, 0x20e, 0x52, 0x212,
- 0x55, 0x216, 0x61, 0x203, 0x65, 0x207, 0x69, 0x20b,
- 0x6f, 0x20f, 0x72, 0x213, 0x75, 0x217, 0xe, 0x391,
- 0x1f08, 0x395, 0x1f18, 0x397, 0x1f28, 0x399, 0x1f38, 0x39f,
- 0x1f48, 0x3a9, 0x1f68, 0x3b1, 0x1f00, 0x3b5, 0x1f10, 0x3b7,
- 0x1f20, 0x3b9, 0x1f30, 0x3bf, 0x1f40, 0x3c1, 0x1fe4, 0x3c5,
- 0x1f50, 0x3c9, 0x1f60, 0x10, 0x391, 0x1f09, 0x395, 0x1f19,
- 0x397, 0x1f29, 0x399, 0x1f39, 0x39f, 0x1f49, 0x3a1, 0x1fec,
- 0x3a5, 0x1f59, 0x3a9, 0x1f69, 0x3b1, 0x1f01, 0x3b5, 0x1f11,
- 0x3b7, 0x1f21, 0x3b9, 0x1f31, 0x3bf, 0x1f41, 0x3c1, 0x1fe5,
- 0x3c5, 0x1f51, 0x3c9, 0x1f61, 0x4, 0x4f, 0x1a0, 0x55,
- 0x1af, 0x6f, 0x1a1, 0x75, 0x1b0, 0x2a, 0x41, 0x1ea0,
- 0x42, 0x1e04, 0x44, 0x1e0c, 0x45, 0x1eb8, 0x48, 0x1e24,
- 0x49, 0x1eca, 0x4b, 0x1e32, 0x4c, 0x1e36, 0x4d, 0x1e42,
- 0x4e, 0x1e46, 0x4f, 0x1ecc, 0x52, 0x1e5a, 0x53, 0x1e62,
- 0x54, 0x1e6c, 0x55, 0x1ee4, 0x56, 0x1e7e, 0x57, 0x1e88,
- 0x59, 0x1ef4, 0x5a, 0x1e92, 0x61, 0x1ea1, 0x62, 0x1e05,
- 0x64, 0x1e0d, 0x65, 0x1eb9, 0x68, 0x1e25, 0x69, 0x1ecb,
- 0x6b, 0x1e33, 0x6c, 0x1e37, 0x6d, 0x1e43, 0x6e, 0x1e47,
- 0x6f, 0x1ecd, 0x72, 0x1e5b, 0x73, 0x1e63, 0x74, 0x1e6d,
- 0x75, 0x1ee5, 0x76, 0x1e7f, 0x77, 0x1e89, 0x79, 0x1ef5,
- 0x7a, 0x1e93, 0x1a0, 0x1ee2, 0x1a1, 0x1ee3, 0x1af, 0x1ef0,
- 0x1b0, 0x1ef1, 0x2, 0x55, 0x1e72, 0x75, 0x1e73, 0x2,
- 0x41, 0x1e00, 0x61, 0x1e01, 0x4, 0x53, 0x218, 0x54,
- 0x21a, 0x73, 0x219, 0x74, 0x21b, 0x16, 0x43, 0xc7,
- 0x44, 0x1e10, 0x45, 0x228, 0x47, 0x122, 0x48, 0x1e28,
- 0x4b, 0x136, 0x4c, 0x13b, 0x4e, 0x145, 0x52, 0x156,
- 0x53, 0x15e, 0x54, 0x162, 0x63, 0xe7, 0x64, 0x1e11,
- 0x65, 0x229, 0x67, 0x123, 0x68, 0x1e29, 0x6b, 0x137,
- 0x6c, 0x13c, 0x6e, 0x146, 0x72, 0x157, 0x73, 0x15f,
- 0x74, 0x163, 0xa, 0x41, 0x104, 0x45, 0x118, 0x49,
- 0x12e, 0x4f, 0x1ea, 0x55, 0x172, 0x61, 0x105, 0x65,
- 0x119, 0x69, 0x12f, 0x6f, 0x1eb, 0x75, 0x173, 0xc,
- 0x44, 0x1e12, 0x45, 0x1e18, 0x4c, 0x1e3c, 0x4e, 0x1e4a,
- 0x54, 0x1e70, 0x55, 0x1e76, 0x64, 0x1e13, 0x65, 0x1e19,
- 0x6c, 0x1e3d, 0x6e, 0x1e4b, 0x74, 0x1e71, 0x75, 0x1e77,
- 0x2, 0x48, 0x1e2a, 0x68, 0x1e2b, 0x6, 0x45, 0x1e1a,
- 0x49, 0x1e2c, 0x55, 0x1e74, 0x65, 0x1e1b, 0x69, 0x1e2d,
- 0x75, 0x1e75, 0x11, 0x42, 0x1e06, 0x44, 0x1e0e, 0x4b,
- 0x1e34, 0x4c, 0x1e3a, 0x4e, 0x1e48, 0x52, 0x1e5e, 0x54,
- 0x1e6e, 0x5a, 0x1e94, 0x62, 0x1e07, 0x64, 0x1e0f, 0x68,
- 0x1e96, 0x6b, 0x1e35, 0x6c, 0x1e3b, 0x6e, 0x1e49, 0x72,
- 0x1e5f, 0x74, 0x1e6f, 0x7a, 0x1e95, 0x2c, 0x3c, 0x226e,
- 0x3d, 0x2260, 0x3e, 0x226f, 0x2190, 0x219a, 0x2192, 0x219b,
- 0x2194, 0x21ae, 0x21d0, 0x21cd, 0x21d2, 0x21cf, 0x21d4, 0x21ce,
- 0x2203, 0x2204, 0x2208, 0x2209, 0x220b, 0x220c, 0x2223, 0x2224,
- 0x2225, 0x2226, 0x223c, 0x2241, 0x2243, 0x2244, 0x2245, 0x2247,
- 0x2248, 0x2249, 0x224d, 0x226d, 0x2261, 0x2262, 0x2264, 0x2270,
- 0x2265, 0x2271, 0x2272, 0x2274, 0x2273, 0x2275, 0x2276, 0x2278,
- 0x2277, 0x2279, 0x227a, 0x2280, 0x227b, 0x2281, 0x227c, 0x22e0,
- 0x227d, 0x22e1, 0x2282, 0x2284, 0x2283, 0x2285, 0x2286, 0x2288,
- 0x2287, 0x2289, 0x2291, 0x22e2, 0x2292, 0x22e3, 0x22a2, 0x22ac,
- 0x22a8, 0x22ad, 0x22a9, 0x22ae, 0x22ab, 0x22af, 0x22b2, 0x22ea,
- 0x22b3, 0x22eb, 0x22b4, 0x22ec, 0x22b5, 0x22ed, 0x1d, 0xa8,
- 0x1fc1, 0x3b1, 0x1fb6, 0x3b7, 0x1fc6, 0x3b9, 0x1fd6, 0x3c5,
- 0x1fe6, 0x3c9, 0x1ff6, 0x3ca, 0x1fd7, 0x3cb, 0x1fe7, 0x1f00,
- 0x1f06, 0x1f01, 0x1f07, 0x1f08, 0x1f0e, 0x1f09, 0x1f0f, 0x1f20,
- 0x1f26, 0x1f21, 0x1f27, 0x1f28, 0x1f2e, 0x1f29, 0x1f2f, 0x1f30,
- 0x1f36, 0x1f31, 0x1f37, 0x1f38, 0x1f3e, 0x1f39, 0x1f3f, 0x1f50,
- 0x1f56, 0x1f51, 0x1f57, 0x1f59, 0x1f5f, 0x1f60, 0x1f66, 0x1f61,
- 0x1f67, 0x1f68, 0x1f6e, 0x1f69, 0x1f6f, 0x1fbf, 0x1fcf, 0x1ffe,
- 0x1fdf, 0x3f, 0x391, 0x1fbc, 0x397, 0x1fcc, 0x3a9, 0x1ffc,
- 0x3ac, 0x1fb4, 0x3ae, 0x1fc4, 0x3b1, 0x1fb3, 0x3b7, 0x1fc3,
- 0x3c9, 0x1ff3, 0x3ce, 0x1ff4, 0x1f00, 0x1f80, 0x1f01, 0x1f81,
- 0x1f02, 0x1f82, 0x1f03, 0x1f83, 0x1f04, 0x1f84, 0x1f05, 0x1f85,
- 0x1f06, 0x1f86, 0x1f07, 0x1f87, 0x1f08, 0x1f88, 0x1f09, 0x1f89,
- 0x1f0a, 0x1f8a, 0x1f0b, 0x1f8b, 0x1f0c, 0x1f8c, 0x1f0d, 0x1f8d,
- 0x1f0e, 0x1f8e, 0x1f0f, 0x1f8f, 0x1f20, 0x1f90, 0x1f21, 0x1f91,
- 0x1f22, 0x1f92, 0x1f23, 0x1f93, 0x1f24, 0x1f94, 0x1f25, 0x1f95,
- 0x1f26, 0x1f96, 0x1f27, 0x1f97, 0x1f28, 0x1f98, 0x1f29, 0x1f99,
- 0x1f2a, 0x1f9a, 0x1f2b, 0x1f9b, 0x1f2c, 0x1f9c, 0x1f2d, 0x1f9d,
- 0x1f2e, 0x1f9e, 0x1f2f, 0x1f9f, 0x1f60, 0x1fa0, 0x1f61, 0x1fa1,
- 0x1f62, 0x1fa2, 0x1f63, 0x1fa3, 0x1f64, 0x1fa4, 0x1f65, 0x1fa5,
- 0x1f66, 0x1fa6, 0x1f67, 0x1fa7, 0x1f68, 0x1fa8, 0x1f69, 0x1fa9,
- 0x1f6a, 0x1faa, 0x1f6b, 0x1fab, 0x1f6c, 0x1fac, 0x1f6d, 0x1fad,
- 0x1f6e, 0x1fae, 0x1f6f, 0x1faf, 0x1f70, 0x1fb2, 0x1f74, 0x1fc2,
- 0x1f7c, 0x1ff2, 0x1fb6, 0x1fb7, 0x1fc6, 0x1fc7, 0x1ff6, 0x1ff7,
- 0x1, 0x627, 0x622, 0x6, 0x627, 0x623, 0x648, 0x624,
- 0x64a, 0x626, 0x6c1, 0x6c2, 0x6d2, 0x6d3, 0x6d5, 0x6c0,
- 0x1, 0x627, 0x625, 0x3, 0x928, 0x929, 0x930, 0x931,
- 0x933, 0x934, 0x1, 0x9c7, 0x9cb, 0x1, 0x9c7, 0x9cc,
- 0x1, 0xb47, 0xb4b, 0x1, 0xb47, 0xb48, 0x1, 0xb47,
- 0xb4c, 0x2, 0xbc6, 0xbca, 0xbc7, 0xbcb, 0x2, 0xb92,
- 0xb94, 0xbc6, 0xbcc, 0x1, 0xc46, 0xc48, 0x1, 0xcc6,
- 0xcca, 0x3, 0xcbf, 0xcc0, 0xcc6, 0xcc7, 0xcca, 0xccb,
- 0x1, 0xcc6, 0xcc8, 0x2, 0xd46, 0xd4a, 0xd47, 0xd4b,
- 0x1, 0xd46, 0xd4c, 0x2, 0xdd9, 0xdda, 0xddc, 0xddd,
- 0x1, 0xdd9, 0xddc, 0x1, 0xdd9, 0xdde, 0x1, 0x1025,
- 0x1026, 0xb, 0x1b05, 0x1b06, 0x1b07, 0x1b08, 0x1b09, 0x1b0a,
- 0x1b0b, 0x1b0c, 0x1b0d, 0x1b0e, 0x1b11, 0x1b12, 0x1b3a, 0x1b3b,
- 0x1b3c, 0x1b3d, 0x1b3e, 0x1b40, 0x1b3f, 0x1b41, 0x1b42, 0x1b43,
- 0x30, 0x3046, 0x3094, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f,
- 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057,
- 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f,
- 0x3060, 0x3061, 0x3062, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
- 0x3069, 0x306f, 0x3070, 0x3072, 0x3073, 0x3075, 0x3076, 0x3078,
- 0x3079, 0x307b, 0x307c, 0x309d, 0x309e, 0x30a6, 0x30f4, 0x30ab,
- 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3,
- 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb,
- 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c4,
- 0x30c5, 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30cf, 0x30d0, 0x30d2,
- 0x30d3, 0x30d5, 0x30d6, 0x30d8, 0x30d9, 0x30db, 0x30dc, 0x30ef,
- 0x30f7, 0x30f0, 0x30f8, 0x30f1, 0x30f9, 0x30f2, 0x30fa, 0x30fd,
- 0x30fe, 0xa, 0x306f, 0x3071, 0x3072, 0x3074, 0x3075, 0x3077,
- 0x3078, 0x307a, 0x307b, 0x307d, 0x30cf, 0x30d1, 0x30d2, 0x30d4,
- 0x30d5, 0x30d7, 0x30d8, 0x30da, 0x30db, 0x30dd,
+ 0x54, 0x41, 0xc0, 0x45, 0xc8, 0x49, 0xcc, 0x4e,
+ 0x1f8, 0x4f, 0xd2, 0x55, 0xd9, 0x57, 0x1e80, 0x59,
+ 0x1ef2, 0x61, 0xe0, 0x65, 0xe8, 0x69, 0xec, 0x6e,
+ 0x1f9, 0x6f, 0xf2, 0x75, 0xf9, 0x77, 0x1e81, 0x79,
+ 0x1ef3, 0xa8, 0x1fed, 0xc2, 0x1ea6, 0xca, 0x1ec0, 0xd4,
+ 0x1ed2, 0xdc, 0x1db, 0xe2, 0x1ea7, 0xea, 0x1ec1, 0xf4,
+ 0x1ed3, 0xfc, 0x1dc, 0x102, 0x1eb0, 0x103, 0x1eb1, 0x112,
+ 0x1e14, 0x113, 0x1e15, 0x14c, 0x1e50, 0x14d, 0x1e51, 0x1a0,
+ 0x1edc, 0x1a1, 0x1edd, 0x1af, 0x1eea, 0x1b0, 0x1eeb, 0x391,
+ 0x1fba, 0x395, 0x1fc8, 0x397, 0x1fca, 0x399, 0x1fda, 0x39f,
+ 0x1ff8, 0x3a5, 0x1fea, 0x3a9, 0x1ffa, 0x3b1, 0x1f70, 0x3b5,
+ 0x1f72, 0x3b7, 0x1f74, 0x3b9, 0x1f76, 0x3bf, 0x1f78, 0x3c5,
+ 0x1f7a, 0x3c9, 0x1f7c, 0x3ca, 0x1fd2, 0x3cb, 0x1fe2, 0x415,
+ 0x400, 0x418, 0x40d, 0x435, 0x450, 0x438, 0x45d, 0x1f00,
+ 0x1f02, 0x1f01, 0x1f03, 0x1f08, 0x1f0a, 0x1f09, 0x1f0b, 0x1f10,
+ 0x1f12, 0x1f11, 0x1f13, 0x1f18, 0x1f1a, 0x1f19, 0x1f1b, 0x1f20,
+ 0x1f22, 0x1f21, 0x1f23, 0x1f28, 0x1f2a, 0x1f29, 0x1f2b, 0x1f30,
+ 0x1f32, 0x1f31, 0x1f33, 0x1f38, 0x1f3a, 0x1f39, 0x1f3b, 0x1f40,
+ 0x1f42, 0x1f41, 0x1f43, 0x1f48, 0x1f4a, 0x1f49, 0x1f4b, 0x1f50,
+ 0x1f52, 0x1f51, 0x1f53, 0x1f59, 0x1f5b, 0x1f60, 0x1f62, 0x1f61,
+ 0x1f63, 0x1f68, 0x1f6a, 0x1f69, 0x1f6b, 0x1fbf, 0x1fcd, 0x1ffe,
+ 0x1fdd, 0x75, 0x41, 0xc1, 0x43, 0x106, 0x45, 0xc9,
+ 0x47, 0x1f4, 0x49, 0xcd, 0x4b, 0x1e30, 0x4c, 0x139,
+ 0x4d, 0x1e3e, 0x4e, 0x143, 0x4f, 0xd3, 0x50, 0x1e54,
+ 0x52, 0x154, 0x53, 0x15a, 0x55, 0xda, 0x57, 0x1e82,
+ 0x59, 0xdd, 0x5a, 0x179, 0x61, 0xe1, 0x63, 0x107,
+ 0x65, 0xe9, 0x67, 0x1f5, 0x69, 0xed, 0x6b, 0x1e31,
+ 0x6c, 0x13a, 0x6d, 0x1e3f, 0x6e, 0x144, 0x6f, 0xf3,
+ 0x70, 0x1e55, 0x72, 0x155, 0x73, 0x15b, 0x75, 0xfa,
+ 0x77, 0x1e83, 0x79, 0xfd, 0x7a, 0x17a, 0xa8, 0x385,
+ 0xc2, 0x1ea4, 0xc5, 0x1fa, 0xc6, 0x1fc, 0xc7, 0x1e08,
+ 0xca, 0x1ebe, 0xcf, 0x1e2e, 0xd4, 0x1ed0, 0xd5, 0x1e4c,
+ 0xd8, 0x1fe, 0xdc, 0x1d7, 0xe2, 0x1ea5, 0xe5, 0x1fb,
+ 0xe6, 0x1fd, 0xe7, 0x1e09, 0xea, 0x1ebf, 0xef, 0x1e2f,
+ 0xf4, 0x1ed1, 0xf5, 0x1e4d, 0xf8, 0x1ff, 0xfc, 0x1d8,
+ 0x102, 0x1eae, 0x103, 0x1eaf, 0x112, 0x1e16, 0x113, 0x1e17,
+ 0x14c, 0x1e52, 0x14d, 0x1e53, 0x168, 0x1e78, 0x169, 0x1e79,
+ 0x1a0, 0x1eda, 0x1a1, 0x1edb, 0x1af, 0x1ee8, 0x1b0, 0x1ee9,
+ 0x391, 0x386, 0x395, 0x388, 0x397, 0x389, 0x399, 0x38a,
+ 0x39f, 0x38c, 0x3a5, 0x38e, 0x3a9, 0x38f, 0x3b1, 0x3ac,
+ 0x3b5, 0x3ad, 0x3b7, 0x3ae, 0x3b9, 0x3af, 0x3bf, 0x3cc,
+ 0x3c5, 0x3cd, 0x3c9, 0x3ce, 0x3ca, 0x390, 0x3cb, 0x3b0,
+ 0x3d2, 0x3d3, 0x413, 0x403, 0x41a, 0x40c, 0x433, 0x453,
+ 0x43a, 0x45c, 0x1f00, 0x1f04, 0x1f01, 0x1f05, 0x1f08, 0x1f0c,
+ 0x1f09, 0x1f0d, 0x1f10, 0x1f14, 0x1f11, 0x1f15, 0x1f18, 0x1f1c,
+ 0x1f19, 0x1f1d, 0x1f20, 0x1f24, 0x1f21, 0x1f25, 0x1f28, 0x1f2c,
+ 0x1f29, 0x1f2d, 0x1f30, 0x1f34, 0x1f31, 0x1f35, 0x1f38, 0x1f3c,
+ 0x1f39, 0x1f3d, 0x1f40, 0x1f44, 0x1f41, 0x1f45, 0x1f48, 0x1f4c,
+ 0x1f49, 0x1f4d, 0x1f50, 0x1f54, 0x1f51, 0x1f55, 0x1f59, 0x1f5d,
+ 0x1f60, 0x1f64, 0x1f61, 0x1f65, 0x1f68, 0x1f6c, 0x1f69, 0x1f6d,
+ 0x1fbf, 0x1fce, 0x1ffe, 0x1fde, 0x20, 0x41, 0xc2, 0x43,
+ 0x108, 0x45, 0xca, 0x47, 0x11c, 0x48, 0x124, 0x49,
+ 0xce, 0x4a, 0x134, 0x4f, 0xd4, 0x53, 0x15c, 0x55,
+ 0xdb, 0x57, 0x174, 0x59, 0x176, 0x5a, 0x1e90, 0x61,
+ 0xe2, 0x63, 0x109, 0x65, 0xea, 0x67, 0x11d, 0x68,
+ 0x125, 0x69, 0xee, 0x6a, 0x135, 0x6f, 0xf4, 0x73,
+ 0x15d, 0x75, 0xfb, 0x77, 0x175, 0x79, 0x177, 0x7a,
+ 0x1e91, 0x1ea0, 0x1eac, 0x1ea1, 0x1ead, 0x1eb8, 0x1ec6, 0x1eb9,
+ 0x1ec7, 0x1ecc, 0x1ed8, 0x1ecd, 0x1ed9, 0x1c, 0x41, 0xc3,
+ 0x45, 0x1ebc, 0x49, 0x128, 0x4e, 0xd1, 0x4f, 0xd5,
+ 0x55, 0x168, 0x56, 0x1e7c, 0x59, 0x1ef8, 0x61, 0xe3,
+ 0x65, 0x1ebd, 0x69, 0x129, 0x6e, 0xf1, 0x6f, 0xf5,
+ 0x75, 0x169, 0x76, 0x1e7d, 0x79, 0x1ef9, 0xc2, 0x1eaa,
+ 0xca, 0x1ec4, 0xd4, 0x1ed6, 0xe2, 0x1eab, 0xea, 0x1ec5,
+ 0xf4, 0x1ed7, 0x102, 0x1eb4, 0x103, 0x1eb5, 0x1a0, 0x1ee0,
+ 0x1a1, 0x1ee1, 0x1af, 0x1eee, 0x1b0, 0x1eef, 0x2c, 0x41,
+ 0x100, 0x45, 0x112, 0x47, 0x1e20, 0x49, 0x12a, 0x4f,
+ 0x14c, 0x55, 0x16a, 0x59, 0x232, 0x61, 0x101, 0x65,
+ 0x113, 0x67, 0x1e21, 0x69, 0x12b, 0x6f, 0x14d, 0x75,
+ 0x16b, 0x79, 0x233, 0xc4, 0x1de, 0xc6, 0x1e2, 0xd5,
+ 0x22c, 0xd6, 0x22a, 0xdc, 0x1d5, 0xe4, 0x1df, 0xe6,
+ 0x1e3, 0xf5, 0x22d, 0xf6, 0x22b, 0xfc, 0x1d6, 0x1ea,
+ 0x1ec, 0x1eb, 0x1ed, 0x226, 0x1e0, 0x227, 0x1e1, 0x22e,
+ 0x230, 0x22f, 0x231, 0x391, 0x1fb9, 0x399, 0x1fd9, 0x3a5,
+ 0x1fe9, 0x3b1, 0x1fb1, 0x3b9, 0x1fd1, 0x3c5, 0x1fe1, 0x418,
+ 0x4e2, 0x423, 0x4ee, 0x438, 0x4e3, 0x443, 0x4ef, 0x1e36,
+ 0x1e38, 0x1e37, 0x1e39, 0x1e5a, 0x1e5c, 0x1e5b, 0x1e5d, 0x20,
+ 0x41, 0x102, 0x45, 0x114, 0x47, 0x11e, 0x49, 0x12c,
+ 0x4f, 0x14e, 0x55, 0x16c, 0x61, 0x103, 0x65, 0x115,
+ 0x67, 0x11f, 0x69, 0x12d, 0x6f, 0x14f, 0x75, 0x16d,
+ 0x228, 0x1e1c, 0x229, 0x1e1d, 0x391, 0x1fb8, 0x399, 0x1fd8,
+ 0x3a5, 0x1fe8, 0x3b1, 0x1fb0, 0x3b9, 0x1fd0, 0x3c5, 0x1fe0,
+ 0x410, 0x4d0, 0x415, 0x4d6, 0x416, 0x4c1, 0x418, 0x419,
+ 0x423, 0x40e, 0x430, 0x4d1, 0x435, 0x4d7, 0x436, 0x4c2,
+ 0x438, 0x439, 0x443, 0x45e, 0x1ea0, 0x1eb6, 0x1ea1, 0x1eb7,
+ 0x2e, 0x41, 0x226, 0x42, 0x1e02, 0x43, 0x10a, 0x44,
+ 0x1e0a, 0x45, 0x116, 0x46, 0x1e1e, 0x47, 0x120, 0x48,
+ 0x1e22, 0x49, 0x130, 0x4d, 0x1e40, 0x4e, 0x1e44, 0x4f,
+ 0x22e, 0x50, 0x1e56, 0x52, 0x1e58, 0x53, 0x1e60, 0x54,
+ 0x1e6a, 0x57, 0x1e86, 0x58, 0x1e8a, 0x59, 0x1e8e, 0x5a,
+ 0x17b, 0x61, 0x227, 0x62, 0x1e03, 0x63, 0x10b, 0x64,
+ 0x1e0b, 0x65, 0x117, 0x66, 0x1e1f, 0x67, 0x121, 0x68,
+ 0x1e23, 0x6d, 0x1e41, 0x6e, 0x1e45, 0x6f, 0x22f, 0x70,
+ 0x1e57, 0x72, 0x1e59, 0x73, 0x1e61, 0x74, 0x1e6b, 0x77,
+ 0x1e87, 0x78, 0x1e8b, 0x79, 0x1e8f, 0x7a, 0x17c, 0x15a,
+ 0x1e64, 0x15b, 0x1e65, 0x160, 0x1e66, 0x161, 0x1e67, 0x17f,
+ 0x1e9b, 0x1e62, 0x1e68, 0x1e63, 0x1e69, 0x36, 0x41, 0xc4,
+ 0x45, 0xcb, 0x48, 0x1e26, 0x49, 0xcf, 0x4f, 0xd6,
+ 0x55, 0xdc, 0x57, 0x1e84, 0x58, 0x1e8c, 0x59, 0x178,
+ 0x61, 0xe4, 0x65, 0xeb, 0x68, 0x1e27, 0x69, 0xef,
+ 0x6f, 0xf6, 0x74, 0x1e97, 0x75, 0xfc, 0x77, 0x1e85,
+ 0x78, 0x1e8d, 0x79, 0xff, 0xd5, 0x1e4e, 0xf5, 0x1e4f,
+ 0x16a, 0x1e7a, 0x16b, 0x1e7b, 0x399, 0x3aa, 0x3a5, 0x3ab,
+ 0x3b9, 0x3ca, 0x3c5, 0x3cb, 0x3d2, 0x3d4, 0x406, 0x407,
+ 0x410, 0x4d2, 0x415, 0x401, 0x416, 0x4dc, 0x417, 0x4de,
+ 0x418, 0x4e4, 0x41e, 0x4e6, 0x423, 0x4f0, 0x427, 0x4f4,
+ 0x42b, 0x4f8, 0x42d, 0x4ec, 0x430, 0x4d3, 0x435, 0x451,
+ 0x436, 0x4dd, 0x437, 0x4df, 0x438, 0x4e5, 0x43e, 0x4e7,
+ 0x443, 0x4f1, 0x447, 0x4f5, 0x44b, 0x4f9, 0x44d, 0x4ed,
+ 0x456, 0x457, 0x4d8, 0x4da, 0x4d9, 0x4db, 0x4e8, 0x4ea,
+ 0x4e9, 0x4eb, 0x18, 0x41, 0x1ea2, 0x45, 0x1eba, 0x49,
+ 0x1ec8, 0x4f, 0x1ece, 0x55, 0x1ee6, 0x59, 0x1ef6, 0x61,
+ 0x1ea3, 0x65, 0x1ebb, 0x69, 0x1ec9, 0x6f, 0x1ecf, 0x75,
+ 0x1ee7, 0x79, 0x1ef7, 0xc2, 0x1ea8, 0xca, 0x1ec2, 0xd4,
+ 0x1ed4, 0xe2, 0x1ea9, 0xea, 0x1ec3, 0xf4, 0x1ed5, 0x102,
+ 0x1eb2, 0x103, 0x1eb3, 0x1a0, 0x1ede, 0x1a1, 0x1edf, 0x1af,
+ 0x1eec, 0x1b0, 0x1eed, 0x6, 0x41, 0xc5, 0x55, 0x16e,
+ 0x61, 0xe5, 0x75, 0x16f, 0x77, 0x1e98, 0x79, 0x1e99,
+ 0x6, 0x4f, 0x150, 0x55, 0x170, 0x6f, 0x151, 0x75,
+ 0x171, 0x423, 0x4f2, 0x443, 0x4f3, 0x25, 0x41, 0x1cd,
+ 0x43, 0x10c, 0x44, 0x10e, 0x45, 0x11a, 0x47, 0x1e6,
+ 0x48, 0x21e, 0x49, 0x1cf, 0x4b, 0x1e8, 0x4c, 0x13d,
+ 0x4e, 0x147, 0x4f, 0x1d1, 0x52, 0x158, 0x53, 0x160,
+ 0x54, 0x164, 0x55, 0x1d3, 0x5a, 0x17d, 0x61, 0x1ce,
+ 0x63, 0x10d, 0x64, 0x10f, 0x65, 0x11b, 0x67, 0x1e7,
+ 0x68, 0x21f, 0x69, 0x1d0, 0x6a, 0x1f0, 0x6b, 0x1e9,
+ 0x6c, 0x13e, 0x6e, 0x148, 0x6f, 0x1d2, 0x72, 0x159,
+ 0x73, 0x161, 0x74, 0x165, 0x75, 0x1d4, 0x7a, 0x17e,
+ 0xdc, 0x1d9, 0xfc, 0x1da, 0x1b7, 0x1ee, 0x292, 0x1ef,
+ 0xe, 0x41, 0x200, 0x45, 0x204, 0x49, 0x208, 0x4f,
+ 0x20c, 0x52, 0x210, 0x55, 0x214, 0x61, 0x201, 0x65,
+ 0x205, 0x69, 0x209, 0x6f, 0x20d, 0x72, 0x211, 0x75,
+ 0x215, 0x474, 0x476, 0x475, 0x477, 0xc, 0x41, 0x202,
+ 0x45, 0x206, 0x49, 0x20a, 0x4f, 0x20e, 0x52, 0x212,
+ 0x55, 0x216, 0x61, 0x203, 0x65, 0x207, 0x69, 0x20b,
+ 0x6f, 0x20f, 0x72, 0x213, 0x75, 0x217, 0xe, 0x391,
+ 0x1f08, 0x395, 0x1f18, 0x397, 0x1f28, 0x399, 0x1f38, 0x39f,
+ 0x1f48, 0x3a9, 0x1f68, 0x3b1, 0x1f00, 0x3b5, 0x1f10, 0x3b7,
+ 0x1f20, 0x3b9, 0x1f30, 0x3bf, 0x1f40, 0x3c1, 0x1fe4, 0x3c5,
+ 0x1f50, 0x3c9, 0x1f60, 0x10, 0x391, 0x1f09, 0x395, 0x1f19,
+ 0x397, 0x1f29, 0x399, 0x1f39, 0x39f, 0x1f49, 0x3a1, 0x1fec,
+ 0x3a5, 0x1f59, 0x3a9, 0x1f69, 0x3b1, 0x1f01, 0x3b5, 0x1f11,
+ 0x3b7, 0x1f21, 0x3b9, 0x1f31, 0x3bf, 0x1f41, 0x3c1, 0x1fe5,
+ 0x3c5, 0x1f51, 0x3c9, 0x1f61, 0x4, 0x4f, 0x1a0, 0x55,
+ 0x1af, 0x6f, 0x1a1, 0x75, 0x1b0, 0x2a, 0x41, 0x1ea0,
+ 0x42, 0x1e04, 0x44, 0x1e0c, 0x45, 0x1eb8, 0x48, 0x1e24,
+ 0x49, 0x1eca, 0x4b, 0x1e32, 0x4c, 0x1e36, 0x4d, 0x1e42,
+ 0x4e, 0x1e46, 0x4f, 0x1ecc, 0x52, 0x1e5a, 0x53, 0x1e62,
+ 0x54, 0x1e6c, 0x55, 0x1ee4, 0x56, 0x1e7e, 0x57, 0x1e88,
+ 0x59, 0x1ef4, 0x5a, 0x1e92, 0x61, 0x1ea1, 0x62, 0x1e05,
+ 0x64, 0x1e0d, 0x65, 0x1eb9, 0x68, 0x1e25, 0x69, 0x1ecb,
+ 0x6b, 0x1e33, 0x6c, 0x1e37, 0x6d, 0x1e43, 0x6e, 0x1e47,
+ 0x6f, 0x1ecd, 0x72, 0x1e5b, 0x73, 0x1e63, 0x74, 0x1e6d,
+ 0x75, 0x1ee5, 0x76, 0x1e7f, 0x77, 0x1e89, 0x79, 0x1ef5,
+ 0x7a, 0x1e93, 0x1a0, 0x1ee2, 0x1a1, 0x1ee3, 0x1af, 0x1ef0,
+ 0x1b0, 0x1ef1, 0x2, 0x55, 0x1e72, 0x75, 0x1e73, 0x2,
+ 0x41, 0x1e00, 0x61, 0x1e01, 0x4, 0x53, 0x218, 0x54,
+ 0x21a, 0x73, 0x219, 0x74, 0x21b, 0x16, 0x43, 0xc7,
+ 0x44, 0x1e10, 0x45, 0x228, 0x47, 0x122, 0x48, 0x1e28,
+ 0x4b, 0x136, 0x4c, 0x13b, 0x4e, 0x145, 0x52, 0x156,
+ 0x53, 0x15e, 0x54, 0x162, 0x63, 0xe7, 0x64, 0x1e11,
+ 0x65, 0x229, 0x67, 0x123, 0x68, 0x1e29, 0x6b, 0x137,
+ 0x6c, 0x13c, 0x6e, 0x146, 0x72, 0x157, 0x73, 0x15f,
+ 0x74, 0x163, 0xa, 0x41, 0x104, 0x45, 0x118, 0x49,
+ 0x12e, 0x4f, 0x1ea, 0x55, 0x172, 0x61, 0x105, 0x65,
+ 0x119, 0x69, 0x12f, 0x6f, 0x1eb, 0x75, 0x173, 0xc,
+ 0x44, 0x1e12, 0x45, 0x1e18, 0x4c, 0x1e3c, 0x4e, 0x1e4a,
+ 0x54, 0x1e70, 0x55, 0x1e76, 0x64, 0x1e13, 0x65, 0x1e19,
+ 0x6c, 0x1e3d, 0x6e, 0x1e4b, 0x74, 0x1e71, 0x75, 0x1e77,
+ 0x2, 0x48, 0x1e2a, 0x68, 0x1e2b, 0x6, 0x45, 0x1e1a,
+ 0x49, 0x1e2c, 0x55, 0x1e74, 0x65, 0x1e1b, 0x69, 0x1e2d,
+ 0x75, 0x1e75, 0x11, 0x42, 0x1e06, 0x44, 0x1e0e, 0x4b,
+ 0x1e34, 0x4c, 0x1e3a, 0x4e, 0x1e48, 0x52, 0x1e5e, 0x54,
+ 0x1e6e, 0x5a, 0x1e94, 0x62, 0x1e07, 0x64, 0x1e0f, 0x68,
+ 0x1e96, 0x6b, 0x1e35, 0x6c, 0x1e3b, 0x6e, 0x1e49, 0x72,
+ 0x1e5f, 0x74, 0x1e6f, 0x7a, 0x1e95, 0x2c, 0x3c, 0x226e,
+ 0x3d, 0x2260, 0x3e, 0x226f, 0x2190, 0x219a, 0x2192, 0x219b,
+ 0x2194, 0x21ae, 0x21d0, 0x21cd, 0x21d2, 0x21cf, 0x21d4, 0x21ce,
+ 0x2203, 0x2204, 0x2208, 0x2209, 0x220b, 0x220c, 0x2223, 0x2224,
+ 0x2225, 0x2226, 0x223c, 0x2241, 0x2243, 0x2244, 0x2245, 0x2247,
+ 0x2248, 0x2249, 0x224d, 0x226d, 0x2261, 0x2262, 0x2264, 0x2270,
+ 0x2265, 0x2271, 0x2272, 0x2274, 0x2273, 0x2275, 0x2276, 0x2278,
+ 0x2277, 0x2279, 0x227a, 0x2280, 0x227b, 0x2281, 0x227c, 0x22e0,
+ 0x227d, 0x22e1, 0x2282, 0x2284, 0x2283, 0x2285, 0x2286, 0x2288,
+ 0x2287, 0x2289, 0x2291, 0x22e2, 0x2292, 0x22e3, 0x22a2, 0x22ac,
+ 0x22a8, 0x22ad, 0x22a9, 0x22ae, 0x22ab, 0x22af, 0x22b2, 0x22ea,
+ 0x22b3, 0x22eb, 0x22b4, 0x22ec, 0x22b5, 0x22ed, 0x1d, 0xa8,
+ 0x1fc1, 0x3b1, 0x1fb6, 0x3b7, 0x1fc6, 0x3b9, 0x1fd6, 0x3c5,
+ 0x1fe6, 0x3c9, 0x1ff6, 0x3ca, 0x1fd7, 0x3cb, 0x1fe7, 0x1f00,
+ 0x1f06, 0x1f01, 0x1f07, 0x1f08, 0x1f0e, 0x1f09, 0x1f0f, 0x1f20,
+ 0x1f26, 0x1f21, 0x1f27, 0x1f28, 0x1f2e, 0x1f29, 0x1f2f, 0x1f30,
+ 0x1f36, 0x1f31, 0x1f37, 0x1f38, 0x1f3e, 0x1f39, 0x1f3f, 0x1f50,
+ 0x1f56, 0x1f51, 0x1f57, 0x1f59, 0x1f5f, 0x1f60, 0x1f66, 0x1f61,
+ 0x1f67, 0x1f68, 0x1f6e, 0x1f69, 0x1f6f, 0x1fbf, 0x1fcf, 0x1ffe,
+ 0x1fdf, 0x3f, 0x391, 0x1fbc, 0x397, 0x1fcc, 0x3a9, 0x1ffc,
+ 0x3ac, 0x1fb4, 0x3ae, 0x1fc4, 0x3b1, 0x1fb3, 0x3b7, 0x1fc3,
+ 0x3c9, 0x1ff3, 0x3ce, 0x1ff4, 0x1f00, 0x1f80, 0x1f01, 0x1f81,
+ 0x1f02, 0x1f82, 0x1f03, 0x1f83, 0x1f04, 0x1f84, 0x1f05, 0x1f85,
+ 0x1f06, 0x1f86, 0x1f07, 0x1f87, 0x1f08, 0x1f88, 0x1f09, 0x1f89,
+ 0x1f0a, 0x1f8a, 0x1f0b, 0x1f8b, 0x1f0c, 0x1f8c, 0x1f0d, 0x1f8d,
+ 0x1f0e, 0x1f8e, 0x1f0f, 0x1f8f, 0x1f20, 0x1f90, 0x1f21, 0x1f91,
+ 0x1f22, 0x1f92, 0x1f23, 0x1f93, 0x1f24, 0x1f94, 0x1f25, 0x1f95,
+ 0x1f26, 0x1f96, 0x1f27, 0x1f97, 0x1f28, 0x1f98, 0x1f29, 0x1f99,
+ 0x1f2a, 0x1f9a, 0x1f2b, 0x1f9b, 0x1f2c, 0x1f9c, 0x1f2d, 0x1f9d,
+ 0x1f2e, 0x1f9e, 0x1f2f, 0x1f9f, 0x1f60, 0x1fa0, 0x1f61, 0x1fa1,
+ 0x1f62, 0x1fa2, 0x1f63, 0x1fa3, 0x1f64, 0x1fa4, 0x1f65, 0x1fa5,
+ 0x1f66, 0x1fa6, 0x1f67, 0x1fa7, 0x1f68, 0x1fa8, 0x1f69, 0x1fa9,
+ 0x1f6a, 0x1faa, 0x1f6b, 0x1fab, 0x1f6c, 0x1fac, 0x1f6d, 0x1fad,
+ 0x1f6e, 0x1fae, 0x1f6f, 0x1faf, 0x1f70, 0x1fb2, 0x1f74, 0x1fc2,
+ 0x1f7c, 0x1ff2, 0x1fb6, 0x1fb7, 0x1fc6, 0x1fc7, 0x1ff6, 0x1ff7,
+ 0x1, 0x627, 0x622, 0x6, 0x627, 0x623, 0x648, 0x624,
+ 0x64a, 0x626, 0x6c1, 0x6c2, 0x6d2, 0x6d3, 0x6d5, 0x6c0,
+ 0x1, 0x627, 0x625, 0x3, 0x928, 0x929, 0x930, 0x931,
+ 0x933, 0x934, 0x1, 0x9c7, 0x9cb, 0x1, 0x9c7, 0x9cc,
+ 0x1, 0xb47, 0xb4b, 0x1, 0xb47, 0xb48, 0x1, 0xb47,
+ 0xb4c, 0x2, 0xbc6, 0xbca, 0xbc7, 0xbcb, 0x2, 0xb92,
+ 0xb94, 0xbc6, 0xbcc, 0x1, 0xc46, 0xc48, 0x1, 0xcc6,
+ 0xcca, 0x3, 0xcbf, 0xcc0, 0xcc6, 0xcc7, 0xcca, 0xccb,
+ 0x1, 0xcc6, 0xcc8, 0x2, 0xd46, 0xd4a, 0xd47, 0xd4b,
+ 0x1, 0xd46, 0xd4c, 0x2, 0xdd9, 0xdda, 0xddc, 0xddd,
+ 0x1, 0xdd9, 0xddc, 0x1, 0xdd9, 0xdde, 0x1, 0x1025,
+ 0x1026, 0xb, 0x1b05, 0x1b06, 0x1b07, 0x1b08, 0x1b09, 0x1b0a,
+ 0x1b0b, 0x1b0c, 0x1b0d, 0x1b0e, 0x1b11, 0x1b12, 0x1b3a, 0x1b3b,
+ 0x1b3c, 0x1b3d, 0x1b3e, 0x1b40, 0x1b3f, 0x1b41, 0x1b42, 0x1b43,
+ 0x30, 0x3046, 0x3094, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f,
+ 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057,
+ 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f,
+ 0x3060, 0x3061, 0x3062, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
+ 0x3069, 0x306f, 0x3070, 0x3072, 0x3073, 0x3075, 0x3076, 0x3078,
+ 0x3079, 0x307b, 0x307c, 0x309d, 0x309e, 0x30a6, 0x30f4, 0x30ab,
+ 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3,
+ 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb,
+ 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c4,
+ 0x30c5, 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30cf, 0x30d0, 0x30d2,
+ 0x30d3, 0x30d5, 0x30d6, 0x30d8, 0x30d9, 0x30db, 0x30dc, 0x30ef,
+ 0x30f7, 0x30f0, 0x30f8, 0x30f1, 0x30f9, 0x30f2, 0x30fa, 0x30fd,
+ 0x30fe, 0xa, 0x306f, 0x3071, 0x3072, 0x3074, 0x3075, 0x3077,
+ 0x3078, 0x307a, 0x307b, 0x307d, 0x30cf, 0x30d1, 0x30d2, 0x30d4,
+ 0x30d5, 0x30d7, 0x30d8, 0x30da, 0x30db, 0x30dd,
};
struct NormalizationCorrection {
diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h
index c1ed316..9dab43c 100644
--- a/src/corelib/tools/qunicodetables_p.h
+++ b/src/corelib/tools/qunicodetables_p.h
@@ -81,8 +81,8 @@ namespace QUnicodeTables {
ushort wordBreak : 8;
ushort sentenceBreak : 8;
};
- Q_CORE_EXPORT const Properties* QT_FASTCALL properties(uint ucs4);
- Q_CORE_EXPORT const Properties* QT_FASTCALL properties(ushort ucs2);
+ Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4);
+ Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2);
// See http://www.unicode.org/reports/tr24/tr24-5.html
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 19b8da4..51a6709 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -415,7 +415,9 @@ void QVector<T>::free(Data *x)
{
if (QTypeInfo<T>::isComplex) {
T* b = x->array;
- T* i = b + reinterpret_cast<QVectorData *>(x)->size;
+ union { QVectorData *d; Data *p; } u;
+ u.p = x;
+ T* i = b + u.d->size;
while (i-- != b)
i->~T();
}
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index c93a065..08c94ac 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -5,6 +5,7 @@ HEADERS += \
tools/qbitarray.h \
tools/qbytearray.h \
tools/qbytearraymatcher.h \
+ tools/qbytedata_p.h \
tools/qcache.h \
tools/qchar.h \
tools/qcontainerfwd.h \
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 1fc2a9f..42ed04e 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -568,7 +568,7 @@ bool QXmlStreamReader::atEnd() const
returns true, hasError() returns true, and this function returns
QXmlStreamReader::Invalid.
- The exception is when error() return PrematureEndOfDocumentError.
+ The exception is when error() returns PrematureEndOfDocumentError.
This error is reported when the end of an otherwise well-formed
chunk of XML is reached, but the chunk doesn't represent a complete
XML document. In that case, parsing \e can be resumed by calling
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 85c3274..7c520df 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -44,6 +44,7 @@
#include "qdbusargument.h"
#include "qdbuspendingcall.h"
+#include "qdbusmessage_p.h"
#include "qdbusmetaobject_p.h"
#include "qdbusmetatype_p.h"
#include "qdbusutil_p.h"
@@ -52,99 +53,83 @@
QT_BEGIN_NAMESPACE
+static QDBusError checkIfValid(const QString &service, const QString &path,
+ const QString &interface, bool isDynamic)
+{
+ // We should be throwing exceptions here... oh well
+ QDBusError error;
+
+ // dynamic interfaces (QDBusInterface) can have empty interfaces, but not service and object paths
+ // non-dynamic is the opposite: service and object paths can be empty, but not the interface
+ if (!isDynamic) {
+ // use assertion here because this should never happen, at all
+ Q_ASSERT_X(!interface.isEmpty(), "QDBusAbstractInterface", "Interface name cannot be empty");
+ }
+ if (!QDBusUtil::checkBusName(service, isDynamic ? QDBusUtil::EmptyNotAllowed : QDBusUtil::EmptyAllowed, &error))
+ return error;
+ if (!QDBusUtil::checkObjectPath(path, isDynamic ? QDBusUtil::EmptyNotAllowed : QDBusUtil::EmptyAllowed, &error))
+ return error;
+ if (!QDBusUtil::checkInterfaceName(interface, QDBusUtil::EmptyAllowed, &error))
+ return error;
+
+ // no error
+ return QDBusError();
+}
+
QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv,
const QString &p,
const QString &iface,
const QDBusConnection& con,
bool isDynamic)
- : connection(con), service(serv), path(p), interface(iface), isValid(true)
+ : connection(con), service(serv), path(p), interface(iface),
+ lastError(checkIfValid(serv, p, iface, isDynamic)),
+ isValid(!lastError.isValid())
{
- if (isDynamic) {
- // QDBusInterface: service and object path can't be empty, but interface can
-#if 0
- Q_ASSERT_X(QDBusUtil::isValidBusName(service),
- "QDBusInterface::QDBusInterface", "Invalid service name");
- Q_ASSERT_X(QDBusUtil::isValidObjectPath(path),
- "QDBusInterface::QDBusInterface", "Invalid object path given");
- Q_ASSERT_X(interface.isEmpty() || QDBusUtil::isValidInterfaceName(interface),
- "QDBusInterface::QDBusInterface", "Invalid interface name");
-#else
- if (!QDBusUtil::isValidBusName(service)) {
- lastError = QDBusError(QDBusError::Disconnected,
- QLatin1String("Invalid service name"));
- isValid = false;
- } else if (!QDBusUtil::isValidObjectPath(path)) {
- lastError = QDBusError(QDBusError::Disconnected,
- QLatin1String("Invalid object name given"));
- isValid = false;
- } else if (!interface.isEmpty() && !QDBusUtil::isValidInterfaceName(interface)) {
- lastError = QDBusError(QDBusError::Disconnected,
- QLatin1String("Invalid interface name"));
- isValid = false;
- }
-#endif
- } else {
- // all others: service and path can be empty here, but interface can't
-#if 0
- Q_ASSERT_X(service.isEmpty() || QDBusUtil::isValidBusName(service),
- "QDBusAbstractInterface::QDBusAbstractInterface", "Invalid service name");
- Q_ASSERT_X(path.isEmpty() || QDBusUtil::isValidObjectPath(path),
- "QDBusAbstractInterface::QDBusAbstractInterface", "Invalid object path given");
- Q_ASSERT_X(QDBusUtil::isValidInterfaceName(interface),
- "QDBusAbstractInterface::QDBusAbstractInterface", "Invalid interface class!");
-#else
- if (!service.isEmpty() && !QDBusUtil::isValidBusName(service)) {
- lastError = QDBusError(QDBusError::Disconnected,
- QLatin1String("Invalid service name"));
- isValid = false;
- } else if (!path.isEmpty() && !QDBusUtil::isValidObjectPath(path)) {
- lastError = QDBusError(QDBusError::Disconnected,
- QLatin1String("Invalid object path given"));
- isValid = false;
- } else if (!QDBusUtil::isValidInterfaceName(interface)) {
- lastError = QDBusError(QDBusError::Disconnected,
- QLatin1String("Invalid interface class"));
- isValid = false;
- }
-#endif
- }
-
if (!isValid)
return;
if (!connection.isConnected()) {
lastError = QDBusError(QDBusError::Disconnected,
QLatin1String("Not connected to D-Bus server"));
- isValid = false;
} else if (!service.isEmpty()) {
currentOwner = connectionPrivate()->getNameOwner(service); // verify the name owner
if (currentOwner.isEmpty()) {
- isValid = false;
lastError = connectionPrivate()->lastError;
}
}
}
-QVariant QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp) const
+bool QDBusAbstractInterfacePrivate::canMakeCalls() const
{
- if (!connection.isConnected()) // not connected
- return QVariant();
+ // recheck only if we have a wildcard (i.e. empty) service or path
+ // if any are empty, set the error message according to QDBusUtil
+ if (service.isEmpty())
+ return QDBusUtil::checkBusName(service, QDBusUtil::EmptyNotAllowed, &lastError);
+ if (path.isEmpty())
+ return QDBusUtil::checkObjectPath(path, QDBusUtil::EmptyNotAllowed, &lastError);
+ return true;
+}
+
+void QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, QVariant &where) const
+{
+ if (!isValid || !canMakeCalls()) { // can't make calls
+ where.clear();
+ return;
+ }
// is this metatype registered?
- int mid;
- const char *expectedSignature;
- if (mp.type() == QVariant::LastType) {
- // We're asking to read a QVariant
- mid = qMetaTypeId<QDBusVariant>();
- expectedSignature = "v";
- } else {
- mid = QMetaType::type(mp.typeName());
- expectedSignature = QDBusMetaType::typeToSignature(mid);
+ const char *expectedSignature = "";
+ if (mp.type() != 0xff) {
+ expectedSignature = QDBusMetaType::typeToSignature(where.userType());
if (expectedSignature == 0) {
qWarning("QDBusAbstractInterface: type %s must be registered with QtDBus before it can be "
"used to read property %s.%s",
mp.typeName(), qPrintable(interface), mp.name());
- return QVariant();
+ lastError = QDBusError(QDBusError::Failed,
+ QString::fromLatin1("Unregistered type %1 cannot be handled")
+ .arg(QLatin1String(mp.typeName())));
+ where.clear();
+ return;
}
}
@@ -152,26 +137,33 @@ QVariant QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp) const
QDBusMessage msg = QDBusMessage::createMethodCall(service, path,
QLatin1String(DBUS_INTERFACE_PROPERTIES),
QLatin1String("Get"));
+ QDBusMessagePrivate::setParametersValidated(msg, true);
msg << interface << QString::fromUtf8(mp.name());
QDBusMessage reply = connection.call(msg, QDBus::Block);
if (reply.type() != QDBusMessage::ReplyMessage) {
lastError = reply;
- return QVariant();
+ where.clear();
+ return;
}
if (reply.signature() != QLatin1String("v")) {
QString errmsg = QLatin1String("Invalid signature `%1' in return from call to "
DBUS_INTERFACE_PROPERTIES);
lastError = QDBusError(QDBusError::InvalidSignature, errmsg.arg(reply.signature()));
- return QVariant();
+ where.clear();
+ return;
}
QByteArray foundSignature;
const char *foundType = 0;
QVariant value = qvariant_cast<QDBusVariant>(reply.arguments().at(0)).variant();
- if (value.userType() == mid)
- return value; // simple match
+ if (value.userType() == where.userType() || mp.type() == 0xff
+ || (expectedSignature[0] == 'v' && expectedSignature[1] == '\0')) {
+ // simple match
+ where = value;
+ return;
+ }
if (value.userType() == qMetaTypeId<QDBusArgument>()) {
QDBusArgument arg = qvariant_cast<QDBusArgument>(value);
@@ -179,14 +171,9 @@ QVariant QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp) const
foundType = "user type";
foundSignature = arg.currentSignature().toLatin1();
if (foundSignature == expectedSignature) {
- void *null = 0;
- QVariant result(mid, null);
- QDBusMetaType::demarshall(arg, mid, result.data());
-
- if (mp.type() == QVariant::LastType)
- // special case: QVariant
- return qvariant_cast<QDBusVariant>(result).variant();
- return result;
+ // signatures match, we can demarshall
+ QDBusMetaType::demarshall(arg, where.userType(), where.data());
+ return;
}
} else {
foundType = value.typeName();
@@ -203,23 +190,28 @@ QVariant QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp) const
QString::fromUtf8(mp.name()),
QString::fromLatin1(mp.typeName()),
QString::fromLatin1(expectedSignature)));
- return QVariant();
+ where.clear();
+ return;
}
-void QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const QVariant &value)
+bool QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const QVariant &value)
{
- if (!connection.isConnected()) // not connected
- return;
+ if (!isValid || !canMakeCalls()) // can't make calls
+ return false;
// send the value
QDBusMessage msg = QDBusMessage::createMethodCall(service, path,
QLatin1String(DBUS_INTERFACE_PROPERTIES),
QLatin1String("Set"));
+ QDBusMessagePrivate::setParametersValidated(msg, true);
msg << interface << QString::fromUtf8(mp.name()) << qVariantFromValue(QDBusVariant(value));
QDBusMessage reply = connection.call(msg, QDBus::Block);
- if (reply.type() != QDBusMessage::ReplyMessage)
+ if (reply.type() != QDBusMessage::ReplyMessage) {
lastError = reply;
+ return false;
+ }
+ return true;
}
void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,
@@ -230,10 +222,36 @@ void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,
//qDebug() << "QDBusAbstractInterfacePrivate serviceOwnerChanged" << name << oldOwner << newOwner;
if (name == service) {
currentOwner = newOwner;
- isValid = !newOwner.isEmpty();
}
}
+QDBusAbstractInterfaceBase::QDBusAbstractInterfaceBase(QDBusAbstractInterfacePrivate &d, QObject *parent)
+ : QObject(d, parent)
+{
+}
+
+int QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+ int saved_id = _id;
+ _id = QObject::qt_metacall(_c, _id, _a);
+ if (_id < 0)
+ return _id;
+
+ if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty) {
+ QMetaProperty mp = metaObject()->property(saved_id);
+ int &status = *reinterpret_cast<int *>(_a[2]);
+ QVariant &variant = *reinterpret_cast<QVariant *>(_a[1]);
+
+ if (_c == QMetaObject::WriteProperty) {
+ status = d_func()->setProperty(mp, variant) ? 1 : 0;
+ } else {
+ d_func()->property(mp, variant);
+ status = variant.isValid() ? 1 : 0;
+ }
+ _id = -1;
+ }
+ return _id;
+}
/*!
\class QDBusAbstractInterface
@@ -258,10 +276,10 @@ void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,
This is the constructor called from QDBusInterface::QDBusInterface.
*/
QDBusAbstractInterface::QDBusAbstractInterface(QDBusAbstractInterfacePrivate &d, QObject *parent)
- : QObject(d, parent)
+ : QDBusAbstractInterfaceBase(d, parent)
{
// keep track of the service owner
- if (d_func()->isValid)
+ if (!d_func()->currentOwner.isEmpty())
QObject::connect(d_func()->connectionPrivate(), SIGNAL(serviceOwnerChanged(QString,QString,QString)),
this, SLOT(_q_serviceOwnerChanged(QString,QString,QString)));
}
@@ -274,7 +292,7 @@ QDBusAbstractInterface::QDBusAbstractInterface(QDBusAbstractInterfacePrivate &d,
QDBusAbstractInterface::QDBusAbstractInterface(const QString &service, const QString &path,
const char *interface, const QDBusConnection &con,
QObject *parent)
- : QObject(*new QDBusAbstractInterfacePrivate(service, path, QString::fromLatin1(interface),
+ : QDBusAbstractInterfaceBase(*new QDBusAbstractInterfacePrivate(service, path, QString::fromLatin1(interface),
con, false), parent)
{
// keep track of the service owner
@@ -300,7 +318,7 @@ QDBusAbstractInterface::~QDBusAbstractInterface()
*/
bool QDBusAbstractInterface::isValid() const
{
- return d_func()->isValid;
+ return !d_func()->currentOwner.isEmpty();
}
/*!
@@ -367,6 +385,9 @@ QDBusMessage QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode mode,
{
Q_D(QDBusAbstractInterface);
+ if (!d->isValid || !d->canMakeCalls())
+ return QDBusMessage::createError(d->lastError);
+
QString m = method;
// split out the signature from the method
int pos = method.indexOf(QLatin1Char('.'));
@@ -397,6 +418,7 @@ QDBusMessage QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode mode,
// qDebug() << "QDBusAbstractInterface" << "Service" << service() << "Path:" << path();
QDBusMessage msg = QDBusMessage::createMethodCall(service(), path(), interface(), m);
+ QDBusMessagePrivate::setParametersValidated(msg, true);
msg.setArguments(args);
QDBusMessage reply = d->connection.call(msg, mode);
@@ -425,7 +447,11 @@ QDBusPendingCall QDBusAbstractInterface::asyncCallWithArgumentList(const QString
{
Q_D(QDBusAbstractInterface);
+ if (!d->isValid || !d->canMakeCalls())
+ return QDBusPendingCall::fromError(d->lastError);
+
QDBusMessage msg = QDBusMessage::createMethodCall(service(), path(), interface(), method);
+ QDBusMessagePrivate::setParametersValidated(msg, true);
msg.setArguments(args);
return d->connection.asyncCall(msg);
}
@@ -440,7 +466,8 @@ QDBusPendingCall QDBusAbstractInterface::asyncCallWithArgumentList(const QString
This function returns true if the queueing succeeds. It does
not indicate that the executed call succeeded. If it fails,
- the \a errorMethod is called.
+ the \a errorMethod is called. If the queueing failed, this
+ function returns false and no slot will be called.
The \a returnMethod must have as its parameters the types returned
by the function call. Optionally, it may have a QDBusMessage
@@ -453,22 +480,26 @@ QDBusPendingCall QDBusAbstractInterface::asyncCallWithArgumentList(const QString
bool QDBusAbstractInterface::callWithCallback(const QString &method,
const QList<QVariant> &args,
QObject *receiver,
- const char *returnMethod,
+ const char *returnMethod,
const char *errorMethod)
{
Q_D(QDBusAbstractInterface);
+ if (!d->isValid || !d->canMakeCalls())
+ return false;
+
QDBusMessage msg = QDBusMessage::createMethodCall(service(),
- path(),
- interface(),
- method);
+ path(),
+ interface(),
+ method);
+ QDBusMessagePrivate::setParametersValidated(msg, true);
msg.setArguments(args);
d->lastError = 0;
return d->connection.callWithCallback(msg,
- receiver,
- returnMethod,
- errorMethod);
+ receiver,
+ returnMethod,
+ errorMethod);
}
/*!
@@ -492,7 +523,7 @@ bool QDBusAbstractInterface::callWithCallback(const QString &method,
bool QDBusAbstractInterface::callWithCallback(const QString &method,
const QList<QVariant> &args,
QObject *receiver,
- const char *slot)
+ const char *slot)
{
return callWithCallback(method, args, receiver, slot, 0);
}
@@ -503,13 +534,15 @@ bool QDBusAbstractInterface::callWithCallback(const QString &method,
*/
void QDBusAbstractInterface::connectNotify(const char *signal)
{
+ // someone connecting to one of our signals
+ Q_D(QDBusAbstractInterface);
+ if (!d->isValid)
+ return;
+
// we end up recursing here, so optimise away
if (qstrcmp(signal + 1, "destroyed(QObject*)") == 0)
return;
- // someone connecting to one of our signals
- Q_D(QDBusAbstractInterface);
-
QDBusConnectionPrivate *conn = d->connectionPrivate();
if (conn)
conn->connectRelay(d->service, d->currentOwner, d->path, d->interface,
@@ -524,6 +557,8 @@ void QDBusAbstractInterface::disconnectNotify(const char *signal)
{
// someone disconnecting from one of our signals
Q_D(QDBusAbstractInterface);
+ if (!d->isValid)
+ return;
QDBusConnectionPrivate *conn = d->connectionPrivate();
if (conn)
@@ -540,11 +575,7 @@ QVariant QDBusAbstractInterface::internalPropGet(const char *propname) const
// assume this property exists and is readable
// we're only called from generated code anyways
- int idx = metaObject()->indexOfProperty(propname);
- if (idx != -1)
- return d_func()->property(metaObject()->property(idx));
- qWarning("QDBusAbstractInterface::internalPropGet called with unknown property '%s'", propname);
- return QVariant(); // error
+ return property(propname);
}
/*!
@@ -553,16 +584,7 @@ QVariant QDBusAbstractInterface::internalPropGet(const char *propname) const
*/
void QDBusAbstractInterface::internalPropSet(const char *propname, const QVariant &value)
{
- Q_D(QDBusAbstractInterface);
-
- // assume this property exists and is writeable
- // we're only called from generated code anyways
-
- int idx = metaObject()->indexOfProperty(propname);
- if (idx != -1)
- d->setProperty(metaObject()->property(idx), value);
- else
- qWarning("QDBusAbstractInterface::internalPropGet called with unknown property '%s'", propname);
+ setProperty(propname, value);
}
/*!
diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h
index 6400b26..e525f77 100644
--- a/src/dbus/qdbusabstractinterface.h
+++ b/src/dbus/qdbusabstractinterface.h
@@ -61,7 +61,23 @@ class QDBusError;
class QDBusPendingCall;
class QDBusAbstractInterfacePrivate;
-class QDBUS_EXPORT QDBusAbstractInterface: public QObject
+
+class QDBUS_EXPORT QDBusAbstractInterfaceBase: public QObject
+{
+public:
+ int qt_metacall(QMetaObject::Call, int, void**);
+protected:
+ QDBusAbstractInterfaceBase(QDBusAbstractInterfacePrivate &dd, QObject *parent);
+private:
+ Q_DECLARE_PRIVATE(QDBusAbstractInterface)
+};
+
+class QDBUS_EXPORT QDBusAbstractInterface:
+#ifdef Q_QDOC
+ public QObject
+#else
+ public QDBusAbstractInterfaceBase
+#endif
{
Q_OBJECT
diff --git a/src/dbus/qdbusabstractinterface_p.h b/src/dbus/qdbusabstractinterface_p.h
index e2ea058..65df902 100644
--- a/src/dbus/qdbusabstractinterface_p.h
+++ b/src/dbus/qdbusabstractinterface_p.h
@@ -75,15 +75,19 @@ public:
QString path;
QString interface;
mutable QDBusError lastError;
+
+ // this is set during creation and never changed
+ // it can't be const because QDBusInterfacePrivate has one more check
bool isValid;
QDBusAbstractInterfacePrivate(const QString &serv, const QString &p,
const QString &iface, const QDBusConnection& con, bool dynamic);
virtual ~QDBusAbstractInterfacePrivate() { }
+ bool canMakeCalls() const;
// these functions do not check if the property is valid
- QVariant property(const QMetaProperty &mp) const;
- void setProperty(const QMetaProperty &mp, const QVariant &value);
+ void property(const QMetaProperty &mp, QVariant &where) const;
+ bool setProperty(const QMetaProperty &mp, const QVariant &value);
// return conn's d pointer
inline QDBusConnectionPrivate *connectionPrivate() const
diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h
index b49a517..78bc683 100644
--- a/src/dbus/qdbusargument_p.h
+++ b/src/dbus/qdbusargument_p.h
@@ -130,7 +130,7 @@ public:
QDBusMarshaller *endCommon();
void open(QDBusMarshaller &sub, int code, const char *signature);
void close();
- void error();
+ void error(const QString &message);
bool appendVariantInternal(const QVariant &arg);
bool appendRegisteredType(const QVariant &arg);
@@ -140,6 +140,7 @@ public:
DBusMessageIter iterator;
QDBusMarshaller *parent;
QByteArray *ba;
+ QString errorString;
char closeCode;
bool ok;
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index 6777aa5..14cadd9 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -973,8 +973,15 @@ QDBusConnection QDBusConnection::systemBus()
}
/*!
+ \nonreentrant
+
Returns the connection that sent the signal, if called in a slot activated
by QDBus; otherwise it returns 0.
+
+ \note Please avoid this function. This function is not thread-safe, so if
+ there's any other thread delivering a D-Bus call, this function may return
+ the wrong connection. In new code, please use QDBusContext::connection()
+ (see that class for a description on how to use it).
*/
QDBusConnection QDBusConnection::sender()
{
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index 5c37509..a156a71 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -300,6 +300,8 @@ public:
extern int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes);
extern int qDBusNameToTypeId(const char *name);
extern bool qDBusCheckAsyncTag(const char *tag);
+extern bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name);
+extern QString qDBusInterfaceFromMetaObject(const QMetaObject *mo);
// in qdbusinternalfilters.cpp
extern QString qDBusIntrospectObject(const QDBusConnectionPrivate::ObjectTreeNode &node);
@@ -310,9 +312,6 @@ extern QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNod
extern QDBusMessage qDBusPropertyGetAll(const QDBusConnectionPrivate::ObjectTreeNode &node,
const QDBusMessage &msg);
-// in qdbusxmlgenerator.cpp
-extern QString qDBusInterfaceFromMetaObject(const QMetaObject *mo);
-
QT_END_NAMESPACE
#endif
diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp
index 4f50e4f..caa2437 100644
--- a/src/dbus/qdbuserror.cpp
+++ b/src/dbus/qdbuserror.cpp
@@ -91,6 +91,10 @@ org.freedesktop.DBus.Error.InvalidSignature
org.freedesktop.DBus.Error.UnknownInterface
com.trolltech.QtDBus.Error.InternalError
org.freedesktop.DBus.Error.UnknownObject
+com.trolltech.QtDBus.Error.InvalidService
+com.trolltech.QtDBus.Error.InvalidObjectPath
+com.trolltech.QtDBus.Error.InvalidInterface
+com.trolltech.QtDBus.Error.InvalidMember
*/
// in the same order as KnownErrors!
@@ -116,12 +120,17 @@ static const char errorMessages_string[] =
"org.freedesktop.DBus.Error.UnknownInterface\0"
"com.trolltech.QtDBus.Error.InternalError\0"
"org.freedesktop.DBus.Error.UnknownObject\0"
+ "com.trolltech.QtDBus.Error.InvalidService\0"
+ "com.trolltech.QtDBus.Error.InvalidObjectPath\0"
+ "com.trolltech.QtDBus.Error.InvalidInterface\0"
+ "com.trolltech.QtDBus.Error.InvalidMember\0"
"\0";
static const int errorMessages_indices[] = {
0, 6, 40, 76, 118, 153, 191, 231,
273, 313, 349, 384, 421, 461, 501, 540,
- 581, 617, 661, 705, 746, 0
+ 581, 617, 661, 705, 746, 787, 829, 874,
+ 918, 0
};
static const int errorMessages_count = sizeof errorMessages_indices /
@@ -216,8 +225,16 @@ static inline QDBusError::ErrorType get(const char *name)
\value UnknownInterface The interface is not known
\value InternalError An internal error occurred
(\c com.trolltech.QtDBus.Error.InternalError)
- \value UnknownObject The remote object could not be found.
+ \value InvalidObjectPath The object path provided is invalid.
+
+ \value InvalidService The service requested is invalid.
+
+ \value InvalidMember The member is invalid.
+
+ \value InvalidInterface The interface is invalid.
+
+ \value UnknownObject The remote object could not be found.
*/
/*!
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h
index 7b77fd5..4e348dd 100644
--- a/src/dbus/qdbuserror.h
+++ b/src/dbus/qdbuserror.h
@@ -81,10 +81,14 @@ public:
UnknownInterface,
InternalError,
UnknownObject,
+ InvalidService,
+ InvalidObjectPath,
+ InvalidInterface,
+ InvalidMember,
#ifndef Q_QDOC
// don't use this one!
- LastErrorType = UnknownObject
+ LastErrorType = InvalidMember
#endif
};
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 97a4545..e6c69b6 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1143,10 +1143,14 @@ void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, in
QDBusReadLocker locker(RelaySignalAction, this);
QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/"), interface,
QLatin1String(memberName));
+ QDBusMessagePrivate::setParametersValidated(message, true);
message.setArguments(args);
- DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message);
+ QDBusError error;
+ DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, &error);
if (!msg) {
- qWarning("QDBusConnection: Could not emit signal %s.%s", qPrintable(interface), memberName.constData());
+ qWarning("QDBusConnection: Could not emit signal %s.%s: %s", qPrintable(interface), memberName.constData(),
+ qPrintable(error.message()));
+ lastError = error;
return;
}
@@ -1359,12 +1363,8 @@ void QDBusConnectionPrivate::activateObject(ObjectTreeNode &node, const QDBusMes
// try the object itself:
if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots)) {
bool interfaceFound = true;
- if (!msg.interface().isEmpty()) {
- // check if the interface name matches anything in the class hierarchy
- const QMetaObject *mo = node.obj->metaObject();
- for ( ; !interfaceFound && mo != &QObject::staticMetaObject; mo = mo->superClass())
- interfaceFound = msg.interface() == qDBusInterfaceFromMetaObject(mo);
- }
+ if (!msg.interface().isEmpty())
+ interfaceFound = qDBusInterfaceInObject(node.obj, msg.interface());
if (interfaceFound) {
if (!activateCall(node.obj, node.flags, msg))
@@ -1702,21 +1702,26 @@ int QDBusConnectionPrivate::send(const QDBusMessage& message)
return -1; // don't send; the reply will be retrieved by the caller
// through the d_ptr->localReply link
- DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message);
+ QDBusError error;
+ DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, &error);
if (!msg) {
if (message.type() == QDBusMessage::MethodCallMessage)
- qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\"",
+ qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\": %s",
qPrintable(message.service()), qPrintable(message.path()),
- qPrintable(message.interface()), qPrintable(message.member()));
+ qPrintable(message.interface()), qPrintable(message.member()),
+ qPrintable(error.message()));
else if (message.type() == QDBusMessage::SignalMessage)
- qWarning("QDBusConnection: error: could not send signal path \"%s\" interface \"%s\" member \"%s\"",
+ qWarning("QDBusConnection: error: could not send signal path \"%s\" interface \"%s\" member \"%s\": %s",
qPrintable(message.path()), qPrintable(message.interface()),
- qPrintable(message.member()));
+ qPrintable(message.member()),
+ qPrintable(error.message()));
else
- qWarning("QDBusConnection: error: could not send %s message to service \"%s\"",
+ qWarning("QDBusConnection: error: could not send %s message to service \"%s\": %s",
message.type() == QDBusMessage::ReplyMessage ? "reply" :
message.type() == QDBusMessage::ErrorMessage ? "error" :
- "invalid", qPrintable(message.service()));
+ "invalid", qPrintable(message.service()),
+ qPrintable(error.message()));
+ lastError = error;
return 0;
}
@@ -1743,12 +1748,15 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
return sendWithReplyLocal(message);
if (!QCoreApplication::instance() || sendMode == QDBus::Block) {
- DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message);
+ QDBusError err;
+ DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, &err);
if (!msg) {
- qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\"",
+ qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\": %s",
qPrintable(message.service()), qPrintable(message.path()),
- qPrintable(message.interface()), qPrintable(message.member()));
- return QDBusMessage();
+ qPrintable(message.interface()), qPrintable(message.member()),
+ qPrintable(err.message()));
+ lastError = err;
+ return QDBusMessage::createError(err);
}
qDBusDebug() << QThread::currentThread() << "sending message (blocking):" << message;
@@ -1758,9 +1766,8 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
q_dbus_message_unref(msg);
if (!!error) {
- QDBusError qe = error;
- lastError = qe;
- return QDBusMessage::createError(qe);
+ lastError = err = error;
+ return QDBusMessage::createError(err);
}
QDBusMessage amsg = QDBusMessagePrivate::fromDBusMessage(reply);
@@ -1770,16 +1777,17 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
return amsg;
} else { // use the event loop
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, timeout);
- if (!pcall)
- return QDBusMessage();
+ Q_ASSERT(pcall);
- pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
- QEventLoop loop;
- loop.connect(pcall->watcherHelper, SIGNAL(reply(QDBusMessage)), SLOT(quit()));
- loop.connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), SLOT(quit()));
+ if (pcall->replyMessage.type() != QDBusMessage::InvalidMessage) {
+ pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
+ QEventLoop loop;
+ loop.connect(pcall->watcherHelper, SIGNAL(reply(QDBusMessage)), SLOT(quit()));
+ loop.connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), SLOT(quit()));
- // enter the event loop and wait for a reply
- loop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents);
+ // enter the event loop and wait for a reply
+ loop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents);
+ }
QDBusMessage reply = pcall->replyMessage;
lastError = reply; // set or clear error
@@ -1835,20 +1843,25 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
return pcall;
}
- DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message);
+ checkThread();
+ QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate;
+ pcall->sentMessage = message;
+ pcall->ref = 0;
+
+ QDBusError error;
+ DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, &error);
if (!msg) {
- qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\"",
+ qWarning("QDBusConnection: error: could not send message to service \"%s\" path \"%s\" interface \"%s\" member \"%s\": %s",
qPrintable(message.service()), qPrintable(message.path()),
- qPrintable(message.interface()), qPrintable(message.member()));
- return 0;
+ qPrintable(message.interface()), qPrintable(message.member()),
+ qPrintable(error.message()));
+ pcall->replyMessage = QDBusMessage::createError(error);
+ lastError = error;
+ return pcall;
}
- checkThread();
qDBusDebug() << QThread::currentThread() << "sending message (async):" << message;
DBusPendingCall *pending = 0;
- QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate;
- pcall->sentMessage = message;
- pcall->ref = 0;
QDBusDispatchLocker locker(SendWithReplyAsyncAction, this);
if (q_dbus_connection_send_with_reply(connection, msg, &pending, timeout)) {
@@ -1862,14 +1875,14 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
return pcall;
} else {
// we're probably disconnected at this point
- lastError = QDBusError(QDBusError::Disconnected, QLatin1String("Not connected to server"));
+ lastError = error = QDBusError(QDBusError::Disconnected, QLatin1String("Not connected to server"));
}
} else {
- lastError = QDBusError(QDBusError::NoMemory, QLatin1String("Out of memory"));
+ lastError = error = QDBusError(QDBusError::NoMemory, QLatin1String("Out of memory"));
}
q_dbus_message_unref(msg);
- pcall->replyMessage = QDBusMessage::createError(lastError);
+ pcall->replyMessage = QDBusMessage::createError(error);
return pcall;
}
@@ -1878,8 +1891,7 @@ int QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message, QObj
int timeout)
{
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, timeout);
- if (!pcall)
- return 0;
+ Q_ASSERT(pcall);
// has it already finished (dispatched locally)?
if (pcall->replyMessage.type() == QDBusMessage::ReplyMessage) {
@@ -2081,6 +2093,7 @@ QString QDBusConnectionPrivate::getNameOwner(const QString& serviceName)
QDBusMessage msg = QDBusMessage::createMethodCall(QLatin1String(DBUS_SERVICE_DBUS),
QLatin1String(DBUS_PATH_DBUS), QLatin1String(DBUS_INTERFACE_DBUS),
QLatin1String("GetNameOwner"));
+ QDBusMessagePrivate::setParametersValidated(msg, true);
msg << serviceName;
QDBusMessage reply = sendWithReply(msg, QDBus::Block);
if (reply.type() == QDBusMessage::ReplyMessage)
@@ -2104,6 +2117,7 @@ QDBusConnectionPrivate::findMetaObject(const QString &service, const QString &pa
QDBusMessage msg = QDBusMessage::createMethodCall(service, path,
QLatin1String(DBUS_INTERFACE_INTROSPECTABLE),
QLatin1String("Introspect"));
+ QDBusMessagePrivate::setParametersValidated(msg, true);
QDBusMessage reply = sendWithReply(msg, QDBus::Block);
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index 211b717..5f6df0a 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -51,6 +51,102 @@
QT_BEGIN_NAMESPACE
+static void copyArgument(void *to, int id, const QVariant &arg)
+{
+ if (id == arg.userType()) {
+ switch (id) {
+ case QVariant::Bool:
+ *reinterpret_cast<bool *>(to) = arg.toBool();
+ return;
+
+ case QMetaType::UChar:
+ *reinterpret_cast<uchar *>(to) = arg.value<uchar>();
+ return;
+
+ case QMetaType::Short:
+ *reinterpret_cast<short *>(to) = arg.value<short>();
+ return;
+
+ case QMetaType::UShort:
+ *reinterpret_cast<ushort *>(to) = arg.value<ushort>();
+ return;
+
+ case QVariant::Int:
+ *reinterpret_cast<int *>(to) = arg.toInt();
+ return;
+
+ case QVariant::UInt:
+ *reinterpret_cast<uint *>(to) = arg.toUInt();
+ return;
+
+ case QVariant::LongLong:
+ *reinterpret_cast<qlonglong *>(to) = arg.toLongLong();
+ return;
+
+ case QVariant::ULongLong:
+ *reinterpret_cast<qulonglong *>(to) = arg.toULongLong();
+ return;
+
+ case QVariant::Double:
+ *reinterpret_cast<double *>(to) = arg.toDouble();
+ return;
+
+ case QVariant::String:
+ *reinterpret_cast<QString *>(to) = arg.toString();
+ return;
+
+ case QVariant::ByteArray:
+ *reinterpret_cast<QByteArray *>(to) = arg.toByteArray();
+ return;
+
+ case QVariant::StringList:
+ *reinterpret_cast<QStringList *>(to) = arg.toStringList();
+ return;
+ }
+
+ if (id == QDBusMetaTypeId::variant) {
+ *reinterpret_cast<QDBusVariant *>(to) = arg.value<QDBusVariant>();
+ return;
+ } else if (id == QDBusMetaTypeId::objectpath) {
+ *reinterpret_cast<QDBusObjectPath *>(to) = arg.value<QDBusObjectPath>();
+ return;
+ } else if (id == QDBusMetaTypeId::signature) {
+ *reinterpret_cast<QDBusSignature *>(to) = arg.value<QDBusSignature>();
+ return;
+ }
+
+ // those above are the only types possible
+ // the demarshaller code doesn't demarshall anything else
+ qFatal("Found a decoded basic type in a D-Bus reply that shouldn't be there");
+ }
+
+ // if we got here, it's either an un-dermarshalled type or a mismatch
+ if (arg.userType() != QDBusMetaTypeId::argument) {
+ // it's a mismatch
+ //qWarning?
+ return;
+ }
+
+ // is this type registered?
+ const char *userSignature = QDBusMetaType::typeToSignature(id);
+ if (!userSignature || !*userSignature) {
+ // type not registered
+ //qWarning?
+ return;
+ }
+
+ // is it the same signature?
+ QDBusArgument dbarg = arg.value<QDBusArgument>();
+ if (dbarg.currentSignature() != QLatin1String(userSignature)) {
+ // not the same signature, another mismatch
+ //qWarning?
+ return;
+ }
+
+ // we can demarshall
+ QDBusMetaType::demarshall(dbarg, id, to);
+}
+
QDBusInterfacePrivate::QDBusInterfacePrivate(const QString &serv, const QString &p,
const QString &iface, const QDBusConnection &con)
: QDBusAbstractInterfacePrivate(serv, p, iface, con, true), metaObject(0)
@@ -186,45 +282,39 @@ int QDBusInterfacePrivate::metacall(QMetaObject::Call c, int id, void **argv)
// we will assume that the input arguments were passed correctly
QVariantList args;
- for (int i = 1; i <= inputTypesCount; ++i)
+ int i = 1;
+ for ( ; i <= inputTypesCount; ++i)
args << QVariant(inputTypes[i], argv[i]);
// make the call
- QPointer<QDBusInterface> qq = q;
QDBusMessage reply = q->callWithArgumentList(QDBus::Block, methodName, args);
- args.clear();
- // we ignore return values
+ if (reply.type() == QDBusMessage::ReplyMessage) {
+ // attempt to demarshall the return values
+ args = reply.arguments();
+ QVariantList::ConstIterator it = args.constBegin();
+ const int *outputTypes = metaObject->outputTypesForMethod(id);
+ int outputTypesCount = *outputTypes++;
+
+ if (*mm.typeName()) {
+ // this method has a return type
+ if (argv[0] && it != args.constEnd())
+ copyArgument(argv[0], *outputTypes++, *it);
- // access to "this" or to "q" below this point must check for "qq"
- // we may have been deleted!
+ // skip this argument even if we didn't copy it
+ --outputTypesCount;
+ ++it;
+ }
- if (!qq.isNull())
- lastError = reply;
+ for (int j = 0; j < outputTypesCount && it != args.constEnd(); ++i, ++j, ++it) {
+ copyArgument(argv[i], outputTypes[j], *it);
+ }
+ }
// done
+ lastError = reply;
return -1;
}
- } else if (c == QMetaObject::ReadProperty) {
- // Qt doesn't support non-readable properties
- // we have to re-check
- QMetaProperty mp = metaObject->property(id + metaObject->propertyOffset());
- if (!mp.isReadable())
- return -1; // don't read
-
- QVariant *value = reinterpret_cast<QVariant*>(argv[1]);
- argv[1] = 0;
- *value = property(mp);
-
- return -1; // handled, error or not
- } else if (c == QMetaObject::WriteProperty) {
- // QMetaProperty::write has already checked that we're writable
- // it has also checked that the type is right
- QVariant *value = reinterpret_cast<QVariant *>(argv[1]);
- QMetaProperty mp = metaObject->property(id + metaObject->propertyOffset());
-
- setProperty(mp, *value);
- return -1;
}
return id;
}
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp
index 416144d..45cbbb0 100644
--- a/src/dbus/qdbusinternalfilters.cpp
+++ b/src/dbus/qdbusinternalfilters.cpp
@@ -53,6 +53,7 @@
#include "qdbusextratypes.h"
#include "qdbusmessage.h"
#include "qdbusmetatype.h"
+#include "qdbusmetatype_p.h"
#include "qdbusmessage_p.h"
#include "qdbusutil_p.h"
@@ -177,14 +178,25 @@ QString qDBusIntrospectObject(const QDBusConnectionPrivate::ObjectTreeNode &node
// implement the D-Bus interface org.freedesktop.DBus.Properties
-static QDBusMessage qDBusPropertyError(const QDBusMessage &msg, const QString &interface_name)
+static inline QDBusMessage interfaceNotFoundError(const QDBusMessage &msg, const QString &interface_name)
{
- return msg.createErrorReply(QLatin1String(DBUS_ERROR_INVALID_ARGS),
+ return msg.createErrorReply(QDBusError::UnknownInterface,
QString::fromLatin1("Interface %1 was not found in object %2")
.arg(interface_name)
.arg(msg.path()));
}
+static inline QDBusMessage
+propertyNotFoundError(const QDBusMessage &msg, const QString &interface_name, const QByteArray &property_name)
+{
+ return msg.createErrorReply(QDBusError::InvalidArgs,
+ QString::fromLatin1("Property %1%2%3 was not found in object %4")
+ .arg(interface_name,
+ QString::fromLatin1(interface_name.isEmpty() ? "" : "."),
+ QString::fromLatin1(property_name),
+ msg.path()));
+}
+
QDBusMessage qDBusPropertyGet(const QDBusConnectionPrivate::ObjectTreeNode &node,
const QDBusMessage &msg)
{
@@ -198,6 +210,7 @@ QDBusMessage qDBusPropertyGet(const QDBusConnectionPrivate::ObjectTreeNode &node
QDBusAdaptorConnector *connector;
QVariant value;
+ bool interfaceFound = false;
if (node.flags & QDBusConnection::ExportAdaptors &&
(connector = qDBusFindAdaptorConnector(node.obj))) {
@@ -217,31 +230,122 @@ QDBusMessage qDBusPropertyGet(const QDBusConnectionPrivate::ObjectTreeNode &node
QDBusAdaptorConnector::AdaptorMap::ConstIterator it;
it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(),
interface_name);
- if (it != connector->adaptors.constEnd() && interface_name == QLatin1String(it->interface))
+ if (it != connector->adaptors.constEnd() && interface_name == QLatin1String(it->interface)) {
+ interfaceFound = true;
value = it->adaptor->property(property_name);
+ }
}
}
- if (!value.isValid() && node.flags & (QDBusConnection::ExportAllProperties |
- QDBusConnection::ExportNonScriptableProperties)) {
+ if (!interfaceFound && !value.isValid()
+ && node.flags & (QDBusConnection::ExportAllProperties |
+ QDBusConnection::ExportNonScriptableProperties)) {
// try the object itself
- int pidx = node.obj->metaObject()->indexOfProperty(property_name);
- if (pidx != -1) {
- QMetaProperty mp = node.obj->metaObject()->property(pidx);
- if ((mp.isScriptable() && (node.flags & QDBusConnection::ExportScriptableProperties)) ||
- (!mp.isScriptable() && (node.flags & QDBusConnection::ExportNonScriptableProperties)))
- value = mp.read(node.obj);
+ if (!interface_name.isEmpty())
+ interfaceFound = qDBusInterfaceInObject(node.obj, interface_name);
+
+ if (interfaceFound) {
+ int pidx = node.obj->metaObject()->indexOfProperty(property_name);
+ if (pidx != -1) {
+ QMetaProperty mp = node.obj->metaObject()->property(pidx);
+ if ((mp.isScriptable() && (node.flags & QDBusConnection::ExportScriptableProperties)) ||
+ (!mp.isScriptable() && (node.flags & QDBusConnection::ExportNonScriptableProperties)))
+ value = mp.read(node.obj);
+ }
}
}
if (!value.isValid()) {
// the property was not found
- return qDBusPropertyError(msg, interface_name);
+ if (!interfaceFound)
+ return interfaceNotFoundError(msg, interface_name);
+ return propertyNotFoundError(msg, interface_name, property_name);
}
return msg.createReply(qVariantFromValue(QDBusVariant(value)));
}
+enum PropertyWriteResult {
+ PropertyWriteSuccess = 0,
+ PropertyNotFound,
+ PropertyTypeMismatch,
+ PropertyWriteFailed
+};
+
+static QDBusMessage propertyWriteReply(const QDBusMessage &msg, const QString &interface_name,
+ const QByteArray &property_name, int status)
+{
+ switch (status) {
+ case PropertyNotFound:
+ return propertyNotFoundError(msg, interface_name, property_name);
+ case PropertyTypeMismatch:
+ return msg.createErrorReply(QDBusError::InvalidArgs,
+ QString::fromLatin1("Invalid arguments for writing to property %1%2%3")
+ .arg(interface_name,
+ QString::fromLatin1(interface_name.isEmpty() ? "" : "."),
+ QString::fromLatin1(property_name)));
+ case PropertyWriteFailed:
+ return msg.createErrorReply(QDBusError::InternalError,
+ QString::fromLatin1("Internal error"));
+
+ case PropertyWriteSuccess:
+ return msg.createReply();
+ }
+ Q_ASSERT_X(false, "", "Should not be reached");
+ return QDBusMessage();
+}
+
+static int writeProperty(QObject *obj, const QByteArray &property_name, QVariant value,
+ int propFlags = QDBusConnection::ExportAllProperties)
+{
+ const QMetaObject *mo = obj->metaObject();
+ int pidx = mo->indexOfProperty(property_name);
+ if (pidx == -1) {
+ // this object has no property by that name
+ return PropertyNotFound;
+ }
+
+ QMetaProperty mp = mo->property(pidx);
+
+ // check if this property is exported
+ bool isScriptable = mp.isScriptable();
+ if (!(propFlags & QDBusConnection::ExportScriptableProperties) && isScriptable)
+ return PropertyNotFound;
+ if (!(propFlags & QDBusConnection::ExportNonScriptableProperties) && !isScriptable)
+ return PropertyNotFound;
+
+ // we found our property
+ // do we have the right type?
+ int id = mp.type();
+ if (id == QVariant::UserType) {
+ // dynamic type
+ id = qDBusNameToTypeId(mp.typeName());
+ if (id == -1) {
+ // type not registered?
+ qWarning("QDBusConnection: Unable to handle unregistered datatype '%s' for property '%s::%s'",
+ mp.typeName(), mo->className(), property_name.constData());
+ return PropertyWriteFailed;
+ }
+ }
+
+ if (id != 0xff && value.userType() == QDBusMetaTypeId::argument) {
+ // we have to demarshall before writing
+ void *null = 0;
+ QVariant other(id, null);
+ if (!QDBusMetaType::demarshall(qVariantValue<QDBusArgument>(value), id, other.data())) {
+ qWarning("QDBusConnection: type `%s' (%d) is not registered with QtDBus. "
+ "Use qDBusRegisterMetaType to register it",
+ mp.typeName(), id);
+ return PropertyWriteFailed;
+ }
+
+ value = other;
+ }
+
+ // the property type here should match
+ return mp.write(obj, value) ? PropertyWriteSuccess : PropertyWriteFailed;
+}
+
QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node,
const QDBusMessage &msg)
{
@@ -263,38 +367,39 @@ QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node
if (interface_name.isEmpty()) {
for (QDBusAdaptorConnector::AdaptorMap::ConstIterator it = connector->adaptors.constBegin(),
end = connector->adaptors.constEnd(); it != end; ++it) {
- const QMetaObject *mo = it->adaptor->metaObject();
- int pidx = mo->indexOfProperty(property_name);
- if (pidx != -1) {
- mo->property(pidx).write(it->adaptor, value);
- return msg.createReply();
- }
+ int status = writeProperty(it->adaptor, property_name, value);
+ if (status == PropertyNotFound)
+ continue;
+ return propertyWriteReply(msg, interface_name, property_name, status);
}
} else {
QDBusAdaptorConnector::AdaptorMap::ConstIterator it;
it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(),
interface_name);
- if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface))
- if (it->adaptor->setProperty(property_name, value))
- return msg.createReply();
+ if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) {
+ return propertyWriteReply(msg, interface_name, property_name,
+ writeProperty(it->adaptor, property_name, value));
+ }
}
}
if (node.flags & (QDBusConnection::ExportScriptableProperties |
QDBusConnection::ExportNonScriptableProperties)) {
// try the object itself
- int pidx = node.obj->metaObject()->indexOfProperty(property_name);
- if (pidx != -1) {
- QMetaProperty mp = node.obj->metaObject()->property(pidx);
- if ((mp.isScriptable() && (node.flags & QDBusConnection::ExportScriptableProperties)) ||
- (!mp.isScriptable() && (node.flags & QDBusConnection::ExportNonScriptableProperties)))
- if (mp.write(node.obj, value))
- return msg.createReply();
+ bool interfaceFound = true;
+ if (!interface_name.isEmpty())
+ interfaceFound = qDBusInterfaceInObject(node.obj, interface_name);
+
+ if (interfaceFound) {
+ return propertyWriteReply(msg, interface_name, property_name,
+ writeProperty(node.obj, property_name, value, node.flags));
}
}
- // the property was not found or not written to
- return qDBusPropertyError(msg, interface_name);
+ // the property was not found
+ if (!interface_name.isEmpty())
+ return interfaceNotFoundError(msg, interface_name);
+ return propertyWriteReply(msg, interface_name, property_name, PropertyNotFound);
}
// unite two QVariantMaps, but don't generate duplicate keys
@@ -385,7 +490,7 @@ QDBusMessage qDBusPropertyGetAll(const QDBusConnectionPrivate::ObjectTreeNode &n
if (!interfaceFound && !interface_name.isEmpty()) {
// the interface was not found
- return qDBusPropertyError(msg, interface_name);
+ return interfaceNotFoundError(msg, interface_name);
}
return msg.createReply(qVariantFromValue(result));
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp
index 7ada1ed..bb7fa6b 100644
--- a/src/dbus/qdbusmarshaller.cpp
+++ b/src/dbus/qdbusmarshaller.cpp
@@ -121,7 +121,7 @@ inline void QDBusMarshaller::append(const QDBusObjectPath &arg)
{
QByteArray data = arg.path().toUtf8();
if (!ba && data.isEmpty())
- error();
+ error(QLatin1String("Invalid object path passed in arguments"));
const char *cdata = data.constData();
qIterAppend(&iterator, ba, DBUS_TYPE_OBJECT_PATH, &cdata);
}
@@ -130,7 +130,7 @@ inline void QDBusMarshaller::append(const QDBusSignature &arg)
{
QByteArray data = arg.signature().toUtf8();
if (!ba && data.isEmpty())
- error();
+ error(QLatin1String("Invalid signature passed in arguments"));
const char *cdata = data.constData();
qIterAppend(&iterator, ba, DBUS_TYPE_SIGNATURE, &cdata);
}
@@ -161,7 +161,7 @@ inline bool QDBusMarshaller::append(const QDBusVariant &arg)
QVariant::Type id = QVariant::Type(value.userType());
if (id == QVariant::Invalid) {
qWarning("QDBusMarshaller: cannot add a null QDBusVariant");
- error();
+ error(QLatin1String("Variant containing QVariant::Invalid passed in arguments"));
return false;
}
@@ -180,7 +180,8 @@ inline bool QDBusMarshaller::append(const QDBusVariant &arg)
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
QVariant::typeToName( id ), id);
- error();
+ error(QString::fromLatin1("Unregistered type %1 passed in arguments")
+ .arg(QLatin1String(QVariant::typeToName(id))));
return false;
}
@@ -220,7 +221,8 @@ inline QDBusMarshaller *QDBusMarshaller::beginArray(int id)
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
QVariant::typeToName( QVariant::Type(id) ), id);
- error();
+ error(QString::fromLatin1("Unregistered type %1 passed in arguments")
+ .arg(QLatin1String(QVariant::typeToName(QVariant::Type(id)))));
return this;
}
@@ -234,22 +236,26 @@ inline QDBusMarshaller *QDBusMarshaller::beginMap(int kid, int vid)
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
QVariant::typeToName( QVariant::Type(kid) ), kid);
- error();
+ error(QString::fromLatin1("Unregistered type %1 passed in arguments")
+ .arg(QLatin1String(QVariant::typeToName(QVariant::Type(kid)))));
return this;
}
if (ksignature[1] != 0 || !q_dbus_type_is_basic(*ksignature)) {
qWarning("QDBusMarshaller: type '%s' (%d) cannot be used as the key type in a D-BUS map.",
QVariant::typeToName( QVariant::Type(kid) ), kid);
- error();
+ error(QString::fromLatin1("Type %1 passed in arguments cannot be used as a key in a map")
+ .arg(QLatin1String(QVariant::typeToName(QVariant::Type(kid)))));
return this;
}
const char *vsignature = QDBusMetaType::typeToSignature( QVariant::Type(vid) );
if (!vsignature) {
+ const char *typeName = QVariant::typeToName(QVariant::Type(vid));
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
- QVariant::typeToName( QVariant::Type(vid) ), vid);
- error();
+ typeName, vid);
+ error(QString::fromLatin1("Unregistered type %1 passed in arguments")
+ .arg(QLatin1String(typeName)));
return this;
}
@@ -328,11 +334,13 @@ void QDBusMarshaller::close()
}
}
-void QDBusMarshaller::error()
+void QDBusMarshaller::error(const QString &msg)
{
ok = false;
if (parent)
- parent->error();
+ parent->error(msg);
+ else
+ errorString = msg;
}
bool QDBusMarshaller::appendVariantInternal(const QVariant &arg)
@@ -340,7 +348,7 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg)
int id = arg.userType();
if (id == QVariant::Invalid) {
qWarning("QDBusMarshaller: cannot add an invalid QVariant");
- error();
+ error(QLatin1String("Variant containing QVariant::Invalid passed in arguments"));
return false;
}
@@ -371,7 +379,8 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg)
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
QVariant::typeToName( QVariant::Type(id) ), id);
- error();
+ error(QString::fromLatin1("Unregistered type %1 passed in arguments")
+ .arg(QLatin1String(QVariant::typeToName(QVariant::Type(id)))));
return false;
}
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index 47dd34b..78de6d9 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -62,7 +62,8 @@ static inline const char *data(const QByteArray &arr)
QDBusMessagePrivate::QDBusMessagePrivate()
: msg(0), reply(0), type(DBUS_MESSAGE_TYPE_INVALID),
- timeout(-1), localReply(0), ref(1), delayedReply(false), localMessage(false)
+ timeout(-1), localReply(0), ref(1), delayedReply(false), localMessage(false),
+ parametersValidated(false)
{
}
@@ -94,11 +95,17 @@ QString QDBusMessage::errorMessage() const
\internal
Constructs a DBusMessage object from this object. The returned value must be de-referenced
with q_dbus_message_unref.
+
+ The \a error object is set to indicate the error if anything went wrong with the
+ marshalling. Usually, this error message will be placed in the reply, as if the call failed.
+ The \a error pointer must not be null.
*/
-DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message)
+DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDBusError *error)
{
- if (!qdbus_loadLibDBus())
+ if (!qdbus_loadLibDBus()) {
+ *error = QDBusError(QDBusError::Failed, QLatin1String("Could not open lidbus-1 library"));
return 0;
+ }
DBusMessage *msg = 0;
const QDBusMessagePrivate *d_ptr = message.d_ptr;
@@ -108,8 +115,20 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message)
//qDebug() << "QDBusMessagePrivate::toDBusMessage" << "message is invalid";
break;
case DBUS_MESSAGE_TYPE_METHOD_CALL:
- msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), data(d_ptr->path.toUtf8()),
- data(d_ptr->interface.toUtf8()), data(d_ptr->name.toUtf8()));
+ // only service and interface can be empty -> path and name must not be empty
+ if (!d_ptr->parametersValidated) {
+ if (!QDBusUtil::checkBusName(d_ptr->service, QDBusUtil::EmptyAllowed, error))
+ return 0;
+ if (!QDBusUtil::checkObjectPath(d_ptr->path, QDBusUtil::EmptyNotAllowed, error))
+ return 0;
+ if (!QDBusUtil::checkInterfaceName(d_ptr->interface, QDBusUtil::EmptyAllowed, error))
+ return 0;
+ if (!QDBusUtil::checkMemberName(d_ptr->name, QDBusUtil::EmptyNotAllowed, error, "method"))
+ return 0;
+ }
+
+ msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(),
+ data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8());
break;
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN);
@@ -119,31 +138,41 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message)
}
break;
case DBUS_MESSAGE_TYPE_ERROR:
+ // error name can't be empty
+ if (!d_ptr->parametersValidated
+ && !QDBusUtil::checkErrorName(d_ptr->name, QDBusUtil::EmptyNotAllowed, error))
+ return 0;
+
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_ERROR);
- q_dbus_message_set_error_name(msg, data(d_ptr->name.toUtf8()));
+ q_dbus_message_set_error_name(msg, d_ptr->name.toUtf8());
if (!d_ptr->localMessage) {
q_dbus_message_set_destination(msg, q_dbus_message_get_sender(d_ptr->reply));
q_dbus_message_set_reply_serial(msg, q_dbus_message_get_serial(d_ptr->reply));
}
break;
case DBUS_MESSAGE_TYPE_SIGNAL:
- msg = q_dbus_message_new_signal(data(d_ptr->path.toUtf8()), data(d_ptr->interface.toUtf8()),
- data(d_ptr->name.toUtf8()));
+ // nothing can be empty here
+ if (!d_ptr->parametersValidated) {
+ if (!QDBusUtil::checkObjectPath(d_ptr->path, QDBusUtil::EmptyNotAllowed, error))
+ return 0;
+ if (!QDBusUtil::checkInterfaceName(d_ptr->interface, QDBusUtil::EmptyAllowed, error))
+ return 0;
+ if (!QDBusUtil::checkMemberName(d_ptr->name, QDBusUtil::EmptyNotAllowed, error, "method"))
+ return 0;
+ }
+
+ msg = q_dbus_message_new_signal(d_ptr->path.toUtf8(), d_ptr->interface.toUtf8(),
+ d_ptr->name.toUtf8());
break;
default:
Q_ASSERT(false);
break;
}
-#if 0
- DBusError err;
- q_dbus_error_init(&err);
- if (q_dbus_error_is_set(&err)) {
- QDBusError qe(&err);
- qDebug() << "QDBusMessagePrivate::toDBusMessage" << qe;
- }
-#endif
- if (!msg)
- return 0;
+
+ // if we got here, the parameters validated
+ // and since the message parameters cannot be changed once the message is created
+ // we can record this fact
+ d_ptr->parametersValidated = true;
QDBusMarshaller marshaller;
QVariantList::ConstIterator it = d_ptr->arguments.constBegin();
@@ -161,6 +190,7 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message)
// not ok;
q_dbus_message_unref(msg);
+ *error = QDBusError(QDBusError::Failed, QLatin1String("Marshalling failed: ") + marshaller.errorString);
return 0;
}
@@ -238,7 +268,13 @@ QDBusMessage QDBusMessagePrivate::makeLocal(const QDBusConnectionPrivate &conn,
// yes, we are
// we must marshall and demarshall again so as to create QDBusArgument
// entries for the complex types
- DBusMessage *message = toDBusMessage(asSent);
+ QDBusError error;
+ DBusMessage *message = toDBusMessage(asSent, &error);
+ if (!message) {
+ // failed to marshall, so it's a call error
+ return QDBusMessage::createError(error);
+ }
+
q_dbus_message_set_sender(message, conn.baseService.toUtf8());
QDBusMessage retval = fromDBusMessage(message);
@@ -457,6 +493,13 @@ QDBusMessage QDBusMessage::createErrorReply(const QString name, const QString &m
Constructs a new DBus reply message for the error type \a type using
the message \a msg. Returns the DBus message.
*/
+QDBusMessage QDBusMessage::createErrorReply(QDBusError::ErrorType atype, const QString &amsg) const
+{
+ QDBusMessage msg = createErrorReply(QDBusError::errorString(atype), amsg);
+ msg.d_ptr->parametersValidated = true;
+ return msg;
+}
+
/*!
Constructs an empty, invalid QDBusMessage object.
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 55f388a..34b1635 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -87,8 +87,9 @@ public:
QDBusMessage createErrorReply(const QString name, const QString &msg) const;
inline QDBusMessage createErrorReply(const QDBusError &err) const
{ return createErrorReply(err.name(), err.message()); }
- inline QDBusMessage createErrorReply(QDBusError::ErrorType type, const QString &msg) const;
+ QDBusMessage createErrorReply(QDBusError::ErrorType type, const QString &msg) const;
+ // there are no setters; if this changes, see qdbusmessage_p.h
QString service() const;
QString path() const;
QString interface() const;
@@ -113,9 +114,6 @@ private:
QDBusMessagePrivate *d_ptr;
};
-inline QDBusMessage QDBusMessage::createErrorReply(QDBusError::ErrorType atype, const QString &amsg) const
-{ return createErrorReply(QDBusError::errorString(atype), amsg); }
-
#ifndef QT_NO_DEBUG_STREAM
QDBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);
#endif
diff --git a/src/dbus/qdbusmessage_p.h b/src/dbus/qdbusmessage_p.h
index 12a9500..b8f23dc 100644
--- a/src/dbus/qdbusmessage_p.h
+++ b/src/dbus/qdbusmessage_p.h
@@ -55,6 +55,7 @@
#include <qatomic.h>
#include <qstring.h>
+#include <qdbusmessage.h>
struct DBusMessage;
@@ -69,7 +70,11 @@ public:
~QDBusMessagePrivate();
QList<QVariant> arguments;
+
+ // the following parameters are "const": they are not changed after the constructors
+ // the parametersValidated member below controls whether they've been validated already
QString service, path, interface, name, message, signature;
+
DBusMessage *msg;
DBusMessage *reply;
int type;
@@ -79,8 +84,12 @@ public:
mutable uint delayedReply : 1;
uint localMessage : 1;
+ mutable uint parametersValidated : 1;
+
+ static void setParametersValidated(QDBusMessage &msg, bool enable)
+ { msg.d_ptr->parametersValidated = enable; }
- static DBusMessage *toDBusMessage(const QDBusMessage &message);
+ static DBusMessage *toDBusMessage(const QDBusMessage &message, QDBusError *error);
static QDBusMessage fromDBusMessage(DBusMessage *dmsg);
static bool isLocal(const QDBusMessage &msg);
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index e5c1da6..1b77a9b 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -41,12 +41,14 @@
#include <string.h>
+#include <QtCore/qcoreapplication.h>
#include <QtCore/qvariant.h>
#include <QtCore/qmetaobject.h>
#include "qdbusutil_p.h"
#include "qdbusconnection_p.h"
#include "qdbusmetatype_p.h"
+#include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_*
QT_BEGIN_NAMESPACE
@@ -73,6 +75,51 @@ int qDBusNameToTypeId(const char *name)
return id;
}
+QString qDBusInterfaceFromMetaObject(const QMetaObject *mo)
+{
+ QString interface;
+
+ int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTERFACE);
+ if (idx >= mo->classInfoOffset()) {
+ interface = QLatin1String(mo->classInfo(idx).value());
+ } else {
+ interface = QLatin1String(mo->className());
+ interface.replace(QLatin1String("::"), QLatin1String("."));
+
+ if (interface.startsWith(QLatin1String("QDBus"))) {
+ interface.prepend(QLatin1String("com.trolltech.QtDBus."));
+ } else if (interface.startsWith(QLatin1Char('Q')) &&
+ interface.length() >= 2 && interface.at(1).isUpper()) {
+ // assume it's Qt
+ interface.prepend(QLatin1String("com.trolltech.Qt."));
+ } else if (!QCoreApplication::instance()||
+ QCoreApplication::instance()->applicationName().isEmpty()) {
+ interface.prepend(QLatin1String("local."));
+ } else {
+ interface.prepend(QLatin1Char('.')).prepend(QCoreApplication::instance()->applicationName());
+ QStringList domainName =
+ QCoreApplication::instance()->organizationDomain().split(QLatin1Char('.'),
+ QString::SkipEmptyParts);
+ if (domainName.isEmpty())
+ interface.prepend(QLatin1String("local."));
+ else
+ for (int i = 0; i < domainName.count(); ++i)
+ interface.prepend(QLatin1Char('.')).prepend(domainName.at(i));
+ }
+ }
+
+ return interface;
+}
+
+bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name)
+{
+ const QMetaObject *mo = obj->metaObject();
+ for ( ; mo != &QObject::staticMetaObject; mo = mo->superClass())
+ if (interface_name == qDBusInterfaceFromMetaObject(mo))
+ return true;
+ return false;
+}
+
// calculates the metatypes for the method
// the slot must have the parameters in the following form:
// - zero or more value or const-ref parameters of any kind
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 1797ed0..0ec1a26 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -409,6 +409,44 @@ bool QDBusPendingCall::setReplyCallback(QObject *target, const char *member)
}
#endif
+/*!
+ \since 4.6
+ Creates a QDBusPendingCall object based on the error condition
+ \a error. The resulting pending call object will be in the
+ "finished" state and QDBusPendingReply::isError() will return true.
+
+ \sa fromCompletedCall()
+*/
+QDBusPendingCall QDBusPendingCall::fromError(const QDBusError &error)
+{
+ return fromCompletedCall(QDBusMessage::createError(error));
+}
+
+/*!
+ \since 4.6
+ Creates a QDBusPendingCall object based on the message \a msg.
+ The message must be of type QDBusMessage::ErrorMessage or
+ QDBusMessage::ReplyMessage (that is, a message that is typical
+ of a completed call).
+
+ This function is useful for code that requires simulating a pending
+ call, but that has already finished.
+
+ \sa fromError()
+*/
+QDBusPendingCall QDBusPendingCall::fromCompletedCall(const QDBusMessage &msg)
+{
+ QDBusPendingCallPrivate *d = 0;
+ if (msg.type() == QDBusMessage::ErrorMessage ||
+ msg.type() == QDBusMessage::ReplyMessage) {
+ d = new QDBusPendingCallPrivate;
+ d->replyMessage = msg;
+ d->connection = 0;
+ }
+
+ return QDBusPendingCall(d);
+}
+
class QDBusPendingCallWatcherPrivate: public QObjectPrivate
{
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index 8881920..8dbbb3c 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -78,6 +78,9 @@ public:
QDBusMessage reply() const;
#endif
+ static QDBusPendingCall fromError(const QDBusError &error);
+ static QDBusPendingCall fromCompletedCall(const QDBusMessage &message);
+
protected:
QExplicitlySharedDataPointer<QDBusPendingCallPrivate> d;
friend class QDBusPendingCallPrivate;
diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h
index 7136f67..5577451 100644
--- a/src/dbus/qdbuspendingcall_p.h
+++ b/src/dbus/qdbuspendingcall_p.h
@@ -63,6 +63,7 @@
QT_BEGIN_NAMESPACE
+class QDBusPendingCall;
class QDBusPendingCallWatcher;
class QDBusPendingCallWatcherHelper;
class QDBusConnectionPrivate;
@@ -94,6 +95,8 @@ public:
void waitForFinished();
void setMetaTypes(int count, const int *types);
void checkReceivedSignature();
+
+ static QDBusPendingCall fromMessage(const QDBusMessage &msg);
};
class QDBusPendingCallWatcherHelper: public QObject
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 13031fd..5c1e4cd 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -57,6 +57,7 @@
#include <QtCore/qvariant.h>
#include <QtDBus/qdbusmacros.h>
+#include <QtDBus/qdbuserror.h>
QT_BEGIN_HEADER
@@ -83,6 +84,73 @@ namespace QDBusUtil
QDBUS_EXPORT bool isValidSingleSignature(const QString &signature);
QDBUS_EXPORT QString argumentToString(const QVariant &variant);
+
+ enum AllowEmptyFlag {
+ EmptyAllowed,
+ EmptyNotAllowed
+ };
+
+ inline bool checkInterfaceName(const QString &name, AllowEmptyFlag empty, QDBusError *error)
+ {
+ if (name.isEmpty()) {
+ if (empty == EmptyAllowed) return true;
+ *error = QDBusError(QDBusError::InvalidInterface, QLatin1String("Interface name cannot be empty"));
+ return false;
+ }
+ if (isValidInterfaceName(name)) return true;
+ *error = QDBusError(QDBusError::InvalidInterface, QString::fromLatin1("Invalid interface class: %1").arg(name));
+ return false;
+ }
+
+ inline bool checkBusName(const QString &name, AllowEmptyFlag empty, QDBusError *error)
+ {
+ if (name.isEmpty()) {
+ if (empty == EmptyAllowed) return true;
+ *error = QDBusError(QDBusError::InvalidService, QLatin1String("Service name cannot be empty"));
+ return false;
+ }
+ if (isValidBusName(name)) return true;
+ *error = QDBusError(QDBusError::InvalidService, QString::fromLatin1("Invalid service name: %1").arg(name));
+ return false;
+ }
+
+ inline bool checkObjectPath(const QString &path, AllowEmptyFlag empty, QDBusError *error)
+ {
+ if (path.isEmpty()) {
+ if (empty == EmptyAllowed) return true;
+ *error = QDBusError(QDBusError::InvalidObjectPath, QLatin1String("Object path cannot be empty"));
+ return false;
+ }
+ if (isValidObjectPath(path)) return true;
+ *error = QDBusError(QDBusError::InvalidObjectPath, QString::fromLatin1("Invalid object path: %1").arg(path));
+ return false;
+ }
+
+ inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = 0)
+ {
+ if (!nameType) nameType = "member";
+ if (name.isEmpty()) {
+ if (empty == EmptyAllowed) return true;
+ *error = QDBusError(QDBusError::InvalidMember, QLatin1String(nameType) + QLatin1String(" name cannot be empty"));
+ return false;
+ }
+ if (isValidMemberName(name)) return true;
+ *error = QDBusError(QDBusError::InvalidMember, QString::fromLatin1("Invalid %1 name: %2")
+ .arg(QString::fromLatin1(nameType), name));
+ return false;
+ }
+
+ inline bool checkErrorName(const QString &name, AllowEmptyFlag empty, QDBusError *error)
+ {
+ if (name.isEmpty()) {
+ if (empty == EmptyAllowed) return true;
+ *error = QDBusError(QDBusError::InvalidInterface, QLatin1String("Error name cannot be empty"));
+ return false;
+ }
+ if (isValidErrorName(name)) return true;
+ *error = QDBusError(QDBusError::InvalidInterface, QString::fromLatin1("Invalid error name: %1").arg(name));
+ return false;
+ }
}
QT_END_NAMESPACE
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 82bd762..b426abd 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-#include <QtCore/qcoreapplication.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qstringlist.h>
@@ -232,42 +231,6 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
return retval;
}
-QString qDBusInterfaceFromMetaObject(const QMetaObject *mo)
-{
- QString interface;
-
- int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTERFACE);
- if (idx >= mo->classInfoOffset()) {
- interface = QLatin1String(mo->classInfo(idx).value());
- } else {
- interface = QLatin1String(mo->className());
- interface.replace(QLatin1String("::"), QLatin1String("."));
-
- if (interface.startsWith(QLatin1String("QDBus"))) {
- interface.prepend(QLatin1String("com.trolltech.QtDBus."));
- } else if (interface.startsWith(QLatin1Char('Q')) &&
- interface.length() >= 2 && interface.at(1).isUpper()) {
- // assume it's Qt
- interface.prepend(QLatin1String("com.trolltech.Qt."));
- } else if (!QCoreApplication::instance()||
- QCoreApplication::instance()->applicationName().isEmpty()) {
- interface.prepend(QLatin1String("local."));
- } else {
- interface.prepend(QLatin1Char('.')).prepend(QCoreApplication::instance()->applicationName());
- QStringList domainName =
- QCoreApplication::instance()->organizationDomain().split(QLatin1Char('.'),
- QString::SkipEmptyParts);
- if (domainName.isEmpty())
- interface.prepend(QLatin1String("local."));
- else
- for (int i = 0; i < domainName.count(); ++i)
- interface.prepend(QLatin1Char('.')).prepend(domainName.at(i));
- }
- }
-
- return interface;
- }
-
QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
const QMetaObject *base, int flags)
{
diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp
index ccb2673..bfacb94 100644
--- a/src/gui/accessible/qaccessible_win.cpp
+++ b/src/gui/accessible/qaccessible_win.cpp
@@ -177,14 +177,14 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
return;
}
- QByteArray soundName;
+ QString soundName;
switch (reason) {
case PopupMenuStart:
- soundName = "MenuPopup";
+ soundName = QLatin1String("MenuPopup");
break;
case MenuCommand:
- soundName = "MenuCommand";
+ soundName = QLatin1String("MenuCommand");
break;
case Alert:
@@ -194,13 +194,13 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
if (mb) {
switch (mb->icon()) {
case QMessageBox::Warning:
- soundName = "SystemExclamation";
+ soundName = QLatin1String("SystemExclamation");
break;
case QMessageBox::Critical:
- soundName = "SystemHand";
+ soundName = QLatin1String("SystemHand");
break;
case QMessageBox::Information:
- soundName = "SystemAsterisk";
+ soundName = QLatin1String("SystemAsterisk");
break;
default:
break;
@@ -208,7 +208,7 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
} else
#endif // QT_NO_MESSAGEBOX
{
- soundName = "SystemAsterisk";
+ soundName = QLatin1String("SystemAsterisk");
}
}
@@ -219,20 +219,16 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
if (soundName.size()) {
#ifndef QT_NO_SETTINGS
- QSettings settings(QLatin1String("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\.Default\\") +
- QString::fromLatin1(soundName.constData()), QSettings::NativeFormat);
+ QSettings settings(QLatin1String("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\.Default\\") + soundName,
+ QSettings::NativeFormat);
QString file = settings.value(QLatin1String(".Current/.")).toString();
#else
- QString file;
+ QString file;
#endif
- if (!file.isEmpty()) {
- QT_WA({
- PlaySoundW(reinterpret_cast<const wchar_t *> (QString::fromLatin1(soundName).utf16()), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT );
- } , {
- PlaySoundA(soundName.constData(), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT );
- });
- }
- }
+ if (!file.isEmpty()) {
+ PlaySound(reinterpret_cast<const wchar_t *>(soundName.utf16()), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT);
+ }
+ }
if (!isActive())
return;
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 0288cd9..bb6c6d6 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -762,8 +762,7 @@ void QDialog::setVisible(bool visible)
#ifdef Q_WS_WIN
if (d->mainDef && isActiveWindow()) {
BOOL snapToDefault = false;
- if ( QT_WA_INLINE( SystemParametersInfo(SPI_GETSNAPTODEFBUTTON, 0, &snapToDefault, 0) ,
- SystemParametersInfoA(SPI_GETSNAPTODEFBUTTON, 0, &snapToDefault, 0) )) {
+ if (SystemParametersInfo(SPI_GETSNAPTODEFBUTTON, 0, &snapToDefault, 0)) {
if (snapToDefault)
QCursor::setPos(d->mainDef->mapToGlobal(d->mainDef->rect().center()));
}
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index f6a8602..8b4e1b1 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -209,25 +209,30 @@ Q_GUI_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook
/*!
\enum QFileDialog::Option
- \value ShowDirsOnly Only show directories in the file dialog. By default both files and
- directories are shown. (Valid only in the \l Directory file mode.)
- \value DontResolveSymlinks Don't resolve symlinks in the file dialog. By default symlinks
- are resolved.
- \value DontConfirmOverwrite Don't ask for confirmation if an existing file is selected.
- By default confirmation is requested.
- \value DontUseNativeDialog Don't use the native file dialog. By default on Mac OS X,
- the native file dialog is used unless you use a subclass of QFileDialog that contains the
- Q_OBJECT macro.
+ \value ShowDirsOnly Only show directories in the file dialog. By
+ default both files and directories are shown. (Valid only in the
+ \l Directory file mode.)
+
+ \value DontResolveSymlinks Don't resolve symlinks in the file
+ dialog. By default symlinks are resolved.
+
+ \value DontConfirmOverwrite Don't ask for confirmation if an
+ existing file is selected. By default confirmation is requested.
+
+ \value DontUseNativeDialog Don't use the native file dialog. By
+ default, the native file dialog is used unless you use a subclass
+ of QFileDialog that contains the Q_OBJECT macro.
+
\value ReadOnly Indicates that the model is readonly.
- \value HideNameFilterDetails Indicates if the is hidden or not.
+ \value HideNameFilterDetails Indicates if the is hidden or not.
This value is obsolete and does nothing since Qt 4.5:
- \value DontUseSheet In previous versions of Qt, the static functions would
- create a sheet by default if the static function was given a parent. This
- is no longer supported in Qt 4.5, The static functions will always be an
- application modal dialog. If you want to use sheets, use
- QFileDialog::open() instead.
+ \value DontUseSheet In previous versions of Qt, the static
+ functions would create a sheet by default if the static function
+ was given a parent. This is no longer supported in Qt 4.5, The
+ static functions will always be an application modal dialog. If
+ you want to use sheets, use QFileDialog::open() instead.
*/
@@ -1599,12 +1604,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
args.parent = parent;
args.caption = caption;
args.directory = QFileDialogPrivate::workingDirectory(dir);
- //If workingDirectory returned a different path than the initial one,
- //it means that the initial path was invalid. There is no point to try select a file
- if (args.directory != QFileInfo(dir).path())
- args.selection = QString();
- else
- args.selection = QFileDialogPrivate::initialSelection(dir);
+ args.selection = QFileDialogPrivate::initialSelection(dir);
args.filter = filter;
args.mode = ExistingFile;
args.options = options;
@@ -1682,18 +1682,13 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
QString *selectedFilter,
Options options)
{
- if (qt_filedialog_open_filenames_hook)
+ if (qt_filedialog_open_filenames_hook && !(options & DontUseNativeDialog))
return qt_filedialog_open_filenames_hook(parent, caption, dir, filter, selectedFilter, options);
QFileDialogArgs args;
args.parent = parent;
args.caption = caption;
args.directory = QFileDialogPrivate::workingDirectory(dir);
- //If workingDirectory returned a different path than the initial one,
- //it means that the initial path was invalid. There is no point to try select a file
- if (args.directory != QFileInfo(dir).path())
- args.selection = QString();
- else
- args.selection = QFileDialogPrivate::initialSelection(dir);
+ args.selection = QFileDialogPrivate::initialSelection(dir);
args.filter = filter;
args.mode = ExistingFiles;
args.options = options;
@@ -1773,18 +1768,13 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
QString *selectedFilter,
Options options)
{
- if (qt_filedialog_save_filename_hook)
+ if (qt_filedialog_save_filename_hook && !(options & DontUseNativeDialog))
return qt_filedialog_save_filename_hook(parent, caption, dir, filter, selectedFilter, options);
QFileDialogArgs args;
args.parent = parent;
args.caption = caption;
args.directory = QFileDialogPrivate::workingDirectory(dir);
- //If workingDirectory returned a different path than the initial one,
- //it means that the initial path was invalid. There is no point to try select a file
- if (args.directory != QFileInfo(dir).path())
- args.selection = QString();
- else
- args.selection = QFileDialogPrivate::initialSelection(dir);
+ args.selection = QFileDialogPrivate::initialSelection(dir);
args.filter = filter;
args.mode = AnyFile;
args.options = options;
@@ -1853,7 +1843,7 @@ QString QFileDialog::getExistingDirectory(QWidget *parent,
const QString &dir,
Options options)
{
- if (qt_filedialog_existing_directory_hook)
+ if (qt_filedialog_existing_directory_hook && !(options & DontUseNativeDialog))
return qt_filedialog_existing_directory_hook(parent, caption, dir, options);
QFileDialogArgs args;
args.parent = parent;
diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h
index 654b3bb..4c599cc 100644
--- a/src/gui/dialogs/qfiledialog_p.h
+++ b/src/gui/dialogs/qfiledialog_p.h
@@ -73,7 +73,6 @@
#include <qabstractproxymodel.h>
#include <qcompleter.h>
#include <qpointer.h>
-#include <qtimeline.h>
#include <qdebug.h>
#include "qsidebar_p.h"
@@ -187,8 +186,7 @@ public:
#ifndef Q_OS_WINCE
DWORD maxLength;
QString drive = path.left(3);
- if (QT_WA_INLINE(::GetVolumeInformationW(reinterpret_cast<const WCHAR *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0),
- ::GetVolumeInformationA(drive.toLocal8Bit().constData(), NULL, 0, NULL, &maxLength, NULL, NULL, 0)) == FALSE)
+ if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) == FALSE)
return -1;
return maxLength;
#else
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index 4cb31f5..9bf82c3 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -60,6 +60,13 @@
#include <shlobj.h>
+#include <objbase.h>
+
+#if defined(__IFileDialog_INTERFACE_DEFINED__) \
+ && defined(__IFileOpenDialog_INTERFACE_DEFINED__)
+#define USE_COMMON_ITEM_DIALOG
+#endif
+
#ifdef Q_WS_WINCE
#include <commdlg.h>
# ifndef BFFM_SETSELECTION
@@ -70,8 +77,8 @@
typedef struct qt_priv_browseinfo {
HWND hwndOwner;
LPCITEMIDLIST pidlRoot;
- LPTSTR pszDisplayName;
- LPCTSTR lpszTitle;
+ LPWSTR pszDisplayName;
+ LPCWSTR lpszTitle;
UINT ulFlags;
BFFCALLBACK lpfn;
LPARAM lParam;
@@ -90,6 +97,9 @@ typedef LPITEMIDLIST (WINAPI *PtrSHBrowseForFolder)(BROWSEINFO*);
static PtrSHBrowseForFolder ptrSHBrowseForFolder = 0;
typedef BOOL (WINAPI *PtrSHGetPathFromIDList)(LPITEMIDLIST,LPWSTR);
static PtrSHGetPathFromIDList ptrSHGetPathFromIDList = 0;
+typedef HRESULT (WINAPI *PtrSHGetMalloc)(LPMALLOC *);
+static PtrSHGetMalloc ptrSHGetMalloc = 0;
+
QT_BEGIN_NAMESPACE
@@ -111,20 +121,20 @@ static void qt_win_resolve_libs()
#endif
triedResolve = true;
- if (!(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)) {
#if !defined(Q_WS_WINCE)
- QLibrary lib(QLatin1String("shell32"));
- ptrSHBrowseForFolder = (PtrSHBrowseForFolder) lib.resolve("SHBrowseForFolderW");
- ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList) lib.resolve("SHGetPathFromIDListW");
+ QLibrary lib(QLatin1String("shell32"));
+ ptrSHBrowseForFolder = (PtrSHBrowseForFolder) lib.resolve("SHBrowseForFolderW");
+ ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList) lib.resolve("SHGetPathFromIDListW");
+ ptrSHGetMalloc = (PtrSHGetMalloc) lib.resolve("SHGetMalloc");
#else
- // CE stores them in a different lib and does not use unicode version
- HINSTANCE handle = LoadLibraryW(L"Ceshell");
- ptrSHBrowseForFolder = (PtrSHBrowseForFolder)GetProcAddress(handle, L"SHBrowseForFolder");
- ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)GetProcAddress(handle, L"SHGetPathFromIDList");
- if (ptrSHBrowseForFolder && ptrSHGetPathFromIDList)
- qt_priv_ptr_valid = true;
+ // CE stores them in a different lib and does not use unicode version
+ HINSTANCE handle = LoadLibraryW(L"Ceshell");
+ ptrSHBrowseForFolder = (PtrSHBrowseForFolder)GetProcAddress(handle, L"SHBrowseForFolder");
+ ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)GetProcAddress(handle, L"SHGetPathFromIDList");
+ ptrSHGetMalloc = (PtrSHGetMalloc)GetProcAddress(handle, L"SHGetMalloc");
+ if (ptrSHBrowseForFolder && ptrSHGetPathFromIDList && ptrSHGetMalloc)
+ qt_priv_ptr_valid = true;
#endif
- }
}
}
@@ -186,95 +196,15 @@ static QString qt_win_selected_filter(const QString &filter, DWORD idx)
return qt_win_make_filters_list(filter).at((int)idx - 1);
}
-#ifndef Q_WS_WINCE
-// Static vars for OFNA funcs:
-static QByteArray aInitDir;
-static QByteArray aInitSel;
-static QByteArray aTitle;
-static QByteArray aFilter;
-// Use ANSI strings and API
-
-// If you change this, then make sure you change qt_win_make_OFN (below) too
-static OPENFILENAMEA *qt_win_make_OFNA(QWidget *parent,
- const QString &initialSelection,
- const QString &initialDirectory,
- const QString &title,
- const QString &filters,
- QFileDialog::FileMode mode,
- QFileDialog::Options options)
-{
- if (parent)
- parent = parent->window();
- else
- parent = QApplication::activeWindow();
-
- aTitle = title.toLocal8Bit();
- aInitDir = QDir::toNativeSeparators(initialDirectory).toLocal8Bit();
- if (initialSelection.isEmpty()) {
- aInitSel = "";
- } else {
- aInitSel = QDir::toNativeSeparators(initialSelection).toLocal8Bit();
- aInitSel.replace('<', "");
- aInitSel.replace('>', "");
- aInitSel.replace('\"', "");
- aInitSel.replace('|', "");
- }
- int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
- aInitSel.resize(maxLen + 1); // make room for return value
- aFilter = filters.toLocal8Bit();
-
- OPENFILENAMEA* ofn = new OPENFILENAMEA;
- memset(ofn, 0, sizeof(OPENFILENAMEA));
-
-#if defined(Q_CC_BOR) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
- // according to the MSDN, this should also be necessary for MSVC, but
- // OPENFILENAME_SIZE_VERSION_400A is in not Microsoft header, as it seems
- if (QApplication::winVersion()==Qt::WV_NT || QApplication::winVersion()&Qt::WV_DOS_based) {
- ofn->lStructSize = OPENFILENAME_SIZE_VERSION_400A;
- } else {
- ofn->lStructSize = sizeof(OPENFILENAMEA);
- }
-#else
- ofn->lStructSize = sizeof(OPENFILENAMEA);
-#endif
- Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
- ofn->hwndOwner = parent ? parent->winId() : 0;
- ofn->lpstrFilter = aFilter;
- ofn->lpstrFile = aInitSel.data();
- ofn->nMaxFile = maxLen;
- ofn->lpstrInitialDir = aInitDir.data();
- ofn->lpstrTitle = aTitle.data();
- ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER);
-
- if (mode == QFileDialog::ExistingFile ||
- mode == QFileDialog::ExistingFiles)
- ofn->Flags |= (OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST);
- if (mode == QFileDialog::ExistingFiles)
- ofn->Flags |= (OFN_ALLOWMULTISELECT);
- if (!(options & QFileDialog::DontConfirmOverwrite))
- ofn->Flags |= OFN_OVERWRITEPROMPT;
-
- return ofn;
-}
-
-static void qt_win_clean_up_OFNA(OPENFILENAMEA **ofn)
-{
- delete *ofn;
- *ofn = 0;
-}
-#endif
-
static QString tFilters, tTitle, tInitDir;
-#ifdef UNICODE
-// If you change this, then make sure you change qt_win_make_OFNA (above) too
static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
const QString& initialSelection,
const QString& initialDirectory,
const QString& title,
const QString& filters,
QFileDialog::FileMode mode,
- QFileDialog::Options options)
+ QFileDialog::Options options)
{
if (parent)
parent = parent->window();
@@ -286,14 +216,14 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
tTitle = title;
QString initSel = QDir::toNativeSeparators(initialSelection);
if (!initSel.isEmpty()) {
- initSel.remove(QLatin1Char('<'));
- initSel.remove(QLatin1Char('>'));
- initSel.remove(QLatin1Char('\"'));
- initSel.remove(QLatin1Char('|'));
+ initSel.remove(QLatin1Char('<'));
+ initSel.remove(QLatin1Char('>'));
+ initSel.remove(QLatin1Char('\"'));
+ initSel.remove(QLatin1Char('|'));
}
int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
- TCHAR *tInitSel = new TCHAR[maxLen+1];
+ wchar_t *tInitSel = new wchar_t[maxLen + 1];
if (initSel.length() > 0 && initSel.length() <= maxLen)
memcpy(tInitSel, initSel.utf16(), (initSel.length()+1)*sizeof(QChar));
else
@@ -302,24 +232,14 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
OPENFILENAME* ofn = new OPENFILENAME;
memset(ofn, 0, sizeof(OPENFILENAME));
-#if defined(Q_CC_BOR) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
- // according to the MSDN, this should also be necessary for MSVC, but
- // OPENFILENAME_SIZE_VERSION_400 is in not Microsoft header, as it seems
- if (QApplication::winVersion()==Qt::WV_NT || QApplication::winVersion()&Qt::WV_DOS_based) {
- ofn->lStructSize= OPENFILENAME_SIZE_VERSION_400;
- } else {
- ofn->lStructSize = sizeof(OPENFILENAME);
- }
-#else
ofn->lStructSize = sizeof(OPENFILENAME);
-#endif
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
ofn->hwndOwner = parent ? parent->winId() : 0;
- ofn->lpstrFilter = (TCHAR *)tFilters.utf16();
+ ofn->lpstrFilter = (wchar_t*)tFilters.utf16();
ofn->lpstrFile = tInitSel;
ofn->nMaxFile = maxLen;
- ofn->lpstrInitialDir = (TCHAR *)tInitDir.utf16();
- ofn->lpstrTitle = (TCHAR *)tTitle.utf16();
+ ofn->lpstrInitialDir = (wchar_t*)tInitDir.utf16();
+ ofn->lpstrTitle = (wchar_t*)tTitle.utf16();
ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER);
if (mode == QFileDialog::ExistingFile ||
mode == QFileDialog::ExistingFiles)
@@ -332,7 +252,6 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
return ofn;
}
-
static void qt_win_clean_up_OFN(OPENFILENAME **ofn)
{
delete [] (*ofn)->lpstrFile;
@@ -340,8 +259,6 @@ static void qt_win_clean_up_OFN(OPENFILENAME **ofn)
*ofn = 0;
}
-#endif // UNICODE
-
extern void qt_win_eatMouseMove();
QString qt_win_get_open_file_name(const QFileDialogArgs &args,
@@ -377,35 +294,20 @@ QString qt_win_get_open_file_name(const QFileDialogArgs &args,
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
modal_widget.setParent(args.parent, Qt::Window);
QApplicationPrivate::enterModal(&modal_widget);
- QT_WA({
- // Use Unicode strings and API
- OPENFILENAME* ofn = qt_win_make_OFN(args.parent, args.selection,
- args.directory, args.caption,
- qt_win_filter(args.filter),
- QFileDialog::ExistingFile,
- args.options);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileName(ofn)) {
- result = QString::fromUtf16((ushort*)ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- qt_win_clean_up_OFN(&ofn);
- } , {
- // Use ANSI strings and API
- OPENFILENAMEA* ofn = qt_win_make_OFNA(args.parent, args.selection,
- args.directory, args.caption,
- qt_win_filter(args.filter),
- QFileDialog::ExistingFile,
- args.options);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileNameA(ofn)) {
- result = QString::fromLocal8Bit(ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- qt_win_clean_up_OFNA(&ofn);
- });
+
+ OPENFILENAME* ofn = qt_win_make_OFN(args.parent, args.selection,
+ args.directory, args.caption,
+ qt_win_filter(args.filter),
+ QFileDialog::ExistingFile,
+ args.options);
+ if (idx)
+ ofn->nFilterIndex = idx + 1;
+ if (GetOpenFileName(ofn)) {
+ result = QString::fromWCharArray(ofn->lpstrFile);
+ selFilIdx = ofn->nFilterIndex;
+ }
+ qt_win_clean_up_OFN(&ofn);
+
QApplicationPrivate::leaveModal(&modal_widget);
qt_win_eatMouseMove();
@@ -422,7 +324,7 @@ QString qt_win_get_open_file_name(const QFileDialogArgs &args,
QString qt_win_get_save_file_name(const QFileDialogArgs &args,
QString *initialDirectory,
- QString *selectedFilter)
+ QString *selectedFilter)
{
QString result;
@@ -470,41 +372,22 @@ QString qt_win_get_save_file_name(const QFileDialogArgs &args,
}
}
- QT_WA({
- // Use Unicode strings and API
- OPENFILENAME *ofn = qt_win_make_OFN(args.parent, args.selection,
- args.directory, args.caption,
- qt_win_filter(args.filter),
- QFileDialog::AnyFile,
- args.options);
-
- ofn->lpstrDefExt = (TCHAR *)defaultSaveExt.utf16();
-
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetSaveFileName(ofn)) {
- result = QString::fromUtf16((ushort*)ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- qt_win_clean_up_OFN(&ofn);
- } , {
- // Use ANSI strings and API
- OPENFILENAMEA *ofn = qt_win_make_OFNA(args.parent, args.selection,
- args.directory, args.caption,
- qt_win_filter(args.filter),
- QFileDialog::AnyFile,
- args.options);
- QByteArray asciiExt = defaultSaveExt.toAscii();
- ofn->lpstrDefExt = asciiExt.data();
-
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetSaveFileNameA(ofn)) {
- result = QString::fromLocal8Bit(ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- qt_win_clean_up_OFNA(&ofn);
- });
+ OPENFILENAME *ofn = qt_win_make_OFN(args.parent, args.selection,
+ args.directory, args.caption,
+ qt_win_filter(args.filter),
+ QFileDialog::AnyFile,
+ args.options);
+
+ ofn->lpstrDefExt = (wchar_t*)defaultSaveExt.utf16();
+
+ if (idx)
+ ofn->nFilterIndex = idx + 1;
+ if (GetSaveFileName(ofn)) {
+ result = QString::fromWCharArray(ofn->lpstrFile);
+ selFilIdx = ofn->nFilterIndex;
+ }
+ qt_win_clean_up_OFN(&ofn);
+
#if defined(Q_WS_WINCE)
int semIndex = result.indexOf(QLatin1Char(';'));
if (semIndex >= 0)
@@ -525,14 +408,202 @@ QString qt_win_get_save_file_name(const QFileDialogArgs &args,
return fi.absoluteFilePath();
}
+
+#if defined(USE_COMMON_ITEM_DIALOG)
+
+typedef HRESULT (WINAPI *PtrSHCreateItemFromParsingName)(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);
+static PtrSHCreateItemFromParsingName pSHCreateItemFromParsingName = 0;
+
+static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd,
+ const QString& initialSelection,
+ const QString& initialDirectory,
+ const QString& title,
+ const QStringList& filterLst,
+ QFileDialog::FileMode mode,
+ QFileDialog::Options options)
+{
+ if (!pSHCreateItemFromParsingName) {
+ // This function is available only in Vista & above.
+ QLibrary shellLib(QLatin1String("Shell32"));
+ pSHCreateItemFromParsingName = (PtrSHCreateItemFromParsingName)
+ shellLib.resolve("SHCreateItemFromParsingName");
+ if (!pSHCreateItemFromParsingName)
+ return false;
+ }
+ HRESULT hr;
+ QString winfilters;
+ int numFilters = 0;
+ quint32 currentOffset = 0;
+ QList<quint32> offsets;
+ QStringList::ConstIterator it = filterLst.begin();
+ // Create the native filter string and save offset to each entry.
+ for (; it != filterLst.end(); ++it) {
+ QString subfilter = *it;
+ if (!subfilter.isEmpty()) {
+ offsets<<currentOffset;
+ winfilters += subfilter; // The name of the filter.
+ winfilters += QChar();
+ currentOffset += subfilter.size()+1;
+ offsets<<currentOffset;
+ QString spec = qt_win_extract_filter(subfilter);
+ winfilters += spec; // The actual filter spec.
+ winfilters += QChar();
+ currentOffset += spec.size()+1;
+ numFilters++;
+ }
+ }
+ // Add the filters to the file dialog.
+ if (numFilters) {
+ wchar_t *szData = (wchar_t*)winfilters.utf16();
+ COMDLG_FILTERSPEC *filterSpec = new COMDLG_FILTERSPEC[numFilters];
+ for(int i = 0; i<numFilters; i++) {
+ filterSpec[i].pszName = szData+offsets[i*2];
+ filterSpec[i].pszSpec = szData+offsets[(i*2)+1];
+ }
+ hr = pfd->SetFileTypes(numFilters, filterSpec);
+ delete []filterSpec;
+ }
+ // Set the starting folder.
+ tInitDir = QDir::toNativeSeparators(initialDirectory);
+ if (!tInitDir.isEmpty()) {
+ IShellItem *psiDefaultFolder;
+ hr = pSHCreateItemFromParsingName((wchar_t*)tInitDir.utf16(),
+ NULL,
+ IID_PPV_ARGS(&psiDefaultFolder));
+
+ if (SUCCEEDED(hr)) {
+ hr = pfd->SetFolder(psiDefaultFolder);
+ psiDefaultFolder->Release();
+ }
+ }
+ // Set the currently selected file.
+ QString initSel = QDir::toNativeSeparators(initialSelection);
+ if (!initSel.isEmpty()) {
+ initSel.remove(QLatin1Char('<'));
+ initSel.remove(QLatin1Char('>'));
+ initSel.remove(QLatin1Char('\"'));
+ initSel.remove(QLatin1Char('|'));
+ }
+ if (!initSel.isEmpty()) {
+ hr = pfd->SetFileName((wchar_t*)initSel.utf16());
+ }
+ // Set the title for the file dialog.
+ if (!title.isEmpty()) {
+ hr = pfd->SetTitle((wchar_t*)title.utf16());
+ }
+ // Set other flags for the dialog.
+ DWORD newOptions;
+ hr = pfd->GetOptions(&newOptions);
+ if (SUCCEEDED(hr)) {
+ newOptions |= (FOS_NOCHANGEDIR | FOS_NOREADONLYRETURN);
+ if (mode == QFileDialog::ExistingFile ||
+ mode == QFileDialog::ExistingFiles)
+ newOptions |= (FOS_FILEMUSTEXIST | FOS_PATHMUSTEXIST);
+ if (mode == QFileDialog::ExistingFiles)
+ newOptions |= FOS_ALLOWMULTISELECT;
+ if (!(options & QFileDialog::DontConfirmOverwrite))
+ newOptions |= FOS_OVERWRITEPROMPT;
+ hr = pfd->SetOptions(newOptions);
+ }
+ return SUCCEEDED(hr);
+}
+
+QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
+ QString *initialDirectory,
+ const QStringList &filterList,
+ QString *selectedFilter,
+ int selectedFilterIndex)
+{
+ QStringList result;
+ QDialog modal_widget;
+ modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+ modal_widget.setParent(args.parent, Qt::Window);
+ QApplicationPrivate::enterModal(&modal_widget);
+ // Multiple selection is allowed only in IFileOpenDialog.
+ IFileOpenDialog *pfd;
+ HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog,
+ NULL,
+ CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&pfd));
+
+ if (SUCCEEDED(hr)) {
+ qt_win_set_IFileDialogOptions(pfd, args.selection,
+ args.directory, args.caption,
+ filterList, QFileDialog::ExistingFiles,
+ args.options);
+ // Set the currently selected filter (one-based index).
+ hr = pfd->SetFileTypeIndex(selectedFilterIndex+1);
+ QWidget *parentWindow = args.parent;
+ if (parentWindow)
+ parentWindow = parentWindow->window();
+ else
+ parentWindow = QApplication::activeWindow();
+ // Show the file dialog.
+ hr = pfd->Show(parentWindow ? parentWindow->winId() : 0);
+ if (SUCCEEDED(hr)) {
+ // Retrieve the results.
+ IShellItemArray *psiaResults;
+ hr = pfd->GetResults(&psiaResults);
+ if (SUCCEEDED(hr)) {
+ DWORD numItems = 0;
+ psiaResults->GetCount(&numItems);
+ for (DWORD i = 0; i<numItems; i++) {
+ IShellItem *psi = 0;
+ hr = psiaResults->GetItemAt(i, &psi);
+ if (SUCCEEDED(hr)) {
+ // Retrieve the file name from shell item.
+ wchar_t *pszPath;
+ hr = psi->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
+ if (SUCCEEDED(hr)) {
+ QString fileName = QString::fromWCharArray(pszPath);
+ result.append(fileName);
+ CoTaskMemFree(pszPath);
+ }
+ psi->Release(); // Free the current item.
+ }
+ }
+ psiaResults->Release(); // Free the array of items.
+ }
+ }
+ }
+ QApplicationPrivate::leaveModal(&modal_widget);
+
+ qt_win_eatMouseMove();
+
+ if (!result.isEmpty()) {
+ // Retrieve the current folder name.
+ IShellItem *psi = 0;
+ hr = pfd->GetFolder(&psi);
+ if (SUCCEEDED(hr)) {
+ wchar_t *pszPath;
+ hr = psi->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
+ if (SUCCEEDED(hr)) {
+ *initialDirectory = QString::fromWCharArray(pszPath);
+ CoTaskMemFree(pszPath);
+ }
+ psi->Release();
+ }
+ // Retrieve the currently selected filter.
+ if (selectedFilter) {
+ quint32 filetype = 0;
+ hr = pfd->GetFileTypeIndex(&filetype);
+ if (SUCCEEDED(hr) && filetype && filetype <= (quint32)filterList.length()) {
+ // This is a one-based index, not zero-based.
+ *selectedFilter = filterList[filetype-1];
+ }
+ }
+ }
+ return result;
+}
+
+#endif
+
QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
QString *initialDirectory,
QString *selectedFilter)
{
- QStringList result;
QFileInfo fi;
QDir dir;
- QString isel;
if (initialDirectory && initialDirectory->left(5) == QLatin1String("file:"))
initialDirectory->remove(0, 5);
@@ -540,7 +611,6 @@ QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
if (initialDirectory && !fi.isDir()) {
*initialDirectory = fi.absolutePath();
- isel = fi.fileName();
}
if (!fi.exists())
@@ -548,83 +618,59 @@ QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
DWORD selFilIdx = 0;
+ QStringList filterLst = qt_win_make_filters_list(args.filter);
int idx = 0;
if (selectedFilter) {
- QStringList filterLst = qt_win_make_filters_list(args.filter);
idx = filterLst.indexOf(*selectedFilter);
}
+ // Windows Vista (& above) allows users to search from file dialogs. If user selects
+ // multiple files belonging to different folders from these search results, the
+ // GetOpenFileName() will return only one folder name for all the files. To retrieve
+ // the correct path for all selected files, we have to use Common Item Dialog interfaces.
+#if defined(USE_COMMON_ITEM_DIALOG)
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+ return qt_win_CID_get_open_file_names(args, initialDirectory, filterLst, selectedFilter, idx);
+#endif
+ QStringList result;
QDialog modal_widget;
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
modal_widget.setParent(args.parent, Qt::Window);
QApplicationPrivate::enterModal(&modal_widget);
- QT_WA({
- OPENFILENAME* ofn = qt_win_make_OFN(args.parent, args.selection,
- args.directory, args.caption,
- qt_win_filter(args.filter),
- QFileDialog::ExistingFiles,
- args.options);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileName(ofn)) {
- QString fileOrDir = QString::fromUtf16((ushort*)ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- int offset = fileOrDir.length() + 1;
- if (ofn->lpstrFile[offset] == 0) {
- // Only one file selected; has full path
- fi.setFile(fileOrDir);
- QString res = fi.absoluteFilePath();
- if (!res.isEmpty())
- result.append(res);
- }
- else {
- // Several files selected; first string is path
- dir.setPath(fileOrDir);
- QString f;
- while(!(f = QString::fromUtf16((ushort*)ofn->lpstrFile+offset)).isEmpty()) {
- fi.setFile(dir, f);
- QString res = fi.absoluteFilePath();
- if (!res.isEmpty())
- result.append(res);
- offset += f.length() + 1;
- }
- }
+
+ OPENFILENAME* ofn = qt_win_make_OFN(args.parent, args.selection,
+ args.directory, args.caption,
+ qt_win_filter(args.filter),
+ QFileDialog::ExistingFiles,
+ args.options);
+ if (idx)
+ ofn->nFilterIndex = idx + 1;
+ if (GetOpenFileName(ofn)) {
+ QString fileOrDir = QString::fromWCharArray(ofn->lpstrFile);
+ selFilIdx = ofn->nFilterIndex;
+ int offset = fileOrDir.length() + 1;
+ if (ofn->lpstrFile[offset] == 0) {
+ // Only one file selected; has full path
+ fi.setFile(fileOrDir);
+ QString res = fi.absoluteFilePath();
+ if (!res.isEmpty())
+ result.append(res);
}
- qt_win_clean_up_OFN(&ofn);
- } , {
- OPENFILENAMEA* ofn = qt_win_make_OFNA(args.parent, args.selection,
- args.directory, args.caption,
- qt_win_filter(args.filter),
- QFileDialog::ExistingFiles,
- args.options);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileNameA(ofn)) {
- QByteArray fileOrDir(ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- int offset = fileOrDir.length() + 1;
- if (ofn->lpstrFile[offset] == '\0') {
- // Only one file selected; has full path
- fi.setFile(QString::fromLocal8Bit(fileOrDir));
+ else {
+ // Several files selected; first string is path
+ dir.setPath(fileOrDir);
+ QString f;
+ while(!(f = QString::fromWCharArray(ofn->lpstrFile + offset)).isEmpty()) {
+ fi.setFile(dir, f);
QString res = fi.absoluteFilePath();
if (!res.isEmpty())
result.append(res);
+ offset += f.length() + 1;
}
- else {
- // Several files selected; first string is path
- dir.setPath(QString::fromLocal8Bit(fileOrDir));
- QByteArray f;
- while (!(f = QByteArray(ofn->lpstrFile + offset)).isEmpty()) {
- fi.setFile(dir, QString::fromLocal8Bit(f));
- QString res = fi.absoluteFilePath();
- if (!res.isEmpty())
- result.append(res);
- offset += f.length() + 1;
- }
- }
- qt_win_clean_up_OFNA(&ofn);
}
- });
+ }
+ qt_win_clean_up_OFN(&ofn);
+
QApplicationPrivate::leaveModal(&modal_widget);
qt_win_eatMouseMove();
@@ -647,34 +693,20 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
if (uMsg == BFFM_INITIALIZED && lpData != 0) {
QString *initDir = (QString *)(lpData);
if (!initDir->isEmpty()) {
- // ### Lars asks: is this correct for the A version????
- QT_WA({
- SendMessage(hwnd, BFFM_SETSELECTION, TRUE, LPARAM(initDir->utf16()));
- } , {
- SendMessageA(hwnd, BFFM_SETSELECTION, TRUE, LPARAM(initDir->utf16()));
- });
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, LPARAM(initDir->utf16()));
}
} else if (uMsg == BFFM_SELCHANGED) {
- QT_WA({
- qt_win_resolve_libs();
- TCHAR path[MAX_PATH];
+ qt_win_resolve_libs();
+ if (ptrSHGetPathFromIDList) {
+ wchar_t path[MAX_PATH];
ptrSHGetPathFromIDList(LPITEMIDLIST(lParam), path);
- QString tmpStr = QString::fromUtf16((ushort*)path);
+ QString tmpStr = QString::fromWCharArray(path);
if (!tmpStr.isEmpty())
SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
else
SendMessage(hwnd, BFFM_ENABLEOK, 0, 0);
SendMessage(hwnd, BFFM_SETSTATUSTEXT, 1, LPARAM(path));
- } , {
- char path[MAX_PATH];
- SHGetPathFromIDListA(LPITEMIDLIST(lParam), path);
- QString tmpStr = QString::fromLocal8Bit(path);
- if (!tmpStr.isEmpty())
- SendMessageA(hwnd, BFFM_ENABLEOK, 1, 1);
- else
- SendMessageA(hwnd, BFFM_ENABLEOK, 0, 0);
- SendMessageA(hwnd, BFFM_SETSTATUSTEXT, 1, LPARAM(path));
- });
+ }
}
return 0;
}
@@ -700,116 +732,49 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args)
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
modal_widget.setParent(parent, Qt::Window);
QApplicationPrivate::enterModal(&modal_widget);
-#if !defined(Q_WS_WINCE)
- QT_WA({
- qt_win_resolve_libs();
- QString initDir = QDir::toNativeSeparators(args.directory);
- TCHAR path[MAX_PATH];
- TCHAR initPath[MAX_PATH];
- initPath[0] = 0;
- path[0] = 0;
- tTitle = args.caption;
- BROWSEINFO bi;
- Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
- bi.hwndOwner = (parent ? parent->winId() : 0);
- bi.pidlRoot = NULL;
- //### This does not seem to be respected? - the dialog always displays "Browse for folder"
- bi.lpszTitle = (TCHAR*)tTitle.utf16();
- bi.pszDisplayName = initPath;
- bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
- bi.lpfn = winGetExistDirCallbackProc;
- bi.lParam = LPARAM(&initDir);
- if (ptrSHBrowseForFolder) {
- LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi);
- if (pItemIDList && ptrSHGetPathFromIDList) {
- ptrSHGetPathFromIDList(pItemIDList, path);
- IMalloc *pMalloc;
- if (SHGetMalloc(&pMalloc) != NOERROR)
- result = QString();
- else {
- pMalloc->Free(pItemIDList);
- pMalloc->Release();
- result = QString::fromUtf16((ushort*)path);
- }
- } else
- result = QString();
- }
- tTitle = QString();
- } , {
- QString initDir = QDir::toNativeSeparators(args.directory);
- char path[MAX_PATH];
- char initPath[MAX_PATH];
- QByteArray ctitle = args.caption.toLocal8Bit();
- initPath[0]=0;
- path[0]=0;
- BROWSEINFOA bi;
- Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
- bi.hwndOwner = (parent ? parent->winId() : 0);
- bi.pidlRoot = NULL;
- bi.lpszTitle = ctitle;
- bi.pszDisplayName = initPath;
- bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
- bi.lpfn = winGetExistDirCallbackProc;
- bi.lParam = LPARAM(&initDir);
- LPITEMIDLIST pItemIDList = SHBrowseForFolderA(&bi);
- if (pItemIDList) {
- SHGetPathFromIDListA(pItemIDList, path);
- IMalloc *pMalloc;
- if (SHGetMalloc(&pMalloc) != NOERROR)
- result = QString();
- else {
- pMalloc->Free(pItemIDList);
- pMalloc->Release();
- result = QString::fromLocal8Bit(path);
- }
- } else
- result = QString();
- });
-#else
- qt_win_resolve_libs();
+
QString initDir = QDir::toNativeSeparators(args.directory);
- TCHAR path[MAX_PATH];
- TCHAR initPath[MAX_PATH];
- memset(initPath, 0 , MAX_PATH*sizeof(TCHAR));
- memset(path, 0, MAX_PATH*sizeof(TCHAR));
+ wchar_t path[MAX_PATH];
+ wchar_t initPath[MAX_PATH];
+ initPath[0] = 0;
+ path[0] = 0;
tTitle = args.caption;
+
+#if !defined(Q_WS_WINCE)
+ BROWSEINFO bi;
+#else
qt_BROWSEINFO bi;
+#endif
+
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
bi.hwndOwner = (parent ? parent->winId() : 0);
bi.pidlRoot = NULL;
- bi.lpszTitle = (TCHAR*)tTitle.utf16();
+ //### This does not seem to be respected? - the dialog always displays "Browse for folder"
+ bi.lpszTitle = (wchar_t*)tTitle.utf16();
bi.pszDisplayName = initPath;
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
bi.lpfn = winGetExistDirCallbackProc;
bi.lParam = LPARAM(&initDir);
+
+ qt_win_resolve_libs();
if (ptrSHBrowseForFolder) {
LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder((BROWSEINFO*)&bi);
- if (pItemIDList && ptrSHGetPathFromIDList) {
+ if (pItemIDList) {
ptrSHGetPathFromIDList(pItemIDList, path);
IMalloc *pMalloc;
- if (SHGetMalloc(&pMalloc) != NOERROR)
- result = QString();
- else {
+ if (ptrSHGetMalloc(&pMalloc) == NOERROR) {
pMalloc->Free(pItemIDList);
pMalloc->Release();
- result = QString::fromUtf16((ushort*)path);
+ result = QString::fromWCharArray(path);
}
- } else
- result = QString();
+ }
}
tTitle = QString();
-#endif
QApplicationPrivate::leaveModal(&modal_widget);
qt_win_eatMouseMove();
- // Due to a bug on Windows Me, we need to reset the current
- // directory
- if ((QSysInfo::WindowsVersion == QSysInfo::WV_98 || QSysInfo::WindowsVersion == QSysInfo::WV_Me)
- && QDir::currentPath() != currentDir)
- QDir::setCurrent(currentDir);
-
if (!result.isEmpty())
result.replace(QLatin1Char('\\'), QLatin1Char('/'));
return result;
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 347a084..5a5d845 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -49,7 +49,7 @@
#include <qapplication.h>
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#endif
QT_BEGIN_NAMESPACE
@@ -296,22 +296,14 @@ static QString qt_GetLongPathName(const QString &strShortPath)
#else
QString longSection = QDir::toNativeSeparators(section);
#endif
- QT_WA({
- WIN32_FIND_DATAW findData;
- h = ::FindFirstFileW((wchar_t *)longSection.utf16(), &findData);
- if (h != INVALID_HANDLE_VALUE)
- longPath.append(QString::fromUtf16((ushort*)findData.cFileName));
- } , {
- WIN32_FIND_DATAA findData;
- h = ::FindFirstFileA(section.toLocal8Bit(), &findData);
- if (h != INVALID_HANDLE_VALUE)
- longPath.append(QString::fromLocal8Bit(findData.cFileName));
- });
- if (h == INVALID_HANDLE_VALUE) {
+ WIN32_FIND_DATA findData;
+ h = ::FindFirstFile((wchar_t*)longSection.utf16(), &findData);
+ if (h != INVALID_HANDLE_VALUE) {
+ longPath.append(QString::fromWCharArray(findData.cFileName));
+ ::FindClose(h);
+ } else {
longPath.append(section);
break;
- } else {
- ::FindClose(h);
}
}
if (it != constEnd)
diff --git a/src/gui/dialogs/qpagesetupdialog_win.cpp b/src/gui/dialogs/qpagesetupdialog_win.cpp
index 136f939..3f2fb34 100644
--- a/src/gui/dialogs/qpagesetupdialog_win.cpp
+++ b/src/gui/dialogs/qpagesetupdialog_win.cpp
@@ -78,11 +78,10 @@ int QPageSetupDialog::exec()
psd.lStructSize = sizeof(PAGESETUPDLG);
// we need a temp DEVMODE struct if we don't have a global DEVMODE
- HGLOBAL hDevMode;
- int devModeSize;
+ HGLOBAL hDevMode = 0;
+ int devModeSize = 0;
if (!ep->globalDevMode) {
- QT_WA( { devModeSize = sizeof(DEVMODEW) + ((DEVMODEW *) ep->devMode)->dmDriverExtra; },
- { devModeSize = sizeof(DEVMODEA) + ((DEVMODEA *) ep->devMode)->dmDriverExtra; });
+ devModeSize = sizeof(DEVMODE) + ep->devMode->dmDriverExtra;
hDevMode = GlobalAlloc(GHND, devModeSize);
if (hDevMode) {
void *dest = GlobalLock(hDevMode);
diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp
index e89ce90..115cd8d 100644
--- a/src/gui/dialogs/qprintdialog_win.cpp
+++ b/src/gui/dialogs/qprintdialog_win.cpp
@@ -77,27 +77,18 @@ public:
QWin32PrintEnginePrivate *ep;
};
-#ifndef Q_OS_WINCE
-// If you change this function, make sure you also change the unicode equivalent
-template <class PrintDialog, class DeviceMode>
-static PrintDialog *qt_win_make_PRINTDLG(QWidget *parent,
- QPrintDialog *pdlg,
- QPrintDialogPrivate *d, HGLOBAL *tempDevNames)
+static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent,
+ QPrintDialog *pdlg,
+ QPrintDialogPrivate *d, HGLOBAL *tempDevNames)
{
- PrintDialog *pd = new PrintDialog;
- memset(pd, 0, sizeof(PrintDialog));
- pd->lStructSize = sizeof(PrintDialog);
-
- void *devMode = sizeof(DeviceMode) == sizeof(DEVMODEA)
- ? (void *) d->ep->devModeA()
- : (void *) d->ep->devModeW();
+ DEVMODE *devMode = d->ep->devMode;
if (devMode) {
- int size = sizeof(DeviceMode) + ((DeviceMode *) devMode)->dmDriverExtra;
+ int size = sizeof(DEVMODE) + devMode->dmDriverExtra;
pd->hDevMode = GlobalAlloc(GHND, size);
{
void *dest = GlobalLock(pd->hDevMode);
- memcpy(dest, d->ep->devMode, size);
+ memcpy(dest, devMode, size);
GlobalUnlock(pd->hDevMode);
}
} else {
@@ -130,37 +121,31 @@ static PrintDialog *qt_win_make_PRINTDLG(QWidget *parent,
if (pd->nMinPage==0 && pd->nMaxPage==0)
pd->Flags |= PD_NOPAGENUMS;
+ // we don't have a 'current page' notion in the QPrinter API yet.
+ // Neither do we support more than one page range, so limit those
+ // options
+ pd->Flags |= PD_NOCURRENTPAGE;
+ pd->nStartPage = START_PAGE_GENERAL;
+ pd->nPageRanges = 1;
+ pd->nMaxPageRanges = 1;
+
if (d->ep->printToFile)
pd->Flags |= PD_PRINTTOFILE;
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
pd->hwndOwner = parent ? parent->winId() : 0;
- pd->nFromPage = qMax(pdlg->fromPage(), pdlg->minPage());
- pd->nToPage = (pdlg->toPage() > 0) ? qMin(pdlg->toPage(), pdlg->maxPage()) : 1;
+ pd->lpPageRanges[0].nFromPage = qMax(pdlg->fromPage(), pdlg->minPage());
+ pd->lpPageRanges[0].nToPage = (pdlg->toPage() > 0) ? qMin(pdlg->toPage(), pdlg->maxPage()) : 1;
pd->nCopies = d->ep->num_copies;
-
- return pd;
-}
-#endif // Q_OS_WINCE
-
-// If you change this function, make sure you also change the ansi equivalent
-template <typename T>
-static void qt_win_clean_up_PRINTDLG(T **pd)
-{
- delete *pd;
- *pd = 0;
}
-
-// If you change this function, make sure you also change the ansi equivalent
-template <typename T>
-static void qt_win_read_back_PRINTDLG(T *pd, QPrintDialog *pdlg, QPrintDialogPrivate *d)
+static void qt_win_read_back_PRINTDLGEX(PRINTDLGEX *pd, QPrintDialog *pdlg, QPrintDialogPrivate *d)
{
if (pd->Flags & PD_SELECTION) {
pdlg->setPrintRange(QPrintDialog::Selection);
pdlg->setFromTo(0, 0);
} else if (pd->Flags & PD_PAGENUMS) {
pdlg->setPrintRange(QPrintDialog::PageRange);
- pdlg->setFromTo(pd->nFromPage, pd->nToPage);
+ pdlg->setFromTo(pd->lpPageRanges[0].nFromPage, pd->lpPageRanges[0].nToPage);
} else {
pdlg->setPrintRange(QPrintDialog::AllPages);
pdlg->setFromTo(0, 0);
@@ -234,34 +219,36 @@ int QPrintDialogPrivate::openWindowsPrintDialogModally()
HGLOBAL *tempDevNames = ep->createDevNames();
- bool result;
bool done;
- void *pd = QT_WA_INLINE(
- (void*)(qt_win_make_PRINTDLG<PRINTDLGW, DEVMODEW>(parent, q, this, tempDevNames)),
- (void*)(qt_win_make_PRINTDLG<PRINTDLGA, DEVMODEA>(parent, q, this, tempDevNames))
- );
+ bool result;
+ bool doPrinting;
+
+ PRINTPAGERANGE pageRange;
+ PRINTDLGEX pd;
+ memset(&pd, 0, sizeof(PRINTDLGEX));
+ pd.lStructSize = sizeof(PRINTDLGEX);
+ pd.lpPageRanges = &pageRange;
+ qt_win_setup_PRINTDLGEX(&pd, parent, q, this, tempDevNames);
do {
done = true;
- QT_WA({
- PRINTDLGW *pdw = reinterpret_cast<PRINTDLGW *>(pd);
- result = PrintDlgW(pdw);
- if ((pdw->Flags & PD_PAGENUMS) && (pdw->nFromPage > pdw->nToPage))
- done = false;
- if (result && pdw->hDC == 0)
- result = false;
- else if (!result)
- done = true;
- }, {
- PRINTDLGA *pda = reinterpret_cast<PRINTDLGA *>(pd);
- result = PrintDlgA(pda);
- if ((pda->Flags & PD_PAGENUMS) && (pda->nFromPage > pda->nToPage))
+ doPrinting = false;
+ result = (PrintDlgEx(&pd) == S_OK);
+ if (result && (pd.dwResultAction == PD_RESULT_PRINT
+ || pd.dwResultAction == PD_RESULT_APPLY))
+ {
+ doPrinting = (pd.dwResultAction == PD_RESULT_PRINT);
+ if ((pd.Flags & PD_PAGENUMS)
+ && (pd.lpPageRanges[0].nFromPage > pd.lpPageRanges[0].nToPage))
+ {
+ pd.lpPageRanges[0].nFromPage = 1;
+ pd.lpPageRanges[0].nToPage = 1;
done = false;
- if (result && pda->hDC == 0)
+ }
+ if (pd.hDC == 0)
result = false;
- else if (!result)
- done = true;
- });
+ }
+
if (!done) {
QMessageBox::warning(0, QPrintDialog::tr("Print"),
QPrintDialog::tr("The 'From' value cannot be greater than the 'To' value."),
@@ -274,16 +261,10 @@ int QPrintDialogPrivate::openWindowsPrintDialogModally()
qt_win_eatMouseMove();
// write values back...
- if (result) {
- QT_WA({
- PRINTDLGW *pdw = reinterpret_cast<PRINTDLGW *>(pd);
- qt_win_read_back_PRINTDLG(pdw, q, this);
- qt_win_clean_up_PRINTDLG(&pdw);
- }, {
- PRINTDLGA *pda = reinterpret_cast<PRINTDLGA *>(pd);
- qt_win_read_back_PRINTDLG(pda, q, this);
- qt_win_clean_up_PRINTDLG(&pda);
- });
+ if (result && (pd.dwResultAction == PD_RESULT_PRINT
+ || pd.dwResultAction == PD_RESULT_APPLY))
+ {
+ qt_win_read_back_PRINTDLGEX(&pd, q, this);
// update printer validity
printer->d_func()->validPrinter = !ep->name.isEmpty();
}
@@ -291,9 +272,9 @@ int QPrintDialogPrivate::openWindowsPrintDialogModally()
// Cleanup...
GlobalFree(tempDevNames);
- q->done(result);
+ q->done(result && doPrinting);
- return result;
+ return result && doPrinting;
}
void QPrintDialog::setVisible(bool visible)
diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp
index cd8d83f..15a48c2 100644
--- a/src/gui/dialogs/qprogressdialog.cpp
+++ b/src/gui/dialogs/qprogressdialog.cpp
@@ -626,7 +626,7 @@ int QProgressDialog::value() const
\warning If the progress dialog is modal
(see QProgressDialog::QProgressDialog()),
- this function calls QApplication::processEvents(), so take care that
+ setValue() calls QApplication::processEvents(), so take care that
this does not cause undesirable re-entrancy in your code. For example,
don't use a QProgressDialog inside a paintEvent()!
diff --git a/src/gui/dialogs/qsidebar.cpp b/src/gui/dialogs/qsidebar.cpp
index 1915e21..e4821ad 100644
--- a/src/gui/dialogs/qsidebar.cpp
+++ b/src/gui/dialogs/qsidebar.cpp
@@ -247,11 +247,16 @@ void QUrlModel::addUrls(const QList<QUrl> &list, int row, bool move)
QUrl url = list.at(i);
if (!url.isValid() || url.scheme() != QLatin1String("file"))
continue;
+ //this makes sure the url is clean
+ const QString cleanUrl = QDir::cleanPath(url.toLocalFile());
+ url = QUrl::fromLocalFile(cleanUrl);
+
for (int j = 0; move && j < rowCount(); ++j) {
+ QString local = index(j, 0).data(UrlRole).toUrl().toLocalFile();
#if defined(Q_OS_WIN)
- if (QDir::cleanPath(index(j, 0).data(UrlRole).toUrl().toLocalFile()).toLower() == QDir::cleanPath(url.toLocalFile()).toLower()) {
+ if (index(j, 0).data(UrlRole).toUrl().toLocalFile().toLower() == cleanUrl.toLower()) {
#else
- if (QDir::cleanPath(index(j, 0).data(UrlRole).toUrl().toLocalFile()) == QDir::cleanPath(url.toLocalFile())) {
+ if (index(j, 0).data(UrlRole).toUrl().toLocalFile() == cleanUrl) {
#endif
removeRow(j);
if (j <= row)
@@ -260,12 +265,12 @@ void QUrlModel::addUrls(const QList<QUrl> &list, int row, bool move)
}
}
row = qMax(row, 0);
- QModelIndex idx = fileSystemModel->index(url.toLocalFile());
+ QModelIndex idx = fileSystemModel->index(cleanUrl);
if (!fileSystemModel->isDir(idx))
continue;
insertRows(row, 1);
setUrl(index(row, 0), url, idx);
- watching.append(QPair<QModelIndex, QString>(idx, url.toLocalFile()));
+ watching.append(qMakePair(idx, cleanUrl));
}
}
diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp
index 3fdea54..a97aedd 100644
--- a/src/gui/dialogs/qwizard.cpp
+++ b/src/gui/dialogs/qwizard.cpp
@@ -343,8 +343,8 @@ void QWizardHeader::setup(const QWizardLayoutInfo &info, const QString &title,
{
bool modern = ((info.wizStyle == QWizard::ModernStyle)
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
- || ((info.wizStyle == QWizard::AeroStyle)
- && (QVistaHelper::vistaState() == QVistaHelper::Classic) || vistaDisabled())
+ || ((info.wizStyle == QWizard::AeroStyle
+ && QVistaHelper::vistaState() == QVistaHelper::Classic) || vistaDisabled())
#endif
);
@@ -1251,13 +1251,7 @@ void QWizardPrivate::updateMinMaxSizes(const QWizardLayoutInfo &info)
extraHeight = vistaHelper->titleBarSize() + vistaHelper->topOffset();
#endif
QSize minimumSize = mainLayout->totalMinimumSize() + QSize(0, extraHeight);
- QSize maximumSize;
- bool skipMaxSize = false;
-#if defined(Q_WS_WIN)
- if (QSysInfo::WindowsVersion <= QSysInfo::WV_Me) // ### See Tasks 164078 and 161660
- skipMaxSize = true;
-#endif
- maximumSize = mainLayout->totalMaximumSize();
+ QSize maximumSize = mainLayout->totalMaximumSize();
if (info.header && headerWidget->maximumWidth() != QWIDGETSIZE_MAX) {
minimumSize.setWidth(headerWidget->maximumWidth());
maximumSize.setWidth(headerWidget->maximumWidth());
@@ -1276,13 +1270,11 @@ void QWizardPrivate::updateMinMaxSizes(const QWizardLayoutInfo &info)
}
if (q->maximumWidth() == maximumWidth) {
maximumWidth = maximumSize.width();
- if (!skipMaxSize)
- q->setMaximumWidth(maximumWidth);
+ q->setMaximumWidth(maximumWidth);
}
if (q->maximumHeight() == maximumHeight) {
maximumHeight = maximumSize.height();
- if (!skipMaxSize)
- q->setMaximumHeight(maximumHeight);
+ q->setMaximumHeight(maximumHeight);
}
}
diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp
index 840149b..1def47f 100644
--- a/src/gui/dialogs/qwizard_win.cpp
+++ b/src/gui/dialogs/qwizard_win.cpp
@@ -616,7 +616,7 @@ bool QVistaHelper::drawTitleText(QPainter *painter, const QString &text, const Q
// Set up a memory DC and bitmap that we'll draw into
HDC dcMem;
HBITMAP bmp;
- BITMAPINFO dib = {0};
+ BITMAPINFO dib = {{0}};
dcMem = CreateCompatibleDC(hdc);
dib.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
@@ -662,7 +662,7 @@ bool QVistaHelper::drawBlackRect(const QRect &rect, HDC hdc)
// Set up a memory DC and bitmap that we'll draw into
HDC dcMem;
HBITMAP bmp;
- BITMAPINFO dib = {0};
+ BITMAPINFO dib = {{0}};
dcMem = CreateCompatibleDC(hdc);
dib.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h
index d3410d0..18a7531 100644
--- a/src/gui/dialogs/qwizard_win_p.h
+++ b/src/gui/dialogs/qwizard_win_p.h
@@ -56,7 +56,7 @@
#ifndef QT_NO_WIZARD
#ifndef QT_NO_STYLE_WINDOWSVISTA
-#include <windows.h>
+#include <qt_windows.h>
#include <qobject.h>
#include <qwidget.h>
#include <qabstractbutton.h>
diff --git a/src/gui/embedded/qkbdlinuxinput_qws.cpp b/src/gui/embedded/qkbdlinuxinput_qws.cpp
index d5720f7..e552731 100644
--- a/src/gui/embedded/qkbdlinuxinput_qws.cpp
+++ b/src/gui/embedded/qkbdlinuxinput_qws.cpp
@@ -47,6 +47,7 @@
#include <QStringList>
#include <qplatformdefs.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <errno.h>
#include <termios.h>
diff --git a/src/gui/embedded/qkbdsl5000_qws.cpp b/src/gui/embedded/qkbdsl5000_qws.cpp
index 36cb903..cf82c10 100644
--- a/src/gui/embedded/qkbdsl5000_qws.cpp
+++ b/src/gui/embedded/qkbdsl5000_qws.cpp
@@ -51,6 +51,8 @@
#include "qnamespace.h"
#include "qtimer.h"
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
+
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
@@ -207,14 +209,14 @@ QWSSL5000KeyboardHandler::QWSSL5000KeyboardHandler(const QString &device)
numLock = false;
sharp_kbdctl_modifstat st;
- int dev = ::open(device.isEmpty()?"/dev/sharp_kbdctl":device.toLocal8Bit().constData(), O_RDWR);
+ int dev = QT_OPEN(device.isEmpty()?"/dev/sharp_kbdctl":device.toLocal8Bit().constData(), O_RDWR);
if (dev >= 0) {
memset(&st, 0, sizeof(st));
st.which = 3;
int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st);
if(!ret)
numLock = (bool)st.stat;
- ::close(dev);
+ QT_CLOSE(dev);
}
}
diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp
index 33777eb..8c1e79b 100644
--- a/src/gui/embedded/qkbdtty_qws.cpp
+++ b/src/gui/embedded/qkbdtty_qws.cpp
@@ -47,6 +47,7 @@
#include <QStringList>
#include <qplatformdefs.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <errno.h>
#include <termios.h>
@@ -213,6 +214,9 @@ QWSTtyKbPrivate::~QWSTtyKbPrivate()
::ioctl(m_tty_fd, KDSKBMODE, m_originalKbdMode);
#endif
tcsetattr(m_tty_fd, TCSANOW, &m_tty_attr);
+
+ // we're leaking m_tty_fd here?
+ //QT_CLOSE(m_tty_fd);
}
}
diff --git a/src/gui/embedded/qkbdvfb_qws.cpp b/src/gui/embedded/qkbdvfb_qws.cpp
index 082aac1..a44183b 100644
--- a/src/gui/embedded/qkbdvfb_qws.cpp
+++ b/src/gui/embedded/qkbdvfb_qws.cpp
@@ -55,6 +55,7 @@
#include <qwindowsystem_qws.h>
#include <qsocketnotifier.h>
#include <qapplication.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
QT_BEGIN_NAMESPACE
@@ -69,13 +70,13 @@ QVFbKeyboardHandler::QVFbKeyboardHandler(const QString &device)
kbdBufferLen = sizeof(QVFbKeyData) * 5;
kbdBuffer = new unsigned char [kbdBufferLen];
- if ((kbdFD = open(terminalName.toLatin1().constData(), O_RDONLY | O_NDELAY)) < 0) {
+ if ((kbdFD = QT_OPEN(terminalName.toLatin1().constData(), O_RDONLY | O_NDELAY)) < 0) {
qWarning("Cannot open %s (%s)", terminalName.toLatin1().constData(),
strerror(errno));
} else {
// Clear pending input
char buf[2];
- while (read(kbdFD, buf, 1) > 0) { }
+ while (QT_READ(kbdFD, buf, 1) > 0) { }
notifier = new QSocketNotifier(kbdFD, QSocketNotifier::Read, this);
connect(notifier, SIGNAL(activated(int)),this, SLOT(readKeyboardData()));
@@ -85,7 +86,7 @@ QVFbKeyboardHandler::QVFbKeyboardHandler(const QString &device)
QVFbKeyboardHandler::~QVFbKeyboardHandler()
{
if (kbdFD >= 0)
- close(kbdFD);
+ QT_CLOSE(kbdFD);
delete [] kbdBuffer;
}
@@ -94,7 +95,7 @@ void QVFbKeyboardHandler::readKeyboardData()
{
int n;
do {
- n = read(kbdFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx);
+ n = QT_READ(kbdFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx);
if (n > 0)
kbdIdx += n;
} while (n > 0);
diff --git a/src/gui/embedded/qkbdvr41xx_qws.cpp b/src/gui/embedded/qkbdvr41xx_qws.cpp
index 03c2a67..6d8299b 100644
--- a/src/gui/embedded/qkbdvr41xx_qws.cpp
+++ b/src/gui/embedded/qkbdvr41xx_qws.cpp
@@ -52,6 +52,7 @@
#include <errno.h>
#include <qsocketnotifier.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
QT_BEGIN_NAMESPACE
@@ -95,7 +96,7 @@ QWSVr41xxKbPrivate::QWSVr41xxKbPrivate(QWSVr41xxKeyboardHandler *h, const QStrin
buttonFD = -1;
notifier = 0;
- buttonFD = open(terminalName.toLatin1().constData(), O_RDWR | O_NDELAY, 0);;
+ buttonFD = QT_OPEN(terminalName.toLatin1().constData(), O_RDWR | O_NDELAY, 0);;
if (buttonFD < 0) {
qWarning("Cannot open %s\n", qPrintable(terminalName));
return;
@@ -115,7 +116,7 @@ QWSVr41xxKbPrivate::QWSVr41xxKbPrivate(QWSVr41xxKeyboardHandler *h, const QStrin
QWSVr41xxKbPrivate::~QWSVr41xxKbPrivate()
{
if (buttonFD > 0) {
- ::close(buttonFD);
+ QT_CLOSE(buttonFD);
buttonFD = -1;
}
delete notifier;
@@ -127,7 +128,7 @@ void QWSVr41xxKbPrivate::readKeyboardData()
{
int n = 0;
do {
- n = read(buttonFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx);
+ n = QT_READ(buttonFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx);
if (n > 0)
kbdIdx += n;
} while (n > 0);
diff --git a/src/gui/embedded/qkbdyopy_qws.cpp b/src/gui/embedded/qkbdyopy_qws.cpp
index 5c9d28d..edb732c 100644
--- a/src/gui/embedded/qkbdyopy_qws.cpp
+++ b/src/gui/embedded/qkbdyopy_qws.cpp
@@ -60,6 +60,8 @@
#include <linux/fb.h>
#include <linux/yopy_button.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
+
extern "C" {
int getpgid(int);
}
@@ -105,7 +107,7 @@ QWSYopyKbPrivate::QWSYopyKbPrivate(QWSYopyKeyboardHandler *h, const QString &dev
buttonFD = -1;
notifier = 0;
- buttonFD = ::open(terminalName.toLatin1().constData(), O_RDWR | O_NDELAY, 0);
+ buttonFD = QT_OPEN(terminalName.toLatin1().constData(), O_RDWR | O_NDELAY, 0);
if (buttonFD < 0) {
qWarning("Cannot open %s\n", qPrintable(terminalName));
return;
@@ -177,10 +179,10 @@ void QWSYopyKbPrivate::readKeyboardData()
case 40: k=Qt::Key_Up; break; // prev
case 45: k=Qt::Key_Down; break; // next
case 35: if(!press) {
- fd = open("/proc/sys/pm/sleep",O_RDWR,0);
+ fd = QT_OPEN("/proc/sys/pm/sleep",O_RDWR,0);
if(fd >= 0) {
- write(fd,&c,sizeof(c));
- close(fd);
+ QT_WRITE(fd,&c,sizeof(c));
+ QT_CLOSE(fd);
//
// Updates all widgets.
//
diff --git a/src/gui/embedded/qlock.cpp b/src/gui/embedded/qlock.cpp
index c23608f..305832c 100644
--- a/src/gui/embedded/qlock.cpp
+++ b/src/gui/embedded/qlock.cpp
@@ -73,6 +73,8 @@ union semun {
#endif // QT_NO_QWS_MULTIPROCESS
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
+
#define MAX_LOCKS 200 // maximum simultaneous read locks
QT_BEGIN_NAMESPACE
@@ -134,7 +136,7 @@ QLock::QLock(const QString &filename, char id, bool create)
#ifdef Q_NO_SEMAPHORE
data->file = QString(filename+id).toLocal8Bit().constData();
for(int x = 0; x < 2; x++) {
- data->id = open(data->file, O_RDWR | (x ? O_CREAT : 0), S_IRWXU);
+ data->id = QT_OPEN(data->file, O_RDWR | (x ? O_CREAT : 0), S_IRWXU);
if(data->id != -1 || !create) {
data->owned = x;
break;
@@ -177,7 +179,7 @@ QLock::~QLock()
unlock();
#ifdef Q_NO_SEMAPHORE
if(isValid()) {
- close(data->id);
+ QT_CLOSE(data->id);
if(data->owned)
unlink(data->file);
}
diff --git a/src/gui/embedded/qmousebus_qws.cpp b/src/gui/embedded/qmousebus_qws.cpp
index a88ca5b..0b674b6 100644
--- a/src/gui/embedded/qmousebus_qws.cpp
+++ b/src/gui/embedded/qmousebus_qws.cpp
@@ -47,6 +47,7 @@
#include "qsocketnotifier.h"
#include "qapplication.h"
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -119,9 +120,9 @@ QWSBusMouseHandlerPrivate::QWSBusMouseHandlerPrivate(QWSBusMouseHandler *h,
mouseDev = QLatin1String("/dev/mouse");
obstate = -1;
mouseFD = -1;
- mouseFD = open(mouseDev.toLocal8Bit(), O_RDWR | O_NDELAY);
+ mouseFD = QT_OPEN(mouseDev.toLocal8Bit(), O_RDWR | O_NDELAY);
if (mouseFD < 0)
- mouseFD = open(mouseDev.toLocal8Bit(), O_RDONLY | O_NDELAY);
+ mouseFD = QT_OPEN(mouseDev.toLocal8Bit(), O_RDONLY | O_NDELAY);
if (mouseFD < 0)
qDebug("Cannot open %s (%s)", qPrintable(mouseDev), strerror(errno));
@@ -130,7 +131,7 @@ QWSBusMouseHandlerPrivate::QWSBusMouseHandlerPrivate(QWSBusMouseHandler *h,
usleep(50000);
char buf[100]; // busmouse driver will not read if bufsize < 3, YYD
- while (read(mouseFD, buf, 100) > 0) { } // eat unwanted replies
+ while (QT_READ(mouseFD, buf, 100) > 0) { } // eat unwanted replies
mouseIdx = 0;
@@ -142,7 +143,7 @@ QWSBusMouseHandlerPrivate::~QWSBusMouseHandlerPrivate()
{
if (mouseFD >= 0) {
tcflush(mouseFD,TCIFLUSH); // yyd.
- close(mouseFD);
+ QT_CLOSE(mouseFD);
}
}
@@ -167,7 +168,7 @@ void QWSBusMouseHandlerPrivate::readMouseData()
for (;;) {
if (mouseBufSize - mouseIdx < 3)
break;
- n = read(mouseFD, mouseBuf+mouseIdx, 3);
+ n = QT_READ(mouseFD, mouseBuf+mouseIdx, 3);
if (n != 3)
break;
mouseIdx += 3;
diff --git a/src/gui/embedded/qmouselinuxtp_qws.cpp b/src/gui/embedded/qmouselinuxtp_qws.cpp
index 1b4d96e..e64407e 100644
--- a/src/gui/embedded/qmouselinuxtp_qws.cpp
+++ b/src/gui/embedded/qmouselinuxtp_qws.cpp
@@ -47,6 +47,7 @@
#include "qtimer.h"
#include "qapplication.h"
#include "qscreen_qws.h"
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -190,7 +191,7 @@ QWSLinuxTPMouseHandlerPrivate::QWSLinuxTPMouseHandlerPrivate(QWSLinuxTPMouseHand
} else {
mousedev = device;
}
- if ((mouseFD = open(mousedev.toLatin1().constData(), O_RDONLY | O_NDELAY)) < 0) {
+ if ((mouseFD = QT_OPEN(mousedev.toLatin1().constData(), O_RDONLY | O_NDELAY)) < 0) {
qWarning("Cannot open %s (%s)", qPrintable(mousedev), strerror(errno));
return;
}
@@ -205,7 +206,7 @@ QWSLinuxTPMouseHandlerPrivate::QWSLinuxTPMouseHandlerPrivate(QWSLinuxTPMouseHand
QWSLinuxTPMouseHandlerPrivate::~QWSLinuxTPMouseHandlerPrivate()
{
if (mouseFD >= 0)
- close(mouseFD);
+ QT_CLOSE(mouseFD);
}
void QWSLinuxTPMouseHandlerPrivate::suspend()
@@ -233,7 +234,7 @@ void QWSLinuxTPMouseHandlerPrivate::readMouseData()
int n;
do {
- n = read(mouseFD, mouseBuf+mouseIdx, mouseBufSize-mouseIdx);
+ n = QT_READ(mouseFD, mouseBuf+mouseIdx, mouseBufSize-mouseIdx);
if (n > 0)
mouseIdx += n;
} while (n > 0 && mouseIdx < mouseBufSize);
diff --git a/src/gui/embedded/qmousepc_qws.cpp b/src/gui/embedded/qmousepc_qws.cpp
index a9f2bc8..317bb8a 100644
--- a/src/gui/embedded/qmousepc_qws.cpp
+++ b/src/gui/embedded/qmousepc_qws.cpp
@@ -55,6 +55,7 @@
#include "qfile.h"
#include "qtextstream.h"
#include "qstringlist.h"
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -107,7 +108,7 @@ public:
{
if (fd != f) {
f = fd;
- close(fd);
+ QT_CLOSE(fd);
}
}
@@ -170,7 +171,7 @@ public:
}
static const uchar initseq[] = { 243, 200, 243, 100, 243, 80 };
static const uchar query[] = { 0xf2 };
- if (write(fd, initseq, sizeof(initseq))!=sizeof(initseq)) {
+ if (QT_WRITE(fd, initseq, sizeof(initseq))!=sizeof(initseq)) {
badness = 100;
return;
}
@@ -180,12 +181,12 @@ public:
perror("QWSPcMouseSubHandler_intellimouse: post-init tcflush");
#endif
}
- if (write(fd, query, sizeof(query))!=sizeof(query)) {
+ if (QT_WRITE(fd, query, sizeof(query))!=sizeof(query)) {
badness = 100;
return;
}
usleep(10000);
- n = read(fd, reply, 20);
+ n = QT_READ(fd, reply, 20);
if (n > 0) {
goodness = 10;
switch (reply[n-1]) {
@@ -256,13 +257,13 @@ public:
perror("QWSPcMouseSubHandler_mouseman: initial tcflush");
#endif
}
- write(fd,"",1);
+ QT_WRITE(fd,"",1);
usleep(50000);
- write(fd,"@EeI!",5);
+ QT_WRITE(fd,"@EeI!",5);
usleep(10000);
static const char ibuf[] = { 246, 244 };
- write(fd,ibuf,1);
- write(fd,ibuf+1,1);
+ QT_WRITE(fd,ibuf,1);
+ QT_WRITE(fd,ibuf+1,1);
if (tcflush(fd,TCIOFLUSH) == -1) {
#ifdef QWS_MOUSE_DEBUG
perror("QWSPcMouseSubHandler_mouseman: tcflush");
@@ -271,7 +272,7 @@ public:
usleep(10000);
char buf[100];
- while (read(fd, buf, 100) > 0) { } // eat unwanted replies
+ while (QT_READ(fd, buf, 100) > 0) { } // eat unwanted replies
}
int tryData()
@@ -350,7 +351,7 @@ private:
for (int n = 0; n < 4; n++) {
setflags(CSTOPB | speed[n]);
- write(fd, "*q", 2);
+ QT_WRITE(fd, "*q", 2);
usleep(10000);
}
}
@@ -369,7 +370,7 @@ public:
{
setflags(B1200|CS8|CSTOPB);
// 60Hz
- if (write(fd, "R", 1)!=1) {
+ if (QT_WRITE(fd, "R", 1)!=1) {
badness = 100;
return;
}
@@ -418,7 +419,7 @@ public:
{
setflags(B1200|CS7);
// 60Hz
- if (write(fd, "R", 1)!=1) {
+ if (QT_WRITE(fd, "R", 1)!=1) {
badness = 100;
return;
}
@@ -648,25 +649,25 @@ void QWSPcMouseHandlerPrivate::openDevices()
if (drv == QLatin1String("intellimouse")) {
if (dev.isEmpty())
dev = "/dev/psaux";
- fd = open(dev, O_RDWR | O_NDELAY);
+ fd = QT_OPEN(dev, O_RDWR | O_NDELAY);
if (fd >= 0)
sub[nsub++] = new QWSPcMouseSubHandler_intellimouse(fd);
} else if (drv == QLatin1String("microsoft")) {
if (dev.isEmpty())
dev = "/dev/ttyS0";
- fd = open(dev, O_RDWR | O_NDELAY);
+ fd = QT_OPEN(dev, O_RDWR | O_NDELAY);
if (fd >= 0)
sub[nsub++] = new QWSPcMouseSubHandler_ms(fd);
} else if (drv == QLatin1String("mousesystems")) {
if (dev.isEmpty())
dev = "/dev/ttyS0";
- fd = open(dev, O_RDWR | O_NDELAY);
+ fd = QT_OPEN(dev, O_RDWR | O_NDELAY);
if (fd >= 0)
sub[nsub++] = new QWSPcMouseSubHandler_mousesystems(fd);
} else if (drv == QLatin1String("mouseman")) {
if (dev.isEmpty())
dev = "/dev/psaux";
- fd = open(dev, O_RDWR | O_NDELAY);
+ fd = QT_OPEN(dev, O_RDWR | O_NDELAY);
if (fd >= 0)
sub[nsub++] = new QWSPcMouseSubHandler_mouseman(fd);
}
@@ -677,12 +678,12 @@ void QWSPcMouseHandlerPrivate::openDevices()
dev.constData(), strerror(errno));
} else {
// Try automatically
- fd = open("/dev/psaux", O_RDWR | O_NDELAY);
+ fd = QT_OPEN("/dev/psaux", O_RDWR | O_NDELAY);
if (fd >= 0) {
sub[nsub++] = new QWSPcMouseSubHandler_intellimouse(fd);
notify(fd);
}
- fd = open("/dev/input/mice", O_RDWR | O_NDELAY);
+ fd = QT_OPEN("/dev/input/mice", O_RDWR | O_NDELAY);
if (fd >= 0) {
sub[nsub++] = new QWSPcMouseSubHandler_intellimouse(fd);
notify(fd);
@@ -694,7 +695,7 @@ void QWSPcMouseHandlerPrivate::openDevices()
#if 0
const char fn[4][11] = { "/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3" };
for (int ch = 0; ch < 4; ++ch) {
- fd = open(fn[ch], O_RDWR | O_NDELAY);
+ fd = QT_OPEN(fn[ch], O_RDWR | O_NDELAY);
if (fd >= 0) {
//sub[nsub++] = new QWSPcMouseSubHandler_intellimouse(fd);
sub[nsub++] = new QWSPcMouseSubHandler_mousesystems(fd);
diff --git a/src/gui/embedded/qmousevfb_qws.cpp b/src/gui/embedded/qmousevfb_qws.cpp
index 17d051f..dd553bc 100644
--- a/src/gui/embedded/qmousevfb_qws.cpp
+++ b/src/gui/embedded/qmousevfb_qws.cpp
@@ -54,6 +54,7 @@
#include <qsocketnotifier.h>
#include <qapplication.h>
#include <qtimer.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
QT_BEGIN_NAMESPACE
@@ -64,7 +65,7 @@ QVFbMouseHandler::QVFbMouseHandler(const QString &driver, const QString &device)
if (device.isEmpty())
mouseDev = QLatin1String("/dev/vmouse");
- mouseFD = open(mouseDev.toLatin1().constData(), O_RDWR | O_NDELAY);
+ mouseFD = QT_OPEN(mouseDev.toLatin1().constData(), O_RDWR | O_NDELAY);
if (mouseFD == -1) {
perror("QVFbMouseHandler::QVFbMouseHandler");
qWarning("QVFbMouseHander: Unable to open device %s",
@@ -74,7 +75,7 @@ QVFbMouseHandler::QVFbMouseHandler(const QString &driver, const QString &device)
// Clear pending input
char buf[2];
- while (read(mouseFD, buf, 1) > 0) { }
+ while (QT_READ(mouseFD, buf, 1) > 0) { }
mouseIdx = 0;
@@ -85,7 +86,7 @@ QVFbMouseHandler::QVFbMouseHandler(const QString &driver, const QString &device)
QVFbMouseHandler::~QVFbMouseHandler()
{
if (mouseFD >= 0)
- close(mouseFD);
+ QT_CLOSE(mouseFD);
}
void QVFbMouseHandler::resume()
@@ -102,7 +103,7 @@ void QVFbMouseHandler::readMouseData()
{
int n;
do {
- n = read(mouseFD, mouseBuf+mouseIdx, mouseBufSize-mouseIdx);
+ n = QT_READ(mouseFD, mouseBuf+mouseIdx, mouseBufSize-mouseIdx);
if (n > 0)
mouseIdx += n;
} while (n > 0);
diff --git a/src/gui/embedded/qmousevr41xx_qws.cpp b/src/gui/embedded/qmousevr41xx_qws.cpp
index 8748055..b7491d9 100644
--- a/src/gui/embedded/qmousevr41xx_qws.cpp
+++ b/src/gui/embedded/qmousevr41xx_qws.cpp
@@ -49,6 +49,7 @@
#include "qscreen_qws.h"
#include <qstringlist.h>
#include <qvarlengtharray.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -144,7 +145,7 @@ QWSVr41xxMouseHandlerPrivate::QWSVr41xxMouseHandlerPrivate(QWSVr41xxMouseHandler
else
dev = options.first();
- if ((mouseFD = open(dev.toLocal8Bit().constData(), O_RDONLY)) < 0) {
+ if ((mouseFD = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY)) < 0) {
qWarning("Cannot open %s (%s)", qPrintable(dev), strerror(errno));
return;
}
@@ -167,7 +168,7 @@ QWSVr41xxMouseHandlerPrivate::QWSVr41xxMouseHandlerPrivate(QWSVr41xxMouseHandler
QWSVr41xxMouseHandlerPrivate::~QWSVr41xxMouseHandlerPrivate()
{
if (mouseFD >= 0)
- close(mouseFD);
+ QT_CLOSE(mouseFD);
}
void QWSVr41xxMouseHandlerPrivate::suspend()
@@ -190,9 +191,9 @@ void QWSVr41xxMouseHandlerPrivate::sendRelease()
bool QWSVr41xxMouseHandlerPrivate::getSample()
{
- const int n = read(mouseFD,
- reinterpret_cast<uchar*>(currSample) + currLength,
- sizeof(currSample) - currLength);
+ const int n = QT_READ(mouseFD,
+ reinterpret_cast<uchar*>(currSample) + currLength,
+ sizeof(currSample) - currLength);
if (n > 0)
currLength += n;
diff --git a/src/gui/embedded/qmouseyopy_qws.cpp b/src/gui/embedded/qmouseyopy_qws.cpp
index 7b1141a..3a541d3 100644
--- a/src/gui/embedded/qmouseyopy_qws.cpp
+++ b/src/gui/embedded/qmouseyopy_qws.cpp
@@ -46,6 +46,7 @@
#include "qsocketnotifier.h"
#include "qapplication.h"
#include "qscreen_qws.h"
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -103,7 +104,7 @@ void QWSYopyMouseHandler::suspend()
QWSYopyMouseHandlerPrivate::QWSYopyMouseHandlerPrivate(QWSYopyMouseHandler *h)
: handler(h)
{
- if ((mouseFD = open("/dev/ts", O_RDONLY)) < 0) {
+ if ((mouseFD = QT_OPEN("/dev/ts", O_RDONLY)) < 0) {
qWarning("Cannot open /dev/ts (%s)", strerror(errno));
return;
} else {
@@ -118,7 +119,7 @@ QWSYopyMouseHandlerPrivate::QWSYopyMouseHandlerPrivate(QWSYopyMouseHandler *h)
QWSYopyMouseHandlerPrivate::~QWSYopyMouseHandlerPrivate()
{
if (mouseFD >= 0)
- close(mouseFD);
+ QT_CLOSE(mouseFD);
}
#define YOPY_XPOS(d) (d[1]&0x3FF)
@@ -156,7 +157,7 @@ void QWSYopyMouseHandlerPrivate::readMouseData()
int ret;
- ret=read(mouseFD,&yopDat,sizeof(yopDat));
+ ret=QT_READ(mouseFD,&yopDat,sizeof(yopDat));
if(ret) {
data.status= (YOPY_PRES(yopDat)) ? 1 : 0;
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
index 42c4fcd..2845842 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
@@ -46,6 +46,7 @@
#include "qwsdisplay_qws.h"
#include "qpixmap.h"
#include <private/qwssignalhandler_p.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -122,12 +123,12 @@ void QLinuxFbScreenPrivate::openTty()
if (ttyDevice.isEmpty()) {
for (const char * const *dev = devs; *dev; ++dev) {
- ttyfd = ::open(*dev, O_RDWR);
+ ttyfd = QT_OPEN(*dev, O_RDWR);
if (ttyfd != -1)
break;
}
} else {
- ttyfd = ::open(ttyDevice.toAscii().constData(), O_RDWR);
+ ttyfd = QT_OPEN(ttyDevice.toAscii().constData(), O_RDWR);
}
if (ttyfd == -1)
@@ -144,7 +145,7 @@ void QLinuxFbScreenPrivate::openTty()
// No blankin' screen, no blinkin' cursor!, no cursor!
const char termctl[] = "\033[9;0]\033[?33l\033[?25l\033[?1c";
- ::write(ttyfd, termctl, sizeof(termctl));
+ QT_WRITE(ttyfd, termctl, sizeof(termctl));
}
void QLinuxFbScreenPrivate::closeTty()
@@ -157,9 +158,9 @@ void QLinuxFbScreenPrivate::closeTty()
// Blankin' screen, blinkin' cursor!
const char termctl[] = "\033[9;15]\033[?33h\033[?25h\033[?0c";
- ::write(ttyfd, termctl, sizeof(termctl));
+ QT_WRITE(ttyfd, termctl, sizeof(termctl));
- ::close(ttyfd);
+ QT_CLOSE(ttyfd);
ttyfd = -1;
}
@@ -281,7 +282,7 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
dev = QLatin1String("/dev/fb0");
if (access(dev.toLatin1().constData(), R_OK|W_OK) == 0)
- d_ptr->fd = open(dev.toLatin1().constData(), O_RDWR);
+ d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDWR);
if (d_ptr->fd == -1) {
if (QApplication::type() == QApplication::GuiServer) {
perror("QScreenLinuxFb::connect");
@@ -289,7 +290,7 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
return false;
}
if (access(dev.toLatin1().constData(), R_OK) == 0)
- d_ptr->fd = open(dev.toLatin1().constData(), O_RDONLY);
+ d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDONLY);
}
fb_fix_screeninfo finfo;
@@ -681,7 +682,7 @@ bool QLinuxFbScreen::initDevice()
#ifdef __i386__
// Now init mtrr
if(!::getenv("QWS_NOMTRR")) {
- int mfd=open("/proc/mtrr",O_WRONLY,0);
+ int mfd=QT_OPEN("/proc/mtrr",O_WRONLY,0);
// MTRR entry goes away when file is closed - i.e.
// hopefully when QWS is killed
if(mfd != -1) {
@@ -702,6 +703,9 @@ bool QLinuxFbScreen::initDevice()
//sentry.base,sentry.size,strerror(errno));
}
}
+
+ // Should we close mfd here?
+ //QT_CLOSE(mfd);
}
#endif
if ((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4) || (finfo.visual==FB_VISUAL_DIRECTCOLOR))
diff --git a/src/gui/embedded/qsoundqss_qws.cpp b/src/gui/embedded/qsoundqss_qws.cpp
index ac0ac9d..a45d0fe 100644
--- a/src/gui/embedded/qsoundqss_qws.cpp
+++ b/src/gui/embedded/qsoundqss_qws.cpp
@@ -53,6 +53,7 @@
#include <qtimer.h>
#include <qpointer.h>
#include <qendian.h>
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <unistd.h>
#include <stdlib.h>
@@ -1137,7 +1138,7 @@ void QWSSoundServerPrivate::sendCompletedSignals()
int QWSSoundServerPrivate::openFile(int wid, int sid, const QString& filename)
{
stopFile(wid, sid); // close and re-open.
- int f = ::open(QFile::encodeName(filename), O_RDONLY|O_NONBLOCK);
+ int f = QT_OPEN(QFile::encodeName(filename), O_RDONLY|O_NONBLOCK);
if (f == -1) {
// XXX check ferror, check reason.
qDebug("Failed opening \"%s\"",filename.toLatin1().data());
@@ -1157,7 +1158,7 @@ bool QWSSoundServerPrivate::openDevice()
{
if (fd < 0) {
if( silent ) {
- fd = ::open( "/dev/null", O_WRONLY );
+ fd = QT_OPEN( "/dev/null", O_WRONLY );
// Emulate write to audio device
int delay = 1000*(sound_buffer_size>>(sound_stereo+sound_16bit))/sound_speed/2;
timerId = startTimer(delay);
@@ -1168,7 +1169,7 @@ bool QWSSoundServerPrivate::openDevice()
// Don't block open right away.
//
bool openOkay = false;
- if ((fd = ::open("/dev/dsp", O_WRONLY|O_NONBLOCK)) != -1) {
+ if ((fd = QT_OPEN("/dev/dsp", O_WRONLY|O_NONBLOCK)) != -1) {
int flags = fcntl(fd, F_GETFL);
flags &= ~O_NONBLOCK;
openOkay = (fcntl(fd, F_SETFL, flags) == 0);
@@ -1222,7 +1223,7 @@ bool QWSSoundServerPrivate::openDevice()
//
// Check system volume
//
- int mixerHandle = ::open( "/dev/mixer", O_RDWR|O_NONBLOCK );
+ int mixerHandle = QT_OPEN( "/dev/mixer", O_RDWR|O_NONBLOCK );
if ( mixerHandle >= 0 ) {
int volume;
ioctl( mixerHandle, MIXER_READ(0), &volume );
diff --git a/src/gui/embedded/qtransportauth_qws.cpp b/src/gui/embedded/qtransportauth_qws.cpp
index 05dce11..8523e27 100644
--- a/src/gui/embedded/qtransportauth_qws.cpp
+++ b/src/gui/embedded/qtransportauth_qws.cpp
@@ -56,6 +56,7 @@
#include "qlibraryinfo.h"
#include "qfile.h"
#include "qdebug.h"
+#include <private/qcore_unix_p.h> // overrides QT_OPEN
#include <syslog.h>
#include <unistd.h>
@@ -572,7 +573,7 @@ bool QTransportAuth::authorizeRequest( QTransportAuth::Data &d, const QString &r
//get cmdline from proc/pid/cmdline
snprintf( cmdlinePath, BUF_SIZE, "/proc/%d/cmdline", d.processId );
- int cmdlineFd = open( cmdlinePath, O_RDONLY );
+ int cmdlineFd = QT_OPEN( cmdlinePath, O_RDONLY );
if ( cmdlineFd == -1 )
{
qWarning( "SXE:- Error encountered in opening /proc/%u/cmdline: %s",
@@ -581,13 +582,13 @@ bool QTransportAuth::authorizeRequest( QTransportAuth::Data &d, const QString &r
}
else
{
- if ( -1 == ::read(cmdlineFd, cmdline, BUF_SIZE - 1 ) )
+ if ( -1 == QT_READ(cmdlineFd, cmdline, BUF_SIZE - 1 ) )
{
qWarning( "SXE:- Error encountered in reading /proc/%u/cmdline : %s",
d.processId, strerror(errno) );
snprintf( cmdline, BUF_SIZE, "%s", "Unknown" );
}
- close( cmdlineFd );
+ QT_CLOSE( cmdlineFd );
}
syslog( LOG_ERR | LOG_LOCAL6, "%s // PID:%u // ProgId:%u // Exe:%s // Request:%s // Cmdline:%s",
diff --git a/src/gui/embedded/qunixsocket.cpp b/src/gui/embedded/qunixsocket.cpp
index 070d3cf..57a4a11 100644
--- a/src/gui/embedded/qunixsocket.cpp
+++ b/src/gui/embedded/qunixsocket.cpp
@@ -46,6 +46,7 @@
#include <QtCore/qsocketnotifier.h>
#include <QtCore/qqueue.h>
#include <QtCore/qdatetime.h>
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
#ifdef QUNIXSOCKET_DEBUG
#include <QtCore/qdebug.h>
@@ -131,7 +132,7 @@ struct QUnixSocketRightsPrivate : public QSharedData
#ifdef QUNIXSOCKET_DEBUG
int closerv =
#endif
- ::close(fd);
+ QT_CLOSE(fd);
#ifdef QUNIXSOCKET_DEBUG
if(0 != closerv) {
qDebug() << "QUnixSocketRightsPrivate: Unable to close managed"
@@ -162,7 +163,7 @@ QUnixSocketRights::QUnixSocketRights(int fd)
if(-1 == fd) {
d->fd = -1;
} else {
- d->fd = ::dup(fd);
+ d->fd = qt_safe_dup(fd);
#ifdef QUNIXSOCKET_DEBUG
if(-1 == d->fd) {
qDebug() << "QUnixSocketRights: Unable to duplicate fd "
@@ -232,7 +233,7 @@ int QUnixSocketRights::dupFd() const
{
if(-1 == d->fd) return -1;
- int rv = ::dup(d->fd);
+ int rv = qt_safe_dup(d->fd);
#ifdef QUNIXSOCKET_DEBUG
if(-1 == rv)
@@ -825,7 +826,7 @@ public:
int numFds = (h->cmsg_len - CMSG_LEN(0)) / sizeof(int);
for(int ii = 0; ii < numFds; ++ii)
- ::close(fds[ii]);
+ QT_CLOSE(fds[ii]);
}
h = (::cmsghdr *)CMSG_NXTHDR(&(message), h);
@@ -1017,7 +1018,7 @@ connect_error: // Cleanup failed connection
#ifdef QUNIXSOCKET_DEBUG
int closerv =
#endif
- ::close(d->fd);
+ QT_CLOSE(d->fd);
#ifdef QUNIXSOCKET_DEBUG
if(0 != closerv) {
qDebug() << "QUnixSocket: Unable to close file descriptor after "
@@ -1762,7 +1763,12 @@ void QUnixSocketPrivate::readActivated()
message.msg_controllen = ancillaryBufferCapacity();
message.msg_control = ancillaryBuffer;
- int recvrv = ::recvmsg(fd, &message, 0);
+ int flags = 0;
+#ifdef MSG_CMSG_CLOEXEC
+ flags = MSG_CMSG_CLOEXEC;
+#endif
+
+ int recvrv = ::recvmsg(fd, &message, flags);
#ifdef QUNIXSOCKET_DEBUG
qDebug() << "QUnixSocket: Received message (" << recvrv << ')';
#endif
diff --git a/src/gui/graphicsview/graphicsview.pri b/src/gui/graphicsview/graphicsview.pri
index 3146752..4c3ac42 100644
--- a/src/gui/graphicsview/graphicsview.pri
+++ b/src/gui/graphicsview/graphicsview.pri
@@ -1,39 +1,43 @@
# Qt graphicsview module
-HEADERS += graphicsview/qgraphicsitem.h \
+HEADERS += graphicsview/qgraphicsgridlayout.h \
+ graphicsview/qgraphicsitem.h \
graphicsview/qgraphicsitem_p.h \
graphicsview/qgraphicsitemanimation.h \
- graphicsview/qgraphicseffect.h \
- graphicsview/qgraphicsscene.h \
- graphicsview/qgraphicsscene_p.h \
- graphicsview/qgraphicsscene_bsp_p.h \
- graphicsview/qgraphicssceneevent.h \
- graphicsview/qgraphicsview_p.h \
- graphicsview/qgraphicsview.h
-SOURCES += graphicsview/qgraphicsitem.cpp \
- graphicsview/qgraphicsitemanimation.cpp \
- graphicsview/qgraphicseffect.cpp \
- graphicsview/qgraphicsscene.cpp \
- graphicsview/qgraphicsscene_bsp.cpp \
- graphicsview/qgraphicssceneevent.cpp \
- graphicsview/qgraphicsview.cpp
-
-# Widgets on the canvas
-HEADERS += graphicsview/qgraphicslayout.h \
graphicsview/qgraphicslayout_p.h \
graphicsview/qgraphicslayoutitem.h \
graphicsview/qgraphicslayoutitem_p.h \
graphicsview/qgraphicslinearlayout.h \
+ graphicsview/qgraphicsproxywidget.h \
+ graphicsview/qgraphicsscene.h \
+ graphicsview/qgraphicsscene_bsp_p.h \
+ graphicsview/qgraphicsscene_p.h \
+ graphicsview/qgraphicsscenebsptreeindex_p.h \
+ graphicsview/qgraphicssceneevent.h \
+ graphicsview/qgraphicssceneindex_p.h \
+ graphicsview/qgraphicsscenelinearindex_p.h \
+ graphicsview/qgraphicsview.h \
+ graphicsview/qgraphicsview_p.h \
graphicsview/qgraphicswidget.h \
graphicsview/qgraphicswidget_p.h \
graphicsview/qgridlayoutengine_p.h \
- graphicsview/qgraphicsproxywidget.h \
- graphicsview/qgraphicsgridlayout.h
-SOURCES += graphicsview/qgraphicslayout.cpp \
+ graphicsview/qgraphicseffect.h
+
+SOURCES += graphicsview/qgraphicsgridlayout.cpp \
+ graphicsview/qgraphicsitem.cpp \
+ graphicsview/qgraphicsitemanimation.cpp \
+ graphicsview/qgraphicslayout.cpp \
graphicsview/qgraphicslayout_p.cpp \
graphicsview/qgraphicslayoutitem.cpp \
graphicsview/qgraphicslinearlayout.cpp \
+ graphicsview/qgraphicsproxywidget.cpp \
+ graphicsview/qgraphicsscene.cpp \
+ graphicsview/qgraphicsscene_bsp.cpp \
+ graphicsview/qgraphicsscenebsptreeindex.cpp \
+ graphicsview/qgraphicssceneevent.cpp \
+ graphicsview/qgraphicssceneindex.cpp \
+ graphicsview/qgraphicsscenelinearindex.cpp \
+ graphicsview/qgraphicsview.cpp \
graphicsview/qgraphicswidget.cpp \
graphicsview/qgraphicswidget_p.cpp \
graphicsview/qgridlayoutengine.cpp \
- graphicsview/qgraphicsproxywidget.cpp \
- graphicsview/qgraphicsgridlayout.cpp
+ graphicsview/qgraphicseffect.cpp
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 607374a..a044fbd 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -323,6 +323,10 @@
performance reasons, these notifications are disabled by default. You must
enable this flag to receive notifications for position and transform
changes. This flag was introduced in Qt 4.6.
+
+ \value ItemAcceptsInputMethod The item supports input methods typically
+ used for Asian languages.
+ This flag was introduced in Qt 4.6.
*/
/*!
@@ -555,6 +559,7 @@
#include "qgraphicsview.h"
#include "qgraphicswidget.h"
#include "qgraphicsproxywidget.h"
+#include "qgraphicsscenebsptreeindex_p.h"
#include <QtCore/qbitarray.h>
#include <QtCore/qdebug.h>
#include <QtCore/qpoint.h>
@@ -575,7 +580,6 @@
#include <private/qtextcontrol_p.h>
#include <private/qtextdocumentlayout_p.h>
#include <private/qtextengine_p.h>
-#include <private/qgesturemanager_p.h>
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
@@ -586,17 +590,6 @@
QT_BEGIN_NAMESPACE
-// QRectF::intersects() returns false always if either the source or target
-// rectangle's width or height are 0. This works around that problem.
-static inline void _q_adjustRect(QRectF *rect)
-{
- Q_ASSERT(rect);
- if (!rect->width())
- rect->adjust(-0.00001, 0, 0.00001, 0);
- if (!rect->height())
- rect->adjust(0, -0.00001, 0, 0.00001);
-}
-
static inline void _q_adjustRect(QRect *rect)
{
Q_ASSERT(rect);
@@ -616,8 +609,6 @@ public:
};
Q_GLOBAL_STATIC(QGraphicsItemCustomDataStore, qt_dataStore)
-QString qt_getStandardGestureTypeName(Qt::GestureType type);
-
/*!
\internal
@@ -660,6 +651,10 @@ void QGraphicsItemPrivate::updateAncestorFlag(QGraphicsItem::GraphicsItemFlag ch
// For root items only. This is the item that has either enabled or
// disabled \a childFlag, or has been reparented.
switch (int(childFlag)) {
+ case -2:
+ flag = AncestorFiltersChildEvents;
+ enabled = q->filtersChildEvents();
+ break;
case -1:
flag = AncestorHandlesChildEvents;
enabled = q->handlesChildEvents();
@@ -680,7 +675,8 @@ void QGraphicsItemPrivate::updateAncestorFlag(QGraphicsItem::GraphicsItemFlag ch
// Inherit the enabled-state from our parents.
if ((parent && ((parent->d_ptr->ancestorFlags & flag)
|| (int(parent->d_ptr->flags & childFlag) == childFlag)
- || (childFlag == -1 && parent->d_ptr->handlesChildEvents)))) {
+ || (childFlag == -1 && parent->d_ptr->handlesChildEvents)
+ || (childFlag == -2 && parent->d_ptr->filtersDescendantEvents)))) {
enabled = true;
ancestorFlags |= flag;
}
@@ -701,7 +697,9 @@ void QGraphicsItemPrivate::updateAncestorFlag(QGraphicsItem::GraphicsItemFlag ch
ancestorFlags &= ~flag;
// Don't process children if the item has the main flag set on itself.
- if ((childFlag != -1 && int(flags & childFlag) == childFlag) || (int(childFlag) == -1 && handlesChildEvents))
+ if ((childFlag != -1 && int(flags & childFlag) == childFlag)
+ || (int(childFlag) == -1 && handlesChildEvents)
+ || (int(childFlag) == -2 && filtersDescendantEvents))
return;
}
@@ -832,6 +830,42 @@ void QGraphicsItemPrivate::combineTransformFromParent(QTransform *x, const QTran
}
}
+void QGraphicsItemPrivate::updateSceneTransformFromParent()
+{
+ if (parent) {
+ Q_ASSERT(!parent->d_ptr->dirtySceneTransform);
+ if (parent->d_ptr->sceneTransformTranslateOnly) {
+ sceneTransform = QTransform::fromTranslate(parent->d_ptr->sceneTransform.dx() + pos.x(),
+ parent->d_ptr->sceneTransform.dy() + pos.y());
+ } else {
+ sceneTransform = parent->d_ptr->sceneTransform;
+ sceneTransform.translate(pos.x(), pos.y());
+ }
+ if (transformData) {
+ sceneTransform = transformData->computedFullTransform(&sceneTransform);
+ sceneTransformTranslateOnly = (sceneTransform.type() <= QTransform::TxTranslate);
+ } else {
+ sceneTransformTranslateOnly = parent->d_ptr->sceneTransformTranslateOnly;
+ }
+ } else if (!transformData) {
+ sceneTransform = QTransform::fromTranslate(pos.x(), pos.y());
+ sceneTransformTranslateOnly = 1;
+ } else if (transformData->onlyTransform) {
+ sceneTransform = transformData->transform;
+ if (!pos.isNull())
+ sceneTransform *= QTransform::fromTranslate(pos.x(), pos.y());
+ sceneTransformTranslateOnly = (sceneTransform.type() <= QTransform::TxTranslate);
+ } else if (pos.isNull()) {
+ sceneTransform = transformData->computedFullTransform();
+ sceneTransformTranslateOnly = (sceneTransform.type() <= QTransform::TxTranslate);
+ } else {
+ sceneTransform = QTransform::fromTranslate(pos.x(), pos.y());
+ sceneTransform = transformData->computedFullTransform(&sceneTransform);
+ sceneTransformTranslateOnly = (sceneTransform.type() <= QTransform::TxTranslate);
+ }
+ dirtySceneTransform = 0;
+}
+
/*!
\internal
@@ -871,6 +905,11 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
if (newParent == parent)
return;
+ if (scene) {
+ // Deliver the change to the index
+ scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant);
+ }
+
if (QGraphicsWidget *w = isWidget ? static_cast<QGraphicsWidget *>(q) : q->parentWidget()) {
// Update the child focus chain; when reparenting a widget that has a
// focus child, ensure that that focus child clears its focus child
@@ -922,6 +961,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
}
// Inherit ancestor flags from the new parent.
+ updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2));
updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1));
updateAncestorFlag(QGraphicsItem::ItemClipsChildrenToShape);
updateAncestorFlag(QGraphicsItem::ItemIgnoresTransformations);
@@ -938,6 +978,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
} else {
// Inherit ancestor flags from the new parent.
+ updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2));
updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1));
updateAncestorFlag(QGraphicsItem::ItemClipsChildrenToShape);
updateAncestorFlag(QGraphicsItem::ItemIgnoresTransformations);
@@ -958,12 +999,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
}
}
- if (scene) {
- // Invalidate any sort caching; arrival of a new item means we need to
- // resort.
- scene->d_func()->invalidateSortCache();
- }
-
// Resolve depth.
resolveDepth(parent ? parent->d_ptr->depth : -1);
dirtySceneTransform = 1;
@@ -1132,7 +1167,6 @@ QGraphicsItem::~QGraphicsItem()
{
d_ptr->inDestructor = 1;
d_ptr->removeExtraItemCache();
- d_ptr->removeExtraGestures();
clearFocus();
if (!d_ptr->children.isEmpty()) {
@@ -1227,7 +1261,7 @@ QGraphicsItem *QGraphicsItem::topLevelItem() const
}
/*!
- \since 4.4
+ \since 4.6
Returns a pointer to the item's parent, cast to a QGraphicsObject. returns 0 if the parent item
is not a QGraphicsObject.
@@ -1443,6 +1477,8 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags)
flags = GraphicsItemFlags(itemChange(ItemFlagsChange, quint32(flags)).toUInt());
if (quint32(d_ptr->flags) == quint32(flags))
return;
+ if (d_ptr->scene)
+ d_ptr->scene->d_func()->index->itemChange(this, ItemFlagsChange, quint32(flags));
// Flags that alter the geometry of the item (or its children).
const quint32 geomChangeFlagsMask = (ItemClipsChildrenToShape | ItemClipsToShape | ItemIgnoresTransformations);
@@ -1491,6 +1527,12 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags)
d_ptr->scene->d_func()->needSortTopLevelItems = 1;
}
+ if ((flags & ItemAcceptsInputMethod) != (oldFlags & ItemAcceptsInputMethod)) {
+ // Update input method sensitivity in any views.
+ if (d_ptr->scene)
+ d_ptr->scene->d_func()->updateInputMethodSensitivityInViews();
+ }
+
if (d_ptr->scene) {
d_ptr->scene->d_func()->markDirty(this, QRectF(),
/*invalidateChildren=*/true,
@@ -1795,6 +1837,8 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo
if (q_ptr->isSelected())
q_ptr->setSelected(false);
} else {
+ geometryChanged = 1;
+ paintedViewBoundingRectsNeedRepaint = 1;
if (isWidget && scene) {
QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(q_ptr);
if (widget->windowType() == Qt::Popup)
@@ -2408,8 +2452,8 @@ void QGraphicsItem::setAcceptsHoverEvents(bool enabled)
/*! \since 4.6
- Returns true if an item accepts touch events (QTouchEvent); otherwise, returns false. By
- default, items do not accept touch events.
+ Returns true if an item accepts \l{QTouchEvent}{touch events};
+ otherwise, returns false. By default, items do not accept touch events.
\sa setAcceptTouchEvents()
*/
@@ -2421,7 +2465,7 @@ bool QGraphicsItem::acceptTouchEvents() const
/*!
\since 4.6
- If \a enabled is true, this item will accept touch events;
+ If \a enabled is true, this item will accept \l{QTouchEvent}{touch events};
otherwise, it will ignore them. By default, items do not accept
touch events.
*/
@@ -2437,6 +2481,44 @@ void QGraphicsItem::setAcceptTouchEvents(bool enabled)
}
/*!
+ \since 4.6
+
+ Returns true if this item filters child events (i.e., all events
+ intended for any of its children are instead sent to this item);
+ otherwise, false is returned.
+
+ The default value is false; child events are not filtered.
+
+ \sa setFiltersChildEvents()
+*/
+bool QGraphicsItem::filtersChildEvents() const
+{
+ return d_ptr->filtersDescendantEvents;
+}
+
+/*!
+ \since 4.6
+
+ If \a enabled is true, this item is set to filter all events for
+ all its children (i.e., all events intented for any of its
+ children are instead sent to this item); otherwise, if \a enabled
+ is false, this item will only handle its own events. The default
+ value is false.
+
+ \sa filtersChildEvents()
+*/
+void QGraphicsItem::setFiltersChildEvents(bool enabled)
+{
+ if (d_ptr->filtersDescendantEvents == enabled)
+ return;
+
+ d_ptr->filtersDescendantEvents = enabled;
+ d_ptr->updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-2));
+}
+
+/*!
+ \obsolete
+
Returns true if this item handles child events (i.e., all events
intended for any of its children are instead sent to this item);
otherwise, false is returned.
@@ -2457,6 +2539,8 @@ bool QGraphicsItem::handlesChildEvents() const
}
/*!
+ \obsolete
+
If \a enabled is true, this item is set to handle all events for
all its children (i.e., all events intented for any of its
children are instead sent to this item); otherwise, if \a enabled
@@ -2701,10 +2785,12 @@ QPointF QGraphicsItem::pos() const
*/
/*!
- Set's the \a x coordinate of the item's position. Equivalent to
- calling setPos(x, y()).
+ \since 4.6
- \sa x(), setPos()
+ Set's the \a x coordinate of the item's position. Equivalent to
+ calling setPos(x, y()).
+
+ \sa x(), setPos()
*/
void QGraphicsItem::setX(qreal x)
{
@@ -2720,10 +2806,12 @@ void QGraphicsItem::setX(qreal x)
*/
/*!
- Set's the \a y coordinate of the item's position. Equivalent to
- calling setPos(x(), y).
+ \since 4.6
- \sa x(), setPos()
+ Set's the \a y coordinate of the item's position. Equivalent to
+ calling setPos(x(), y).
+
+ \sa x(), setPos()
*/
void QGraphicsItem::setY(qreal y)
{
@@ -3221,7 +3309,7 @@ void QGraphicsItem::setShear(qreal sh, qreal sv)
/*!
\since 4.6
- Returns the origin point used for transformation in item coordinate.
+ Returns the origin point for the transformation in item coordinates.
The default is QPointF(0,0).
@@ -3237,7 +3325,7 @@ QPointF QGraphicsItem::transformOrigin() const
/*!
\since 4.6
- Sets the \a origin for transformation in item coordinate
+ Sets the \a origin point for the transformation in item coordinates.
\sa transformOrigin(), {Transformations}
*/
@@ -3258,9 +3346,9 @@ void QGraphicsItem::setTransformOrigin(const QPointF &origin)
\since 4.6
\overload
- Sets the origin for the transformation to the point
- composed of \a x and \a y.
-
+ Sets the origin point for the transformation in item coordinates.
+ This is equivalent to calling setTransformOrigin(QPointF(\a x, \a y)).
+
\sa setTransformOrigin(), {Transformations}
*/
@@ -3274,7 +3362,8 @@ void QGraphicsItem::setTransformOrigin(const QPointF &origin)
*/
QMatrix QGraphicsItem::sceneMatrix() const
{
- return sceneTransform().toAffine();
+ d_ptr->ensureSceneTransform();
+ return d_ptr->sceneTransform.toAffine();
}
@@ -3297,16 +3386,7 @@ QMatrix QGraphicsItem::sceneMatrix() const
*/
QTransform QGraphicsItem::sceneTransform() const
{
- if (d_ptr->dirtySceneTransform) {
- // This item and all its descendants have dirty scene transforms.
- // We're about to validate this item's scene transform, so we have to
- // invalidate all the children; otherwise there's no way for the descendants
- // to detect that the ancestor has changed.
- d_ptr->invalidateChildrenSceneTransform();
- }
-
- QGraphicsItem *that = const_cast<QGraphicsItem *>(this);
- d_ptr->ensureSceneTransformRecursive(&that);
+ d_ptr->ensureSceneTransform();
return d_ptr->sceneTransform;
}
@@ -3336,8 +3416,10 @@ QTransform QGraphicsItem::sceneTransform() const
QTransform QGraphicsItem::deviceTransform(const QTransform &viewportTransform) const
{
// Ensure we return the standard transform if we're not untransformable.
- if (!d_ptr->itemIsUntransformable())
- return sceneTransform() * viewportTransform;
+ if (!d_ptr->itemIsUntransformable()) {
+ d_ptr->ensureSceneTransform();
+ return d_ptr->sceneTransform * viewportTransform;
+ }
// Find the topmost item that ignores view transformations.
const QGraphicsItem *untransformedAncestor = this;
@@ -3356,7 +3438,8 @@ QTransform QGraphicsItem::deviceTransform(const QTransform &viewportTransform) c
}
// First translate the base untransformable item.
- QPointF mappedPoint = (untransformedAncestor->sceneTransform() * viewportTransform).map(QPointF(0, 0));
+ untransformedAncestor->d_ptr->ensureSceneTransform();
+ QPointF mappedPoint = (untransformedAncestor->d_ptr->sceneTransform * viewportTransform).map(QPointF(0, 0));
// COMBINE
QTransform matrix = QTransform::fromTranslate(mappedPoint.x(), mappedPoint.y());
@@ -3449,8 +3532,11 @@ QTransform QGraphicsItem::itemTransform(const QGraphicsItem *other, bool *ok) co
// Find the closest common ancestor. If the two items don't share an
// ancestor, then the only way is to combine their scene transforms.
const QGraphicsItem *commonAncestor = commonAncestorItem(other);
- if (!commonAncestor)
- return sceneTransform() * other->sceneTransform().inverted(ok);
+ if (!commonAncestor) {
+ d_ptr->ensureSceneTransform();
+ other->d_ptr->ensureSceneTransform();
+ return d_ptr->sceneTransform * other->d_ptr->sceneTransform.inverted(ok);
+ }
// If the two items are cousins (in sibling branches), map both to the
// common ancestor, and combine the two transforms.
@@ -3741,18 +3827,20 @@ void QGraphicsItem::setZValue(qreal z)
qreal newZ = qreal(newZVariant.toDouble());
if (newZ == d_ptr->z)
return;
+
+ if (d_ptr->scene) {
+ // Z Value has changed, we have to notify the index.
+ d_ptr->scene->d_func()->index->itemChange(this, ItemZValueChange, newZVariant);
+ }
+
d_ptr->z = newZ;
if (d_ptr->parent)
d_ptr->parent->d_ptr->needSortChildren = 1;
else if (d_ptr->scene)
d_ptr->scene->d_func()->needSortTopLevelItems = 1;
- if (d_ptr->scene) {
+ if (d_ptr->scene)
d_ptr->scene->d_func()->markDirty(this, QRectF(), /*invalidateChildren=*/true);
- // Invalidate any sort caching; arrival of a new item means we need to
- // resort.
- d_ptr->scene->d_func()->invalidateSortCache();
- }
itemChange(ItemZValueHasChanged, newZVariant);
@@ -3843,7 +3931,13 @@ QRectF QGraphicsItem::sceneBoundingRect() const
QRectF br = boundingRect();
br.translate(offset);
- return !parentItem ? br : parentItem->sceneTransform().mapRect(br);
+ if (!parentItem)
+ return br;
+ if (parentItem->d_ptr->hasTranslateOnlySceneTransform()) {
+ br.translate(parentItem->d_ptr->sceneTransform.dx(), parentItem->d_ptr->sceneTransform.dy());
+ return br;
+ }
+ return parentItem->d_ptr->sceneTransform.mapRect(br);
}
/*!
@@ -4218,7 +4312,7 @@ bool QGraphicsItem::isObscuredBy(const QGraphicsItem *item) const
{
if (!item)
return false;
- return QGraphicsScenePrivate::closestItemFirst_withoutCache(item, this)
+ return QGraphicsSceneBspTreeIndexPrivate::closestItemFirst_withoutCache(item, this)
&& qt_QGraphicsItem_isObscured(this, item, boundingRect());
}
@@ -4411,12 +4505,11 @@ bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping, bool ignore
{
// No scene, or if the scene is updating everything, means we have nothing
// to do. The only exception is if the scene tracks the growing scene rect.
- return (!visible && !ignoreVisibleBit)
+ return !scene
+ || (!visible && !ignoreVisibleBit && !this->ignoreVisible)
|| (!ignoreDirtyBit && fullUpdatePending)
- || !scene
- || (scene->d_func()->updateAll && scene->d_func()->hasSceneRect)
|| (!ignoreClipping && (childrenClippedToShape() && isClippedAway()))
- || (!ignoreOpacity && childrenCombineOpacity() && isFullyTransparent());
+ || (!ignoreOpacity && !this->ignoreOpacity && childrenCombineOpacity() && isFullyTransparent());
}
/*!
@@ -4437,6 +4530,7 @@ void QGraphicsItemPrivate::resolveDepth(int parentDepth)
void QGraphicsItemPrivate::addChild(QGraphicsItem *child)
{
needSortChildren = 1;
+ child->d_ptr->siblingIndex = children.size();
children.append(child);
}
@@ -4446,6 +4540,10 @@ void QGraphicsItemPrivate::addChild(QGraphicsItem *child)
void QGraphicsItemPrivate::removeChild(QGraphicsItem *child)
{
children.removeOne(child);
+ // NB! Do not use children.removeAt(child->d_ptr->siblingIndex) because
+ // the child is not guaranteed to be at the index after the list is sorted.
+ // (see ensureSortedChildren()).
+ child->d_ptr->siblingIndex = -1;
}
/*!
@@ -4606,9 +4704,22 @@ void QGraphicsItemPrivate::ensureSceneTransformRecursive(QGraphicsItem **topMost
}
// COMBINE my transform with the parent's scene transform.
- sceneTransform = parent ? parent->d_ptr->sceneTransform : QTransform();
- combineTransformFromParent(&sceneTransform);
- dirtySceneTransform = 0;
+ updateSceneTransformFromParent();
+ Q_ASSERT(!dirtySceneTransform);
+}
+
+void QGraphicsItemPrivate::ensureSceneTransform()
+{
+ if (dirtySceneTransform) {
+ // This item and all its descendants have dirty scene transforms.
+ // We're about to validate this item's scene transform, so we have to
+ // invalidate all the children; otherwise there's no way for the descendants
+ // to detect that the ancestor has changed.
+ invalidateChildrenSceneTransform();
+ }
+
+ QGraphicsItem *that = q_func();
+ ensureSceneTransformRecursive(&that);
}
/*!
@@ -4949,7 +5060,9 @@ QPointF QGraphicsItem::mapToParent(const QPointF &point) const
*/
QPointF QGraphicsItem::mapToScene(const QPointF &point) const
{
- return sceneTransform().map(point);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return QPointF(point.x() + d_ptr->sceneTransform.dx(), point.y() + d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.map(point);
}
/*!
@@ -5016,7 +5129,9 @@ QPolygonF QGraphicsItem::mapToParent(const QRectF &rect) const
*/
QPolygonF QGraphicsItem::mapToScene(const QRectF &rect) const
{
- return sceneTransform().map(rect);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return rect.translated(d_ptr->sceneTransform.dx(), d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.map(rect);
}
/*!
@@ -5089,7 +5204,9 @@ QRectF QGraphicsItem::mapRectToParent(const QRectF &rect) const
*/
QRectF QGraphicsItem::mapRectToScene(const QRectF &rect) const
{
- return sceneTransform().mapRect(rect);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return rect.translated(d_ptr->sceneTransform.dx(), d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.mapRect(rect);
}
/*!
@@ -5163,7 +5280,9 @@ QRectF QGraphicsItem::mapRectFromParent(const QRectF &rect) const
*/
QRectF QGraphicsItem::mapRectFromScene(const QRectF &rect) const
{
- return sceneTransform().inverted().mapRect(rect);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return rect.translated(-d_ptr->sceneTransform.dx(), -d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.inverted().mapRect(rect);
}
/*!
@@ -5215,7 +5334,9 @@ QPolygonF QGraphicsItem::mapToParent(const QPolygonF &polygon) const
*/
QPolygonF QGraphicsItem::mapToScene(const QPolygonF &polygon) const
{
- return sceneTransform().map(polygon);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return polygon.translated(d_ptr->sceneTransform.dx(), d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.map(polygon);
}
/*!
@@ -5260,7 +5381,9 @@ QPainterPath QGraphicsItem::mapToParent(const QPainterPath &path) const
*/
QPainterPath QGraphicsItem::mapToScene(const QPainterPath &path) const
{
- return sceneTransform().map(path);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return path.translated(d_ptr->sceneTransform.dx(), d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.map(path);
}
/*!
@@ -5321,7 +5444,9 @@ QPointF QGraphicsItem::mapFromParent(const QPointF &point) const
*/
QPointF QGraphicsItem::mapFromScene(const QPointF &point) const
{
- return sceneTransform().inverted().map(point);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return QPointF(point.x() - d_ptr->sceneTransform.dx(), point.y() - d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.inverted().map(point);
}
/*!
@@ -5389,7 +5514,9 @@ QPolygonF QGraphicsItem::mapFromParent(const QRectF &rect) const
*/
QPolygonF QGraphicsItem::mapFromScene(const QRectF &rect) const
{
- return sceneTransform().inverted().map(rect);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return rect.translated(-d_ptr->sceneTransform.dx(), -d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.inverted().map(rect);
}
/*!
@@ -5439,7 +5566,9 @@ QPolygonF QGraphicsItem::mapFromParent(const QPolygonF &polygon) const
*/
QPolygonF QGraphicsItem::mapFromScene(const QPolygonF &polygon) const
{
- return sceneTransform().inverted().map(polygon);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return polygon.translated(-d_ptr->sceneTransform.dx(), -d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.inverted().map(polygon);
}
/*!
@@ -5482,7 +5611,9 @@ QPainterPath QGraphicsItem::mapFromParent(const QPainterPath &path) const
*/
QPainterPath QGraphicsItem::mapFromScene(const QPainterPath &path) const
{
- return sceneTransform().inverted().map(path);
+ if (d_ptr->hasTranslateOnlySceneTransform())
+ return path.translated(-d_ptr->sceneTransform.dx(), -d_ptr->sceneTransform.dy());
+ return d_ptr->sceneTransform.inverted().map(path);
}
/*!
@@ -6371,102 +6502,6 @@ QVariant QGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const
}
/*!
- \since 4.6
-
- Subscribes the graphics item to the specified \a gesture type.
-
- Returns the id of the gesture.
-
- \sa releaseGesture(), setGestureEnabled()
-*/
-int QGraphicsItem::grabGesture(Qt::GestureType gesture)
-{
- /// TODO: if we are QGraphicsProxyWidget we should subscribe the widget to gesture as well.
- return grabGesture(qt_getStandardGestureTypeName(gesture));
-}
-
-/*!
- \since 4.6
-
- Subscribes the graphics item to the specified \a gesture type.
-
- Returns the id of the gesture.
-
- \sa releaseGesture(), setGestureEnabled()
-*/
-int QGraphicsItem::grabGesture(const QString &gesture)
-{
- int id = QGestureManager::instance()->makeGestureId(gesture);
- d_ptr->grabGesture(id);
- return id;
-}
-
-void QGraphicsItemPrivate::grabGesture(int id)
-{
- Q_Q(QGraphicsItem);
- extraGestures()->gestures << id;
- if (scene)
- scene->d_func()->grabGesture(q, id);
-}
-
-bool QGraphicsItemPrivate::releaseGesture(int id)
-{
- Q_Q(QGraphicsItem);
- QGestureExtraData *extra = maybeExtraGestures();
- if (extra && extra->gestures.contains(id)) {
- if (scene)
- scene->d_func()->releaseGesture(q, id);
- extra->gestures.remove(id);
- return true;
- }
- return false;
-}
-
-/*!
- \since 4.6
-
- Unsubscribes the graphics item from a gesture, which is specified
- by the \a gestureId.
-
- \sa grabGesture(), setGestureEnabled()
-*/
-void QGraphicsItem::releaseGesture(int gestureId)
-{
- /// TODO: if we are QGraphicsProxyWidget we should unsubscribe the widget from gesture as well.
- if (d_ptr->releaseGesture(gestureId))
- QGestureManager::instance()->releaseGestureId(gestureId);
-}
-
-/*!
- \since 4.6
-
- If \a enable is true, the gesture with the given \a gestureId is
- enabled; otherwise the gesture is disabled.
-
- The id of the gesture is returned by the grabGesture().
-
- \sa grabGesture(), releaseGesture()
-*/
-void QGraphicsItem::setGestureEnabled(int gestureId, bool enable)
-{
- //###
-}
-
-bool QGraphicsItemPrivate::hasGesture(const QString &name) const
-{
- if (QGestureExtraData *extra = maybeExtraGestures()) {
- QGestureManager *gm = QGestureManager::instance();
- QSet<int>::const_iterator it = extra->gestures.begin(),
- e = extra->gestures.end();
- for (; it != e; ++it) {
- if (gm->gestureNameFromId(*it) == name)
- return true;
- }
- }
- return false;
-}
-
-/*!
This virtual function is called by QGraphicsItem to notify custom items
that some part of the item's state changes. By reimplementing this
function, your can react to a change, and in some cases, (depending on \a
@@ -6490,23 +6525,6 @@ bool QGraphicsItemPrivate::hasGesture(const QString &name) const
QVariant QGraphicsItem::itemChange(GraphicsItemChange change, const QVariant &value)
{
Q_UNUSED(change);
- if (change == QGraphicsItem::ItemSceneChange) {
- QGestureExtraData *extra = d_ptr->maybeExtraGestures();
- if (!qVariantValue<QGraphicsScene*>(value) && extra) {
- // the item has been removed from a scene, unsubscribe gestures.
- Q_ASSERT(d_ptr->scene);
- foreach(int id, extra->gestures)
- d_ptr->scene->d_func()->releaseGesture(this, id);
- }
- } else if (change == QGraphicsItem::ItemSceneHasChanged) {
- QGraphicsScene *scene = qVariantValue<QGraphicsScene*>(value);
- QGestureExtraData *extra = d_ptr->maybeExtraGestures();
- if (scene && extra) {
- // item has been added to the scene
- foreach(int id, extra->gestures)
- scene->d_func()->grabGesture(this, id);
- }
- }
return value;
}
@@ -6560,7 +6578,7 @@ void QGraphicsItem::addToIndex()
return;
}
if (d_ptr->scene)
- d_ptr->scene->d_func()->addToIndex(this);
+ d_ptr->scene->d_func()->index->addItem(this);
}
/*!
@@ -6577,7 +6595,7 @@ void QGraphicsItem::removeFromIndex()
return;
}
if (d_ptr->scene)
- d_ptr->scene->d_func()->removeFromIndex(this);
+ d_ptr->scene->d_func()->index->removeItem(this);
}
/*!
@@ -6596,10 +6614,12 @@ void QGraphicsItem::removeFromIndex()
void QGraphicsItem::prepareGeometryChange()
{
if (d_ptr->scene) {
+ d_ptr->scene->d_func()->dirtyGrowingItemsBoundingRect = true;
d_ptr->geometryChanged = 1;
d_ptr->paintedViewBoundingRectsNeedRepaint = 1;
QGraphicsScenePrivate *scenePrivate = d_ptr->scene->d_func();
+ scenePrivate->index->prepareBoundingRectChange(this);
scenePrivate->markDirty(this, QRectF(),
/*invalidateChildren=*/true,
/*maybeDirtyClipPath=*/!d_ptr->inSetPosHelper);
@@ -6610,10 +6630,13 @@ void QGraphicsItem::prepareGeometryChange()
// _q_processDirtyItems is called before _q_emitUpdated.
if ((scenePrivate->connectedSignals & scenePrivate->changedSignalMask)
|| scenePrivate->views.isEmpty()) {
- d_ptr->scene->update(sceneTransform().mapRect(boundingRect()));
+ if (d_ptr->hasTranslateOnlySceneTransform()) {
+ d_ptr->scene->update(boundingRect().translated(d_ptr->sceneTransform.dx(),
+ d_ptr->sceneTransform.dy()));
+ } else {
+ d_ptr->scene->update(d_ptr->sceneTransform.mapRect(boundingRect()));
+ }
}
-
- scenePrivate->removeFromIndex(this);
}
QGraphicsItem *parent = this;
@@ -9933,17 +9956,11 @@ QDebug operator<<(QDebug debug, QGraphicsItem *item)
return debug;
}
- QStringList flags;
- if (item->isVisible()) flags << QLatin1String("isVisible");
- if (item->isEnabled()) flags << QLatin1String("isEnabled");
- if (item->isSelected()) flags << QLatin1String("isSelected");
- if (item->hasFocus()) flags << QLatin1String("HasFocus");
-
debug << "QGraphicsItem(this =" << ((void*)item)
<< ", parent =" << ((void*)item->parentItem())
<< ", pos =" << item->pos()
- << ", z =" << item->zValue() << ", flags = {"
- << flags.join(QLatin1String("|")) << " })";
+ << ", z =" << item->zValue() << ", flags = "
+ << item->flags() << ")";
return debug;
}
@@ -10077,6 +10094,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag)
case QGraphicsItem::ItemSendsGeometryChanges:
str = "ItemSendsGeometryChanges";
break;
+ case QGraphicsItem::ItemAcceptsInputMethod:
+ str = "ItemAcceptsInputMethod";
+ break;
}
debug << str;
return debug;
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index dbb35ce..c230928 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -99,7 +99,8 @@ public:
ItemStacksBehindParent = 0x100,
ItemUsesExtendedStyleOption = 0x200,
ItemHasNoContents = 0x400,
- ItemSendsGeometryChanges = 0x800
+ ItemSendsGeometryChanges = 0x800,
+ ItemAcceptsInputMethod = 0x1000
// NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
};
Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag)
@@ -142,7 +143,7 @@ public:
QGraphicsItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -215,13 +216,16 @@ public:
Qt::MouseButtons acceptedMouseButtons() const;
void setAcceptedMouseButtons(Qt::MouseButtons buttons);
- bool acceptsHoverEvents() const; // obsolete
- void setAcceptsHoverEvents(bool enabled); // obsolete
+ bool acceptsHoverEvents() const; // ### obsolete
+ void setAcceptsHoverEvents(bool enabled); // ### obsolete
bool acceptHoverEvents() const;
void setAcceptHoverEvents(bool enabled);
bool acceptTouchEvents() const;
void setAcceptTouchEvents(bool enabled);
+ bool filtersChildEvents() const;
+ void setFiltersChildEvents(bool enabled);
+
bool handlesChildEvents() const;
void setHandlesChildEvents(bool enabled);
@@ -386,11 +390,6 @@ public:
QVariant data(int key) const;
void setData(int key, const QVariant &value);
- int grabGesture(Qt::GestureType gesture);
- int grabGesture(const QString &gesture);
- void releaseGesture(int gestureId);
- void setGestureEnabled(int gestureId, bool enable = true);
-
enum {
Type = 1,
UserType = 65536
@@ -450,11 +449,16 @@ private:
friend class QGraphicsScene;
friend class QGraphicsScenePrivate;
friend class QGraphicsSceneFindItemBspTreeVisitor;
+ friend class QGraphicsSceneBspTree;
friend class QGraphicsView;
friend class QGraphicsViewPrivate;
friend class QGraphicsWidget;
friend class QGraphicsWidgetPrivate;
friend class QGraphicsProxyWidgetPrivate;
+ friend class QGraphicsSceneIndex;
+ friend class QGraphicsSceneIndexPrivate;
+ friend class QGraphicsSceneBspTreeIndex;
+ friend class QGraphicsSceneBspTreeIndexPrivate;
friend class ::tst_QGraphicsItem;
friend bool qt_closestLeaf(const QGraphicsItem *, const QGraphicsItem *);
friend bool qt_closestItemFirst(const QGraphicsItem *, const QGraphicsItem *);
@@ -546,7 +550,7 @@ class Q_GUI_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
public:
QAbstractGraphicsShapeItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -576,13 +580,13 @@ class Q_GUI_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
public:
QGraphicsPathItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsPathItem(const QPainterPath &path, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -619,19 +623,19 @@ class Q_GUI_EXPORT QGraphicsRectItem : public QAbstractGraphicsShapeItem
public:
QGraphicsRectItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsRectItem(const QRectF &rect, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -672,19 +676,19 @@ class Q_GUI_EXPORT QGraphicsEllipseItem : public QAbstractGraphicsShapeItem
public:
QGraphicsEllipseItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsEllipseItem(const QRectF &rect, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -731,14 +735,14 @@ class Q_GUI_EXPORT QGraphicsPolygonItem : public QAbstractGraphicsShapeItem
public:
QGraphicsPolygonItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsPolygonItem(const QPolygonF &polygon,
QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -778,19 +782,19 @@ class Q_GUI_EXPORT QGraphicsLineItem : public QGraphicsItem
public:
QGraphicsLineItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsLineItem(const QLineF &line, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -838,13 +842,13 @@ public:
QGraphicsPixmapItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsPixmapItem(const QPixmap &pixmap, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -900,13 +904,13 @@ class Q_GUI_EXPORT QGraphicsTextItem : public QGraphicsObject
public:
QGraphicsTextItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsTextItem(const QString &text, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -1001,13 +1005,13 @@ class Q_GUI_EXPORT QGraphicsSimpleTextItem : public QAbstractGraphicsShapeItem
public:
QGraphicsSimpleTextItem(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
QGraphicsSimpleTextItem(const QString &text, QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
@@ -1047,7 +1051,7 @@ class Q_GUI_EXPORT QGraphicsItemGroup : public QGraphicsItem
public:
QGraphicsItemGroup(QGraphicsItem *parent = 0
#ifndef Q_QDOC
- // obsolete argument
+ // ### obsolete argument
, QGraphicsScene *scene = 0
#endif
);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index a542646..279a4e6 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -93,12 +93,6 @@ public:
void purge();
};
-class QGestureExtraData
-{
-public:
- QSet<int> gestures;
-};
-
class Q_AUTOTEST_EXPORT QGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(QGraphicsItem)
@@ -118,7 +112,8 @@ public:
NoFlag = 0,
AncestorHandlesChildEvents = 0x1,
AncestorClipsChildren = 0x2,
- AncestorIgnoresTransformations = 0x4
+ AncestorIgnoresTransformations = 0x4,
+ AncestorFiltersChildEvents = 0x8
};
inline QGraphicsItemPrivate()
@@ -128,6 +123,7 @@ public:
parent(0),
transformData(0),
index(-1),
+ siblingIndex(-1),
depth(0),
acceptedMouseButtons(0x1f),
visible(1),
@@ -159,13 +155,15 @@ public:
dirtyChildrenBoundingRect(1),
paintedViewBoundingRectsNeedRepaint(0),
dirtySceneTransform(1),
- geometryChanged(0),
+ geometryChanged(1),
inDestructor(0),
isObject(0),
ignoreVisible(0),
ignoreOpacity(0),
acceptTouchEvents(0),
acceptedTouchBeginEvent(0),
+ filtersDescendantEvents(0),
+ sceneTransformTranslateOnly(0),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -174,6 +172,15 @@ public:
inline virtual ~QGraphicsItemPrivate()
{ }
+ static const QGraphicsItemPrivate *get(const QGraphicsItem *item)
+ {
+ return item->d_ptr;
+ }
+ static QGraphicsItemPrivate *get(QGraphicsItem *item)
+ {
+ return item->d_ptr;
+ }
+
void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag,
AncestorFlag flag = NoFlag, bool enabled = false, bool root = true);
void setIsMemberOfGroup(bool enabled);
@@ -187,6 +194,7 @@ public:
void combineTransformToParent(QTransform *x, const QTransform *viewTransform = 0) const;
void combineTransformFromParent(QTransform *x, const QTransform *viewTransform = 0) const;
+ void updateSceneTransformFromParent();
// ### Qt 5: Remove. Workaround for reimplementation added after Qt 4.4.
virtual QVariant inputMethodQueryHelper(Qt::InputMethodQuery query) const;
@@ -296,6 +304,13 @@ public:
void invalidateCachedClipPathRecursively(bool childrenOnly = false, const QRectF &emptyIfOutsideThisRect = QRectF());
void updateCachedClipPathFromSetPosHelper(const QPointF &newPos);
void ensureSceneTransformRecursive(QGraphicsItem **topMostDirtyItem);
+ void ensureSceneTransform();
+
+ inline bool hasTranslateOnlySceneTransform()
+ {
+ ensureSceneTransform();
+ return sceneTransformTranslateOnly;
+ }
inline void invalidateChildrenSceneTransform()
{
@@ -380,6 +395,7 @@ public:
}
inline QTransform transformToParent() const;
+ inline void ensureSortedChildren();
QPainterPath cachedClipPath;
QRectF childrenBoundingRect;
@@ -395,32 +411,9 @@ public:
TransformData *transformData;
QTransform sceneTransform;
int index;
+ int siblingIndex;
int depth;
- inline QGestureExtraData* extraGestures() const
- {
- QGestureExtraData *c = (QGestureExtraData *)qVariantValue<void *>(extra(ExtraGestures));
- if (!c) {
- QGraphicsItemPrivate *that = const_cast<QGraphicsItemPrivate *>(this);
- c = new QGestureExtraData;
- that->setExtra(ExtraGestures, qVariantFromValue<void *>(c));
- }
- return c;
- }
- QGestureExtraData* maybeExtraGestures() const
- {
- return (QGestureExtraData *)qVariantValue<void *>(extra(ExtraGestures));
- }
- inline void removeExtraGestures()
- {
- QGestureExtraData *c = (QGestureExtraData *)qVariantValue<void *>(extra(ExtraGestures));
- delete c;
- unsetExtra(ExtraGestures);
- }
- bool hasGesture(const QString &gesture) const;
- void grabGesture(int id);
- bool releaseGesture(int id);
-
// Packed 32 bytes
quint32 acceptedMouseButtons : 5;
quint32 visible : 1;
@@ -434,7 +427,7 @@ public:
quint32 handlesChildEvents : 1;
quint32 itemDiscovered : 1;
quint32 hasCursor : 1;
- quint32 ancestorFlags : 3;
+ quint32 ancestorFlags : 4;
quint32 cacheMode : 2;
quint32 hasBoundingRegionGranularity : 1;
quint32 isWidget : 1;
@@ -446,14 +439,14 @@ public:
quint32 inSetPosHelper : 1;
quint32 needSortChildren : 1;
quint32 allChildrenDirty : 1;
- quint32 fullUpdatePending : 1;
// New 32 bits
+ quint32 fullUpdatePending : 1;
quint32 flags : 12;
quint32 hasEffect : 1;
quint32 dirtyChildrenBoundingRect : 1;
quint32 paintedViewBoundingRectsNeedRepaint : 1;
- quint32 dirtySceneTransform : 1;
+ quint32 dirtySceneTransform : 1;
quint32 geometryChanged : 1;
quint32 inDestructor : 1;
quint32 isObject : 1;
@@ -461,7 +454,9 @@ public:
quint32 ignoreOpacity : 1;
quint32 acceptTouchEvents : 1;
quint32 acceptedTouchBeginEvent : 1;
- quint32 unused : 9; // feel free to use
+ quint32 filtersDescendantEvents : 1;
+ quint32 sceneTransformTranslateOnly : 1;
+ quint32 unused : 7; // feel free to use
// Optional stacking order
int globalStackingOrder;
@@ -492,6 +487,10 @@ struct QGraphicsItemPrivate::TransformData {
if (onlyTransform) {
if (!postmultiplyTransform)
return transform;
+ if (postmultiplyTransform->isIdentity())
+ return transform;
+ if (transform.isIdentity())
+ return *postmultiplyTransform;
QTransform x(transform);
x *= *postmultiplyTransform;
return x;
@@ -512,6 +511,29 @@ struct QGraphicsItemPrivate::TransformData {
}
};
+/*!
+ \internal
+*/
+inline bool qt_closestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
+{
+ // Return true if sibling item1 is on top of item2.
+ const QGraphicsItemPrivate *d1 = item1->d_ptr;
+ const QGraphicsItemPrivate *d2 = item2->d_ptr;
+ bool f1 = d1->flags & QGraphicsItem::ItemStacksBehindParent;
+ bool f2 = d2->flags & QGraphicsItem::ItemStacksBehindParent;
+ if (f1 != f2)
+ return f2;
+ if (d1->z != d2->z)
+ return d1->z > d2->z;
+ return d1->siblingIndex > d2->siblingIndex;
+}
+
+/*!
+ \internal
+*/
+static inline bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
+{ return qt_closestLeaf(item2, item1); }
+
/*
return the full transform of the item to the parent. This include the position and all the transform data
*/
@@ -522,6 +544,14 @@ inline QTransform QGraphicsItemPrivate::transformToParent() const
return matrix;
}
+inline void QGraphicsItemPrivate::ensureSortedChildren()
+{
+ if (needSortChildren) {
+ qSort(children.begin(), children.end(), qt_notclosestLeaf);
+ needSortChildren = 0;
+ }
+}
+
QT_END_NAMESPACE
#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 656af33..e280162 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -808,6 +808,8 @@ bool QGraphicsLayoutItem::isLayout() const
}
/*!
+ \since 4.6
+
Returns whether a layout should delete this item in its destructor.
If its true, then the layout will delete it. If its false, then it is
assumed that another object has the ownership of it, and the layout won't
@@ -834,6 +836,8 @@ bool QGraphicsLayoutItem::ownedByLayout() const
return d_func()->ownedByLayout;
}
/*!
+ \since 4.6
+
Sets whether a layout should delete this item in its destructor or not.
\a ownership must be true to in order for the layout to delete it.
\sa ownedByLayout()
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp
index ab94679..5fac6cf 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp
@@ -48,7 +48,6 @@
#include "private/qgraphicsproxywidget_p.h"
#include "private/qwidget_p.h"
#include "private/qapplication_p.h"
-#include "private/qgesturemanager_p.h"
#include <QtCore/qdebug.h>
#include <QtGui/qevent.h>
@@ -452,6 +451,22 @@ void QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget()
/*!
\internal
+*/
+void QGraphicsProxyWidgetPrivate::updateProxyInputMethodAcceptanceFromWidget()
+{
+ Q_Q(QGraphicsProxyWidget);
+ if (!widget)
+ return;
+
+ QWidget *focusWidget = widget->focusWidget();
+ if (!focusWidget)
+ focusWidget = widget;
+ q->setFlag(QGraphicsItem::ItemAcceptsInputMethod,
+ focusWidget->testAttribute(Qt::WA_InputMethodEnabled));
+}
+
+/*!
+ \internal
Embeds \a subWin as a subwindow of this proxy widget. \a subWin must be a top-level
widget and a descendant of the widget managed by this proxy. A separate subproxy
@@ -649,9 +664,6 @@ void QGraphicsProxyWidgetPrivate::setWidget_helper(QWidget *newWidget, bool auto
q->setAttribute(Qt::WA_OpaquePaintEvent);
widget = newWidget;
- foreach(int gestureId, widget->d_func()->gestures) {
- grabGesture(gestureId);
- }
// Changes only go from the widget to the proxy.
enabledChangeMode = QGraphicsProxyWidgetPrivate::WidgetToProxyMode;
@@ -694,6 +706,8 @@ void QGraphicsProxyWidgetPrivate::setWidget_helper(QWidget *newWidget, bool auto
updateProxyGeometryFromWidget();
+ updateProxyInputMethodAcceptanceFromWidget();
+
// Hook up the event filter to keep the state up to date.
newWidget->installEventFilter(q);
QObject::connect(newWidget, SIGNAL(destroyed()), q, SLOT(_q_removeWidgetSlot()));
@@ -875,16 +889,6 @@ bool QGraphicsProxyWidget::event(QEvent *event)
}
break;
}
- case QEvent::GraphicsSceneGesture: {
- qDebug() << "QGraphicsProxyWidget: graphicsscenegesture";
- if (d->widget && d->widget->isVisible()) {
- QGraphicsSceneGestureEvent *ge = static_cast<QGraphicsSceneGestureEvent*>(event);
- //### TODO: widget->childAt(): decompose gesture event and find widget under hotspots.
- //QGestureManager::instance()->sendGestureEvent(d->widget, ge->gestures().toSet(), ge->cancelledGestures());
- return true;
- }
- break;
- }
default:
break;
}
@@ -1317,8 +1321,8 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event)
if (d->widget && d->widget->focusWidget()) {
d->widget->focusWidget()->setFocus(event->reason());
return;
- }
- break;
+ }
+ break;
}
}
diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h
index ec5400a..fbc9f6c 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget_p.h
+++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h
@@ -102,6 +102,8 @@ public:
void updateWidgetGeometryFromProxy();
void updateProxyGeometryFromWidget();
+ void updateProxyInputMethodAcceptanceFromWidget();
+
QPointF mapToReceiver(const QPointF &pos, const QWidget *receiver) const;
enum ChangeMode {
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 1557c2c..bc42752 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
/*!
\class QGraphicsScene
\brief The QGraphicsScene class provides a surface for managing a large
@@ -219,6 +218,9 @@
#include "qgraphicsview_p.h"
#include "qgraphicswidget.h"
#include "qgraphicswidget_p.h"
+#include "qgraphicssceneindex_p.h"
+#include "qgraphicsscenebsptreeindex_p.h"
+#include "qgraphicsscenelinearindex_p.h"
#include <QtCore/qdebug.h>
#include <QtCore/qlist.h>
@@ -243,58 +245,15 @@
#include <QtGui/qtooltip.h>
#include <QtGui/qtransform.h>
#include <QtGui/qgesture.h>
+#include <QtGui/qinputcontext.h>
#include <private/qapplication_p.h>
#include <private/qobject_p.h>
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
#endif
-#include <private/qgesturemanager_p.h>
-#include <private/qgesture_p.h>
QT_BEGIN_NAMESPACE
-static inline bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2);
-
-static inline bool QRectF_intersects(const QRectF &s, const QRectF &r)
-{
- qreal xp = s.left();
- qreal yp = s.top();
- qreal w = s.width();
- qreal h = s.height();
- qreal l1 = xp;
- qreal r1 = xp;
- if (w < 0)
- l1 += w;
- else
- r1 += w;
-
- qreal l2 = r.left();
- qreal r2 = r.left();
- if (w < 0)
- l2 += r.width();
- else
- r2 += r.width();
-
- if (l1 >= r2 || l2 >= r1)
- return false;
-
- qreal t1 = yp;
- qreal b1 = yp;
- if (h < 0)
- t1 += h;
- else
- b1 += h;
-
- qreal t2 = r.top();
- qreal b2 = r.top();
- if (r.height() < 0)
- t2 += r.height();
- else
- b2 += r.height();
-
- return !(t1 >= b2 || t2 >= b1);
-}
-
// QRectF::intersects() returns false always if either the source or target
// rectangle's width or height are 0. This works around that problem.
static inline void _q_adjustRect(QRectF *rect)
@@ -341,18 +300,15 @@ static void _q_hoverFromMouseEvent(QGraphicsSceneHoverEvent *hover, const QGraph
QGraphicsScenePrivate::QGraphicsScenePrivate()
: changedSignalMask(0),
indexMethod(QGraphicsScene::BspTreeIndex),
- bspTreeDepth(0),
+ index(0),
lastItemCount(0),
hasSceneRect(false),
+ dirtyGrowingItemsBoundingRect(true),
updateAll(false),
calledEmitUpdated(false),
processDirtyItemsEmitted(false),
selectionChanging(0),
needSortTopLevelItems(true),
- regenerateIndex(true),
- purgePending(false),
- indexTimerId(0),
- restartIndexTimer(false),
stickyFocus(false),
hasFocus(false),
focusItem(0),
@@ -369,7 +325,6 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
allItemsUseDefaultCursor(true),
painterStateProtection(true),
sortCacheEnabled(false),
- updatingSortCache(false),
style(0),
allItemsIgnoreTouchEvents(true)
{
@@ -382,6 +337,8 @@ void QGraphicsScenePrivate::init()
{
Q_Q(QGraphicsScene);
+ index = new QGraphicsSceneBspTreeIndex(q);
+
// Keep this index so we can check for connected slots later on.
changedSignalMask = (1 << q->metaObject()->indexOfSignal("changed(QList<QRectF>)"));
qApp->d_func()->scene_list.append(q);
@@ -391,224 +348,26 @@ void QGraphicsScenePrivate::init()
/*!
\internal
*/
-QList<QGraphicsItem *> QGraphicsScenePrivate::estimateItemsInRect(const QRectF &rect) const
-{
- const_cast<QGraphicsScenePrivate *>(this)->purgeRemovedItems();
- const_cast<QGraphicsScenePrivate *>(this)->_q_updateSortCache();
-
- if (indexMethod == QGraphicsScene::BspTreeIndex) {
- // ### Only do this once in a while.
- QGraphicsScenePrivate *that = const_cast<QGraphicsScenePrivate *>(this);
-
- // Get items from BSP tree
- QList<QGraphicsItem *> items = that->bspTree.items(rect);
-
- // Fill in with any unindexed items
- for (int i = 0; i < unindexedItems.size(); ++i) {
- if (QGraphicsItem *item = unindexedItems.at(i)) {
- if (!item->d_ptr->itemDiscovered && item->d_ptr->visible && !(item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)) {
- QRectF boundingRect = item->sceneEffectiveBoundingRect();
- if (QRectF_intersects(boundingRect, rect)) {
- item->d_ptr->itemDiscovered = 1;
- items << item;
- }
- }
- }
- }
-
- // Reset the discovered state of all discovered items
- for (int i = 0; i < items.size(); ++i)
- items.at(i)->d_func()->itemDiscovered = 0;
- return items;
- }
-
- QList<QGraphicsItem *> itemsInRect;
- for (int i = 0; i < unindexedItems.size(); ++i) {
- if (QGraphicsItem *item = unindexedItems.at(i)) {
- if (item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)
- continue;
- if (item->d_ptr->visible && !item->d_ptr->isFullyTransparent())
- itemsInRect << item;
- }
- }
- for (int i = 0; i < indexedItems.size(); ++i) {
- if (QGraphicsItem *item = indexedItems.at(i)) {
- if (item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)
- continue;
- if (item->d_ptr->visible && !item->d_ptr->isFullyTransparent())
- itemsInRect << item;
- }
- }
-
- return itemsInRect;
-}
-
-/*!
- \internal
-*/
-void QGraphicsScenePrivate::addToIndex(QGraphicsItem *item)
+QGraphicsScenePrivate *QGraphicsScenePrivate::get(QGraphicsScene *q)
{
- if (indexMethod == QGraphicsScene::BspTreeIndex) {
- if (item->d_func()->index != -1) {
- bspTree.insertItem(item, item->sceneEffectiveBoundingRect());
- foreach (QGraphicsItem *child, item->children())
- child->addToIndex();
- } else {
- // The BSP tree is regenerated if the number of items grows to a
- // certain threshold, or if the bounding rect of the graph doubles in
- // size.
- startIndexTimer();
- }
- }
+ return q->d_func();
}
-/*!
- \internal
-*/
-void QGraphicsScenePrivate::removeFromIndex(QGraphicsItem *item)
-{
- if (indexMethod == QGraphicsScene::BspTreeIndex) {
- int index = item->d_func()->index;
- if (index != -1) {
- bspTree.removeItem(item, item->sceneEffectiveBoundingRect());
- freeItemIndexes << index;
- indexedItems[index] = 0;
- item->d_func()->index = -1;
- unindexedItems << item;
-
- foreach (QGraphicsItem *child, item->children())
- child->removeFromIndex();
- }
-
- startIndexTimer();
- }
-}
-
-/*!
- \internal
-*/
-void QGraphicsScenePrivate::resetIndex()
-{
- purgeRemovedItems();
- if (indexMethod == QGraphicsScene::BspTreeIndex) {
- for (int i = 0; i < indexedItems.size(); ++i) {
- if (QGraphicsItem *item = indexedItems.at(i)) {
- item->d_ptr->index = -1;
- unindexedItems << item;
- }
- }
- indexedItems.clear();
- freeItemIndexes.clear();
- regenerateIndex = true;
- startIndexTimer();
- }
-}
-
-static inline int intmaxlog(int n)
-{
- return (n > 0 ? qMax(qCeil(qLn(qreal(n)) / qLn(qreal(2))), 5) : 0);
-}
-
-/*!
- \internal
-*/
-void QGraphicsScenePrivate::_q_updateIndex()
+void QGraphicsScenePrivate::_q_emitUpdated()
{
- if (!indexTimerId)
- return;
-
Q_Q(QGraphicsScene);
- q->killTimer(indexTimerId);
- indexTimerId = 0;
-
- purgeRemovedItems();
-
- // Add unindexedItems to indexedItems
- QRectF unindexedItemsBoundingRect;
- for (int i = 0; i < unindexedItems.size(); ++i) {
- if (QGraphicsItem *item = unindexedItems.at(i)) {
- unindexedItemsBoundingRect |= item->sceneEffectiveBoundingRect();
- if (!freeItemIndexes.isEmpty()) {
- int freeIndex = freeItemIndexes.takeFirst();
- item->d_func()->index = freeIndex;
- indexedItems[freeIndex] = item;
- } else {
- item->d_func()->index = indexedItems.size();
- indexedItems << item;
- }
- }
- }
-
- // Update growing scene rect.
- QRectF oldGrowingItemsBoundingRect = growingItemsBoundingRect;
- growingItemsBoundingRect |= unindexedItemsBoundingRect;
-
- // Determine whether we should regenerate the BSP tree.
- if (indexMethod == QGraphicsScene::BspTreeIndex) {
- int depth = bspTreeDepth;
- if (depth == 0) {
- int oldDepth = intmaxlog(lastItemCount);
- depth = intmaxlog(indexedItems.size());
- static const int slack = 100;
- if (bspTree.leafCount() == 0 || (oldDepth != depth && qAbs(lastItemCount - indexedItems.size()) > slack)) {
- // ### Crude algorithm.
- regenerateIndex = true;
- }
- }
+ calledEmitUpdated = false;
- // Regenerate the tree.
- if (regenerateIndex) {
- regenerateIndex = false;
- bspTree.initialize(q->sceneRect(), depth);
- unindexedItems = indexedItems;
- lastItemCount = indexedItems.size();
- q->update();
-
- // Take this opportunity to reset our largest-item counter for
- // untransformable items. When the items are inserted into the BSP
- // tree, we'll get an accurate calculation.
- largestUntransformableItem = QRectF();
+ if (dirtyGrowingItemsBoundingRect) {
+ if (!hasSceneRect) {
+ const QRectF oldGrowingItemsBoundingRect = growingItemsBoundingRect;
+ growingItemsBoundingRect |= q->itemsBoundingRect();
+ if (oldGrowingItemsBoundingRect != growingItemsBoundingRect)
+ emit q->sceneRectChanged(growingItemsBoundingRect);
}
+ dirtyGrowingItemsBoundingRect = false;
}
- // Insert all unindexed items into the tree.
- for (int i = 0; i < unindexedItems.size(); ++i) {
- if (QGraphicsItem *item = unindexedItems.at(i)) {
- QRectF rect = item->sceneEffectiveBoundingRect();
- if (item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)
- continue;
- if (indexMethod == QGraphicsScene::BspTreeIndex)
- bspTree.insertItem(item, rect);
-
- // If the item ignores view transformations, update our
- // largest-item-counter to ensure that the view can accurately
- // discover untransformable items when drawing.
- if (item->d_ptr->itemIsUntransformable()) {
- QGraphicsItem *topmostUntransformable = item;
- while (topmostUntransformable && (topmostUntransformable->d_ptr->ancestorFlags
- & QGraphicsItemPrivate::AncestorIgnoresTransformations)) {
- topmostUntransformable = topmostUntransformable->parentItem();
- }
- // ### Verify that this is the correct largest untransformable rectangle.
- largestUntransformableItem |= item->mapToItem(topmostUntransformable, item->boundingRect()).boundingRect();
- }
- }
- }
- unindexedItems.clear();
-
- // Notify scene rect changes.
- if (!hasSceneRect && growingItemsBoundingRect != oldGrowingItemsBoundingRect)
- emit q->sceneRectChanged(growingItemsBoundingRect);
-}
-
-/*!
- \internal
-*/
-void QGraphicsScenePrivate::_q_emitUpdated()
-{
- Q_Q(QGraphicsScene);
- calledEmitUpdated = false;
-
// Ensure all views are connected if anything is connected. This disables
// the optimization that items send updates directly to the views, but it
// needs to happen in order to keep compatibility with the behavior from
@@ -626,6 +385,9 @@ void QGraphicsScenePrivate::_q_emitUpdated()
updateAll = false;
for (int i = 0; i < views.size(); ++i)
views.at(i)->d_func()->processPendingUpdates();
+ // It's important that we update all views before we dispatch, hence two for-loops.
+ for (int i = 0; i < views.size(); ++i)
+ views.at(i)->d_func()->dispatchPendingUpdateRequests();
return;
}
@@ -643,6 +405,7 @@ void QGraphicsScenePrivate::_q_emitUpdated()
void QGraphicsScenePrivate::registerTopLevelItem(QGraphicsItem *item)
{
needSortTopLevelItems = true;
+ item->d_ptr->siblingIndex = topLevelItems.size();
topLevelItems.append(item);
}
@@ -652,19 +415,10 @@ void QGraphicsScenePrivate::registerTopLevelItem(QGraphicsItem *item)
void QGraphicsScenePrivate::unregisterTopLevelItem(QGraphicsItem *item)
{
topLevelItems.removeOne(item);
-}
-
-/*!
- \internal
-
- Updates all items in the pending update list. At this point, the list is
- unlikely to contain partially constructed items.
-*/
-void QGraphicsScenePrivate::_q_updateLater()
-{
- foreach (QGraphicsItem *item, pendingUpdateItems)
- item->update();
- pendingUpdateItems.clear();
+ // NB! Do not use topLevelItems.removeAt(item->d_ptr->siblingIndex) because
+ // the item is not guaranteed to be at the index after the list is sorted
+ // (see ensureSortedTopLevelItems()).
+ item->d_ptr->siblingIndex = -1;
}
/*!
@@ -690,9 +444,23 @@ void QGraphicsScenePrivate::_q_processDirtyItems()
{
processDirtyItemsEmitted = false;
+ if (updateAll) {
+ Q_ASSERT(calledEmitUpdated);
+ // No need for further processing (except resetting the dirty states).
+ // The growingItemsBoundingRect is updated in _q_emitUpdated.
+ for (int i = 0; i < topLevelItems.size(); ++i)
+ resetDirtyItem(topLevelItems.at(i), /*recursive=*/true);
+ return;
+ }
+
const bool wasPendingSceneUpdate = calledEmitUpdated;
const QRectF oldGrowingItemsBoundingRect = growingItemsBoundingRect;
- processDirtyItemsRecursive(0);
+
+ // Process items recursively.
+ for (int i = 0; i < topLevelItems.size(); ++i)
+ processDirtyItemsRecursive(topLevelItems.at(i));
+
+ dirtyGrowingItemsBoundingRect = false;
if (!hasSceneRect && oldGrowingItemsBoundingRect != growingItemsBoundingRect)
emit q_func()->sceneRectChanged(growingItemsBoundingRect);
@@ -710,13 +478,8 @@ void QGraphicsScenePrivate::_q_processDirtyItems()
}
// Immediately dispatch all pending update requests on the views.
- for (int i = 0; i < views.size(); ++i) {
- QWidget *viewport = views.at(i)->d_func()->viewport;
- if (qt_widget_private(viewport)->paintOnScreen())
- QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
- else
- QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
- }
+ for (int i = 0; i < views.size(); ++i)
+ views.at(i)->d_func()->dispatchPendingUpdateRequests();
}
/*!
@@ -737,22 +500,16 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
// Clear focus on the item to remove any reference in the focusWidget chain.
item->clearFocus();
+
markDirty(item, QRectF(), false, false, false, false, /*removingItemFromScene=*/true);
- if (!item->d_ptr->inDestructor) {
+ if (item->d_ptr->inDestructor) {
+ // The item is actually in its destructor, we call the special method in the index.
+ index->deleteItem(item);
+ } else {
// Can potentially call item->boundingRect() (virtual function), that's why
// we only can call this function if the item is not in its destructor.
- removeFromIndex(item);
- } else if (item->d_ptr->index != -1) {
- // Important: The index is useless until purgeRemovedItems() is called.
- indexedItems[item->d_ptr->index] = (QGraphicsItem *)0;
- if (!purgePending)
- purgePending = true;
- removedItems << item;
- } else {
- // Recently added items are purged immediately. unindexedItems() never
- // contains stale items.
- unindexedItems.removeAll(item);
+ index->removeItem(item);
}
if (!item->d_ptr->inDestructor && item == tabFocusFirst) {
@@ -773,17 +530,6 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
unregisterTopLevelItem(item);
}
- if (!item->d_ptr->inDestructor) {
- // Remove from our item lists.
- int index = item->d_func()->index;
- if (index != -1) {
- freeItemIndexes << index;
- indexedItems[index] = 0;
- } else {
- unindexedItems.removeAll(item);
- }
- }
-
// Reset the mouse grabber and focus item data.
if (item == focusItem)
focusItem = 0;
@@ -803,7 +549,6 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
hoverItems.removeAll(item);
cachedItemsUnderMouse.removeAll(item);
unpolishedItems.removeAll(item);
- pendingUpdateItems.removeAll(item);
resetDirtyItem(item);
//We remove all references of item from the sceneEventFilter arrays
@@ -841,45 +586,6 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
/*!
\internal
-
- Removes stale pointers from all data structures.
-*/
-void QGraphicsScenePrivate::purgeRemovedItems()
-{
- if (!purgePending && removedItems.isEmpty())
- return;
-
- // Remove stale items from the BSP tree.
- if (indexMethod != QGraphicsScene::NoIndex)
- bspTree.removeItems(removedItems);
-
- // Purge this list.
- removedItems.clear();
- freeItemIndexes.clear();
- for (int i = 0; i < indexedItems.size(); ++i) {
- if (!indexedItems.at(i))
- freeItemIndexes << i;
- }
- purgePending = false;
-}
-
-/*!
- \internal
-
- Starts or restarts the timer used for reindexing unindexed items.
-*/
-void QGraphicsScenePrivate::startIndexTimer(int interval)
-{
- Q_Q(QGraphicsScene);
- if (indexTimerId) {
- restartIndexTimer = true;
- } else {
- indexTimerId = q->startTimer(interval);
- }
-}
-
-/*!
- \internal
*/
void QGraphicsScenePrivate::addPopup(QGraphicsWidget *widget)
{
@@ -1114,41 +820,20 @@ QList<QGraphicsItem *> QGraphicsScenePrivate::itemsAtPosition(const QPoint &scre
{
Q_Q(const QGraphicsScene);
QGraphicsView *view = widget ? qobject_cast<QGraphicsView *>(widget->parentWidget()) : 0;
- QList<QGraphicsItem *> items;
- if (view)
- items = view->items(view->viewport()->mapFromGlobal(screenPos));
- else
- items = q->items(scenePos);
- return items;
-}
+ if (!view)
+ return q->items(scenePos, Qt::IntersectsItemShape, Qt::AscendingOrder, QTransform());
-/*!
- \internal
+ const QRectF pointRect(QPointF(widget->mapFromGlobal(screenPos)), QSizeF(1, 1));
+ if (!view->isTransformed())
+ return q->items(pointRect, Qt::IntersectsItemShape, Qt::AscendingOrder);
- Checks if item collides with the path and mode, but also checks that if it
- doesn't collide, maybe its frame rect will.
-*/
-bool QGraphicsScenePrivate::itemCollidesWithPath(QGraphicsItem *item,
- const QPainterPath &path,
- Qt::ItemSelectionMode mode)
-{
- if (item->collidesWithPath(path, mode))
- return true;
- if (item->isWidget()) {
- // Check if this is a window, and if its frame rect collides.
- QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
- if (widget->isWindow()) {
- QRectF frameRect = widget->windowFrameRect();
- QPainterPath framePath;
- framePath.addRect(frameRect);
- bool intersects = path.intersects(frameRect);
- if (mode == Qt::IntersectsItemShape || mode == Qt::IntersectsItemBoundingRect)
- return intersects || path.contains(frameRect.topLeft())
- || framePath.contains(path.elementAt(0));
- return !intersects && path.contains(frameRect.topLeft());
- }
+ const QTransform viewTransform = view->viewportTransform();
+ if (viewTransform.type() <= QTransform::TxScale) {
+ return q->items(viewTransform.inverted().mapRect(pointRect), Qt::IntersectsItemShape,
+ Qt::AscendingOrder, viewTransform);
}
- return false;
+ return q->items(viewTransform.inverted().map(pointRect), Qt::IntersectsItemShape,
+ Qt::AscendingOrder, viewTransform);
}
/*!
@@ -1160,7 +845,7 @@ void QGraphicsScenePrivate::storeMouseButtonsForMouseGrabber(QGraphicsSceneMouse
if (event->buttons() & i) {
mouseGrabberButtonDownPos.insert(Qt::MouseButton(i),
mouseGrabberItems.last()->d_ptr->genericMapFromScene(event->scenePos(),
- event->widget()));
+ event->widget()));
mouseGrabberButtonDownScenePos.insert(Qt::MouseButton(i), event->scenePos());
mouseGrabberButtonDownScreenPos.insert(Qt::MouseButton(i), event->screenPos());
}
@@ -1194,6 +879,24 @@ void QGraphicsScenePrivate::removeSceneEventFilter(QGraphicsItem *watched, QGrap
}
/*!
+ \internal
+*/
+bool QGraphicsScenePrivate::filterDescendantEvent(QGraphicsItem *item, QEvent *event)
+{
+ if (item && (item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorFiltersChildEvents)) {
+ QGraphicsItem *parent = item->parentItem();
+ while (parent) {
+ if (parent->d_ptr->filtersDescendantEvents && parent->sceneEventFilter(item, event))
+ return true;
+ if (!(parent->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorFiltersChildEvents))
+ return false;
+ parent = parent->parentItem();
+ }
+ }
+ return false;
+}
+
+/*!
\internal
*/
bool QGraphicsScenePrivate::filterEvent(QGraphicsItem *item, QEvent *event)
@@ -1225,7 +928,9 @@ bool QGraphicsScenePrivate::sendEvent(QGraphicsItem *item, QEvent *event)
{
if (filterEvent(item, event))
return false;
- return (item && item->isEnabled()) ? item->sceneEvent(event) : false;
+ if (filterDescendantEvent(item, event))
+ return false;
+ return (item && item->isEnabled() ? item->sceneEvent(event) : false);
}
/*!
@@ -1438,779 +1143,6 @@ QGraphicsWidget *QGraphicsScenePrivate::windowForItem(const QGraphicsItem *item)
return 0;
}
-QList<QGraphicsItem *> QGraphicsScenePrivate::topLevelItemsInStackingOrder(const QTransform *const viewTransform,
- QRegion *exposedRegion)
-{
- if (indexMethod == QGraphicsScene::NoIndex || !exposedRegion) {
- if (needSortTopLevelItems) {
- needSortTopLevelItems = false;
- qStableSort(topLevelItems.begin(), topLevelItems.end(), qt_notclosestLeaf);
- }
- return topLevelItems;
- }
-
- const QRectF exposedRect = exposedRegion->boundingRect().adjusted(-1, -1, 1, 1);
- QRectF sceneRect;
- QTransform invertedViewTransform(Qt::Uninitialized);
- if (!viewTransform) {
- sceneRect = exposedRect;
- } else {
- invertedViewTransform = viewTransform->inverted();
- sceneRect = invertedViewTransform.mapRect(exposedRect);
- }
- if (!largestUntransformableItem.isEmpty()) {
- // ### Nuke this when we move the indexing code into a separate
- // class. All the largestUntransformableItem code should then go
- // away, and the estimate function should return untransformable
- // items as well.
- QRectF untr = largestUntransformableItem;
- QRectF ltri = !viewTransform ? untr : invertedViewTransform.mapRect(untr);
- ltri.adjust(-untr.width(), -untr.height(), untr.width(), untr.height());
- sceneRect.adjust(-ltri.width(), -ltri.height(), ltri.width(), ltri.height());
- }
-
- QList<QGraphicsItem *> tmp = estimateItemsInRect(sceneRect);
- for (int i = 0; i < tmp.size(); ++i)
- tmp.at(i)->topLevelItem()->d_ptr->itemDiscovered = 1;
-
- // Sort if the toplevel list is unsorted.
- if (needSortTopLevelItems) {
- needSortTopLevelItems = false;
- qStableSort(topLevelItems.begin(), topLevelItems.end(), qt_notclosestLeaf);
- }
-
- QList<QGraphicsItem *> tli;
- for (int i = 0; i < topLevelItems.size(); ++i) {
- // ### Investigate smarter ways. Looping through all top level
- // items is not optimal. If the BSP tree is to have maximum
- // effect, it should be possible to sort the subset of items
- // quickly. We must use this approach for now, as it's the only
- // current way to keep the stable sorting order (insertion order).
- QGraphicsItem *item = topLevelItems.at(i);
- if (item->d_ptr->itemDiscovered) {
- item->d_ptr->itemDiscovered = 0;
- tli << item;
- }
- }
- return tli;
-}
-
-void QGraphicsScenePrivate::recursive_items_helper(QGraphicsItem *item, QRectF rect,
- QList<QGraphicsItem *> *items,
- const QTransform &parentTransform,
- const QTransform &viewTransform,
- Qt::ItemSelectionMode mode, Qt::SortOrder order,
- qreal parentOpacity) const
-{
- // Calculate opacity.
- qreal opacity;
- if (item) {
- if (!item->d_ptr->visible)
- return;
- QGraphicsItem *p = item->d_ptr->parent;
- bool itemIgnoresParentOpacity = item->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity;
- bool parentDoesntPropagateOpacity = (p && (p->d_ptr->flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren));
- if (!itemIgnoresParentOpacity && !parentDoesntPropagateOpacity) {
- opacity = parentOpacity * item->opacity();
- } else {
- opacity = item->d_ptr->opacity;
- }
- if (opacity == 0.0 && !(item->d_ptr->flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren))
- return;
- } else {
- opacity = parentOpacity;
- }
-
- // Calculate the full transform for this item.
- QTransform transform = parentTransform;
- bool keep = false;
- if (item) {
- item->d_ptr->combineTransformFromParent(&transform, &viewTransform);
-
- // ### This does not take the clip into account.
- QRectF brect = item->boundingRect();
- _q_adjustRect(&brect);
-
- keep = true;
- if (mode == Qt::ContainsItemShape || mode == Qt::ContainsItemBoundingRect)
- keep = rect.contains(transform.mapRect(brect)) && rect != brect;
- else
- keep = rect.intersects(transform.mapRect(brect));
-
- if (keep && (mode == Qt::ContainsItemShape || mode == Qt::IntersectsItemShape)) {
- QPainterPath rectPath;
- rectPath.addRect(rect);
- keep = itemCollidesWithPath(item, transform.inverted().map(rectPath), mode);
- }
- }
-
- bool childClip = (item && (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape));
- bool dontProcessItem = !item || !keep;
- bool dontProcessChildren = item && dontProcessItem && childClip;
-
- // Find and sort children.
- QList<QGraphicsItem *> &children = item ? item->d_ptr->children : const_cast<QGraphicsScenePrivate *>(this)->topLevelItems;
- if (!dontProcessChildren) {
- if (item && item->d_ptr->needSortChildren) {
- item->d_ptr->needSortChildren = 0;
- qStableSort(children.begin(), children.end(), qt_notclosestLeaf);
- } else if (!item && needSortTopLevelItems) {
- const_cast<QGraphicsScenePrivate *>(this)->needSortTopLevelItems = false;
- qStableSort(children.begin(), children.end(), qt_notclosestLeaf);
- }
- }
-
- childClip &= !dontProcessChildren & !children.isEmpty();
-
- // Clip.
- if (childClip)
- rect &= transform.map(item->shape()).controlPointRect();
-
- // Process children behind
- int i = 0;
- if (!dontProcessChildren) {
- for (i = 0; i < children.size(); ++i) {
- QGraphicsItem *child = children.at(i);
- if (!(child->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent))
- break;
- recursive_items_helper(child, rect, items, transform, viewTransform,
- mode, order, opacity);
- }
- }
-
- // Process item
- if (!dontProcessItem)
- items->append(item);
-
- // Process children in front
- if (!dontProcessChildren) {
- for (; i < children.size(); ++i)
- recursive_items_helper(children.at(i), rect, items, transform, viewTransform,
- mode, order, opacity);
- }
-
- if (!item && order == Qt::AscendingOrder) {
- int n = items->size();
- for (int i = 0; i < n / 2; ++i) {
- QGraphicsItem *tmp = (*items)[n - i - 1];
- (*items)[n - i - 1] = (*items)[i];
- (*items)[i] = tmp;
- }
- }
-}
-
-QList<QGraphicsItem *> QGraphicsScenePrivate::items_helper(const QPointF &pos) const
-{
- QList<QGraphicsItem *> items;
-
- // The index returns a rough estimate of what items are inside the rect.
- // Refine it by iterating through all returned items.
- QRectF adjustedRect = QRectF(pos, QSize(1,1));
- foreach (QGraphicsItem *item, estimateItemsInRect(adjustedRect)) {
- // Find the item's scene transform in a clever way.
- QTransform x = item->sceneTransform();
- bool keep = false;
-
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemBoundingRect(item));
- // Rect intersects/contains item's shape
- if (QRectF_intersects(adjustedRect, x.mapRect(br))) {
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok) {
- if (item->contains(xinv.map(pos))) {
- items << item;
- keep = true;
- }
- }
- }
-
- if (keep && (item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) {
- // Recurse into children that clip children.
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok)
- childItems_helper(&items, item, xinv.map(pos));
- }
- }
-
- sortItems(&items, Qt::AscendingOrder, sortCacheEnabled);
- return items;
-}
-
-QList<QGraphicsItem *> QGraphicsScenePrivate::items_helper(const QRectF &rect,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const
-{
- QList<QGraphicsItem *> items;
-
- QPainterPath path;
-
- // The index returns a rough estimate of what items are inside the rect.
- // Refine it by iterating through all returned items.
- QRectF adjustedRect(rect);
- _q_adjustRect(&adjustedRect);
- foreach (QGraphicsItem *item, estimateItemsInRect(adjustedRect)) {
- // Find the item's scene transform in a clever way.
- QTransform x = item->sceneTransform();
- bool keep = false;
-
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemEffectiveBoundingRect(item));
- if (mode >= Qt::ContainsItemBoundingRect) {
- // Rect intersects/contains item's bounding rect
- QRectF mbr = x.mapRect(br);
- if ((mode == Qt::IntersectsItemBoundingRect && QRectF_intersects(rect, mbr))
- || (mode == Qt::ContainsItemBoundingRect && rect != mbr && rect.contains(mbr))) {
- items << item;
- keep = true;
- }
- } else {
- // Rect intersects/contains item's shape
- if (QRectF_intersects(adjustedRect, x.mapRect(br))) {
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok) {
- if (path.isEmpty())
- path.addRect(rect);
- if (itemCollidesWithPath(item, xinv.map(path), mode)) {
- items << item;
- keep = true;
- }
- }
- }
- }
-
- if (keep && (item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) {
- // Recurse into children that clip children.
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok) {
- if (x.type() <= QTransform::TxScale) {
- // Rect
- childItems_helper(&items, item, xinv.mapRect(rect), mode);
- } else {
- // Polygon
- childItems_helper(&items, item, xinv.map(rect), mode);
- }
- }
- }
- }
-
- if (order != Qt::SortOrder(-1))
- sortItems(&items, order, sortCacheEnabled);
- return items;
-}
-
-QList<QGraphicsItem *> QGraphicsScenePrivate::items_helper(const QPolygonF &polygon,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const
-{
- QList<QGraphicsItem *> items;
-
- QRectF polyRect(polygon.boundingRect());
- _q_adjustRect(&polyRect);
- QPainterPath path;
-
- // The index returns a rough estimate of what items are inside the rect.
- // Refine it by iterating through all returned items.
- foreach (QGraphicsItem *item, estimateItemsInRect(polyRect)) {
- // Find the item's scene transform in a clever way.
- QTransform x = item->sceneTransform();
- bool keep = false;
-
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemBoundingRect(item));
- if (mode >= Qt::ContainsItemBoundingRect) {
- // Polygon contains/intersects item's bounding rect
- if (path == QPainterPath())
- path.addPolygon(polygon);
- if ((mode == Qt::IntersectsItemBoundingRect && path.intersects(x.mapRect(br)))
- || (mode == Qt::ContainsItemBoundingRect && path.contains(x.mapRect(br)))) {
- items << item;
- keep = true;
- }
- } else {
- // Polygon contains/intersects item's shape
- if (QRectF_intersects(polyRect, x.mapRect(br))) {
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok) {
- if (path == QPainterPath())
- path.addPolygon(polygon);
- if (itemCollidesWithPath(item, xinv.map(path), mode)) {
- items << item;
- keep = true;
- }
- }
- }
- }
-
- if (keep && (item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) {
- // Recurse into children that clip children.
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok)
- childItems_helper(&items, item, xinv.map(polygon), mode);
- }
- }
-
- if (order != Qt::SortOrder(-1))
- sortItems(&items, order, sortCacheEnabled);
- return items;
-}
-
-QList<QGraphicsItem *> QGraphicsScenePrivate::items_helper(const QPainterPath &path,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const
-{
- QList<QGraphicsItem *> items;
- QRectF pathRect(path.controlPointRect());
- _q_adjustRect(&pathRect);
-
- // The index returns a rough estimate of what items are inside the rect.
- // Refine it by iterating through all returned items.
- foreach (QGraphicsItem *item, estimateItemsInRect(pathRect)) {
- // Find the item's scene transform in a clever way.
- QTransform x = item->sceneTransform();
- bool keep = false;
-
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemBoundingRect(item));
- if (mode >= Qt::ContainsItemBoundingRect) {
- // Path contains/intersects item's bounding rect
- if ((mode == Qt::IntersectsItemBoundingRect && path.intersects(x.mapRect(br)))
- || (mode == Qt::ContainsItemBoundingRect && path.contains(x.mapRect(br)))) {
- items << item;
- keep = true;
- }
- } else {
- // Path contains/intersects item's shape
- if (QRectF_intersects(pathRect, x.mapRect(br))) {
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok) {
- if (itemCollidesWithPath(item, xinv.map(path), mode)) {
- items << item;
- keep = true;
- }
- }
- }
- }
-
- if (keep && (item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) {
- bool ok;
- QTransform xinv = x.inverted(&ok);
- if (ok)
- childItems_helper(&items, item, xinv.map(path), mode);
- }
- }
-
- if (order != Qt::SortOrder(-1))
- sortItems(&items, order, sortCacheEnabled);
- return items;
-}
-
-void QGraphicsScenePrivate::childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QPointF &pos) const
-{
- bool parentClip = (parent->flags() & QGraphicsItem::ItemClipsChildrenToShape);
- if (parentClip && parent->d_ptr->isClippedAway())
- return;
- // ### is this needed?
- if (parentClip && !parent->boundingRect().contains(pos))
- return;
-
- QList<QGraphicsItem *> &children = parent->d_ptr->children;
- for (int i = 0; i < children.size(); ++i) {
- QGraphicsItem *item = children.at(i);
- if (item->d_ptr->transformData && !item->d_ptr->transformData->computedFullTransform().isInvertible())
- continue;
-
- // Skip invisible items and all their children.
- if (item->d_ptr->isInvisible())
- continue;
-
- bool keep = false;
- if (!item->d_ptr->isClippedAway()) {
- if (item->contains(item->mapFromParent(pos))) {
- items->append(item);
- keep = true;
- }
- }
-
- if ((keep || !(item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) && !item->d_ptr->children.isEmpty())
- // Recurse into children.
- childItems_helper(items, item, item->mapFromParent(pos));
- }
-}
-
-
-void QGraphicsScenePrivate::childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QRectF &rect,
- Qt::ItemSelectionMode mode) const
-{
- bool parentClip = (parent->flags() & QGraphicsItem::ItemClipsChildrenToShape);
- if (parentClip && parent->d_ptr->isClippedAway())
- return;
- QRectF adjustedRect(rect);
- _q_adjustRect(&adjustedRect);
- QRectF r = !parentClip ? adjustedRect : adjustedRect.intersected(adjustedItemBoundingRect(parent));
- if (r.isEmpty())
- return;
-
- QPainterPath path;
- QList<QGraphicsItem *> &children = parent->d_ptr->children;
- for (int i = 0; i < children.size(); ++i) {
- QGraphicsItem *item = children.at(i);
- if (item->d_ptr->transformData && !item->d_ptr->transformData->computedFullTransform().isInvertible())
- continue;
-
- // Skip invisible items and all their children.
- if (item->d_ptr->isInvisible())
- continue;
-
- bool keep = false;
- if (!item->d_ptr->isClippedAway()) {
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemBoundingRect(item));
- QRectF mbr = item->mapRectToParent(br);
- if (mode >= Qt::ContainsItemBoundingRect) {
- // Rect intersects/contains item's bounding rect
- if ((mode == Qt::IntersectsItemBoundingRect && QRectF_intersects(rect, mbr))
- || (mode == Qt::ContainsItemBoundingRect && rect != mbr && rect.contains(br))) {
- items->append(item);
- keep = true;
- }
- } else {
- // Rect intersects/contains item's shape
- if (QRectF_intersects(rect, mbr)) {
- if (path == QPainterPath())
- path.addRect(rect);
- if (itemCollidesWithPath(item, item->mapFromParent(path), mode)) {
- items->append(item);
- keep = true;
- }
- }
- }
- }
-
- if ((keep || !(item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) && !item->d_ptr->children.isEmpty()) {
- // Recurse into children.
- if (!item->d_ptr->transformData || item->d_ptr->transformData->computedFullTransform().type() <= QTransform::TxScale) {
- // Rect
- childItems_helper(items, item, item->mapRectFromParent(rect), mode);
- } else {
- // Polygon
- childItems_helper(items, item, item->mapFromParent(rect), mode);
- }
- }
- }
-}
-
-
-void QGraphicsScenePrivate::childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QPolygonF &polygon,
- Qt::ItemSelectionMode mode) const
-{
- bool parentClip = (parent->flags() & QGraphicsItem::ItemClipsChildrenToShape);
- if (parentClip && parent->d_ptr->isClippedAway())
- return;
- QRectF polyRect(polygon.boundingRect());
- _q_adjustRect(&polyRect);
- QRectF r = !parentClip ? polyRect : polyRect.intersected(adjustedItemBoundingRect(parent));
- if (r.isEmpty())
- return;
-
- QPainterPath path;
- QList<QGraphicsItem *> &children = parent->d_ptr->children;
- for (int i = 0; i < children.size(); ++i) {
- QGraphicsItem *item = children.at(i);
- if (item->d_ptr->transformData && !item->d_ptr->transformData->computedFullTransform().isInvertible())
- continue;
-
- // Skip invisible items.
- if (item->d_ptr->isInvisible())
- continue;
-
- bool keep = false;
- if (!item->d_ptr->isClippedAway()) {
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemBoundingRect(item));
- if (mode >= Qt::ContainsItemBoundingRect) {
- // Polygon contains/intersects item's bounding rect
- if (path == QPainterPath())
- path.addPolygon(polygon);
- if ((mode == Qt::IntersectsItemBoundingRect && path.intersects(item->mapRectToParent(br)))
- || (mode == Qt::ContainsItemBoundingRect && path.contains(item->mapRectToParent(br)))) {
- items->append(item);
- keep = true;
- }
- } else {
- // Polygon contains/intersects item's shape
- if (QRectF_intersects(polyRect, item->mapRectToParent(br))) {
- if (path == QPainterPath())
- path.addPolygon(polygon);
- if (itemCollidesWithPath(item, item->mapFromParent(path), mode)) {
- items->append(item);
- keep = true;
- }
- }
- }
- }
-
- if ((keep || !(item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) && !item->d_ptr->children.isEmpty()) {
- // Recurse into children that clip children.
- childItems_helper(items, item, item->mapFromParent(polygon), mode);
- }
- }
-}
-
-void QGraphicsScenePrivate::childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QPainterPath &path,
- Qt::ItemSelectionMode mode) const
-{
- bool parentClip = (parent->flags() & QGraphicsItem::ItemClipsChildrenToShape);
- if (parentClip && parent->d_ptr->isClippedAway())
- return;
- QRectF pathRect(path.boundingRect());
- _q_adjustRect(&pathRect);
- QRectF r = !parentClip ? pathRect : pathRect.intersected(adjustedItemBoundingRect(parent));
- if (r.isEmpty())
- return;
-
- QList<QGraphicsItem *> &children = parent->d_ptr->children;
- for (int i = 0; i < children.size(); ++i) {
- QGraphicsItem *item = children.at(i);
- if (item->d_ptr->transformData && !item->d_ptr->transformData->computedFullTransform().isInvertible())
- continue;
-
- // Skip invisible items.
- if (item->d_ptr->isInvisible())
- continue;
-
- bool keep = false;
- if (!item->d_ptr->isClippedAway()) {
- // ### _q_adjustedRect is only needed because QRectF::intersects,
- // QRectF::contains and QTransform::map() and friends don't work with
- // flat rectangles.
- const QRectF br(adjustedItemBoundingRect(item));
- if (mode >= Qt::ContainsItemBoundingRect) {
- // Polygon contains/intersects item's bounding rect
- if ((mode == Qt::IntersectsItemBoundingRect && path.intersects(item->mapRectToParent(br)))
- || (mode == Qt::ContainsItemBoundingRect && path.contains(item->mapRectToParent(br)))) {
- items->append(item);
- keep = true;
- }
- } else {
- // Path contains/intersects item's shape
- if (QRectF_intersects(pathRect, item->mapRectToParent(br))) {
- if (itemCollidesWithPath(item, item->mapFromParent(path), mode)) {
- items->append(item);
- keep = true;
- }
- }
- }
- }
-
- if ((keep || !(item->flags() & QGraphicsItem::ItemClipsChildrenToShape)) && !item->d_ptr->children.isEmpty()) {
- // Recurse into children that clip children.
- childItems_helper(items, item, item->mapFromParent(path), mode);
- }
- }
-}
-
-void QGraphicsScenePrivate::invalidateSortCache()
-{
- Q_Q(QGraphicsScene);
- if (!sortCacheEnabled || updatingSortCache)
- return;
-
- updatingSortCache = true;
- QMetaObject::invokeMethod(q, "_q_updateSortCache", Qt::QueuedConnection);
-}
-
-/*!
- \internal
-
- Should not be exported, but we can't change that now.
- ### Qt 5: Remove symbol / make static
-*/
-inline bool qt_closestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
-{
- // Return true if sibling item1 is on top of item2.
- const QGraphicsItemPrivate *d1 = item1->d_ptr;
- const QGraphicsItemPrivate *d2 = item2->d_ptr;
- bool f1 = d1->flags & QGraphicsItem::ItemStacksBehindParent;
- bool f2 = d2->flags & QGraphicsItem::ItemStacksBehindParent;
- if (f1 != f2) return f2;
- qreal z1 = d1->z;
- qreal z2 = d2->z;
- return z1 > z2;
-}
-
-static inline bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
-{
- return qt_closestLeaf(item2, item1);
-}
-
-/*!
- \internal
-
- Should not be exported, but we can't change that now.
-*/
-inline bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem *item2)
-{
- return QGraphicsScenePrivate::closestItemFirst_withoutCache(item1, item2);
-}
-
-/*!
- Returns true if \a item1 is on top of \a item2.
-
- \internal
-*/
-bool QGraphicsScenePrivate::closestItemFirst_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
-{
- // Siblings? Just check their z-values.
- const QGraphicsItemPrivate *d1 = item1->d_ptr;
- const QGraphicsItemPrivate *d2 = item2->d_ptr;
- if (d1->parent == d2->parent)
- return qt_closestLeaf(item1, item2);
-
- // Find common ancestor, and each item's ancestor closest to the common
- // ancestor.
- int item1Depth = d1->depth;
- int item2Depth = d2->depth;
- const QGraphicsItem *p = item1;
- const QGraphicsItem *t1 = item1;
- while (item1Depth > item2Depth && (p = p->d_ptr->parent)) {
- if (p == item2) {
- // item2 is one of item1's ancestors; item1 is on top
- return !(t1->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent);
- }
- t1 = p;
- --item1Depth;
- }
- p = item2;
- const QGraphicsItem *t2 = item2;
- while (item2Depth > item1Depth && (p = p->d_ptr->parent)) {
- if (p == item1) {
- // item1 is one of item2's ancestors; item1 is not on top
- return (t2->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent);
- }
- t2 = p;
- --item2Depth;
- }
-
- // item1Ancestor is now at the same level as item2Ancestor, but not the same.
- const QGraphicsItem *a1 = t1;
- const QGraphicsItem *a2 = t2;
- while (a1) {
- const QGraphicsItem *p1 = a1;
- const QGraphicsItem *p2 = a2;
- a1 = a1->parentItem();
- a2 = a2->parentItem();
- if (a1 && a1 == a2)
- return qt_closestLeaf(p1, p2);
- }
-
- // No common ancestor? Then just compare the items' toplevels directly.
- return qt_closestLeaf(t1->topLevelItem(), t2->topLevelItem());
-}
-
-/*!
- Returns true if \a item2 is on top of \a item1.
-
- \internal
-*/
-bool QGraphicsScenePrivate::closestItemLast_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
-{
- return closestItemFirst_withoutCache(item2, item1);
-}
-
-void QGraphicsScenePrivate::climbTree(QGraphicsItem *item, int *stackingOrder)
-{
- if (!item->d_ptr->children.isEmpty()) {
- QList<QGraphicsItem *> childList = item->d_ptr->children;
- qSort(childList.begin(), childList.end(), qt_closestLeaf);
- for (int i = 0; i < childList.size(); ++i) {
- QGraphicsItem *item = childList.at(i);
- if (!(item->flags() & QGraphicsItem::ItemStacksBehindParent))
- climbTree(childList.at(i), stackingOrder);
- }
- item->d_ptr->globalStackingOrder = (*stackingOrder)++;
- for (int i = 0; i < childList.size(); ++i) {
- QGraphicsItem *item = childList.at(i);
- if (item->flags() & QGraphicsItem::ItemStacksBehindParent)
- climbTree(childList.at(i), stackingOrder);
- }
- } else {
- item->d_ptr->globalStackingOrder = (*stackingOrder)++;
- }
-}
-
-void QGraphicsScenePrivate::_q_updateSortCache()
-{
- _q_updateIndex();
-
- if (!sortCacheEnabled || !updatingSortCache)
- return;
-
- updatingSortCache = false;
- int stackingOrder = 0;
-
- QList<QGraphicsItem *> topLevels;
-
- for (int i = 0; i < indexedItems.size(); ++i) {
- QGraphicsItem *item = indexedItems.at(i);
- if (item && item->parentItem() == 0)
- topLevels << item;
- }
- for (int i = 0; i < unindexedItems.size(); ++i) {
- QGraphicsItem *item = unindexedItems.at(i);
- if (item->parentItem() == 0)
- topLevels << item;
- }
-
- qSort(topLevels.begin(), topLevels.end(), qt_closestLeaf);
- for (int i = 0; i < topLevels.size(); ++i)
- climbTree(topLevels.at(i), &stackingOrder);
-}
-
-void QGraphicsScenePrivate::sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order,
- bool sortCacheEnabled)
-{
- if (sortCacheEnabled) {
- if (order == Qt::AscendingOrder) {
- qSort(itemList->begin(), itemList->end(), closestItemFirst_withCache);
- } else if (order == Qt::DescendingOrder) {
- qSort(itemList->begin(), itemList->end(), closestItemLast_withCache);
- }
- } else {
- if (order == Qt::AscendingOrder) {
- qSort(itemList->begin(), itemList->end(), closestItemFirst_withoutCache);
- } else if (order == Qt::DescendingOrder) {
- qSort(itemList->begin(), itemList->end(), closestItemLast_withoutCache);
- }
- }
-}
-
/*!
\internal
@@ -2343,8 +1275,8 @@ QGraphicsScene::QGraphicsScene(QObject *parent)
QGraphicsScene::QGraphicsScene(const QRectF &sceneRect, QObject *parent)
: QObject(*new QGraphicsScenePrivate, parent)
{
- setSceneRect(sceneRect);
d_func()->init();
+ setSceneRect(sceneRect);
}
/*!
@@ -2358,8 +1290,8 @@ QGraphicsScene::QGraphicsScene(const QRectF &sceneRect, QObject *parent)
QGraphicsScene::QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject *parent)
: QObject(*new QGraphicsScenePrivate, parent)
{
- setSceneRect(x, y, width, height);
d_func()->init();
+ setSceneRect(x, y, width, height);
}
/*!
@@ -2396,8 +1328,19 @@ QGraphicsScene::~QGraphicsScene()
QRectF QGraphicsScene::sceneRect() const
{
Q_D(const QGraphicsScene);
- const_cast<QGraphicsScenePrivate *>(d)->_q_updateIndex();
- return d->hasSceneRect ? d->sceneRect : d->growingItemsBoundingRect;
+ if (d->hasSceneRect)
+ return d->sceneRect;
+
+ if (d->dirtyGrowingItemsBoundingRect) {
+ // Lazily update the growing items bounding rect
+ QGraphicsScenePrivate *thatd = const_cast<QGraphicsScenePrivate *>(d);
+ QRectF oldGrowingBoundingRect = thatd->growingItemsBoundingRect;
+ thatd->growingItemsBoundingRect |= itemsBoundingRect();
+ thatd->dirtyGrowingItemsBoundingRect = false;
+ if (oldGrowingBoundingRect != thatd->growingItemsBoundingRect)
+ emit const_cast<QGraphicsScene *>(this)->sceneRectChanged(thatd->growingItemsBoundingRect);
+ }
+ return d->growingItemsBoundingRect;
}
void QGraphicsScene::setSceneRect(const QRectF &rect)
{
@@ -2405,8 +1348,7 @@ void QGraphicsScene::setSceneRect(const QRectF &rect)
if (rect != d->sceneRect) {
d->hasSceneRect = !rect.isNull();
d->sceneRect = rect;
- d->resetIndex();
- emit sceneRectChanged(rect);
+ emit sceneRectChanged(d->hasSceneRect ? rect : d->growingItemsBoundingRect);
}
}
@@ -2447,6 +1389,8 @@ void QGraphicsScene::setSceneRect(const QRectF &rect)
void QGraphicsScene::render(QPainter *painter, const QRectF &target, const QRectF &source,
Qt::AspectRatioMode aspectRatioMode)
{
+ // ### Switch to using the recursive rendering algorithm instead.
+
// Default source rect = scene rect
QRectF sourceRect = source;
if (sourceRect.isNull())
@@ -2541,8 +1485,19 @@ QGraphicsScene::ItemIndexMethod QGraphicsScene::itemIndexMethod() const
void QGraphicsScene::setItemIndexMethod(ItemIndexMethod method)
{
Q_D(QGraphicsScene);
- d->resetIndex();
+ if (d->indexMethod == method)
+ return;
+
d->indexMethod = method;
+
+ QList<QGraphicsItem *> oldItems = d->index->items(Qt::AscendingOrder);
+ delete d->index;
+ if (method == BspTreeIndex)
+ d->index = new QGraphicsSceneBspTreeIndex(this);
+ else
+ d->index = new QGraphicsSceneLinearIndex(this);
+ for (int i = oldItems.size() - 1; i >= 0; --i)
+ d->index->addItem(oldItems.at(i));
}
/*!
@@ -2580,35 +1535,32 @@ void QGraphicsScene::setItemIndexMethod(ItemIndexMethod method)
int QGraphicsScene::bspTreeDepth() const
{
Q_D(const QGraphicsScene);
- return d->bspTreeDepth;
+ QGraphicsSceneBspTreeIndex *bspTree = qobject_cast<QGraphicsSceneBspTreeIndex *>(d->index);
+ return bspTree ? bspTree->bspTreeDepth() : 0;
}
void QGraphicsScene::setBspTreeDepth(int depth)
{
Q_D(QGraphicsScene);
- if (d->bspTreeDepth == depth)
- return;
-
if (depth < 0) {
qWarning("QGraphicsScene::setBspTreeDepth: invalid depth %d ignored; must be >= 0", depth);
return;
}
- d->bspTreeDepth = depth;
- d->resetIndex();
+ QGraphicsSceneBspTreeIndex *bspTree = qobject_cast<QGraphicsSceneBspTreeIndex *>(d->index);
+ if (!bspTree) {
+ qWarning("QGraphicsScene::setBspTreeDepth: can not apply if indexing method is not BSP");
+ return;
+ }
+ bspTree->setBspTreeDepth(depth);
}
/*!
\property QGraphicsScene::sortCacheEnabled
\brief whether sort caching is enabled
\since 4.5
+ \obsolete
- When enabled, this property adds a cache that speeds up sorting and
- transformations for scenes with deep hierarchies (i.e., items with many
- levels of descendents), at the cost of using more memory (approx. 100 more
- bytes of memory per item).
-
- Items that are not part of a deep hierarchy suffer no penalty from this
- cache.
+ Since Qt 4.6, this property has no effect.
*/
bool QGraphicsScene::isSortCacheEnabled() const
{
@@ -2618,10 +1570,9 @@ bool QGraphicsScene::isSortCacheEnabled() const
void QGraphicsScene::setSortCacheEnabled(bool enabled)
{
Q_D(QGraphicsScene);
- if (enabled == d->sortCacheEnabled)
+ if (d->sortCacheEnabled == enabled)
return;
- if ((d->sortCacheEnabled = enabled))
- d->invalidateSortCache();
+ d->sortCacheEnabled = enabled;
}
/*!
@@ -2633,6 +1584,7 @@ void QGraphicsScene::setSortCacheEnabled(bool enabled)
*/
QRectF QGraphicsScene::itemsBoundingRect() const
{
+ // Does not take untransformable items into account.
QRectF boundingRect;
foreach (QGraphicsItem *item, items())
boundingRect |= item->sceneBoundingRect();
@@ -2647,43 +1599,43 @@ QRectF QGraphicsScene::itemsBoundingRect() const
QList<QGraphicsItem *> QGraphicsScene::items() const
{
Q_D(const QGraphicsScene);
- const_cast<QGraphicsScenePrivate *>(d)->purgeRemovedItems();
+ return d->index->items(Qt::AscendingOrder);
+}
- // If freeItemIndexes is empty, we know there are no holes in indexedItems and
- // unindexedItems.
- if (d->freeItemIndexes.isEmpty()) {
- if (d->unindexedItems.isEmpty())
- return d->indexedItems;
- return d->indexedItems + d->unindexedItems;
- }
+/*!
+ Returns an ordered list of all items on the scene. \a order decides the
+ sorting.
- // Rebuild the list of items to avoid holes. ### We could also just
- // compress the item lists at this point.
- QList<QGraphicsItem *> itemList;
- foreach (QGraphicsItem *item, d->indexedItems + d->unindexedItems) {
- if (item)
- itemList << item;
- }
- return itemList;
+ \sa addItem(), removeItem()
+*/
+QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
+{
+ Q_D(const QGraphicsScene);
+ return d->index->items(order);
}
/*!
+ \obsolete
+
Returns all visible items at position \a pos in the scene. The items are
- listed in descending Z order (i.e., the first item in the list is the
+ listed in descending stacking order (i.e., the first item in the list is the
top-most item, and the last item is the bottom-most item).
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+
\sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
{
Q_D(const QGraphicsScene);
- return d->items_helper(pos);
+ return d->index->items(pos, Qt::IntersectsItemShape, Qt::AscendingOrder);
}
/*!
- \fn QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSelectionMode mode) const
-
\overload
+ \obsolete
Returns all visible items that, depending on \a mode, are either inside or
intersect with the specified \a rectangle.
@@ -2691,25 +1643,47 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
The default value for \a mode is Qt::IntersectsItemShape; all items whose
exact shape intersects with or is contained by \a rectangle are returned.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+
\sa itemAt()
*/
-QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode) const
+QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSelectionMode mode) const
{
Q_D(const QGraphicsScene);
- QList<QGraphicsItem *> itemList;
- d->recursive_items_helper(0, rect, &itemList, QTransform(), QTransform(), mode, Qt::AscendingOrder);
- return itemList;
+ return d->index->items(rectangle, mode, Qt::AscendingOrder);
}
/*!
\fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const
+ \obsolete
\since 4.3
This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode).
+
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+*/
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the rectangle defined by \a x, \a y, \a w and \a h, in a list
+ sorted using \a order.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
*/
/*!
\overload
+ \obsolete
Returns all visible items that, depending on \a mode, are either inside or
intersect with the polygon \a polygon.
@@ -2717,16 +1691,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelecti
The default value for \a mode is Qt::IntersectsItemShape; all items whose
exact shape intersects with or is contained by \a polygon are returned.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+
\sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
{
Q_D(const QGraphicsScene);
- return d->items_helper(polygon, mode, Qt::AscendingOrder);
+ return d->index->items(polygon, mode, Qt::AscendingOrder);
}
/*!
\overload
+ \obsolete
Returns all visible items that, depending on \a path, are either inside or
intersect with the path \a path.
@@ -2734,12 +1713,103 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS
The default value for \a mode is Qt::IntersectsItemShape; all items whose
exact shape intersects with or is contained by \a path are returned.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+
\sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
{
Q_D(const QGraphicsScene);
- return d->items_helper(path, mode, Qt::AscendingOrder);
+ return d->index->items(path, mode, Qt::AscendingOrder);
+}
+
+/*!
+ \since 4.6
+
+ Returns all visible items that, depending on \a mode, are at the specified \a pos
+ in a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with \a pos are returned.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \sa itemAt()
+*/
+QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsScene);
+ return d->index->items(pos, mode, order, deviceTransform);
+}
+
+/*!
+ \overload
+ \since 4.6
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a rect and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a rect are returned.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \sa itemAt()
+*/
+QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsScene);
+ return d->index->items(rect, mode, order, deviceTransform);
+}
+
+/*!
+ \overload
+ \since 4.6
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a polygon and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a polygon are returned.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \sa itemAt()
+*/
+QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsScene);
+ return d->index->items(polygon, mode, order, deviceTransform);
+}
+
+/*!
+ \overload
+ \since 4.6
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a path and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a path are returned.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \sa itemAt()
+*/
+QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsScene);
+ return d->index->items(path, mode, order, deviceTransform);
}
/*!
@@ -2762,34 +1832,77 @@ QList<QGraphicsItem *> QGraphicsScene::collidingItems(const QGraphicsItem *item,
return QList<QGraphicsItem *>();
}
+ // Does not support ItemIgnoresTransformations.
QList<QGraphicsItem *> tmp;
- foreach (QGraphicsItem *itemInVicinity, d->estimateItemsInRect(item->sceneBoundingRect())) {
+ foreach (QGraphicsItem *itemInVicinity, d->index->estimateItems(item->sceneBoundingRect(), Qt::AscendingOrder)) {
if (item != itemInVicinity && item->collidesWithItem(itemInVicinity, mode))
tmp << itemInVicinity;
}
- d->sortItems(&tmp, Qt::AscendingOrder, d->sortCacheEnabled);
return tmp;
}
/*!
- \fn QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position) const
+ \overload
+ \obsolete
Returns the topmost visible item at the specified \a position, or 0 if
there are no items at this position.
\note The topmost item is the one with the highest Z-value.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+
\sa items(), collidingItems(), QGraphicsItem::setZValue()
*/
-QGraphicsItem *QGraphicsScene::itemAt(const QPointF &pos) const
+QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position) const
+{
+ QList<QGraphicsItem *> itemsAtPoint = items(position);
+ return itemsAtPoint.isEmpty() ? 0 : itemsAtPoint.first();
+}
+
+/*!
+ \since 4.6
+
+ Returns the topmost visible item at the specified \a position, or 0
+ if there are no items at this position.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \note The topmost item is the one with the highest Z-value.
+
+ \sa items(), collidingItems(), QGraphicsItem::setZValue()
+ */
+QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position, const QTransform &deviceTransform) const
{
- QList<QGraphicsItem *> itemsAtPoint = items(pos);
+ QList<QGraphicsItem *> itemsAtPoint = items(position, Qt::IntersectsItemShape,
+ Qt::AscendingOrder, deviceTransform);
return itemsAtPoint.isEmpty() ? 0 : itemsAtPoint.first();
}
/*!
+ \fn QGraphicsScene::itemAt(qreal x, qreal y, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
+
+ Returns the topmost item at the position specified by (\a x, \a
+ y), or 0 if there are no items at this position.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ This convenience function is equivalent to calling \c
+ {itemAt(QPointF(x, y), deviceTransform)}.
+
+ \note The topmost item is the one with the highest Z-value.
+*/
+
+/*!
\fn QGraphicsScene::itemAt(qreal x, qreal y) const
\overload
+ \obsolete
Returns the topmost item at the position specified by (\a x, \a
y), or 0 if there are no items at this position.
@@ -2797,6 +1910,10 @@ QGraphicsItem *QGraphicsScene::itemAt(const QPointF &pos) const
This convenience function is equivalent to calling \c
{itemAt(QPointF(x, y))}.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
+
\note The topmost item is the one with the highest Z-value.
*/
@@ -2862,6 +1979,24 @@ void QGraphicsScene::setSelectionArea(const QPainterPath &path)
*/
void QGraphicsScene::setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode)
{
+ setSelectionArea(path, mode, QTransform());
+}
+
+/*!
+ \overload
+ \since 4.6
+
+ Sets the selection area to \a path using \a mode to determine if items are
+ included in the selection area.
+
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \sa clearSelection(), selectionArea()
+*/
+void QGraphicsScene::setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode,
+ const QTransform &deviceTransform)
+{
Q_D(QGraphicsScene);
// Note: with boolean path operations, we can improve performance here
@@ -2877,7 +2012,7 @@ void QGraphicsScene::setSelectionArea(const QPainterPath &path, Qt::ItemSelectio
bool changed = false;
// Set all items in path to selected.
- foreach (QGraphicsItem *item, items(path, mode)) {
+ foreach (QGraphicsItem *item, items(path, mode, Qt::AscendingOrder, deviceTransform)) {
if (item->flags() & QGraphicsItem::ItemIsSelectable) {
if (!item->isSelected())
changed = true;
@@ -2934,26 +2069,13 @@ void QGraphicsScene::clearSelection()
void QGraphicsScene::clear()
{
Q_D(QGraphicsScene);
- // Recursive descent delete
- for (int i = 0; i < d->indexedItems.size(); ++i) {
- if (QGraphicsItem *item = d->indexedItems.at(i)) {
- if (!item->parentItem())
- delete item;
- }
- }
- QList<QGraphicsItem *> unindexedParents;
- for (int i = 0; i < d->unindexedItems.size(); ++i) {
- QGraphicsItem *item = d->unindexedItems.at(i);
- if (!item->parentItem())
- unindexedParents << item;
- }
- d->unindexedItems.clear();
- qDeleteAll(unindexedParents);
- d->indexedItems.clear();
- d->freeItemIndexes.clear();
+ // NB! We have to clear the index before deleting items; otherwise the
+ // index might try to access dangling item pointers.
+ d->index->clear();
+ const QList<QGraphicsItem *> items = d->topLevelItems;
+ qDeleteAll(items);
+ Q_ASSERT(d->topLevelItems.isEmpty());
d->lastItemCount = 0;
- d->bspTree.clear();
- d->largestUntransformableItem = QRectF();
d->allItemsIgnoreHoverEvents = true;
d->allItemsUseDefaultCursor = true;
d->allItemsIgnoreTouchEvents = true;
@@ -3075,14 +2197,6 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
return;
}
- // Prevent reusing a recently deleted pointer: purge all removed items
- // from our lists.
- d->purgeRemovedItems();
-
- // Invalidate any sort caching; arrival of a new item means we need to
- // resort.
- d->invalidateSortCache();
-
// Detach this item from its parent if the parent's scene is different
// from this scene.
if (QGraphicsItem *itemParent = item->parentItem()) {
@@ -3093,29 +2207,18 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
// Add the item to this scene
item->d_func()->scene = targetScene;
- // Indexing requires sceneBoundingRect(), but because \a item might
- // not be completely constructed at this point, we need to store it in
- // a temporary list and schedule an indexing for later.
- d->unindexedItems << item;
- item->d_func()->index = -1;
- d->startIndexTimer(0);
+ // Add the item in the index
+ d->index->addItem(item);
// Add to list of toplevels if this item is a toplevel.
if (!item->d_ptr->parent)
d->registerTopLevelItem(item);
- // Update the scene's sort cache settings.
- item->d_ptr->globalStackingOrder = -1;
- d->invalidateSortCache();
-
// Add to list of items that require an update. We cannot assume that the
// item is fully constructed, so calling item->update() can lead to a pure
// virtual function call to boundingRect().
- if (!d->updateAll) {
- if (d->pendingUpdateItems.isEmpty())
- QMetaObject::invokeMethod(this, "_q_updateLater", Qt::QueuedConnection);
- d->pendingUpdateItems << item;
- }
+ d->markDirty(item);
+ d->dirtyGrowingItemsBoundingRect = true;
// Disable selectionChanged() for individual items
++d->selectionChanging;
@@ -3186,6 +2289,8 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
// Deliver post-change notification
item->itemChange(QGraphicsItem::ItemSceneHasChanged, newSceneVariant);
+
+ d->updateInputMethodSensitivityInViews();
}
/*!
@@ -3461,6 +2566,8 @@ void QGraphicsScene::removeItem(QGraphicsItem *item)
// Deliver post-change notification
item->itemChange(QGraphicsItem::ItemSceneHasChanged, newSceneVariant);
+
+ d->updateInputMethodSensitivityInViews();
}
/*!
@@ -3515,6 +2622,17 @@ void QGraphicsScene::setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReas
d->lastFocusItem = d->focusItem;
d->focusItem = 0;
d->sendEvent(d->lastFocusItem, &event);
+
+ if (d->lastFocusItem
+ && (d->lastFocusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
+ // Reset any visible preedit text
+ QInputMethodEvent imEvent;
+ d->sendEvent(d->lastFocusItem, &imEvent);
+
+ // Close any external input method panel
+ for (int i = 0; i < d->views.size(); ++i)
+ d->views.at(i)->inputContext()->reset();
+ }
}
if (item) {
@@ -3527,6 +2645,8 @@ void QGraphicsScene::setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReas
QFocusEvent event(QEvent::FocusIn, focusReason);
d->sendEvent(item, &event);
}
+
+ d->updateInputMethodSensitivityInViews();
}
/*!
@@ -3583,6 +2703,8 @@ void QGraphicsScene::clearFocus()
\property QGraphicsScene::stickyFocus
\brief whether or not clicking the scene will clear focus
+ \since 4.6
+
If this property is false (the default), then clicking on the scene
background or on an item that does not accept focus, will clear
focus. Otherwise, focus will remain unchanged.
@@ -3710,7 +2832,7 @@ void QGraphicsScene::setForegroundBrush(const QBrush &brush)
QVariant QGraphicsScene::inputMethodQuery(Qt::InputMethodQuery query) const
{
Q_D(const QGraphicsScene);
- if (!d->focusItem)
+ if (!d->focusItem || !(d->focusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod))
return QVariant();
const QTransform matrix = d->focusItem->sceneTransform();
QVariant value = d->focusItem->inputMethodQuery(query);
@@ -3746,7 +2868,7 @@ void QGraphicsScene::update(const QRectF &rect)
if (directUpdates) {
// Update all views.
for (int i = 0; i < d->views.size(); ++i)
- d->views.at(i)->d_func()->updateAll();
+ d->views.at(i)->d_func()->fullUpdatePending = true;
}
} else {
if (directUpdates) {
@@ -4027,132 +3149,17 @@ bool QGraphicsScene::event(QEvent *event)
// geometries that do not have an explicit style set.
update();
break;
- case QEvent::GraphicsSceneGesture: {
- QGraphicsSceneGestureEvent *ev = static_cast<QGraphicsSceneGestureEvent*>(event);
- QGraphicsView *view = qobject_cast<QGraphicsView*>(ev->widget());
- if (!view) {
- qWarning("QGraphicsScene::event: gesture event was received without a view");
- break;
- }
-
- // get a list of gestures that just started.
- QSet<QGesture*> startedGestures;
- QList<QGesture*> gestures = ev->gestures();
- for(QList<QGesture*>::const_iterator it = gestures.begin(), e = gestures.end();
- it != e; ++it) {
- QGesture *g = *it;
- QGesturePrivate *gd = g->d_func();
- if (g->state() == Qt::GestureStarted || gd->singleshot) {
- startedGestures.insert(g);
- }
- }
- if (!startedGestures.isEmpty()) {
- // find a target for each started gesture.
- for(QSet<QGesture*>::const_iterator it = startedGestures.begin(), e = startedGestures.end();
- it != e; ++it) {
- QGesture *g = *it;
- QGesturePrivate *gd = g->d_func();
- gd->graphicsItem = 0;
- QList<QGraphicsItem*> itemsInGestureArea = items(g->hotSpot());
- const QString gestureName = g->type();
- foreach(QGraphicsItem *item, itemsInGestureArea) {
- if (item->d_func()->hasGesture(gestureName)) {
- Q_ASSERT(gd->graphicsItem == 0);
- gd->graphicsItem = item;
- d->itemsWithGestures[item].insert(g);
- break;
- }
- }
- }
- }
- d->sendGestureEvent(ev->gestures().toSet(), ev->cancelledGestures());
- }
- break;
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
d->touchEventHandler(static_cast<QTouchEvent *>(event));
break;
- case QEvent::Timer:
- if (d->indexTimerId && static_cast<QTimerEvent *>(event)->timerId() == d->indexTimerId) {
- if (d->restartIndexTimer) {
- d->restartIndexTimer = false;
- } else {
- // this call will kill the timer
- d->_q_updateIndex();
- }
- }
- // Fallthrough intended - support timers in subclasses.
default:
return QObject::event(event);
}
return true;
}
-void QGraphicsScenePrivate::sendGestureEvent(const QSet<QGesture*> &gestures, const QSet<QString> &cancelled)
-{
- Q_Q(QGraphicsScene);
- typedef QMap<QGraphicsItem*, QSet<QGesture*> > ItemGesturesMap;
- ItemGesturesMap itemGestures;
- QSet<QGesture*> startedGestures;
- for(QSet<QGesture*>::const_iterator it = gestures.begin(), e = gestures.end();
- it != e; ++it) {
- QGesture *g = *it;
- Q_ASSERT(g != 0);
- QGesturePrivate *gd = g->d_func();
- if (gd->graphicsItem != 0) {
- itemGestures[gd->graphicsItem].insert(g);
- if (g->state() == Qt::GestureStarted || gd->singleshot)
- startedGestures.insert(g);
- }
- }
-
- QSet<QGesture*> ignoredGestures;
- for(ItemGesturesMap::const_iterator it = itemGestures.begin(), e = itemGestures.end();
- it != e; ++it) {
- QGraphicsItem *receiver = it.key();
- Q_ASSERT(receiver != 0);
- QGraphicsSceneGestureEvent event;
- event.setGestures(it.value());
- event.setCancelledGestures(cancelled);
- bool processed = sendEvent(receiver, &event);
- QSet<QGesture*> started = startedGestures.intersect(it.value());
- if (event.isAccepted())
- foreach(QGesture *g, started)
- g->accept();
- if (!started.isEmpty() && !(processed && event.isAccepted())) {
- // there are started gestures event that weren't
- // accepted, so propagating each gesture independently.
- QSet<QGesture*>::const_iterator it = started.begin(),
- e = started.end();
- for(; it != e; ++it) {
- QGesture *g = *it;
- if (processed && g->isAccepted()) {
- continue;
- }
- QGesturePrivate *gd = g->d_func();
- QGraphicsItem *item = gd->graphicsItem;
- gd->graphicsItem = 0;
-
- //### THIS IS BS, DONT FORGET TO REWRITE THIS CODE
- // need to make sure we try to deliver event just once to each widget
- const QString gestureType = g->type();
- QList<QGraphicsItem*> itemsUnderGesture = q->items(g->hotSpot());
- for (int i = 0; i < itemsUnderGesture.size(); ++i) {
- QGraphicsItem *item = itemsUnderGesture.at(i);
- if (item != receiver && item->d_func()->hasGesture(gestureType)) {
- ignoredGestures.insert(g);
- gd->graphicsItem = item;
- break;
- }
- }
- }
- }
- }
- if (!ignoredGestures.isEmpty())
- sendGestureEvent(ignoredGestures, cancelled);
-}
-
/*!
\reimp
@@ -4778,16 +3785,16 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
subclass to receive input method events for the scene.
The default implementation forwards the event to the focusItem().
- If no item currently has focus, this function does nothing.
+ If no item currently has focus or the current focus item does not
+ accept input methods, this function does nothing.
\sa QGraphicsItem::inputMethodEvent()
*/
void QGraphicsScene::inputMethodEvent(QInputMethodEvent *event)
{
Q_D(QGraphicsScene);
- if (!d->focusItem)
- return;
- d->sendEvent(d->focusItem, event);
+ if (d->focusItem && (d->focusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod))
+ d->sendEvent(d->focusItem, event);
}
/*!
@@ -5326,6 +4333,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
QTransform transform(Qt::Uninitialized);
QTransform *transformPtr = 0;
+ bool translateOnlyTransform = false;
#define ENSURE_TRANSFORM_PTR \
if (!transformPtr) { \
Q_ASSERT(!itemIsUntransformable); \
@@ -5335,6 +4343,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
transformPtr = &transform; \
} else { \
transformPtr = &item->d_ptr->sceneTransform; \
+ translateOnlyTransform = item->d_ptr->sceneTransformTranslateOnly; \
} \
}
@@ -5346,10 +4355,8 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
transform = item->deviceTransform(viewTransform ? *viewTransform : QTransform());
transformPtr = &transform;
} else if (item->d_ptr->dirtySceneTransform) {
- item->d_ptr->sceneTransform = item->d_ptr->parent ? item->d_ptr->parent->d_ptr->sceneTransform
- : QTransform();
- item->d_ptr->combineTransformFromParent(&item->d_ptr->sceneTransform);
- item->d_ptr->dirtySceneTransform = 0;
+ item->d_ptr->updateSceneTransformFromParent();
+ Q_ASSERT(!item->d_ptr->dirtySceneTransform);
wasDirtyParentSceneTransform = true;
}
@@ -5358,7 +4365,8 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (drawItem) {
const QRectF brect = adjustedItemBoundingRect(item);
ENSURE_TRANSFORM_PTR
- QRect viewBoundingRect = transformPtr->mapRect(brect).toRect();
+ QRect viewBoundingRect = translateOnlyTransform ? brect.translated(transformPtr->dx(), transformPtr->dy()).toRect()
+ : transformPtr->mapRect(brect).toRect();
item->d_ptr->paintedViewBoundingRects.insert(widget, viewBoundingRect);
viewBoundingRect.adjust(-1, -1, 1, 1);
drawItem = exposedRegion ? exposedRegion->intersects(viewBoundingRect) : !viewBoundingRect.isEmpty();
@@ -5375,10 +4383,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
int i = 0;
if (itemHasChildren) {
- if (item->d_ptr->needSortChildren) {
- item->d_ptr->needSortChildren = 0;
- qStableSort(item->d_ptr->children.begin(), item->d_ptr->children.end(), qt_notclosestLeaf);
- }
+ item->d_ptr->ensureSortedChildren();
if (itemClipsChildrenToShape) {
painter->save();
@@ -5404,7 +4409,8 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (drawItem) {
Q_ASSERT(!itemIsFullyTransparent);
Q_ASSERT(itemHasContents);
- item->d_ptr->initStyleOption(&styleOptionTmp, transform, exposedRegion
+ ENSURE_TRANSFORM_PTR
+ item->d_ptr->initStyleOption(&styleOptionTmp, *transformPtr, exposedRegion
? *exposedRegion : QRegion(), exposedRegion == 0);
const bool itemClipsToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsToShape;
@@ -5412,10 +4418,9 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (savePainter)
painter->save();
- if (!itemHasChildren || !itemClipsChildrenToShape) {
- ENSURE_TRANSFORM_PTR
+ if (!itemHasChildren || !itemClipsChildrenToShape)
painter->setWorldTransform(*transformPtr);
- }
+
if (itemClipsToShape)
painter->setClipPath(item->shape(), Qt::IntersectClip);
painter->setOpacity(opacity);
@@ -5458,6 +4463,16 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
/*ignoreVisibleBit=*/force,
/*ignoreDirtyBit=*/removingItemFromScene || invalidateChildren,
/*ignoreOpacity=*/ignoreOpacity)) {
+ if (item->d_ptr->dirty) {
+ // The item is already marked as dirty and will be processed later. However,
+ // we have to make sure ignoreVisible and ignoreOpacity are set properly;
+ // otherwise things like: item->update(); item->hide() (force is now true)
+ // won't work as expected.
+ if (force)
+ item->d_ptr->ignoreVisible = 1;
+ if (ignoreOpacity)
+ item->d_ptr->ignoreOpacity = 1;
+ }
return;
}
@@ -5517,65 +4532,121 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
}
static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item,
- const QRectF &rect, const QTransform &xform)
+ const QRectF &rect, bool itemIsUntransformable)
{
Q_ASSERT(view);
Q_ASSERT(item);
- if (item->hasBoundingRegionGranularity)
+
+ QGraphicsItem *itemq = static_cast<QGraphicsItem *>(item->q_ptr);
+ QGraphicsView *viewq = static_cast<QGraphicsView *>(view->q_ptr);
+
+ if (itemIsUntransformable) {
+ const QTransform xform = itemq->deviceTransform(viewq->viewportTransform());
+ if (!item->hasBoundingRegionGranularity)
+ return view->updateRect(xform.mapRect(rect).toRect());
return view->updateRegion(xform.map(QRegion(rect.toRect())));
- return view->updateRect(xform.mapRect(rect).toRect());
+ }
+
+ if (item->sceneTransformTranslateOnly && view->identityMatrix) {
+ const qreal dx = item->sceneTransform.dx();
+ const qreal dy = item->sceneTransform.dy();
+ if (!item->hasBoundingRegionGranularity) {
+ QRectF r(rect);
+ r.translate(dx - view->horizontalScroll(), dy - view->verticalScroll());
+ return view->updateRect(r.toRect());
+ }
+ QRegion r(rect.toRect());
+ r.translate(qRound(dx) - view->horizontalScroll(), qRound(dy) - view->verticalScroll());
+ return view->updateRegion(r);
+ }
+
+ if (!viewq->isTransformed()) {
+ if (!item->hasBoundingRegionGranularity)
+ return view->updateRect(item->sceneTransform.mapRect(rect).toRect());
+ return view->updateRegion(item->sceneTransform.map(QRegion(rect.toRect())));
+ }
+
+ QTransform xform = item->sceneTransform;
+ xform *= viewq->viewportTransform();
+ if (!item->hasBoundingRegionGranularity)
+ return view->updateRect(xform.mapRect(rect).toRect());
+ return view->updateRegion(xform.map(QRegion(rect.toRect())));
}
void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren,
qreal parentOpacity)
{
Q_Q(QGraphicsScene);
+ Q_ASSERT(item);
+ Q_ASSERT(!updateAll);
- bool wasDirtyParentViewBoundingRects = false;
- bool wasDirtyParentSceneTransform = false;
- qreal opacity = parentOpacity;
+ if (!item->d_ptr->dirty && !item->d_ptr->dirtyChildren) {
+ resetDirtyItem(item);
+ return;
+ }
- if (item) {
- wasDirtyParentViewBoundingRects = item->d_ptr->paintedViewBoundingRectsNeedRepaint;
- opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
- const bool itemIsHidden = !item->d_ptr->ignoreVisible && !item->d_ptr->visible;
- const bool itemIsFullyTransparent = !item->d_ptr->ignoreOpacity && opacity == 0.0;
-
- if (item->d_ptr->dirtySceneTransform && !itemIsHidden && !item->d_ptr->itemIsUntransformable()
- && !(itemIsFullyTransparent && item->d_ptr->childrenCombineOpacity())) {
- // Calculate the full scene transform for this item.
- item->d_ptr->sceneTransform = item->d_ptr->parent ? item->d_ptr->parent->d_ptr->sceneTransform
- : QTransform();
- item->d_ptr->combineTransformFromParent(&item->d_ptr->sceneTransform);
- item->d_ptr->dirtySceneTransform = 0;
- wasDirtyParentSceneTransform = true;
- }
+ const bool itemIsHidden = !item->d_ptr->ignoreVisible && !item->d_ptr->visible;
+ if (itemIsHidden) {
+ resetDirtyItem(item, /*recursive=*/true);
+ return;
+ }
- if (itemIsHidden || itemIsFullyTransparent || (item->d_ptr->flags & QGraphicsItem::ItemHasNoContents)) {
- // Make sure we don't process invisible items or items with no content.
- item->d_ptr->dirty = 0;
+ const bool itemHasContents = !(item->d_ptr->flags & QGraphicsItem::ItemHasNoContents);
+ const bool itemHasChildren = !item->d_ptr->children.isEmpty();
+ if (!itemHasContents && !itemHasChildren) {
+ resetDirtyItem(item);
+ return; // Item has neither contents nor children!(?)
+ }
+
+ const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
+ const bool itemIsFullyTransparent = !item->d_ptr->ignoreOpacity && opacity < 0.0001;
+ if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity())) {
+ resetDirtyItem(item, /*recursive=*/itemHasChildren);
+ return;
+ }
+
+ bool wasDirtyParentSceneTransform = item->d_ptr->dirtySceneTransform;
+ const bool itemIsUntransformable = item->d_ptr->itemIsUntransformable();
+ if (wasDirtyParentSceneTransform && !itemIsUntransformable) {
+ item->d_ptr->updateSceneTransformFromParent();
+ Q_ASSERT(!item->d_ptr->dirtySceneTransform);
+ }
+
+ const bool wasDirtyParentViewBoundingRects = item->d_ptr->paintedViewBoundingRectsNeedRepaint;
+ if (itemIsFullyTransparent || !itemHasContents || dirtyAncestorContainsChildren) {
+ // Make sure we don't process invisible items or items with no content.
+ item->d_ptr->dirty = 0;
+ item->d_ptr->fullUpdatePending = 0;
+ // Might have a dirty view bounding rect otherwise.
+ if (itemIsFullyTransparent || !itemHasContents)
item->d_ptr->paintedViewBoundingRectsNeedRepaint = 0;
+ }
+
+ if (!hasSceneRect && item->d_ptr->geometryChanged && item->d_ptr->visible) {
+ // Update growingItemsBoundingRect.
+ if (item->d_ptr->sceneTransformTranslateOnly) {
+ growingItemsBoundingRect |= item->boundingRect().translated(item->d_ptr->sceneTransform.dx(),
+ item->d_ptr->sceneTransform.dy());
+ } else {
+ growingItemsBoundingRect |= item->d_ptr->sceneTransform.mapRect(item->boundingRect());
}
}
// Process item.
- if (item && (item->d_ptr->dirty || item->d_ptr->paintedViewBoundingRectsNeedRepaint)) {
+ if (item->d_ptr->dirty || item->d_ptr->paintedViewBoundingRectsNeedRepaint) {
const bool useCompatUpdate = views.isEmpty() || (connectedSignals & changedSignalMask);
- const bool untransformableItem = item->d_ptr->itemIsUntransformable();
const QRectF itemBoundingRect = adjustedItemBoundingRect(item);
- if (item->d_ptr->geometryChanged) {
- // Update growingItemsBoundingRect.
- if (!hasSceneRect)
- growingItemsBoundingRect |= item->d_ptr->sceneTransform.mapRect(itemBoundingRect);
- item->d_ptr->geometryChanged = 0;
- }
-
- if (useCompatUpdate && !untransformableItem && qFuzzyIsNull(item->boundingRegionGranularity())) {
+ if (useCompatUpdate && !itemIsUntransformable && qFuzzyIsNull(item->boundingRegionGranularity())) {
// This block of code is kept for compatibility. Since 4.5, by default
// QGraphicsView does not connect the signal and we use the below
// method of delivering updates.
- q->update(item->d_ptr->sceneTransform.mapRect(itemBoundingRect));
+ if (item->d_ptr->sceneTransformTranslateOnly) {
+ q->update(itemBoundingRect.translated(item->d_ptr->sceneTransform.dx(),
+ item->d_ptr->sceneTransform.dy()));
+ } else {
+ q->update(item->d_ptr->sceneTransform.mapRect(itemBoundingRect));
+ }
} else {
QRectF dirtyRect;
bool uninitializedDirtyRect = true;
@@ -5583,30 +4654,31 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
for (int j = 0; j < views.size(); ++j) {
QGraphicsView *view = views.at(j);
QGraphicsViewPrivate *viewPrivate = view->d_func();
- if (viewPrivate->fullUpdatePending)
- continue;
- switch (viewPrivate->viewportUpdateMode) {
- case QGraphicsView::NoViewportUpdate:
- continue;
- case QGraphicsView::FullViewportUpdate:
- view->viewport()->update();
- viewPrivate->fullUpdatePending = 1;
+ QRect &paintedViewBoundingRect = item->d_ptr->paintedViewBoundingRects[viewPrivate->viewport];
+ if (viewPrivate->fullUpdatePending
+ || viewPrivate->viewportUpdateMode == QGraphicsView::NoViewportUpdate) {
+ // Okay, if we have a full update pending or no viewport update, this item's
+ // paintedViewBoundingRect will be updated correctly in the next paintEvent if
+ // it is inside the viewport, but for now we can pretend that it is outside.
+ paintedViewBoundingRect = QRect(-1, -1, -1, -1);
continue;
- default:
- break;
}
- QRect &paintedViewBoundingRect = item->d_ptr->paintedViewBoundingRects[viewPrivate->viewport];
- if (item->d_ptr->paintedViewBoundingRectsNeedRepaint) {
- wasDirtyParentViewBoundingRects = true;
+ if (item->d_ptr->paintedViewBoundingRectsNeedRepaint && !paintedViewBoundingRect.isEmpty()) {
paintedViewBoundingRect.translate(viewPrivate->dirtyScrollOffset);
if (!viewPrivate->updateRect(paintedViewBoundingRect))
- paintedViewBoundingRect = QRect();
+ paintedViewBoundingRect = QRect(-1, -1, -1, -1); // Outside viewport.
}
if (!item->d_ptr->dirty)
continue;
+ if (!item->d_ptr->paintedViewBoundingRectsNeedRepaint
+ && paintedViewBoundingRect.x() == -1 && paintedViewBoundingRect.y() == -1
+ && paintedViewBoundingRect.width() == -1 && paintedViewBoundingRect.height() == -1) {
+ continue; // Outside viewport.
+ }
+
if (uninitializedDirtyRect) {
dirtyRect = itemBoundingRect;
if (!item->d_ptr->fullUpdatePending) {
@@ -5619,35 +4691,25 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
if (dirtyRect.isEmpty())
continue; // Discard updates outside the bounding rect.
- bool valid = false;
- if (untransformableItem) {
- valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect,
- item->deviceTransform(view->viewportTransform()));
- } else if (!view->isTransformed()) {
- valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, item->d_ptr->sceneTransform);
- } else {
- QTransform deviceTransform = item->d_ptr->sceneTransform;
- deviceTransform *= view->viewportTransform();
- valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, deviceTransform);
+ if (!updateHelper(viewPrivate, item->d_ptr, dirtyRect, itemIsUntransformable)
+ && item->d_ptr->paintedViewBoundingRectsNeedRepaint) {
+ paintedViewBoundingRect = QRect(-1, -1, -1, -1); // Outside viewport.
}
- if (!valid)
- paintedViewBoundingRect = QRect();
}
}
}
- // Process root items / children.
- if (!item || item->d_ptr->dirtyChildren) {
- QList<QGraphicsItem *> *children = item ? &item->d_ptr->children : &topLevelItems;
- const bool allChildrenDirty = item && item->d_ptr->allChildrenDirty;
+ // Process children.
+ if (itemHasChildren && item->d_ptr->dirtyChildren) {
if (!dirtyAncestorContainsChildren) {
- dirtyAncestorContainsChildren = item && item->d_ptr->fullUpdatePending
+ dirtyAncestorContainsChildren = item->d_ptr->fullUpdatePending
&& (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape);
}
- const bool parentIgnoresVisible = item && item->d_ptr->ignoreVisible;
- const bool parentIgnoresOpacity = item && item->d_ptr->ignoreOpacity;
- for (int i = 0; i < children->size(); ++i) {
- QGraphicsItem *child = children->at(i);
+ const bool allChildrenDirty = item->d_ptr->allChildrenDirty;
+ const bool parentIgnoresVisible = item->d_ptr->ignoreVisible;
+ const bool parentIgnoresOpacity = item->d_ptr->ignoreOpacity;
+ for (int i = 0; i < item->d_ptr->children.size(); ++i) {
+ QGraphicsItem *child = item->d_ptr->children.at(i);
if (wasDirtyParentSceneTransform)
child->d_ptr->dirtySceneTransform = 1;
if (wasDirtyParentViewBoundingRects)
@@ -5656,36 +4718,19 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
child->d_ptr->ignoreVisible = 1;
if (parentIgnoresOpacity)
child->d_ptr->ignoreOpacity = 1;
-
if (allChildrenDirty) {
child->d_ptr->dirty = 1;
child->d_ptr->fullUpdatePending = 1;
child->d_ptr->dirtyChildren = 1;
child->d_ptr->allChildrenDirty = 1;
- } else if (!child->d_ptr->dirty && !child->d_ptr->dirtyChildren) {
- resetDirtyItem(child);
- continue;
}
-
- if (dirtyAncestorContainsChildren || updateAll) {
- // No need to process this child's dirty rect, hence reset the dirty state.
- // However, we have to continue the recursion because it might have a dirty
- // view bounding rect that needs repaint. We also have to reset the dirty
- // state of its descendants.
- child->d_ptr->dirty = 0;
- child->d_ptr->fullUpdatePending = 0;
- if (updateAll)
- child->d_ptr->paintedViewBoundingRectsNeedRepaint = 0;
- }
-
processDirtyItemsRecursive(child, dirtyAncestorContainsChildren, opacity);
}
} else if (wasDirtyParentSceneTransform) {
item->d_ptr->invalidateChildrenSceneTransform();
}
- if (item)
- resetDirtyItem(item);
+ resetDirtyItem(item);
}
/*!
@@ -6066,34 +5111,42 @@ void QGraphicsScene::setActiveWindow(QGraphicsWidget *widget)
}
}
-void QGraphicsScenePrivate::addView(QGraphicsView *view)
-{
- views << view;
- foreach(int gestureId, grabbedGestures)
- view->d_func()->grabGesture(gestureId);
-}
+/*!
+ \since 4.6
-void QGraphicsScenePrivate::removeView(QGraphicsView *view)
+ Sends event \a event to item \a item through possible event filters.
+
+ The event is sent only if the item is enabled.
+
+ Returns \c false if the event was filtered or if the item is disabled.
+ Otherwise returns the value that was returned from the event handler.
+
+ \sa QGraphicsItem::sceneEvent(), QGraphicsItem::sceneEventFilter()
+*/
+bool QGraphicsScene::sendEvent(QGraphicsItem *item, QEvent *event)
{
- views.removeAll(view);
- foreach(int gestureId, grabbedGestures)
- view->releaseGesture(gestureId);
+ Q_D(QGraphicsScene);
+ if (!item) {
+ qWarning("QGraphicsScene::sendEvent: cannot send event to a null item");
+ return false;
+ }
+ if (item->scene() != this) {
+ qWarning("QGraphicsScene::sendEvent: item %p's scene (%p)"
+ " is different from this scene (%p)",
+ item, item->scene(), this);
+ return false;
+ }
+ return d->sendEvent(item, event);
}
-void QGraphicsScenePrivate::grabGesture(QGraphicsItem *item, int gestureId)
+void QGraphicsScenePrivate::addView(QGraphicsView *view)
{
- if (!grabbedGestures.contains(gestureId)) {
- foreach(QGraphicsView *view, views)
- view->d_func()->grabGesture(gestureId);
- }
- (void)itemsWithGestures[item];
- grabbedGestures << gestureId;
+ views << view;
}
-void QGraphicsScenePrivate::releaseGesture(QGraphicsItem *item, int gestureId)
+void QGraphicsScenePrivate::removeView(QGraphicsView *view)
{
- itemsWithGestures.remove(item);
- //###
+ views.removeAll(view);
}
void QGraphicsScenePrivate::updateTouchPointsForItem(QGraphicsItem *item, QTouchEvent *touchEvent)
@@ -6305,6 +5358,11 @@ void QGraphicsScenePrivate::enableTouchEventsOnViews()
view->viewport()->setAttribute(Qt::WA_AcceptTouchEvents, true);
}
+void QGraphicsScenePrivate::updateInputMethodSensitivityInViews()
+{
+ for (int i = 0; i < views.size(); ++i)
+ views.at(i)->d_func()->updateInputMethodSensitivity();
+}
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgraphicsscene.h b/src/gui/graphicsview/qgraphicsscene.h
index d56e831..68bd3e1 100644
--- a/src/gui/graphicsview/qgraphicsscene.h
+++ b/src/gui/graphicsview/qgraphicsscene.h
@@ -79,11 +79,11 @@ class QGraphicsSceneHelpEvent;
class QGraphicsSceneHoverEvent;
class QGraphicsSceneMouseEvent;
class QGraphicsSceneWheelEvent;
-class QGraphicsSceneGestureEvent;
class QGraphicsSimpleTextItem;
class QGraphicsTextItem;
class QGraphicsView;
class QGraphicsWidget;
+class QGraphicsSceneIndex;
class QHelpEvent;
class QInputMethodEvent;
class QKeyEvent;
@@ -153,22 +153,38 @@ public:
QRectF itemsBoundingRect() const;
QList<QGraphicsItem *> items() const;
- QList<QGraphicsItem *> items(const QPointF &pos) const;
- QList<QGraphicsItem *> items(const QRectF &rect, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
- QList<QGraphicsItem *> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
- QList<QGraphicsItem *> items(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
+ QList<QGraphicsItem *> items(Qt::SortOrder order) const; // ### Qt 5: unify
+
+ QList<QGraphicsItem *> items(const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ QList<QGraphicsItem *> items(const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ QList<QGraphicsItem *> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ QList<QGraphicsItem *> items(const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+
+ QList<QGraphicsItem *> items(const QPointF &pos) const; // ### obsolete
+ QList<QGraphicsItem *> items(const QRectF &rect, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; // ### obsolete
+ QList<QGraphicsItem *> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; // ### obsolete
+ QList<QGraphicsItem *> items(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; // ### obsolete
+
QList<QGraphicsItem *> collidingItems(const QGraphicsItem *item, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
- QGraphicsItem *itemAt(const QPointF &pos) const;
+
+ QGraphicsItem *itemAt(const QPointF &pos) const; // ### obsolete
+ QGraphicsItem *itemAt(const QPointF &pos, const QTransform &deviceTransform) const;
inline QList<QGraphicsItem *> items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const
- { return items(QRectF(x, y, w, h), mode); }
- inline QGraphicsItem *itemAt(qreal x, qreal y) const
+ { return items(QRectF(x, y, w, h), mode); } // ### obsolete
+ inline QList<QGraphicsItem *> items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order,
+ const QTransform &deviceTransform = QTransform()) const
+ { return items(QRectF(x, y, w, h), mode, order, deviceTransform); }
+ inline QGraphicsItem *itemAt(qreal x, qreal y) const // ### obsolete
{ return itemAt(QPointF(x, y)); }
+ inline QGraphicsItem *itemAt(qreal x, qreal y, const QTransform &deviceTransform) const
+ { return itemAt(QPointF(x, y), deviceTransform); }
QList<QGraphicsItem *> selectedItems() const;
QPainterPath selectionArea() const;
void setSelectionArea(const QPainterPath &path);
- void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode);
+ void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode);
+ void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode, const QTransform &deviceTransform);
QGraphicsItemGroup *createItemGroup(const QList<QGraphicsItem *> &items);
void destroyItemGroup(QGraphicsItemGroup *group);
@@ -229,6 +245,8 @@ public:
QGraphicsWidget *activeWindow() const;
void setActiveWindow(QGraphicsWidget *widget);
+ bool sendEvent(QGraphicsItem *item, QEvent *event);
+
public Q_SLOTS:
void update(const QRectF &rect = QRectF());
void invalidate(const QRectF &rect = QRectF(), SceneLayers layers = AllLayers);
@@ -279,11 +297,8 @@ Q_SIGNALS:
private:
Q_DECLARE_PRIVATE(QGraphicsScene)
Q_DISABLE_COPY(QGraphicsScene)
- Q_PRIVATE_SLOT(d_func(), void _q_updateIndex())
Q_PRIVATE_SLOT(d_func(), void _q_emitUpdated())
- Q_PRIVATE_SLOT(d_func(), void _q_updateLater())
Q_PRIVATE_SLOT(d_func(), void _q_polishItems())
- Q_PRIVATE_SLOT(d_func(), void _q_updateSortCache())
Q_PRIVATE_SLOT(d_func(), void _q_processDirtyItems())
friend class QGraphicsItem;
friend class QGraphicsItemPrivate;
@@ -292,6 +307,10 @@ private:
friend class QGraphicsWidget;
friend class QGraphicsWidgetPrivate;
friend class QGraphicsEffect;
+ friend class QGraphicsSceneIndex;
+ friend class QGraphicsSceneIndexPrivate;
+ friend class QGraphicsSceneBspTreeIndex;
+ friend class QGraphicsSceneBspTreeIndexPrivate;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsScene::SceneLayers)
diff --git a/src/gui/graphicsview/qgraphicsscene_bsp.cpp b/src/gui/graphicsview/qgraphicsscene_bsp.cpp
index 3f3e58b..fb4b9a4 100644
--- a/src/gui/graphicsview/qgraphicsscene_bsp.cpp
+++ b/src/gui/graphicsview/qgraphicsscene_bsp.cpp
@@ -70,12 +70,15 @@ class QGraphicsSceneFindItemBspTreeVisitor : public QGraphicsSceneBspTreeVisitor
{
public:
QList<QGraphicsItem *> *foundItems;
+ bool onlyTopLevelItems;
void visit(QList<QGraphicsItem *> *items)
{
for (int i = 0; i < items->size(); ++i) {
QGraphicsItem *item = items->at(i);
- if (!item->d_func()->itemDiscovered && item->isVisible()) {
+ if (onlyTopLevelItems && item->d_ptr->parent)
+ item = item->topLevelItem();
+ if (!item->d_func()->itemDiscovered && item->d_ptr->visible) {
item->d_func()->itemDiscovered = 1;
foundItems->prepend(item);
}
@@ -143,19 +146,15 @@ void QGraphicsSceneBspTree::removeItems(const QSet<QGraphicsItem *> &items)
}
}
-QList<QGraphicsItem *> QGraphicsSceneBspTree::items(const QRectF &rect)
+QList<QGraphicsItem *> QGraphicsSceneBspTree::items(const QRectF &rect, bool onlyTopLevelItems) const
{
QList<QGraphicsItem *> tmp;
findVisitor->foundItems = &tmp;
+ findVisitor->onlyTopLevelItems = onlyTopLevelItems;
climbTree(findVisitor, rect);
- return tmp;
-}
-
-QList<QGraphicsItem *> QGraphicsSceneBspTree::items(const QPointF &pos)
-{
- QList<QGraphicsItem *> tmp;
- findVisitor->foundItems = &tmp;
- climbTree(findVisitor, pos);
+ // Reset discovery bits.
+ for (int i = 0; i < tmp.size(); ++i)
+ tmp.at(i)->d_ptr->itemDiscovered = 0;
return tmp;
}
@@ -235,47 +234,17 @@ void QGraphicsSceneBspTree::initialize(const QRectF &rect, int depth, int index)
}
}
-void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QPointF &pos, int index)
-{
- if (nodes.isEmpty())
- return;
-
- const Node &node = nodes.at(index);
- int childIndex = firstChildIndex(index);
-
- switch (node.type) {
- case Node::Leaf: {
- visitor->visit(&leaves[node.leafIndex]);
- break;
- }
- case Node::Vertical:
- if (pos.x() < node.offset) {
- climbTree(visitor, pos, childIndex);
- } else {
- climbTree(visitor, pos, childIndex + 1);
- }
- break;
- case Node::Horizontal:
- if (pos.y() < node.offset) {
- climbTree(visitor, pos, childIndex);
- } else {
- climbTree(visitor, pos, childIndex + 1);
- }
- break;
- }
-}
-
-void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index)
+void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index) const
{
if (nodes.isEmpty())
return;
const Node &node = nodes.at(index);
- int childIndex = firstChildIndex(index);
+ const int childIndex = firstChildIndex(index);
switch (node.type) {
case Node::Leaf: {
- visitor->visit(&leaves[node.leafIndex]);
+ visitor->visit(const_cast<QList<QGraphicsItem*>*>(&leaves[node.leafIndex]));
break;
}
case Node::Vertical:
@@ -288,7 +257,6 @@ void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, con
}
break;
case Node::Horizontal:
- int childIndex = firstChildIndex(index);
if (rect.top() < node.offset) {
climbTree(visitor, rect, childIndex);
if (rect.bottom() >= node.offset)
diff --git a/src/gui/graphicsview/qgraphicsscene_bsp_p.h b/src/gui/graphicsview/qgraphicsscene_bsp_p.h
index 73a937f..4cac64a 100644
--- a/src/gui/graphicsview/qgraphicsscene_bsp_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_bsp_p.h
@@ -92,8 +92,7 @@ public:
void removeItem(QGraphicsItem *item, const QRectF &rect);
void removeItems(const QSet<QGraphicsItem *> &items);
- QList<QGraphicsItem *> items(const QRectF &rect);
- QList<QGraphicsItem *> items(const QPointF &pos);
+ QList<QGraphicsItem *> items(const QRectF &rect, bool onlyTopLevelItems = false) const;
int leafCount() const;
inline int firstChildIndex(int index) const
@@ -106,11 +105,7 @@ public:
private:
void initialize(const QRectF &rect, int depth, int index);
- void climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QPointF &pos, int index = 0);
- void climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index = 0);
-
- void findItems(QList<QGraphicsItem *> *foundItems, const QRectF &rect, int index);
- void findItems(QList<QGraphicsItem *> *foundItems, const QPointF &pos, int index);
+ void climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index = 0) const;
QRectF rectForIndex(int index) const;
QVector<Node> nodes;
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 3c3a811..9a91acc 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -59,7 +59,6 @@
#include "qgraphicssceneevent.h"
#include "qgraphicsview.h"
-#include "qgraphicsscene_bsp_p.h"
#include "qgraphicsitem_p.h"
#include <private/qobject_p.h>
@@ -72,13 +71,11 @@
#include <QtGui/qstyle.h>
#include <QtGui/qstyleoption.h>
-static const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT = 2000;
-
QT_BEGIN_NAMESPACE
+class QGraphicsSceneIndex;
class QGraphicsView;
class QGraphicsWidget;
-class QGesture;
class QGraphicsScenePrivate : public QObjectPrivate
{
@@ -87,24 +84,19 @@ public:
QGraphicsScenePrivate();
void init();
+ static QGraphicsScenePrivate *get(QGraphicsScene *q);
+
quint32 changedSignalMask;
QGraphicsScene::ItemIndexMethod indexMethod;
- int bspTreeDepth;
-
- QList<QGraphicsItem *> estimateItemsInRect(const QRectF &rect) const;
- void addToIndex(QGraphicsItem *item);
- void removeFromIndex(QGraphicsItem *item);
- void resetIndex();
+ QGraphicsSceneIndex *index;
- QGraphicsSceneBspTree bspTree;
- void _q_updateIndex();
int lastItemCount;
QRectF sceneRect;
bool hasSceneRect;
+ bool dirtyGrowingItemsBoundingRect;
QRectF growingItemsBoundingRect;
- QRectF largestUntransformableItem;
void _q_emitUpdated();
QList<QRectF> updatedRects;
@@ -115,9 +107,6 @@ public:
QPainterPath selectionArea;
int selectionChanging;
QSet<QGraphicsItem *> selectedItems;
- QList<QGraphicsItem *> unindexedItems;
- QList<QGraphicsItem *> indexedItems;
- QList<QGraphicsItem *> pendingUpdateItems;
QList<QGraphicsItem *> unpolishedItems;
QList<QGraphicsItem *> topLevelItems;
bool needSortTopLevelItems;
@@ -129,21 +118,11 @@ public:
void _q_processDirtyItems();
- QList<int> freeItemIndexes;
- bool regenerateIndex;
-
- bool purgePending;
void removeItemHelper(QGraphicsItem *item);
- QSet<QGraphicsItem *> removedItems;
- void purgeRemovedItems();
QBrush backgroundBrush;
QBrush foregroundBrush;
- int indexTimerId;
- bool restartIndexTimer;
- void startIndexTimer(int interval = QGRAPHICSSCENE_INDEXTIMER_TIMEOUT);
-
bool stickyFocus;
bool hasFocus;
QGraphicsItem *focusItem;
@@ -182,7 +161,6 @@ public:
QList<QGraphicsItem *> itemsAtPosition(const QPoint &screenPos,
const QPointF &scenePos,
QWidget *widget) const;
- static bool itemCollidesWithPath(QGraphicsItem *item, const QPainterPath &path, Qt::ItemSelectionMode mode);
void storeMouseButtonsForMouseGrabber(QGraphicsSceneMouseEvent *event);
QList<QGraphicsView *> views;
@@ -194,6 +172,7 @@ public:
QMultiMap<QGraphicsItem *, QGraphicsItem *> sceneEventFilters;
void installSceneEventFilter(QGraphicsItem *watched, QGraphicsItem *filter);
void removeSceneEventFilter(QGraphicsItem *watched, QGraphicsItem *filter);
+ bool filterDescendantEvent(QGraphicsItem *item, QEvent *event);
bool filterEvent(QGraphicsItem *item, QEvent *event);
bool sendEvent(QGraphicsItem *item, QEvent *event);
@@ -211,69 +190,14 @@ public:
void mousePressEventHandler(QGraphicsSceneMouseEvent *mouseEvent);
QGraphicsWidget *windowForItem(const QGraphicsItem *item) const;
- QList<QGraphicsItem *> topLevelItemsInStackingOrder(const QTransform *const, QRegion *);
- void recursive_items_helper(QGraphicsItem *item, QRectF rect, QList<QGraphicsItem *> *items,
- const QTransform &parentTransform, const QTransform &viewTransform,
- Qt::ItemSelectionMode mode, Qt::SortOrder order, qreal parentOpacity = 1.0) const;
-
- QList<QGraphicsItem *> items_helper(const QPointF &pos) const;
- QList<QGraphicsItem *> items_helper(const QRectF &rect,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const;
- QList<QGraphicsItem *> items_helper(const QPolygonF &rect,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const;
- QList<QGraphicsItem *> items_helper(const QPainterPath &rect,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const;
- void childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QPointF &pos) const;
- void childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QRectF &rect,
- Qt::ItemSelectionMode mode) const;
- void childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QPolygonF &polygon,
- Qt::ItemSelectionMode mode) const;
- void childItems_helper(QList<QGraphicsItem *> *items,
- const QGraphicsItem *parent,
- const QPainterPath &path,
- Qt::ItemSelectionMode mode) const;
-
- bool sortCacheEnabled;
- bool updatingSortCache;
- void invalidateSortCache();
- static void climbTree(QGraphicsItem *item, int *stackingOrder);
- void _q_updateSortCache();
-
- static bool closestItemFirst_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2);
- static bool closestItemLast_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2);
-
- static inline bool closestItemFirst_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
- {
- return item1->d_ptr->globalStackingOrder < item2->d_ptr->globalStackingOrder;
- }
- static inline bool closestItemLast_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
- {
- return item1->d_ptr->globalStackingOrder >= item2->d_ptr->globalStackingOrder;
- }
-
- static void sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order, bool cached);
+ bool sortCacheEnabled; // for compatibility
void drawItemHelper(QGraphicsItem *item, QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget,
bool painterStateProtection);
- inline void drawItems(QPainter *painter, const QTransform *const viewTransform,
- QRegion *exposedRegion, QWidget *widget)
- {
- const QList<QGraphicsItem *> tli = topLevelItemsInStackingOrder(viewTransform, exposedRegion);
- for (int i = 0; i < tli.size(); ++i)
- drawSubtreeRecursive(tli.at(i), painter, viewTransform, exposedRegion, widget);
- return;
- }
+ void drawItems(QPainter *painter, const QTransform *const viewTransform,
+ QRegion *exposedRegion, QWidget *widget);
void drawSubtreeRecursive(QGraphicsItem *item, QPainter *painter, const QTransform *const,
QRegion *exposedRegion, QWidget *widget, qreal parentOpacity = qreal(1.0));
@@ -283,18 +207,32 @@ public:
void processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren = false,
qreal parentOpacity = qreal(1.0));
- inline void resetDirtyItem(QGraphicsItem *item)
+ inline void resetDirtyItem(QGraphicsItem *item, bool recursive = false)
{
Q_ASSERT(item);
item->d_ptr->dirty = 0;
item->d_ptr->paintedViewBoundingRectsNeedRepaint = 0;
item->d_ptr->geometryChanged = 0;
+ if (!item->d_ptr->dirtyChildren)
+ recursive = false;
item->d_ptr->dirtyChildren = 0;
item->d_ptr->needsRepaint = QRectF();
item->d_ptr->allChildrenDirty = 0;
item->d_ptr->fullUpdatePending = 0;
item->d_ptr->ignoreVisible = 0;
item->d_ptr->ignoreOpacity = 0;
+ if (recursive) {
+ for (int i = 0; i < item->d_ptr->children.size(); ++i)
+ resetDirtyItem(item->d_ptr->children.at(i), recursive);
+ }
+ }
+
+ inline void ensureSortedTopLevelItems()
+ {
+ if (needSortTopLevelItems) {
+ qSort(topLevelItems.begin(), topLevelItems.end(), qt_notclosestLeaf);
+ needSortTopLevelItems = false;
+ }
}
QStyle *style;
@@ -309,13 +247,6 @@ public:
QStyleOptionGraphicsItem styleOptionTmp;
- // items with gestures -> list of started gestures.
- QMap<QGraphicsItem*, QSet<QGesture*> > itemsWithGestures;
- QSet<int> grabbedGestures;
- void grabGesture(QGraphicsItem *item, int gestureId);
- void releaseGesture(QGraphicsItem *item, int gestureId);
- void sendGestureEvent(const QSet<QGesture*> &gestures, const QSet<QString> &cancelled);
-
QMap<int, QTouchEvent::TouchPoint> sceneCurrentTouchPoints;
QMap<int, QGraphicsItem *> itemForTouchPointId;
static void updateTouchPointsForItem(QGraphicsItem *item, QTouchEvent *touchEvent);
@@ -324,8 +255,29 @@ public:
bool sendTouchBeginEvent(QGraphicsItem *item, QTouchEvent *touchEvent);
bool allItemsIgnoreTouchEvents;
void enableTouchEventsOnViews();
+
+ void updateInputMethodSensitivityInViews();
};
+// QRectF::intersects() returns false always if either the source or target
+// rectangle's width or height are 0. This works around that problem.
+static inline void _q_adjustRect(QRectF *rect)
+{
+ Q_ASSERT(rect);
+ if (!rect->width())
+ rect->adjust(-0.00001, 0, 0.00001, 0);
+ if (!rect->height())
+ rect->adjust(0, -0.00001, 0, 0.00001);
+}
+
+static inline QRectF adjustedItemBoundingRect(const QGraphicsItem *item)
+{
+ Q_ASSERT(item);
+ QRectF boundingRect(item->boundingRect());
+ _q_adjustRect(&boundingRect);
+ return boundingRect;
+}
+
QT_END_NAMESPACE
#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp
new file mode 100644
index 0000000..3cb33d1
--- /dev/null
+++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp
@@ -0,0 +1,785 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QGraphicsSceneBspTreeIndex
+ \brief The QGraphicsSceneBspTreeIndex class provides an implementation of
+ a BSP indexing algorithm for discovering items in QGraphicsScene.
+ \since 4.6
+ \ingroup multimedia
+ \ingroup graphicsview-api
+ \mainclass
+ \internal
+
+ QGraphicsSceneBspTreeIndex index use a BSP(Binary Space Partitioning)
+ implementation to discover items quickly. This implementation is
+ very efficient for static scene. It has a depth that you can set.
+ The depth directly affects performance and memory usage; the latter
+ growing exponentially with the depth of the tree. With an optimal tree
+ depth, the index can instantly determine the locality of items, even
+ for scenes with thousands or millions of items. This also greatly improves
+ rendering performance.
+
+ By default, the value is 0, in which case Qt will guess a reasonable
+ default depth based on the size, location and number of items in the
+ scene. If these parameters change frequently, however, you may experience
+ slowdowns as the index retunes the depth internally. You can avoid
+ potential slowdowns by fixating the tree depth through setting this
+ property.
+
+ The depth of the tree and the size of the scene rectangle decide the
+ granularity of the scene's partitioning. The size of each scene segment is
+ determined by the following algorithm:
+
+ The BSP tree has an optimal size when each segment contains between 0 and
+ 10 items.
+
+ \sa QGraphicsScene, QGraphicsView, QGraphicsSceneIndex
+*/
+
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_GRAPHICSVIEW
+
+#include <private/qgraphicsscene_p.h>
+#include <private/qgraphicsscenebsptreeindex_p.h>
+#include <private/qgraphicssceneindex_p.h>
+
+#include <QtCore/qmath.h>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+static inline int intmaxlog(int n)
+{
+ return (n > 0 ? qMax(qCeil(qLn(qreal(n)) / qLn(qreal(2))), 5) : 0);
+}
+
+/*!
+ Constructs a private scene bsp index.
+*/
+QGraphicsSceneBspTreeIndexPrivate::QGraphicsSceneBspTreeIndexPrivate(QGraphicsScene *scene)
+ : QGraphicsSceneIndexPrivate(scene),
+ bspTreeDepth(0),
+ indexTimerId(0),
+ restartIndexTimer(false),
+ regenerateIndex(true),
+ lastItemCount(0),
+ purgePending(false),
+ sortCacheEnabled(false),
+ updatingSortCache(false)
+{
+}
+
+
+/*!
+ This method will update the BSP index by removing the items from the temporary
+ unindexed list and add them in the indexedItems list. This will also
+ update the growingItemsBoundingRect if needed. This will update the BSP
+ implementation as well.
+
+ \internal
+*/
+void QGraphicsSceneBspTreeIndexPrivate::_q_updateIndex()
+{
+ Q_Q(QGraphicsSceneBspTreeIndex);
+ if (!indexTimerId)
+ return;
+
+ q->killTimer(indexTimerId);
+ indexTimerId = 0;
+
+ purgeRemovedItems();
+
+ // Add unindexedItems to indexedItems
+ for (int i = 0; i < unindexedItems.size(); ++i) {
+ if (QGraphicsItem *item = unindexedItems.at(i)) {
+ Q_ASSERT(!item->d_ptr->itemDiscovered);
+ if (!freeItemIndexes.isEmpty()) {
+ int freeIndex = freeItemIndexes.takeFirst();
+ item->d_func()->index = freeIndex;
+ indexedItems[freeIndex] = item;
+ } else {
+ item->d_func()->index = indexedItems.size();
+ indexedItems << item;
+ }
+ }
+ }
+
+ // Determine whether we should regenerate the BSP tree.
+ if (bspTreeDepth == 0) {
+ int oldDepth = intmaxlog(lastItemCount);
+ bspTreeDepth = intmaxlog(indexedItems.size());
+ static const int slack = 100;
+ if (bsp.leafCount() == 0 || (oldDepth != bspTreeDepth && qAbs(lastItemCount - indexedItems.size()) > slack)) {
+ // ### Crude algorithm.
+ regenerateIndex = true;
+ }
+ }
+
+ // Regenerate the tree.
+ if (regenerateIndex) {
+ regenerateIndex = false;
+ bsp.initialize(sceneRect, bspTreeDepth);
+ unindexedItems = indexedItems;
+ lastItemCount = indexedItems.size();
+ }
+
+ // Insert all unindexed items into the tree.
+ for (int i = 0; i < unindexedItems.size(); ++i) {
+ if (QGraphicsItem *item = unindexedItems.at(i)) {
+ if (item->d_ptr->itemIsUntransformable()) {
+ untransformableItems << item;
+ continue;
+ }
+ if (item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)
+ continue;
+
+ bsp.insertItem(item, item->sceneBoundingRect());
+ }
+ }
+ unindexedItems.clear();
+}
+
+
+/*!
+ \internal
+
+ Removes stale pointers from all data structures.
+*/
+void QGraphicsSceneBspTreeIndexPrivate::purgeRemovedItems()
+{
+ if (!purgePending && removedItems.isEmpty())
+ return;
+
+ // Remove stale items from the BSP tree.
+ bsp.removeItems(removedItems);
+ // Purge this list.
+ removedItems.clear();
+ freeItemIndexes.clear();
+ for (int i = 0; i < indexedItems.size(); ++i) {
+ if (!indexedItems.at(i))
+ freeItemIndexes << i;
+ }
+ purgePending = false;
+}
+
+/*!
+ \internal
+
+ Starts or restarts the timer used for reindexing unindexed items.
+*/
+void QGraphicsSceneBspTreeIndexPrivate::startIndexTimer(int interval)
+{
+ Q_Q(QGraphicsSceneBspTreeIndex);
+ if (indexTimerId) {
+ restartIndexTimer = true;
+ } else {
+ indexTimerId = q->startTimer(interval);
+ }
+}
+
+/*!
+ \internal
+*/
+void QGraphicsSceneBspTreeIndexPrivate::resetIndex()
+{
+ purgeRemovedItems();
+ for (int i = 0; i < indexedItems.size(); ++i) {
+ if (QGraphicsItem *item = indexedItems.at(i)) {
+ item->d_ptr->index = -1;
+ Q_ASSERT(!item->d_ptr->itemDiscovered);
+ unindexedItems << item;
+ }
+ }
+ indexedItems.clear();
+ freeItemIndexes.clear();
+ untransformableItems.clear();
+ regenerateIndex = true;
+ startIndexTimer();
+}
+
+/*!
+ \internal
+*/
+void QGraphicsSceneBspTreeIndexPrivate::climbTree(QGraphicsItem *item, int *stackingOrder)
+{
+ if (!item->d_ptr->children.isEmpty()) {
+ QList<QGraphicsItem *> childList = item->d_ptr->children;
+ qSort(childList.begin(), childList.end(), qt_closestLeaf);
+ for (int i = 0; i < childList.size(); ++i) {
+ QGraphicsItem *item = childList.at(i);
+ if (!(item->flags() & QGraphicsItem::ItemStacksBehindParent))
+ climbTree(childList.at(i), stackingOrder);
+ }
+ item->d_ptr->globalStackingOrder = (*stackingOrder)++;
+ for (int i = 0; i < childList.size(); ++i) {
+ QGraphicsItem *item = childList.at(i);
+ if (item->flags() & QGraphicsItem::ItemStacksBehindParent)
+ climbTree(childList.at(i), stackingOrder);
+ }
+ } else {
+ item->d_ptr->globalStackingOrder = (*stackingOrder)++;
+ }
+}
+
+/*!
+ \internal
+*/
+void QGraphicsSceneBspTreeIndexPrivate::_q_updateSortCache()
+{
+ Q_Q(QGraphicsSceneBspTreeIndex);
+ _q_updateIndex();
+
+ if (!sortCacheEnabled || !updatingSortCache)
+ return;
+
+ updatingSortCache = false;
+ int stackingOrder = 0;
+
+ QList<QGraphicsItem *> topLevels;
+ const QList<QGraphicsItem *> items = q->items();
+ for (int i = 0; i < items.size(); ++i) {
+ QGraphicsItem *item = items.at(i);
+ if (item && !item->d_ptr->parent)
+ topLevels << item;
+ }
+
+ qSort(topLevels.begin(), topLevels.end(), qt_closestLeaf);
+ for (int i = 0; i < topLevels.size(); ++i)
+ climbTree(topLevels.at(i), &stackingOrder);
+}
+
+/*!
+ \internal
+*/
+void QGraphicsSceneBspTreeIndexPrivate::invalidateSortCache()
+{
+ Q_Q(QGraphicsSceneBspTreeIndex);
+ if (!sortCacheEnabled || updatingSortCache)
+ return;
+
+ updatingSortCache = true;
+ QMetaObject::invokeMethod(q, "_q_updateSortCache", Qt::QueuedConnection);
+}
+
+void QGraphicsSceneBspTreeIndexPrivate::addItem(QGraphicsItem *item, bool recursive)
+{
+ if (!item)
+ return;
+
+ // Prevent reusing a recently deleted pointer: purge all removed item from our lists.
+ purgeRemovedItems();
+
+ // Invalidate any sort caching; arrival of a new item means we need to resort.
+ // Update the scene's sort cache settings.
+ item->d_ptr->globalStackingOrder = -1;
+ invalidateSortCache();
+
+ // Indexing requires sceneBoundingRect(), but because \a item might
+ // not be completely constructed at this point, we need to store it in
+ // a temporary list and schedule an indexing for later.
+ if (item->d_ptr->index == -1) {
+ Q_ASSERT(!unindexedItems.contains(item));
+ unindexedItems << item;
+ startIndexTimer(0);
+ } else {
+ Q_ASSERT(indexedItems.contains(item));
+ qWarning("QGraphicsSceneBspTreeIndex::addItem: item has already been added to this BSP");
+ }
+
+ if (recursive) {
+ for (int i = 0; i < item->d_ptr->children.size(); ++i)
+ addItem(item->d_ptr->children.at(i), recursive);
+ }
+}
+
+void QGraphicsSceneBspTreeIndexPrivate::removeItem(QGraphicsItem *item, bool recursive,
+ bool moveToUnindexedItems)
+{
+ if (!item)
+ return;
+
+ if (item->d_ptr->index != -1) {
+ Q_ASSERT(item->d_ptr->index < indexedItems.size());
+ Q_ASSERT(indexedItems.at(item->d_ptr->index) == item);
+ Q_ASSERT(!item->d_ptr->itemDiscovered);
+ freeItemIndexes << item->d_ptr->index;
+ indexedItems[item->d_ptr->index] = 0;
+ item->d_ptr->index = -1;
+
+ if (item->d_ptr->itemIsUntransformable()) {
+ untransformableItems.removeOne(item);
+ } else if (item->d_ptr->inDestructor) {
+ // Avoid virtual function calls from the destructor.
+ purgePending = true;
+ removedItems << item;
+ } else if (!(item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)) {
+ bsp.removeItem(item, item->sceneBoundingRect());
+ }
+ } else {
+ unindexedItems.removeOne(item);
+ }
+ invalidateSortCache(); // ### Only do this when removing from BSP?
+
+ Q_ASSERT(item->d_ptr->index == -1);
+ Q_ASSERT(!indexedItems.contains(item));
+ Q_ASSERT(!unindexedItems.contains(item));
+ Q_ASSERT(!untransformableItems.contains(item));
+
+ if (moveToUnindexedItems)
+ addItem(item);
+
+ if (recursive) {
+ for (int i = 0; i < item->d_ptr->children.size(); ++i)
+ removeItem(item->d_ptr->children.at(i), recursive, moveToUnindexedItems);
+ }
+}
+
+QList<QGraphicsItem *> QGraphicsSceneBspTreeIndexPrivate::estimateItems(const QRectF &rect, Qt::SortOrder order,
+ bool onlyTopLevelItems)
+{
+ Q_Q(QGraphicsSceneBspTreeIndex);
+ if (onlyTopLevelItems && rect.isNull())
+ return q->QGraphicsSceneIndex::estimateTopLevelItems(rect, order);
+
+ purgeRemovedItems();
+ _q_updateSortCache();
+ Q_ASSERT(unindexedItems.isEmpty());
+
+ QList<QGraphicsItem *> rectItems = bsp.items(rect, onlyTopLevelItems);
+ if (onlyTopLevelItems) {
+ for (int i = 0; i < untransformableItems.size(); ++i) {
+ QGraphicsItem *item = untransformableItems.at(i);
+ if (!item->d_ptr->parent) {
+ rectItems << item;
+ } else {
+ item = item->topLevelItem();
+ if (!rectItems.contains(item))
+ rectItems << item;
+ }
+ }
+ } else {
+ rectItems += untransformableItems;
+ }
+
+ sortItems(&rectItems, order, sortCacheEnabled, onlyTopLevelItems);
+ return rectItems;
+}
+
+/*!
+ Returns true if \a item1 is on top of \a item2.
+
+ \internal
+*/
+bool QGraphicsSceneBspTreeIndexPrivate::closestItemFirst_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
+{
+ // Siblings? Just check their z-values.
+ const QGraphicsItemPrivate *d1 = item1->d_ptr;
+ const QGraphicsItemPrivate *d2 = item2->d_ptr;
+ if (d1->parent == d2->parent)
+ return qt_closestLeaf(item1, item2);
+
+ // Find common ancestor, and each item's ancestor closest to the common
+ // ancestor.
+ int item1Depth = d1->depth;
+ int item2Depth = d2->depth;
+ const QGraphicsItem *p = item1;
+ const QGraphicsItem *t1 = item1;
+ while (item1Depth > item2Depth && (p = p->d_ptr->parent)) {
+ if (p == item2) {
+ // item2 is one of item1's ancestors; item1 is on top
+ return !(t1->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent);
+ }
+ t1 = p;
+ --item1Depth;
+ }
+ p = item2;
+ const QGraphicsItem *t2 = item2;
+ while (item2Depth > item1Depth && (p = p->d_ptr->parent)) {
+ if (p == item1) {
+ // item1 is one of item2's ancestors; item1 is not on top
+ return (t2->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent);
+ }
+ t2 = p;
+ --item2Depth;
+ }
+
+ // item1Ancestor is now at the same level as item2Ancestor, but not the same.
+ const QGraphicsItem *a1 = t1;
+ const QGraphicsItem *a2 = t2;
+ while (a1) {
+ const QGraphicsItem *p1 = a1;
+ const QGraphicsItem *p2 = a2;
+ a1 = a1->parentItem();
+ a2 = a2->parentItem();
+ if (a1 && a1 == a2)
+ return qt_closestLeaf(p1, p2);
+ }
+
+ // No common ancestor? Then just compare the items' toplevels directly.
+ return qt_closestLeaf(t1->topLevelItem(), t2->topLevelItem());
+}
+
+/*!
+ Returns true if \a item2 is on top of \a item1.
+
+ \internal
+*/
+bool QGraphicsSceneBspTreeIndexPrivate::closestItemLast_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
+{
+ return closestItemFirst_withoutCache(item2, item1);
+}
+
+/*!
+ Sort a list of \a itemList in a specific \a order and use the cache if requested.
+
+ \internal
+*/
+void QGraphicsSceneBspTreeIndexPrivate::sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order,
+ bool sortCacheEnabled, bool onlyTopLevelItems)
+{
+ if (order == Qt::SortOrder(-1))
+ return;
+
+ if (onlyTopLevelItems) {
+ if (order == Qt::AscendingOrder)
+ qSort(itemList->begin(), itemList->end(), qt_closestLeaf);
+ else if (order == Qt::DescendingOrder)
+ qSort(itemList->begin(), itemList->end(), qt_notclosestLeaf);
+ return;
+ }
+
+ if (sortCacheEnabled) {
+ if (order == Qt::AscendingOrder) {
+ qSort(itemList->begin(), itemList->end(), closestItemFirst_withCache);
+ } else if (order == Qt::DescendingOrder) {
+ qSort(itemList->begin(), itemList->end(), closestItemLast_withCache);
+ }
+ } else {
+ if (order == Qt::AscendingOrder) {
+ qSort(itemList->begin(), itemList->end(), closestItemFirst_withoutCache);
+ } else if (order == Qt::DescendingOrder) {
+ qSort(itemList->begin(), itemList->end(), closestItemLast_withoutCache);
+ }
+ }
+}
+
+/*!
+ Constructs a BSP scene index for the given \a scene.
+*/
+QGraphicsSceneBspTreeIndex::QGraphicsSceneBspTreeIndex(QGraphicsScene *scene)
+ : QGraphicsSceneIndex(*new QGraphicsSceneBspTreeIndexPrivate(scene), scene)
+{
+
+}
+
+QGraphicsSceneBspTreeIndex::~QGraphicsSceneBspTreeIndex()
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ for (int i = 0; i < d->indexedItems.size(); ++i) {
+ // Ensure item bits are reset properly.
+ if (QGraphicsItem *item = d->indexedItems.at(i)) {
+ Q_ASSERT(!item->d_ptr->itemDiscovered);
+ item->d_ptr->index = -1;
+ }
+ }
+}
+
+/*!
+ \reimp
+ Clear the all the BSP index.
+*/
+void QGraphicsSceneBspTreeIndex::clear()
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ d->bsp.clear();
+ d->lastItemCount = 0;
+ d->freeItemIndexes.clear();
+ for (int i = 0; i < d->indexedItems.size(); ++i) {
+ // Ensure item bits are reset properly.
+ if (QGraphicsItem *item = d->indexedItems.at(i)) {
+ Q_ASSERT(!item->d_ptr->itemDiscovered);
+ item->d_ptr->index = -1;
+ }
+ }
+ d->indexedItems.clear();
+ d->unindexedItems.clear();
+ d->untransformableItems.clear();
+ d->regenerateIndex = true;
+}
+
+/*!
+ Add the \a item into the BSP index.
+*/
+void QGraphicsSceneBspTreeIndex::addItem(QGraphicsItem *item)
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ d->addItem(item);
+}
+
+/*!
+ Remove the \a item from the BSP index.
+*/
+void QGraphicsSceneBspTreeIndex::removeItem(QGraphicsItem *item)
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ d->removeItem(item);
+}
+
+/*!
+ \reimp
+ Update the BSP when the \a item 's bounding rect has changed.
+*/
+void QGraphicsSceneBspTreeIndex::prepareBoundingRectChange(const QGraphicsItem *item)
+{
+ if (!item)
+ return;
+
+ if (item->d_ptr->index == -1 || item->d_ptr->itemIsUntransformable()
+ || (item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)) {
+ return; // Item is not in BSP tree; nothing to do.
+ }
+
+ Q_D(QGraphicsSceneBspTreeIndex);
+ QGraphicsItem *thatItem = const_cast<QGraphicsItem *>(item);
+ d->removeItem(thatItem, /*recursive=*/false, /*moveToUnindexedItems=*/true);
+ for (int i = 0; i < item->d_ptr->children.size(); ++i) // ### Do we really need this?
+ prepareBoundingRectChange(item->d_ptr->children.at(i));
+}
+
+/*!
+ Returns an estimation visible items that are either inside or
+ intersect with the specified \a rect and return a list sorted using \a order.
+
+ \a deviceTransform is the transformation apply to the view.
+
+*/
+QList<QGraphicsItem *> QGraphicsSceneBspTreeIndex::estimateItems(const QRectF &rect, Qt::SortOrder order) const
+{
+ Q_D(const QGraphicsSceneBspTreeIndex);
+ return const_cast<QGraphicsSceneBspTreeIndexPrivate*>(d)->estimateItems(rect, order);
+}
+
+QList<QGraphicsItem *> QGraphicsSceneBspTreeIndex::estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const
+{
+ Q_D(const QGraphicsSceneBspTreeIndex);
+ return const_cast<QGraphicsSceneBspTreeIndexPrivate*>(d)->estimateItems(rect, order, /*onlyTopLevels=*/true);
+}
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneBspTreeIndex::items(Qt::SortOrder order = Qt::AscendingOrder) const;
+
+ Return all items in the BSP index and sort them using \a order.
+*/
+QList<QGraphicsItem *> QGraphicsSceneBspTreeIndex::items(Qt::SortOrder order) const
+{
+ Q_D(const QGraphicsSceneBspTreeIndex);
+ const_cast<QGraphicsSceneBspTreeIndexPrivate*>(d)->purgeRemovedItems();
+ QList<QGraphicsItem *> itemList;
+
+ // If freeItemIndexes is empty, we know there are no holes in indexedItems and
+ // unindexedItems.
+ if (d->freeItemIndexes.isEmpty()) {
+ if (d->unindexedItems.isEmpty()) {
+ itemList = d->indexedItems;
+ } else {
+ itemList = d->indexedItems + d->unindexedItems;
+ }
+ } else {
+ // Rebuild the list of items to avoid holes. ### We could also just
+ // compress the item lists at this point.
+ foreach (QGraphicsItem *item, d->indexedItems + d->unindexedItems) {
+ if (item)
+ itemList << item;
+ }
+ }
+ if (order != -1) {
+ //We sort descending order
+ d->sortItems(&itemList, order, d->sortCacheEnabled);
+ }
+ return itemList;
+}
+
+/*!
+ \property QGraphicsSceneBspTreeIndex::bspTreeDepth
+ \brief the depth of the BSP index tree
+ \since 4.6
+
+ This value determines the depth of BSP tree. The depth
+ directly affects performance and memory usage; the latter
+ growing exponentially with the depth of the tree. With an optimal tree
+ depth, the index can instantly determine the locality of items, even
+ for scenes with thousands or millions of items. This also greatly improves
+ rendering performance.
+
+ By default, the value is 0, in which case Qt will guess a reasonable
+ default depth based on the size, location and number of items in the
+ scene. If these parameters change frequently, however, you may experience
+ slowdowns as the index retunes the depth internally. You can avoid
+ potential slowdowns by fixating the tree depth through setting this
+ property.
+
+ The depth of the tree and the size of the scene rectangle decide the
+ granularity of the scene's partitioning. The size of each scene segment is
+ determined by the following algorithm:
+
+ The BSP tree has an optimal size when each segment contains between 0 and
+ 10 items.
+
+*/
+int QGraphicsSceneBspTreeIndex::bspTreeDepth()
+{
+ Q_D(const QGraphicsSceneBspTreeIndex);
+ return d->bspTreeDepth;
+}
+
+void QGraphicsSceneBspTreeIndex::setBspTreeDepth(int depth)
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ if (d->bspTreeDepth == depth)
+ return;
+ d->bspTreeDepth = depth;
+ d->resetIndex();
+}
+
+/*!
+ \reimp
+
+ This method react to the \a rect change of the scene and
+ reset the BSP tree index.
+*/
+void QGraphicsSceneBspTreeIndex::updateSceneRect(const QRectF &rect)
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ d->sceneRect = rect;
+ d->resetIndex();
+}
+
+/*!
+ \reimp
+
+ This method react to the \a change of the \a item and use the \a value to
+ update the BSP tree if necessary.
+
+*/
+void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value)
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ switch (change) {
+ case QGraphicsItem::ItemFlagsChange: {
+ // Handle ItemIgnoresTransformations
+ bool ignoredTransform = item->d_ptr->flags & QGraphicsItem::ItemIgnoresTransformations;
+ bool willIgnoreTransform = value.toUInt() & QGraphicsItem::ItemIgnoresTransformations;
+ bool clipsChildren = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape;
+ bool willClipChildren = value.toUInt() & QGraphicsItem::ItemClipsChildrenToShape;
+ if ((ignoredTransform != willIgnoreTransform) || (clipsChildren != willClipChildren)) {
+ QGraphicsItem *thatItem = const_cast<QGraphicsItem *>(item);
+ // Remove item and its descendants from the index and append
+ // them to the list of unindexed items. Then, when the index
+ // is updated, they will be put into the bsp-tree or the list
+ // of untransformable items.
+ d->removeItem(thatItem, /*recursive=*/true, /*moveToUnidexedItems=*/true);
+ }
+ break;
+ }
+ case QGraphicsItem::ItemZValueChange:
+ d->invalidateSortCache();
+ break;
+ case QGraphicsItem::ItemParentChange: {
+ d->invalidateSortCache();
+ // Handle ItemIgnoresTransformations
+ QGraphicsItem *newParent = qVariantValue<QGraphicsItem *>(value);
+ bool ignoredTransform = item->d_ptr->itemIsUntransformable();
+ bool willIgnoreTransform = (item->d_ptr->flags & QGraphicsItem::ItemIgnoresTransformations)
+ || (newParent && newParent->d_ptr->itemIsUntransformable());
+ bool ancestorClippedChildren = item->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren;
+ bool ancestorWillClipChildren = newParent
+ && ((newParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)
+ || (newParent->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren));
+ if ((ignoredTransform != willIgnoreTransform) || (ancestorClippedChildren != ancestorWillClipChildren)) {
+ QGraphicsItem *thatItem = const_cast<QGraphicsItem *>(item);
+ // Remove item and its descendants from the index and append
+ // them to the list of unindexed items. Then, when the index
+ // is updated, they will be put into the bsp-tree or the list
+ // of untransformable items.
+ d->removeItem(thatItem, /*recursive=*/true, /*moveToUnidexedItems=*/true);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return QGraphicsSceneIndex::itemChange(item, change, value);
+}
+/*!
+ \reimp
+
+ Used to catch the timer event.
+
+ \internal
+*/
+bool QGraphicsSceneBspTreeIndex::event(QEvent *event)
+{
+ Q_D(QGraphicsSceneBspTreeIndex);
+ switch (event->type()) {
+ case QEvent::Timer:
+ if (d->indexTimerId && static_cast<QTimerEvent *>(event)->timerId() == d->indexTimerId) {
+ if (d->restartIndexTimer) {
+ d->restartIndexTimer = false;
+ } else {
+ // this call will kill the timer
+ d->_q_updateIndex();
+ }
+ }
+ // Fallthrough intended - support timers in subclasses.
+ default:
+ return QObject::event(event);
+ }
+ return true;
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qgraphicsscenebsptreeindex_p.cpp"
+
+#endif // QT_NO_GRAPHICSVIEW
+
diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
new file mode 100644
index 0000000..2293a8e
--- /dev/null
+++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -0,0 +1,208 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
+// file may change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#ifndef QGRAPHICSBSPTREEINDEX_H
+#define QGRAPHICSBSPTREEINDEX_H
+
+#include <QtCore/qglobal.h>
+
+#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
+
+#include "qgraphicssceneindex_p.h"
+#include "qgraphicsitem_p.h"
+#include "qgraphicsscene_bsp_p.h"
+
+#include <QtCore/qrect.h>
+#include <QtCore/qlist.h>
+
+QT_BEGIN_NAMESPACE
+
+static const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT = 2000;
+
+class QGraphicsScene;
+class QGraphicsSceneBspTreeIndexPrivate;
+
+class Q_AUTOTEST_EXPORT QGraphicsSceneBspTreeIndex : public QGraphicsSceneIndex
+{
+ Q_OBJECT
+ Q_PROPERTY(int bspTreeDepth READ bspTreeDepth WRITE setBspTreeDepth)
+public:
+ QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = 0);
+ ~QGraphicsSceneBspTreeIndex();
+
+ QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const;
+ QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const;
+ QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::AscendingOrder) const;
+
+ int bspTreeDepth();
+ void setBspTreeDepth(int depth);
+
+protected Q_SLOTS:
+ void updateSceneRect(const QRectF &rect);
+
+protected:
+ bool event(QEvent *event);
+ void clear();
+
+ void addItem(QGraphicsItem *item);
+ void removeItem(QGraphicsItem *item);
+ void prepareBoundingRectChange(const QGraphicsItem *item);
+
+ void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value);
+
+private :
+ Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex)
+ Q_DISABLE_COPY(QGraphicsSceneBspTreeIndex)
+ Q_PRIVATE_SLOT(d_func(), void _q_updateSortCache())
+ Q_PRIVATE_SLOT(d_func(), void _q_updateIndex())
+
+ friend class QGraphicsScene;
+ friend class QGraphicsScenePrivate;
+};
+
+class QGraphicsSceneBspTreeIndexPrivate : public QGraphicsSceneIndexPrivate
+{
+ Q_DECLARE_PUBLIC(QGraphicsSceneBspTreeIndex)
+public:
+ QGraphicsSceneBspTreeIndexPrivate(QGraphicsScene *scene);
+
+ QGraphicsSceneBspTree bsp;
+ QRectF sceneRect;
+ int bspTreeDepth;
+ int indexTimerId;
+ bool restartIndexTimer;
+ bool regenerateIndex;
+ int lastItemCount;
+
+ QList<QGraphicsItem *> indexedItems;
+ QList<QGraphicsItem *> unindexedItems;
+ QList<QGraphicsItem *> untransformableItems;
+ QList<int> freeItemIndexes;
+
+ bool purgePending;
+ QSet<QGraphicsItem *> removedItems;
+ void purgeRemovedItems();
+
+ void _q_updateIndex();
+ void startIndexTimer(int interval = QGRAPHICSSCENE_INDEXTIMER_TIMEOUT);
+ void resetIndex();
+
+ void _q_updateSortCache();
+ bool sortCacheEnabled;
+ bool updatingSortCache;
+ void invalidateSortCache();
+ void addItem(QGraphicsItem *item, bool recursive = false);
+ void removeItem(QGraphicsItem *item, bool recursive = false, bool moveToUnindexedItems = false);
+ QList<QGraphicsItem *> estimateItems(const QRectF &, Qt::SortOrder, bool b = false);
+
+ static void climbTree(QGraphicsItem *item, int *stackingOrder);
+ static bool closestItemFirst_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2);
+ static bool closestItemLast_withoutCache(const QGraphicsItem *item1, const QGraphicsItem *item2);
+
+ static inline bool closestItemFirst_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
+ {
+ return item1->d_ptr->globalStackingOrder < item2->d_ptr->globalStackingOrder;
+ }
+ static inline bool closestItemLast_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
+ {
+ return item1->d_ptr->globalStackingOrder >= item2->d_ptr->globalStackingOrder;
+ }
+
+ static void sortItems(QList<QGraphicsItem *> *itemList, Qt::SortOrder order,
+ bool cached, bool onlyTopLevelItems = false);
+};
+
+static inline bool QRectF_intersects(const QRectF &s, const QRectF &r)
+{
+ qreal xp = s.left();
+ qreal yp = s.top();
+ qreal w = s.width();
+ qreal h = s.height();
+ qreal l1 = xp;
+ qreal r1 = xp;
+ if (w < 0)
+ l1 += w;
+ else
+ r1 += w;
+
+ qreal l2 = r.left();
+ qreal r2 = r.left();
+ if (w < 0)
+ l2 += r.width();
+ else
+ r2 += r.width();
+
+ if (l1 >= r2 || l2 >= r1)
+ return false;
+
+ qreal t1 = yp;
+ qreal b1 = yp;
+ if (h < 0)
+ t1 += h;
+ else
+ b1 += h;
+
+ qreal t2 = r.top();
+ qreal b2 = r.top();
+ if (r.height() < 0)
+ t2 += r.height();
+ else
+ b2 += r.height();
+
+ return !(t1 >= b2 || t2 >= b1);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_GRAPHICSVIEW
+
+#endif // QGRAPHICSBSPTREEINDEX_H
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index 7906fb8..53019f2 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -275,8 +275,6 @@
QT_BEGIN_NAMESPACE
-QString qt_getStandardGestureTypeName(Qt::GestureType type);
-
class QGraphicsSceneEventPrivate
{
public:
@@ -1679,249 +1677,6 @@ void QGraphicsSceneMoveEvent::setNewPos(const QPointF &pos)
d->newPos = pos;
}
-/*!
- \class QGraphicsSceneGestureEvent
- \brief The QGraphicsSceneGestureEvent class provides gesture events for
- the graphics view framework.
- \since 4.6
- \ingroup multimedia
- \ingroup graphicsview-api
-
- QGraphicsSceneGestureEvent extends information provided by
- QGestureEvent by adding some convenience functions like
- \l{QGraphicsSceneEvent::}{widget()} to get a widget that received
- original gesture event, and convenience functions mapToScene(),
- mapToItem() for converting positions of the gesture into
- QGraphicsScene and QGraphicsItem coordinate system respectively.
-
- The scene sends the event to the first QGraphicsItem under the
- mouse cursor that accepts gestures; a graphics item is set to accept
- gestures with \l{QGraphicsItem::}{grabGesture()}.
-
- \sa QGestureEvent
-*/
-
-/*!
- Constructs a QGraphicsSceneGestureEvent.
-*/
-QGraphicsSceneGestureEvent::QGraphicsSceneGestureEvent()
- : QGraphicsSceneEvent(QEvent::GraphicsSceneGesture)
-{
- setAccepted(false);
-}
-
-/*!
- Destroys a QGraphicsSceneGestureEvent.
-*/
-QGraphicsSceneGestureEvent::~QGraphicsSceneGestureEvent()
-{
-}
-
-/*!
- Returns true if the gesture event contains gesture of specific \a
- type; returns false otherwise.
-*/
-bool QGraphicsSceneGestureEvent::contains(const QString &type) const
-{
- return gesture(type) != 0;
-}
-
-/*!
- Returns true if the gesture event contains gesture of specific \a
- type; returns false otherwise.
-*/
-bool QGraphicsSceneGestureEvent::contains(Qt::GestureType type) const
-{
- return contains(qt_getStandardGestureTypeName(type));
-}
-
-/*!
- Returns a list of gesture names that this event contains.
-*/
-QList<QString> QGraphicsSceneGestureEvent::gestureTypes() const
-{
- return m_gestures.keys();
-}
-
-/*!
- Returns extended information about a gesture of specific \a type.
-*/
-const QGesture* QGraphicsSceneGestureEvent::gesture(const QString &type) const
-{
- return m_gestures.value(type, 0);
-}
-
-/*!
- Returns extended information about a gesture of specific \a type.
-*/
-const QGesture* QGraphicsSceneGestureEvent::gesture(Qt::GestureType type) const
-{
- return gesture(qt_getStandardGestureTypeName(type));
-}
-
-/*!
- Returns extended information about all gestures in the event.
-*/
-QList<QGesture*> QGraphicsSceneGestureEvent::gestures() const
-{
- return m_gestures.values();
-}
-
-/*!
- Returns a set of gesture names that used to be executed, but were
- cancelled (i.e. they were not finished properly).
-*/
-QSet<QString> QGraphicsSceneGestureEvent::cancelledGestures() const
-{
- return m_cancelledGestures;
-}
-
-/*!
- Sets a list of gesture names \a cancelledGestures that used to be
- executed, but were cancelled (i.e. they were not finished
- properly).
-*/
-void QGraphicsSceneGestureEvent::setCancelledGestures(const QSet<QString> &cancelledGestures)
-{
- m_cancelledGestures = cancelledGestures;
-}
-
-/*!
- Maps the point \a point, which is in a view coordinate system, to
- scene coordinate system, and returns the mapped coordinate.
-
- A \a point is in coordinate system of the widget that received
- gesture event.
-
- \sa mapToItem(), {The Graphics View Coordinate System}
-*/
-QPointF QGraphicsSceneGestureEvent::mapToScene(const QPoint &point) const
-{
- if (QGraphicsView *view = qobject_cast<QGraphicsView*>(widget()))
- return view->mapToScene(point);
- return QPointF();
-}
-
-/*!
- Maps the rectangular \a rect, which is in a view coordinate system, to
- scene coordinate system, and returns the mapped coordinate.
-
- A \a rect is in coordinate system of the widget that received
- gesture event.
-
- \sa mapToItem(), {The Graphics View Coordinate System}
-*/
-QPolygonF QGraphicsSceneGestureEvent::mapToScene(const QRect &rect) const
-{
- if (QGraphicsView *view = qobject_cast<QGraphicsView*>(widget()))
- return view->mapToScene(rect);
- return QPolygonF();
-}
-
-/*!
- Maps the point \a point, which is in a view coordinate system, to
- item's \a item coordinate system, and returns the mapped coordinate.
-
- If \a item is 0, this function returns the same as mapToScene().
-
- \sa mapToScene(), {The Graphics View Coordinate System}
-*/
-QPointF QGraphicsSceneGestureEvent::mapToItem(const QPoint &point, QGraphicsItem *item) const
-{
- if (item) {
- if (QGraphicsView *view = qobject_cast<QGraphicsView*>(widget()))
- return item->mapFromScene(view->mapToScene(point));
- } else {
- return mapToScene(point);
- }
- return QPointF();
-}
-
-/*!
- Maps the rectangualar \a rect, which is in a view coordinate system, to
- item's \a item coordinate system, and returns the mapped coordinate.
-
- If \a item is 0, this function returns the same as mapToScene().
-
- \sa mapToScene(), {The Graphics View Coordinate System}
-*/
-QPolygonF QGraphicsSceneGestureEvent::mapToItem(const QRect &rect, QGraphicsItem *item) const
-{
- if (item) {
- if (QGraphicsView *view = qobject_cast<QGraphicsView*>(widget()))
- return item->mapFromScene(view->mapToScene(rect));
- } else {
- return mapToScene(rect);
- }
- return QPolygonF();
-}
-
-/*!
- Set a list of gesture objects containing extended information about \a gestures.
-*/
-void QGraphicsSceneGestureEvent::setGestures(const QList<QGesture*> &gestures)
-{
- foreach(QGesture *g, gestures)
- m_gestures.insert(g->type(), g);
-}
-
-/*!
- Set a list of gesture objects containing extended information about \a gestures.
-*/
-void QGraphicsSceneGestureEvent::setGestures(const QSet<QGesture*> &gestures)
-{
- foreach(QGesture *g, gestures)
- m_gestures.insert(g->type(), g);
-}
-
-/*!
- Sets the accept flag of the all gestures inside the event object,
- the equivalent of calling \l{QEvent::accept()}{accept()} or
- \l{QEvent::setAccepted()}{setAccepted(true)}.
-
- Setting the accept parameter indicates that the event receiver
- wants the gesture. Unwanted gestures might be propagated to the parent
- widget.
-*/
-void QGraphicsSceneGestureEvent::acceptAll()
-{
- QHash<QString, QGesture*>::iterator it = m_gestures.begin(),
- e = m_gestures.end();
- for(; it != e; ++it)
- it.value()->accept();
- setAccepted(true);
-}
-
-/*!
- Sets the accept flag of the specified gesture inside the event
- object, the equivalent of calling
- \l{QGestureEvent::gesture()}{gesture(type)}->\l{QGesture::accept()}{accept()}
-
- Setting the accept parameter indicates that the event receiver
- wants the gesture. Unwanted gestures might be propagated to the parent
- widget.
-*/
-void QGraphicsSceneGestureEvent::accept(Qt::GestureType type)
-{
- if (QGesture *g = m_gestures.value(qt_getStandardGestureTypeName(type), 0))
- g->accept();
-}
-
-/*!
- Sets the accept flag of the specified gesture inside the event
- object, the equivalent of calling
- \l{QGestureEvent::gesture()}{gesture(type)}->\l{QGesture::accept()}{accept()}
-
- Setting the accept parameter indicates that the event receiver
- wants the gesture. Unwanted gestures might be propagated to the parent
- widget.
-*/
-void QGraphicsSceneGestureEvent::accept(const QString &type)
-{
- if (QGesture *g = m_gestures.value(type, 0))
- g->accept();
-}
-
QT_END_NAMESPACE
#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicssceneevent.h b/src/gui/graphicsview/qgraphicssceneevent.h
index 8a30bb8..b38e757 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.h
+++ b/src/gui/graphicsview/qgraphicssceneevent.h
@@ -306,49 +306,6 @@ public:
void setNewPos(const QPointF &pos);
};
-class QGesture;
-class QGraphicsItem;
-class QGraphicsSceneGestureEventPrivate;
-class Q_GUI_EXPORT QGraphicsSceneGestureEvent : public QGraphicsSceneEvent
-{
- Q_DECLARE_PRIVATE(QGraphicsSceneGestureEvent)
-public:
- QGraphicsSceneGestureEvent();
- ~QGraphicsSceneGestureEvent();
-
- bool contains(const QString &type) const;
- bool contains(Qt::GestureType type) const;
-
- QList<QString> gestureTypes() const;
-
- const QGesture* gesture(Qt::GestureType type) const;
- const QGesture* gesture(const QString &type) const;
- QList<QGesture*> gestures() const;
- void setGestures(const QList<QGesture*> &gestures);
- void setGestures(const QSet<QGesture*> &gestures);
-
- QSet<QString> cancelledGestures() const;
- void setCancelledGestures(const QSet<QString> &cancelledGestures);
-
- void acceptAll();
-#ifndef Q_NO_USING_KEYWORD
- using QEvent::accept;
-#else
- inline void accept() { QEvent::accept(); }
-#endif
- void accept(Qt::GestureType type);
- void accept(const QString &type);
-
- QPointF mapToScene(const QPoint &point) const;
- QPolygonF mapToScene(const QRect &rect) const;
- QPointF mapToItem(const QPoint &point, QGraphicsItem *item) const;
- QPolygonF mapToItem(const QRect &rect, QGraphicsItem *item) const;
-
-protected:
- QHash<QString, QGesture*> m_gestures;
- QSet<QString> m_cancelledGestures;
-};
-
#endif // QT_NO_GRAPHICSVIEW
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp
new file mode 100644
index 0000000..ab5ca85
--- /dev/null
+++ b/src/gui/graphicsview/qgraphicssceneindex.cpp
@@ -0,0 +1,648 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+ \class QGraphicsSceneIndex
+ \brief The QGraphicsSceneIndex class provides a base class to implement
+ a custom indexing algorithm for discovering items in QGraphicsScene.
+ \since 4.6
+ \ingroup multimedia
+ \ingroup graphicsview-api
+ \mainclass
+ \internal
+
+ The QGraphicsSceneIndex class provides a base class to implement
+ a custom indexing algorithm for discovering items in QGraphicsScene. You
+ need to subclass it and reimplement addItem, removeItem, estimateItems
+ and items in order to have an functional indexing.
+
+ \sa QGraphicsScene, QGraphicsView
+*/
+
+#include "qdebug.h"
+#include "qgraphicsscene.h"
+#include "qgraphicsitem_p.h"
+#include "qgraphicsscene_p.h"
+#include "qgraphicswidget.h"
+#include "qgraphicssceneindex_p.h"
+#include "qgraphicsscenebsptreeindex_p.h"
+
+#ifndef QT_NO_GRAPHICSVIEW
+
+QT_BEGIN_NAMESPACE
+
+class QGraphicsSceneIndexRectIntersector : public QGraphicsSceneIndexIntersector
+{
+public:
+ bool intersect(const QGraphicsItem *item, const QRectF &exposeRect, Qt::ItemSelectionMode mode,
+ const QTransform &deviceTransform) const
+ {
+ QRectF brect = item->boundingRect();
+ _q_adjustRect(&brect);
+
+ // ### Add test for this (without making things slower?)
+ Q_UNUSED(exposeRect);
+
+ bool keep = true;
+ const QGraphicsItemPrivate *itemd = QGraphicsItemPrivate::get(item);
+ if (itemd->itemIsUntransformable()) {
+ // Untransformable items; map the scene rect to item coordinates.
+ const QTransform transform = item->deviceTransform(deviceTransform);
+ QRectF itemRect = (deviceTransform * transform.inverted()).mapRect(sceneRect);
+ if (mode == Qt::ContainsItemShape || mode == Qt::ContainsItemBoundingRect)
+ keep = itemRect.contains(brect) && itemRect != brect;
+ else
+ keep = itemRect.intersects(brect);
+ if (keep && (mode == Qt::ContainsItemShape || mode == Qt::IntersectsItemShape)) {
+ QPainterPath itemPath;
+ itemPath.addRect(itemRect);
+ keep = QGraphicsSceneIndexPrivate::itemCollidesWithPath(item, itemPath, mode);
+ }
+ } else {
+ Q_ASSERT(!itemd->dirtySceneTransform);
+ const QRectF itemSceneBoundingRect = itemd->sceneTransformTranslateOnly
+ ? brect.translated(itemd->sceneTransform.dx(),
+ itemd->sceneTransform.dy())
+ : itemd->sceneTransform.mapRect(brect);
+ if (mode == Qt::ContainsItemShape || mode == Qt::ContainsItemBoundingRect)
+ keep = sceneRect != brect && sceneRect.contains(itemSceneBoundingRect);
+ else
+ keep = sceneRect.intersects(itemSceneBoundingRect);
+ if (keep && (mode == Qt::ContainsItemShape || mode == Qt::IntersectsItemShape)) {
+ QPainterPath rectPath;
+ rectPath.addRect(sceneRect);
+ if (itemd->sceneTransformTranslateOnly)
+ rectPath.translate(-itemd->sceneTransform.dx(), -itemd->sceneTransform.dy());
+ else
+ rectPath = itemd->sceneTransform.inverted().map(rectPath);
+ keep = QGraphicsSceneIndexPrivate::itemCollidesWithPath(item, rectPath, mode);
+ }
+ }
+ return keep;
+ }
+
+ QRectF sceneRect;
+};
+
+class QGraphicsSceneIndexPointIntersector : public QGraphicsSceneIndexIntersector
+{
+public:
+ bool intersect(const QGraphicsItem *item, const QRectF &exposeRect, Qt::ItemSelectionMode mode,
+ const QTransform &deviceTransform) const
+ {
+ QRectF brect = item->boundingRect();
+ _q_adjustRect(&brect);
+
+ // ### Add test for this (without making things slower?)
+ Q_UNUSED(exposeRect);
+
+ bool keep = false;
+ const QGraphicsItemPrivate *itemd = QGraphicsItemPrivate::get(item);
+ if (itemd->itemIsUntransformable()) {
+ // Untransformable items; map the scene point to item coordinates.
+ const QTransform transform = item->deviceTransform(deviceTransform);
+ QPointF itemPoint = (deviceTransform * transform.inverted()).map(scenePoint);
+ keep = brect.contains(itemPoint);
+ if (keep && (mode == Qt::ContainsItemShape || mode == Qt::IntersectsItemShape)) {
+ QPainterPath pointPath;
+ pointPath.addRect(QRectF(itemPoint, QSizeF(1, 1)));
+ keep = QGraphicsSceneIndexPrivate::itemCollidesWithPath(item, pointPath, mode);
+ }
+ } else {
+ Q_ASSERT(!itemd->dirtySceneTransform);
+ QRectF sceneBoundingRect = itemd->sceneTransformTranslateOnly
+ ? brect.translated(itemd->sceneTransform.dx(),
+ itemd->sceneTransform.dy())
+ : itemd->sceneTransform.mapRect(brect);
+ keep = sceneBoundingRect.intersects(QRectF(scenePoint, QSizeF(1, 1)));
+ if (keep) {
+ QPointF p = itemd->sceneTransformTranslateOnly
+ ? QPointF(scenePoint.x() - itemd->sceneTransform.dx(),
+ scenePoint.y() - itemd->sceneTransform.dy())
+ : itemd->sceneTransform.inverted().map(scenePoint);
+ keep = item->contains(p);
+ }
+ }
+
+ return keep;
+ }
+
+ QPointF scenePoint;
+};
+
+class QGraphicsSceneIndexPathIntersector : public QGraphicsSceneIndexIntersector
+{
+public:
+ bool intersect(const QGraphicsItem *item, const QRectF &exposeRect, Qt::ItemSelectionMode mode,
+ const QTransform &deviceTransform) const
+ {
+ QRectF brect = item->boundingRect();
+ _q_adjustRect(&brect);
+
+ // ### Add test for this (without making things slower?)
+ Q_UNUSED(exposeRect);
+
+ bool keep = true;
+ const QGraphicsItemPrivate *itemd = QGraphicsItemPrivate::get(item);
+ if (itemd->itemIsUntransformable()) {
+ // Untransformable items; map the scene rect to item coordinates.
+ const QTransform transform = item->deviceTransform(deviceTransform);
+ QPainterPath itemPath = (deviceTransform * transform.inverted()).map(scenePath);
+ if (mode == Qt::ContainsItemShape || mode == Qt::ContainsItemBoundingRect)
+ keep = itemPath.contains(brect);
+ else
+ keep = itemPath.intersects(brect);
+ if (keep && (mode == Qt::ContainsItemShape || mode == Qt::IntersectsItemShape))
+ keep = QGraphicsSceneIndexPrivate::itemCollidesWithPath(item, itemPath, mode);
+ } else {
+ Q_ASSERT(!itemd->dirtySceneTransform);
+ const QRectF itemSceneBoundingRect = itemd->sceneTransformTranslateOnly
+ ? brect.translated(itemd->sceneTransform.dx(),
+ itemd->sceneTransform.dy())
+ : itemd->sceneTransform.mapRect(brect);
+ if (mode == Qt::ContainsItemShape || mode == Qt::ContainsItemBoundingRect)
+ keep = scenePath.contains(itemSceneBoundingRect);
+ else
+ keep = scenePath.intersects(itemSceneBoundingRect);
+ if (keep && (mode == Qt::ContainsItemShape || mode == Qt::IntersectsItemShape)) {
+ QPainterPath itemPath = itemd->sceneTransformTranslateOnly
+ ? scenePath.translated(-itemd->sceneTransform.dx(),
+ -itemd->sceneTransform.dy())
+ : itemd->sceneTransform.inverted().map(scenePath);
+ keep = QGraphicsSceneIndexPrivate::itemCollidesWithPath(item, itemPath, mode);
+ }
+ }
+ return keep;
+ }
+
+ QPainterPath scenePath;
+};
+
+/*!
+ Constructs a private scene index.
+*/
+QGraphicsSceneIndexPrivate::QGraphicsSceneIndexPrivate(QGraphicsScene *scene) : scene(scene)
+{
+ pointIntersector = new QGraphicsSceneIndexPointIntersector;
+ rectIntersector = new QGraphicsSceneIndexRectIntersector;
+ pathIntersector = new QGraphicsSceneIndexPathIntersector;
+}
+
+/*!
+ Destructor of private scene index.
+*/
+QGraphicsSceneIndexPrivate::~QGraphicsSceneIndexPrivate()
+{
+ delete pointIntersector;
+ delete rectIntersector;
+ delete pathIntersector;
+}
+
+/*!
+ \internal
+
+ Checks if item collides with the path and mode, but also checks that if it
+ doesn't collide, maybe its frame rect will.
+*/
+bool QGraphicsSceneIndexPrivate::itemCollidesWithPath(const QGraphicsItem *item,
+ const QPainterPath &path,
+ Qt::ItemSelectionMode mode)
+{
+ if (item->collidesWithPath(path, mode))
+ return true;
+ if (item->isWidget()) {
+ // Check if this is a window, and if its frame rect collides.
+ const QGraphicsWidget *widget = static_cast<const QGraphicsWidget *>(item);
+ if (widget->isWindow()) {
+ QRectF frameRect = widget->windowFrameRect();
+ QPainterPath framePath;
+ framePath.addRect(frameRect);
+ bool intersects = path.intersects(frameRect);
+ if (mode == Qt::IntersectsItemShape || mode == Qt::IntersectsItemBoundingRect)
+ return intersects || path.contains(frameRect.topLeft())
+ || framePath.contains(path.elementAt(0));
+ return !intersects && path.contains(frameRect.topLeft());
+ }
+ }
+ return false;
+}
+
+/*!
+ \internal
+*/
+void QGraphicsSceneIndexPrivate::recursive_items_helper(QGraphicsItem *item, QRectF exposeRect,
+ QGraphicsSceneIndexIntersector *intersector,
+ QList<QGraphicsItem *> *items,
+ const QTransform &viewTransform,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order,
+ qreal parentOpacity) const
+{
+ Q_ASSERT(item);
+ if (!item->d_ptr->visible)
+ return;
+
+ const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
+ const bool itemIsFullyTransparent = (opacity < 0.0001);
+ const bool itemHasChildren = !item->d_ptr->children.isEmpty();
+ if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity()))
+ return;
+
+ // Update the item's scene transform if dirty.
+ const bool itemIsUntransformable = item->d_ptr->itemIsUntransformable();
+ const bool wasDirtyParentSceneTransform = item->d_ptr->dirtySceneTransform && !itemIsUntransformable;
+ if (wasDirtyParentSceneTransform) {
+ item->d_ptr->updateSceneTransformFromParent();
+ Q_ASSERT(!item->d_ptr->dirtySceneTransform);
+ }
+
+ const bool itemClipsChildrenToShape = (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape);
+ bool processItem = !itemIsFullyTransparent;
+ if (processItem) {
+ processItem = intersector->intersect(item, exposeRect, mode, viewTransform);
+ if (!processItem && (!itemHasChildren || itemClipsChildrenToShape)) {
+ if (wasDirtyParentSceneTransform)
+ item->d_ptr->invalidateChildrenSceneTransform();
+ return;
+ }
+ } // else we know for sure this item has children we must process.
+
+ int i = 0;
+ if (itemHasChildren) {
+ // Sort children.
+ item->d_ptr->ensureSortedChildren();
+
+ // Clip to shape.
+ if (itemClipsChildrenToShape && !itemIsUntransformable) {
+ QPainterPath mappedShape = item->d_ptr->sceneTransformTranslateOnly
+ ? item->shape().translated(item->d_ptr->sceneTransform.dx(),
+ item->d_ptr->sceneTransform.dy())
+ : item->d_ptr->sceneTransform.map(item->shape());
+ exposeRect &= mappedShape.controlPointRect();
+ }
+
+ // Process children behind
+ for (i = 0; i < item->d_ptr->children.size(); ++i) {
+ QGraphicsItem *child = item->d_ptr->children.at(i);
+ if (wasDirtyParentSceneTransform)
+ child->d_ptr->dirtySceneTransform = 1;
+ if (!(child->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent))
+ break;
+ if (itemIsFullyTransparent && !(child->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity))
+ continue;
+ recursive_items_helper(child, exposeRect, intersector, items, viewTransform,
+ mode, order, opacity);
+ }
+ }
+
+ // Process item
+ if (processItem)
+ items->append(item);
+
+ // Process children in front
+ if (itemHasChildren) {
+ for (; i < item->d_ptr->children.size(); ++i) {
+ QGraphicsItem *child = item->d_ptr->children.at(i);
+ if (wasDirtyParentSceneTransform)
+ child->d_ptr->dirtySceneTransform = 1;
+ if (itemIsFullyTransparent && !(child->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity))
+ continue;
+ recursive_items_helper(child, exposeRect, intersector, items, viewTransform,
+ mode, order, opacity);
+ }
+ }
+}
+
+void QGraphicsSceneIndexPrivate::init()
+{
+ if (!scene)
+ return;
+
+ QObject::connect(scene, SIGNAL(sceneRectChanged(const QRectF&)),
+ q_func(), SLOT(updateSceneRect(const QRectF&)));
+}
+
+/*!
+ Constructs an abstract scene index for a given \a scene.
+*/
+QGraphicsSceneIndex::QGraphicsSceneIndex(QGraphicsScene *scene)
+: QObject(*new QGraphicsSceneIndexPrivate(scene), scene)
+{
+ d_func()->init();
+}
+
+/*!
+ \internal
+*/
+QGraphicsSceneIndex::QGraphicsSceneIndex(QGraphicsSceneIndexPrivate &dd, QGraphicsScene *scene)
+ : QObject(dd, scene)
+{
+ d_func()->init();
+}
+
+/*!
+ Destroys the scene index.
+*/
+QGraphicsSceneIndex::~QGraphicsSceneIndex()
+{
+
+}
+
+/*!
+ Returns the scene of this index.
+*/
+QGraphicsScene* QGraphicsSceneIndex::scene() const
+{
+ Q_D(const QGraphicsSceneIndex);
+ return d->scene;
+}
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QPointF &pos,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform
+ &deviceTransform) const
+
+ Returns all visible items that, depending on \a mode, are at the specified
+ \a pos and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with \a pos are returned.
+
+ \a deviceTransform is the transformation apply to the view.
+
+ This method use the estimation of the index (estimateItems) and refine the
+ list to get an exact result. If you want to implement your own refinement
+ algorithm you can reimplement this method.
+
+ \sa estimateItems()
+
+*/
+QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QPointF &pos, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+
+ Q_D(const QGraphicsSceneIndex);
+ QList<QGraphicsItem *> itemList;
+ d->pointIntersector->scenePoint = pos;
+ d->items_helper(QRectF(pos, QSizeF(1, 1)), d->pointIntersector, &itemList, deviceTransform, mode, order);
+ return itemList;
+}
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QRectF &rect,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform
+ &deviceTransform) const
+
+ \overload
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a rect and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a rect are returned.
+
+ \a deviceTransform is the transformation apply to the view.
+
+ This method use the estimation of the index (estimateItems) and refine
+ the list to get an exact result. If you want to implement your own
+ refinement algorithm you can reimplement this method.
+
+ \sa estimateItems()
+
+*/
+QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QRectF &rect, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsSceneIndex);
+ QRectF exposeRect = rect;
+ _q_adjustRect(&exposeRect);
+ QList<QGraphicsItem *> itemList;
+ d->rectIntersector->sceneRect = rect;
+ d->items_helper(exposeRect, d->rectIntersector, &itemList, deviceTransform, mode, order);
+ return itemList;
+}
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QPolygonF
+ &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const
+ QTransform &deviceTransform) const
+
+ \overload
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a polygon and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a polygon are returned.
+
+ \a deviceTransform is the transformation apply to the view.
+
+ This method use the estimation of the index (estimateItems) and refine
+ the list to get an exact result. If you want to implement your own
+ refinement algorithm you can reimplement this method.
+
+ \sa estimateItems()
+
+*/
+QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsSceneIndex);
+ QList<QGraphicsItem *> itemList;
+ QRectF exposeRect = polygon.boundingRect();
+ _q_adjustRect(&exposeRect);
+ QPainterPath path;
+ path.addPolygon(polygon);
+ d->pathIntersector->scenePath = path;
+ d->items_helper(exposeRect, d->pathIntersector, &itemList, deviceTransform, mode, order);
+ return itemList;
+}
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QPainterPath
+ &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform
+ &deviceTransform) const
+
+ \overload
+
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a path and return a list sorted using \a order.
+
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a path are returned.
+
+ \a deviceTransform is the transformation apply to the view.
+
+ This method use the estimation of the index (estimateItems) and refine
+ the list to get an exact result. If you want to implement your own
+ refinement algorithm you can reimplement this method.
+
+ \sa estimateItems()
+
+*/
+QList<QGraphicsItem *> QGraphicsSceneIndex::items(const QPainterPath &path, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform) const
+{
+ Q_D(const QGraphicsSceneIndex);
+ QList<QGraphicsItem *> itemList;
+ QRectF exposeRect = path.controlPointRect();
+ _q_adjustRect(&exposeRect);
+ d->pathIntersector->scenePath = path;
+ d->items_helper(exposeRect, d->pathIntersector, &itemList, deviceTransform, mode, order);
+ return itemList;
+}
+
+/*!
+ This virtual function return an estimation of items at position \a point.
+ This method return a list sorted using \a order.
+*/
+QList<QGraphicsItem *> QGraphicsSceneIndex::estimateItems(const QPointF &point, Qt::SortOrder order) const
+{
+ return estimateItems(QRectF(point, QSize(1, 1)), order);
+}
+
+QList<QGraphicsItem *> QGraphicsSceneIndex::estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const
+{
+ Q_D(const QGraphicsSceneIndex);
+ Q_UNUSED(rect);
+ QGraphicsScenePrivate *scened = d->scene->d_func();
+ scened->ensureSortedTopLevelItems();
+ if (order == Qt::AscendingOrder) {
+ QList<QGraphicsItem *> sorted;
+ for (int i = scened->topLevelItems.size() - 1; i >= 0; --i)
+ sorted << scened->topLevelItems.at(i);
+ return sorted;
+ }
+ return scened->topLevelItems;
+}
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::AscendingOrder) const
+
+ This pure virtual function all items in the index and sort them using
+ \a order.
+*/
+
+
+/*!
+ Notifies the index that the scene's scene rect has changed. \a rect
+ is thew new scene rect.
+
+ \sa QGraphicsScene::sceneRect()
+*/
+void QGraphicsSceneIndex::updateSceneRect(const QRectF &rect)
+{
+ Q_UNUSED(rect);
+}
+
+/*!
+ This virtual function removes all items in the scene index.
+*/
+void QGraphicsSceneIndex::clear()
+{
+ const QList<QGraphicsItem *> allItems = items();
+ for (int i = 0 ; i < allItems.size(); ++i)
+ removeItem(allItems.at(i));
+}
+
+/*!
+ \fn virtual void QGraphicsSceneIndex::addItem(QGraphicsItem *item) = 0
+
+ This pure virtual function inserts an \a item to the scene index.
+
+ \sa removeItem(), deleteItem()
+*/
+
+/*!
+ \fn virtual void QGraphicsSceneIndex::removeItem(QGraphicsItem *item) = 0
+
+ This pure virtual function removes an \a item to the scene index.
+
+ \sa addItem(), deleteItem()
+*/
+
+/*!
+ This method is called when an \a item has been deleted.
+ The default implementation call removeItem. Be carefull,
+ if your implementation of removeItem use pure virtual method
+ of QGraphicsItem like boundingRect(), then you should reimplement
+ this method.
+
+ \sa addItem(), removeItem()
+*/
+void QGraphicsSceneIndex::deleteItem(QGraphicsItem *item)
+{
+ removeItem(item);
+}
+
+/*!
+ This virtual function is called by QGraphicsItem to notify the index
+ that some part of the \a item 's state changes. By reimplementing this
+ function, your can react to a change, and in some cases, (depending on \a
+ change,) adjustments in the index can be made.
+
+ \a change is the parameter of the item that is changing. \a value is the
+ value that changed; the type of the value depends on \a change.
+
+ The default implementation does nothing.
+
+ \sa QGraphicsItem::GraphicsItemChange
+*/
+void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value)
+{
+ Q_UNUSED(item);
+ Q_UNUSED(change);
+ Q_UNUSED(value);
+}
+
+/*!
+ Notify the index for a geometry change of an \a item.
+
+ \sa QGraphicsItem::prepareGeometryChange()
+*/
+void QGraphicsSceneIndex::prepareBoundingRectChange(const QGraphicsItem *item)
+{
+ Q_UNUSED(item);
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qgraphicssceneindex_p.cpp"
+
+#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h
new file mode 100644
index 0000000..37dffb8
--- /dev/null
+++ b/src/gui/graphicsview/qgraphicssceneindex_p.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGRAPHICSSCENEINDEX_H
+#define QGRAPHICSSCENEINDEX_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
+// file may change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qgraphicsscene_p.h"
+#include "qgraphicsscene.h"
+#include <private/qobject_p.h>
+
+#include <QtCore/qnamespace.h>
+#include <QtCore/qobject.h>
+#include <QtGui/qtransform.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
+
+class QGraphicsSceneIndexIntersector;
+class QGraphicsSceneIndexPointIntersector;
+class QGraphicsSceneIndexRectIntersector;
+class QGraphicsSceneIndexPathIntersector;
+class QGraphicsSceneIndexPrivate;
+class QPointF;
+class QRectF;
+template<typename T> class QList;
+
+class Q_AUTOTEST_EXPORT QGraphicsSceneIndex : public QObject
+{
+ Q_OBJECT
+
+public:
+ QGraphicsSceneIndex(QGraphicsScene *scene = 0);
+ virtual ~QGraphicsSceneIndex();
+
+ QGraphicsScene *scene() const;
+
+ virtual QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::AscendingOrder) const = 0;
+ virtual QList<QGraphicsItem *> items(const QPointF &pos, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ virtual QList<QGraphicsItem *> items(const QRectF &rect, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ virtual QList<QGraphicsItem *> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ virtual QList<QGraphicsItem *> items(const QPainterPath &path, Qt::ItemSelectionMode mode,
+ Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
+ virtual QList<QGraphicsItem *> estimateItems(const QPointF &point, Qt::SortOrder order) const;
+ virtual QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const = 0;
+ virtual QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &, Qt::SortOrder order) const;
+
+protected Q_SLOTS:
+ virtual void updateSceneRect(const QRectF &rect);
+
+protected:
+ virtual void clear();
+ virtual void addItem(QGraphicsItem *item) = 0;
+ virtual void removeItem(QGraphicsItem *item) = 0;
+ virtual void deleteItem(QGraphicsItem *item);
+
+ virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const QVariant &value);
+ virtual void prepareBoundingRectChange(const QGraphicsItem *item);
+
+ QGraphicsSceneIndex(QGraphicsSceneIndexPrivate &dd, QGraphicsScene *scene);
+
+ friend class QGraphicsScene;
+ friend class QGraphicsScenePrivate;
+ friend class QGraphicsItem;
+ friend class QGraphicsItemPrivate;
+ friend class QGraphicsSceneBspTreeIndex;
+private:
+ Q_DISABLE_COPY(QGraphicsSceneIndex)
+ Q_DECLARE_PRIVATE(QGraphicsSceneIndex)
+};
+
+class QGraphicsSceneIndexPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QGraphicsSceneIndex)
+public:
+ QGraphicsSceneIndexPrivate(QGraphicsScene *scene);
+ ~QGraphicsSceneIndexPrivate();
+
+ void init();
+ static bool itemCollidesWithPath(const QGraphicsItem *item, const QPainterPath &path, Qt::ItemSelectionMode mode);
+
+ void recursive_items_helper(QGraphicsItem *item, QRectF exposeRect,
+ QGraphicsSceneIndexIntersector *intersector, QList<QGraphicsItem *> *items,
+ const QTransform &viewTransform,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order, qreal parentOpacity = 1.0) const;
+ inline void items_helper(const QRectF &rect, QGraphicsSceneIndexIntersector *intersector,
+ QList<QGraphicsItem *> *items, const QTransform &viewTransform,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order) const;
+
+ QGraphicsScene *scene;
+ QGraphicsSceneIndexPointIntersector *pointIntersector;
+ QGraphicsSceneIndexRectIntersector *rectIntersector;
+ QGraphicsSceneIndexPathIntersector *pathIntersector;
+};
+
+inline void QGraphicsSceneIndexPrivate::items_helper(const QRectF &rect, QGraphicsSceneIndexIntersector *intersector,
+ QList<QGraphicsItem *> *items, const QTransform &viewTransform,
+ Qt::ItemSelectionMode mode, Qt::SortOrder order) const
+{
+ Q_Q(const QGraphicsSceneIndex);
+ const QList<QGraphicsItem *> tli = q->estimateTopLevelItems(rect, Qt::DescendingOrder);
+ for (int i = 0; i < tli.size(); ++i)
+ recursive_items_helper(tli.at(i), rect, intersector, items, viewTransform, mode, order);
+ if (order == Qt::AscendingOrder) {
+ const int n = items->size();
+ for (int i = 0; i < n / 2; ++i)
+ items->swap(i, n - i - 1);
+ }
+}
+
+class QGraphicsSceneIndexIntersector
+{
+public:
+ QGraphicsSceneIndexIntersector() { }
+ virtual ~QGraphicsSceneIndexIntersector() { }
+ virtual bool intersect(const QGraphicsItem *item, const QRectF &exposeRect, Qt::ItemSelectionMode mode,
+ const QTransform &deviceTransform) const = 0;
+};
+
+#endif // QT_NO_GRAPHICSVIEW
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGRAPHICSSCENEINDEX_H
diff --git a/src/gui/graphicsview/qgraphicsscenelinearindex.cpp b/src/gui/graphicsview/qgraphicsscenelinearindex.cpp
new file mode 100644
index 0000000..52bbc79
--- /dev/null
+++ b/src/gui/graphicsview/qgraphicsscenelinearindex.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QGraphicsSceneLinearIndex
+ \brief The QGraphicsSceneLinearIndex class provides an implementation of
+ a linear indexing algorithm for discovering items in QGraphicsScene.
+ \since 4.6
+ \ingroup graphicsview-api
+ \internal
+
+ QGraphicsSceneLinearIndex index is default linear implementation to discover items.
+ It basically store all items in a list and return them to the scene.
+
+ \sa QGraphicsScene, QGraphicsView, QGraphicsSceneIndex, QGraphicsSceneBspTreeIndex
+*/
+
+#include <private/qgraphicsscenelinearindex_p.h>
+
+/*!
+ \fn QGraphicsSceneLinearIndex::QGraphicsSceneLinearIndex(QGraphicsScene *scene = 0):
+
+ Construct a linear index for the given \a scene.
+*/
+
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsSceneLinearIndex::items(Qt::SortOrder order = Qt::AscendingOrder) const;
+
+ Return all items in the index and sort them using \a order.
+*/
+
+
+/*!
+ \fn virtual QList<QGraphicsItem *> QGraphicsSceneLinearIndex::estimateItems(const QRectF &rect, Qt::SortOrder order) const
+
+ Returns an estimation visible items that are either inside or
+ intersect with the specified \a rect and return a list sorted using \a order.
+*/
+
+/*!
+ \fn void QGraphicsSceneLinearIndex::clear()
+ \internal
+ Clear the all the BSP index.
+*/
+
+/*!
+ \fn virtual void QGraphicsSceneLinearIndex::addItem(QGraphicsItem *item)
+
+ Add the \a item into the index.
+*/
+
+/*!
+ \fn virtual void QGraphicsSceneLinearIndex::removeItem(QGraphicsItem *item)
+
+ Add the \a item from the index.
+*/
+
diff --git a/src/gui/kernel/qgesturestandardrecognizers_p.h b/src/gui/graphicsview/qgraphicsscenelinearindex_p.h
index 8abc1fb..1f3d58b 100644
--- a/src/gui/kernel/qgesturestandardrecognizers_p.h
+++ b/src/gui/graphicsview/qgraphicsscenelinearindex_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QGESTURESTANDARDRECOGNIZERS_P_H
-#define QGESTURESTANDARDRECOGNIZERS_P_H
+#ifndef QGRAPHICSSCENELINEARINDEX_H
+#define QGRAPHICSSCENELINEARINDEX_H
//
// W A R N I N G
@@ -53,79 +53,57 @@
// We mean it.
//
-#include "qevent.h"
-#include "qbasictimer.h"
-#include "qdebug.h"
+#include <QtCore/qglobal.h>
-#include "qgesture.h"
-#include "qgesturerecognizer.h"
-#include "private/qdirectionrecognizer_p.h"
+#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
-QT_BEGIN_NAMESPACE
+#include <QtCore/qrect.h>
+#include <QtCore/qlist.h>
+#include <QtGui/qgraphicsitem.h>
+#include <private/qgraphicssceneindex_p.h>
-class QGestureRecognizerPan : public QGestureRecognizer
-{
- Q_OBJECT
-public:
- QGestureRecognizerPan(QObject *parent);
+QT_BEGIN_HEADER
- QGestureRecognizer::Result filterEvent(const QEvent *event);
- QGesture* getGesture();
- void reset();
+QT_BEGIN_NAMESPACE
-private:
- void internalReset();
-
- QPanningGesture gesture;
-
- QPoint pressedPos;
- QPoint lastPos;
- QPoint currentPos;
- bool mousePressed;
- Qt::GestureState gestureState;
- Qt::DirectionType lastDirection;
- Qt::DirectionType currentDirection;
- QDirectionDiagonalRecognizer diagonalRecognizer;
- QDirectionSimpleRecognizer simpleRecognizer;
-};
+QT_MODULE(Gui)
-class QDoubleTapGestureRecognizer : public QGestureRecognizer
+class Q_AUTOTEST_EXPORT QGraphicsSceneLinearIndex : public QGraphicsSceneIndex
{
Q_OBJECT
+
public:
- QDoubleTapGestureRecognizer(QObject *parent);
+ QGraphicsSceneLinearIndex(QGraphicsScene *scene = 0) : QGraphicsSceneIndex(scene)
+ { }
- QGestureRecognizer::Result filterEvent(const QEvent *event);
- QGesture* getGesture();
- void reset();
+ QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::AscendingOrder) const
+ { Q_UNUSED(order); return m_items; }
-private:
- QGesture gesture;
- QPoint pressedPosition;
-};
+ virtual QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const
+ {
+ Q_UNUSED(rect);
+ Q_UNUSED(order);
+ return m_items;
+ }
-class QTapAndHoldGestureRecognizer : public QGestureRecognizer
-{
- Q_OBJECT
-public:
- QTapAndHoldGestureRecognizer(QObject *parent);
+protected :
+ virtual void clear()
+ { m_items.clear(); }
- QGestureRecognizer::Result filterEvent(const QEvent *event);
- QGesture* getGesture();
- void reset();
+ virtual void addItem(QGraphicsItem *item)
+ { m_items << item; }
-protected:
- void timerEvent(QTimerEvent *event);
+ virtual void removeItem(QGraphicsItem *item)
+ { m_items.removeOne(item); }
private:
- QGesture gesture;
- QPoint pressedPosition;
- QBasicTimer timer;
- int iteration;
- static const int iterationCount;
- static const int iterationTimeout;
+ QList<QGraphicsItem*> m_items;
};
+#endif // QT_NO_GRAPHICSVIEW
+
QT_END_NAMESPACE
-#endif // QGESTURESTANDARDRECOGNIZERS_P_H
+QT_END_HEADER
+
+#endif // QGRAPHICSSCENELINEARINDEX_H
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 967186f..53b044c 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -280,6 +280,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
#include <QtGui/qpainter.h>
#include <QtGui/qscrollbar.h>
#include <QtGui/qstyleoption.h>
+#include <QtGui/qinputcontext.h>
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
#endif
@@ -812,41 +813,17 @@ QRegion QGraphicsViewPrivate::mapToViewRegion(const QGraphicsItem *item, const Q
return item->boundingRegion(itv) & itv.mapRect(rect).toAlignedRect();
}
-// QRectF::intersects() returns false always if either the source or target
-// rectangle's width or height are 0. This works around that problem.
-static inline QRectF adjustedItemBoundingRect(const QGraphicsItem *item)
-{
- Q_ASSERT(item);
- QRectF boundingRect(item->boundingRect());
- if (!boundingRect.width())
- boundingRect.adjust(-0.00001, 0, 0.00001, 0);
- if (!boundingRect.height())
- boundingRect.adjust(0, -0.00001, 0, 0.00001);
- return boundingRect;
-}
-static inline QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item)
-{
- Q_ASSERT(item);
- QRectF boundingRect(item->effectiveBoundingRect());
- if (!boundingRect.width())
- boundingRect.adjust(-0.00001, 0, 0.00001, 0);
- if (!boundingRect.height())
- boundingRect.adjust(0, -0.00001, 0, 0.00001);
- return boundingRect;
-}
-
+/*!
+ \internal
+*/
void QGraphicsViewPrivate::processPendingUpdates()
{
if (!scene)
return;
- if (fullUpdatePending) { // We have already called viewport->update()
- dirtyBoundingRect = QRect();
- dirtyRegion = QRegion();
- return;
- }
-
- if (viewportUpdateMode == QGraphicsView::BoundingRectViewportUpdate) {
+ if (fullUpdatePending) {
+ viewport->update();
+ } else if (viewportUpdateMode == QGraphicsView::BoundingRectViewportUpdate) {
if (optimizationFlags & QGraphicsView::DontAdjustForAntialiasing)
viewport->update(dirtyBoundingRect.adjusted(-1, -1, 1, 1));
else
@@ -859,13 +836,29 @@ void QGraphicsViewPrivate::processPendingUpdates()
dirtyRegion = QRegion();
}
+static inline bool intersectsViewport(const QRect &r, int width, int height)
+{ return !(r.left() > width) && !(r.right() < 0) && !(r.top() >= height) && !(r.bottom() < 0); }
+
+static inline bool containsViewport(const QRect &r, int width, int height)
+{ return r.left() <= 0 && r.top() <= 0 && r.right() >= width - 1 && r.bottom() >= height - 1; }
+
+static inline void QRect_unite(QRect *rect, const QRect &other)
+{
+ if (rect->isEmpty()) {
+ *rect = other;
+ } else {
+ rect->setCoords(qMin(rect->left(), other.left()), qMin(rect->top(), other.top()),
+ qMax(rect->right(), other.right()), qMax(rect->bottom(), other.bottom()));
+ }
+}
+
bool QGraphicsViewPrivate::updateRegion(const QRegion &r)
{
if (fullUpdatePending || viewportUpdateMode == QGraphicsView::NoViewportUpdate || r.isEmpty())
return false;
const QRect boundingRect = r.boundingRect();
- if (!boundingRect.intersects(viewport->rect()))
+ if (!intersectsViewport(boundingRect, viewport->width(), viewport->height()))
return false; // Update region outside viewport.
switch (viewportUpdateMode) {
@@ -874,8 +867,8 @@ bool QGraphicsViewPrivate::updateRegion(const QRegion &r)
viewport->update();
break;
case QGraphicsView::BoundingRectViewportUpdate:
- dirtyBoundingRect |= boundingRect;
- if (dirtyBoundingRect.contains(viewport->rect())) {
+ QRect_unite(&dirtyBoundingRect, boundingRect);
+ if (containsViewport(dirtyBoundingRect, viewport->width(), viewport->height())) {
fullUpdatePending = true;
viewport->update();
}
@@ -902,7 +895,7 @@ bool QGraphicsViewPrivate::updateRegion(const QRegion &r)
bool QGraphicsViewPrivate::updateRect(const QRect &r)
{
if (fullUpdatePending || viewportUpdateMode == QGraphicsView::NoViewportUpdate
- || !r.intersects(viewport->rect())) {
+ || !intersectsViewport(r, viewport->width(), viewport->height())) {
return false;
}
@@ -912,8 +905,8 @@ bool QGraphicsViewPrivate::updateRect(const QRect &r)
viewport->update();
break;
case QGraphicsView::BoundingRectViewportUpdate:
- dirtyBoundingRect |= r;
- if (dirtyBoundingRect.contains(viewport->rect())) {
+ QRect_unite(&dirtyBoundingRect, r);
+ if (containsViewport(dirtyBoundingRect, viewport->width(), viewport->height())) {
fullUpdatePending = true;
viewport->update();
}
@@ -964,47 +957,32 @@ extern QPainterPath qt_regionToPath(const QRegion &region);
is at risk of painting 1 pixel outside the bounding rect. Therefore we
must search for items with an adjustment of (-1, -1, 1, 1).
*/
-QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedRegion, bool *allItems) const
+QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedRegion, bool *allItems,
+ const QTransform &viewTransform) const
{
Q_Q(const QGraphicsView);
// Step 1) If all items are contained within the expose region, then
- // return a list of all visible items.
+ // return a list of all visible items. ### the scene's growing bounding
+ // rect does not take into account untransformable items.
const QRectF exposedRegionSceneBounds = q->mapToScene(exposedRegion.boundingRect().adjusted(-1, -1, 1, 1))
.boundingRect();
- if (exposedRegionSceneBounds.contains(scene->d_func()->growingItemsBoundingRect)) {
+ if (exposedRegionSceneBounds.contains(scene->sceneRect())) {
Q_ASSERT(allItems);
*allItems = true;
- // All items are guaranteed within the exposed region, don't bother using the index.
- QList<QGraphicsItem *> itemList(scene->items());
- int i = 0;
- while (i < itemList.size()) {
- const QGraphicsItem *item = itemList.at(i);
- // But we only want to include items that are visible
- // The following check is basically the same as item->d_ptr->isInvisible(), except
- // that we don't check whether the item clips children to shape or propagates its
- // opacity (we loop through all items, so those checks are wrong in this context).
- if (!item->isVisible() || item->d_ptr->isClippedAway() || item->d_ptr->isFullyTransparent())
- itemList.removeAt(i);
- else
- ++i;
- }
-
- // Sort the items.
- QGraphicsScenePrivate::sortItems(&itemList, Qt::DescendingOrder, scene->d_func()->sortCacheEnabled);
- return itemList;
+ // All items are guaranteed within the exposed region.
+ return scene->items(Qt::DescendingOrder);
}
// Step 2) If the expose region is a simple rect and the view is only
// translated or scaled, search for items using
// QGraphicsScene::items(QRectF).
- bool simpleRectLookup = (scene->d_func()->largestUntransformableItem.isNull()
- && exposedRegion.numRects() == 1 && matrix.type() <= QTransform::TxScale);
+ bool simpleRectLookup = exposedRegion.numRects() == 1 && matrix.type() <= QTransform::TxScale;
if (simpleRectLookup) {
- return scene->d_func()->items_helper(exposedRegionSceneBounds,
- Qt::IntersectsItemBoundingRect,
- Qt::DescendingOrder);
+ return scene->items(exposedRegionSceneBounds,
+ Qt::IntersectsItemBoundingRect,
+ Qt::DescendingOrder, viewTransform);
}
// If the region is complex or the view has a complex transform, adjust
@@ -1014,16 +992,25 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg
foreach (const QRect &r, exposedRegion.rects())
adjustedRegion += r.adjusted(-1, -1, 1, 1);
- const QPainterPath exposedPath(qt_regionToPath(adjustedRegion));
- if (scene->d_func()->largestUntransformableItem.isNull()) {
- const QPainterPath exposedScenePath(q->mapToScene(exposedPath));
- return scene->d_func()->items_helper(exposedScenePath,
- Qt::IntersectsItemBoundingRect,
- Qt::DescendingOrder);
- }
+ const QPainterPath exposedScenePath(q->mapToScene(qt_regionToPath(adjustedRegion)));
+ return scene->items(exposedScenePath, Qt::IntersectsItemBoundingRect,
+ Qt::DescendingOrder, viewTransform);
+}
+
+/*!
+ \internal
- // NB! Path must be in viewport coordinates.
- return itemsInArea(exposedPath, Qt::IntersectsItemBoundingRect, Qt::DescendingOrder);
+ Enables input methods for the view if and only if the current focus item of
+ the scene accepts input methods. Call function whenever that condition has
+ potentially changed.
+*/
+void QGraphicsViewPrivate::updateInputMethodSensitivity()
+{
+ Q_Q(QGraphicsView);
+ q->setAttribute(
+ Qt::WA_InputMethodEnabled,
+ scene && scene->focusItem()
+ && scene->focusItem()->flags() & QGraphicsItem::ItemAcceptsInputMethod);
}
/*!
@@ -1548,6 +1535,8 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
} else {
d->recalculateContentSize();
}
+
+ d->updateInputMethodSensitivity();
}
/*!
@@ -1906,7 +1895,12 @@ void QGraphicsView::fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRati
void QGraphicsView::fitInView(const QGraphicsItem *item, Qt::AspectRatioMode aspectRatioMode)
{
QPainterPath path = item->isClipped() ? item->clipPath() : item->shape();
- fitInView(item->sceneTransform().map(path).boundingRect(), aspectRatioMode);
+ if (item->d_ptr->hasTranslateOnlySceneTransform()) {
+ path.translate(item->d_ptr->sceneTransform.dx(), item->d_ptr->sceneTransform.dy());
+ fitInView(path.boundingRect(), aspectRatioMode);
+ } else {
+ fitInView(item->d_ptr->sceneTransform.map(path).boundingRect(), aspectRatioMode);
+ }
}
/*!
@@ -1932,6 +1926,8 @@ void QGraphicsView::fitInView(const QGraphicsItem *item, Qt::AspectRatioMode asp
void QGraphicsView::render(QPainter *painter, const QRectF &target, const QRect &source,
Qt::AspectRatioMode aspectRatioMode)
{
+ // ### Switch to using the recursive rendering algorithm instead.
+
Q_D(QGraphicsView);
if (!d->scene || !(painter && painter->isActive()))
return;
@@ -2028,69 +2024,6 @@ QList<QGraphicsItem *> QGraphicsView::items() const
}
/*!
- Returns all items in the area \a path, which is in viewport coordinates,
- also taking untransformable items into consideration. This function is
- considerably slower than just checking the scene directly. There is
- certainly room for improvement.
-*/
-QList<QGraphicsItem *> QGraphicsViewPrivate::itemsInArea(const QPainterPath &path,
- Qt::ItemSelectionMode mode,
- Qt::SortOrder order) const
-{
- Q_Q(const QGraphicsView);
-
- // Determine the size of the largest untransformable subtree of children
- // mapped to scene coordinates.
- QRectF untr = scene->d_func()->largestUntransformableItem;
- QRectF ltri = matrix.inverted().mapRect(untr);
- ltri.adjust(-untr.width(), -untr.height(), untr.width(), untr.height());
-
- QRectF rect = path.controlPointRect();
-
- // Find all possible items in the relevant area.
- // ### Improve this algorithm; it might be searching a too large area.
- QRectF adjustedRect = q->mapToScene(rect.adjusted(-1, -1, 1, 1).toRect()).boundingRect();
- adjustedRect.adjust(-ltri.width(), -ltri.height(), ltri.width(), ltri.height());
-
- // First build a (potentially large) list of all items in the vicinity
- // that might be untransformable.
- QList<QGraphicsItem *> allCandidates = scene->d_func()->estimateItemsInRect(adjustedRect);
-
- // Then find the minimal list of items that are inside \a path, and
- // convert it to a set.
- QList<QGraphicsItem *> regularCandidates = scene->items(q->mapToScene(path), mode);
- QSet<QGraphicsItem *> candSet = QSet<QGraphicsItem *>::fromList(regularCandidates);
-
- QTransform viewMatrix = q->viewportTransform();
-
- QList<QGraphicsItem *> result;
-
- // Run through all candidates and keep all items that are in candSet, or
- // are untransformable and collide with \a path. ### We can improve this
- // algorithm.
- QList<QGraphicsItem *>::Iterator it = allCandidates.begin();
- while (it != allCandidates.end()) {
- QGraphicsItem *item = *it;
- if (item->d_ptr->itemIsUntransformable()) {
- // Check if this untransformable item collides with the
- // original selection rect.
- QTransform itemTransform = item->deviceTransform(viewMatrix);
- if (QGraphicsScenePrivate::itemCollidesWithPath(item, itemTransform.inverted().map(path), mode))
- result << item;
- } else {
- if (candSet.contains(item))
- result << item;
- }
- ++it;
- }
-
- // ### Insertion sort would be faster.
- if (order != Qt::SortOrder(-1))
- QGraphicsScenePrivate::sortItems(&result, order, scene->d_func()->sortCacheEnabled);
- return result;
-}
-
-/*!
Returns a list of all the items at the position \a pos in the view. The
items are listed in descending Z order (i.e., the first item in the list
is the top-most item, and the last item is the bottom-most item). \a pos
@@ -2109,17 +2042,22 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPoint &pos) const
Q_D(const QGraphicsView);
if (!d->scene)
return QList<QGraphicsItem *>();
- if (d->scene->d_func()->largestUntransformableItem.isNull()) {
- if ((d->identityMatrix || d->matrix.type() <= QTransform::TxScale)) {
- QTransform xinv = viewportTransform().inverted();
- return d->scene->items(xinv.mapRect(QRectF(pos.x(), pos.y(), 1, 1)));
- }
- return d->scene->items(mapToScene(pos.x(), pos.y(), 1, 1));
+ // ### Unify these two, and use the items(QPointF) version in
+ // QGraphicsScene instead. The scene items function could use the viewport
+ // transform to map the point to a rect/polygon.
+ if ((d->identityMatrix || d->matrix.type() <= QTransform::TxScale)) {
+ // Use the rect version
+ QTransform xinv = viewportTransform().inverted();
+ return d->scene->items(xinv.mapRect(QRectF(pos.x(), pos.y(), 1, 1)),
+ Qt::IntersectsItemShape,
+ Qt::AscendingOrder,
+ viewportTransform());
}
-
- QPainterPath path;
- path.addRect(QRectF(pos.x(), pos.y(), 1, 1));
- return d->itemsInArea(path);
+ // Use the polygon version
+ return d->scene->items(mapToScene(pos.x(), pos.y(), 1, 1),
+ Qt::IntersectsItemShape,
+ Qt::AscendingOrder,
+ viewportTransform());
}
/*!
@@ -2146,12 +2084,7 @@ QList<QGraphicsItem *> QGraphicsView::items(const QRect &rect, Qt::ItemSelection
Q_D(const QGraphicsView);
if (!d->scene)
return QList<QGraphicsItem *>();
- if (d->scene->d_func()->largestUntransformableItem.isNull())
- return d->scene->items(mapToScene(rect), mode);
-
- QPainterPath path;
- path.addRect(rect);
- return d->itemsInArea(path);
+ return d->scene->items(mapToScene(rect), mode, Qt::AscendingOrder, viewportTransform());
}
/*!
@@ -2179,13 +2112,7 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPolygon &polygon, Qt::ItemSel
Q_D(const QGraphicsView);
if (!d->scene)
return QList<QGraphicsItem *>();
- if (d->scene->d_func()->largestUntransformableItem.isNull())
- return d->scene->items(mapToScene(polygon), mode);
-
- QPainterPath path;
- path.addPolygon(polygon);
- path.closeSubpath();
- return d->itemsInArea(path);
+ return d->scene->items(mapToScene(polygon), mode, Qt::AscendingOrder, viewportTransform());
}
/*!
@@ -2205,9 +2132,7 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPainterPath &path, Qt::ItemSe
Q_D(const QGraphicsView);
if (!d->scene)
return QList<QGraphicsItem *>();
- if (d->scene->d_func()->largestUntransformableItem.isNull())
- return d->scene->items(mapToScene(path), mode);
- return d->itemsInArea(path);
+ return d->scene->items(mapToScene(path), mode, Qt::AscendingOrder, viewportTransform());
}
/*!
@@ -2668,9 +2593,6 @@ bool QGraphicsView::event(QEvent *event)
}
}
break;
- case QEvent::Gesture:
- viewportEvent(event);
- return true;
default:
break;
}
@@ -2752,17 +2674,6 @@ bool QGraphicsView::viewportEvent(QEvent *event)
d->scene->d_func()->updateAll = false;
}
break;
- case QEvent::Gesture: {
- QGraphicsSceneGestureEvent gestureEvent;
- gestureEvent.setWidget(this);
- QGestureEvent *ev = static_cast<QGestureEvent*>(event);
- gestureEvent.setGestures(ev->gestures());
- gestureEvent.setCancelledGestures(ev->cancelledGestures());
- QApplication::sendEvent(d->scene, &gestureEvent);
- event->setAccepted(gestureEvent.isAccepted());
- return true;
- }
- break;
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
@@ -2953,6 +2864,7 @@ void QGraphicsView::dragMoveEvent(QDragMoveEvent *event)
void QGraphicsView::focusInEvent(QFocusEvent *event)
{
Q_D(QGraphicsView);
+ d->updateInputMethodSensitivity();
QAbstractScrollArea::focusInEvent(event);
if (d->scene)
QApplication::sendEvent(d->scene, event);
@@ -3173,7 +3085,8 @@ void QGraphicsView::mouseMoveEvent(QMouseEvent *event)
selectionArea.addPolygon(mapToScene(d->rubberBandRect));
selectionArea.closeSubpath();
if (d->scene)
- d->scene->setSelectionArea(selectionArea, d->rubberBandSelectionMode);
+ d->scene->setSelectionArea(selectionArea, d->rubberBandSelectionMode,
+ viewportTransform());
return;
}
} else
@@ -3216,7 +3129,7 @@ void QGraphicsView::mouseReleaseEvent(QMouseEvent *event)
}
} else
#endif
- if (d->dragMode == QGraphicsView::ScrollHandDrag) {
+ if (d->dragMode == QGraphicsView::ScrollHandDrag && event->button() == Qt::LeftButton) {
#ifndef QT_NO_CURSOR
// Restore the open hand cursor. ### There might be items
// under the mouse that have a valid cursor at this time, so
@@ -3386,8 +3299,7 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
} else {
// Find all exposed items
bool allItems = false;
- QList<QGraphicsItem *> itemList = d->findItems(d->exposedRegion, &allItems);
-
+ QList<QGraphicsItem *> itemList = d->findItems(d->exposedRegion, &allItems, viewTransform);
if (!itemList.isEmpty()) {
// Generate the style options.
const int numItems = itemList.size();
@@ -3640,6 +3552,8 @@ QTransform QGraphicsView::viewportTransform() const
}
/*!
+ \since 4.6
+
Returns true if the view is transformed (i.e., a non-identity transform
has been assigned, or the scrollbars are adjusted).
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 8c62f73..62a2b84 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -58,12 +58,14 @@
#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
#include <QtGui/qevent.h>
+#include <QtCore/qcoreapplication.h>
#include "qgraphicssceneevent.h"
+#include <QtGui/qstyleoption.h>
#include <private/qabstractscrollarea_p.h>
QT_BEGIN_NAMESPACE
-class QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
+class Q_AUTOTEST_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
{
Q_DECLARE_PUBLIC(QGraphicsView)
public:
@@ -84,10 +86,6 @@ public:
qint64 horizontalScroll() const;
qint64 verticalScroll() const;
- QList<QGraphicsItem *> itemsInArea(const QPainterPath &path,
- Qt::ItemSelectionMode mode = Qt::IntersectsItemShape,
- Qt::SortOrder = Qt::AscendingOrder) const;
-
QPointF mousePressItemPoint;
QPointF mousePressScenePoint;
QPoint mousePressViewPoint;
@@ -171,16 +169,27 @@ public:
dirtyBoundingRect = QRect();
dirtyRegion = QRegion();
}
+
+ inline void dispatchPendingUpdateRequests()
+ {
+ if (qt_widget_private(viewport)->paintOnScreen())
+ QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
+ else
+ QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
+ }
+
bool updateRect(const QRect &rect);
bool updateRegion(const QRegion &region);
bool updateSceneSlotReimplementedChecked;
QRegion exposedRegion;
- QList<QGraphicsItem *> findItems(const QRegion &exposedRegion, bool *allItems) const;
+ QList<QGraphicsItem *> findItems(const QRegion &exposedRegion, bool *allItems,
+ const QTransform &viewTransform) const;
QPointF mapToScene(const QPointF &point) const;
QRectF mapToScene(const QRectF &rect) const;
static void translateTouchEvent(QGraphicsViewPrivate *d, QTouchEvent *touchEvent);
+ void updateInputMethodSensitivity();
};
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 0644ce9..86c0b48 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -971,15 +971,18 @@ void QGraphicsWidget::updateGeometry()
deliver events related to state changes in the item. Because of this, it is
very important that subclasses call the base implementation.
- For example, QGraphicsWidget uses ItemVisibleChange to deliver \l Show and
- \l Hide events, ItemPositionHasChanged to deliver \l Move events, and
- ItemParentChange both to deliver \l ParentChange events, and for managing
- the focus chain.
+ \a change specifies the type of change, and \a value is the new value.
+
+ For example, QGraphicsWidget uses ItemVisibleChange to deliver
+ \l{QEvent::Show} {Show} and \l{QEvent::Hide}{Hide} events,
+ ItemPositionHasChanged to deliver \l{QEvent::Move}{Move} events,
+ and ItemParentChange both to deliver \l{QEvent::ParentChange}
+ {ParentChange} events, and for managing the focus chain.
QGraphicsWidget enables the ItemSendsGeometryChanges flag by default in
order to track position changes.
- \sa propertyChange()
+ \sa QGraphicsItem::itemChange()
*/
QVariant QGraphicsWidget::itemChange(GraphicsItemChange change, const QVariant &value)
{
@@ -1211,7 +1214,8 @@ Qt::WindowFrameSection QGraphicsWidget::windowFrameSectionAt(const QPointF &pos)
/*!
\reimp
- QGraphicsWidget handles the following events:
+ Handles the \a event. QGraphicsWidget handles the following
+ events:
\table \o Event \o Usage
\row \o Polish
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index fa1ce29..ad55dcd 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -5269,7 +5269,7 @@ QPaintEngine *QImage::paintEngine() const
/*!
- \reimp
+ \internal
Returns the size for the specified \a metric on the device.
*/
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 874de81..ea1392b 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -954,6 +954,8 @@ bool QPicture::exec(QPainter *painter, QDataStream &s, int nrecords)
}
/*!
+ \internal
+
Internal implementation of the virtual QPaintDevice::metric()
function.
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 61be832..72fdec0 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -380,6 +380,7 @@ QPixmap QPixmap::copy(const QRect &rect) const
/*!
\fn QPixmap::scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed)
+ \since 4.6
This convenience function is equivalent to calling QPixmap::scroll(\a dx,
\a dy, QRect(\a x, \a y, \a width, \a height), \a exposed).
@@ -388,6 +389,8 @@ QPixmap QPixmap::copy(const QRect &rect) const
*/
/*!
+ \since 4.6
+
Scrolls the area \a rect of this pixmap by (\a dx, \a dy). The exposed
region is left unchanged. You can optionally pass a pointer to an empty
QRegion to get the region that is \a exposed by the scroll operation.
@@ -1779,7 +1782,7 @@ bool QPixmap::hasAlphaChannel() const
}
/*!
- \reimp
+ \internal
*/
int QPixmap::metric(PaintDeviceMetric metric) const
{
@@ -1854,7 +1857,7 @@ QPixmap QPixmap::alphaChannel() const
}
/*!
- \reimp
+ \internal
*/
QPaintEngine *QPixmap::paintEngine() const
{
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index c281fe9..25ef8ba 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -1169,25 +1169,6 @@ IconRef qt_mac_create_iconref(const QPixmap &px)
}
#endif
-QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height)
-{
- QPixmap ret(width, height);
- ret.fill(QColor(0, 0, 0, 0));
-
- CGRect rect = CGRectMake(0, 0, width, height);
-
- CGContextRef ctx = qt_mac_cg_context(&ret);
- CGAffineTransform old_xform = CGContextGetCTM(ctx);
- CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform));
- CGContextConcatCTM(ctx, CGAffineTransformIdentity);
-
- ::RGBColor b;
- b.blue = b.green = b.red = 255*255;
- PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
- CGContextRelease(ctx);
- return ret;
-}
-
/*! \internal */
QPaintEngine* QMacPixmapData::paintEngine() const
{
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index 2c84ce7..56b53bd 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -179,13 +179,7 @@ QPixmap QPixmap::fromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format)
BITMAP bitmap_info;
memset(&bitmap_info, 0, sizeof(BITMAP));
- int res;
- QT_WA({
- res = GetObjectW(bitmap, sizeof(BITMAP), &bitmap_info);
- } , {
- res = GetObjectA(bitmap, sizeof(BITMAP), &bitmap_info);
- });
-
+ int res = GetObject(bitmap, sizeof(BITMAP), &bitmap_info);
if (!res) {
qErrnoWarning("QPixmap::fromWinHBITMAP(), failed to get bitmap info");
return QPixmap();
@@ -417,9 +411,9 @@ QPixmap convertHIconToPixmap( const HICON icon, bool large)
QPixmap loadIconFromShell32( int resourceId, int size )
{
#ifdef Q_OS_WINCE
- HMODULE hmod = LoadLibrary((const wchar_t *) QString::fromLatin1("ceshell.dll").utf16());
+ HMODULE hmod = LoadLibrary(L"ceshell.dll");
#else
- HMODULE hmod = LoadLibraryA("shell32.dll");
+ HMODULE hmod = LoadLibrary(L"shell32.dll");
#endif
if( hmod ) {
HICON iconHandle = (HICON)LoadImage(hmod, MAKEINTRESOURCE(resourceId), IMAGE_ICON, size, size, 0);
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 2ef42ee..82069d0 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -65,24 +65,22 @@ QT_BEGIN_NAMESPACE
object for caching the pixmaps.
The cache associates a pixmap with a string as a key or with a QPixmapCache::Key.
- The QPixmapCache::Key is faster than using strings as key. The string API is
- very convenient for complex keys but the QPixmapCache::Key API will be very efficient
- and convenient for a 1 object <-> 1 pixmap mapping (then you can store the key as
- a member).
- If two pixmaps are inserted into the cache using equal keys, then the
- last pixmap will hide the first pixmap. The QHash and QCache classes do
- exactly the same.
+ Using QPixmapCache::Key for keys is faster than using strings. The string API is
+ very convenient for complex keys but the QPixmapCache::Key API will be very
+ efficient and convenient for a one-to-one object-to-pixmap mapping \mdash in
+ this case, you can store the keys as members of an object.
+
+ If two pixmaps are inserted into the cache using equal keys then the
+ last pixmap will replace the first pixmap in the cache. This follows the
+ behavior of the QHash and QCache classes.
The cache becomes full when the total size of all pixmaps in the
cache exceeds cacheLimit(). The initial cache limit is
- 2048 KB(2 MB) for Embedded, 10240 KB (10
- MB) for Desktops; it is changed with setCacheLimit().
- A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of memory.
-
- The \e{Qt Quarterly} article
- \l{http://doc.trolltech.com/qq/qq12-qpixmapcache.html}{Optimizing
- with QPixmapCache} explains how to use QPixmapCache to speed up
- applications by caching the results of painting.
+ 2048 KB (2 MB) on embedded platforms, 10240 KB (10 MB) on desktop
+ platforms; you can change this by calling setCacheLimit() with the
+ required value.
+ A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of
+ memory.
\sa QCache, QPixmap
*/
@@ -112,7 +110,7 @@ QPixmapCache::Key::Key(const Key &other)
}
/*!
- Destructor; called immediately before the object is deleted.
+ Destroys the key.
*/
QPixmapCache::Key::~Key()
{
@@ -123,7 +121,8 @@ QPixmapCache::Key::~Key()
/*!
\internal
- Returns true if this key is the same as the given \a key.
+ Returns true if this key is the same as the given \a key; otherwise returns
+ false.
*/
bool QPixmapCache::Key::operator ==(const Key &key) const
{
@@ -407,7 +406,7 @@ QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
Q_GLOBAL_STATIC(QPMCache, pm_cache)
/*!
- \obsolete
+ \obsolete
\overload
Returns the pixmap associated with the \a key in the cache, or
@@ -440,7 +439,7 @@ bool QPixmapCache::find(const QString &key, QPixmap& pixmap)
}
/*!
- Looks for a cached pixmap associated with the \a key in the cache.
+ Looks for a cached pixmap associated with the given \a key in the cache.
If the pixmap is found, the function sets \a pixmap to that pixmap and
returns true; otherwise it leaves \a pixmap alone and returns false.
@@ -459,10 +458,10 @@ bool QPixmapCache::find(const QString &key, QPixmap* pixmap)
}
/*!
- Looks for a cached pixmap associated with the \a key in the cache.
+ Looks for a cached pixmap associated with the given \a key in the cache.
If the pixmap is found, the function sets \a pixmap to that pixmap and
returns true; otherwise it leaves \a pixmap alone and returns false. If
- the pixmap is not found, it means that the \a key is not valid anymore,
+ the pixmap is not found, it means that the \a key is no longer valid,
so it will be released for the next insertion.
\since 4.6
@@ -504,8 +503,8 @@ bool QPixmapCache::insert(const QString &key, const QPixmap &pixmap)
}
/*!
- Inserts a copy of the pixmap \a pixmap into
- the cache and return you the key.
+ Inserts a copy of the given \a pixmap into the cache and returns a key
+ that can be used to retrieve it.
When a pixmap is inserted and the cache is about to exceed its
limit, it removes pixmaps until there is enough room for the
@@ -524,9 +523,9 @@ QPixmapCache::Key QPixmapCache::insert(const QPixmap &pixmap)
}
/*!
- Replace the pixmap associated to the \a key into
- the cache. It return true if the pixmap \a pixmap has been correctly
- inserted into the cache false otherwise.
+ Replaces the pixmap associated with the given \a key with the \a pixmap
+ specified. Returns true if the \a pixmap has been correctly inserted into
+ the cache; otherwise returns false.
\sa setCacheLimit(), insert()
@@ -543,8 +542,8 @@ bool QPixmapCache::replace(const Key &key, const QPixmap &pixmap)
/*!
Returns the cache limit (in kilobytes).
- The default cache limit is 2048 KB for Embedded, 10240 KB for
- Desktops.
+ The default cache limit is 2048 KB on embedded platforms, 10240 KB on
+ desktop platforms.
\sa setCacheLimit()
*/
@@ -557,8 +556,8 @@ int QPixmapCache::cacheLimit()
/*!
Sets the cache limit to \a n kilobytes.
- The default setting is 2048 KB for Embedded, 10240 KB for
- Desktops.
+ The default setting is 2048 KB on embedded platforms, 10240 KB on
+ desktop platforms.
\sa cacheLimit()
*/
@@ -578,7 +577,7 @@ void QPixmapCache::remove(const QString &key)
}
/*!
- Removes the pixmap associated with \a key from the cache and release
+ Removes the pixmap associated with \a key from the cache and releases
the key for a future insertion.
\since 4.6
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index c5f3663..184bd65 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -293,8 +293,6 @@ int QPixmapConvolutionFilter::columns() const
/*!
- \reimp
-
\internal
*/
QRectF QPixmapConvolutionFilter::boundingRectFor(const QRectF &rect) const
@@ -405,8 +403,6 @@ static void convolute(
}
/*!
- \reimp
-
\internal
*/
void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const QPixmap &src, const QRectF& srcRect) const
@@ -581,8 +577,6 @@ void QPixmapColorizeFilter::setColor(const QColor &color)
}
/*!
- \reimp
-
\internal
*/
void QPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect) const
@@ -805,8 +799,6 @@ void QPixmapDropShadowFilter::setOffset(const QPointF &offset)
*/
/*!
- \reimp
-
\internal
*/
QRectF QPixmapDropShadowFilter::boundingRectFor(const QRectF &rect) const
@@ -822,8 +814,6 @@ QRectF QPixmapDropShadowFilter::boundingRectFor(const QRectF &rect) const
}
/*!
- \reimp
-
\internal
*/
void QPixmapDropShadowFilter::draw(QPainter *p,
diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp
index 3bbde89..741d8da 100644
--- a/src/gui/inputmethod/qwininputcontext_win.cpp
+++ b/src/gui/inputmethod/qwininputcontext_win.cpp
@@ -45,16 +45,11 @@
#include "qfont.h"
#include "qwidget.h"
#include "qapplication.h"
-#include "qlibrary.h"
#include "qevent.h"
#include "qtextformat.h"
//#define Q_IME_DEBUG
-/* Active Input method support on Win95/98/NT */
-#include <objbase.h>
-#include <initguid.h>
-
#ifdef Q_IME_DEBUG
#include "qdebug.h"
#endif
@@ -218,25 +213,6 @@ static DWORD WM_MSIME_MOUSE = 0;
QWinInputContext::QWinInputContext(QObject *parent)
: QInputContext(parent), recursionGuard(false)
{
- if (QSysInfo::WindowsVersion < QSysInfo::WV_2000) {
- // try to get the Active IMM COM object on Win95/98/NT, where english versions don't
- // support the regular Windows input methods.
- if (CoCreateInstance(CLSID_CActiveIMM, NULL, CLSCTX_INPROC_SERVER,
- IID_IActiveIMMApp, (LPVOID *)&aimm) != S_OK) {
- aimm = 0;
- }
- if (aimm && (aimm->QueryInterface(IID_IActiveIMMMessagePumpOwner, (LPVOID *)&aimmpump) != S_OK ||
- aimm->Activate(true) != S_OK)) {
- aimm->Release();
- aimm = 0;
- if (aimmpump)
- aimmpump->Release();
- aimmpump = 0;
- }
- if (aimmpump)
- aimmpump->Start();
- }
-
#ifndef Q_WS_WINCE
QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
if (ver & QSysInfo::WV_NT_based && ver >= QSysInfo::WV_VISTA) {
@@ -262,25 +238,21 @@ QWinInputContext::QWinInputContext(QObject *parent)
delete []lpList;
}
} else {
- // figure out whether a RTL language is installed
- typedef BOOL(WINAPI *PtrIsValidLanguageGroup)(DWORD,DWORD);
- PtrIsValidLanguageGroup isValidLanguageGroup = (PtrIsValidLanguageGroup)QLibrary::resolve(QLatin1String("kernel32"), "IsValidLanguageGroup");
- if (isValidLanguageGroup) {
- qt_use_rtl_extensions = isValidLanguageGroup(LGRPID_ARABIC, LGRPID_INSTALLED)
- || isValidLanguageGroup(LGRPID_HEBREW, LGRPID_INSTALLED);
- }
- qt_use_rtl_extensions |= IsValidLocale(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
- || IsValidLocale(MAKELCID(MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
+ // figure out whether a RTL language is installed
+ qt_use_rtl_extensions = IsValidLanguageGroup(LGRPID_ARABIC, LGRPID_INSTALLED)
+ || IsValidLanguageGroup(LGRPID_HEBREW, LGRPID_INSTALLED)
+ || IsValidLocale(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
+ || IsValidLocale(MAKELCID(MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
#ifdef LANG_SYRIAC
- || IsValidLocale(MAKELCID(MAKELANGID(LANG_SYRIAC, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
+ || IsValidLocale(MAKELCID(MAKELANGID(LANG_SYRIAC, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
#endif
- || IsValidLocale(MAKELCID(MAKELANGID(LANG_FARSI, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED);
+ || IsValidLocale(MAKELCID(MAKELANGID(LANG_FARSI, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED);
}
#else
qt_use_rtl_extensions = false;
#endif
- WM_MSIME_MOUSE = QT_WA_INLINE(RegisterWindowMessage(L"MSIMEMouseOperation"), RegisterWindowMessageA("MSIMEMouseOperation"));
+ WM_MSIME_MOUSE = RegisterWindowMessage(L"MSIMEMouseOperation");
}
QWinInputContext::~QWinInputContext()
@@ -337,26 +309,13 @@ static void notifyIME(HIMC imc, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
ImmNotifyIME(imc, dwAction, dwIndex, dwValue);
}
-static LONG getCompositionString(HIMC himc, DWORD dwIndex, LPVOID lpbuf, DWORD dBufLen, bool *unicode = 0)
+static LONG getCompositionString(HIMC himc, DWORD dwIndex, LPVOID lpbuf, DWORD dBufLen)
{
LONG len = 0;
- if (unicode)
- *unicode = true;
if (aimm)
aimm->GetCompositionStringW(himc, dwIndex, dBufLen, &len, lpbuf);
else
- {
- if(QSysInfo::WindowsVersion != QSysInfo::WV_95) {
- len = ImmGetCompositionStringW(himc, dwIndex, lpbuf, dBufLen);
- }
-#if !defined(Q_WS_WINCE)
- else {
- len = ImmGetCompositionStringA(himc, dwIndex, lpbuf, dBufLen);
- if (unicode)
- *unicode = false;
- }
-#endif
- }
+ len = ImmGetCompositionString(himc, dwIndex, lpbuf, dBufLen);
return len;
}
@@ -367,29 +326,28 @@ static int getCursorPosition(HIMC himc)
static QString getString(HIMC himc, DWORD dwindex, int *selStart = 0, int *selLength = 0)
{
- static char *buffer = 0;
+ static wchar_t *buffer = 0;
static int buflen = 0;
int len = getCompositionString(himc, dwindex, 0, 0) + 1;
if (!buffer || len > buflen) {
delete [] buffer;
buflen = qMin(len, 256);
- buffer = new char[buflen];
+ buffer = new wchar_t[buflen];
}
- bool unicode = true;
- len = getCompositionString(himc, dwindex, buffer, buflen, &unicode);
+ len = getCompositionString(himc, dwindex, buffer, buflen * sizeof(wchar_t));
if (selStart) {
- static char *attrbuffer = 0;
+ static wchar_t *attrbuffer = 0;
static int attrbuflen = 0;
int attrlen = getCompositionString(himc, dwindex, 0, 0) + 1;
if (!attrbuffer || attrlen> attrbuflen) {
delete [] attrbuffer;
attrbuflen = qMin(attrlen, 256);
- attrbuffer = new char[attrbuflen];
+ attrbuffer = new wchar_t[attrbuflen];
}
- attrlen = getCompositionString(himc, GCS_COMPATTR, attrbuffer, attrbuflen);
+ attrlen = getCompositionString(himc, GCS_COMPATTR, attrbuffer, attrbuflen * sizeof(wchar_t));
*selStart = attrlen+1;
*selLength = -1;
for (int i = 0; i < attrlen; i++) {
@@ -403,18 +361,8 @@ static QString getString(HIMC himc, DWORD dwindex, int *selStart = 0, int *selLe
if (len <= 0)
return QString();
- if (unicode) {
- return QString((QChar *)buffer, len/sizeof(QChar));
- }
- else {
- buffer[len] = 0;
- WCHAR *wc = new WCHAR[len+1];
- int l = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
- buffer, len, wc, len+1);
- QString res = QString((QChar *)wc, l);
- delete [] wc;
- return res;
- }
+
+ return QString((QChar*)buffer, len / sizeof(QChar));
}
void QWinInputContext::TranslateMessage(const MSG *msg)
@@ -428,11 +376,7 @@ LRESULT QWinInputContext::DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
LRESULT retval;
if (!aimm || aimm->OnDefWindowProc(hwnd, msg, wParam, lParam, &retval) != S_OK)
{
- QT_WA({
- retval = ::DefWindowProc(hwnd, msg, wParam, lParam);
- } , {
- retval = ::DefWindowProcA(hwnd,msg, wParam, lParam);
- });
+ retval = ::DefWindowProc(hwnd, msg, wParam, lParam);
}
return retval;
}
@@ -454,21 +398,13 @@ void QWinInputContext::update()
HFONT hf;
hf = f.handle();
- QT_WA({
- LOGFONT lf;
- if (GetObject(hf, sizeof(lf), &lf))
- if (aimm)
- aimm->SetCompositionFontW(imc, &lf);
- else
- ImmSetCompositionFont(imc, &lf);
- } , {
- LOGFONTA lf;
- if (GetObjectA(hf, sizeof(lf), &lf))
- if (aimm)
- aimm->SetCompositionFontA(imc, &lf);
- else
- ImmSetCompositionFontA(imc, &lf);
- });
+ LOGFONT lf;
+ if (GetObject(hf, sizeof(lf), &lf)) {
+ if (aimm)
+ aimm->SetCompositionFontW(imc, &lf);
+ else
+ ImmSetCompositionFont(imc, &lf);
+ }
QRect r = w->inputMethodQuery(Qt::ImMicroFocus).toRect();
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index cb0037b..8887977 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -127,6 +127,37 @@ void QAbstractItemViewPrivate::init()
q->setAttribute(Qt::WA_InputMethodEnabled);
}
+void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index)
+{
+ //we take a persistent model index because the model might change by emitting signals
+ Q_Q(QAbstractItemView);
+ if (viewportEnteredNeeded || enteredIndex != index) {
+ viewportEnteredNeeded = false;
+
+ if (index.isValid()) {
+ emit q->entered(index);
+#ifndef QT_NO_STATUSTIP
+ QString statustip = model->data(index, Qt::StatusTipRole).toString();
+ if (parent && !statustip.isEmpty()) {
+ QStatusTipEvent tip(statustip);
+ QApplication::sendEvent(parent, &tip);
+ }
+#endif
+ } else {
+#ifndef QT_NO_STATUSTIP
+ if (parent) {
+ QString emptyString;
+ QStatusTipEvent tip( emptyString );
+ QApplication::sendEvent(parent, &tip);
+ }
+#endif
+ emit q->viewportEntered();
+ }
+ enteredIndex = index;
+ }
+}
+
+
/*!
\class QAbstractItemView
@@ -1557,7 +1588,7 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
}
#endif // QT_NO_DRAGANDDROP
- QModelIndex index = indexAt(bottomRight);
+ QPersistentModelIndex index = indexAt(bottomRight);
QModelIndex buddy = d->model->buddy(d->pressedIndex);
if ((state() == EditingState && d->hasEditor(buddy))
|| edit(index, NoEditTriggers, event))
@@ -1568,36 +1599,10 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
else
topLeft = bottomRight;
- if (d->viewportEnteredNeeded || d->enteredIndex != index) {
- d->viewportEnteredNeeded = false;
-
- // signal handlers may change the model
- QPersistentModelIndex persistent = index;
- if (persistent.isValid()) {
- emit entered(persistent);
-#ifndef QT_NO_STATUSTIP
- QString statustip = d->model->data(persistent, Qt::StatusTipRole).toString();
- if (parent() && !statustip.isEmpty()) {
- QStatusTipEvent tip(statustip);
- QApplication::sendEvent(parent(), &tip);
- }
-#endif
- } else {
-#ifndef QT_NO_STATUSTIP
- if (parent()) {
- QString emptyString;
- QStatusTipEvent tip(emptyString);
- QApplication::sendEvent(parent(), &tip);
- }
-#endif
- emit viewportEntered();
- }
- d->enteredIndex = persistent;
- index = persistent;
- }
+ d->checkMouseMove(index);
#ifndef QT_NO_DRAGANDDROP
- if (index.isValid()
+ if (d->pressedIndex.isValid()
&& d->dragEnabled
&& (state() != DragSelectingState)
&& (event->buttons() != Qt::NoButton)
@@ -1613,14 +1618,13 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
// Do the normalize ourselves, since QRect::normalized() is flawed
QRect selectionRect = QRect(topLeft, bottomRight);
- QPersistentModelIndex persistent = index;
setSelection(selectionRect, command);
// set at the end because it might scroll the view
- if (persistent.isValid()
- && (persistent != d->selectionModel->currentIndex())
- && d->isIndexEnabled(persistent))
- d->selectionModel->setCurrentIndex(persistent, QItemSelectionModel::NoUpdate);
+ if (index.isValid()
+ && (index != d->selectionModel->currentIndex())
+ && d->isIndexEnabled(index))
+ d->selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
}
}
@@ -2196,6 +2200,8 @@ void QAbstractItemView::resizeEvent(QResizeEvent *event)
void QAbstractItemView::timerEvent(QTimerEvent *event)
{
Q_D(QAbstractItemView);
+ if (event->timerId() == d->fetchMoreTimer.timerId())
+ d->fetchMore();
if (event->timerId() == d->autoScrollTimer.timerId())
doAutoScroll();
else if (event->timerId() == d->updateTimer.timerId())
@@ -2411,7 +2417,7 @@ void QAbstractItemView::updateEditorGeometries()
void QAbstractItemView::updateGeometries()
{
updateEditorGeometries();
- QMetaObject::invokeMethod(this, "_q_fetchMore", Qt::QueuedConnection);
+ d_func()->fetchMoreTimer.start(0, this); //fetch more later
}
/*!
@@ -2422,6 +2428,7 @@ void QAbstractItemView::verticalScrollbarValueChanged(int value)
Q_D(QAbstractItemView);
if (verticalScrollBar()->maximum() == value && d->model->canFetchMore(d->root))
d->model->fetchMore(d->root);
+ d->checkMouseMove(viewport()->mapFromGlobal(QCursor::pos()));
}
/*!
@@ -2432,6 +2439,7 @@ void QAbstractItemView::horizontalScrollbarValueChanged(int value)
Q_D(QAbstractItemView);
if (horizontalScrollBar()->maximum() == value && d->model->canFetchMore(d->root))
d->model->fetchMore(d->root);
+ d->checkMouseMove(viewport()->mapFromGlobal(QCursor::pos()));
}
/*!
@@ -2954,7 +2962,7 @@ void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelInde
void QAbstractItemView::rowsInserted(const QModelIndex &, int, int)
{
if (!isVisible())
- QMetaObject::invokeMethod(this, "_q_fetchMore", Qt::QueuedConnection);
+ d_func()->fetchMoreTimer.start(0, this); //fetch more later
else
updateEditorGeometries();
}
@@ -3177,7 +3185,7 @@ void QAbstractItemView::currentChanged(const QModelIndex &current, const QModelI
update(current);
edit(current, CurrentChanged, 0);
if (current.row() == (d->model->rowCount(d->root) - 1))
- d->_q_fetchMore();
+ d->fetchMore();
} else {
d->shouldScrollToCurrentOnShow = d->autoScroll;
}
@@ -3598,8 +3606,9 @@ QAbstractItemViewPrivate::contiguousSelectionCommand(const QModelIndex &index,
}
}
-void QAbstractItemViewPrivate::_q_fetchMore()
+void QAbstractItemViewPrivate::fetchMore()
{
+ fetchMoreTimer.stop();
if (!model->canFetchMore(root))
return;
int last = model->rowCount(root) - 1;
@@ -3872,30 +3881,48 @@ bool QAbstractItemViewPrivate::openEditor(const QModelIndex &index, QEvent *even
return true;
}
-QPixmap QAbstractItemViewPrivate::renderToPixmap(const QModelIndexList &indexes, QRect *r) const
+/*
+ \internal
+
+ returns the pair QRect/QModelIndex that should be painted on the viewports's rect
+ */
+
+QItemViewPaintPairs QAbstractItemViewPrivate::draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const
{
+ Q_ASSERT(r);
Q_Q(const QAbstractItemView);
- QRect rect = q->visualRect(indexes.at(0));
- QList<QRect> rects;
+ QRect &rect = *r;
+ const QRect viewportRect = viewport->rect();
+ QItemViewPaintPairs ret;
for (int i = 0; i < indexes.count(); ++i) {
- rects.append(q->visualRect(indexes.at(i)));
- rect |= rects.at(i);
+ const QModelIndex &index = indexes.at(i);
+ const QRect current = q->visualRect(index);
+ if (current.intersects(viewportRect)) {
+ ret += qMakePair(current, index);
+ rect |= current;
+ }
}
- rect = rect.intersected(viewport->rect());
- if (rect.width() <= 0 || rect.height() <= 0)
+ rect &= viewportRect;
+ return ret;
+}
+
+QPixmap QAbstractItemViewPrivate::renderToPixmap(const QModelIndexList &indexes, QRect *r) const
+{
+ Q_ASSERT(r);
+ QItemViewPaintPairs paintPairs = draggablePaintPairs(indexes, r);
+ if (paintPairs.isEmpty())
return QPixmap();
- QImage image(rect.size(), QImage::Format_ARGB32_Premultiplied);
- image.fill(0);
- QPainter painter(&image);
+ QPixmap pixmap(r->size());
+ pixmap.fill(Qt::transparent);
+ QPainter painter(&pixmap);
QStyleOptionViewItemV4 option = viewOptionsV4();
option.state |= QStyle::State_Selected;
- for (int j = 0; j < indexes.count(); ++j) {
- option.rect = QRect(rects.at(j).topLeft() - rect.topLeft(), rects.at(j).size());
- delegateForIndex(indexes.at(j))->paint(&painter, option, indexes.at(j));
+ for (int j = 0; j < paintPairs.count(); ++j) {
+ option.rect = paintPairs.at(j).first.translated(-r->topLeft());
+ const QModelIndex &current = paintPairs.at(j).second;
+ delegateForIndex(current)->paint(&painter, option, current);
}
- painter.end();
- if (r) *r = rect;
- return QPixmap::fromImage(image);
+ return pixmap;
}
void QAbstractItemViewPrivate::selectAll(QItemSelectionModel::SelectionFlags command)
diff --git a/src/gui/itemviews/qabstractitemview.h b/src/gui/itemviews/qabstractitemview.h
index f98dd16..da6f0ea 100644
--- a/src/gui/itemviews/qabstractitemview.h
+++ b/src/gui/itemviews/qabstractitemview.h
@@ -353,7 +353,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_rowsRemoved(const QModelIndex&, int, int))
Q_PRIVATE_SLOT(d_func(), void _q_modelDestroyed())
Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged())
- Q_PRIVATE_SLOT(d_func(), void _q_fetchMore())
friend class QTreeViewPrivate; // needed to compile with MSVC
friend class QAccessibleItemRow;
diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h
index 030147b..557e98b 100644
--- a/src/gui/itemviews/qabstractitemview_p.h
+++ b/src/gui/itemviews/qabstractitemview_p.h
@@ -61,11 +61,10 @@
#include "QtGui/qmime.h"
#include "QtGui/qpainter.h"
#include "QtCore/qpair.h"
-#include "QtCore/qtimer.h"
-#include "QtCore/qtimeline.h"
#include "QtGui/qregion.h"
#include "QtCore/qdebug.h"
#include "QtGui/qpainter.h"
+#include "QtCore/qbasictimer.h"
#ifndef QT_NO_ITEMVIEWS
@@ -87,6 +86,9 @@ struct QEditorInfo
};
+typedef QPair<QRect, QModelIndex> QItemViewPaintPair;
+typedef QList<QItemViewPaintPair> QItemViewPaintPairs;
+
class QEmptyModel : public QAbstractItemModel
{
public:
@@ -109,13 +111,14 @@ public:
void init();
- void _q_rowsRemoved(const QModelIndex &parent, int start, int end);
- void _q_columnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
- void _q_columnsRemoved(const QModelIndex &parent, int start, int end);
- void _q_columnsInserted(const QModelIndex &parent, int start, int end);
- void _q_modelDestroyed();
- void _q_layoutChanged();
- void _q_fetchMore();
+ virtual void _q_rowsRemoved(const QModelIndex &parent, int start, int end);
+ virtual void _q_columnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
+ virtual void _q_columnsRemoved(const QModelIndex &parent, int start, int end);
+ virtual void _q_columnsInserted(const QModelIndex &parent, int start, int end);
+ virtual void _q_modelDestroyed();
+ virtual void _q_layoutChanged();
+
+ void fetchMore();
bool shouldEdit(QAbstractItemView::EditTrigger trigger, const QModelIndex &index) const;
bool shouldForwardEvent(QAbstractItemView::EditTrigger trigger, const QEvent *event) const;
@@ -139,6 +142,9 @@ public:
const QEvent *event) const;
virtual void selectAll(QItemSelectionModel::SelectionFlags command);
+ void checkMouseMove(const QPersistentModelIndex &index);
+ inline void checkMouseMove(const QPoint &pos) { checkMouseMove(q_func()->indexAt(pos)); }
+
inline QItemSelectionModel::SelectionFlags selectionBehaviorFlags() const
{
switch (selectionBehavior) {
@@ -173,7 +179,9 @@ public:
q_func()->style()->drawPrimitive(QStyle::PE_IndicatorItemViewItemDrop, &opt, painter, q_func());
}
}
+
#endif
+ virtual QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
inline void releaseEditor(QWidget *editor) const {
if (editor) {
@@ -218,7 +226,7 @@ public:
void clearOrRemove();
void checkPersistentEditorFocus();
- QPixmap renderToPixmap(const QModelIndexList &indexes, QRect *r = 0) const;
+ QPixmap renderToPixmap(const QModelIndexList &indexes, QRect *r) const;
inline QPoint offset() const {
const Q_Q(QAbstractItemView);
@@ -372,7 +380,6 @@ public:
QBasicTimer updateTimer;
QBasicTimer delayedEditing;
QBasicTimer delayedAutoScroll; //used when an item is clicked
- QTimeLine timeline;
QAbstractItemView::ScrollMode verticalScrollMode;
QAbstractItemView::ScrollMode horizontalScrollMode;
@@ -384,6 +391,7 @@ public:
private:
mutable QBasicTimer delayedLayout;
+ mutable QBasicTimer fetchMoreTimer;
};
QT_BEGIN_INCLUDE_NAMESPACE
diff --git a/src/gui/itemviews/qcolumnview.cpp b/src/gui/itemviews/qcolumnview.cpp
index 1662fa8..c544394 100644
--- a/src/gui/itemviews/qcolumnview.cpp
+++ b/src/gui/itemviews/qcolumnview.cpp
@@ -52,7 +52,6 @@
#include <qscrollbar.h>
#include <qpainter.h>
#include <qdebug.h>
-#include <qpainterpath.h>
QT_BEGIN_NAMESPACE
@@ -108,9 +107,13 @@ void QColumnViewPrivate::initialize()
{
Q_Q(QColumnView);
q->setTextElideMode(Qt::ElideMiddle);
- QObject::connect(&currentAnimation, SIGNAL(frameChanged(int)),
- hbar, SLOT(setValue(int)));
+#ifndef QT_NO_ANIMATION
QObject::connect(&currentAnimation, SIGNAL(finished()), q, SLOT(_q_changeCurrentColumn()));
+ currentAnimation.setDuration(ANIMATION_DURATION_MSEC);
+ currentAnimation.setTargetObject(hbar);
+ currentAnimation.setPropertyName("value");
+ currentAnimation.setEasingCurve(QEasingCurve::InOutQuad);
+#endif //QT_NO_ANIMATION
delete itemDelegate;
q->setItemDelegate(new QColumnViewDelegate(q));
}
@@ -260,10 +263,12 @@ void QColumnView::scrollTo(const QModelIndex &index, ScrollHint hint)
if (!index.isValid() || d->columns.isEmpty())
return;
- if (d->currentAnimation.state() == QTimeLine::Running)
+#ifndef QT_NO_ANIMATION
+ if (d->currentAnimation.state() == QPropertyAnimation::Running)
return;
d->currentAnimation.stop();
+#endif //QT_NO_ANIMATION
// Fill up what is needed to get to index
d->closeColumns(index, true);
@@ -326,22 +331,12 @@ void QColumnView::scrollTo(const QModelIndex &index, ScrollHint hint)
}
}
- //horizontalScrollBar()->setValue(newScrollbarValue);
- //d->_q_changeCurrentColumn();
- //return;
- // or do the following currentAnimation
-
- int oldValue = horizontalScrollBar()->value();
-
- if (oldValue < newScrollbarValue) {
- d->currentAnimation.setFrameRange(oldValue, newScrollbarValue);
- d->currentAnimation.setDirection(QTimeLine::Forward);
- d->currentAnimation.setCurrentTime(0);
- } else {
- d->currentAnimation.setFrameRange(newScrollbarValue, oldValue);
- d->currentAnimation.setDirection(QTimeLine::Backward);
- }
+#ifndef QT_NO_ANIMATION
+ d->currentAnimation.setEndValue(newScrollbarValue);
d->currentAnimation.start();
+#else
+ horizontalScrollBar()->setValue(newScrollbarValue);
+#endif //QT_NO_ANIMATION
}
/*!
@@ -410,8 +405,10 @@ void QColumnView::resizeEvent(QResizeEvent *event)
void QColumnViewPrivate::updateScrollbars()
{
Q_Q(QColumnView);
- if (currentAnimation.state() == QTimeLine::Running)
+#ifndef QT_NO_ANIMATION
+ if (currentAnimation.state() == QPropertyAnimation::Running)
return;
+#endif //QT_NO_ANIMATION
// find the total horizontal length of the laid out columns
int horizontalLength = 0;
@@ -896,6 +893,15 @@ QList<int> QColumnView::columnWidths() const
/*!
\reimp
*/
+void QColumnView::rowsInserted(const QModelIndex &parent, int start, int end)
+{
+ QAbstractItemView::rowsInserted(parent, start, end);
+ d_func()->checkColumnCreation(parent);
+}
+
+/*!
+ \reimp
+*/
void QColumnView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
{
Q_D(QColumnView);
@@ -1036,7 +1042,6 @@ QColumnViewPrivate::QColumnViewPrivate()
: QAbstractItemViewPrivate()
,showResizeGrips(true)
,offset(0)
-,currentAnimation(ANIMATION_DURATION_MSEC)
,previewWidget(0)
,previewColumn(0)
{
@@ -1048,6 +1053,41 @@ QColumnViewPrivate::~QColumnViewPrivate()
/*!
\internal
+
+ */
+void QColumnViewPrivate::_q_columnsInserted(const QModelIndex &parent, int start, int end)
+{
+ QAbstractItemViewPrivate::_q_columnsInserted(parent, start, end);
+ checkColumnCreation(parent);
+}
+
+/*!
+ \internal
+
+ Makes sure we create a corresponding column as a result of changing the model.
+
+ */
+void QColumnViewPrivate::checkColumnCreation(const QModelIndex &parent)
+{
+ if (parent == q_func()->currentIndex() && model->hasChildren(parent)) {
+ //the parent has children and is the current
+ //let's try to find out if there is already a mapping that is good
+ for (int i = 0; i < columns.count(); ++i) {
+ QAbstractItemView *view = columns.at(i);
+ if (view->rootIndex() == parent) {
+ if (view == previewColumn) {
+ //let's recreate the parent
+ closeColumns(parent, false);
+ createColumn(parent, true /*show*/);
+ }
+ break;
+ }
+ }
+ }
+}
+
+/*!
+ \internal
Place all of the columns where they belong inside of the viewport, resize as necessary.
*/
void QColumnViewPrivate::doLayout()
diff --git a/src/gui/itemviews/qcolumnview.h b/src/gui/itemviews/qcolumnview.h
index 880870a..f8697e9 100644
--- a/src/gui/itemviews/qcolumnview.h
+++ b/src/gui/itemviews/qcolumnview.h
@@ -97,16 +97,14 @@ protected:
QRegion visualRegionForSelection(const QItemSelection &selection) const;
int horizontalOffset() const;
int verticalOffset() const;
- void scrollContentsBy(int dx, int dy);
+ void rowsInserted(const QModelIndex &parent, int start, int end);
+ void currentChanged(const QModelIndex &current, const QModelIndex &previous);
// QColumnView functions
+ void scrollContentsBy(int dx, int dy);
virtual QAbstractItemView* createColumn(const QModelIndex &rootIndex);
void initializeColumn(QAbstractItemView *column) const;
-protected Q_SLOTS:
- // QAbstractItemView overloads
- void currentChanged(const QModelIndex &current, const QModelIndex &previous);
-
private:
Q_DECLARE_PRIVATE(QColumnView)
Q_DISABLE_COPY(QColumnView)
diff --git a/src/gui/itemviews/qcolumnview_p.h b/src/gui/itemviews/qcolumnview_p.h
index 92a4d2a..3f99220 100644
--- a/src/gui/itemviews/qcolumnview_p.h
+++ b/src/gui/itemviews/qcolumnview_p.h
@@ -60,7 +60,7 @@
#include <private/qabstractitemview_p.h>
#include <QtCore/qabstractitemmodel.h>
-#include <QtCore/qtimeline.h>
+#include <QtCore/qpropertyanimation.h>
#include <QtGui/qabstractitemdelegate.h>
#include <QtGui/qabstractitemview.h>
#include <QtGui/qitemdelegate.h>
@@ -148,16 +148,21 @@ public:
void closeColumns(const QModelIndex &parent = QModelIndex(), bool build = false);
void doLayout();
void setPreviewWidget(QWidget *widget);
+ void checkColumnCreation(const QModelIndex &parent);
+
void _q_gripMoved(int offset);
void _q_changeCurrentColumn();
void _q_clicked(const QModelIndex &index);
+ void _q_columnsInserted(const QModelIndex &parent, int start, int end);
QList<QAbstractItemView*> columns;
QVector<int> columnSizes; // used during init and corner moving
bool showResizeGrips;
int offset;
- QTimeLine currentAnimation;
+#ifndef QT_NO_ANIMATION
+ QPropertyAnimation currentAnimation;
+#endif
QWidget *previewWidget;
QAbstractItemView *previewColumn;
};
diff --git a/src/gui/itemviews/qdirmodel.cpp b/src/gui/itemviews/qdirmodel.cpp
index c25149b..c5618b6 100644
--- a/src/gui/itemviews/qdirmodel.cpp
+++ b/src/gui/itemviews/qdirmodel.cpp
@@ -228,7 +228,10 @@ void QDirModelPrivate::invalidate()
\note QDirModel requires an instance of a GUI application.
- \sa nameFilters(), setFilter(), filter(), QListView, QTreeView,
+ \note The usage of QDirModel is not recommended anymore. The
+ QFileSystemModel class is a more performant alternative.
+
+ \sa nameFilters(), setFilter(), filter(), QListView, QTreeView, QFileSystemModel
{Dir View Example}, {Model Classes}
*/
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 3f7b53d..dd4341b 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -45,18 +45,17 @@
#include <qstyle.h>
#include <qapplication.h>
#include <qdir.h>
+#include <qpixmapcache.h>
#if defined(Q_WS_WIN)
#define _WIN32_IE 0x0500
+#include <qt_windows.h>
+#include <commctrl.h>
#include <objbase.h>
#include <private/qpixmapdata_p.h>
-#include <qpixmapcache.h>
#elif defined(Q_WS_MAC)
-#include <private/qt_mac_p.h>
+#include <private/qt_cocoa_helpers_mac_p.h>
#endif
#include <private/qfunctions_p.h>
-#ifdef Q_OS_WINCE
-#include <Commctrl.h>
-#endif
#ifndef SHGFI_ADDOVERLAYS
#define SHGFI_ADDOVERLAYS 0x000000020
@@ -243,10 +242,10 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
//Get the small icon
#ifndef Q_OS_WINCE
- val = SHGetFileInfo((const WCHAR *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
+ val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS);
#else
- val = SHGetFileInfo((const WCHAR *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
+ val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_SYSICONINDEX);
#endif
if (val) {
@@ -282,10 +281,10 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
//Get the big icon
#ifndef Q_OS_WINCE
- val = SHGetFileInfo((const WCHAR *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
+ val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS);
#else
- val = SHGetFileInfo((const WCHAR *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
+ val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_LARGEICON|SHGFI_SYSICONINDEX);
#endif
if (val) {
@@ -315,6 +314,31 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const
{
QIcon retIcon;
+ QString fileExtension = fi.suffix().toUpper();
+ fileExtension.prepend(QLatin1String("."));
+
+ const QString keyBase = QLatin1String("qt_") + fileExtension;
+
+ QPixmap pixmap;
+ if (fi.isFile() && !fi.isExecutable() && !fi.isSymLink()) {
+ QPixmapCache::find(keyBase + QLatin1String("16"), pixmap);
+ }
+
+ if (!pixmap.isNull()) {
+ retIcon.addPixmap(pixmap);
+ if (QPixmapCache::find(keyBase + QLatin1String("32"), pixmap)) {
+ retIcon.addPixmap(pixmap);
+ if (QPixmapCache::find(keyBase + QLatin1String("64"), pixmap)) {
+ retIcon.addPixmap(pixmap);
+ if (QPixmapCache::find(keyBase + QLatin1String("128"), pixmap)) {
+ retIcon.addPixmap(pixmap);
+ return retIcon;
+ }
+ }
+ }
+ }
+
+
FSRef macRef;
OSStatus status = FSPathMakeRef(reinterpret_cast<const UInt8*>(fi.canonicalFilePath().toUtf8().constData()),
&macRef, 0);
@@ -327,12 +351,23 @@ QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const
return retIcon;
IconRef iconRef;
SInt16 iconLabel;
- status = GetIconRefFromFileInfo(&macRef, macName.length, macName.unicode, kIconServicesCatalogInfoMask, &info, kIconServicesNormalUsageFlag, &iconRef, &iconLabel);
+ status = GetIconRefFromFileInfo(&macRef, macName.length, macName.unicode,
+ kIconServicesCatalogInfoMask, &info, kIconServicesNormalUsageFlag,
+ &iconRef, &iconLabel);
if (status != noErr)
return retIcon;
- extern void qt_mac_constructQIconFromIconRef(const IconRef, const IconRef, QIcon*, QStyle::StandardPixmap = QStyle::SP_CustomBase); // qmacstyle_mac.cpp
qt_mac_constructQIconFromIconRef(iconRef, 0, &retIcon);
ReleaseIconRef(iconRef);
+
+ pixmap = retIcon.pixmap(16);
+ QPixmapCache::insert(keyBase + QLatin1String("16"), pixmap);
+ pixmap = retIcon.pixmap(32);
+ QPixmapCache::insert(keyBase + QLatin1String("32"), pixmap);
+ pixmap = retIcon.pixmap(64);
+ QPixmapCache::insert(keyBase + QLatin1String("64"), pixmap);
+ pixmap = retIcon.pixmap(128);
+ QPixmapCache::insert(keyBase + QLatin1String("128"), pixmap);
+
return retIcon;
}
#endif
@@ -357,9 +392,7 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const
if (info.isRoot())
#if defined (Q_WS_WIN) && !defined(Q_WS_WINCE)
{
- uint type = DRIVE_UNKNOWN;
- QT_WA({ type = GetDriveTypeW((wchar_t *)info.absoluteFilePath().utf16()); },
- { type = GetDriveTypeA(info.absoluteFilePath().toLocal8Bit()); });
+ UINT type = GetDriveType((wchar_t *)info.absoluteFilePath().utf16());
switch (type) {
case DRIVE_REMOVABLE:
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index b35c30b..2419c18 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -522,31 +522,29 @@ int QHeaderView::length() const
QSize QHeaderView::sizeHint() const
{
Q_D(const QHeaderView);
- if (count() < 1)
- return QSize(0, 0);
if (d->cachedSizeHint.isValid())
return d->cachedSizeHint;
- int width = 0;
- int height = 0;
+ d->cachedSizeHint = QSize(0, 0); //reinitialize the cached size hint
+ const int sectionCount = count();
+
// get size hint for the first n sections
- int c = qMin(count(), 100);
- for (int i = 0; i < c; ++i) {
+ int i = 0;
+ for (int checked = 0; checked < 100 && i < sectionCount; ++i) {
if (isSectionHidden(i))
continue;
+ checked++;
QSize hint = sectionSizeFromContents(i);
- width = qMax(hint.width(), width);
- height = qMax(hint.height(), height);
+ d->cachedSizeHint = d->cachedSizeHint.expandedTo(hint);
}
// get size hint for the last n sections
- c = qMax(count() - 100, c);
- for (int j = count() - 1; j >= c; --j) {
+ i = qMax(i, sectionCount - 100 );
+ for (int j = sectionCount - 1, checked = 0; j >= i && checked < 100; --j) {
if (isSectionHidden(j))
continue;
+ checked++;
QSize hint = sectionSizeFromContents(j);
- width = qMax(hint.width(), width);
- height = qMax(hint.height(), height);
+ d->cachedSizeHint = d->cachedSizeHint.expandedTo(hint);
}
- d->cachedSizeHint = QSize(width, height);
return d->cachedSizeHint;
}
@@ -2540,7 +2538,7 @@ QSize QHeaderView::sectionSizeFromContents(int logicalIndex) const
if (opt.icon.isNull())
opt.icon = qvariant_cast<QPixmap>(variant);
QSize size = style()->sizeFromContents(QStyle::CT_HeaderSection, &opt, QSize(), this);
- if (isSortIndicatorShown() && sortIndicatorSection() == logicalIndex) {
+ if (isSortIndicatorShown()) {
int margin = style()->pixelMetric(QStyle::PM_HeaderMargin, &opt, this);
if (d->orientation == Qt::Horizontal)
size.rwidth() += size.height() + margin;
diff --git a/src/gui/itemviews/qheaderview.h b/src/gui/itemviews/qheaderview.h
index f752ae2..3a66c9a 100644
--- a/src/gui/itemviews/qheaderview.h
+++ b/src/gui/itemviews/qheaderview.h
@@ -221,14 +221,13 @@ protected:
bool isIndexHidden(const QModelIndex &index) const;
QModelIndex moveCursor(CursorAction, Qt::KeyboardModifiers);
- void setSelection(const QRect&, QItemSelectionModel::SelectionFlags);
+ void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags);
QRegion visualRegionForSelection(const QItemSelection &selection) const;
void initStyleOption(QStyleOptionHeader *option) const;
private:
Q_PRIVATE_SLOT(d_func(), void _q_sectionsRemoved(const QModelIndex &parent, int logicalFirst, int logicalLast))
Q_PRIVATE_SLOT(d_func(), void _q_layoutAboutToBeChanged())
- Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged())
Q_DECLARE_PRIVATE(QHeaderView)
Q_DISABLE_COPY(QHeaderView)
};
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index 264fa37..336ca79 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -574,7 +574,7 @@ void QItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) con
}
/*!
- Gets data drom the \a editor widget and stores it in the specified
+ Gets data from the \a editor widget and stores it in the specified
\a model at the item \a index.
The default implementation gets the value to be stored in the data
@@ -861,6 +861,8 @@ void QItemDelegate::drawBackground(QPainter *painter,
/*!
\internal
+
+ Code duplicated in QCommonStylePrivate::viewItemLayout
*/
void QItemDelegate::doLayout(const QStyleOptionViewItem &option,
@@ -882,8 +884,10 @@ void QItemDelegate::doLayout(const QStyleOptionViewItem &option,
int w, h;
textRect->adjust(-textMargin, 0, textMargin, 0); // add width padding
- if (textRect->height() == 0 && !hasPixmap)
+ if (textRect->height() == 0 && (!hasPixmap || !hint)) {
+ //if there is no text, we still want to have a decent height for the item sizeHint and the editor size
textRect->setHeight(option.fontMetrics.height());
+ }
QSize pm(0, 0);
if (hasPixmap) {
@@ -1219,15 +1223,12 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
if (editor->parentWidget())
editor->parentWidget()->setFocus();
return true;
- } else if (event->type() == QEvent::FocusOut || event->type() == QEvent::Hide) {
+ } else if (event->type() == QEvent::FocusOut || (event->type() == QEvent::Hide && editor->isWindow())) {
//the Hide event will take care of he editors that are in fact complete dialogs
if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) {
- QWidget *w = QApplication::focusWidget();
- while (w) { // don't worry about focus changes internally in the editor
- if (w == editor)
- return false;
- w = w->parentWidget();
- }
+ if (editor->isAncestorOf(QApplication::focusWidget()))
+ return false; // don't worry about focus changes internally in the editor
+
#ifndef QT_NO_DRAGANDDROP
// The window may lose focus during an drag operation.
// i.e when dragging involves the taskbar on Windows.
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp
index e4cb0f0..87825d9 100644
--- a/src/gui/itemviews/qitemselectionmodel.cpp
+++ b/src/gui/itemviews/qitemselectionmodel.cpp
@@ -270,24 +270,35 @@ QItemSelectionRange QItemSelectionRange::intersect(const QItemSelectionRange &ot
*/
-/*!
- Returns the list of model index items stored in the selection.
-*/
+/*
+ \internal
-QModelIndexList QItemSelectionRange::indexes() const
+ utility function for getting the indexes from a range
+ it avoid concatenating list and works on one
+ */
+
+static void indexesFromRange(const QItemSelectionRange &range, QModelIndexList &result)
{
- QModelIndex index;
- QModelIndexList result;
- if (isValid() && model()) {
- for (int column = left(); column <= right(); ++column) {
- for (int row = top(); row <= bottom(); ++row) {
- index = model()->index(row, column, parent());
- Qt::ItemFlags flags = model()->flags(index);
+ if (range.isValid() && range.model()) {
+ for (int column = range.left(); column <= range.right(); ++column) {
+ for (int row = range.top(); row <= range.bottom(); ++row) {
+ QModelIndex index = range.model()->index(row, column, range.parent());
+ Qt::ItemFlags flags = range.model()->flags(index);
if ((flags & Qt::ItemIsSelectable) && (flags & Qt::ItemIsEnabled))
result.append(index);
}
}
}
+}
+
+/*!
+ Returns the list of model index items stored in the selection.
+*/
+
+QModelIndexList QItemSelectionRange::indexes() const
+{
+ QModelIndexList result;
+ indexesFromRange(*this, result);
return result;
}
@@ -404,7 +415,7 @@ QModelIndexList QItemSelection::indexes() const
QModelIndexList result;
QList<QItemSelectionRange>::const_iterator it = begin();
for (; it != end(); ++it)
- result += (*it).indexes();
+ indexesFromRange(*it, result);
return result;
}
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 4652b91..148d204 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -709,6 +709,31 @@ void QListViewPrivate::selectAll(QItemSelectionModel::SelectionFlags command)
selectionModel->select(selection, command);
}
+/*!
+ \reimp
+
+ We have a QListView way of knowing what elements are on the viewport
+ through the intersectingSet function
+*/
+QItemViewPaintPairs QListViewPrivate::draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const
+{
+ Q_ASSERT(r);
+ Q_Q(const QListView);
+ QRect &rect = *r;
+ const QRect viewportRect = viewport->rect();
+ QItemViewPaintPairs ret;
+ const QSet<QModelIndex> visibleIndexes = intersectingSet(viewportRect).toList().toSet();
+ for (int i = 0; i < indexes.count(); ++i) {
+ const QModelIndex &index = indexes.at(i);
+ if (visibleIndexes.contains(index)) {
+ const QRect current = q->visualRect(index);
+ ret += qMakePair(current, index);
+ rect |= current;
+ }
+ }
+ rect &= viewportRect;
+ return ret;
+}
/*!
\internal
@@ -925,9 +950,9 @@ void QListView::dragMoveEvent(QDragMoveEvent *e)
QModelIndex index;
if (d->movement == Snap) {
QRect rect(d->dynamicListView->snapToGrid(e->pos() + d->offset()), d->gridSize());
- d->intersectingSet(rect);
- index = d->intersectVector.count() > 0
- ? d->intersectVector.last() : QModelIndex();
+ const QVector<QModelIndex> intersectVector = d->intersectingSet(rect);
+ index = intersectVector.count() > 0
+ ? intersectVector.last() : QModelIndex();
} else {
index = indexAt(e->pos());
}
@@ -1100,10 +1125,8 @@ void QListView::paintEvent(QPaintEvent *e)
return;
QStyleOptionViewItemV4 option = d->viewOptionsV4();
QPainter painter(d->viewport);
- QRect area = e->rect();
- d->intersectingSet(e->rect().translated(horizontalOffset(), verticalOffset()), false);
- const QVector<QModelIndex> toBeRendered = d->intersectVector;
+ const QVector<QModelIndex> toBeRendered = d->intersectingSet(e->rect().translated(horizontalOffset(), verticalOffset()), false);
const QModelIndex current = currentIndex();
const QModelIndex hover = d->hover;
@@ -1225,9 +1248,9 @@ QModelIndex QListView::indexAt(const QPoint &p) const
{
Q_D(const QListView);
QRect rect(p.x() + horizontalOffset(), p.y() + verticalOffset(), 1, 1);
- d->intersectingSet(rect);
- QModelIndex index = d->intersectVector.count() > 0
- ? d->intersectVector.last() : QModelIndex();
+ const QVector<QModelIndex> intersectVector = d->intersectingSet(rect);
+ QModelIndex index = intersectVector.count() > 0
+ ? intersectVector.last() : QModelIndex();
if (index.isValid() && visualRect(index).contains(p))
return index;
return QModelIndex();
@@ -1325,38 +1348,38 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
if (d->gridSize().isValid()) rect.setSize(d->gridSize());
QSize contents = d->contentsSize();
- d->intersectVector.clear();
+ QVector<QModelIndex> intersectVector;
switch (cursorAction) {
case MoveLeft:
- while (d->intersectVector.isEmpty()) {
+ while (intersectVector.isEmpty()) {
rect.translate(-rect.width(), 0);
if (rect.right() <= 0)
return current;
if (rect.left() < 0)
rect.setLeft(0);
- d->intersectingSet(rect);
- d->removeCurrentAndDisabled(&d->intersectVector, current);
+ intersectVector = d->intersectingSet(rect);
+ d->removeCurrentAndDisabled(&intersectVector, current);
}
- return d->closestIndex(initialRect, d->intersectVector);
+ return d->closestIndex(initialRect, intersectVector);
case MoveRight:
- while (d->intersectVector.isEmpty()) {
+ while (intersectVector.isEmpty()) {
rect.translate(rect.width(), 0);
if (rect.left() >= contents.width())
return current;
if (rect.right() > contents.width())
rect.setRight(contents.width());
- d->intersectingSet(rect);
- d->removeCurrentAndDisabled(&d->intersectVector, current);
+ intersectVector = d->intersectingSet(rect);
+ d->removeCurrentAndDisabled(&intersectVector, current);
}
- return d->closestIndex(initialRect, d->intersectVector);
+ return d->closestIndex(initialRect, intersectVector);
case MovePageUp:
rect.moveTop(rect.top() - d->viewport->height());
if (rect.top() < rect.height())
rect.moveTop(rect.height());
case MovePrevious:
case MoveUp:
- while (d->intersectVector.isEmpty()) {
+ while (intersectVector.isEmpty()) {
rect.translate(0, -rect.height());
if (rect.bottom() <= 0) {
#ifdef QT_KEYPAD_NAVIGATION
@@ -1372,17 +1395,17 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
}
if (rect.top() < 0)
rect.setTop(0);
- d->intersectingSet(rect);
- d->removeCurrentAndDisabled(&d->intersectVector, current);
+ intersectVector = d->intersectingSet(rect);
+ d->removeCurrentAndDisabled(&intersectVector, current);
}
- return d->closestIndex(initialRect, d->intersectVector);
+ return d->closestIndex(initialRect, intersectVector);
case MovePageDown:
rect.moveTop(rect.top() + d->viewport->height());
if (rect.bottom() > contents.height() - rect.height())
rect.moveBottom(contents.height() - rect.height());
case MoveNext:
case MoveDown:
- while (d->intersectVector.isEmpty()) {
+ while (intersectVector.isEmpty()) {
rect.translate(0, rect.height());
if (rect.top() >= contents.height()) {
#ifdef QT_KEYPAD_NAVIGATION
@@ -1399,10 +1422,10 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
}
if (rect.bottom() > contents.height())
rect.setBottom(contents.height());
- d->intersectingSet(rect);
- d->removeCurrentAndDisabled(&d->intersectVector, current);
+ intersectVector = d->intersectingSet(rect);
+ d->removeCurrentAndDisabled(&intersectVector, current);
}
- return d->closestIndex(initialRect, d->intersectVector);
+ return d->closestIndex(initialRect, intersectVector);
case MoveHome:
return d->model->index(0, d->column, d->root);
case MoveEnd:
@@ -1477,10 +1500,10 @@ void QListView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFl
QItemSelection selection;
if (rect.width() == 1 && rect.height() == 1) {
- d->intersectingSet(rect.translated(horizontalOffset(), verticalOffset()));
+ const QVector<QModelIndex> intersectVector = d->intersectingSet(rect.translated(horizontalOffset(), verticalOffset()));
QModelIndex tl;
- if (!d->intersectVector.isEmpty())
- tl = d->intersectVector.last(); // special case for mouse press; only select the top item
+ if (!intersectVector.isEmpty())
+ tl = intersectVector.last(); // special case for mouse press; only select the top item
if (tl.isValid() && d->isIndexEnabled(tl))
selection.select(tl, tl);
} else {
@@ -1490,14 +1513,14 @@ void QListView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFl
QModelIndex tl, br;
// get the first item
const QRect topLeft(rect.left() + horizontalOffset(), rect.top() + verticalOffset(), 1, 1);
- d->intersectingSet(topLeft);
- if (!d->intersectVector.isEmpty())
- tl = d->intersectVector.last();
+ QVector<QModelIndex> intersectVector = d->intersectingSet(topLeft);
+ if (!intersectVector.isEmpty())
+ tl = intersectVector.last();
// get the last item
const QRect bottomRight(rect.right() + horizontalOffset(), rect.bottom() + verticalOffset(), 1, 1);
- d->intersectingSet(bottomRight);
- if (!d->intersectVector.isEmpty())
- br = d->intersectVector.last();
+ intersectVector = d->intersectingSet(bottomRight);
+ if (!intersectVector.isEmpty())
+ br = intersectVector.last();
// get the ranges
if (tl.isValid() && br.isValid()
@@ -1540,7 +1563,10 @@ void QListView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFl
}
// middle rectangle
if (top.bottom() < bottom.top()) {
- middle.setTop(top.bottom() + 1);
+ if (gridSize().isValid() && !gridSize().isNull())
+ middle.setTop(top.top() + gridSize().height());
+ else
+ middle.setTop(top.bottom() + 1);
middle.setLeft(qMin(top.left(), bottom.left()));
middle.setBottom(bottom.top() - 1);
middle.setRight(qMax(top.right(), bottom.right()));
@@ -1567,7 +1593,10 @@ void QListView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFl
// only set middle if the
middle.setTop(0);
middle.setBottom(ch);
- middle.setLeft(left.right() + 1);
+ if (gridSize().isValid() && !gridSize().isNull())
+ middle.setLeft(left.left() + gridSize().width());
+ else
+ middle.setLeft(left.right() + 1);
middle.setRight(right.left() - 1);
} else if (left.bottom() < right.top()) {
left.setBottom(right.top() - 1);
@@ -1633,14 +1662,16 @@ QRegion QListView::visualRegionForSelection(const QItemSelection &selection) con
QModelIndexList QListView::selectedIndexes() const
{
Q_D(const QListView);
- QModelIndexList viewSelected;
- QModelIndexList modelSelected;
- if (d->selectionModel)
- modelSelected = d->selectionModel->selectedIndexes();
- for (int i = 0; i < modelSelected.count(); ++i) {
- QModelIndex index = modelSelected.at(i);
+ if (!d->selectionModel)
+ return QModelIndexList();
+
+ QModelIndexList viewSelected = d->selectionModel->selectedIndexes();
+ for (int i = 0; i < viewSelected.count(); ++i) {
+ const QModelIndex &index = viewSelected.at(i);
if (!isIndexHidden(index) && index.parent() == d->root && index.column() == d->column)
- viewSelected.append(index);
+ ++i;
+ else
+ viewSelected.removeAt(i);
}
return viewSelected;
}
@@ -2116,8 +2147,8 @@ QItemSelection QListViewPrivate::selection(const QRect &rect) const
{
QItemSelection selection;
QModelIndex tl, br;
- intersectingSet(rect);
- QVector<QModelIndex>::iterator it = intersectVector.begin();
+ const QVector<QModelIndex> intersectVector = intersectingSet(rect);
+ QVector<QModelIndex>::const_iterator it = intersectVector.begin();
for (; it != intersectVector.end(); ++it) {
if (!tl.isValid() && !br.isValid()) {
tl = br = *it;
@@ -2408,9 +2439,9 @@ void QStaticListViewBase::doStaticLayout(const QListViewLayoutInfo &info)
Finds the set of items intersecting with \a area.
In this function, itemsize is counted from topleft to the start of the next item.
*/
-void QStaticListViewBase::intersectingStaticSet(const QRect &area) const
+QVector<QModelIndex> QStaticListViewBase::intersectingStaticSet(const QRect &area) const
{
- clearIntersections();
+ QVector<QModelIndex> ret;
int segStartPosition;
int segEndPosition;
int flowStartPosition;
@@ -2427,7 +2458,7 @@ void QStaticListViewBase::intersectingStaticSet(const QRect &area) const
flowEndPosition = area.bottom();
}
if (segmentPositions.count() < 2 || flowPositions.isEmpty())
- return;
+ return ret;
// the last segment position is actually the edge of the last segment
const int segLast = segmentPositions.count() - 2;
int seg = qBinarySearch<int>(segmentPositions, segStartPosition, 0, segLast + 1);
@@ -2442,13 +2473,14 @@ void QStaticListViewBase::intersectingStaticSet(const QRect &area) const
continue;
QModelIndex index = modelIndex(row);
if (index.isValid())
- appendToIntersections(index);
+ ret += index;
#if 0 // for debugging
else
qWarning("intersectingStaticSet: row %d was invalid", row);
#endif
}
}
+ return ret;
}
int QStaticListViewBase::itemIndex(const QListViewItem &item) const
@@ -2769,12 +2801,15 @@ void QDynamicListViewBase::doDynamicLayout(const QListViewLayoutInfo &info)
viewport()->update();
}
-void QDynamicListViewBase::intersectingDynamicSet(const QRect &area) const
+QVector<QModelIndex> QDynamicListViewBase::intersectingDynamicSet(const QRect &area) const
{
- clearIntersections();
- QListViewPrivate *that = const_cast<QListViewPrivate*>(dd);
+ QDynamicListViewBase *that = const_cast<QDynamicListViewBase*>(this);
QBspTree::Data data(static_cast<void*>(that));
- that->dynamicListView->tree.climbTree(area, &QDynamicListViewBase::addLeaf, data);
+ QVector<QModelIndex> res;
+ that->interSectingVector = &res;
+ that->tree.climbTree(area, &QDynamicListViewBase::addLeaf, data);
+ that->interSectingVector = 0;
+ return res;
}
void QDynamicListViewBase::createItems(int to)
@@ -2851,20 +2886,20 @@ int QDynamicListViewBase::itemIndex(const QListViewItem &item) const
}
void QDynamicListViewBase::addLeaf(QVector<int> &leaf, const QRect &area,
- uint visited, QBspTree::Data data)
+ uint visited, QBspTree::Data data)
{
QListViewItem *vi;
- QListViewPrivate *_this = static_cast<QListViewPrivate *>(data.ptr);
+ QDynamicListViewBase *_this = static_cast<QDynamicListViewBase *>(data.ptr);
for (int i = 0; i < leaf.count(); ++i) {
int idx = leaf.at(i);
- if (idx < 0 || idx >= _this->dynamicListView->items.count())
+ if (idx < 0 || idx >= _this->items.count())
continue;
- vi = &_this->dynamicListView->items[idx];
+ vi = &_this->items[idx];
Q_ASSERT(vi);
if (vi->isValid() && vi->rect().intersects(area) && vi->visited != visited) {
- QModelIndex index = _this->listViewItemToIndex(*vi);
+ QModelIndex index = _this->dd->listViewItemToIndex(*vi);
Q_ASSERT(index.isValid());
- _this->intersectVector.append(index);
+ _this->interSectingVector->append(index);
vi->visited = visited;
}
}
diff --git a/src/gui/itemviews/qlistview_p.h b/src/gui/itemviews/qlistview_p.h
index a7a7000..1727ba4 100644
--- a/src/gui/itemviews/qlistview_p.h
+++ b/src/gui/itemviews/qlistview_p.h
@@ -153,9 +153,6 @@ public:
inline bool isHidden(int row) const;
inline int hiddenCount() const;
- inline void clearIntersections() const;
- inline void appendToIntersections(const QModelIndex &idx) const;
-
inline bool isRightToLeft() const;
QListViewPrivate *dd;
@@ -186,7 +183,7 @@ public:
QPoint initStaticLayout(const QListViewLayoutInfo &info);
void doStaticLayout(const QListViewLayoutInfo &info);
- void intersectingStaticSet(const QRect &area) const;
+ QVector<QModelIndex> intersectingStaticSet(const QRect &area) const;
int itemIndex(const QListViewItem &item) const;
@@ -216,7 +213,7 @@ class QDynamicListViewBase : public QCommonListViewBase
friend class QListViewPrivate;
public:
QDynamicListViewBase(QListView *q, QListViewPrivate *d) : QCommonListViewBase(q, d),
- batchStartRow(0), batchSavedDeltaSeg(0) {}
+ batchStartRow(0), batchSavedDeltaSeg(0), interSectingVector(0) {}
QBspTree tree;
QVector<QListViewItem> items;
@@ -230,6 +227,7 @@ public:
// used when laying out in batches
int batchStartRow;
int batchSavedDeltaSeg;
+ QVector<QModelIndex> *interSectingVector; //used from within intersectingDynamicSet
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max);
@@ -237,7 +235,7 @@ public:
void initBspTree(const QSize &contents);
QPoint initDynamicLayout(const QListViewLayoutInfo &info);
void doDynamicLayout(const QListViewLayoutInfo &info);
- void intersectingDynamicSet(const QRect &area) const;
+ QVector<QModelIndex> intersectingDynamicSet(const QRect &area) const;
static void addLeaf(QVector<int> &leaf, const QRect &area,
uint visited, QBspTree::Data data);
@@ -277,11 +275,11 @@ public:
bool doItemsLayout(int num);
- inline void intersectingSet(const QRect &area, bool doLayout = true) const {
+ inline QVector<QModelIndex> intersectingSet(const QRect &area, bool doLayout = true) const {
if (doLayout) executePostedLayout();
QRect a = (q_func()->isRightToLeft() ? flipX(area.normalized()) : area.normalized());
- if (viewMode == QListView::ListMode) staticListView->intersectingStaticSet(a);
- else dynamicListView->intersectingDynamicSet(a);
+ return (viewMode == QListView::ListMode) ? staticListView->intersectingStaticSet(a)
+ : dynamicListView->intersectingDynamicSet(a);
}
// ### FIXME:
@@ -351,6 +349,8 @@ public:
void scrollElasticBandBy(int dx, int dy);
+ QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
+
// ### FIXME: we only need one at a time
QDynamicListViewBase *dynamicListView;
QStaticListViewBase *staticListView;
@@ -383,9 +383,6 @@ public:
QRect layoutBounds;
- // used for intersecting set
- mutable QVector<QModelIndex> intersectVector;
-
// timers
QBasicTimer batchLayoutTimer;
@@ -438,9 +435,6 @@ inline QAbstractItemDelegate *QCommonListViewBase::delegate(const QModelIndex &i
inline bool QCommonListViewBase::isHidden(int row) const { return dd->isHidden(row); }
inline int QCommonListViewBase::hiddenCount() const { return dd->hiddenRows.count(); }
-inline void QCommonListViewBase::clearIntersections() const { dd->intersectVector.clear(); }
-inline void QCommonListViewBase::appendToIntersections(const QModelIndex &idx) const { dd->intersectVector.append(idx); }
-
inline bool QCommonListViewBase::isRightToLeft() const { return qq->isRightToLeft(); }
QT_END_NAMESPACE
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index 30a8c96..fdc09ca 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -146,6 +146,7 @@ public:
const QModelIndex &source_parent) const;
QModelIndex proxy_to_source(const QModelIndex &proxyIndex) const;
QModelIndex source_to_proxy(const QModelIndex &sourceIndex) const;
+ bool can_create_mapping(const QModelIndex &source_parent) const;
void remove_from_mapping(const QModelIndex &source_parent);
@@ -354,6 +355,25 @@ QModelIndex QSortFilterProxyModelPrivate::source_to_proxy(const QModelIndex &sou
return create_index(proxy_row, proxy_column, it);
}
+bool QSortFilterProxyModelPrivate::can_create_mapping(const QModelIndex &source_parent) const
+{
+ if (source_parent.isValid()) {
+ QModelIndex source_grand_parent = source_parent.parent();
+ IndexMap::const_iterator it = source_index_mapping.constFind(source_grand_parent);
+ if (it == source_index_mapping.constEnd()) {
+ // Don't care, since we don't have mapping for the grand parent
+ return false;
+ }
+ Mapping *gm = it.value();
+ if (gm->proxy_rows.at(source_parent.row()) == -1 ||
+ gm->proxy_columns.at(source_parent.column()) == -1) {
+ // Don't care, since parent is filtered
+ return false;
+ }
+ }
+ return true;
+}
+
/*!
\internal
@@ -659,20 +679,8 @@ void QSortFilterProxyModelPrivate::source_items_inserted(
return;
IndexMap::const_iterator it = source_index_mapping.constFind(source_parent);
if (it == source_index_mapping.constEnd()) {
- if (source_parent.isValid()) {
- QModelIndex source_grand_parent = source_parent.parent();
- it = source_index_mapping.constFind(source_grand_parent);
- if (it == source_index_mapping.constEnd()) {
- // Don't care, since we don't have mapping for the grand parent
- return;
- }
- Mapping *gm = it.value();
- if (gm->proxy_rows.at(source_parent.row()) == -1 ||
- gm->proxy_columns.at(source_parent.column()) == -1) {
- // Don't care, since parent is filtered
- return;
- }
- }
+ if (!can_create_mapping(source_parent))
+ return;
it = create_mapping(source_parent);
Mapping *m = it.value();
QModelIndex proxy_parent = q->mapFromSource(source_parent);
@@ -1186,7 +1194,8 @@ void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted(
Q_UNUSED(end);
//Force the creation of a mapping now, even if its empty.
//We need it because the proxy can be acessed at the moment it emits rowsAboutToBeInserted in insert_source_items
- create_mapping(source_parent);
+ if (can_create_mapping(source_parent))
+ create_mapping(source_parent);
}
void QSortFilterProxyModelPrivate::_q_sourceRowsInserted(
@@ -1217,7 +1226,8 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeInserted(
Q_UNUSED(end);
//Force the creation of a mapping now, even if its empty.
//We need it because the proxy can be acessed at the moment it emits columnsAboutToBeInserted in insert_source_items
- create_mapping(source_parent);
+ if (can_create_mapping(source_parent))
+ create_mapping(source_parent);
}
void QSortFilterProxyModelPrivate::_q_sourceColumnsInserted(
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp
index e528e58..bd8fdac 100644
--- a/src/gui/itemviews/qstyleditemdelegate.cpp
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp
@@ -508,7 +508,7 @@ void QStyledItemDelegate::setEditorData(QWidget *editor, const QModelIndex &inde
}
/*!
- Gets data drom the \a editor widget and stores it in the specified
+ Gets data from the \a editor widget and stores it in the specified
\a model at the item \a index.
The default implementation gets the value to be stored in the data
@@ -671,15 +671,12 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
if (editor->parentWidget())
editor->parentWidget()->setFocus();
return true;
- } else if (event->type() == QEvent::FocusOut || event->type() == QEvent::Hide) {
+ } else if (event->type() == QEvent::FocusOut || (event->type() == QEvent::Hide && editor->isWindow())) {
//the Hide event will take care of he editors that are in fact complete dialogs
if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) {
- QWidget *w = QApplication::focusWidget();
- while (w) { // don't worry about focus changes internally in the editor
- if (w == editor)
- return false;
- w = w->parentWidget();
- }
+ if (editor->isAncestorOf(QApplication::focusWidget()))
+ return false; // don't worry about focus changes internally in the editor
+
#ifndef QT_NO_DRAGANDDROP
// The window may lose focus during an drag operation.
// i.e when dragging involves the taskbar on Windows.
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index c676237..2009499 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -1528,6 +1528,8 @@ void QTableView::updateGeometries()
++columnsInViewport;
}
}
+ columnsInViewport = qMax(columnsInViewport, 1); //there must be always at least 1 column
+
if (horizontalScrollMode() == QAbstractItemView::ScrollPerItem) {
const int visibleColumns = columnCount - d->horizontalHeader->hiddenSectionCount();
horizontalScrollBar()->setRange(0, visibleColumns - columnsInViewport);
@@ -1554,6 +1556,8 @@ void QTableView::updateGeometries()
++rowsInViewport;
}
}
+ rowsInViewport = qMax(rowsInViewport, 1); //there must be always at least 1 row
+
if (verticalScrollMode() == QAbstractItemView::ScrollPerItem) {
const int visibleRows = rowCount - d->verticalHeader->hiddenSectionCount();
verticalScrollBar()->setRange(0, visibleRows - rowsInViewport);
@@ -2036,7 +2040,7 @@ void QTableView::scrollTo(const QModelIndex &index, ScrollHint hint)
if (positionAtRight || hint == PositionAtCenter || positionAtLeft) {
int hiddenSections = 0;
if (d->horizontalHeader->sectionsHidden()) {
- for (int s = horizontalIndex; s >= 0; --s) {
+ for (int s = horizontalIndex - 1; s >= 0; --s) {
int column = d->horizontalHeader->logicalIndex(s);
if (d->horizontalHeader->isSectionHidden(column))
++hiddenSections;
@@ -2091,7 +2095,7 @@ void QTableView::scrollTo(const QModelIndex &index, ScrollHint hint)
if (hint == PositionAtBottom || hint == PositionAtCenter || hint == PositionAtTop) {
int hiddenSections = 0;
if (d->verticalHeader->sectionsHidden()) {
- for (int s = verticalIndex; s >= 0; --s) {
+ for (int s = verticalIndex - 1; s >= 0; --s) {
int row = d->verticalHeader->logicalIndex(s);
if (d->verticalHeader->isSectionHidden(row))
++hiddenSections;
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 7c319dc..7536d72 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -262,10 +262,6 @@ void QTreeView::setSelectionModel(QItemSelectionModel *selectionModel)
Q_D(QTreeView);
Q_ASSERT(selectionModel);
if (d->selectionModel) {
- if (d->allColumnsShowFocus) {
- QObject::disconnect(d->selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
- this, SLOT(_q_currentChanged(QModelIndex,QModelIndex)));
- }
// support row editing
disconnect(d->selectionModel, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
d->model, SLOT(submit()));
@@ -275,10 +271,6 @@ void QTreeView::setSelectionModel(QItemSelectionModel *selectionModel)
QAbstractItemView::setSelectionModel(selectionModel);
if (d->selectionModel) {
- if (d->allColumnsShowFocus) {
- QObject::connect(d->selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
- this, SLOT(_q_currentChanged(QModelIndex,QModelIndex)));
- }
// support row editing
connect(d->selectionModel, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
d->model, SLOT(submit()));
@@ -901,15 +893,6 @@ void QTreeView::setAllColumnsShowFocus(bool enable)
Q_D(QTreeView);
if (d->allColumnsShowFocus == enable)
return;
- if (d->selectionModel) {
- if (enable) {
- QObject::connect(d->selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
- this, SLOT(_q_currentChanged(QModelIndex,QModelIndex)));
- } else {
- QObject::disconnect(d->selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
- this, SLOT(_q_currentChanged(QModelIndex,QModelIndex)));
- }
- }
d->allColumnsShowFocus = enable;
d->viewport->update();
}
@@ -1112,18 +1095,22 @@ void QTreeView::scrollTo(const QModelIndex &index, ScrollHint hint)
} else if (hint == PositionAtTop || (hint == EnsureVisible && item < top)) {
verticalScrollBar()->setValue(item);
} else { // PositionAtBottom or PositionAtCenter
- int itemLocation = item;
+ const int currentItemHeight = d->itemHeight(item);
int y = (hint == PositionAtCenter
- ? area.height() / 2
+ //we center on the current item with a preference to the top item (ie. -1)
+ ? area.height() / 2 + currentItemHeight - 1
+ //otherwise we simply take the whole space
: area.height());
- while (y > 0 && item > 0)
- y -= d->itemHeight(item--);
- // end up half over the top of the area
- if (y < 0 && item < itemLocation)
- ++item;
- // end up half over the bottom of the area
- if (item >= 0 && item < itemLocation)
- ++item;
+ if (y > currentItemHeight) {
+ while (item >= 0) {
+ y -= d->itemHeight(item);
+ if (y < 0) { //there is no more space left
+ item++;
+ break;
+ }
+ item--;
+ }
+ }
verticalScrollBar()->setValue(item);
}
} else { // ScrollPerPixel
@@ -1267,10 +1254,13 @@ void QTreeView::paintEvent(QPaintEvent *event)
Q_D(QTreeView);
d->executePostedLayout();
QPainter painter(viewport());
+#ifndef QT_NO_ANIMATION
if (d->isAnimating()) {
- drawTree(&painter, event->region() - d->animationRect());
+ drawTree(&painter, event->region() - d->animatedOperation.rect());
d->drawAnimatedOperation(&painter);
- } else {
+ } else
+#endif //QT_NO_ANIMATION
+ {
drawTree(&painter, event->region());
#ifndef QT_NO_DRAGANDDROP
d->paintDropIndicator(&painter);
@@ -1306,13 +1296,13 @@ bool QTreeViewPrivate::expandOrCollapseItemAtPos(const QPoint &pos)
{
Q_Q(QTreeView);
// we want to handle mousePress in EditingState (persistent editors)
- if ((q->state() != QAbstractItemView::NoState
- && q->state() != QAbstractItemView::EditingState)
+ if ((state != QAbstractItemView::NoState
+ && state != QAbstractItemView::EditingState)
|| !viewport->rect().contains(pos))
return true;
int i = itemDecorationAt(pos);
- if ((i != -1) && q->itemsExpandable() && hasVisibleChildren(viewItems.at(i).index)) {
+ if ((i != -1) && itemsExpandable && hasVisibleChildren(viewItems.at(i).index)) {
if (viewItems.at(i).expanded)
collapse(i, true);
else
@@ -1335,6 +1325,50 @@ void QTreeViewPrivate::_q_modelDestroyed()
}
/*!
+ \reimp
+
+ We have a QTreeView way of knowing what elements are on the viewport
+*/
+QItemViewPaintPairs QTreeViewPrivate::draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const
+{
+ Q_ASSERT(r);
+ return QAbstractItemViewPrivate::draggablePaintPairs(indexes, r);
+ Q_Q(const QTreeView);
+ QRect &rect = *r;
+ const QRect viewportRect = viewport->rect();
+ int itemOffset = 0;
+ int row = firstVisibleItem(&itemOffset);
+ QPair<int, int> startEnd = startAndEndColumns(viewportRect);
+ QVector<int> columns;
+ for (int i = startEnd.first; i <= startEnd.second; ++i) {
+ int logical = header->logicalIndex(i);
+ if (!header->isSectionHidden(logical))
+ columns += logical;
+ }
+ QSet<QModelIndex> visibleIndexes;
+ for (; itemOffset < viewportRect.bottom() && row < viewItems.count(); ++row) {
+ const QModelIndex &index = viewItems.at(row).index;
+ for (int colIndex = 0; colIndex < columns.count(); ++colIndex)
+ visibleIndexes += index.sibling(index.row(), columns.at(colIndex));
+ itemOffset += itemHeight(row);
+ }
+
+ //now that we have the visible indexes, we can try to find those which are selected
+ QItemViewPaintPairs ret;
+ for (int i = 0; i < indexes.count(); ++i) {
+ const QModelIndex &index = indexes.at(i);
+ if (visibleIndexes.contains(index)) {
+ const QRect current = q->visualRect(index);
+ ret += qMakePair(current, index);
+ rect |= current;
+ }
+ }
+ rect &= viewportRect;
+ return ret;
+}
+
+
+/*!
\since 4.2
Draws the part of the tree intersecting the given \a region using the specified
\a painter.
@@ -2819,7 +2853,7 @@ int QTreeView::rowHeight(const QModelIndex &index) const
}
/*!
- \reimp
+ \internal
*/
void QTreeView::horizontalScrollbarAction(int action)
{
@@ -2851,10 +2885,9 @@ void QTreeViewPrivate::initialize()
header->setStretchLastSection(true);
header->setDefaultAlignment(Qt::AlignLeft|Qt::AlignVCenter);
q->setHeader(header);
-
- // animation
- QObject::connect(&timeline, SIGNAL(frameChanged(int)), q, SLOT(_q_animate()));
- QObject::connect(&timeline, SIGNAL(finished()), q, SLOT(_q_endAnimatedOperation()), Qt::QueuedConnection);
+#ifndef QT_NO_ANIMATION
+ QObject::connect(&animatedOperation, SIGNAL(finished()), q, SLOT(_q_endAnimatedOperation()));
+#endif //QT_NO_ANIMATION
}
void QTreeViewPrivate::expand(int item, bool emitSignal)
@@ -2864,10 +2897,11 @@ void QTreeViewPrivate::expand(int item, bool emitSignal)
if (item == -1 || viewItems.at(item).expanded)
return;
+#ifndef QT_NO_ANIMATION
if (emitSignal && animationsEnabled)
- prepareAnimatedOperation(item, AnimatedOperation::Expand);
-
- QAbstractItemView::State oldState = q->state();
+ prepareAnimatedOperation(item, QVariantAnimation::Forward);
+#endif //QT_NO_ANIMATION
+ QAbstractItemView::State oldState = state;
q->setState(QAbstractItemView::ExpandingState);
const QModelIndex index = viewItems.at(item).index;
storeExpanded(index);
@@ -2877,8 +2911,10 @@ void QTreeViewPrivate::expand(int item, bool emitSignal)
if (emitSignal) {
emit q->expanded(index);
+#ifndef QT_NO_ANIMATION
if (animationsEnabled)
beginAnimatedOperation();
+#endif //QT_NO_ANIMATION
}
if (model->canFetchMore(index))
model->fetchMore(index);
@@ -2902,10 +2938,12 @@ void QTreeViewPrivate::collapse(int item, bool emitSignal)
if (it == expandedIndexes.end() || viewItems.at(item).expanded == false)
return; // nothing to do
+#ifndef QT_NO_ANIMATION
if (emitSignal && animationsEnabled)
- prepareAnimatedOperation(item, AnimatedOperation::Collapse);
+ prepareAnimatedOperation(item, QVariantAnimation::Backward);
+#endif //QT_NO_ANIMATION
- QAbstractItemView::State oldState = q->state();
+ QAbstractItemView::State oldState = state;
q->setState(QAbstractItemView::CollapsingState);
expandedIndexes.erase(it);
viewItems[item].expanded = false;
@@ -2922,29 +2960,33 @@ void QTreeViewPrivate::collapse(int item, bool emitSignal)
if (emitSignal) {
emit q->collapsed(modelIndex);
+#ifndef QT_NO_ANIMATION
if (animationsEnabled)
beginAnimatedOperation();
+#endif //QT_NO_ANIMATION
}
}
-void QTreeViewPrivate::prepareAnimatedOperation(int item, AnimatedOperation::Type type)
+#ifndef QT_NO_ANIMATION
+void QTreeViewPrivate::prepareAnimatedOperation(int item, QVariantAnimation::Direction direction)
{
animatedOperation.item = item;
- animatedOperation.type = type;
+ animatedOperation.viewport = viewport;
+ animatedOperation.setDirection(direction);
int top = coordinateForItem(item) + itemHeight(item);
QRect rect = viewport->rect();
rect.setTop(top);
- if (type == AnimatedOperation::Collapse) {
+ if (direction == QVariantAnimation::Backward) {
const int limit = rect.height() * 2;
int h = 0;
int c = item + viewItems.at(item).total + 1;
for (int i = item + 1; i < c && h < limit; ++i)
h += itemHeight(i);
rect.setHeight(h);
- animatedOperation.duration = h;
+ animatedOperation.setEndValue(top + h);
}
- animatedOperation.top = top;
+ animatedOperation.setStartValue(top);
animatedOperation.before = renderTreeToPixmapForAnimation(rect);
}
@@ -2953,50 +2995,29 @@ void QTreeViewPrivate::beginAnimatedOperation()
Q_Q(QTreeView);
QRect rect = viewport->rect();
- rect.setTop(animatedOperation.top);
- if (animatedOperation.type == AnimatedOperation::Expand) {
+ rect.setTop(animatedOperation.top());
+ if (animatedOperation.direction() == QVariantAnimation::Forward) {
const int limit = rect.height() * 2;
int h = 0;
int c = animatedOperation.item + viewItems.at(animatedOperation.item).total + 1;
for (int i = animatedOperation.item + 1; i < c && h < limit; ++i)
h += itemHeight(i);
rect.setHeight(h);
- animatedOperation.duration = h;
+ animatedOperation.setEndValue(animatedOperation.top() + h);
}
animatedOperation.after = renderTreeToPixmapForAnimation(rect);
q->setState(QAbstractItemView::AnimatingState);
-
- timeline.stop();
- timeline.setDuration(250);
- timeline.setFrameRange(animatedOperation.top, animatedOperation.top + animatedOperation.duration);
- timeline.start();
-}
-
-void QTreeViewPrivate::_q_endAnimatedOperation()
-{
- Q_Q(QTreeView);
- animatedOperation.before = QPixmap();
- animatedOperation.after = QPixmap();
- q->setState(QAbstractItemView::NoState);
- q->updateGeometries();
- viewport->update();
-}
-
-void QTreeViewPrivate::_q_animate()
-{
- QRect rect = viewport->rect();
- rect.moveTop(animatedOperation.top);
- viewport->repaint(rect);
+ animatedOperation.start(); //let's start the animation
}
void QTreeViewPrivate::drawAnimatedOperation(QPainter *painter) const
{
- int start = timeline.startFrame();
- int end = timeline.endFrame();
- bool collapsing = animatedOperation.type == AnimatedOperation::Collapse;
- int current = collapsing ? end - timeline.currentFrame() + start : timeline.currentFrame();
+ const int start = animatedOperation.startValue().toInt(),
+ end = animatedOperation.endValue().toInt(),
+ current = animatedOperation.currentValue().toInt();
+ bool collapsing = animatedOperation.direction() == QVariantAnimation::Backward;
const QPixmap top = collapsing ? animatedOperation.before : animatedOperation.after;
painter->drawPixmap(0, start, top, 0, end - current - 1, top.width(), top.height());
const QPixmap bottom = collapsing ? animatedOperation.after : animatedOperation.before;
@@ -3039,26 +3060,14 @@ QPixmap QTreeViewPrivate::renderTreeToPixmapForAnimation(const QRect &rect) cons
return pixmap;
}
-void QTreeViewPrivate::_q_currentChanged(const QModelIndex &current, const QModelIndex &previous)
+void QTreeViewPrivate::_q_endAnimatedOperation()
{
Q_Q(QTreeView);
- if (previous.isValid()) {
- QRect previousRect = q->visualRect(previous);
- if (allColumnsShowFocus) {
- previousRect.setX(0);
- previousRect.setWidth(viewport->width());
- }
- viewport->update(previousRect);
- }
- if (current.isValid()) {
- QRect currentRect = q->visualRect(current);
- if (allColumnsShowFocus) {
- currentRect.setX(0);
- currentRect.setWidth(viewport->width());
- }
- viewport->update(currentRect);
- }
+ q->setState(QAbstractItemView::NoState);
+ q->updateGeometries();
+ viewport->update();
}
+#endif //QT_NO_ANIMATION
void QTreeViewPrivate::_q_modelAboutToBeReset()
{
@@ -3787,6 +3796,21 @@ void QTreeView::currentChanged(const QModelIndex &current, const QModelIndex &pr
}
#endif
QAbstractItemView::currentChanged(current, previous);
+
+ if (allColumnsShowFocus()) {
+ if (previous.isValid()) {
+ QRect previousRect = visualRect(previous);
+ previousRect.setX(0);
+ previousRect.setWidth(viewport()->width());
+ viewport()->update(previousRect);
+ }
+ if (current.isValid()) {
+ QRect currentRect = visualRect(current);
+ currentRect.setX(0);
+ currentRect.setWidth(viewport()->width());
+ viewport()->update(currentRect);
+ }
+ }
}
/*!
diff --git a/src/gui/itemviews/qtreeview.h b/src/gui/itemviews/qtreeview.h
index 35a205c..4411781 100644
--- a/src/gui/itemviews/qtreeview.h
+++ b/src/gui/itemviews/qtreeview.h
@@ -144,19 +144,20 @@ public:
void sortByColumn(int column, Qt::SortOrder order);
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void selectAll();
+
Q_SIGNALS:
void expanded(const QModelIndex &index);
void collapsed(const QModelIndex &index);
public Q_SLOTS:
- void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
void hideColumn(int column);
void showColumn(int column);
void expand(const QModelIndex &index);
void collapse(const QModelIndex &index);
void resizeColumnToContents(int column);
void sortByColumn(int column);
- void selectAll();
void expandAll();
void collapseAll();
void expandToDepth(int depth);
@@ -222,14 +223,11 @@ private:
Q_DECLARE_PRIVATE(QTreeView)
Q_DISABLE_COPY(QTreeView)
+#ifndef QT_NO_ANIMATION
Q_PRIVATE_SLOT(d_func(), void _q_endAnimatedOperation())
- Q_PRIVATE_SLOT(d_func(), void _q_animate())
- Q_PRIVATE_SLOT(d_func(), void _q_currentChanged(const QModelIndex&, const QModelIndex &))
- Q_PRIVATE_SLOT(d_func(), void _q_columnsAboutToBeRemoved(const QModelIndex &, int, int))
- Q_PRIVATE_SLOT(d_func(), void _q_columnsRemoved(const QModelIndex &, int, int))
+#endif //QT_NO_ANIMATION
Q_PRIVATE_SLOT(d_func(), void _q_modelAboutToBeReset())
Q_PRIVATE_SLOT(d_func(), void _q_sortIndicatorChanged(int column, Qt::SortOrder order))
- Q_PRIVATE_SLOT(d_func(), void _q_modelDestroyed())
};
#endif // QT_NO_TREEVIEW
diff --git a/src/gui/itemviews/qtreeview_p.h b/src/gui/itemviews/qtreeview_p.h
index 6a1dfe5..546dc75 100644
--- a/src/gui/itemviews/qtreeview_p.h
+++ b/src/gui/itemviews/qtreeview_p.h
@@ -54,6 +54,7 @@
//
#include "private/qabstractitemview_p.h"
+#include <QtCore/qvariantanimation.h>
#ifndef QT_NO_TREEVIEW
@@ -81,42 +82,41 @@ public:
uniformRowHeights(false), rootDecoration(true),
itemsExpandable(true), sortingEnabled(false),
expandsOnDoubleClick(true),
- allColumnsShowFocus(false),
+ allColumnsShowFocus(false), current(0),
animationsEnabled(false), columnResizeTimerID(0),
autoExpandDelay(-1), hoverBranch(-1), geometryRecursionBlock(false) {}
~QTreeViewPrivate() {}
void initialize();
- struct AnimatedOperation
+ QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
+
+#ifndef QT_NO_ANIMATION
+ struct AnimatedOperation : public QVariantAnimation
{
- enum Type { Expand, Collapse };
int item;
- int top;
- int duration;
- Type type;
QPixmap before;
QPixmap after;
- };
-
- void expand(int item, bool emitSignal);
- void collapse(int item, bool emitSignal);
-
- void prepareAnimatedOperation(int item, AnimatedOperation::Type type);
+ QWidget *viewport;
+ AnimatedOperation() : item(0) { setEasingCurve(QEasingCurve::InOutQuad); }
+ int top() const { return startValue().toInt(); }
+ QRect rect() const { QRect rect = viewport->rect(); rect.moveTop(top()); return rect; }
+ void updateCurrentValue(const QVariant &) { viewport->update(rect()); }
+ void updateState(State, State state) { if (state == Stopped) before = after = QPixmap(); }
+ } animatedOperation;
+ void prepareAnimatedOperation(int item, QVariantAnimation::Direction d);
void beginAnimatedOperation();
- void _q_endAnimatedOperation();
void drawAnimatedOperation(QPainter *painter) const;
QPixmap renderTreeToPixmapForAnimation(const QRect &rect) const;
+ void _q_endAnimatedOperation();
+#endif //QT_NO_ANIMATION
- inline QRect animationRect() const
- { return QRect(0, animatedOperation.top, viewport->width(),
- viewport->height() - animatedOperation.top); }
+ void expand(int item, bool emitSignal);
+ void collapse(int item, bool emitSignal);
- void _q_currentChanged(const QModelIndex&, const QModelIndex&);
void _q_columnsAboutToBeRemoved(const QModelIndex &, int, int);
void _q_columnsRemoved(const QModelIndex &, int, int);
void _q_modelAboutToBeReset();
- void _q_animate();
void _q_sortIndicatorChanged(int column, Qt::SortOrder order);
void _q_modelDestroyed();
@@ -177,8 +177,6 @@ public:
// used when expanding and collapsing items
QSet<QPersistentModelIndex> expandedIndexes;
- QStack<bool> expandParent;
- AnimatedOperation animatedOperation;
bool animationsEnabled;
inline bool storeExpanded(const QPersistentModelIndex &idx) {
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 2917592..e6eff6e 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -44,12 +44,8 @@ HEADERS += \
kernel/qkeymapper_p.h \
kernel/qgesture.h \
kernel/qgesture_p.h \
- kernel/qgesturemanager_p.h \
- kernel/qgesturerecognizer_p.h \
- kernel/qgesturerecognizer.h \
- kernel/qgesturestandardrecognizers_p.h \
- kernel/qdirectionrecognizer_p.h \
- kernel/qdirectionsimplificator_p.h
+ kernel/qstandardgestures.h \
+ kernel/qstandardgestures_p.h
SOURCES += \
kernel/qaction.cpp \
@@ -80,10 +76,7 @@ SOURCES += \
kernel/qwidgetaction.cpp \
kernel/qkeymapper.cpp \
kernel/qgesture.cpp \
- kernel/qgesturemanager.cpp \
- kernel/qgesturerecognizer.cpp \
- kernel/qgesturestandardrecognizers.cpp \
- kernel/qdirectionrecognizer.cpp
+ kernel/qstandardgestures.cpp
win32 {
DEFINES += QT_NO_DIRECTDRAW
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 59b00b8..e7cb5c2 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -81,7 +81,7 @@ static QString qt_strippedText(QString s)
QActionPrivate::QActionPrivate() : group(0), enabled(1), forceDisabled(0),
visible(1), forceInvisible(0), checkable(0), checked(0), separator(0), fontSet(false),
- menuRole(QAction::TextHeuristicRole), iconVisibleInMenu(-1)
+ menuRole(QAction::TextHeuristicRole), priority(QAction::NormalPriority), iconVisibleInMenu(-1)
{
#ifdef QT3_SUPPORT
static int qt_static_action_id = -1;
@@ -256,7 +256,9 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
as described in the QMenuBar documentation.
\value ApplicationSpecificRole This action should be put in the application menu with an application specific role
\value AboutQtRole This action matches handles the "About Qt" menu item.
- \value AboutRole This action should be placed where the "About" menu item is in the application menu.
+ \value AboutRole This action should be placed where the "About" menu item is in the application menu. The text of
+ the menu item will be set to "About <application name>". The application name is fetched from the
+ \c{Info.plist} file in the application's bundle (See \l{Deploying an Application on Mac OS X}).
\value PreferencesRole This action should be placed where the "Preferences..." menu item is in the application menu.
\value QuitRole This action should be placed where the Quit menu item is in the application menu.
*/
@@ -907,6 +909,52 @@ QString QAction::whatsThis() const
return d->whatsthis;
}
+/*!
+ \enum QAction::Priority
+ \since 4.6
+
+ This enum defines priorities for actions in user interface.
+
+ \value LowPriority The action should not be prioritized in
+ the user interface.
+
+ \value NormalPriority
+
+ \value HighPriority The action should be prioritized in
+ the user interface.
+
+ \sa priority
+*/
+
+
+/*!
+ \property QAction::priority
+ \since 4.6
+
+ \brief the actions's priority in the user interface.
+
+ This property can be set to indicate how the action should be prioritized
+ in the user interface.
+
+ For instance, when toolbars have the Qt::ToolButtonTextBesideIcon
+ mode set, then actions with LowPriority will not show the text
+ labels.
+*/
+void QAction::setPriority(Priority priority)
+{
+ Q_D(QAction);
+ if (d->priority == priority)
+ return;
+
+ d->priority = priority;
+ d->sendDataChanged();
+}
+
+QAction::Priority QAction::priority() const
+{
+ Q_D(const QAction);
+ return d->priority;
+}
/*!
\property QAction::checkable
diff --git a/src/gui/kernel/qaction.h b/src/gui/kernel/qaction.h
index 6920ec5..133fab4 100644
--- a/src/gui/kernel/qaction.h
+++ b/src/gui/kernel/qaction.h
@@ -67,6 +67,7 @@ class Q_GUI_EXPORT QAction : public QObject
Q_DECLARE_PRIVATE(QAction)
Q_ENUMS(MenuRole)
+ Q_ENUMS(Priority)
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
@@ -85,10 +86,14 @@ class Q_GUI_EXPORT QAction : public QObject
Q_PROPERTY(bool visible READ isVisible WRITE setVisible)
Q_PROPERTY(MenuRole menuRole READ menuRole WRITE setMenuRole)
Q_PROPERTY(bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu)
+ Q_PROPERTY(Priority priority READ priority WRITE setPriority)
public:
enum MenuRole { NoRole, TextHeuristicRole, ApplicationSpecificRole, AboutQtRole,
AboutRole, PreferencesRole, QuitRole };
+ enum Priority { LowPriority = 0,
+ NormalPriority = 128,
+ HighPriority = 256};
explicit QAction(QObject* parent);
QAction(const QString &text, QObject* parent);
QAction(const QIcon &icon, const QString &text, QObject* parent);
@@ -123,6 +128,9 @@ public:
void setWhatsThis(const QString &what);
QString whatsThis() const;
+ void setPriority(Priority priority);
+ Priority priority() const;
+
#ifndef QT_NO_MENU
QMenu *menu() const;
void setMenu(QMenu *menu);
diff --git a/src/gui/kernel/qaction_p.h b/src/gui/kernel/qaction_p.h
index bae9bbf..4745ed1 100644
--- a/src/gui/kernel/qaction_p.h
+++ b/src/gui/kernel/qaction_p.h
@@ -102,6 +102,7 @@ public:
uint separator : 1;
uint fontSet : 1;
QAction::MenuRole menuRole;
+ QAction::Priority priority;
int iconVisibleInMenu : 3; // Only has values -1, 0, and 1
QList<QWidget *> widgets;
#ifndef QT_NO_GRAPHICSVIEW
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 05d9b3c..b168188 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -90,8 +90,6 @@
#include "qapplication.h"
-#include <private/qgesturemanager_p.h>
-
#ifdef Q_WS_WINCE
#include "qdatetime.h"
#include "qguifunctions_wince.h"
@@ -128,7 +126,7 @@ int QApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly
QApplication::Type qt_appType=QApplication::Tty;
QApplicationPrivate *QApplicationPrivate::self = 0;
-QInputContext *QApplicationPrivate::inputContext;
+QInputContext *QApplicationPrivate::inputContext = 0;
bool QApplicationPrivate::quitOnLastWindowClosed = true;
@@ -137,14 +135,6 @@ int QApplicationPrivate::autoMaximizeThreshold = -1;
bool QApplicationPrivate::autoSipEnabled = false;
#endif
-QGestureManager* QGestureManager::instance()
-{
- QApplicationPrivate *d = qApp->d_func();
- if (!d->gestureManager)
- d->gestureManager = new QGestureManager(qApp);
- return d->gestureManager;
-}
-
QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::Type type)
: QCoreApplicationPrivate(argc, argv)
{
@@ -168,8 +158,6 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
directPainters = 0;
#endif
- gestureManager = 0;
-
if (!self)
self = this;
}
@@ -863,12 +851,6 @@ void QApplicationPrivate::initialize()
if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0)
q->setAttribute(Qt::AA_NativeWindows);
-#if defined(Q_WS_WIN)
- // Alien is not currently working on Windows 98
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)
- q->setAttribute(Qt::AA_NativeWindows);
-#endif
-
#ifdef Q_WS_WINCE
#ifdef QT_AUTO_MAXIMIZE_THRESHOLD
autoMaximizeThreshold = QT_AUTO_MAXIMIZE_THRESHOLD;
@@ -3601,14 +3583,6 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
#endif // !QT_NO_WHEELEVENT || !QT_NO_TABLETEVENT
}
- if (!d->grabbedGestures.isEmpty() && e->spontaneous() && receiver->isWidgetType()) {
- const QEvent::Type t = e->type();
- if (t != QEvent::Gesture && t != QEvent::GraphicsSceneGesture) {
- if (QGestureManager::instance()->filterEvent(static_cast<QWidget*>(receiver), e))
- return true;
- }
- }
-
// User input and window activation makes tooltips sleep
switch (e->type()) {
case QEvent::Wheel:
@@ -3742,6 +3716,13 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
Qt::MouseFocusReason);
}
+ // ### Qt 5 These dynamic tool tips should be an OPT-IN feature. Some platforms
+ // like Mac OS X (probably others too), can optimize their views by not
+ // dispatching mouse move events. We have attributes to control hover,
+ // and mouse tracking, but as long as we are deciding to implement this
+ // feature without choice of opting-in or out, you ALWAYS have to have
+ // tracking enabled. Therefore, the other properties give a false sense of
+ // performance enhancement.
if (e->type() == QEvent::MouseMove && mouse->buttons() == 0) {
d->toolTipWidget = w;
d->toolTipPos = relpos;
@@ -4067,6 +4048,19 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
touchEvent->setAccepted(eventAccepted);
break;
}
+ case QEvent::WinGesture:
+ {
+ // only propagate the first gesture event (after the GID_BEGIN)
+ QWidget *w = static_cast<QWidget *>(receiver);
+ while (w) {
+ e->ignore();
+ res = d->notify_helper(w, e);
+ if ((res && e->isAccepted()) || w->isWindow())
+ break;
+ w = w->parentWidget();
+ }
+ break;
+ }
default:
res = d->notify_helper(receiver, e);
break;
@@ -4414,13 +4408,13 @@ HRESULT qt_CoCreateGuid(GUID* guid)
{
// We will use the following information to create the GUID
// 1. absolute path to application
- wchar_t tempFilename[512];
- if (!GetModuleFileNameW(0, tempFilename, 512))
+ wchar_t tempFilename[MAX_PATH];
+ if (!GetModuleFileName(0, tempFilename, MAX_PATH))
return S_FALSE;
- unsigned int hash = qHash(QString::fromUtf16((const unsigned short *) tempFilename));
+ unsigned int hash = qHash(QString::fromWCharArray(tempFilename));
guid->Data1 = hash;
// 2. creation time of file
- QFileInfo info(QString::fromUtf16((const unsigned short *) tempFilename));
+ QFileInfo info(QString::fromWCharArray(tempFilename));
guid->Data2 = qHash(info.created().toTime_t());
// 3. current system time
guid->Data3 = qHash(QDateTime::currentDateTime().toTime_t());
@@ -4454,10 +4448,10 @@ QSessionManager::QSessionManager(QApplication * app, QString &id, QString &key)
GUID guid;
CoCreateGuid(&guid);
StringFromGUID2(guid, guidstr, 40);
- id = QString::fromUtf16((ushort*)guidstr);
+ id = QString::fromWCharArray(guidstr);
CoCreateGuid(&guid);
StringFromGUID2(guid, guidstr, 40);
- key = QString::fromUtf16((ushort*)guidstr);
+ key = QString::fromWCharArray(guidstr);
#endif
d->sessionId = id;
d->sessionKey = key;
@@ -5063,57 +5057,6 @@ bool QApplicationPrivate::shouldSetFocus(QWidget *w, Qt::FocusPolicy policy)
return true;
}
-/*!
- \since 4.6
-
- Adds custom gesture \a recognizer object.
-
- Qt takes ownership of the provided \a recognizer.
-
- \sa Qt::AA_EnableGestures, QGestureEvent
-*/
-void QApplication::addGestureRecognizer(QGestureRecognizer *recognizer)
-{
- QGestureManager::instance()->addRecognizer(recognizer);
-}
-
-/*!
- \since 4.6
-
- Removes custom gesture \a recognizer object.
-
- \sa Qt::AA_EnableGestures, QGestureEvent
-*/
-void QApplication::removeGestureRecognizer(QGestureRecognizer *recognizer)
-{
- Q_D(QApplication);
- if (!d->gestureManager)
- return;
- d->gestureManager->removeRecognizer(recognizer);
-}
-
-/*!
- \property QApplication::eventDeliveryDelayForGestures
- \since 4.6
-
- Specifies the \a delay before input events are delivered to the
- gesture enabled widgets.
-
- The delay allows to postpone widget's input event handling until
- gestures framework can successfully recognize a gesture.
-
- \sa QWidget::grabGesture
-*/
-void QApplication::setEventDeliveryDelayForGestures(int delay)
-{
- QGestureManager::instance()->setEventDeliveryDelay(delay);
-}
-
-int QApplication::eventDeliveryDelayForGestures()
-{
- return QGestureManager::instance()->eventDeliveryDelay();
-}
-
/*! \fn QDecoration &QApplication::qwsDecoration()
Return the QWSDecoration used for decorating windows.
@@ -5297,8 +5240,6 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
const QList<QTouchEvent::TouchPoint> &touchPoints)
{
QApplicationPrivate *d = self;
- QApplication *q = self->q_func();
-
typedef QPair<Qt::TouchPointStates, QList<QTouchEvent::TouchPoint> > StatesAndTouchPoints;
QHash<QWidget *, StatesAndTouchPoints> widgetsNeedingEvents;
@@ -5320,7 +5261,7 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
if (!widget) {
// determine which widget this event will go to
if (!window)
- window = q->topLevelAt(touchPoint.screenPos().toPoint());
+ window = QApplication::topLevelAt(touchPoint.screenPos().toPoint());
if (!window)
continue;
widget = window->childAt(window->mapFromGlobal(touchPoint.screenPos().toPoint()));
@@ -5420,7 +5361,7 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
QTouchEvent touchEvent(eventType,
deviceType,
- q->keyboardModifiers(),
+ QApplication::keyboardModifiers(),
it.value().first,
it.value().second);
updateTouchPointsForWidget(widget, &touchEvent);
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index 954f824..19ae085 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -71,7 +71,6 @@ class QStyle;
class QEventLoop;
class QIcon;
class QInputContext;
-class QGestureRecognizer;
template <typename T> class QList;
class QLocale;
#if defined(Q_WS_QWS)
@@ -107,7 +106,6 @@ class Q_GUI_EXPORT QApplication : public QCoreApplication
Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold)
Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled)
#endif
- Q_PROPERTY(int eventDeliveryDelayForGestures READ eventDeliveryDelayForGestures WRITE setEventDeliveryDelayForGestures)
public:
enum Type { Tty, GuiClient, GuiServer };
@@ -268,12 +266,6 @@ public:
static bool keypadNavigationEnabled();
#endif
- void addGestureRecognizer(QGestureRecognizer *recognizer);
- void removeGestureRecognizer(QGestureRecognizer *recognizer);
-
- void setEventDeliveryDelayForGestures(int delay);
- int eventDeliveryDelayForGestures();
-
Q_SIGNALS:
void lastWindowClosed();
void focusChanged(QWidget *old, QWidget *now);
@@ -382,7 +374,6 @@ private:
friend class QDirectPainter;
friend class QDirectPainterPrivate;
#endif
- friend class QGestureManager;
#if defined(Q_WS_WIN)
friend QApplicationPrivate* getQApplicationPrivateInternal();
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index ad9f220..beccfb0 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1069,7 +1069,7 @@ void qt_init(QApplicationPrivate *priv, int)
if (GetCurrentProcess(&psn) == noErr) {
// Jambi needs to transform itself since most people aren't "used"
// to putting things in bundles, but other people may actually not
- // want to tranform the process (running as a helper or somethng)
+ // want to tranform the process (running as a helper or something)
// so don't do that for them. This means checking both LSUIElement
// and LSBackgroundOnly. If you set them both... well, you
// shouldn't do that.
@@ -1316,8 +1316,13 @@ void QApplication::setOverrideCursor(const QCursor &cursor)
{
qApp->d_func()->cursor_list.prepend(cursor);
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool;
+ [static_cast<NSCursor *>(qt_mac_nsCursorForQCursor(cursor)) push];
+#else
if (qApp && qApp->activeWindow())
qt_mac_set_cursor(&qApp->d_func()->cursor_list.first(), QCursor::pos());
+#endif
}
void QApplication::restoreOverrideCursor()
@@ -1326,12 +1331,17 @@ void QApplication::restoreOverrideCursor()
return;
qApp->d_func()->cursor_list.removeFirst();
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool;
+ [NSCursor pop];
+#else
if (qApp && qApp->activeWindow()) {
const QCursor def(Qt::ArrowCursor);
qt_mac_set_cursor(qApp->d_func()->cursor_list.isEmpty() ? &def : &qApp->d_func()->cursor_list.first(), QCursor::pos());
}
-}
#endif
+}
+#endif // QT_NO_CURSOR
QWidget *QApplication::topLevelAt(const QPoint &p)
{
@@ -1367,29 +1377,6 @@ QWidget *QApplication::topLevelAt(const QPoint &p)
#endif
}
-static QWidget *qt_mac_recursive_widgetAt(QWidget *widget, int x, int y)
-{
- if (!widget)
- return 0;
- const QObjectList kids = widget->children();
- for(int i = kids.size()-1; i >= 0; --i) {
- if ( QWidget *kid = qobject_cast<QWidget*>(kids.at(i)) ) {
- if (kid->isVisible() && !kid->isTopLevel() &&
- !kid->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- const int wx=kid->x(), wy=kid->y(),
- wx2=wx+kid->width(), wy2=wy+kid->height();
- if (x >= wx && y >= wy && x < wx2 && y < wy2) {
- const QRegion mask = kid->mask();
- if (!mask.isEmpty() && !mask.contains(QPoint(x-wx, y-wy)))
- continue;
- return qt_mac_recursive_widgetAt(kid, x-wx, y-wy);
- }
- }
- }
- }
- return widget;
-}
-
/*****************************************************************************
Main event loop
*****************************************************************************/
@@ -1760,7 +1747,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
if(window) {
HIViewRef hiview;
if(HIViewGetViewForMouseEvent(HIViewGetRoot(window), event, &hiview) == noErr) {
- widget = QWidget::find((WId)hiview);;
+ widget = QWidget::find((WId)hiview);
if (widget) {
// Make sure we didn't pass over a widget with a "fake hole" in it.
QWidget *otherWidget = QApplication::widgetAt(where.h, where.v);
@@ -1877,9 +1864,10 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
tablet_button_state = new_tablet_button_state;
QMacTabletHash *tabletHash = qt_mac_tablet_hash();
- if (!tabletHash->contains(tabletPointRec.deviceID)) {
- qWarning("QCocoaView handleTabletEvent: This tablet device is unknown"
- " (received no proximity event for it). Discarding event.");
+ if (!tabletHash->contains(tabletPointRec.deviceID) && t != QEvent::TabletRelease) {
+ // Never discard TabletRelease events as they may be delivered *after* TabletLeaveProximity events
+ qWarning("handleTabletEvent: This tablet device is unknown"
+ " (received no proximity event for it). Discarding event.");
return false;
}
QTabletDeviceData &deviceData = tabletHash->operator[](tabletPointRec.deviceID);
@@ -1921,8 +1909,13 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
tp, rotation, z, modifiers, deviceData.tabletUniqueID);
QApplication::sendSpontaneousEvent(widget, &e);
if (e.isAccepted()) {
+ if (t == QEvent::TabletPress) {
+ qt_button_down = widget;
+ } else if (t == QEvent::TabletRelease) {
+ qt_button_down = 0;
+ }
#if defined(DEBUG_MOUSE_MAPS)
- qDebug("Bail out early due to table acceptance");
+ qDebug("Bail out early due to tablet acceptance");
#endif
break;
}
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 4b2bf15..3692160 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -158,17 +158,19 @@ inline QPointF QTabletDeviceData::scaleCoord(int coordX, int coordY,
int outOriginY, int outExtentY) const
{
QPointF ret;
+
if (sign(outExtentX) == sign(maxX))
- ret.setX(((coordX - minX) * qAbs(outExtentX) / qAbs(qreal(maxX))) + outOriginX);
+ ret.setX(((coordX - minX) * qAbs(outExtentX) / qAbs(qreal(maxX - minX))) + outOriginX);
else
- ret.setX(((qAbs(maxX) - (coordX - minX)) * qAbs(outExtentX) / qAbs(qreal(maxX)))
+ ret.setX(((qAbs(maxX) - (coordX - minX)) * qAbs(outExtentX) / qAbs(qreal(maxX - minX)))
+ outOriginX);
if (sign(outExtentY) == sign(maxY))
- ret.setY(((coordY - minY) * qAbs(outExtentY) / qAbs(qreal(maxY))) + outOriginY);
+ ret.setY(((coordY - minY) * qAbs(outExtentY) / qAbs(qreal(maxY - minY))) + outOriginY);
else
- ret.setY(((qAbs(maxY) - (coordY - minY)) * qAbs(outExtentY) / qAbs(qreal(maxY)))
+ ret.setY(((qAbs(maxY) - (coordY - minY)) * qAbs(outExtentY) / qAbs(qreal(maxY - minY)))
+ outOriginY);
+
return ret;
}
#endif
@@ -193,7 +195,110 @@ extern "C" {
typedef BOOL (WINAPI *qt_RegisterTouchWindowPtr)(HWND, ULONG);
typedef BOOL (WINAPI *qt_GetTouchInputInfoPtr)(HANDLE, UINT, PVOID, int);
typedef BOOL (WINAPI *qt_CloseTouchInputHandlePtr)(HANDLE);
-#endif
+
+typedef BOOL (WINAPI *PtrGetGestureInfo)(HANDLE hGestureInfo, PVOID pGestureInfo);
+typedef BOOL (WINAPI *PtrGetGestureExtraArgs)(HANDLE hGestureInfo, UINT cbExtraArgs, PBYTE pExtraArgs);
+typedef BOOL (WINAPI *PtrCloseGestureInfoHandle)(HANDLE hGestureInfo);
+typedef BOOL (WINAPI *PtrSetGestureConfig)(HWND hwnd, DWORD dwReserved, UINT cIDs,
+ PVOID pGestureConfig,
+ UINT cbSize);
+typedef BOOL (WINAPI *PtrGetGestureConfig)(HWND hwnd, DWORD dwReserved,
+ DWORD dwFlags, PUINT pcIDs,
+ PVOID pGestureConfig,
+ UINT cbSize);
+
+typedef BOOL (WINAPI *PtrBeginPanningFeedback)(HWND hwnd);
+typedef BOOL (WINAPI *PtrUpdatePanningFeedback)(HWND hwnd, LONG, LONG, BOOL);
+typedef BOOL (WINAPI *PtrEndPanningFeedback)(HWND hwnd, BOOL);
+
+#ifndef WM_GESTURE
+
+#define WM_GESTURE 0x0119
+#define WM_GESTURE_NOTIFY 0x011A
+
+DECLARE_HANDLE(HGESTUREINFO);
+
+#define GF_BEGIN 0x00000001
+#define GF_INERTIA 0x00000002
+#define GF_END 0x00000004
+
+/*
+ * Gesture IDs
+ */
+#define GID_BEGIN 1
+#define GID_END 2
+#define GID_ZOOM 3
+#define GID_PAN 4
+#define GID_ROTATE 5
+#define GID_TWOFINGERTAP 6
+#define GID_ROLLOVER 7
+
+typedef struct tagGESTUREINFO {
+ UINT cbSize; // size, in bytes, of this structure (including variable length Args field)
+ DWORD dwFlags; // see GF_* flags
+ DWORD dwID; // gesture ID, see GID_* defines
+ HWND hwndTarget; // handle to window targeted by this gesture
+ POINTS ptsLocation; // current location of this gesture
+ DWORD dwInstanceID; // internally used
+ DWORD dwSequenceID; // internally used
+ ULONGLONG ullArguments; // arguments for gestures whose arguments fit in 8 BYTES
+ UINT cbExtraArgs; // size, in bytes, of extra arguments, if any, that accompany this gesture
+} GESTUREINFO, *PGESTUREINFO;
+typedef GESTUREINFO const * PCGESTUREINFO;
+
+typedef struct tagGESTURENOTIFYSTRUCT {
+ UINT cbSize; // size, in bytes, of this structure
+ DWORD dwFlags; // unused
+ HWND hwndTarget; // handle to window targeted by the gesture
+ POINTS ptsLocation; // starting location
+ DWORD dwInstanceID; // internally used
+} GESTURENOTIFYSTRUCT, *PGESTURENOTIFYSTRUCT;
+
+/*
+ * Gesture argument helpers
+ * - Angle should be a double in the range of -2pi to +2pi
+ * - Argument should be an unsigned 16-bit value
+ */
+#define GID_ROTATE_ANGLE_TO_ARGUMENT(_arg_) ((USHORT)((((_arg_) + 2.0 * 3.14159265) / (4.0 * 3.14159265)) * 65535.0))
+#define GID_ROTATE_ANGLE_FROM_ARGUMENT(_arg_) ((((double)(_arg_) / 65535.0) * 4.0 * 3.14159265) - 2.0 * 3.14159265)
+
+typedef struct tagGESTURECONFIG {
+ DWORD dwID; // gesture ID
+ DWORD dwWant; // settings related to gesture ID that are to be turned on
+ DWORD dwBlock; // settings related to gesture ID that are to be turned off
+} GESTURECONFIG, *PGESTURECONFIG;
+
+#define GC_ALLGESTURES 0x00000001
+#define GC_ZOOM 0x00000001
+#define GC_PAN 0x00000001
+#define GC_PAN_WITH_SINGLE_FINGER_VERTICALLY 0x00000002
+#define GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY 0x00000004
+#define GC_PAN_WITH_GUTTER 0x00000008
+#define GC_PAN_WITH_INERTIA 0x00000010
+#define GC_ROTATE 0x00000001
+#define GC_TWOFINGERTAP 0x00000001
+#define GC_ROLLOVER 0x00000001
+#define GESTURECONFIGMAXCOUNT 256 // Maximum number of gestures that can be included
+ // in a single call to SetGestureConfig / GetGestureConfig
+
+
+
+#define GCF_INCLUDE_ANCESTORS 0x00000001 // If specified, GetGestureConfig returns consolidated configuration
+ // for the specified window and it's parent window chain
+
+#endif // WM_GESTURE
+
+#endif // Q_WS_WIN
+
+class QPanGesture;
+class QPinchGesture;
+struct StandardGestures
+{
+ QPanGesture *pan;
+ QPinchGesture *pinch;
+ StandardGestures() : pan(0), pinch(0) { }
+};
+
class QScopedLoopLevelCounter
{
@@ -439,10 +544,6 @@ public:
void sendSyntheticEnterLeave(QWidget *widget);
#endif
- QGestureManager *gestureManager;
- // map<gesture name -> number of widget subscribed to it>
- QMap<QString, int> grabbedGestures;
-
QMap<int, QWidget *> widgetForTouchPointId;
QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints;
static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent);
@@ -465,6 +566,19 @@ public:
QHash<DWORD, int> touchInputIDToTouchPointID;
QList<QTouchEvent::TouchPoint> appAllTouchPoints;
bool translateTouchEvent(const MSG &msg);
+
+ typedef QMap<QWidget*, StandardGestures> WidgetStandardGesturesMap;
+ WidgetStandardGesturesMap widgetGestures;
+ ulong lastGestureId;
+
+ PtrGetGestureInfo GetGestureInfo;
+ PtrGetGestureExtraArgs GetGestureExtraArgs;
+ PtrCloseGestureInfoHandle CloseGestureInfoHandle;
+ PtrSetGestureConfig SetGestureConfig;
+ PtrGetGestureConfig GetGestureConfig;
+ PtrBeginPanningFeedback BeginPanningFeedback;
+ PtrUpdatePanningFeedback UpdatePanningFeedback;
+ PtrEndPanningFeedback EndPanningFeedback;
#endif
#ifdef QT_RX71_MULTITOUCH
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp
index f568438..347afc8 100644
--- a/src/gui/kernel/qapplication_qws.cpp
+++ b/src/gui/kernel/qapplication_qws.cpp
@@ -661,10 +661,14 @@ void QWSDisplay::Data::sendSynchronousCommand(QWSCommand & cmd)
int QWSDisplay::Data::takeId()
{
- if (unused_identifiers.count() == 10)
+ int unusedIdCount = unused_identifiers.count();
+ if (unusedIdCount == 10)
create(15);
- if (unused_identifiers.count() == 0)
+ if (unusedIdCount == 0) {
+ create(1); // Make sure we have an incoming id to wait for, just in case we're recursive
waitForCreation();
+ }
+
return unused_identifiers.takeFirst();
}
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index bb7d931..cbcac9a 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -89,6 +89,8 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c
#include <private/qkeymapper_p.h>
#include <private/qlocale_p.h>
#include "qevent_p.h"
+#include "qstandardgestures.h"
+#include "qstandardgestures_p.h"
//#define ALIEN_DEBUG
@@ -105,7 +107,6 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c
#endif
#endif // QT_NO_ACCESSIBILITY
-#include <winuser.h>
#if !defined(WINABLEAPI)
# if defined(Q_WS_WINCE)
# include <bldver.h>
@@ -145,24 +146,6 @@ typedef struct tagTOUCHINPUT
#endif
-#ifndef FLASHW_STOP
-typedef struct {
- UINT cbSize;
- HWND hwnd;
- DWORD dwFlags;
- UINT uCount;
- DWORD dwTimeout;
-} FLASHWINFO, *PFLASHWINFO;
-#define FLASHW_STOP 0
-#define FLASHW_CAPTION 0x00000001
-#define FLASHW_TRAY 0x00000002
-#define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY)
-#define FLASHW_TIMER 0x00000004
-#define FLASHW_TIMERNOFG 0x0000000C
-#endif /* FLASHW_STOP */
-typedef BOOL (WINAPI *PtrFlashWindowEx)(PFLASHWINFO pfwi);
-static PtrFlashWindowEx pFlashWindowEx = 0;
-
#include <windowsx.h>
#include <limits.h>
#include <string.h>
@@ -272,10 +255,6 @@ QTabletDeviceData currentTabletPointer;
// from qregion_win.cpp
extern HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right, int bottom);
-Q_CORE_EXPORT bool winPeekMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin,
- UINT wMsgFilterMax, UINT wRemoveMsg);
-Q_CORE_EXPORT bool winPostMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
// support for on-the-fly changes of the XP theme engine
#ifndef WM_THEMECHANGED
#define WM_THEMECHANGED 0x031A
@@ -290,22 +269,24 @@ Q_CORE_EXPORT bool winPostMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
#define WM_XBUTTONDOWN 0x020B
#define WM_XBUTTONUP 0x020C
#define WM_XBUTTONDBLCLK 0x020D
+#endif
+#ifndef GET_KEYSTATE_WPARAM
#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
#define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
#define XBUTTON1 0x0001
#define XBUTTON2 0x0002
+#endif
+#ifndef MK_XBUTTON1
#define MK_XBUTTON1 0x0020
#define MK_XBUTTON2 0x0040
#endif
-#ifdef Q_WS_WINCE
-#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
-#endif
-
-// support for multi-media-keys on ME/2000/XP
+// support for multi-media-keys
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x0319
+#endif
+#ifndef FAPPCOMMAND_MOUSE
#define FAPPCOMMAND_MOUSE 0x8000
#define FAPPCOMMAND_KEY 0
#define FAPPCOMMAND_OEM 0x1000
@@ -373,9 +354,7 @@ Q_CORE_EXPORT bool winPostMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
#define APPCOMMAND_MEDIA_CHANNEL_DOWN 52
#endif // APPCOMMAND_MICROPHONE_VOLUME_MUTE
-#endif // WM_APPCOMMAND
-
-static UINT WM95_MOUSEWHEEL = 0;
+#endif // FAPPCOMMAND_MOUSE
#if (_WIN32_WINNT < 0x0400)
// This struct is defined in winuser.h if the _WIN32_WINNT >= 0x0400 -- in the
@@ -475,6 +454,7 @@ public:
bool translateConfigEvent(const MSG &msg);
bool translateCloseEvent(const MSG &msg);
bool translateTabletEvent(const MSG &msg, PACKET *localPacketBuf, int numPackets);
+ bool translateGestureEvent(const MSG &msg);
void repolishStyle(QStyle &style);
inline void showChildren(bool spontaneous) { d_func()->showChildren(spontaneous); }
inline void hideChildren(bool spontaneous) { d_func()->hideChildren(spontaneous); }
@@ -543,14 +523,13 @@ static void qt_set_windows_color_resources()
pal.setColor(QPalette::Inactive, QPalette::Light, pal.light().color());
pal.setColor(QPalette::Inactive, QPalette::Dark, pal.dark().color());
- if (QSysInfo::WindowsVersion != QSysInfo::WV_NT && QSysInfo::WindowsVersion != QSysInfo::WV_95) {
- if (pal.midlight() == pal.button())
- pal.setColor(QPalette::Midlight, pal.button().color().lighter(110));
- if (pal.background() != pal.base()) {
- pal.setColor(QPalette::Inactive, QPalette::Highlight, pal.color(QPalette::Inactive, QPalette::Window));
- pal.setColor(QPalette::Inactive, QPalette::HighlightedText, pal.color(QPalette::Inactive, QPalette::Text));
- }
+ if (pal.midlight() == pal.button())
+ pal.setColor(QPalette::Midlight, pal.button().color().lighter(110));
+ if (pal.background() != pal.base()) {
+ pal.setColor(QPalette::Inactive, QPalette::Highlight, pal.color(QPalette::Inactive, QPalette::Window));
+ pal.setColor(QPalette::Inactive, QPalette::HighlightedText, pal.color(QPalette::Inactive, QPalette::Text));
}
+
const QColor bg = pal.background().color();
const QColor fg = pal.foreground().color(), btn = pal.button().color();
QColor disabled((fg.red()+btn.red())/2,(fg.green()+btn.green())/2,
@@ -601,35 +580,18 @@ static void qt_set_windows_color_resources()
static void qt_set_windows_font_resources()
{
#ifndef Q_WS_WINCE
- QFont menuFont;
- QFont messageFont;
- QFont statusFont;
- QFont titleFont;
- QFont iconTitleFont;
- QT_WA({
- NONCLIENTMETRICS ncm;
- ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONTW);
- SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize , &ncm, 0);
- menuFont = qt_LOGFONTtoQFont(ncm.lfMenuFont,true);
- messageFont = qt_LOGFONTtoQFont(ncm.lfMessageFont,true);
- statusFont = qt_LOGFONTtoQFont(ncm.lfStatusFont,true);
- titleFont = qt_LOGFONTtoQFont(ncm.lfCaptionFont,true);
- LOGFONTW lfIconTitleFont;
- SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lfIconTitleFont), &lfIconTitleFont, 0);
- iconTitleFont = qt_LOGFONTtoQFont(lfIconTitleFont,true);
- } , {
- // A version
- NONCLIENTMETRICSA ncm;
- ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, lfMessageFont) + sizeof(LOGFONTA);
- SystemParametersInfoA(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
- menuFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfMenuFont,true);
- messageFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfMessageFont,true);
- statusFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfStatusFont,true);
- titleFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfCaptionFont,true);
- LOGFONTA lfIconTitleFont;
- SystemParametersInfoA(SPI_GETICONTITLELOGFONT, sizeof(lfIconTitleFont), &lfIconTitleFont, 0);
- iconTitleFont = qt_LOGFONTtoQFont((LOGFONT&)lfIconTitleFont,true);
- });
+ NONCLIENTMETRICS ncm;
+ ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONT);
+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize , &ncm, 0);
+
+ QFont menuFont = qt_LOGFONTtoQFont(ncm.lfMenuFont, true);
+ QFont messageFont = qt_LOGFONTtoQFont(ncm.lfMessageFont, true);
+ QFont statusFont = qt_LOGFONTtoQFont(ncm.lfStatusFont, true);
+ QFont titleFont = qt_LOGFONTtoQFont(ncm.lfCaptionFont, true);
+
+ LOGFONT lfIconTitleFont;
+ SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lfIconTitleFont), &lfIconTitleFont, 0);
+ QFont iconTitleFont = qt_LOGFONTtoQFont(lfIconTitleFont, true);
QApplication::setFont(menuFont, "QMenu");
QApplication::setFont(menuFont, "QMenuBar");
@@ -657,26 +619,13 @@ static void qt_set_windows_font_resources()
static void qt_win_read_cleartype_settings()
{
+ UINT result = 0;
#ifdef Q_OS_WINCE
- UINT result;
- BOOL ok;
- ok = SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &result, 0);
- if (ok)
- qt_cleartype_enabled = result;
+ if (SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &result, 0))
+ qt_cleartype_enabled = result;
#else
- QT_WA({
- UINT result;
- BOOL ok;
- ok = SystemParametersInfoW(SPI_GETFONTSMOOTHINGTYPE, 0, &result, 0);
- if (ok)
- qt_cleartype_enabled = (result == FE_FONTSMOOTHINGCLEARTYPE);
- }, {
- UINT result;
- BOOL ok;
- ok = SystemParametersInfoA(SPI_GETFONTSMOOTHINGTYPE, 0, &result, 0);
- if (ok)
- qt_cleartype_enabled = (result == FE_FONTSMOOTHINGCLEARTYPE);
- });
+ if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &result, 0))
+ qt_cleartype_enabled = (result == FE_FONTSMOOTHINGCLEARTYPE);
#endif
}
@@ -694,10 +643,10 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
QPalette pal = *QApplicationPrivate::sys_pal;
QColor menuCol(qt_colorref2qrgb(GetSysColor(COLOR_MENU)));
QColor menuText(qt_colorref2qrgb(GetSysColor(COLOR_MENUTEXT)));
- BOOL isFlat = 0;
+ BOOL isFlat = false;
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
- SystemParametersInfo(0x1022 /*SPI_GETFLATMENU*/, 0, &isFlat, 0);
+ SystemParametersInfo(SPI_GETFLATMENU, 0, &isFlat, 0);
QPalette menu(pal);
// we might need a special color group for the menu.
menu.setColor(QPalette::Active, QPalette::Button, menuCol);
@@ -712,8 +661,7 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
QColor(qt_colorref2qrgb(GetSysColor(
(QSysInfo::WindowsVersion >= QSysInfo::WV_XP
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
- && isFlat ? COLOR_MENUHILIGHT
- : COLOR_HIGHLIGHT))));
+ && isFlat ? COLOR_MENUHILIGHT : COLOR_HIGHLIGHT))));
menu.setColor(QPalette::Disabled, QPalette::HighlightedText, disabled);
menu.setColor(QPalette::Disabled, QPalette::Button,
menu.color(QPalette::Active, QPalette::Button));
@@ -729,10 +677,8 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
menu.color(QPalette::Active, QPalette::Highlight));
menu.setColor(QPalette::Inactive, QPalette::HighlightedText,
menu.color(QPalette::Active, QPalette::HighlightedText));
-
- if (QSysInfo::WindowsVersion != QSysInfo::WV_NT && QSysInfo::WindowsVersion != QSysInfo::WV_95)
- menu.setColor(QPalette::Inactive, QPalette::ButtonText,
- pal.color(QPalette::Inactive, QPalette::Dark));
+ menu.setColor(QPalette::Inactive, QPalette::ButtonText,
+ pal.color(QPalette::Inactive, QPalette::Dark));
QApplication::setPalette(menu, "QMenu");
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
@@ -749,15 +695,10 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
qt_init() - initializes Qt for Windows
*****************************************************************************/
-typedef BOOL (WINAPI *PtrUpdateLayeredWindow)(HWND hwnd, HDC hdcDst, const POINT *pptDst,
- const SIZE *psize, HDC hdcSrc, const POINT *pptSrc, COLORREF crKey,
- const Q_BLENDFUNCTION *pblend, DWORD dwflags);
-
typedef BOOL (WINAPI *PtrSetProcessDPIAware) (VOID);
-
-static PtrUpdateLayeredWindow ptrUpdateLayeredWindow = 0;
static PtrSetProcessDPIAware ptrSetProcessDPIAware = 0;
-
+PtrUpdateLayeredWindow ptrUpdateLayeredWindow = 0;
+PtrUpdateLayeredWindowIndirect ptrUpdateLayeredWindowIndirect = 0;
static BOOL WINAPI qt_updateLayeredWindowIndirect(HWND hwnd, const Q_UPDATELAYEREDWINDOWINFO *info)
{
return (*ptrUpdateLayeredWindow)(hwnd, info->hdcDst, info->pptDst, info->psize, info->hdcSrc,
@@ -822,46 +763,30 @@ void qt_init(QApplicationPrivate *priv, int)
#endif
qApp->setObjectName(priv->appName());
-#if !defined(Q_WS_WINCE)
// default font
- HFONT hfont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
- QFont f(QLatin1String("MS Sans Serif"),8);
- int result = 0;
- QT_WA({
- LOGFONT lf;
- if (result = GetObject(hfont, sizeof(lf), &lf))
- f = qt_LOGFONTtoQFont((LOGFONT&)lf,true);
- } , {
- LOGFONTA lf;
- if (result = GetObjectA(hfont, sizeof(lf), &lf))
- f = qt_LOGFONTtoQFont((LOGFONT&)lf,true);
- });
- if (result
- && QSysInfo::WindowsVersion >= QSysInfo::WV_2000
- && QSysInfo::WindowsVersion <= QSysInfo::WV_NT_based
- && f.family() == QLatin1String("MS Shell Dlg"))
- f.setFamily(QLatin1String("MS Shell Dlg 2"));
- QApplicationPrivate::setSystemFont(f);
-#else //Q_WS_WINCE
- LOGFONT lf;
- HGDIOBJ stockFont = GetStockObject(SYSTEM_FONT);
- int result = 0;
- result = GetObject(stockFont, sizeof(lf), &lf);
- QFont font = qt_LOGFONTtoQFont(lf, true);
- if (result)
- QApplicationPrivate::setSystemFont(font);
-#endif //Q_WS_WINCE
+#ifndef Q_WS_WINCE
+ HGDIOBJ stockFont = GetStockObject(DEFAULT_GUI_FONT);
+#else
+ HGDIOBJ stockFont = GetStockObject(SYSTEM_FONT);
+#endif
+
+ LOGFONT lf;
+ GetObject(stockFont, sizeof(lf), &lf);
+ QFont systemFont = qt_LOGFONTtoQFont(lf, true);
+
+#ifndef Q_WS_WINCE
+ if (systemFont.family() == QLatin1String("MS Shell Dlg")) {
+ systemFont.setFamily(QLatin1String("MS Shell Dlg 2"));
+ }
+#endif
+
+ QApplicationPrivate::setSystemFont(systemFont);
// QFont::locale_init(); ### Uncomment when it does something on Windows
if (QApplication::desktopSettingsAware())
qt_set_windows_resources();
- QT_WA({
- WM95_MOUSEWHEEL = RegisterWindowMessage(L"MSWHEEL_ROLLMSG");
- } , {
- WM95_MOUSEWHEEL = RegisterWindowMessageA("MSWHEEL_ROLLMSG");
- });
initWinTabFunctions();
QApplicationPrivate::inputContext = new QWinInputContext(0);
@@ -884,10 +809,38 @@ void qt_init(QApplicationPrivate *priv, int)
ptrUpdateLayeredWindowIndirect = qt_updateLayeredWindowIndirect;
// Notify Vista and Windows 7 that we support highter DPI settings
- if (ptrSetProcessDPIAware = (PtrSetProcessDPIAware)
- QLibrary::resolve(QLatin1String("user32"), "SetProcessDPIAware"))
- ptrSetProcessDPIAware();
-#endif
+ ptrSetProcessDPIAware = (PtrSetProcessDPIAware)
+ QLibrary::resolve(QLatin1String("user32"), "SetProcessDPIAware");
+ if (ptrSetProcessDPIAware)
+ ptrSetProcessDPIAware();
+#endif
+
+ priv->lastGestureId = 0;
+
+ priv->GetGestureInfo =
+ (PtrGetGestureInfo)QLibrary::resolve(QLatin1String("user32"),
+ "GetGestureInfo");
+ priv->GetGestureExtraArgs =
+ (PtrGetGestureExtraArgs)QLibrary::resolve(QLatin1String("user32"),
+ "GetGestureExtraArgs");
+ priv->CloseGestureInfoHandle =
+ (PtrCloseGestureInfoHandle)QLibrary::resolve(QLatin1String("user32"),
+ "CloseGestureInfoHandle");
+ priv->SetGestureConfig =
+ (PtrSetGestureConfig)QLibrary::resolve(QLatin1String("user32"),
+ "SetGestureConfig");
+ priv->GetGestureConfig =
+ (PtrGetGestureConfig)QLibrary::resolve(QLatin1String("user32"),
+ "GetGestureConfig");
+ priv->BeginPanningFeedback =
+ (PtrBeginPanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"),
+ "BeginPanningFeedback");
+ priv->UpdatePanningFeedback =
+ (PtrUpdatePanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"),
+ "UpdatePanningFeedback");
+ priv->EndPanningFeedback =
+ (PtrEndPanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"),
+ "EndPanningFeedback");
}
/*****************************************************************************
@@ -963,7 +916,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
if (w->inherits("QTipLabel") || w->inherits("QAlphaWidget")) {
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
- style |= 0x00020000; // CS_DROPSHADOW
+ style |= CS_DROPSHADOW;
}
cname = QLatin1String("QToolTip");
} else {
@@ -981,7 +934,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
#endif
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
- style |= 0x00020000; // CS_DROPSHADOW
+ style |= CS_DROPSHADOW;
icon = false;
} else {
cname = QLatin1String("QWidget");
@@ -1001,10 +954,10 @@ const QString qt_reg_winclass(QWidget *w) // register window class
// unique ID on WinCE to make sure we can
// move the windows to the front when starting
// a second instance.
- wchar_t uniqueAppID[256];
- GetModuleFileNameW(0, uniqueAppID, 255);
- cname = QString::number(RegisterWindowMessageW(
- (const wchar_t *) QString::fromUtf16((const ushort *)uniqueAppID).toLower().replace(QLatin1Char('\\'),
+ wchar_t uniqueAppID[MAX_PATH];
+ GetModuleFileName(0, uniqueAppID, MAX_PATH);
+ cname = QString::number(RegisterWindowMessage(
+ (const wchar_t *) QString::fromWCharArray(uniqueAppID).toLower().replace(QLatin1Char('\\'),
QLatin1Char('_')).utf16()));
#endif
@@ -1016,15 +969,9 @@ const QString qt_reg_winclass(QWidget *w) // register window class
static int classExists = -1;
if (classExists == -1) {
- QT_WA({
- WNDCLASS wcinfo;
- classExists = GetClassInfo(qWinAppInst(), (TCHAR*)cname.utf16(), &wcinfo);
- classExists = classExists && wcinfo.lpfnWndProc != QtWndProc;
- }, {
- WNDCLASSA wcinfo;
- classExists = GetClassInfoA(qWinAppInst(), cname.toLatin1(), &wcinfo);
- classExists = classExists && wcinfo.lpfnWndProc != QtWndProc;
- });
+ WNDCLASS wcinfo;
+ classExists = GetClassInfo((HINSTANCE)qWinAppInst(), (wchar_t*)cname.utf16(), &wcinfo);
+ classExists = classExists && wcinfo.lpfnWndProc != QtWndProc;
}
if (classExists)
@@ -1033,73 +980,37 @@ const QString qt_reg_winclass(QWidget *w) // register window class
if (winclassNames()->contains(cname)) // already registered in our list
return cname;
- ATOM atom;
+ WNDCLASS wc;
+ wc.style = style;
+ wc.lpfnWndProc = (WNDPROC)QtWndProc;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = qWinAppInst();
+ if (icon) {
+ wc.hIcon = (HICON)LoadImage(qWinAppInst(), L"IDI_ICON1", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
#ifndef Q_WS_WINCE
- HBRUSH bgBrush = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
- QT_WA({
- WNDCLASS wc;
- wc.style = style;
- wc.lpfnWndProc = (WNDPROC)QtWndProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = qWinAppInst();
- if (icon) {
- wc.hIcon = LoadIcon(qWinAppInst(), L"IDI_ICON1");
- if (!wc.hIcon)
- wc.hIcon = LoadIcon(0, IDI_APPLICATION);
- } else {
- wc.hIcon = 0;
- }
- wc.hCursor = 0;
- wc.hbrBackground= bgBrush;
- wc.lpszMenuName = 0;
- wc.lpszClassName= (TCHAR*)cname.utf16();
- atom = RegisterClass(&wc);
- } , {
- WNDCLASSA wc;
- wc.style = style;
- wc.lpfnWndProc = (WNDPROC)QtWndProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = qWinAppInst();
- if (icon) {
- wc.hIcon = LoadIconA(qWinAppInst(), (char*)"IDI_ICON1");
- if (!wc.hIcon)
- wc.hIcon = LoadIconA(0, (char*)IDI_APPLICATION);
- } else {
- wc.hIcon = 0;
- }
- wc.hCursor = 0;
- wc.hbrBackground= bgBrush;
- wc.lpszMenuName = 0;
- QByteArray tempArray = cname.toLatin1();
- wc.lpszClassName= tempArray;
- atom = RegisterClassA(&wc);
- });
+ if (!wc.hIcon)
+ wc.hIcon = (HICON)LoadImage(0, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED);
+#endif
+ } else {
+ wc.hIcon = 0;
+ }
+ wc.hCursor = 0;
+#ifndef Q_WS_WINCE
+ wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
#else
- WNDCLASS wc;
- wc.style = style;
- wc.lpfnWndProc = (WNDPROC)QtWndProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = qWinAppInst();
- if (icon) {
- wc.hIcon = LoadIcon(qWinAppInst(), L"IDI_ICON1");
-// if (!wc.hIcon)
-// wc.hIcon = LoadIcon(0, IDI_APPLICATION);
- } else {
- wc.hIcon = 0;
- }
- wc.hCursor = 0;
- wc.hbrBackground= 0;
- wc.lpszMenuName = 0;
- wc.lpszClassName= (TCHAR*)cname.utf16();
- atom = RegisterClass(&wc);
+ wc.hbrBackground = 0;
#endif
+ wc.lpszMenuName = 0;
+ wc.lpszClassName = (wchar_t*)cname.utf16();
+
+ ATOM atom = RegisterClass(&wc);
#ifndef QT_NO_DEBUG
if (!atom)
qErrnoWarning("QApplication::regClass: Registering window class failed.");
+#else
+ Q_UNUSED(atom);
#endif
winclassNames()->insert(cname, 1);
@@ -1117,11 +1028,7 @@ static void unregWinClasses()
WinClassNameHash *hash = winclassNames();
QHash<QString, int>::ConstIterator it = hash->constBegin();
while (it != hash->constEnd()) {
- QT_WA({
- UnregisterClass((TCHAR*)it.key().utf16(), qWinAppInst());
- } , {
- UnregisterClassA(it.key().toLatin1(), qWinAppInst());
- });
+ UnregisterClass((wchar_t*)it.key().utf16(), qWinAppInst());
++it;
}
hash->clear();
@@ -1338,16 +1245,10 @@ void QApplication::beep()
static void alert_widget(QWidget *widget, int duration)
{
- bool stopFlash = duration < 0;
-
- if (!pFlashWindowEx) {
#ifndef Q_OS_WINCE
- QLibrary themeLib(QLatin1String("user32"));
- pFlashWindowEx = (PtrFlashWindowEx)themeLib.resolve("FlashWindowEx");
-#endif
- }
+ bool stopFlash = duration < 0;
- if (pFlashWindowEx && widget && (!widget->isActiveWindow() || stopFlash)) {
+ if (widget && (!widget->isActiveWindow() || stopFlash)) {
DWORD timeOut = GetCaretBlinkTime();
if (timeOut <= 0)
timeOut = 250;
@@ -1365,8 +1266,9 @@ static void alert_widget(QWidget *widget, int duration)
info.dwTimeout = stopFlash ? 0 : timeOut;
info.uCount = stopFlash ? 0 : flashCount;
- pFlashWindowEx(&info);
+ FlashWindowEx(&info);
}
+#endif
}
void QApplication::alert(QWidget *widget, int duration)
@@ -1454,13 +1356,13 @@ static int inputcharset = CP_ACP;
static bool qt_is_translatable_mouse_event(UINT message)
{
- return (message >= WM_MOUSEFIRST && message <= WM_MOUSELAST ||
- message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK)
+ return (((message >= WM_MOUSEFIRST && message <= WM_MOUSELAST) ||
+ (message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK))
&& message != WM_MOUSEWHEEL
- && message != WM_MOUSEHWHEEL
+ && message != WM_MOUSEHWHEEL)
#ifndef Q_WS_WINCE
- || message >= WM_NCMOUSEMOVE && message <= WM_NCMBUTTONDBLCLK
+ || (message >= WM_NCMOUSEMOVE && message <= WM_NCMBUTTONDBLCLK)
#endif
;
}
@@ -1727,7 +1629,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
// Sometimes we only get a WM_MOUSEMOVE message
// and sometimes we get both a WM_MOUSEMOVE and
// a WM_LBUTTONDOWN/UP, this creates a spurious mouse
- // press/release event, using the winPeekMessage
+ // press/release event, using the PeekMessage
// will help us fix this. This leaves us with a
// question:
// This effectively kills using the mouse AND the
@@ -1737,16 +1639,14 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
bool is_mouse_move = (message == WM_MOUSEMOVE);
if (is_mouse_move) {
MSG msg1;
- if (winPeekMessage(&msg1, msg.hwnd, WM_MOUSEFIRST,
- WM_MOUSELAST, PM_NOREMOVE))
+ if (PeekMessage(&msg1, msg.hwnd, WM_MOUSEFIRST,
+ WM_MOUSELAST, PM_NOREMOVE))
next_is_button = (msg1.message == WM_LBUTTONUP
|| msg1.message == WM_LBUTTONDOWN);
}
if (!is_mouse_move || (is_mouse_move && !next_is_button))
qt_tabletChokeMouse = false;
}
- } else if (message == WM95_MOUSEWHEEL) {
- result = widget->translateWheelEvent(msg);
} else {
switch (message) {
case WM_TOUCH:
@@ -1777,7 +1677,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
case WM_IME_KEYDOWN:
case WM_CHAR: {
MSG msg1;
- bool anyMsg = winPeekMessage(&msg1, msg.hwnd, 0, 0, PM_NOREMOVE);
+ bool anyMsg = PeekMessage(&msg1, msg.hwnd, 0, 0, PM_NOREMOVE);
if (anyMsg && msg1.message == WM_DEADCHAR) {
result = true; // consume event since there is a dead char next
break;
@@ -1977,11 +1877,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
#ifndef QT_NO_WHATSTHIS
QWhatsThis::enterWhatsThisMode();
#endif
- QT_WA({
- DefWindowProc(hwnd, WM_NCPAINT, 1, 0);
- } , {
- DefWindowProcA(hwnd, WM_NCPAINT, 1, 0);
- });
+ DefWindowProc(hwnd, WM_NCPAINT, 1, 0);
break;
#if defined(QT_NON_COMMERCIAL)
QT_NC_SYSCOMMAND
@@ -2043,8 +1939,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
break;
if (!msg.wParam) {
- QString area = QT_WA_INLINE(QString::fromUtf16((unsigned short *)msg.lParam),
- QString::fromLocal8Bit((char*)msg.lParam));
+ QString area = QString::fromWCharArray((wchar_t*)msg.lParam);
if (area == QLatin1String("intl")) {
QLocalePrivate::updateSystemPrivate();
if (!widget->testAttribute(Qt::WA_SetLocale))
@@ -2422,11 +2317,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
text = widget->objectName();
ret = qMin<int>(wParam - 1, text.size());
text.resize(ret);
- QT_WA({
- memcpy((void *)lParam, text.utf16(), (text.size() + 1) * 2);
- }, {
- memcpy((void *)lParam, text.toLocal8Bit().data(), text.size() + 1);
- });
+ memcpy((void *)lParam, text.utf16(), (text.size() + 1) * sizeof(ushort));
delete acc;
}
if (!ret) {
@@ -2514,11 +2405,11 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
#ifndef Q_WS_WINCE
case WM_INPUTLANGCHANGE: {
- char info[7];
- if (!GetLocaleInfoA(MAKELCID(lParam, SORT_DEFAULT), LOCALE_IDEFAULTANSICODEPAGE, info, 6)) {
+ wchar_t info[7];
+ if (!GetLocaleInfo(MAKELCID(lParam, SORT_DEFAULT), LOCALE_IDEFAULTANSICODEPAGE, info, 6)) {
inputcharset = CP_ACP;
} else {
- inputcharset = QString::fromLatin1(info).toInt();
+ inputcharset = QString::fromWCharArray(info).toInt();
}
QKeyMapper::changeKeyboard();
break;
@@ -2612,6 +2503,10 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
}
result = false;
break;
+ case WM_GESTURE:
+ widget->translateGestureEvent(msg);
+ result = true;
+ break;
default:
result = false; // event was not processed
break;
@@ -2711,11 +2606,10 @@ bool qt_try_modal(QWidget *widget, MSG *msg, int& ret)
bool block_event = false;
#ifndef Q_WS_WINCE
- if (type != WM_NCHITTEST)
+ if (type != WM_NCHITTEST) {
#endif
if ((type >= WM_MOUSEFIRST && type <= WM_MOUSELAST) ||
- type == WM_MOUSEWHEEL || type == (int)WM95_MOUSEWHEEL ||
- type == WM_MOUSEHWHEEL ||
+ type == WM_MOUSEWHEEL || type == WM_MOUSEHWHEEL ||
type == WM_MOUSELEAVE ||
(type >= WM_KEYFIRST && type <= WM_KEYLAST)
#ifndef Q_WS_WINCE
@@ -2742,17 +2636,18 @@ bool qt_try_modal(QWidget *widget, MSG *msg, int& ret)
block_event = true;
}
#ifndef Q_WS_WINCE
- else if (type == WM_MOUSEACTIVATE || type == WM_NCLBUTTONDOWN){
- if (!top->isActiveWindow()) {
- top->activateWindow();
- } else {
- QApplication::beep();
- }
- block_event = true;
- ret = MA_NOACTIVATEANDEAT;
- } else if (type == WM_SYSCOMMAND) {
- if (!(msg->wParam == SC_RESTORE && widget->isMinimized()))
+ else if (type == WM_MOUSEACTIVATE || type == WM_NCLBUTTONDOWN){
+ if (!top->isActiveWindow()) {
+ top->activateWindow();
+ } else {
+ QApplication::beep();
+ }
block_event = true;
+ ret = MA_NOACTIVATEANDEAT;
+ } else if (type == WM_SYSCOMMAND) {
+ if (!(msg->wParam == SC_RESTORE && widget->isMinimized()))
+ block_event = true;
+ }
}
#endif
@@ -2954,20 +2849,11 @@ void qt_win_eatMouseMove()
// remove all those messages (usually 1) and post the last one with a
// reset button state
- MSG msg = {0, 0, 0, 0, 0, 0, 0};
- QT_WA( {
- while (PeekMessage(&msg, 0, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE))
- ;
- if (msg.message == WM_MOUSEMOVE)
- PostMessage(msg.hwnd, msg.message, 0, msg.lParam);
- }, {
- MSG msg;
- msg.message = 0;
- while (PeekMessageA(&msg, 0, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE))
- ;
- if (msg.message == WM_MOUSEMOVE)
- PostMessageA(msg.hwnd, msg.message, 0, msg.lParam);
- } );
+ MSG msg = {0, 0, 0, 0, 0, {0, 0} };
+ while (PeekMessage(&msg, 0, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE))
+ ;
+ if (msg.message == WM_MOUSEMOVE)
+ PostMessage(msg.hwnd, msg.message, 0, msg.lParam);
}
// In DnD, the mouse release event never appears, so the
@@ -3002,8 +2888,8 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
// Compress mouse move events
if (msg.message == WM_MOUSEMOVE) {
MSG mouseMsg;
- while (winPeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEFIRST,
- WM_MOUSELAST, PM_NOREMOVE)) {
+ while (PeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEFIRST,
+ WM_MOUSELAST, PM_NOREMOVE)) {
if (mouseMsg.message == WM_MOUSEMOVE) {
#define PEEKMESSAGE_IS_BROKEN 1
#ifdef PEEKMESSAGE_IS_BROKEN
@@ -3014,12 +2900,12 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
// key release events (kls 2003-05-13):
MSG keyMsg;
bool done = false;
- while (winPeekMessage(&keyMsg, 0, WM_KEYFIRST, WM_KEYLAST,
- PM_NOREMOVE)) {
+ while (PeekMessage(&keyMsg, 0, WM_KEYFIRST, WM_KEYLAST,
+ PM_NOREMOVE)) {
if (keyMsg.time < mouseMsg.time) {
if ((keyMsg.lParam & 0xC0000000) == 0x40000000) {
- winPeekMessage(&keyMsg, 0, keyMsg.message,
- keyMsg.message, PM_REMOVE);
+ PeekMessage(&keyMsg, 0, keyMsg.message,
+ keyMsg.message, PM_REMOVE);
} else {
done = true;
break;
@@ -3045,8 +2931,8 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
msgPtr->wParam = mouseMsg.wParam;
msgPtr->pt = mouseMsg.pt;
// Remove the mouse move message
- winPeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEMOVE,
- WM_MOUSEMOVE, PM_REMOVE);
+ PeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEMOVE,
+ WM_MOUSEMOVE, PM_REMOVE);
} else {
break; // there was no more WM_MOUSEMOVE event
}
@@ -3075,7 +2961,9 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
if (alienWidget && alienWidget->internalWinId())
alienWidget = 0;
- if (type == QEvent::MouseMove || type == QEvent::NonClientAreaMouseMove) {
+ if (type == QEvent::MouseMove || type == QEvent::NonClientAreaMouseMove
+ || type == QEvent::TabletMove) {
+
if (!(state & Qt::MouseButtonMask))
qt_button_down = 0;
#ifndef QT_NO_CURSOR
@@ -3206,6 +3094,8 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
popupButtonFocus = popupChild;
break;
case QEvent::MouseButtonRelease:
+ case QEvent::TabletRelease:
+
releaseAfter = true;
break;
default:
@@ -3260,7 +3150,7 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
POINT widgetpt = gpos;
ScreenToClient(hwndTarget, &widgetpt);
LPARAM lParam = MAKELPARAM(widgetpt.x, widgetpt.y);
- winPostMessage(hwndTarget, msg.message, msg.wParam, lParam);
+ PostMessage(hwndTarget, msg.message, msg.wParam, lParam);
}
} else if (type == QEvent::MouseButtonRelease && button == Qt::RightButton
&& QApplication::activePopupWidget() == activePopupWidget) {
@@ -3443,17 +3333,19 @@ static void tabletInit(UINT wActiveCsr, HCTX hTab)
tdd.minTanPressure = int(np.axMin);
tdd.maxTanPressure = int(np.axMax);
- ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_X, &np);
- tdd.minX = int(np.axMin);
- tdd.maxX = int(np.axMax);
+ LOGCONTEXT lcMine;
+
+ /* get default region */
+ ptrWTInfo(WTI_DEFCONTEXT, 0, &lcMine);
+
+ tdd.minX = 0;
+ tdd.maxX = int(lcMine.lcInExtX) - int(lcMine.lcInOrgX);
- ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_Y, &np);
- tdd.minY = int(np.axMin);
- tdd.maxY = int(np.axMax);
+ tdd.minY = 0;
+ tdd.maxY = int(lcMine.lcInExtY) - int(lcMine.lcInOrgY);
- ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_Z, &np);
- tdd.minZ = int(np.axMin);
- tdd.maxZ = int(np.axMax);
+ tdd.minZ = 0;
+ tdd.maxZ = int(lcMine.lcInExtZ) - int(lcMine.lcInOrgZ);
int csr_type,
csr_physid;
@@ -3563,13 +3455,34 @@ bool QETWidget::translateTabletEvent(const MSG &msg, PACKET *localPacketBuf,
}
QPoint globalPos(qRound(hiResGlobal.x()), qRound(hiResGlobal.y()));
+ if (t == QEvent::TabletPress)
+ {
+ qt_button_down = QApplication::widgetAt(globalPos);
+ }
+
// make sure the tablet event get's sent to the proper widget...
- QWidget *w = QApplication::widgetAt(globalPos);
+ QWidget *w = 0;
+
if (qt_button_down)
w = qt_button_down; // Pass it to the thing that's grabbed it.
+ else
+ w = QApplication::widgetAt(globalPos);
if (!w)
w = this;
+
+ if (t == QEvent::TabletRelease)
+ {
+ if (qt_win_ignoreNextMouseReleaseEvent) {
+ qt_win_ignoreNextMouseReleaseEvent = false;
+ if (qt_button_down && qt_button_down->internalWinId() == autoCaptureWnd) {
+ releaseAutoCapture();
+ qt_button_down = 0;
+ }
+ }
+
+ }
+
QPoint localPos = w->mapFromGlobal(globalPos);
#ifndef QT_NO_TABLETEVENT
if (currentTabletPointer.currentDevice == QTabletEvent::Airbrush) {
@@ -3627,14 +3540,8 @@ static void initWinTabFunctions()
QLibrary library(QLatin1String("wintab32"));
if (library.load()) {
- QT_WA({
- ptrWTInfo = (PtrWTInfo)library.resolve("WTInfoW");
- ptrWTGet = (PtrWTGet)library.resolve("WTGetW");
- } , {
- ptrWTInfo = (PtrWTInfo)library.resolve("WTInfoA");
- ptrWTGet = (PtrWTGet)library.resolve("WTGetA");
- });
-
+ ptrWTInfo = (PtrWTInfo)library.resolve("WTInfoW");
+ ptrWTGet = (PtrWTGet)library.resolve("WTGetW");
ptrWTEnable = (PtrWTEnable)library.resolve("WTEnable");
ptrWTOverlap = (PtrWTEnable)library.resolve("WTOverlap");
ptrWTPacketsGet = (PtrWTPacketsGet)library.resolve("WTPacketsGet");
@@ -3808,6 +3715,60 @@ bool QETWidget::translateCloseEvent(const MSG &)
return d_func()->close_helper(QWidgetPrivate::CloseWithSpontaneousEvent);
}
+bool QETWidget::translateGestureEvent(const MSG &msg)
+{
+ GESTUREINFO gi;
+ gi.cbSize = sizeof(GESTUREINFO);
+ gi.dwFlags = 0;
+ gi.ptsLocation.x = 0;
+ gi.ptsLocation.y = 0;
+ gi.dwID = 0;
+ gi.dwInstanceID = 0;
+ gi.dwSequenceID = 0;
+
+ QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ BOOL bResult = qAppPriv->GetGestureInfo((HGESTUREINFO)msg.lParam, &gi);
+
+ const QPoint widgetPos = QPoint(gi.ptsLocation.x, gi.ptsLocation.y);
+ QWidget *alienWidget = !internalWinId() ? this : childAt(widgetPos);
+ if (alienWidget && alienWidget->internalWinId())
+ alienWidget = 0;
+ QWidget *widget = alienWidget ? alienWidget : this;
+
+ QWinGestureEvent event;
+ event.sequenceId = gi.dwSequenceID;
+ event.position = QPoint(gi.ptsLocation.x, gi.ptsLocation.y);
+ if (bResult) {
+ switch (gi.dwID) {
+ case GID_BEGIN:
+ // we are not interested in this type of event.
+ break;
+ case GID_END:
+ event.gestureType = QWinGestureEvent::GestureEnd;
+ break;
+ case GID_ZOOM:
+ event.gestureType = QWinGestureEvent::Pinch;
+ break;
+ case GID_PAN:
+ event.gestureType = QWinGestureEvent::Pan;
+ break;
+ case GID_ROTATE:
+ case GID_TWOFINGERTAP:
+ case GID_ROLLOVER:
+ default:
+ break;
+ }
+ if (event.gestureType != QWinGestureEvent::None)
+ qt_sendSpontaneousEvent(widget, &event);
+ } else {
+ DWORD dwErr = GetLastError();
+ if (dwErr > 0)
+ qWarning() << "translateGestureEvent: error = " << dwErr;
+ }
+ qAppPriv->CloseGestureInfoHandle((HGESTUREINFO)msg.lParam);
+ return true;
+}
+
void QApplication::setCursorFlashTime(int msecs)
{
@@ -3861,11 +3822,7 @@ void QApplication::setWheelScrollLines(int n)
#ifdef SPI_SETWHEELSCROLLLINES
if (n < 0)
n = 0;
- QT_WA({
- SystemParametersInfo(SPI_SETWHEELSCROLLLINES, (uint)n, 0, 0);
- } , {
- SystemParametersInfoA(SPI_SETWHEELSCROLLLINES, (uint)n, 0, 0);
- });
+ SystemParametersInfo(SPI_SETWHEELSCROLLLINES, (uint)n, 0, 0);
#else
QApplicationPrivate::wheel_scroll_lines = n;
#endif
@@ -3875,11 +3832,7 @@ int QApplication::wheelScrollLines()
{
#ifdef SPI_GETWHEELSCROLLLINES
uint i = 3;
- QT_WA({
- SystemParametersInfo(SPI_GETWHEELSCROLLLINES, sizeof(uint), &i, 0);
- } , {
- SystemParametersInfoA(SPI_GETWHEELSCROLLLINES, sizeof(uint), &i, 0);
- });
+ SystemParametersInfo(SPI_GETWHEELSCROLLLINES, sizeof(uint), &i, 0);
if (i > INT_MAX)
i = INT_MAX;
return i;
@@ -3924,8 +3877,7 @@ bool QApplication::isEffectEnabled(Qt::UIEffect effect)
if (QColormap::instance().depth() < 16)
return false;
- if (!effect_override && desktopSettingsAware()
- && !(QSysInfo::WindowsVersion == QSysInfo::WV_95 || QSysInfo::WindowsVersion == QSysInfo::WV_NT)) {
+ if (!effect_override && desktopSettingsAware()) {
// we know that they can be used when we are here
BOOL enabled = false;
UINT api;
@@ -3934,33 +3886,22 @@ bool QApplication::isEffectEnabled(Qt::UIEffect effect)
api = SPI_GETMENUANIMATION;
break;
case Qt::UI_FadeMenu:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)
- return false;
api = SPI_GETMENUFADE;
break;
case Qt::UI_AnimateCombo:
api = SPI_GETCOMBOBOXANIMATION;
break;
case Qt::UI_AnimateTooltip:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)
- api = SPI_GETMENUANIMATION;
- else
- api = SPI_GETTOOLTIPANIMATION;
+ api = SPI_GETTOOLTIPANIMATION;
break;
case Qt::UI_FadeTooltip:
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)
- return false;
api = SPI_GETTOOLTIPFADE;
break;
default:
api = SPI_GETUIEFFECTS;
break;
}
- QT_WA({
- SystemParametersInfo(api, 0, &enabled, 0);
- } , {
- SystemParametersInfoA(api, 0, &enabled, 0);
- });
+ SystemParametersInfo(api, 0, &enabled, 0);
return enabled;
}
@@ -4009,6 +3950,7 @@ void QSessionManager::cancel()
#endif //QT_NO_SESSIONMANAGER
+
qt_RegisterTouchWindowPtr QApplicationPrivate::RegisterTouchWindow = 0;
qt_GetTouchInputInfoPtr QApplicationPrivate::GetTouchInputInfo = 0;
qt_CloseTouchInputHandlePtr QApplicationPrivate::CloseTouchInputHandle = 0;
@@ -4016,9 +3958,10 @@ qt_CloseTouchInputHandlePtr QApplicationPrivate::CloseTouchInputHandle = 0;
void QApplicationPrivate::initializeMultitouch_sys()
{
QLibrary library(QLatin1String("user32"));
- RegisterTouchWindow = static_cast<qt_RegisterTouchWindowPtr>(library.resolve("RegisterTouchWindow"));
- GetTouchInputInfo = static_cast<qt_GetTouchInputInfoPtr>(library.resolve("GetTouchInputInfo"));
- CloseTouchInputHandle = static_cast<qt_CloseTouchInputHandlePtr>(library.resolve("CloseTouchInputHandle"));
+ // MinGW (g++ 3.4.5) accepts only C casts.
+ RegisterTouchWindow = (qt_RegisterTouchWindowPtr)(library.resolve("RegisterTouchWindow"));
+ GetTouchInputInfo = (qt_GetTouchInputInfoPtr)(library.resolve("GetTouchInputInfo"));
+ CloseTouchInputHandle = (qt_CloseTouchInputHandlePtr)(library.resolve("CloseTouchInputHandle"));
touchInputIDToTouchPointID.clear();
}
@@ -4030,13 +3973,11 @@ void QApplicationPrivate::cleanupMultitouch_sys()
bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
{
- Q_Q(QApplication);
-
QWidget *widgetForHwnd = QWidget::find(msg.hwnd);
if (!widgetForHwnd)
return false;
- QRect screenGeometry = q->desktop()->screenGeometry(widgetForHwnd);
+ QRect screenGeometry = QApplication::desktop()->screenGeometry(widgetForHwnd);
QList<QTouchEvent::TouchPoint> touchPoints;
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 5ef6b2e..76138f8 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -117,7 +117,9 @@ extern "C" {
#define XK_MISCELLANY
#include <X11/keysymdef.h>
+#if !defined(QT_NO_XINPUT)
#include <X11/extensions/XI.h>
+#endif
#include <stdlib.h>
#include <string.h>
@@ -655,11 +657,13 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
break;
default:
+#if !defined(QT_NO_XINPUT)
if (err->request_code == X11->xinput_major
&& err->error_code == (X11->xinput_errorbase + XI_BadDevice)
&& err->minor_code == 3 /* X_OpenDevice */) {
return 0;
}
+#endif
break;
}
@@ -1392,6 +1396,18 @@ static void qt_set_x11_resources(const char* font = 0, const char* fg = 0,
color = kdeColor(QLatin1String("Colors:Button/ForegroundNormal"), theKdeSettings);
if (color.isValid())
pal.setColor(QPalette::ButtonText, color);
+
+ color = kdeColor(QLatin1String("linkColor"), theKdeSettings);
+ if (!color.isValid())
+ color = kdeColor(QLatin1String("Colors:View/ForegroundLink"), theKdeSettings);
+ if (color.isValid())
+ pal.setColor(QPalette::Link, color);
+
+ color = kdeColor(QLatin1String("visitedLinkColor"), theKdeSettings);
+ if (!color.isValid())
+ color = kdeColor(QLatin1String("Colors:View/ForegroundVisited"), theKdeSettings);
+ if (color.isValid())
+ pal.setColor(QPalette::LinkVisited, color);
}
if (highlight.isValid() && highlightText.isValid()) {
@@ -3437,19 +3453,10 @@ int QApplication::x11ProcessEvent(XEvent* event)
QSize oldSize(w->size());
w->data->crect.setWidth(DisplayWidth(X11->display, scr));
w->data->crect.setHeight(DisplayHeight(X11->display, scr));
- QVarLengthArray<QRect> oldSizes(desktop->numScreens());
- for (int i = 0; i < desktop->numScreens(); ++i)
- oldSizes[i] = desktop->screenGeometry(i);
QResizeEvent e(w->size(), oldSize);
QApplication::sendEvent(w, &e);
- for (int i = 0; i < qMin(oldSizes.count(), desktop->numScreens()); ++i) {
- if (oldSizes[i] != desktop->screenGeometry(i))
- emit desktop->resized(i);
- }
- for (int i = oldSizes.count(); i < desktop->numScreens(); ++i)
- emit desktop->resized(i); // added
- for (int i = desktop->numScreens(); i < oldSizes.count(); ++i)
- emit desktop->resized(i); // removed
+ if (w != desktop)
+ QApplication::sendEvent(desktop, &e);
}
#endif // QT_NO_XRANDR
diff --git a/src/gui/kernel/qclipboard_mac.cpp b/src/gui/kernel/qclipboard_mac.cpp
index b7b57b8..45050b2 100644
--- a/src/gui/kernel/qclipboard_mac.cpp
+++ b/src/gui/kernel/qclipboard_mac.cpp
@@ -50,6 +50,7 @@
#include "qurl.h"
#include <stdlib.h>
#include <string.h>
+#include "qt_cocoa_helpers_mac_p.h"
QT_BEGIN_NAMESPACE
@@ -525,8 +526,17 @@ QMacPasteboard::retrieveData(const QString &format, QVariant::Type) const
QString c_flavor = c->flavorFor(format);
if(!c_flavor.isEmpty()) {
// Handle text/plain a little differently. Try handling Unicode first.
- if((c_flavor == QLatin1String("com.apple.traditional-mac-plain-text") || c_flavor == QLatin1String("public.utf8-plain-text")) &&
- hasFlavor(QLatin1String("public.utf16-plain-text")))
+ bool checkForUtf16 = (c_flavor == QLatin1String("com.apple.traditional-mac-plain-text")
+ || c_flavor == QLatin1String("public.utf8-plain-text"));
+ if (checkForUtf16 || c_flavor == QLatin1String("public.utf16-plain-text")) {
+ // Try to get the NSStringPboardType from NSPasteboard, newlines are mapped
+ // correctly (as '\n') in this data. The 'public.utf16-plain-text' type
+ // usually maps newlines to '\r' instead.
+ QString str = qt_mac_get_pasteboardString();
+ if (!str.isEmpty())
+ return str;
+ }
+ if (checkForUtf16 && hasFlavor(QLatin1String("public.utf16-plain-text")))
c_flavor = QLatin1String("public.utf16-plain-text");
QVariant ret;
diff --git a/src/gui/kernel/qclipboard_win.cpp b/src/gui/kernel/qclipboard_win.cpp
index 09b5448..f5aa088 100644
--- a/src/gui/kernel/qclipboard_win.cpp
+++ b/src/gui/kernel/qclipboard_win.cpp
@@ -200,7 +200,7 @@ HRESULT QtCeGetClipboard(IDataObject** obj)
if (clipData == 0) {
clipData = GetClipboardData(CF_UNICODETEXT);
if (clipData != 0)
- clipText = QString::fromUtf16((unsigned short *)clipData);
+ clipText = QString::fromWCharArray((wchar_t *)clipData);
} else {
clipText = QString::fromLatin1((const char*)clipData);
}
@@ -325,13 +325,7 @@ bool QClipboard::event(QEvent *e)
}
if (propagate && d->nextClipboardViewer) {
- QT_WA({
- SendMessage(d->nextClipboardViewer, m->message,
- m->wParam, m->lParam);
- } , {
- SendMessageA(d->nextClipboardViewer, m->message,
- m->wParam, m->lParam);
- });
+ SendMessage(d->nextClipboardViewer, m->message, m->wParam, m->lParam);
}
return true;
diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm
index bdc7ecb..1e0bbdf 100644
--- a/src/gui/kernel/qcocoapanel_mac.mm
+++ b/src/gui/kernel/qcocoapanel_mac.mm
@@ -85,6 +85,12 @@ QT_USE_NAMESPACE
last resort (i.e., this is code that can potentially be removed).
*/
+- (void)toggleToolbarShown:(id)sender
+{
+ macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]);
+ [super toggleToolbarShown:sender];
+}
+
- (void)keyDown:(NSEvent *)theEvent
{
bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]);
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 28179b7..3e5bfb6 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -290,11 +290,18 @@ extern "C" {
{
if (qwidget->testAttribute(Qt::WA_DropSiteRegistered) == false)
return NSDragOperationNone;
+ NSPoint windowPoint = [sender draggingLocation];
+ if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
+ // pass the drag enter event to the view underneath.
+ NSView *candidateView = [[[self window] contentView] hitTest:windowPoint];
+ if (candidateView && candidateView != self)
+ return [candidateView draggingEntered:sender];
+ }
+ dragEnterSequence = [sender draggingSequenceNumber];
[self addDropData:sender];
QMimeData *mimeData = dropData;
if (QDragManager::self()->source())
mimeData = QDragManager::self()->dragPrivate()->data;
- NSPoint windowPoint = [sender draggingLocation];
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
QPoint posDrag(localPoint.x, localPoint.y);
@@ -318,6 +325,9 @@ extern "C" {
[self removeDropData];
return NSDragOperationNone;
} else {
+ // save the mouse position, used by draggingExited handler.
+ DnDParams *dndParams = [QCocoaView currentMouseEvent];
+ dndParams->activeDragEnterPos = windowPoint;
// send a drag move event immediately after a drag enter event (as per documentation).
QDragMoveEvent qDMEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers);
qDMEvent.setDropAction(qDEEvent.dropAction());
@@ -338,11 +348,22 @@ extern "C" {
- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
{
- // drag enter event was rejected, so ignore the move event.
+ NSPoint windowPoint = [sender draggingLocation];
+ if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
+ // pass the drag move event to the view underneath.
+ NSView *candidateView = [[[self window] contentView] hitTest:windowPoint];
+ if (candidateView && candidateView != self)
+ return [candidateView draggingUpdated:sender];
+ }
+ // in cases like QFocusFrame, the view under the mouse might
+ // not have received the drag enter. Generate a synthetic
+ // drag enter event for that view.
+ if (dragEnterSequence != [sender draggingSequenceNumber])
+ [self draggingEntered:sender];
+ // drag enter event was rejected, so ignore the move event.
if (dropData == 0)
return NSDragOperationNone;
// return last value, if we are still in the answerRect.
- NSPoint windowPoint = [sender draggingLocation];
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
NSDragOperation nsActions = [sender draggingSourceOperationMask];
@@ -381,21 +402,34 @@ extern "C" {
- (void)draggingExited:(id < NSDraggingInfo >)sender
{
- Q_UNUSED(sender)
- // drag enter event was rejected, so ignore the move event.
+ dragEnterSequence = -1;
+ if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
+ // try sending the leave event to the last view which accepted drag enter.
+ DnDParams *dndParams = [QCocoaView currentMouseEvent];
+ NSView *candidateView = [[[self window] contentView] hitTest:dndParams->activeDragEnterPos];
+ if (candidateView && candidateView != self)
+ return [candidateView draggingExited:sender];
+ }
+ // drag enter event was rejected, so ignore the move event.
if (dropData) {
QDragLeaveEvent de;
QApplication::sendEvent(qwidget, &de);
[self removeDropData];
}
-
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
+ NSPoint windowPoint = [sender draggingLocation];
+ dragEnterSequence = -1;
+ if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
+ // pass the drop event to the view underneath.
+ NSView *candidateView = [[[self window] contentView] hitTest:windowPoint];
+ if (candidateView && candidateView != self)
+ return [candidateView performDragOperation:sender];
+ }
[self addDropData:sender];
- NSPoint windowPoint = [sender draggingLocation];
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
QPoint posDrop(localPoint.x, localPoint.y);
@@ -516,15 +550,7 @@ extern "C" {
qwidget->objectName().local8Bit().data());
#endif
QPainter p(qwidget);
- QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(qwidget->parent());
- QPoint scrollAreaOffset;
- if (scrollArea && scrollArea->viewport() == qwidget) {
- QAbstractScrollAreaPrivate *priv
- = static_cast<QAbstractScrollAreaPrivate *>(qt_widget_private(scrollArea));
- scrollAreaOffset = priv->contentsOffset();
- p.translate(-scrollAreaOffset);
- }
- qwidgetprivate->paintBackground(&p, qrgn, scrollAreaOffset,
+ qwidgetprivate->paintBackground(&p, qrgn,
qwidget->isWindow() ? QWidgetPrivate::DrawAsRoot : 0);
p.end();
}
@@ -557,6 +583,13 @@ extern "C" {
return !qwidget->testAttribute(Qt::WA_MacNoClickThrough);
}
+- (NSView *)hitTest:(NSPoint)aPoint
+{
+ if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents))
+ return nil; // You cannot hit a transparent for mouse event widget.
+ return [super hitTest:aPoint];
+}
+
- (void)updateTrackingAreas
{
QMacCocoaAutoReleasePool pool;
@@ -567,11 +600,15 @@ extern "C" {
[self removeTrackingArea:t];
}
}
+
+ // Ideally, we shouldn't have NSTrackingMouseMoved events included below, it should
+ // only be turned on if mouseTracking, hover is on or a tool tip is set.
+ // Unfortunately, Qt will send "tooltip" events on mouse moves, so we need to
+ // turn it on in ALL case. That means EVERY QCocoaView gets to pay the cost of
+ // mouse moves delivered to it (Apple recommends keeping it OFF because there
+ // is a performance hit). So it goes.
NSUInteger trackingOptions = NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp
- | NSTrackingInVisibleRect;
- if (qwidget->hasMouseTracking() || !qwidgetprivate->toolTip.isEmpty()
- || qwidget->testAttribute(Qt::WA_Hover))
- trackingOptions |= NSTrackingMouseMoved;
+ | NSTrackingInVisibleRect | NSTrackingMouseMoved;
NSTrackingArea *ta = [[NSTrackingArea alloc] initWithRect:NSMakeRect(0, 0,
qwidget->width(),
qwidget->height())
@@ -636,62 +673,6 @@ extern "C" {
qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
}
-- (NSView *)viewUnderTransparentForMouseView:(NSView *)mouseView widget:(QWidget *)widgetToGetMouse
- withWindowPoint:(NSPoint)windowPoint
-{
- NSMutableArray *viewsToLookAt = [NSMutableArray arrayWithCapacity:5];
- [viewsToLookAt addObject:mouseView];
- QWidget *parentWidget = widgetToGetMouse->parentWidget();
- while (parentWidget) {
- [viewsToLookAt addObject:qt_mac_nativeview_for(parentWidget)];
- parentWidget = parentWidget->parentWidget();
- }
-
- // Now walk through the subviews of each view and determine which subview should
- // get the event. We look through all the subviews at a given level with
- // the assumption that the last item to be found the candidate has a higher z-order.
- // Unfortunately, fast enumeration doesn't go backwards in 10.5, so assume go fast
- // forward is quicker than the slow normal way backwards.
- NSView *candidateView = nil;
- for (NSView *lookView in viewsToLookAt) {
- NSPoint tmpPoint = [lookView convertPoint:windowPoint fromView:nil];
- for (NSView *view in [lookView subviews]) {
- if (view == mouseView || [view isHidden])
- continue;
- NSRect frameRect = [view frame];
- if (NSMouseInRect(tmpPoint, [view frame], [view isFlipped]))
- candidateView = view;
- }
- if (candidateView)
- break;
- }
-
-
- if (candidateView != nil) {
- // Now that we've got a candidate, we have to dig into it's tree and see where it is.
- NSView *lowerView = nil;
- NSView *viewForDescent = candidateView;
- while (viewForDescent) {
- NSPoint tmpPoint = [viewForDescent convertPoint:windowPoint fromView:nil];
- // Apply same rule as above wrt z-order.
- for (NSView *view in [viewForDescent subviews]) {
- if (![view isHidden] && NSMouseInRect(tmpPoint, [view frame], [view isFlipped]))
- lowerView = view;
- }
- if (!lowerView) // Low as we can be at this point.
- candidateView = viewForDescent;
-
- // Try to go deeper, will also exit out of the loop, if we found the point.
- viewForDescent = lowerView;
- lowerView = nil;
- }
- }
- // I am transparent, so I can't be a candidate.
- if (candidateView == mouseView)
- candidateView = nil;
- return candidateView;
-}
-
- (void)mouseDown:(NSEvent *)theEvent
{
qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::LeftButton);
@@ -793,16 +774,6 @@ extern "C" {
Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]);
QWidget *widgetToGetMouse = qwidget;
- if (widgetToGetMouse->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- // Simulate passing the event through since Cocoa doesn't do that for us.
- // Start by building a tree up.
- NSView *candidateView = [self viewUnderTransparentForMouseView:self
- widget:widgetToGetMouse
- withWindowPoint:windowPoint];
- if (candidateView != nil) {
- widgetToGetMouse = QWidget::find(WId(candidateView));
- }
- }
// Mouse wheel deltas seem to tick in at increments of 0.1. Qt widgets
// expect the delta to be a multiple of 120.
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index 6583139..4762b17 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -68,6 +68,7 @@ struct DnDParams
NSEvent *theEvent;
NSPoint localPoint;
NSDragOperation performedAction;
+ NSPoint activeDragEnterPos;
};
QT_END_NAMESPACE
@@ -86,6 +87,7 @@ Q_GUI_EXPORT
bool sendKeyEvents;
QString *composingText;
QStringList *currentCustomTypes;
+ NSInteger dragEnterSequence;
}
- (id)initWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
- (void) finishInitWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
@@ -104,8 +106,6 @@ Q_GUI_EXPORT
- (QWidget *)qt_qwidget;
- (BOOL)qt_leftButtonIsRightButton;
- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped;
-- (NSView *)viewUnderTransparentForMouseView:(NSView *)mouseView widget:(QWidget *)widgetToGetMouse
- withWindowPoint:(NSPoint)windowPoint;
+ (DnDParams*)currentMouseEvent;
@end
diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm
index 7084416..eb08982 100644
--- a/src/gui/kernel/qcocoawindow_mac.mm
+++ b/src/gui/kernel/qcocoawindow_mac.mm
@@ -104,6 +104,12 @@ QT_USE_NAMESPACE
last resort (i.e., this is code that can potentially be removed).
*/
+- (void)toggleToolbarShown:(id)sender
+{
+ macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]);
+ [super toggleToolbarShown:sender];
+}
+
- (void)keyDown:(NSEvent *)theEvent
{
bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]);
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 9b49efc..3905e21 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -132,7 +132,12 @@ static void cleanupCocoaWindowDelegate()
qwidget->setAttribute(Qt::WA_PendingResizeEvent, true);
} else {
QResizeEvent qre(newSize, oldSize);
- qt_sendSpontaneousEvent(qwidget, &qre);
+ if (qwidget->testAttribute(Qt::WA_PendingResizeEvent)) {
+ qwidget->setAttribute(Qt::WA_PendingResizeEvent, false);
+ QApplication::sendEvent(qwidget, &qre);
+ } else {
+ qt_sendSpontaneousEvent(qwidget, &qre);
+ }
}
}
diff --git a/src/gui/kernel/qcursor_win.cpp b/src/gui/kernel/qcursor_win.cpp
index f0dc108..26e395c 100644
--- a/src/gui/kernel/qcursor_win.cpp
+++ b/src/gui/kernel/qcursor_win.cpp
@@ -317,54 +317,50 @@ void QCursorData::update()
phand_bits, phandm_bits
};
- unsigned short *sh;
+ wchar_t *sh = 0;
switch (cshape) { // map to windows cursor
case Qt::ArrowCursor:
- sh = (unsigned short*)IDC_ARROW;
+ sh = IDC_ARROW;
break;
case Qt::UpArrowCursor:
- sh = (unsigned short*)IDC_UPARROW;
+ sh = IDC_UPARROW;
break;
case Qt::CrossCursor:
- sh = (unsigned short*)IDC_CROSS;
+ sh = IDC_CROSS;
break;
case Qt::WaitCursor:
- sh = (unsigned short*)IDC_WAIT;
+ sh = IDC_WAIT;
break;
case Qt::IBeamCursor:
- sh = (unsigned short*)IDC_IBEAM;
+ sh = IDC_IBEAM;
break;
case Qt::SizeVerCursor:
- sh = (unsigned short*)IDC_SIZENS;
+ sh = IDC_SIZENS;
break;
case Qt::SizeHorCursor:
- sh = (unsigned short*)IDC_SIZEWE;
+ sh = IDC_SIZEWE;
break;
case Qt::SizeBDiagCursor:
- sh = (unsigned short*)IDC_SIZENESW;
+ sh = IDC_SIZENESW;
break;
case Qt::SizeFDiagCursor:
- sh = (unsigned short*)IDC_SIZENWSE;
+ sh = IDC_SIZENWSE;
break;
case Qt::SizeAllCursor:
- sh = (unsigned short*)IDC_SIZEALL;
+ sh = IDC_SIZEALL;
break;
case Qt::ForbiddenCursor:
- sh = (unsigned short*)IDC_NO;
+ sh = IDC_NO;
break;
case Qt::WhatsThisCursor:
- sh = (unsigned short*)IDC_HELP;
+ sh = IDC_HELP;
break;
case Qt::BusyCursor:
- sh = (unsigned short*)IDC_APPSTARTING;
+ sh = IDC_APPSTARTING;
break;
case Qt::PointingHandCursor:
- if ((QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) > QSysInfo::WV_95 ||
- (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) > QSysInfo::WV_NT) {
- sh = (unsigned short*)IDC_HAND;
- break;
- }
- // fall through
+ sh = IDC_HAND;
+ break;
case Qt::BlankCursor:
case Qt::SplitVCursor:
case Qt::SplitHCursor:
@@ -480,13 +476,11 @@ void QCursorData::update()
qWarning("QCursor::update: Invalid cursor shape %d", cshape);
return;
}
- // ### From MSDN:
- // ### LoadCursor has been superseded by the LoadImage function.
- QT_WA({
- hcurs = LoadCursorW(0, reinterpret_cast<const TCHAR *>(sh));
- } , {
- hcurs = LoadCursorA(0, reinterpret_cast<const char*>(sh));
- });
+#ifdef Q_WS_WINCE
+ hcurs = LoadCursor(0, sh);
+#else
+ hcurs = (HCURSOR)LoadImage(0, sh, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED);
+#endif
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdesktopwidget.h b/src/gui/kernel/qdesktopwidget.h
index 470f10a..a21ae9d 100644
--- a/src/gui/kernel/qdesktopwidget.h
+++ b/src/gui/kernel/qdesktopwidget.h
@@ -56,6 +56,9 @@ class QDesktopWidgetPrivate;
class Q_GUI_EXPORT QDesktopWidget : public QWidget
{
Q_OBJECT
+ Q_PROPERTY(bool virtualDesktop READ isVirtualDesktop)
+ Q_PROPERTY(int screenCount READ screenCount NOTIFY screenCountChanged)
+ Q_PROPERTY(int primaryScreen READ primaryScreen)
public:
QDesktopWidget();
~QDesktopWidget();
@@ -63,6 +66,7 @@ public:
bool isVirtualDesktop() const;
int numScreens() const;
+ int screenCount() const;
int primaryScreen() const;
int screenNumber(const QWidget *widget = 0) const;
@@ -85,6 +89,7 @@ public:
Q_SIGNALS:
void resized(int);
void workAreaResized(int);
+ void screenCountChanged(int);
protected:
void resizeEvent(QResizeEvent *e);
@@ -97,6 +102,9 @@ private:
friend class QApplicationPrivate;
};
+inline int QDesktopWidget::screenCount() const
+{ return numScreens(); }
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/kernel/qdesktopwidget_mac.mm b/src/gui/kernel/qdesktopwidget_mac.mm
index 2489fe4..705387d 100644
--- a/src/gui/kernel/qdesktopwidget_mac.mm
+++ b/src/gui/kernel/qdesktopwidget_mac.mm
@@ -97,15 +97,13 @@ QT_USE_NAMESPACE
Q_GLOBAL_STATIC(QDesktopWidgetImplementation, qdesktopWidgetImplementation)
QDesktopWidgetImplementation::QDesktopWidgetImplementation()
- : appScreen(0), displays(0)
+ : appScreen(0)
{
onResize();
}
QDesktopWidgetImplementation::~QDesktopWidgetImplementation()
{
- if (displays)
- [displays release];
}
QDesktopWidgetImplementation *QDesktopWidgetImplementation::instance()
@@ -118,13 +116,7 @@ QRect QDesktopWidgetImplementation::availableRect(int screenIndex) const
if (screenIndex < 0 || screenIndex >= screenCount)
screenIndex = appScreen;
- NSRect r = [[displays objectAtIndex:screenIndex] visibleFrame];
- NSRect primaryRect = [[displays objectAtIndex:0] frame];
-
- const int flippedY = - r.origin.y + // account for position offset and
- primaryRect.size.height - r.size.height; // height difference.
- return QRectF(r.origin.x, flippedY,
- r.size.width, r.size.height).toRect();
+ return availableRects[screenIndex].toRect();
}
QRect QDesktopWidgetImplementation::screenRect(int screenIndex) const
@@ -132,22 +124,28 @@ QRect QDesktopWidgetImplementation::screenRect(int screenIndex) const
if (screenIndex < 0 || screenIndex >= screenCount)
screenIndex = appScreen;
- NSRect r = [[displays objectAtIndex:screenIndex] frame];
- NSRect primaryRect = [[displays objectAtIndex:0] frame];
-
- const int flippedY = - r.origin.y + // account for position offset and
- primaryRect.size.height - r.size.height; // height difference.
- return QRectF(r.origin.x, flippedY,
- r.size.width, r.size.height).toRect();
+ return screenRects[screenIndex].toRect();
}
void QDesktopWidgetImplementation::onResize()
{
- if (displays)
- [displays release];
-
- displays = [[NSScreen screens] retain];
- screenCount = [displays count];
+ QMacCocoaAutoReleasePool pool;
+ NSArray *displays = [NSScreen screens];
+ screenCount = [displays count];
+
+ screenRects.clear();
+ availableRects.clear();
+ NSRect primaryRect = [[displays objectAtIndex:0] frame];
+ for (int i = 0; i<screenCount; i++) {
+ NSRect r = [[displays objectAtIndex:i] frame];
+ const int flippedY = - r.origin.y + // account for position offset and
+ primaryRect.size.height - r.size.height; // height difference.
+ screenRects.append(QRectF(r.origin.x, flippedY,
+ r.size.width, r.size.height));
+ r = [[displays objectAtIndex:i] visibleFrame];
+ availableRects.append(QRectF(r.origin.x, flippedY,
+ r.size.width, r.size.height));
+ }
}
@@ -195,7 +193,7 @@ const QRect QDesktopWidget::screenGeometry(int screen) const
int QDesktopWidget::screenNumber(const QWidget *widget) const
{
- QDesktopWidgetImplementation *d = qdesktopWidgetImplementation();
+ QDesktopWidgetImplementation *d = qdesktopWidgetImplementation();
if (!widget)
return d->appScreen;
QRect frame = widget->frameGeometry();
@@ -216,7 +214,7 @@ int QDesktopWidget::screenNumber(const QWidget *widget) const
int QDesktopWidget::screenNumber(const QPoint &point) const
{
- QDesktopWidgetImplementation *d = qdesktopWidgetImplementation();
+ QDesktopWidgetImplementation *d = qdesktopWidgetImplementation();
int closestScreen = -1;
int shortestDistance = INT_MAX;
for (int i = 0; i < d->screenCount; ++i) {
@@ -232,13 +230,25 @@ int QDesktopWidget::screenNumber(const QPoint &point) const
void QDesktopWidget::resizeEvent(QResizeEvent *)
{
- QDesktopWidgetImplementation *d = qdesktopWidgetImplementation();
+ QDesktopWidgetImplementation *d = qdesktopWidgetImplementation();
+
+ const int oldScreenCount = d->screenCount;
+ const QVector<QRectF> oldRects(d->screenRects);
+ const QVector<QRectF> oldWorks(d->availableRects);
d->onResize();
- for (int i = 0; i < d->screenCount; ++i) {
- emit resized(i);
+ for (int i = 0; i < qMin(oldScreenCount, d->screenCount); ++i) {
+ if (oldRects.at(i) != d->screenRects.at(i))
+ emit resized(i);
+ }
+ for (int i = 0; i < qMin(oldScreenCount, d->screenCount); ++i) {
+ if (oldWorks.at(i) != d->availableRects.at(i))
+ emit workAreaResized(i);
}
+
+ if (oldScreenCount != d->screenCount)
+ emit screenCountChanged(d->screenCount);
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdesktopwidget_mac_p.h b/src/gui/kernel/qdesktopwidget_mac_p.h
index 0fdc455..e9d5d9f 100644
--- a/src/gui/kernel/qdesktopwidget_mac_p.h
+++ b/src/gui/kernel/qdesktopwidget_mac_p.h
@@ -64,7 +64,8 @@ public:
int appScreen;
int screenCount;
- NSArray *displays;
+ QVector<QRectF> availableRects;
+ QVector<QRectF> screenRects;
QRect availableRect(int screenIndex) const;
QRect screenRect(int screenIndex) const;
diff --git a/src/gui/kernel/qdesktopwidget_win.cpp b/src/gui/kernel/qdesktopwidget_win.cpp
index aa290c4..a89e08f 100644
--- a/src/gui/kernel/qdesktopwidget_win.cpp
+++ b/src/gui/kernel/qdesktopwidget_win.cpp
@@ -152,41 +152,27 @@ void QDesktopWidgetPrivate::init(QDesktopWidget *that)
rects = new QVector<QRect>();
workrects = new QVector<QRect>();
+ screenCount = 0;
#ifndef Q_OS_WINCE
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- screenCount = 0;
- // Trying to get the function pointers to Win98/2000 only functions
- QLibrary user32Lib(QLatin1String("user32"));
- if (!user32Lib.load())
- return;
+ QLibrary user32Lib(QLatin1String("user32"));
+ if (user32Lib.load()) {
enumDisplayMonitors = (EnumFunc)user32Lib.resolve("EnumDisplayMonitors");
- QT_WA({
- getMonitorInfo = (InfoFunc)user32Lib.resolve("GetMonitorInfoW");
- } , {
- getMonitorInfo = (InfoFunc)user32Lib.resolve("GetMonitorInfoA");
- });
-
- if (!enumDisplayMonitors || !getMonitorInfo) {
- screenCount = GetSystemMetrics(80); // SM_CMONITORS
- rects->resize(screenCount);
- for (int i = 0; i < screenCount; ++i)
- rects->replace(i, that->rect());
- return;
- }
- // Calls enumCallback
- enumDisplayMonitors(0, 0, enumCallback, 0);
- enumDisplayMonitors = 0;
- getMonitorInfo = 0;
- } else {
- rects->resize(1);
- rects->replace(0, that->rect());
- workrects->resize(1);
- workrects->replace(0, that->rect());
+ getMonitorInfo = (InfoFunc)user32Lib.resolve("GetMonitorInfoW");
}
-#else
- screenCount = 0;
+ if (!enumDisplayMonitors || !getMonitorInfo) {
+ screenCount = GetSystemMetrics(80); // SM_CMONITORS
+ rects->resize(screenCount);
+ for (int i = 0; i < screenCount; ++i)
+ rects->replace(i, that->rect());
+ return;
+ }
+ // Calls enumCallback
+ enumDisplayMonitors(0, 0, enumCallback, 0);
+ enumDisplayMonitors = 0;
+ getMonitorInfo = 0;
+#else
QLibrary coreLib(QLatin1String("coredll"));
if (coreLib.load()) {
// CE >= 4.0 case
@@ -307,80 +293,69 @@ const QRect QDesktopWidget::availableGeometry(int screen) const
for(int i=0; i < d->workrects->size(); ++i)
qt_get_sip_info((*d->workrects)[i]);
#endif
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- if (screen < 0 || screen >= d->screenCount)
- screen = d->primaryScreen;
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
- return d->workrects->at(screen);
- } else {
- return d->workrects->at(d->primaryScreen);
- }
+ return d->workrects->at(screen);
}
const QRect QDesktopWidget::screenGeometry(int screen) const
{
const QDesktopWidgetPrivate *d = d_func();
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- if (screen < 0 || screen >= d->screenCount)
- screen = d->primaryScreen;
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
- return d->rects->at(screen);
- } else {
- return d->rects->at(d->primaryScreen);
- }
+ return d->rects->at(screen);
}
int QDesktopWidget::screenNumber(const QWidget *widget) const
{
Q_D(const QDesktopWidget);
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- if (!widget)
- return d->primaryScreen;
- QRect frame = widget->frameGeometry();
- if (!widget->isWindow())
- frame.moveTopLeft(widget->mapToGlobal(QPoint(0,0)));
-
- int maxSize = -1;
- int maxScreen = -1;
-
- for (int i = 0; i < d->screenCount; ++i) {
- QRect sect = d->rects->at(i).intersected(frame);
- int size = sect.width() * sect.height();
- if (size > maxSize && sect.width() > 0 && sect.height() > 0) {
- maxSize = size;
- maxScreen = i;
- }
- }
- return maxScreen;
- } else {
+ if (!widget)
return d->primaryScreen;
+
+ QRect frame = widget->frameGeometry();
+ if (!widget->isWindow())
+ frame.moveTopLeft(widget->mapToGlobal(QPoint(0,0)));
+
+ int maxSize = -1;
+ int maxScreen = -1;
+
+ for (int i = 0; i < d->screenCount; ++i) {
+ QRect sect = d->rects->at(i).intersected(frame);
+ int size = sect.width() * sect.height();
+ if (size > maxSize && sect.width() > 0 && sect.height() > 0) {
+ maxSize = size;
+ maxScreen = i;
+ }
}
+
+ return maxScreen;
}
int QDesktopWidget::screenNumber(const QPoint &point) const
{
Q_D(const QDesktopWidget);
+
int closestScreen = -1;
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- int shortestDistance = INT_MAX;
- for (int i = 0; i < d->screenCount; ++i) {
- int thisDistance = d->pointToRect(point, d->rects->at(i));
- if (thisDistance < shortestDistance) {
- shortestDistance = thisDistance;
- closestScreen = i;
- }
+ int shortestDistance = INT_MAX;
+
+ for (int i = 0; i < d->screenCount; ++i) {
+ int thisDistance = d->pointToRect(point, d->rects->at(i));
+ if (thisDistance < shortestDistance) {
+ shortestDistance = thisDistance;
+ closestScreen = i;
}
}
+
return closestScreen;
}
void QDesktopWidget::resizeEvent(QResizeEvent *)
{
Q_D(QDesktopWidget);
- QVector<QRect> oldrects;
- oldrects = *d->rects;
- QVector<QRect> oldworkrects;
- oldworkrects = *d->workrects;
+ const QVector<QRect> oldrects(*d->rects);
+ const QVector<QRect> oldworkrects(*d->workrects);
int oldscreencount = d->screenCount;
QDesktopWidgetPrivate::cleanup();
@@ -391,18 +366,22 @@ void QDesktopWidget::resizeEvent(QResizeEvent *)
#endif
for (int i = 0; i < qMin(oldscreencount, d->screenCount); ++i) {
- QRect oldrect = oldrects[i];
- QRect newrect = d->rects->at(i);
+ const QRect oldrect = oldrects[i];
+ const QRect newrect = d->rects->at(i);
if (oldrect != newrect)
emit resized(i);
}
for (int j = 0; j < qMin(oldscreencount, d->screenCount); ++j) {
- QRect oldrect = oldworkrects[j];
- QRect newrect = d->workrects->at(j);
+ const QRect oldrect = oldworkrects[j];
+ const QRect newrect = d->workrects->at(j);
if (oldrect != newrect)
emit workAreaResized(j);
}
+
+ if (oldscreencount != d->screenCount) {
+ emit screenCountChanged(d->screenCount);
+ }
}
#ifdef Q_CC_MSVC
diff --git a/src/gui/kernel/qdesktopwidget_x11.cpp b/src/gui/kernel/qdesktopwidget_x11.cpp
index 59d3239..1555fc0 100644
--- a/src/gui/kernel/qdesktopwidget_x11.cpp
+++ b/src/gui/kernel/qdesktopwidget_x11.cpp
@@ -372,7 +372,32 @@ int QDesktopWidget::screenNumber(const QPoint &point) const
void QDesktopWidget::resizeEvent(QResizeEvent *event)
{
Q_D(QDesktopWidget);
+ int oldScreenCount = d->screenCount;
+ QVector<QRect> oldRects(oldScreenCount);
+ QVector<QRect> oldWorks(oldScreenCount);
+ for (int i = 0; i < oldScreenCount; ++i) {
+ oldRects[i] = d->rects[i];
+ oldWorks[i] = d->workareas[i];
+ }
+
d->init();
+
+ for (int i = 0; i < qMin(oldScreenCount, d->screenCount); ++i) {
+ if (oldRects.at(i) != d->rects[i])
+ emit resized(i);
+ }
+
+ // ### workareas are just reset by init, not filled with new values
+ // ### so this will not work correctly
+ for (int j = 0; j < qMin(oldScreenCount, d->screenCount); ++j) {
+ if (oldWorks.at(j) != d->workareas[j])
+ emit workAreaResized(j);
+ }
+
+ if (oldScreenCount != d->screenCount) {
+ emit screenCountChanged(d->screenCount);
+ }
+
qt_desktopwidget_workarea_dirty = true;
QWidget::resizeEvent(event);
}
diff --git a/src/gui/kernel/qdirectionrecognizer.cpp b/src/gui/kernel/qdirectionrecognizer.cpp
deleted file mode 100644
index a1bc5b1..0000000
--- a/src/gui/kernel/qdirectionrecognizer.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qdirectionrecognizer_p.h"
-
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI 3.141592653589793238462643
-#endif
-
-QT_BEGIN_NAMESPACE
-
-enum {
- DistanceDelta = 20
-};
-
-QDirectionSimpleRecognizer::QDirectionSimpleRecognizer()
-{
-}
-
-Direction QDirectionSimpleRecognizer::addPosition(const QPoint &pos)
-{
- if (!directions.isEmpty()) {
- const QPoint tmp = pos - directions.back().point;
- if (tmp.manhattanLength() < 5)
- return Direction();
- }
- if (lastPoint.isNull()) {
- lastPoint = pos;
- return Direction();
- }
- int dx = pos.x() - lastPoint.x();
- int dy = pos.y() - lastPoint.y();
- Qt::DirectionType direction = Qt::NoDirection;
- if (dx < 0) {
- if (-1*dx >= DistanceDelta/2)
- direction = Qt::LeftDirection;
- } else {
- if (dx >= DistanceDelta/2)
- direction = Qt::RightDirection;
- }
- if (dy < 0) {
- if (-1*dy >= DistanceDelta/2)
- direction = Qt::UpDirection;
- } else {
- if (dy >= DistanceDelta/2)
- direction = Qt::DownDirection;
- }
- if (direction == Qt::NoDirection)
- return Direction();
-
- lastPoint = pos;
- directions.push_back(Direction(direction, pos));
- return Direction(direction, pos);
-}
-
-
-DirectionList QDirectionSimpleRecognizer::getDirections() const
-{
- return directions;
-}
-
-void QDirectionSimpleRecognizer::reset()
-{
- directions.clear();
- lastPoint = QPoint();
-}
-
-
-/// QDirectionDiagonalRecognizer
-
-QDirectionDiagonalRecognizer::QDirectionDiagonalRecognizer()
-{
-}
-
-Direction QDirectionDiagonalRecognizer::addPosition(const QPoint &pos)
-{
- if (!directions.isEmpty()) {
- const QPoint tmp = pos - directions.back().point;
- if (tmp.manhattanLength() < 5)
- return Direction();
- }
- if (lastPoint.isNull()) {
- lastPoint = pos;
- return Direction();
- }
- int dx = pos.x() - lastPoint.x();
- int dy = pos.y() - lastPoint.y();
- int distance = sqrt(static_cast<double>(dx*dx + dy*dy));
- if (distance < DistanceDelta/2)
- return Direction();
-
- Qt::DirectionType direction = Qt::NoDirection;
- double angle = atan(1.0*qAbs(lastPoint.y() - pos.y())/qAbs(pos.x() - lastPoint.x())) * 180. / M_PI;
- if (dx < 0 && dy <= 0) {
- angle = 180 - angle;
- } else if (dx <= 0 && dy > 0) {
- angle += 180;
- } else if (dx > 0 && dy > 0) {
- angle = 360-angle;
- }
- if (angle < 0)
- angle += 360;
- if (angle <= 20)
- direction = Qt::RightDirection;
- else if (angle <= 65)
- direction = Qt::RightUpDirection;
- else if (angle <= 110)
- direction = Qt::UpDirection;
- else if (angle <= 155)
- direction = Qt::LeftUpDirection;
- else if (angle <= 200)
- direction = Qt::LeftDirection;
- else if (angle <= 245)
- direction = Qt::LeftDownDirection;
- else if (angle <= 290)
- direction = Qt::DownDirection;
- else if (angle <= 335)
- direction = Qt::RightDownDirection;
- else
- direction = Qt::RightDirection;
-
- if (direction == Qt::NoDirection)
- return Direction();
-
- lastPoint = pos;
- directions.push_back(Direction(direction, pos));
- return Direction(direction, pos);
-}
-
-
-DirectionList QDirectionDiagonalRecognizer::getDirections() const
-{
- return directions;
-}
-
-void QDirectionDiagonalRecognizer::reset()
-{
- directions.clear();
- lastPoint = QPoint();
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdirectionsimplificator_p.h b/src/gui/kernel/qdirectionsimplificator_p.h
deleted file mode 100644
index d7491dc..0000000
--- a/src/gui/kernel/qdirectionsimplificator_p.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDIRECTIONSIMPLIFICATOR_P_H
-#define QDIRECTIONSIMPLIFICATOR_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "private/qdirectionrecognizer_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QDirectionSimplificator
-{
-public:
- QDirectionSimplificator(const DirectionList &dir);
-
- bool simplify(DirectionList *result);
-
-private:
- DirectionList directions;
- DirectionList lastResult;
- enum State {
- None,
- Trim, // remove first and last element
- AccidentalMoves, // 66866 => 6666
- ComplexAccidentalMoves, // 778788 => 777888 (swapping elements without changing direction)
- ShortMoves, // (moves of length 1)
- } state;
-
- struct SimplifyTrim
- {
- SimplifyTrim() : state(0) { }
- bool operator()(DirectionList &directions)
- {
- if (state == 0) {
- directions.removeFirst();
- state = 1;
- } else if (state == 1) {
- directions.removeLast();
- state = 2;
- } else if (state == 2 && directions.size() >= 2) {
- directions.removeFirst();
- directions.removeLast();
- state = 3;
- } else {
- return false;
- }
- return true;
- }
- int state;
- };
- struct SimplifyAccidentalMoves
- {
- SimplifyAccidentalMoves() : state(0) { }
- bool operator()(DirectionList &directions)
- {
- return false;
- }
- int state;
- };
- struct SimplifyComplexAccidentalMoves
- {
- SimplifyComplexAccidentalMoves() : state(0) { }
- bool operator()(DirectionList &directions)
- {
- return false;
- }
- int state;
- };
-
- SimplifyTrim trim;
- SimplifyAccidentalMoves accidentalMoves;
- SimplifyComplexAccidentalMoves complexAccidentalMoves;
- //SimplifyShortMoves shortMoves;
-};
-
-QDirectionSimplificator::QDirectionSimplificator(const DirectionList &dir)
- : directions(dir), state(None)
-{
-}
-
-bool QDirectionSimplificator::simplify(DirectionList *result)
-{
- if (directions.isEmpty() || !result)
- return false;
- *result = directions;
- switch(state) {
- case None:
- state = Trim;
- trim = SimplifyTrim();
- case Trim:
- if (trim(*result))
- break;
- *result = lastResult;
- state = AccidentalMoves;
- accidentalMoves = SimplifyAccidentalMoves();
- case AccidentalMoves:
- if (accidentalMoves(*result))
- break;
- *result = lastResult;
- state = ComplexAccidentalMoves;
- complexAccidentalMoves = SimplifyComplexAccidentalMoves();
- case ComplexAccidentalMoves:
- if (complexAccidentalMoves(*result))
- break;
- *result = lastResult;
- // state = ShortMoves;
- // shortMoves = SimplifyShortMoves();
- // case ShortMoves:
- // if (shortMoves(*result))
- // break;
- // state = None;
- default:
- return false;
- }
- lastResult = *result;
- if (lastResult.isEmpty())
- return false;
- return true;
-}
-
-QT_END_NAMESPACE
-
-#endif // QDIRECTIONSIMPLIFICATOR_P_H
diff --git a/src/gui/kernel/qdnd_mac.mm b/src/gui/kernel/qdnd_mac.mm
index b244d84..99399da 100644
--- a/src/gui/kernel/qdnd_mac.mm
+++ b/src/gui/kernel/qdnd_mac.mm
@@ -405,12 +405,12 @@ bool QWidgetPrivate::qt_mac_dnd_event(uint kind, DragRef dragRef)
SetDragDropAction(dragRef, qt_mac_dnd_map_qt_actions(qDEEvent.dropAction()));
if (!qDEEvent.isAccepted())
- // The widget is simply not interrested in this
+ // The widget is simply not interested in this
// drag. So tell carbon this by returning 'false'. We will then
// not receive any further move, drop or leave events for this widget.
return false;
else {
- // Documentation states that a drag move event is sendt immidiatly after
+ // Documentation states that a drag move event is sent immediately after
// a drag enter event. So we do that. This will honor widgets overriding
// 'dragMoveEvent' only, and not 'dragEnterEvent'
QDragMoveEvent qDMEvent(q->mapFromGlobal(QPoint(mouse.h, mouse.v)), qtAllowed, dropdata,
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index deb52a7..852c86c 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -65,7 +65,7 @@
#endif
#if defined(Q_WS_WIN)
-# include <windows.h>
+# include <qt_windows.h>
# include <objidl.h>
#endif
diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp
index 99c960c..70f89d2 100644
--- a/src/gui/kernel/qdnd_win.cpp
+++ b/src/gui/kernel/qdnd_win.cpp
@@ -154,9 +154,9 @@ QOleDataObject::GetData(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium)
#ifdef QDND_DEBUG
qDebug("QOleDataObject::GetData(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium)");
#ifndef Q_OS_WINCE
- char buf[256] = {0};
- GetClipboardFormatNameA(pformatetc->cfFormat, buf, 255);
- qDebug("CF = %d : %s", pformatetc->cfFormat, buf);
+ wchar_t buf[256] = {0};
+ GetClipboardFormatName(pformatetc->cfFormat, buf, 255);
+ qDebug("CF = %d : %s", pformatetc->cfFormat, QString::fromWCharArray(buf));
#endif
#endif
@@ -398,52 +398,47 @@ void QOleDropSource::createCursors()
int h = cpm.height();
if (!pm.isNull()) {
- int x1 = qMin(-hotSpot.x(),0);
- int x2 = qMax(pm.width()-hotSpot.x(),cpm.width());
- int y1 = qMin(-hotSpot.y(),0);
- int y2 = qMax(pm.height()-hotSpot.y(),cpm.height());
+ int x1 = qMin(-hotSpot.x(), 0);
+ int x2 = qMax(pm.width() - hotSpot.x(), cpm.width());
+ int y1 = qMin(-hotSpot.y(), 0);
+ int y2 = qMax(pm.height() - hotSpot.y(), cpm.height());
- w = x2-x1+1;
- h = y2-y1+1;
+ w = x2 - x1 + 1;
+ h = y2 - y1 + 1;
}
QRect srcRect = pm.rect();
QPoint pmDest = QPoint(qMax(0, -hotSpot.x()), qMax(0, -hotSpot.y()));
QPoint newHotSpot = hotSpot;
-#if !defined(Q_OS_WINCE) || defined(GWES_ICONCURS)
- bool limitedCursorSize = (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)
- || (QSysInfo::WindowsVersion == QSysInfo::WV_NT)
- || (QSysInfo::WindowsVersion == QSysInfo::WV_CE);
-
- if (limitedCursorSize) {
- // Limited cursor size
- int reqw = GetSystemMetrics(SM_CXCURSOR);
- int reqh = GetSystemMetrics(SM_CYCURSOR);
-
- QPoint hotspotInPM = newHotSpot - pmDest;
- if (reqw < w) {
- // Not wide enough - move objectpm right
- qreal r = qreal(newHotSpot.x()) / w;
- newHotSpot = QPoint(int(r * reqw), newHotSpot.y());
- if (newHotSpot.x() + cpm.width() > reqw)
- newHotSpot.setX(reqw - cpm.width());
-
- srcRect = QRect(QPoint(hotspotInPM.x() - newHotSpot.x(), srcRect.top()), QSize(reqw, srcRect.height()));
- }
- if (reqh < h) {
- qreal r = qreal(newHotSpot.y()) / h;
- newHotSpot = QPoint(newHotSpot.x(), int(r * reqh));
- if (newHotSpot.y() + cpm.height() > reqh)
- newHotSpot.setY(reqh - cpm.height());
-
- srcRect = QRect(QPoint(srcRect.left(), hotspotInPM.y() - newHotSpot.y()), QSize(srcRect.width(), reqh));
- }
- // Always use system cursor size
- w = reqw;
- h = reqh;
+#if defined(Q_OS_WINCE)
+ // Limited cursor size
+ int reqw = GetSystemMetrics(SM_CXCURSOR);
+ int reqh = GetSystemMetrics(SM_CYCURSOR);
+
+ QPoint hotspotInPM = newHotSpot - pmDest;
+ if (reqw < w) {
+ // Not wide enough - move objectpm right
+ qreal r = qreal(newHotSpot.x()) / w;
+ newHotSpot = QPoint(int(r * reqw), newHotSpot.y());
+ if (newHotSpot.x() + cpm.width() > reqw)
+ newHotSpot.setX(reqw - cpm.width());
+
+ srcRect = QRect(QPoint(hotspotInPM.x() - newHotSpot.x(), srcRect.top()), QSize(reqw, srcRect.height()));
}
+ if (reqh < h) {
+ qreal r = qreal(newHotSpot.y()) / h;
+ newHotSpot = QPoint(newHotSpot.x(), int(r * reqh));
+ if (newHotSpot.y() + cpm.height() > reqh)
+ newHotSpot.setY(reqh - cpm.height());
+
+ srcRect = QRect(QPoint(srcRect.left(), hotspotInPM.y() - newHotSpot.y()), QSize(srcRect.width(), reqh));
+ }
+ // Always use system cursor size
+ w = reqw;
+ h = reqh;
#endif
+
QPixmap newCursor(w, h);
if (!pm.isNull()) {
newCursor.fill(QColor(0, 0, 0, 0));
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index e40ad9d..328ba3d 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -53,8 +53,6 @@
QT_BEGIN_NAMESPACE
-QString qt_getStandardGestureTypeName(Qt::GestureType type);
-
/*!
\class QInputEvent
\ingroup events
@@ -116,8 +114,12 @@ QInputEvent::~QInputEvent()
propagated up the parent widget chain until a widget accepts it
with accept(), or an event filter consumes it.
+ \note If a mouse event is propagated to a \l{QWidget}{widget} for
+ which Qt::WA_NoMousePropagation has been set, that mouse event
+ will not be propagated further up the parent widget chain.
+
The state of the keyboard modifier keys can be found by calling the
- \l{QInputEvent::modifiers()}{modifiers()} function, inhertied from
+ \l{QInputEvent::modifiers()}{modifiers()} function, inherited from
QInputEvent.
The functions pos(), x(), and y() give the cursor position
@@ -3332,9 +3334,6 @@ QDebug operator<<(QDebug dbg, const QEvent *e) {
case QEvent::ChildRemoved: n = n ? n : "ChildRemoved";
dbg.nospace() << "QChildEvent(" << n << ", " << (static_cast<const QChildEvent*>(e))->child();
return dbg.space();
- case QEvent::Gesture:
- n = "Gesture";
- break;
default:
dbg.nospace() << "QEvent(" << (const void *)e << ", type = " << e->type() << ')';
return dbg.space();
@@ -3531,169 +3530,24 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
#endif
-/*!
- \class QGestureEvent
- \since 4.6
- \ingroup events
-
- \brief The QGestureEvent class provides the parameters used for
- gesture recognition.
-
- The QGestureEvent class contains a list of gestures that are being
- executed right now (\l{QGestureEvent::}{gestureTypes()}) and a
- list of gestures that are cancelled (the gesture might be
- cancelled because the window lost focus, or because of timeout,
- etc).
-
- \sa QGesture
-*/
-
-/*!
- Creates new QGestureEvent containing a list of \a gestures that
- are being executed and a list of gesture that were cancelled (\a
- cancelledGestures).
-*/
-QGestureEvent::QGestureEvent(const QSet<QGesture*> &gestures,
- const QSet<QString> &cancelledGestures)
- : QEvent(QEvent::Gesture), m_cancelledGestures(cancelledGestures)
-{
- setAccepted(false);
- foreach(QGesture *r, gestures)
- m_gestures.insert(r->type(), r);
-}
-
-/*!
- Destroys the QGestureEvent object.
-*/
-QGestureEvent::~QGestureEvent()
-{
-}
-
-/*!
- Returns true if the gesture event contains gesture of specific \a
- type; returns false otherwise.
-*/
-bool QGestureEvent::contains(Qt::GestureType type) const
-{
- return contains(qt_getStandardGestureTypeName(type));
-}
-
-/*!
- Returns true if the gesture event contains gesture of specific \a
- type; returns false otherwise.
-*/
-bool QGestureEvent::contains(const QString &type) const
-{
- return gesture(type) != 0;
-}
-
-/*!
- Returns a list of gesture names that this event contains.
-*/
-QList<QString> QGestureEvent::gestureTypes() const
-{
- return m_gestures.keys();
-}
-
-/*!
- Returns extended information about a gesture of specific \a type.
-*/
-const QGesture* QGestureEvent::gesture(Qt::GestureType type) const
-{
- return gesture(qt_getStandardGestureTypeName(type));
-}
-
-/*!
- Returns extended information about a gesture of specific \a type.
-*/
-const QGesture* QGestureEvent::gesture(const QString &type) const
-{
- return m_gestures.value(type, 0);
-}
-
-/*!
- Returns extended information about all gestures in the event.
-*/
-QList<QGesture*> QGestureEvent::gestures() const
-{
- return m_gestures.values();
-}
-
-/*!
- Returns a set of gesture names that used to be executed, but were
- cancelled (i.e. they were not finished properly).
-*/
-QSet<QString> QGestureEvent::cancelledGestures() const
-{
- return m_cancelledGestures;
-}
-
-/*!
- Sets the accept flag of the all gestures inside the event object,
- the equivalent of calling \l{QEvent::accept()}{accept()} or
- \l{QEvent::setAccepted()}{setAccepted(true)}.
-
- Setting the accept parameter indicates that the event receiver
- wants the gesture. Unwanted gestures might be propagated to the parent
- widget.
-*/
-void QGestureEvent::acceptAll()
-{
- QHash<QString, QGesture*>::iterator it = m_gestures.begin(),
- e = m_gestures.end();
- for(; it != e; ++it)
- it.value()->accept();
- setAccepted(true);
-}
-
-/*!
- Sets the accept flag of the gesture specified by \a type.
- This is equivalent to calling
- \l{QGestureEvent::gesture()}{gesture(type)}->
- \l{QGesture::accept()}{accept()}
-
- Setting the accept flag indicates that the event receiver wants
- the gesture. Unwanted gestures might be propagated to the parent
- widget.
-*/
-void QGestureEvent::accept(Qt::GestureType type)
-{
- if (QGesture *g = m_gestures.value(qt_getStandardGestureTypeName(type), 0))
- g->accept();
-}
-
-/*!
- Sets the accept flag of the gesture specified by \a type.
- This is equivalent to calling
- \l{QGestureEvent::gesture()}{gesture(type)}->
- \l{QGesture::accept()}{accept()}
-
- Setting the accept flag indicates that the event receiver wants
- the gesture. Unwanted gestures might be propagated to the parent
- widget.
-*/
-void QGestureEvent::accept(const QString &type)
-{
- if (QGesture *g = m_gestures.value(type, 0))
- g->accept();
-}
-
/*! \class QTouchEvent
- \brief The QTouchEvent class contains parameters that describe a touch event
-.
+ \brief The QTouchEvent class contains parameters that describe a touch event.
\since 4.6
\ingroup events
Touch events occur when pressing, releasing, or moving one or more
touch points on a touch device (such as a touch-screen or
- track-pad), and if the widget has the Qt::WA_AcceptTouchEvents
- attribute.
+ track-pad). To receive touch events, widgets have to have the
+ Qt::WA_AcceptTouchEvents attribute set and graphics items need to have
+ the \l{QGraphicsItem::setAcceptTouchEvents()}{acceptTouchEvents}
+ attribute set to true.
All touch events are of type QEvent::TouchBegin,
QEvent::TouchUpdate, or QEvent::TouchEnd. The touchPoints()
function returns a list of all touch points contained in the event.
- Information about each touch point can be retreived using the
- QTouchEvent::TouchPoint class.
+ Information about each touch point can be retrieved using the
+ QTouchEvent::TouchPoint class. The Qt::TouchPointState enum
+ describes the different states that a touch point may have.
Similar to QMouseEvent, Qt automatically grabs each touch point on
the first press inside a widget; the widget will receive all
@@ -3711,10 +3565,11 @@ void QGestureEvent::accept(const QString &type)
then mouse events are simulated from the state of the first touch
point.
- The Qt::TouchPointState enum describes the different states that a
- touch point may have.
+ Reimplement QWidget::event() for widgets and QGraphicsItem::sceneEvent()
+ for items in a graphics view to receive touch events.
- QTouchEvent::TouchPoint Qt::TouchPointState Qt::WA_AcceptTouchEvents
+ \sa QTouchEvent::TouchPoint, Qt::TouchPointState, Qt::WA_AcceptTouchEvents,
+ QGraphicsItem::acceptTouchEvents()
*/
/*! \enum Qt::TouchPointState
@@ -3732,13 +3587,7 @@ void QGestureEvent::accept(const QString &type)
\omitvalue TouchPointPrimary
*/
-/*! \class QTouchEvent::TouchPoint
- \brief The QTouchEvent::TouchPoint class provide information about a touch point in a QTouchEvent.
- \since 4.6
-*/
-
/*! \enum QTouchEvent::DeviceType
- \since 4.6
This enum represents the type of device that generated a QTouchEvent.
@@ -3817,6 +3666,11 @@ QTouchEvent::~QTouchEvent()
Sets the list of touch points for this event.
*/
+/*! \class QTouchEvent::TouchPoint
+ \brief The QTouchEvent::TouchPoint class provides information about a touch point in a QTouchEvent.
+ \since 4.6
+*/
+
/*! \internal
Constructs a QTouchEvent::TouchPoint for use in a QTouchEvent.
@@ -3876,7 +3730,9 @@ bool QTouchEvent::TouchPoint::isPrimary() const
/*!
Returns the position of this touch point, relative to the widget
- or item that received the event.
+ or QGraphicsItem that received the event.
+
+ \sa startPos(), lastPos(), screenPos(), scenePos(), normalizedPos()
*/
QPointF QTouchEvent::TouchPoint::pos() const
{
@@ -3885,6 +3741,13 @@ QPointF QTouchEvent::TouchPoint::pos() const
/*!
Returns the scene position of this touch point.
+
+ The scene position is the position in QGraphicsScene coordinates
+ if the QTouchEvent is handled by a QGraphicsItem::touchEvent()
+ reimplementation, and identical to the screen position for
+ widgets.
+
+ \sa startScenePos(), lastScenePos(), pos()
*/
QPointF QTouchEvent::TouchPoint::scenePos() const
{
@@ -3893,6 +3756,8 @@ QPointF QTouchEvent::TouchPoint::scenePos() const
/*!
Returns the screen position of this touch point.
+
+ \sa startScreenPos(), lastScreenPos(), pos()
*/
QPointF QTouchEvent::TouchPoint::screenPos() const
{
@@ -3900,8 +3765,12 @@ QPointF QTouchEvent::TouchPoint::screenPos() const
}
/*!
- Returns the position of this touch point. The coordinates are normalized to size of the touch
- device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.
+ Returns the normalized position of this touch point.
+
+ The coordinates are normalized to the size of the touch device,
+ i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.
+
+ \sa startNormalizedPos(), lastNormalizedPos(), pos()
*/
QPointF QTouchEvent::TouchPoint::normalizedPos() const
{
@@ -3910,7 +3779,9 @@ QPointF QTouchEvent::TouchPoint::normalizedPos() const
/*!
Returns the starting position of this touch point, relative to the
- widget that received the event.
+ widget or QGraphicsItem that received the event.
+
+ \sa pos(), lastPos()
*/
QPointF QTouchEvent::TouchPoint::startPos() const
{
@@ -3919,6 +3790,13 @@ QPointF QTouchEvent::TouchPoint::startPos() const
/*!
Returns the starting scene position of this touch point.
+
+ The scene position is the position in QGraphicsScene coordinates
+ if the QTouchEvent is handled by a QGraphicsItem::touchEvent()
+ reimplementation, and identical to the screen position for
+ widgets.
+
+ \sa scenePos(), lastScenePos()
*/
QPointF QTouchEvent::TouchPoint::startScenePos() const
{
@@ -3927,6 +3805,8 @@ QPointF QTouchEvent::TouchPoint::startScenePos() const
/*!
Returns the starting screen position of this touch point.
+
+ \sa screenPos(), lastScreenPos()
*/
QPointF QTouchEvent::TouchPoint::startScreenPos() const
{
@@ -3934,8 +3814,12 @@ QPointF QTouchEvent::TouchPoint::startScreenPos() const
}
/*!
- Returns the starting position of this touch point. The coordinates are normalized to size of
- the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.
+ Returns the normalized starting position of this touch point.
+
+ The coordinates are normalized to the size of the touch device,
+ i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.
+
+ \sa normalizedPos(), lastNormalizedPos()
*/
QPointF QTouchEvent::TouchPoint::startNormalizedPos() const
{
@@ -3944,7 +3828,9 @@ QPointF QTouchEvent::TouchPoint::startNormalizedPos() const
/*!
Returns the position of this touch point from the previous touch
- event, relative to the widget that received the event.
+ event, relative to the widget or QGraphicsItem that received the event.
+
+ \sa pos(), startPos()
*/
QPointF QTouchEvent::TouchPoint::lastPos() const
{
@@ -3954,6 +3840,13 @@ QPointF QTouchEvent::TouchPoint::lastPos() const
/*!
Returns the scene position of this touch point from the previous
touch event.
+
+ The scene position is the position in QGraphicsScene coordinates
+ if the QTouchEvent is handled by a QGraphicsItem::touchEvent()
+ reimplementation, and identical to the screen position for
+ widgets.
+
+ \sa scenePos(), startScenePos()
*/
QPointF QTouchEvent::TouchPoint::lastScenePos() const
{
@@ -3963,6 +3856,8 @@ QPointF QTouchEvent::TouchPoint::lastScenePos() const
/*!
Returns the screen position of this touch point from the previous
touch event.
+
+ \sa screenPos(), startScreenPos()
*/
QPointF QTouchEvent::TouchPoint::lastScreenPos() const
{
@@ -3970,9 +3865,13 @@ QPointF QTouchEvent::TouchPoint::lastScreenPos() const
}
/*!
- Returns the position of this touch point from the previous touch event. The coordinates are
- normalized to size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the
- bottom-right corner.
+ Returns the normalized position of this touch point from the
+ previous touch event.
+
+ The coordinates are normalized to the size of the touch device,
+ i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.
+
+ \sa normalizedPos(), startNormalizedPos()
*/
QPointF QTouchEvent::TouchPoint::lastNormalizedPos() const
{
@@ -3980,8 +3879,11 @@ QPointF QTouchEvent::TouchPoint::lastNormalizedPos() const
}
/*!
- Returns the rect for this touch point. The rect is centered around the point returned by pos().
- Note this function returns an empty rect if the device does not report touch point sizes.
+ Returns the rect for this touch point, relative to the widget
+ or QGraphicsItem that received the event. The rect is centered
+ around the point returned by pos().
+
+ \note This function returns an empty rect if the device does not report touch point sizes.
*/
QRectF QTouchEvent::TouchPoint::rect() const
{
@@ -3990,6 +3892,10 @@ QRectF QTouchEvent::TouchPoint::rect() const
/*!
Returns the rect for this touch point in scene coordinates.
+
+ \note This function returns an empty rect if the device does not report touch point sizes.
+
+ \sa scenePos(), rect()
*/
QRectF QTouchEvent::TouchPoint::sceneRect() const
{
@@ -3998,6 +3904,10 @@ QRectF QTouchEvent::TouchPoint::sceneRect() const
/*!
Returns the rect for this touch point in screen coordinates.
+
+ \note This function returns an empty rect if the device does not report touch point sizes.
+
+ \sa screenPos(), rect()
*/
QRectF QTouchEvent::TouchPoint::screenRect() const
{
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 136dd7f..11843cb 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -714,41 +714,6 @@ private:
};
#endif
-class Q_GUI_EXPORT QGestureEvent : public QEvent
-{
-public:
- QGestureEvent(const QSet<QGesture*> &gestures,
- const QSet<QString> &cancelledGestures = QSet<QString>());
- ~QGestureEvent();
-
- bool contains(Qt::GestureType type) const;
- bool contains(const QString &type) const;
-
- QList<QString> gestureTypes() const;
-
- const QGesture* gesture(Qt::GestureType type) const;
- const QGesture* gesture(const QString &type) const;
- QList<QGesture*> gestures() const;
-
- QSet<QString> cancelledGestures() const;
-
- void acceptAll();
-#ifndef Q_NO_USING_KEYWORD
- using QEvent::accept;
-#else
- inline void accept() { QEvent::accept(); }
-#endif
- void accept(Qt::GestureType type);
- void accept(const QString &type);
-
-protected:
- QHash<QString, QGesture*> m_gestures;
- QSet<QString> m_cancelledGestures;
-
- friend class QApplication;
- friend class QGestureManager;
-};
-
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug, const QEvent *);
#endif
diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h
index 8a2bb05..67441ea 100644
--- a/src/gui/kernel/qevent_p.h
+++ b/src/gui/kernel/qevent_p.h
@@ -119,6 +119,22 @@ public:
qreal pressure;
};
+class QWinGestureEvent : public QEvent
+{
+public:
+ enum Type {
+ None,
+ GestureEnd,
+ Pan,
+ Pinch
+ };
+
+ QWinGestureEvent() : QEvent(QEvent::WinGesture), gestureType(None), sequenceId(0) { }
+ Type gestureType;
+ QPoint position;
+ ulong sequenceId;
+};
+
QT_END_NAMESPACE
#endif // QEVENT_P_H
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index 99a1fc1..cde0c47 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -264,12 +264,16 @@ void qt_mac_socket_callback(CFSocketRef s, CFSocketCallBackType callbackType, CF
int nativeSocket = CFSocketGetNative(s);
MacSocketInfo *socketInfo = eventDispatcher->macSockets.value(nativeSocket);
QEvent notifierEvent(QEvent::SockAct);
+
+ // There is a race condition that happen where we disable the notifier and
+ // the kernel still has a notification to pass on. We then get this
+ // notification after we've successfully disabled the CFSocket, but our Qt
+ // notifier is now gone. The upshot is we have to check the notifier
+ // everytime.
if (callbackType == kCFSocketReadCallBack) {
- Q_ASSERT(socketInfo->readNotifier);
- QApplication::sendEvent(socketInfo->readNotifier, &notifierEvent);
+ if (socketInfo->readNotifier)
+ QApplication::sendEvent(socketInfo->readNotifier, &notifierEvent);
} else if (callbackType == kCFSocketWriteCallBack) {
- // ### Bug in Apple socket notifiers seems to send write even
- // ### after the notifier has been disabled, need to investigate further.
if (socketInfo->writeNotifier)
QApplication::sendEvent(socketInfo->writeNotifier, &notifierEvent);
}
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index d7b2d1b..d53b419 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -41,190 +41,173 @@
#include "qgesture.h"
#include <private/qgesture_p.h>
+#include "qgraphicsitem.h"
QT_BEGIN_NAMESPACE
-QString qt_getStandardGestureTypeName(Qt::GestureType type);
+
+class QEventFilterProxyGraphicsItem : public QGraphicsItem
+{
+public:
+ QEventFilterProxyGraphicsItem(QGesture *g)
+ : gesture(g)
+ {
+ }
+ bool sceneEventFilter(QGraphicsItem *, QEvent *event)
+ {
+ return gesture ? gesture->filterEvent(event) : false;
+ }
+ QRectF boundingRect() const { return QRectF(); }
+ void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) { }
+
+private:
+ QGesture *gesture;
+};
/*!
\class QGesture
\since 4.6
- \brief The QGesture class represents a gesture, containing all
- properties that describe a gesture.
-
- The widget receives a QGestureEvent with a list of QGesture
- objects that represent gestures that are occuring on it. The class
- has a list of properties that can be queried by the user to get
- some gesture-specific arguments (i.e. position of the tap in the
- DoubleTap gesture).
-
- When creating custom gesture recognizers, they might add new
- properties to the gesture object, or custom gesture developers
- might subclass the QGesture objects to provide some extended
- information. However, if the gesture developer wants to add a new
- property to the gesture object that describe coordinate (like a
- QPoint or QRect), it is required to subclass the QGesture and
- re-implement the \l{QGesture::}{translate()} function to make sure
- the coordinates are translated properly when the gesture event is
- propagated to parent widgets.
-
- \sa QGestureEvent, QGestureRecognizer
-*/
+ \brief The QGesture class is the base class for implementing custom
+ gestures.
-/*!
- Creates a new gesture object of type \a type in a \a state and
- marks it as a child of \a parent.
+ This class represents both an object that recognizes a gesture out of a set
+ of input events (a gesture recognizer), and a gesture object itself that
+ can be used to get extended information about the triggered gesture.
- Usually QGesture objects should only be contructed by the
- QGestureRecognizer classes.
-*/
-QGesture::QGesture(QObject *parent, const QString &type, Qt::GestureState state)
- : QObject(*new QGesturePrivate, parent), m_accept(0)
-{
- Q_D(QGesture);
- d->type = type;
- d->state = state;
-}
+ The class has a list of properties that can be queried by the user to get
+ some gesture-specific parameters (for example, an offset of a Pan gesture).
-/*!
- Creates a new gesture object of type \a type in a \a state and
- marks it as a child of \a parent.
-
- This constructor also fills some basic information about the
- gesture like a \a startPos which describes the start point of the
- gesture, \a lastPos - last point where the gesture happened, \a
- pos - a current point, \a rect - a bounding rect of the gesture,
- \a hotSpot - a center point of the gesture, \a startTime - a time
- when the gesture has started, \a duration - how long the gesture
- is going on.
-
- Usually QGesture objects should only be contructed by the
- QGestureRecognizer classes.
-*/
-QGesture::QGesture(QObject *parent, const QString &type, const QPoint &startPos,
- const QPoint &lastPos, const QPoint &pos, const QRect &rect,
- const QPoint &hotSpot, const QDateTime &startTime,
- uint duration, Qt::GestureState state)
- : QObject(*new QGesturePrivate, parent)
-{
- Q_D(QGesture);
- d->type = type;
- d->state = state;
- d->init(startPos, lastPos, pos, rect, hotSpot, startTime, duration);
-}
+ Usually gesture recognizer implements a state machine, storing its state
+ internally in the recognizer object. The recognizer receives input events
+ through the \l{QGesture::}{filterEvent()} virtual function and decides
+ whether the event should change the state of the recognizer by emitting an
+ appropriate signal.
-/*! \internal
+ Input events should be either fed to the recognizer one by one with a
+ filterEvent() function, or the gesture recognizer should be attached to an
+ object it filters events for by specifying it as a parent object. The
+ QGesture object installs itself as an event filter to the parent object
+ automatically, the unsetObject() function should be used to remove an event
+ filter from the parent object. To make a
+ gesture that operates on a QGraphicsItem, both the appropriate QGraphicsView
+ should be passed as a parent object and setGraphicsItem() functions should
+ be used to attach a gesture to a graphics item.
+
+ This is a base class, to create a custom gesture type, you should subclass
+ it and implement its pure virtual functions.
+
+ \sa QPanGesture, QTapAndHoldGesture
*/
-QGesture::QGesture(QGesturePrivate &dd, QObject *parent, const QString &type,
- Qt::GestureState state)
- : QObject(dd, parent)
-{
- Q_D(QGesture);
- d->type = type;
- d->state = state;
-}
-/*!
- Destroys the gesture object.
+/*! \fn bool QGesture::filterEvent(QEvent *event)
+
+ Parses input \a event and emits a signal when detects a gesture.
+
+ In your reimplementation of this function, if you want to filter the \a
+ event out, i.e. stop it being handled further, return true; otherwise
+ return false;
+
+ This is a pure virtual function that needs to be implemented in subclasses.
*/
-QGesture::~QGesture()
-{
-}
-/*!
- \property QGesture::type
+/*! \fn void QGesture::started()
+
+ The signal is emitted when the gesture is started. Extended information
+ about the gesture is contained in the signal sender object.
- \brief The type of the gesture.
+ In addition to started(), a triggered() signal should also be emitted.
*/
-QString QGesture::type() const
-{
- return d_func()->type;
-}
+/*! \fn void QGesture::triggered()
-/*!
- \property QGesture::state
+ The signal is emitted when the gesture is detected. Extended information
+ about the gesture is contained in the signal sender object.
+*/
- \brief The current state of the gesture.
+/*! \fn void QGesture::finished()
+
+ The signal is emitted when the gesture is finished. Extended information
+ about the gesture is contained in the signal sender object.
*/
-Qt::GestureState QGesture::state() const
-{
- return d_func()->state;
-}
-/*!
- Translates the internal gesture properties that represent
- coordinates by \a offset.
+/*! \fn void QGesture::cancelled()
- Custom gesture recognizer developer have to re-implement this
- function if they want to store custom properties that represent
- coordinates.
+ The signal is emitted when the gesture is cancelled, for example the reset()
+ function is called while the gesture was in the process of emitting a
+ triggered() signal. Extended information about the gesture is contained in
+ the sender object.
*/
-void QGesture::translate(const QPoint &offset)
-{
- Q_D(QGesture);
- d->rect.translate(offset);
- d->hotSpot += offset;
- d->startPos += offset;
- d->lastPos += offset;
- d->pos += offset;
-}
+
/*!
- \property QGesture::rect
+ Creates a new gesture handler object and marks it as a child of \a parent.
+
+ The \a parent object is also the default event source for the gesture,
+ meaning that the gesture installs itself as an event filter for the \a
+ parent.
- \brief The bounding rect of a gesture.
+ \sa setGraphicsItem()
*/
-QRect QGesture::rect() const
+QGesture::QGesture(QObject *parent)
+ : QObject(*new QGesturePrivate, parent)
{
- return d_func()->rect;
+ if (parent)
+ installEventFilter(parent);
}
-void QGesture::setRect(const QRect &rect)
+/*! \internal
+ */
+QGesture::QGesture(QGesturePrivate &dd, QObject *parent)
+ : QObject(dd, parent)
{
- d_func()->rect = rect;
+ if (parent)
+ installEventFilter(parent);
}
/*!
- \property QGesture::hotSpot
-
- \brief The center point of a gesture.
+ Destroys the gesture object.
*/
-QPoint QGesture::hotSpot() const
+QGesture::~QGesture()
{
- return d_func()->hotSpot;
}
-void QGesture::setHotSpot(const QPoint &point)
+/*! \internal
+ */
+bool QGesture::eventFilter(QObject *receiver, QEvent *event)
{
- d_func()->hotSpot = point;
+ Q_D(QGesture);
+ if (d->graphicsItem && receiver == parent())
+ return false;
+ return filterEvent(event);
}
/*!
- \property QGesture::startTime
+ \property QGesture::state
- \brief The time when the gesture has started.
+ \brief The current state of the gesture.
*/
-QDateTime QGesture::startTime() const
+
+/*!
+ Returns the gesture recognition state.
+ */
+Qt::GestureState QGesture::state() const
{
- return d_func()->startTime;
+ return d_func()->state;
}
/*!
- \property QGesture::duration
-
- \brief The duration time of a gesture.
-*/
-uint QGesture::duration() const
+ Sets this gesture's recognition state to \a state.
+ */
+void QGesture::setState(Qt::GestureState state)
{
- return d_func()->duration;
+ d_func()->state = state;
}
/*!
\property QGesture::startPos
- \brief The start position of the pointer.
+ \brief The start position of the gesture (if relevant).
*/
QPoint QGesture::startPos() const
{
@@ -239,7 +222,7 @@ void QGesture::setStartPos(const QPoint &point)
/*!
\property QGesture::lastPos
- \brief The last recorded position of the pointer.
+ \brief The last recorded position of the gesture (if relevant).
*/
QPoint QGesture::lastPos() const
{
@@ -254,7 +237,7 @@ void QGesture::setLastPos(const QPoint &point)
/*!
\property QGesture::pos
- \brief The current position of the pointer.
+ \brief The current position of the gesture (if relevant).
*/
QPoint QGesture::pos() const
{
@@ -267,49 +250,47 @@ void QGesture::setPos(const QPoint &point)
}
/*!
- \class QPanningGesture
- \since 4.6
-
- \brief The QPanningGesture class represents a Pan gesture,
- providing additional information related to panning.
+ Sets the \a graphicsItem the gesture is filtering events for.
- This class is provided for convenience, panning direction
- information is also contained in the QGesture object in it's
- properties.
-*/
+ The gesture will install an event filter to the \a graphicsItem and
+ redirect them to the filterEvent() function.
-/*! \internal
+ \sa graphicsItem()
*/
-QPanningGesture::QPanningGesture(QObject *parent)
- : QGesture(*new QPanningGesturePrivate, parent,
- qt_getStandardGestureTypeName(Qt::PanGesture))
-{
-}
-
-/*! \internal
-*/
-QPanningGesture::~QPanningGesture()
+void QGesture::setGraphicsItem(QGraphicsItem *graphicsItem)
{
+ Q_D(QGesture);
+ if (d->graphicsItem && d->eventFilterProxyGraphicsItem)
+ d->graphicsItem->removeSceneEventFilter(d->eventFilterProxyGraphicsItem);
+ d->graphicsItem = graphicsItem;
+ if (!d->eventFilterProxyGraphicsItem)
+ d->eventFilterProxyGraphicsItem = new QEventFilterProxyGraphicsItem(this);
+ if (graphicsItem)
+ graphicsItem->installSceneEventFilter(d->eventFilterProxyGraphicsItem);
}
/*!
- \property QPanningGesture::lastDirection
+ Returns the graphics item the gesture is filtering events for.
- \brief The last recorded direction of panning.
+ \sa setGraphicsItem()
*/
-Qt::DirectionType QPanningGesture::lastDirection() const
+QGraphicsItem* QGesture::graphicsItem() const
{
- return d_func()->lastDirection;
+ return d_func()->graphicsItem;
}
-/*!
- \property QPanningGesture::direction
+/*! \fn void QGesture::reset()
- \brief The current direction of panning.
+ Resets the internal state of the gesture. This function might be called by
+ the filterEvent() implementation in a derived class, or by the user to
+ cancel a gesture. The base class implementation emits the cancelled()
+ signal if the state() of the gesture wasn't empty.
*/
-Qt::DirectionType QPanningGesture::direction() const
+void QGesture::reset()
{
- return d_func()->direction;
+ if (state() != Qt::NoGesture)
+ emit cancelled();
+ setState(Qt::NoGesture);
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index f3c95cc..1cd9cae 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -42,12 +42,12 @@
#ifndef QGESTURE_H
#define QGESTURE_H
-#include "qobject.h"
-#include "qlist.h"
-#include "qdatetime.h"
-#include "qpoint.h"
-#include "qrect.h"
-#include "qmetatype.h"
+#include <QtCore/qobject.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qpoint.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qmetatype.h>
QT_BEGIN_HEADER
@@ -55,50 +55,32 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
+class QGraphicsItem;
class QGesturePrivate;
class Q_GUI_EXPORT QGesture : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QGesture)
- Q_PROPERTY(QString type READ type)
Q_PROPERTY(Qt::GestureState state READ state)
- Q_PROPERTY(QDateTime startTime READ startTime)
- Q_PROPERTY(uint duration READ duration)
-
- Q_PROPERTY(QRect rect READ rect WRITE setRect)
- Q_PROPERTY(QPoint hotSpot READ hotSpot WRITE setHotSpot)
Q_PROPERTY(QPoint startPos READ startPos WRITE setStartPos)
Q_PROPERTY(QPoint lastPos READ lastPos WRITE setLastPos)
Q_PROPERTY(QPoint pos READ pos WRITE setPos)
public:
- QGesture(QObject *parent, const QString &type,
- Qt::GestureState state = Qt::GestureStarted);
- QGesture(QObject *parent,
- const QString &type, const QPoint &startPos,
- const QPoint &lastPos, const QPoint &pos, const QRect &rect,
- const QPoint &hotSpot, const QDateTime &startTime,
- uint duration, Qt::GestureState state);
- virtual ~QGesture();
-
- inline void setAccepted(bool accepted) { m_accept = accepted; }
- inline bool isAccepted() const { return m_accept; }
-
- inline void accept() { m_accept = true; }
- inline void ignore() { m_accept = false; }
-
- QString type() const;
- Qt::GestureState state() const;
+ explicit QGesture(QObject *parent = 0);
+ ~QGesture();
+
+ virtual bool filterEvent(QEvent *event) = 0;
+
+ void setGraphicsItem(QGraphicsItem *);
+ QGraphicsItem *graphicsItem() const;
- QDateTime startTime() const;
- uint duration() const;
+ virtual void reset();
- QRect rect() const;
- void setRect(const QRect &rect);
- QPoint hotSpot() const;
- void setHotSpot(const QPoint &point);
+ Qt::GestureState state() const;
+ void setState(Qt::GestureState state);
QPoint startPos() const;
void setStartPos(const QPoint &point);
@@ -108,45 +90,19 @@ public:
void setPos(const QPoint &point);
protected:
- QGesture(QGesturePrivate &dd, QObject *parent, const QString &type,
- Qt::GestureState state = Qt::GestureStarted);
- virtual void translate(const QPoint &offset);
+ QGesture(QGesturePrivate &dd, QObject *parent);
+ bool eventFilter(QObject*, QEvent*);
-private:
- ushort m_accept : 1;
-
- friend class QGestureManager;
- friend class QApplication;
- friend class QGraphicsScene;
- friend class QGraphicsScenePrivate;
- friend class QGestureRecognizerPan;
- friend class QDoubleTapGestureRecognizer;
- friend class QTapAndHoldGestureRecognizer;
-};
-
-class QPanningGesturePrivate;
-class Q_GUI_EXPORT QPanningGesture : public QGesture
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QPanningGesture)
-
- Q_PROPERTY(Qt::DirectionType lastDirection READ lastDirection)
- Q_PROPERTY(Qt::DirectionType direction READ direction)
-
-public:
- Qt::DirectionType lastDirection() const;
- Qt::DirectionType direction() const;
+Q_SIGNALS:
+ void started();
+ void triggered();
+ void finished();
+ void cancelled();
private:
- QPanningGesture(QObject *parent = 0);
- ~QPanningGesture();
-
- friend class QGestureRecognizerPan;
+ friend class QWidget;
};
-Q_DECLARE_METATYPE(Qt::DirectionType)
-Q_DECLARE_METATYPE(Qt::GestureState)
-
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index caf851e..99f572f 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -56,10 +56,12 @@
#include "qrect.h"
#include "qpoint.h"
#include "qdatetime.h"
+#include "qgesture.h"
#include "private/qobject_p.h"
QT_BEGIN_NAMESPACE
+class QObject;
class QGraphicsItem;
class QGesturePrivate : public QObjectPrivate
{
@@ -67,47 +69,28 @@ class QGesturePrivate : public QObjectPrivate
public:
QGesturePrivate()
- : state(Qt::NoGesture), graphicsItem(0), singleshot(0), duration(0) { }
+ : graphicsItem(0), eventFilterProxyGraphicsItem(0), state(Qt::NoGesture)
+ {
+ }
void init(const QPoint &startPos, const QPoint &lastPos,
- const QPoint &pos, const QRect &rect,
- const QPoint &hotSpot, const QDateTime &startTime,
- uint duration)
+ const QPoint &pos)
{
- this->rect = rect;
- this->hotSpot = hotSpot;
- this->startTime = startTime;
- this->duration = duration;
this->startPos = startPos;
this->lastPos = lastPos;
this->pos = pos;
}
- QString type;
- Qt::GestureState state;
-
- QPointer<QWidget> widget;
QGraphicsItem *graphicsItem;
- uint singleshot:1;
+ QGraphicsItem *eventFilterProxyGraphicsItem;
+
+ Qt::GestureState state;
- QRect rect;
- QPoint hotSpot;
- QDateTime startTime;
- uint duration;
QPoint startPos;
QPoint lastPos;
QPoint pos;
};
-class QPanningGesturePrivate : public QGesturePrivate
-{
- Q_DECLARE_PUBLIC(QPanningGesture)
-
-public:
- Qt::DirectionType lastDirection;
- Qt::DirectionType direction;
-};
-
QT_END_NAMESPACE
#endif // QGESTURE_P_H
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
deleted file mode 100644
index 20abda9..0000000
--- a/src/gui/kernel/qgesturemanager.cpp
+++ /dev/null
@@ -1,644 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgesturemanager_p.h"
-#include "qgesture.h"
-#include "qgesture_p.h"
-#include "qevent.h"
-
-#include "qapplication.h"
-#include "qapplication_p.h"
-#include "qwidget.h"
-#include "qwidget_p.h"
-
-#include "qgesturestandardrecognizers_p.h"
-
-#include "qdebug.h"
-
-// #define GESTURE_DEBUG
-#ifndef GESTURE_DEBUG
-# define DEBUG if (0) qDebug
-#else
-# define DEBUG qDebug
-#endif
-
-QT_BEGIN_NAMESPACE
-
-bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event);
-
-static const unsigned int MaximumGestureRecognitionTimeout = 2000;
-
-QGestureManager::QGestureManager(QObject *parent)
- : QObject(parent), eventDeliveryDelayTimeout(300),
- delayedPressTimer(0), lastMousePressReceiver(0), lastMousePressEvent(QEvent::None, QPoint(), Qt::NoButton, 0, 0),
- lastGestureId(0), state(NotGesture)
-{
- qRegisterMetaType<Qt::DirectionType>();
- qRegisterMetaType<Qt::GestureState>();
-
- recognizers << new QDoubleTapGestureRecognizer(this);
- recognizers << new QTapAndHoldGestureRecognizer(this);
- recognizers << new QGestureRecognizerPan(this);
-
- foreach(QGestureRecognizer *r, recognizers)
- connect(r, SIGNAL(stateChanged(QGestureRecognizer::Result)),
- this, SLOT(recognizerStateChanged(QGestureRecognizer::Result)));
-}
-
-void QGestureManager::addRecognizer(QGestureRecognizer *recognizer)
-{
- recognizer->setParent(this);
- recognizers << recognizer;
-}
-
-void QGestureManager::removeRecognizer(QGestureRecognizer *recognizer)
-{
- recognizers.remove(recognizer);
-}
-
-bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event)
-{
- QPoint currentPos;
- switch (event->type()) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- currentPos = static_cast<QMouseEvent*>(event)->pos(); break;
- default: break;
- }
-
- const QMap<QString, int> &grabbedGestures = qApp->d_func()->grabbedGestures;
-
- bool ret = false;
- QSet<QGestureRecognizer*> startedGestures;
- QSet<QGestureRecognizer*> finishedGestures;
- QSet<QGestureRecognizer*> newMaybeGestures;
- QSet<QGestureRecognizer*> cancelledGestures;
- QSet<QGestureRecognizer*> notGestures;
- if (state == NotGesture || state == MaybeGesture) {
- DEBUG() << "QGestureManager: current event processing state: "
- << (state == NotGesture ? "NotGesture" : "MaybeGesture");
-
- QSet<QGestureRecognizer*> stillMaybeGestures;
- // try other recognizers.
- foreach(QGestureRecognizer *r, recognizers) {
- if (grabbedGestures.value(r->gestureType(), 0) <= 0)
- continue;
- QGestureRecognizer::Result result = r->filterEvent(event);
- if (result == QGestureRecognizer::GestureStarted) {
- DEBUG() << "QGestureManager: gesture started: " << r;
- startedGestures << r;
- } else if (result == QGestureRecognizer::GestureFinished) {
- DEBUG() << "QGestureManager: gesture finished: " << r;
- finishedGestures << r;
- } else if (result == QGestureRecognizer::MaybeGesture) {
- DEBUG() << "QGestureManager: maybe gesture: " << r;
- newMaybeGestures << r;
- } else if (result == QGestureRecognizer::NotGesture) {
- // if it was maybe gesture, but isn't a gesture anymore.
- DEBUG() << "QGestureManager: not gesture: " << r;
- notGestures << r;
- }
- }
- Q_ASSERT(activeGestures.isEmpty());
- activeGestures += startedGestures;
- for(QMap<QGestureRecognizer*, int>::iterator it = maybeGestures.begin();
- it != maybeGestures.end();) {
- QGestureRecognizer *r = it.key();
- if (startedGestures.contains(r) || finishedGestures.contains(r) ||
- notGestures.contains(r)) {
- killTimer(it.value());
- it = maybeGestures.erase(it);
- } else {
- ++it;
- }
- }
- foreach(QGestureRecognizer *r, newMaybeGestures) {
- if (!maybeGestures.contains(r)) {
- int timerId = startTimer(MaximumGestureRecognitionTimeout);
- if (!timerId)
- qWarning("QGestureManager: couldn't start timer!");
- maybeGestures.insert(r, timerId);
- }
- }
- if (!finishedGestures.isEmpty() || !startedGestures.isEmpty()) {
- // gesture found!
- ret = true;
- QSet<QGesture*> started;
- foreach(QGestureRecognizer *r, finishedGestures) {
- if (QGesture *gesture = r->getGesture()) {
- started << gesture;
- gesture->d_func()->singleshot = true;
- }
- }
- foreach(QGestureRecognizer *r, startedGestures) {
- if (QGesture *gesture = r->getGesture()) {
- started << gesture;
- gesture->d_func()->singleshot = false;
- }
- }
-
- if (!activeGestures.isEmpty()) {
- DEBUG() << "QGestureManager: new state = Gesture";
- state = Gesture;
- } else if (!maybeGestures.isEmpty()) {
- DEBUG() << "QGestureManager: new state = Maybe";
- state = MaybeGesture;
- } else {
- DEBUG() << "QGestureManager: new state = NotGesture";
- state = NotGesture;
- }
-
- Q_ASSERT(!started.isEmpty());
- ret = sendGestureEvent(receiver, started, QSet<QGesture*>());
- } else if (!maybeGestures.isEmpty()) {
- if (state != MaybeGesture) {
- // We got a new set of events that look like a start
- // of some gesture, so we switch to state MaybeGesture
- // and wait for more events.
- DEBUG() << "QGestureManager: new state = Maybe. Waiting for events";
- state = MaybeGesture;
- // start gesture timer
- } else {
- // we still not sure if it is a gesture or not.
- }
- } else if (state == MaybeGesture) {
- // last time we thought it looks like gesture, but now we
- // know for sure that it isn't.
- DEBUG() << "QGestureManager: new state = NotGesture";
- state = NotGesture;
- }
- foreach(QGestureRecognizer *r, finishedGestures)
- r->reset();
- foreach(QGestureRecognizer *r, cancelledGestures)
- r->reset();
- foreach(QGestureRecognizer *r, notGestures)
- r->reset();
- } else if (state == Gesture) {
- DEBUG() << "QGestureManager: current event processing state: Gesture";
- Q_ASSERT(!activeGestures.isEmpty());
-
- foreach(QGestureRecognizer *r, recognizers) {
- if (grabbedGestures.value(r->gestureType(), 0) <= 0)
- continue;
- QGestureRecognizer::Result result = r->filterEvent(event);
- if (result == QGestureRecognizer::GestureStarted) {
- DEBUG() << "QGestureManager: gesture started: " << r;
- startedGestures << r;
- } else if (result == QGestureRecognizer::GestureFinished) {
- DEBUG() << "QGestureManager: gesture finished: " << r;
- finishedGestures << r;
- } else if (result == QGestureRecognizer::MaybeGesture) {
- DEBUG() << "QGestureManager: maybe gesture: " << r;
- newMaybeGestures << r;
- } else if (result == QGestureRecognizer::NotGesture) {
- // if it was an active gesture, but isn't a gesture anymore.
- if (activeGestures.contains(r)) {
- DEBUG() << "QGestureManager: cancelled gesture: " << r;
- cancelledGestures << r;
- } else {
- DEBUG() << "QGestureManager: not gesture: " << r;
- notGestures << r;
- }
- }
- }
-
- for(QMap<QGestureRecognizer*, int>::iterator it = maybeGestures.begin();
- it != maybeGestures.end();) {
- QGestureRecognizer *r = it.key();
- if (startedGestures.contains(r) || finishedGestures.contains(r) ||
- notGestures.contains(r)) {
- killTimer(it.value());
- it = maybeGestures.erase(it);
- } else {
- ++it;
- }
- }
- foreach(QGestureRecognizer *r, newMaybeGestures) {
- if (!maybeGestures.contains(r)) {
- int timerId = startTimer(MaximumGestureRecognitionTimeout);
- if (!timerId)
- qWarning("QGestureManager: couldn't start timer!");
- maybeGestures.insert(r, timerId);
- }
- }
- QSet<QGesture*> started, updated;
- if (!finishedGestures.isEmpty() || !startedGestures.isEmpty()) {
- // another gesture found!
- ret = true;
- foreach(QGestureRecognizer *r, finishedGestures) {
- if (QGesture *gesture = r->getGesture()) {
- gesture->d_func()->singleshot = !activeGestures.contains(r);
- if (gesture->d_func()->singleshot)
- started << gesture;
- else
- updated << gesture;
- }
- }
- foreach(QGestureRecognizer *r, startedGestures) {
- if (QGesture *gesture = r->getGesture()) {
- gesture->d_func()->singleshot = !activeGestures.contains(r);
- if (gesture->d_func()->singleshot)
- started << gesture;
- else
- updated << gesture;
- }
- }
- }
- activeGestures -= newMaybeGestures;
- activeGestures -= cancelledGestures;
- activeGestures += startedGestures;
- activeGestures -= finishedGestures;
- QSet<QString> cancelledGestureNames;
- foreach(QGestureRecognizer *r, cancelledGestures)
- cancelledGestureNames << r->gestureType();
- ret = sendGestureEvent(receiver, started, updated, cancelledGestureNames);
-
- foreach(QGestureRecognizer *r, finishedGestures)
- r->reset();
- foreach(QGestureRecognizer *r, cancelledGestures)
- r->reset();
- foreach(QGestureRecognizer *r, notGestures)
- r->reset();
- if (!activeGestures.isEmpty()) {
- // nothing changed, we are still handling a gesture
- } else if (!maybeGestures.isEmpty()) {
- DEBUG() << "QGestureManager: new state = Maybe. Waiting for events: " << maybeGestures;
- state = MaybeGesture;
- } else {
- DEBUG() << "QGestureManager: new state = NotGesture";
- state = NotGesture;
- }
- }
-
- if (delayedPressTimer && state == Gesture) {
- DEBUG() << "QGestureManager: gesture started. Forgetting about postponed mouse press event";
- killTimer(delayedPressTimer);
- delayedPressTimer = 0;
- lastMousePressReceiver = 0;
- } else if (delayedPressTimer && (state == NotGesture ||
- event->type() == QEvent::MouseButtonRelease)) {
- // not a gesture or released button too fast, so replay press
- // event back.
- DEBUG() << "QGestureManager: replaying mouse press event";
- QMap<QGestureRecognizer*, int>::const_iterator it = maybeGestures.begin(),
- e = maybeGestures.end();;
- for (; it != e; ++it) {
- it.key()->reset();
- killTimer(it.value());
- }
- maybeGestures.clear();
- state = NotGesture;
-
- if (lastMousePressReceiver) {
- QApplication::sendEvent(lastMousePressReceiver, &lastMousePressEvent);
- if (event->type() == QEvent::MouseButtonRelease) {
- QMouseEvent *me = static_cast<QMouseEvent*>(event);
- QMouseEvent move(QEvent::MouseMove, me->pos(), me->globalPos(), me->button(),
- me->buttons(), me->modifiers());
- QApplication::sendEvent(lastMousePressReceiver, &move);
- ret = false;
- }
- lastMousePressReceiver = 0;
- }
- lastMousePressReceiver = 0;
- killTimer(delayedPressTimer);
- delayedPressTimer = 0;
- } else if (state == MaybeGesture && event->type() == QEvent::MouseButtonPress
- && eventDeliveryDelayTimeout) {
- // postpone the press event delivery until we know for
- // sure whether it is a gesture.
- DEBUG() << "QGestureManager: postponing mouse press event";
- QMouseEvent *me = static_cast<QMouseEvent*>(event);
- lastMousePressReceiver = receiver;
- lastMousePressEvent = QMouseEvent(QEvent::MouseButtonPress, me->pos(),
- me->globalPos(), me->button(),
- me->buttons(), me->modifiers());
- Q_ASSERT(delayedPressTimer == 0);
- delayedPressTimer = startTimer(eventDeliveryDelayTimeout);
- if (!delayedPressTimer)
- qWarning("QGestureManager: couldn't start delayed press timer!");
- ret = true;
- }
- if (delayedPressTimer && event->type() == QEvent::MouseMove) {
- // if we have postponed a mouse press event, postpone all
- // subsequent mouse move events as well.
- ret = true;
- }
-
- lastPos = currentPos;
- return ret;
-}
-
-void QGestureManager::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() == delayedPressTimer) {
- DEBUG() << "QGestureManager: replaying mouse press event due to timeout";
- // sanity checks
- Q_ASSERT(state != Gesture);
-
- QMap<QGestureRecognizer*, int>::const_iterator it = maybeGestures.begin(),
- e = maybeGestures.end();;
- for (; it != e; ++it) {
- it.key()->reset();
- killTimer(it.value());
- }
- maybeGestures.clear();
- state = NotGesture;
-
- if (lastMousePressReceiver) {
- // we neither received a mouse release event nor gesture
- // started, so we replay stored mouse press event.
- QApplication::sendEvent(lastMousePressReceiver, &lastMousePressEvent);
- lastMousePressReceiver = 0;
- }
-
- lastMousePressReceiver = 0;
- killTimer(delayedPressTimer);
- delayedPressTimer = 0;
- } else {
- // sanity checks, remove later
- Q_ASSERT((state == Gesture && !activeGestures.isEmpty()) || (state != Gesture && activeGestures.isEmpty()));
-
- typedef QMap<QGestureRecognizer*, int> MaybeGestureMap;
- for (MaybeGestureMap::iterator it = maybeGestures.begin(), e = maybeGestures.end();
- it != e; ++it) {
- if (it.value() == event->timerId()) {
- DEBUG() << "QGestureManager: gesture timeout.";
- QGestureRecognizer *r = it.key();
- r->reset();
- maybeGestures.erase(it);
- killTimer(event->timerId());
- break;
- }
- }
-
- if (state == MaybeGesture && maybeGestures.isEmpty()) {
- DEBUG() << "QGestureManager: new state = NotGesture because of timeout";
- state = NotGesture;
- }
- }
-}
-
-bool QGestureManager::inGestureMode()
-{
- return state == Gesture;
-}
-
-void QGestureManager::recognizerStateChanged(QGestureRecognizer::Result result)
-{
- QGestureRecognizer *recognizer = qobject_cast<QGestureRecognizer*>(sender());
- if (!recognizer)
- return;
- if (qApp->d_func()->grabbedGestures.value(recognizer->gestureType(), 0) <= 0) {
- recognizer->reset();
- return;
- }
-
- switch (result) {
- case QGestureRecognizer::GestureStarted:
- case QGestureRecognizer::GestureFinished: {
- if (result == QGestureRecognizer::GestureStarted) {
- DEBUG() << "QGestureManager: gesture started: " << recognizer;
- activeGestures << recognizer;
- DEBUG() << "QGestureManager: new state = Gesture";
- state = Gesture;
- } else {
- DEBUG() << "QGestureManager: gesture finished: " << recognizer;
- }
- if (maybeGestures.contains(recognizer)) {
- killTimer(maybeGestures.value(recognizer));
- maybeGestures.remove(recognizer);
- }
- QSet<QGesture*> gestures;
- if (QGesture *gesture = recognizer->getGesture())
- gestures << gesture;
- if(!gestures.isEmpty()) {
- //FIXME: sendGestureEvent(targetWidget, gestures);
- }
- if (result == QGestureRecognizer::GestureFinished)
- recognizer->reset();
- }
- break;
- case QGestureRecognizer::MaybeGesture: {
- DEBUG() << "QGestureManager: maybe gesture: " << recognizer;
- if (activeGestures.contains(recognizer)) {
- //FIXME: sendGestureEvent(targetWidget, QSet<QGesture*>(), QSet<QString>() << recognizer->gestureType());
- }
- if (!maybeGestures.contains(recognizer)) {
- int timerId = startTimer(MaximumGestureRecognitionTimeout);
- if (!timerId)
- qWarning("QGestureManager: couldn't start timer!");
- maybeGestures.insert(recognizer, timerId);
- }
- }
- break;
- case QGestureRecognizer::NotGesture:
- DEBUG() << "QGestureManager: not gesture: " << recognizer;
- if (maybeGestures.contains(recognizer)) {
- killTimer(maybeGestures.value(recognizer));
- maybeGestures.remove(recognizer);
- }
- recognizer->reset();
- break;
- default:
- Q_ASSERT(false);
- }
-
- if (delayedPressTimer && state == Gesture) {
- killTimer(delayedPressTimer);
- delayedPressTimer = 0;
- }
-}
-
-bool QGestureManager::sendGestureEvent(QWidget *receiver,
- const QSet<QGesture*> &startedGestures,
- const QSet<QGesture*> &updatedGestures,
- const QSet<QString> &cancelled)
-{
- DEBUG() << "QGestureManager::sendGestureEvent: sending to" << receiver
- << "gestures:" << startedGestures << "," << updatedGestures
- << "cancelled:" << cancelled;
- // grouping gesture objects by receiver widgets.
- typedef QMap<QWidget*, QSet<QGesture*> > WidgetGesturesMap;
- WidgetGesturesMap widgetGestures;
- for(QSet<QGesture*>::const_iterator it = startedGestures.begin(), e = startedGestures.end();
- it != e; ++it) {
- QGesture *g = *it;
- QGesturePrivate *gd = g->d_func();
- if (receiver) {
- // find the target widget
- gd->widget = 0;
- gd->graphicsItem = 0;
- QWidget *w = receiver;
- QPoint offset;
- const QString gestureType = g->type();
- while (w) {
- if (w->d_func()->hasGesture(gestureType))
- break;
- if (w->isWindow()) {
- w = 0;
- break;
- }
- offset += w->pos();
- w = w->parentWidget();
- }
- if (w && w != gd->widget) {
- DEBUG() << "QGestureManager::sendGestureEvent:" << g << "propagating to widget" << w << "offset" << offset;
- g->translate(offset);
- }
- gd->widget = w;
- }
- if (!gd->widget) {
- DEBUG() << "QGestureManager: didn't find a widget to send gesture event ("
- << g->type() << ") for tree:" << receiver;
- // TODO: maybe we should reset gesture recognizers when nobody interested in its gestures.
- continue;
- }
- widgetGestures[gd->widget].insert(g);
- }
-
- QSet<QGesture*> ignoredGestures;
- bool ret = false;
- for(WidgetGesturesMap::const_iterator it = widgetGestures.begin(), e = widgetGestures.end();
- it != e; ++it) {
- QWidget *receiver = it.key();
- Q_ASSERT(receiver != 0 /*should be taken care above*/);
- QSet<QGesture*> gestures = it.value();
- // mark all gestures as ignored by default
- for(QSet<QGesture*>::iterator it = gestures.begin(), e = gestures.end(); it != e; ++it)
- (*it)->ignore();
- // TODO: send cancelled gesture event to the widget that received the original gesture!
- QGestureEvent event(gestures, cancelled);
- DEBUG() << "QGestureManager::sendGestureEvent: sending now to" << receiver
- << "gestures" << gestures;
- bool processed = qt_sendSpontaneousEvent(receiver, &event);
- QSet<QGesture*> started = startedGestures & gestures;
- DEBUG() << "QGestureManager::sendGestureEvent:" <<
- (event.isAccepted() ? "" : "not") << "all gestures were accepted";
- if (!started.isEmpty() && !(processed && event.isAccepted())) {
- // there are started gestures events that weren't
- // accepted, so propagating each gesture independently.
- if (event.isAccepted()) {
- foreach(QGesture *g, started)
- g->accept();
- }
- QSet<QGesture*>::const_iterator it = started.begin(),
- e = started.end();
- for(; it != e; ++it) {
- QGesture *g = *it;
- if (processed && g->isAccepted()) {
- ret = true;
- continue;
- }
- // if it wasn't accepted, find the first parent widget
- // that is subscribed to the gesture.
- QGesturePrivate *gd = g->d_func();
- QWidget *w = gd->widget;
- gd->widget = 0;
-
- if (w && !w->isWindow()) {
- g->translate(w->pos());
- w = w->parentWidget();
- QPoint offset;
- const QString gestureType = g->type();
- while (w) {
- if (w->d_func()->hasGesture(gestureType)) {
- DEBUG() << "QGestureManager::sendGestureEvent:" << receiver
- << "didn't accept gesture" << g << "propagating to" << w;
- ignoredGestures.insert(g);
- gd->widget = w;
- break;
- }
- if (w->isWindow()) {
- w = 0;
- break;
- }
- offset += w->pos();
- w = w->parentWidget();
- }
- if (w) {
- g->translate(offset);
- } else {
- DEBUG() << "QGestureManager::sendGestureEvent:" << receiver
- << "didn't accept gesture" << g << "and nobody wants it";
- }
- }
- }
- }
- }
- if (ignoredGestures.isEmpty())
- return ret;
- // try to send all gestures that were ignored to the next parent
- return sendGestureEvent(0, ignoredGestures, QSet<QGesture*>(), cancelled) || ret;
-}
-
-int QGestureManager::eventDeliveryDelay() const
-{
- return eventDeliveryDelayTimeout;
-}
-
-void QGestureManager::setEventDeliveryDelay(int ms)
-{
- eventDeliveryDelayTimeout = ms;
-}
-
-int QGestureManager::makeGestureId(const QString &name)
-{
- gestureIdMap[++lastGestureId] = name;
- return lastGestureId;
-}
-
-void QGestureManager::releaseGestureId(int gestureId)
-{
- gestureIdMap.remove(gestureId);
-}
-
-QString QGestureManager::gestureNameFromId(int gestureId) const
-{
- return gestureIdMap.value(gestureId);
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qgesturemanager_p.cpp"
-
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h
deleted file mode 100644
index 8656590..0000000
--- a/src/gui/kernel/qgesturemanager_p.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QGESTUREMANAGER_P_H
-#define QGESTUREMANAGER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qlist.h"
-#include "qset.h"
-#include "qevent.h"
-#include "qbasictimer.h"
-#include "qpointer.h"
-
-#include "qgesturerecognizer.h"
-
-QT_BEGIN_NAMESPACE
-
-class QWidget;
-class Q_AUTOTEST_EXPORT QGestureManager : public QObject
-{
- Q_OBJECT
-public:
- QGestureManager(QObject *parent);
-
- int eventDeliveryDelay() const;
- void setEventDeliveryDelay(int ms);
-
- void addRecognizer(QGestureRecognizer *recognizer);
- void removeRecognizer(QGestureRecognizer *recognizer);
-
- bool filterEvent(QWidget *receiver, QEvent *event);
- bool inGestureMode();
-
- int makeGestureId(const QString &name);
- void releaseGestureId(int gestureId);
- QString gestureNameFromId(int gestureId) const;
-
- // declared in qapplication.cpp
- static QGestureManager* instance();
-
- bool sendGestureEvent(QWidget *receiver,
- const QSet<QGesture*> &startedGestures,
- const QSet<QGesture*> &updatedGestures,
- const QSet<QString> &cancelled = QSet<QString>());
-
-protected:
- void timerEvent(QTimerEvent *event);
-
-private slots:
- void recognizerStateChanged(QGestureRecognizer::Result);
-
-private:
- QSet<QGestureRecognizer*> activeGestures;
- QMap<QGestureRecognizer*, int> maybeGestures;
- QSet<QGestureRecognizer*> recognizers;
-
- QPoint lastPos;
-
- int eventDeliveryDelayTimeout;
- int delayedPressTimer;
- QPointer<QWidget> lastMousePressReceiver;
- QMouseEvent lastMousePressEvent;
-
- QMap<int, QString> gestureIdMap;
- int lastGestureId;
-
- enum State {
- Gesture,
- NotGesture,
- MaybeGesture // that mean timers are up and waiting for some
- // more events, and input events are handled by
- // gesture recognizer explicitely
- } state;
-};
-
-QT_END_NAMESPACE
-
-#endif // QGESTUREMANAGER_P_H
diff --git a/src/gui/kernel/qgesturerecognizer.cpp b/src/gui/kernel/qgesturerecognizer.cpp
deleted file mode 100644
index c330663..0000000
--- a/src/gui/kernel/qgesturerecognizer.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgesturerecognizer.h"
-#include "qgesture.h"
-
-#include <private/qobject_p.h>
-#include <private/qgesturerecognizer_p.h>
-
-QT_BEGIN_NAMESPACE
-
-QString qt_getStandardGestureTypeName(Qt::GestureType gestureType);
-
-/*!
- \class QGestureRecognizer
- \since 4.6
-
- \brief The QGestureRecognizer class is the base class for
- implementing custom gestures.
-
- This is a base class, to create a custom gesture type, you should
- subclass it and implement its pure virtual functions.
-
- Usually gesture recognizer implements state machine, storing its
- state internally in the recognizer object. The recognizer receives
- input events through the \l{QGestureRecognizer::}{filterEvent()}
- virtual function and decides whether the parsed event should
- change the state of the recognizer - i.e. if the event starts or
- ends a gesture or if it isn't related to gesture at all.
-*/
-
-/*!
- \enum QGestureRecognizer::Result
- \since 4.6
-
- This enum type defines the state of the gesture recognizer.
-
- \value Ignore Gesture recognizer ignores the event.
-
- \value NotGesture Not a gesture.
-
- \value GestureStarted The continuous gesture has started. When the
- recognizer is in this state, a \l{QGestureEvent}{gesture event}
- containing QGesture objects returned by the
- \l{QGestureRecognizer::}{getGesture()} will be sent to a widget.
-
- \value GestureFinished The gesture has ended. A
- \l{QGestureEvent}{gesture event} will be sent to a widget.
-
- \value MaybeGesture Gesture recognizer hasn't decided yet if a
- gesture has started, but it might start soon after the following
- events are received by the recognizer. This means that gesture
- manager shouldn't reset() the internal state of the gesture
- recognizer.
-*/
-
-/*! \fn QGestureRecognizer::Result QGestureRecognizer::filterEvent(const QEvent *event)
-
- This is a pure virtual function that needs to be implemented in
- subclasses.
-
- Parses input \a event and returns the result, which specifies if
- the event sequence is a gesture or not.
-*/
-
-/*! \fn QGesture* QGestureRecognizer::getGesture()
-
- Returns a gesture object that will be send to the widget. This
- function is called when the gesture recognizer changed its state
- to QGestureRecognizer::GestureStarted or
- QGestureRecognizer::GestureFinished.
-
- The returned QGesture object must point to the same object in a
- single gesture sequence.
-
- The gesture object is owned by the recognizer itself.
-*/
-
-/*! \fn void QGestureRecognizer::reset()
-
- Resets the internal state of the gesture recognizer.
-*/
-
-/*! \fn void QGestureRecognizer::stateChanged(QGestureRecognizer::Result result)
-
- The gesture recognizer might emit the stateChanged() signal when
- the gesture state changes asynchronously, i.e. without any event
- being filtered through filterEvent().
-*/
-
-QGestureRecognizerPrivate::QGestureRecognizerPrivate()
- : gestureType(Qt::UnknownGesture)
-{
-}
-
-/*!
- Creates a new gesture recognizer object that handles gestures of
- the specific \a gestureType as a child of \a parent.
-
- \sa QApplication::addGestureRecognizer(),
- QApplication::removeGestureRecognizer(),
-*/
-QGestureRecognizer::QGestureRecognizer(const QString &gestureType, QObject *parent)
- : QObject(*new QGestureRecognizerPrivate, parent)
-{
- Q_D(QGestureRecognizer);
- d->customGestureType = gestureType;
-}
-
-/*!
- Returns the name of the gesture that is handled by the recognizer.
-*/
-QString QGestureRecognizer::gestureType() const
-{
- Q_D(const QGestureRecognizer);
- if (d->gestureType == Qt::UnknownGesture)
- return d->customGestureType;
- return qt_getStandardGestureTypeName(d->gestureType);
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesturestandardrecognizers.cpp b/src/gui/kernel/qgesturestandardrecognizers.cpp
deleted file mode 100644
index b108994..0000000
--- a/src/gui/kernel/qgesturestandardrecognizers.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgesturestandardrecognizers_p.h"
-#include "qgesture_p.h"
-#include "qgesturerecognizer_p.h"
-
-// #define GESTURE_RECOGNIZER_DEBUG
-#ifndef GESTURE_RECOGNIZER_DEBUG
-# define DEBUG if (0) qDebug
-#else
-# define DEBUG qDebug
-#endif
-
-QT_BEGIN_NAMESPACE
-
-QString qt_getStandardGestureTypeName(Qt::GestureType gestureType)
-{
- switch (gestureType) {
- case Qt::TapGesture:
- return QLatin1String("__QTapGesture");
- case Qt::DoubleTapGesture:
- return QLatin1String("__QDoubleTapGesture");
- case Qt::TrippleTapGesture:
- return QLatin1String("__QTrippleTapGesture");
- case Qt::TapAndHoldGesture:
- return QLatin1String("__QTapAndHoldGesture");
- case Qt::PanGesture:
- return QLatin1String("__QPanGesture");
- case Qt::PinchGesture:
- return QLatin1String("__QPinchGesture");
- case Qt::UnknownGesture:
- break;
- }
- qFatal("QGestureRecognizer::gestureType: got an unhandled gesture type.");
- return QLatin1String("__unknown_gesture");
-}
-
-//
-// QGestureRecognizerPan
-//
-
-QGestureRecognizerPan::QGestureRecognizerPan(QObject *parent)
- : QGestureRecognizer(QString(), parent),
- mousePressed(false), gestureState(Qt::NoGesture),
- lastDirection(Qt::NoDirection), currentDirection(Qt::NoDirection)
-{
- Q_D(QGestureRecognizer);
- d->gestureType = Qt::PanGesture;
-}
-
-QGestureRecognizer::Result QGestureRecognizerPan::filterEvent(const QEvent *event)
-{
- if (event->type() == QEvent::MouseButtonPress) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- if (currentDirection != Qt::NoDirection) {
- DEBUG() << "Pan: MouseButtonPress: fail. another press during pan";
- reset();
- return QGestureRecognizer::NotGesture;
- }
- if (ev->button() != Qt::LeftButton) {
- return QGestureRecognizer::NotGesture;
- }
- DEBUG() << "Pan: MouseButtonPress: maybe gesture started";
- mousePressed = true;
- pressedPos = lastPos = currentPos = ev->pos();
- return QGestureRecognizer::MaybeGesture;
- } else if (event->type() == QEvent::MouseButtonRelease) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- if (mousePressed && currentDirection != Qt::NoDirection
- && ev->button() == Qt::LeftButton) {
- DEBUG() << "Pan: MouseButtonRelease: pan detected";
- gestureState = Qt::GestureFinished;
- currentPos = ev->pos();
- internalReset();
- return QGestureRecognizer::GestureFinished;
- }
- DEBUG() << "Pan: MouseButtonRelease: some weird release detected, ignoring";
- reset();
- return QGestureRecognizer::NotGesture;
- } else if (event->type() == QEvent::MouseMove) {
- if (!mousePressed)
- return QGestureRecognizer::NotGesture;
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- lastPos = currentPos;
- currentPos = ev->pos();
- Qt::DirectionType newDirection =
- simpleRecognizer.addPosition(ev->pos()).direction;
- DEBUG() << "Pan: MouseMove: simplerecognizer result = " << newDirection;
- QGestureRecognizer::Result result = QGestureRecognizer::NotGesture;
- if (currentDirection == Qt::NoDirection) {
- if (newDirection == Qt::NoDirection) {
- result = QGestureRecognizer::MaybeGesture;
- } else {
- result = QGestureRecognizer::GestureStarted;
- gestureState = Qt::GestureStarted;
- }
- } else {
- result = QGestureRecognizer::GestureStarted;
- gestureState = Qt::GestureUpdated;
- }
- if (newDirection != Qt::NoDirection) {
- if (currentDirection != newDirection)
- lastDirection = currentDirection;
- currentDirection = newDirection;
- }
- return result;
- }
- return QGestureRecognizer::Ignore;
-}
-
-QGesture* QGestureRecognizerPan::getGesture()
-{
- if (currentDirection == Qt::NoDirection)
- return 0;
- QPanningGesturePrivate *d = gesture.d_func();
- d->startPos = pressedPos;
- d->lastPos = lastPos;
- d->pos = currentPos;
- d->hotSpot = pressedPos;
- d->state = gestureState;
- d->lastDirection = lastDirection;
- d->direction = currentDirection;
-
- return &gesture;
-}
-
-void QGestureRecognizerPan::reset()
-{
- mousePressed = false;
- lastDirection = Qt::NoDirection;
- currentDirection = Qt::NoDirection;
- gestureState = Qt::NoGesture;
- diagonalRecognizer.reset();
- simpleRecognizer.reset();
-}
-
-void QGestureRecognizerPan::internalReset()
-{
- mousePressed = false;
- diagonalRecognizer.reset();
- simpleRecognizer.reset();
-}
-
-
-//
-// QDoubleTapGestureRecognizer
-//
-QDoubleTapGestureRecognizer::QDoubleTapGestureRecognizer(QObject *parent)
- : QGestureRecognizer(QString(), parent),
- gesture(0, qt_getStandardGestureTypeName(Qt::DoubleTapGesture))
-{
- Q_D(QGestureRecognizer);
- d->gestureType = Qt::DoubleTapGesture;
-}
-
-QGestureRecognizer::Result QDoubleTapGestureRecognizer::filterEvent(const QEvent *event)
-{
- if (event->type() == QEvent::MouseButtonPress) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- if (pressedPosition.isNull()) {
- pressedPosition = ev->pos();
- return QGestureRecognizer::MaybeGesture;
- } else if ((pressedPosition - ev->pos()).manhattanLength() < 10) {
- return QGestureRecognizer::GestureFinished;
- }
- return QGestureRecognizer::NotGesture;
- } else if (event->type() == QEvent::MouseButtonRelease) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- if (!pressedPosition.isNull() && (pressedPosition - ev->pos()).manhattanLength() < 10)
- return QGestureRecognizer::MaybeGesture;
- return QGestureRecognizer::NotGesture;
- } else if (event->type() == QEvent::MouseButtonDblClick) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- pressedPosition = ev->pos();
- return QGestureRecognizer::GestureFinished;
- }
- return QGestureRecognizer::NotGesture;
-}
-
-QGesture* QDoubleTapGestureRecognizer::getGesture()
-{
- QGesturePrivate *d = gesture.d_func();
- d->startPos = pressedPosition;
- d->lastPos = pressedPosition;
- d->pos = pressedPosition;
- d->hotSpot = pressedPosition;
- d->state = Qt::GestureFinished;
- return &gesture;
-}
-
-void QDoubleTapGestureRecognizer::reset()
-{
- pressedPosition = QPoint();
-}
-
-//
-// QTapAndHoldGestureRecognizer
-//
-const int QTapAndHoldGestureRecognizer::iterationCount = 40;
-const int QTapAndHoldGestureRecognizer::iterationTimeout = 50;
-
-QTapAndHoldGestureRecognizer::QTapAndHoldGestureRecognizer(QObject *parent)
- : QGestureRecognizer(QString(), parent),
- gesture(0, qt_getStandardGestureTypeName(Qt::TapAndHoldGesture)),
- iteration(0)
-{
- Q_D(QGestureRecognizer);
- d->gestureType = Qt::TapAndHoldGesture;
-}
-
-QGestureRecognizer::Result QTapAndHoldGestureRecognizer::filterEvent(const QEvent *event)
-{
- if (event->type() == QEvent::MouseButtonPress) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- if (timer.isActive())
- timer.stop();
- timer.start(QTapAndHoldGestureRecognizer::iterationTimeout, this);
- pressedPosition = ev->pos();
- return QGestureRecognizer::MaybeGesture;
- } else if (event->type() == QEvent::MouseMove) {
- const QMouseEvent *ev = static_cast<const QMouseEvent*>(event);
- if ((pressedPosition - ev->pos()).manhattanLength() < 15)
- return QGestureRecognizer::GestureStarted;
- else
- return QGestureRecognizer::NotGesture;
- } else if (event->type() == QEvent::MouseButtonRelease) {
- timer.stop();
- return QGestureRecognizer::NotGesture;
- }
- return QGestureRecognizer::Ignore;
-}
-
-void QTapAndHoldGestureRecognizer::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() != timer.timerId())
- return;
- if (iteration == QTapAndHoldGestureRecognizer::iterationCount) {
- timer.stop();
- emit stateChanged(QGestureRecognizer::GestureFinished);
- } else {
- emit stateChanged(QGestureRecognizer::GestureStarted);
- }
- ++iteration;
-}
-
-QGesture* QTapAndHoldGestureRecognizer::getGesture()
-{
- QGesturePrivate *d = gesture.d_func();
- d->startPos = pressedPosition;
- d->lastPos = pressedPosition;
- d->pos = pressedPosition;
- d->hotSpot = pressedPosition;
- if (iteration >= QTapAndHoldGestureRecognizer::iterationCount)
- d->state = Qt::GestureFinished;
- else
- d->state = iteration == 0 ? Qt::GestureStarted : Qt::GestureUpdated;
- return &gesture;
-}
-
-void QTapAndHoldGestureRecognizer::reset()
-{
- pressedPosition = QPoint();
- timer.stop();
- iteration = 0;
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index c986117..011c726 100644
--- a/src/gui/kernel/qguifunctions_wince.cpp
+++ b/src/gui/kernel/qguifunctions_wince.cpp
@@ -215,13 +215,7 @@ int qt_wince_GetDIBits(HDC /*hdc*/ , HBITMAP hSourceBitmap, uint, uint, LPVOID l
return ret;
}
-bool qt_wince_TextOutW(HDC hdc, int x, int y, LPWSTR lpString, UINT c)
-{
- return ExtTextOutW(hdc, x, y, 0, NULL, lpString, c, NULL);
-}
-
-
-HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCTSTR, LPCTSTR file, LPCTSTR params, LPCTSTR dir, int showCmd)
+HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR, LPCWSTR file, LPCWSTR params, LPCWSTR dir, int showCmd)
{
SHELLEXECUTEINFO info;
info.hwnd = hwnd;
@@ -253,17 +247,11 @@ COLORREF qt_wince_PALETTEINDEX( WORD /*wPaletteIndex*/)
return 0;
}
-BOOL qt_wince_TextOut( HDC hdc, int nXStart, int nYStart, LPCTSTR lpString, int cbString )
-{
- return ExtTextOut( hdc, nXStart, nYStart - 16, 0, NULL, lpString, cbString, NULL );
-}
-
// Internal Qt -----------------------------------------------------
bool qt_wince_is_platform(const QString &platformString) {
- TCHAR tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
+ wchar_t tszPlatform[64];
+ if (SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(tszPlatform) / sizeof(wchar_t), tszPlatform, 0))
+ if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
return true;
return false;
}
@@ -316,8 +304,8 @@ void qt_wince_maximize(QWidget *widget)
void qt_wince_minimize(HWND hwnd) {
- uint exstyle = GetWindowLongW(hwnd, GWL_EXSTYLE);
- uint style = GetWindowLongW(hwnd, GWL_STYLE);
+ uint exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ uint style = GetWindowLong(hwnd, GWL_STYLE);
RECT rect;
RECT crect = {0,0,0,0};
GetWindowRect(hwnd, &rect);
diff --git a/src/gui/kernel/qguifunctions_wince.h b/src/gui/kernel/qguifunctions_wince.h
index bcf2004..234c8c6 100644
--- a/src/gui/kernel/qguifunctions_wince.h
+++ b/src/gui/kernel/qguifunctions_wince.h
@@ -73,10 +73,6 @@ int qt_wince_GetDIBits(HDC, HBITMAP, uint, uint, void*, LPBITMAPINFO, uint);
// QWidget
#define SW_SHOWMINIMIZED SW_MINIMIZE
-// QPaintEngine
-bool qt_wince_TextOutW(HDC, int, int, LPWSTR, UINT);
-#define TextOutW(a,b,c,d,e) qt_wince_TextOutW(a,b,c,d,e)
-
// QRegion
#define ALTERNATE 0
#define WINDING 1
@@ -128,7 +124,7 @@ typedef struct tagTTPOLYCURVE
#define TT_PRIM_CSPLINE 3
#define ANSI_VAR_FONT 12
-HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCTSTR operation, LPCTSTR file, LPCTSTR params, LPCTSTR dir, int showCmd);
+HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR operation, LPCWSTR file, LPCWSTR params, LPCWSTR dir, int showCmd);
#define ShellExecute(a,b,c,d,e,f) qt_wince_ShellExecute(a,b,c,d,e,f)
@@ -150,8 +146,6 @@ HWND qt_wince_SetClipboardViewer(
// Graphics ---------------------------------------------------------
COLORREF qt_wince_PALETTEINDEX( WORD wPaletteIndex );
#define PALETTEINDEX(a) qt_wince_PALETTEINDEX(a)
-BOOL qt_wince_TextOut( HDC hdc, int nXStart, int nYStart, LPCTSTR lpString, int cbString );
-#define TextOut(a,b,c,d,e) qt_wince_TextOut(a,b,c,d,e)
#endif // Q_OS_WINCE
#endif // QGUIFUNCTIONS_WCE_H
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp
index e40dfa0..0998631 100644
--- a/src/gui/kernel/qkeymapper_win.cpp
+++ b/src/gui/kernel/qkeymapper_win.cpp
@@ -41,7 +41,7 @@
#include "qkeymapper_p.h"
-#include <windows.h>
+#include <qt_windows.h>
#include <qdebug.h>
#include <private/qevent_p.h>
#include <private/qlocale_p.h>
@@ -57,9 +57,7 @@ QT_BEGIN_NAMESPACE
// Implemented elsewhere
extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
-Q_CORE_EXPORT bool winPostMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-Q_CORE_EXPORT bool winPeekMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax,
- UINT wRemoveMsg);
+
extern Q_CORE_EXPORT QLocale qt_localeFromLCID(LCID id);
#ifndef LANG_PASHTO
#define LANG_PASHTO 0x63
@@ -467,12 +465,7 @@ static inline int toKeyOrUnicode(int vk, int scancode, unsigned char *kbdBuffer,
Q_ASSERT(vk > 0 && vk < 256);
int code = 0;
QChar unicodeBuffer[5];
- int res = 0;
- if (QSysInfo::WindowsVersion < QSysInfo::WV_NT)
- res = ToAscii(vk, scancode, kbdBuffer, reinterpret_cast<LPWORD>(unicodeBuffer), 0);
- else
- res = ToUnicode(vk, scancode, kbdBuffer, reinterpret_cast<LPWSTR>(unicodeBuffer), 5, 0);
-
+ int res = ToUnicode(vk, scancode, kbdBuffer, reinterpret_cast<LPWSTR>(unicodeBuffer), 5, 0);
if (res)
code = unicodeBuffer[0].toUpper().unicode();
@@ -504,38 +497,6 @@ static inline int asciiToKeycode(char a, int state)
return a & 0xff;
}
-static int inputcharset = CP_ACP;
-static inline QChar wmchar_to_unicode(DWORD c)
-{
- // qt_winMB2QString is the generalization of this function.
- QT_WA({
- return QChar((ushort)c);
- } , {
- char mb[2];
- mb[0] = c & 0xff;
- mb[1] = 0;
- WCHAR wc[1];
- MultiByteToWideChar(inputcharset, MB_PRECOMPOSED, mb, -1, wc, 1);
- return QChar(wc[0]);
- });
-}
-
-static inline QChar imechar_to_unicode(DWORD c)
-{
- // qt_winMB2QString is the generalization of this function.
- QT_WA({
- return QChar((ushort)c);
- } , {
- char mb[3];
- mb[0] = (c >> 8) & 0xff;
- mb[1] = c & 0xff;
- mb[2] = 0;
- WCHAR wc[1];
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, mb, -1, wc, 1);
- return QChar(wc[0]);
- });
-}
-
static inline bool isModifierKey(int code)
{
return (code >= Qt::Key_Shift) && (code <= Qt::Key_ScrollLock);
@@ -635,43 +596,15 @@ void QKeyMapperPrivate::clearMappings()
/* MAKELCID()'s first argument is a WORD, and GetKeyboardLayout()
* returns a DWORD. */
-// LCID newLCID = MAKELCID(DWORD(GetKeyboardLayout(0)), SORT_DEFAULT);
+
+ LCID newLCID = MAKELCID((DWORD)GetKeyboardLayout(0), SORT_DEFAULT);
// keyboardInputLocale = qt_localeFromLCID(newLCID);
- LCID newLCID = MAKELCID(
- reinterpret_cast<long>(GetKeyboardLayout(0)),
- SORT_DEFAULT
- );
- keyboardInputLocale = qt_localeFromLCID(newLCID);
+
bool bidi = false;
-#ifdef UNICODE
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_2000) {
- WCHAR wchLCIDFontSig[16];
- if (GetLocaleInfoW(newLCID,
- LOCALE_FONTSIGNATURE,
- &wchLCIDFontSig[0],
- (sizeof(wchLCIDFontSig)/sizeof(WCHAR)))
- && (wchLCIDFontSig[7] & (WCHAR)0x0800))
+ wchar_t LCIDFontSig[16];
+ if (GetLocaleInfo(newLCID, LOCALE_FONTSIGNATURE, LCIDFontSig, sizeof(LCIDFontSig) / sizeof(wchar_t))
+ && (LCIDFontSig[7] & (wchar_t)0x0800))
bidi = true;
- } else
-#endif //UNICODE
- {
- if (newLCID == 0x0859 || //Sindhi (Arabic script)
- newLCID == 0x0460) //Kashmiri (Arabic script)
- bidi = true;;
-
- switch (PRIMARYLANGID(newLCID))
- {
- case LANG_ARABIC:
- case LANG_HEBREW:
- case LANG_URDU:
- case LANG_FARSI:
- case LANG_PASHTO:
- //case LANG_UIGHUR:
- case LANG_SYRIAC:
- case LANG_DIVEHI:
- bidi = true;
- }
- }
keyboardInputDirection = bidi ? Qt::RightToLeft : Qt::LeftToRight;
}
@@ -760,7 +693,7 @@ void QKeyMapperPrivate::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
keyLayout[vk_key]->qtKey[8] = fallbackKey;
// If this vk_key a Dead Key
- if (MapVirtualKey(vk_key, 2) & 0x80008000) { // (High-order dead key on Win 95 is 0x8000)
+ if (MapVirtualKey(vk_key, 2) & 0x80000000) {
// Push a Space, then the original key through the low-level ToAscii functions.
// We do this because these functions (ToAscii / ToUnicode) will alter the internal state of
// the keyboard driver By doing the following, we set the keyboard driver state back to what
@@ -837,13 +770,13 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
bool isNumpad = (msg.wParam >= VK_NUMPAD0 && msg.wParam <= VK_NUMPAD9);
quint32 nModifiers = 0;
- if (QSysInfo::WindowsVersion < QSysInfo::WV_NT || QSysInfo::WindowsVersion & QSysInfo::WV_CE_based) {
+#if defined(QT_OS_WINCE)
nModifiers |= (GetKeyState(VK_SHIFT ) < 0 ? ShiftAny : 0);
nModifiers |= (GetKeyState(VK_CONTROL) < 0 ? ControlAny : 0);
nModifiers |= (GetKeyState(VK_MENU ) < 0 ? AltAny : 0);
nModifiers |= (GetKeyState(VK_LWIN ) < 0 ? MetaLeft : 0);
nModifiers |= (GetKeyState(VK_RWIN ) < 0 ? MetaRight : 0);
- } else {
+#else
// Map native modifiers to some bit representation
nModifiers |= (GetKeyState(VK_LSHIFT ) & 0x80 ? ShiftLeft : 0);
nModifiers |= (GetKeyState(VK_RSHIFT ) & 0x80 ? ShiftRight : 0);
@@ -857,7 +790,8 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
nModifiers |= (GetKeyState(VK_CAPITAL ) & 0x01 ? CapsLock : 0);
nModifiers |= (GetKeyState(VK_NUMLOCK ) & 0x01 ? NumLock : 0);
nModifiers |= (GetKeyState(VK_SCROLL ) & 0x01 ? ScrollLock : 0);
- }
+#endif // QT_OS_WINCE
+
if (msg.lParam & ExtendedKey)
nModifiers |= msg.lParam & ExtendedKey;
@@ -870,12 +804,12 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
// Now we know enough to either have MapVirtualKey or our own keymap tell us if it's a deadkey
bool isDeadKey = isADeadKey(msg.wParam, state)
- || MapVirtualKey(msg.wParam, 2) & 0x80008000; // High-order on 95 is 0x8000
+ || MapVirtualKey(msg.wParam, 2) & 0x80000000;
// A multi-character key not found by our look-ahead
if (msgType == WM_CHAR) {
QString s;
- QChar ch = wmchar_to_unicode(msg.wParam);
+ QChar ch = QChar((ushort)msg.wParam);
if (!ch.isNull())
s += ch;
@@ -886,7 +820,7 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
// Input method characters not found by our look-ahead
else if (msgType == WM_IME_CHAR) {
QString s;
- QChar ch = imechar_to_unicode(msg.wParam);
+ QChar ch = QChar((ushort)msg.wParam);
if (!ch.isNull())
s += ch;
@@ -917,8 +851,8 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
}
} else if (msgType == WM_KEYUP) {
if (dirStatus == VK_LSHIFT
- && (msg.wParam == VK_SHIFT && GetKeyState(VK_LCONTROL)
- || msg.wParam == VK_CONTROL && GetKeyState(VK_LSHIFT))) {
+ && ((msg.wParam == VK_SHIFT && GetKeyState(VK_LCONTROL))
+ || (msg.wParam == VK_CONTROL && GetKeyState(VK_LSHIFT)))) {
k0 = q->sendKeyEvent(widget, grab, QEvent::KeyPress, Qt::Key_Direction_L, 0,
QString(), false, 0,
scancode, msg.wParam, nModifiers);
@@ -927,8 +861,8 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
scancode, msg.wParam, nModifiers);
dirStatus = 0;
} else if (dirStatus == VK_RSHIFT
- && (msg.wParam == VK_SHIFT && GetKeyState(VK_RCONTROL)
- || msg.wParam == VK_CONTROL && GetKeyState(VK_RSHIFT))) {
+ && ( (msg.wParam == VK_SHIFT && GetKeyState(VK_RCONTROL))
+ || (msg.wParam == VK_CONTROL && GetKeyState(VK_RSHIFT)))) {
k0 = q->sendKeyEvent(widget, grab, QEvent::KeyPress, Qt::Key_Direction_R,
0, QString(), false, 0,
scancode, msg.wParam, nModifiers);
@@ -1050,11 +984,9 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
: msgType == WM_IME_KEYDOWN ? WM_IME_CHAR : WM_SYSCHAR);
QChar uch;
- if (winPeekMessage(&wm_char, 0, charType, charType, PM_REMOVE)) {
+ if (PeekMessage(&wm_char, 0, charType, charType, PM_REMOVE)) {
// Found a ?_CHAR
- uch = charType == WM_IME_CHAR
- ? imechar_to_unicode(wm_char.wParam)
- : wmchar_to_unicode(wm_char.wParam);
+ uch = QChar((ushort)wm_char.wParam);
if (msgType == WM_SYSKEYDOWN && uch.isLetter() && (msg.lParam & KF_ALTDOWN))
uch = uch.toLower(); // (See doc of WM_SYSCHAR) Alt-letter
if (!code && !uch.row())
@@ -1067,7 +999,7 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
// to find the correct key using the current message parameters & keyboard state.
if (uch.isNull() && msgType == WM_IME_KEYDOWN) {
BYTE keyState[256];
- WCHAR newKey[3] = {0};
+ wchar_t newKey[3] = {0};
GetKeyboardState(keyState);
int val = ToUnicode(vk_key, scancode, keyState, newKey, 2, 0);
if (val == 1) {
@@ -1085,18 +1017,10 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
uch = QChar(QLatin1Char(0x7f)); // Windows doesn't know this one.
} else {
if (msgType != WM_SYSKEYDOWN || !code) {
- UINT map;
- QT_WA({
- map = MapVirtualKey(msg.wParam, 2);
- } , {
- map = MapVirtualKeyA(msg.wParam, 2);
- // High-order bit is 0x8000 on '95
- if (map & 0x8000)
- map = (map^0x8000)|0x80000000;
- });
+ UINT map = MapVirtualKey(msg.wParam, 2);
// If the high bit of the return value is set, it's a deadkey
if (!(map & 0x80000000))
- uch = wmchar_to_unicode((DWORD)map);
+ uch = QChar((ushort)map);
}
}
if (!code && !uch.row())
@@ -1237,6 +1161,8 @@ bool QKeyMapper::sendKeyEvent(QWidget *widget, bool grab,
if (QApplicationPrivate::instance()->qt_tryAccelEvent(widget, &a))
return true;
}
+#else
+ Q_UNUSED(grab);
#endif
if (!widget->isEnabled())
return false;
diff --git a/src/gui/kernel/qmime_win.cpp b/src/gui/kernel/qmime_win.cpp
index bc15638..acd7cfc 100644
--- a/src/gui/kernel/qmime_win.cpp
+++ b/src/gui/kernel/qmime_win.cpp
@@ -170,7 +170,7 @@ static QByteArray getData(int cf, IDataObject *pDataObj)
if (pDataObj->GetData(&formatetc, &s) == S_OK) {
char szBuffer[4096];
ULONG actualRead = 0;
- LARGE_INTEGER pos = {0, 0};
+ LARGE_INTEGER pos = {{0, 0}};
//Move to front (can fail depending on the data model implemented)
HRESULT hr = s.pstm->Seek(pos, STREAM_SEEK_SET, NULL);
while(SUCCEEDED(hr)){
@@ -281,11 +281,7 @@ QWindowsMime::~QWindowsMime()
*/
int QWindowsMime::registerMimeType(const QString &mime)
{
-#ifdef Q_OS_WINCE
int f = RegisterClipboardFormat(reinterpret_cast<const wchar_t *> (mime.utf16()));
-#else
- int f = RegisterClipboardFormatA(mime.toLocal8Bit());
-#endif
if (!f)
qErrnoWarning("QWindowsMime::registerMimeType: Failed to register clipboard format");
@@ -401,9 +397,9 @@ QStringList QWindowsMime::allMimesForFormats(IDataObject *pDataObj)
while (S_OK == fmtenum->Next(1, &fmtetc, 0)) {
#if defined(QMIME_DEBUG) && !defined(Q_OS_WINCE)
qDebug("QWindowsMime::allMimesForFormats()");
- char buf[256] = {0};
- GetClipboardFormatNameA(fmtetc.cfFormat, buf, 255);
- qDebug("CF = %d : %s", fmtetc.cfFormat, buf);
+ wchar_t buf[256] = {0};
+ GetClipboardFormatName(fmtetc.cfFormat, buf, 255);
+ qDebug("CF = %d : %s", fmtetc.cfFormat, QString::fromWCharArray(buf));
#endif
for (int i=mimes.size()-1; i>=0; --i) {
QString format = mimes.at(i)->mimeForFormat(fmtetc);
@@ -504,7 +500,7 @@ bool QWindowsMimeText::convertFromMime(const FORMATETC &formatetc, const QMimeDa
++u;
}
res.truncate(ri);
- const int byteLength = res.length()*2;
+ const int byteLength = res.length() * sizeof(ushort);
QByteArray r(byteLength + 2, '\0');
memcpy(r.data(), res.unicode(), byteLength);
r[byteLength] = 0;
@@ -549,7 +545,7 @@ QVariant QWindowsMimeText::convertToMime(const QString &mime, LPDATAOBJECT pData
QString str;
QByteArray data = getData(CF_UNICODETEXT, pDataObj);
if (!data.isEmpty()) {
- str = QString::fromUtf16((const unsigned short *)data.data());
+ str = QString::fromWCharArray((const wchar_t *)data.data());
str.replace(QLatin1String("\r\n"), QLatin1String("\n"));
} else {
data = getData(CF_TEXT, pDataObj);
@@ -620,11 +616,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat
for (int i=0; i<urls.size(); i++) {
QString fn = QDir::toNativeSeparators(urls.at(i).toLocalFile());
if (!fn.isEmpty()) {
- QT_WA({
- size += sizeof(TCHAR)*(fn.length()+1);
- } , {
- size += fn.toLocal8Bit().length()+1;
- });
+ size += sizeof(ushort) * (fn.length() + 1);
fileNames.append(fn);
}
}
@@ -636,36 +628,22 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat
d->fNC = true;
char* files = ((char*)d) + d->pFiles;
- QT_WA({
- d->fWide = true;
- TCHAR* f = (TCHAR*)files;
- for (int i=0; i<fileNames.size(); i++) {
- int l = fileNames.at(i).length();
- memcpy(f, fileNames.at(i).utf16(), l*sizeof(TCHAR));
- f += l;
- *f++ = 0;
- }
- *f = 0;
- } , {
- d->fWide = false;
- char* f = files;
- for (int i=0; i<fileNames.size(); i++) {
- QByteArray c = fileNames.at(i).toLocal8Bit();
- if (!c.isEmpty()) {
- int l = c.length();
- memcpy(f, c.constData(), l);
- f += l;
- *f++ = 0;
- }
- }
- *f = 0;
- });
+ d->fWide = true;
+ wchar_t* f = (wchar_t*)files;
+ for (int i=0; i<fileNames.size(); i++) {
+ int l = fileNames.at(i).length();
+ memcpy(f, fileNames.at(i).utf16(), l * sizeof(ushort));
+ f += l;
+ *f++ = 0;
+ }
+ *f = 0;
+
return setData(result, pmedium);
} else if (getCf(formatetc) == CF_INETURL_W) {
QList<QUrl> urls = mimeData->urls();
QByteArray result;
QString url = urls.at(0).toString();
- result = QByteArray((const char *)url.utf16(), url.length() * 2);
+ result = QByteArray((const char *)url.utf16(), url.length() * sizeof(ushort));
result.append('\0');
result.append('\0');
return setData(result, pmedium);
@@ -720,15 +698,15 @@ QVariant QWindowsMimeURI::convertToMime(const QString &mimeType, LPDATAOBJECT pD
LPDROPFILES hdrop = (LPDROPFILES)data.data();
if (hdrop->fWide) {
- const ushort* filesw = (const ushort*)(data.data() + hdrop->pFiles);
- int i=0;
+ const wchar_t* filesw = (const wchar_t *)(data.data() + hdrop->pFiles);
+ int i = 0;
while (filesw[i]) {
- QString fileurl = QString::fromUtf16(filesw+i);
+ QString fileurl = QString::fromWCharArray(filesw + i);
urls += QUrl::fromLocalFile(fileurl);
i += fileurl.length()+1;
}
} else {
- const char* files = (const char*)data.data() + hdrop->pFiles;
+ const char* files = (const char *)data.data() + hdrop->pFiles;
int i=0;
while (files[i]) {
urls += QUrl::fromLocalFile(QString::fromLocal8Bit(files+i));
@@ -744,7 +722,7 @@ QVariant QWindowsMimeURI::convertToMime(const QString &mimeType, LPDATAOBJECT pD
QByteArray data = getData(CF_INETURL_W, pDataObj);
if (data.isEmpty())
return QVariant();
- return QUrl(QString::fromUtf16((const unsigned short *)data.constData()));
+ return QUrl(QString::fromWCharArray((const wchar_t *)data.constData()));
} else if (canGetData(CF_INETURL, pDataObj)) {
QByteArray data = getData(CF_INETURL, pDataObj);
if (data.isEmpty())
@@ -913,11 +891,7 @@ private:
QWindowsMimeImage::QWindowsMimeImage()
{
-#ifdef Q_OS_WINCE
- CF_PNG = RegisterClipboardFormat(reinterpret_cast<const wchar_t *> (QString::fromLatin1("PNG").utf16()));
-#else
- CF_PNG = RegisterClipboardFormatA("PNG");
-#endif
+ CF_PNG = RegisterClipboardFormat(L"PNG");
}
QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
@@ -1114,7 +1088,7 @@ bool QBuiltInMimes::convertFromMime(const FORMATETC &formatetc, const QMimeData
++u;
}
res.truncate(ri);
- const int byteLength = res.length()*2;
+ const int byteLength = res.length() * sizeof(ushort);
QByteArray r(byteLength + 2, '\0');
memcpy(r.data(), res.unicode(), byteLength);
r[byteLength] = 0;
@@ -1154,8 +1128,8 @@ QVariant QBuiltInMimes::convertToMime(const QString &mimeType, IDataObject *pDat
qDebug("QBuiltInMimes::convertToMime()");
#endif
if (mimeType == QLatin1String("text/html") && preferredType == QVariant::String) {
- // text/html is in wide chars on windows (compatible with mozillia)
- val = QString::fromUtf16((const unsigned short *)data.data());
+ // text/html is in wide chars on windows (compatible with Mozilla)
+ val = QString::fromWCharArray((const wchar_t *)data.data());
} else {
val = data; // it should be enough to return the data and let QMimeData do the rest.
}
@@ -1280,11 +1254,7 @@ bool QLastResortMimes::canConvertToMime(const QString &mimeType, IDataObject *pD
{
if (isCustomMimeType(mimeType)) {
QString clipFormat = customMimeType(mimeType);
-#ifdef Q_OS_WINCE
int cf = RegisterClipboardFormat(reinterpret_cast<const wchar_t *> (clipFormat.utf16()));
-#else
- int cf = RegisterClipboardFormatA(clipFormat.toLocal8Bit());
-#endif
return canGetData(cf, pDataObj);
} else if (formats.keys(mimeType).isEmpty()) {
// if it is not in there then register it an see if we can get it
@@ -1304,11 +1274,7 @@ QVariant QLastResortMimes::convertToMime(const QString &mimeType, IDataObject *p
QByteArray data;
if (isCustomMimeType(mimeType)) {
QString clipFormat = customMimeType(mimeType);
-#ifdef Q_OS_WINCE
int cf = RegisterClipboardFormat(reinterpret_cast<const wchar_t *> (clipFormat.utf16()));
-#else
- int cf = RegisterClipboardFormatA(clipFormat.toLocal8Bit());
-#endif
data = getData(cf, pDataObj);
} else if (formats.keys(mimeType).isEmpty()) {
int cf = QWindowsMime::registerMimeType(mimeType);
@@ -1325,46 +1291,38 @@ QVariant QLastResortMimes::convertToMime(const QString &mimeType, IDataObject *p
QString QLastResortMimes::mimeForFormat(const FORMATETC &formatetc) const
{
QString format = formats.value(getCf(formatetc));
- if (format.isEmpty()) {
- QByteArray ba;
- QString clipFormat;
- int len;
- QT_WA({
- ba.resize(256*2);
- len = GetClipboardFormatNameW(getCf(formatetc), (TCHAR*)ba.data(), 255);
- if (len)
- clipFormat = QString::fromUtf16((ushort *)ba.data(), len);
- } , {
- ba.resize(256);
- len = GetClipboardFormatNameA(getCf(formatetc), ba.data(), 255);
- if (len)
- clipFormat = QString::fromLocal8Bit(ba.data(), len);
- });
- if (len) {
+ if (!format.isEmpty())
+ return format;
+
+ wchar_t buffer[256];
+ int len = GetClipboardFormatName(getCf(formatetc), buffer, 256);
+
+ if (len) {
+ QString clipFormat = QString::fromWCharArray(buffer, len);
#ifndef QT_NO_DRAGANDDROP
- if (QInternalMimeData::canReadData(clipFormat))
- format = clipFormat;
- else if((formatetc.cfFormat >= 0xC000)){
- //create the mime as custom. not registered.
- if (!excludeList.contains(clipFormat, Qt::CaseInsensitive)) {
- //check if this is a mime type
- bool ianaType = false;
- int sz = ianaTypes.size();
- for (int i = 0; i < sz; i++) {
- if (clipFormat.startsWith(ianaTypes[i], Qt::CaseInsensitive)) {
- ianaType = true;
- break;
- }
+ if (QInternalMimeData::canReadData(clipFormat))
+ format = clipFormat;
+ else if((formatetc.cfFormat >= 0xC000)){
+ //create the mime as custom. not registered.
+ if (!excludeList.contains(clipFormat, Qt::CaseInsensitive)) {
+ //check if this is a mime type
+ bool ianaType = false;
+ int sz = ianaTypes.size();
+ for (int i = 0; i < sz; i++) {
+ if (clipFormat.startsWith(ianaTypes[i], Qt::CaseInsensitive)) {
+ ianaType = true;
+ break;
}
- if (!ianaType)
- format = QLatin1String(x_qt_windows_mime) + clipFormat + QLatin1Char('\"');
- else
- format = clipFormat;
}
+ if (!ianaType)
+ format = QLatin1String(x_qt_windows_mime) + clipFormat + QLatin1Char('\"');
+ else
+ format = clipFormat;
}
-#endif //QT_NO_DRAGANDDROP
}
+#endif //QT_NO_DRAGANDDROP
}
+
return format;
}
diff --git a/src/gui/kernel/qmultitouch_mac.mm b/src/gui/kernel/qmultitouch_mac.mm
index 3fe85a9..3d2eae6 100644
--- a/src/gui/kernel/qmultitouch_mac.mm
+++ b/src/gui/kernel/qmultitouch_mac.mm
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
#ifdef QT_MAC_USE_COCOA
-QHash<int, QCocoaTouch*> QCocoaTouch::_currentTouches;
+QHash<qint64, QCocoaTouch*> QCocoaTouch::_currentTouches;
QPointF QCocoaTouch::_screenReferencePos;
QPointF QCocoaTouch::_trackpadReferencePos;
int QCocoaTouch::_idAssignmentCount = 0;
@@ -62,7 +62,7 @@ QCocoaTouch::QCocoaTouch(NSTouch *nstouch)
_touchPoint.setId(_idAssignmentCount++);
_touchPoint.setPressure(1.0);
- _identity = int([nstouch identity]);
+ _identity = qint64([nstouch identity]);
_currentTouches.insert(_identity, this);
updateTouchData(nstouch, NSTouchPhaseBegan);
}
@@ -100,7 +100,7 @@ void QCocoaTouch::updateTouchData(NSTouch *nstouch, NSTouchPhase phase)
QCocoaTouch *QCocoaTouch::findQCocoaTouch(NSTouch *nstouch)
{
- int identity = int([nstouch identity]);
+ qint64 identity = qint64([nstouch identity]);
if (_currentTouches.contains(identity))
return _currentTouches.value(identity);
return 0;
diff --git a/src/gui/kernel/qmultitouch_mac_p.h b/src/gui/kernel/qmultitouch_mac_p.h
index 3fa8f6c..618e9ca 100644
--- a/src/gui/kernel/qmultitouch_mac_p.h
+++ b/src/gui/kernel/qmultitouch_mac_p.h
@@ -74,7 +74,7 @@ class QCocoaTouch
static void setMouseInDraggingState(bool inDraggingState);
private:
- static QHash<int, QCocoaTouch*> _currentTouches;
+ static QHash<qint64, QCocoaTouch*> _currentTouches;
static QPointF _screenReferencePos;
static QPointF _trackpadReferencePos;
static int _idAssignmentCount;
@@ -82,7 +82,7 @@ class QCocoaTouch
static bool _updateInternalStateOnly;
QTouchEvent::TouchPoint _touchPoint;
- int _identity;
+ qint64 _identity;
QCocoaTouch(NSTouch *nstouch);
~QCocoaTouch();
diff --git a/src/gui/kernel/qsound_win.cpp b/src/gui/kernel/qsound_win.cpp
index 7330d4b..82854ae 100644
--- a/src/gui/kernel/qsound_win.cpp
+++ b/src/gui/kernel/qsound_win.cpp
@@ -77,13 +77,8 @@ public:
QAuServerWindows::QAuServerWindows(QObject* parent) :
QAuServer(parent), current(0)
{
- QT_WA({
- mutex = CreateMutexW(0, 0, 0);
- event = CreateEventW(0, FALSE, FALSE, 0);
- } , {
- mutex = CreateMutexA(0, 0, 0);
- event = CreateEventA(0, FALSE, FALSE, 0);
- });
+ mutex = CreateMutex(0, 0, 0);
+ event = CreateEvent(0, FALSE, FALSE, 0);
}
QAuServerWindows::~QAuServerWindows()
@@ -133,13 +128,9 @@ DWORD WINAPI SoundPlayProc(LPVOID param)
if (loops == -1)
flags |= SND_LOOP;
- QT_WA({
- PlaySoundW((TCHAR*)filename.utf16(), 0, flags);
- } , {
- PlaySoundA(QFile::encodeName(filename).data(), 0, flags);
- });
- if (sound && loops == 1)
- server->decLoop(sound);
+ PlaySound((wchar_t*)filename.utf16(), 0, flags);
+ if (sound && loops == 1)
+ server->decLoop(sound);
// GUI thread continues, but we are done as well.
SetEvent(event);
@@ -148,18 +139,13 @@ DWORD WINAPI SoundPlayProc(LPVOID param)
QPointer<QSound> guarded_sound = sound;
SetEvent(event);
- for (int l = 0; l < loops && server->current; ++l) {
- QT_WA( {
- PlaySoundW( (TCHAR*)filename.utf16(), 0, SND_FILENAME|SND_SYNC );
- } , {
- PlaySoundA( QFile::encodeName(filename).data(), 0,
- SND_FILENAME|SND_SYNC );
- } );
-
- if (guarded_sound)
- server->decLoop(guarded_sound);
- }
- server->current = 0;
+ for (int l = 0; l < loops && server->current; ++l) {
+ PlaySound((wchar_t*)filename.utf16(), 0, SND_FILENAME | SND_SYNC);
+
+ if (guarded_sound)
+ server->decLoop(guarded_sound);
+ }
+ server->current = 0;
}
ReleaseMutex(mutex);
@@ -169,7 +155,7 @@ DWORD WINAPI SoundPlayProc(LPVOID param)
void QAuServerWindows::playHelper(const QString &filename, int loop, QSound *snd)
{
if (loop == 0)
- return;
+ return;
// busy?
if (WaitForSingleObject(mutex, 0) == WAIT_TIMEOUT)
return;
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
new file mode 100644
index 0000000..c8b11c5
--- /dev/null
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -0,0 +1,254 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qstandardgestures.h"
+#include "qstandardgestures_p.h"
+
+#include <qabstractscrollarea.h>
+#include <qscrollbar.h>
+#include <private/qapplication_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QPanGesture
+ \since 4.6
+
+ \brief The QPanGesture class represents a Pan gesture,
+ providing additional information related to panning.
+*/
+
+/*!
+ Creates a new Pan gesture handler object and marks it as a child of \a
+ parent.
+
+ On some platform like Windows it's necessary to provide a non-null widget
+ as \a parent to get native gesture support.
+*/
+QPanGesture::QPanGesture(QWidget *parent)
+ : QGesture(*new QPanGesturePrivate, parent)
+{
+#ifdef Q_WS_WIN
+ if (parent) {
+ QApplicationPrivate* getQApplicationPrivateInternal();
+ QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ qAppPriv->widgetGestures[parent].pan = this;
+ }
+#endif
+}
+
+/*! \internal */
+bool QPanGesture::event(QEvent *event)
+{
+#ifdef Q_WS_WIN
+ QApplicationPrivate* getQApplicationPrivateInternal();
+ switch (event->type()) {
+ case QEvent::ParentAboutToChange:
+ if (QWidget *w = qobject_cast<QWidget*>(parent()))
+ getQApplicationPrivateInternal()->widgetGestures[w].pan = 0;
+ break;
+ case QEvent::ParentChange:
+ if (QWidget *w = qobject_cast<QWidget*>(parent()))
+ getQApplicationPrivateInternal()->widgetGestures[w].pan = this;
+ break;
+ default:
+ break;
+ }
+#endif
+ return QObject::event(event);
+}
+
+/*! \internal */
+bool QPanGesture::filterEvent(QEvent *event)
+{
+ Q_D(QPanGesture);
+ if (!event->spontaneous())
+ return false;
+ const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
+ if (event->type() == QEvent::TouchBegin) {
+ d->touchPoints = ev->touchPoints();
+ const QPoint p = ev->touchPoints().at(0).pos().toPoint();
+ setStartPos(p);
+ setLastPos(p);
+ setPos(p);
+ return false;
+ } else if (event->type() == QEvent::TouchEnd) {
+ if (state() != Qt::NoGesture) {
+ setState(Qt::GestureFinished);
+ setLastPos(pos());
+ setPos(ev->touchPoints().at(0).pos().toPoint());
+ emit triggered();
+ emit finished();
+ }
+ setState(Qt::NoGesture);
+ reset();
+ } else if (event->type() == QEvent::TouchUpdate) {
+ d->touchPoints = ev->touchPoints();
+ QPointF pt = d->touchPoints.at(0).pos() - d->touchPoints.at(0).startPos();
+ setLastPos(pos());
+ setPos(ev->touchPoints().at(0).pos().toPoint());
+ if (pt.x() > 10 || pt.y() > 10 || pt.x() < -10 || pt.y() < -10) {
+ if (state() == Qt::NoGesture)
+ setState(Qt::GestureStarted);
+ else
+ setState(Qt::GestureUpdated);
+ emit triggered();
+ }
+ }
+ return false;
+}
+
+/*! \internal */
+void QPanGesture::reset()
+{
+ Q_D(QPanGesture);
+ d->touchPoints.clear();
+}
+
+/*!
+ \property QPanGesture::totalOffset
+
+ Specifies a total pan offset since the start of the gesture.
+*/
+QSize QPanGesture::totalOffset() const
+{
+ QPoint pt = pos() - startPos();
+ return QSize(pt.x(), pt.y());
+}
+
+/*!
+ \property QPanGesture::lastOffset
+
+ Specifies a pan offset since the last time the gesture was
+ triggered.
+*/
+QSize QPanGesture::lastOffset() const
+{
+ QPoint pt = pos() - lastPos();
+ return QSize(pt.x(), pt.y());
+}
+
+/*!
+ \class QTapAndHoldGesture
+ \since 4.6
+
+ \brief The QTapAndHoldGesture class represents a Tap-and-Hold gesture,
+ providing additional information.
+*/
+
+const int QTapAndHoldGesturePrivate::iterationCount = 40;
+const int QTapAndHoldGesturePrivate::iterationTimeout = 50;
+
+/*!
+ Creates a new Tap and Hold gesture handler object and marks it as a child
+ of \a parent.
+
+ On some platforms like Windows there is a system-wide tap and hold gesture
+ that cannot be overriden, hence the gesture might never trigger and default
+ context menu will be shown instead.
+*/
+QTapAndHoldGesture::QTapAndHoldGesture(QWidget *parent)
+ : QGesture(*new QTapAndHoldGesturePrivate, parent)
+{
+}
+
+/*! \internal */
+bool QTapAndHoldGesture::filterEvent(QEvent *event)
+{
+ Q_D(QTapAndHoldGesture);
+ if (!event->spontaneous())
+ return false;
+ const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
+ switch (event->type()) {
+ case QEvent::TouchBegin: {
+ if (d->timer.isActive())
+ d->timer.stop();
+ d->timer.start(QTapAndHoldGesturePrivate::iterationTimeout, this);
+ const QPoint p = ev->touchPoints().at(0).pos().toPoint();
+ setStartPos(p);
+ setLastPos(p);
+ setPos(p);
+ break;
+ }
+ case QEvent::TouchUpdate:
+ if (ev->touchPoints().size() != 1)
+ reset();
+ else if ((startPos() - ev->touchPoints().at(0).pos().toPoint()).manhattanLength() > 15)
+ reset();
+ break;
+ case QEvent::TouchEnd:
+ reset();
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+/*! \internal */
+void QTapAndHoldGesture::timerEvent(QTimerEvent *event)
+{
+ Q_D(QTapAndHoldGesture);
+ if (event->timerId() != d->timer.timerId())
+ return;
+ if (d->iteration == QTapAndHoldGesturePrivate::iterationCount) {
+ d->timer.stop();
+ setState(Qt::GestureFinished);
+ emit triggered();
+ } else {
+ setState(Qt::GestureStarted);
+ emit triggered();
+ }
+ ++d->iteration;
+}
+
+/*! \internal */
+void QTapAndHoldGesture::reset()
+{
+ Q_D(QTapAndHoldGesture);
+ if (state() != Qt::NoGesture)
+ emit cancelled();
+ setState(Qt::NoGesture);
+ d->timer.stop();
+ d->iteration = 0;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesturerecognizer.h b/src/gui/kernel/qstandardgestures.h
index 2c1c61b..2234702 100644
--- a/src/gui/kernel/qgesturerecognizer.h
+++ b/src/gui/kernel/qstandardgestures.h
@@ -39,49 +39,63 @@
**
****************************************************************************/
-#ifndef QGESTURERECOGNIZER_H
-#define QGESTURERECOGNIZER_H
+#ifndef QSTANDARDGESTURES_H
+#define QSTANDARDGESTURES_H
-#include "qevent.h"
-#include "qlist.h"
-#include "qset.h"
+#include <QtGui/qevent.h>
+#include <QtCore/qbasictimer.h>
+
+#include <QtGui/qgesture.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QGesture;
-class QGestureRecognizerPrivate;
-class Q_GUI_EXPORT QGestureRecognizer : public QObject
+QT_MODULE(Gui)
+
+class QPanGesturePrivate;
+class Q_GUI_EXPORT QPanGesture : public QGesture
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QGestureRecognizer)
+ Q_DECLARE_PRIVATE(QPanGesture)
-public:
- enum Result
- {
- Ignore,
- NotGesture,
- GestureStarted, //TODO: rename to just Gesture?
- GestureFinished,
- MaybeGesture
- };
+ Q_PROPERTY(QSize totalOffset READ totalOffset)
+ Q_PROPERTY(QSize lastOffset READ lastOffset)
- explicit QGestureRecognizer(const QString &gestureType, QObject *parent = 0);
+public:
+ QPanGesture(QWidget *parent);
- QString gestureType() const;
+ bool filterEvent(QEvent *event);
+ void reset();
- virtual QGestureRecognizer::Result filterEvent(const QEvent* event) = 0;
- virtual QGesture* getGesture() = 0;
- virtual void reset() = 0;
+ QSize totalOffset() const;
+ QSize lastOffset() const;
-signals:
- void stateChanged(QGestureRecognizer::Result result);
+protected:
+ bool event(QEvent *event);
private:
- friend class QDoubleTapGestureRecognizer;
- friend class QTapAndHoldGestureRecognizer;
- friend class QGestureRecognizerPan;
+ friend class QWidget;
+};
+
+class QTapAndHoldGesturePrivate;
+class Q_GUI_EXPORT QTapAndHoldGesture : public QGesture
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QTapAndHoldGesture)
+
+public:
+ QTapAndHoldGesture(QWidget *parent);
+
+ bool filterEvent(QEvent *event);
+ void reset();
+
+protected:
+ void timerEvent(QTimerEvent *event);
};
QT_END_NAMESPACE
-#endif // QGESTURERECOGNIZER_P_H
+QT_END_HEADER
+
+#endif // QSTANDARDGESTURES_H
diff --git a/src/gui/kernel/qgesturerecognizer_p.h b/src/gui/kernel/qstandardgestures_p.h
index e250201..bb11c9f 100644
--- a/src/gui/kernel/qgesturerecognizer_p.h
+++ b/src/gui/kernel/qstandardgestures_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QGESTURERECOGNIZER_P_H
-#define QGESTURERECOGNIZER_P_H
+#ifndef QSTANDARDGESTURES_P_H
+#define QSTANDARDGESTURES_P_H
//
// W A R N I N G
@@ -53,20 +53,39 @@
// We mean it.
//
-#include <private/qobject_p.h>
+#include "qevent.h"
+#include "qbasictimer.h"
+#include "qdebug.h"
+
+#include "qgesture.h"
+#include "qgesture_p.h"
QT_BEGIN_NAMESPACE
-class QGestureRecognizerPrivate : public QObjectPrivate
+class QPanGesturePrivate : public QGesturePrivate
{
+ Q_DECLARE_PUBLIC(QPanGesture)
+
public:
- QGestureRecognizerPrivate();
+ QPanGesturePrivate() { }
+
+ QList<QTouchEvent::TouchPoint> touchPoints;
+};
+
+class QTapAndHoldGesturePrivate : public QGesturePrivate
+{
+ Q_DECLARE_PUBLIC(QTapAndHoldGesture)
public:
- Qt::GestureType gestureType;
- QString customGestureType;
+ QTapAndHoldGesturePrivate()
+ : iteration(0) { }
+
+ QBasicTimer timer;
+ int iteration;
+ static const int iterationCount;
+ static const int iterationTimeout;
};
QT_END_NAMESPACE
-#endif // QGESTURERECOGNIZER_P_H
+#endif // QSTANDARDGESTURES_P_H
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index f5f381e..223e36b 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -77,6 +77,7 @@
#include <qwidget.h>
#include <qdesktopwidget.h>
#include <qevent.h>
+#include <qpixmapcache.h>
#include <private/qevent_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qt_mac_p.h>
@@ -177,11 +178,10 @@ void macWindowToolbarShow(const QWidget *widget, bool show )
{
OSWindowRef wnd = qt_mac_window_for(widget);
#if QT_MAC_USE_COCOA
- NSToolbar *toolbar = [wnd toolbar];
- if (toolbar) {
+ if (NSToolbar *toolbar = [wnd toolbar]) {
QMacCocoaAutoReleasePool pool;
if (show != [toolbar isVisible]) {
- [wnd toggleToolbarShown:wnd];
+ [toolbar setVisible:show];
} else {
// The toolbar may be in sync, but we are not, update our framestrut.
qt_widget_private(const_cast<QWidget *>(widget))->updateFrameStrut();
@@ -197,22 +197,21 @@ void macWindowToolbarSet( void * /*OSWindowRef*/ window, void *toolbarRef )
{
OSWindowRef wnd = static_cast<OSWindowRef>(window);
#if QT_MAC_USE_COCOA
- [wnd setToolbar:static_cast<NSToolbar *>(toolbarRef)];
+ [wnd setToolbar:static_cast<NSToolbar *>(toolbarRef)];
#else
SetWindowToolbar(wnd, static_cast<HIToolbarRef>(toolbarRef));
#endif
}
-bool macWindowToolbarVisible( void * /*OSWindowRef*/ window )
+bool macWindowToolbarIsVisible( void * /*OSWindowRef*/ window )
{
OSWindowRef wnd = static_cast<OSWindowRef>(window);
#if QT_MAC_USE_COCOA
- NSToolbar *toolbar = [wnd toolbar];
- if (toolbar)
+ if (NSToolbar *toolbar = [wnd toolbar])
return [toolbar isVisible];
return false;
#else
- return IsWindowToolbarVisible(wnd);
+ return IsWindowToolbarVisible(wnd);
#endif
}
@@ -220,12 +219,12 @@ void macWindowSetHasShadow( void * /*OSWindowRef*/ window, bool hasShadow )
{
OSWindowRef wnd = static_cast<OSWindowRef>(window);
#if QT_MAC_USE_COCOA
- [wnd setHasShadow:BOOL(hasShadow)];
+ [wnd setHasShadow:BOOL(hasShadow)];
#else
- if (hasShadow)
- ChangeWindowAttributes(wnd, 0, kWindowNoShadowAttribute);
- else
- ChangeWindowAttributes(wnd, kWindowNoShadowAttribute, 0);
+ if (hasShadow)
+ ChangeWindowAttributes(wnd, 0, kWindowNoShadowAttribute);
+ else
+ ChangeWindowAttributes(wnd, kWindowNoShadowAttribute, 0);
#endif
}
@@ -233,9 +232,9 @@ void macWindowFlush(void * /*OSWindowRef*/ window)
{
OSWindowRef wnd = static_cast<OSWindowRef>(window);
#if QT_MAC_USE_COCOA
- [wnd flushWindowIfNeeded];
+ [wnd flushWindowIfNeeded];
#else
- HIWindowFlush(wnd);
+ HIWindowFlush(wnd);
#endif
}
@@ -352,6 +351,12 @@ Qt::MouseButton qt_mac_get_button(EventMouseButton button)
return Qt::NoButton;
}
+void macSendToolbarChangeEvent(QWidget *widget)
+{
+ QToolBarChangeEvent ev(!(GetCurrentKeyModifiers() & cmdKey));
+ qt_sendSpontaneousEvent(widget, &ev);
+}
+
Q_GLOBAL_STATIC(QMacTabletHash, tablet_hash)
QMacTabletHash *qt_mac_tablet_hash()
{
@@ -894,50 +899,6 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil];
QPoint qlocalPoint(localPoint.x, localPoint.y);
- if (widgetToGetMouse->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- // Simulate passing the event through since Cocoa doesn't do that for us.
- // Start by building a tree up.
- NSView *candidateView = [theView viewUnderTransparentForMouseView:tmpView
- widget:widgetToGetMouse
- withWindowPoint:windowPoint];
- if (candidateView != nil) {
- // Fast-track our views, since dispatching trough the normal ways
- // would just end up going through here anyway.
- if ([candidateView isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) {
- return qt_mac_handleMouseEvent(candidateView, theEvent, eventType, button);
- } else {
- switch (eventType) {
- default:
- qWarning("not handled! %d", eventType);
- break;
- case QEvent::MouseMove:
- [candidateView mouseMoved:theEvent];
- break;
- case QEvent::MouseButtonPress:
- if (button == Qt::LeftButton)
- [candidateView mouseDown:theEvent];
- else if (button == Qt::RightButton)
- [candidateView rightMouseDown:theEvent];
- else
- [candidateView otherMouseDown:theEvent];
- break;
- case QEvent::MouseButtonRelease:
- if (button == Qt::LeftButton)
- [candidateView mouseUp:theEvent];
- else if (button == Qt::RightButton)
- [candidateView rightMouseUp:theEvent];
- else
- [candidateView otherMouseUp:theEvent];
- break;
- }
- return true; // We've done the dispatching, no need go further.
- }
- }
- // Nothing below me return false
- return false;
- }
-
-
EventRef carbonEvent = static_cast<EventRef>(const_cast<void *>([theEvent eventRef]));
if (qt_mac_sendMacEventToWidget(widgetToGetMouse, carbonEvent))
return true;
@@ -1175,4 +1136,61 @@ CGFloat qt_mac_get_scalefactor()
#endif
}
+QString qt_mac_get_pasteboardString()
+{
+ QMacCocoaAutoReleasePool pool;
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+ NSString *text = [pb stringForType:NSStringPboardType];
+ if (text) {
+ return qt_mac_NSStringToQString(text);
+ } else {
+ return QString();
+ }
+}
+
+QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height)
+{
+ QPixmap ret(width, height);
+ ret.fill(QColor(0, 0, 0, 0));
+
+ CGRect rect = CGRectMake(0, 0, width, height);
+
+ CGContextRef ctx = qt_mac_cg_context(&ret);
+ CGAffineTransform old_xform = CGContextGetCTM(ctx);
+ CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform));
+ CGContextConcatCTM(ctx, CGAffineTransformIdentity);
+
+ ::RGBColor b;
+ b.blue = b.green = b.red = 255*255;
+ PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
+ CGContextRelease(ctx);
+ return ret;
+}
+
+void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon, QStyle::StandardPixmap standardIcon)
+{
+ int size = 16;
+ while (size <= 128) {
+
+ const QString cacheKey = QLatin1String("qt_mac_constructQIconFromIconRef") + QString::number(standardIcon) + QString::number(size);
+ QPixmap mainIcon;
+ if (standardIcon >= QStyle::SP_CustomBase) {
+ mainIcon = qt_mac_convert_iconref(icon, size, size);
+ } else if (QPixmapCache::find(cacheKey, mainIcon) == false) {
+ mainIcon = qt_mac_convert_iconref(icon, size, size);
+ QPixmapCache::insert(cacheKey, mainIcon);
+ }
+
+ if (overlayIcon) {
+ int littleSize = size / 2;
+ QPixmap overlayPix = qt_mac_convert_iconref(overlayIcon, littleSize, littleSize);
+ QPainter painter(&mainIcon);
+ painter.drawPixmap(size - littleSize, size - littleSize, overlayPix);
+ }
+
+ retIcon->addPixmap(mainIcon);
+ size += size; // 16 -> 32 -> 64 -> 128
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
index 7b975f5..99f058b 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h
+++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
@@ -118,9 +118,10 @@ void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds = 0);
bool macWindowIsTextured(void * /*OSWindowRef*/ window);
void macWindowToolbarShow(const QWidget *widget, bool show );
void macWindowToolbarSet( void * /*OSWindowRef*/ window, void* toolbarRef );
-bool macWindowToolbarVisible( void * /*OSWindowRef*/ window );
+bool macWindowToolbarIsVisible( void * /*OSWindowRef*/ window );
void macWindowSetHasShadow( void * /*OSWindowRef*/ window, bool hasShadow );
void macWindowFlush(void * /*OSWindowRef*/ window);
+void macSendToolbarChangeEvent(QWidget *widget);
struct HIContentBorderMetrics;
void qt_mac_updateContentBorderMetricts(void * /*OSWindowRef */window, const ::HIContentBorderMetrics &metrics);
void * /*NSImage */qt_mac_create_nsimage(const QPixmap &pm);
@@ -142,6 +143,9 @@ struct ::TabletProximityRec;
void qt_dispatchTabletProximityEvent(const ::TabletProximityRec &proxRec);
Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags);
Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations);
+QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height);
+void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon,
+ QStyle::StandardPixmap standardIcon = QStyle::SP_CustomBase);
inline int flipYCoordinate(int y)
{
return QApplication::desktop()->screenGeometry(0).height() - y;
@@ -162,6 +166,7 @@ void *qt_mac_QStringListToNSMutableArrayVoid(const QStringList &list);
void qt_syncCocoaTitleBarButtons(OSWindowRef window, QWidget *widgetForWindow);
CGFloat qt_mac_get_scalefactor();
+QString qt_mac_get_pasteboardString();
#ifdef __OBJC__
inline NSMutableArray *qt_mac_QStringListToNSMutableArray(const QStringList &qstrlist)
diff --git a/src/gui/kernel/qt_mac.cpp b/src/gui/kernel/qt_mac.cpp
index 27df5d1..0c3b707 100644
--- a/src/gui/kernel/qt_mac.cpp
+++ b/src/gui/kernel/qt_mac.cpp
@@ -134,7 +134,7 @@ QColor qcolorForThemeTextColor(ThemeTextColor themeColor)
#ifdef Q_OS_MAC32
RGBColor c;
GetThemeTextColor(themeColor, 32, true, &c);
- QColor color = QColor(c.red / 265, c.green / 256, c.blue / 256);
+ QColor color = QColor(c.red / 256, c.green / 256, c.blue / 256);
return color;
#else
// There is no equivalent to GetThemeTextColor in 64-bit and it was rather bad that
@@ -156,13 +156,13 @@ QColor qcolorForThemeTextColor(ThemeTextColor themeColor)
case kThemeTextColorAlertInactive:
case kThemeTextColorDialogInactive:
case kThemeTextColorPlacardInactive:
- return QColor(67, 69, 69, 255);
+ return QColor(69, 69, 69, 255);
case kThemeTextColorPopupButtonInactive:
case kThemeTextColorPopupLabelInactive:
case kThemeTextColorPushButtonInactive:
case kThemeTextColorTabFrontInactive:
case kThemeTextColorBevelButtonInactive:
- return QColor(123, 127, 127, 255);
+ return QColor(127, 127, 127, 255);
default: {
QNativeImage nativeImage(16,16, QNativeImage::systemFormat());
CGRect cgrect = CGRectMake(0, 0, 16, 16);
diff --git a/src/gui/kernel/qwhatsthis.cpp b/src/gui/kernel/qwhatsthis.cpp
index 067c783..62b5863 100644
--- a/src/gui/kernel/qwhatsthis.cpp
+++ b/src/gui/kernel/qwhatsthis.cpp
@@ -226,7 +226,9 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
text);
}
#if defined(Q_WS_WIN)
- if ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_2000) {
+ if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
+ && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ {
BOOL shadow;
SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
shadowWidth = shadow ? 0 : 6;
@@ -302,7 +304,9 @@ void QWhatsThat::paintEvent(QPaintEvent*)
{
bool drawShadow = true;
#if defined(Q_WS_WIN)
- if ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_2000) {
+ if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
+ && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ {
BOOL shadow;
SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
drawShadow = !shadow;
@@ -347,6 +351,7 @@ void QWhatsThat::paintEvent(QPaintEvent*)
rect.translate(-r.x(), -r.y());
p.setClipRect(rect);
QAbstractTextDocumentLayout::PaintContext context;
+ context.palette.setBrush(QPalette::Text, context.palette.toolTipText());
doc->documentLayout()->draw(&p, context);
}
else
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 304d72a..7026525 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -82,6 +82,8 @@
#include "private/qstyle_p.h"
#include "private/qinputcontext_p.h"
#include "qfileinfo.h"
+#include "qstandardgestures.h"
+#include "qstandardgestures_p.h"
#if defined (Q_WS_WIN)
# include <private/qwininputcontext_p.h>
@@ -107,9 +109,9 @@
#include "private/qgraphicsproxywidget_p.h"
#include "QtGui/qabstractscrollarea.h"
#include "private/qabstractscrollarea_p.h"
+#include "private/qevent_p.h"
#include "private/qgraphicssystem_p.h"
-#include "private/qgesturemanager_p.h"
// widget/widget data creation count
//#define QWIDGET_EXTRA_DEBUG
@@ -128,8 +130,6 @@ Q_GUI_EXPORT void qt_x11_set_global_double_buffer(bool enable)
}
#endif
-QString qt_getStandardGestureTypeName(Qt::GestureType);
-
static inline bool qRectIntersects(const QRect &r1, const QRect &r2)
{
return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) &&
@@ -863,8 +863,8 @@ void QWidget::setAutoFillBackground(bool enabled)
\list
\o X11: This feature relies on the use of an X server that supports ARGB visuals
and a compositing window manager.
- \o Windows: This feature requires Windows 2000 or later. The widget needs to have
- the Qt::FramelessWindowHint window flag set for the translucency to work.
+ \o Windows: The widget needs to have the Qt::FramelessWindowHint window flag set
+ for the translucency to work.
\endlist
@@ -1966,10 +1966,9 @@ void QPixmap::fill( const QWidget *widget, const QPoint &off )
QPainter p(this);
p.translate(-off);
widget->d_func()->paintBackground(&p, QRect(off, size()));
-
}
-static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QPoint &offset, const QBrush &brush)
+static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrush &brush)
{
Q_ASSERT(painter);
@@ -1978,26 +1977,39 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QPoin
// Optimize pattern filling on mac by using HITheme directly
// when filling with the standard widget background.
// Defined in qmacstyle_mac.cpp
- extern void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint &offset, const QBrush &brush);
- qt_mac_fill_background(painter, rgn, offset, brush);
+ extern void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QBrush &brush);
+ qt_mac_fill_background(painter, rgn, brush);
#else
- const QRegion translated = rgn.translated(offset);
- const QRect rect(translated.boundingRect());
- painter->setClipRegion(translated);
+ const QRect rect(rgn.boundingRect());
+ painter->setClipRegion(rgn);
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
#endif
} else {
const QVector<QRect> &rects = rgn.rects();
for (int i = 0; i < rects.size(); ++i)
- painter->fillRect(rects.at(i).translated(offset), brush);
+ painter->fillRect(rects.at(i), brush);
}
}
-
-void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, const QPoint &offset, int flags) const
+void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int flags) const
{
Q_Q(const QWidget);
+#ifndef QT_NO_SCROLLAREA
+ bool resetBrushOrigin = false;
+ QPointF oldBrushOrigin;
+ //If we are painting the viewport of a scrollarea, we must apply an offset to the brush in case we are drawing a texture
+ QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(parent);
+ if (scrollArea && scrollArea->viewport() == q) {
+ QObjectData *scrollPrivate = static_cast<QWidget *>(scrollArea)->d_ptr;
+ QAbstractScrollAreaPrivate *priv = static_cast<QAbstractScrollAreaPrivate *>(scrollPrivate);
+ oldBrushOrigin = painter->brushOrigin();
+ resetBrushOrigin = true;
+ painter->setBrushOrigin(-priv->contentsOffset());
+
+ }
+#endif // QT_NO_SCROLLAREA
+
const QBrush autoFillBrush = q->palette().brush(q->backgroundRole());
if ((flags & DrawAsRoot) && !(q->autoFillBackground() && autoFillBrush.isOpaque())) {
@@ -2006,18 +2018,24 @@ void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, cons
if (!(flags & DontSetCompositionMode) && painter->paintEngine()->hasFeature(QPaintEngine::PorterDuff))
painter->setCompositionMode(QPainter::CompositionMode_Source); //copy alpha straight in
#endif
- fillRegion(painter, rgn, offset, bg);
+ fillRegion(painter, rgn, bg);
}
if (q->autoFillBackground())
- fillRegion(painter, rgn, offset, autoFillBrush);
+ fillRegion(painter, rgn, autoFillBrush);
+
if (q->testAttribute(Qt::WA_StyledBackground)) {
- painter->setClipRegion(rgn.translated(offset));
+ painter->setClipRegion(rgn);
QStyleOption opt;
opt.initFrom(q);
q->style()->drawPrimitive(QStyle::PE_Widget, &opt, painter, q);
}
+
+#ifndef QT_NO_SCROLLAREA
+ if (resetBrushOrigin)
+ painter->setBrushOrigin(oldBrushOrigin);
+#endif // QT_NO_SCROLLAREA
}
/*
@@ -4541,6 +4559,11 @@ void QWidget::unsetLayoutDirection()
By default, this property contains a cursor with the Qt::ArrowCursor
shape.
+ Some underlying window implementations will reset the cursor if it
+ leaves a widget even if the mouse is grabbed. If you want to have
+ a cursor set for all widgets, even when outside the window, consider
+ QApplication::setOverrideCursor().
+
\sa QApplication::setOverrideCursor()
*/
@@ -4993,19 +5016,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
&& !q->testAttribute(Qt::WA_OpaquePaintEvent) && !q->testAttribute(Qt::WA_NoSystemBackground)) {
QPainter p(q);
- QPoint scrollAreaOffset;
-
-#ifndef QT_NO_SCROLLAREA
- QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(parent);
- if (scrollArea && scrollArea->viewport() == q) {
- QObjectData *scrollPrivate = static_cast<QWidget *>(scrollArea)->d_ptr;
- QAbstractScrollAreaPrivate *priv = static_cast<QAbstractScrollAreaPrivate *>(scrollPrivate);
- scrollAreaOffset = priv->contentsOffset();
- p.translate(-scrollAreaOffset);
- }
-#endif // QT_NO_SCROLLAREA
-
- paintBackground(&p, toBePainted, scrollAreaOffset, (asRoot || onScreen) ? flags | DrawAsRoot : 0);
+ paintBackground(&p, toBePainted, (asRoot || onScreen) ? flags | DrawAsRoot : 0);
}
if (!sharedPainter)
@@ -5438,8 +5449,6 @@ QString QWidget::windowIconText() const
\list
\o The file name of the specified path, obtained using QFileInfo::fileName().
- \o An optional \c{*} character, if the \l windowModified property is set,
- as per the Apple Human Interface Guidelines.
\endlist
On Windows and X11:
@@ -5488,7 +5497,7 @@ void QWidgetPrivate::setWindowFilePath_helper(const QString &filePath)
{
if (extra->topextra && extra->topextra->caption.isEmpty()) {
#ifdef Q_WS_MAC
- setWindowTitle_helper(filePath);
+ setWindowTitle_helper(QFileInfo(filePath).fileName());
#else
Q_Q(QWidget);
Q_UNUSED(filePath);
@@ -7484,7 +7493,6 @@ bool QWidget::event(QEvent *event)
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
#endif
- case QEvent::Gesture:
return false;
default:
break;
@@ -7880,9 +7888,6 @@ bool QWidget::event(QEvent *event)
d->needWindowChange = false;
break;
#endif
- case QEvent::Gesture:
- event->ignore();
- break;
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
@@ -7920,6 +7925,59 @@ bool QWidget::event(QEvent *event)
(void) QApplication::sendEvent(this, &mouseEvent);
break;
}
+#ifdef Q_WS_WIN
+ case QEvent::WinGesture: {
+ QWinGestureEvent *ev = static_cast<QWinGestureEvent*>(event);
+ QApplicationPrivate *qAppPriv = qApp->d_func();
+ QApplicationPrivate::WidgetStandardGesturesMap::iterator it;
+ it = qAppPriv->widgetGestures.find(this);
+ if (it != qAppPriv->widgetGestures.end()) {
+ Qt::GestureState state = Qt::GestureUpdated;
+ if (qAppPriv->lastGestureId == 0)
+ state = Qt::GestureStarted;
+ QWinGestureEvent::Type type = ev->gestureType;
+ if (ev->gestureType == QWinGestureEvent::GestureEnd) {
+ type = (QWinGestureEvent::Type)qAppPriv->lastGestureId;
+ state = Qt::GestureFinished;
+ }
+
+ QGesture *gesture = 0;
+ switch (type) {
+ case QWinGestureEvent::Pan: {
+ QPanGesture *pan = it.value().pan;
+ gesture = pan;
+ if (state == Qt::GestureStarted) {
+ gesture->setStartPos(ev->position);
+ gesture->setLastPos(ev->position);
+ } else {
+ gesture->setLastPos(gesture->pos());
+ }
+ gesture->setPos(ev->position);
+ break;
+ }
+ case QWinGestureEvent::Pinch:
+ break;
+ default:
+ break;
+ }
+ if (gesture) {
+ gesture->setState(state);
+ if (state == Qt::GestureStarted)
+ emit gesture->started();
+ emit gesture->triggered();
+ if (state == Qt::GestureFinished)
+ emit gesture->finished();
+ event->accept();
+ }
+ if (ev->gestureType == QWinGestureEvent::GestureEnd) {
+ qAppPriv->lastGestureId = 0;
+ } else {
+ qAppPriv->lastGestureId = type;
+ }
+ }
+ break;
+ }
+#endif
#ifndef QT_NO_PROPERTIES
case QEvent::DynamicPropertyChange: {
const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName();
@@ -9845,11 +9903,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
break;
case Qt::WA_InputMethodEnabled: {
QInputContext *ic = d->ic;
- if (!ic) {
- // implicitly create input context only if we have a focus
- if (hasFocus())
- ic = d->inputContext();
- }
+ if (!ic && (!on || hasFocus()))
+ ic = d->inputContext();
if (ic) {
if (on && hasFocus() && ic->focusWidget() != this && isEnabled()) {
ic->setFocusWidget(this);
@@ -9964,8 +10019,8 @@ bool QWidget::testAttribute_helper(Qt::WidgetAttribute attribute) const
By default the value of this property is 1.0.
- This feature is available on Embedded Linux, Mac OS X, X11 platforms that
- support the Composite extension, and Windows 2000 and later.
+ This feature is available on Embedded Linux, Mac OS X, Windows,
+ and X11 platforms that support the Composite extension.
This feature is not available on Windows CE.
@@ -11016,103 +11071,6 @@ QWindowSurface *QWidget::windowSurface() const
return bs ? bs->windowSurface : 0;
}
-/*!
- \since 4.6
-
- Subscribes the widget to the specified \a gesture type.
-
- Returns the id of the gesture.
-
- \sa releaseGesture(), setGestureEnabled()
-*/
-int QWidget::grabGesture(const QString &gesture)
-{
- Q_D(QWidget);
- int id = d->grabGesture(QGestureManager::instance()->makeGestureId(gesture));
- if (d->extra && d->extra->proxyWidget)
- d->extra->proxyWidget->QGraphicsItem::d_ptr->grabGesture(id);
- return id;
-}
-
-int QWidgetPrivate::grabGesture(int gestureId)
-{
- gestures << gestureId;
- ++qApp->d_func()->grabbedGestures[QGestureManager::instance()->gestureNameFromId(gestureId)];
- return gestureId;
-}
-
-bool QWidgetPrivate::releaseGesture(int gestureId)
-{
- QApplicationPrivate *qAppPriv = qApp->d_func();
- if (gestures.contains(gestureId)) {
- QString name = QGestureManager::instance()->gestureNameFromId(gestureId);
- Q_ASSERT(qAppPriv->grabbedGestures[name] > 0);
- --qAppPriv->grabbedGestures[name];
- gestures.remove(gestureId);
- return true;
- }
- return false;
-}
-
-bool QWidgetPrivate::hasGesture(const QString &name) const
-{
- QGestureManager *gm = QGestureManager::instance();
- QSet<int>::const_iterator it = gestures.begin(),
- e = gestures.end();
- for (; it != e; ++it) {
- if (gm->gestureNameFromId(*it) == name)
- return true;
- }
- return false;
-}
-
-/*!
- \since 4.6
-
- Subscribes the widget to the specified \a gesture type.
-
- Returns the id of the gesture.
-
- \sa releaseGesture(), setGestureEnabled()
-*/
-int QWidget::grabGesture(Qt::GestureType gesture)
-{
- return grabGesture(qt_getStandardGestureTypeName(gesture));
-}
-
-/*!
- \since 4.6
-
- Unsubscribes the widget from a gesture, which is specified by the
- \a gestureId.
-
- \sa grabGesture(), setGestureEnabled()
-*/
-void QWidget::releaseGesture(int gestureId)
-{
- Q_D(QWidget);
- if (d->releaseGesture(gestureId)) {
- if (d->extra && d->extra->proxyWidget)
- d->extra->proxyWidget->QGraphicsItem::d_ptr->releaseGesture(gestureId);
- QGestureManager::instance()->releaseGestureId(gestureId);
- }
-}
-
-/*!
- \since 4.6
-
- If \a enable is true, the gesture with the given \a gestureId is
- enabled; otherwise the gesture is disabled.
-
- The id of the gesture is returned by the grabGesture().
-
- \sa grabGesture(), releaseGesture()
-*/
-void QWidget::setGestureEnabled(int gestureId, bool enable)
-{
- //###
-}
-
void QWidgetPrivate::getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const
{
if (left)
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 1667275..bc9952c 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -90,7 +90,6 @@ class QDragLeaveEvent;
class QDropEvent;
class QShowEvent;
class QHideEvent;
-class QGestureEvent;
class QInputContext;
class QIcon;
class QWindowSurface;
@@ -612,11 +611,6 @@ public:
void setWindowSurface(QWindowSurface *surface);
QWindowSurface *windowSurface() const;
- int grabGesture(const QString &gesture);
- int grabGesture(Qt::GestureType gesture);
- void releaseGesture(int gestureId);
- void setGestureEnabled(int gestureId, bool enable = true);
-
Q_SIGNALS:
void customContextMenuRequested(const QPoint &pos);
@@ -752,7 +746,6 @@ private:
friend bool isWidgetOpaque(const QWidget *);
friend class QGLWidgetPrivate;
#endif
- friend class QGestureManager;
#ifdef Q_WS_X11
friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp);
friend void qt_net_remove_user_time(QWidget *tlw);
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index a9097a2..1717fbd 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -83,6 +83,7 @@
#include "qcursor.h"
#include "qdesktopwidget.h"
#include "qevent.h"
+#include "qfileinfo.h"
#include "qimage.h"
#include "qlayout.h"
#include "qmenubar.h"
@@ -843,8 +844,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
qt_button_down = 0;
} else if(ekind == kEventWindowToolbarSwitchMode) {
- QToolBarChangeEvent ev(!(GetCurrentKeyModifiers() & cmdKey));
- QApplication::sendSpontaneousEvent(widget, &ev);
+ macSendToolbarChangeEvent(widget);
HIToolbarRef toolbar;
if (GetWindowToolbar(wid, &toolbar) == noErr) {
if (toolbar) {
@@ -1198,22 +1198,13 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
p.setClipping(false);
if(was_unclipped)
widget->setAttribute(Qt::WA_PaintUnclipped);
-
- QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(widget->parent());
- QPoint scrollAreaOffset;
- if (scrollArea && scrollArea->viewport() == widget) {
- QAbstractScrollAreaPrivate *priv = static_cast<QAbstractScrollAreaPrivate *>(static_cast<QWidget *>(scrollArea)->d_ptr);
- scrollAreaOffset = priv->contentsOffset();
- p.translate(-scrollAreaOffset);
- }
-
- widget->d_func()->paintBackground(&p, qrgn, scrollAreaOffset, widget->isWindow() ? DrawAsRoot : 0);
+ widget->d_func()->paintBackground(&p, qrgn, widget->isWindow() ? DrawAsRoot : 0);
if (widget->testAttribute(Qt::WA_TintedBackground)) {
QColor tint = widget->palette().window().color();
tint.setAlphaF(.6);
const QVector<QRect> &rects = qrgn.rects();
for (int i = 0; i < rects.size(); ++i)
- p.fillRect(rects.at(i).translated(scrollAreaOffset), tint);
+ p.fillRect(rects.at(i), tint);
}
p.end();
if (!redirectionOffset.isNull())
@@ -1369,6 +1360,14 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
// Set dropWidget to zero, so qt_mac_dnd_event
// doesn't get called a second time below:
dropWidget = 0;
+ } else if (ekind == kEventControlDragLeave) {
+ dropWidget = QDragManager::self()->currentTarget();
+ if (dropWidget) {
+ dropWidget->d_func()->qt_mac_dnd_event(kEventControlDragLeave, drag);
+ }
+ // Set dropWidget to zero, so qt_mac_dnd_event
+ // doesn't get called a second time below:
+ dropWidget = 0;
}
}
}
@@ -1513,12 +1512,16 @@ void QWidgetPrivate::toggleDrawers(bool visible)
*****************************************************************************/
bool QWidgetPrivate::qt_mac_update_sizer(QWidget *w, int up)
{
+ // I'm not sure what "up" is
if(!w || !w->isWindow())
return false;
QTLWExtra *topData = w->d_func()->topData();
QWExtra *extraData = w->d_func()->extraData();
- topData->resizer += up;
+ // topData->resizer is only 4 bits, so subtracting -1 from zero causes bad stuff
+ // to happen, prevent that here (you really want the thing hidden).
+ if (up >= 0 || topData->resizer != 0)
+ topData->resizer += up;
OSWindowRef windowRef = qt_mac_window_for(OSViewRef(w->winId()));
{
#ifndef QT_MAC_USE_COCOA
@@ -1531,7 +1534,6 @@ bool QWidgetPrivate::qt_mac_update_sizer(QWidget *w, int up)
bool remove_grip = (topData->resizer || (w->windowFlags() & Qt::FramelessWindowHint)
|| (extraData->maxw && extraData->maxh &&
extraData->maxw == extraData->minw && extraData->maxh == extraData->minh));
-
#ifndef QT_MAC_USE_COCOA
WindowAttributes attr;
GetWindowAttributes(windowRef, &attr);
@@ -2132,11 +2134,10 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin
if ((popup || type == Qt::Tool || type == Qt::ToolTip) && !q->isModal()) {
[windowRef setHidesOnDeactivate:YES];
- [windowRef setHasShadow:YES];
} else {
[windowRef setHidesOnDeactivate:NO];
}
-
+ [windowRef setHasShadow:YES];
Q_UNUSED(parentWidget);
Q_UNUSED(dialog);
@@ -2691,10 +2692,15 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
createWinId();
if (q->isWindow()) {
#ifndef QT_MAC_USE_COCOA
- if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) {
- mwl->updateHIToolBarStatus();
+ // We do this down below for wasCreated, so avoid doing this twice
+ // (only for performance, it gets called a lot anyway).
+ if (!wasCreated) {
+ if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) {
+ mwl->updateHIToolBarStatus();
+ }
}
#else
+ // Simply transfer our toolbar over. Everything should stay put, unlike in Carbon.
if (oldToolbar && !(f & Qt::FramelessWindowHint)) {
OSWindowRef newWindow = qt_mac_window_for(q);
[newWindow setToolbar:oldToolbar];
@@ -2709,6 +2715,16 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
if (wasCreated) {
transferChildren();
+#ifndef QT_MAC_USE_COCOA
+ // If we were a unified window, We just transfered our toolbars out of the unified toolbar.
+ // So redo the status one more time. It apparently is not an issue with Cocoa.
+ if (q->isWindow()) {
+ if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) {
+ mwl->updateHIToolBarStatus();
+ }
+ }
+#endif
+
if (topData &&
(!topData->caption.isEmpty() || !topData->filePath.isEmpty()))
setWindowTitle_helper(q->windowTitle());
@@ -2840,8 +2856,7 @@ void QWidgetPrivate::setWindowTitle_sys(const QString &caption)
SetWindowTitleWithCFString(qt_mac_window_for(q), QCFString(caption));
#else
QMacCocoaAutoReleasePool pool;
- [qt_mac_window_for(q)
- setTitle:reinterpret_cast<const NSString *>(static_cast<CFStringRef>(QCFString(caption)))];
+ [qt_mac_window_for(q) setTitle:qt_mac_QStringToNSString(caption)];
#endif
}
}
@@ -2863,7 +2878,8 @@ void QWidgetPrivate::setWindowFilePath_sys(const QString &filePath)
Q_Q(QWidget);
#ifdef QT_MAC_USE_COCOA
QMacCocoaAutoReleasePool pool;
- [qt_mac_window_for(q) setRepresentedFilename:reinterpret_cast<const NSString *>(static_cast<CFStringRef>(QCFString(filePath)))];
+ QFileInfo fi(filePath);
+ [qt_mac_window_for(q) setRepresentedFilename:fi.exists() ? qt_mac_QStringToNSString(filePath) : @""];
#else
bool validRef = false;
FSRef ref;
@@ -2953,8 +2969,7 @@ void QWidgetPrivate::setWindowIconText_sys(const QString &iconText)
SetWindowAlternateTitle(qt_mac_window_for(q), QCFString(iconText));
#else
QMacCocoaAutoReleasePool pool;
- [qt_mac_window_for(q)
- setMiniwindowTitle:reinterpret_cast<const NSString *>(static_cast<CFStringRef>(QCFString(iconText)))];
+ [qt_mac_window_for(q) setMiniwindowTitle:qt_mac_QStringToNSString(iconText)];
#endif
}
}
@@ -3801,8 +3816,6 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
Qt coordinate system for parent
X coordinate system for parent (relative to parent's wrect).
*/
- QRect validRange(-XCOORD_MAX,-XCOORD_MAX, 2*XCOORD_MAX, 2*XCOORD_MAX);
- QRect wrectRange(-WRECT_MAX,-WRECT_MAX, 2*WRECT_MAX, 2*WRECT_MAX);
QRect wrect;
//xrect is the X geometry of my X widget. (starts out in parent's Qt coord sys, and ends up in parent's X coord sys)
QRect xrect = data.crect;
@@ -3824,6 +3837,7 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
parentWRect = QRect(tmpRect.origin.x, tmpRect.origin.y,
tmpRect.size.width, tmpRect.size.height);
} else {
+ const QRect wrectRange(-WRECT_MAX,-WRECT_MAX, 2*WRECT_MAX, 2*WRECT_MAX);
parentWRect = wrectRange;
}
} else {
@@ -3879,15 +3893,24 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
}
}
+ const QRect validRange(-XCOORD_MAX,-XCOORD_MAX, 2*XCOORD_MAX, 2*XCOORD_MAX);
if (!validRange.contains(xrect)) {
// we are too big, and must clip
- xrect &=wrectRange;
+ QPoint screenOffset(0, 0); // offset of the part being on screen
+ const QWidget *parentWidget = q->parentWidget();
+ while (parentWidget && !parentWidget->isWindow()) {
+ screenOffset -= parentWidget->data->crect.topLeft();
+ parentWidget = parentWidget->parentWidget();
+ }
+ QRect cropRect(screenOffset.x() - WRECT_MAX,
+ screenOffset.y() - WRECT_MAX,
+ 2*WRECT_MAX,
+ 2*WRECT_MAX);
+
+ xrect &=cropRect;
wrect = xrect;
- wrect.translate(-data.crect.topLeft());
- //parent's X coord system is equal to parent's Qt coord
- //sys, so we don't need to map xrect.
+ wrect.translate(-data.crect.topLeft()); // translate wrect in my Qt coordinates
}
-
}
// unmap if we are outside the valid window system coord system
@@ -3927,10 +3950,9 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
qt_mac_update_widget_posisiton(q, oldRect, xrect);
- if (jump) {
- updateSystemBackground();
+ if (jump)
q->update();
- }
+
if (mapWindow && !dontShow) {
q->setAttribute(Qt::WA_Mapped);
#ifndef QT_MAC_USE_COCOA
@@ -4012,6 +4034,8 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
setGeometry_sys_helper(x, y, w, h, isMove);
}
#else
+ QSize olds = q->size();
+ const bool isResize = (olds != QSize(w, h));
NSWindow *window = qt_mac_window_for(q);
const QRect &fStrut = frameStrut();
const QRect frameRect(QPoint(x - fStrut.left(), y - fStrut.top()),
@@ -4019,7 +4043,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
fStrut.top() + fStrut.bottom() + h));
NSRect cocoaFrameRect = NSMakeRect(frameRect.x(), flipYCoordinate(frameRect.bottom() + 1),
frameRect.width(), frameRect.height());
-
+ // The setFrame call will trigger a 'windowDidResize' notification for the corresponding
+ // NSWindow. The pending flag is set, so that the resize event can be send as non-spontaneous.
+ if (isResize)
+ q->setAttribute(Qt::WA_PendingResizeEvent);
QPoint currTopLeft = data.crect.topLeft();
if (currTopLeft.x() == x && currTopLeft.y() == y
&& cocoaFrameRect.size.width != 0
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 7385e83..998181e 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -295,7 +295,7 @@ public:
void setUpdatesEnabled_helper(bool );
- void paintBackground(QPainter *, const QRegion &, const QPoint & = QPoint(), int flags = DrawAsRoot) const;
+ void paintBackground(QPainter *, const QRegion &, int flags = DrawAsRoot) const;
bool isAboutToShow() const;
QRegion prepareToRender(const QRegion &region, QWidget::RenderFlags renderFlags);
void render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,
@@ -523,11 +523,6 @@ public:
QList<QAction*> actions;
#endif
- QSet<int> gestures;
- int grabGesture(int gestureId);
- bool releaseGesture(int gestureId);
- bool hasGesture(const QString &type) const;
-
// Bit fields.
uint high_attributes[3]; // the low ones are in QWidget::widget_attributes
QPalette::ColorRole fg_role : 8;
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index e39ca77..46fa3be 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -140,14 +140,8 @@ static void init_wintab_functions()
if (!qt_is_gui_used)
return;
QLibrary library(QLatin1String("wintab32"));
- QT_WA({
- ptrWTOpen = (PtrWTOpen)library.resolve("WTOpenW");
- ptrWTInfo = (PtrWTInfo)library.resolve("WTInfoW");
- } , {
- ptrWTOpen = (PtrWTOpen)library.resolve("WTOpenA");
- ptrWTInfo = (PtrWTInfo)library.resolve("WTInfoA");
- });
-
+ ptrWTOpen = (PtrWTOpen)library.resolve("WTOpenW");
+ ptrWTInfo = (PtrWTInfo)library.resolve("WTInfoW");
ptrWTClose = (PtrWTClose)library.resolve("WTClose");
ptrWTQueueSizeGet = (PtrWTQueueSizeGet)library.resolve("WTQueueSizeGet");
ptrWTQueueSizeSet = (PtrWTQueueSizeSet)library.resolve("WTQueueSizeSet");
@@ -270,7 +264,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
HINSTANCE appinst = qWinAppInst();
HWND parentw, destroyw = 0;
- WId id;
+ WId id = 0;
QString windowClassName = qt_reg_winclass(q);
@@ -287,25 +281,18 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (desktop && !q->testAttribute(Qt::WA_DontShowOnScreen)) { // desktop widget
popup = false; // force this flags off
- if (QSysInfo::WindowsVersion != QSysInfo::WV_NT && QSysInfo::WindowsVersion != QSysInfo::WV_95)
- data.crect.setRect(GetSystemMetrics(76 /* SM_XVIRTUALSCREEN */), GetSystemMetrics(77 /* SM_YVIRTUALSCREEN */),
+ data.crect.setRect(GetSystemMetrics(76 /* SM_XVIRTUALSCREEN */), GetSystemMetrics(77 /* SM_YVIRTUALSCREEN */),
GetSystemMetrics(78 /* SM_CXVIRTUALSCREEN */), GetSystemMetrics(79 /* SM_CYVIRTUALSCREEN */));
- else
- data.crect.setRect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
}
parentw = q->parentWidget() ? q->parentWidget()->effectiveWinId() : 0;
-#ifdef UNICODE
QString title;
- const TCHAR *ttitle = 0;
-#endif
- QByteArray title95;
int style = WS_CHILD;
int exsty = 0;
if (window) {
- style = GetWindowLongA(window, GWL_STYLE);
+ style = GetWindowLong(window, GWL_STYLE);
if (!style)
qErrnoWarning("QWidget::create: GetWindowLong failed");
topLevel = false; // #### needed for some IE plugins??
@@ -361,12 +348,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
if (flags & Qt::WindowTitleHint) {
- QT_WA({
- title = q->isWindow() ? qAppName() : q->objectName();
- ttitle = (TCHAR*)title.utf16();
- } , {
- title95 = q->isWindow() ? qAppName().toLocal8Bit() : q->objectName().toLatin1();
- });
+ title = q->isWindow() ? qAppName() : q->objectName();
}
// The Qt::WA_WState_Created flag is checked by translateConfigEvent() in
@@ -379,13 +361,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
destroyw = data.winid;
id = window;
setWinId(window);
- LONG res = SetWindowLongA(window, GWL_STYLE, style);
+ LONG res = SetWindowLong(window, GWL_STYLE, style);
if (!res)
qErrnoWarning("QWidget::create: Failed to set window style");
#ifdef _WIN64
- res = SetWindowLongPtrA( window, GWLP_WNDPROC, (LONG_PTR)QtWndProc );
+ res = SetWindowLongPtr( window, GWLP_WNDPROC, (LONG_PTR)QtWndProc );
#else
- res = SetWindowLongA( window, GWL_WNDPROC, (LONG)QtWndProc );
+ res = SetWindowLong( window, GWL_WNDPROC, (LONG)QtWndProc );
#endif
if (!res)
qErrnoWarning("QWidget::create: Failed to set window procedure");
@@ -436,16 +418,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
}
- QT_WA({
- const TCHAR *cname = (TCHAR*)windowClassName.utf16();
- id = CreateWindowEx(exsty, cname, ttitle, style,
- x, y, w, h,
- parentw, 0, appinst, 0);
- } , {
- id = CreateWindowExA(exsty, windowClassName.toLatin1(), title95, style,
- x, y, w, h,
- parentw, 0, appinst, 0);
- });
+ id = CreateWindowEx(exsty, reinterpret_cast<const wchar_t *>(windowClassName.utf16()),
+ reinterpret_cast<const wchar_t *>(title.utf16()), style,
+ x, y, w, h,
+ parentw, NULL, appinst, NULL);
if (!id)
qErrnoWarning("QWidget::create: Failed to create window");
setWinId(id);
@@ -457,16 +433,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
SetWindowPos(id, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
winUpdateIsOpaque();
} else if (q->testAttribute(Qt::WA_NativeWindow) || paintOnScreen()) { // create child widget
- QT_WA({
- const TCHAR *cname = (TCHAR*)windowClassName.utf16();
- id = CreateWindowEx(exsty, cname, ttitle, style,
- data.crect.left(), data.crect.top(), data.crect.width(), data.crect.height(),
- parentw, NULL, appinst, NULL);
- } , {
- id = CreateWindowExA(exsty, windowClassName.toLatin1(), title95, style,
- data.crect.left(), data.crect.top(), data.crect.width(), data.crect.height(),
+ id = CreateWindowEx(exsty, reinterpret_cast<const wchar_t *>(windowClassName.utf16()),
+ reinterpret_cast<const wchar_t *>(title.utf16()), style,
+ data.crect.left(), data.crect.top(), data.crect.width(), data.crect.height(),
parentw, NULL, appinst, NULL);
- });
if (!id)
qErrnoWarning("QWidget::create: Failed to create window");
SetWindowPos(id, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
@@ -682,7 +652,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
// Show borderless toplevel windows in tasklist & NavBar
if (!parent) {
QString txt = q->windowTitle().isEmpty()?qAppName():q->windowTitle();
- SetWindowText(q->internalWinId(), (TCHAR*)txt.utf16());
+ SetWindowText(q->internalWinId(), (wchar_t*)txt.utf16());
}
#endif
invalidateBuffer(q->rect());
@@ -767,11 +737,7 @@ void QWidgetPrivate::setWindowTitle_sys(const QString &caption)
return;
Q_ASSERT(q->testAttribute(Qt::WA_WState_Created));
- QT_WA({
- SetWindowText(q->internalWinId(), (TCHAR*)caption.utf16());
- } , {
- SetWindowTextA(q->internalWinId(), caption.toLocal8Bit());
- });
+ SetWindowText(q->internalWinId(), (wchar_t*)caption.utf16());
}
/*
@@ -853,11 +819,11 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON),
&(x->iconPixmap));
if (x->winIconBig) {
- SendMessageA(q->internalWinId(), WM_SETICON, 0 /* ICON_SMALL */, (LPARAM)x->winIconSmall);
- SendMessageA(q->internalWinId(), WM_SETICON, 1 /* ICON_BIG */, (LPARAM)x->winIconBig);
+ SendMessage(q->internalWinId(), WM_SETICON, 0 /* ICON_SMALL */, (LPARAM)x->winIconSmall);
+ SendMessage(q->internalWinId(), WM_SETICON, 1 /* ICON_BIG */, (LPARAM)x->winIconBig);
} else {
- SendMessageA(q->internalWinId(), WM_SETICON, 0 /* ICON_SMALL */, (LPARAM)x->winIconSmall);
- SendMessageA(q->internalWinId(), WM_SETICON, 1 /* ICON_BIG */, (LPARAM)x->winIconSmall);
+ SendMessage(q->internalWinId(), WM_SETICON, 0 /* ICON_SMALL */, (LPARAM)x->winIconSmall);
+ SendMessage(q->internalWinId(), WM_SETICON, 1 /* ICON_BIG */, (LPARAM)x->winIconSmall);
}
}
@@ -884,7 +850,7 @@ LRESULT CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam)
/* Works only as long as pointer is inside the application's window,
which is good enough for QDockWidget.
- Doesn't call SetWindowsHookExA() - this function causes a system-wide
+ Doesn't call SetWindowsHookEx() - this function causes a system-wide
freeze if any other app on the system installs a hook and fails to
process events. */
void QWidgetPrivate::grabMouseWhileInWindow()
@@ -908,7 +874,7 @@ void QWidget::grabMouse()
if (!qt_nograb()) {
if (mouseGrb)
mouseGrb->releaseMouse();
- journalRec = SetWindowsHookExA(WH_JOURNALRECORD, (HOOKPROC)qJournalRecordProc, GetModuleHandleA(0), 0);
+ journalRec = SetWindowsHookEx(WH_JOURNALRECORD, (HOOKPROC)qJournalRecordProc, GetModuleHandle(0), 0);
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
SetCapture(effectiveWinId());
mouseGrb = this;
@@ -921,7 +887,7 @@ void QWidget::grabMouse(const QCursor &cursor)
if (!qt_nograb()) {
if (mouseGrb)
mouseGrb->releaseMouse();
- journalRec = SetWindowsHookExA(WH_JOURNALRECORD, (HOOKPROC)qJournalRecordProc, GetModuleHandleA(0), 0);
+ journalRec = SetWindowsHookEx(WH_JOURNALRECORD, (HOOKPROC)qJournalRecordProc, GetModuleHandle(0), 0);
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
SetCapture(effectiveWinId());
mouseGrbCur = new QCursor(cursor);
@@ -1028,7 +994,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
if (newstate & Qt::WindowFullScreen) {
if (d->topData()->normalGeometry.width() < 0 && !(oldstate & Qt::WindowMaximized))
d->topData()->normalGeometry = geometry();
- d->topData()->savedFlags = Qt::WindowFlags(GetWindowLongA(internalWinId(), GWL_STYLE));
+ d->topData()->savedFlags = Qt::WindowFlags(GetWindowLong(internalWinId(), GWL_STYLE));
#ifndef Q_FLATTEN_EXPOSE
UINT style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP;
#else
@@ -1038,7 +1004,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
style |= WS_SYSMENU;
if (isVisible())
style |= WS_VISIBLE;
- SetWindowLongA(internalWinId(), GWL_STYLE, style);
+ SetWindowLong(internalWinId(), GWL_STYLE, style);
QRect r = QApplication::desktop()->screenGeometry(this);
UINT swpf = SWP_FRAMECHANGED;
if (newstate & Qt::WindowActive)
@@ -1050,7 +1016,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
UINT style = d->topData()->savedFlags;
if (isVisible())
style |= WS_VISIBLE;
- SetWindowLongA(internalWinId(), GWL_STYLE, style);
+ SetWindowLong(internalWinId(), GWL_STYLE, style);
UINT swpf = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE;
if (newstate & Qt::WindowActive)
@@ -1395,7 +1361,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
UINT style = top->savedFlags;
if (q->isVisible())
style |= WS_VISIBLE;
- SetWindowLongA(q->internalWinId(), GWL_STYLE, style);
+ SetWindowLong(q->internalWinId(), GWL_STYLE, style);
UINT swpf = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE;
if (data.window_state & Qt::WindowActive)
@@ -1410,7 +1376,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData();
const bool inTopLevelResize = tlwExtra ? tlwExtra->inTopLevelResize : false;
const bool isTranslucentWindow = !isOpaque && ptrUpdateLayeredWindowIndirect && (data.window_flags & Qt::FramelessWindowHint)
- && GetWindowLongA(q->internalWinId(), GWL_EXSTYLE) & Q_WS_EX_LAYERED;
+ && GetWindowLong(q->internalWinId(), GWL_EXSTYLE) & Q_WS_EX_LAYERED;
if (q->testAttribute(Qt::WA_WState_ConfigPending)) { // processing config event
if (q->internalWinId())
@@ -1578,11 +1544,11 @@ void QWidgetPrivate::winUpdateIsOpaque()
return;
if (!isOpaque && ptrUpdateLayeredWindowIndirect) {
- SetWindowLongA(q->internalWinId(), GWL_EXSTYLE,
- GetWindowLongA(q->internalWinId(), GWL_EXSTYLE) | Q_WS_EX_LAYERED);
+ SetWindowLong(q->internalWinId(), GWL_EXSTYLE,
+ GetWindowLong(q->internalWinId(), GWL_EXSTYLE) | Q_WS_EX_LAYERED);
} else {
- SetWindowLongA(q->internalWinId(), GWL_EXSTYLE,
- GetWindowLongA(q->internalWinId(), GWL_EXSTYLE) & ~Q_WS_EX_LAYERED);
+ SetWindowLong(q->internalWinId(), GWL_EXSTYLE,
+ GetWindowLong(q->internalWinId(), GWL_EXSTYLE) & ~Q_WS_EX_LAYERED);
}
#endif
}
@@ -1592,12 +1558,12 @@ void QWidgetPrivate::setConstraints_sys()
#ifndef Q_WS_WINCE_WM
Q_Q(QWidget);
if (q->isWindow() && q->testAttribute(Qt::WA_WState_Created)) {
- int style = GetWindowLongA(q->internalWinId(), GWL_STYLE);
+ int style = GetWindowLong(q->internalWinId(), GWL_STYLE);
if (shouldShowMaximizeButton())
style |= WS_MAXIMIZEBOX;
else
style &= ~WS_MAXIMIZEBOX;
- SetWindowLongA(q->internalWinId(), GWL_STYLE, style);
+ SetWindowLong(q->internalWinId(), GWL_STYLE, style);
}
#endif
}
@@ -1867,10 +1833,8 @@ void QWidgetPrivate::updateFrameStrut()
RECT rect = {0,0,0,0};
QTLWExtra *top = topData();
- uint exstyle = QT_WA_INLINE(GetWindowLongW(q->internalWinId(), GWL_EXSTYLE),
- GetWindowLongA(q->internalWinId(), GWL_EXSTYLE));
- uint style = QT_WA_INLINE(GetWindowLongW(q->internalWinId(), GWL_STYLE),
- GetWindowLongA(q->internalWinId(), GWL_STYLE));
+ uint exstyle = GetWindowLong(q->internalWinId(), GWL_EXSTYLE);
+ uint style = GetWindowLong(q->internalWinId(), GWL_STYLE);
#ifndef Q_WS_WINCE
if (AdjustWindowRectEx(&rect, style & ~(WS_OVERLAPPED), FALSE, exstyle)) {
#else
@@ -1886,11 +1850,10 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level)
{
Q_Q(QWidget);
- if (!isOpaque && ptrUpdateLayeredWindowIndirect && (data.window_flags & Qt::FramelessWindowHint)) {
- if (GetWindowLongA(q->internalWinId(), GWL_EXSTYLE) & Q_WS_EX_LAYERED) {
- Q_BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * level), Q_AC_SRC_ALPHA};
- Q_UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, NULL, NULL, NULL, NULL, 0, &blend, Q_ULW_ALPHA, NULL};
- (*ptrUpdateLayeredWindowIndirect)(q->internalWinId(), &info);
+ if (!isOpaque && ptrUpdateLayeredWindow && (data.window_flags & Qt::FramelessWindowHint)) {
+ if (GetWindowLong(q->internalWinId(), GWL_EXSTYLE) & Q_WS_EX_LAYERED) {
+ BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * level), AC_SRC_ALPHA};
+ ptrUpdateLayeredWindow(q->internalWinId(), NULL, NULL, NULL, NULL, NULL, 0, &blend, Q_ULW_ALPHA);
}
return;
}
@@ -1906,15 +1869,15 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level)
if (!ptrSetLayeredWindowAttributes)
return;
- int wl = GetWindowLongA(q->internalWinId(), GWL_EXSTYLE);
+ int wl = GetWindowLong(q->internalWinId(), GWL_EXSTYLE);
if (level != 1.0) {
if ((wl&Q_WS_EX_LAYERED) == 0)
- SetWindowLongA(q->internalWinId(), GWL_EXSTYLE, wl|Q_WS_EX_LAYERED);
+ SetWindowLong(q->internalWinId(), GWL_EXSTYLE, wl | Q_WS_EX_LAYERED);
} else if (wl&Q_WS_EX_LAYERED) {
- SetWindowLongA(q->internalWinId(), GWL_EXSTYLE, wl & ~Q_WS_EX_LAYERED);
+ SetWindowLong(q->internalWinId(), GWL_EXSTYLE, wl & ~Q_WS_EX_LAYERED);
}
- (*ptrSetLayeredWindowAttributes)(q->internalWinId(), 0, (int)(level * 255), Q_LWA_ALPHA);
+ ptrSetLayeredWindowAttributes(q->internalWinId(), 0, (int)(level * 255), Q_LWA_ALPHA);
}
#endif //Q_WS_WINCE
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index 24d8156..b0eaa12 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -188,11 +188,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
parentw = q->parentWidget() ? q->parentWidget()->effectiveWinId() : 0;
-#ifdef UNICODE
QString title;
- const TCHAR *ttitle = 0;
-#endif
- QByteArray title95;
int style = WS_CHILD;
int exsty = WS_EX_NOPARENTNOTIFY;
@@ -236,12 +232,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
if (flags & Qt::WindowTitleHint) {
- QT_WA({
- title = q->isWindow() ? qAppName() : q->objectName();
- ttitle = (TCHAR*)title.utf16();
- } , {
- title95 = q->isWindow() ? qAppName().toLocal8Bit() : q->objectName().toLatin1();
- });
+ title = q->isWindow() ? qAppName() : q->objectName();
}
// The Qt::WA_WState_Created flag is checked by translateConfigEvent() in
@@ -254,11 +245,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
destroyw = data.winid;
id = window;
setWinId(window);
- LONG res = SetWindowLongA(window, GWL_STYLE, style);
+ LONG res = SetWindowLong(window, GWL_STYLE, style);
if (!res)
qErrnoWarning("QWidget::create: Failed to set window style");
- res = SetWindowLongA( window, GWL_WNDPROC, (LONG)QtWndProc );
+ res = SetWindowLong( window, GWL_WNDPROC, (LONG)QtWndProc );
if (!res)
qErrnoWarning("QWidget::create: Failed to set window procedure");
@@ -267,10 +258,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (!id) { //Create a dummy desktop
RECT r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- const TCHAR *cname = reinterpret_cast<const TCHAR *> (windowClassName.utf16());
- id = CreateWindow(cname, ttitle, style,
- r.left, r.top, r.right - r.left, r.bottom - r.top,
- 0, 0, appinst, 0);
+ id = CreateWindow(reinterpret_cast<const wchar_t *>(windowClassName.utf16()),
+ reinterpret_cast<const wchar_t *>(title.utf16()), style,
+ r.left, r.top, r.right - r.left, r.bottom - r.top,
+ 0, 0, appinst, 0);
}
setWinId(id);
} else if (topLevel) { // create top-level widget
@@ -303,8 +294,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
}
- const TCHAR *cname = reinterpret_cast<const TCHAR *> (windowClassName.utf16());
- id = CreateWindowEx(exsty, cname, ttitle, style,
+ id = CreateWindowEx(exsty, reinterpret_cast<const wchar_t *>(windowClassName.utf16()),
+ reinterpret_cast<const wchar_t *>(title.utf16()), style,
x, y, w, h,
0, 0, appinst, 0);
@@ -314,16 +305,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if ((flags & Qt::WindowStaysOnTopHint) || (type == Qt::ToolTip))
SetWindowPos(id, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
} else if (q->testAttribute(Qt::WA_NativeWindow) || paintOnScreen()) { // create child widget
- QT_WA({
- const TCHAR *cname = (TCHAR*)windowClassName.utf16();
- id = CreateWindowEx(exsty, cname, ttitle, style,
- data.crect.left(), data.crect.top(), data.crect.width(), data.crect.height(),
- parentw, NULL, appinst, NULL);
- } , {
- id = CreateWindowExA(exsty, windowClassName.toLatin1(), title95, style,
- data.crect.left(), data.crect.top(), data.crect.width(), data.crect.height(),
+ id = CreateWindowEx(exsty, (wchar_t*)windowClassName.utf16(), (wchar_t*)title.utf16(), style,
+ data.crect.left(), data.crect.top(), data.crect.width(), data.crect.height(),
parentw, NULL, appinst, NULL);
- });
if (!id)
qErrnoWarning("QWidget::create: Failed to create window");
SetWindowPos(id, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
@@ -510,7 +494,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
if ((oldstate & Qt::WindowMaximized) != (newstate & Qt::WindowMaximized)) {
if (!(newstate & Qt::WindowMaximized)) {
- int style = GetWindowLongW(internalWinId(), GWL_STYLE) | WS_BORDER | WS_POPUP | WS_CAPTION;
+ int style = GetWindowLong(internalWinId(), GWL_STYLE) | WS_BORDER | WS_POPUP | WS_CAPTION;
SetWindowLong(internalWinId(), GWL_STYLE, style);
SetWindowLong(internalWinId(), GWL_EXSTYLE, GetWindowLong (internalWinId(), GWL_EXSTYLE) & ~ WS_EX_NODRAG);
}
@@ -535,11 +519,11 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
if (newstate & Qt::WindowFullScreen) {
if (d->topData()->normalGeometry.width() < 0 && !(oldstate & Qt::WindowMaximized))
d->topData()->normalGeometry = geometry();
- d->topData()->savedFlags = (Qt::WindowFlags) GetWindowLongA(internalWinId(), GWL_STYLE);
+ d->topData()->savedFlags = (Qt::WindowFlags)GetWindowLong(internalWinId(), GWL_STYLE);
UINT style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP;
if (isVisible())
style |= WS_VISIBLE;
- SetWindowLongA(internalWinId(), GWL_STYLE, style);
+ SetWindowLong(internalWinId(), GWL_STYLE, style);
QRect r = qApp->desktop()->screenGeometry(this);
UINT swpf = SWP_FRAMECHANGED;
if (newstate & Qt::WindowActive)
@@ -550,7 +534,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
UINT style = d->topData()->savedFlags;
if (isVisible())
style |= WS_VISIBLE;
- SetWindowLongA(internalWinId(), GWL_STYLE, style);
+ SetWindowLong(internalWinId(), GWL_STYLE, style);
UINT swpf = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE;
if (newstate & Qt::WindowActive)
swpf |= SWP_NOACTIVATE;
diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp
index 3ddde1b..659331f 100644
--- a/src/gui/kernel/qx11embed_x11.cpp
+++ b/src/gui/kernel/qx11embed_x11.cpp
@@ -826,7 +826,7 @@ bool QX11EmbedWidget::x11Event(XEvent *event)
&actual_format_return, &nitems_return,
&bytes_after_return, &prop_return) == Success) {
if (nitems_return > 1) {
- if (((int * )prop_return)[1] & XEMBED_MAPPED) {
+ if (((long * )prop_return)[1] & XEMBED_MAPPED) {
XMapWindow(x11Info().display(), internalWinId());
} else {
XUnmapWindow(x11Info().display(), internalWinId());
@@ -1670,9 +1670,9 @@ void QX11EmbedContainerPrivate::acceptClient(WId window)
// Clients with the _XEMBED_INFO property are XEMBED clients.
clientIsXEmbed = true;
- unsigned int *p = (unsigned int *)prop_return;
+ long *p = (long *)prop_return;
if (nitems_return >= 2)
- clientversion = p[0];
+ clientversion = (unsigned int)p[0];
}
XFree(prop_return);
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index 1131f9b..7bdf70a 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -119,7 +119,9 @@ Q_INLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>::QGenericMatrix()
template <int N, int M, typename T, typename InnerT>
Q_INLINE_TEMPLATE QGenericMatrix<N, M, T, InnerT>::QGenericMatrix(const QGenericMatrix<N, M, T, InnerT>& other)
{
- qMemCopy(m, other.m, sizeof(m));
+ for (int col = 0; col < N; ++col)
+ for (int row = 0; row < M; ++row)
+ m[col][row] = other.m[col][row];
}
template <int N, int M, typename T, typename InnerT>
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 9fe487b..88f58c8 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -53,10 +53,6 @@ QT_BEGIN_NAMESPACE
\brief The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
\since 4.6
- The matrix elements are stored internally using the most efficient
- numeric representation for the underlying hardware: floating-point
- or fixed-point.
-
\sa QVector3D, QGenericMatrix
*/
@@ -308,8 +304,7 @@ QMatrix4x4::QMatrix4x4(const QTransform& transform)
// The 4x4 matrix inverse algorithm is based on that described at:
// http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q24
// Some optimization has been done to avoid making copies of 3x3
-// sub-matrices, to do calculations in fixed-point where required,
-// and to unroll the loops.
+// sub-matrices and to unroll the loops.
// Calculate the determinant of a 3x3 sub-matrix.
// | A B C |
@@ -1004,10 +999,6 @@ QMatrix4x4& QMatrix4x4::rotate(qreal angle, const QVector3D& vector)
#endif
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
/*!
\overload
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 17c4373..d9d4160 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -55,10 +55,6 @@ QT_BEGIN_NAMESPACE
Quaternions are used to represent rotations in 3D space, and
consist of a 3D rotation axis specified by the x, y, and z
coordinates, and a scalar representing the rotation angle.
-
- The components of a quaternion are stored internally using the most
- efficient representation for the GL rendering engine, which will be
- either floating-point or fixed-point.
*/
/*!
@@ -339,10 +335,6 @@ QVector3D QQuaternion::rotateVector(const QVector3D& vector) const
\sa operator*=()
*/
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
#ifndef QT_NO_VECTOR3D
/*!
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index 9b5d123..b492aa8 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -57,9 +57,7 @@ QT_BEGIN_NAMESPACE
The QVector2D class can also be used to represent vertices in 2D space.
We therefore do not need to provide a separate vertex class.
- The coordinates are stored internally using the most efficient
- representation for the GL rendering engine, which will be either
- floating-point or fixed-point.
+ \sa QVector3D, QVector4D, QQuaternion
*/
/*!
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 977152a..95550cd 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -61,9 +61,7 @@ QT_BEGIN_NAMESPACE
The QVector3D class can also be used to represent vertices in 3D space.
We therefore do not need to provide a separate vertex class.
- The coordinates are stored internally using the most efficient
- representation for the GL rendering engine, which will be either
- floating-point or fixed-point.
+ \sa QVector2D, QVector4D, QQuaternion
*/
/*!
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index a28d2a1..1f7d921 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -57,10 +57,6 @@ QT_BEGIN_NAMESPACE
The QVector4D class can also be used to represent vertices in 4D space.
We therefore do not need to provide a separate vertex class.
- The coordinates are stored internally using the most efficient
- representation for the GL rendering engine, which will be either
- floating-point or fixed-point.
-
\sa QQuaternion, QVector2D, QVector3D
*/
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 85fc0b9..831d389 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -374,9 +374,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl,
const uchar *src = srcPixels + y * sbpl;
const uchar *srcEnd = src + srcOffset;
while (src < srcEnd) {
-#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_))
- // non-16-bit aligned memory access is not possible on PowerPC &
- // ARM <v6 (QT_ARCH_ARMV6)
+#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_))
+ // non-16-bit aligned memory access is not possible on PowerPC,
+ // ARM <v6 (QT_ARCH_ARMV6) & SH
quint16 spix = (quint16(src[2])<<8) + src[1];
#else
quint16 spix = *(quint16 *) (src + 1);
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index a3ae102..602b991 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1008,8 +1008,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs,
;
#ifndef QT_NO_IMAGE_HEURISTIC_MASK
} else { // color pixmap, no mask
- QString k;
- k.sprintf("$qt-drawitem-%llx", pm.cacheKey());
+ QString k = QString::fromLatin1("$qt-drawitem-%1").arg(pm.cacheKey());
if (!QPixmapCache::find(k, pm)) {
pm = pm.createHeuristicMask();
pm.setMask((QBitmap&)pm);
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index 8f6797c..ce07c1f 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -133,7 +133,7 @@ Q_GUI_EXPORT QT3_SUPPORT void qDrawArrow(QPainter *p, Qt::ArrowType type, Qt::GU
const QPalette &pal, bool enabled);
#endif
-struct Q_GUI_EXPORT QMargins
+struct QMargins
{
inline QMargins(int margin = 0)
: top(margin),
@@ -151,7 +151,7 @@ struct Q_GUI_EXPORT QMargins
int right;
};
-struct Q_GUI_EXPORT QTileRules
+struct QTileRules
{
inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule = Qt::Stretch)
: horizontal(horizontalRule), vertical(verticalRule) {}
@@ -168,8 +168,7 @@ Q_GUI_EXPORT void qDrawBorderPixmap(QPainter *painter,
const QRect &sourceRect,
const QMargins &sourceMargins,
const QTileRules &rules = QTileRules());
-
-Q_GUI_EXPORT inline void qDrawBorderPixmap(QPainter *painter,
+inline void qDrawBorderPixmap(QPainter *painter,
const QRect &target,
const QMargins &margins,
const QPixmap &pixmap)
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 4c35004..e9ff752 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -110,10 +110,6 @@ extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); //
#define qt_swap_int(x, y) { int tmp = (x); (x) = (y); (y) = tmp; }
#define qt_swap_qreal(x, y) { qreal tmp = (x); (x) = (y); (y) = tmp; }
-#ifdef Q_WS_WIN
-static bool qt_enable_16bit_colors = false;
-#endif
-
// #define QT_DEBUG_DRAW
#ifdef QT_DEBUG_DRAW
void dumpClip(int width, int height, QClipData *clip);
@@ -4661,104 +4657,6 @@ static int qt_intersect_spans(QT_FT_Span *spans, int numSpans,
return n;
}
-/*
- \internal
- Clip spans to \a{clip}-region.
- Returns number of unclipped spans
-*/
-static int qt_intersect_spans(QT_FT_Span *spans, int numSpans,
- int *currSpan,
- QT_FT_Span *outSpans, int maxOut,
- const QRegion &clip)
-{
- const QVector<QRect> rects = clip.rects();
- const int numRects = rects.size();
-
- int r = 0;
- short miny, minx, maxx, maxy;
- {
- const QRect &rect = rects[0];
- miny = rect.top();
- minx = rect.left();
- maxx = rect.right();
- maxy = rect.bottom();
- }
-
- // TODO: better mapping of currY and startRect
-
- int n = 0;
- int i = *currSpan;
- int currY = spans[i].y;
- while (i < numSpans) {
-
- if (spans[i].y != currY && r != 0) {
- currY = spans[i].y;
- r = 0;
- const QRect &rect = rects[r];
- miny = rect.top();
- minx = rect.left();
- maxx = rect.right();
- maxy = rect.bottom();
- }
-
- if (spans[i].y < miny) {
- ++i;
- continue;
- }
-
- if (spans[i].y > maxy || spans[i].x > maxx) {
- if (++r >= numRects) {
- ++i;
- continue;
- }
-
- const QRect &rect = rects[r];
- miny = rect.top();
- minx = rect.left();
- maxx = rect.right();
- maxy = rect.bottom();
- continue;
- }
-
- if (spans[i].x + spans[i].len <= minx) {
- ++i;
- continue;
- }
-
- outSpans[n].y = spans[i].y;
- outSpans[n].coverage = spans[i].coverage;
-
- if (spans[i].x < minx) {
- const ushort cutaway = minx - spans[i].x;
- outSpans[n].len = qMin(spans[i].len - cutaway, maxx - minx + 1);
- outSpans[n].x = minx;
- if (outSpans[n].len == spans[i].len - cutaway) {
- ++i;
- } else {
- // span wider than current rect
- spans[i].len -= outSpans[n].len + cutaway;
- spans[i].x = maxx + 1;
- }
- } else { // span starts inside current rect
- outSpans[n].x = spans[i].x;
- outSpans[n].len = qMin(spans[i].len,
- ushort(maxx - spans[i].x + 1));
- if (outSpans[n].len == spans[i].len) {
- ++i;
- } else {
- // span wider than current rect
- spans[i].len -= outSpans[n].len;
- spans[i].x = maxx + 1;
- }
- }
-
- if (++n >= maxOut)
- break;
- }
-
- *currSpan = i;
- return n;
-}
static void qt_span_fill_clipRect(int count, const QSpan *spans,
void *userData)
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 664751a..178d519 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -48,6 +48,10 @@
#include "qprinterinfo.h"
#include <qnumeric.h>
+#ifdef Q_OS_UNIX
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
+#endif
+
QT_BEGIN_NAMESPACE
extern int qt_defaultDpi();
@@ -1647,7 +1651,7 @@ static void closeAllOpenFds()
#endif
// leave stdin/out/err untouched
while(--i > 2)
- ::close(i);
+ QT_CLOSE(i);
}
#endif
@@ -1681,7 +1685,7 @@ bool QPdfBaseEnginePrivate::openPrintDevice()
if (!printerName.isEmpty())
pr = printerName;
int fds[2];
- if (pipe(fds) != 0) {
+ if (qt_safe_pipe(fds) != 0) {
qWarning("QPdfPrinter: Could not open pipe to print");
return false;
}
@@ -1700,9 +1704,9 @@ bool QPdfBaseEnginePrivate::openPrintDevice()
(void)execlp("true", "true", (char *)0);
(void)execl("/bin/true", "true", (char *)0);
(void)execl("/usr/bin/true", "true", (char *)0);
- ::exit(0);
+ ::_exit(0);
}
- dup2(fds[0], 0);
+ qt_safe_dup2(fds[0], 0, 0);
closeAllOpenFds();
@@ -1769,14 +1773,14 @@ bool QPdfBaseEnginePrivate::openPrintDevice()
// wait for a second so the parent process (the
// child of the GUI process) has exited. then
// exit.
- ::close(0);
+ QT_CLOSE(0);
(void)::sleep(1);
- ::exit(0);
+ ::_exit(0);
}
// parent process
- ::close(fds[0]);
+ QT_CLOSE(fds[0]);
fd = fds[1];
- (void)::waitpid(pid, 0, 0);
+ (void)qt_safe_waitpid(pid, 0, 0);
if (fd < 0)
return false;
@@ -1923,7 +1927,7 @@ void QPdfBaseEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &t
#ifdef Q_WS_WIN
if (ti.fontEngine->type() == QFontEngine::Win) {
QFontEngineWin *fe = static_cast<QFontEngineWin *>(ti.fontEngine);
- size = fe->tm.w.tmHeight;
+ size = fe->tm.tmHeight;
}
#endif
diff --git a/src/gui/painting/qprintengine_pdf.cpp b/src/gui/painting/qprintengine_pdf.cpp
index c1edcb3..b267860 100644
--- a/src/gui/painting/qprintengine_pdf.cpp
+++ b/src/gui/painting/qprintengine_pdf.cpp
@@ -655,7 +655,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
#ifdef Q_WS_WIN
if (ti.fontEngine->type() == QFontEngine::Win) {
QFontEngineWin *fe = static_cast<QFontEngineWin *>(ti.fontEngine);
- size = fe->tm.w.tmHeight;
+ size = fe->tm.tmHeight;
}
#endif
int synthesized = ti.fontEngine->synthesized();
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index f36028f..7b99e2f 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -199,33 +199,18 @@ bool QWin32PrintEngine::begin(QPaintDevice *pdev)
if (d->printToFile && d->fileName.isEmpty())
d->fileName = d->port;
- QT_WA({
- d->devModeW()->dmCopies = d->num_copies;
- DOCINFO di;
- memset(&di, 0, sizeof(DOCINFO));
- di.cbSize = sizeof(DOCINFO);
- di.lpszDocName = reinterpret_cast<const wchar_t *>(d->docName.utf16());
- if (d->printToFile && !d->fileName.isEmpty())
- di.lpszOutput = reinterpret_cast<const wchar_t *>(d->fileName.utf16());
- if (ok && StartDoc(d->hdc, &di) == SP_ERROR) {
- qErrnoWarning("QWin32PrintEngine::begin: StartDoc failed");
- ok = false;
- }
- } , {
- d->devModeA()->dmCopies = d->num_copies;
- DOCINFOA di;
- memset(&di, 0, sizeof(DOCINFOA));
- di.cbSize = sizeof(DOCINFOA);
- QByteArray docNameA = d->docName.toLocal8Bit();
- di.lpszDocName = docNameA.data();
- QByteArray outfileA = d->fileName.toLocal8Bit();
- if (d->printToFile && !d->fileName.isEmpty())
- di.lpszOutput = outfileA;
- if (ok && StartDocA(d->hdc, &di) == SP_ERROR) {
- qErrnoWarning("QWin32PrintEngine::begin: StartDoc failed");
- ok = false;
- }
- });
+ d->devMode->dmCopies = d->num_copies;
+
+ DOCINFO di;
+ memset(&di, 0, sizeof(DOCINFO));
+ di.cbSize = sizeof(DOCINFO);
+ di.lpszDocName = reinterpret_cast<const wchar_t *>(d->docName.utf16());
+ if (d->printToFile && !d->fileName.isEmpty())
+ di.lpszOutput = reinterpret_cast<const wchar_t *>(d->fileName.utf16());
+ if (ok && StartDoc(d->hdc, &di) == SP_ERROR) {
+ qErrnoWarning("QWin32PrintEngine::begin: StartDoc failed");
+ ok = false;
+ }
if (StartPage(d->hdc) <= 0) {
qErrnoWarning("QWin32PrintEngine::begin: StartPage failed");
@@ -317,11 +302,6 @@ bool QWin32PrintEngine::newPage()
bool success = false;
if (d->hdc && d->state == QPrinter::Active) {
-// bool restorePainter = false;
-// if ((qWinVersion()& Qt::WV_DOS_based) && painter && painter->isActive()) {
-// painter->save(); // EndPage/StartPage ruins the DC
-// restorePainter = true;
-// }
if (EndPage(d->hdc) != SP_ERROR) {
// reinitialize the DC before StartPage if needed,
// because resetdc is disabled between calls to the StartPage and EndPage functions
@@ -337,16 +317,10 @@ bool QWin32PrintEngine::newPage()
}
success = (StartPage(d->hdc) != SP_ERROR);
}
- if (!success)
+ if (!success) {
d->state = QPrinter::Aborted;
-
-// if (qWinVersion() & Qt::WV_DOS_based)
-// if (restorePainter) {
-// painter->restore();
-// }
-
- if (!success)
return false;
+ }
}
return true;
}
@@ -369,7 +343,7 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
QRgb brushColor = state->pen().brush().color().rgb();
bool fallBack = state->pen().brush().style() != Qt::SolidPattern
|| qAlpha(brushColor) != 0xff
- || QT_WA_INLINE(d->txop >= QTransform::TxProject, d->txop >= QTransform::TxScale)
+ || d->txop >= QTransform::TxProject
|| ti.fontEngine->type() != QFontEngine::Win;
@@ -380,17 +354,10 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
SelectObject(d->hdc, fe->hfont);
if (GetDeviceCaps(d->hdc, TECHNOLOGY) != DT_CHARSTREAM) {
- QT_WA({
- TCHAR n[64];
- GetTextFaceW(d->hdc, 64, n);
- fallBack = QString::fromUtf16((ushort *)n)
- != QString::fromUtf16((ushort *)fe->logfont.lfFaceName);
- } , {
- char an[64];
- GetTextFaceA(d->hdc, 64, an);
- fallBack = QString::fromLocal8Bit(an)
- != QString::fromLocal8Bit(((LOGFONTA*)(&fe->logfont))->lfFaceName);
- });
+ wchar_t n[64];
+ GetTextFace(d->hdc, 64, n);
+ fallBack = QString::fromWCharArray(n)
+ != QString::fromWCharArray(fe->logfont.lfFaceName);
}
}
@@ -983,22 +950,14 @@ void QWin32PrintEnginePrivate::queryDefault()
* Strings "windows" and "device" are specified in the MSDN under EnumPrinters()
*/
QString noPrinters(QLatin1String("qt_no_printers"));
- QString output;
- QT_WA({
- ushort buffer[256];
- GetProfileStringW(L"windows", L"device",
- reinterpret_cast<const wchar_t *>(noPrinters.utf16()),
- reinterpret_cast<wchar_t *>(buffer), 256);
- output = QString::fromUtf16(buffer);
- if (output.isEmpty() || output == noPrinters) // no printers
- return;
- }, {
- char buffer[256];
- GetProfileStringA("windows", "device", noPrinters.toLatin1(), buffer, 256);
- output = QString::fromLocal8Bit(buffer);
- if (output.isEmpty() || output == noPrinters) // no printers
- return;
- });
+ wchar_t buffer[256];
+ GetProfileString(L"windows", L"device",
+ reinterpret_cast<const wchar_t *>(noPrinters.utf16()),
+ buffer, 256);
+ QString output = QString::fromWCharArray(buffer);
+ if (output.isEmpty() || output == noPrinters) // no printers
+ return;
+
QStringList info = output.split(QLatin1Char(','));
if (info.size() > 0) {
if (name.isEmpty())
@@ -1030,13 +989,7 @@ void QWin32PrintEnginePrivate::initialize()
txop = QTransform::TxNone;
- bool ok;
- QT_WA( {
- ok = OpenPrinterW((LPWSTR)name.utf16(), (LPHANDLE)&hPrinter, 0);
- }, {
- ok = OpenPrinterA((LPSTR)name.toLatin1().data(), (LPHANDLE)&hPrinter, 0);
- } );
-
+ bool ok = OpenPrinter((LPWSTR)name.utf16(), (LPHANDLE)&hPrinter, 0);
if (!ok) {
qErrnoWarning("QWin32PrintEngine::initialize: OpenPrinter failed");
return;
@@ -1045,22 +998,10 @@ void QWin32PrintEnginePrivate::initialize()
// Fetch the PRINTER_INFO_2 with DEVMODE data containing the
// printer settings.
DWORD infoSize, numBytes;
- ok = true;
- QT_WA( {
- GetPrinterW(hPrinter, 2, NULL, 0, &infoSize);
- hMem = GlobalAlloc(GHND, infoSize);
- pInfo = GlobalLock(hMem);
- if (!GetPrinterW(hPrinter, 2, (LPBYTE)pInfo, infoSize, &numBytes)) {
- ok = false;
- }
- }, {
- GetPrinterA(hPrinter, 2, NULL, 0, &infoSize);
- hMem = GlobalAlloc(GHND, infoSize);
- pInfo = GlobalLock(hMem);
- if (!GetPrinterA(hPrinter, 2, (LPBYTE)pInfo, infoSize, &numBytes)) {
- ok = false;
- }
- });
+ GetPrinter(hPrinter, 2, NULL, 0, &infoSize);
+ hMem = GlobalAlloc(GHND, infoSize);
+ pInfo = (PRINTER_INFO_2*) GlobalLock(hMem);
+ ok = GetPrinter(hPrinter, 2, (LPBYTE)pInfo, infoSize, &numBytes);
if (!ok) {
qErrnoWarning("QWin32PrintEngine::initialize: GetPrinter failed");
@@ -1073,28 +1014,15 @@ void QWin32PrintEnginePrivate::initialize()
return;
}
- QT_WA( {
- devMode = pInfoW()->pDevMode;
- }, {
- devMode = pInfoA()->pDevMode;
- } );
-
- QT_WA( {
- hdc = CreateDC(reinterpret_cast<const wchar_t *>(program.utf16()),
- reinterpret_cast<const wchar_t *>(name.utf16()), 0, devModeW());
- }, {
- hdc = CreateDCA(program.toLatin1(), name.toLatin1(), 0, devModeA());
- } );
+ devMode = pInfo->pDevMode;
+ hdc = CreateDC(reinterpret_cast<const wchar_t *>(program.utf16()),
+ reinterpret_cast<const wchar_t *>(name.utf16()), 0, devMode);
Q_ASSERT(hPrinter);
Q_ASSERT(pInfo);
if (devMode) {
- QT_WA( {
- num_copies = devModeW()->dmCopies;
- }, {
- num_copies = devModeA()->dmCopies;
- } );
+ num_copies = devMode->dmCopies;
}
initHDC();
@@ -1212,28 +1140,18 @@ void QWin32PrintEnginePrivate::release()
QList<QVariant> QWin32PrintEnginePrivate::queryResolutions() const
{
// Read the supported resolutions of the printer.
- DWORD numRes;
- LONG *enumRes;
- DWORD errRes;
QList<QVariant> list;
- QT_WA({
- numRes = DeviceCapabilities(reinterpret_cast<const wchar_t *>(name.utf16()),
- reinterpret_cast<const wchar_t *>(port.utf16()),
- DC_ENUMRESOLUTIONS, 0, 0);
- if (numRes == (DWORD)-1)
- return list;
- enumRes = (LONG*)malloc(numRes * 2 * sizeof(LONG));
- errRes = DeviceCapabilities(reinterpret_cast<const wchar_t *>(name.utf16()),
- reinterpret_cast<const wchar_t *>(port.utf16()),
- DC_ENUMRESOLUTIONS, (LPWSTR)enumRes, 0);
- }, {
- numRes = DeviceCapabilitiesA(name.toLocal8Bit(), port.toLocal8Bit(), DC_ENUMRESOLUTIONS, 0, 0);
- if (numRes == (DWORD)-1)
- return list;
- enumRes = (LONG*)malloc(numRes * 2 * sizeof(LONG));
- errRes = DeviceCapabilitiesA(name.toLocal8Bit(), port.toLocal8Bit(), DC_ENUMRESOLUTIONS, (LPSTR)enumRes, 0);
- });
+ DWORD numRes = DeviceCapabilities(reinterpret_cast<const wchar_t *>(name.utf16()),
+ reinterpret_cast<const wchar_t *>(port.utf16()),
+ DC_ENUMRESOLUTIONS, 0, 0);
+ if (numRes == (DWORD)-1)
+ return list;
+
+ LONG *enumRes = (LONG*)malloc(numRes * 2 * sizeof(LONG));
+ DWORD errRes = DeviceCapabilities(reinterpret_cast<const wchar_t *>(name.utf16()),
+ reinterpret_cast<const wchar_t *>(port.utf16()),
+ DC_ENUMRESOLUTIONS, (LPWSTR)enumRes, 0);
if (errRes == (DWORD)-1) {
qErrnoWarning("QWin32PrintEngine::queryResolutions: DeviceCapabilities failed");
@@ -1241,7 +1159,8 @@ QList<QVariant> QWin32PrintEnginePrivate::queryResolutions() const
}
for (uint i=0; i<numRes; ++i)
- list.append(int(enumRes[i*2]));
+ list.append(int(enumRes[i * 2]));
+
return list;
}
@@ -1285,9 +1204,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
{
if (!d->devMode)
break;
- short collate = value.toBool() ? DMCOLLATE_TRUE : DMCOLLATE_FALSE;
- QT_WA( { d->devModeW()->dmCollate = collate; },
- { d->devModeA()->dmCollate = collate; } );
+ d->devMode->dmCollate = value.toBool() ? DMCOLLATE_TRUE : DMCOLLATE_FALSE;
d->doReinit();
}
break;
@@ -1296,8 +1213,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
{
if (!d->devMode)
break;
- int cm = value.toInt() == QPrinter::Color ? DMCOLOR_COLOR : DMCOLOR_MONOCHROME;
- QT_WA( { d->devModeW()->dmColor = cm; }, { d->devModeA()->dmColor = cm; } );
+ d->devMode->dmColor = (value.toInt() == QPrinter::Color) ? DMCOLOR_COLOR : DMCOLOR_MONOCHROME;
d->doReinit();
}
break;
@@ -1323,8 +1239,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
if (!d->devMode)
break;
d->num_copies = value.toInt();
- QT_WA( { d->devModeW()->dmCopies = d->num_copies; },
- { d->devModeA()->dmCopies = d->num_copies; });
+ d->devMode->dmCopies = d->num_copies;
d->doReinit();
break;
@@ -1333,14 +1248,8 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
if (!d->devMode)
break;
int orientation = value.toInt() == QPrinter::Landscape ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT;
- int old_orientation;
- QT_WA( {
- old_orientation = d->devModeW()->dmOrientation;
- d->devModeW()->dmOrientation = orientation;
- }, {
- old_orientation = d->devModeA()->dmOrientation;
- d->devModeA()->dmOrientation = orientation;
- } );
+ int old_orientation = d->devMode->dmOrientation;
+ d->devMode->dmOrientation = orientation;
if (d->has_custom_paper_size && old_orientation != orientation)
d->paper_size = QSizeF(d->paper_size.height(), d->paper_size.width());
d->doReinit();
@@ -1359,11 +1268,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
case PPK_PaperSize:
if (!d->devMode)
break;
- QT_WA( {
- d->devModeW()->dmPaperSize = mapPaperSizeDevmode(QPrinter::PaperSize(value.toInt()));
- }, {
- d->devModeA()->dmPaperSize = mapPaperSizeDevmode(QPrinter::PaperSize(value.toInt()));
- } );
+ d->devMode->dmPaperSize = mapPaperSizeDevmode(QPrinter::PaperSize(value.toInt()));
d->has_custom_paper_size = (QPrinter::PaperSize(value.toInt()) == QPrinter::Custom);
d->doReinit();
break;
@@ -1378,11 +1283,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
if (v.contains(value))
dmMapped = mapPaperSourceDevmode(QPrinter::PaperSource(value.toInt()));
- QT_WA( {
- d->devModeW()->dmDefaultSource = dmMapped;
- }, {
- d->devModeA()->dmDefaultSource = dmMapped;
- } );
+ d->devMode->dmDefaultSource = dmMapped;
d->doReinit();
}
break;
@@ -1416,11 +1317,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
if (!d->devMode)
break;
d->has_custom_paper_size = false;
- QT_WA( {
- d->devModeW()->dmPaperSize = value.toInt();
- }, {
- d->devModeA()->dmPaperSize = value.toInt();
- } );
+ d->devMode->dmPaperSize = value.toInt();
d->doReinit();
break;
@@ -1430,33 +1327,28 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
d->paper_size = value.toSizeF();
if (!d->devMode)
break;
- int orientation;
- QT_WA( {
- orientation = d->devModeW()->dmOrientation;
- DWORD needed = 0;
- DWORD returned = 0;
- if (!EnumForms(d->hPrinter, 1, 0, 0, &needed, &returned)) {
- BYTE *forms = (BYTE *) malloc(needed);
- if (EnumForms(d->hPrinter, 1, forms, needed, &needed, &returned)) {
- for (DWORD i=0; i< returned; ++i) {
- FORM_INFO_1 *formArray = reinterpret_cast<FORM_INFO_1 *>(forms);
- // the form sizes are specified in 1000th of a mm,
- // convert the size to Points
- QSizeF size((formArray[i].Size.cx * 72/25.4)/1000.0,
- (formArray[i].Size.cy * 72/25.4)/1000.0);
- if (qAbs(d->paper_size.width() - size.width()) <= 2
- && qAbs(d->paper_size.height() - size.height()) <= 2)
- {
- d->devModeW()->dmPaperSize = i+1;
- break;
- }
+ int orientation = d->devMode->dmOrientation;
+ DWORD needed = 0;
+ DWORD returned = 0;
+ if (!EnumForms(d->hPrinter, 1, 0, 0, &needed, &returned)) {
+ BYTE *forms = (BYTE *) malloc(needed);
+ if (EnumForms(d->hPrinter, 1, forms, needed, &needed, &returned)) {
+ for (DWORD i=0; i< returned; ++i) {
+ FORM_INFO_1 *formArray = reinterpret_cast<FORM_INFO_1 *>(forms);
+ // the form sizes are specified in 1000th of a mm,
+ // convert the size to Points
+ QSizeF size((formArray[i].Size.cx * 72/25.4)/1000.0,
+ (formArray[i].Size.cy * 72/25.4)/1000.0);
+ if (qAbs(d->paper_size.width() - size.width()) <= 2
+ && qAbs(d->paper_size.height() - size.height()) <= 2)
+ {
+ d->devMode->dmPaperSize = i + 1;
+ break;
}
}
- free(forms);
}
- }, {
- orientation = d->devModeA()->dmOrientation;
- } );
+ free(forms);
+ }
if (orientation != DMORIENT_PORTRAIT)
d->paper_size = QSizeF(d->paper_size.height(), d->paper_size.width());
break;
@@ -1496,13 +1388,7 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
if (!d->devMode) {
value = QPrinter::Color;
} else {
- int mode;
- QT_WA( {
- mode = d->devModeW()->dmColor;
- }, {
- mode = d->devModeA()->dmColor;
- } );
- value = mode == DMCOLOR_COLOR ? QPrinter::Color : QPrinter::GrayScale;
+ value = (d->devMode->dmColor == DMCOLOR_COLOR) ? QPrinter::Color : QPrinter::GrayScale;
}
}
break;
@@ -1524,9 +1410,7 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
if (!d->devMode) {
value = QPrinter::Portrait;
} else {
- int o;
- QT_WA( { o = d->devModeW()->dmOrientation; }, { o = d->devModeA()->dmOrientation; } );
- value = o == DMORIENT_LANDSCAPE ? QPrinter::Landscape : QPrinter::Portrait;
+ value = (d->devMode->dmOrientation == DMORIENT_LANDSCAPE) ? QPrinter::Landscape : QPrinter::Portrait;
}
}
break;
@@ -1560,11 +1444,7 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
if (!d->devMode) {
value = QPrinter::A4;
} else {
- QT_WA( {
- value = mapDevmodePaperSize(d->devModeW()->dmPaperSize);
- }, {
- value = mapDevmodePaperSize(d->devModeA()->dmPaperSize);
- } );
+ value = mapDevmodePaperSize(d->devMode->dmPaperSize);
}
}
break;
@@ -1583,11 +1463,7 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
if (!d->devMode) {
value = QPrinter::Auto;
} else {
- QT_WA( {
- value = mapDevmodePaperSource(d->devModeW()->dmDefaultSource);
- }, {
- value = mapDevmodePaperSource(d->devModeA()->dmDefaultSource);
- } );
+ value = mapDevmodePaperSource(d->devMode->dmDefaultSource);
}
break;
@@ -1608,38 +1484,21 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
if (!d->devMode) {
value = -1;
} else {
- QT_WA( {
- value = d->devModeW()->dmPaperSize;
- }, {
- value = d->devModeA()->dmPaperSize;
- } );
+ value = d->devMode->dmPaperSize;
}
break;
case PPK_PaperSources:
{
- int available, count;
- WORD *data;
-
- QT_WA({
- available = DeviceCapabilitiesW((const WCHAR *)d->name.utf16(), (const WCHAR *)d->port.utf16(), DC_BINS, 0,
- d->devModeW());
- }, {
- available = DeviceCapabilitiesA(d->name.toLatin1(), d->port.toLatin1(), DC_BINS, 0,
- d->devModeA());
- });
+ int available = DeviceCapabilities((const wchar_t *)d->name.utf16(),
+ (const wchar_t *)d->port.utf16(), DC_BINS, 0, d->devMode);
if (available <= 0)
break;
- data = (WORD *) malloc(available * sizeof(WORD));
- QT_WA({
- count = DeviceCapabilitiesW((const WCHAR *)d->name.utf16(), (const WCHAR *)d->port.utf16(), DC_BINS, (WCHAR *)data,
- d->devModeW());
- }, {
- count = DeviceCapabilitiesA(d->name.toLatin1(), d->port.toLatin1(), DC_BINS,
- (char *) data, d->devModeA());
- });
+ wchar_t *data = new wchar_t[available];
+ int count = DeviceCapabilities((const wchar_t *)d->name.utf16(),
+ (const wchar_t *)d->port.utf16(), DC_BINS, data, d->devMode);
QList<QVariant> out;
for (int i=0; i<count; ++i) {
@@ -1648,7 +1507,8 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
out << (int) src;
}
value = out;
- free(data);
+
+ delete [] data;
}
break;
@@ -1693,24 +1553,23 @@ void QWin32PrintEngine::releaseDC(HDC) const
HGLOBAL *QWin32PrintEnginePrivate::createDevNames()
{
- QT_WA( {
- int size = sizeof(DEVNAMES)
- + program.length() * 2 + 2
- + name.length() * 2 + 2
- + port.length() * 2 + 2;
- HGLOBAL *hGlobal = (HGLOBAL *) GlobalAlloc(GMEM_MOVEABLE, size);
- DEVNAMES *dn = (DEVNAMES*) GlobalLock(hGlobal);
+ int size = sizeof(DEVNAMES)
+ + program.length() * 2 + 2
+ + name.length() * 2 + 2
+ + port.length() * 2 + 2;
+ HGLOBAL *hGlobal = (HGLOBAL *) GlobalAlloc(GMEM_MOVEABLE, size);
+ DEVNAMES *dn = (DEVNAMES*) GlobalLock(hGlobal);
- dn->wDriverOffset = sizeof(DEVNAMES) / sizeof(TCHAR);
- dn->wDeviceOffset = dn->wDriverOffset + program.length() + 1;
- dn->wOutputOffset = dn->wDeviceOffset + name.length() + 1;
+ dn->wDriverOffset = sizeof(DEVNAMES) / sizeof(wchar_t);
+ dn->wDeviceOffset = dn->wDriverOffset + program.length() + 1;
+ dn->wOutputOffset = dn->wDeviceOffset + name.length() + 1;
- memcpy((ushort*)dn + dn->wDriverOffset, program.utf16(), program.length() * 2 + 2);
- memcpy((ushort*)dn + dn->wDeviceOffset, name.utf16(), name.length() * 2 + 2);
- memcpy((ushort*)dn + dn->wOutputOffset, port.utf16(), port.length() * 2 + 2);
- dn->wDefault = 0;
+ memcpy((ushort*)dn + dn->wDriverOffset, program.utf16(), program.length() * 2 + 2);
+ memcpy((ushort*)dn + dn->wDeviceOffset, name.utf16(), name.length() * 2 + 2);
+ memcpy((ushort*)dn + dn->wOutputOffset, port.utf16(), port.length() * 2 + 2);
+ dn->wDefault = 0;
- GlobalUnlock(hGlobal);
+ GlobalUnlock(hGlobal);
// printf("QPrintDialogWinPrivate::createDevNames()\n"
// " -> wDriverOffset: %d\n"
@@ -1721,89 +1580,46 @@ HGLOBAL *QWin32PrintEnginePrivate::createDevNames()
// dn->wOutputOffset);
// printf("QPrintDialogWinPrivate::createDevNames(): %s, %s, %s\n",
-// QString::fromUtf16((ushort*)(dn) + dn->wDriverOffset).latin1(),
-// QString::fromUtf16((ushort*)(dn) + dn->wDeviceOffset).latin1(),
-// QString::fromUtf16((ushort*)(dn) + dn->wOutputOffset).latin1());
-
- return hGlobal;
- }, {
- int size = sizeof(DEVNAMES)
- + program.length() + 2
- + name.length() + 2
- + port.length() + 2;
- HGLOBAL *hGlobal = (HGLOBAL *) GlobalAlloc(GMEM_MOVEABLE, size);
- DEVNAMES *dn = (DEVNAMES*) GlobalLock(hGlobal);
-
- dn->wDriverOffset = sizeof(DEVNAMES);
- dn->wDeviceOffset = dn->wDriverOffset + program.length() + 1;
- dn->wOutputOffset = dn->wDeviceOffset + name.length() + 1;
-
- memcpy((char*)dn + dn->wDriverOffset, program.toLatin1(), program.length() + 2);
- memcpy((char*)dn + dn->wDeviceOffset, name.toLatin1(), name.length() + 2);
- memcpy((char*)dn + dn->wOutputOffset, port.toLatin1(), port.length() + 2);
- dn->wDefault = 0;
-
- GlobalUnlock(hGlobal);
- return hGlobal;
- } );
+// QString::fromWCharArray((wchar_t*)(dn) + dn->wDriverOffset).latin1(),
+// QString::fromWCharArray((wchar_t*)(dn) + dn->wDeviceOffset).latin1(),
+// QString::fromWCharArray((wchar_t*)(dn) + dn->wOutputOffset).latin1());
+
+ return hGlobal;
}
void QWin32PrintEnginePrivate::readDevnames(HGLOBAL globalDevnames)
{
if (globalDevnames) {
- QT_WA( {
- DEVNAMES *dn = (DEVNAMES*) GlobalLock(globalDevnames);
- name = QString::fromUtf16((ushort*)(dn) + dn->wDeviceOffset);
- port = QString::fromUtf16((ushort*)(dn) + dn->wOutputOffset);
- program = QString::fromUtf16((ushort*)(dn) + dn->wDriverOffset);
- GlobalUnlock(globalDevnames);
- }, {
- DEVNAMES *dn = (DEVNAMES*) GlobalLock(globalDevnames);
- name = QString::fromLatin1((char*)(dn) + dn->wDeviceOffset);
- port = QString::fromLatin1((char*)(dn) + dn->wOutputOffset);
- program = QString::fromLatin1((char*)(dn) + dn->wDriverOffset);
- GlobalUnlock(globalDevnames);
- } );
+ DEVNAMES *dn = (DEVNAMES*) GlobalLock(globalDevnames);
+ name = QString::fromWCharArray((wchar_t*)(dn) + dn->wDeviceOffset);
+ port = QString::fromWCharArray((wchar_t*)(dn) + dn->wOutputOffset);
+ program = QString::fromWCharArray((wchar_t*)(dn) + dn->wDriverOffset);
+ GlobalUnlock(globalDevnames);
}
}
void QWin32PrintEnginePrivate::readDevmode(HGLOBAL globalDevmode)
{
if (globalDevmode) {
- QT_WA( {
- DEVMODE *dm = (DEVMODE*) GlobalLock(globalDevmode);
- release();
- globalDevMode = globalDevmode;
- devMode = dm;
- hdc = CreateDC(reinterpret_cast<const wchar_t *>(program.utf16()),
- reinterpret_cast<const wchar_t *>(name.utf16()), 0, dm);
-
- num_copies = devModeW()->dmCopies;
- if (!OpenPrinterW((LPWSTR)name.utf16(), (LPHANDLE)&hPrinter, 0))
- qWarning("QPrinter: OpenPrinter() failed after reading DEVMODE.");
- }, {
- DEVMODEA *dm = (DEVMODEA*) GlobalLock(globalDevmode);
- release();
- globalDevMode = globalDevmode;
- devMode = dm;
- hdc = CreateDCA(program.toLatin1(), name.toLatin1(), 0, dm);
-
- num_copies = devModeA()->dmCopies;
- if (!OpenPrinterA((LPSTR)name.toLatin1().data(), (LPHANDLE)&hPrinter, 0))
- qWarning("QPrinter: OpenPrinter() failed after reading DEVMODE.");
- } );
+ DEVMODE *dm = (DEVMODE*) GlobalLock(globalDevmode);
+ release();
+ globalDevMode = globalDevmode;
+ devMode = dm;
+ hdc = CreateDC(reinterpret_cast<const wchar_t *>(program.utf16()),
+ reinterpret_cast<const wchar_t *>(name.utf16()), 0, dm);
+
+ num_copies = devMode->dmCopies;
+ if (!OpenPrinter((wchar_t*)name.utf16(), &hPrinter, 0))
+ qWarning("QPrinter: OpenPrinter() failed after reading DEVMODE.");
}
if (hdc)
initHDC();
}
-static void draw_text_item_win(const QPointF &_pos, const QTextItemInt &ti, HDC hdc,
+static void draw_text_item_win(const QPointF &pos, const QTextItemInt &ti, HDC hdc,
bool convertToText, const QTransform &xform, const QPointF &topLeft)
{
-
- // Make sure we translate for systems that can't handle world transforms
- QPointF pos(QT_WA_INLINE(_pos, _pos + QPointF(xform.dx(), xform.dy())));
QFontEngine *fe = ti.fontEngine;
QPointF baseline_pos = xform.inverted().map(xform.map(pos) - topLeft);
@@ -1815,12 +1631,10 @@ static void draw_text_item_win(const QPointF &_pos, const QTextItemInt &ti, HDC
HFONT hfont;
bool ttf = false;
- bool useTextOutA = false;
if (winfe) {
hfont = winfe->hfont;
ttf = winfe->ttf;
- useTextOutA = winfe->useTextOutA;
} else {
hfont = (HFONT)GetStockObject(ANSI_VAR_FONT);
}
@@ -1830,153 +1644,115 @@ static void draw_text_item_win(const QPointF &_pos, const QTextItemInt &ti, HDC
wchar_t *convertedGlyphs = (wchar_t *)ti.chars;
QGlyphLayout glyphs = ti.glyphs;
- if (!(ti.flags & QTextItem::RightToLeft) && useTextOutA) {
- qreal x = pos.x();
- qreal y = pos.y();
-
- // hack to get symbol fonts working on Win95. See also QFontEngine constructor
- // can only happen if !ttf
- for(int i = 0; i < glyphs.numGlyphs; i++) {
- QString str(QChar(glyphs.glyphs[i]));
- QT_WA({
- TextOutW(hdc, qRound(x + glyphs.offsets[i].x.toReal()),
- qRound(y + glyphs.offsets[i].y.toReal()),
- (LPWSTR)str.utf16(), str.length());
- } , {
- QByteArray cstr = str.toLocal8Bit();
- TextOutA(hdc, qRound(x + glyphs.offsets[i].x.toReal()),
- qRound(y + glyphs.offsets[i].y.toReal()),
- cstr.data(), cstr.length());
- });
- x += glyphs.effectiveAdvance(i).toReal();
- }
- } else {
- bool fast = !has_kerning && !(ti.flags & QTextItem::RightToLeft);
- for(int i = 0; fast && i < glyphs.numGlyphs; i++) {
- if (glyphs.offsets[i].x != 0 || glyphs.offsets[i].y != 0 || glyphs.justifications[i].space_18d6 != 0
- || glyphs.attributes[i].dontPrint) {
- fast = false;
- break;
- }
+ bool fast = !has_kerning && !(ti.flags & QTextItem::RightToLeft);
+ for (int i = 0; fast && i < glyphs.numGlyphs; i++) {
+ if (glyphs.offsets[i].x != 0 || glyphs.offsets[i].y != 0 || glyphs.justifications[i].space_18d6 != 0
+ || glyphs.attributes[i].dontPrint) {
+ fast = false;
+ break;
}
+ }
#if !defined(Q_OS_WINCE)
- // Scale, rotate and translate here. This is only valid for systems > Windows Me.
- // We should never get here on Windows Me or lower if the transformation specifies
- // scaling or rotation.
- QT_WA({
- XFORM win_xform;
- win_xform.eM11 = xform.m11();
- win_xform.eM12 = xform.m12();
- win_xform.eM21 = xform.m21();
- win_xform.eM22 = xform.m22();
- win_xform.eDx = xform.dx();
- win_xform.eDy = xform.dy();
- SetGraphicsMode(hdc, GM_ADVANCED);
- SetWorldTransform(hdc, &win_xform);
- }, {
- // nothing
- });
+ // Scale, rotate and translate here.
+ XFORM win_xform;
+ win_xform.eM11 = xform.m11();
+ win_xform.eM12 = xform.m12();
+ win_xform.eM21 = xform.m21();
+ win_xform.eM22 = xform.m22();
+ win_xform.eDx = xform.dx();
+ win_xform.eDy = xform.dy();
+
+ SetGraphicsMode(hdc, GM_ADVANCED);
+ SetWorldTransform(hdc, &win_xform);
#endif
- if (fast) {
- // fast path
- QVarLengthArray<wchar_t> g(glyphs.numGlyphs);
- for (int i = 0; i < glyphs.numGlyphs; ++i)
- g[i] = glyphs.glyphs[i];
- ExtTextOutW(hdc,
- qRound(baseline_pos.x() + glyphs.offsets[0].x.toReal()),
- qRound(baseline_pos.y() + glyphs.offsets[0].y.toReal()),
- options, 0, convertToText ? convertedGlyphs : g.data(), glyphs.numGlyphs, 0);
- } else {
- QVarLengthArray<QFixedPoint> positions;
- QVarLengthArray<glyph_t> _glyphs;
-
- QTransform matrix = QTransform::fromTranslate(baseline_pos.x(), baseline_pos.y());
- ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags,
- _glyphs, positions);
- if (_glyphs.size() == 0) {
- SelectObject(hdc, old_font);
- return;
- }
-
- convertToText = convertToText && glyphs.numGlyphs == _glyphs.size();
-
- bool outputEntireItem = (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)
- && QSysInfo::WindowsVersion != QSysInfo::WV_NT
- && _glyphs.size() > 0;
+ if (fast) {
+ // fast path
+ QVarLengthArray<wchar_t> g(glyphs.numGlyphs);
+ for (int i = 0; i < glyphs.numGlyphs; ++i)
+ g[i] = glyphs.glyphs[i];
+ ExtTextOut(hdc,
+ qRound(baseline_pos.x() + glyphs.offsets[0].x.toReal()),
+ qRound(baseline_pos.y() + glyphs.offsets[0].y.toReal()),
+ options, 0, convertToText ? convertedGlyphs : g.data(), glyphs.numGlyphs, 0);
+ } else {
+ QVarLengthArray<QFixedPoint> positions;
+ QVarLengthArray<glyph_t> _glyphs;
+
+ QTransform matrix = QTransform::fromTranslate(baseline_pos.x(), baseline_pos.y());
+ ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags,
+ _glyphs, positions);
+ if (_glyphs.size() == 0) {
+ SelectObject(hdc, old_font);
+ return;
+ }
- if (outputEntireItem) {
- options |= ETO_PDY;
- QVarLengthArray<INT> glyphDistances(_glyphs.size() * 2);
- QVarLengthArray<wchar_t> g(_glyphs.size());
- for (int i=0; i<_glyphs.size() - 1; ++i) {
- glyphDistances[i * 2] = qRound(positions[i + 1].x) - qRound(positions[i].x);
- glyphDistances[i * 2 + 1] = qRound(positions[i + 1].y) - qRound(positions[i].y);
- g[i] = _glyphs[i];
- }
- glyphDistances[(_glyphs.size() - 1) * 2] = 0;
- glyphDistances[(_glyphs.size() - 1) * 2 + 1] = 0;
- g[_glyphs.size() - 1] = _glyphs[_glyphs.size() - 1];
- ExtTextOutW(hdc, qRound(positions[0].x), qRound(positions[0].y), options, 0,
- convertToText ? convertedGlyphs : g.data(), _glyphs.size(),
- glyphDistances.data());
- } else {
- int i = 0;
- while(i < _glyphs.size()) {
- wchar_t g = _glyphs[i];
-
- ExtTextOutW(hdc, qRound(positions[i].x),
- qRound(positions[i].y), options, 0,
- convertToText ? convertedGlyphs + i : &g, 1, 0);
- ++i;
- }
+ convertToText = convertToText && glyphs.numGlyphs == _glyphs.size();
+ bool outputEntireItem = _glyphs.size() > 0;
+
+ if (outputEntireItem) {
+ options |= ETO_PDY;
+ QVarLengthArray<INT> glyphDistances(_glyphs.size() * 2);
+ QVarLengthArray<wchar_t> g(_glyphs.size());
+ for (int i=0; i<_glyphs.size() - 1; ++i) {
+ glyphDistances[i * 2] = qRound(positions[i + 1].x) - qRound(positions[i].x);
+ glyphDistances[i * 2 + 1] = qRound(positions[i + 1].y) - qRound(positions[i].y);
+ g[i] = _glyphs[i];
+ }
+ glyphDistances[(_glyphs.size() - 1) * 2] = 0;
+ glyphDistances[(_glyphs.size() - 1) * 2 + 1] = 0;
+ g[_glyphs.size() - 1] = _glyphs[_glyphs.size() - 1];
+ ExtTextOut(hdc, qRound(positions[0].x), qRound(positions[0].y), options, 0,
+ convertToText ? convertedGlyphs : g.data(), _glyphs.size(),
+ glyphDistances.data());
+ } else {
+ int i = 0;
+ while(i < _glyphs.size()) {
+ wchar_t g = _glyphs[i];
+
+ ExtTextOut(hdc, qRound(positions[i].x),
+ qRound(positions[i].y), options, 0,
+ convertToText ? convertedGlyphs + i : &g, 1, 0);
+ ++i;
}
}
+ }
#if !defined(Q_OS_WINCE)
- QT_WA({
- XFORM win_xform;
- win_xform.eM11 = win_xform.eM22 = 1.0;
- win_xform.eM12 = win_xform.eM21 = win_xform.eDx = win_xform.eDy = 0.0;
- SetWorldTransform(hdc, &win_xform);
- }, {
- // nothing
- });
+ win_xform.eM11 = win_xform.eM22 = 1.0;
+ win_xform.eM12 = win_xform.eM21 = win_xform.eDx = win_xform.eDy = 0.0;
+ SetWorldTransform(hdc, &win_xform);
#endif
- }
+
SelectObject(hdc, old_font);
}
void QWin32PrintEnginePrivate::updateCustomPaperSize()
{
- QT_WA( {
- uint paperSize = devModeW()->dmPaperSize;
- if (paperSize > 0 && mapDevmodePaperSize(paperSize) == QPrinter::Custom) {
- has_custom_paper_size = true;
- DWORD needed = 0;
- DWORD returned = 0;
- if (!EnumForms(hPrinter, 1, 0, 0, &needed, &returned)) {
- BYTE *forms = (BYTE *) malloc(needed);
- if (EnumForms(hPrinter, 1, forms, needed, &needed, &returned)) {
- if (paperSize <= returned) {
- FORM_INFO_1 *formArray = (FORM_INFO_1 *) forms;
- int width = formArray[paperSize-1].Size.cx; // 1/1000 of a mm
- int height = formArray[paperSize-1].Size.cy; // 1/1000 of a mm
- paper_size = QSizeF((width*72/25.4)/1000.0, (height*72/25.4)/1000.0);
- } else {
- has_custom_paper_size = false;
- }
+ uint paperSize = devMode->dmPaperSize;
+ if (paperSize > 0 && mapDevmodePaperSize(paperSize) == QPrinter::Custom) {
+ has_custom_paper_size = true;
+ DWORD needed = 0;
+ DWORD returned = 0;
+ if (!EnumForms(hPrinter, 1, 0, 0, &needed, &returned)) {
+ BYTE *forms = (BYTE *) malloc(needed);
+ if (EnumForms(hPrinter, 1, forms, needed, &needed, &returned)) {
+ if (paperSize <= returned) {
+ FORM_INFO_1 *formArray = (FORM_INFO_1 *) forms;
+ int width = formArray[paperSize - 1].Size.cx; // 1/1000 of a mm
+ int height = formArray[paperSize - 1].Size.cy; // 1/1000 of a mm
+ paper_size = QSizeF((width * 72 /25.4) / 1000.0, (height * 72 / 25.4) / 1000.0);
+ } else {
+ has_custom_paper_size = false;
}
- free(forms);
}
- } else {
- has_custom_paper_size = false;
+ free(forms);
}
- }, {
- // Not supported under Win98
- } );
+ } else {
+ has_custom_paper_size = false;
+ }
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qprintengine_win_p.h b/src/gui/painting/qprintengine_win_p.h
index 9eb0b69..36a32e8 100644
--- a/src/gui/painting/qprintengine_win_p.h
+++ b/src/gui/painting/qprintengine_win_p.h
@@ -169,18 +169,8 @@ public:
void readDevmode(HGLOBAL globalDevmode);
void readDevnames(HGLOBAL globalDevnames);
- inline DEVMODEW *devModeW() const { return (DEVMODEW*) devMode; }
- inline DEVMODEA *devModeA() const { return (DEVMODEA*) devMode; }
-
- inline PRINTER_INFO_2W *pInfoW() { return (PRINTER_INFO_2W*) pInfo; };
- inline PRINTER_INFO_2A *pInfoA() { return (PRINTER_INFO_2A*) pInfo; };
-
inline bool resetDC() {
- QT_WA( {
- hdc = ResetDCW(hdc, devModeW());
- }, {
- hdc = ResetDCA(hdc, devModeA());
- } );
+ hdc = ResetDC(hdc, devMode);
return hdc != 0;
}
@@ -202,8 +192,8 @@ public:
HANDLE hPrinter;
HGLOBAL globalDevMode;
- void *devMode;
- void *pInfo;
+ DEVMODE *devMode;
+ PRINTER_INFO_2 *pInfo;
HGLOBAL hMem;
HDC hdc;
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp
index 8823b18..411b74d 100644
--- a/src/gui/painting/qprinter.cpp
+++ b/src/gui/painting/qprinter.cpp
@@ -793,7 +793,8 @@ QPrinter::OutputFormat QPrinter::outputFormat() const
-/*! \reimp */
+/*! \internal
+*/
int QPrinter::devType() const
{
return QInternal::Printer;
diff --git a/src/gui/painting/qprinterinfo_win.cpp b/src/gui/painting/qprinterinfo_win.cpp
index f0352e6..bea2e3a 100644
--- a/src/gui/painting/qprinterinfo_win.cpp
+++ b/src/gui/painting/qprinterinfo_win.cpp
@@ -43,7 +43,7 @@
#include <qstringlist.h>
-#include <windows.h>
+#include <qt_windows.h>
QT_BEGIN_NAMESPACE
@@ -79,45 +79,24 @@ QList<QPrinterInfo> QPrinterInfo::availablePrinters()
DWORD needed = 0;
DWORD returned = 0;
- QT_WA({
- if (!EnumPrintersW(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL,
- 4, 0, 0, &needed, &returned))
- {
- buffer = new BYTE[needed];
- if (!EnumPrintersW(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS , NULL,
- 4, buffer, needed, &needed, &returned))
- {
- delete [] buffer;
- return printers;
- }
- PPRINTER_INFO_4 infoList = reinterpret_cast<PPRINTER_INFO_4>(buffer);
- QPrinterInfo defPrn = defaultPrinter();
- for (uint i = 0; i < returned; ++i) {
- printers.append(QPrinterInfo(QString::fromUtf16(reinterpret_cast<const ushort*>(infoList[i].pPrinterName))));
- if (printers.at(i).printerName() == defPrn.printerName())
- printers[i].d_ptr->m_default = true;
- }
- delete [] buffer;
- }
- }, {
- // In Windows 98 networked printers are served through the local connection
- if (!EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 5, 0, 0, &needed, &returned)) {
- buffer = new BYTE[needed];
- if (!EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 5, buffer, needed, &needed, &returned)) {
- delete [] buffer;
- return printers;
- }
-
- PPRINTER_INFO_5 infoList = reinterpret_cast<PPRINTER_INFO_5>(buffer);
- QPrinterInfo defPrn = defaultPrinter();
- for (uint i = 0; i < returned; ++i) {
- printers.append(QPrinterInfo(QString::fromLocal8Bit(reinterpret_cast<const char*>(infoList[i].pPrinterName))));
- if (printers.at(i).printerName() == defPrn.printerName())
- printers[i].d_ptr->m_default = true;
- }
- delete [] buffer;
- }
- });
+ if ( !EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 4, 0, 0, &needed, &returned))
+ {
+ buffer = new BYTE[needed];
+ if (!EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS , NULL,
+ 4, buffer, needed, &needed, &returned))
+ {
+ delete [] buffer;
+ return printers;
+ }
+ PPRINTER_INFO_4 infoList = reinterpret_cast<PPRINTER_INFO_4>(buffer);
+ QPrinterInfo defPrn = defaultPrinter();
+ for (uint i = 0; i < returned; ++i) {
+ printers.append(QPrinterInfo(QString::fromWCharArray(infoList[i].pPrinterName)));
+ if (printers.at(i).printerName() == defPrn.printerName())
+ printers[i].d_ptr->m_default = true;
+ }
+ delete [] buffer;
+ }
return printers;
}
@@ -125,18 +104,9 @@ QList<QPrinterInfo> QPrinterInfo::availablePrinters()
QPrinterInfo QPrinterInfo::defaultPrinter()
{
QString noPrinters(QLatin1String("qt_no_printers"));
- QString output;
- QT_WA({
- ushort buffer[256];
- GetProfileStringW(L"windows", L"device",
- reinterpret_cast<const wchar_t *>(noPrinters.utf16()),
- reinterpret_cast<wchar_t *>(buffer), 256);
- output = QString::fromUtf16(buffer);
- }, {
- char buffer[256];
- GetProfileStringA("windows", "device", noPrinters.toLatin1(), buffer, 256);
- output = QString::fromLocal8Bit(buffer);
- });
+ wchar_t buffer[256];
+ GetProfileString(L"windows", L"device", (wchar_t*)noPrinters.utf16(), buffer, 256);
+ QString output = QString::fromWCharArray(buffer);
// Filter out the name of the printer, which should be everything
// before a comma.
@@ -222,26 +192,16 @@ bool QPrinterInfo::isDefault() const
QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
{
const Q_D(QPrinterInfo);
- DWORD size;
- WORD* papers;
QList<QPrinter::PaperSize> paperList;
- QT_WA({
- size = DeviceCapabilitiesW(reinterpret_cast<const WCHAR*>(d->m_name.utf16()),
- NULL, DC_PAPERS, NULL, NULL);
- if ((int)size == -1)
- return paperList;
- papers = new WORD[size];
- size = DeviceCapabilitiesW(reinterpret_cast<const WCHAR*>(d->m_name.utf16()),
- NULL, DC_PAPERS, reinterpret_cast<WCHAR*>(papers), NULL);
- }, {
- size = DeviceCapabilitiesA(d->m_name.toLatin1().data(), NULL, DC_PAPERS, NULL, NULL);
- if ((int)size == -1)
- return paperList;
- papers = new WORD[size];
- size = DeviceCapabilitiesA(d->m_name.toLatin1().data(), NULL, DC_PAPERS,
- reinterpret_cast<char*>(papers), NULL);
- });
+ DWORD size = DeviceCapabilities(reinterpret_cast<const wchar_t*>(d->m_name.utf16()),
+ NULL, DC_PAPERS, NULL, NULL);
+ if ((int)size == -1)
+ return paperList;
+
+ wchar_t *papers = new wchar_t[size];
+ size = DeviceCapabilities(reinterpret_cast<const wchar_t*>(d->m_name.utf16()),
+ NULL, DC_PAPERS, papers, NULL);
for (int c = 0; c < (int)size; ++c) {
paperList.append(mapDevmodePaperSize(papers[c]));
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 1b7dc1b..762e9e0 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -92,10 +92,6 @@ QT_BEGIN_NAMESPACE
Example of using complex regions:
\snippet doc/src/snippets/code/src_gui_painting_qregion.cpp 0
- \warning Due to window system limitations, the whole coordinate space for a
- region is limited to the points between -32767 and 32767 on Windows
- 95/98/ME. You can circumvent this limitation by using a QPainterPath.
-
\section1 Additional License Information
On Embedded Linux, Windows CE and X11 platforms, parts of this class rely on
diff --git a/src/gui/painting/qregion_win.cpp b/src/gui/painting/qregion_win.cpp
index 873439e..249b1a6 100644
--- a/src/gui/painting/qregion_win.cpp
+++ b/src/gui/painting/qregion_win.cpp
@@ -59,7 +59,7 @@ HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right,
{
const int tries = 10;
for (int i = 0; i < tries; ++i) {
- HRGN region;
+ HRGN region = 0;
switch (type) {
case QRegion::Rectangle:
region = CreateRectRgn(left, top, right, bottom);
diff --git a/src/gui/painting/qwindowsurface_qws.cpp b/src/gui/painting/qwindowsurface_qws.cpp
index 639bc92..d5a5c20 100644
--- a/src/gui/painting/qwindowsurface_qws.cpp
+++ b/src/gui/painting/qwindowsurface_qws.cpp
@@ -421,7 +421,8 @@ QWSWindowSurface::QWSWindowSurface(QWidget *widget)
QWSWindowSurface::~QWSWindowSurface()
{
#ifdef Q_BACKINGSTORE_SUBSURFACES
- winIdToSurfaceMap()->remove(winId());
+ if (d_ptr->winId)
+ winIdToSurfaceMap()->remove(d_ptr->winId);
#endif
delete d_ptr;
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index c163d79..22433dd 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -43,6 +43,7 @@
#include <qglobal.h> // for Q_WS_WIN define (non-PCH)
#ifdef Q_WS_WIN
+#include <qlibrary.h>
#include <qt_windows.h>
#endif
@@ -67,10 +68,6 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_WS_WIN
-PtrUpdateLayeredWindowIndirect ptrUpdateLayeredWindowIndirect;
-#endif
-
class QRasterWindowSurfacePrivate
{
public:
@@ -82,9 +79,6 @@ public:
uint translucentBackground : 1;
#endif
#endif
-#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
- uint canUseLayeredWindow : 1;
-#endif
uint inSetGeometry : 1;
};
@@ -98,10 +92,6 @@ QRasterWindowSurface::QRasterWindowSurface(QWidget *window)
&& window->x11Info().depth() == 32;
#endif
#endif
-#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
- d_ptr->canUseLayeredWindow = ptrUpdateLayeredWindowIndirect
- && (qt_widget_private(window)->data.window_flags & Qt::FramelessWindowHint);
-#endif
d_ptr->image = 0;
d_ptr->inSetGeometry = false;
setStaticContentsSupport(true);
@@ -130,8 +120,7 @@ void QRasterWindowSurface::beginPaint(const QRegion &rgn)
#if (defined(Q_WS_X11) && !defined(QT_NO_XRENDER)) || (defined(Q_WS_WIN) && !defined(Q_WS_WINCE))
if (!qt_widget_private(window())->isOpaque) {
#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
- if (d_ptr->image->image.format() != QImage::Format_ARGB32_Premultiplied
- && d_ptr->canUseLayeredWindow)
+ if (d_ptr->image->image.format() != QImage::Format_ARGB32_Premultiplied)
prepareBuffer(QImage::Format_ARGB32_Premultiplied, window());
#endif
QPainter p(&d_ptr->image->image);
@@ -160,7 +149,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
QRect br = rgn.boundingRect();
#ifndef Q_WS_WINCE
- if (!qt_widget_private(window())->isOpaque && d->canUseLayeredWindow) {
+ if (!qt_widget_private(window())->isOpaque) {
QRect r = window()->frameGeometry();
QPoint frameOffset = qt_widget_private(window())->frameStrut().topLeft();
QRect dirtyRect = br.translated(offset + frameOffset);
@@ -168,12 +157,11 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
SIZE size = {r.width(), r.height()};
POINT ptDst = {r.x(), r.y()};
POINT ptSrc = {0, 0};
- Q_BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * window()->windowOpacity()), Q_AC_SRC_ALPHA};
+ BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * window()->windowOpacity()), Q_AC_SRC_ALPHA};
RECT dirty = {dirtyRect.x(), dirtyRect.y(),
dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};
Q_UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, d->image->hdc, &ptSrc, 0, &blend, Q_ULW_ALPHA, &dirty};
-
- (*ptrUpdateLayeredWindowIndirect)(window()->internalWinId(), &info);
+ ptrUpdateLayeredWindowIndirect(window()->internalWinId(), &info);
} else
#endif
{
@@ -308,7 +296,7 @@ void QRasterWindowSurface::setGeometry(const QRect &rect)
#ifndef Q_WS_WIN
if (d_ptr->translucentBackground)
#else
- if (!qt_widget_private(window())->isOpaque && d->canUseLayeredWindow)
+ if (!qt_widget_private(window())->isOpaque)
#endif
prepareBuffer(QImage::Format_ARGB32_Premultiplied, window());
else
diff --git a/src/gui/painting/qwindowsurface_raster_p.h b/src/gui/painting/qwindowsurface_raster_p.h
index 897ed8d..996aaef 100644
--- a/src/gui/painting/qwindowsurface_raster_p.h
+++ b/src/gui/painting/qwindowsurface_raster_p.h
@@ -64,13 +64,6 @@ QT_BEGIN_NAMESPACE
#define Q_ULW_ALPHA 0x00000002 // copied from ULW_ALPHA in winuser.h
#define Q_AC_SRC_ALPHA 0x00000001 // copied from AC_SRC_ALPHA in winuser.h
-struct Q_BLENDFUNCTION {
- BYTE BlendOp;
- BYTE BlendFlags;
- BYTE SourceConstantAlpha;
- BYTE AlphaFormat;
-};
-
struct Q_UPDATELAYEREDWINDOWINFO {
DWORD cbSize;
HDC hdcDst;
@@ -79,12 +72,16 @@ struct Q_UPDATELAYEREDWINDOWINFO {
HDC hdcSrc;
const POINT *pptSrc;
COLORREF crKey;
- const Q_BLENDFUNCTION *pblend;
+ const BLENDFUNCTION *pblend;
DWORD dwFlags;
const RECT *prcDirty;
};
+typedef BOOL (WINAPI *PtrUpdateLayeredWindow)(HWND hwnd, HDC hdcDst, const POINT *pptDst,
+ const SIZE *psize, HDC hdcSrc, const POINT *pptSrc, COLORREF crKey,
+ const BLENDFUNCTION *pblend, DWORD dwflags);
typedef BOOL (WINAPI *PtrUpdateLayeredWindowIndirect)(HWND hwnd, const Q_UPDATELAYEREDWINDOWINFO *pULWInfo);
+extern PtrUpdateLayeredWindow ptrUpdateLayeredWindow;
extern PtrUpdateLayeredWindowIndirect ptrUpdateLayeredWindowIndirect;
#endif
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index f553d27..c2c7876 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -68,6 +68,7 @@
#include <QtGui/QStatusBar>
#include <QtGui/QMenuBar>
#include <QtGui/QToolBar>
+#include <QtGui/QToolButton>
#include <QtGui/QX11Info>
#include <X11/Xlib.h>
@@ -166,6 +167,7 @@ Ptr_gtk_file_filter_set_name QGtk::gtk_file_filter_set_name = 0;
Ptr_gtk_file_filter_add_pattern QGtk::gtk_file_filter_add_pattern = 0;
Ptr_gtk_file_chooser_add_filter QGtk::gtk_file_chooser_add_filter = 0;
Ptr_gtk_file_chooser_set_filter QGtk::gtk_file_chooser_set_filter = 0;
+Ptr_gtk_file_chooser_get_filter QGtk::gtk_file_chooser_get_filter = 0;
Ptr_gtk_file_chooser_dialog_new QGtk::gtk_file_chooser_dialog_new = 0;
Ptr_gtk_file_chooser_set_current_folder QGtk::gtk_file_chooser_set_current_folder = 0;
Ptr_gtk_file_chooser_get_filename QGtk::gtk_file_chooser_get_filename = 0;
@@ -220,6 +222,7 @@ static void resolveGtk()
QGtk::gtk_file_filter_add_pattern = (Ptr_gtk_file_filter_add_pattern)libgtk.resolve("gtk_file_filter_add_pattern");
QGtk::gtk_file_chooser_add_filter = (Ptr_gtk_file_chooser_add_filter)libgtk.resolve("gtk_file_chooser_add_filter");
QGtk::gtk_file_chooser_set_filter = (Ptr_gtk_file_chooser_set_filter)libgtk.resolve("gtk_file_chooser_set_filter");
+ QGtk::gtk_file_chooser_get_filter = (Ptr_gtk_file_chooser_get_filter)libgtk.resolve("gtk_file_chooser_get_filter");
QGtk::gtk_file_chooser_dialog_new = (Ptr_gtk_file_chooser_dialog_new)libgtk.resolve("gtk_file_chooser_dialog_new");
QGtk::gtk_file_chooser_set_current_folder = (Ptr_gtk_file_chooser_set_current_folder)libgtk.resolve("gtk_file_chooser_set_current_folder");
QGtk::gtk_file_chooser_get_filename = (Ptr_gtk_file_chooser_get_filename)libgtk.resolve("gtk_file_chooser_get_filename");
@@ -633,6 +636,20 @@ GtkStyle* QGtk::gtkStyle(const QString &path)
return 0;
}
+static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *pspec, gpointer user_data)
+{
+ GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
+ g_object_get(gtkToolBar, "toolbar-style", &toolbar_style, NULL);
+ QWidgetList widgets = QApplication::allWidgets();
+ for (int i = 0; i < widgets.size(); ++i) {
+ QWidget *widget = widgets.at(i);
+ if (qobject_cast<QToolButton*>(widget)) {
+ QEvent event(QEvent::StyleChange);
+ QApplication::sendEvent(widget, &event);
+ }
+ }
+}
+
void QGtk::initGtkWidgets()
{
// From gtkmain.c
@@ -679,6 +696,7 @@ void QGtk::initGtkWidgets()
add_widget(QGtk::gtk_spin_button_new((GtkAdjustment*)
(QGtk::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3));
GtkWidget *toolbar = QGtk::gtk_toolbar_new();
+ g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar);
QGtk::gtk_toolbar_insert((GtkToolbar*)toolbar, QGtk::gtk_separator_tool_item_new(), -1);
add_widget(toolbar);
init_gtk_treeview();
@@ -720,7 +738,8 @@ extern QStringList qt_make_filter_list(const QString &filter);
static void setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent,
const QString &dir, const QString &filter, QString *selectedFilter,
- QFileDialog::Options options, bool isSaveDialog = false)
+ QFileDialog::Options options, bool isSaveDialog = false,
+ QMap<GtkFileFilter *, QString> *filterMap = 0)
{
g_object_set(gtkFileChooser, "do-overwrite-confirmation", gboolean(!(options & QFileDialog::DontConfirmOverwrite)), NULL);
g_object_set(gtkFileChooser, "local_only", gboolean(true), NULL);
@@ -735,6 +754,8 @@ static void setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent,
foreach (const QString &fileExtension, extensions) {
QGtk::gtk_file_filter_add_pattern (gtkFilter, qPrintable(fileExtension));
}
+ if (filterMap)
+ filterMap->insert(gtkFilter, rawfilter);
QGtk::gtk_file_chooser_add_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
if (selectedFilter && (rawfilter == *selectedFilter))
QGtk::gtk_file_chooser_set_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
@@ -771,7 +792,7 @@ static void setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent,
QString QGtk::openFilename(QWidget *parent, const QString &caption, const QString &dir, const QString &filter,
QString *selectedFilter, QFileDialog::Options options)
{
-
+ QMap<GtkFileFilter *, QString> filterMap;
GtkWidget *gtkFileChooser = QGtk::gtk_file_chooser_dialog_new (qPrintable(caption),
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -779,7 +800,7 @@ QString QGtk::openFilename(QWidget *parent, const QString &caption, const QStrin
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
- setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options);
+ setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, false, &filterMap);
QWidget modal_widget;
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
@@ -791,6 +812,10 @@ QString QGtk::openFilename(QWidget *parent, const QString &caption, const QStrin
char *gtk_filename = QGtk::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
filename = QString::fromUtf8(gtk_filename);
g_free (gtk_filename);
+ if (selectedFilter) {
+ GtkFileFilter *gtkFilter = QGtk::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
+ *selectedFilter = filterMap.value(gtkFilter);
+ }
}
QApplicationPrivate::leaveModal(&modal_widget);
@@ -801,6 +826,7 @@ QString QGtk::openFilename(QWidget *parent, const QString &caption, const QStrin
QString QGtk::openDirectory(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
{
+ QMap<GtkFileFilter *, QString> filterMap;
GtkWidget *gtkFileChooser = QGtk::gtk_file_chooser_dialog_new (qPrintable(caption),
NULL,
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
@@ -830,6 +856,7 @@ QStringList QGtk::openFilenames(QWidget *parent, const QString &caption, const Q
QString *selectedFilter, QFileDialog::Options options)
{
QStringList filenames;
+ QMap<GtkFileFilter *, QString> filterMap;
GtkWidget *gtkFileChooser = QGtk::gtk_file_chooser_dialog_new (qPrintable(caption),
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -837,7 +864,7 @@ QStringList QGtk::openFilenames(QWidget *parent, const QString &caption, const Q
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
- setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options);
+ setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, false, &filterMap);
g_object_set(gtkFileChooser, "select-multiple", gboolean(true), NULL);
QWidget modal_widget;
@@ -850,6 +877,10 @@ QStringList QGtk::openFilenames(QWidget *parent, const QString &caption, const Q
for (GSList *iterator = gtk_file_names ; iterator; iterator = iterator->next)
filenames << QString::fromUtf8((const char*)iterator->data);
g_slist_free(gtk_file_names);
+ if (selectedFilter) {
+ GtkFileFilter *gtkFilter = QGtk::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
+ *selectedFilter = filterMap.value(gtkFilter);
+ }
}
QApplicationPrivate::leaveModal(&modal_widget);
@@ -860,13 +891,14 @@ QStringList QGtk::openFilenames(QWidget *parent, const QString &caption, const Q
QString QGtk::saveFilename(QWidget *parent, const QString &caption, const QString &dir, const QString &filter,
QString *selectedFilter, QFileDialog::Options options)
{
+ QMap<GtkFileFilter *, QString> filterMap;
GtkWidget *gtkFileChooser = QGtk::gtk_file_chooser_dialog_new (qPrintable(caption),
NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
- setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, true);
+ setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, true, &filterMap);
QWidget modal_widget;
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
@@ -878,6 +910,10 @@ QString QGtk::saveFilename(QWidget *parent, const QString &caption, const QStrin
char *gtk_filename = QGtk::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
filename = QString::fromUtf8(gtk_filename);
g_free (gtk_filename);
+ if (selectedFilter) {
+ GtkFileFilter *gtkFilter = QGtk::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
+ *selectedFilter = filterMap.value(gtkFilter);
+ }
}
QApplicationPrivate::leaveModal(&modal_widget);
diff --git a/src/gui/styles/gtksymbols_p.h b/src/gui/styles/gtksymbols_p.h
index b0195d2..18c6dc5 100644
--- a/src/gui/styles/gtksymbols_p.h
+++ b/src/gui/styles/gtksymbols_p.h
@@ -162,6 +162,7 @@ typedef void (*Ptr_gtk_file_filter_set_name)(GtkFileFilter *, const gchar *);
typedef void (*Ptr_gtk_file_filter_add_pattern)(GtkFileFilter *filter, const gchar *pattern);
typedef void (*Ptr_gtk_file_chooser_add_filter)(GtkFileChooser *chooser, GtkFileFilter *filter);
typedef void (*Ptr_gtk_file_chooser_set_filter)(GtkFileChooser *chooser, GtkFileFilter *filter);
+typedef GtkFileFilter* (*Ptr_gtk_file_chooser_get_filter)(GtkFileChooser *chooser);
typedef gchar* (*Ptr_gtk_file_chooser_get_filename)(GtkFileChooser *chooser);
typedef GSList* (*Ptr_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser);
typedef GtkWidget* (*Ptr_gtk_file_chooser_dialog_new)(const gchar *title,
@@ -302,6 +303,7 @@ public:
static Ptr_gtk_file_filter_add_pattern gtk_file_filter_add_pattern;
static Ptr_gtk_file_chooser_add_filter gtk_file_chooser_add_filter;
static Ptr_gtk_file_chooser_set_filter gtk_file_chooser_set_filter;
+ static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter;
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new;
static Ptr_gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder;
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename;
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index 3855ba7..01f19c6 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -2042,6 +2042,12 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
s = s.left(t);
}
QFont font = menuitem->font;
+ // font may not have any "hard" flags set. We override
+ // the point size so that when it is resolved against the device, this font will win.
+ // This is mainly to handle cases where someone sets the font on the window
+ // and then the combo inherits it and passes it onward. At that point the resolve mask
+ // is very, very weak. This makes it stonger.
+ font.setPointSizeF(menuItem->font.pointSizeF());
if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem)
font.setBold(true);
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 7b8b75e..308a0b8 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -84,6 +84,8 @@
#ifdef Q_WS_X11
# include <private/qt_x11_p.h>
+#elif defined(Q_WS_MAC)
+# include <private/qt_cocoa_helpers_mac_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -840,6 +842,11 @@ static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbut
#ifdef Q_WS_X11 // These functions are used to parse the X11 freedesktop icon spec
+static int kdeVersion()
+{
+ static int kdeVersion = qgetenv("KDE_SESSION_VERSION").toInt();
+ return kdeVersion;
+}
void QCommonStylePrivate::lookupIconTheme() const
{
@@ -858,8 +865,7 @@ void QCommonStylePrivate::lookupIconTheme() const
QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde"));
QDir dir(fileInfo.canonicalFilePath());
- int kdeVersion = qgetenv("KDE_SESSION_VERSION").toInt();
- QString kdeDefault = kdeVersion >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg");
+ QString kdeDefault = kdeVersion() >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg");
QString defaultTheme = fileInfo.exists() ? dir.dirName() : kdeDefault;
QSettings settings(QApplicationPrivate::kdeHome() +
QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat);
@@ -997,6 +1003,29 @@ QIcon QCommonStylePrivate::createIcon(const QString &name) const
icon.addPixmap(findIcon(32, name));
return icon;
}
+/*!internal
+
+Checks if you are running KDE and looks up the toolbar
+from the KDE configuration file
+
+*/
+int QCommonStylePrivate::lookupToolButtonStyle() const
+{
+ int result = Qt::ToolButtonIconOnly;
+ if (kdeVersion() >= 4) {
+ QSettings settings(QApplicationPrivate::kdeHome() +
+ QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat);
+ settings.beginGroup(QLatin1String("Toolbar style"));
+ QString toolbarStyle = settings.value(QLatin1String("ToolButtonStyle"), QLatin1String("TextBesideIcon")).toString();
+ if (toolbarStyle == QLatin1String("TextBesideIcon"))
+ result = Qt::ToolButtonTextBesideIcon;
+ else if (toolbarStyle == QLatin1String("TextOnly"))
+ result = Qt::ToolButtonTextOnly;
+ else if (toolbarStyle == QLatin1String("TextUnderIcon"))
+ result = Qt::ToolButtonTextUnderIcon;
+ }
+ return result;
+}
#endif //Q_WS_X11
@@ -1155,8 +1184,14 @@ void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewIt
}
}
-/* Set sizehint to false to layout the elements inside opt->rect. Set sizehint to true to ignore
- opt->rect and return rectangles in infinite space */
+/*! \internal
+ compute the position for the different component of an item (pixmap, text, checkbox)
+
+ Set sizehint to false to layout the elements inside opt->rect. Set sizehint to true to ignore
+ opt->rect and return rectangles in infinite space
+
+ Code duplicated in QItemDelegate::doLayout
+*/
void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItemV4 *opt, QRect *checkRect,
QRect *pixmapRect, QRect *textRect, bool sizehint) const
{
@@ -1177,8 +1212,10 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItemV4 *opt, QRe
int y = opt->rect.top();
int w, h;
- if (textRect->height() == 0 && !hasPixmap)
+ if (textRect->height() == 0 && (!hasPixmap || !sizehint)) {
+ //if there is no text, we still want to have a decent height for the item sizeHint and the editor size
textRect->setHeight(opt->fontMetrics.height());
+ }
QSize pm(0, 0);
if (hasPixmap) {
@@ -4841,7 +4878,14 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
ret = int(QStyleHelper::dpiScaled(13.));
break;
case PM_MessageBoxIconSize:
- ret = int(QStyleHelper::dpiScaled(32.));
+#ifdef Q_WS_MAC
+ if (QApplication::desktopSettingsAware()) {
+ ret = 64; // No DPI scaling, it's handled elsewhere.
+ } else
+#endif
+ {
+ ret = int(QStyleHelper::dpiScaled(32.));
+ }
break;
case PM_TextCursorWidth:
ret = 1;
@@ -5290,6 +5334,16 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
case SH_DockWidget_ButtonsHaveFrame:
ret = true;
break;
+ case SH_ToolButtonStyle:
+ ret = Qt::ToolButtonIconOnly;
+#ifdef Q_WS_X11
+ {
+ Q_D(const QCommonStyle);
+ static int buttonStyle = d->lookupToolButtonStyle();
+ return buttonStyle;
+ }
+#endif
+ break;
default:
ret = 0;
break;
@@ -5729,9 +5783,9 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
const QWidget *widget) const
{
QIcon icon;
-#ifdef Q_WS_X11
- Q_D(const QCommonStyle);
if (QApplication::desktopSettingsAware()) {
+#ifdef Q_WS_X11
+ Q_D(const QCommonStyle);
d->lookupIconTheme();
QPixmap pixmap;
switch (standardIcon) {
@@ -5750,6 +5804,7 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
case SP_MessageBoxWarning:
{
icon = d->createIcon(QLatin1String("dialog-warning.png"));
+ icon = d->createIcon(QLatin1String("dialog-warning.png"));
if (icon.isNull())
icon = d->createIcon(QLatin1String("messagebox_warning.png"));
break;
@@ -5975,8 +6030,101 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
}
if (!icon.isNull())
return icon;
+#elif defined(Q_WS_MAC)
+ OSType iconType = 0;
+ switch (standardIcon) {
+ case QStyle::SP_MessageBoxQuestion:
+ case QStyle::SP_MessageBoxInformation:
+ case QStyle::SP_MessageBoxWarning:
+ case QStyle::SP_MessageBoxCritical:
+ iconType = kGenericApplicationIcon;
+ break;
+ case SP_DesktopIcon:
+ iconType = kDesktopIcon;
+ break;
+ case SP_TrashIcon:
+ iconType = kTrashIcon;
+ break;
+ case SP_ComputerIcon:
+ iconType = kComputerIcon;
+ break;
+ case SP_DriveFDIcon:
+ iconType = kGenericFloppyIcon;
+ break;
+ case SP_DriveHDIcon:
+ iconType = kGenericHardDiskIcon;
+ break;
+ case SP_DriveCDIcon:
+ case SP_DriveDVDIcon:
+ iconType = kGenericCDROMIcon;
+ break;
+ case SP_DriveNetIcon:
+ iconType = kGenericNetworkIcon;
+ break;
+ case SP_DirOpenIcon:
+ iconType = kOpenFolderIcon;
+ break;
+ case SP_DirClosedIcon:
+ case SP_DirLinkIcon:
+ iconType = kGenericFolderIcon;
+ break;
+ case SP_FileLinkIcon:
+ case SP_FileIcon:
+ iconType = kGenericDocumentIcon;
+ break;
+ case SP_DirIcon: {
+ // A rather special case
+ QIcon closeIcon = QStyle::standardIcon(SP_DirClosedIcon, option, widget);
+ QIcon openIcon = QStyle::standardIcon(SP_DirOpenIcon, option, widget);
+ closeIcon.addPixmap(openIcon.pixmap(16, 16), QIcon::Normal, QIcon::On);
+ closeIcon.addPixmap(openIcon.pixmap(32, 32), QIcon::Normal, QIcon::On);
+ closeIcon.addPixmap(openIcon.pixmap(64, 64), QIcon::Normal, QIcon::On);
+ closeIcon.addPixmap(openIcon.pixmap(128, 128), QIcon::Normal, QIcon::On);
+ return closeIcon;
}
-#endif//Q_WS_X11
+ case SP_TitleBarNormalButton:
+ case SP_TitleBarCloseButton: {
+ QIcon titleBarIcon;
+ if (standardIcon == SP_TitleBarCloseButton) {
+ titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-16.png"));
+ titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On);
+ } else {
+ titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-16.png"));
+ titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On);
+ }
+ return titleBarIcon;
+ }
+ default:
+ break;
+ }
+ if (iconType != 0) {
+ QIcon retIcon;
+ IconRef icon;
+ IconRef overlayIcon = 0;
+ if (iconType != kGenericApplicationIcon) {
+ GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon);
+ } else {
+ FSRef fsRef;
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ GetProcessBundleLocation(&psn, &fsRef);
+ GetIconRefFromFileInfo(&fsRef, 0, 0, 0, 0, kIconServicesNormalUsageFlag, &icon, 0);
+ if (standardIcon == SP_MessageBoxCritical) {
+ overlayIcon = icon;
+ GetIconRef(kOnSystemDisk, kSystemIconsCreator, kAlertCautionIcon, &icon);
+ }
+ }
+ if (icon) {
+ qt_mac_constructQIconFromIconRef(icon, overlayIcon, &retIcon, standardIcon);
+ ReleaseIconRef(icon);
+ }
+ if (overlayIcon)
+ ReleaseIconRef(overlayIcon);
+ return retIcon;
+ }
+
+#endif //Q_WS_X11 || Q_WS_MAC
+ }
+
switch (standardIcon) {
#ifndef QT_NO_IMAGEFORMAT_PNG
diff --git a/src/gui/styles/qcommonstyle_p.h b/src/gui/styles/qcommonstyle_p.h
index 27ebc05..f2af5b2 100644
--- a/src/gui/styles/qcommonstyle_p.h
+++ b/src/gui/styles/qcommonstyle_p.h
@@ -126,6 +126,7 @@ public:
//icon detection on X11
#ifdef Q_WS_X11
void lookupIconTheme() const;
+ int lookupToolButtonStyle() const;
QIcon createIcon(const QString &) const;
QPixmap findIcon(int size, const QString &) const;
QPixmap findIconHelper(int size, const QString &, const QString &, QStringList &visited) const;
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 852d3fd..b6ef4c9 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -70,6 +70,7 @@
#include <qpixmapcache.h>
#undef signals // Collides with GTK stymbols
#include "qgtkpainter_p.h"
+#include "qstylehelper_p.h"
#include <private/qcleanlooksstyle_p.h>
@@ -208,17 +209,6 @@ static GdkColor fromQColor(const QColor &color)
return retval;
}
-// Note this is different from uniqueName as used in QGtkPainter
-static QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
-{
- QString tmp;
- const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
- tmp.sprintf("%s-%d-%d-%d-%lld-%dx%d", key.toLatin1().constData(), uint(option->state),
- option->direction, complexOption ? uint(complexOption->activeSubControls) : uint(0),
- option->palette.cacheKey(), size.width(), size.height());
- return tmp;
-}
-
/*!
\class QGtkStyle
\brief The QGtkStyle class provides a widget style rendered by GTK+
@@ -609,6 +599,26 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
break;
+ case SH_ToolButtonStyle:
+ {
+ if (QGtk::isKDE4Session())
+ return QCleanlooksStyle::styleHint(hint, option, widget, returnData);
+ GtkWidget *gtkToolbar = QGtk::gtkWidget(QLS("GtkToolbar"));
+ GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
+ g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL);
+ switch (toolbar_style) {
+ case GTK_TOOLBAR_TEXT:
+ return Qt::ToolButtonTextOnly;
+ case GTK_TOOLBAR_BOTH:
+ return Qt::ToolButtonTextUnderIcon;
+ case GTK_TOOLBAR_BOTH_HORIZ:
+ return Qt::ToolButtonTextBesideIcon;
+ case GTK_TOOLBAR_ICONS:
+ default:
+ return Qt::ToolButtonIconOnly;
+ }
+ }
+ break;
case SH_SpinControls_DisableOnBounds:
return int(true);
@@ -684,11 +694,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
const QString pmKey = QString(QLS("windowframe %0")).arg(option->state);
QPixmap pixmap;
- QPixmapCache::find(pmKey, pixmap);
QRect pmRect(QPoint(0,0), QSize(pmSize, pmSize));
// Only draw through style once
- if (pixmap.isNull()) {
+ if (!QPixmapCache::find(pmKey, pixmap)) {
pixmap = QPixmap(pmSize, pmSize);
pixmap.fill(Qt::transparent);
QPainter pmPainter(&pixmap);
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index b20db5b..2f93034 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -558,7 +558,6 @@ QT_END_INCLUDE_NAMESPACE
External functions
*****************************************************************************/
extern CGContextRef qt_mac_cg_context(const QPaintDevice *); //qpaintdevice_mac.cpp
-extern QPixmap qt_mac_convert_iconref(const IconRef, int, int); //qpixmap_mac.cpp
extern QRegion qt_mac_convert_mac_region(HIShapeRef); //qregion_mac.cpp
void qt_mac_dispose_rgn(RgnHandle r); //qregion_mac.cpp
extern QPaintDevice *qt_mac_safe_pdev; //qapplication_mac.cpp
@@ -1871,24 +1870,23 @@ QPixmap QMacStylePrivate::generateBackgroundPattern() const
Fills the given \a rect with the pattern stored in \a brush. As an optimization,
HIThemeSetFill us used directly if we are filling with the standard background.
*/
-void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint &offset, const QBrush &brush)
+void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QBrush &brush)
{
QPoint dummy;
const QPaintDevice *target = painter->device();
const QPaintDevice *redirected = QPainter::redirected(target, &dummy);
const bool usePainter = redirected && redirected != target;
- const QRegion translated = rgn.translated(offset);
if (!usePainter && qt_mac_backgroundPattern
&& qt_mac_backgroundPattern->cacheKey() == brush.texture().cacheKey()) {
- painter->setClipRegion(translated);
+ painter->setClipRegion(rgn);
CGContextRef cg = qt_mac_cg_context(target);
CGContextSaveGState(cg);
HIThemeSetFill(kThemeBrushDialogBackgroundActive, 0, cg, kHIThemeOrientationInverted);
- const QVector<QRect> &rects = translated.rects();
+ const QVector<QRect> &rects = rgn.rects();
for (int i = 0; i < rects.size(); ++i) {
const QRect rect(rects.at(i));
// Anchor the pattern to the top so it stays put when the window is resized.
@@ -1899,8 +1897,8 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint
CGContextRestoreGState(cg);
} else {
- const QRect rect(translated.boundingRect());
- painter->setClipRegion(translated);
+ const QRect rect(rgn.boundingRect());
+ painter->setClipRegion(rgn);
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
}
}
@@ -2304,9 +2302,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
case PM_ToolBarItemSpacing:
ret = 4;
break;
- case PM_MessageBoxIconSize:
- ret = 64;
- break;
case PM_SplitterWidth:
ret = qMax(7, QApplication::globalStrut().width());
break;
@@ -3362,6 +3357,9 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
}
proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pixmap);
break; }
+ default:
+ Q_ASSERT(false);
+ break;
}
if (needText) {
@@ -3991,8 +3989,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
const int xm = macItemFrame + maxpmw + macItemHMargin;
QFont myFont = mi->font;
- if (mi->state & QStyle::State_Mini)
- myFont.setPointSize(mi->font.pointSize());
+ // myFont may not have any "hard" flags set. We override
+ // the point size so that when it is resolved against the device, this font will win.
+ // This is mainly to handle cases where someone sets the font on the window
+ // and then the combo inherits it and passes it onward. At that point the resolve mask
+ // is very, very weak. This makes it stonger.
+ myFont.setPointSizeF(mi->font.pointSizeF());
p->setFont(myFont);
p->drawText(xpos, yPos, contentRect.width() - xm - tabwidth + 1,
contentRect.height(), text_flags ^ Qt::AlignRight, s);
@@ -5852,76 +5854,12 @@ bool QMacStyle::event(QEvent *e)
return false;
}
-void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon, QStyle::StandardPixmap standardIcon = QStyle::SP_CustomBase)
-{
- int size = 16;
- while (size <= 128) {
-
- const QString cacheKey = QLatin1String("qt_mac_constructQIconFromIconRef") + QString::number(standardIcon) + QString::number(size);
- QPixmap mainIcon;
- if (standardIcon >= QStyle::SP_CustomBase) {
- mainIcon = qt_mac_convert_iconref(icon, size, size);
- } else if (QPixmapCache::find(cacheKey, mainIcon) == false) {
- mainIcon = qt_mac_convert_iconref(icon, size, size);
- QPixmapCache::insert(cacheKey, mainIcon);
- }
-
- if (overlayIcon) {
- int littleSize = size / 2;
- QPixmap overlayPix = qt_mac_convert_iconref(overlayIcon, littleSize, littleSize);
- QPainter painter(&mainIcon);
- painter.drawPixmap(size - littleSize, size - littleSize, overlayPix);
- }
-
- retIcon->addPixmap(mainIcon);
- size += size; // 16 -> 32 -> 64 -> 128
- }
-}
-
QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt,
const QWidget *widget) const
{
- OSType iconType = 0;
switch (standardIcon) {
- case QStyle::SP_MessageBoxQuestion:
- case QStyle::SP_MessageBoxInformation:
- case QStyle::SP_MessageBoxWarning:
- case QStyle::SP_MessageBoxCritical:
- iconType = kGenericApplicationIcon;
- break;
- case SP_DesktopIcon:
- iconType = kDesktopIcon;
- break;
- case SP_TrashIcon:
- iconType = kTrashIcon;
- break;
- case SP_ComputerIcon:
- iconType = kComputerIcon;
- break;
- case SP_DriveFDIcon:
- iconType = kGenericFloppyIcon;
- break;
- case SP_DriveHDIcon:
- iconType = kGenericHardDiskIcon;
- break;
- case SP_DriveCDIcon:
- case SP_DriveDVDIcon:
- iconType = kGenericCDROMIcon;
- break;
- case SP_DriveNetIcon:
- iconType = kGenericNetworkIcon;
- break;
- case SP_DirOpenIcon:
- iconType = kOpenFolderIcon;
- break;
- case SP_DirClosedIcon:
- case SP_DirLinkIcon:
- iconType = kGenericFolderIcon;
- break;
- case SP_FileLinkIcon:
- case SP_FileIcon:
- iconType = kGenericDocumentIcon;
- break;
+ default:
+ return QWindowsStyle::standardIconImplementation(standardIcon, opt, widget);
case SP_ToolBarHorizontalExtensionButton:
case SP_ToolBarVerticalExtensionButton: {
QPixmap pixmap(qt_mac_toolbar_ext);
@@ -5935,58 +5873,8 @@ QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const Q
return pix2;
}
return pixmap;
- }
- break;
- case SP_DirIcon: {
- // A rather special case
- QIcon closeIcon = QStyle::standardIcon(SP_DirClosedIcon, opt, widget);
- QIcon openIcon = QStyle::standardIcon(SP_DirOpenIcon, opt, widget);
- closeIcon.addPixmap(openIcon.pixmap(16, 16), QIcon::Normal, QIcon::On);
- closeIcon.addPixmap(openIcon.pixmap(32, 32), QIcon::Normal, QIcon::On);
- closeIcon.addPixmap(openIcon.pixmap(64, 64), QIcon::Normal, QIcon::On);
- closeIcon.addPixmap(openIcon.pixmap(128, 128), QIcon::Normal, QIcon::On);
- return closeIcon;
- }
- case SP_TitleBarNormalButton:
- case SP_TitleBarCloseButton: {
- QIcon titleBarIcon;
- if (standardIcon == SP_TitleBarCloseButton) {
- titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-16.png"));
- titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On);
- } else {
- titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-16.png"));
- titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On);
- }
- return titleBarIcon;
- }
- default:
- break;
}
- if (iconType != 0) {
- QIcon retIcon;
- IconRef icon;
- IconRef overlayIcon = 0;
- if (iconType != kGenericApplicationIcon) {
- GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon);
- } else {
- FSRef fsRef;
- ProcessSerialNumber psn = { 0, kCurrentProcess };
- GetProcessBundleLocation(&psn, &fsRef);
- GetIconRefFromFileInfo(&fsRef, 0, 0, 0, 0, kIconServicesNormalUsageFlag, &icon, 0);
- if (standardIcon == SP_MessageBoxCritical) {
- overlayIcon = icon;
- GetIconRef(kOnSystemDisk, kSystemIconsCreator, kAlertCautionIcon, &icon);
- }
- }
- if (icon) {
- qt_mac_constructQIconFromIconRef(icon, overlayIcon, &retIcon, standardIcon);
- ReleaseIconRef(icon);
- }
- if (overlayIcon)
- ReleaseIconRef(overlayIcon);
- return retIcon;
}
- return QWindowsStyle::standardIconImplementation(standardIcon, opt, widget);
}
int QMacStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1,
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 12aa679..cd0bd0a 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -730,16 +730,6 @@ static QColor mergedColors(const QColor &colorA, const QColor &colorB, int facto
return tmp;
}
-static QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
-{
- QString tmp;
- const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
- tmp.sprintf("%s-%d-%d-%d-%lld-%dx%d", key.toLatin1().constData(), uint(option->state),
- option->direction, complexOption ? uint(complexOption->activeSubControls) : uint(0),
- option->palette.cacheKey(), size.width(), size.height());
- return tmp;
-}
-
static void qt_plastique_draw_gradient(QPainter *painter, const QRect &rect, const QColor &gradientStart,
const QColor &gradientStop)
{
@@ -1512,7 +1502,7 @@ void QPlastiqueStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
rect.adjust(2, 0, -2, 0);
}
#endif
- QString pixmapName = uniqueName(QLatin1String("toolbarhandle"), option, rect.size());
+ QString pixmapName = QStyleHelper::uniqueName(QLatin1String("toolbarhandle"), option, rect.size());
if (!QPixmapCache::find(pixmapName, cache)) {
cache = QPixmap(rect.size());
cache.fill(Qt::transparent);
@@ -2777,7 +2767,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// contents
painter->setPen(QPen());
- QString progressBarName = uniqueName(QLatin1String("progressBarContents"),
+ QString progressBarName = QStyleHelper::uniqueName(QLatin1String("progressBarContents"),
option, rect.size());
QPixmap cache;
if (!QPixmapCache::find(progressBarName, cache) && rect.height() > 7) {
@@ -2837,7 +2827,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// Draws the header in tables.
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
QPixmap cache;
- QString pixmapName = uniqueName(QLatin1String("headersection"), option, option->rect.size());
+ QString pixmapName = QStyleHelper::uniqueName(QLatin1String("headersection"), option, option->rect.size());
pixmapName += QString::number(- int(header->position));
pixmapName += QString::number(- int(header->orientation));
@@ -3084,7 +3074,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// Draws a menu bar item; File, Edit, Help etc..
if ((option->state & State_Selected)) {
QPixmap cache;
- QString pixmapName = uniqueName(QLatin1String("menubaritem"), option, option->rect.size());
+ QString pixmapName = QStyleHelper::uniqueName(QLatin1String("menubaritem"), option, option->rect.size());
if (!QPixmapCache::find(pixmapName, cache)) {
cache = QPixmap(option->rect.size());
cache.fill(Qt::white);
@@ -3447,7 +3437,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
bool reverse = scrollBar->direction == Qt::RightToLeft;
bool sunken = scrollBar->state & State_Sunken;
- QString addLinePixmapName = uniqueName(QLatin1String("scrollbar_addline"), option, option->rect.size());
+ QString addLinePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_addline"), option, option->rect.size());
QPixmap cache;
if (!QPixmapCache::find(addLinePixmapName, cache)) {
cache = QPixmap(option->rect.size());
@@ -3519,7 +3509,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
bool sunken = scrollBar->state & State_Sunken;
bool horizontal = scrollBar->orientation == Qt::Horizontal;
- QString groovePixmapName = uniqueName(QLatin1String("scrollbar_groove"), option, option->rect.size());
+ QString groovePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_groove"), option, option->rect.size());
if (sunken)
groovePixmapName += QLatin1String("-sunken");
if (element == CE_ScrollBarAddPage)
@@ -3578,7 +3568,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
button2.setRect(scrollBarSubLine.left(), scrollBarSubLine.bottom() - (scrollBarExtent - 1), scrollBarSubLine.width(), scrollBarExtent);
}
- QString subLinePixmapName = uniqueName(QLatin1String("scrollbar_subline"), option, button1.size());
+ QString subLinePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_subline"), option, button1.size());
QPixmap cache;
if (!QPixmapCache::find(subLinePixmapName, cache)) {
cache = QPixmap(button1.size());
@@ -3653,7 +3643,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// The slider
if (option->rect.isValid()) {
- QString sliderPixmapName = uniqueName(QLatin1String("scrollbar_slider"), option, option->rect.size());
+ QString sliderPixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_slider"), option, option->rect.size());
if (horizontal)
sliderPixmapName += QLatin1String("-horizontal");
@@ -3873,7 +3863,7 @@ void QPlastiqueStyle::drawComplexControl(ComplexControl control, const QStyleOpt
}
if ((option->subControls & SC_SliderHandle) && handle.isValid()) {
- QString handlePixmapName = uniqueName(QLatin1String("slider_handle"), option, handle.size());
+ QString handlePixmapName = QStyleHelper::uniqueName(QLatin1String("slider_handle"), option, handle.size());
if (ticksAbove && !ticksBelow)
handlePixmapName += QLatin1String("-flipped");
if ((option->activeSubControls & SC_SliderHandle) && (option->state & State_Sunken))
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 797886c..a5ab80e 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -526,8 +526,9 @@ void QStyle::drawItemText(QPainter *painter, const QRect &rect, int alignment, c
}
if (!enabled) {
if (styleHint(SH_DitherDisabledText)) {
- painter->drawText(rect, alignment, text);
- painter->fillRect(painter->boundingRect(rect, alignment, text), QBrush(painter->background().color(), Qt::Dense5Pattern));
+ QRect br;
+ painter->drawText(rect, alignment, text, &br);
+ painter->fillRect(br, QBrush(painter->background().color(), Qt::Dense5Pattern));
return;
} else if (styleHint(SH_EtchDisabledText)) {
QPen pen = painter->pen();
@@ -1865,6 +1866,8 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SH_DockWidget_ButtonsHaveFrame Determines if dockwidget buttons should have frames. Default is true.
+ \value SH_ToolButtonStyle Determines the default system style for tool buttons that uses Qt::ToolButtonFollowStyle.
+
\omitvalue SH_UnderlineAccelerator
\sa styleHint()
diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h
index d79c39c..f22bf55 100644
--- a/src/gui/styles/qstyle.h
+++ b/src/gui/styles/qstyle.h
@@ -730,7 +730,7 @@ public:
SH_ItemView_DrawDelegateFrame,
SH_TabBar_CloseButtonPosition,
SH_DockWidget_ButtonsHaveFrame,
-
+ SH_ToolButtonStyle,
// Add new style hint values here
#ifdef QT3_SUPPORT
diff --git a/src/gui/styles/qstyle_p.h b/src/gui/styles/qstyle_p.h
index 854874f..2d6ef22 100644
--- a/src/gui/styles/qstyle_p.h
+++ b/src/gui/styles/qstyle_p.h
@@ -43,6 +43,7 @@
#define QSTYLE_P_H
#include "private/qobject_p.h"
+#include "private/qstylehelper_p.h"
#include <QtGui/qstyle.h>
QT_BEGIN_NAMESPACE
@@ -78,7 +79,7 @@ public:
QPixmap internalPixmapCache; \
QImage imageCache; \
QPainter *p = painter; \
- QString unique = uniqueName((a), option, option->rect.size()); \
+ QString unique = QStyleHelper::uniqueName((a), option, option->rect.size()); \
int txType = painter->deviceTransform().type() | painter->worldTransform().type(); \
bool doPixmapCache = txType <= QTransform::TxTranslate; \
if (doPixmapCache && QPixmapCache::find(unique, internalPixmapCache)) { \
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index f9010e8..4877ec4 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -60,11 +60,10 @@ namespace QStyleHelper {
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
{
- QString tmp;
const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
- tmp.sprintf("%s-%d-%d-%lld-%dx%d-%d", key.toLatin1().constData(), uint(option->state),
- complexOption ? uint(complexOption->activeSubControls) : uint(0),
- option->palette.cacheKey(), size.width(), size.height(), option->direction);
+ QString tmp = QString::fromLatin1("%1-%2-%3-%4-%5-%6x%7").arg(key).arg(uint(option->state)).arg(option->direction)
+ .arg(complexOption ? uint(complexOption->activeSubControls) : uint(0))
+ .arg(option->palette.cacheKey()).arg(size.width()).arg(size.height());
#ifndef QT_NO_SPINBOX
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
tmp.append(QLatin1Char('-'));
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 01d8aad..2efa4a7 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4171,7 +4171,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
if (!rule.hasDrawable()) {
QWidget *container = containerWidget(w);
if (autoFillDisabledWidgets->contains(container)
- && (container == w || !renderRule(container, opt).hasDrawable())) {
+ && (container == w || !renderRule(container, opt).hasBackground())) {
//we do not have a background, but we disabled the autofillbackground anyway. so fill the background now.
// (this may happen if we have rules like :focus)
p->fillRect(opt->rect, opt->palette.brush(w->backgroundRole()));
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 997c2ce..4c66bbb 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -126,8 +126,6 @@ static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark
static const int windowsRightBorder = 15; // right border on windows
static const int windowsCheckMarkWidth = 12; // checkmarks width on windows
-static bool use2000style = true;
-
enum QSliderDirection { SlUp, SlDown, SlLeft, SlRight };
/*
@@ -269,9 +267,6 @@ bool QWindowsStyle::eventFilter(QObject *o, QEvent *e)
*/
QWindowsStyle::QWindowsStyle() : QCommonStyle(*new QWindowsStylePrivate)
{
-#if defined(Q_OS_WIN32)
- use2000style = QSysInfo::WindowsVersion != QSysInfo::WV_NT && QSysInfo::WindowsVersion != QSysInfo::WV_95;
-#endif
}
/*!
@@ -281,9 +276,6 @@ QWindowsStyle::QWindowsStyle() : QCommonStyle(*new QWindowsStylePrivate)
*/
QWindowsStyle::QWindowsStyle(QWindowsStylePrivate &dd) : QCommonStyle(dd)
{
-#if defined(Q_OS_WIN32)
- use2000style = QSysInfo::WindowsVersion != QSysInfo::WV_NT && QSysInfo::WindowsVersion != QSysInfo::WV_95;
-#endif
}
@@ -1069,6 +1061,8 @@ QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyl
}
}
break;
+ default:
+ break;
}
if (!desktopIcon.isNull()) {
return desktopIcon;
@@ -1137,12 +1131,7 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
#endif
break;
case SH_ItemView_ChangeHighlightOnFocus:
-#if defined(Q_WS_WIN)
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT)
- ret = 1;
- else
-#endif
- ret = 0;
+ ret = 1;
break;
case SH_ToolBox_SelectedPageTitleBold:
ret = 0;
@@ -1150,36 +1139,34 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
#if defined(Q_WS_WIN)
case SH_UnderlineShortcut:
+ {
ret = 1;
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95
- && QSysInfo::WindowsVersion != QSysInfo::WV_98
- && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- BOOL cues;
- SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &cues, 0);
- ret = int(cues);
- // Do nothing if we always paint underlines
- Q_D(const QWindowsStyle);
- if (!ret && widget && d) {
+ BOOL cues = false;
+ SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &cues, 0);
+ ret = int(cues);
+ // Do nothing if we always paint underlines
+ Q_D(const QWindowsStyle);
+ if (!ret && widget && d) {
#ifndef QT_NO_MENUBAR
- const QMenuBar *menuBar = qobject_cast<const QMenuBar *>(widget);
- if (!menuBar && qobject_cast<const QMenu *>(widget)) {
- QWidget *w = QApplication::activeWindow();
- if (w && w != widget)
- menuBar = qFindChild<QMenuBar *>(w);
- }
- // If we paint a menu bar draw underlines if is in the keyboardState
- if (menuBar) {
- if (menuBar->d_func()->keyboardState || d->altDown())
- ret = 1;
- // Otherwise draw underlines if the toplevel widget has seen an alt-press
- } else
-#endif // QT_NO_MENUBAR
- if (d->hasSeenAlt(widget)) {
+ const QMenuBar *menuBar = qobject_cast<const QMenuBar *>(widget);
+ if (!menuBar && qobject_cast<const QMenu *>(widget)) {
+ QWidget *w = QApplication::activeWindow();
+ if (w && w != widget)
+ menuBar = qFindChild<QMenuBar *>(w);
+ }
+ // If we paint a menu bar draw underlines if is in the keyboardState
+ if (menuBar) {
+ if (menuBar->d_func()->keyboardState || d->altDown())
ret = 1;
- }
+ // Otherwise draw underlines if the toplevel widget has seen an alt-press
+ } else
+#endif // QT_NO_MENUBAR
+ if (d->hasSeenAlt(widget)) {
+ ret = 1;
}
}
break;
+ }
#endif
#ifndef QT_NO_RUBBERBAND
case SH_RubberBand_Mask:
@@ -1317,7 +1304,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
if ((!(opt->state & State_Sunken ))
&& (!(opt->state & State_Enabled)
|| !(opt->state & State_MouseOver && opt->state & State_AutoRaise))
- && (opt->state & State_On) && use2000style) {
+ && (opt->state & State_On)) {
fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
stippled = true;
} else {
@@ -1390,11 +1377,8 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
QRect r = opt->rect;
int size = qMin(r.height(), r.width());
QPixmap pixmap;
- QString pixmapName;
- pixmapName.sprintf("%s-%s-%d-%d-%d-%lld",
- "$qt_ia", metaObject()->className(),
- uint(opt->state), pe,
- size, opt->palette.cacheKey());
+ QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-") + QLatin1String(metaObject()->className()), opt, QSize(size, size))
+ + QLatin1Char('-') + QString::number(pe);
if (!QPixmapCache::find(pixmapName, pixmap)) {
int border = size/5;
int sqsize = 2*(size/2);
@@ -1631,9 +1615,9 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
popupPal.setColor(QPalette::Light, frame->palette.background().color());
popupPal.setColor(QPalette::Midlight, frame->palette.light().color());
}
- if (use2000style && pe == PE_Frame && (frame->state & State_Raised))
+ if (pe == PE_Frame && (frame->state & State_Raised))
qDrawWinButton(p, frame->rect, popupPal, frame->state & State_Sunken);
- else if (use2000style && pe == PE_Frame && (frame->state & State_Sunken))
+ else if (pe == PE_Frame && (frame->state & State_Sunken))
{
popupPal.setColor(QPalette::Midlight, frame->palette.background().color());
qDrawWinPanel(p, frame->rect, popupPal, frame->state & State_Sunken);
@@ -1784,13 +1768,12 @@ case PE_FrameDockWidget:
break;
#endif // QT_NO_PROGRESSBAR
- case PE_FrameTabWidget:
- if (use2000style) {
- QRect rect = opt->rect;
- QPalette pal = opt->palette;
- qDrawWinButton(p, opt->rect, opt->palette, false, 0);
- break;
- }
+ case PE_FrameTabWidget: {
+ QRect rect = opt->rect;
+ QPalette pal = opt->palette;
+ qDrawWinButton(p, opt->rect, opt->palette, false, 0);
+ break;
+ }
default:
QCommonStyle::drawPrimitive(pe, opt, p, w);
}
@@ -2066,10 +2049,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setPen(light);
p->drawLine(x1, y1 + 2, x1, y2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
p->drawPoint(x1 + 1, y1 + 1);
- if (!use2000style) {
- p->setPen(midlight);
- p->drawLine(x1 + 1, y1 + 2, x1 + 1, y2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
- }
}
// Top
{
@@ -2077,10 +2056,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
int end = x2 - (nextSelected ? 0 : 2);
p->setPen(light);
p->drawLine(beg, y1, end, y1);
- if (!use2000style) {
- p->setPen(midlight);
- p->drawLine(beg, y1 + 1, end, y1 + 1);
- }
}
// Right
if (lastTab || selected || onlyOne || !nextSelected) {
@@ -2110,10 +2085,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setPen(light);
p->drawLine(x1, y2 - 2, x1, y1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
p->drawPoint(x1 + 1, y2 - 1);
- if (!use2000style) {
- p->setPen(midlight);
- p->drawLine(x1 + 1, y2 - 2, x1 + 1, y1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
- }
}
// Bottom
{
@@ -2152,10 +2123,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setPen(light);
p->drawLine(x1 + 2, y1, x2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1);
p->drawPoint(x1 + 1, y1 + 1);
- if (!use2000style) {
- p->setPen(midlight);
- p->drawLine(x1 + 2, y1 + 1, x2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1 + 1);
- }
}
// Left
{
@@ -2163,10 +2130,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
int end = y2 - (nextSelected ? 0 : 2);
p->setPen(light);
p->drawLine(x1, beg, x1, end);
- if (!use2000style) {
- p->setPen(midlight);
- p->drawLine(x1 + 1, beg, x1 + 1, end);
- }
}
// Bottom
if (lastTab || selected || onlyOne || !nextSelected) {
@@ -2198,11 +2161,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setPen(light);
p->drawLine(x2 - 2, y1, x1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1);
p->drawPoint(x2 - 1, y1 + 1);
- if (!use2000style) {
- p->setPen(midlight);
- p->drawLine(x2 - 3, y1 + 1, x1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1 + 1);
- p->drawPoint(x2 - 1, y1);
- }
}
// Right
{
@@ -2239,7 +2197,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
#ifndef QT_NO_SCROLLBAR
case CE_ScrollBarSubLine:
case CE_ScrollBarAddLine: {
- if (use2000style && (opt->state & State_Sunken)) {
+ if ((opt->state & State_Sunken)) {
p->setPen(opt->palette.dark().color());
p->setBrush(opt->palette.brush(QPalette::Button));
p->drawRect(opt->rect.adjusted(0, 0, -1, -1));
@@ -3027,8 +2985,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
if ((cmb->subControls & SC_ComboBoxFrame)) {
if (cmb->frame) {
QPalette shadePal = opt->palette;
- if (use2000style)
- shadePal.setColor(QPalette::Midlight, shadePal.button().color());
+ shadePal.setColor(QPalette::Midlight, shadePal.button().color());
qDrawWinPanel(p, opt->rect, shadePal, true, &editBrush);
}
else {
@@ -3104,8 +3061,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
QBrush editBrush = sb->palette.brush(QPalette::Base);
QRect r = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxFrame, widget);
QPalette shadePal = sb->palette;
- if (use2000style)
- shadePal.setColor(QPalette::Midlight, shadePal.button().color());
+ shadePal.setColor(QPalette::Midlight, shadePal.button().color());
qDrawWinPanel(p, r, shadePal, true, &editBrush);
}
@@ -3234,7 +3190,7 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
+ 2 * windowsItemFrame));
}
int maxpmw = mi->maxIconWidth;
- int tabSpacing = use2000style ? 20 :windowsTabSpacing;
+ int tabSpacing = 20;
if (mi->text.contains(QLatin1Char('\t')))
w += tabSpacing;
else if (mi->menuItemType == QStyleOptionMenuItem::SubMenu)
diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp
index 5f0f053..f3d0f04 100644
--- a/src/gui/styles/qwindowsvistastyle.cpp
+++ b/src/gui/styles/qwindowsvistastyle.cpp
@@ -196,17 +196,15 @@ void Animation::paint(QPainter *painter, const QStyleOption *option)
Q_UNUSED(painter);
}
-/*
-* ! \internal
-*
-* Helperfunction to paint the current transition state
-* between two animation frames.
-*
-* The result is a blended image consisting of
-* ((alpha)*_primaryImage) + ((1-alpha)*_secondaryImage)
-*
-*/
+/*! \internal
+ Helperfunction to paint the current transition state between two
+ animation frames.
+
+ The result is a blended image consisting of ((alpha)*_primaryImage)
+ + ((1-alpha)*_secondaryImage)
+
+*/
void Animation::drawBlendedImage(QPainter *painter, QRect rect, float alpha) {
if (_secondaryImage.isNull() || _primaryImage.isNull())
return;
@@ -248,14 +246,11 @@ void Animation::drawBlendedImage(QPainter *painter, QRect rect, float alpha) {
painter->drawImage(rect, _tempImage);
}
-/*
-* ! \internal
-*
-* Paints a transition state. The result will be a mix between the
-* initial and final state of the transition, depending on the
-* time difference between _startTime and current time.
+/*! \internal
+ Paints a transition state. The result will be a mix between the
+ initial and final state of the transition, depending on the time
+ difference between _startTime and current time.
*/
-
void Transition::paint(QPainter *painter, const QStyleOption *option)
{
float alpha = 1.0;
@@ -278,15 +273,11 @@ void Transition::paint(QPainter *painter, const QStyleOption *option)
drawBlendedImage(painter, option->rect, alpha);
}
-/*
-* ! \internal
-*
-* Paints a pulse. The result will be a mix between the
-* primary and secondary pulse images depending on the
-* time difference between _startTime and current time.
+/*! \internal
+ Paints a pulse. The result will be a mix between the primary and
+ secondary pulse images depending on the time difference between
+ _startTime and current time.
*/
-
-
void Pulse::paint(QPainter *painter, const QStyleOption *option)
{
float alpha = 1.0;
@@ -308,31 +299,37 @@ void Pulse::paint(QPainter *painter, const QStyleOption *option)
/*!
- \reimp
- *
- * Animations are used for some state transitions on specific widgets.
- *
- * Only one running animation can exist for a widget at any specific time.
- * Animations can be added through QWindowsVistaStylePrivate::startAnimation(Animation *)
- * and any existing animation on a widget can be retrieved with
- * QWindowsVistaStylePrivate::widgetAnimation(Widget *).
- *
- * Once an animation has been started, QWindowsVistaStylePrivate::timerEvent(QTimerEvent *)
- * will continuously call update() on the widget until it is stopped, meaning that drawPrimitive
- * will be called many times until the transition has completed. During this time, the result
- * will be retrieved by the Animation::paint(...) function and not by the style itself.
- *
- * To determine if a transition should occur, the style needs to know the previous state of the
- * widget as well as the current one. This is solved by updating dynamic properties on the widget
- * every time the function is called.
- *
- * Transitions interrupting existing transitions should always be smooth, so whenever a hover-transition
- * is started on a pulsating button, it uses the current frame of the pulse-animation as the
- * starting image for the hover transition.
- *
+ \internal
+
+ Animations are used for some state transitions on specific widgets.
+
+ Only one running animation can exist for a widget at any specific
+ time. Animations can be added through
+ QWindowsVistaStylePrivate::startAnimation(Animation *) and any
+ existing animation on a widget can be retrieved with
+ QWindowsVistaStylePrivate::widgetAnimation(Widget *).
+
+ Once an animation has been started,
+ QWindowsVistaStylePrivate::timerEvent(QTimerEvent *) will
+ continuously call update() on the widget until it is stopped,
+ meaning that drawPrimitive will be called many times until the
+ transition has completed. During this time, the result will be
+ retrieved by the Animation::paint(...) function and not by the style
+ itself.
+
+ To determine if a transition should occur, the style needs to know
+ the previous state of the widget as well as the current one. This is
+ solved by updating dynamic properties on the widget every time the
+ function is called.
+
+ Transitions interrupting existing transitions should always be
+ smooth, so whenever a hover-transition is started on a pulsating
+ button, it uses the current frame of the pulse-animation as the
+ starting image for the hover transition.
+
*/
void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
- QPainter *painter, const QWidget *widget) const
+ QPainter *painter, const QWidget *widget) const
{
QWindowsVistaStylePrivate *d = const_cast<QWindowsVistaStylePrivate*>(d_func());
@@ -738,7 +735,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
if (const QListView *listview = qobject_cast<const QListView *>(widget)) {
if (listview->viewMode() == QListView::IconMode)
newStyle = true;
- } else if (const QTreeView* treeview = qobject_cast<const QTreeView *>(widget)) {
+ } else if (qobject_cast<const QTreeView *>(widget)) {
newStyle = true;
}
if (newStyle && view && (vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option))) {
@@ -877,11 +874,9 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
/*!
-
- \reimp
+ \internal
see drawPrimitive for comments on the animation support
-
*/
void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption *option,
QPainter *painter, const QWidget *widget) const
@@ -1098,7 +1093,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
XPThemeData theme(widget, painter, QLatin1String("PROGRESS"), vertical ? PP_FILLVERT : PP_FILL);
theme.rect = option->rect;
- bool reverse = bar->direction == Qt::LeftToRight && inverted || bar->direction == Qt::RightToLeft && !inverted;
+ bool reverse = bar->direction == (Qt::LeftToRight && inverted) || (bar->direction == Qt::RightToLeft && !inverted);
QTime current = QTime::currentTime();
if (isIndeterminate) {
@@ -1276,7 +1271,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
int yoff = y-2 + h / 2;
QPoint p1 = QPoint(x + checkcol, yoff);
QPoint p2 = QPoint(x + w + 6 , yoff);
- int stateId = stateId = MBI_HOT;
+ stateId = MBI_HOT;
QRect subRect(p1.x(), p1.y(), p2.x() - p1.x(), 6);
subRect = QStyle::visualRect(option->direction, option->rect, subRect );
XPThemeData theme2(widget, painter, QLatin1String("MENU"), MENU_POPUPSEPARATOR, stateId, subRect);
@@ -1288,7 +1283,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
menuitem->rect.y(), checkcol - 6, menuitem->rect.height()));
if (act) {
- int stateId = stateId = MBI_HOT;
+ stateId = MBI_HOT;
XPThemeData theme2(widget, painter, QLatin1String("MENU"), MENU_POPUPITEM, stateId, option->rect);
d->drawBackground(theme2);
}
@@ -1408,7 +1403,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
break;
case CE_MenuBarEmptyArea:
{
- int stateId = MBI_NORMAL;
+ stateId = MBI_NORMAL;
if (!(state & State_Enabled))
stateId = MBI_DISABLED;
XPThemeData theme(widget, painter, QLatin1String("MENU"), MENU_BARBACKGROUND, stateId, option->rect);
@@ -1505,7 +1500,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
if (const QListView *listview = qobject_cast<const QListView *>(widget)) {
if (listview->viewMode() == QListView::IconMode)
newStyle = true;
- } else if (const QTreeView* treeview = qobject_cast<const QTreeView *>(widget)) {
+ } else if (qobject_cast<const QTreeView *>(widget)) {
newStyle = true;
}
if (newStyle && view && (vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option))) {
@@ -1541,7 +1536,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
}
/*!
- \reimp
+ \internal
see drawPrimitive for comments on the animation support
@@ -1927,7 +1922,7 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
}
/*!
- \reimp
+ \internal
*/
QSize QWindowsVistaStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
const QSize &size, const QWidget *widget) const
@@ -2004,7 +1999,7 @@ QSize QWindowsVistaStyle::sizeFromContents(ContentsType type, const QStyleOption
}
/*!
- \reimp
+ \internal
*/
QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const
{
@@ -2019,7 +2014,7 @@ QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption
MARGINS borderSize;
HTHEME theme = pOpenThemeData(widget ? QWindowsVistaStylePrivate::winId(widget) : 0, L"Button");
if (theme) {
- int stateId;
+ int stateId = PBS_NORMAL;
if (!(option->state & State_Enabled))
stateId = PBS_DISABLED;
else if (option->state & State_Sunken)
@@ -2028,8 +2023,6 @@ QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption
stateId = PBS_HOT;
else if (btn->features & QStyleOptionButton::DefaultButton)
stateId = PBS_DEFAULTED;
- else
- stateId = PBS_NORMAL;
int border = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget);
rect = option->rect.adjusted(border, border, -border, -border);
@@ -2102,7 +2095,7 @@ QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption
rect = QCommonStyle::subElementRect(SE_ProgressBarGroove, option, widget);
break;
case SE_ItemViewItemDecoration:
- if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option))
+ if (qstyleoption_cast<const QStyleOptionViewItemV4 *>(option))
rect.adjust(-2, 0, 2, 0);
break;
case SE_ItemViewItemFocusRect:
@@ -2175,7 +2168,7 @@ static bool buttonVisible(const QStyle::SubControl sc, const QStyleOptionTitleBa
}
-/*! \reimp */
+/*! \internal */
int QWindowsVistaStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget,
QStyleHintReturn *returnData) const
{
@@ -2209,7 +2202,7 @@ int QWindowsVistaStyle::styleHint(StyleHint hint, const QStyleOption *option, co
/*!
- \reimp
+ \internal
*/
QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option,
SubControl subControl, const QWidget *widget) const
@@ -2308,6 +2301,8 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
rect = visualRect(option->direction, option->rect, rect);
}
break;
+ default:
+ break;
}
}
break;
@@ -2318,7 +2313,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
}
/*!
- \reimp
+ \internal
*/
bool QWindowsVistaStyle::event(QEvent *e)
{
@@ -2341,7 +2336,7 @@ bool QWindowsVistaStyle::event(QEvent *e)
}
/*!
- \reimp
+ \internal
*/
QStyle::SubControl QWindowsVistaStyle::hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option,
const QPoint &pos, const QWidget *widget) const
@@ -2353,7 +2348,7 @@ QStyle::SubControl QWindowsVistaStyle::hitTestComplexControl(ComplexControl cont
}
/*!
- \reimp
+ \internal
*/
int QWindowsVistaStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
{
@@ -2378,7 +2373,7 @@ int QWindowsVistaStyle::pixelMetric(PixelMetric metric, const QStyleOption *opti
}
/*!
- \reimp
+ \internal
*/
QPalette QWindowsVistaStyle::standardPalette() const
{
@@ -2386,7 +2381,7 @@ QPalette QWindowsVistaStyle::standardPalette() const
}
/*!
- \reimp
+ \internal
*/
void QWindowsVistaStyle::polish(QApplication *app)
{
@@ -2394,7 +2389,7 @@ void QWindowsVistaStyle::polish(QApplication *app)
}
/*!
- \reimp
+ \internal
*/
void QWindowsVistaStyle::polish(QWidget *widget)
{
@@ -2448,7 +2443,7 @@ void QWindowsVistaStyle::polish(QWidget *widget)
}
/*!
- \reimp
+ \internal
*/
void QWindowsVistaStyle::unpolish(QWidget *widget)
{
@@ -2490,7 +2485,7 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
/*!
- \reimp
+ \internal
*/
void QWindowsVistaStyle::unpolish(QApplication *app)
{
@@ -2498,7 +2493,7 @@ void QWindowsVistaStyle::unpolish(QApplication *app)
}
/*!
- \reimp
+ \internal
*/
void QWindowsVistaStyle::polish(QPalette &pal)
{
@@ -2507,7 +2502,7 @@ void QWindowsVistaStyle::polish(QPalette &pal)
}
/*!
- \reimp
+ \internal
*/
QPixmap QWindowsVistaStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option,
const QWidget *widget) const
@@ -2576,9 +2571,7 @@ void QWindowsVistaStylePrivate::startAnimation(Animation *t)
bool QWindowsVistaStylePrivate::transitionsEnabled() const
{
BOOL animEnabled = false;
- if (QT_WA_INLINE(SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0),
- SystemParametersInfoA(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0)
- ))
+ if (SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0))
{
if (animEnabled)
return true;
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 322bfac..9560c4b 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -161,8 +161,7 @@ HTHEME XPThemeData::handle()
htheme = QWindowsXPStylePrivate::handleMap->operator[](name);
if (!htheme) {
- htheme = pOpenThemeData(QWindowsXPStylePrivate::winId(widget),
- (TCHAR*)name.utf16());
+ htheme = pOpenThemeData(QWindowsXPStylePrivate::winId(widget), (wchar_t*)name.utf16());
if (htheme) {
if (!QWindowsXPStylePrivate::handleMap)
QWindowsXPStylePrivate::handleMap = new QMap<QString, HTHEME>;
@@ -1203,7 +1202,8 @@ QRect QWindowsXPStyle::subElementRect(SubElement sr, const QStyleOption *option,
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
MARGINS borderSize;
if (widget) {
- HTHEME theme = pOpenThemeData(QWindowsXPStylePrivate::winId(widget), L"Button");
+ XPThemeData buttontheme(widget, 0, QLatin1String("Button"));
+ HTHEME theme = buttontheme.handle();
if (theme) {
int stateId;
if (!(option->state & State_Enabled))
@@ -1547,11 +1547,11 @@ case PE_Frame:
if (widget) {
bool useGradient = true;
const int maxlength = 256;
- WCHAR themeFileName[maxlength];
- WCHAR themeColor[maxlength];
+ wchar_t themeFileName[maxlength];
+ wchar_t themeColor[maxlength];
// Due to a a scaling issue with the XP Silver theme, tab gradients are not used with it
if (pGetCurrentThemeName(themeFileName, maxlength, themeColor, maxlength, NULL, 0) == S_OK) {
- WCHAR* offset;
+ wchar_t *offset = 0;
if ((offset = wcsrchr(themeFileName, QChar(QLatin1Char('\\')).unicode())) != NULL) {
offset++;
if (!lstrcmp(offset, L"Luna.msstyles") && !lstrcmp(offset, L"Metallic")) {
@@ -1919,8 +1919,8 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op
{
name = QLatin1String("BUTTON");
partId = BP_PUSHBUTTON;
- bool justFlat = (btn->features & QStyleOptionButton::Flat) && !(flags & (State_On|State_Sunken))
- || (btn->features & QStyleOptionButton::CommandLinkButton
+ bool justFlat = ((btn->features & QStyleOptionButton::Flat) && !(flags & (State_On|State_Sunken)))
+ || ((btn->features & QStyleOptionButton::CommandLinkButton)
&& !(flags & State_MouseOver)
&& !(btn->features & QStyleOptionButton::DefaultButton));
if (!(flags & State_Enabled) && !(btn->features & QStyleOptionButton::Flat))
@@ -3245,7 +3245,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
if (theme.isValid()) {
SIZE size;
pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size);
- res = (pm == PM_IndicatorWidth ? size.cx : res = size.cy);
+ res = (pm == PM_IndicatorWidth) ? size.cx : size.cy;
}
}
break;
@@ -3257,7 +3257,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
if (theme.isValid()) {
SIZE size;
pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size);
- res = (pm == PM_ExclusiveIndicatorWidth ? size.cx : res = size.cy);
+ res = (pm == PM_ExclusiveIndicatorWidth) ? size.cx : size.cy;
}
}
break;
@@ -3537,6 +3537,8 @@ QRect QWindowsXPStyle::subControlRect(ComplexControl cc, const QStyleOptionCompl
rect = QRect(frameWidth + hPad, controlTop + vPad, iconSize.width(), iconSize.height());
}
break;
+ default:
+ break;
}
}
break;
@@ -3563,6 +3565,9 @@ QRect QWindowsXPStyle::subControlRect(ComplexControl cc, const QStyleOptionCompl
case SC_ComboBoxListBoxPopup:
rect = cmb->rect;
break;
+
+ default:
+ break;
}
}
break;
@@ -3627,7 +3632,8 @@ QSize QWindowsXPStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt
case CT_LineEdit:
case CT_ComboBox:
{
- HTHEME theme = pOpenThemeData(QWindowsXPStylePrivate::winId(widget), L"Button");
+ XPThemeData buttontheme(widget, 0, QLatin1String("Button"));
+ HTHEME theme = buttontheme.handle();
MARGINS borderSize;
if (theme) {
int result = pGetThemeMargins(theme,
@@ -3803,6 +3809,8 @@ QPixmap QWindowsXPStyle::standardPixmap(StandardPixmap standardPixmap, const QSt
}
}
break;
+ default:
+ break;
}
return QWindowsStyle::standardPixmap(standardPixmap, option, widget);
}
@@ -3924,6 +3932,8 @@ QIcon QWindowsXPStyle::standardIconImplementation(StandardPixmap standardIcon,
}
break;
+ default:
+ break;
}
return QWindowsStyle::standardIconImplementation(standardIcon, option, widget);
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index 8d7540c..04df2aa 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -79,6 +79,7 @@ QT_BEGIN_NAMESPACE
\class QTextObjectInterface
\brief The QTextObjectInterface class allows drawing of
custom text objects in \l{QTextDocument}s.
+ \since 4.5
A text object describes the structure of one or more elements in a
text document; for instance, images imported from HTML are
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index ab69e5c..db5ed7c 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -199,6 +199,7 @@ static const QCssKnownValue values[NumKnownValues - 1] = {
{ "link", Value_Link },
{ "link-visited", Value_LinkVisited },
{ "lower-alpha", Value_LowerAlpha },
+ { "lower-roman", Value_LowerRoman },
{ "lowercase", Value_Lowercase },
{ "medium", Value_Medium },
{ "mid", Value_Mid },
@@ -230,6 +231,7 @@ static const QCssKnownValue values[NumKnownValues - 1] = {
{ "transparent", Value_Transparent },
{ "underline", Value_Underline },
{ "upper-alpha", Value_UpperAlpha },
+ { "upper-roman", Value_UpperRoman },
{ "uppercase", Value_Uppercase },
{ "wave", Value_Wave },
{ "window", Value_Window },
@@ -239,10 +241,10 @@ static const QCssKnownValue values[NumKnownValues - 1] = {
};
//Map id to strings as they appears in the 'values' array above
-static const short indexOfId[NumKnownValues] = { 0, 40, 47, 41, 48, 53, 34, 26, 68, 69, 25, 42, 5, 62, 46,
- 29, 57, 58, 27, 50, 60, 6, 10, 38, 55, 19, 13, 17, 18, 20, 21, 49, 24, 45, 65, 36, 3, 2, 39, 61, 16,
- 11, 56, 14, 32, 63, 54, 64, 33, 67, 8, 28, 37, 12, 35, 59, 7, 9, 4, 66, 52, 22, 23, 30, 31, 1, 15, 0,
- 51, 44, 43 };
+static const short indexOfId[NumKnownValues] = { 0, 41, 48, 42, 49, 54, 35, 26, 70, 71, 25, 43, 5, 63, 47,
+ 29, 58, 59, 27, 51, 61, 6, 10, 39, 56, 19, 13, 17, 18, 20, 21, 50, 24, 46, 67, 37, 3, 2, 40, 62, 16,
+ 11, 57, 14, 32, 64, 33, 65, 55, 66, 34, 69, 8, 28, 38, 12, 36, 60, 7, 9, 4, 68, 53, 22, 23, 30, 31,
+ 1, 15, 0, 52, 45, 44 };
QString Value::toString() const
{
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index 8056f4d..b07acd5 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -223,6 +223,8 @@ enum KnownValue {
Value_Decimal,
Value_LowerAlpha,
Value_UpperAlpha,
+ Value_LowerRoman,
+ Value_UpperRoman,
Value_SmallCaps,
Value_Uppercase,
Value_Lowercase,
diff --git a/src/gui/text/qfont_win.cpp b/src/gui/text/qfont_win.cpp
index 2c27c9b..2293973 100644
--- a/src/gui/text/qfont_win.cpp
+++ b/src/gui/text/qfont_win.cpp
@@ -39,11 +39,6 @@
**
****************************************************************************/
-// the miscrosoft platform SDK says that the Unicode versions of
-// TextOut and GetTextExtentsPoint32 are supported on all platforms, so we use them
-// exclusively to simplify code, save a lot of conversions into the local encoding
-// and have generally better unicode support :)
-
#include "qfont.h"
#include "qfont_p.h"
#include "qfontengine_p.h"
@@ -67,8 +62,7 @@ extern HDC shared_dc(); // common dc for all fonts
// ### maybe move to qapplication_win
QFont qt_LOGFONTtoQFont(LOGFONT& lf, bool /*scale*/)
{
- QString family = QT_WA_INLINE(QString::fromUtf16((ushort*)lf.lfFaceName),
- QString::fromLocal8Bit((char*)lf.lfFaceName));
+ QString family = QString::fromWCharArray(lf.lfFaceName);
QFont qf(family);
qf.setItalic(lf.lfItalic);
if (lf.lfWeight != FW_DONTCARE) {
diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp
index 2c359ba..d348e1b 100644
--- a/src/gui/text/qfontdatabase_qws.cpp
+++ b/src/gui/text/qfontdatabase_qws.cpp
@@ -55,6 +55,7 @@
#endif
#include "qfontengine_qpf_p.h"
#include "private/qfactoryloader_p.h"
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
#include "qabstractfontengine_qws.h"
#include "qabstractfontengine_p.h"
#include <qdatetime.h>
@@ -128,7 +129,7 @@ void QFontDatabasePrivate::addQPF2File(const QByteArray &file)
struct stat st;
if (stat(file.constData(), &st))
return;
- int f = ::open(file, O_RDONLY, 0);
+ int f = QT_OPEN(file, O_RDONLY, 0);
if (f < 0)
return;
const uchar *data = (const uchar *)mmap(0, st.st_size, PROT_READ, MAP_SHARED, f, 0);
@@ -176,7 +177,7 @@ void QFontDatabasePrivate::addQPF2File(const QByteArray &file)
#endif
}
#ifndef QT_FONTS_ARE_RESOURCES
- ::close(f);
+ QT_CLOSE(f);
#endif
}
#endif
diff --git a/src/gui/text/qfontdatabase_win.cpp b/src/gui/text/qfontdatabase_win.cpp
index 2c0223b..974b955 100644
--- a/src/gui/text/qfontdatabase_win.cpp
+++ b/src/gui/text/qfontdatabase_win.cpp
@@ -195,21 +195,12 @@ static QString getEnglishName(const QString &familyName)
QString i18n_name;
HDC hdc = GetDC( 0 );
- HFONT hfont;
- QT_WA( {
- LOGFONTW lf;
- memset( &lf, 0, sizeof( LOGFONTW ) );
- memcpy( lf.lfFaceName, familyName.utf16(), qMin(LF_FACESIZE, familyName.length())*sizeof(QChar) );
- lf.lfCharSet = DEFAULT_CHARSET;
- hfont = CreateFontIndirectW( &lf );
- }, {
- LOGFONTA lf;
- memset( &lf, 0, sizeof( LOGFONTA ) );
- QByteArray lfam = familyName.toLocal8Bit();
- memcpy( lf.lfFaceName, lfam, qMin(LF_FACESIZE, lfam.size()) );
- lf.lfCharSet = DEFAULT_CHARSET;
- hfont = CreateFontIndirectA( &lf );
- } );
+ LOGFONT lf;
+ memset(&lf, 0, sizeof(LOGFONT));
+ memcpy(lf.lfFaceName, familyName.utf16(), qMin(LF_FACESIZE, familyName.length()) * sizeof(wchar_t));
+ lf.lfCharSet = DEFAULT_CHARSET;
+ HFONT hfont = CreateFontIndirect(&lf);
+
if(!hfont) {
ReleaseDC(0, hdc);
return QString();
@@ -245,32 +236,6 @@ error:
return i18n_name;
}
-static void getFontSignature(const QString &familyName,
- NEWTEXTMETRICEX *textmetric,
- FONTSIGNATURE *signature)
-{
- QT_WA({
- Q_UNUSED(familyName);
- *signature = textmetric->ntmFontSig;
- }, {
- // the textmetric structure we get from EnumFontFamiliesEx on Win9x has
- // a FONTSIGNATURE, but that one is uninitialized and doesn't work. Have to go
- // the hard way and load the font to find out.
- HDC hdc = GetDC(0);
- LOGFONTA lf;
- memset(&lf, 0, sizeof(LOGFONTA));
- QByteArray lfam = familyName.toLocal8Bit();
- memcpy(lf.lfFaceName, lfam.data(), qMin(LF_FACESIZE, lfam.length()));
- lf.lfCharSet = DEFAULT_CHARSET;
- HFONT hfont = CreateFontIndirectA(&lf);
- HGDIOBJ oldobj = SelectObject(hdc, hfont);
- GetTextCharsetInfo(hdc, signature, 0);
- SelectObject(hdc, oldobj);
- DeleteObject(hfont);
- ReleaseDC(0, hdc);
- });
-}
-
static
void addFontToDatabase(QString familyName, const QString &scriptName,
TEXTMETRIC *textmetric,
@@ -288,26 +253,17 @@ void addFontToDatabase(QString familyName, const QString &scriptName,
bool scalable;
int size;
-// QString escript = QString::fromUtf16((ushort *)f->elfScript);
+// QString escript = QString::fromWCharArray(f->elfScript);
// qDebug("script=%s", escript.latin1());
- QT_WA({
- NEWTEXTMETRIC *tm = (NEWTEXTMETRIC *)textmetric;
- fixed = !(tm->tmPitchAndFamily & TMPF_FIXED_PITCH);
- ttf = (tm->tmPitchAndFamily & TMPF_TRUETYPE);
- scalable = tm->tmPitchAndFamily & (TMPF_VECTOR|TMPF_TRUETYPE);
- size = scalable ? SMOOTH_SCALABLE : tm->tmHeight;
- italic = tm->tmItalic;
- weight = tm->tmWeight;
- } , {
- NEWTEXTMETRICA *tm = (NEWTEXTMETRICA *)textmetric;
- fixed = !(tm->tmPitchAndFamily & TMPF_FIXED_PITCH);
- ttf = (tm->tmPitchAndFamily & TMPF_TRUETYPE);
- scalable = tm->tmPitchAndFamily & (TMPF_VECTOR|TMPF_TRUETYPE);
- size = scalable ? SMOOTH_SCALABLE : tm->tmHeight;
- italic = tm->tmItalic;
- weight = tm->tmWeight;
- });
+ NEWTEXTMETRIC *tm = (NEWTEXTMETRIC *)textmetric;
+ fixed = !(tm->tmPitchAndFamily & TMPF_FIXED_PITCH);
+ ttf = (tm->tmPitchAndFamily & TMPF_TRUETYPE);
+ scalable = tm->tmPitchAndFamily & (TMPF_VECTOR|TMPF_TRUETYPE);
+ size = scalable ? SMOOTH_SCALABLE : tm->tmHeight;
+ italic = tm->tmItalic;
+ weight = tm->tmWeight;
+
// the "@family" fonts are just the same as "family". Ignore them.
if (familyName[0] != QLatin1Char('@') && !familyName.startsWith(QLatin1String("WST_"))) {
QtFontStyle::Key styleKey;
@@ -420,18 +376,10 @@ static
int CALLBACK
storeFont(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *textmetric, int type, LPARAM /*p*/)
{
- QString familyName;
- QT_WA({
- familyName = QString::fromUtf16((ushort*)f->elfLogFont.lfFaceName);
- },{
- ENUMLOGFONTEXA *fa = (ENUMLOGFONTEXA *)f;
- familyName = QString::fromLocal8Bit(fa->elfLogFont.lfFaceName);
- });
- QString script = QT_WA_INLINE(QString::fromUtf16((const ushort *)f->elfScript),
- QString::fromLocal8Bit((const char *)((ENUMLOGFONTEXA *)f)->elfScript));
-
- FONTSIGNATURE signature;
- getFontSignature(familyName, textmetric, &signature);
+ QString familyName = QString::fromWCharArray(f->elfLogFont.lfFaceName);
+ QString script = QString::fromWCharArray(f->elfScript);
+
+ FONTSIGNATURE signature = textmetric->ntmFontSig;
// NEWTEXTMETRICEX is a NEWTEXTMETRIC, which according to the documentation is
// identical to a TEXTMETRIC except for the last four members, which we don't use
@@ -459,33 +407,17 @@ void populate_database(const QString& fam)
HDC dummy = GetDC(0);
- QT_WA({
- LOGFONT lf;
- lf.lfCharSet = DEFAULT_CHARSET;
- if (fam.isNull()) {
- lf.lfFaceName[0] = 0;
- } else {
- memcpy(lf.lfFaceName, fam.utf16(), sizeof(TCHAR)*qMin(fam.length()+1,32)); // 32 = Windows hard-coded
- }
- lf.lfPitchAndFamily = 0;
-
- EnumFontFamiliesEx(dummy, &lf,
- (FONTENUMPROC)storeFont, (LPARAM)privateDb(), 0);
- } , {
- LOGFONTA lf;
- lf.lfCharSet = DEFAULT_CHARSET;
- if (fam.isNull()) {
- lf.lfFaceName[0] = 0;
- } else {
- QByteArray lname = fam.toLocal8Bit();
- memcpy(lf.lfFaceName,lname.data(),
- qMin(lname.length()+1,32)); // 32 = Windows hard-coded
- }
- lf.lfPitchAndFamily = 0;
+ LOGFONT lf;
+ lf.lfCharSet = DEFAULT_CHARSET;
+ if (fam.isNull()) {
+ lf.lfFaceName[0] = 0;
+ } else {
+ memcpy(lf.lfFaceName, fam.utf16(), sizeof(wchar_t) * qMin(fam.length() + 1, 32)); // 32 = Windows hard-coded
+ }
+ lf.lfPitchAndFamily = 0;
- EnumFontFamiliesExA(dummy, &lf,
- (FONTENUMPROCA)storeFont, (LPARAM)privateDb(), 0);
- });
+ EnumFontFamiliesEx(dummy, &lf,
+ (FONTENUMPROC)storeFont, (LPARAM)privateDb(), 0);
ReleaseDC(0, dummy);
@@ -496,21 +428,11 @@ void populate_database(const QString& fam)
for (int j = 0; j < fnt.families.count(); ++j) {
const QString familyName = fnt.families.at(j);
HDC hdc = GetDC(0);
- HFONT hfont;
- QT_WA({
- LOGFONTW lf;
- memset(&lf, 0, sizeof(LOGFONTW));
- memcpy(lf.lfFaceName, familyName.utf16(), qMin(LF_FACESIZE, familyName.size()));
- lf.lfCharSet = DEFAULT_CHARSET;
- hfont = CreateFontIndirectW(&lf);
- } , {
- LOGFONTA lf;
- memset(&lf, 0, sizeof(LOGFONTA));
- QByteArray lfam = familyName.toLocal8Bit();
- memcpy(lf.lfFaceName, lfam.data(), qMin(LF_FACESIZE, lfam.length()));
- lf.lfCharSet = DEFAULT_CHARSET;
- hfont = CreateFontIndirectA(&lf);
- });
+ LOGFONT lf;
+ memset(&lf, 0, sizeof(LOGFONT));
+ memcpy(lf.lfFaceName, familyName.utf16(), sizeof(wchar_t) * qMin(LF_FACESIZE, familyName.size()));
+ lf.lfCharSet = DEFAULT_CHARSET;
+ HFONT hfont = CreateFontIndirect(&lf);
HGDIOBJ oldobj = SelectObject(hdc, hfont);
TEXTMETRIC textMetrics;
@@ -598,17 +520,10 @@ static void initFontInfo(QFontEngineWin *fe, const QFontDef &request, const QFon
HDC dc = ((request.styleStrategy & QFont::PreferDevice) && fp->hdc) ? fp->hdc : shared_dc();
SelectObject(dc, fe->hfont);
- QT_WA({
- TCHAR n[64];
- GetTextFaceW(dc, 64, n);
- fe->fontDef.family = QString::fromUtf16((ushort*)n);
- fe->fontDef.fixedPitch = !(fe->tm.w.tmPitchAndFamily & TMPF_FIXED_PITCH);
- } , {
- char an[64];
- GetTextFaceA(dc, 64, an);
- fe->fontDef.family = QString::fromLocal8Bit(an);
- fe->fontDef.fixedPitch = !(fe->tm.a.tmPitchAndFamily & TMPF_FIXED_PITCH);
- });
+ wchar_t n[64];
+ GetTextFace(dc, 64, n);
+ fe->fontDef.family = QString::fromWCharArray(n);
+ fe->fontDef.fixedPitch = !(fe->tm.tmPitchAndFamily & TMPF_FIXED_PITCH);
if (fe->fontDef.pointSize < 0) {
fe->fontDef.pointSize = fe->fontDef.pixelSize * 72. / fp->dpi;
} else if (fe->fontDef.pixelSize == -1) {
@@ -704,12 +619,7 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
HFONT hfont = 0;
if (fp->rawMode) { // will choose a stock font
- int f, deffnt;
- // ### why different?
- if ((QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) || QSysInfo::WindowsVersion == QSysInfo::WV_32s)
- deffnt = SYSTEM_FONT;
- else
- deffnt = DEFAULT_GUI_FONT;
+ int f, deffnt = SYSTEM_FONT;
QString fam = desc->family->name.toLower();
if (fam == QLatin1String("default"))
f = deffnt;
@@ -778,11 +688,7 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
} else if (request.styleStrategy & QFont::PreferDevice) {
strat = OUT_DEVICE_PRECIS;
} else if (request.styleStrategy & QFont::PreferOutline) {
- QT_WA({
- strat = OUT_OUTLINE_PRECIS;
- } , {
- strat = OUT_TT_PRECIS;
- });
+ strat = OUT_OUTLINE_PRECIS;
} else if (request.styleStrategy & QFont::ForceOutline) {
strat = OUT_TT_ONLY_PRECIS;
#endif
@@ -801,7 +707,7 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
if (request.styleStrategy & QFont::PreferAntialias) {
if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP) {
- qual = 5; // == CLEARTYPE_QUALITY;
+ qual = CLEARTYPE_QUALITY;
preferClearTypeAA = true;
} else {
qual = ANTIALIASED_QUALITY;
@@ -827,16 +733,8 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
if (fam == QLatin1String("Courier") && !(request.styleStrategy & QFont::PreferBitmap))
fam = QLatin1String("Courier New");
- QT_WA({
- memcpy(lf.lfFaceName, fam.utf16(), sizeof(TCHAR)*qMin(fam.length()+1,32)); // 32 = Windows hard-coded
- hfont = CreateFontIndirect(&lf);
- } , {
- // LOGFONTA and LOGFONTW are binary compatible
- QByteArray lname = fam.toLocal8Bit();
- memcpy(lf.lfFaceName,lname.data(),
- qMin(lname.length()+1,32)); // 32 = Windows hard-coded
- hfont = CreateFontIndirectA((LOGFONTA*)&lf);
- });
+ memcpy(lf.lfFaceName, fam.utf16(), sizeof(wchar_t) * qMin(fam.length() + 1, 32)); // 32 = Windows hard-coded
+ hfont = CreateFontIndirect(&lf);
if (!hfont)
qErrnoWarning("QFontEngine::loadEngine: CreateFontIndirect failed");
@@ -845,17 +743,12 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
int avWidth = 0;
BOOL res;
HGDIOBJ oldObj = SelectObject(hdc, hfont);
- QT_WA({
- TEXTMETRICW tm;
- res = GetTextMetricsW(hdc, &tm);
- avWidth = tm.tmAveCharWidth;
- ttf = tm.tmPitchAndFamily & TMPF_TRUETYPE;
- } , {
- TEXTMETRICA tm;
- res = GetTextMetricsA(hdc, &tm);
- avWidth = tm.tmAveCharWidth;
- ttf = tm.tmPitchAndFamily & TMPF_TRUETYPE;
- });
+
+ TEXTMETRIC tm;
+ res = GetTextMetrics(hdc, &tm);
+ avWidth = tm.tmAveCharWidth;
+ ttf = tm.tmPitchAndFamily & TMPF_TRUETYPE;
+
SelectObject(hdc, oldObj);
if (hfont && (!ttf || request.stretch != 100)) {
@@ -863,11 +756,7 @@ QFontEngine *loadEngine(int script, const QFontPrivate *fp, const QFontDef &requ
if (!res)
qErrnoWarning("QFontEngine::loadEngine: GetTextMetrics failed");
lf.lfWidth = avWidth * request.stretch/100;
- QT_WA({
- hfont = CreateFontIndirect(&lf);
- } , {
- hfont = CreateFontIndirectA((LOGFONTA*)&lf);
- });
+ hfont = CreateFontIndirect(&lf);
if (!hfont)
qErrnoWarning("QFontEngine::loadEngine: CreateFontIndirect with stretch failed");
}
@@ -969,12 +858,6 @@ static QFontEngine *loadWin(const QFontPrivate *d, int script, const QFontDef &r
// list of families to try
QStringList family_list = familyList(req);
- if(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based && req.family.toLower() == QLatin1String("ms sans serif")) {
- // small hack for Dos based machines to get the right font for non
- // latin text when using the default font.
- family_list << QLatin1String("Arial");
- }
-
const char *stylehint = styleHint(d->request);
if (stylehint)
family_list << QLatin1String(stylehint);
@@ -1143,6 +1026,8 @@ static void getFamiliesAndSignatures(const QByteArray &fontData, QFontDatabasePr
signature.fsCsb[0] = qFromBigEndian<quint32>(table + 78);
signature.fsCsb[1] = qFromBigEndian<quint32>(table + 82);
+ } else {
+ memset(&signature, 0, sizeof(signature));
}
appFont->signatures << signature;
}
@@ -1165,21 +1050,21 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
HANDLE handle = 0;
{
-#ifdef QT_NO_TEMPORARYFILE
- TCHAR lpBuffer[MAX_PATH];
+#ifdef QT_NO_TEMPORARYFILE
+ wchar_t lpBuffer[MAX_PATH];
GetTempPath(MAX_PATH, lpBuffer);
- QString s = QString::fromUtf16((const ushort *) lpBuffer);
+ QString s = QString::fromWCharArray(lpBuffer);
QFile tempfile(s + QLatin1String("/font") + QString::number(GetTickCount()) + QLatin1String(".ttf"));
if (!tempfile.open(QIODevice::ReadWrite))
#else
QTemporaryFile tempfile(QLatin1String("XXXXXXXX.ttf"));
if (!tempfile.open())
-#endif
+#endif // QT_NO_TEMPORARYFILE
return;
if (tempfile.write(fnt->data) == -1)
return;
-#ifndef QT_NO_TEMPORARYFILE
+#ifndef QT_NO_TEMPORARYFILE
tempfile.setAutoRemove(false);
#endif
fnt->fileName = QFileInfo(tempfile.fileName()).absoluteFilePath();
@@ -1191,13 +1076,11 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
}
#else
DWORD dummy = 0;
- HANDLE handle = ptrAddFontMemResourceEx((void *)fnt->data.constData(),
- fnt->data.size(),
- 0,
- &dummy);
+ HANDLE handle = ptrAddFontMemResourceEx((void *)fnt->data.constData(), fnt->data.size(), 0,
+ &dummy);
if (handle == 0)
return;
-#endif
+#endif // Q_OS_WINCE
fnt->handle = handle;
fnt->data = QByteArray();
@@ -1219,12 +1102,10 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
// supported from 2000 on, so no need to deal with the *A variant
PtrAddFontResourceExW ptrAddFontResourceExW = (PtrAddFontResourceExW)QLibrary::resolve(QLatin1String("gdi32"),
"AddFontResourceExW");
- if (!ptrAddFontResourceExW)
+ if (!ptrAddFontResourceExW
+ || ptrAddFontResourceExW((wchar_t*)fnt->fileName.utf16(), FR_PRIVATE, 0) == 0)
return;
-
- if (ptrAddFontResourceExW((LPCWSTR)fnt->fileName.utf16(), FR_PRIVATE, 0) == 0)
- return;
-#endif
+#endif // Q_OS_WINCE
fnt->memoryFont = false;
}
@@ -1250,12 +1131,10 @@ bool QFontDatabase::removeApplicationFont(int handle)
#else
PtrRemoveFontMemResourceEx ptrRemoveFontMemResourceEx = (PtrRemoveFontMemResourceEx)QLibrary::resolve(QLatin1String("gdi32"),
"RemoveFontMemResourceEx");
- if (!ptrRemoveFontMemResourceEx)
- return false;
-
- if (!ptrRemoveFontMemResourceEx(font.handle))
+ if (!ptrRemoveFontMemResourceEx
+ || !ptrRemoveFontMemResourceEx(font.handle))
return false;
-#endif
+#endif // Q_OS_WINCE
} else {
#ifdef Q_OS_WINCE
if (!RemoveFontResource((LPCWSTR)font.fileName.utf16()))
@@ -1263,12 +1142,10 @@ bool QFontDatabase::removeApplicationFont(int handle)
#else
PtrRemoveFontResourceExW ptrRemoveFontResourceExW = (PtrRemoveFontResourceExW)QLibrary::resolve(QLatin1String("gdi32"),
"RemoveFontResourceExW");
- if (!ptrRemoveFontResourceExW)
- return false;
-
- if (!ptrRemoveFontResourceExW((LPCWSTR)font.fileName.utf16(), FR_PRIVATE, 0))
+ if (!ptrRemoveFontResourceExW
+ || !ptrRemoveFontResourceExW((LPCWSTR)font.fileName.utf16(), FR_PRIVATE, 0))
return false;
-#endif
+#endif // Q_OS_WINCE
}
db->invalidate();
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 2df4095..b255694 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -51,6 +51,7 @@
#if !defined(QT_NO_FREETYPE)
#include "private/qfontengine_ft_p.h"
#endif
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
// for mmap
#include <stdlib.h>
@@ -252,7 +253,7 @@ QList<QByteArray> QFontEngineQPF::cleanUpAfterClientCrash(const QList<int> &cras
for (int i = 0; i < int(dir.count()); ++i) {
const QByteArray fileName = QFile::encodeName(dir.absoluteFilePath(dir[i]));
- int fd = ::open(fileName.constData(), O_RDONLY, 0);
+ int fd = QT_OPEN(fileName.constData(), O_RDONLY, 0);
if (fd >= 0) {
void *header = ::mmap(0, sizeof(QFontEngineQPF::Header), PROT_READ, MAP_SHARED, fd, 0);
if (header && header != MAP_FAILED) {
@@ -265,7 +266,7 @@ QList<QByteArray> QFontEngineQPF::cleanUpAfterClientCrash(const QList<int> &cras
::munmap(header, sizeof(QFontEngineQPF::Header));
}
- ::close(fd);
+ QT_CLOSE(fd);
}
}
if (!removedFonts.isEmpty())
@@ -331,15 +332,15 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng
qDebug() << "found existing qpf:" << fileName;
#endif
if (::access(encodedName, W_OK | R_OK) == 0)
- fd = ::open(encodedName, O_RDWR, 0);
+ fd = QT_OPEN(encodedName, O_RDWR, 0);
else if (::access(encodedName, R_OK) == 0)
- fd = ::open(encodedName, O_RDONLY, 0);
+ fd = QT_OPEN(encodedName, O_RDONLY, 0);
} else {
#if defined(DEBUG_FONTENGINE)
qDebug() << "creating qpf on the fly:" << fileName;
#endif
if (::access(QFile::encodeName(qws_fontCacheDir()), W_OK) == 0) {
- fd = ::open(encodedName, O_RDWR | O_EXCL | O_CREAT, 0644);
+ fd = QT_OPEN(encodedName, O_RDWR | O_EXCL | O_CREAT, 0644);
QBuffer buffer;
buffer.open(QIODevice::ReadWrite);
diff --git a/src/gui/text/qfontengine_qws.cpp b/src/gui/text/qfontengine_qws.cpp
index 6fb4f15..70ce8f9 100644
--- a/src/gui/text/qfontengine_qws.cpp
+++ b/src/gui/text/qfontengine_qws.cpp
@@ -47,6 +47,7 @@
#include <private/qpaintengine_raster_p.h>
#include <private/qpdf_p.h>
#include "qtextengine_p.h"
+#include "private/qcore_unix_p.h" // overrides QT_OPEN
#include <qdebug.h>
@@ -387,7 +388,7 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn)
{
cache_cost = 1;
- int f = ::open( QFile::encodeName(fn), O_RDONLY, 0);
+ int f = QT_OPEN( QFile::encodeName(fn), O_RDONLY, 0);
Q_ASSERT(f>=0);
QT_STATBUF st;
if ( QT_FSTAT( f, &st ) )
@@ -406,7 +407,7 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn)
#endif
if ( !data || data == (uchar*)MAP_FAILED )
qFatal("Failed to mmap %s",QFile::encodeName(fn).data());
- ::close(f);
+ QT_CLOSE(f);
d = new QFontEngineQPF1Data;
memcpy(reinterpret_cast<char*>(&d->fm),data,sizeof(d->fm));
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 9715aef..c6717e3 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -48,7 +48,6 @@
#include <qlibrary.h>
#include <qpaintdevice.h>
#include <qpainter.h>
-#include <qlibrary.h>
#include <limits.h>
#include <qendian.h>
@@ -85,8 +84,6 @@
((quint32)(ch1)) \
)
-typedef BOOL (WINAPI *PtrGetCharWidthI)(HDC, UINT, UINT, LPWORD, LPINT);
-
// common DC for all fonts
QT_BEGIN_NAMESPACE
@@ -128,8 +125,7 @@ HDC shared_dc()
}
#endif
-static HFONT stock_sysfont = 0;
-
+typedef BOOL (WINAPI *PtrGetCharWidthI)(HDC, UINT, UINT, LPWORD, LPINT);
static PtrGetCharWidthI ptrGetCharWidthI = 0;
static bool resolvedGetCharWidthI = false;
@@ -141,27 +137,6 @@ static void resolveGetCharWidthI()
ptrGetCharWidthI = (PtrGetCharWidthI)QLibrary::resolve(QLatin1String("gdi32"), "GetCharWidthI");
}
-// Copy a LOGFONTW struct into a LOGFONTA by converting the face name to an 8 bit value.
-// This is needed when calling CreateFontIndirect on non-unicode windowses.
-inline static void wa_copy_logfont(LOGFONTW *lfw, LOGFONTA *lfa)
-{
- lfa->lfHeight = lfw->lfHeight;
- lfa->lfWidth = lfw->lfWidth;
- lfa->lfEscapement = lfw->lfEscapement;
- lfa->lfOrientation = lfw->lfOrientation;
- lfa->lfWeight = lfw->lfWeight;
- lfa->lfItalic = lfw->lfItalic;
- lfa->lfUnderline = lfw->lfUnderline;
- lfa->lfCharSet = lfw->lfCharSet;
- lfa->lfOutPrecision = lfw->lfOutPrecision;
- lfa->lfClipPrecision = lfw->lfClipPrecision;
- lfa->lfQuality = lfw->lfQuality;
- lfa->lfPitchAndFamily = lfw->lfPitchAndFamily;
-
- QString fam = QString::fromUtf16((const ushort*)lfw->lfFaceName);
- memcpy(lfa->lfFaceName, fam.toLocal8Bit().constData(), fam.length() + 1);
-}
-
// defined in qtextengine_win.cpp
typedef void *SCRIPT_CACHE;
typedef HRESULT (WINAPI *fScriptFreeCache)(SCRIPT_CACHE *);
@@ -187,14 +162,6 @@ static inline quint16 getUShort(unsigned char *p)
return val;
}
-static inline HFONT systemFont()
-{
- if (stock_sysfont == 0)
- stock_sysfont = (HFONT)GetStockObject(SYSTEM_FONT);
- return stock_sysfont;
-}
-
-
// general font engine
QFixed QFontEngineWin::lineThickness() const
@@ -205,33 +172,18 @@ QFixed QFontEngineWin::lineThickness() const
return QFontEngine::lineThickness();
}
-#if defined(Q_WS_WINCE)
-static OUTLINETEXTMETRICW *getOutlineTextMetric(HDC hdc)
-{
- int size;
- size = GetOutlineTextMetricsW(hdc, 0, 0);
- OUTLINETEXTMETRICW *otm = (OUTLINETEXTMETRICW *)malloc(size);
- GetOutlineTextMetricsW(hdc, size, otm);
- return otm;
-}
-#else
-static OUTLINETEXTMETRICA *getOutlineTextMetric(HDC hdc)
+static OUTLINETEXTMETRIC *getOutlineTextMetric(HDC hdc)
{
int size;
- size = GetOutlineTextMetricsA(hdc, 0, 0);
- OUTLINETEXTMETRICA *otm = (OUTLINETEXTMETRICA *)malloc(size);
- GetOutlineTextMetricsA(hdc, size, otm);
+ size = GetOutlineTextMetrics(hdc, 0, 0);
+ OUTLINETEXTMETRIC *otm = (OUTLINETEXTMETRIC *)malloc(size);
+ GetOutlineTextMetrics(hdc, size, otm);
return otm;
}
-#endif
void QFontEngineWin::getCMap()
{
- QT_WA({
- ttf = (bool)(tm.w.tmPitchAndFamily & TMPF_TRUETYPE);
- } , {
- ttf = (bool)(tm.a.tmPitchAndFamily & TMPF_TRUETYPE);
- });
+ ttf = (bool)(tm.tmPitchAndFamily & TMPF_TRUETYPE);
HDC hdc = shared_dc();
SelectObject(hdc, hfont);
bool symb = false;
@@ -249,11 +201,7 @@ void QFontEngineWin::getCMap()
designToDevice = 1;
_faceId.index = 0;
if(cmap) {
-#if defined(Q_WS_WINCE)
- OUTLINETEXTMETRICW *otm = getOutlineTextMetric(hdc);
-#else
- OUTLINETEXTMETRICA *otm = getOutlineTextMetric(hdc);
-#endif
+ OUTLINETEXTMETRIC *otm = getOutlineTextMetric(hdc);
designToDevice = QFixed((int)otm->otmEMSquare)/int(otm->otmTextMetrics.tmHeight);
unitsPerEm = otm->otmEMSquare;
x_height = (int)otm->otmsXHeight;
@@ -263,7 +211,7 @@ void QFontEngineWin::getCMap()
fsType = otm->otmfsType;
free(otm);
} else {
- unitsPerEm = tm.w.tmHeight;
+ unitsPerEm = tm.tmHeight;
}
}
@@ -303,19 +251,14 @@ int QFontEngineWin::getGlyphIndexes(const QChar *str, int numChars, QGlyphLayout
}
} else {
#endif
- ushort first, last;
- QT_WA({
- first = tm.w.tmFirstChar;
- last = tm.w.tmLastChar;
- }, {
- first = tm.a.tmFirstChar;
- last = tm.a.tmLastChar;
- });
+ wchar_t first = tm.tmFirstChar;
+ wchar_t last = tm.tmLastChar;
+
for (; i < numChars; ++i, ++glyph_pos) {
uint ucs = QChar::mirroredChar(getChar(str, i, numChars));
if (
#ifdef Q_WS_WINCE
- tm.w.tmFirstChar > 60000 || // see line 375
+ tm.tmFirstChar > 60000 || // see line 375
#endif
ucs >= first && ucs <= last)
glyphs->glyphs[glyph_pos] = ucs;
@@ -341,19 +284,14 @@ int QFontEngineWin::getGlyphIndexes(const QChar *str, int numChars, QGlyphLayout
}
} else {
#endif
- ushort first, last;
- QT_WA({
- first = tm.w.tmFirstChar;
- last = tm.w.tmLastChar;
- }, {
- first = tm.a.tmFirstChar;
- last = tm.a.tmLastChar;
- });
+ wchar_t first = tm.tmFirstChar;
+ wchar_t last = tm.tmLastChar;
+
for (; i < numChars; ++i, ++glyph_pos) {
uint uc = getChar(str, i, numChars);
if (
#ifdef Q_WS_WINCE
- tm.w.tmFirstChar > 60000 || // see comment in QFontEngineWin
+ tm.tmFirstChar > 60000 || // see comment in QFontEngineWin
#endif
uc >= first && uc <= last)
glyphs->glyphs[glyph_pos] = uc;
@@ -387,28 +325,14 @@ QFontEngineWin::QFontEngineWin(const QString &name, HFONT _hfont, bool stockFont
lineWidth = -1;
x_height = -1;
- BOOL res;
- QT_WA({
- res = GetTextMetricsW(hdc, &tm.w);
- } , {
- res = GetTextMetricsA(hdc, &tm.a);
- });
- fontDef.fixedPitch = !(tm.w.tmPitchAndFamily & TMPF_FIXED_PITCH);
+ BOOL res = GetTextMetrics(hdc, &tm);
+ fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH);
if (!res)
qErrnoWarning("QFontEngineWin: GetTextMetrics failed");
- cache_cost = tm.w.tmHeight * tm.w.tmAveCharWidth * 2000;
+ cache_cost = tm.tmHeight * tm.tmAveCharWidth * 2000;
getCMap();
- useTextOutA = false;
-#ifndef Q_OS_WINCE
- // TextOutW doesn't work for symbol fonts on Windows 95!
- // since we're using glyph indices we don't care for ttfs about this!
- if (QSysInfo::WindowsVersion == QSysInfo::WV_95 && !ttf &&
- (_name == QLatin1String("Marlett") || _name == QLatin1String("Symbol") ||
- _name == QLatin1String("Webdings") || _name == QLatin1String("Wingdings")))
- useTextOutA = true;
-#endif
widthCache = 0;
widthCacheSize = 0;
designAdvances = 0;
@@ -427,7 +351,7 @@ QFontEngineWin::~QFontEngineWin()
free(widthCache);
// make sure we aren't by accident still selected
- SelectObject(shared_dc(), systemFont());
+ SelectObject(shared_dc(), (HFONT)GetStockObject(SYSTEM_FONT));
if (!stockFont) {
if (!DeleteObject(hfont))
@@ -435,39 +359,12 @@ QFontEngineWin::~QFontEngineWin()
}
}
-HGDIOBJ QFontEngineWin::selectDesignFont(QFixed *overhang) const
+HGDIOBJ QFontEngineWin::selectDesignFont() const
{
LOGFONT f = logfont;
f.lfHeight = unitsPerEm;
- HFONT designFont;
- QT_WA({
- designFont = CreateFontIndirectW(&f);
- }, {
- LOGFONTA fa;
- wa_copy_logfont(&f, &fa);
- designFont = CreateFontIndirectA(&fa);
- });
- HGDIOBJ oldFont = SelectObject(shared_dc(), designFont);
-
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) {
- BOOL res;
- QT_WA({
- TEXTMETRICW tm;
- res = GetTextMetricsW(shared_dc(), &tm);
- if (!res)
- qErrnoWarning("QFontEngineWin: GetTextMetrics failed");
- *overhang = QFixed((int)tm.tmOverhang) / designToDevice;
- } , {
- TEXTMETRICA tm;
- res = GetTextMetricsA(shared_dc(), &tm);
- if (!res)
- qErrnoWarning("QFontEngineWin: GetTextMetrics failed");
- *overhang = QFixed((int)tm.tmOverhang) / designToDevice;
- });
- } else {
- *overhang = 0;
- }
- return oldFont;
+ HFONT designFont = CreateFontIndirect(&f);
+ return SelectObject(shared_dc(), designFont);
}
bool QFontEngineWin::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const
@@ -486,8 +383,6 @@ bool QFontEngineWin::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph
HDC hdc = shared_dc();
if (flags & QTextEngine::DesignMetrics) {
HGDIOBJ oldFont = 0;
- QFixed overhang = 0;
-
int glyph_pos = 0;
for(register int i = 0; i < len; i++) {
bool surrogate = (str[i].unicode() >= 0xd800 && str[i].unicode() < 0xdc00 && i < len-1
@@ -502,9 +397,9 @@ bool QFontEngineWin::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph
}
if(designAdvances[glyph] < -999999) {
if(!oldFont)
- oldFont = selectDesignFont(&overhang);
+ oldFont = selectDesignFont();
SIZE size = {0, 0};
- GetTextExtentPoint32W(hdc, (wchar_t *)(str+i), surrogate ? 2 : 1, &size);
+ GetTextExtentPoint32(hdc, (wchar_t *)(str+i), surrogate ? 2 : 1, &size);
designAdvances[glyph] = QFixed((int)size.cx)/designToDevice;
}
glyphs->advances_x[glyph_pos] = designAdvances[glyph];
@@ -538,7 +433,7 @@ bool QFontEngineWin::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph
SIZE size = {0, 0};
if (!oldFont)
oldFont = SelectObject(hdc, hfont);
- GetTextExtentPoint32W(hdc, (wchar_t *)str + i, surrogate ? 2 : 1, &size);
+ GetTextExtentPoint32(hdc, (wchar_t *)str + i, surrogate ? 2 : 1, &size);
glyphs->advances_x[glyph_pos] = size.cx;
// if glyph's within cache range, store it for later
if (size.cx > 0 && size.cx < 0x100)
@@ -564,8 +459,6 @@ void QFontEngineWin::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFla
HGDIOBJ oldFont = 0;
HDC hdc = shared_dc();
if (ttf && (flags & QTextEngine::DesignMetrics)) {
- QFixed overhang = 0;
-
for(int i = 0; i < glyphs->numGlyphs; i++) {
unsigned int glyph = glyphs->glyphs[i];
if(int(glyph) >= designAdvancesSize) {
@@ -575,35 +468,14 @@ void QFontEngineWin::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFla
designAdvances[i] = -1000000;
designAdvancesSize = newSize;
}
- if(designAdvances[glyph] < -999999) {
- if(!oldFont)
- oldFont = selectDesignFont(&overhang);
+ if (designAdvances[glyph] < -999999) {
+ if (!oldFont)
+ oldFont = selectDesignFont();
- if (ptrGetCharWidthI) {
- int width = 0;
+ int width = 0;
+ if (ptrGetCharWidthI)
ptrGetCharWidthI(hdc, glyph, 1, 0, &width);
-
- designAdvances[glyph] = QFixed(width) / designToDevice;
- } else {
-#ifndef Q_WS_WINCE
- GLYPHMETRICS gm;
- DWORD res = GDI_ERROR;
- MAT2 mat;
- mat.eM11.value = mat.eM22.value = 1;
- mat.eM11.fract = mat.eM22.fract = 0;
- mat.eM21.value = mat.eM12.value = 0;
- mat.eM21.fract = mat.eM12.fract = 0;
- QT_WA({
- res = GetGlyphOutlineW(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX|GGO_NATIVE, &gm, 0, 0, &mat);
- } , {
- res = GetGlyphOutlineA(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX|GGO_NATIVE, &gm, 0, 0, &mat);
- });
-
- if (res != GDI_ERROR) {
- designAdvances[glyph] = QFixed(gm.gmCellIncX) / designToDevice;
- }
-#endif
- }
+ designAdvances[glyph] = QFixed(width) / designToDevice;
}
glyphs->advances_x[i] = designAdvances[glyph];
glyphs->advances_y[i] = 0;
@@ -611,8 +483,6 @@ void QFontEngineWin::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFla
if(oldFont)
DeleteObject(SelectObject(hdc, oldFont));
} else {
- int overhang = (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) ? tm.a.tmOverhang : 0;
-
for(int i = 0; i < glyphs->numGlyphs; i++) {
unsigned int glyph = glyphs->glyphs[i];
@@ -640,31 +510,10 @@ void QFontEngineWin::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFla
++chrLen;
}
SIZE size = {0, 0};
- GetTextExtentPoint32W(hdc, (wchar_t *)ch, chrLen, &size);
+ GetTextExtentPoint32(hdc, (wchar_t *)ch, chrLen, &size);
width = size.cx;
} else if (ptrGetCharWidthI) {
ptrGetCharWidthI(hdc, glyph, 1, 0, &width);
-
- width -= overhang;
- } else {
-#ifndef Q_WS_WINCE
- GLYPHMETRICS gm;
- DWORD res = GDI_ERROR;
- MAT2 mat;
- mat.eM11.value = mat.eM22.value = 1;
- mat.eM11.fract = mat.eM22.fract = 0;
- mat.eM21.value = mat.eM12.value = 0;
- mat.eM21.fract = mat.eM12.fract = 0;
- QT_WA({
- res = GetGlyphOutlineW(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX, &gm, 0, 0, &mat);
- } , {
- res = GetGlyphOutlineA(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX, &gm, 0, 0, &mat);
- });
-
- if (res != GDI_ERROR) {
- width = gm.gmCellIncX;
- }
-#endif
}
glyphs->advances_x[i] = width;
// if glyph's within cache range, store it for later
@@ -687,17 +536,10 @@ glyph_metrics_t QFontEngineWin::boundingBox(const QGlyphLayout &glyphs)
for (int i = 0; i < glyphs.numGlyphs; ++i)
w += glyphs.effectiveAdvance(i);
- return glyph_metrics_t(0, -tm.w.tmAscent, w, tm.w.tmHeight, w, 0);
+ return glyph_metrics_t(0, -tm.tmAscent, w, tm.tmHeight, w, 0);
}
-
-
-#ifndef Q_WS_WINCE
-typedef HRESULT (WINAPI *pGetCharABCWidthsFloat)(HDC, UINT, UINT, LPABCFLOAT);
-static pGetCharABCWidthsFloat qt_GetCharABCWidthsFloat = 0;
-#endif
-
glyph_metrics_t QFontEngineWin::boundingBox(glyph_t glyph, const QTransform &t)
{
#ifndef Q_WS_WINCE
@@ -705,30 +547,13 @@ glyph_metrics_t QFontEngineWin::boundingBox(glyph_t glyph, const QTransform &t)
HDC hdc = shared_dc();
SelectObject(hdc, hfont);
- if(!ttf) {
- SIZE s = {0, 0};
- WCHAR ch = glyph;
- int width;
- int overhang = 0;
- static bool resolved = false;
- if (!resolved) {
- QLibrary lib(QLatin1String("gdi32"));
- qt_GetCharABCWidthsFloat = (pGetCharABCWidthsFloat) lib.resolve("GetCharABCWidthsFloatW");
- resolved = true;
- }
- if (QT_WA_INLINE(true, false) && qt_GetCharABCWidthsFloat) {
- ABCFLOAT abc;
- qt_GetCharABCWidthsFloat(hdc, ch, ch, &abc);
- width = qRound(abc.abcfB);
- } else {
- GetTextExtentPoint32W(hdc, &ch, 1, &s);
- overhang = (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) ? tm.a.tmOverhang : 0;
- width = s.cx;
- }
+ if (!ttf) {
+ wchar_t ch = glyph;
+ ABCFLOAT abc;
+ GetCharABCWidthsFloat(hdc, ch, ch, &abc);
+ int width = qRound(abc.abcfB);
- return glyph_metrics_t(0, -tm.a.tmAscent,
- width, tm.a.tmHeight,
- width-overhang, 0).transformed(t);
+ return glyph_metrics_t(0, -tm.tmAscent, width, tm.tmHeight, width, 0).transformed(t);
} else {
DWORD res = 0;
MAT2 mat;
@@ -753,11 +578,8 @@ glyph_metrics_t QFontEngineWin::boundingBox(glyph_t glyph, const QTransform &t)
SetWorldTransform(hdc, &xform);
}
- QT_WA({
- res = GetGlyphOutlineW(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX, &gm, 0, 0, &mat);
- } , {
- res = GetGlyphOutlineA(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX, &gm, 0, 0, &mat);
- });
+ res = GetGlyphOutline(hdc, glyph, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, 0, &mat);
+
if (t.type() > QTransform::TxTranslate) {
XFORM xform;
xform.eM11 = xform.eM22 = 1;
@@ -793,28 +615,28 @@ glyph_metrics_t QFontEngineWin::boundingBox(glyph_t glyph, const QTransform &t)
else
#endif
{ // fallback
- width = tm.w.tmMaxCharWidth;
+ width = tm.tmMaxCharWidth;
advance = width;
}
SelectObject(hdc, oldFont);
- return glyph_metrics_t(0, -tm.w.tmAscent, width, tm.w.tmHeight, advance, 0).transformed(t);
+ return glyph_metrics_t(0, -tm.tmAscent, width, tm.tmHeight, advance, 0).transformed(t);
#endif
}
QFixed QFontEngineWin::ascent() const
{
- return tm.w.tmAscent;
+ return tm.tmAscent;
}
QFixed QFontEngineWin::descent() const
{
- return tm.w.tmDescent;
+ return tm.tmDescent;
}
QFixed QFontEngineWin::leading() const
{
- return tm.w.tmExternalLeading;
+ return tm.tmExternalLeading;
}
@@ -827,12 +649,12 @@ QFixed QFontEngineWin::xHeight() const
QFixed QFontEngineWin::averageCharWidth() const
{
- return tm.w.tmAveCharWidth;
+ return tm.tmAveCharWidth;
}
qreal QFontEngineWin::maxCharWidth() const
{
- return tm.w.tmMaxCharWidth;
+ return tm.tmMaxCharWidth;
}
enum { max_font_count = 256 };
@@ -879,10 +701,10 @@ qreal QFontEngineWin::minRightBearing() const
SelectObject(hdc, hfont);
if (ttf) {
ABC *abc = 0;
- int n = QT_WA_INLINE(tm.w.tmLastChar - tm.w.tmFirstChar, tm.a.tmLastChar - tm.a.tmFirstChar);
+ int n = tm.tmLastChar - tm.tmFirstChar;
if (n <= max_font_count) {
abc = new ABC[n+1];
- GetCharABCWidths(hdc, tm.w.tmFirstChar, tm.w.tmLastChar, abc);
+ GetCharABCWidths(hdc, tm.tmFirstChar, tm.tmLastChar, abc);
} else {
abc = new ABC[char_table_entries+1];
for(int i = 0; i < char_table_entries; i++)
@@ -898,9 +720,6 @@ qreal QFontEngineWin::minRightBearing() const
}
}
delete [] abc;
- } else {
- ml = 0;
- mr = -tm.a.tmOverhang;
}
lbearing = ml;
rbearing = mr;
@@ -915,28 +734,14 @@ qreal QFontEngineWin::minRightBearing() const
SelectObject(hdc, hfont);
if (ttf) {
ABC *abc = 0;
- int n = QT_WA_INLINE(tm.w.tmLastChar - tm.w.tmFirstChar, tm.a.tmLastChar - tm.a.tmFirstChar);
+ int n = tm.tmLastChar - tm.tmFirstChar;
if (n <= max_font_count) {
abc = new ABC[n+1];
- QT_WA({
- GetCharABCWidths(hdc, tm.w.tmFirstChar, tm.w.tmLastChar, abc);
- }, {
- GetCharABCWidthsA(hdc,tm.a.tmFirstChar,tm.a.tmLastChar,abc);
- });
+ GetCharABCWidths(hdc, tm.tmFirstChar, tm.tmLastChar, abc);
} else {
abc = new ABC[char_table_entries+1];
- QT_WA({
- for(int i = 0; i < char_table_entries; i++)
- GetCharABCWidths(hdc, char_table[i], char_table[i], abc+i);
- }, {
- for(int i = 0; i < char_table_entries; i++) {
- QByteArray w = QString(QChar(char_table[i])).toLocal8Bit();
- if (w.length() == 1) {
- uint ch8 = (uchar)w[0];
- GetCharABCWidthsA(hdc, ch8, ch8, abc+i);
- }
- }
- });
+ for(int i = 0; i < char_table_entries; i++)
+ GetCharABCWidths(hdc, char_table[i], char_table[i], abc + i);
n = char_table_entries;
}
ml = abc[0].abcA;
@@ -949,33 +754,28 @@ qreal QFontEngineWin::minRightBearing() const
}
delete [] abc;
} else {
- QT_WA({
- ABCFLOAT *abc = 0;
- int n = tm.w.tmLastChar - tm.w.tmFirstChar+1;
- if (n <= max_font_count) {
- abc = new ABCFLOAT[n];
- GetCharABCWidthsFloat(hdc, tm.w.tmFirstChar, tm.w.tmLastChar, abc);
- } else {
- abc = new ABCFLOAT[char_table_entries];
- for(int i = 0; i < char_table_entries; i++)
- GetCharABCWidthsFloat(hdc, char_table[i], char_table[i], abc+i);
- n = char_table_entries;
- }
- float fml = abc[0].abcfA;
- float fmr = abc[0].abcfC;
- for (int i=1; i<n; i++) {
- if (abc[i].abcfA + abc[i].abcfB + abc[i].abcfC != 0) {
- fml = qMin(fml,abc[i].abcfA);
- fmr = qMin(fmr,abc[i].abcfC);
- }
+ ABCFLOAT *abc = 0;
+ int n = tm.tmLastChar - tm.tmFirstChar+1;
+ if (n <= max_font_count) {
+ abc = new ABCFLOAT[n];
+ GetCharABCWidthsFloat(hdc, tm.tmFirstChar, tm.tmLastChar, abc);
+ } else {
+ abc = new ABCFLOAT[char_table_entries];
+ for(int i = 0; i < char_table_entries; i++)
+ GetCharABCWidthsFloat(hdc, char_table[i], char_table[i], abc+i);
+ n = char_table_entries;
+ }
+ float fml = abc[0].abcfA;
+ float fmr = abc[0].abcfC;
+ for (int i=1; i<n; i++) {
+ if (abc[i].abcfA + abc[i].abcfB + abc[i].abcfC != 0) {
+ fml = qMin(fml,abc[i].abcfA);
+ fmr = qMin(fmr,abc[i].abcfC);
}
- ml = int(fml-0.9999);
- mr = int(fmr-0.9999);
- delete [] abc;
- } , {
- ml = 0;
- mr = -tm.a.tmOverhang;
- });
+ }
+ ml = int(fml - 0.9999);
+ mr = int(fmr - 0.9999);
+ delete [] abc;
}
lbearing = ml;
rbearing = mr;
@@ -1012,17 +812,10 @@ bool QFontEngineWin::canRender(const QChar *string, int len)
return false;
}
} else {
- QT_WA({
- while(len--) {
- if (tm.w.tmFirstChar > string->unicode() || tm.w.tmLastChar < string->unicode())
- return false;
- }
- }, {
- while(len--) {
- if (tm.a.tmFirstChar > string->unicode() || tm.a.tmLastChar < string->unicode())
- return false;
- }
- });
+ while(len--) {
+ if (tm.tmFirstChar > string->unicode() || tm.tmLastChar < string->unicode())
+ return false;
+ }
}
return true;
}
@@ -1065,11 +858,7 @@ static bool addGlyphToPath(glyph_t glyph, const QFixedPoint &position, HDC hdc,
memset(&gMetric, 0, sizeof(GLYPHMETRICS));
int bufferSize = GDI_ERROR;
#if !defined(Q_WS_WINCE)
- QT_WA( {
- bufferSize = GetGlyphOutlineW(hdc, glyph, glyphFormat, &gMetric, 0, 0, &mat);
- }, {
- bufferSize = GetGlyphOutlineA(hdc, glyph, glyphFormat, &gMetric, 0, 0, &mat);
- });
+ bufferSize = GetGlyphOutline(hdc, glyph, glyphFormat, &gMetric, 0, 0, &mat);
#endif
if ((DWORD)bufferSize == GDI_ERROR) {
return false;
@@ -1078,13 +867,7 @@ static bool addGlyphToPath(glyph_t glyph, const QFixedPoint &position, HDC hdc,
void *dataBuffer = new char[bufferSize];
DWORD ret = GDI_ERROR;
#if !defined(Q_WS_WINCE)
- QT_WA( {
- ret = GetGlyphOutlineW(hdc, glyph, glyphFormat, &gMetric, bufferSize,
- dataBuffer, &mat);
- }, {
- ret = GetGlyphOutlineA(hdc, glyph, glyphFormat, &gMetric, bufferSize,
- dataBuffer, &mat);
- } );
+ ret = GetGlyphOutline(hdc, glyph, glyphFormat, &gMetric, bufferSize, dataBuffer, &mat);
#endif
if (ret == GDI_ERROR) {
delete [](char *)dataBuffer;
@@ -1171,14 +954,7 @@ void QFontEngineWin::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, in
// font at the correct pixel size.
lf.lfHeight = -unitsPerEm;
lf.lfWidth = 0;
- HFONT hf;
- QT_WA({
- hf = CreateFontIndirectW(&lf);
- }, {
- LOGFONTA lfa;
- wa_copy_logfont(&lf, &lfa);
- hf = CreateFontIndirectA(&lfa);
- });
+ HFONT hf = CreateFontIndirect(&lf);
HDC hdc = shared_dc();
HGDIOBJ oldfont = SelectObject(hdc, hf);
@@ -1200,7 +976,7 @@ void QFontEngineWin::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyp
QPainterPath *path, QTextItem::RenderFlags flags)
{
#if !defined(Q_WS_WINCE)
- if(tm.w.tmPitchAndFamily & (TMPF_TRUETYPE | TMPF_VECTOR)) {
+ if(tm.tmPitchAndFamily & (TMPF_TRUETYPE | TMPF_VECTOR)) {
hasOutline = true;
QFontEngine::addOutlineToPath(x, y, glyphs, path, flags);
if (hasOutline) {
@@ -1234,11 +1010,11 @@ int QFontEngineWin::synthesized() const
uchar data[4];
GetFontData(hdc, HEAD, 44, &data, 4);
USHORT macStyle = getUShort(data);
- if (tm.w.tmItalic && !(macStyle & 2))
+ if (tm.tmItalic && !(macStyle & 2))
synthesized_flags = SynthesizedItalic;
if (fontDef.stretch != 100 && ttf)
synthesized_flags |= SynthesizedStretch;
- if (tm.w.tmWeight >= 500 && !(macStyle & 1))
+ if (tm.tmWeight >= 500 && !(macStyle & 1))
synthesized_flags |= SynthesizedBold;
//qDebug() << "font is" << _name <<
// "it=" << (macStyle & 2) << fontDef.style << "flags=" << synthesized_flags;
@@ -1254,24 +1030,12 @@ QFixed QFontEngineWin::emSquareSize() const
QFontEngine::Properties QFontEngineWin::properties() const
{
-
LOGFONT lf = logfont;
lf.lfHeight = unitsPerEm;
- HFONT hf;
- QT_WA({
- hf = CreateFontIndirectW(&lf);
- }, {
- LOGFONTA lfa;
- wa_copy_logfont(&lf, &lfa);
- hf = CreateFontIndirectA(&lfa);
- });
+ HFONT hf = CreateFontIndirect(&lf);
HDC hdc = shared_dc();
HGDIOBJ oldfont = SelectObject(hdc, hf);
-#if defined(Q_WS_WINCE)
- OUTLINETEXTMETRICW *otm = getOutlineTextMetric(hdc);
-#else
- OUTLINETEXTMETRICA *otm = getOutlineTextMetric(hdc);
-#endif
+ OUTLINETEXTMETRIC *otm = getOutlineTextMetric(hdc);
Properties p;
p.emSquare = unitsPerEm;
p.italicAngle = otm->otmItalicAngle;
@@ -1301,14 +1065,7 @@ void QFontEngineWin::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_m
if(flags & SynthesizedItalic)
lf.lfItalic = false;
lf.lfWidth = 0;
- HFONT hf;
- QT_WA({
- hf = CreateFontIndirectW(&lf);
- }, {
- LOGFONTA lfa;
- wa_copy_logfont(&lf, &lfa);
- hf = CreateFontIndirectA(&lfa);
- });
+ HFONT hf = CreateFontIndirect(&lf);
HDC hdc = shared_dc();
HGDIOBJ oldfont = SelectObject(hdc, hf);
QFixedPoint p;
@@ -1377,14 +1134,7 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin
memset(&mat, 0, sizeof(mat));
mat.eM11.value = mat.eM22.value = 1;
- int error = 0;
- QT_WA( {
- error = GetGlyphOutlineW(hdc, glyph, ggo_options, &tgm, 0, 0, &mat);
- }, {
- error = GetGlyphOutlineA(hdc, glyph, ggo_options, &tgm, 0, 0, &mat);
- } );
-
- if (error == GDI_ERROR) {
+ if (GetGlyphOutline(hdc, glyph, ggo_options, &tgm, 0, 0, &mat) == GDI_ERROR) {
qWarning("QWinFontEngine: unable to query transformed glyph metrics...");
return 0;
}
@@ -1430,11 +1180,11 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin
if (has_transformation) {
SetGraphicsMode(hdc, GM_ADVANCED);
SetWorldTransform(hdc, &xform);
- ExtTextOutW(hdc, 0, 0, options, 0, (LPCWSTR) &glyph, 1, 0);
+ ExtTextOut(hdc, 0, 0, options, 0, (LPCWSTR) &glyph, 1, 0);
} else
#endif
{
- ExtTextOutW(hdc, -gx + margin, -gy + margin, options, 0, (LPCWSTR) &glyph, 1, 0);
+ ExtTextOut(hdc, -gx + margin, -gy + margin, options, 0, (LPCWSTR) &glyph, 1, 0);
}
SelectObject(hdc, old_font);
@@ -1450,7 +1200,7 @@ QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform)
if (qt_cleartype_enabled) {
LOGFONT lf = logfont;
lf.lfQuality = ANTIALIASED_QUALITY;
- font = CreateFontIndirectW(&lf);
+ font = CreateFontIndirect(&lf);
}
QImage::Format mask_format = QNativeImage::systemFormat();
#ifndef Q_OS_WINCE
@@ -1557,17 +1307,9 @@ void QFontEngineMultiWin::loadEngine(int at)
QString fam = fallbacks.at(at-1);
LOGFONT lf = static_cast<QFontEngineWin *>(engines.at(0))->logfont;
- HFONT hfont;
- QT_WA({
- memcpy(lf.lfFaceName, fam.utf16(), sizeof(TCHAR)*qMin(fam.length()+1,32)); // 32 = Windows hard-coded
- hfont = CreateFontIndirectW(&lf);
- } , {
- // LOGFONTA and LOGFONTW are binary compatible
- QByteArray lname = fam.toLocal8Bit();
- memcpy(lf.lfFaceName,lname.data(),
- qMin(lname.length()+1,32)); // 32 = Windows hard-coded
- hfont = CreateFontIndirectA((LOGFONTA*)&lf);
- });
+ memcpy(lf.lfFaceName, fam.utf16(), sizeof(wchar_t) * qMin(fam.length() + 1, 32)); // 32 = Windows hard-coded
+ HFONT hfont = CreateFontIndirect(&lf);
+
bool stockFont = false;
if (hfont == 0) {
hfont = (HFONT)GetStockObject(ANSI_VAR_FONT);
diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h
index a8da78a..b86bd00 100644
--- a/src/gui/text/qfontengine_win_p.h
+++ b/src/gui/text/qfontengine_win_p.h
@@ -80,7 +80,7 @@ public:
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs,
QPainterPath *path, QTextItem::RenderFlags flags);
- HGDIOBJ selectDesignFont(QFixed *) const;
+ HGDIOBJ selectDesignFont() const;
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
virtual glyph_metrics_t boundingBox(glyph_t g) { return boundingBox(g, QTransform()); }
@@ -109,18 +109,14 @@ public:
int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const;
void getCMap();
- QString _name;
- HFONT hfont;
+ QString _name;
+ HFONT hfont;
LOGFONT logfont;
- uint stockFont : 1;
- uint useTextOutA : 1;
- uint ttf : 1;
+ uint stockFont : 1;
+ uint ttf : 1;
uint hasOutline : 1;
- union {
- TEXTMETRICW w;
- TEXTMETRICA a;
- } tm;
- int lw;
+ TEXTMETRIC tm;
+ int lw;
const unsigned char *cmap;
QByteArray cmapTable;
mutable qreal lbearing;
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index db1a38e..56c7ca1 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -65,6 +65,18 @@ public:
void _q_reformatBlocks(int from, int charsRemoved, int charsAdded);
void reformatBlock(QTextBlock block);
+
+ inline void rehighlight(QTextCursor &cursor, QTextCursor::MoveOperation operation) {
+ QObject::disconnect(doc, SIGNAL(contentsChange(int,int,int)),
+ q_func(), SLOT(_q_reformatBlocks(int,int,int)));
+ cursor.beginEditBlock();
+ int from = cursor.position();
+ cursor.movePosition(operation);
+ _q_reformatBlocks(from, 0, cursor.position() - from);
+ cursor.endEditBlock();
+ QObject::connect(doc, SIGNAL(contentsChange(int,int,int)),
+ q_func(), SLOT(_q_reformatBlocks(int,int,int)));
+ }
inline void _q_delayedRehighlight() {
if (!rehighlightPending)
@@ -355,7 +367,9 @@ QTextDocument *QSyntaxHighlighter::document() const
/*!
\since 4.2
- Redoes the highlighting of the whole document.
+ Reapplies the highlighting to the whole document.
+
+ \sa rehighlightBlock()
*/
void QSyntaxHighlighter::rehighlight()
{
@@ -363,15 +377,25 @@ void QSyntaxHighlighter::rehighlight()
if (!d->doc)
return;
- disconnect(d->doc, SIGNAL(contentsChange(int,int,int)),
- this, SLOT(_q_reformatBlocks(int,int,int)));
QTextCursor cursor(d->doc);
- cursor.beginEditBlock();
- cursor.movePosition(QTextCursor::End);
- d->_q_reformatBlocks(0, 0, cursor.position());
- cursor.endEditBlock();
- connect(d->doc, SIGNAL(contentsChange(int,int,int)),
- this, SLOT(_q_reformatBlocks(int,int,int)));
+ d->rehighlight(cursor, QTextCursor::End);
+}
+
+/*!
+ \since 4.6
+
+ Reapplies the highlighting to the given QTextBlock \a block.
+
+ \sa rehighlight()
+*/
+void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
+{
+ Q_D(QSyntaxHighlighter);
+ if (!d->doc)
+ return;
+
+ QTextCursor cursor(block);
+ d->rehighlight(cursor, QTextCursor::EndOfBlock);
}
/*!
diff --git a/src/gui/text/qsyntaxhighlighter.h b/src/gui/text/qsyntaxhighlighter.h
index 4e5271b..ee249b8 100644
--- a/src/gui/text/qsyntaxhighlighter.h
+++ b/src/gui/text/qsyntaxhighlighter.h
@@ -78,6 +78,7 @@ public:
public Q_SLOTS:
void rehighlight();
+ void rehighlightBlock(const QTextBlock &block);
protected:
virtual void highlightBlock(const QString &text) = 0;
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index b2ad686..2a590fd 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1245,7 +1245,8 @@ void QTextControlPrivate::keyPressEvent(QKeyEvent *e)
process:
{
QString text = e->text();
- if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
+ if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t')) &&
+ ((e->modifiers() & (Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier)) == Qt::NoModifier)) {
if (overwriteMode
// no need to call deleteChar() if we have a selection, insertText
// does it already
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 0e3cb56..19d4cc4 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1856,6 +1856,8 @@ bool QTextCursor::atStart() const
}
/*!
+ \since 4.6
+
Returns true if the cursor is at the end of the document;
otherwise returns false.
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 3287f31..3531699 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2416,7 +2416,10 @@ void QTextHtmlExporter::emitFragment(const QTextFragment &fragment)
static bool isOrderedList(int style)
{
return style == QTextListFormat::ListDecimal || style == QTextListFormat::ListLowerAlpha
- || style == QTextListFormat::ListUpperAlpha;
+ || style == QTextListFormat::ListUpperAlpha
+ || style == QTextListFormat::ListUpperRoman
+ || style == QTextListFormat::ListLowerRoman
+ ;
}
void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block)
@@ -2513,6 +2516,8 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block)
case QTextListFormat::ListSquare: html += QLatin1String("<ul type=\"square\""); break;
case QTextListFormat::ListLowerAlpha: html += QLatin1String("<ol type=\"a\""); break;
case QTextListFormat::ListUpperAlpha: html += QLatin1String("<ol type=\"A\""); break;
+ case QTextListFormat::ListLowerRoman: html += QLatin1String("<ol type=\"i\""); break;
+ case QTextListFormat::ListUpperRoman: html += QLatin1String("<ol type=\"I\""); break;
default: html += QLatin1String("<ul"); // ### should not happen
}
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 125d74c..f1d9091 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -1383,6 +1383,8 @@ void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *p
case QTextListFormat::ListDecimal:
case QTextListFormat::ListLowerAlpha:
case QTextListFormat::ListUpperAlpha:
+ case QTextListFormat::ListLowerRoman:
+ case QTextListFormat::ListUpperRoman:
itemText = static_cast<QTextList *>(object)->itemText(bl);
size.setWidth(fontMetrics.width(itemText));
size.setHeight(fontMetrics.height());
@@ -1426,7 +1428,9 @@ void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *p
switch (style) {
case QTextListFormat::ListDecimal:
case QTextListFormat::ListLowerAlpha:
- case QTextListFormat::ListUpperAlpha: {
+ case QTextListFormat::ListUpperAlpha:
+ case QTextListFormat::ListLowerRoman:
+ case QTextListFormat::ListUpperRoman: {
QTextLayout layout(itemText, font, q->paintDevice());
layout.setCacheEnabled(true);
QTextOption option(Qt::AlignLeft | Qt::AlignAbsolute);
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 9bc62b1..4e43418 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -2078,6 +2078,8 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const
\value ListDecimal decimal values in ascending order
\value ListLowerAlpha lower case Latin characters in alphabetical order
\value ListUpperAlpha upper case Latin characters in alphabetical order
+ \value ListLowerRoman lower case roman numerals (supports up to 4999 items only)
+ \value ListUpperRoman upper case roman numerals (supports up to 4999 items only)
\omitvalue ListStyleUndefined
*/
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index d269687..9697105 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -604,6 +604,8 @@ public:
ListDecimal = -4,
ListLowerAlpha = -5,
ListUpperAlpha = -6,
+ ListLowerRoman = -7,
+ ListUpperRoman = -8,
ListStyleUndefined = 0
};
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 1bff162..a88cd17 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -1206,6 +1206,8 @@ void QTextHtmlParserNode::setListStyle(const QVector<QCss::Value> &cssValues)
case QCss::Value_Decimal: hasOwnListStyle = true; listStyle = QTextListFormat::ListDecimal; break;
case QCss::Value_LowerAlpha: hasOwnListStyle = true; listStyle = QTextListFormat::ListLowerAlpha; break;
case QCss::Value_UpperAlpha: hasOwnListStyle = true; listStyle = QTextListFormat::ListUpperAlpha; break;
+ case QCss::Value_LowerRoman: hasOwnListStyle = true; listStyle = QTextListFormat::ListLowerRoman; break;
+ case QCss::Value_UpperRoman: hasOwnListStyle = true; listStyle = QTextListFormat::ListUpperRoman; break;
default: break;
}
}
@@ -1540,6 +1542,10 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes)
node->listStyle = QTextListFormat::ListLowerAlpha;
} else if (value == QLatin1String("A")) {
node->listStyle = QTextListFormat::ListUpperAlpha;
+ } else if (value == QLatin1String("i")) {
+ node->listStyle = QTextListFormat::ListLowerRoman;
+ } else if (value == QLatin1String("I")) {
+ node->listStyle = QTextListFormat::ListUpperRoman;
} else {
value = value.toLower();
if (value == QLatin1String("square"))
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp
index addd7a5..02b1c63 100644
--- a/src/gui/text/qtextlist.cpp
+++ b/src/gui/text/qtextlist.cpp
@@ -212,6 +212,55 @@ QString QTextList::itemText(const QTextBlock &blockIt) const
}
}
break;
+ case QTextListFormat::ListLowerRoman:
+ case QTextListFormat::ListUpperRoman:
+ {
+ if (item < 5000) {
+ QByteArray romanNumeral;
+
+ // works for up to 4999 items
+ static const char romanSymbolsLower[] = "iiivixxxlxcccdcmmmm";
+ static const char romanSymbolsUpper[] = "IIIVIXXXLXCCCDCMMMM";
+ QByteArray romanSymbols; // wrap to have "mid"
+ if (style == QTextListFormat::ListLowerRoman)
+ romanSymbols = QByteArray::fromRawData(romanSymbolsLower, sizeof(romanSymbolsLower));
+ else
+ romanSymbols = QByteArray::fromRawData(romanSymbolsUpper, sizeof(romanSymbolsUpper));
+
+ int c[] = { 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000 };
+ int n = item;
+ for (int i = 12; i >= 0; n %= c[i], i--) {
+ int q = n / c[i];
+ if (q > 0) {
+ int startDigit = i + (i+3)/4;
+ int numDigits;
+ if (i % 4) {
+ // c[i] == 4|5|9|40|50|90|400|500|900
+ if ((i-2) % 4) {
+ // c[i] == 4|9|40|90|400|900 => with substraction (IV, IX, XL, XC, ...)
+ numDigits = 2;
+ }
+ else {
+ // c[i] == 5|50|500 (V, L, D)
+ numDigits = 1;
+ }
+ }
+ else {
+ // c[i] == 1|10|100|1000 (I, II, III, X, XX, ...)
+ numDigits = q;
+ }
+
+ romanNumeral.append(romanSymbols.mid(startDigit, numDigits));
+ }
+ }
+ result = QString::fromLatin1(romanNumeral);
+ }
+ else {
+ result = QLatin1String("?");
+ }
+
+ }
+ break;
default:
Q_ASSERT(false);
}
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index b0c16ee..883cf80 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -174,6 +174,10 @@ static QString bulletChar(QTextListFormat::Style style)
return QString::fromLatin1("a");
case QTextListFormat::ListUpperAlpha:
return QString::fromLatin1("A");
+ case QTextListFormat::ListLowerRoman:
+ return QString::fromLatin1("i");
+ case QTextListFormat::ListUpperRoman:
+ return QString::fromLatin1("I");
default:
case QTextListFormat::ListStyleUndefined:
return QString();
@@ -619,7 +623,9 @@ void QTextOdfWriter::writeListFormat(QXmlStreamWriter &writer, QTextListFormat f
QTextListFormat::Style style = format.style();
if (style == QTextListFormat::ListDecimal || style == QTextListFormat::ListLowerAlpha
- || style == QTextListFormat::ListUpperAlpha) {
+ || style == QTextListFormat::ListUpperAlpha
+ || style == QTextListFormat::ListLowerRoman
+ || style == QTextListFormat::ListUpperRoman) {
writer.writeStartElement(textNS, QString::fromLatin1("list-level-style-number"));
writer.writeAttribute(styleNS, QString::fromLatin1("num-format"), bulletChar(style));
writer.writeAttribute(styleNS, QString::fromLatin1("num-suffix"), QString::fromLatin1("."));
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 5fbc36d..ccb4e6b 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -56,13 +56,23 @@
#if defined(Q_OS_WIN)
#undef S_IFREG
#define S_IFREG 0100000
-# define S_ISDIR(x) ((x) & 0040000) > 0
-# define S_ISREG(x) ((x) & 0170000) == S_IFREG
+# ifndef S_ISDIR
+# define S_ISDIR(x) ((x) & 0040000) > 0
+# endif
+# ifndef S_ISREG
+# define S_ISREG(x) ((x) & 0170000) == S_IFREG
+# endif
# define S_IFLNK 020000
# define S_ISLNK(x) ((x) & S_IFLNK) > 0
-# define S_IRUSR 0400
-# define S_IWUSR 0200
-# define S_IXUSR 0100
+# ifndef S_IRUSR
+# define S_IRUSR 0400
+# endif
+# ifndef S_IWUSR
+# define S_IWUSR 0200
+# endif
+# ifndef S_IXUSR
+# define S_IXUSR 0100
+# endif
# define S_IRGRP 0040
# define S_IWGRP 0020
# define S_IXGRP 0010
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 3d25f13..bf1fa6a 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -134,7 +134,7 @@
To provide completions, QCompleter needs to know the path from an index.
This is provided by pathFromIndex(). The default implementation of
- pathFromIndex(), returns the data for the \l{Qt::EditRole}{edit role}
+ pathFromIndex(), returns the data for the \l{Qt::EditRole}{edit role}
for list models and the absolute file path if the mode is a QDirModel.
\sa QAbstractItemModel, QLineEdit, QComboBox, {Completer Example}
@@ -772,7 +772,7 @@ QMatchData QUnsortedModelEngine::filter(const QString& part, const QModelIndex&
///////////////////////////////////////////////////////////////////////////////
QCompleterPrivate::QCompleterPrivate()
: widget(0), proxy(0), popup(0), cs(Qt::CaseSensitive), role(Qt::EditRole), column(0),
- sorting(QCompleter::UnsortedModel), wrap(true), eatFocusOut(true)
+ sorting(QCompleter::UnsortedModel), wrap(true), maxVisibleItems(7), eatFocusOut(true)
{
}
@@ -861,7 +861,7 @@ void QCompleterPrivate::showPopup(const QRect& rect)
Qt::LayoutDirection dir = widget->layoutDirection();
QPoint pos;
int rw, rh, w;
- int h = (popup->sizeHintForRow(0) * qMin(7, popup->model()->rowCount()) + 3) + 3;
+ int h = (popup->sizeHintForRow(0) * qMin(maxVisibleItems, popup->model()->rowCount()) + 3) + 3;
QScrollBar *hsb = popup->horizontalScrollBar();
if (hsb && hsb->isVisible())
h += popup->horizontalScrollBar()->sizeHint().height();
@@ -1182,7 +1182,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e)
case Qt::Key_Up:
if (!curIndex.isValid()) {
int rowCount = d->proxy->rowCount();
- QModelIndex lastIndex = d->proxy->index(rowCount - 1, 0);
+ QModelIndex lastIndex = d->proxy->index(rowCount - 1, d->column);
d->setCurrentIndex(lastIndex);
return true;
} else if (curIndex.row() == 0) {
@@ -1194,7 +1194,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e)
case Qt::Key_Down:
if (!curIndex.isValid()) {
- QModelIndex firstIndex = d->proxy->index(0, 0);
+ QModelIndex firstIndex = d->proxy->index(0, d->column);
d->setCurrentIndex(firstIndex);
return true;
} else if (curIndex.row() == d->proxy->rowCount() - 1) {
@@ -1510,6 +1510,30 @@ bool QCompleter::wrapAround() const
}
/*!
+ \property QCompleter::maxVisibleItems
+ \brief the maximum allowed size on screen of the completer, measured in items
+ \since 4.6
+
+ By default, this property has a value of 7.
+*/
+int QCompleter::maxVisibleItems() const
+{
+ Q_D(const QCompleter);
+ return d->maxVisibleItems;
+}
+
+void QCompleter::setMaxVisibleItems(int maxItems)
+{
+ Q_D(QCompleter);
+ if (maxItems < 0) {
+ qWarning("QCompleter::setMaxVisibleItems: "
+ "Invalid max visible items (%d) must be >= 0", maxItems);
+ return;
+ }
+ d->maxVisibleItems = maxItems;
+}
+
+/*!
\property QCompleter::caseSensitivity
\brief the case sensitivity of the matching
@@ -1582,6 +1606,10 @@ QString QCompleter::currentCompletion() const
that contains all the possible matches for the current completion prefix.
The completion model is auto-updated to reflect the current completions.
+ \note The return value of this function is defined to be an QAbstractItemModel
+ purely for generality. This actual kind of model returned is an instance of an
+ QAbstractProxyModel subclass.
+
\sa completionPrefix, model()
*/
QAbstractItemModel *QCompleter::completionModel() const
diff --git a/src/gui/util/qcompleter.h b/src/gui/util/qcompleter.h
index c1169ef..a419154 100644
--- a/src/gui/util/qcompleter.h
+++ b/src/gui/util/qcompleter.h
@@ -69,6 +69,7 @@ class Q_GUI_EXPORT QCompleter : public QObject
Q_PROPERTY(CompletionMode completionMode READ completionMode WRITE setCompletionMode)
Q_PROPERTY(int completionColumn READ completionColumn WRITE setCompletionColumn)
Q_PROPERTY(int completionRole READ completionRole WRITE setCompletionRole)
+ Q_PROPERTY(int maxVisibleItems READ maxVisibleItems WRITE setMaxVisibleItems)
Q_PROPERTY(Qt::CaseSensitivity caseSensitivity READ caseSensitivity WRITE setCaseSensitivity)
Q_PROPERTY(bool wrapAround READ wrapAround WRITE setWrapAround)
@@ -118,6 +119,9 @@ public:
bool wrapAround() const;
+ int maxVisibleItems() const;
+ void setMaxVisibleItems(int maxItems);
+
int completionCount() const;
bool setCurrentRow(int row);
int currentRow() const;
diff --git a/src/gui/util/qcompleter_p.h b/src/gui/util/qcompleter_p.h
index dc4189f..288f531 100644
--- a/src/gui/util/qcompleter_p.h
+++ b/src/gui/util/qcompleter_p.h
@@ -87,6 +87,7 @@ public:
Qt::CaseSensitivity cs;
int role;
int column;
+ int maxVisibleItems;
QCompleter::ModelSorting sorting;
bool wrap;
diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp
index 2cc478d..62ab2f7 100644
--- a/src/gui/util/qdesktopservices_win.cpp
+++ b/src/gui/util/qdesktopservices_win.cpp
@@ -47,7 +47,7 @@
#include <qtemporaryfile.h>
#include <qcoreapplication.h>
-#include <windows.h>
+#include <qt_windows.h>
#include <shlobj.h>
#if !defined(Q_OS_WINCE)
# include <intshcut.h>
@@ -62,33 +62,25 @@
QT_BEGIN_NAMESPACE
-//#undef UNICODE
-
static bool openDocument(const QUrl &file)
{
if (!file.isValid())
return false;
-
- quintptr returnValue;
- QT_WA({
- returnValue = (quintptr)ShellExecute(0, 0, (TCHAR *)file.toString().utf16(), 0, 0, SW_SHOWNORMAL);
- } , {
- returnValue = (quintptr)ShellExecuteA(0, 0, file.toString().toLocal8Bit().constData(), 0, 0, SW_SHOWNORMAL);
- });
+ QString filePath = file.toLocalFile();
+ if (filePath.isEmpty())
+ filePath = file.toString();
+ quintptr returnValue = (quintptr)ShellExecute(0, 0, (wchar_t*)filePath.utf16(), 0, 0, SW_SHOWNORMAL);
return (returnValue > 32); //ShellExecute returns a value greater than 32 if successful
}
static QString expandEnvStrings(const QString &command)
{
-
#if defined(Q_OS_WINCE)
return command;
#else
- QByteArray path = command.toLocal8Bit();
- char commandValue[2 * MAX_PATH] = {0};
- DWORD returnValue = ExpandEnvironmentStringsA(path.data(), commandValue, MAX_PATH);
- if (returnValue)
- return QString::fromLocal8Bit(commandValue);
+ wchar_t buffer[MAX_PATH];
+ if (ExpandEnvironmentStrings((wchar_t*)command.utf16(), buffer, MAX_PATH))
+ return QString::fromWCharArray(buffer);
else
return command;
#endif
@@ -129,8 +121,9 @@ static bool launchWebBrowser(const QUrl &url)
command = QString::fromRawData((QChar*)keyValue, bufferSize);
RegCloseKey(handle);
- if(returnValue)
+ if (returnValue)
return false;
+
command = expandEnvStrings(command);
command = command.trimmed();
//Make sure the path for the process is in quotes
@@ -152,7 +145,7 @@ static bool launchWebBrowser(const QUrl &url)
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
- returnValue = CreateProcess(NULL, (TCHAR*)command.utf16(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
+ returnValue = CreateProcess(NULL, (wchar_t*)command.utf16(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
if (!returnValue)
return false;
@@ -168,9 +161,8 @@ static bool launchWebBrowser(const QUrl &url)
if (url.scheme().isEmpty())
return openDocument(url);
- quintptr returnValue;
- returnValue = (quintptr)ShellExecute(0, 0, (TCHAR *) QString::fromUtf8(url.toEncoded().constData()).utf16(),
- 0, 0, SW_SHOWNORMAL);
+ quintptr returnValue = (quintptr)ShellExecute(0, 0, (wchar_t *)QString::fromUtf8(url.toEncoded().constData()).utf16(),
+ 0, 0, SW_SHOWNORMAL);
return (returnValue > 32);
}
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index d2ce1be..85eae26 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -41,8 +41,7 @@
#include "qsystemtrayicon_p.h"
#ifndef QT_NO_SYSTEMTRAYICON
-//#define _WIN32_IE 0x0500
-#define _WIN32_IE 0x0600 //required for NOTIFYICONDATAW_V2_SIZE
+#define _WIN32_IE 0x0600 //required for NOTIFYICONDATA_V2_SIZE
//missing defines for MINGW :
#ifndef NIN_BALLOONTIMEOUT
@@ -77,25 +76,14 @@ static const UINT q_uNOTIFYICONID = 0;
static uint MYWM_TASKBARCREATED = 0;
#define MYWM_NOTIFYICON (WM_APP+101)
-typedef BOOL (WINAPI *PtrShell_NotifyIcon)(DWORD,PNOTIFYICONDATA);
-static PtrShell_NotifyIcon ptrShell_NotifyIcon = 0;
+struct Q_NOTIFYICONIDENTIFIER {
+ DWORD cbSize;
+ HWND hWnd;
+ UINT uID;
+ GUID guidItem;
+};
-static void resolveLibs()
-{
- static bool triedResolve = false;
-#if defined Q_OS_WINCE
- QString libName(QLatin1String("coredll"));
- const char* funcName = "Shell_NotifyIcon";
-#else
- QString libName(QLatin1String("shell32"));
- const char* funcName = "Shell_NotifyIconW";
-#endif
- if (!triedResolve) {
- QLibrary lib(libName);
- triedResolve = true;
- ptrShell_NotifyIcon = (PtrShell_NotifyIcon) lib.resolve(funcName);
- }
-}
+typedef HRESULT (WINAPI *PtrShell_NotifyIconGetRect)(const Q_NOTIFYICONIDENTIFIER* identifier, RECT* iconLocation);
class QSystemTrayIconSys : QWidget
{
@@ -103,37 +91,26 @@ public:
QSystemTrayIconSys(QSystemTrayIcon *object);
~QSystemTrayIconSys();
bool winEvent( MSG *m, long *result );
- bool trayMessageA(DWORD msg);
- bool trayMessageW(DWORD msg);
bool trayMessage(DWORD msg);
bool iconDrawItem(LPDRAWITEMSTRUCT lpdi);
- void setIconContentsW(NOTIFYICONDATAW &data);
- void setIconContentsA(NOTIFYICONDATAA &data);
- bool showMessageW(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs);
- bool showMessageA(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs);
+ void setIconContents(NOTIFYICONDATA &data);
+ bool showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs);
bool allowsMessages();
bool supportsMessages();
QRect findIconGeometry(const int a_iButtonID);
- QRect findTrayGeometry();
HBITMAP createIconMask(const QBitmap &bitmap);
void createIcon();
- int detectShellVersion() const;
HICON hIcon;
QPoint globalPos;
QSystemTrayIcon *q;
private:
- uint notifyIconSizeW;
- uint notifyIconSizeA;
- int currentShellVersion;
+ uint notifyIconSize;
int maxTipLength;
};
-// Checks for the shell32 dll version number, since only version
-// 5 or later of supports ballon messages
bool QSystemTrayIconSys::allowsMessages()
{
#ifndef QT_NO_SETTINGS
-
QSettings settings(QLatin1String("HKEY_CURRENT_USER\\Software\\Microsoft"
"\\Windows\\CurrentVersion\\Explorer\\Advanced"), QSettings::NativeFormat);
return settings.value(QLatin1String("EnableBalloonTips"), true).toBool();
@@ -142,63 +119,28 @@ bool QSystemTrayIconSys::allowsMessages()
#endif
}
-// Checks for the shell32 dll version number, since only version
-// 5 or later of supports ballon messages
bool QSystemTrayIconSys::supportsMessages()
{
-#if NOTIFYICON_VERSION >= 3
- if (currentShellVersion >= 5)
- return allowsMessages();
- else
-#endif
- return false;
-}
-
-//Returns the runtime major version of the shell32 dll
-int QSystemTrayIconSys::detectShellVersion() const
-{
#ifndef Q_OS_WINCE
- int shellVersion = 4; //NT 4.0 and W95
- DLLGETVERSIONPROC pDllGetVersion = (DLLGETVERSIONPROC)QLibrary::resolve(
- QLatin1String("shell32"), "DllGetVersion");
- if (pDllGetVersion)
- {
- DLLVERSIONINFO dvi;
- HRESULT hr;
- ZeroMemory(&dvi, sizeof(dvi));
- dvi.cbSize = sizeof(dvi);
- hr = (*pDllGetVersion)(&dvi);
- if (SUCCEEDED(hr)) {
- if (dvi.dwMajorVersion >= 5)
- {
- shellVersion = dvi.dwMajorVersion;
- }
- }
- }
- return shellVersion;
+ return allowsMessages();
#endif
- return 4; //No ballonMessages and MaxTipLength = 64 for WindowsCE
+ return false;
}
QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object)
: hIcon(0), q(object)
{
- currentShellVersion = detectShellVersion();
- notifyIconSizeA = FIELD_OFFSET(NOTIFYICONDATAA, szTip[64]); // NOTIFYICONDATAA_V1_SIZE
- notifyIconSizeW = FIELD_OFFSET(NOTIFYICONDATAW, szTip[64]); // NOTIFYICONDATAW_V1_SIZE;
+#ifndef Q_OS_WINCE
+ notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE;
+ maxTipLength = 128;
+#else
+ notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, szTip[64]); // NOTIFYICONDATAW_V1_SIZE;
maxTipLength = 64;
-
-#if NOTIFYICON_VERSION >= 3
- if (currentShellVersion >=5) {
- notifyIconSizeA = FIELD_OFFSET(NOTIFYICONDATAA, guidItem); // NOTIFYICONDATAA_V2_SIZE
- notifyIconSizeW = FIELD_OFFSET(NOTIFYICONDATAW, guidItem); // NOTIFYICONDATAW_V2_SIZE;
- maxTipLength = 128;
- }
#endif
// For restoring the tray icon after explorer crashes
if (!MYWM_TASKBARCREATED) {
- MYWM_TASKBARCREATED = QT_WA_INLINE(RegisterWindowMessageW(L"TaskbarCreated"),RegisterWindowMessageA("TaskbarCreated"));
+ MYWM_TASKBARCREATED = RegisterWindowMessage(L"TaskbarCreated");
}
}
@@ -208,118 +150,60 @@ QSystemTrayIconSys::~QSystemTrayIconSys()
DestroyIcon(hIcon);
}
-void QSystemTrayIconSys::setIconContentsW(NOTIFYICONDATAW &tnd)
-{
- tnd.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
- tnd.uCallbackMessage = MYWM_NOTIFYICON;
- tnd.hIcon = hIcon;
- QString tip = q->toolTip();
-
- if (!tip.isNull()) {
- // Tip is limited to maxTipLength - NULL; lstrcpyn appends a NULL terminator.
- tip = tip.left(maxTipLength - 1) + QChar();
-#if defined(Q_OS_WINCE)
- wcsncpy(tnd.szTip, reinterpret_cast<const wchar_t *> (tip.utf16()), qMin(tip.length()+1, maxTipLength));
-#else
- lstrcpynW(tnd.szTip, (TCHAR*)tip.utf16(), qMin(tip.length()+1, maxTipLength));
-#endif
- }
-}
-
-void QSystemTrayIconSys::setIconContentsA(NOTIFYICONDATAA &tnd)
+void QSystemTrayIconSys::setIconContents(NOTIFYICONDATA &tnd)
{
- tnd.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
+ tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
tnd.uCallbackMessage = MYWM_NOTIFYICON;
tnd.hIcon = hIcon;
QString tip = q->toolTip();
if (!tip.isNull()) {
- // Tip is limited to maxTipLength - NULL; lstrcpyn appends a NULL terminator.
tip = tip.left(maxTipLength - 1) + QChar();
-#if defined(Q_OS_WINCE)
- strncpy(tnd.szTip, tip.toLocal8Bit().constData(), qMin(tip.length()+1, maxTipLength));
-#else
- lstrcpynA(tnd.szTip, tip.toLocal8Bit().constData(), qMin(tip.length()+1, maxTipLength));
-#endif
+ memcpy(tnd.szTip, tip.utf16(), qMin(tip.length() + 1, maxTipLength) * sizeof(wchar_t));
}
}
-int iconFlag( QSystemTrayIcon::MessageIcon icon )
+static int iconFlag( QSystemTrayIcon::MessageIcon icon )
{
- int flag = 0;
#if NOTIFYICON_VERSION >= 3
switch (icon) {
- case QSystemTrayIcon::NoIcon:
- break;
- case QSystemTrayIcon::Critical:
- flag = NIIF_ERROR;
- break;
- case QSystemTrayIcon::Warning:
- flag = NIIF_WARNING;
- break;
case QSystemTrayIcon::Information:
- default : // fall through
- flag = NIIF_INFO;
+ return NIIF_INFO;
+ case QSystemTrayIcon::Warning:
+ return NIIF_WARNING;
+ case QSystemTrayIcon::Critical:
+ return NIIF_ERROR;
+ case QSystemTrayIcon::NoIcon:
+ return NIIF_NONE;
+ default:
+ Q_ASSERT_X(false, "QSystemTrayIconSys::showMessage", "Invalid QSystemTrayIcon::MessageIcon value");
+ return NIIF_NONE;
}
#else
Q_UNUSED(icon);
+ return 0;
#endif
- return flag;
}
-bool QSystemTrayIconSys::showMessageW(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs)
+bool QSystemTrayIconSys::showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs)
{
-#if NOTIFYICON_VERSION>=3
+#if NOTIFYICON_VERSION >= 3
NOTIFYICONDATA tnd;
- memset(&tnd, 0, notifyIconSizeW);
+ memset(&tnd, 0, notifyIconSize);
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
- setIconContentsW(tnd);
-#if defined(Q_OS_WINCE)
- wcsncpy(tnd.szInfo, message.utf16(), qMin(message.length() + 1, 256));
- wcsncpy(tnd.szInfoTitle, title.utf16(), qMin(title.length()+1, 64));
-#else
- lstrcpynW(tnd.szInfo, (TCHAR*)message.utf16(), qMin(message.length() + 1, 256));
- lstrcpynW(tnd.szInfoTitle, (TCHAR*)title.utf16(), qMin(title.length() + 1, 64));
-#endif
- tnd.uID = q_uNOTIFYICONID;
- tnd.dwInfoFlags = iconFlag(type);
- tnd.cbSize = notifyIconSizeW;
- tnd.hWnd = winId();
- tnd.uTimeout = uSecs;
- tnd.uFlags = NIF_INFO;
- return ptrShell_NotifyIcon(NIM_MODIFY, &tnd);
-#else
- Q_UNUSED(title);
- Q_UNUSED(message);
- Q_UNUSED(type);
- Q_UNUSED(uSecs);
- return false;
-#endif
-}
-
-bool QSystemTrayIconSys::showMessageA(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs)
-{
-#if NOTIFYICON_VERSION>=3
- NOTIFYICONDATAA tnd;
- memset(&tnd, 0, notifyIconSizeA);
- Q_ASSERT(testAttribute(Qt::WA_WState_Created));
+ setIconContents(tnd);
+ memcpy(tnd.szInfo, message.utf16(), qMin(message.length() + 1, 256) * sizeof(wchar_t));
+ memcpy(tnd.szInfoTitle, title.utf16(), qMin(title.length() + 1, 64) * sizeof(wchar_t));
- setIconContentsA(tnd);
-#if defined(Q_OS_WINCE)
- strncpy(tnd.szInfo, message.toLocal8Bit().constData(), qMin(message.length() + 1, 256));
- strncpy(tnd.szInfoTitle, title.toLocal8Bit().constData(), qMin(title.length()+1, 64));
-#else
- lstrcpynA(tnd.szInfo, message.toLocal8Bit().constData(), qMin(message.length() + 1, 256));
- lstrcpynA(tnd.szInfoTitle, title.toLocal8Bit().constData(), qMin(title.length() + 1, 64));
-#endif
tnd.uID = q_uNOTIFYICONID;
tnd.dwInfoFlags = iconFlag(type);
- tnd.cbSize = notifyIconSizeA;
+ tnd.cbSize = notifyIconSize;
tnd.hWnd = winId();
tnd.uTimeout = uSecs;
tnd.uFlags = NIF_INFO;
- return Shell_NotifyIconA(NIM_MODIFY, &tnd);
+
+ return Shell_NotifyIcon(NIM_MODIFY, &tnd);
#else
Q_UNUSED(title);
Q_UNUSED(message);
@@ -329,53 +213,21 @@ bool QSystemTrayIconSys::showMessageA(const QString &title, const QString &messa
#endif
}
-bool QSystemTrayIconSys::trayMessageA(DWORD msg)
+bool QSystemTrayIconSys::trayMessage(DWORD msg)
{
-#if !defined(Q_WS_WINCE)
- NOTIFYICONDATAA tnd;
- memset(&tnd, 0, notifyIconSizeA);
+ NOTIFYICONDATA tnd;
+ memset(&tnd, 0, notifyIconSize);
tnd.uID = q_uNOTIFYICONID;
- tnd.cbSize = notifyIconSizeA;
+ tnd.cbSize = notifyIconSize;
tnd.hWnd = winId();
- Q_ASSERT(testAttribute(Qt::WA_WState_Created));
- if (msg != NIM_DELETE) {
- setIconContentsA(tnd);
- }
- return Shell_NotifyIconA(msg, &tnd);
-#else
- Q_UNUSED(msg);
- return false;
-#endif
-}
-
-bool QSystemTrayIconSys::trayMessageW(DWORD msg)
-{
- NOTIFYICONDATAW tnd;
- memset(&tnd, 0, notifyIconSizeW);
- tnd.uID = q_uNOTIFYICONID;
- tnd.cbSize = notifyIconSizeW;
- tnd.hWnd = winId();
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
if (msg != NIM_DELETE) {
- setIconContentsW(tnd);
+ setIconContents(tnd);
}
- return ptrShell_NotifyIcon(msg, &tnd);
-}
-
-bool QSystemTrayIconSys::trayMessage(DWORD msg)
-{
- resolveLibs();
- if (!(ptrShell_NotifyIcon))
- return false;
- QT_WA({
- return trayMessageW(msg);
- },
- {
- return trayMessageA(msg);
- });
+ return Shell_NotifyIcon(msg, &tnd);
}
bool QSystemTrayIconSys::iconDrawItem(LPDRAWITEMSTRUCT lpdi)
@@ -462,7 +314,6 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
emit q->activated(QSystemTrayIcon::Trigger);
break;
-#if !defined(Q_WS_WINCE)
case WM_LBUTTONDBLCLK:
emit q->activated(QSystemTrayIcon::DoubleClick);
break;
@@ -470,20 +321,30 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
case WM_RBUTTONUP:
if (q->contextMenu()) {
q->contextMenu()->popup(gpos);
+#if defined(Q_WS_WINCE)
+ // We must ensure that the popup menu doesn't show up behind the task bar.
+ QRect desktopRect = qApp->desktop()->availableGeometry();
+ int maxY = desktopRect.y() + desktopRect.height() - q->contextMenu()->height();
+ if (gpos.y() > maxY) {
+ gpos.ry() = maxY;
+ q->contextMenu()->move(gpos);
+ }
+#endif
q->contextMenu()->activateWindow();
//Must be activated for proper keyboardfocus and menu closing on windows:
}
emit q->activated(QSystemTrayIcon::Context);
break;
+#if !defined(Q_WS_WINCE)
case NIN_BALLOONUSERCLICK:
emit q->messageClicked();
break;
+#endif
case WM_MBUTTONUP:
emit q->activated(QSystemTrayIcon::MiddleClick);
break;
-#endif
default:
break;
}
@@ -514,33 +375,6 @@ void QSystemTrayIconPrivate::install_sys()
}
}
-//fallback on win 95/98
-QRect QSystemTrayIconSys::findTrayGeometry()
-{
- //Use lower right corner as fallback
- QPoint brCorner = QApplication::desktop()->screenGeometry().bottomRight();
- QRect ret(brCorner.x() - 10, brCorner.y() - 10, 10, 10);
-#if defined(Q_OS_WINCE)
- HWND trayHandle = FindWindowW(L"Shell_TrayWnd", NULL);
-#else
- HWND trayHandle = FindWindowA("Shell_TrayWnd", NULL);
-#endif
- if (trayHandle) {
-#if defined(Q_OS_WINCE)
- trayHandle = FindWindowW(L"TrayNotifyWnd", NULL);
-#else
- trayHandle = FindWindowExA(trayHandle, NULL, "TrayNotifyWnd", NULL);
-#endif
- if (trayHandle) {
- RECT r;
- if (GetWindowRect(trayHandle, &r)) {
- ret = QRect(r.left, r.top, r.right- r.left, r.bottom - r.top);
- }
- }
- }
- return ret;
-}
-
/*
* This function tries to determine the icon geometry from the tray
*
@@ -548,26 +382,39 @@ QRect QSystemTrayIconSys::findTrayGeometry()
*/
QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
{
+ static PtrShell_NotifyIconGetRect Shell_NotifyIconGetRect =
+ (PtrShell_NotifyIconGetRect)QLibrary::resolve(QLatin1String("shell32"), "Shell_NotifyIconGetRect");
+
+ if (Shell_NotifyIconGetRect) {
+ Q_NOTIFYICONIDENTIFIER nid;
+ memset(&nid, 0, sizeof(nid));
+ nid.cbSize = sizeof(nid);
+ nid.hWnd = winId();
+ nid.uID = iconId;
+
+ RECT rect;
+ HRESULT hr = Shell_NotifyIconGetRect(&nid, &rect);
+ if (SUCCEEDED(hr)) {
+ return QRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
+ }
+ }
+
QRect ret;
TBBUTTON buttonData;
DWORD processID = 0;
-#if defined(Q_OS_WINCE)
- HWND trayHandle = FindWindowW(L"Shell_TrayWnd", NULL);
-#else
- HWND trayHandle = FindWindowA("Shell_TrayWnd", NULL);
-#endif
+ HWND trayHandle = FindWindow(L"Shell_TrayWnd", NULL);
//find the toolbar used in the notification area
if (trayHandle) {
#if defined(Q_OS_WINCE)
- trayHandle = FindWindowW(L"TrayNotifyWnd", NULL);
+ trayHandle = FindWindow(L"TrayNotifyWnd", NULL);
#else
- trayHandle = FindWindowExA(trayHandle, NULL, "TrayNotifyWnd", NULL);
+ trayHandle = FindWindowEx(trayHandle, NULL, L"TrayNotifyWnd", NULL);
#endif
if (trayHandle) {
#if defined(Q_OS_WINCE)
- HWND hwnd = FindWindowW(L"SysPager", NULL);
+ HWND hwnd = FindWindow(L"SysPager", NULL);
#else
HWND hwnd = FindWindowEx(trayHandle, NULL, L"SysPager", NULL);
#endif
@@ -612,10 +459,10 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
DWORD appData[2] = { 0, 0 };
SendMessage(trayHandle, TB_GETBUTTON, toolbarButton , (LPARAM)data);
- if(!ReadProcessMemory(trayProcess, data, &buttonData, sizeof(TBBUTTON), &numBytes))
+ if (!ReadProcessMemory(trayProcess, data, &buttonData, sizeof(TBBUTTON), &numBytes))
continue;
- if(!ReadProcessMemory(trayProcess, (LPVOID) buttonData.dwData, appData, sizeof(appData), &numBytes))
+ if (!ReadProcessMemory(trayProcess, (LPVOID) buttonData.dwData, appData, sizeof(appData), &numBytes))
continue;
int currentIconId = appData[1];
@@ -646,7 +493,6 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
return ret;
}
-
void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, int timeOut)
{
if (!sys || !sys->allowsMessages())
@@ -657,8 +503,6 @@ void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString
uSecs = 10000; //10 sec default
else uSecs = (int)timeOut;
- resolveLibs();
-
//message is limited to 255 chars + NULL
QString messageString;
if (message.isEmpty() && !title.isEmpty())
@@ -670,20 +514,12 @@ void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString
QString titleString = title.left(63) + QChar();
if (sys->supportsMessages()) {
- QT_WA({
- sys->showMessageW(titleString, messageString, type, (unsigned int)uSecs);
- }, {
- sys->showMessageA(titleString, messageString, type, (unsigned int)uSecs);
- });
+ sys->showMessage(titleString, messageString, type, (unsigned int)uSecs);
} else {
- //use fallbacks
- QRect iconPos = sys->findIconGeometry(0);
+ //use fallback
+ QRect iconPos = sys->findIconGeometry(q_uNOTIFYICONID);
if (iconPos.isValid()) {
QBalloonTip::showBalloon(type, title, message, sys->q, iconPos.center(), uSecs, true);
- } else {
- QRect trayRect = sys->findTrayGeometry();
- QBalloonTip::showBalloon(type, title, message, sys->q, QPoint(trayRect.left(),
- trayRect.center().y()), uSecs, false);
}
}
}
@@ -692,7 +528,7 @@ QRect QSystemTrayIconPrivate::geometry_sys() const
{
if (!sys)
return QRect();
- return sys->findIconGeometry(0);
+ return sys->findIconGeometry(q_uNOTIFYICONID);
}
void QSystemTrayIconPrivate::remove_sys()
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index e1beb98..dd92e17 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -51,10 +51,13 @@
#include "qdebug.h"
#include "qboxlayout.h"
#include "qpainter.h"
+#include "qstandardgestures.h"
#include "qabstractscrollarea_p.h"
#include <qwidget.h>
+#include <private/qapplication_p.h>
+
#ifdef Q_WS_MAC
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
@@ -157,6 +160,9 @@ QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate()
:hbar(0), vbar(0), vbarpolicy(Qt::ScrollBarAsNeeded), hbarpolicy(Qt::ScrollBarAsNeeded),
viewport(0), cornerWidget(0), left(0), top(0), right(0), bottom(0),
xoffset(0), yoffset(0), viewportFilter(0)
+#ifdef Q_WS_WIN
+ , singleFingerPanEnabled(false)
+#endif
{
}
@@ -290,6 +296,32 @@ void QAbstractScrollAreaPrivate::init()
layoutChildren();
}
+void QAbstractScrollAreaPrivate::setupGestures()
+{
+#ifdef Q_OS_WIN
+ if (!viewport)
+ return;
+ QApplicationPrivate* getQApplicationPrivateInternal();
+ QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ bool needh = (hbarpolicy == Qt::ScrollBarAlwaysOn
+ || (hbarpolicy == Qt::ScrollBarAsNeeded && hbar->minimum() < hbar->maximum()));
+
+ bool needv = (vbarpolicy == Qt::ScrollBarAlwaysOn
+ || (vbarpolicy == Qt::ScrollBarAsNeeded && vbar->minimum() < vbar->maximum()));
+ if (qAppPriv->SetGestureConfig && (needh || needv)) {
+ GESTURECONFIG gc[1];
+ gc[0].dwID = GID_PAN;
+ gc[0].dwWant = GC_PAN;
+ gc[0].dwBlock = 0;
+ if (needv && singleFingerPanEnabled)
+ gc[0].dwWant |= GC_PAN_WITH_SINGLE_FINGER_VERTICALLY;
+ if (needh && singleFingerPanEnabled)
+ gc[0].dwWant |= GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY;
+ qAppPriv->SetGestureConfig(viewport->winId(), 0, 1, gc, sizeof(gc));
+ }
+#endif // Q_OS_WIN
+}
+
void QAbstractScrollAreaPrivate::layoutChildren()
{
Q_Q(QAbstractScrollArea);
@@ -459,9 +491,6 @@ void QAbstractScrollAreaPrivate::layoutChildren()
viewport->setGeometry(QStyle::visualRect(opt.direction, opt.rect, viewportRect)); // resize the viewport last
}
-// ### Fix for 4.4, talk to Bjoern E or Girish.
-void QAbstractScrollAreaPrivate::scrollBarPolicyChanged(Qt::Orientation, Qt::ScrollBarPolicy) {}
-
/*!
\internal
@@ -909,7 +938,6 @@ bool QAbstractScrollArea::event(QEvent *e)
case QEvent::DragMove:
case QEvent::DragLeave:
#endif
- case QEvent::Gesture:
return false;
case QEvent::StyleChange:
case QEvent::LayoutDirectionChange:
@@ -1239,6 +1267,7 @@ void QAbstractScrollAreaPrivate::_q_vslide(int y)
void QAbstractScrollAreaPrivate::_q_showOrHideScrollBars()
{
layoutChildren();
+ setupGestures();
}
QPoint QAbstractScrollAreaPrivate::contentsOffset() const
diff --git a/src/gui/widgets/qabstractscrollarea_p.h b/src/gui/widgets/qabstractscrollarea_p.h
index 71a83cc..aef8ac5 100644
--- a/src/gui/widgets/qabstractscrollarea_p.h
+++ b/src/gui/widgets/qabstractscrollarea_p.h
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QScrollBar;
class QAbstractScrollAreaScrollBarContainer;
-class QAbstractScrollAreaPrivate: public QFramePrivate
+class Q_AUTOTEST_EXPORT QAbstractScrollAreaPrivate: public QFramePrivate
{
Q_DECLARE_PUBLIC(QAbstractScrollArea)
@@ -88,7 +88,7 @@ public:
void init();
void layoutChildren();
// ### Fix for 4.4, talk to Bjoern E or Girish.
- virtual void scrollBarPolicyChanged(Qt::Orientation, Qt::ScrollBarPolicy);
+ virtual void scrollBarPolicyChanged(Qt::Orientation, Qt::ScrollBarPolicy) {}
void _q_hslide(int);
void _q_vslide(int);
@@ -99,6 +99,11 @@ public:
inline bool viewportEvent(QEvent *event)
{ return q_func()->viewportEvent(event); }
QObject *viewportFilter;
+
+#ifdef Q_WS_WIN
+ bool singleFingerPanEnabled;
+#endif
+ void setupGestures();
};
class QAbstractScrollAreaFilter : public QObject
diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp
index 25acd6e..433406c 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -57,6 +57,9 @@
#include <qpalette.h>
#include <qstylepainter.h>
#include <qdebug.h>
+#ifndef QT_NO_ACCESSIBILITY
+# include <qaccessible.h>
+#endif
#if defined(Q_WS_X11)
#include <limits.h>
@@ -951,6 +954,9 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
d->buttonState = (Keyboard | (up ? Up : Down));
}
stepBy(steps);
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+#endif
return;
}
#ifdef QT_KEYPAD_NAVIGATION
@@ -1548,6 +1554,9 @@ void QAbstractSpinBoxPrivate::updateState(bool up)
spinClickThresholdTimerId = q->startTimer(spinClickThresholdTimerInterval);
buttonState = (up ? (Mouse | Up) : (Mouse | Down));
q->stepBy(up ? 1 : -1);
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::updateAccessibility(q, 0, QAccessible::ValueChanged);
+#endif
}
}
@@ -1568,7 +1577,7 @@ void QAbstractSpinBox::initStyleOption(QStyleOptionSpinBox *option) const
option->initFrom(this);
option->activeSubControls = QStyle::SC_None;
option->buttonSymbols = d->buttonSymbols;
- option->subControls = QStyle::SC_SpinBoxFrame;
+ option->subControls = QStyle::SC_SpinBoxFrame | QStyle::SC_SpinBoxEditField;
if (d->buttonSymbols != QAbstractSpinBox::NoButtons) {
option->subControls |= QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown;
if (d->buttonState & Up) {
diff --git a/src/gui/widgets/qabstractspinbox_p.h b/src/gui/widgets/qabstractspinbox_p.h
index 15f5d97..0d00e04 100644
--- a/src/gui/widgets/qabstractspinbox_p.h
+++ b/src/gui/widgets/qabstractspinbox_p.h
@@ -135,8 +135,6 @@ public:
mutable QValidator::State cachedState;
mutable QSize cachedSizeHint, cachedMinimumSizeHint;
uint pendingEmit : 1;
- uint spindownEnabled : 1;
- uint spinupEnabled : 1;
uint readOnly : 1;
uint wrapping : 1;
uint ignoreCursorPositionChanged : 1;
diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac.mm b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
index 894028e..10fe9b0 100644
--- a/src/gui/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
@@ -43,6 +43,7 @@
#ifdef QT_MAC_USE_COCOA
#include <private/qmainwindowlayout_p.h>
#include <private/qt_mac_p.h>
+#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qcocoaview_mac_p.h>
#include <private/qwidget_p.h>
#include <qtoolbar.h>
@@ -99,7 +100,7 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
{
Q_UNUSED(flag);
Q_UNUSED(nstoolbar);
- QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(QCFString::toQString(CFStringRef(itemIdentifier)));
+ QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString(itemIdentifier));
NSToolbarItem *item = nil;
if (tb) {
item = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier];
@@ -111,7 +112,7 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
- (void)toolbarWillAddItem:(NSNotification *)notification
{
NSToolbarItem *item = [[notification userInfo] valueForKey:@"item"];
- QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(QCFString::toQString(CFStringRef([item itemIdentifier])));
+ QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString([item itemIdentifier]));
if (!tb)
return; // I can't really do anything about this.
[item retain];
@@ -119,12 +120,9 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
NSArray *items = [[qt_mac_window_for(mainWindowLayout->layoutState.mainWindow->window()) toolbar] items];
int someIndex = 0;
- bool foundItem = false;
for (NSToolbarItem *i in items) {
- if (i == item) {
- foundItem = true;
+ if (i == item)
break;
- }
++someIndex;
}
mainWindowLayout->toolbarItemsCopy.insert(someIndex, item);
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 1ca878d..097f3d0 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -148,8 +148,10 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
menuOption.rect = option.rect;
// Make sure fonts set on the combo box also overrides the font for the popup menu.
- if (mCombo->testAttribute(Qt::WA_SetFont) || mCombo->testAttribute(Qt::WA_MacSmallSize)
- || mCombo->testAttribute(Qt::WA_MacMiniSize))
+ if (mCombo->testAttribute(Qt::WA_SetFont)
+ || mCombo->testAttribute(Qt::WA_MacSmallSize)
+ || mCombo->testAttribute(Qt::WA_MacMiniSize)
+ || mCombo->font() != qt_app_fonts_hash()->value("QComboBox", QFont()))
menuOption.font = mCombo->font();
else
menuOption.font = qt_app_fonts_hash()->value("QComboMenuItem", mCombo->font());
diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp
index 1a5fa8d..5ddf7f7 100644
--- a/src/gui/widgets/qdatetimeedit.cpp
+++ b/src/gui/widgets/qdatetimeedit.cpp
@@ -1934,7 +1934,6 @@ QDateTime QDateTimeEditPrivate::validateAndInterpret(QString &input, int &positi
/*!
\internal
- \reimp
*/
QString QDateTimeEditPrivate::textFromValue(const QVariant &f) const
@@ -1945,7 +1944,6 @@ QString QDateTimeEditPrivate::textFromValue(const QVariant &f) const
/*!
\internal
- \reimp
This function's name is slightly confusing; it is not to be confused
with QAbstractSpinBox::valueFromText().
@@ -2103,7 +2101,6 @@ QDateTime QDateTimeEditPrivate::stepBy(int sectionIndex, int steps, bool test) c
/*!
\internal
- \reimp
*/
void QDateTimeEditPrivate::emitSignals(EmitPolicy ep, const QVariant &old)
@@ -2133,7 +2130,6 @@ void QDateTimeEditPrivate::emitSignals(EmitPolicy ep, const QVariant &old)
/*!
\internal
- \reimp
*/
void QDateTimeEditPrivate::_q_editorCursorPositionChanged(int oldpos, int newpos)
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index 9828413..ee29b55 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -1488,7 +1488,7 @@ bool QDockAreaLayoutInfo::hasFixedSize() const
void QDockAreaLayoutInfo::apply(bool animate)
{
- QWidgetAnimator *widgetAnimator = mainWindowLayout()->widgetAnimator;
+ QWidgetAnimator &widgetAnimator = mainWindowLayout()->widgetAnimator;
#ifndef QT_NO_TABBAR
if (tabbed) {
@@ -1521,7 +1521,7 @@ void QDockAreaLayoutInfo::apply(bool animate)
}
}
- widgetAnimator->animate(tabBar, tab_rect, animate);
+ widgetAnimator.animate(tabBar, tab_rect, animate);
}
#endif // QT_NO_TABBAR
@@ -1544,7 +1544,7 @@ void QDockAreaLayoutInfo::apply(bool animate)
QWidget *w = item.widgetItem->widget();
QRect geo = w->geometry();
- widgetAnimator->animate(w, r, animate);
+ widgetAnimator.animate(w, r, animate);
if (!w->isHidden()) {
QDockWidget *dw = qobject_cast<QDockWidget*>(w);
if (!r.isValid() && geo.right() >= 0 && geo.bottom() >= 0) {
@@ -1707,7 +1707,7 @@ QDockAreaLayoutItem &QDockAreaLayoutInfo::item(const QList<int> &path)
Q_ASSERT(!path.isEmpty());
const int index = path.first();
if (path.count() > 1) {
- const QDockAreaLayoutItem &item = item_list.at(index);
+ const QDockAreaLayoutItem &item = item_list[index];
Q_ASSERT(item.subinfo != 0);
return item.subinfo->item(path.mid(1));
}
@@ -2074,7 +2074,7 @@ void QDockAreaLayoutInfo::updateTabBar() const
QDockAreaLayoutInfo *that = const_cast<QDockAreaLayoutInfo*>(this);
- if (tabBar == 0) {
+ if (that->tabBar == 0) {
that->tabBar = mainWindowLayout()->getTabBar();
that->tabBar->setShape(static_cast<QTabBar::Shape>(tabBarShape));
that->tabBar->setDrawBase(true);
@@ -3064,13 +3064,13 @@ void QDockAreaLayout::splitDockWidget(QDockWidget *after,
void QDockAreaLayout::apply(bool animate)
{
- QWidgetAnimator *widgetAnimator
+ QWidgetAnimator &widgetAnimator
= qobject_cast<QMainWindowLayout*>(mainWindow->layout())->widgetAnimator;
for (int i = 0; i < QInternal::DockCount; ++i)
docks[i].apply(animate);
if (centralWidgetItem != 0 && !centralWidgetItem->isEmpty()) {
- widgetAnimator->animate(centralWidgetItem->widget(), centralWidgetRect,
+ widgetAnimator.animate(centralWidgetItem->widget(), centralWidgetRect,
animate);
}
diff --git a/src/gui/widgets/qeffects.cpp b/src/gui/widgets/qeffects.cpp
index 065a2e0..f3b1b76 100644
--- a/src/gui/widgets/qeffects.cpp
+++ b/src/gui/widgets/qeffects.cpp
@@ -126,9 +126,9 @@ QAlphaWidget::QAlphaWidget(QWidget* w, Qt::WindowFlags f)
QAlphaWidget::~QAlphaWidget()
{
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
// Restore user-defined opacity value
- if (widget && QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+ if (widget)
widget->setWindowOpacity(windowOpacity);
#endif
}
@@ -160,43 +160,40 @@ void QAlphaWidget::run(int time)
checkTime.start();
showWidget = true;
-#if defined(Q_OS_WIN)
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) {
- qApp->installEventFilter(this);
- widget->setWindowOpacity(0.0);
- widget->show();
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ qApp->installEventFilter(this);
+ widget->setWindowOpacity(0.0);
+ widget->show();
+ connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
+ anim.start(1);
+#else
+ //This is roughly equivalent to calling setVisible(true) without actually showing the widget
+ widget->setAttribute(Qt::WA_WState_ExplicitShowHide, true);
+ widget->setAttribute(Qt::WA_WState_Hidden, false);
+
+ qApp->installEventFilter(this);
+
+ move(widget->geometry().x(),widget->geometry().y());
+ resize(widget->size().width(), widget->size().height());
+
+ frontImage = QPixmap::grabWidget(widget).toImage();
+ backImage = QPixmap::grabWindow(QApplication::desktop()->winId(),
+ widget->geometry().x(), widget->geometry().y(),
+ widget->geometry().width(), widget->geometry().height()).toImage();
+
+ if (!backImage.isNull() && checkTime.elapsed() < duration / 2) {
+ mixedImage = backImage.copy();
+ pm = QPixmap::fromImage(mixedImage);
+ show();
+ setEnabled(false);
+
connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
anim.start(1);
- } else
-#endif
- {
- //This is roughly equivalent to calling setVisible(true) without actually showing the widget
- widget->setAttribute(Qt::WA_WState_ExplicitShowHide, true);
- widget->setAttribute(Qt::WA_WState_Hidden, false);
-
- qApp->installEventFilter(this);
-
- move(widget->geometry().x(),widget->geometry().y());
- resize(widget->size().width(), widget->size().height());
-
- frontImage = QPixmap::grabWidget(widget).toImage();
- backImage = QPixmap::grabWindow(QApplication::desktop()->winId(),
- widget->geometry().x(), widget->geometry().y(),
- widget->geometry().width(), widget->geometry().height()).toImage();
-
- if (!backImage.isNull() && checkTime.elapsed() < duration / 2) {
- mixedImage = backImage.copy();
- pm = QPixmap::fromImage(mixedImage);
- show();
- setEnabled(false);
-
- connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
- anim.start(1);
- } else {
- duration = 0;
- render();
- }
+ } else {
+ duration = 0;
+ render();
}
+#endif
}
/*
@@ -270,19 +267,17 @@ void QAlphaWidget::render()
else
alpha = 1;
-#if defined(Q_OS_WIN)
- if (QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) {
- if (alpha >= windowOpacity || !showWidget) {
- anim.stop();
- qApp->removeEventFilter(this);
- widget->setWindowOpacity(windowOpacity);
- q_blend = 0;
- deleteLater();
- } else {
- widget->setWindowOpacity(alpha);
- }
- } else
-#endif
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ if (alpha >= windowOpacity || !showWidget) {
+ anim.stop();
+ qApp->removeEventFilter(this);
+ widget->setWindowOpacity(windowOpacity);
+ q_blend = 0;
+ deleteLater();
+ } else {
+ widget->setWindowOpacity(alpha);
+ }
+#else
if (alpha >= 1 || !showWidget) {
anim.stop();
qApp->removeEventFilter(this);
@@ -292,7 +287,7 @@ void QAlphaWidget::render()
#ifdef Q_WS_WIN
setEnabled(true);
setFocus();
-#endif
+#endif // Q_WS_WIN
widget->hide();
} else {
//Since we are faking the visibility of the widget
@@ -309,6 +304,7 @@ void QAlphaWidget::render()
pm = QPixmap::fromImage(mixedImage);
repaint();
}
+#endif // defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
}
/*
diff --git a/src/gui/widgets/qfontcombobox.cpp b/src/gui/widgets/qfontcombobox.cpp
index 9660399..f87ccd3 100644
--- a/src/gui/widgets/qfontcombobox.cpp
+++ b/src/gui/widgets/qfontcombobox.cpp
@@ -263,7 +263,7 @@ void QFontComboBoxPrivate::_q_currentChanged(const QString &text)
{
Q_Q(QFontComboBox);
QFont newFont(text);
- if (currentFont != newFont) {
+ if (currentFont.family() != newFont.family()) {
currentFont = newFont;
emit q->currentFontChanged(currentFont);
}
diff --git a/src/gui/widgets/qframe.cpp b/src/gui/widgets/qframe.cpp
index b9e769d..a87ec85 100644
--- a/src/gui/widgets/qframe.cpp
+++ b/src/gui/widgets/qframe.cpp
@@ -135,7 +135,7 @@ inline void QFramePrivate::init()
\value VLine QFrame draws a vertical line that frames nothing
(useful as separator)
\value WinPanel draws a rectangular panel that can be raised or
- sunken like those in Windows 95. Specifying this shape sets
+ sunken like those in Windows 2000. Specifying this shape sets
the line width to 2 pixels. WinPanel is provided for compatibility.
For GUI style independence we recommend using StyledPanel instead.
diff --git a/src/gui/widgets/qgroupbox.cpp b/src/gui/widgets/qgroupbox.cpp
index 0bfa8c0..5758b6a 100644
--- a/src/gui/widgets/qgroupbox.cpp
+++ b/src/gui/widgets/qgroupbox.cpp
@@ -431,7 +431,7 @@ void QGroupBoxPrivate::_q_fixFocus(Qt::FocusReason reason)
{
Q_Q(QGroupBox);
QWidget *fw = q->focusWidget();
- if (!fw) {
+ if (!fw || fw == q) {
QWidget * best = 0;
QWidget * candidate = 0;
QWidget * w = q;
@@ -449,8 +449,7 @@ void QGroupBoxPrivate::_q_fixFocus(Qt::FocusReason reason)
}
if (best)
fw = best;
- else
- if (candidate)
+ else if (candidate)
fw = candidate;
}
if (fw)
@@ -479,11 +478,7 @@ void QGroupBox::focusInEvent(QFocusEvent *fe)
if (focusPolicy() == Qt::NoFocus) {
d->_q_fixFocus(fe->reason());
} else {
- QStyleOptionGroupBox box;
- initStyleOption(&box);
- QRect rect = style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this)
- | style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxLabel, this);
- update(rect);
+ QWidget::focusInEvent(fe);
}
}
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index c7f3e97..d1067a8 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -2169,7 +2169,8 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
if (unknown && !d->readOnly) {
QString t = event->text();
- if (!t.isEmpty() && t.at(0).isPrint()) {
+ if (!t.isEmpty() && t.at(0).isPrint() &&
+ ((event->modifiers() & (Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier)) == Qt::NoModifier)) {
insert(t);
#ifndef QT_NO_COMPLETER
d->complete(event->key());
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 0a0faa0..c51bed9 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -1369,20 +1369,25 @@ bool QMainWindow::event(QEvent *event)
#ifdef Q_WS_MAC
case QEvent::Show:
if (unifiedTitleAndToolBarOnMac())
- macWindowToolbarShow(this, true);
+ d->layout->syncUnifiedToolbarVisibility();
+ d->layout->blockVisiblityCheck = false;
break;
-# ifdef QT_MAC_USE_COCOA
case QEvent::WindowStateChange:
{
+ if (isHidden()) {
+ // We are coming out of a minimize, leave things as is.
+ d->layout->blockVisiblityCheck = true;
+ }
+# ifdef QT_MAC_USE_COCOA
// We need to update the HIToolbar status when we go out of or into fullscreen.
QWindowStateChangeEvent *wce = static_cast<QWindowStateChangeEvent *>(event);
if ((windowState() & Qt::WindowFullScreen) || (wce->oldState() & Qt::WindowFullScreen)) {
d->layout->updateHIToolBarStatus();
}
+# endif // Cocoa
}
break;
-# endif // Cocoa
-#endif
+#endif // Q_WS_MAC
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
case QEvent::CursorChange:
if (d->cursorAdjusted) {
@@ -1419,9 +1424,10 @@ bool QMainWindow::event(QEvent *event)
\i Toolbar breaks are not respected or preserved
\i Any custom widgets in the toolbar will not be shown if the toolbar
becomes too small (only actions will be shown)
- \i If you call showFullScreen() on the main window, the QToolbar will
- disappear since it is considered to be part of the title bar. You can
- work around this by turning off the unified toolbar before you call
+ \i Before Qt 4.5, if you called showFullScreen() on the main window, the QToolbar would
+ disappear since it is considered to be part of the title bar. Qt 4.5 and up will now work around this by pulling
+ the toolbars out and back into the regular toolbar and vice versa when you swap out.
+ However, a good practice would be that turning off the unified toolbar before you call
showFullScreen() and restoring it after you call showNormal().
\endlist
diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp
index 526e7a5..3936a67 100644
--- a/src/gui/widgets/qmainwindowlayout.cpp
+++ b/src/gui/widgets/qmainwindowlayout.cpp
@@ -237,7 +237,7 @@ void QMainWindowLayoutState::apply(bool animated)
if (centralWidgetItem != 0) {
QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
Q_ASSERT(layout != 0);
- layout->widgetAnimator->animate(centralWidgetItem->widget(), centralWidgetRect, animated);
+ layout->widgetAnimator.animate(centralWidgetItem->widget(), centralWidgetRect, animated);
}
#endif
}
@@ -426,42 +426,42 @@ QList<int> QMainWindowLayoutState::gapIndex(QWidget *widget,
return result;
}
-bool QMainWindowLayoutState::insertGap(QList<int> path, QLayoutItem *item)
+bool QMainWindowLayoutState::insertGap(const QList<int> &path, QLayoutItem *item)
{
if (path.isEmpty())
return false;
- int i = path.takeFirst();
+ int i = path.first();
#ifndef QT_NO_TOOLBAR
if (i == 0) {
Q_ASSERT(qobject_cast<QToolBar*>(item->widget()) != 0);
- return toolBarAreaLayout.insertGap(path, item);
+ return toolBarAreaLayout.insertGap(path.mid(1), item);
}
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1) {
Q_ASSERT(qobject_cast<QDockWidget*>(item->widget()) != 0);
- return dockAreaLayout.insertGap(path, item);
+ return dockAreaLayout.insertGap(path.mid(1), item);
}
#endif //QT_NO_DOCKWIDGET
return false;
}
-void QMainWindowLayoutState::remove(QList<int> path)
+void QMainWindowLayoutState::remove(const QList<int> &path)
{
- int i = path.takeFirst();
+ int i = path.first();
#ifndef QT_NO_TOOLBAR
if (i == 0)
- toolBarAreaLayout.remove(path);
+ toolBarAreaLayout.remove(path.mid(1));
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1)
- dockAreaLayout.remove(path);
+ dockAreaLayout.remove(path.mid(1));
#endif //QT_NO_DOCKWIDGET
}
@@ -501,88 +501,88 @@ bool QMainWindowLayoutState::isValid() const
return rect.isValid();
}
-QLayoutItem *QMainWindowLayoutState::item(QList<int> path)
+QLayoutItem *QMainWindowLayoutState::item(const QList<int> &path)
{
- int i = path.takeFirst();
+ int i = path.first();
#ifndef QT_NO_TOOLBAR
if (i == 0)
- return toolBarAreaLayout.item(path).widgetItem;
+ return toolBarAreaLayout.item(path.mid(1)).widgetItem;
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1)
- return dockAreaLayout.item(path).widgetItem;
+ return dockAreaLayout.item(path.mid(1)).widgetItem;
#endif //QT_NO_DOCKWIDGET
return 0;
}
-QRect QMainWindowLayoutState::itemRect(QList<int> path) const
+QRect QMainWindowLayoutState::itemRect(const QList<int> &path) const
{
- int i = path.takeFirst();
+ int i = path.first();
#ifndef QT_NO_TOOLBAR
if (i == 0)
- return toolBarAreaLayout.itemRect(path);
+ return toolBarAreaLayout.itemRect(path.mid(1));
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1)
- return dockAreaLayout.itemRect(path);
+ return dockAreaLayout.itemRect(path.mid(1));
#endif //QT_NO_DOCKWIDGET
return QRect();
}
-QRect QMainWindowLayoutState::gapRect(QList<int> path) const
+QRect QMainWindowLayoutState::gapRect(const QList<int> &path) const
{
- int i = path.takeFirst();
+ int i = path.first();
#ifndef QT_NO_TOOLBAR
if (i == 0)
- return toolBarAreaLayout.itemRect(path);
+ return toolBarAreaLayout.itemRect(path.mid(1));
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1)
- return dockAreaLayout.gapRect(path);
+ return dockAreaLayout.gapRect(path.mid(1));
#endif //QT_NO_DOCKWIDGET
return QRect();
}
-QLayoutItem *QMainWindowLayoutState::plug(QList<int> path)
+QLayoutItem *QMainWindowLayoutState::plug(const QList<int> &path)
{
- int i = path.takeFirst();
+ int i = path.first();
#ifndef QT_NO_TOOLBAR
if (i == 0)
- return toolBarAreaLayout.plug(path);
+ return toolBarAreaLayout.plug(path.mid(1));
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1)
- return dockAreaLayout.plug(path);
+ return dockAreaLayout.plug(path.mid(1));
#endif //QT_NO_DOCKWIDGET
return 0;
}
-QLayoutItem *QMainWindowLayoutState::unplug(QList<int> path, QMainWindowLayoutState *other)
+QLayoutItem *QMainWindowLayoutState::unplug(const QList<int> &path, QMainWindowLayoutState *other)
{
- int i = path.takeFirst();
+ int i = path.first();
#ifdef QT_NO_TOOLBAR
Q_UNUSED(other);
#else
if (i == 0)
- return toolBarAreaLayout.unplug(path, other ? &other->toolBarAreaLayout : 0);
+ return toolBarAreaLayout.unplug(path.mid(1), other ? &other->toolBarAreaLayout : 0);
#endif
#ifndef QT_NO_DOCKWIDGET
if (i == 1)
- return dockAreaLayout.unplug(path);
+ return dockAreaLayout.unplug(path.mid(1));
#endif //QT_NO_DOCKWIDGET
return 0;
@@ -939,16 +939,70 @@ void QMainWindowLayout::getStyleOptionInfo(QStyleOptionToolBar *option, QToolBar
void QMainWindowLayout::toggleToolBarsVisible()
{
- layoutState.toolBarAreaLayout.visible = !layoutState.toolBarAreaLayout.visible;
- if (!layoutState.mainWindow->isMaximized()){
- QPoint topLeft = parentWidget()->geometry().topLeft();
- QRect r = parentWidget()->geometry();
- r = layoutState.toolBarAreaLayout.rectHint(r);
- r.moveTo(topLeft);
- parentWidget()->setGeometry(r);
-// widgetAnimator->animate(parentWidget(), r, true);
- } else{
- update();
+ bool updateNonUnifiedParts = true;
+#ifdef Q_WS_MAC
+ if (layoutState.mainWindow->unifiedTitleAndToolBarOnMac()) {
+ // If we hit this case, someone has pressed the "toolbar button" which will
+ // toggle the unified toolbar visiblity, because that's what the user wants.
+ // We might be in a situation where someone has hidden all the toolbars
+ // beforehand (maybe in construction), but now they've hit this button and
+ // and are expecting the items to show. What do we do?
+ // 1) Check the visibility of all the toolbars, if one is visible, do nothing, this
+ // preserves what people would expect (these toolbars were visible when I clicked last time).
+ // 2) If NONE are visible, then show them all. Again, this preserves the user expectation
+ // of, "I want to see the toolbars." The user may get more toolbars than expected, but this
+ // is better seeing nothing.
+ // Don't worry about any of this if we are going invisible. This does mean we may get
+ // into issues when switching into and out of fullscreen mode, but this is probably minor.
+ // If we ever need to do hiding, that would have to be taken care of after the unified toolbar
+ // has finished hiding.
+ // People can of course handle the QEvent::ToolBarChange event themselves and do
+ // WHATEVER they want if they don't like what we are doing (though the unified toolbar
+ // will fire regardless).
+
+ // Check if we REALLY need to update the geometry below. If we only have items in the
+ // unified toolbar, all the docks will be empty, so there's very little point
+ // in doing the geometry as Apple will do it (we also avoid flicker in Cocoa as well).
+ // FWIW, layoutState.toolBarAreaLayout.visible and the state of the unified toolbar
+ // visibility can get out of sync. I really don't think it's a big issue. It is kept
+ // to a minimum because we only change the visibility if we absolutely must.
+ // update the "non unified parts."
+ updateNonUnifiedParts = !layoutState.toolBarAreaLayout.isEmpty();
+
+ // We get this function before the unified toolbar does its thing.
+ // So, the value will be opposite of what we expect.
+ bool goingVisible = !macWindowToolbarIsVisible(qt_mac_window_for(layoutState.mainWindow));
+ if (goingVisible) {
+ const int ToolBarCount = qtoolbarsInUnifiedToolbarList.size();
+ bool needAllVisible = true;
+ for (int i = 0; i < ToolBarCount; ++i) {
+ if (!qtoolbarsInUnifiedToolbarList.at(i)->isHidden()) {
+ needAllVisible = false;
+ break;
+ }
+ }
+ if (needAllVisible) {
+ QBoolBlocker blocker(blockVisiblityCheck); // Disable the visibilty check because
+ // the toggle has already happened.
+ for (int i = 0; i < ToolBarCount; ++i)
+ qtoolbarsInUnifiedToolbarList.at(i)->setVisible(true);
+ }
+ }
+ if (!updateNonUnifiedParts)
+ layoutState.toolBarAreaLayout.visible = goingVisible;
+ }
+#endif
+ if (updateNonUnifiedParts) {
+ layoutState.toolBarAreaLayout.visible = !layoutState.toolBarAreaLayout.visible;
+ if (!layoutState.mainWindow->isMaximized()) {
+ QPoint topLeft = parentWidget()->geometry().topLeft();
+ QRect r = parentWidget()->geometry();
+ r = layoutState.toolBarAreaLayout.rectHint(r);
+ r.moveTo(topLeft);
+ parentWidget()->setGeometry(r);
+ } else {
+ update();
+ }
}
}
@@ -1361,7 +1415,7 @@ QLayoutItem *QMainWindowLayout::takeAt(int index)
if (QLayoutItem *ret = layoutState.takeAt(index, &x)) {
// the widget might in fact have been destroyed by now
if (QWidget *w = ret->widget()) {
- widgetAnimator->abort(w);
+ widgetAnimator.abort(w);
if (w == pluggingWidget)
pluggingWidget = 0;
}
@@ -1528,75 +1582,28 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
layoutState.remove(previousPath);
pluggingWidget = widget;
- if (dockOptions & QMainWindow::AnimatedDocks) {
- QRect globalRect = currentGapRect;
- globalRect.moveTopLeft(parentWidget()->mapToGlobal(globalRect.topLeft()));
+ QRect globalRect = currentGapRect;
+ globalRect.moveTopLeft(parentWidget()->mapToGlobal(globalRect.topLeft()));
#ifndef QT_NO_DOCKWIDGET
- if (qobject_cast<QDockWidget*>(widget) != 0) {
- QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(widget->layout());
- if (layout->nativeWindowDeco()) {
- globalRect.adjust(0, layout->titleHeight(), 0, 0);
- } else {
- int fw = widget->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, widget);
- globalRect.adjust(-fw, -fw, fw, fw);
- }
+ if (qobject_cast<QDockWidget*>(widget) != 0) {
+ QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(widget->layout());
+ if (layout->nativeWindowDeco()) {
+ globalRect.adjust(0, layout->titleHeight(), 0, 0);
+ } else {
+ int fw = widget->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, widget);
+ globalRect.adjust(-fw, -fw, fw, fw);
}
-#endif
- widgetAnimator->animate(widget, globalRect,
- dockOptions & QMainWindow::AnimatedDocks);
- } else {
-#ifndef QT_NO_DOCKWIDGET
- if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget))
- dw->d_func()->plug(currentGapRect);
-#endif
-#ifndef QT_NO_TOOLBAR
- if (QToolBar *tb = qobject_cast<QToolBar*>(widget))
- tb->d_func()->plug(currentGapRect);
-#endif
- applyState(layoutState);
- savedState.clear();
-#ifndef QT_NO_DOCKWIDGET
- parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
-#endif
- currentGapPos.clear();
- updateGapIndicator();
- pluggingWidget = 0;
}
+#endif
+ widgetAnimator.animate(widget, globalRect, dockOptions & QMainWindow::AnimatedDocks);
return true;
}
-void QMainWindowLayout::allAnimationsFinished()
-{
-#ifndef QT_NO_DOCKWIDGET
- parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
-
-#ifndef QT_NO_TABBAR
- foreach (QTabBar *tab_bar, usedTabBars)
- tab_bar->show();
-#endif // QT_NO_TABBAR
-#endif // QT_NO_DOCKWIDGET
-
- updateGapIndicator();
-}
-
void QMainWindowLayout::animationFinished(QWidget *widget)
{
-
- /* This signal is delivered from QWidgetAnimator over a qeued connection. The problem is that
- the widget can be deleted. This is handled as follows:
-
- The animator only ever animates widgets that have been added to this layout. If a widget
- is deleted during animation, the widget's destructor removes the widget form this layout.
- This in turn aborts the animation (see takeAt()) and this signal will never be delivered.
-
- If the widget is deleted after the animation is finished but before this qeued signal
- is delivered, the widget is no longer in the layout and we catch it here. The key is that
- QMainWindowLayoutState::contains() never dereferences the pointer. */
-
- if (!layoutState.contains(widget))
- return;
-
+ //this function is called from within the Widget Animator whenever an animation is finished
+ //on a certain widget
#ifndef QT_NO_TOOLBAR
if (QToolBar *tb = qobject_cast<QToolBar*>(widget)) {
QToolBarLayout *tbl = qobject_cast<QToolBarLayout*>(tb->layout());
@@ -1609,32 +1616,44 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
}
#endif
- if (widget != pluggingWidget)
- return;
+ if (widget == pluggingWidget) {
#ifndef QT_NO_DOCKWIDGET
- if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget))
- dw->d_func()->plug(currentGapRect);
+ if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget))
+ dw->d_func()->plug(currentGapRect);
#endif
#ifndef QT_NO_TOOLBAR
- if (QToolBar *tb = qobject_cast<QToolBar*>(widget))
- tb->d_func()->plug(currentGapRect);
+ if (QToolBar *tb = qobject_cast<QToolBar*>(widget))
+ tb->d_func()->plug(currentGapRect);
#endif
- applyState(layoutState, false);
#ifndef QT_NO_DOCKWIDGET
#ifndef QT_NO_TABBAR
- if (qobject_cast<QDockWidget*>(widget) != 0) {
- // info() might return null if the widget is destroyed while
- // animating but before the animationFinished signal is received.
- if (QDockAreaLayoutInfo *info = layoutState.dockAreaLayout.info(widget))
- info->setCurrentTab(widget);
- }
+ if (qobject_cast<QDockWidget*>(widget) != 0) {
+ // info() might return null if the widget is destroyed while
+ // animating but before the animationFinished signal is received.
+ if (QDockAreaLayoutInfo *info = layoutState.dockAreaLayout.info(widget))
+ info->setCurrentTab(widget);
+ }
#endif
#endif
- savedState.clear();
- currentGapPos.clear();
- pluggingWidget = 0;
+
+ savedState.clear();
+ currentGapPos.clear();
+ pluggingWidget = 0;
+ }
+
+ if (!widgetAnimator.animating()) {
+ //all animations are finished
+#ifndef QT_NO_DOCKWIDGET
+ parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
+#ifndef QT_NO_TABBAR
+ foreach (QTabBar *tab_bar, usedTabBars)
+ tab_bar->show();
+#endif // QT_NO_TABBAR
+#endif // QT_NO_DOCKWIDGET
+ }
+
updateGapIndicator();
}
@@ -1667,6 +1686,14 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow)
#endif
#endif
#endif // QT_NO_DOCKWIDGET
+ , widgetAnimator(this)
+ , pluggingWidget(0)
+#ifndef QT_NO_RUBBERBAND
+ , gapIndicator(new QRubberBand(QRubberBand::Rectangle, mainwindow))
+#endif //QT_NO_RUBBERBAND
+#ifdef Q_WS_MAC
+ , blockVisiblityCheck(false)
+#endif
{
#ifndef QT_NO_DOCKWIDGET
#ifndef QT_NO_TABBAR
@@ -1680,20 +1707,13 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow)
#endif // QT_NO_DOCKWIDGET
#ifndef QT_NO_RUBBERBAND
- gapIndicator = new QRubberBand(QRubberBand::Rectangle, mainwindow);
// For accessibility to identify this special widget.
gapIndicator->setObjectName(QLatin1String("qt_rubberband"));
-
gapIndicator->hide();
#endif
pluggingWidget = 0;
setObjectName(mainwindow->objectName() + QLatin1String("_layout"));
- widgetAnimator = new QWidgetAnimator(this);
- connect(widgetAnimator, SIGNAL(finished(QWidget*)),
- this, SLOT(animationFinished(QWidget*)), Qt::QueuedConnection);
- connect(widgetAnimator, SIGNAL(finishedAll()),
- this, SLOT(allAnimationsFinished()));
}
QMainWindowLayout::~QMainWindowLayout()
@@ -1795,14 +1815,8 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget)
void QMainWindowLayout::updateGapIndicator()
{
#ifndef QT_NO_RUBBERBAND
- if (widgetAnimator->animating() || currentGapPos.isEmpty()) {
- gapIndicator->hide();
- } else {
- if (gapIndicator->geometry() != currentGapRect)
- gapIndicator->setGeometry(currentGapRect);
- if (!gapIndicator->isVisible())
- gapIndicator->show();
- }
+ gapIndicator->setVisible(!widgetAnimator.animating() && !currentGapPos.isEmpty());
+ gapIndicator->setGeometry(currentGapRect);
#endif
}
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index 6632be7..61719c2 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -338,18 +338,16 @@ void QMainWindowLayout::updateHIToolBarStatus()
0, kWindowUnifiedTitleAndToolbarAttribute);
}
#endif
- macWindowToolbarShow(layoutState.mainWindow, useMacToolbar);
layoutState.mainWindow->setUpdatesEnabled(false); // reduces a little bit of flicker, not all though
if (!useMacToolbar) {
- OSWindowRef windowRef = qt_mac_window_for(parentWidget());
- macWindowToolbarShow(parentWidget(), false);
+ macWindowToolbarShow(layoutState.mainWindow, false);
// Move everything out of the HIToolbar into the main toolbar.
while (!qtoolbarsInUnifiedToolbarList.isEmpty()) {
// Should shrink the list by one every time.
layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, qtoolbarsInUnifiedToolbarList.first());
}
- macWindowToolbarSet(windowRef, NULL);
+ macWindowToolbarSet(qt_mac_window_for(layoutState.mainWindow), 0);
} else {
QList<QToolBar *> toolbars = layoutState.mainWindow->findChildren<QToolBar *>();
for (int i = 0; i < toolbars.size(); ++i) {
@@ -359,6 +357,7 @@ void QMainWindowLayout::updateHIToolBarStatus()
layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, toolbar);
}
}
+ syncUnifiedToolbarVisibility();
}
layoutState.mainWindow->setUpdatesEnabled(true);
}
@@ -439,7 +438,7 @@ void QMainWindowLayout::insertIntoMacToolbar(QToolBar *before, QToolBar *toolbar
#else
NSString *toolbarID = kQToolBarNSToolbarIdentifier;
toolbarID = [toolbarID stringByAppendingFormat:@"%p", toolbar];
- cocoaItemIDToToolbarHash.insert(QCFString::toQString(CFStringRef(toolbarID)), toolbar);
+ cocoaItemIDToToolbarHash.insert(qt_mac_NSStringToQString(toolbarID), toolbar);
[macToolbar insertItemWithItemIdentifier:toolbarID atIndex:beforeIndex];
#endif
}
@@ -487,6 +486,7 @@ void QMainWindowLayout::cleanUpMacToolbarItems()
void QMainWindowLayout::fixSizeInUnifiedToolbar(QToolBar *tb) const
{
+#ifdef QT_MAC_USE_COCOA
QHash<void *, QToolBar *>::const_iterator it = unifiedToolbarHash.constBegin();
NSToolbarItem *item = nil;
while (it != unifiedToolbarHash.constEnd()) {
@@ -507,5 +507,26 @@ void QMainWindowLayout::fixSizeInUnifiedToolbar(QToolBar *tb) const
nssize.height = size.height() - 2;
[item setMinSize:nssize];
}
+#else
+ Q_UNUSED(tb);
+#endif
}
+
+void QMainWindowLayout::syncUnifiedToolbarVisibility()
+{
+ if (blockVisiblityCheck)
+ return;
+
+ Q_ASSERT(layoutState.mainWindow->unifiedTitleAndToolBarOnMac());
+ bool show = false;
+ const int ToolBarCount = qtoolbarsInUnifiedToolbarList.count();
+ for (int i = 0; i < ToolBarCount; ++i) {
+ if (qtoolbarsInUnifiedToolbarList.at(i)->isVisible()) {
+ show = true;
+ break;
+ }
+ }
+ macWindowToolbarShow(layoutState.mainWindow, show);
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/widgets/qmainwindowlayout_p.h b/src/gui/widgets/qmainwindowlayout_p.h
index 26f8633..524fdbf 100644
--- a/src/gui/widgets/qmainwindowlayout_p.h
+++ b/src/gui/widgets/qmainwindowlayout_p.h
@@ -63,6 +63,7 @@
#include "QtCore/qset.h"
#include "QtCore/qbasictimer.h"
#include "private/qlayoutengine_p.h"
+#include "private/qwidgetanimator_p.h"
#include "qdockarealayout_p.h"
#include "qtoolbararealayout_p.h"
@@ -89,7 +90,6 @@ typedef const struct __CFString * CFStringRef;
QT_BEGIN_NAMESPACE
class QToolBar;
-class QWidgetAnimator;
class QRubberBand;
/* This data structure represents the state of all the tool-bars and dock-widgets. It's value based
@@ -128,9 +128,9 @@ public:
QLayoutItem *itemAt(int index, int *x) const;
QLayoutItem *takeAt(int index, int *x);
QList<int> indexOf(QWidget *widget) const;
- QLayoutItem *item(QList<int> path);
- QRect itemRect(QList<int> path) const;
- QRect gapRect(QList<int> path) const; // ### get rid of this, use itemRect() instead
+ QLayoutItem *item(const QList<int> &path);
+ QRect itemRect(const QList<int> &path) const;
+ QRect gapRect(const QList<int> &path) const; // ### get rid of this, use itemRect() instead
bool contains(QWidget *widget) const;
@@ -138,14 +138,14 @@ public:
QWidget *centralWidget() const;
QList<int> gapIndex(QWidget *widget, const QPoint &pos) const;
- bool insertGap(QList<int> path, QLayoutItem *item);
- void remove(QList<int> path);
+ bool insertGap(const QList<int> &path, QLayoutItem *item);
+ void remove(const QList<int> &path);
void remove(QLayoutItem *item);
void clear();
bool isValid() const;
- QLayoutItem *plug(QList<int> path);
- QLayoutItem *unplug(QList<int> path, QMainWindowLayoutState *savedState = 0);
+ QLayoutItem *plug(const QList<int> &path);
+ QLayoutItem *unplug(const QList<int> &path, QMainWindowLayoutState *savedState = 0);
void saveState(QDataStream &stream) const;
bool checkFormat(QDataStream &stream, bool pre43);
@@ -278,7 +278,7 @@ public:
// animations
- QWidgetAnimator *widgetAnimator;
+ QWidgetAnimator widgetAnimator;
QList<int> currentGapPos;
QRect currentGapRect;
QWidget *pluggingWidget;
@@ -295,10 +295,9 @@ public:
void applyState(QMainWindowLayoutState &newState, bool animate = true);
void restore(bool keepSavedState = false);
void updateHIToolBarStatus();
-
-private slots:
void animationFinished(QWidget *widget);
- void allAnimationsFinished();
+
+private Q_SLOTS:
#ifndef QT_NO_DOCKWIDGET
#ifndef QT_NO_TABBAR
void tabChanged();
@@ -336,6 +335,8 @@ public:
void cleanUpMacToolbarItems();
void fixSizeInUnifiedToolbar(QToolBar *tb) const;
bool useHIToolBar;
+ void syncUnifiedToolbarVisibility();
+ bool blockVisiblityCheck;
#endif
};
QT_END_NAMESPACE
diff --git a/src/gui/widgets/qmdisubwindow.cpp b/src/gui/widgets/qmdisubwindow.cpp
index 25bc724..24dea37 100644
--- a/src/gui/widgets/qmdisubwindow.cpp
+++ b/src/gui/widgets/qmdisubwindow.cpp
@@ -1946,26 +1946,21 @@ QPalette QMdiSubWindowPrivate::desktopPalette() const
colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)));
newPalette.setColor(QPalette::Inactive, QPalette::HighlightedText,
colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)));
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95
- && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- colorsInitialized = true;
- BOOL hasGradient;
- QT_WA({
- SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &hasGradient, 0);
- } , {
- SystemParametersInfoA(SPI_GETGRADIENTCAPTIONS, 0, &hasGradient, 0);
- });
- if (hasGradient) {
- newPalette.setColor(QPalette::Active, QPalette::Base,
- colorref2qrgb(GetSysColor(COLOR_GRADIENTACTIVECAPTION)));
- newPalette.setColor(QPalette::Inactive, QPalette::Base,
- colorref2qrgb(GetSysColor(COLOR_GRADIENTINACTIVECAPTION)));
- } else {
- newPalette.setColor(QPalette::Active, QPalette::Base,
- newPalette.color(QPalette::Active, QPalette::Highlight));
- newPalette.setColor(QPalette::Inactive, QPalette::Base,
- newPalette.color(QPalette::Inactive, QPalette::Highlight));
- }
+
+ colorsInitialized = true;
+ BOOL hasGradient = false;
+ SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &hasGradient, 0);
+
+ if (hasGradient) {
+ newPalette.setColor(QPalette::Active, QPalette::Base,
+ colorref2qrgb(GetSysColor(COLOR_GRADIENTACTIVECAPTION)));
+ newPalette.setColor(QPalette::Inactive, QPalette::Base,
+ colorref2qrgb(GetSysColor(COLOR_GRADIENTINACTIVECAPTION)));
+ } else {
+ newPalette.setColor(QPalette::Active, QPalette::Base,
+ newPalette.color(QPalette::Active, QPalette::Highlight));
+ newPalette.setColor(QPalette::Inactive, QPalette::Base,
+ newPalette.color(QPalette::Inactive, QPalette::Highlight));
}
}
#endif // Q_WS_WIN
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index d3f5bc5..99f3880 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -163,6 +163,12 @@ void QMenuPrivate::init()
}
}
+int QMenuPrivate::scrollerHeight() const
+{
+ Q_Q(const QMenu);
+ return qMax(QApplication::globalStrut().height(), q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q));
+}
+
//Windows and KDE allows menus to cover the taskbar, while GNOME and Mac don't
QRect QMenuPrivate::popupGeometry(int screen) const
{
@@ -257,7 +263,6 @@ void QMenuPrivate::updateActionRects() const
//let the style modify the above size..
QStyleOptionMenuItem opt;
q->initStyleOption(&opt, action);
- opt.rect = q->rect();
const QFontMetrics &fm = opt.fontMetrics;
QSize sz;
@@ -280,10 +285,7 @@ void QMenuPrivate::updateActionRects() const
tabWidth = qMax(int(tabWidth), qfm.width(seq));
#endif
}
- int w = fm.boundingRect(QRect(), Qt::TextSingleLine, s).width();
- w -= s.count(QLatin1Char('&')) * fm.width(QLatin1Char('&'));
- w += s.count(QLatin1String("&&")) * fm.width(QLatin1Char('&'));
- sz.setWidth(w);
+ sz.setWidth(fm.boundingRect(QRect(), Qt::TextSingleLine | Qt::TextShowMnemonic, s).width());
sz.setHeight(qMax(fm.height(), qfm.height()));
QIcon is = action->icon();
@@ -484,14 +486,13 @@ void QMenuPrivate::setFirstActionActive()
{
Q_Q(QMenu);
updateActionRects();
- const int scrollerHeight = q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q);
for(int i = 0, saccum = 0; i < actions.count(); i++) {
const QRect &rect = actionRects.at(i);
if (rect.isNull())
continue;
if (scroll && scroll->scrollFlags & QMenuScroller::ScrollUp) {
saccum -= rect.height();
- if (saccum > scroll->scrollOffset-scrollerHeight)
+ if (saccum > scroll->scrollOffset - scrollerHeight())
continue;
}
QAction *act = actions.at(i);
@@ -669,16 +670,14 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
return;
updateActionRects();
int newOffset = 0;
- const int scrollHeight = q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q);
- const int topScroll = (scroll->scrollFlags & QMenuScroller::ScrollUp) ? scrollHeight : 0;
- const int botScroll = (scroll->scrollFlags & QMenuScroller::ScrollDown) ? scrollHeight : 0;
+ const int topScroll = (scroll->scrollFlags & QMenuScroller::ScrollUp) ? scrollerHeight() : 0;
+ const int botScroll = (scroll->scrollFlags & QMenuScroller::ScrollDown) ? scrollerHeight() : 0;
const int vmargin = q->style()->pixelMetric(QStyle::PM_MenuVMargin, 0, q);
const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, q);
if (location == QMenuScroller::ScrollTop) {
for(int i = 0, saccum = 0; i < actions.count(); i++) {
- QAction *act = actions.at(i);
- if (act == action) {
+ if (actions.at(i) == action) {
newOffset = topScroll - saccum;
break;
}
@@ -686,9 +685,8 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
}
} else {
for(int i = 0, saccum = 0; i < actions.count(); i++) {
- QAction *act = actions.at(i);
saccum += actionRects.at(i).height();
- if (act == action) {
+ if (actions.at(i) == action) {
if (location == QMenuScroller::ScrollCenter)
newOffset = ((q->height() / 2) - botScroll) - (saccum - topScroll);
else
@@ -757,9 +755,19 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
}
//actually update flags
- scroll->scrollOffset = newOffset;
- if (scroll->scrollOffset > 0)
- scroll->scrollOffset = 0;
+ const int delta = qMin(0, newOffset) - scroll->scrollOffset; //make sure the new offset is always negative
+ if (!itemsDirty && delta) {
+ //we've scrolled so we need to update the action rects
+ for (int i = 0; i < actionRects.count(); ++i) {
+ QRect &current = actionRects[i];
+ current.moveTop(current.top() + delta);
+
+ //we need to update the widgets geometry
+ if (QWidget *w = widgetItems.at(i))
+ w->setGeometry(current);
+ }
+ }
+ scroll->scrollOffset += delta;
scroll->scrollFlags = newScrollFlags;
if (active)
setCurrentAction(action);
@@ -811,9 +819,8 @@ void QMenuPrivate::scrollMenu(QMenuScroller::ScrollDirection direction, bool pag
if (!scroll || !(scroll->scrollFlags & direction)) //not really possible...
return;
updateActionRects();
- const int scrollHeight = q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q);
- const int topScroll = (scroll->scrollFlags & QMenuScroller::ScrollUp) ? scrollHeight : 0;
- const int botScroll = (scroll->scrollFlags & QMenuScroller::ScrollDown) ? scrollHeight : 0;
+ const int topScroll = (scroll->scrollFlags & QMenuScroller::ScrollUp) ? scrollerHeight() : 0;
+ const int botScroll = (scroll->scrollFlags & QMenuScroller::ScrollDown) ? scrollerHeight() : 0;
const int vmargin = q->style()->pixelMetric(QStyle::PM_MenuVMargin, 0, q);
const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, q);
const int offset = topScroll ? topScroll-vmargin : 0;
@@ -860,13 +867,12 @@ bool QMenuPrivate::mouseEventTaken(QMouseEvent *e)
if (scroll && !activeMenu) { //let the scroller "steal" the event
bool isScroll = false;
if (pos.x() >= 0 && pos.x() < q->width()) {
- const int scrollerHeight = q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q);
for(int dir = QMenuScroller::ScrollUp; dir <= QMenuScroller::ScrollDown; dir = dir << 1) {
if (scroll->scrollFlags & dir) {
if (dir == QMenuScroller::ScrollUp)
- isScroll = (pos.y() <= scrollerHeight);
+ isScroll = (pos.y() <= scrollerHeight());
else if (dir == QMenuScroller::ScrollDown)
- isScroll = (pos.y() >= q->height()-scrollerHeight);
+ isScroll = (pos.y() >= q->height() - scrollerHeight());
if (isScroll) {
scroll->scrollDirection = dir;
break;
@@ -875,19 +881,17 @@ bool QMenuPrivate::mouseEventTaken(QMouseEvent *e)
}
}
if (isScroll) {
- if (!scroll->scrollTimer)
- scroll->scrollTimer = new QBasicTimer;
- scroll->scrollTimer->start(50, q);
+ scroll->scrollTimer.start(50, q);
return true;
- } else if (scroll->scrollTimer && scroll->scrollTimer->isActive()) {
- scroll->scrollTimer->stop();
+ } else {
+ scroll->scrollTimer.stop();
}
}
if (tearoff) { //let the tear off thingie "steal" the event..
QRect tearRect(0, 0, q->width(), q->style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, q));
if (scroll && scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
- tearRect.translate(0, q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q));
+ tearRect.translate(0, scrollerHeight());
q->update(tearRect);
if (tearRect.contains(pos) && hasMouseMoved(e->globalPos())) {
setCurrentAction(0);
@@ -1348,8 +1352,7 @@ QMenu::~QMenu()
if (d->eventLoop)
d->eventLoop->exit();
- if (d->tornPopup)
- d->tornPopup->close();
+ hideTearOffMenu();
}
/*!
@@ -1560,8 +1563,8 @@ void QMenu::setTearOffEnabled(bool b)
Q_D(QMenu);
if (d->tearoff == b)
return;
- if (!b && d->tornPopup)
- d->tornPopup->close();
+ if (!b)
+ hideTearOffMenu();
d->tearoff = b;
d->itemsDirty = true;
@@ -1596,8 +1599,8 @@ bool QMenu::isTearOffMenuVisible() const
*/
void QMenu::hideTearOffMenu()
{
- if (d_func()->tornPopup)
- d_func()->tornPopup->close();
+ if (QWidget *w = d_func()->tornPopup)
+ w->close();
}
@@ -1712,8 +1715,6 @@ QSize QMenu::sizeHint() const
if (rect.right() >= s.width())
s.setWidth(rect.x() + rect.width());
}
- if (d->tearoff)
- s.rheight() += style()->pixelMetric(QStyle::PM_MenuTearoffHeight, &opt, this);
// Note that the action rects calculated above already include
// the top and left margins, so we only need to add margins for
// the bottom and right.
@@ -2054,6 +2055,8 @@ void QMenu::hideEvent(QHideEvent *)
d->hasHadMouse = false;
d->causedPopup.widget = 0;
d->causedPopup.action = 0;
+ if (d->scroll)
+ d->scroll->scrollTimer.stop(); //make sure the timer stops
}
/*!
@@ -2095,18 +2098,17 @@ void QMenu::paintEvent(QPaintEvent *e)
const int fw = style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this);
//draw the scroller regions..
if (d->scroll) {
- const int scrollerHeight = style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, this);
menuOpt.menuItemType = QStyleOptionMenuItem::Scroller;
menuOpt.state |= QStyle::State_Enabled;
if (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp) {
- menuOpt.rect.setRect(fw, fw, width() - (fw * 2), scrollerHeight);
+ menuOpt.rect.setRect(fw, fw, width() - (fw * 2), d->scrollerHeight());
emptyArea -= QRegion(menuOpt.rect);
p.setClipRect(menuOpt.rect);
style()->drawControl(QStyle::CE_MenuScroller, &menuOpt, &p, this);
}
if (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollDown) {
- menuOpt.rect.setRect(fw, height() - scrollerHeight - fw, width() - (fw * 2),
- scrollerHeight);
+ menuOpt.rect.setRect(fw, height() - d->scrollerHeight() - fw, width() - (fw * 2),
+ d->scrollerHeight());
emptyArea -= QRegion(menuOpt.rect);
menuOpt.state |= QStyle::State_DownArrow;
p.setClipRect(menuOpt.rect);
@@ -2119,7 +2121,7 @@ void QMenu::paintEvent(QPaintEvent *e)
menuOpt.rect.setRect(fw, fw, width() - (fw * 2),
style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, this));
if (d->scroll && d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
- menuOpt.rect.translate(0, style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, this));
+ menuOpt.rect.translate(0, d->scrollerHeight());
emptyArea -= QRegion(menuOpt.rect);
p.setClipRect(menuOpt.rect);
menuOpt.state = QStyle::State_None;
@@ -2449,7 +2451,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
continue;
nextAction = next;
if (d->scroll && (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)) {
- int topVisible = style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, this);
+ int topVisible = d->scrollerHeight();
if (d->tearoff)
topVisible += style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, this);
if (((y + d->scroll->scrollOffset) - topVisible) <= d->actionRects.at(next_i).height())
@@ -2480,10 +2482,9 @@ void QMenu::keyPressEvent(QKeyEvent *e)
continue;
nextAction = next;
if (d->scroll && (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollDown)) {
- const int scrollerHeight = style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, this);
- int bottomVisible = height()-scrollerHeight;
+ int bottomVisible = height() - d->scrollerHeight();
if (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
- bottomVisible -= scrollerHeight;
+ bottomVisible -= d->scrollerHeight();
if (d->tearoff)
bottomVisible -= style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, this);
if ((y + d->scroll->scrollOffset + d->actionRects.at(next_i).height()) > bottomVisible)
@@ -2499,8 +2500,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
}
if (nextAction) {
if (d->scroll && scroll_loc != QMenuPrivate::QMenuScroller::ScrollStay) {
- if (d->scroll->scrollTimer)
- d->scroll->scrollTimer->stop();
+ d->scroll->scrollTimer.stop();
d->scrollMenu(nextAction, scroll_loc);
}
d->setCurrentAction(nextAction, /*popup*/-1, QMenuPrivate::SelectedFromKeyboard);
@@ -2761,10 +2761,10 @@ void
QMenu::timerEvent(QTimerEvent *e)
{
Q_D(QMenu);
- if (d->scroll && d->scroll->scrollTimer && d->scroll->scrollTimer->timerId() == e->timerId()) {
+ if (d->scroll && d->scroll->scrollTimer.timerId() == e->timerId()) {
d->scrollMenu((QMenuPrivate::QMenuScroller::ScrollDirection)d->scroll->scrollDirection);
if (d->scroll->scrollFlags == QMenuPrivate::QMenuScroller::ScrollNone)
- d->scroll->scrollTimer->stop();
+ d->scroll->scrollTimer.stop();
} else if(QMenuPrivate::menuDelayTimer.timerId() == e->timerId()) {
QMenuPrivate::menuDelayTimer.stop();
internalDelayedPopup();
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 50a9f2f..4e428fe 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -151,6 +151,8 @@ public:
}
void init();
+ int scrollerHeight() const;
+
//item calculations
mutable uint itemsDirty : 1;
mutable uint maxIconWidth, tabWidth;
@@ -189,10 +191,10 @@ public:
enum ScrollDirection { ScrollNone=0, ScrollUp=0x01, ScrollDown=0x02 };
uint scrollFlags : 2, scrollDirection : 2;
int scrollOffset;
- QBasicTimer *scrollTimer;
+ QBasicTimer scrollTimer;
- QMenuScroller() : scrollFlags(ScrollNone), scrollDirection(ScrollNone), scrollOffset(0), scrollTimer(0) { }
- ~QMenuScroller() { delete scrollTimer; }
+ QMenuScroller() : scrollFlags(ScrollNone), scrollDirection(ScrollNone), scrollOffset(0) { }
+ ~QMenuScroller() { }
} *scroll;
void scrollMenu(QMenuScroller::ScrollLocation location, bool active=false);
void scrollMenu(QMenuScroller::ScrollDirection direction, bool page=false, bool active=false);
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index f4288ac..6b93879 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -218,7 +218,7 @@ void QMenuBarPrivate::updateGeometries()
bool hasHiddenActions = false;
for (int i = 0; i < actions.count(); ++i) {
const QRect &rect = actionRects.at(i);
- if (!menuRect.contains(rect)) {
+ if (rect.isValid() && !menuRect.contains(rect)) {
hasHiddenActions = true;
break;
}
@@ -229,7 +229,7 @@ void QMenuBarPrivate::updateGeometries()
menuRect = this->menuRect(true);
for (int i = 0; i < actions.count(); ++i) {
const QRect &rect = actionRects.at(i);
- if (!menuRect.contains(rect)) {
+ if (rect.isValid() && !menuRect.contains(rect)) {
hiddenActions.append(actions.at(i));
}
}
@@ -447,10 +447,7 @@ void QMenuBarPrivate::calcActionRects(int max_width, int start) const
} else {
const QString s = action->text();
if(!s.isEmpty()) {
- const int w = fm.width(s)
- - s.count(QLatin1Char('&')) * fm.width(QLatin1Char('&'))
- + s.count(QLatin1String("&&")) * fm.width(QLatin1Char('&'));
- sz = QSize(w, fm.height());
+ sz = fm.size(Qt::TextShowMnemonic, s);
}
QIcon is = action->icon();
@@ -670,8 +667,9 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
\header \i String matches \i Placement \i Notes
\row \i about.*
\i Application Menu | About <application name>
- \i If this entry is not found no About item will appear in
- the Application Menu
+ \i The application name is fetched from the \c {Info.plist} file
+ (see note below). If this entry is not found no About item
+ will appear in the Application Menu.
\row \i config, options, setup, settings or preferences
\i Application Menu | Preferences
\i If this entry is not found the Settings item will be disabled
@@ -955,6 +953,13 @@ void QMenuBar::setActiveAction(QAction *act)
/*!
Removes all the actions from the menu bar.
+ \note On Mac OS X, menu items that have been merged to the system
+ menu bar are not removed by this function. One way to handle this
+ would be to remove the extra actions yourself. You can set the
+ \l{QAction::MenuRole}{menu role} on the different menus, so that
+ you know ahead of time which menu items get merged and which do
+ not. Then decide what to recreate or remove yourself.
+
\sa removeAction()
*/
void QMenuBar::clear()
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 4977b31..82026d4 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -66,6 +66,8 @@
#include <qtexttable.h>
#include <qvariant.h>
+#include <qstandardgestures.h>
+
#include <qinputcontext.h>
#ifndef QT_NO_TEXTEDIT
@@ -250,7 +252,7 @@ QPlainTextDocumentLayoutPrivate *QPlainTextDocumentLayout::priv() const
*/
void QPlainTextDocumentLayout::requestUpdate()
{
- emit update(QRectF(0., -4., 1000000000., 1000000000.));
+ emit update(QRectF(0., -document()->documentMargin(), 1000000000., 1000000000.));
}
@@ -345,8 +347,7 @@ void QPlainTextDocumentLayout::documentChanged(int from, int /*charsRemoved*/, i
}
if (!d->blockUpdate)
- emit update(); // optimization potential
-
+ emit update(QRectF(0., -doc->documentMargin(), 1000000000., 1000000000.)); // optimization potential
}
@@ -726,6 +727,9 @@ QPlainTextEditPrivate::QPlainTextEditPrivate()
backgroundVisible = false;
centerOnScroll = false;
inDrag = false;
+#ifdef Q_WS_WIN
+ singleFingerPanEnabled = true;
+#endif
}
@@ -781,6 +785,9 @@ void QPlainTextEditPrivate::init(const QString &txt)
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::IBeamCursor);
#endif
+ originalOffsetY = 0;
+ panGesture = new QPanGesture(q);
+ QObject::connect(panGesture, SIGNAL(triggered()), q, SLOT(_q_gestureTriggered()));
}
void QPlainTextEditPrivate::_q_repaintContents(const QRectF &contentsRect)
@@ -1014,14 +1021,13 @@ void QPlainTextEditPrivate::ensureViewportLayouted()
QPlainText uses very much the same technology and concepts as
QTextEdit, but is optimized for plain text handling.
- QPlainTextEdit works on paragraphs and characters. A paragraph is a
- formatted string which is word-wrapped to fit into the width of
+ QPlainTextEdit works on paragraphs and characters. A paragraph is
+ a formatted string which is word-wrapped to fit into the width of
the widget. By default when reading plain text, one newline
signifies a paragraph. A document consists of zero or more
- paragraphs. The words in the paragraph are aligned in accordance
- with the paragraph's alignment. Paragraphs are separated by hard
- line breaks. Each character within a paragraph has its own
- attributes, for example, font and color.
+ paragraphs. Paragraphs are separated by hard line breaks. Each
+ character within a paragraph has its own attributes, for example,
+ font and color.
The shape of the mouse cursor on a QPlainTextEdit is
Qt::IBeamCursor by default. It can be changed through the
@@ -1162,7 +1168,8 @@ void QPlainTextEditPrivate::ensureViewportLayouted()
\sa QTextDocument, QTextCursor, {Application Example},
- {Syntax Highlighter Example}, {Rich Text Processing}
+ {Code Editor Example}, {Syntax Highlighter Example},
+ {Rich Text Processing}
*/
@@ -2899,6 +2906,30 @@ QAbstractTextDocumentLayout::PaintContext QPlainTextEdit::getPaintContext() cons
(\a available is true) or unavailable (\a available is false).
*/
+void QPlainTextEditPrivate::_q_gestureTriggered()
+{
+ Q_Q(QPlainTextEdit);
+ QPanGesture *g = qobject_cast<QPanGesture*>(q->sender());
+ if (!g)
+ return;
+ QScrollBar *hBar = q->horizontalScrollBar();
+ QScrollBar *vBar = q->verticalScrollBar();
+ if (g->state() == Qt::GestureStarted)
+ originalOffsetY = vBar->value();
+ QSize totalOffset = g->totalOffset();
+ if (!totalOffset.isNull()) {
+ if (QApplication::isRightToLeft())
+ totalOffset.rwidth() *= -1;
+ // QPlainTextEdit scrolls by lines only in vertical direction
+ QFontMetrics fm(q->document()->defaultFont());
+ int lineHeight = fm.height();
+ int newX = hBar->value() - g->lastOffset().width();
+ int newY = originalOffsetY - totalOffset.height()/lineHeight;
+ hbar->setValue(newX);
+ vbar->setValue(newY);
+ }
+}
+
QT_END_NAMESPACE
#include "moc_qplaintextedit.cpp"
diff --git a/src/gui/widgets/qplaintextedit.h b/src/gui/widgets/qplaintextedit.h
index dc0851b..35bbc37 100644
--- a/src/gui/widgets/qplaintextedit.h
+++ b/src/gui/widgets/qplaintextedit.h
@@ -269,6 +269,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_adjustScrollbars())
Q_PRIVATE_SLOT(d_func(), void _q_verticalScrollbarActionTriggered(int))
Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged())
+ Q_PRIVATE_SLOT(d_func(), void _q_gestureTriggered())
friend class QPlainTextEditControl;
};
diff --git a/src/gui/widgets/qplaintextedit_p.h b/src/gui/widgets/qplaintextedit_p.h
index 5075fc4..ae584e0 100644
--- a/src/gui/widgets/qplaintextedit_p.h
+++ b/src/gui/widgets/qplaintextedit_p.h
@@ -72,6 +72,7 @@ class QMimeData;
class QPlainTextEdit;
class ExtraArea;
+class QPanGesture;
class QPlainTextEditControl : public QTextControl
{
@@ -173,6 +174,10 @@ public:
void _q_cursorPositionChanged();
void _q_modificationChanged(bool);
+
+ void _q_gestureTriggered();
+ int originalOffsetY;
+ QPanGesture *panGesture;
};
QT_END_NAMESPACE
diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp
index ac3338b..d168028 100644
--- a/src/gui/widgets/qprogressbar.cpp
+++ b/src/gui/widgets/qprogressbar.cpp
@@ -204,7 +204,7 @@ bool QProgressBarPrivate::repaintRequired() const
\o A progress bar shown in the Plastique widget style.
\endtable
- \sa QTimeLine, QProgressDialog, {fowler}{GUI Design Handbook: Progress Indicator}
+ \sa QProgressDialog, {fowler}{GUI Design Handbook: Progress Indicator}
*/
/*!
diff --git a/src/gui/widgets/qsizegrip.cpp b/src/gui/widgets/qsizegrip.cpp
index d263b9c..c6aae68 100644
--- a/src/gui/widgets/qsizegrip.cpp
+++ b/src/gui/widgets/qsizegrip.cpp
@@ -335,8 +335,7 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e)
orientation = d->atLeft() ? SZ_SIZETOPLEFT : SZ_SIZETOPRIGHT;
ReleaseCapture();
- QT_WA_INLINE(PostMessageW(tlw->winId(), WM_SYSCOMMAND, orientation, 0),
- PostMessageA(tlw->winId(), WM_SYSCOMMAND, orientation, 0));
+ PostMessage(tlw->winId(), WM_SYSCOMMAND, orientation, 0);
return;
}
#endif // Q_WS_WIN
diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp
index e069a21..7441df4 100644
--- a/src/gui/widgets/qspinbox.cpp
+++ b/src/gui/widgets/qspinbox.cpp
@@ -50,6 +50,7 @@
#include <qdebug.h>
#include <math.h>
+#include <float.h>
QT_BEGIN_NAMESPACE
@@ -823,8 +824,8 @@ void QDoubleSpinBox::setRange(double minimum, double maximum)
Sets how many decimals the spinbox will use for displaying and
interpreting doubles.
- \warning The results might not be reliable with very high values
- for \a decimals.
+ \warning The maximum value for \a decimals is DBL_MAX_10_EXP +
+ DBL_DIG (ie. 323) because of the limitations of the double type.
Note: The maximum, minimum and value might change as a result of
changing this property.
@@ -840,7 +841,7 @@ int QDoubleSpinBox::decimals() const
void QDoubleSpinBox::setDecimals(int decimals)
{
Q_D(QDoubleSpinBox);
- d->decimals = qMax(0, decimals);
+ d->decimals = qBound(0, decimals, DBL_MAX_10_EXP + DBL_DIG);
setRange(minimum(), maximum()); // make sure values are rounded
setValue(value());
@@ -1205,7 +1206,7 @@ bool QDoubleSpinBoxPrivate::isIntermediateValue(const QString &str) const
return false;
}
if (doright) {
- QSBDEBUG("match %lld min_left %lld max_left %lld", match, min_left, max_left);
+ QSBDEBUG() << "match" << match << "min_left" << min_left << "max_left" << max_left;
if (!doleft) {
if (min_left == max_left) {
const bool ret = isIntermediateValueHelper(qAbs(left),
@@ -1472,7 +1473,7 @@ QString QDoubleSpinBoxPrivate::textFromValue(const QVariant &f) const
static bool isIntermediateValueHelper(qint64 num, qint64 min, qint64 max, qint64 *match)
{
- QSBDEBUG("%lld %lld %lld", num, min, max);
+ QSBDEBUG() << num << min << max;
if (num >= min && num <= max) {
if (match)
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 11cb6a1..690e624 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -663,7 +663,7 @@ void QTabBarPrivate::refresh()
if (pressedIndex != -1
&& movable
&& QApplication::mouseButtons() == Qt::NoButton) {
- _q_moveTabFinished(pressedIndex);
+ moveTabFinished(pressedIndex);
if (!validIndex(pressedIndex))
pressedIndex = -1;
}
@@ -1662,26 +1662,17 @@ void QTabBarPrivate::slide(int from, int to)
q->setUpdatesEnabled(true);
int postLocation = vertical ? q->tabRect(to).y() : q->tabRect(to).x();
int length = postLocation - preLocation;
- tabList[to].makeTimeLine(q);
- tabList[to].dragOffset += -1 * length;
- tabList[to].timeLine->setFrameRange(tabList[to].dragOffset, 0);
- animations[tabList[to].timeLine] = to;
- tabList[to].timeLine->setDuration(ANIMATION_DURATION);
- if (tabList[to].timeLine->state() != QTimeLine::Running)
- tabList[to].timeLine->start();
+ tabList[to].dragOffset -= length;
+ tabList[to].startAnimation(this, ANIMATION_DURATION);
}
-void QTabBarPrivate::_q_moveTab(int offset)
+void QTabBarPrivate::moveTab(int index, int offset)
{
- Q_Q(QTabBar);
- if (QTimeLine *timeLine = qobject_cast<QTimeLine *>(q->sender())) {
- int index = animations[timeLine];
- if (!validIndex(index))
- return;
- tabList[index].dragOffset = offset;
- layoutTab(index); // Make buttons follow tab
- q->update();
- }
+ if (!validIndex(index))
+ return;
+ tabList[index].dragOffset = offset;
+ layoutTab(index); // Make buttons follow tab
+ q_func()->update();
}
/*!\reimp
@@ -1695,7 +1686,7 @@ void QTabBar::mousePressEvent(QMouseEvent *event)
}
// Be safe!
if (d->pressedIndex != -1 && d->movable)
- d->_q_moveTabFinished(d->pressedIndex);
+ d->moveTabFinished(d->pressedIndex);
d->pressedIndex = d->indexAtPos(event->pos());
if (d->validIndex(d->pressedIndex)) {
@@ -1721,7 +1712,7 @@ void QTabBar::mouseMoveEvent(QMouseEvent *event)
// Be safe!
if (d->pressedIndex != -1
&& event->buttons() == Qt::NoButton)
- d->_q_moveTabFinished(d->pressedIndex);
+ d->moveTabFinished(d->pressedIndex);
// Start drag
if (!d->dragInProgress && d->pressedIndex != -1) {
@@ -1789,16 +1780,6 @@ void QTabBar::mouseMoveEvent(QMouseEvent *event)
optTabBase.documentMode = d->documentMode;
}
-void QTabBarPrivate::_q_moveTabFinished()
-{
- Q_Q(QTabBar);
- if (QTimeLine *timeLine = qobject_cast<QTimeLine *>(q->sender())) {
- int index = animations[timeLine];
- animations.remove(timeLine);
- _q_moveTabFinished(index);
- }
-}
-
void QTabBarPrivate::setupMovableTab()
{
Q_Q(QTabBar);
@@ -1838,11 +1819,19 @@ void QTabBarPrivate::setupMovableTab()
movingTab->setVisible(true);
}
-void QTabBarPrivate::_q_moveTabFinished(int index)
+void QTabBarPrivate::moveTabFinished(int index)
{
Q_Q(QTabBar);
bool cleanup = (pressedIndex == index) || (pressedIndex == -1) || !validIndex(index);
- if (animations.isEmpty() && cleanup) {
+ bool allAnimationsFinished = true;
+#ifndef QT_NO_ANIMATION
+ for(int i = 0; allAnimationsFinished && i < tabList.count(); ++i) {
+ const Tab &t = tabList.at(i);
+ if (t.animation && t.animation->state() == QAbstractAnimation::Running)
+ allAnimationsFinished = false;
+ }
+#endif //QT_NO_ANIMATION
+ if (allAnimationsFinished && cleanup) {
movingTab->setVisible(false); // We might not get a mouse release
for (int i = 0; i < tabList.count(); ++i) {
tabList[i].dragOffset = 0;
@@ -1877,17 +1866,8 @@ void QTabBar::mouseReleaseEvent(QMouseEvent *event)
? tabRect(d->pressedIndex).height()
: tabRect(d->pressedIndex).width();
int duration = qMin(ANIMATION_DURATION,
- ((length < 0 ? (-1 * length) : length) * ANIMATION_DURATION) / width);
- if (duration > 0) {
- d->tabList[d->pressedIndex].makeTimeLine(this);
- d->tabList[d->pressedIndex].timeLine->setFrameRange(length, 0);
- d->animations[d->tabList[d->pressedIndex].timeLine] = d->pressedIndex;
- d->tabList[d->pressedIndex].timeLine->setDuration(duration);
- if (d->tabList[d->pressedIndex].timeLine->state() != QTimeLine::Running)
- d->tabList[d->pressedIndex].timeLine->start();
- } else {
- d->_q_moveTabFinished(d->pressedIndex);
- }
+ (qAbs(length) * ANIMATION_DURATION) / width);
+ d->tabList[d->pressedIndex].startAnimation(d, duration);
d->dragInProgress = false;
d->movingTab->setVisible(false);
d->dragStartPosition = QPoint();
diff --git a/src/gui/widgets/qtabbar.h b/src/gui/widgets/qtabbar.h
index 7514486..402f54b 100644
--- a/src/gui/widgets/qtabbar.h
+++ b/src/gui/widgets/qtabbar.h
@@ -215,8 +215,6 @@ private:
Q_DECLARE_PRIVATE(QTabBar)
Q_PRIVATE_SLOT(d_func(), void _q_scrollTabs())
Q_PRIVATE_SLOT(d_func(), void _q_closeTab())
- Q_PRIVATE_SLOT(d_func(), void _q_moveTab(int))
- Q_PRIVATE_SLOT(d_func(), void _q_moveTabFinished())
};
#endif // QT_NO_TABBAR
diff --git a/src/gui/widgets/qtabbar_p.h b/src/gui/widgets/qtabbar_p.h
index dbae055..b9b9fba 100644
--- a/src/gui/widgets/qtabbar_p.h
+++ b/src/gui/widgets/qtabbar_p.h
@@ -58,9 +58,8 @@
#include <qicon.h>
#include <qtoolbutton.h>
-#include <qtimeline.h>
-#include <qhash.h>
#include <qdebug.h>
+#include <qvariantanimation.h>
#ifndef QT_NO_TABBAR
@@ -75,9 +74,10 @@ class QTabBarPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QTabBar)
public:
QTabBarPrivate()
- :currentIndex(-1), pressedIndex(-1),
- shape(QTabBar::RoundedNorth),
- layoutDirty(false), drawBase(true), scrollOffset(0), expanding(true), closeButtonOnTabs(false), selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false), dragInProgress(false), documentMode(false), movingTab(0) {}
+ :currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false),
+ drawBase(true), scrollOffset(0), expanding(true), closeButtonOnTabs(false),
+ selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
+ dragInProgress(false), documentMode(false), movingTab(0) {}
int currentIndex;
int pressedIndex;
@@ -88,16 +88,13 @@ public:
struct Tab {
inline Tab(const QIcon &ico, const QString &txt)
- : enabled(true)
- , shortcutId(0)
- , text(txt)
- , icon(ico)
- , leftWidget(0)
- , rightWidget(0)
- , lastTab(-1)
- , timeLine(0)
- , dragOffset(0)
+ : enabled(true) , shortcutId(0), text(txt), icon(ico),
+ leftWidget(0), rightWidget(0), lastTab(-1), dragOffset(0)
+#ifndef QT_NO_ANIMATION
+ , animation(0)
+#endif //QT_NO_ANIMATION
{}
+ bool operator==(const Tab &other) const { return &other == this; }
bool enabled;
int shortcutId;
QString text;
@@ -117,21 +114,39 @@ public:
QWidget *leftWidget;
QWidget *rightWidget;
int lastTab;
-
- QTimeLine *timeLine;
int dragOffset;
- void makeTimeLine(QWidget *q) {
- if (timeLine)
- return;
- timeLine = new QTimeLine(ANIMATION_DURATION, q);
- q->connect(timeLine, SIGNAL(frameChanged(int)), q, SLOT(_q_moveTab(int)));
- q->connect(timeLine, SIGNAL(finished()), q, SLOT(_q_moveTabFinished()));
+#ifndef QT_NO_ANIMATION
+ ~Tab() { delete animation; }
+ struct TabBarAnimation : public QVariantAnimation {
+ TabBarAnimation(Tab *t, QTabBarPrivate *_priv) : tab(t), priv(_priv)
+ { setEasingCurve(QEasingCurve::InOutQuad); }
+
+ void updateCurrentValue(const QVariant &current)
+ { priv->moveTab(priv->tabList.indexOf(*tab), current.toInt()); }
+
+ void updateState(State, State newState)
+ { if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab)); }
+ private:
+ //these are needed for the callbacks
+ Tab *tab;
+ QTabBarPrivate *priv;
+ } *animation;
+
+ void startAnimation(QTabBarPrivate *priv, int duration) {
+ if (!animation)
+ animation = new TabBarAnimation(this, priv);
+ animation->setStartValue(dragOffset);
+ animation->setEndValue(0);
+ animation->setDuration(duration);
+ animation->start();
}
-
+#else
+ void startAnimation(QTabBarPrivate *priv, int duration)
+ { Q_UNUSED(duration); priv->moveTabFinished(priv->tabList.indexOf(*this)); }
+#endif //QT_NO_ANIMATION
};
QList<Tab> tabList;
- QHash<QTimeLine*, int> animations;
int calculateNewPosition(int from, int to, int index) const;
void slide(int from, int to);
@@ -152,9 +167,8 @@ public:
void _q_scrollTabs();
void _q_closeTab();
- void _q_moveTab(int);
- void _q_moveTabFinished();
- void _q_moveTabFinished(int offset);
+ void moveTab(int index, int offset);
+ void moveTabFinished(int index);
QRect hoverRect;
void refresh();
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index c8d8d04..e80df92 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -67,6 +67,8 @@
#include <qtexttable.h>
#include <qvariant.h>
+#include <qstandardgestures.h>
+
#include <qinputcontext.h>
#endif
@@ -111,6 +113,9 @@ QTextEditPrivate::QTextEditPrivate()
preferRichText = false;
showCursorOnInitialShow = true;
inDrag = false;
+#ifdef Q_WS_WIN
+ singleFingerPanEnabled = true;
+#endif
}
void QTextEditPrivate::createAutoBulletList()
@@ -178,6 +183,8 @@ void QTextEditPrivate::init(const QString &html)
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::IBeamCursor);
#endif
+ panGesture = new QPanGesture(q);
+ QObject::connect(panGesture, SIGNAL(triggered()), q, SLOT(_q_gestureTriggered()));
}
void QTextEditPrivate::_q_repaintContents(const QRectF &contentsRect)
@@ -2610,6 +2617,25 @@ void QTextEdit::ensureCursorVisible()
d->control->ensureCursorVisible();
}
+void QTextEditPrivate::_q_gestureTriggered()
+{
+ Q_Q(QTextEdit);
+ QPanGesture *g = qobject_cast<QPanGesture*>(q->sender());
+ if (!g)
+ return;
+ QScrollBar *hBar = q->horizontalScrollBar();
+ QScrollBar *vBar = q->verticalScrollBar();
+ QPoint delta = g->pos() - (g->lastPos().isNull() ? g->pos() : g->lastPos());
+ if (!delta.isNull()) {
+ if (QApplication::isRightToLeft())
+ delta.rx() *= -1;
+ int newX = hBar->value() - delta.x();
+ int newY = vBar->value() - delta.y();
+ hbar->setValue(newX);
+ vbar->setValue(newY);
+ }
+}
+
/*!
\enum QTextEdit::KeyboardAction
diff --git a/src/gui/widgets/qtextedit.h b/src/gui/widgets/qtextedit.h
index 617822a..9e10e07 100644
--- a/src/gui/widgets/qtextedit.h
+++ b/src/gui/widgets/qtextedit.h
@@ -414,6 +414,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_currentCharFormatChanged(const QTextCharFormat &))
Q_PRIVATE_SLOT(d_func(), void _q_adjustScrollbars())
Q_PRIVATE_SLOT(d_func(), void _q_ensureVisible(const QRectF &))
+ Q_PRIVATE_SLOT(d_func(), void _q_gestureTriggered())
friend class QTextEditControl;
friend class QTextDocument;
friend class QTextControl;
diff --git a/src/gui/widgets/qtextedit_p.h b/src/gui/widgets/qtextedit_p.h
index e7609d6..249331e 100644
--- a/src/gui/widgets/qtextedit_p.h
+++ b/src/gui/widgets/qtextedit_p.h
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_TEXTEDIT
class QMimeData;
-
+class QPanGesture;
class QTextEditPrivate : public QAbstractScrollAreaPrivate
{
Q_DECLARE_PUBLIC(QTextEdit)
@@ -129,6 +129,9 @@ public:
QString anchorToScrollToWhenVisible;
+ void _q_gestureTriggered();
+ QPanGesture *panGesture;
+
#ifdef QT_KEYPAD_NAVIGATION
QBasicTimer deleteAllTimer;
#endif
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp
index b635628..426c3e1 100644
--- a/src/gui/widgets/qtoolbar.cpp
+++ b/src/gui/widgets/qtoolbar.cpp
@@ -70,6 +70,8 @@
#include "qdebug.h"
+#define POPUP_TIMER_INTERVAL 500
+
QT_BEGIN_NAMESPACE
#ifdef Q_WS_MAC
@@ -87,14 +89,6 @@ static void qt_mac_updateToolBarButtonHint(QWidget *parentWidget)
void QToolBarPrivate::init()
{
Q_Q(QToolBar);
-
- waitForPopupTimer = new QTimer(q);
- waitForPopupTimer->setSingleShot(false);
- waitForPopupTimer->setInterval(500);
- QObject::connect(waitForPopupTimer, SIGNAL(timeout()), q, SLOT(_q_waitForPopup()));
-
- floatable = true;
- movable = true;
q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
q->setBackgroundRole(QPalette::Button);
q->setAttribute(Qt::WA_Hover);
@@ -880,7 +874,7 @@ QAction *QToolBar::insertSeparator(QAction *before)
If you add a QToolButton with this method, the tools bar's
Qt::ToolButtonStyle will not be respected.
- Note: You should use QAction::setVisible() to change the
+ \note You should use QAction::setVisible() to change the
visibility of the widget. Using QWidget::setVisible(),
QWidget::show() and QWidget::hide() does not work.
@@ -1080,19 +1074,46 @@ static bool waitForPopup(QToolBar *tb, QWidget *popup)
return false;
}
+#if defined(Q_WS_MAC)
+static bool toolbarInUnifiedToolBar(QToolBar *toolbar)
+{
+ const QMainWindow *mainWindow = qobject_cast<const QMainWindow *>(toolbar->parentWidget());
+ return mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()
+ && mainWindow->toolBarArea(toolbar) == Qt::TopToolBarArea;
+}
+#endif
+
/*! \reimp */
bool QToolBar::event(QEvent *event)
{
Q_D(QToolBar);
switch (event->type()) {
+ case QEvent::Timer:
+ if (d->waitForPopupTimer.timerId() == static_cast<QTimerEvent*>(event)->timerId()) {
+ QWidget *w = QApplication::activePopupWidget();
+ if (!waitForPopup(this, w)) {
+ d->waitForPopupTimer.stop();
+ if (!this->underMouse())
+ d->layout->setExpanded(false);
+ }
+ }
+ break;
case QEvent::Hide:
if (!isHidden())
break;
// fallthrough intended
case QEvent::Show:
d->toggleViewAction->setChecked(event->type() == QEvent::Show);
-#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
+#if defined(Q_WS_MAC)
+ if (toolbarInUnifiedToolBar(this)) {
+ // I can static_cast because I did the qobject_cast in the if above, therefore
+ // we must have a QMainWindowLayout here.
+ QMainWindowLayout *mwLayout = static_cast<QMainWindowLayout *>(parentWidget()->layout());
+ mwLayout->fixSizeInUnifiedToolbar(this);
+ mwLayout->syncUnifiedToolbarVisibility();
+ }
+# if !defined(QT_MAC_USE_COCOA)
// Fall through
case QEvent::LayoutRequest: {
// There's currently no way to invalidate the size and let
@@ -1107,10 +1128,9 @@ bool QToolBar::event(QEvent *event)
}
if (needUpdate) {
- OSWindowRef windowRef = qt_mac_window_for(this);
- if (mainWindow->unifiedTitleAndToolBarOnMac()
- && mainWindow->toolBarArea(this) == Qt::TopToolBarArea
- && macWindowToolbarVisible(windowRef)) {
+ OSWindowRef windowRef = qt_mac_window_for(mainWindow);
+ if (toolbarInUnifiedToolBar(this)
+ && macWindowToolbarIsVisible(windowRef)) {
DisableScreenUpdates();
macWindowToolbarShow(this, false);
macWindowToolbarShow(this, true);
@@ -1122,7 +1142,8 @@ bool QToolBar::event(QEvent *event)
return earlyResult;
}
}
-#endif
+# endif // !QT_MAC_USE_COCOA
+#endif // Q_WS_MAC
break;
case QEvent::ParentChange:
d->layout->checkUsePopupMenu();
@@ -1141,6 +1162,10 @@ bool QToolBar::event(QEvent *event)
if (d->mouseReleaseEvent(static_cast<QMouseEvent*>(event)))
return true;
break;
+ case QEvent::HoverEnter:
+ case QEvent::HoverLeave:
+ // there's nothing special to do here and we don't want to update the whole widget
+ return true;
case QEvent::HoverMove: {
#ifndef QT_NO_CURSOR
QHoverEvent *e = static_cast<QHoverEvent*>(event);
@@ -1183,11 +1208,11 @@ bool QToolBar::event(QEvent *event)
QWidget *w = QApplication::activePopupWidget();
if (waitForPopup(this, w)) {
- d->waitForPopupTimer->start();
+ d->waitForPopupTimer.start(POPUP_TIMER_INTERVAL, this);
break;
}
- d->waitForPopupTimer->stop();
+ d->waitForPopupTimer.stop();
d->layout->setExpanded(false);
break;
}
@@ -1197,18 +1222,6 @@ bool QToolBar::event(QEvent *event)
return QWidget::event(event);
}
-void QToolBarPrivate::_q_waitForPopup()
-{
- Q_Q(QToolBar);
-
- QWidget *w = QApplication::activePopupWidget();
- if (!waitForPopup(q, w)) {
- waitForPopupTimer->stop();
- if (!q->underMouse())
- layout->setExpanded(false);
- }
-}
-
/*!
Returns a checkable action that can be used to show or hide this
toolbar.
diff --git a/src/gui/widgets/qtoolbar.h b/src/gui/widgets/qtoolbar.h
index 2ab4ffd..07502b3 100644
--- a/src/gui/widgets/qtoolbar.h
+++ b/src/gui/widgets/qtoolbar.h
@@ -167,7 +167,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_toggleView(bool))
Q_PRIVATE_SLOT(d_func(), void _q_updateIconSize(const QSize &))
Q_PRIVATE_SLOT(d_func(), void _q_updateToolButtonStyle(Qt::ToolButtonStyle))
- Q_PRIVATE_SLOT(d_func(), void _q_waitForPopup())
friend class QMainWindow;
friend class QMainWindowLayout;
diff --git a/src/gui/widgets/qtoolbar_p.h b/src/gui/widgets/qtoolbar_p.h
index b03c460..42ea97f 100644
--- a/src/gui/widgets/qtoolbar_p.h
+++ b/src/gui/widgets/qtoolbar_p.h
@@ -56,6 +56,7 @@
#include "qtoolbar.h"
#include "QtGui/qaction.h"
#include "private/qwidget_p.h"
+#include <QtCore/qbasictimer.h>
QT_BEGIN_NAMESPACE
@@ -70,7 +71,7 @@ class QToolBarPrivate : public QWidgetPrivate
public:
inline QToolBarPrivate()
- : explicitIconSize(false), explicitToolButtonStyle(false), movable(false),
+ : explicitIconSize(false), explicitToolButtonStyle(false), movable(true), floatable(true),
allowedAreas(Qt::AllToolBarAreas), orientation(Qt::Horizontal),
toolButtonStyle(Qt::ToolButtonIconOnly),
layout(0), state(0)
@@ -84,16 +85,15 @@ public:
void _q_toggleView(bool b);
void _q_updateIconSize(const QSize &sz);
void _q_updateToolButtonStyle(Qt::ToolButtonStyle style);
- void _q_waitForPopup();
bool explicitIconSize;
bool explicitToolButtonStyle;
bool movable;
+ bool floatable;
Qt::ToolBarAreas allowedAreas;
Qt::Orientation orientation;
Qt::ToolButtonStyle toolButtonStyle;
QSize iconSize;
- bool floatable;
QAction *toggleViewAction;
@@ -125,7 +125,7 @@ public:
void unplug(const QRect &r);
void plug(const QRect &r);
- QTimer *waitForPopupTimer;
+ QBasicTimer waitForPopupTimer;
};
#endif // QT_NO_TOOLBAR
diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp
index db2afd6..b4a0ef0 100644
--- a/src/gui/widgets/qtoolbararealayout.cpp
+++ b/src/gui/widgets/qtoolbararealayout.cpp
@@ -156,21 +156,15 @@ void QToolBarAreaLayoutLine::fitLayout()
if (item.skip())
continue;
- QToolBarLayout *tblayout = qobject_cast<QToolBarLayout*>(item.widgetItem->widget()->layout());
- if (tblayout)
+ if (QToolBarLayout *tblayout = qobject_cast<QToolBarLayout*>(item.widgetItem->widget()->layout()))
tblayout->checkUsePopupMenu();
- int itemMin = pick(o, item.minimumSize());
- int itemHint = pick(o, item.sizeHint());
- //we ensure the extraspace is not too low
- item.size = qMax(item.size, itemHint);
- if (item.preferredSize > 0) {
- //preferredSize would be the default size
- item.size = item.preferredSize;
- }
+ const int itemMin = pick(o, item.minimumSize());
+ //preferredSize is the default if it is set, otherwise, we take the sizehint
+ item.size = item.preferredSize > 0 ? item.preferredSize : pick(o, item.sizeHint());
//the extraspace is the space above the item minimum sizehint
- int extraSpace = qMin(item.size - itemMin, extra);
+ const int extraSpace = qMin(item.size - itemMin, extra);
item.size = itemMin + extraSpace; //that is the real size
extra -= extraSpace;
@@ -932,7 +926,7 @@ void QToolBarAreaLayout::apply(bool animate)
if (visible && dock.o == Qt::Horizontal)
geo = QStyle::visualRect(dir, line.rect, geo);
- layout->widgetAnimator->animate(widget, geo, animate);
+ layout->widgetAnimator.animate(widget, geo, animate);
}
}
}
diff --git a/src/gui/widgets/qtoolbutton.cpp b/src/gui/widgets/qtoolbutton.cpp
index 6dcbfec..2c85dc5 100644
--- a/src/gui/widgets/qtoolbutton.cpp
+++ b/src/gui/widgets/qtoolbutton.cpp
@@ -378,7 +378,17 @@ void QToolButton::initStyleOption(QStyleOptionToolButton *option) const
if (d->hasMenu())
option->features |= QStyleOptionToolButton::HasMenu;
#endif
- option->toolButtonStyle = d->toolButtonStyle;
+ if (d->toolButtonStyle == Qt::ToolButtonFollowStyle) {
+ option->toolButtonStyle = Qt::ToolButtonStyle(style()->styleHint(QStyle::SH_ToolButtonStyle, option, this));
+ } else
+ option->toolButtonStyle = d->toolButtonStyle;
+
+ if (option->toolButtonStyle == Qt::ToolButtonTextBesideIcon) {
+ // If the action is not prioritized, remove the text label to save space
+ if (d->defaultAction && d->defaultAction->priority() < QAction::NormalPriority)
+ option->toolButtonStyle = Qt::ToolButtonIconOnly;
+ }
+
if (d->icon.isNull() && d->arrowType == Qt::NoArrow && !forceNoText) {
if (!d->text.isEmpty())
option->toolButtonStyle = Qt::ToolButtonTextOnly;
@@ -476,6 +486,9 @@ QSize QToolButton::minimumSizeHint() const
The default is Qt::ToolButtonIconOnly.
+ To have the style of toolbuttons follow the system settings (as available
+ in GNOME and KDE desktop environments), set this property to Qt::ToolButtonFollowStyle.
+
QToolButton automatically connects this slot to the relevant
signal in the QMainWindow in which is resides.
*/
diff --git a/src/gui/widgets/qwidgetanimator.cpp b/src/gui/widgets/qwidgetanimator.cpp
index c67be4a..1a93b51 100644
--- a/src/gui/widgets/qwidgetanimator.cpp
+++ b/src/gui/widgets/qwidgetanimator.cpp
@@ -39,158 +39,80 @@
**
****************************************************************************/
-#include <QtCore/qtimer.h>
-#include <QtCore/qdatetime.h>
+#include <QtCore/qpropertyanimation.h>
#include <QtGui/qwidget.h>
-#include <QtGui/qtextedit.h>
-#include <QtGui/private/qwidget_p.h>
-#include <qdebug.h>
+#include <QtGui/private/qmainwindowlayout_p.h>
#include "qwidgetanimator_p.h"
QT_BEGIN_NAMESPACE
-static const int g_animation_steps = 12;
-static const int g_animation_interval = 16;
-
-// 1000 * (x/(1 + x*x) + 0.5) on interval [-1, 1]
-static const int g_animate_function[] =
-{
- 0, 1, 5, 12, 23, 38, 58, 84, 116, 155, 199, 251, 307, 368,
- 433, 500, 566, 631, 692, 748, 799, 844, 883, 915, 941, 961,
- 976, 987, 994, 998, 1000
-};
-static const int g_animate_function_points = sizeof(g_animate_function)/sizeof(int);
-
-static inline int animateHelper(int start, int stop, int step, int steps)
-{
- if (start == stop)
- return start;
- if (step == 0)
- return start;
- if (step == steps)
- return stop;
-
- int x = g_animate_function_points*step/(steps + 1);
- return start + g_animate_function[x]*(stop - start)/1000;
-}
-
-QWidgetAnimator::QWidgetAnimator(QObject *parent)
- : QObject(parent)
+QWidgetAnimator::QWidgetAnimator(QMainWindowLayout *layout) : m_mainWindowLayout(layout)
{
- m_time = new QTime();
- m_timer = new QTimer(this);
- m_timer->setInterval(g_animation_interval);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(animationStep()));
}
-QWidgetAnimator::~QWidgetAnimator()
+void QWidgetAnimator::abort(QWidget *w)
{
- delete m_time;
+#ifndef QT_NO_ANIMATION
+ AnimationMap::iterator it = m_animation_map.find(w);
+ if (it == m_animation_map.end())
+ return;
+ QPropertyAnimation *anim = *it;
+ m_animation_map.erase(it);
+ anim->stop();
+ m_mainWindowLayout->animationFinished(w);
+#else
+ Q_UNUSED(w); //there is no animation to abort
+#endif //QT_NO_ANIMATION
}
-void QWidgetAnimator::abort(QWidget *w)
+#ifndef QT_NO_ANIMATION
+void QWidgetAnimator::animationFinished()
{
- if (m_animation_map.remove(w) == 0)
- return;
- if (m_animation_map.isEmpty()) {
- m_timer->stop();
- emit finishedAll();
- }
+ QPropertyAnimation *anim = qobject_cast<QPropertyAnimation*>(sender());
+ abort(static_cast<QWidget*>(anim->targetObject()));
}
+#endif //QT_NO_ANIMATION
void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, bool animate)
{
- QRect final_geometry = _final_geometry;
-
QRect r = widget->geometry();
if (r.right() < 0 || r.bottom() < 0)
r = QRect();
- if (r.isNull() || final_geometry.isNull())
- animate = false;
+ animate = animate && !r.isNull() && !_final_geometry.isNull();
- AnimationMap::const_iterator it = m_animation_map.constFind(widget);
- if (it == m_animation_map.constEnd()) {
- if (r == final_geometry) {
- emit finished(widget);
- return;
- }
- } else {
- if ((*it).r2 == final_geometry)
- return;
- }
-
- if (animate) {
- AnimationItem item(widget, r, final_geometry);
- m_animation_map[widget] = item;
- if (!m_timer->isActive()) {
- m_timer->start();
- m_time->start();
- }
- } else {
- m_animation_map.remove(widget);
- if (m_animation_map.isEmpty())
- m_timer->stop();
-
- if (!final_geometry.isValid() && !widget->isWindow()) {
- // Make the wigdet go away by sending it to negative space
- QSize s = widget->size();
- final_geometry = QRect(-500 - s.width(), -500 - s.height(), s.width(), s.height());
- }
- widget->setGeometry(final_geometry);
-
- emit finished(widget);
-
- if (m_animation_map.isEmpty())
- emit finishedAll();
+ // might make the wigdet go away by sending it to negative space
+ const QRect final_geometry = _final_geometry.isValid() || widget->isWindow() ? _final_geometry :
+ QRect(QPoint(-500 - widget->width(), -500 - widget->height()), widget->size());
+ if (r == final_geometry)
+ return; //the widget is already where it should be
+#ifndef QT_NO_ANIMATION
+ AnimationMap::const_iterator it = m_animation_map.constFind(widget);
+ if (it != m_animation_map.constEnd() && (*it)->endValue().toRect() == final_geometry)
return;
- }
-}
-
-void QWidgetAnimator::animationStep()
-{
- int steps = (1 + m_time->restart())/g_animation_interval;
- AnimationMap::iterator it = m_animation_map.begin();
- while (it != m_animation_map.end()) {
- AnimationItem &item = *it;
-
- item.step = qMin(item.step + steps, g_animation_steps);
-
- int x = animateHelper(item.r1.left(), item.r2.left(),
- item.step, g_animation_steps);
- int y = animateHelper(item.r1.top(), item.r2.top(),
- item.step, g_animation_steps);
- int w = animateHelper(item.r1.width(), item.r2.width(),
- item.step, g_animation_steps);
- int h = animateHelper(item.r1.height(), item.r2.height(),
- item.step, g_animation_steps);
-
- item.widget->setGeometry(x, y, w, h);
-
- if (item.step == g_animation_steps) {
- emit finished(item.widget);
- AnimationMap::iterator tmp = it;
- ++it;
- m_animation_map.erase(tmp);
- } else {
- ++it;
- }
- }
- if (m_animation_map.isEmpty()) {
- m_timer->stop();
- emit finishedAll();
- }
+ QPropertyAnimation *anim = new QPropertyAnimation(widget, "geometry");
+ anim->setDuration(animate ? 200 : 0);
+ anim->setEasingCurve(QEasingCurve::InOutQuad);
+ anim->setEndValue(final_geometry);
+ m_animation_map[widget] = anim;
+ connect(anim, SIGNAL(finished()), SLOT(animationFinished()));
+ anim->start(QPropertyAnimation::DeleteWhenStopped);
+#else
+ //we do it in one shot
+ widget->setGeometry(final_geometry);
+ m_mainWindowLayout->animationFinished(widget);
+#endif //QT_NO_ANIMATION
}
bool QWidgetAnimator::animating() const
{
- return m_timer->isActive();
+ return !m_animation_map.isEmpty();
}
-bool QWidgetAnimator::animating(QWidget *widget)
+bool QWidgetAnimator::animating(QWidget *widget) const
{
return m_animation_map.contains(widget);
}
diff --git a/src/gui/widgets/qwidgetanimator_p.h b/src/gui/widgets/qwidgetanimator_p.h
index 6ee150b..5a3e39d 100644
--- a/src/gui/widgets/qwidgetanimator_p.h
+++ b/src/gui/widgets/qwidgetanimator_p.h
@@ -54,47 +54,35 @@
//
#include <qobject.h>
-#include <qrect.h>
#include <qmap.h>
QT_BEGIN_NAMESPACE
class QWidget;
-class QTimer;
-class QTime;
+class QMainWindowLayout;
+class QPropertyAnimation;
+class QRect;
class QWidgetAnimator : public QObject
{
Q_OBJECT
public:
- QWidgetAnimator(QObject *parent = 0);
- ~QWidgetAnimator();
+ QWidgetAnimator(QMainWindowLayout *layout);
void animate(QWidget *widget, const QRect &final_geometry, bool animate);
bool animating() const;
- bool animating(QWidget *widget);
+ bool animating(QWidget *widget) const;
void abort(QWidget *widget);
-signals:
- void finished(QWidget *widget);
- void finishedAll();
-
-private slots:
- void animationStep();
+#ifndef QT_NO_ANIMATION
+private Q_SLOTS:
+ void animationFinished();
+#endif
private:
- struct AnimationItem {
- AnimationItem(QWidget *_widget = 0, const QRect &_r1 = QRect(),
- const QRect &_r2 = QRect())
- : widget(_widget), r1(_r1), r2(_r2), step(0) {}
- QWidget *widget;
- QRect r1, r2;
- int step;
- };
- typedef QMap<QWidget*, AnimationItem> AnimationMap;
+ typedef QMap<QWidget*, QPropertyAnimation*> AnimationMap;
AnimationMap m_animation_map;
- QTimer *m_timer;
- QTime *m_time;
+ QMainWindowLayout *m_mainWindowLayout;
};
QT_END_NAMESPACE
diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp
index 58ef1e3..2833c08 100644
--- a/src/gui/widgets/qworkspace.cpp
+++ b/src/gui/widgets/qworkspace.cpp
@@ -397,21 +397,17 @@ void QWorkspaceTitleBarPrivate::readColors()
pal.setColor(QPalette::Inactive, QPalette::Highlight, colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION)));
pal.setColor(QPalette::Active, QPalette::HighlightedText, colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)));
pal.setColor(QPalette::Inactive, QPalette::HighlightedText, colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)));
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- colorsInitialized = true;
- BOOL gradient;
- QT_WA({
- SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
- } , {
- SystemParametersInfoA(SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
- });
- if (gradient) {
- pal.setColor(QPalette::Active, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTACTIVECAPTION)));
- pal.setColor(QPalette::Inactive, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTINACTIVECAPTION)));
- } else {
- pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Active, QPalette::Highlight));
- pal.setColor(QPalette::Inactive, QPalette::Base, pal.color(QPalette::Inactive, QPalette::Highlight));
- }
+
+ colorsInitialized = true;
+ BOOL gradient = false;
+ SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
+
+ if (gradient) {
+ pal.setColor(QPalette::Active, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTACTIVECAPTION)));
+ pal.setColor(QPalette::Inactive, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTINACTIVECAPTION)));
+ } else {
+ pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Active, QPalette::Highlight));
+ pal.setColor(QPalette::Inactive, QPalette::Base, pal.color(QPalette::Inactive, QPalette::Highlight));
}
}
#endif // Q_WS_WIN
diff --git a/src/network/access/qabstractnetworkcache.cpp b/src/network/access/qabstractnetworkcache.cpp
index cfc9fe7..3f44059 100644
--- a/src/network/access/qabstractnetworkcache.cpp
+++ b/src/network/access/qabstractnetworkcache.cpp
@@ -283,6 +283,8 @@ void QNetworkCacheMetaData::setExpirationDate(const QDateTime &dateTime)
}
/*!
+ \since 4.6
+
Returns all the attributes stored with this cache item.
\sa setAttributes(), QNetworkRequest::Attribute
@@ -293,6 +295,8 @@ QNetworkCacheMetaData::AttributesMap QNetworkCacheMetaData::attributes() const
}
/*!
+ \since 4.6
+
Sets all attributes of this cache item to be the map \a attributes.
\sa attributes(), QNetworkRequest::setAttribute()
diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp
index 7a02ab6..790b48a 100644
--- a/src/network/access/qhttp.cpp
+++ b/src/network/access/qhttp.cpp
@@ -1152,7 +1152,7 @@ int QHttpResponseHeader::minorVersion() const
return d->minVer;
}
-/*! \reimp
+/*! \internal
*/
bool QHttpResponseHeader::parseLine(const QString &line, int number)
{
@@ -1366,7 +1366,7 @@ int QHttpRequestHeader::minorVersion() const
return d->minVer;
}
-/*! \reimp
+/*! \internal
*/
bool QHttpRequestHeader::parseLine(const QString &line, int number)
{
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 56caca9..afcdf17 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -146,7 +146,9 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const
for (int i = 0; i < channelCount; ++i)
if (channels[i].socket == socket)
return i;
- return -1;
+
+ qFatal("Called with unknown socket object.");
+ return 0;
}
bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const
@@ -173,26 +175,43 @@ bool QHttpNetworkConnectionPrivate::isSocketReading(QAbstractSocket *socket) con
return (i != -1 && (channels[i].state & ReadingState));
}
+void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, QByteArray &qba)
+{
+ reply.d_func()->responseData.append(qba);
+
+ // clear the original! helps with implicit sharing and
+ // avoiding memcpy when the user is reading the data
+ qba.clear();
+}
-void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, const QByteArray &fragment)
+void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data)
{
- char *dst = reply.d_func()->responseData.reserve(fragment.size());
- qMemCopy(dst, fragment.constData(), fragment.size());
+ reply.d_func()->responseData.append(data);
+
+ // clear the original! helps with implicit sharing and
+ // avoiding memcpy when the user is reading the data
+ data.clear();
}
-void QHttpNetworkConnectionPrivate::appendCompressedData(QHttpNetworkReply &reply, const QByteArray &fragment)
+void QHttpNetworkConnectionPrivate::appendCompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data)
{
- reply.d_func()->compressedData.append(fragment);
+ // Work in progress: Later we will directly use a list of QByteArray or a QRingBuffer
+ // instead of one QByteArray.
+ for(int i = 0; i < data.bufferCount(); i++) {
+ QByteArray &byteData = data[i];
+ reply.d_func()->compressedData.append(byteData.constData(), byteData.size());
+ }
+ data.clear();
}
qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailable(const QHttpNetworkReply &reply) const
{
- return reply.d_func()->responseData.size();
+ return reply.d_func()->responseData.byteAmount();
}
qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailableNextBlock(const QHttpNetworkReply &reply) const
{
- return reply.d_func()->responseData.nextDataBlockSize();
+ return reply.d_func()->responseData.sizeNextBlock();
}
qint64 QHttpNetworkConnectionPrivate::compressedBytesAvailable(const QHttpNetworkReply &reply) const
@@ -200,21 +219,6 @@ qint64 QHttpNetworkConnectionPrivate::compressedBytesAvailable(const QHttpNetwor
return reply.d_func()->compressedData.size();
}
-qint64 QHttpNetworkConnectionPrivate::read(QHttpNetworkReply &reply, QByteArray &data, qint64 maxSize)
-{
- QRingBuffer *rb = &reply.d_func()->responseData;
- if (maxSize == -1 || maxSize >= rb->size()) {
- // read the whole data
- data = rb->readAll();
- rb->clear();
- } else {
- // read only the requested length
- data.resize(maxSize);
- rb->read(data.data(), maxSize);
- }
- return data.size();
-}
-
void QHttpNetworkConnectionPrivate::eraseData(QHttpNetworkReply *reply)
{
reply->d_func()->compressedData.clear();
@@ -554,6 +558,8 @@ bool QHttpNetworkConnectionPrivate::expand(QAbstractSocket *socket, QHttpNetwork
reply->d_func()->totalProgress += inflated.size();
appendUncompressedData(*reply, inflated);
if (shouldEmitSignals(reply)) {
+ // important: At the point of this readyRead(), inflated must be cleared,
+ // else implicit sharing will trigger memcpy when the user is reading data!
emit reply->readyRead();
// make sure that the reply is valid
if (channels[i].reply != reply)
@@ -597,7 +603,7 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN
// try to reconnect/resend before sending an error.
if (channels[i].reconnectAttempts-- > 0) {
resendCurrentRequest(socket);
- } else {
+ } else if (reply) {
reply->d_func()->errorString = errorDetail(QNetworkReply::RemoteHostClosedError, socket);
emit reply->finishedWithError(QNetworkReply::RemoteHostClosedError, reply->d_func()->errorString);
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
@@ -670,18 +676,19 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN
{
// use the traditional slower reading (for compressed encoding, chunked encoding,
// no content-length etc)
- QBuffer fragment;
- fragment.open(QIODevice::WriteOnly);
- bytes = reply->d_func()->readBody(socket, &fragment);
+ QByteDataBuffer byteDatas;
+ bytes = reply->d_func()->readBody(socket, &byteDatas);
if (bytes) {
if (reply->d_func()->autoDecompress)
- appendCompressedData(*reply, fragment.data());
+ appendCompressedData(*reply, byteDatas);
else
- appendUncompressedData(*reply, fragment.data());
+ appendUncompressedData(*reply, byteDatas);
if (!reply->d_func()->autoDecompress) {
- reply->d_func()->totalProgress += fragment.size();
+ reply->d_func()->totalProgress += bytes;
if (shouldEmitSignals(reply)) {
+ // important: At the point of this readyRead(), the byteDatas list must be empty,
+ // else implicit sharing will trigger memcpy when the user is reading data!
emit reply->readyRead();
// make sure that the reply is valid
if (channels[i].reply != reply)
@@ -915,6 +922,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket,
Q_ASSERT(socket);
int i = indexOf(socket);
+
if (channels[i].authMehtod != QAuthenticatorPrivate::None) {
if (!(channels[i].authMehtod == QAuthenticatorPrivate::Ntlm && channels[i].lastStatus != 401)) {
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(channels[i].authenticator);
@@ -1389,7 +1397,8 @@ void QHttpNetworkConnectionPrivate::_q_encrypted()
QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(q->sender());
if (!socket)
return; // ### error
- channels[indexOf(socket)].state = IdleState;
+ int i = indexOf(socket);
+ channels[i].state = IdleState;
sendRequest(socket);
}
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 3eb8ffe..842a2f4 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -79,6 +79,7 @@ QT_BEGIN_NAMESPACE
class QHttpNetworkRequest;
class QHttpNetworkReply;
+class QByteArray;
class QHttpNetworkConnectionPrivate;
class Q_AUTOTEST_EXPORT QHttpNetworkConnection : public QObject
@@ -242,7 +243,8 @@ public:
#ifndef QT_NO_OPENSSL
bool ignoreSSLErrors;
#endif
- Channel() :state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false), reconnectAttempts(2),
+ Channel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false),
+ lastStatus(0), pendingEncrypt(false), reconnectAttempts(2),
authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None)
#ifndef QT_NO_OPENSSL
, ignoreSSLErrors(false)
@@ -254,15 +256,14 @@ public:
bool pendingAuthSignal; // there is an incomplete authentication signal
bool pendingProxyAuthSignal; // there is an incomplete proxy authentication signal
- void appendUncompressedData(QHttpNetworkReply &reply, const QByteArray &fragment);
- void appendCompressedData(QHttpNetworkReply &reply, const QByteArray &fragment);
+ void appendUncompressedData(QHttpNetworkReply &reply, QByteArray &qba);
+ void appendUncompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data);
+ void appendCompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data);
qint64 uncompressedBytesAvailable(const QHttpNetworkReply &reply) const;
qint64 uncompressedBytesAvailableNextBlock(const QHttpNetworkReply &reply) const;
qint64 compressedBytesAvailable(const QHttpNetworkReply &reply) const;
- qint64 read(QHttpNetworkReply &reply, QByteArray &data, qint64 maxSize);
-
void emitReplyError(QAbstractSocket *socket, QHttpNetworkReply *reply, QNetworkReply::NetworkError errorCode);
bool handleAuthenticateChallenge(QAbstractSocket *socket, QHttpNetworkReply *reply, bool isProxy, bool &resend);
void allDone(QAbstractSocket *socket, QHttpNetworkReply *reply);
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 72aec99..2fe0d78 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -176,13 +176,10 @@ qint64 QHttpNetworkReply::bytesAvailableNextBlock() const
return -1;
}
-QByteArray QHttpNetworkReply::read(qint64 maxSize)
+QByteArray QHttpNetworkReply::readAny()
{
Q_D(QHttpNetworkReply);
- QByteArray data;
- if (d->connection)
- d->connection->d_func()->read(*this, data, maxSize);
- return data;
+ return d->responseData.read();
}
bool QHttpNetworkReply::isFinished() const
@@ -195,8 +192,9 @@ bool QHttpNetworkReply::isFinished() const
QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl)
: QHttpNetworkHeaderPrivate(newUrl), state(NothingDoneState), statusCode(100),
majorVersion(0), minorVersion(0), bodyLength(0), contentRead(0), totalProgress(0),
+ chunkedTransferEncoding(0),
currentChunkSize(0), currentChunkRead(0), connection(0), initInflate(false),
- autoDecompress(false), requestIsPrepared(false)
+ autoDecompress(false), responseData(), requestIsPrepared(false)
{
}
@@ -500,6 +498,9 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
state = ReadingDataState;
fragment.clear(); // next fragment
bodyLength = contentLength(); // cache the length
+
+ // cache isChunked() since it is called often
+ chunkedTransferEncoding = headerField("transfer-encoding").toLower().contains("chunked");
}
return bytes;
}
@@ -540,7 +541,7 @@ void QHttpNetworkReplyPrivate::parseHeader(const QByteArray &header)
bool QHttpNetworkReplyPrivate::isChunked()
{
- return headerField("transfer-encoding").toLower().contains("chunked");
+ return chunkedTransferEncoding;
}
bool QHttpNetworkReplyPrivate::connectionCloseEnabled()
@@ -551,17 +552,19 @@ bool QHttpNetworkReplyPrivate::connectionCloseEnabled()
// note this function can only be used for non-chunked, non-compressed with
// known content length
-qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QRingBuffer *rb)
-{
- quint64 toBeRead = qMin(socket->bytesAvailable(), bodyLength - contentRead);
- char* dst = rb->reserve(toBeRead);
- qint64 haveRead = socket->read(dst, toBeRead);
+qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb)
+{
+ qint64 toBeRead = qMin(socket->bytesAvailable(), bodyLength - contentRead);
+ QByteArray bd;
+ bd.resize(toBeRead);
+ qint64 haveRead = socket->read(bd.data(), bd.size());
if (haveRead == -1) {
- rb->chop(toBeRead);
+ bd.clear();
return 0; // ### error checking here;
}
+ bd.resize(haveRead);
- rb->chop(toBeRead - haveRead);
+ rb->append(bd);
if (contentRead + haveRead == bodyLength) {
state = AllDoneState;
@@ -573,7 +576,7 @@ qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QRingBuff
}
-qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QIODevice *out)
+qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QByteDataBuffer *out)
{
qint64 bytes = 0;
if (isChunked()) {
@@ -591,33 +594,35 @@ qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QIODevice *ou
return bytes;
}
-qint64 QHttpNetworkReplyPrivate::readReplyBodyRaw(QIODevice *in, QIODevice *out, qint64 size)
+qint64 QHttpNetworkReplyPrivate::readReplyBodyRaw(QIODevice *in, QByteDataBuffer *out, qint64 size)
{
qint64 bytes = 0;
Q_ASSERT(in);
Q_ASSERT(out);
int toBeRead = qMin<qint64>(128*1024, qMin<qint64>(size, in->bytesAvailable()));
- QByteArray raw(toBeRead, 0);
- while (size > 0) {
- qint64 read = in->read(raw.data(), raw.size());
- if (read == 0)
+ while (toBeRead > 0) {
+ QByteArray byteData;
+ byteData.resize(toBeRead);
+ qint64 haveRead = in->read(byteData.data(), byteData.size());
+ if (haveRead <= 0) {
+ // ### error checking here
+ byteData.clear();
return bytes;
- // ### error checking here
- qint64 written = out->write(raw.data(), read);
- if (written == 0)
- return bytes;
- if (read != written)
- qDebug() << "### read" << read << "written" << written;
- bytes += read;
- size -= read;
- out->waitForBytesWritten(-1); // throttle
+ }
+
+ byteData.resize(haveRead);
+ out->append(byteData);
+ bytes += haveRead;
+ size -= haveRead;
+
+ toBeRead = qMin<qint64>(128*1024, qMin<qint64>(size, in->bytesAvailable()));
}
return bytes;
}
-qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QIODevice *in, QIODevice *out)
+qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QIODevice *in, QByteDataBuffer *out)
{
qint64 bytes = 0;
while (in->bytesAvailable()) { // while we can read from input
@@ -638,17 +643,14 @@ qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QIODevice *in, QIODevice *
state = AllDoneState;
break;
}
- // otherwise, read data
- qint64 readSize = qMin(in->bytesAvailable(), currentChunkSize - currentChunkRead);
- QByteArray buffer(readSize, 0);
- qint64 read = in->read(buffer.data(), readSize);
- bytes += read;
- currentChunkRead += read;
- qint64 written = out->write(buffer);
- Q_UNUSED(written); // Avoid compile warning when building release
- Q_ASSERT(read == written);
+
+ // otherwise, try to read what is missing for this chunk
+ qint64 haveRead = readReplyBodyRaw (in, out, currentChunkSize - currentChunkRead);
+ currentChunkRead += haveRead;
+ bytes += haveRead;
+
// ### error checking here
- out->waitForBytesWritten(-1);
+
}
return bytes;
}
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index 26e1047..fbbee12 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -80,6 +80,7 @@ static const unsigned char gz_magic[2] = {0x1f, 0x8b}; // gzip magic header
#include <private/qhttpnetworkrequest_p.h>
#include <private/qauthenticator_p.h>
#include <private/qringbuffer_p.h>
+#include <private/qbytedata_p.h>
QT_BEGIN_NAMESPACE
@@ -122,7 +123,7 @@ public:
qint64 bytesAvailable() const;
qint64 bytesAvailableNextBlock() const;
- QByteArray read(qint64 maxSize = -1);
+ QByteArray readAny();
bool isFinished() const;
@@ -159,14 +160,14 @@ public:
bool parseStatus(const QByteArray &status);
qint64 readHeader(QAbstractSocket *socket);
void parseHeader(const QByteArray &header);
- qint64 readBody(QAbstractSocket *socket, QIODevice *out);
- qint64 readBodyFast(QAbstractSocket *socket, QRingBuffer *rb);
+ qint64 readBody(QAbstractSocket *socket, QByteDataBuffer *out);
+ qint64 readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb);
bool findChallenge(bool forProxy, QByteArray &challenge) const;
QAuthenticatorPrivate::Method authenticationMethod(bool isProxy) const;
void clear();
- qint64 readReplyBodyRaw(QIODevice *in, QIODevice *out, qint64 size);
- qint64 readReplyBodyChunked(QIODevice *in, QIODevice *out);
+ qint64 readReplyBodyRaw(QIODevice *in, QByteDataBuffer *out, qint64 size);
+ qint64 readReplyBodyChunked(QIODevice *in, QByteDataBuffer *out);
qint64 getChunkSize(QIODevice *in, qint64 *chunkSize);
qint64 bytesAvailable() const;
@@ -197,6 +198,7 @@ public:
qint64 contentRead;
qint64 totalProgress;
QByteArray fragment; // used for header, status, chunk header etc, not for reply data
+ bool chunkedTransferEncoding;
qint64 currentChunkSize;
qint64 currentChunkRead;
QPointer<QHttpNetworkConnection> connection;
@@ -207,7 +209,7 @@ public:
#endif
bool autoDecompress;
- QRingBuffer responseData; // uncompressed body
+ QByteDataBuffer responseData; // uncompressed body
QByteArray compressedData; // compressed body (temporary)
bool requestIsPrepared;
};
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 88ae894..9e17b54 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -217,9 +217,9 @@ qint64 QNetworkAccessBackend::nextDownstreamBlockSize() const
return reply->nextDownstreamBlockSize();
}
-void QNetworkAccessBackend::writeDownstreamData(const QByteArray &data)
+void QNetworkAccessBackend::writeDownstreamData(QByteDataBuffer &list)
{
- reply->appendDownstreamData(data);
+ reply->appendDownstreamData(list);
}
void QNetworkAccessBackend::writeDownstreamData(QIODevice *data)
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h
index 21cb4a6..553b795 100644
--- a/src/network/access/qnetworkaccessbackend_p.h
+++ b/src/network/access/qnetworkaccessbackend_p.h
@@ -166,7 +166,7 @@ protected:
// these functions control the downstream mechanism
// that is, data that has come via the connection and is going out the backend
qint64 nextDownstreamBlockSize() const;
- void writeDownstreamData(const QByteArray &data);
+ void writeDownstreamData(QByteDataBuffer &list);
public slots:
// for task 251801, needs to be a slot to be called asynchronously
diff --git a/src/network/access/qnetworkaccessdatabackend.cpp b/src/network/access/qnetworkaccessdatabackend.cpp
index 609f0c5..4436cf4 100644
--- a/src/network/access/qnetworkaccessdatabackend.cpp
+++ b/src/network/access/qnetworkaccessdatabackend.cpp
@@ -117,7 +117,11 @@ void QNetworkAccessDataBackend::open()
setHeader(QNetworkRequest::ContentLengthHeader, payload.size());
emit metaDataChanged();
- writeDownstreamData(payload);
+ QByteDataBuffer list;
+ list.append(payload);
+ payload.clear(); // important because of implicit sharing!
+ writeDownstreamData(list);
+
finished();
return;
}
diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp
index 54fcddd..2b3c128 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend.cpp
+++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp
@@ -155,7 +155,11 @@ void QNetworkAccessDebugPipeBackend::pushFromSocketToDownstream()
// have read something
buffer.resize(haveRead);
bytesDownloaded += haveRead;
- writeDownstreamData(buffer);
+
+ QByteDataBuffer list;
+ list.append(buffer);
+ buffer.clear(); // important because of implicit sharing!
+ writeDownstreamData(list);
}
}
}
diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp
index e3fc8bf..533fc75 100644
--- a/src/network/access/qnetworkaccessfilebackend.cpp
+++ b/src/network/access/qnetworkaccessfilebackend.cpp
@@ -263,7 +263,11 @@ bool QNetworkAccessFileBackend::readMoreFromFile()
data.resize(actuallyRead);
totalBytes += actuallyRead;
- writeDownstreamData(data);
+
+ QByteDataBuffer list;
+ list.append(data);
+ data.clear(); // important because of implicit sharing!
+ writeDownstreamData(list);
}
return true;
}
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index d6276a3..911b31a 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -355,7 +355,11 @@ void QNetworkAccessFtpBackend::ftpDone()
void QNetworkAccessFtpBackend::ftpReadyRead()
{
- writeDownstreamData(ftp->readAll());
+ QByteArray data = ftp->readAll();
+ QByteDataBuffer list;
+ list.append(data);
+ data.clear(); // important because of implicit sharing!
+ writeDownstreamData(list);
}
void QNetworkAccessFtpBackend::ftpRawCommandReply(int code, const QString &text)
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 71808d4..9c36026 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -649,16 +649,19 @@ void QNetworkAccessHttpBackend::readFromHttp()
if (!httpReply)
return;
- // We implement the download rate control
- // Don't read from QHttpNetworkAccess more than QNetworkAccessBackend wants
- // One of the two functions above will be called when we can read again
+ // We read possibly more than nextDownstreamBlockSize(), but
+ // this is not a critical thing since it is already in the
+ // memory anyway
- qint64 bytesToRead = qBound<qint64>(0, httpReply->bytesAvailable(), nextDownstreamBlockSize());
- if (!bytesToRead)
- return;
+ QByteDataBuffer list;
+
+ while (httpReply->bytesAvailable() != 0 && nextDownstreamBlockSize() != 0 && nextDownstreamBlockSize() > list.byteAmount()) {
+ QByteArray data = httpReply->readAny();
+ list.append(data);
+ }
- QByteArray data = httpReply->read(bytesToRead);
- writeDownstreamData(data);
+ if (!list.isEmpty())
+ writeDownstreamData(list);
}
void QNetworkAccessHttpBackend::replyFinished()
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 907aaef..61e5601 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -540,10 +540,10 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar)
}
/*!
- This function is used to post a request to obtain the network
- headers for \a request. It takes its name after the HTTP request
- associated (HEAD). It returns a new QNetworkReply object which
- will contain such headers.
+ Posts a request to obtain the network headers for \a request
+ and returns a new QNetworkReply object which will contain such headers
+
+ The function is named after the HTTP request associated (HEAD).
*/
QNetworkReply *QNetworkAccessManager::head(const QNetworkRequest &request)
{
@@ -551,11 +551,12 @@ QNetworkReply *QNetworkAccessManager::head(const QNetworkRequest &request)
}
/*!
- This function is used to post a request to obtain the contents of
- the target \a request. It will cause the contents to be
- downloaded, along with the headers associated with it. It returns
- a new QNetworkReply object opened for reading which emits its
- QIODevice::readyRead() signal whenever new data arrives.
+ Posts a request to obtain the contents of the target \a request
+ and returns a new QNetworkReply object opened for reading which emits the
+ \l{QIODevice::readyRead()}{readyRead()} signal whenever new data
+ arrives.
+
+ The contents as well as associated headers will be downloaded.
\sa post(), put(), deleteResource()
*/
@@ -565,18 +566,15 @@ QNetworkReply *QNetworkAccessManager::get(const QNetworkRequest &request)
}
/*!
- This function is used to send an HTTP POST request to the
- destination specified by \a request. The contents of the \a data
+ Sends an HTTP POST request to the destination specified by \a request
+ and returns a new QNetworkReply object opened for reading that will
+ contain the reply sent by the server. The contents of the \a data
device will be uploaded to the server.
- \a data must be opened for reading when this function is called
- and must remain valid until the finished() signal is emitted for
- this reply.
-
- The returned QNetworkReply object will be open for reading and
- will contain the reply sent by the server to the POST request.
+ \a data must be open for reading and must remain valid until the
+ finished() signal is emitted for this reply.
- Note: sending a POST request on protocols other than HTTP and
+ \note Sending a POST request on protocols other than HTTP and
HTTPS is undefined and will probably fail.
\sa get(), put(), deleteResource()
@@ -588,8 +586,9 @@ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, QIODe
/*!
\overload
- This function sends the contents of the \a data byte array to the
- destination specified by \a request.
+
+ Sends the contents of the \a data byte array to the destination
+ specified by \a request.
*/
QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, const QByteArray &data)
{
@@ -603,20 +602,19 @@ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, const
}
/*!
- This function is used to upload the contents of \a data to the
- destination \a request.
+ Uploads the contents of \a data to the destination \a request and
+ returnes a new QNetworkReply object that will be open for reply.
\a data must be opened for reading when this function is called
and must remain valid until the finished() signal is emitted for
this reply.
- The returned QNetworkReply object will be open for reply, but
- whether anything will be available for reading is protocol
- dependent. For HTTP, the server may send a small HTML page
- indicating the upload was successful (or not). Other protocols
- will probably have content in their replies.
+ Whether anything will be available for reading from the returned
+ object is protocol dependent. For HTTP, the server may send a
+ small HTML page indicating the upload was successful (or not).
+ Other protocols will probably have content in their replies.
- For HTTP, this request will send a PUT request, which most servers
+ \note For HTTP, this request will send a PUT request, which most servers
do not allow. Form upload mechanisms, including that of uploading
files through HTML forms, use the POST mechanism.
@@ -629,8 +627,8 @@ QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, QIODev
/*!
\overload
- This function sends the contents of the \a data byte array to the
- destination specified by \a request.
+ Sends the contents of the \a data byte array to the destination
+ specified by \a request.
*/
QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, const QByteArray &data)
{
@@ -646,9 +644,10 @@ QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, const
/*!
\since 4.6
- This function is used to send a request to delete the resource
- identified by the URL of \a request.
- This feature is currently available for HTTP only, performing an HTTP DELETE request.
+ Sends a request to delete the resource identified by the URL of \a request.
+
+ \note This feature is currently available for HTTP only, performing an
+ HTTP DELETE request.
\sa get(), post(), put()
*/
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index 1b0d9f5..e807d29 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -442,6 +442,31 @@ QNetworkReply::NetworkError QNetworkReply::error() const
}
/*!
+ \since 4.6
+
+ Returns true when the reply has finished or was aborted.
+
+ \sa isRunning()
+*/
+bool QNetworkReply::isFinished() const
+{
+ return d_func()->isFinished();
+}
+
+/*!
+ \since 4.6
+
+ Returns true when the request is still processing and the
+ reply has not finished or was aborted yet.
+
+ \sa isFinished()
+*/
+bool QNetworkReply::isRunning() const
+{
+ return !isFinished();
+}
+
+/*!
Returns the URL of the content downloaded or uploaded. Note that
the URL may be different from that of the original request.
diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h
index 7cb082f..30e89f1 100644
--- a/src/network/access/qnetworkreply.h
+++ b/src/network/access/qnetworkreply.h
@@ -116,6 +116,8 @@ public:
QNetworkAccessManager::Operation operation() const;
QNetworkRequest request() const;
NetworkError error() const;
+ bool isFinished() const;
+ bool isRunning() const;
QUrl url() const;
// "cooked" headers
diff --git a/src/network/access/qnetworkreply_p.h b/src/network/access/qnetworkreply_p.h
index c8543f0..b51e3fb 100644
--- a/src/network/access/qnetworkreply_p.h
+++ b/src/network/access/qnetworkreply_p.h
@@ -75,6 +75,8 @@ public:
static inline void setManager(QNetworkReply *reply, QNetworkAccessManager *manager)
{ reply->d_func()->manager = manager; }
+ virtual bool isFinished() const { return false; }
+
Q_DECLARE_PUBLIC(QNetworkReply)
};
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index d1dbdc9..44ae328 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -58,6 +58,7 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate()
cacheEnabled(false), cacheSaveDevice(0),
notificationHandlingPaused(false),
bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1),
+ httpStatusCode(0),
state(Idle)
{
}
@@ -90,7 +91,9 @@ void QNetworkReplyImplPrivate::_q_startOperation()
void QNetworkReplyImplPrivate::_q_copyReadyRead()
{
Q_Q(QNetworkReplyImpl);
- if (!copyDevice && !q->isOpen())
+ if (state != Working)
+ return;
+ if (!copyDevice || !q->isOpen())
return;
forever {
@@ -100,16 +103,17 @@ void QNetworkReplyImplPrivate::_q_copyReadyRead()
break;
bytesToRead = qBound<qint64>(1, bytesToRead, copyDevice->bytesAvailable());
- char *ptr = readBuffer.reserve(bytesToRead);
- qint64 bytesActuallyRead = copyDevice->read(ptr, bytesToRead);
+ QByteArray byteData;
+ byteData.resize(bytesToRead);
+ qint64 bytesActuallyRead = copyDevice->read(byteData.data(), byteData.size());
if (bytesActuallyRead == -1) {
- readBuffer.chop(bytesToRead);
+ byteData.clear();
backendNotify(NotifyCopyFinished);
break;
}
- if (bytesActuallyRead != bytesToRead)
- readBuffer.chop(bytesToRead - bytesActuallyRead);
+ byteData.resize(bytesActuallyRead);
+ readBuffer.append(byteData);
if (!copyDevice->isSequential() && copyDevice->atEnd()) {
backendNotify(NotifyCopyFinished);
@@ -381,20 +385,17 @@ qint64 QNetworkReplyImplPrivate::nextDownstreamBlockSize() const
if (readBufferMaxSize == 0)
return DesiredBufferSize;
- return qMax<qint64>(0, readBufferMaxSize - readBuffer.size());
+ return qMax<qint64>(0, readBufferMaxSize - readBuffer.byteAmount());
}
// we received downstream data and send this to the cache
// and to our readBuffer (which in turn gets read by the user of QNetworkReply)
-void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data)
+void QNetworkReplyImplPrivate::appendDownstreamData(QByteDataBuffer &data)
{
Q_Q(QNetworkReplyImpl);
if (!q->isOpen())
return;
- char *ptr = readBuffer.reserve(data.size());
- memcpy(ptr, data.constData(), data.size());
-
if (cacheEnabled && !cacheSaveDevice) {
// save the meta data
QNetworkCacheMetaData metaData;
@@ -413,10 +414,19 @@ void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data)
}
}
- if (cacheSaveDevice)
- cacheSaveDevice->write(data);
+ qint64 bytesWritten = 0;
+ for (int i = 0; i < data.bufferCount(); i++) {
+ QByteArray item = data[i];
+
+ if (cacheSaveDevice)
+ cacheSaveDevice->write(item.constData(), item.size());
+ readBuffer.append(item);
+
+ bytesWritten += item.size();
+ }
+ data.clear();
- bytesDownloaded += data.size();
+ bytesDownloaded += bytesWritten;
lastBytesDownloaded = bytesDownloaded;
QPointer<QNetworkReplyImpl> qq = q;
@@ -425,6 +435,8 @@ void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data)
pauseNotificationHandling();
emit q->downloadProgress(bytesDownloaded,
totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
+ // important: At the point of this readyRead(), the data parameter list must be empty,
+ // else implicit sharing will trigger memcpy when the user is reading data!
emit q->readyRead();
// hopefully we haven't been deleted here
@@ -461,8 +473,8 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QIODevice *data)
void QNetworkReplyImplPrivate::finished()
{
Q_Q(QNetworkReplyImpl);
- Q_ASSERT_X(state != Finished, "QNetworkReplyImpl",
- "Backend called finished/finishedWithError more than once");
+ if (state == Finished || state == Aborted)
+ return;
state = Finished;
pendingNotifications.clear();
@@ -530,6 +542,11 @@ void QNetworkReplyImplPrivate::sslErrors(const QList<QSslError> &errors)
#endif
}
+bool QNetworkReplyImplPrivate::isFinished() const
+{
+ return (state == Finished || state == Aborted);
+}
+
QNetworkReplyImpl::QNetworkReplyImpl(QObject *parent)
: QNetworkReply(*new QNetworkReplyImplPrivate, parent)
{
@@ -595,14 +612,14 @@ void QNetworkReplyImpl::close()
*/
qint64 QNetworkReplyImpl::bytesAvailable() const
{
- return QNetworkReply::bytesAvailable() + d_func()->readBuffer.size();
+ return QNetworkReply::bytesAvailable() + d_func()->readBuffer.byteAmount();
}
void QNetworkReplyImpl::setReadBufferSize(qint64 size)
{
Q_D(QNetworkReplyImpl);
if (size > d->readBufferMaxSize &&
- size == d->readBuffer.size())
+ size > d->readBuffer.byteAmount())
d->backendNotify(QNetworkReplyImplPrivate::NotifyDownstreamReadyWrite);
QNetworkReply::setReadBufferSize(size);
@@ -650,7 +667,7 @@ qint64 QNetworkReplyImpl::readData(char *data, qint64 maxlen)
return 1;
}
- maxlen = qMin<qint64>(maxlen, d->readBuffer.size());
+ maxlen = qMin<qint64>(maxlen, d->readBuffer.byteAmount());
return d->readBuffer.read(data, maxlen);
}
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index 3e89a00..83a8aca 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -61,6 +61,7 @@
#include "QtCore/qqueue.h"
#include "QtCore/qbuffer.h"
#include "private/qringbuffer_p.h"
+#include "private/qbytedata_p.h"
QT_BEGIN_NAMESPACE
@@ -144,7 +145,7 @@ public:
void consume(qint64 count);
void emitUploadProgress(qint64 bytesSent, qint64 bytesTotal);
qint64 nextDownstreamBlockSize() const;
- void appendDownstreamData(const QByteArray &data);
+ void appendDownstreamData(QByteDataBuffer &data);
void appendDownstreamData(QIODevice *data);
void finished();
void error(QNetworkReply::NetworkError code, const QString &errorString);
@@ -152,6 +153,8 @@ public:
void redirectionRequested(const QUrl &target);
void sslErrors(const QList<QSslError> &errors);
+ bool isFinished() const;
+
QNetworkAccessBackend *backend;
QIODevice *outgoingData;
QRingBuffer *outgoingDataBuffer;
@@ -170,7 +173,7 @@ public:
QList<QNetworkProxy> proxyList;
#endif
- QRingBuffer readBuffer;
+ QByteDataBuffer readBuffer;
qint64 bytesDownloaded;
qint64 lastBytesDownloaded;
qint64 bytesUploaded;
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 42e3f09..c1fc87d 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -153,9 +153,7 @@ QT_BEGIN_NAMESPACE
future uses. If the value is false, the data obtained will not
be automatically cached. If true, data may be cached, provided
it is cacheable (what is cacheable depends on the protocol
- being used). Note that the default QNetworkAccessManager
- implementation does not support caching, so it will ignore
- this attribute.
+ being used).
\value SourceIsFromCacheAttribute
Replies only, type: QVariant::Bool (default: false)
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 032e575..fef488b 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -52,13 +52,12 @@ static const int RESOLVER_TIMEOUT = 2000;
#include <qurl.h>
#include <qfile.h>
#include <private/qmutexpool_p.h>
+#include <private/qnet_unix_p.h>
-extern "C" {
#include <sys/types.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <resolv.h>
-}
#if defined (QT_NO_GETADDRINFO)
#include <qmutex.h>
@@ -180,7 +179,7 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
}
results.setHostName(QString::fromLatin1(hbuf));
#else
- in_addr_t inetaddr = inet_addr(hostName.toLatin1().constData());
+ in_addr_t inetaddr = qt_safe_inet_addr(hostName.toLatin1().constData());
struct hostent *ent = gethostbyaddr((const char *)&inetaddr, sizeof(inetaddr), AF_INET);
if (!ent) {
results.setError(QHostInfo::HostNotFound);
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp
index aa27726..4efbe45 100644
--- a/src/network/kernel/qnetworkinterface_unix.cpp
+++ b/src/network/kernel/qnetworkinterface_unix.cpp
@@ -43,6 +43,7 @@
#include "qnetworkinterface.h"
#include "qnetworkinterface_p.h"
#include "qalgorithms.h"
+#include "private/qnet_unix_p.h"
#ifndef QT_NO_NETWORKINTERFACE
@@ -123,7 +124,7 @@ static QSet<QByteArray> interfaceNames(int socket)
interfaceList.ifc_len = storageBuffer.size();
// get the interface list
- if (::ioctl(socket, SIOCGIFCONF, &interfaceList) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFCONF, &interfaceList) >= 0) {
if (int(interfaceList.ifc_len + sizeof(ifreq) + 64) < storageBuffer.size()) {
// if the buffer was big enough, break
storageBuffer.resize(interfaceList.ifc_len);
@@ -198,7 +199,7 @@ static QNetworkInterfacePrivate *findInterface(int socket, QList<QNetworkInterfa
#ifdef SIOCGIFNAME
// Get the canonical name
QByteArray oldName = req.ifr_name;
- if (::ioctl(socket, SIOCGIFNAME, &req) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFNAME, &req) >= 0) {
iface->name = QString::fromLatin1(req.ifr_name);
// reset the name:
@@ -211,13 +212,13 @@ static QNetworkInterfacePrivate *findInterface(int socket, QList<QNetworkInterfa
}
// Get interface flags
- if (::ioctl(socket, SIOCGIFFLAGS, &req) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFFLAGS, &req) >= 0) {
iface->flags = convertFlags(req.ifr_flags);
}
#ifdef SIOCGIFHWADDR
// Get the HW address
- if (::ioctl(socket, SIOCGIFHWADDR, &req) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFHWADDR, &req) >= 0) {
uchar *addr = (uchar *)&req.ifr_addr;
iface->hardwareAddress = iface->makeHwAddress(6, addr);
}
@@ -232,7 +233,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
QList<QNetworkInterfacePrivate *> interfaces;
int socket;
- if ((socket = ::socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
+ if ((socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
return interfaces; // error
QSet<QByteArray> names = interfaceNames(socket);
@@ -247,7 +248,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
// Get the interface broadcast address
QNetworkAddressEntry entry;
if (iface->flags & QNetworkInterface::CanBroadcast) {
- if (::ioctl(socket, SIOCGIFBRDADDR, &req) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFBRDADDR, &req) >= 0) {
sockaddr *sa = &req.ifr_addr;
if (sa->sa_family == AF_INET)
entry.setBroadcast(addressFromSockaddr(sa));
@@ -255,13 +256,13 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
}
// Get the interface netmask
- if (::ioctl(socket, SIOCGIFNETMASK, &req) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFNETMASK, &req) >= 0) {
sockaddr *sa = &req.ifr_addr;
entry.setNetmask(addressFromSockaddr(sa));
}
// Get the address of the interface
- if (::ioctl(socket, SIOCGIFADDR, &req) >= 0) {
+ if (qt_safe_ioctl(socket, SIOCGIFADDR, &req) >= 0) {
sockaddr *sa = &req.ifr_addr;
entry.setIp(addressFromSockaddr(sa));
}
@@ -392,7 +393,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
QList<QNetworkInterfacePrivate *> interfaces;
int socket;
- if ((socket = ::socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
+ if ((socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
return interfaces; // error
ifaddrs *interfaceListing;
diff --git a/src/network/kernel/qnetworkinterface_win.cpp b/src/network/kernel/qnetworkinterface_win.cpp
index 0165385..87902c3 100644
--- a/src/network/kernel/qnetworkinterface_win.cpp
+++ b/src/network/kernel/qnetworkinterface_win.cpp
@@ -66,19 +66,14 @@ static void resolveLibs()
if (!done) {
done = true;
- HINSTANCE iphlpapiHnd;
- QT_WA({
- iphlpapiHnd = LoadLibraryW(L"iphlpapi");
- }, {
- iphlpapiHnd = LoadLibraryA("iphlpapi");
- });
+ HINSTANCE iphlpapiHnd = LoadLibrary(L"iphlpapi");
if (iphlpapiHnd == NULL)
- return; // failed to load, probably Windows 95
+ return;
#if defined(Q_OS_WINCE)
- ptrGetAdaptersInfo = (PtrGetAdaptersInfo)GetProcAddressW(iphlpapiHnd, L"GetAdaptersInfo");
- ptrGetAdaptersAddresses = (PtrGetAdaptersAddresses)GetProcAddressW(iphlpapiHnd, L"GetAdaptersAddresses");
- ptrGetNetworkParams = (PtrGetNetworkParams)GetProcAddressW(iphlpapiHnd, L"GetNetworkParams");
+ ptrGetAdaptersInfo = (PtrGetAdaptersInfo)GetProcAddress(iphlpapiHnd, L"GetAdaptersInfo");
+ ptrGetAdaptersAddresses = (PtrGetAdaptersAddresses)GetProcAddress(iphlpapiHnd, L"GetAdaptersAddresses");
+ ptrGetNetworkParams = (PtrGetNetworkParams)GetProcAddress(iphlpapiHnd, L"GetNetworkParams");
#else
ptrGetAdaptersInfo = (PtrGetAdaptersInfo)GetProcAddress(iphlpapiHnd, "GetAdaptersInfo");
ptrGetAdaptersAddresses = (PtrGetAdaptersAddresses)GetProcAddress(iphlpapiHnd, "GetAdaptersAddresses");
diff --git a/src/network/kernel/qnetworkinterface_win_p.h b/src/network/kernel/qnetworkinterface_win_p.h
index c4dff76..15b4859 100644
--- a/src/network/kernel/qnetworkinterface_win_p.h
+++ b/src/network/kernel/qnetworkinterface_win_p.h
@@ -54,7 +54,7 @@
//
#include <winsock2.h>
-#include <windows.h>
+#include <qt_windows.h>
#include <time.h>
QT_BEGIN_NAMESPACE
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 1d968c2..608db65 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -366,7 +366,7 @@ static QNetworkProxy::Capabilities defaultCapabilitiesForType(QNetworkProxy::Pro
int(QNetworkProxy::HostNameLookupCapability)),
};
- if (int(type) < 0 && int(type) > int(QNetworkProxy::FtpCachingProxy))
+ if (int(type) < 0 || int(type) > int(QNetworkProxy::FtpCachingProxy))
type = QNetworkProxy::DefaultProxy;
return QNetworkProxy::Capabilities(defaults[int(type)]);
}
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index 5fda228..9fab545 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -43,15 +43,13 @@
#ifndef QT_NO_NETWORKPROXY
-#if defined(UNICODE)
-
#include <qmutex.h>
#include <qstringlist.h>
#include <qregexp.h>
#include <qurl.h>
#include <string.h>
-#include <windows.h>
+#include <qt_windows.h>
#include <wininet.h>
/*
@@ -269,15 +267,13 @@ void QWindowsSystemProxy::init()
if (initialized)
return;
initialized = true;
- if (QSysInfo::windowsVersion() & QSysInfo::WV_DOS_based)
- return; // no point, this library is only available on 2k, XP and up
#ifdef Q_OS_WINCE
// Windows CE does not have any of the following API
return;
#else
// load the winhttp.dll library
- HINSTANCE winhttpHnd = LoadLibraryW(L"winhttp");
+ HINSTANCE winhttpHnd = LoadLibrary(L"winhttp");
if (!winhttpHnd)
return; // failed to load
@@ -401,15 +397,6 @@ QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkPro
return parseServerList(query, sp->proxyServerList);
}
-#else // !UNICODE
-
-QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkProxyQuery &)
-{
- return QList<QNetworkProxy>() << QNetworkProxy::NoProxy;
-}
-
-#endif
-
QT_END_NAMESPACE
#endif
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index 7bac1f2..156a9f4 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -454,6 +454,7 @@ void QHttpSocketEngine::slotSocketConnected()
data += path;
data += " HTTP/1.1\r\n";
data += "Proxy-Connection: keep-alive\r\n"
+ "User-Agent: Mozilla/5.0\r\n"
"Host: " + peerAddress + "\r\n";
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
//qDebug() << "slotSocketConnected: priv=" << priv << (priv ? (int)priv->method : -1);
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index 05ef2e6..1a50dc4 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -78,8 +78,6 @@ QT_BEGIN_NAMESPACE
to use it without one. In that case, you must use waitForNewConnection(),
which blocks until either a connection is available or a timeout expires.
- Note that this feature is not supported on Windows 9x.
-
\sa QLocalSocket, QTcpServer
*/
diff --git a/src/network/socket/qlocalserver_tcp.cpp b/src/network/socket/qlocalserver_tcp.cpp
index b248f2f..bcf822e 100644
--- a/src/network/socket/qlocalserver_tcp.cpp
+++ b/src/network/socket/qlocalserver_tcp.cpp
@@ -92,7 +92,7 @@ void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
{
if (pendingConnections.isEmpty())
tcpServer.waitForNewConnection(msec, timedOut);
- else
+ else if (timedOut)
*timedOut = false;
}
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index 1cb804a..c2e05cd 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -43,6 +43,7 @@
#include "qlocalserver_p.h"
#include "qlocalsocket.h"
#include "qlocalsocket_p.h"
+#include "qnet_unix_p.h"
#ifndef QT_NO_LOCALSERVER
@@ -88,7 +89,7 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
serverName = requestedServerName;
// create the unix socket
- listenSocket = qSocket(PF_UNIX, SOCK_STREAM, 0);
+ listenSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0);
if (-1 == listenSocket) {
setError(QLatin1String("QLocalServer::listen"));
closeServer();
@@ -107,7 +108,7 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
fullServerName.toLatin1().size() + 1);
// bind
- if(-1 == qBind(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un))) {
+ if(-1 == QT_SOCKET_BIND(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un))) {
setError(QLatin1String("QLocalServer::listen"));
// if address is in use already, just close the socket, but do not delete the file
if(errno == EADDRINUSE)
@@ -120,7 +121,7 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
}
// listen for connections
- if (-1 == qListen(listenSocket, 50)) {
+ if (-1 == qt_safe_listen(listenSocket, 50)) {
setError(QLatin1String("QLocalServer::listen"));
closeServer();
listenSocket = -1;
@@ -172,7 +173,7 @@ void QLocalServerPrivate::_q_onNewConnection()
::sockaddr_un addr;
QT_SOCKLEN_T length = sizeof(sockaddr_un);
- int connectedSocket = qAccept(listenSocket, (sockaddr *)&addr, &length);
+ int connectedSocket = qt_safe_accept(listenSocket, (sockaddr *)&addr, &length);
if(-1 == connectedSocket) {
setError(QLatin1String("QLocalSocket::activated"));
closeServer();
diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp
index 6af5ca5..c4f8f3c 100644
--- a/src/network/socket/qlocalserver_win.cpp
+++ b/src/network/socket/qlocalserver_win.cpp
@@ -62,9 +62,8 @@ bool QLocalServerPrivate::addListener()
listeners << Listener();
Listener &listener = listeners.last();
- QT_WA({
- listener.handle = CreateNamedPipeW(
- (TCHAR*)fullServerName.utf16(), // pipe name
+ listener.handle = CreateNamedPipe(
+ (const wchar_t *)fullServerName.utf16(), // pipe name
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
PIPE_TYPE_MESSAGE | // message type pipe
PIPE_READMODE_MESSAGE | // message-read mode
@@ -74,19 +73,7 @@ bool QLocalServerPrivate::addListener()
BUFSIZE, // input buffer size
3000, // client time-out
NULL);
- }, {
- listener.handle = CreateNamedPipeA(
- fullServerName.toLocal8Bit().constData(), // pipe name
- PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
- PIPE_TYPE_MESSAGE | // message type pipe
- PIPE_READMODE_MESSAGE | // message-read mode
- PIPE_WAIT, // blocking mode
- PIPE_UNLIMITED_INSTANCES, // max. instances
- BUFSIZE, // output buffer size
- BUFSIZE, // input buffer size
- 3000, // client time-out
- NULL);
- });
+
if (listener.handle == INVALID_HANDLE_VALUE) {
setError(QLatin1String("QLocalServerPrivate::addListener"));
listeners.removeLast();
diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp
index acacdf2..7809226 100644
--- a/src/network/socket/qlocalsocket.cpp
+++ b/src/network/socket/qlocalsocket.cpp
@@ -63,7 +63,8 @@ QT_BEGIN_NAMESPACE
waitForReadyRead(), waitForBytesWritten(), and waitForDisconnected()
which blocks until the operation is complete or the timeout expires.
- Note that this feature is not supported on Window 9x.
+ Note that this feature is not supported on versions of Windows earlier than
+ Windows XP.
\sa QLocalServer
*/
@@ -102,7 +103,7 @@ QT_BEGIN_NAMESPACE
opened in the mode specified by \a openMode, and enters the socket state
specified by \a socketState.
- Note: It is not possible to initialize two local sockets with the same
+ \note It is not possible to initialize two local sockets with the same
native socket descriptor.
\sa socketDescriptor(), state(), openMode()
@@ -207,10 +208,10 @@ QT_BEGIN_NAMESPACE
Returns true if the socket is valid and ready for use; otherwise
returns false.
- Note: The socket's state must be ConnectedState before reading
+ \note The socket's state must be ConnectedState before reading
and writing can occur.
- \sa state()
+ \sa state(), connectToServer()
*/
/*!
@@ -243,9 +244,9 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn bool QLocalSocket::waitForConnected(int msec)
+ \fn bool QLocalSocket::waitForConnected(int msecs)
- Waits until the socket is connected, up to \a msec milliseconds. If the
+ Waits until the socket is connected, up to \a msecs milliseconds. If the
connection has been established, this function returns true; otherwise
it returns false. In the case where it returns false, you can call
error() to determine the cause of the error.
@@ -255,7 +256,7 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp 0
- If msecs is -1, this function will not time out.
+ If \a msecs is -1, this function will not time out.
\sa connectToServer(), connected()
*/
@@ -274,7 +275,7 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp 1
- If msecs is -1, this function will not time out.
+ If \a msecs is -1, this function will not time out.
\sa disconnectFromServer(), close()
*/
@@ -309,9 +310,10 @@ QT_BEGIN_NAMESPACE
parameter describes the type of error that occurred.
QLocalSocket::LocalSocketError is not a registered metatype, so for queued
- connections, you will have to register it with Q_DECLARE_METATYPE.
+ connections, you will have to register it with Q_DECLARE_METATYPE() and
+ qRegisterMetaType().
- \sa error(), errorString()
+ \sa error(), errorString(), {Creating Custom Qt Types}
*/
/*!
@@ -321,9 +323,10 @@ QT_BEGIN_NAMESPACE
The \a socketState parameter is the new state.
QLocalSocket::SocketState is not a registered metatype, so for queued
- connections, you will have to register it with Q_DECLARE_METATYPE.
+ connections, you will have to register it with Q_DECLARE_METATYPE() and
+ qRegisterMetaType().
- \sa state()
+ \sa state(), {Creating Custom Qt Types}
*/
/*!
@@ -365,7 +368,7 @@ QString QLocalSocket::serverName() const
/*!
Returns the server path that the socket is connected to.
- Note: This is platform specific
+ \note The return value of this function is platform specific.
\sa connectToServer(), serverName()
*/
diff --git a/src/network/socket/qlocalsocket.h b/src/network/socket/qlocalsocket.h
index 417671a..4bff62e 100644
--- a/src/network/socket/qlocalsocket.h
+++ b/src/network/socket/qlocalsocket.h
@@ -134,6 +134,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_notified())
Q_PRIVATE_SLOT(d_func(), void _q_canWrite())
Q_PRIVATE_SLOT(d_func(), void _q_pipeClosed())
+ Q_PRIVATE_SLOT(d_func(), void _q_emitReadyRead())
#else
Q_PRIVATE_SLOT(d_func(), void _q_stateChanged(QAbstractSocket::SocketState))
Q_PRIVATE_SLOT(d_func(), void _q_error(QAbstractSocket::SocketError))
diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h
index 24b5dd6..2dae7d9 100644
--- a/src/network/socket/qlocalsocket_p.h
+++ b/src/network/socket/qlocalsocket_p.h
@@ -65,6 +65,7 @@
#elif defined(Q_OS_WIN)
# include "private/qwindowspipewriter_p.h"
# include "private/qringbuffer_p.h"
+# include <private/qwineventnotifier_p.h>
#else
# include "private/qnativesocketengine_p.h"
# include <qtcpsocket.h>
@@ -74,43 +75,6 @@
QT_BEGIN_NAMESPACE
-#if !defined(Q_OS_WIN) && !defined(QT_LOCALSOCKET_TCP)
-static inline int qSocket(int af, int socketype, int proto)
-{
- int ret;
- while((ret = qt_socket_socket(af, socketype, proto)) == -1 && errno == EINTR){}
- return ret;
-}
-
-static inline int qBind(int fd, const sockaddr *sa, int len)
-{
- int ret;
- while((ret = QT_SOCKET_BIND(fd, (sockaddr*)sa, len)) == -1 && errno == EINTR){}
- return ret;
-}
-
-static inline int qConnect(int fd, const sockaddr *sa, int len)
-{
- int ret;
- while((ret = QT_SOCKET_CONNECT(fd, (sockaddr*)sa, len)) == -1 && errno == EINTR){}
- return ret;
-}
-
-static inline int qListen(int fd, int backlog)
-{
- int ret;
- while((ret = qt_socket_listen(fd, backlog)) == -1 && errno == EINTR){}
- return ret;
-}
-
-static inline int qAccept(int fd, struct sockaddr *addr, QT_SOCKLEN_T *addrlen)
-{
- int ret;
- while((ret = qt_socket_accept(fd, addr, addrlen)) == -1 && errno == EINTR){}
- return ret;
-}
-#endif //#if !defined(Q_OS_WIN) && !defined(QT_LOCALSOCKET_TCP)
-
#if !defined(Q_OS_WIN) || defined(QT_LOCALSOCKET_TCP)
class QLocalUnixSocket : public QTcpSocket
{
@@ -172,18 +136,23 @@ public:
void _q_notified();
void _q_canWrite();
void _q_pipeClosed();
- qint64 readData(char *data, qint64 maxSize);
- qint64 bytesAvailable();
- bool readFromSocket();
+ void _q_emitReadyRead();
+ DWORD bytesAvailable();
+ void startAsyncRead();
+ void completeAsyncRead();
+ void checkReadyRead();
HANDLE handle;
OVERLAPPED overlapped;
QWindowsPipeWriter *pipeWriter;
qint64 readBufferMaxSize;
QRingBuffer readBuffer;
- QTimer dataNotifier;
+ int actualReadBufferSize;
+ QWinEventNotifier *dataReadNotifier;
QLocalSocket::LocalSocketError error;
- bool readyReadEmitted;
+ bool readSequenceStarted;
+ bool pendingReadyRead;
bool pipeClosed;
+ static const qint64 initialReadBufferSize = 4096;
#else
QLocalUnixSocket unixSocket;
QString generateErrorString(QLocalSocket::LocalSocketError, const QString &function) const;
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 41dac3c..d038794 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -41,6 +41,7 @@
#include "qlocalsocket.h"
#include "qlocalsocket_p.h"
+#include "qnet_unix_p.h"
#ifndef QT_NO_LOCALSOCKET
@@ -232,7 +233,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
}
// create the socket
- if (-1 == (d->connectingSocket = qSocket(PF_UNIX, SOCK_STREAM, 0))) {
+ if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0))) {
d->errorOccurred(UnsupportedSocketOperationError,
QLatin1String("QLocalSocket::connectToServer"));
return;
@@ -282,7 +283,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
}
::memcpy(name.sun_path, connectingPathName.toLatin1().data(),
connectingPathName.toLatin1().size() + 1);
- if (-1 == qConnect(connectingSocket, (struct sockaddr *)&name, sizeof(name))) {
+ if (-1 == qt_safe_connect(connectingSocket, (struct sockaddr *)&name, sizeof(name))) {
QString function = QLatin1String("QLocalSocket::connectToServer");
switch (errno)
{
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 2b8d7e5..3a36ac0 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -48,13 +48,13 @@
QT_BEGIN_NAMESPACE
-#define NOTIFYTIMEOUT 100
-
void QLocalSocketPrivate::init()
{
Q_Q(QLocalSocket);
- QObject::connect(&dataNotifier, SIGNAL(timeout()), q, SLOT(_q_notified()));
+ memset(&overlapped, 0, sizeof(overlapped));
overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ dataReadNotifier = new QWinEventNotifier(overlapped.hEvent, q);
+ q->connect(dataReadNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_notified()));
}
void QLocalSocketPrivate::setErrorString(const QString &function)
@@ -101,8 +101,10 @@ QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
handle(INVALID_HANDLE_VALUE),
pipeWriter(0),
readBufferMaxSize(0),
+ actualReadBufferSize(0),
error(QLocalSocket::UnknownSocketError),
- readyReadEmitted(false),
+ readSequenceStarted(false),
+ pendingReadyRead(false),
pipeClosed(false),
state(QLocalSocket::UnconnectedState)
{
@@ -137,25 +139,14 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
forever {
DWORD permissions = (openMode & QIODevice::ReadOnly) ? GENERIC_READ : 0;
permissions |= (openMode & QIODevice::WriteOnly) ? GENERIC_WRITE : 0;
- QT_WA({
- localSocket = CreateFileW(
- (TCHAR*)d->fullServerName.utf16(), // pipe name
- permissions,
- 0, // no sharing
- NULL, // default security attributes
- OPEN_EXISTING, // opens existing pipe
- FILE_FLAG_OVERLAPPED,
- NULL); // no template file
- }, {
- localSocket = CreateFileA(
- d->fullServerName.toLocal8Bit().constData(), // pipe name
- permissions,
- 0, // no sharing
- NULL, // default security attributes
- OPEN_EXISTING, // opens existing pipe
- FILE_FLAG_OVERLAPPED,
- NULL); // no template file
- });
+ localSocket = CreateFile((const wchar_t *)d->fullServerName.utf16(), // pipe name
+ permissions,
+ 0, // no sharing
+ NULL, // default security attributes
+ OPEN_EXISTING, // opens existing pipe
+ FILE_FLAG_OVERLAPPED,
+ NULL); // no template file
+
if (localSocket != INVALID_HANDLE_VALUE)
break;
DWORD error = GetLastError();
@@ -165,13 +156,8 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
}
// All pipe instances are busy, so wait until connected or up to 5 seconds.
- QT_WA({
- if (!WaitNamedPipeW((TCHAR*)d->fullServerName.utf16(), 5000))
- break;
- }, {
- if (!WaitNamedPipeA(d->fullServerName.toLocal8Bit().constData(), 5000))
- break;
- });
+ if (!WaitNamedPipe((const wchar_t *)d->fullServerName.utf16(), 5000))
+ break;
}
if (localSocket == INVALID_HANDLE_VALUE) {
@@ -182,7 +168,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
// we have a valid handle
d->serverName = name;
- if (setSocketDescriptor((quintptr)localSocket), openMode) {
+ if (setSocketDescriptor((quintptr)localSocket, ConnectedState, openMode)) {
d->handle = localSocket;
emit connected();
}
@@ -192,82 +178,103 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
qint64 QLocalSocket::readData(char *data, qint64 maxSize)
{
Q_D(QLocalSocket);
- if (d->readBuffer.isEmpty()) {
- if (!d->readFromSocket()) {
- if (d->pipeClosed)
- return -1;
- return 0;
- }
- }
- if (!d->dataNotifier.isActive() && d->threadData->eventDispatcher)
- d->dataNotifier.start(NOTIFYTIMEOUT);
-
- if (d->readBuffer.isEmpty())
- return qint64(0);
-
- // If readFromSocket() read data, copy it to its destination.
- if (maxSize == 1) {
+ qint64 readSoFar;
+ // If startAsyncRead() read data, copy it to its destination.
+ if (maxSize == 1 && d->actualReadBufferSize > 0) {
*data = d->readBuffer.getChar();
- return 1;
+ d->actualReadBufferSize--;
+ readSoFar = 1;
+ } else {
+ qint64 bytesToRead = qMin(qint64(d->actualReadBufferSize), maxSize);
+ readSoFar = 0;
+ while (readSoFar < bytesToRead) {
+ const char *ptr = d->readBuffer.readPointer();
+ int bytesToReadFromThisBlock = qMin(bytesToRead - readSoFar,
+ qint64(d->readBuffer.nextDataBlockSize()));
+ memcpy(data + readSoFar, ptr, bytesToReadFromThisBlock);
+ readSoFar += bytesToReadFromThisBlock;
+ d->readBuffer.free(bytesToReadFromThisBlock);
+ d->actualReadBufferSize -= bytesToReadFromThisBlock;
+ }
}
- qint64 bytesToRead = qMin(qint64(d->readBuffer.size()), maxSize);
- qint64 readSoFar = 0;
- while (readSoFar < bytesToRead) {
- const char *ptr = d->readBuffer.readPointer();
- int bytesToReadFromThisBlock = qMin(int(bytesToRead - readSoFar),
- d->readBuffer.nextDataBlockSize());
- memcpy(data + readSoFar, ptr, bytesToReadFromThisBlock);
- readSoFar += bytesToReadFromThisBlock;
- d->readBuffer.free(bytesToReadFromThisBlock);
- }
+ if (!d->readSequenceStarted)
+ d->startAsyncRead();
+ d->checkReadyRead();
+
return readSoFar;
}
/*!
\internal
- read from the socket
+ Schedules or cancels a readyRead() emission depending on actual data availability
*/
-qint64 QLocalSocketPrivate::readData(char *data, qint64 maxSize)
+void QLocalSocketPrivate::checkReadyRead()
{
- DWORD bytesRead = 0;
- overlapped.Offset = 0;
- overlapped.OffsetHigh = 0;
- bool success = ReadFile(handle, data, maxSize, &bytesRead, &overlapped);
- if (!success && GetLastError() == ERROR_IO_PENDING)
- if (GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE))
- success = true;
- if (!success) {
- setErrorString(QLatin1String("QLocalSocket::readData"));
- return 0;
+ if (actualReadBufferSize > 0) {
+ if (!pendingReadyRead) {
+ Q_Q(QLocalSocket);
+ QTimer::singleShot(0, q, SLOT(_q_emitReadyRead()));
+ pendingReadyRead = true;
+ }
+ } else {
+ pendingReadyRead = false;
}
- return bytesRead;
}
/*!
\internal
Reads data from the socket into the readbuffer
*/
-bool QLocalSocketPrivate::readFromSocket()
+void QLocalSocketPrivate::startAsyncRead()
{
- qint64 bytesToRead = bytesAvailable();
- if (bytesToRead == 0)
- return false;
+ do {
+ DWORD bytesToRead = bytesAvailable();
+ if (bytesToRead == 0) {
+ // There are no bytes in the pipe but we need to
+ // start the overlapped read with some buffer size.
+ bytesToRead = initialReadBufferSize;
+ }
- if (readBufferMaxSize && bytesToRead
- > (readBufferMaxSize - readBuffer.size()))
- bytesToRead = readBufferMaxSize - readBuffer.size();
+ if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - readBuffer.size())) {
+ bytesToRead = readBufferMaxSize - readBuffer.size();
+ if (bytesToRead == 0) {
+ // Buffer is full. User must read data from the buffer
+ // before we can read more from the pipe.
+ return;
+ }
+ }
- char *ptr = readBuffer.reserve(bytesToRead);
- qint64 readBytes = readData(ptr, bytesToRead);
- if (readBytes == 0) {
- readBuffer.chop(bytesToRead);
- return false;
+ char *ptr = readBuffer.reserve(bytesToRead);
+
+ readSequenceStarted = true;
+ if (ReadFile(handle, ptr, bytesToRead, NULL, &overlapped)) {
+ completeAsyncRead();
+ } else if (GetLastError() != ERROR_IO_PENDING) {
+ setErrorString(QLatin1String("QLocalSocketPrivate::startAsyncRead"));
+ return;
+ }
+ } while (!readSequenceStarted);
+}
+
+/*!
+ \internal
+ Sets the correct size of the read buffer after a read operation.
+ */
+void QLocalSocketPrivate::completeAsyncRead()
+{
+ ResetEvent(overlapped.hEvent);
+ readSequenceStarted = false;
+
+ DWORD bytesRead;
+ if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) {
+ setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead"));
+ return;
}
- readyReadEmitted = false;
- readBuffer.chop(int(bytesToRead - (readBytes < 0 ? qint64(0) : readBytes)));
- return true;
+
+ actualReadBufferSize += bytesRead;
+ readBuffer.truncate(actualReadBufferSize);
}
qint64 QLocalSocket::writeData(const char *data, qint64 maxSize)
@@ -289,11 +296,9 @@ void QLocalSocket::abort()
/*!
The number of bytes available from the pipe
*/
-qint64 QLocalSocketPrivate::bytesAvailable()
+DWORD QLocalSocketPrivate::bytesAvailable()
{
Q_Q(QLocalSocket);
- if (q->state() != QLocalSocket::ConnectedState)
- return 0;
DWORD bytes;
if (PeekNamedPipe(handle, NULL, 0, NULL, &bytes, NULL)) {
return bytes;
@@ -316,7 +321,7 @@ qint64 QLocalSocket::bytesAvailable() const
{
Q_D(const QLocalSocket);
qint64 available = QIODevice::bytesAvailable();
- available += (qint64) d->readBuffer.size();
+ available += (qint64) d->actualReadBufferSize;
return available;
}
@@ -343,7 +348,6 @@ void QLocalSocket::close()
QIODevice::close();
d->state = ClosingState;
emit stateChanged(d->state);
- d->readyReadEmitted = false;
emit readChannelFinished();
d->serverName = QString();
d->fullServerName = QString();
@@ -352,10 +356,13 @@ void QLocalSocket::close()
disconnectFromServer();
return;
}
+ d->readSequenceStarted = false;
+ d->pendingReadyRead = false;
d->pipeClosed = false;
DisconnectNamedPipe(d->handle);
CloseHandle(d->handle);
d->handle = INVALID_HANDLE_VALUE;
+ ResetEvent(d->overlapped.hEvent);
d->state = UnconnectedState;
emit stateChanged(d->state);
emit disconnected();
@@ -363,7 +370,6 @@ void QLocalSocket::close()
delete d->pipeWriter;
d->pipeWriter = 0;
}
- d->dataNotifier.stop();
}
bool QLocalSocket::flush()
@@ -397,12 +403,15 @@ bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
{
Q_D(QLocalSocket);
d->readBuffer.clear();
+ d->actualReadBufferSize = 0;
QIODevice::open(openMode);
d->handle = (int*)socketDescriptor;
d->state = socketState;
emit stateChanged(d->state);
- if (d->threadData->eventDispatcher)
- d->dataNotifier.start(NOTIFYTIMEOUT);
+ if (d->state == ConnectedState && openMode.testFlag(QIODevice::ReadOnly)) {
+ d->startAsyncRead();
+ d->checkReadyRead();
+ }
return true;
}
@@ -416,20 +425,18 @@ void QLocalSocketPrivate::_q_canWrite()
void QLocalSocketPrivate::_q_notified()
{
Q_Q(QLocalSocket);
- if (0 != bytesAvailable()) {
- if (readBufferMaxSize == 0 || readBuffer.size() < readBufferMaxSize) {
- if (!readFromSocket()) {
- return;
- }
- // wait until buffer is cleared before starting again
- if (readBufferMaxSize && readBuffer.size() == readBufferMaxSize) {
- dataNotifier.stop();
- }
- }
- if (!readyReadEmitted) {
- readyReadEmitted = true;
- q->emit readyRead();
- }
+ completeAsyncRead();
+ startAsyncRead();
+ pendingReadyRead = false;
+ emit q->readyRead();
+}
+
+void QLocalSocketPrivate::_q_emitReadyRead()
+{
+ if (pendingReadyRead) {
+ Q_Q(QLocalSocket);
+ pendingReadyRead = false;
+ emit q->readyRead();
}
}
@@ -462,11 +469,15 @@ bool QLocalSocket::waitForDisconnected(int msecs)
Q_D(QLocalSocket);
if (state() == UnconnectedState)
return false;
+ if (!openMode().testFlag(QIODevice::ReadOnly)) {
+ qWarning("QLocalSocket::waitForDisconnected isn't supported for write only pipes.");
+ return false;
+ }
QIncrementalSleepTimer timer(msecs);
forever {
- d->_q_notified();
- if (d->pipeClosed)
- close();
+ d->bytesAvailable(); // to check if PeekNamedPipe fails
+ if (d->pipeClosed)
+ close();
if (state() == UnconnectedState)
return true;
Sleep(timer.nextSleepTime());
@@ -486,22 +497,24 @@ bool QLocalSocket::isValid() const
bool QLocalSocket::waitForReadyRead(int msecs)
{
Q_D(QLocalSocket);
- QIncrementalSleepTimer timer(msecs);
- forever {
- d->_q_notified();
- if (bytesAvailable() > 0) {
- if (!d->readyReadEmitted) {
- d->readyReadEmitted = true;
- emit readyRead();
- }
- return true;
- }
- Sleep(timer.nextSleepTime());
- if (timer.hasTimedOut())
- break;
+ if (bytesAvailable() > 0)
+ return true;
+
+ if (d->state != QLocalSocket::ConnectedState)
+ return false;
+
+ Q_ASSERT(d->readSequenceStarted);
+ DWORD result = WaitForSingleObject(d->overlapped.hEvent, msecs == -1 ? INFINITE : msecs);
+ switch (result) {
+ case WAIT_OBJECT_0:
+ d->_q_notified();
+ return true;
+ case WAIT_TIMEOUT:
+ return false;
}
+ qWarning("QLocalSocket::waitForReadyRead WaitForSingleObject failed with error code %d.", int(GetLastError()));
return false;
}
@@ -511,27 +524,11 @@ bool QLocalSocket::waitForBytesWritten(int msecs)
if (!d->pipeWriter)
return false;
- QIncrementalSleepTimer timer(msecs);
- forever {
- if (d->pipeWriter->hadWritten())
- return true;
-
- if (d->pipeWriter->bytesToWrite() == 0)
- return false;
-
- // Wait for the pipe writer to acknowledge that it has
- // written. This will succeed if either the pipe writer has
- // already written the data, or if it manages to write data
- // within the given timeout.
- if (d->pipeWriter->waitForWrite(0))
- return true;
-
- Sleep(timer.nextSleepTime());
- if (timer.hasTimedOut())
- break;
- }
-
- return false;
+ // Wait for the pipe writer to acknowledge that it has
+ // written. This will succeed if either the pipe writer has
+ // already written the data, or if it manages to write data
+ // within the given timeout.
+ return d->pipeWriter->waitForWrite(msecs);
}
QT_END_NAMESPACE
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index 7811635..a9479d3 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -63,35 +63,6 @@
QT_BEGIN_NAMESPACE
-#ifndef Q_OS_WIN
-// Almost always the same. If not, specify in qplatformdefs.h.
-#if !defined(QT_SOCKOPTLEN_T)
-# define QT_SOCKOPTLEN_T QT_SOCKLEN_T
-#endif
-
-// Tru64 redefines accept -> _accept with _XOPEN_SOURCE_EXTENDED
-static inline int qt_socket_accept(int s, struct sockaddr *addr, QT_SOCKLEN_T *addrlen)
-{ return ::accept(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen)); }
-#if defined(accept)
-# undef accept
-#endif
-
-// UnixWare 7 redefines listen -> _listen
-static inline int qt_socket_listen(int s, int backlog)
-{ return ::listen(s, backlog); }
-#if defined(listen)
-# undef listen
-#endif
-
-// UnixWare 7 redefines socket -> _socket
-static inline int qt_socket_socket(int domain, int type, int protocol)
-{ return ::socket(domain, type, protocol); }
-#if defined(socket)
-# undef socket
-#endif
-
-#endif
-
// Use our own defines and structs which we know are correct
# define QT_SS_MAXSIZE 128
# define QT_SS_ALIGNSIZE (sizeof(qint64))
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index b130a9b..3991ae6 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -42,6 +42,7 @@
//#define QNATIVESOCKETENGINE_DEBUG
#include "qnativesocketengine_p.h"
+#include "private/qnet_unix_p.h"
#include "qiodevice.h"
#include "qhostaddress.h"
#include "qvarlengtharray.h"
@@ -161,7 +162,7 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc
int protocol = AF_INET;
#endif
int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM;
- int socket = qt_socket_socket(protocol, type, 0);
+ int socket = qt_safe_socket(protocol, type, 0);
if (socket <= 0) {
switch (errno) {
@@ -466,7 +467,7 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16
bool QNativeSocketEnginePrivate::nativeListen(int backlog)
{
- if (qt_socket_listen(socketDescriptor, backlog) < 0) {
+ if (qt_safe_listen(socketDescriptor, backlog) < 0) {
switch (errno) {
case EADDRINUSE:
setError(QAbstractSocket::AddressInUseError,
@@ -493,7 +494,7 @@ bool QNativeSocketEnginePrivate::nativeListen(int backlog)
int QNativeSocketEnginePrivate::nativeAccept()
{
- int acceptedDescriptor = qt_socket_accept(socketDescriptor, 0, 0);
+ int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0);
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeAccept() == %i", acceptedDescriptor);
#endif
@@ -507,7 +508,7 @@ qint64 QNativeSocketEnginePrivate::nativeBytesAvailable() const
int nbytes = 0;
// gives shorter than true amounts on Unix domain sockets.
qint64 available = 0;
- if (::ioctl(socketDescriptor, FIONREAD, (char *) &nbytes) >= 0)
+ if (qt_safe_ioctl(socketDescriptor, FIONREAD, (char *) &nbytes) >= 0)
available = (qint64) nbytes;
#if defined (QNATIVESOCKETENGINE_DEBUG)
@@ -633,8 +634,8 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
ssize_t sentBytes;
do {
- sentBytes = ::sendto(socketDescriptor, data, len,
- 0, sockAddrPtr, sockAddrSize);
+ sentBytes = qt_safe_sendto(socketDescriptor, data, len,
+ 0, sockAddrPtr, sockAddrSize);
} while (sentBytes == -1 && errno == EINTR);
if (sentBytes < 0) {
@@ -833,33 +834,11 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
- QTime timer;
- timer.start();
-
int retval;
- do {
- if (selectForRead)
- retval = select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);
- else
- retval = select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);
-
- if (retval != -1 || errno != EINTR)
- break;
-
- if (timeout > 0) {
- // recalculate the timeout
- int t = timeout - timer.elapsed();
- if (t < 0) {
- // oops, timeout turned negative?
- retval = -1;
- break;
- }
-
- tv.tv_sec = t / 1000;
- tv.tv_usec = (t % 1000) * 1000;
- }
- } while (true);
-
+ if (selectForRead)
+ retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);
+ else
+ retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);
return retval;
}
@@ -880,28 +859,8 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool c
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
- QTime timer;
- timer.start();
-
int ret;
- do {
- ret = select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv);
- if (ret != -1 || errno != EINTR)
- break;
-
- if (timeout > 0) {
- // recalculate the timeout
- int t = timeout - timer.elapsed();
- if (t < 0) {
- // oops, timeout turned negative?
- ret = -1;
- break;
- }
-
- tv.tv_sec = t / 1000;
- tv.tv_usec = (t % 1000) * 1000;
- }
- } while (true);
+ ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv);
if (ret <= 0)
return ret;
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index 59a3b60..6bc23ce 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -166,11 +166,11 @@ static QByteArray qt_prettyDebug(const char *data, int len, int maxLength)
Extracts the port and address from a sockaddr, and stores them in
\a port and \a addr if they are non-null.
*/
-static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, struct sockaddr *sa, quint16 *port, QHostAddress *address)
+static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt_sockaddr *sa, quint16 *port, QHostAddress *address)
{
#if !defined (QT_NO_IPV6)
- if (sa->sa_family == AF_INET6) {
- qt_sockaddr_in6 *sa6 = (qt_sockaddr_in6 *)sa;
+ if (sa->a.sa_family == AF_INET6) {
+ const qt_sockaddr_in6 *sa6 = &sa->a6;
Q_IPV6ADDR tmp;
for (int i = 0; i < 16; ++i)
tmp.c[i] = sa6->sin6_addr.qt_s6_addr[i];
@@ -182,8 +182,8 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, struct s
WSANtohs(socketDescriptor, sa6->sin6_port, port);
} else
#endif
- if (sa->sa_family == AF_INET) {
- struct sockaddr_in *sa4 = (struct sockaddr_in *)sa;
+ if (sa->a.sa_family == AF_INET) {
+ const sockaddr_in *sa4 = &sa->a4;
unsigned long addr;
WSANtohl(socketDescriptor, sa4->sin_addr.s_addr, &addr);
QHostAddress a;
@@ -463,20 +463,15 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
if (socketDescriptor == -1)
return false;
-#if !defined (QT_NO_IPV6)
- struct qt_sockaddr_storage sa;
-#else
- struct sockaddr_in sa;
-#endif
- struct sockaddr *pSa = (struct sockaddr *) &sa;
-
- QT_SOCKLEN_T sz = sizeof(sa);
+ qt_sockaddr sa;
+ QT_SOCKLEN_T sockAddrSize = sizeof(sa);
+ // Determine local address
memset(&sa, 0, sizeof(sa));
- if (::getsockname(socketDescriptor, pSa, &sz) == 0) {
- qt_socket_getPortAndAddress(socketDescriptor, pSa, &localPort, &localAddress);
+ if (::getsockname(socketDescriptor, &sa.a, &sockAddrSize) == 0) {
+ qt_socket_getPortAndAddress(socketDescriptor, &sa, &localPort, &localAddress);
// Determine protocol family
- switch (pSa->sa_family) {
+ switch (sa.a.sa_family) {
case AF_INET:
socketProtocol = QAbstractSocket::IPv4Protocol;
break;
@@ -500,8 +495,8 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
}
memset(&sa, 0, sizeof(sa));
- if (::getpeername(socketDescriptor, pSa, &sz) == 0) {
- qt_socket_getPortAndAddress(socketDescriptor, pSa, &peerPort, &peerAddress);
+ if (::getpeername(socketDescriptor, &sa.a, &sockAddrSize) == 0) {
+ qt_socket_getPortAndAddress(socketDescriptor, &sa, &peerPort, &peerAddress);
} else {
WS_ERROR_DEBUG(WSAGetLastError());
}
@@ -533,8 +528,8 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin
struct sockaddr_in sockAddrIPv4;
qt_sockaddr_in6 sockAddrIPv6;
- struct sockaddr *sockAddrPtr;
- QT_SOCKLEN_T sockAddrSize;
+ struct sockaddr *sockAddrPtr = 0;
+ QT_SOCKLEN_T sockAddrSize = 0;
qt_socket_setPortAndAddress(socketDescriptor, &sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize);
@@ -638,8 +633,8 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16
{
struct sockaddr_in sockAddrIPv4;
qt_sockaddr_in6 sockAddrIPv6;
- struct sockaddr *sockAddrPtr;
- QT_SOCKLEN_T sockAddrSize;
+ struct sockaddr *sockAddrPtr = 0;
+ QT_SOCKLEN_T sockAddrSize = 0;
qt_socket_setPortAndAddress(socketDescriptor, &sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize);
@@ -766,20 +761,9 @@ bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams() const
{
#if !defined(Q_OS_WINCE)
// Create a sockaddr struct and reset its port number.
-#if !defined(QT_NO_IPV6)
- qt_sockaddr_in6 storage;
- qt_sockaddr_in6 *storagePtrIPv6 = reinterpret_cast<qt_sockaddr_in6 *>(&storage);
- storagePtrIPv6->sin6_port = 0;
-#else
- struct sockaddr storage;
-#endif
- sockaddr *storagePtr = reinterpret_cast<sockaddr *>(&storage);
- storagePtr->sa_family = 0;
-
- sockaddr_in *storagePtrIPv4 = reinterpret_cast<sockaddr_in *>(&storage);
- storagePtrIPv4->sin_port = 0;
+ qt_sockaddr storage;
QT_SOCKLEN_T storageSize = sizeof(storage);
-
+ memset(&storage, 0, storageSize);
bool result = false;
@@ -791,7 +775,7 @@ bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams() const
buf.len = sizeof(c);
DWORD available = 0;
DWORD flags = MSG_PEEK;
- int ret = ::WSARecvFrom(socketDescriptor, &buf, 1, &available, &flags, storagePtr, &storageSize,0,0);
+ int ret = ::WSARecvFrom(socketDescriptor, &buf, 1, &available, &flags, &storage.a, &storageSize,0,0);
int err = WSAGetLastError();
if (ret == SOCKET_ERROR && err != WSAEMSGSIZE) {
WS_ERROR_DEBUG(err);
@@ -801,7 +785,7 @@ bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams() const
// notifiers.
flags = 0;
::WSARecvFrom(socketDescriptor, &buf, 1, &available, &flags,
- storagePtr, &storageSize, 0, 0);
+ &storage.a, &storageSize, 0, 0);
}
} else {
// If there's no error, or if our buffer was too small, there must be
@@ -893,14 +877,11 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxL
{
qint64 ret = 0;
-#if !defined(QT_NO_IPV6)
- qt_sockaddr_storage aa;
-#else
- struct sockaddr_in aa;
-#endif
+ qt_sockaddr aa;
memset(&aa, 0, sizeof(aa));
QT_SOCKLEN_T sz;
sz = sizeof(aa);
+
WSABUF buf;
buf.buf = data;
buf.len = maxLength;
@@ -915,23 +896,17 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxL
DWORD flags = 0;
DWORD bytesRead = 0;
- int wsaRet = ::WSARecvFrom(socketDescriptor, &buf, 1, &bytesRead, &flags, (struct sockaddr *) &aa, &sz,0,0);
+ int wsaRet = ::WSARecvFrom(socketDescriptor, &buf, 1, &bytesRead, &flags, &aa.a, &sz,0,0);
if (wsaRet == SOCKET_ERROR) {
int err = WSAGetLastError();
- if (err == WSAEMSGSIZE) {
- // it is ok the buffer was to small if bytesRead is larger than
- // maxLength (win 9x) then assume bytes read is really maxLenth
- ret = qint64(bytesRead) > maxLength ? maxLength : qint64(bytesRead);
- } else {
- WS_ERROR_DEBUG(err);
- setError(QAbstractSocket::NetworkError, ReceiveDatagramErrorString);
- ret = -1;
- }
+ WS_ERROR_DEBUG(err);
+ setError(QAbstractSocket::NetworkError, ReceiveDatagramErrorString);
+ ret = -1;
} else {
ret = qint64(bytesRead);
}
- qt_socket_getPortAndAddress(socketDescriptor, (struct sockaddr *) &aa, port, address);
+ qt_socket_getPortAndAddress(socketDescriptor, &aa, port, address);
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeReceiveDatagram(%p \"%s\", %li, %s, %i) == %li",
@@ -950,41 +925,37 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
qint64 ret = -1;
struct sockaddr_in sockAddrIPv4;
qt_sockaddr_in6 sockAddrIPv6;
- struct sockaddr *sockAddrPtr;
- QT_SOCKLEN_T sockAddrSize;
+ struct sockaddr *sockAddrPtr = 0;
+ QT_SOCKLEN_T sockAddrSize = 0;
qt_socket_setPortAndAddress(socketDescriptor, &sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize);
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based && len > qint64(qt_socket_getMaxMsgSize(socketDescriptor))) {
- // WSAEMSGSIZE is not reliable enough (win 9x) so we check max size our self.
- setError(QAbstractSocket::DatagramTooLargeError, DatagramTooLargeErrorString);
- } else {
- WSABUF buf;
+ WSABUF buf;
#if !defined(Q_OS_WINCE)
- buf.buf = len ? (char*)data : 0;
+ buf.buf = len ? (char*)data : 0;
#else
- char tmp;
- buf.buf = len ? (char*)data : &tmp;
+ char tmp;
+ buf.buf = len ? (char*)data : &tmp;
#endif
- buf.len = len;
- DWORD flags = 0;
- DWORD bytesSent = 0;
- if (::WSASendTo(socketDescriptor, &buf, 1, &bytesSent, flags, sockAddrPtr, sockAddrSize, 0,0) == SOCKET_ERROR) {
- int err = WSAGetLastError();
- WS_ERROR_DEBUG(err);
- switch (err) {
- case WSAEMSGSIZE:
- setError(QAbstractSocket::DatagramTooLargeError, DatagramTooLargeErrorString);
- break;
- default:
- setError(QAbstractSocket::NetworkError, SendDatagramErrorString);
- break;
- }
- ret = -1;
- } else {
- ret = qint64(bytesSent);
+ buf.len = len;
+ DWORD flags = 0;
+ DWORD bytesSent = 0;
+ if (::WSASendTo(socketDescriptor, &buf, 1, &bytesSent, flags, sockAddrPtr, sockAddrSize, 0,0) == SOCKET_ERROR) {
+ int err = WSAGetLastError();
+ WS_ERROR_DEBUG(err);
+ switch (err) {
+ case WSAEMSGSIZE:
+ setError(QAbstractSocket::DatagramTooLargeError, DatagramTooLargeErrorString);
+ break;
+ default:
+ setError(QAbstractSocket::NetworkError, SendDatagramErrorString);
+ break;
}
+ ret = -1;
+ } else {
+ ret = qint64(bytesSent);
}
+
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeSendDatagram(%p \"%s\", %li, \"%s\", %i) == %li", data,
qt_prettyDebug(data, qMin<qint64>(len, 16), len).data(), 0, address.toString().toLatin1().constData(),
diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h
new file mode 100644
index 0000000..03ed3b4
--- /dev/null
+++ b/src/network/socket/qnet_unix_p.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNET_UNIX_P_H
+#define QNET_UNIX_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of Qt code on Unix. This header file may change from version to
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "private/qcore_unix_p.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+// for inet_addr
+#include <netdb.h>
+#include <arpa/inet.h>
+#include <resolv.h>
+
+
+QT_BEGIN_NAMESPACE
+
+// Almost always the same. If not, specify in qplatformdefs.h.
+#if !defined(QT_SOCKOPTLEN_T)
+# define QT_SOCKOPTLEN_T QT_SOCKLEN_T
+#endif
+
+// UnixWare 7 redefines socket -> _socket
+static inline int qt_safe_socket(int domain, int type, int protocol, int flags = 0)
+{
+ Q_ASSERT((flags & ~O_NONBLOCK) == 0);
+
+ register int fd;
+#ifdef SOCK_CLOEXEC
+ int newtype = type | SOCK_CLOEXEC;
+ if (flags & O_NONBLOCK)
+ newtype |= SOCK_NONBLOCK;
+ fd = ::socket(domain, newtype, protocol);
+ if (fd != -1 || errno != EINVAL)
+ return fd;
+#endif
+
+ fd = ::socket(domain, type, protocol);
+ if (fd == -1)
+ return -1;
+
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+
+ // set non-block too?
+ if (flags & O_NONBLOCK)
+ ::fcntl(fd, F_SETFL, ::fcntl(fd, F_GETFL) | O_NONBLOCK);
+
+ return fd;
+}
+
+// Tru64 redefines accept -> _accept with _XOPEN_SOURCE_EXTENDED
+static inline int qt_safe_accept(int s, struct sockaddr *addr, QT_SOCKLEN_T *addrlen, int flags = 0)
+{
+ Q_ASSERT((flags & ~O_NONBLOCK) == 0);
+
+ register int fd;
+#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
+ // use accept4
+ int sockflags = SOCK_CLOEXEC;
+ if (flags & O_NONBLOCK)
+ sockflags |= SOCK_NONBLOCK;
+ fd = ::accept4(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen), sockflags);
+ if (fd != -1 || !(errno == ENOSYS || errno == EINVAL))
+ return fd;
+#endif
+
+ fd = ::accept(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen));
+ if (fd == -1)
+ return -1;
+
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+
+ // set non-block too?
+ if (flags & O_NONBLOCK)
+ ::fcntl(fd, F_SETFL, ::fcntl(fd, F_GETFL) | O_NONBLOCK);
+
+ return fd;
+}
+
+// UnixWare 7 redefines listen -> _listen
+static inline int qt_safe_listen(int s, int backlog)
+{
+ return ::listen(s, backlog);
+}
+
+static inline int qt_safe_connect(int sockfd, const struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{
+ register int ret;
+ // Solaris e.g. expects a non-const 2nd parameter
+ EINTR_LOOP(ret, QT_SOCKET_CONNECT(sockfd, const_cast<struct sockaddr *>(addr), addrlen));
+ return ret;
+}
+#undef QT_SOCKET_CONNECT
+#define QT_SOCKET_CONNECT qt_safe_connect
+
+#if defined(socket)
+# undef socket
+#endif
+#if defined(accept)
+# undef accept
+#endif
+#if defined(listen)
+# undef listen
+#endif
+
+template <typename T>
+static inline int qt_safe_ioctl(int sockfd, int request, T arg)
+{
+ return ::ioctl(sockfd, request, arg);
+}
+
+static inline in_addr_t qt_safe_inet_addr(const char *cp)
+{
+ return ::inet_addr(cp);
+}
+
+static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *to, QT_SOCKLEN_T tolen)
+{
+#ifdef MSG_NOSIGNAL
+ flags |= MSG_NOSIGNAL;
+#endif
+
+ register int ret;
+ EINTR_LOOP(ret, ::sendto(sockfd, buf, len, flags, to, tolen));
+ return ret;
+}
+
+QT_END_NAMESPACE
+
+#endif // QNET_UNIX_P_H
diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp
index ea7753c..797becb 100644
--- a/src/network/socket/qudpsocket.cpp
+++ b/src/network/socket/qudpsocket.cpp
@@ -70,6 +70,9 @@
pendingDatagramSize() to obtain the size of the first pending
datagram, and readDatagram() to read it.
+ \note An incoming datagram should be read when you receive the readyRead()
+ signal, otherwise this signal will not be emitted for the next datagram.
+
Example:
\snippet doc/src/snippets/code/src_network_socket_qudpsocket.cpp 0
diff --git a/src/network/socket/socket.pri b/src/network/socket/socket.pri
index b1fe64a..17e49d2 100644
--- a/src/network/socket/socket.pri
+++ b/src/network/socket/socket.pri
@@ -28,7 +28,8 @@ SOURCES += socket/qabstractsocketengine.cpp \
unix:SOURCES += socket/qnativesocketengine_unix.cpp \
socket/qlocalsocket_unix.cpp \
socket/qlocalserver_unix.cpp
-
+unix:HEADERS += \
+ socket/qnet_unix_p.h
win32:SOURCES += socket/qnativesocketengine_win.cpp \
socket/qlocalsocket_win.cpp \
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index a38433b..7dc9fab 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -57,7 +57,7 @@
#include "qsslsocket_p.h"
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#if defined(OCSP_RESPONSE)
#undef OCSP_RESPONSE
#endif
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 4b73ca9..27636f4 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -190,27 +190,33 @@ QGLEngineShaderManager::~QGLEngineShaderManager()
//###
}
-
-uint QGLEngineShaderManager::getUniformIdentifier(const char *uniformName)
-{
- uniformIdentifiers << uniformName;
- return uniformIdentifiers.size() - 1;
-}
-
-uint QGLEngineShaderManager::getUniformLocation(uint id)
+uint QGLEngineShaderManager::getUniformLocation(Uniform id)
{
QVector<uint> &uniformLocations = currentShaderProg->uniformLocations;
- uint oldSize = uniformLocations.size();
- if (oldSize <= id) {
- uint newSize = id + 1;
- uniformLocations.resize(newSize);
-
- for (uint i = oldSize; i < newSize; ++i)
- uniformLocations[i] = GLuint(-1);
- }
+ if (uniformLocations.isEmpty())
+ uniformLocations.fill(GLuint(-1), NumUniforms);
+
+ static const char *uniformNames[] = {
+ "imageTexture",
+ "patternColor",
+ "globalOpacity",
+ "depth",
+ "pmvMatrix",
+ "maskTexture",
+ "fragmentColor",
+ "linearData",
+ "angle",
+ "halfViewportSize",
+ "fmp",
+ "fmp2_m_radius2",
+ "inverse_2_fmp2_m_radius2",
+ "invertedTextureSize",
+ "brushTransform",
+ "brushTexture"
+ };
if (uniformLocations.at(id) == GLuint(-1))
- uniformLocations[id] = currentShaderProg->program->uniformLocation(uniformIdentifiers.at(id));
+ uniformLocations[id] = currentShaderProg->program->uniformLocation(uniformNames[id]);
return uniformLocations.at(id);
}
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index 34f0768..442edfe 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -274,6 +274,26 @@ public:
TextureSrcWithPattern = Qt::TexturePattern+4
};
+ enum Uniform {
+ ImageTexture,
+ PatternColor,
+ GlobalOpacity,
+ Depth,
+ PmvMatrix,
+ MaskTexture,
+ FragmentColor,
+ LinearData,
+ Angle,
+ HalfViewportSize,
+ Fmp,
+ Fmp2MRadius2,
+ Inverse2Fmp2MRadius2,
+ InvertedTextureSize,
+ BrushTransform,
+ BrushTexture,
+ NumUniforms
+ };
+
// There are optimisations we can do, depending on the brush transform:
// 1) May not have to apply perspective-correction
// 2) Can use lower precision for matrix
@@ -285,8 +305,7 @@ public:
void setMaskType(MaskType);
void setCompositionMode(QPainter::CompositionMode);
- uint getUniformIdentifier(const char *uniformName);
- uint getUniformLocation(uint id);
+ uint getUniformLocation(Uniform id);
void setDirty(); // someone has manually changed the current shader program
bool useCorrectShaderProg(); // returns true if the shader program needed to be changed
@@ -352,6 +371,7 @@ public:
TotalShaderCount, InvalidShaderName
};
+
/*
// These allow the ShaderName enum to be used as a cache key
const int mainVertexOffset = 0;
@@ -391,8 +411,6 @@ private:
void compileNamedShader(QGLEngineShaderManager::ShaderName name, QGLShader::ShaderType type);
static const char* qglEngineShaderSourceCode[TotalShaderCount];
-
- QVector<const char *> uniformIdentifiers;
};
QT_END_NAMESPACE
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 4bf5d4c..2bfbf4a 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -88,8 +88,9 @@ static const GLuint QT_IMAGE_TEXTURE_UNIT = 0; //Can be the same as brush
static const GLuint QT_MASK_TEXTURE_UNIT = 1;
static const GLuint QT_BACKGROUND_TEXTURE_UNIT = 2;
-class QGLTextureGlyphCache : public QTextureGlyphCache
+class QGLTextureGlyphCache : public QObject, public QTextureGlyphCache
{
+ Q_OBJECT
public:
QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix);
~QGLTextureGlyphCache();
@@ -105,6 +106,24 @@ public:
inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; }
+
+public Q_SLOTS:
+ void contextDestroyed(const QGLContext *context) {
+ if (context == ctx) {
+ QList<const QGLContext *> shares = qgl_share_reg()->shares(ctx);
+ if (shares.isEmpty()) {
+ glDeleteFramebuffers(1, &m_fbo);
+ if (m_width || m_height)
+ glDeleteTextures(1, &m_texture);
+ } else {
+ // since the context holding the texture is shared, and
+ // about to be destroyed, we have to transfer ownership
+ // of the texture to one of the share contexts
+ ctx = const_cast<QGLContext *>(shares.at(0));
+ }
+ }
+ }
+
private:
QGLContext *ctx;
@@ -126,6 +145,8 @@ QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyph
, m_height(0)
{
glGenFramebuffers(1, &m_fbo);
+ connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)),
+ SLOT(contextDestroyed(const QGLContext *)));
}
QGLTextureGlyphCache::~QGLTextureGlyphCache()
@@ -231,8 +252,11 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph)
if (mask.format() == QImage::Format_RGB32) {
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, m_height - c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits());
} else {
- mask = mask.convertToFormat(QImage::Format_Indexed8);
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits());
+ // If the width of the uploaded data is not a multiple of four bytes, we get some garbage
+ // in the glyph cache, probably because of a driver bug.
+ // Convert to ARGB32 to get a multiple of 4 bytes per line.
+ mask = mask.convertToFormat(QImage::Format_ARGB32);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits());
}
}
@@ -251,7 +275,7 @@ QGL2PaintEngineExPrivate::~QGL2PaintEngineExPrivate()
void QGL2PaintEngineExPrivate::updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id)
{
// glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); //### Is it always this texture unit?
- if (id != -1 && id == lastTexture)
+ if (id != GLuint(-1) && id == lastTexture)
return;
lastTexture = id;
@@ -372,7 +396,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
if (style == Qt::SolidPattern) {
QColor col = premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity);
- shaderManager->currentProgram()->setUniformValue(location(FragmentColor), col);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::FragmentColor), col);
}
else {
// All other brushes have a transform and thus need the translation point:
@@ -383,10 +407,10 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
QColor col = premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity);
- shaderManager->currentProgram()->setUniformValue(location(PatternColor), col);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col);
QVector2D halfViewportSize(width*0.5, height*0.5);
- shaderManager->currentProgram()->setUniformValue(location(HalfViewportSize), halfViewportSize);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize);
}
else if (style == Qt::LinearGradientPattern) {
const QLinearGradient *g = static_cast<const QLinearGradient *>(currentBrush->gradient());
@@ -403,10 +427,10 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
1.0f / (l.x() * l.x() + l.y() * l.y())
);
- shaderManager->currentProgram()->setUniformValue(location(LinearData), linearData);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::LinearData), linearData);
QVector2D halfViewportSize(width*0.5, height*0.5);
- shaderManager->currentProgram()->setUniformValue(location(HalfViewportSize), halfViewportSize);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize);
}
else if (style == Qt::ConicalGradientPattern) {
const QConicalGradient *g = static_cast<const QConicalGradient *>(currentBrush->gradient());
@@ -414,10 +438,10 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
GLfloat angle = -(g->angle() * 2 * Q_PI) / 360.0;
- shaderManager->currentProgram()->setUniformValue(location(Angle), angle);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::Angle), angle);
QVector2D halfViewportSize(width*0.5, height*0.5);
- shaderManager->currentProgram()->setUniformValue(location(HalfViewportSize), halfViewportSize);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize);
}
else if (style == Qt::RadialGradientPattern) {
const QRadialGradient *g = static_cast<const QRadialGradient *>(currentBrush->gradient());
@@ -427,15 +451,15 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
translationPoint = realFocal;
QPointF fmp = realCenter - realFocal;
- shaderManager->currentProgram()->setUniformValue(location(Fmp), fmp);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::Fmp), fmp);
GLfloat fmp2_m_radius2 = -fmp.x() * fmp.x() - fmp.y() * fmp.y() + realRadius*realRadius;
- shaderManager->currentProgram()->setUniformValue(location(Fmp2MRadius2), fmp2_m_radius2);
- shaderManager->currentProgram()->setUniformValue(location(Inverse2Fmp2MRadius2),
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::Fmp2MRadius2), fmp2_m_radius2);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::Inverse2Fmp2MRadius2),
GLfloat(1.0 / (2.0*fmp2_m_radius2)));
QVector2D halfViewportSize(width*0.5, height*0.5);
- shaderManager->currentProgram()->setUniformValue(location(HalfViewportSize), halfViewportSize);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize);
}
else if (style == Qt::TexturePattern) {
translationPoint = q->state()->brushOrigin;
@@ -444,14 +468,14 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
if (qHasPixmapTexture(*currentBrush) && currentBrush->texture().isQBitmap()) {
QColor col = premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity);
- shaderManager->currentProgram()->setUniformValue(location(PatternColor), col);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col);
}
QSizeF invertedTextureSize( 1.0 / texPixmap.width(), 1.0 / texPixmap.height() );
- shaderManager->currentProgram()->setUniformValue(location(InvertedTextureSize), invertedTextureSize);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::InvertedTextureSize), invertedTextureSize);
QVector2D halfViewportSize(width*0.5, height*0.5);
- shaderManager->currentProgram()->setUniformValue(location(HalfViewportSize), halfViewportSize);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize);
}
else
qWarning("QGL2PaintEngineEx: Unimplemented fill style");
@@ -460,8 +484,8 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
QTransform gl_to_qt(1, 0, 0, -1, 0, height);
QTransform inv_matrix = gl_to_qt * (brushQTransform * q->state()->matrix).inverted() * translate;
- shaderManager->currentProgram()->setUniformValue(location(BrushTransform), inv_matrix);
- shaderManager->currentProgram()->setUniformValue(location(BrushTexture), QT_BRUSH_TEXTURE_UNIT);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::BrushTransform), inv_matrix);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::BrushTexture), QT_BRUSH_TEXTURE_UNIT);
}
brushUniformsDirty = false;
}
@@ -599,11 +623,11 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s
shaderManager->setSrcPixelType(pattern ? QGLEngineShaderManager::PatternSrc : QGLEngineShaderManager::ImageSrc);
shaderManager->setTextureCoordsEnabled(true);
if (prepareForDraw(opaque))
- shaderManager->currentProgram()->setUniformValue(location(ImageTexture), QT_IMAGE_TEXTURE_UNIT);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::ImageTexture), QT_IMAGE_TEXTURE_UNIT);
if (pattern) {
QColor col = premultiplyColor(q->state()->pen.color(), (GLfloat)q->state()->opacity);
- shaderManager->currentProgram()->setUniformValue(location(PatternColor), col);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col);
}
GLfloat dx = 1.0 / textureSize.width();
@@ -655,6 +679,11 @@ void QGL2PaintEngineEx::sync()
glDisable(GL_BLEND);
glActiveTexture(GL_TEXTURE0);
+ glDisable(GL_DEPTH_TEST);
+ glDepthFunc(GL_LESS);
+ glDepthMask(true);
+ glClearDepth(1);
+
d->needsSync = true;
}
@@ -847,17 +876,17 @@ bool QGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque)
updateBrushUniforms();
if (shaderMatrixUniformDirty) {
- shaderManager->currentProgram()->setUniformValue(location(PmvMatrix), pmvMatrix);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PmvMatrix), pmvMatrix);
shaderMatrixUniformDirty = false;
}
if (depthUniformDirty) {
- shaderManager->currentProgram()->setUniformValue(location(Depth), (GLfloat)q->state()->currentDepth);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::Depth), (GLfloat)q->state()->currentDepth);
depthUniformDirty = false;
}
if (useGlobalOpacityUniform && opacityUniformDirty) {
- shaderManager->currentProgram()->setUniformValue(location(GlobalOpacity), (GLfloat)q->state()->opacity);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::GlobalOpacity), (GLfloat)q->state()->opacity);
opacityUniformDirty = false;
}
@@ -1140,7 +1169,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, const QTextIte
prepareForDraw(false); // Text always causes src pixels to be transparent
- shaderManager->currentProgram()->setUniformValue(location(MaskTexture), QT_MASK_TEXTURE_UNIT);
+ shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::MaskTexture), QT_MASK_TEXTURE_UNIT);
if (vertexCoordinateArray.data() != oldVertexCoordinateDataPtr)
glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, vertexCoordinateArray.data());
@@ -1184,23 +1213,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->shaderManager->setDirty();
} else {
d->shaderManager = new QGLEngineShaderManager(d->ctx);
-
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::ImageTexture] = d->shaderManager->getUniformIdentifier("imageTexture");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::PatternColor] = d->shaderManager->getUniformIdentifier("patternColor");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::GlobalOpacity] = d->shaderManager->getUniformIdentifier("globalOpacity");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::Depth] = d->shaderManager->getUniformIdentifier("depth");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::PmvMatrix] = d->shaderManager->getUniformIdentifier("pmvMatrix");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::MaskTexture] = d->shaderManager->getUniformIdentifier("maskTexture");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::FragmentColor] = d->shaderManager->getUniformIdentifier("fragmentColor");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::LinearData] = d->shaderManager->getUniformIdentifier("linearData");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::Angle] = d->shaderManager->getUniformIdentifier("angle");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::HalfViewportSize] = d->shaderManager->getUniformIdentifier("halfViewportSize");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::Fmp] = d->shaderManager->getUniformIdentifier("fmp");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::Fmp2MRadius2] = d->shaderManager->getUniformIdentifier("fmp2_m_radius2");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::Inverse2Fmp2MRadius2] = d->shaderManager->getUniformIdentifier("inverse_2_fmp2_m_radius2");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::InvertedTextureSize] = d->shaderManager->getUniformIdentifier("invertedTextureSize");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::BrushTransform] = d->shaderManager->getUniformIdentifier("brushTransform");
- d->uniformIdentifiers[QGL2PaintEngineExPrivate::BrushTexture] = d->shaderManager->getUniformIdentifier("brushTexture");
}
glViewport(0, 0, d->width, d->height);
@@ -1408,7 +1420,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
if (state()->matrix.type() <= QTransform::TxScale) {
rect = state()->matrix.mapRect(rect);
- if (d->use_system_clip && rect.contains(d->systemClip.boundingRect())
+ if ((d->use_system_clip && rect.contains(d->systemClip.boundingRect()))
|| rect.contains(QRect(0, 0, d->width, d->height)))
return;
}
@@ -1606,3 +1618,5 @@ QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState()
}
QT_END_NAMESPACE
+
+#include "qpaintengineex_opengl2.moc"
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 0d28a49..ec447a3 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -221,32 +221,11 @@ public:
void systemStateChanged();
uint use_system_clip : 1;
- enum Uniform {
- ImageTexture,
- PatternColor,
- GlobalOpacity,
- Depth,
- PmvMatrix,
- MaskTexture,
- FragmentColor,
- LinearData,
- Angle,
- HalfViewportSize,
- Fmp,
- Fmp2MRadius2,
- Inverse2Fmp2MRadius2,
- InvertedTextureSize,
- BrushTransform,
- BrushTexture,
- NumUniforms
- };
-
- uint location(Uniform uniform)
+ uint location(QGLEngineShaderManager::Uniform uniform)
{
- return shaderManager->getUniformLocation(uniformIdentifiers[uniform]);
+ return shaderManager->getUniformLocation(uniform);
}
- uint uniformIdentifiers[NumUniforms];
GLuint lastTexture;
bool needsSync;
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index a9f8ede..0169ea2 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -142,6 +142,7 @@ QGLSignalProxy *QGLSignalProxy::instance()
/*!
\namespace QGL
+ \inmodule QtOpenGL
\brief The QGL namespace specifies miscellaneous identifiers used
in the Qt OpenGL module.
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 85e9bd7..ac19d64 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -421,6 +421,10 @@ public:
removeShare(oldContext);
}
+ QList<const QGLContext *> shares(const QGLContext *context) {
+ return reg.values(context);
+ }
+
private:
QGLSharingHash reg;
};
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index 40b0ce7..232d47b 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -51,7 +51,7 @@
#include <qdebug.h>
#include <qcolor.h>
-#include <windows.h>
+#include <qt_windows.h>
typedef bool (APIENTRY *PFNWGLGETPIXELFORMATATTRIBIVARB)(HDC hdc,
int iPixelFormat,
@@ -642,14 +642,10 @@ public:
QString windowClassName = qt_getRegisteredWndClass();
if (parent && !parent->internalWinId())
parent = parent->nativeParentWidget();
- QT_WA({
- const TCHAR *cname = (TCHAR*)windowClassName.utf16();
- dmy_id = CreateWindow(cname, 0, 0, 0, 0, 1, 1,
- parent ? parent->winId() : 0, 0, qWinAppInst(), 0);
- } , {
- dmy_id = CreateWindowA(windowClassName.toLatin1(), 0, 0, 0, 0, 1, 1,
- parent ? parent->winId() : 0, 0, qWinAppInst(), 0);
- });
+
+ dmy_id = CreateWindow((const wchar_t *)windowClassName.utf16(),
+ 0, 0, 0, 0, 1, 1,
+ parent ? parent->winId() : 0, 0, qWinAppInst(), 0);
dmy_pdc = GetDC(dmy_id);
PIXELFORMATDESCRIPTOR dmy_pfd;
@@ -1417,7 +1413,7 @@ void QGLWidget::setContext(QGLContext *context,
}
if (!d->glcx->isValid()) {
- bool wasSharing = shareContext || oldcx && oldcx->isSharing();
+ bool wasSharing = shareContext || (oldcx && oldcx->isSharing());
d->glcx->create(shareContext ? shareContext : oldcx);
// the above is a trick to keep disp lists etc when a
// QGLWidget has been reparented, so remove the sharing
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index eacf5bb..3685661 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -109,8 +109,6 @@ public:
*/
/*!
- \since 4.6
-
Creates a QGLFramebufferObjectFormat object with properties specifying
the format of an OpenGL framebuffer object.
@@ -146,8 +144,6 @@ QGLFramebufferObjectFormat::QGLFramebufferObjectFormat(int samples,
}
/*!
- \since 4.6
-
Constructs a copy of \a other.
*/
@@ -158,8 +154,6 @@ QGLFramebufferObjectFormat::QGLFramebufferObjectFormat(const QGLFramebufferObjec
}
/*!
- \since 4.6
-
Assigns \a other to this object.
*/
@@ -170,8 +164,6 @@ QGLFramebufferObjectFormat &QGLFramebufferObjectFormat::operator=(const QGLFrame
}
/*!
- \since 4.6
-
Destroys the QGLFramebufferObjectFormat.
*/
QGLFramebufferObjectFormat::~QGLFramebufferObjectFormat()
@@ -180,8 +172,6 @@ QGLFramebufferObjectFormat::~QGLFramebufferObjectFormat()
}
/*!
- \since 4.6
-
Sets the number of samples per pixel for a multisample framebuffer object
to \a samples.
A sample count of 0 represents a regular non-multisample framebuffer object.
@@ -194,8 +184,6 @@ void QGLFramebufferObjectFormat::setSamples(int samples)
}
/*!
- \since 4.6
-
Returns the number of samples per pixel if a framebuffer object
is a multisample framebuffer object. Otherwise, returns 0.
@@ -207,8 +195,6 @@ int QGLFramebufferObjectFormat::samples() const
}
/*!
- \since 4.6
-
Sets the attachments a framebuffer object should have to \a attachment.
\sa attachment()
@@ -219,8 +205,6 @@ void QGLFramebufferObjectFormat::setAttachment(QGLFramebufferObject::Attachment
}
/*!
- \since 4.6
-
Returns the status of the depth and stencil buffers attached to
a framebuffer object.
@@ -232,8 +216,6 @@ QGLFramebufferObject::Attachment QGLFramebufferObjectFormat::attachment() const
}
/*!
- \since 4.6
-
Sets the texture target of the texture attached to a framebuffer object to
\a target. Ignored for multisample framebuffer objects.
@@ -245,8 +227,6 @@ void QGLFramebufferObjectFormat::setTextureTarget(GLenum target)
}
/*!
- \since 4.6
-
Returns the texture target of the texture attached to a framebuffer object.
Ignored for multisample framebuffer objects.
@@ -258,8 +238,6 @@ GLenum QGLFramebufferObjectFormat::textureTarget() const
}
/*!
- \since 4.6
-
Sets the internal format of a framebuffer object's texture or multisample
framebuffer object's color buffer to \a internalFormat.
@@ -271,8 +249,6 @@ void QGLFramebufferObjectFormat::setInternalFormat(GLenum internalFormat)
}
/*!
- \since 4.6
-
Returns the internal format of a framebuffer object's texture or
multisample framebuffer object's color buffer.
@@ -1056,8 +1032,7 @@ GLuint QGLFramebufferObject::handle() const
}
/*! \fn int QGLFramebufferObject::devType() const
-
- \reimp
+ \internal
*/
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 38fad4e..440694d 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -591,7 +591,7 @@ QGLFormat QGLPixelBuffer::format() const
}
/*! \fn int QGLPixelBuffer::devType() const
- \reimp
+ \internal
*/
QT_END_NAMESPACE
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index eda8d83..685d0f5 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -3963,7 +3963,7 @@ void QOpenGLPaintEnginePrivate::strokePath(const QPainterPath &path, bool use_ca
QPen pen = cpen;
if (txscale != 1)
- pen.setWidthF(pen.width() * txscale);
+ pen.setWidthF(pen.widthF() * txscale);
if (use_cache)
fillPath(qt_opengl_stroke_cache()->getStrokedPath(temp.map(path), pen));
else
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 3a7a07e..eec725e 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -171,7 +171,7 @@ QGLGraphicsSystem::QGLGraphicsSystem()
}
}
#elif defined(Q_WS_WIN)
- QGLWindowSurface::surfaceFormat.setDoubleBuffer(false);
+ QGLWindowSurface::surfaceFormat.setDoubleBuffer(true);
qt_win_owndc_required = true;
#endif
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 37945bf..7a962e4 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -142,6 +142,8 @@ public:
void ensureMask(QVGPaintEngine *engine, int width, int height);
void modifyMask
(QVGPaintEngine *engine, VGMaskOperation op, const QRegion& region);
+ void modifyMask
+ (QVGPaintEngine *engine, VGMaskOperation op, const QRect& rect);
#endif
VGint maxScissorRects; // Maximum scissor rectangles for clipping.
@@ -1320,11 +1322,11 @@ QPainterState *QVGPaintEngine::createState(QPainterState *orig) const
if (!orig) {
return new QVGPainterState();
} else {
- QVGPaintEnginePrivate *d =
- static_cast<QVGPaintEnginePrivate *>(d_ptr);
+ Q_D(const QVGPaintEngine);
+ QVGPaintEnginePrivate *d2 = const_cast<QVGPaintEnginePrivate*>(d);
QVGPainterState *origState = static_cast<QVGPainterState *>(orig);
- origState->savedDirty = d->dirty;
- d->dirty = 0;
+ origState->savedDirty = d2->dirty;
+ d2->dirty = 0;
return new QVGPainterState(*origState);
}
}
@@ -1611,13 +1613,106 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
{
- clip(QRegion(rect), op);
+ Q_D(QVGPaintEngine);
+
+ d->dirty |= QPaintEngine::DirtyClipRegion;
+
+ // If we have a non-simple transform, then use path-based clipping.
+ if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) {
+ QPaintEngineEx::clip(rect, op);
+ return;
+ }
+
+ switch (op) {
+ case Qt::NoClip:
+ {
+ d->maskValid = false;
+ d->maskIsSet = true;
+ d->maskRect = QRect();
+ vgSeti(VG_MASKING, VG_FALSE);
+ }
+ break;
+
+ case Qt::ReplaceClip:
+ {
+ QRect r = d->transform.mapRect(rect);
+ if (isDefaultClipRect(r)) {
+ // Replacing the clip with a full-window region is the
+ // same as turning off clipping.
+ if (d->maskValid)
+ vgSeti(VG_MASKING, VG_FALSE);
+ d->maskValid = false;
+ d->maskIsSet = true;
+ d->maskRect = QRect();
+ } else {
+ // Special case: if the intersection of the system
+ // clip and "r" is a single rectangle, then use the
+ // scissor for clipping. We try to avoid allocating a
+ // QRegion copy on the heap for the test if we can.
+ QRegion clip = d->systemClip; // Reference-counted, no alloc.
+ QRect clipRect;
+ if (clip.numRects() == 1) {
+ clipRect = clip.boundingRect().intersected(r);
+ } else if (clip.isEmpty()) {
+ clipRect = r;
+ } else {
+ clip = clip.intersect(r);
+ if (clip.numRects() != 1) {
+ d->maskValid = false;
+ d->maskIsSet = false;
+ d->maskRect = QRect();
+ d->modifyMask(this, VG_FILL_MASK, r);
+ break;
+ }
+ clipRect = clip.boundingRect();
+ }
+ d->maskValid = false;
+ d->maskIsSet = false;
+ d->maskRect = clipRect;
+ vgSeti(VG_MASKING, VG_FALSE);
+ updateScissor();
+ }
+ }
+ break;
+
+ case Qt::IntersectClip:
+ {
+ QRect r = d->transform.mapRect(rect);
+ if (d->maskIsSet && isDefaultClipRect(r)) {
+ // Intersecting a full-window clip with a full-window
+ // region is the same as turning off clipping.
+ if (d->maskValid)
+ vgSeti(VG_MASKING, VG_FALSE);
+ d->maskValid = false;
+ d->maskIsSet = true;
+ d->maskRect = QRect();
+ } else {
+ d->modifyMask(this, VG_INTERSECT_MASK, r);
+ }
+ }
+ break;
+
+ case Qt::UniteClip:
+ {
+ // If we already have a full-window clip, then uniting a
+ // region with it will do nothing. Otherwise union.
+ if (!(d->maskIsSet))
+ d->modifyMask(this, VG_UNION_MASK, d->transform.mapRect(rect));
+ }
+ break;
+ }
}
void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
{
Q_D(QVGPaintEngine);
+ // Use the QRect case if the region consists of a single rectangle.
+ if (region.numRects() == 1) {
+ clip(region.boundingRect(), op);
+ return;
+ }
+
d->dirty |= QPaintEngine::DirtyClipRegion;
// If we have a non-simple transform, then use path-based clipping.
@@ -1656,10 +1751,10 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
clip = r;
else
clip = clip.intersect(r);
- if (r.numRects() == 1) {
+ if (clip.numRects() == 1) {
d->maskValid = false;
d->maskIsSet = false;
- d->maskRect = r.boundingRect();
+ d->maskRect = clip.boundingRect();
vgSeti(VG_MASKING, VG_FALSE);
updateScissor();
} else {
@@ -1707,11 +1802,61 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
}
}
+#if !defined(QVG_NO_RENDER_TO_MASK)
+
+// Copied from qpathclipper.cpp.
+static bool qt_vg_pathToRect(const QPainterPath &path, QRectF *rect)
+{
+ if (path.elementCount() != 5)
+ return false;
+
+ const bool mightBeRect = path.elementAt(0).isMoveTo()
+ && path.elementAt(1).isLineTo()
+ && path.elementAt(2).isLineTo()
+ && path.elementAt(3).isLineTo()
+ && path.elementAt(4).isLineTo();
+
+ if (!mightBeRect)
+ return false;
+
+ const qreal x1 = path.elementAt(0).x;
+ const qreal y1 = path.elementAt(0).y;
+
+ const qreal x2 = path.elementAt(1).x;
+ const qreal y2 = path.elementAt(2).y;
+
+ if (path.elementAt(1).y != y1)
+ return false;
+
+ if (path.elementAt(2).x != x2)
+ return false;
+
+ if (path.elementAt(3).x != x1 || path.elementAt(3).y != y2)
+ return false;
+
+ if (path.elementAt(4).x != x1 || path.elementAt(4).y != y1)
+ return false;
+
+ if (rect)
+ *rect = QRectF(QPointF(x1, y1), QPointF(x2, y2));
+
+ return true;
+}
+
+#endif
+
void QVGPaintEngine::clip(const QPainterPath &path, Qt::ClipOperation op)
{
#if !defined(QVG_NO_RENDER_TO_MASK)
Q_D(QVGPaintEngine);
+ // If the path is a simple rectangle, then use clip(QRect) instead.
+ QRectF simpleRect;
+ if (qt_vg_pathToRect(path, &simpleRect)) {
+ clip(simpleRect.toRect(), op);
+ return;
+ }
+
d->dirty |= QPaintEngine::DirtyClipRegion;
if (op == Qt::NoClip) {
@@ -1765,7 +1910,7 @@ void QVGPaintEnginePrivate::ensureMask
maskRect = QRect();
} else {
vgMask(VG_INVALID_HANDLE, VG_CLEAR_MASK, 0, 0, width, height);
- if (!maskRect.isNull()) {
+ if (maskRect.isValid()) {
vgMask(VG_INVALID_HANDLE, VG_FILL_MASK,
maskRect.x(), height - maskRect.y() - maskRect.height(),
maskRect.width(), maskRect.height());
@@ -1797,6 +1942,27 @@ void QVGPaintEnginePrivate::modifyMask
maskIsSet = false;
}
+void QVGPaintEnginePrivate::modifyMask
+ (QVGPaintEngine *engine, VGMaskOperation op, const QRect& rect)
+{
+ QPaintDevice *pdev = engine->paintDevice();
+ int width = pdev->width();
+ int height = pdev->height();
+
+ if (!maskValid)
+ ensureMask(engine, width, height);
+
+ if (rect.isValid()) {
+ vgMask(VG_INVALID_HANDLE, op,
+ rect.x(), height - rect.y() - rect.height(),
+ rect.width(), rect.height());
+ }
+
+ vgSeti(VG_MASKING, VG_TRUE);
+ maskValid = true;
+ maskIsSet = false;
+}
+
#endif // !QVG_SCISSOR_CLIP
void QVGPaintEngine::updateScissor()
@@ -1892,6 +2058,16 @@ bool QVGPaintEngine::isDefaultClipRegion(const QRegion& region)
rect.width() == width && rect.height() == height);
}
+bool QVGPaintEngine::isDefaultClipRect(const QRect& rect)
+{
+ QPaintDevice *pdev = paintDevice();
+ int width = pdev->width();
+ int height = pdev->height();
+
+ return (rect.x() == 0 && rect.y() == 0 &&
+ rect.width() == width && rect.height() == height);
+}
+
void QVGPaintEngine::clipEnabledChanged()
{
#if defined(QVG_SCISSOR_CLIP)
diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h
index a390c80..bde06e5 100644
--- a/src/openvg/qpaintengine_vg_p.h
+++ b/src/openvg/qpaintengine_vg_p.h
@@ -154,6 +154,7 @@ private:
void updateScissor();
QRegion defaultClipRegion();
bool isDefaultClipRegion(const QRegion& region);
+ bool isDefaultClipRect(const QRect& rect);
bool clearRect(const QRectF &rect, const QColor &color);
};
diff --git a/src/plugins/accessible/compat/q3complexwidgets.cpp b/src/plugins/accessible/compat/q3complexwidgets.cpp
index 696bc99..b911d5e 100644
--- a/src/plugins/accessible/compat/q3complexwidgets.cpp
+++ b/src/plugins/accessible/compat/q3complexwidgets.cpp
@@ -274,7 +274,7 @@ QString Q3AccessibleTitleBar::text(Text t, int child) const
return Q3TitleBar::tr("Contains commands to manipulate the window");
case 3:
if (window && window->isMinimized())
- return Q3TitleBar::tr("Puts a minimized back to normal");
+ return Q3TitleBar::tr("Puts a minimized window back to normal");
return Q3TitleBar::tr("Moves the window out of the way");
case 4:
if (window && window->isMaximized())
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
index 15fb6f4..694ba51 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
@@ -101,7 +101,7 @@ QDirectFBMouseHandlerPrivate::QDirectFBMouseHandlerPrivate(QDirectFBMouseHandler
#endif
DFBInputDeviceCapabilities caps;
- caps = DFBInputDeviceCapabilities(DICAPS_BUTTONS | DICAPS_AXES);
+ caps = DICAPS_BUTTONS | DICAPS_AXES;
result = fb->CreateInputEventBuffer(fb, caps, DFB_TRUE, &eventBuffer);
if (result != DFB_OK) {
DirectFBError("QDirectFBMouseHandler: "
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
index 905fec3..86e92f7 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
@@ -56,20 +56,17 @@ IDirectFBSurface *QDirectFBPaintDevice::directFBSurface() const
}
-void QDirectFBPaintDevice::lockDirectFB(uint flags)
+void QDirectFBPaintDevice::lockDirectFB(DFBSurfaceLockFlags flags)
{
if (!(lock & flags)) {
if (lock)
unlockDirectFB();
- if ((mem = QDirectFBScreen::lockSurface(dfbSurface, flags, &bpl))) {
- const QSize s = size();
- lockedImage = new QImage(mem, s.width(), s.height(), bpl,
- QDirectFBScreen::getImageFormat(dfbSurface));
- lock = flags;
- Q_ASSERT(mem);
- } else {
- lock = 0;
- }
+ mem = QDirectFBScreen::lockSurface(dfbSurface, flags, &bpl);
+ Q_ASSERT(mem);
+ const QSize s = size();
+ lockedImage = new QImage(mem, s.width(), s.height(), bpl,
+ QDirectFBScreen::getImageFormat(dfbSurface));
+ lock = flags;
}
}
@@ -83,17 +80,12 @@ void QDirectFBPaintDevice::unlockDirectFB()
delete lockedImage;
lockedImage = 0;
mem = 0;
- lock = 0;
+ lock = DFBSurfaceLockFlags(0);
}
void *QDirectFBPaintDevice::memory() const
{
- if (lock != (DSLF_READ|DSLF_WRITE)) {
- QDirectFBPaintDevice *that = const_cast<QDirectFBPaintDevice*>(this);
- that->lockDirectFB(DSLF_READ|DSLF_WRITE);
- Q_ASSERT(that->lockedImage);
- }
return mem;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
index 32c49bb..248a15b 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
@@ -51,14 +51,14 @@ QT_BEGIN_HEADER
QT_MODULE(Gui)
// Inherited by both window surface and pixmap
-class QDirectFBPaintDevice : public QCustomRasterPaintDevice
+ class QDirectFBPaintDevice : public QCustomRasterPaintDevice
{
public:
~QDirectFBPaintDevice();
IDirectFBSurface *directFBSurface() const;
- void lockDirectFB(uint flags);
+ void lockDirectFB(DFBSurfaceLockFlags lock);
void unlockDirectFB();
// Reimplemented from QCustomRasterPaintDevice:
@@ -67,16 +67,12 @@ public:
int bytesPerLine() const;
QSize size() const;
int metric(QPaintDevice::PaintDeviceMetric metric) const;
- uint lockFlags() const { return lock; }
+ DFBSurfaceLockFlags lockFlags() const { return lock; }
protected:
// Shouldn't create QDirectFBPaintDevice by itself but only sub-class it:
QDirectFBPaintDevice(QDirectFBScreen *scr = QDirectFBScreen::instance())
- : QCustomRasterPaintDevice(0),
- dfbSurface(0),
- lockedImage(0),
- screen(scr),
- lock(0),
- mem(0)
+ : QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), screen(scr),
+ lock(DFBSurfaceLockFlags(0)), mem(0)
{}
inline int dotsPerMeterX() const
@@ -92,11 +88,11 @@ protected:
QImage *lockedImage;
QDirectFBScreen *screen;
int bpl;
- uint lock;
+ DFBSurfaceLockFlags lock;
uchar *mem;
private:
Q_DISABLE_COPY(QDirectFBPaintDevice)
-};
+ };
QT_END_HEADER
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 3185664..94f1aeb 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -54,170 +54,22 @@
#include <private/qpixmapdata_p.h>
#include <private/qpixmap_raster_p.h>
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
-#define VOID_ARG() static_cast<bool>(false)
-enum PaintOperation {
- DRAW_RECTS = 0x0001,
- DRAW_LINES = 0x0002,
- DRAW_IMAGE = 0x0004,
- DRAW_PIXMAP = 0x0008,
- DRAW_TILED_PIXMAP = 0x0010,
- STROKE_PATH = 0x0020,
- DRAW_PATH = 0x0040,
- DRAW_POINTS = 0x0080,
- DRAW_ELLIPSE = 0x0100,
- DRAW_POLYGON = 0x0200,
- DRAW_TEXT = 0x0400,
- FILL_PATH = 0x0800,
- FILL_RECT = 0x1000,
- DRAW_COLORSPANS = 0x2000,
- ALL = 0xffff
-};
-#endif
-
-#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
-template <typename T> inline const T *ptr(const T &t) { return &t; }
-template <> inline const bool* ptr<bool>(const bool &) { return 0; }
-template <typename device, typename T1, typename T2, typename T3>
-static void rasterFallbackWarn(const char *msg, const char *func, const device *dev,
- int scale, bool matrixRotShear, bool simplePen,
- bool dfbHandledClip,
- const char *nameOne, const T1 &one,
- const char *nameTwo, const T2 &two,
- const char *nameThree, const T3 &three)
-{
- QString out;
- QDebug dbg(&out);
- dbg << msg << (QByteArray(func) + "()") << "painting on";
- if (dev->devType() == QInternal::Widget) {
- dbg << static_cast<const QWidget*>(dev);
- } else {
- dbg << dev << "of type" << dev->devType();
- }
-
- dbg << "scale" << scale
- << "matrixRotShear" << matrixRotShear
- << "simplePen" << simplePen
- << "dfbHandledClip" << dfbHandledClip;
-
- const T1 *t1 = ptr(one);
- const T2 *t2 = ptr(two);
- const T3 *t3 = ptr(three);
-
- if (t1) {
- dbg << nameOne << *t1;
- if (t2) {
- dbg << nameTwo << *t2;
- if (t3) {
- dbg << nameThree << *t3;
- }
- }
- }
- qWarning("%s", qPrintable(out));
-}
-#endif
-
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
-#define RASTERFALLBACK(op, one, two, three) \
- if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \
- rasterFallbackWarn("Disabled raster engine operation", \
- __FUNCTION__, state()->painter->device(), \
- d_func()->scale, d_func()->matrixRotShear, \
- d_func()->simplePen, d_func()->dfbCanHandleClip(), \
- #one, one, #two, two, #three, three); \
- if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \
- return;
-#elif defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
-#define RASTERFALLBACK(op, one, two, three) \
- if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \
- return;
-#elif defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
-#define RASTERFALLBACK(op, one, two, three) \
- if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \
- rasterFallbackWarn("Falling back to raster engine for", \
- __FUNCTION__, state()->painter->device(), \
- d_func()->scale, d_func()->matrixRotShear, \
- d_func()->simplePen, d_func()->dfbCanHandleClip(), \
- #one, one, #two, two, #three, three);
-#else
-#define RASTERFALLBACK(op, one, two, three)
-#endif
-
-static inline uint ALPHA_MUL(uint x, uint a)
-{
- uint t = x * a;
- t = ((t + (t >> 8) + 0x80) >> 8) & 0xff;
- return t;
-}
-
-class SurfaceCache
-{
-public:
- SurfaceCache() : surface(0), buffer(0), bufsize(0) {}
- ~SurfaceCache() { clear(); }
-
-
- IDirectFBSurface *getSurface(const uint *buf, int size)
- {
- if (buffer == buf && bufsize == size)
- return surface;
-
- clear();
-
- const DFBSurfaceDescription description = QDirectFBScreen::getSurfaceDescription(buf, size);
- surface = QDirectFBScreen::instance()->createDFBSurface(description, QDirectFBScreen::TrackSurface);
- if (!surface)
- qWarning("QDirectFBPaintEngine: SurfaceCache: Unable to create surface");
-
- buffer = const_cast<uint*>(buf);
- bufsize = size;
-
- return surface;
- }
-
- void clear()
- {
- if (surface && QDirectFBScreen::instance())
- QDirectFBScreen::instance()->releaseDFBSurface(surface);
- surface = 0;
- buffer = 0;
- bufsize = 0;
- }
-private:
- IDirectFBSurface *surface;
- uint *buffer;
- int bufsize;
-};
-
-
-#ifdef QT_DIRECTFB_IMAGECACHE
-#include <private/qimage_p.h>
-struct CachedImage
-{
- IDirectFBSurface *surface;
- ~CachedImage()
- {
- if (surface && QDirectFBScreen::instance()) {
- QDirectFBScreen::instance()->releaseDFBSurface(surface);
- }
- }
-};
-static QCache<qint64, CachedImage> imageCache(4*1024*1024); // 4 MB
-#endif
-
+class SurfaceCache;
class QDirectFBPaintEnginePrivate : public QRasterPaintEnginePrivate
{
public:
- enum Scale { NoScale, Scaled, NegativeScale };
-
+ enum TransformationTypeFlags {
+ NegativeScale = 0x100,
+ RectsUnsupported = (QTransform::TxRotate|QTransform::TxShear|QTransform::TxProject),
+ BlitUnsupported = (NegativeScale|RectsUnsupported)
+ };
QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p);
~QDirectFBPaintEnginePrivate();
- void setTransform(const QTransform &m);
- void setPen(const QPen &pen);
+ inline void setTransform(const QTransform &transforma);
+ inline void setPen(const QPen &pen);
inline void setCompositionMode(QPainter::CompositionMode mode);
- inline void setOpacity(quint8 value);
- void setRenderHints(QPainter::RenderHints hints);
+ inline void setRenderHints(QPainter::RenderHints hints);
inline void setDFBColor(const QColor &color);
@@ -229,23 +81,11 @@ public:
inline bool dfbCanHandleClip() const;
inline bool isSimpleBrush(const QBrush &brush) const;
- void drawLines(const QLine *lines, int count);
- void drawLines(const QLineF *lines, int count);
-
- void fillRegion(const QRegion &r);
- void fillRects(const QRect *rects, int count);
- void drawRects(const QRect *rects, int count);
- void fillRects(const QRectF *rects, int count);
- void drawRects(const QRectF *rects, int count);
-
- void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap);
+ void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos);
void blit(const QRectF &dest, IDirectFBSurface *surface, const QRectF &src);
inline void updateClip();
- void systemStateChanged();
-
- void begin(QPaintDevice *device);
- void end();
+ virtual void systemStateChanged();
static IDirectFBSurface *getSurface(const QImage &img, bool *release);
@@ -257,22 +97,14 @@ public:
private:
IDirectFBSurface *surface;
- QPen pen;
-
bool antialiased;
-
bool simplePen;
- bool matrixRotShear;
- Scale scale;
+ uint transformationType; // this is QTransform::type() + NegativeScale if qMin(transform.m11(), transform.m22()) < 0
SurfaceCache *surfaceCache;
- QTransform transform;
- int lastLockedHeight;
IDirectFB *fb;
- int fbWidth;
- int fbHeight;
quint8 opacity;
@@ -280,13 +112,97 @@ private:
bool dfbHandledClip;
bool ignoreSystemClip;
QDirectFBPaintDevice *dfbDevice;
- void *lockedMemory;
bool unsupportedCompositionMode;
QDirectFBPaintEngine *q;
+ QRect currentClip;
friend class QDirectFBPaintEngine;
};
+class SurfaceCache
+{
+public:
+ SurfaceCache() : surface(0), buffer(0), bufsize(0) {}
+ ~SurfaceCache() { clear(); }
+ IDirectFBSurface *getSurface(const uint *buf, int size);
+ void clear();
+private:
+ IDirectFBSurface *surface;
+ uint *buffer;
+ int bufsize;
+};
+
+
+#ifdef QT_DIRECTFB_IMAGECACHE
+#include <private/qimage_p.h>
+struct CachedImage
+{
+ IDirectFBSurface *surface;
+ ~CachedImage()
+ {
+ if (surface && QDirectFBScreen::instance()) {
+ QDirectFBScreen::instance()->releaseDFBSurface(surface);
+ }
+ }
+};
+static QCache<qint64, CachedImage> imageCache(4*1024*1024); // 4 MB
+#endif
+
+#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
+#define VOID_ARG() static_cast<bool>(false)
+enum PaintOperation {
+ DRAW_RECTS = 0x0001, DRAW_LINES = 0x0002, DRAW_IMAGE = 0x0004,
+ DRAW_PIXMAP = 0x0008, DRAW_TILED_PIXMAP = 0x0010, STROKE_PATH = 0x0020,
+ DRAW_PATH = 0x0040, DRAW_POINTS = 0x0080, DRAW_ELLIPSE = 0x0100,
+ DRAW_POLYGON = 0x0200, DRAW_TEXT = 0x0400, FILL_PATH = 0x0800,
+ FILL_RECT = 0x1000, DRAW_COLORSPANS = 0x2000, ALL = 0xffff
+};
+#endif
+
+#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
+template <typename device, typename T1, typename T2, typename T3>
+static void rasterFallbackWarn(const char *msg, const char *, const device *, uint, bool, bool, bool,
+ const char *, const T1 &, const char *, const T2 &, const char *, const T3 &);
+#endif
+
+#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
+#define RASTERFALLBACK(op, one, two, three) \
+ if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \
+ rasterFallbackWarn("Disabled raster engine operation", \
+ __FUNCTION__, state()->painter->device(), \
+ d_func()->transformationType, \
+ d_func()->simplePen, \
+ d_func()->dfbCanHandleClip(), \
+ d_func()->unsupportedCompositionMode, \
+ #one, one, #two, two, #three, three); \
+ if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \
+ return;
+#elif defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
+#define RASTERFALLBACK(op, one, two, three) \
+ if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \
+ return;
+#elif defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
+#define RASTERFALLBACK(op, one, two, three) \
+ if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \
+ rasterFallbackWarn("Falling back to raster engine for", \
+ __FUNCTION__, state()->painter->device(), \
+ d_func()->transformationType, \
+ d_func()->simplePen, \
+ d_func()->dfbCanHandleClip(), \
+ d_func()->unsupportedCompositionMode, \
+ #one, one, #two, two, #three, three);
+#else
+#define RASTERFALLBACK(op, one, two, three)
+#endif
+
+
+template <class T>
+static inline void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface);
+template <class T>
+static inline void fillRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface);
+template <class T>
+static inline void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface);
+
QDirectFBPaintEngine::QDirectFBPaintEngine(QPaintDevice *device)
: QRasterPaintEngine(*(new QDirectFBPaintEnginePrivate(this)), device)
{
@@ -299,19 +215,39 @@ QDirectFBPaintEngine::~QDirectFBPaintEngine()
bool QDirectFBPaintEngine::begin(QPaintDevice *device)
{
Q_D(QDirectFBPaintEngine);
- d->begin(device);
- const bool status = QRasterPaintEngine::begin(device);
+ if (device->devType() == QInternal::CustomRaster) {
+ d->dfbDevice = static_cast<QDirectFBPaintDevice*>(device);
+ } else if (device->devType() == QInternal::Pixmap) {
+ QPixmapData *data = static_cast<QPixmap*>(device)->pixmapData();
+ Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
+ QDirectFBPixmapData *dfbPixmapData = static_cast<QDirectFBPixmapData*>(data);
+ d->dfbDevice = static_cast<QDirectFBPaintDevice*>(dfbPixmapData);
+ }
+
+ if (d->dfbDevice)
+ d->surface = d->dfbDevice->directFBSurface();
+
+ if (!d->surface) {
+ qFatal("QDirectFBPaintEngine used on an invalid device: 0x%x",
+ device->devType());
+ }
- // XXX: QRasterPaintEngine::begin() resets the capabilities
- gccaps |= PorterDuff;
+ d->prepare(d->dfbDevice);
- return status;
+ return QRasterPaintEngine::begin(device);
}
bool QDirectFBPaintEngine::end()
{
Q_D(QDirectFBPaintEngine);
- d->end();
+ d->unlock();
+ d->dfbDevice = 0;
+#if (Q_DIRECTFB_VERSION >= 0x010000)
+ d->surface->ReleaseSource(d->surface);
+#endif
+ d->currentClip = QRect();
+ d->surface->SetClip(d->surface, NULL);
+ d->surface = 0;
return QRasterPaintEngine::end();
}
@@ -333,7 +269,7 @@ void QDirectFBPaintEngine::penChanged()
void QDirectFBPaintEngine::opacityChanged()
{
Q_D(QDirectFBPaintEngine);
- d->setOpacity(quint8(state()->opacity * 255));
+ d->opacity = quint8(state()->opacity * 255);
QRasterPaintEngine::opacityChanged();
}
@@ -354,32 +290,26 @@ void QDirectFBPaintEngine::renderHintsChanged()
void QDirectFBPaintEngine::transformChanged()
{
Q_D(QDirectFBPaintEngine);
- const QDirectFBPaintEnginePrivate::Scale old = d->scale;
- d->setTransform(state()->transform());
- if (d->scale != old) {
- d->setPen(state()->pen);
- }
+ d->setTransform(state()->matrix);
QRasterPaintEngine::transformChanged();
}
-void QDirectFBPaintEngine::setState(QPainterState *s)
+void QDirectFBPaintEngine::setState(QPainterState *state)
{
Q_D(QDirectFBPaintEngine);
- QRasterPaintEngine::setState(s);
+ QRasterPaintEngine::setState(state);
d->dirtyClip = true;
- d->setPen(state()->pen);
- d->setOpacity(quint8(state()->opacity * 255));
- d->setCompositionMode(state()->compositionMode());
- d->setTransform(state()->transform());
+ d->setPen(state->pen);
+ d->opacity = quint8(state->opacity * 255);
+ d->setCompositionMode(state->compositionMode());
+ d->setTransform(state->transform());
+ d->setRenderHints(state->renderHints);
}
void QDirectFBPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
{
Q_D(QDirectFBPaintEngine);
d->dirtyClip = true;
- const QPoint bottom = d->transform.map(QPoint(0, int(path.controlPointRect().bottom())));
- if (bottom.y() > d->lastLockedHeight)
- d->lock();
QRasterPaintEngine::clip(path, op);
}
@@ -387,12 +317,6 @@ void QDirectFBPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
{
Q_D(QDirectFBPaintEngine);
d->dirtyClip = true;
- if (d->clip() && !d->clip()->hasRectClip && d->clip()->enabled) {
- const QPoint bottom = d->transform.map(QPoint(0, rect.bottom()));
- if (bottom.y() > d->lastLockedHeight)
- d->lock();
- }
-
QRasterPaintEngine::clip(rect, op);
}
@@ -401,8 +325,11 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
Q_D(QDirectFBPaintEngine);
d->updateClip();
const QBrush &brush = state()->brush;
- if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear
- || !d->simplePen || !d->isSimpleBrush(brush)) {
+ if (d->unsupportedCompositionMode
+ || (d->transformationType & QDirectFBPaintEnginePrivate::RectsUnsupported)
+ || !d->simplePen
+ || !d->dfbCanHandleClip()
+ || !d->isSimpleBrush(brush)) {
RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawRects(rects, rectCount);
@@ -413,11 +340,12 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
if (brush != Qt::NoBrush) {
d->setDFBColor(brush.color());
- d->fillRects(rects, rectCount);
+ ::fillRects<QRect>(rects, rectCount, state()->matrix, d->surface);
}
- if (d->pen != Qt::NoPen) {
- d->setDFBColor(d->pen.color());
- d->drawRects(rects, rectCount);
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
+ d->setDFBColor(pen.color());
+ ::drawRects<QRect>(rects, rectCount, state()->matrix, d->surface);
}
}
@@ -426,8 +354,11 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
Q_D(QDirectFBPaintEngine);
d->updateClip();
const QBrush &brush = state()->brush;
- if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear
- || !d->simplePen || !d->isSimpleBrush(brush)) {
+ if (d->unsupportedCompositionMode
+ || (d->transformationType & QDirectFBPaintEnginePrivate::RectsUnsupported)
+ || !d->simplePen
+ || !d->dfbCanHandleClip()
+ || !d->isSimpleBrush(brush)) {
RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawRects(rects, rectCount);
@@ -438,11 +369,12 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
if (brush != Qt::NoBrush) {
d->setDFBColor(brush.color());
- d->fillRects(rects, rectCount);
+ ::fillRects<QRectF>(rects, rectCount, state()->matrix, d->surface);
}
- if (d->pen != Qt::NoPen) {
- d->setDFBColor(d->pen.color());
- d->drawRects(rects, rectCount);
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
+ d->setDFBColor(pen.color());
+ ::drawRects<QRectF>(rects, rectCount, state()->matrix, d->surface);
}
}
@@ -457,10 +389,11 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
return;
}
- if (d->pen != Qt::NoPen) {
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
d->unlock();
- d->setDFBColor(d->pen.color());
- d->drawLines(lines, lineCount);
+ d->setDFBColor(pen.color());
+ ::drawLines<QLine>(lines, lineCount, state()->matrix, d->surface);
}
}
@@ -475,10 +408,11 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount)
return;
}
- if (d->pen != Qt::NoPen) {
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
d->unlock();
- d->setDFBColor(d->pen.color());
- d->drawLines(lines, lineCount);
+ d->setDFBColor(pen.color());
+ ::drawLines<QLineF>(lines, lineCount, state()->matrix, d->surface);
}
}
@@ -509,8 +443,7 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image,
d->updateClip();
#if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE
if (d->unsupportedCompositionMode
- || d->matrixRotShear
- || d->scale == QDirectFBPaintEnginePrivate::NegativeScale
+ || (d->transformationType & QDirectFBPaintEnginePrivate::BlitUnsupported)
|| !d->dfbCanHandleClip(r)
#ifndef QT_DIRECTFB_IMAGECACHE
|| QDirectFBScreen::getSurfacePixelFormat(image.format()) == DSPF_UNKNOWN
@@ -555,8 +488,9 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap,
RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr);
d->lock();
QRasterPaintEngine::drawPixmap(r, pixmap, sr);
- } else if (d->unsupportedCompositionMode || !d->dfbCanHandleClip(r) || d->matrixRotShear
- || d->scale == QDirectFBPaintEnginePrivate::NegativeScale) {
+ } else if (d->unsupportedCompositionMode
+ || (d->transformationType & QDirectFBPaintEnginePrivate::BlitUnsupported)
+ || !d->dfbCanHandleClip(r)) {
RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr);
const QImage *img = static_cast<QDirectFBPixmapData*>(pixmap.pixmapData())->buffer(DSLF_READ);
d->lock();
@@ -580,30 +514,27 @@ void QDirectFBPaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r,
const QPixmap &pixmap,
- const QPointF &sp)
+ const QPointF &offset)
{
Q_D(QDirectFBPaintEngine);
d->updateClip();
if (pixmap.pixmapData()->classId() != QPixmapData::DirectFBClass) {
- RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), sp);
+ RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset);
d->lock();
- QRasterPaintEngine::drawTiledPixmap(r, pixmap, sp);
- } else if (d->unsupportedCompositionMode || !d->dfbCanHandleClip(r) || d->matrixRotShear || !sp.isNull()
- || d->scale == QDirectFBPaintEnginePrivate::NegativeScale) {
- RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), sp);
+ QRasterPaintEngine::drawTiledPixmap(r, pixmap, offset);
+ } else if (d->unsupportedCompositionMode
+ || (d->transformationType & QDirectFBPaintEnginePrivate::BlitUnsupported)
+ || !d->dfbCanHandleClip(r)) {
+ RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset);
const QImage *img = static_cast<QDirectFBPixmapData*>(pixmap.pixmapData())->buffer(DSLF_READ);
d->lock();
QRasterPixmapData *data = new QRasterPixmapData(QPixmapData::PixmapType);
data->fromImage(*img, Qt::AutoColor);
const QPixmap pix(data);
- QRasterPaintEngine::drawTiledPixmap(r, pix, sp);
+ QRasterPaintEngine::drawTiledPixmap(r, pix, offset);
} else {
d->unlock();
- QPixmapData *data = pixmap.pixmapData();
- Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
- QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data);
- dfbData->unlockDirectFB();
- d->drawTiledPixmap(r, pixmap);
+ d->drawTiledPixmap(r, pixmap, offset);
}
}
@@ -688,7 +619,9 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
{
Q_D(QDirectFBPaintEngine);
d->updateClip();
- if (!d->unsupportedCompositionMode && d->dfbCanHandleClip(rect) && !d->matrixRotShear) {
+ if (!d->unsupportedCompositionMode
+ && !(d->transformationType & (QDirectFBPaintEnginePrivate::RectsUnsupported))
+ && d->dfbCanHandleClip(rect)) {
switch (brush.style()) {
case Qt::SolidPattern: {
const QColor color = brush.color();
@@ -696,18 +629,21 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
return;
d->unlock();
d->setDFBColor(color);
- const QRect r = d->transform.mapRect(rect).toRect();
+ const QRect r = state()->matrix.mapRect(rect).toRect();
d->surface->FillRectangle(d->surface, r.x(), r.y(),
r.width(), r.height());
return; }
- case Qt::TexturePattern:
- if (state()->brushOrigin == QPointF() && brush.transform().isIdentity()) {
- //could handle certain types of brush.transform() E.g. scale
- d->unlock();
- d->drawTiledPixmap(rect, brush.texture());
- return;
- }
- break;
+ case Qt::TexturePattern: {
+ if (d->transformationType & QDirectFBPaintEnginePrivate::NegativeScale)
+ break;
+
+ const QPixmap texture = brush.texture();
+ if (texture.pixmapData()->classId() != QPixmapData::DirectFBClass)
+ break;
+
+ d->unlock();
+ d->drawTiledPixmap(rect, texture, rect.topLeft() - state()->brushOrigin);
+ return; }
default:
break;
}
@@ -723,51 +659,21 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color)
return;
Q_D(QDirectFBPaintEngine);
d->updateClip();
- if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear) {
+ if (d->unsupportedCompositionMode
+ || (d->transformationType & QDirectFBPaintEnginePrivate::RectsUnsupported)
+ || !d->dfbCanHandleClip()) {
RASTERFALLBACK(FILL_RECT, rect, color, VOID_ARG());
d->lock();
QRasterPaintEngine::fillRect(rect, color);
} else {
d->unlock();
d->setDFBColor(color);
- const QRect r = d->transform.mapRect(rect).toRect();
+ const QRect r = state()->matrix.mapRect(rect).toRect();
d->surface->FillRectangle(d->surface, r.x(), r.y(),
r.width(), r.height());
}
}
-void QDirectFBPaintEngine::drawColorSpans(const QSpan *spans, int count,
- uint color)
-{
- Q_D(QDirectFBPaintEngine);
- color = INV_PREMUL(color);
-
- QVarLengthArray<DFBRegion> lines(count);
- int j = 0;
- for (int i = 0; i < count; ++i) {
- if (spans[i].coverage == 255) {
- lines[j].x1 = spans[i].x;
- lines[j].y1 = spans[i].y;
- lines[j].x2 = spans[i].x + spans[i].len - 1;
- lines[j].y2 = spans[i].y;
- ++j;
- } else {
- DFBSpan span = { spans[i].x, spans[i].len };
- uint c = BYTE_MUL(color, spans[i].coverage);
- // ### how does this play with setDFBColor
- d->surface->SetColor(d->surface,
- qRed(c), qGreen(c), qBlue(c), qAlpha(c));
- d->surface->FillSpans(d->surface, spans[i].y, &span, 1);
- }
- }
- if (j > 0) {
- d->surface->SetColor(d->surface,
- qRed(color), qGreen(color), qBlue(color),
- qAlpha(color));
- d->surface->DrawLines(d->surface, lines.data(), j);
- }
-}
-
void QDirectFBPaintEngine::drawBufferSpan(const uint *buffer, int bufsize,
int x, int y, int length,
uint const_alpha)
@@ -801,9 +707,8 @@ void QDirectFBPaintEngine::initImageCache(int size)
QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p)
: surface(0), antialiased(false), simplePen(false),
- matrixRotShear(false), scale(NoScale), lastLockedHeight(-1),
- fbWidth(-1), fbHeight(-1), opacity(255), dirtyClip(true),
- dfbHandledClip(false), dfbDevice(0), lockedMemory(0),
+ transformationType(0), opacity(255), dirtyClip(true),
+ dfbHandledClip(false), dfbDevice(0),
unsupportedCompositionMode(false), q(p)
{
fb = QDirectFBScreen::instance()->dfb();
@@ -844,12 +749,9 @@ void QDirectFBPaintEnginePrivate::lock()
// lock so we need to call the base implementation of prepare so
// it updates its rasterBuffer to point to the new buffer address.
Q_ASSERT(dfbDevice);
- if (dfbDevice->lockFlags() != (DSLF_WRITE|DSLF_READ)
- || dfbDevice->height() != lastLockedHeight
- || dfbDevice->memory() != lockedMemory) {
+ if (dfbDevice->lockFlags() != (DSLF_WRITE|DSLF_READ)) {
+ dfbDevice->lockDirectFB(DSLF_READ|DSLF_WRITE);
prepare(dfbDevice);
- lastLockedHeight = dfbDevice->height();
- lockedMemory = dfbDevice->memory();
}
}
@@ -857,74 +759,26 @@ void QDirectFBPaintEnginePrivate::unlock()
{
Q_ASSERT(dfbDevice);
dfbDevice->unlockDirectFB();
- lockedMemory = 0;
}
-void QDirectFBPaintEnginePrivate::setTransform(const QTransform &m)
+void QDirectFBPaintEnginePrivate::setTransform(const QTransform &transform)
{
- transform = m;
- matrixRotShear = (transform.m12() != 0 || transform.m21() != 0);
+ transformationType = transform.type();
if (qMin(transform.m11(), transform.m22()) < 0) {
- scale = NegativeScale;
- } else if (transform.m11() != 1 || transform.m22() != 1) {
- scale = Scaled;
- } else {
- scale = NoScale;
- }
-}
-
-void QDirectFBPaintEnginePrivate::begin(QPaintDevice *device)
-{
- lastLockedHeight = -1;
- if (device->devType() == QInternal::CustomRaster)
- dfbDevice = static_cast<QDirectFBPaintDevice*>(device);
- else if (device->devType() == QInternal::Pixmap) {
- QPixmapData *data = static_cast<QPixmap*>(device)->pixmapData();
- Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
- QDirectFBPixmapData* dfbPixmapData = static_cast<QDirectFBPixmapData*>(data);
- dfbDevice = static_cast<QDirectFBPaintDevice*>(dfbPixmapData);
- }
-
- if (dfbDevice)
- surface = dfbDevice->directFBSurface();
-
- if (!surface) {
- qFatal("QDirectFBPaintEngine used on an invalid device: 0x%x",
- device->devType());
+ transformationType |= QDirectFBPaintEnginePrivate::NegativeScale;
}
- lockedMemory = 0;
-
- surface->GetSize(surface, &fbWidth, &fbHeight);
-
- setTransform(QTransform());
- antialiased = false;
- setOpacity(255);
- setCompositionMode(q->state()->compositionMode());
- dirtyClip = true;
setPen(q->state()->pen);
}
-void QDirectFBPaintEnginePrivate::end()
+void QDirectFBPaintEnginePrivate::setPen(const QPen &pen)
{
- lockedMemory = 0;
- dfbDevice = 0;
-#if (Q_DIRECTFB_VERSION >= 0x010000)
- surface->ReleaseSource(surface);
-#endif
- surface->SetClip(surface, NULL);
- surface = 0;
-}
-
-void QDirectFBPaintEnginePrivate::setPen(const QPen &p)
-{
- pen = p;
if (pen.style() == Qt::NoPen) {
simplePen = true;
} else if (pen.style() == Qt::SolidLine
&& !antialiased
&& pen.brush().style() == Qt::SolidPattern
&& pen.widthF() <= 1.0
- && (scale == NoScale || pen.isCosmetic())) {
+ && (transformationType < QTransform::TxScale || pen.isCosmetic())) {
simplePen = true;
} else {
simplePen = false;
@@ -936,12 +790,6 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
unsupportedCompositionMode = (mode != QPainter::CompositionMode_SourceOver);
}
-
-void QDirectFBPaintEnginePrivate::setOpacity(quint8 op)
-{
- opacity = op;
-}
-
void QDirectFBPaintEnginePrivate::setRenderHints(QPainter::RenderHints hints)
{
const bool old = antialiased;
@@ -961,6 +809,13 @@ void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha)
surface->SetBlittingFlags(surface, DFBSurfaceBlittingFlags(blittingFlags));
}
+static inline uint ALPHA_MUL(uint x, uint a)
+{
+ uint t = x * a;
+ t = ((t + (t >> 8) + 0x80) >> 8) & 0xff;
+ return t;
+}
+
void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color)
{
Q_ASSERT(surface);
@@ -971,67 +826,6 @@ void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color)
surface->SetDrawingFlags(surface, alpha == 255 ? DSDRAW_NOFX : DSDRAW_BLEND);
}
-void QDirectFBPaintEnginePrivate::drawLines(const QLine *lines, int n)
-{
- for (int i = 0; i < n; ++i) {
- const QLine l = transform.map(lines[i]);
- surface->DrawLine(surface, l.x1(), l.y1(), l.x2(), l.y2());
- }
-}
-
-void QDirectFBPaintEnginePrivate::drawLines(const QLineF *lines, int n)
-{
- for (int i = 0; i < n; ++i) {
- const QLine l = transform.map(lines[i]).toLine();
- surface->DrawLine(surface, l.x1(), l.y1(), l.x2(), l.y2());
- }
-}
-
-void QDirectFBPaintEnginePrivate::fillRegion(const QRegion &region)
-{
- Q_ASSERT(isSimpleBrush(q->state()->brush));
- setDFBColor(q->state()->brush.color());
- const QVector<QRect> rects = region.rects();
- const int n = rects.size();
- fillRects(rects.constData(), n);
-}
-
-void QDirectFBPaintEnginePrivate::fillRects(const QRect *rects, int n)
-{
- for (int i = 0; i < n; ++i) {
- const QRect r = transform.mapRect(rects[i]);
- surface->FillRectangle(surface, r.x(), r.y(),
- r.width(), r.height());
- }
-}
-
-void QDirectFBPaintEnginePrivate::fillRects(const QRectF *rects, int n)
-{
- for (int i = 0; i < n; ++i) {
- const QRect r = transform.mapRect(rects[i]).toRect();
- surface->FillRectangle(surface, r.x(), r.y(),
- r.width(), r.height());
- }
-}
-
-void QDirectFBPaintEnginePrivate::drawRects(const QRect *rects, int n)
-{
- for (int i = 0; i < n; ++i) {
- const QRect r = transform.mapRect(rects[i]);
- surface->DrawRectangle(surface, r.x(), r.y(),
- r.width() + 1, r.height() + 1);
- }
-}
-
-void QDirectFBPaintEnginePrivate::drawRects(const QRectF *rects, int n)
-{
- for (int i = 0; i < n; ++i) {
- const QRect r = transform.mapRect(rects[i]).toRect();
- surface->DrawRectangle(surface, r.x(), r.y(),
- r.width() + 1, r.height() + 1);
- }
-}
-
IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, bool *release)
{
#ifndef QT_DIRECTFB_IMAGECACHE
@@ -1070,7 +864,9 @@ IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, boo
void QDirectFBPaintEnginePrivate::blit(const QRectF &dest, IDirectFBSurface *s, const QRectF &src)
{
const QRect sr = src.toRect();
- const QRect dr = transform.mapRect(dest).toRect();
+ const QRect dr = q->state()->matrix.mapRect(dest).toRect();
+ if (dr.isEmpty())
+ return;
const DFBRectangle sRect = { sr.x(), sr.y(), sr.width(), sr.height() };
DFBResult result;
@@ -1084,55 +880,107 @@ void QDirectFBPaintEnginePrivate::blit(const QRectF &dest, IDirectFBSurface *s,
DirectFBError("QDirectFBPaintEngine::drawPixmap()", result);
}
-void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest,
- const QPixmap &pixmap)
+static inline qreal fixCoord(qreal rect_pos, qreal pixmapSize, qreal offset)
+{
+ qreal pos = rect_pos - offset;
+ while (pos > rect_pos)
+ pos -= pixmapSize;
+ while (pos + pixmapSize < rect_pos)
+ pos += pixmapSize;
+ return pos;
+}
+
+void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &off)
{
+ Q_ASSERT(!dirtyClip);
+ Q_ASSERT(!(transformationType & BlitUnsupported));
+ const QTransform &transform = q->state()->matrix;
+ const QRect destinationRect = transform.mapRect(dest).toRect().normalized();
+ QRect newClip = destinationRect;
+ if (!currentClip.isEmpty())
+ newClip &= currentClip;
+
+ if (newClip.isNull())
+ return;
+
+ const DFBRegion clip = {
+ newClip.x(),
+ newClip.y(),
+ newClip.x() + newClip.width() - 1,
+ newClip.y() + newClip.height() - 1
+ };
+ surface->SetClip(surface, &clip);
+
+ QPointF offset = off;
+ Q_ASSERT(transform.type() <= QTransform::TxScale);
prepareForBlit(pixmap.hasAlphaChannel());
QPixmapData *data = pixmap.pixmapData();
Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data);
- IDirectFBSurface *s = dfbData->directFBSurface();
- const QRect dr = transform.mapRect(dest).toRect();
- DFBResult result = DFB_OK;
-
- if (scale == NoScale && dr == QRect(0, 0, fbWidth, fbHeight)) {
- result = surface->TileBlit(surface, s, 0, 0, 0);
- } else if (scale == NoScale) {
- const int dx = pixmap.width();
- const int dy = pixmap.height();
- const DFBRectangle rect = { 0, 0, dx, dy };
- QVarLengthArray<DFBRectangle> rects;
- QVarLengthArray<DFBPoint> points;
-
- for (int y = dr.y(); y <= dr.bottom(); y += dy) {
- for (int x = dr.x(); x <= dr.right(); x += dx) {
- rects.append(rect);
- const DFBPoint point = { x, y };
- points.append(point);
+ dfbData->unlockDirectFB();
+ const QSize pixmapSize = dfbData->size();
+ IDirectFBSurface *sourceSurface = dfbData->directFBSurface();
+ if (transform.isScaling()) {
+ Q_ASSERT(qMin(transform.m11(), transform.m22()) >= 0);
+ offset.rx() *= transform.m11();
+ offset.ry() *= transform.m22();
+
+ const QSizeF mappedSize(pixmapSize.width() * transform.m11(), pixmapSize.height() * transform.m22());
+ qreal y = ::fixCoord(destinationRect.y(), mappedSize.height(), offset.y());
+ const qreal startX = ::fixCoord(destinationRect.x(), mappedSize.width(), offset.x());
+ while (y <= destinationRect.bottom()) {
+ qreal x = startX;
+ while (x <= destinationRect.right()) {
+ const DFBRectangle destination = { qRound(x), qRound(y), mappedSize.width(), mappedSize.height() };
+ surface->StretchBlit(surface, sourceSurface, 0, &destination);
+ x += mappedSize.width();
}
+ y += mappedSize.height();
}
- result = surface->BatchBlit(surface, s, rects.constData(),
- points.constData(), points.size());
} else {
- const QRect sr = transform.mapRect(QRect(0, 0, pixmap.width(), pixmap.height()));
- const int dx = sr.width();
- const int dy = sr.height();
- const DFBRectangle sRect = { 0, 0, dx, dy };
-
- for (int y = dr.y(); y <= dr.bottom(); y += dy) {
- for (int x = dr.x(); x <= dr.right(); x += dx) {
- const DFBRectangle dRect = { x, y, dx, dy };
- result = surface->StretchBlit(surface, s, &sRect, &dRect);
- if (result != DFB_OK) {
- y = dr.bottom() + 1;
- break;
- }
+ qreal y = ::fixCoord(destinationRect.y(), pixmapSize.height(), offset.y());
+ const qreal startX = ::fixCoord(destinationRect.x(), pixmapSize.width(), offset.x());
+ int horizontal = qMax(1, destinationRect.width() / pixmapSize.width()) + 1;
+ if (startX != destinationRect.x())
+ ++horizontal;
+ int vertical = qMax(1, destinationRect.height() / pixmapSize.height()) + 1;
+ if (y != destinationRect.y())
+ ++vertical;
+
+ const int maxCount = (vertical * horizontal);
+ QVarLengthArray<DFBRectangle, 16> sourceRects(maxCount);
+ QVarLengthArray<DFBPoint, 16> points(maxCount);
+
+ int i = 0;
+ while (y <= destinationRect.bottom()) {
+ Q_ASSERT(i < maxCount);
+ qreal x = startX;
+ while (x <= destinationRect.right()) {
+ points[i].x = qRound(x);
+ points[i].y = qRound(y);
+ sourceRects[i].x = 0;
+ sourceRects[i].y = 0;
+ sourceRects[i].w = int(pixmapSize.width());
+ sourceRects[i].h = int(pixmapSize.height());
+ x += pixmapSize.width();
+ ++i;
}
+ y += pixmapSize.height();
}
+ surface->BatchBlit(surface, sourceSurface, sourceRects.constData(), points.constData(), i);
}
- if (result != DFB_OK)
- DirectFBError("QDirectFBPaintEngine::drawTiledPixmap()", result);
+ if (currentClip.isEmpty()) {
+ surface->SetClip(surface, 0);
+ } else {
+ const DFBRegion clip = {
+ currentClip.x(),
+ currentClip.y(),
+ currentClip.x() + currentClip.width(),
+ currentClip.y() + currentClip.height()
+ };
+ surface->SetClip(surface, &clip);
+ }
}
void QDirectFBPaintEnginePrivate::updateClip()
@@ -1140,6 +988,7 @@ void QDirectFBPaintEnginePrivate::updateClip()
if (!dirtyClip)
return;
+ currentClip = QRect();
const QClipData *clipData = clip();
if (!clipData || !clipData->enabled) {
surface->SetClip(surface, NULL);
@@ -1152,6 +1001,8 @@ void QDirectFBPaintEnginePrivate::updateClip()
clipData->clipRect.y() + clipData->clipRect.height()
};
surface->SetClip(surface, &r);
+ currentClip = clipData->clipRect.normalized();
+ // ### is this guaranteed to always be normalized?
dfbHandledClip = true;
} else if (clipData->hasRegionClip && ignoreSystemClip && clipData->clipRegion == systemClip) {
dfbHandledClip = true;
@@ -1168,4 +1019,126 @@ void QDirectFBPaintEnginePrivate::systemStateChanged()
QRasterPaintEnginePrivate::systemStateChanged();
}
+IDirectFBSurface *SurfaceCache::getSurface(const uint *buf, int size)
+{
+ if (buffer == buf && bufsize == size)
+ return surface;
+
+ clear();
+
+ const DFBSurfaceDescription description = QDirectFBScreen::getSurfaceDescription(buf, size);
+ surface = QDirectFBScreen::instance()->createDFBSurface(description, QDirectFBScreen::TrackSurface);
+ if (!surface)
+ qWarning("QDirectFBPaintEngine: SurfaceCache: Unable to create surface");
+
+ buffer = const_cast<uint*>(buf);
+ bufsize = size;
+
+ return surface;
+}
+
+void SurfaceCache::clear()
+{
+ if (surface && QDirectFBScreen::instance())
+ QDirectFBScreen::instance()->releaseDFBSurface(surface);
+ surface = 0;
+ buffer = 0;
+ bufsize = 0;
+}
+
+
+static inline QRect mapRect(const QTransform &transform, const QRect &rect) { return transform.mapRect(rect); }
+static inline QRect mapRect(const QTransform &transform, const QRectF &rect) { return transform.mapRect(rect).toRect(); }
+static inline QLine map(const QTransform &transform, const QLine &line) { return transform.map(line); }
+static inline QLine map(const QTransform &transform, const QLineF &line) { return transform.map(line).toLine(); }
+template <class T>
+static inline void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface)
+{
+ if (n == 1) {
+ const QLine l = ::map(transform, lines[0]);
+ surface->DrawLine(surface, l.x1(), l.y1(), l.x2(), l.y2());
+ } else {
+ QVarLengthArray<DFBRegion, 32> lineArray(n);
+ for (int i=0; i<n; ++i) {
+ const QLine l = ::map(transform, lines[i]);
+ lineArray[i].x1 = l.x1();
+ lineArray[i].y1 = l.y1();
+ lineArray[i].x2 = l.x2();
+ lineArray[i].y2 = l.y2();
+ }
+ surface->DrawLines(surface, lineArray.constData(), n);
+ }
+}
+
+template <class T>
+static inline void fillRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
+{
+ if (n == 1) {
+ const QRect r = ::mapRect(transform, rects[0]);
+ surface->FillRectangle(surface, r.x(), r.y(), r.width(), r.height());
+ } else {
+ QVarLengthArray<DFBRectangle, 32> rectArray(n);
+ for (int i=0; i<n; ++i) {
+ const QRect r = ::mapRect(transform, rects[i]);
+ rectArray[i].x = r.x();
+ rectArray[i].y = r.y();
+ rectArray[i].w = r.width();
+ rectArray[i].h = r.height();
+ }
+ surface->FillRectangles(surface, rectArray.constData(), n);
+ }
+}
+
+template <class T>
+static inline void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
+{
+ for (int i=0; i<n; ++i) {
+ const QRect r = ::mapRect(transform, rects[i]);
+ surface->DrawRectangle(surface, r.x(), r.y(), r.width(), r.height());
+ }
+}
+
+#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
+template <typename T> inline const T *ptr(const T &t) { return &t; }
+template <> inline const bool* ptr<bool>(const bool &) { return 0; }
+template <typename device, typename T1, typename T2, typename T3>
+static void rasterFallbackWarn(const char *msg, const char *func, const device *dev,
+ uint transformationType, bool simplePen,
+ bool dfbHandledClip, bool unsupportedCompositionMode,
+ const char *nameOne, const T1 &one,
+ const char *nameTwo, const T2 &two,
+ const char *nameThree, const T3 &three)
+{
+ QString out;
+ QDebug dbg(&out);
+ dbg << msg << (QByteArray(func) + "()") << "painting on";
+ if (dev->devType() == QInternal::Widget) {
+ dbg << static_cast<const QWidget*>(dev);
+ } else {
+ dbg << dev << "of type" << dev->devType();
+ }
+
+ dbg << QString("transformationType 0x%1").arg(transformationType, 3, 16, QLatin1Char('0'))
+ << "simplePen" << simplePen
+ << "dfbHandledClip" << dfbHandledClip
+ << "unsupportedCompositionMode" << unsupportedCompositionMode;
+
+ const T1 *t1 = ptr(one);
+ const T2 *t2 = ptr(two);
+ const T3 *t3 = ptr(three);
+
+ if (t1) {
+ dbg << nameOne << *t1;
+ if (t2) {
+ dbg << nameTwo << *t2;
+ if (t3) {
+ dbg << nameThree << *t3;
+ }
+ }
+ }
+ qWarning("%s", qPrintable(out));
+}
+#endif
+
+
#endif // QT_NO_DIRECTFB
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
index 8c5877b..6148b14 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
@@ -56,43 +56,40 @@ class QDirectFBPaintEngine : public QRasterPaintEngine
Q_DECLARE_PRIVATE(QDirectFBPaintEngine)
public:
QDirectFBPaintEngine(QPaintDevice *device);
- ~QDirectFBPaintEngine();
+ virtual ~QDirectFBPaintEngine();
- bool begin(QPaintDevice *device);
- bool end();
+ virtual bool begin(QPaintDevice *device);
+ virtual bool end();
- void drawRects(const QRect *rects, int rectCount);
- void drawRects(const QRectF *rects, int rectCount);
+ virtual void drawRects(const QRect *rects, int rectCount);
+ virtual void drawRects(const QRectF *rects, int rectCount);
- void fillRect(const QRectF &r, const QBrush &brush);
- void fillRect(const QRectF &r, const QColor &color);
+ virtual void fillRect(const QRectF &r, const QBrush &brush);
+ virtual void fillRect(const QRectF &r, const QColor &color);
- void drawLines(const QLine *line, int lineCount);
- void drawLines(const QLineF *line, int lineCount);
+ virtual void drawLines(const QLine *line, int lineCount);
+ virtual void drawLines(const QLineF *line, int lineCount);
- void drawImage(const QPointF &p, const QImage &img);
- void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags falgs = Qt::AutoColor);
+ virtual void drawImage(const QPointF &p, const QImage &img);
+ virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
+ Qt::ImageConversionFlags falgs = Qt::AutoColor);
- void drawPixmap(const QPointF &p, const QPixmap &pm);
- void drawPixmap(const QRectF &r, const QPixmap &pixmap, const QRectF &sr);
- void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr);
+ virtual void drawPixmap(const QPointF &p, const QPixmap &pm);
+ virtual void drawPixmap(const QRectF &r, const QPixmap &pixmap, const QRectF &sr);
+ virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr);
- void drawColorSpans(const QSpan *spans, int count, uint color);
- void drawBufferSpan(const uint *buffer, int bufsize,
- int x, int y, int length, uint const_alpha);
+ virtual void drawBufferSpan(const uint *buffer, int bufsize,
+ int x, int y, int length, uint const_alpha);
-
- // The following methods simply lock the surface & call the base implementation
- void stroke(const QVectorPath &path, const QPen &pen);
- void drawPath(const QPainterPath &path);
- void drawPoints(const QPointF *points, int pointCount);
- void drawPoints(const QPoint *points, int pointCount);
- void drawEllipse(const QRectF &rect);
- void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
- void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode);
- void drawTextItem(const QPointF &p, const QTextItem &textItem);
- void fill(const QVectorPath &path, const QBrush &brush);
+ virtual void stroke(const QVectorPath &path, const QPen &pen);
+ virtual void drawPath(const QPainterPath &path);
+ virtual void drawPoints(const QPointF *points, int pointCount);
+ virtual void drawPoints(const QPoint *points, int pointCount);
+ virtual void drawEllipse(const QRectF &rect);
+ virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
+ virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode);
+ virtual void drawTextItem(const QPointF &p, const QTextItem &textItem);
+ virtual void fill(const QVectorPath &path, const QBrush &brush);
virtual void clipEnabledChanged();
virtual void penChanged();
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index c9d5d7c..52e85ba 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -345,6 +345,10 @@ QImage QDirectFBPixmapData::toImage() const
if (!dfbSurface)
return QImage();
+#if 0
+ // In later versions of DirectFB one can set a flag to tell
+ // DirectFB not to move the surface to videomemory. When that
+ // happens we can use this (hopefully faster) codepath
#ifndef QT_NO_DIRECTFB_PREALLOCATED
QImage ret(w, h, QDirectFBScreen::getImageFormat(dfbSurface));
if (IDirectFBSurface *imgSurface = screen->createDFBSurface(ret, QDirectFBScreen::DontTrackSurface)) {
@@ -362,6 +366,7 @@ QImage QDirectFBPixmapData::toImage() const
return ret;
}
#endif
+#endif
QDirectFBPixmapData *that = const_cast<QDirectFBPixmapData*>(this);
const QImage *img = that->buffer();
@@ -385,7 +390,7 @@ QImage *QDirectFBPixmapData::buffer()
return lockedImage;
}
-QImage * QDirectFBPixmapData::buffer(uint lockFlags)
+QImage * QDirectFBPixmapData::buffer(DFBSurfaceLockFlags lockFlags)
{
lockDirectFB(lockFlags);
return lockedImage;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
index e81aef4..0204061 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
@@ -71,7 +71,7 @@ public:
virtual QImage *buffer();
virtual int metric(QPaintDevice::PaintDeviceMetric m) const {return QDirectFBPaintDevice::metric(m);}
- QImage *buffer(uint lockFlags);
+ QImage *buffer(DFBSurfaceLockFlags lockFlags);
// Pure virtual in QPixmapData, so re-implement here and delegate to QDirectFBPaintDevice
inline QImage::Format pixelFormat() const { return format; }
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 76064ad..67cad6f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -208,7 +208,7 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size,
{
DFBSurfaceDescription desc;
memset(&desc, 0, sizeof(DFBSurfaceDescription));
- desc.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH|DSDESC_HEIGHT);
+ desc.flags |= DSDESC_WIDTH|DSDESC_HEIGHT;
if (!QDirectFBScreen::initSurfaceDescriptionPixelFormat(&desc, format))
return 0;
desc.width = size.width();
@@ -226,13 +226,15 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc,
return 0;
}
- if (d_ptr->directFBFlags & VideoOnly && !(desc.flags & DSDESC_PREALLOCATED)) {
+ if (d_ptr->directFBFlags & VideoOnly
+ && !(desc.flags & DSDESC_PREALLOCATED)
+ && (!(desc.flags & DSDESC_CAPS) || !(desc.caps & DSCAPS_SYSTEMONLY))) {
// Add the video only capability. This means the surface will be created in video ram
if (!(desc.flags & DSDESC_CAPS)) {
desc.caps = DSCAPS_VIDEOONLY;
- desc.flags = DFBSurfaceDescriptionFlags(desc.flags | DSDESC_CAPS);
+ desc.flags |= DSDESC_CAPS;
} else {
- desc.caps = DFBSurfaceCapabilities(desc.caps | DSCAPS_VIDEOONLY);
+ desc.caps |= DSCAPS_VIDEOONLY;
}
result = d_ptr->dfb->CreateSurface(d_ptr->dfb, &desc, &newSurface);
if (result != DFB_OK
@@ -247,11 +249,11 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc,
desc.preallocated[0].data, desc.preallocated[0].pitch,
DirectFBErrorString(result));
}
- desc.caps = DFBSurfaceCapabilities(desc.caps & ~DSCAPS_VIDEOONLY);
+ desc.caps &= ~DSCAPS_VIDEOONLY;
}
if (d_ptr->directFBFlags & SystemOnly)
- desc.caps = DFBSurfaceCapabilities(desc.caps | DSCAPS_SYSTEMONLY);
+ desc.caps |= DSCAPS_SYSTEMONLY;
if (!newSurface)
result = d_ptr->dfb->CreateSurface(d_ptr->dfb, &desc, &newSurface);
@@ -459,20 +461,16 @@ DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const QImage &image
const DFBSurfacePixelFormat format = getSurfacePixelFormat(image.format());
if (format == DSPF_UNKNOWN || image.isNull()) {
- description.flags = DFBSurfaceDescriptionFlags(0);
+ description.flags = DSDESC_NONE;
return description;
}
- description.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH
- | DSDESC_HEIGHT
-#ifndef QT_NO_DIRECTFB_PREALLOCATED
- | DSDESC_PREALLOCATED
-#endif
- | DSDESC_PIXELFORMAT);
+ description.flags = DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT;
QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description, image.format());
description.width = image.width();
description.height = image.height();
#ifndef QT_NO_DIRECTFB_PREALLOCATED
+ description.flags |= DSDESC_PREALLOCATED;
description.preallocated[0].data = (void*)(image.bits());
description.preallocated[0].pitch = image.bytesPerLine();
description.preallocated[1].data = 0;
@@ -491,11 +489,7 @@ DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer,
DFBSurfaceDescription description;
memset(&description, 0, sizeof(DFBSurfaceDescription));
- description.flags = DFBSurfaceDescriptionFlags(DSDESC_CAPS
- | DSDESC_WIDTH
- | DSDESC_HEIGHT
- | DSDESC_PIXELFORMAT
- | DSDESC_PREALLOCATED);
+ description.flags = DSDESC_CAPS|DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT|DSDESC_PREALLOCATED;
description.caps = DSCAPS_PREMULTIPLIED;
description.width = length;
description.height = 1;
@@ -504,8 +498,7 @@ DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer,
description.preallocated[0].pitch = length * sizeof(uint);
description.preallocated[1].data = 0;
description.preallocated[1].pitch = 0;
-
- return description;
+return description;
}
#ifndef QT_NO_DIRECTFB_PALETTE
@@ -727,19 +720,19 @@ void QDirectFBScreenPrivate::setFlipFlags(const QStringList &args)
flipFlags = DSFLIP_NONE;
foreach(const QString &flip, flips) {
if (flip == QLatin1String("wait"))
- flipFlags = DFBSurfaceFlipFlags(flipFlags | DSFLIP_WAIT);
+ flipFlags |= DSFLIP_WAIT;
else if (flip == QLatin1String("blit"))
- flipFlags = DFBSurfaceFlipFlags(flipFlags | DSFLIP_BLIT);
+ flipFlags |= DSFLIP_BLIT;
else if (flip == QLatin1String("onsync"))
- flipFlags = DFBSurfaceFlipFlags(flipFlags | DSFLIP_ONSYNC);
+ flipFlags |= DSFLIP_ONSYNC;
else if (flip == QLatin1String("pipeline"))
- flipFlags = DFBSurfaceFlipFlags(flipFlags | DSFLIP_PIPELINE);
+ flipFlags |= DSFLIP_PIPELINE;
else
qWarning("QDirectFBScreen: Unknown flip argument: %s",
qPrintable(flip));
}
} else {
- flipFlags = DFBSurfaceFlipFlags(DSFLIP_BLIT);
+ flipFlags = DSFLIP_BLIT;
}
}
@@ -928,13 +921,13 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
DFBSurfaceDescription description;
memset(&description, 0, sizeof(DFBSurfaceDescription));
- description.flags = DFBSurfaceDescriptionFlags(DSDESC_CAPS);
+ description.flags = DSDESC_CAPS;
if (::setIntOption(displayArgs, QLatin1String("width"), &description.width))
- description.flags = DFBSurfaceDescriptionFlags(description.flags | DSDESC_WIDTH);
+ description.flags |= DSDESC_WIDTH;
if (::setIntOption(displayArgs, QLatin1String("height"), &description.height))
- description.flags = DFBSurfaceDescriptionFlags(description.flags | DSDESC_HEIGHT);
+ description.flags |= DSDESC_HEIGHT;
- uint caps = DSCAPS_PRIMARY|DSCAPS_DOUBLE;
+ description.caps = DSCAPS_PRIMARY|DSCAPS_DOUBLE;
struct {
const char *name;
const DFBSurfaceCapabilities cap;
@@ -948,14 +941,13 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
};
for (int i=0; capabilities[i].name; ++i) {
if (displayArgs.contains(QString::fromLatin1(capabilities[i].name), Qt::CaseInsensitive))
- caps |= capabilities[i].cap;
+ description.caps |= capabilities[i].cap;
}
if (displayArgs.contains(QLatin1String("forcepremultiplied"), Qt::CaseInsensitive)) {
- caps |= DSCAPS_PREMULTIPLIED;
+ description.caps |= DSCAPS_PREMULTIPLIED;
}
- description.caps = DFBSurfaceCapabilities(caps);
// We don't track the primary surface as it's released in disconnect
d_ptr->dfbSurface = createDFBSurface(description, DontTrackSurface);
if (!d_ptr->dfbSurface) {
@@ -1213,10 +1205,10 @@ void QDirectFBScreen::compose(const QRegion &region)
DFBSurfaceBlittingFlags flags = DSBLIT_NOFX;
if (!win->isOpaque()) {
- flags = DFBSurfaceBlittingFlags(flags | DSBLIT_BLEND_ALPHACHANNEL);
+ flags |= DSBLIT_BLEND_ALPHACHANNEL;
const uint opacity = win->opacity();
if (opacity < 255) {
- flags = DFBSurfaceBlittingFlags(flags | DSBLIT_BLEND_COLORALPHA);
+ flags |= DSBLIT_BLEND_COLORALPHA;
d_ptr->dfbSurface->SetColor(d_ptr->dfbSurface, 0xff, 0xff, 0xff, opacity);
}
}
@@ -1356,14 +1348,14 @@ bool QDirectFBScreen::initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *d
const DFBSurfacePixelFormat pixelformat = QDirectFBScreen::getSurfacePixelFormat(format);
if (pixelformat == DSPF_UNKNOWN)
return false;
- description->flags = DFBSurfaceDescriptionFlags(description->flags | DSDESC_PIXELFORMAT);
+ description->flags |= DSDESC_PIXELFORMAT;
description->pixelformat = pixelformat;
if (QDirectFBScreen::isPremultiplied(format)) {
if (!(description->flags & DSDESC_CAPS)) {
description->caps = DSCAPS_PREMULTIPLIED;
- description->flags = DFBSurfaceDescriptionFlags(description->flags | DSDESC_CAPS);
+ description->flags |= DSDESC_CAPS;
} else {
- description->caps = DFBSurfaceCapabilities(description->caps | DSCAPS_PREMULTIPLIED);
+ description->caps |= DSCAPS_PREMULTIPLIED;
}
}
return true;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index 4239156..fced673 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -51,8 +51,24 @@ QT_MODULE(Gui)
#define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERION << 8) | DIRECTFB_MICRO_VERSION)
-class QDirectFBScreenPrivate;
+#include <QDebug>
+#define DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(F) \
+ static inline F operator~(F f) { return F(~int(f)); } \
+ static inline F operator&(F left, F right) { return F(int(left) & int(right)); } \
+ static inline F operator|(F left, F right) { return F(int(left) | int(right)); } \
+ static inline F &operator|=(F &left, F right) { left = (left | right); return left; } \
+ static inline F &operator&=(F &left, F right) { left = (left & right); return left; }
+
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBInputDeviceCapabilities);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowDescriptionFlags);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceDescriptionFlags);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceCapabilities);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceLockFlags);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceBlittingFlags);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceDrawingFlags);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceFlipFlags);
+class QDirectFBScreenPrivate;
class Q_GUI_EXPORT QDirectFBScreen : public QScreen
{
public:
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 5deca3c..7dcf398 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -106,18 +106,16 @@ void QDirectFBWindowSurface::createWindow()
qFatal("QDirectFBWindowSurface: Unable to get primary display layer!");
DFBWindowDescription description;
- description.caps = DFBWindowCapabilities(DWCAPS_NODECORATION);
- description.flags = DFBWindowDescriptionFlags(DWDESC_CAPS
- |DWDESC_SURFACE_CAPS
- |DWDESC_PIXELFORMAT);
+ description.caps = DWCAPS_NODECORATION;
+ description.flags = DWDESC_CAPS|DWDESC_SURFACE_CAPS|DWDESC_PIXELFORMAT;
description.surface_caps = DSCAPS_NONE;
if (screen->directFBFlags() & QDirectFBScreen::VideoOnly)
- description.surface_caps = DFBSurfaceCapabilities(description.surface_caps|DSCAPS_VIDEOONLY);
+ description.surface_caps |= DSCAPS_VIDEOONLY;
const QImage::Format format = screen->pixelFormat();
description.pixelformat = QDirectFBScreen::getSurfacePixelFormat(format);
if (QDirectFBScreen::isPremultiplied(format))
- description.surface_caps = DFBSurfaceCapabilities(DSCAPS_PREMULTIPLIED|description.caps);
+ description.surface_caps = DSCAPS_PREMULTIPLIED;
DFBResult result = layer->CreateWindow(layer, &description, &dfbWindow);
if (result != DFB_OK)
@@ -252,7 +250,6 @@ void QDirectFBWindowSurface::setPermanentState(const QByteArray &state)
static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int dx, int dy)
{
- surface->SetBlittingFlags(surface, DSBLIT_NOFX);
const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy);
}
@@ -365,12 +362,13 @@ void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion &region,
if (winOpacity != opacity)
dfbWindow->SetOpacity(dfbWindow, winOpacity);
}
+#endif
if (!(flipFlags & DSFLIP_BLIT)) {
dfbSurface->Flip(dfbSurface, 0, flipFlags);
} else {
if (!boundingRectFlip && region.numRects() > 1) {
const QVector<QRect> rects = region.rects();
- const DFBSurfaceFlipFlags nonWaitFlags = DFBSurfaceFlipFlags(flipFlags & ~DSFLIP_WAIT);
+ const DFBSurfaceFlipFlags nonWaitFlags = flipFlags & ~DSFLIP_WAIT;
for (int i=0; i<rects.size(); ++i) {
const QRect &r = rects.at(i);
const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(),
@@ -386,7 +384,6 @@ void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion &region,
dfbSurface->Flip(dfbSurface, &dfbReg, flipFlags);
}
}
-#endif
#ifdef QT_DIRECTFB_TIMING
enum { Secs = 3 };
++frames;
diff --git a/src/plugins/graphicssystems/openvg/openvg.pro b/src/plugins/graphicssystems/openvg/openvg.pro
index 0abbfbd..d36570c 100644
--- a/src/plugins/graphicssystems/openvg/openvg.pro
+++ b/src/plugins/graphicssystems/openvg/openvg.pro
@@ -10,11 +10,3 @@ HEADERS = qgraphicssystem_vg_p.h
target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
INSTALLS += target
-
-!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
-!isEmpty(QMAKE_LIBDIR_OPENVG): LIBS += -L$$QMAKE_LIBDIR_OPENVG
-!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
-
-!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
-!isEmpty(QMAKE_LIBDIR_EGL): LIBS += -L$$QMAKE_LIBDIR_EGL
-!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
diff --git a/src/plugins/graphicssystems/shivavg/shivavg.pro b/src/plugins/graphicssystems/shivavg/shivavg.pro
index 68345af..b8ea12a 100644
--- a/src/plugins/graphicssystems/shivavg/shivavg.pro
+++ b/src/plugins/graphicssystems/shivavg/shivavg.pro
@@ -10,7 +10,3 @@ HEADERS = shivavggraphicssystem.h shivavgwindowsurface.h
target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
INSTALLS += target
-
-!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
-!isEmpty(QMAKE_LIBDIR_OPENVG): LIBS += -L$$QMAKE_LIBDIR_OPENVG
-!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index 43e35c0..c9e04a4 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -522,6 +522,18 @@ QImage ICOReader::iconAt(int index)
ICONDIRENTRY iconEntry;
if (readIconEntry(index, &iconEntry)) {
+ static const uchar pngMagicData[] = { 137, 80, 78, 71, 13, 10, 26, 10 };
+
+ iod->seek(iconEntry.dwImageOffset);
+
+ const QByteArray pngMagic = QByteArray::fromRawData((char*)pngMagicData, sizeof(pngMagicData));
+ const bool isPngImage = (iod->read(pngMagic.size()) == pngMagic);
+
+ if (isPngImage) {
+ iod->seek(iconEntry.dwImageOffset);
+ return QImage::fromData(iod->read(iconEntry.dwBytesInRes), "png");
+ }
+
BMP_INFOHDR header;
if (readBMPHeader(iconEntry.dwImageOffset, &header)) {
icoAttrib.nbits = header.biBitCount ? header.biBitCount : iconEntry.wBitCount;
diff --git a/src/plugins/kbddrivers/sl5000/main.cpp b/src/plugins/kbddrivers/sl5000/main.cpp
index 4d61266..cc68747 100644
--- a/src/plugins/kbddrivers/sl5000/main.cpp
+++ b/src/plugins/kbddrivers/sl5000/main.cpp
@@ -66,10 +66,9 @@ QStringList QSL5000KbdDriver::keys() const
QWSKeyboardHandler* QSL5000KbdDriver::create(const QString &driver,
const QString &device)
{
- Q_UNUSED(device);
if (driver.compare(QLatin1String("SL5000"), Qt::CaseInsensitive))
return 0;
- return new QWSSL5000KeyboardHandler(driver);
+ return new QWSSL5000KeyboardHandler(device);
}
Q_EXPORT_PLUGIN2(qwssl5000kbddriver, QSL5000KbdDriver)
diff --git a/src/plugins/kbddrivers/vr41xx/main.cpp b/src/plugins/kbddrivers/vr41xx/main.cpp
index 2cba1f7..c9ba4d7 100644
--- a/src/plugins/kbddrivers/vr41xx/main.cpp
+++ b/src/plugins/kbddrivers/vr41xx/main.cpp
@@ -66,10 +66,9 @@ QStringList QVr41xxKbdDriver::keys() const
QWSKeyboardHandler* QVr41xxKbdDriver::create(const QString &driver,
const QString &device)
{
- Q_UNUSED(device);
if (driver.compare(QLatin1String("VR41xx"), Qt::CaseInsensitive))
return 0;
- return new QWSVr41xxKeyboardHandler(driver);
+ return new QWSVr41xxKeyboardHandler(device);
}
Q_EXPORT_PLUGIN2(qwsvr41xxkbddriver, QVr41xxKbdDriver)
diff --git a/src/plugins/kbddrivers/yopy/main.cpp b/src/plugins/kbddrivers/yopy/main.cpp
index bfddabe..7079d88 100644
--- a/src/plugins/kbddrivers/yopy/main.cpp
+++ b/src/plugins/kbddrivers/yopy/main.cpp
@@ -66,10 +66,9 @@ QStringList QYopyKbdDriver::keys() const
QWSKeyboardHandler* QYopyKbdDriver::create(const QString &driver,
const QString &device)
{
- Q_UNUSED(device);
if (driver.compare(QLatin1String("Yopy"), Qt::CaseInsensitive))
return 0;
- return new QWSYopyKeyboardHandler(driver);
+ return new QWSYopyKeyboardHandler(device);
}
Q_EXPORT_PLUGIN2(qwsyopykbddriver, QYopyKbdDriver)
diff --git a/src/qt3support/canvas/q3canvas.cpp b/src/qt3support/canvas/q3canvas.cpp
index 034aff5..948935c 100644
--- a/src/qt3support/canvas/q3canvas.cpp
+++ b/src/qt3support/canvas/q3canvas.cpp
@@ -4828,7 +4828,7 @@ void Q3CanvasText::draw(QPainter& painter)
}
/*!
- \reimp
+ \internal
*/
void Q3CanvasText::changeChunks()
{
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index 031170e..a285fd8 100644
--- a/src/qt3support/dialogs/q3filedialog.cpp
+++ b/src/qt3support/dialogs/q3filedialog.cpp
@@ -507,45 +507,7 @@ static void updateLastSize(Q3FileDialog *that)
lastHeight = that->height() - extHeight;
}
-// Don't remove the lines below!
-//
-// resolving the W methods manually is needed, because Windows 95 doesn't include
-// these methods in Shell32.lib (not even stubs!), so you'd get an unresolved symbol
-// when Qt calls getEsistingDirectory(), etc.
#if defined(Q_WS_WIN)
-
-typedef UINT (WINAPI *PtrExtractIconEx)(LPCTSTR,int,HICON*,HICON*,UINT);
-static PtrExtractIconEx ptrExtractIconEx = 0;
-
-static void resolveLibs()
-{
-#ifndef Q_OS_WINCE
- static bool triedResolve = false;
-
- if (!triedResolve) {
-#ifndef QT_NO_THREAD
- // protect initialization
- QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
- // check triedResolve again, since another thread may have already
- // done the initialization
- if (triedResolve) {
- // another thread did initialize the security function pointers,
- // so we shouldn't do it again.
- return;
- }
-#endif
- triedResolve = true;
- if (qt_winUnicode()) {
- QLibrary lib(QLatin1String("shell32"));
- ptrExtractIconEx = (PtrExtractIconEx) lib.resolve("ExtractIconExW");
- }
- }
-#endif
-}
-#ifdef Q_OS_WINCE
-#define PtrExtractIconEx ExtractIconEx
-#endif
-
class QWindowsIconProvider : public Q3FileIconProvider
{
public:
@@ -2566,11 +2528,7 @@ void Q3FileDialog::init()
d->modeButtons->insert(d->previewInfo);
d->previewContents = new QToolButton(this, "preview info view");
-#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
- if ((qWinVersion() & Qt::WV_NT_based) > Qt::WV_NT)
-#else
if (!qstrcmp(style()->className(), "QWindowsStyle"))
-#endif
{
d->goBack->setAutoRaise(true);
d->cdToParent->setAutoRaise(true);
@@ -4878,33 +4836,20 @@ Q3FileIconProvider * Q3FileDialog::iconProvider()
static QString getWindowsRegString(HKEY key, const QString &subKey)
{
QString s;
- QT_WA({
- char buf[1024];
- DWORD bsz = sizeof(buf);
- int r = RegQueryValueEx(key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)buf, &bsz);
- if (r == ERROR_SUCCESS) {
- s = QString::fromUcs2((unsigned short *)buf);
- } else if (r == ERROR_MORE_DATA) {
- char *ptr = new char[bsz+1];
- r = RegQueryValueEx(key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)ptr, &bsz);
- if (r == ERROR_SUCCESS)
- s = QLatin1String(ptr);
- delete [] ptr;
- }
- } , {
- char buf[512];
- DWORD bsz = sizeof(buf);
- int r = RegQueryValueExA(key, subKey.local8Bit(), 0, 0, (LPBYTE)buf, &bsz);
- if (r == ERROR_SUCCESS) {
- s = QLatin1String(buf);
- } else if (r == ERROR_MORE_DATA) {
- char *ptr = new char[bsz+1];
- r = RegQueryValueExA(key, subKey.local8Bit(), 0, 0, (LPBYTE)ptr, &bsz);
- if (r == ERROR_SUCCESS)
- s = QLatin1String(ptr);
- delete [] ptr;
- }
- });
+
+ wchar_t buf[1024];
+ DWORD bsz = sizeof(buf) / sizeof(wchar_t);
+ int r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)buf, &bsz);
+ if (r == ERROR_SUCCESS) {
+ s = QString::fromWCharArray(buf);
+ } else if (r == ERROR_MORE_DATA) {
+ char *ptr = new char[bsz+1];
+ r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)ptr, &bsz);
+ if (r == ERROR_SUCCESS)
+ s = QLatin1String(ptr);
+ delete [] ptr;
+ }
+
return s;
}
@@ -4925,22 +4870,13 @@ QWindowsIconProvider::QWindowsIconProvider(QObject *parent, const char *name)
HKEY k;
HICON si;
- int r;
QString s;
UINT res = 0;
// ---------- get default folder pixmap
const wchar_t iconFolder[] = L"folder\\DefaultIcon"; // workaround for Borland
- QT_WA({
- r = RegOpenKeyEx(HKEY_CLASSES_ROOT,
- iconFolder,
- 0, KEY_READ, &k);
- } , {
- r = RegOpenKeyExA(HKEY_CLASSES_ROOT,
- "folder\\DefaultIcon",
- 0, KEY_READ, &k);
- });
- resolveLibs();
+ int r = RegOpenKeyEx(HKEY_CLASSES_ROOT, iconFolder, 0, KEY_READ, &k);
+
if (r == ERROR_SUCCESS) {
s = getWindowsRegString(k, QString());
RegCloseKey(k);
@@ -4948,21 +4884,7 @@ QWindowsIconProvider::QWindowsIconProvider(QObject *parent, const char *name)
QStringList lst = QStringList::split(QLatin1String(","), s);
if (lst.count() >= 2) { // don't just assume that lst has two entries
-#ifndef Q_OS_WINCE
- QT_WA({
- res = ptrExtractIconEx((TCHAR*)lst[0].simplifyWhiteSpace().ucs2(),
- lst[1].simplifyWhiteSpace().toInt(),
- 0, &si, 1);
- } , {
- res = ExtractIconExA(lst[0].simplifyWhiteSpace().local8Bit(),
- lst[1].simplifyWhiteSpace().toInt(),
- 0, &si, 1);
- });
-#else
- res = (UINT)ExtractIconEx((TCHAR*)lst[0].simplifyWhiteSpace().ucs2(),
- lst[1].simplifyWhiteSpace().toInt(),
- 0, &si, 1);
-#endif
+ res = ExtractIconEx((wchar_t*)lst[0].simplifyWhiteSpace().utf16(), lst[1].simplifyWhiteSpace().toInt(), 0, &si, 1);
}
if (res) {
@@ -4978,18 +4900,7 @@ QWindowsIconProvider::QWindowsIconProvider(QObject *parent, const char *name)
}
//------------------------------- get default file pixmap
-#ifndef Q_OS_WINCE
- QT_WA({
- res = ptrExtractIconEx(L"shell32.dll",
- 0, 0, &si, 1);
- } , {
- res = ExtractIconExA("shell32.dll",
- 0, 0, &si, 1);
- });
-#else
- res = (UINT)ExtractIconEx(L"shell32.dll",
- 0, 0, &si, 1);
-#endif
+ res = ExtractIconEx(L"shell32.dll", 0, 0, &si, 1);
if (res) {
defaultFile = fromHICON(si);
@@ -5002,16 +4913,9 @@ QWindowsIconProvider::QWindowsIconProvider(QObject *parent, const char *name)
//------------------------------- get default exe pixmap
#ifndef Q_OS_WINCE
- QT_WA({
- res = ptrExtractIconEx(L"shell32.dll",
- 2, 0, &si, 1);
- } , {
- res = ExtractIconExA("shell32.dll",
- 2, 0, &si, 1);
- });
+ res = ExtractIconEx(L"shell32.dll", 2, 0, &si, 1);
#else
- res = (UINT)ExtractIconEx(L"ceshell.dll",
- 10, 0, &si, 1);
+ res = ExtractIconEx(L"ceshell.dll", 10, 0, &si, 1);
#endif
if (res) {
@@ -5050,14 +4954,7 @@ const QPixmap * QWindowsIconProvider::pixmap(const QFileInfo &fi)
return &(*it);
HKEY k, k2;
- int r;
- QT_WA({
- r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (TCHAR*)ext.ucs2(),
- 0, KEY_READ, &k);
- } , {
- r = RegOpenKeyExA(HKEY_CLASSES_ROOT, ext.local8Bit(),
- 0, KEY_READ, &k);
- });
+ int r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (wchar_t*)ext.utf16(), 0, KEY_READ, &k);
QString s;
if (r == ERROR_SUCCESS) {
s = getWindowsRegString(k, QString());
@@ -5068,13 +4965,8 @@ const QPixmap * QWindowsIconProvider::pixmap(const QFileInfo &fi)
}
RegCloseKey(k);
- QT_WA({
- r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (TCHAR*)QString(s + QLatin1String("\\DefaultIcon")).ucs2(),
- 0, KEY_READ, &k2);
- } , {
- r = RegOpenKeyExA(HKEY_CLASSES_ROOT, QString(s + QLatin1String("\\DefaultIcon")).local8Bit() ,
- 0, KEY_READ, &k2);
- });
+ r = RegOpenKeyEx(HKEY_CLASSES_ROOT, (wchar_t*)QString(s + QLatin1String("\\DefaultIcon")).utf16(),
+ 0, KEY_READ, &k2);
if (r == ERROR_SUCCESS) {
s = getWindowsRegString(k2, QString());
} else {
@@ -5104,19 +4996,7 @@ const QPixmap * QWindowsIconProvider::pixmap(const QFileInfo &fi)
if (filepath[0] == QLatin1Char('"') && filepath[(int)filepath.length()-1] == QLatin1Char('"'))
filepath = filepath.mid(1, filepath.length()-2);
- resolveLibs();
-#ifndef Q_OS_WINCE
- QT_WA({
- res = ptrExtractIconEx((TCHAR*)filepath.ucs2(), lst[1].stripWhiteSpace().toInt(),
- 0, &si, 1);
- } , {
- res = ExtractIconExA(filepath.local8Bit(), lst[1].stripWhiteSpace().toInt(),
- 0, &si, 1);
- });
-#else
- res = (UINT)ExtractIconEx((TCHAR*)filepath.ucs2(), lst[1].stripWhiteSpace().toInt(),
- 0, &si, 1);
-#endif
+ res = ExtractIconEx((wchar_t*)filepath.utf16(), lst[1].stripWhiteSpace().toInt(), 0, &si, 1);
}
}
if (res) {
@@ -5133,32 +5013,9 @@ const QPixmap * QWindowsIconProvider::pixmap(const QFileInfo &fi)
HICON si;
UINT res = 0;
if (!fi.absFilePath().isEmpty()) {
-#ifndef Q_OS_WINCE
- QT_WA({
- res = ptrExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), -1,
- 0, 0, 1);
- } , {
- res = ExtractIconExA(fi.absFilePath().local8Bit(), -1,
- 0, 0, 1);
- });
-
- if (res) {
- QT_WA({
- res = ptrExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), res - 1,
- 0, &si, 1);
- } , {
- res = ExtractIconExA(fi.absFilePath().local8Bit(), res - 1,
- 0, &si, 1);
- });
- }
-#else
- res = (UINT)ExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), -1,
- 0, 0, 1);
- if (res)
- res = (UINT)ExtractIconEx((TCHAR*)fi.absFilePath().ucs2(), res - 1,
- 0, &si, 1);
-#endif
-
+ res = ExtractIconEx((wchar_t*)fi.absFilePath().utf16(), -1, 0, 0, 1);
+ if (res)
+ res = ExtractIconEx((wchar_t*)fi.absFilePath().utf16(), res - 1, 0, &si, 1);
}
if (res) {
@@ -5760,13 +5617,8 @@ void Q3FileDialog::insertEntry(const Q3ValueList<QUrlInfo> &lst, Q3NetworkOperat
if (!file.endsWith(QLatin1Char('/')))
file.append(QLatin1Char('/'));
file += inf.name();
- QT_WA({
- if (GetFileAttributesW((TCHAR*)file.ucs2()) & FILE_ATTRIBUTE_HIDDEN)
- continue;
- } , {
- if (GetFileAttributesA(file.local8Bit()) & FILE_ATTRIBUTE_HIDDEN)
- continue;
- });
+ if (GetFileAttributes((wchar_t*)file.utf16()) & FILE_ATTRIBUTE_HIDDEN)
+ continue;
} else {
if (inf.name() != QLatin1String("..") && inf.name()[0] == QLatin1Char('.'))
continue;
diff --git a/src/qt3support/dialogs/q3filedialog_win.cpp b/src/qt3support/dialogs/q3filedialog_win.cpp
index ed86fa2..487097a 100644
--- a/src/qt3support/dialogs/q3filedialog_win.cpp
+++ b/src/qt3support/dialogs/q3filedialog_win.cpp
@@ -64,49 +64,6 @@
QT_BEGIN_NAMESPACE
-// Don't remove the lines below!
-//
-// resolving the W methods manually is needed, because Windows 95 doesn't include
-// these methods in Shell32.lib (not even stubs!), so you'd get an unresolved symbol
-// when Qt calls getEsistingDirectory(), etc.
-typedef LPITEMIDLIST (WINAPI *PtrSHBrowseForFolder)(BROWSEINFO*);
-static PtrSHBrowseForFolder ptrSHBrowseForFolder = 0;
-typedef BOOL (WINAPI *PtrSHGetPathFromIDList)(LPITEMIDLIST,LPWSTR);
-static PtrSHGetPathFromIDList ptrSHGetPathFromIDList = 0;
-
-static void resolveLibs()
-{
-#ifndef Q_OS_WINCE
- static bool triedResolve = false;
-
- if (!triedResolve) {
-#ifndef QT_NO_THREAD
- // protect initialization
- QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
- // check triedResolve again, since another thread may have already
- // done the initialization
- if (triedResolve) {
- // another thread did initialize the security function pointers,
- // so we shouldn't do it again.
- return;
- }
-#endif
-
- triedResolve = true;
- if (qt_winUnicode()) {
- QLibrary lib(QLatin1String("shell32"));
- ptrSHBrowseForFolder = (PtrSHBrowseForFolder) lib.resolve("SHBrowseForFolderW");
- ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList) lib.resolve("SHGetPathFromIDListW");
- }
- }
-#endif
-}
-#ifdef Q_OS_WINCE
-#define PtrSHBrowseForFolder SHBrowseForFolder ;
-#define PtrSHGetPathFromIDList SHGetPathFromIDList;
-#endif
-
-
extern const char qt3_file_dialog_filter_reg_exp[]; // defined in qfiledialog.cpp
const int maxNameLen = 1023;
@@ -168,80 +125,8 @@ static QString selFilter(const QString& filter, DWORD idx)
return filterLst[(int)idx - 1];
}
-#ifndef Q_OS_WINCE
-// Static vars for OFNA funcs:
-static QByteArray aInitDir;
-static QByteArray aInitSel;
-static QByteArray aTitle;
-static QByteArray aFilter;
-// Use ANSI strings and API
-
-// If you change this, then make sure you change makeOFN (below) too
-static
-OPENFILENAMEA* makeOFNA(QWidget* parent,
- const QString& initialSelection,
- const QString& initialDirectory,
- const QString& title,
- const QString& filters,
- Q3FileDialog::Mode mode)
-{
- if (parent)
- parent = parent->window();
- else
- parent = qApp->activeWindow();
-
- aTitle = title.local8Bit();
- aInitDir = QDir::toNativeSeparators(initialDirectory).local8Bit();
- if (initialSelection.isEmpty())
- aInitSel = "";
- else
- aInitSel = QDir::toNativeSeparators(initialSelection).local8Bit();
- int maxLen = mode == Q3FileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
- aInitSel.resize(maxLen + 1); // make room for return value
- aFilter = filters.local8Bit();
-
- OPENFILENAMEA* ofn = new OPENFILENAMEA;
- memset(ofn, 0, sizeof(OPENFILENAMEA));
-
-#if defined(Q_CC_BOR) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
- // according to the MSDN, this should also be necessary for MSVC, but
- // OPENFILENAME_SIZE_VERSION_400A is in not Microsoft header, as it seems
- if (QApplication::winVersion()==Qt::WV_NT || QApplication::winVersion()&Qt::WV_DOS_based) {
- ofn->lStructSize= OPENFILENAME_SIZE_VERSION_400A;
- } else {
- ofn->lStructSize= sizeof(OPENFILENAMEA);
- }
-#else
- ofn->lStructSize = sizeof(OPENFILENAMEA);
-#endif
- ofn->hwndOwner = parent ? parent->winId() : 0;
- ofn->lpstrFilter = aFilter;
- ofn->lpstrFile = aInitSel.data();
- ofn->nMaxFile = maxLen;
- ofn->lpstrInitialDir = aInitDir.data();
- ofn->lpstrTitle = aTitle.data();
- ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY);
-
- if (mode == Q3FileDialog::ExistingFile ||
- mode == Q3FileDialog::ExistingFiles)
- ofn->Flags |= (OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST);
- if (mode == Q3FileDialog::ExistingFiles)
- ofn->Flags |= (OFN_ALLOWMULTISELECT | OFN_EXPLORER);
-
- return ofn;
-}
-
-static void cleanUpOFNA(OPENFILENAMEA** ofn)
-{
- delete *ofn;
- *ofn = 0;
-}
-#endif
-
static QString tFilters, tTitle, tInitDir;
-#ifdef UNICODE
-// If you change this, then make sure you change makeOFNA (above) too
static
OPENFILENAME* makeOFN(QWidget* parent,
const QString& initialSelection,
@@ -261,33 +146,23 @@ OPENFILENAME* makeOFN(QWidget* parent,
QString initSel = QDir::toNativeSeparators(initialSelection);
int maxLen = mode == Q3FileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
- TCHAR *tInitSel = new TCHAR[maxLen+1];
+ wchar_t *tInitSel = new wchar_t[maxLen+1];
if (initSel.length() > 0 && initSel.length() <= maxLen)
- memcpy(tInitSel, initSel.ucs2(), (initSel.length()+1)*sizeof(QChar));
+ memcpy(tInitSel, initSel.utf16(), (initSel.length() + 1) * sizeof(wchar_t));
else
tInitSel[0] = 0;
OPENFILENAME* ofn = new OPENFILENAME;
memset(ofn, 0, sizeof(OPENFILENAME));
-#if defined(Q_CC_BOR) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
- // according to the MSDN, this should also be necessary for MSVC, but
- // OPENFILENAME_SIZE_VERSION_400 is in not Microsoft header, as it seems
- if (QApplication::winVersion()==Qt::WV_NT || QApplication::winVersion()&Qt::WV_DOS_based) {
- ofn->lStructSize= OPENFILENAME_SIZE_VERSION_400;
- } else {
- ofn->lStructSize = sizeof(OPENFILENAME);
- }
-#else
- ofn->lStructSize = sizeof(OPENFILENAME);
-#endif
- ofn->hwndOwner = parent ? parent->winId() : 0;
- ofn->lpstrFilter = (TCHAR *)tFilters.ucs2();
- ofn->lpstrFile = tInitSel;
+ ofn->lStructSize = sizeof(OPENFILENAME);
+ ofn->hwndOwner = parent ? parent->winId() : 0;
+ ofn->lpstrFilter = (wchar_t*)tFilters.utf16();
+ ofn->lpstrFile = tInitSel;
ofn->nMaxFile = maxLen;
- ofn->lpstrInitialDir = (TCHAR *)tInitDir.ucs2();
- ofn->lpstrTitle = (TCHAR *)tTitle.ucs2();
- ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY);
+ ofn->lpstrInitialDir = (wchar_t*)tInitDir.utf16();
+ ofn->lpstrTitle = (wchar_t*)tTitle.utf16();
+ ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY);
if (mode == Q3FileDialog::ExistingFile ||
mode == Q3FileDialog::ExistingFiles)
@@ -298,7 +173,6 @@ OPENFILENAME* makeOFN(QWidget* parent,
return ofn;
}
-
static void cleanUpOFN(OPENFILENAME** ofn)
{
delete (*ofn)->lpstrFile;
@@ -306,8 +180,6 @@ static void cleanUpOFN(OPENFILENAME** ofn)
*ofn = 0;
}
-#endif // UNICODE
-
QString Q3FileDialog::winGetOpenFileName(const QString &initialSelection,
const QString &filter,
QString* initialDirectory,
@@ -349,31 +221,18 @@ QString Q3FileDialog::winGetOpenFileName(const QString &initialSelection,
QApplication::sendEvent(parent, &e);
QApplicationPrivate::enterModal(parent);
}
- QT_WA({
- // Use Unicode strings and API
- OPENFILENAME* ofn = makeOFN(parent, isel,
- *initialDirectory, title,
- winFilter(filter), ExistingFile);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileName(ofn)) {
- result = QString::fromUcs2((ushort*)ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- cleanUpOFN(&ofn);
- } , {
- // Use ANSI strings and API
- OPENFILENAMEA* ofn = makeOFNA(parent, isel,
- *initialDirectory, title,
- winFilter(filter), ExistingFile);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileNameA(ofn)) {
- result = QString::fromLocal8Bit(ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- cleanUpOFNA(&ofn);
- });
+
+ OPENFILENAME* ofn = makeOFN(parent, isel,
+ *initialDirectory, title,
+ winFilter(filter), ExistingFile);
+ if (idx)
+ ofn->nFilterIndex = idx + 1;
+ if (GetOpenFileName(ofn)) {
+ result = QString::fromWCharArray(ofn->lpstrFile);
+ selFilIdx = ofn->nFilterIndex;
+ }
+ cleanUpOFN(&ofn);
+
if (parent) {
QApplicationPrivate::leaveModal(parent);
QEvent e(QEvent::WindowUnblocked);
@@ -433,31 +292,18 @@ QString Q3FileDialog::winGetSaveFileName(const QString &initialSelection,
QApplication::sendEvent(parent, &e);
QApplicationPrivate::enterModal(parent);
}
- QT_WA({
- // Use Unicode strings and API
- OPENFILENAME* ofn = makeOFN(parent, isel,
- *initialDirectory, title,
- winFilter(filter), AnyFile);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetSaveFileName(ofn)) {
- result = QString::fromUcs2((ushort*)ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- cleanUpOFN(&ofn);
- } , {
- // Use ANSI strings and API
- OPENFILENAMEA* ofn = makeOFNA(parent, isel,
- *initialDirectory, title,
- winFilter(filter), AnyFile);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetSaveFileNameA(ofn)) {
- result = QString::fromLocal8Bit(ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- }
- cleanUpOFNA(&ofn);
- });
+
+ OPENFILENAME* ofn = makeOFN(parent, isel,
+ *initialDirectory, title,
+ winFilter(filter), AnyFile);
+ if (idx)
+ ofn->nFilterIndex = idx + 1;
+ if (GetSaveFileName(ofn)) {
+ result = QString::fromWCharArray(ofn->lpstrFile);
+ selFilIdx = ofn->nFilterIndex;
+ }
+ cleanUpOFN(&ofn);
+
if (parent) {
QApplicationPrivate::leaveModal(parent);
QEvent e(QEvent::WindowUnblocked);
@@ -519,69 +365,38 @@ QStringList Q3FileDialog::winGetOpenFileNames(const QString &filter,
QApplication::sendEvent(parent, &e);
QApplicationPrivate::enterModal(parent);
}
- QT_WA({
- OPENFILENAME* ofn = makeOFN(parent, isel,
- *initialDirectory, title,
- winFilter(filter), ExistingFiles);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileName(ofn)) {
- QString fileOrDir = QString::fromUcs2((ushort*)ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- int offset = fileOrDir.length() + 1;
- if (ofn->lpstrFile[offset] == 0) {
- // Only one file selected; has full path
- fi.setFile(fileOrDir);
- QString res = fi.absFilePath();
- if (!res.isEmpty())
- result.append(res);
- }
- else {
- // Several files selected; first string is path
- dir.setPath(fileOrDir);
- QString f;
- while(!(f = QString::fromUcs2((ushort*)ofn->lpstrFile+offset)).isEmpty()) {
- fi.setFile(dir, f);
- QString res = fi.absFilePath();
- if (!res.isEmpty())
- result.append(res);
- offset += f.length() + 1;
- }
- }
+
+ OPENFILENAME* ofn = makeOFN(parent, isel,
+ *initialDirectory, title,
+ winFilter(filter), ExistingFiles);
+ if (idx)
+ ofn->nFilterIndex = idx + 1;
+ if (GetOpenFileName(ofn)) {
+ QString fileOrDir = QString::fromWCharArray(ofn->lpstrFile);
+ selFilIdx = ofn->nFilterIndex;
+ int offset = fileOrDir.length() + 1;
+ if (ofn->lpstrFile[offset] == 0) {
+ // Only one file selected; has full path
+ fi.setFile(fileOrDir);
+ QString res = fi.absFilePath();
+ if (!res.isEmpty())
+ result.append(res);
}
- cleanUpOFN(&ofn);
- } , {
- OPENFILENAMEA* ofn = makeOFNA(parent, isel,
- *initialDirectory, title,
- winFilter(filter), ExistingFiles);
- if (idx)
- ofn->nFilterIndex = idx + 1;
- if (GetOpenFileNameA(ofn)) {
- QByteArray fileOrDir(ofn->lpstrFile);
- selFilIdx = ofn->nFilterIndex;
- int offset = fileOrDir.length() + 1;
- if (ofn->lpstrFile[offset] == '\0') {
- // Only one file selected; has full path
- fi.setFile(QString::fromLocal8Bit(fileOrDir));
+ else {
+ // Several files selected; first string is path
+ dir.setPath(fileOrDir);
+ QString f;
+ while (!(f = QString::fromWCharArray(ofn->lpstrFile + offset)).isEmpty()) {
+ fi.setFile(dir, f);
QString res = fi.absFilePath();
if (!res.isEmpty())
result.append(res);
+ offset += f.length() + 1;
}
- else {
- // Several files selected; first string is path
- dir.setPath(QString::fromLocal8Bit(fileOrDir));
- QByteArray f;
- while(!(f = QByteArray(ofn->lpstrFile + offset)).isEmpty()) {
- fi.setFile(dir, QString::fromLocal8Bit(f));
- QString res = fi.absFilePath();
- if (!res.isEmpty())
- result.append(res);
- offset += f.length() + 1;
- }
- }
- cleanUpOFNA(&ofn);
}
- });
+ }
+ cleanUpOFN(&ofn);
+
if (parent) {
QApplicationPrivate::leaveModal(parent);
QEvent e(QEvent::WindowUnblocked);
@@ -607,34 +422,17 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
if (uMsg == BFFM_INITIALIZED && lpData != 0) {
QString *initDir = (QString *)(lpData);
if (!initDir->isEmpty()) {
- // ### Lars asks: is this correct for the A version????
- QT_WA({
- SendMessage(hwnd, BFFM_SETSELECTION, TRUE, Q_ULONG(initDir->ucs2()));
- } , {
- SendMessageA(hwnd, BFFM_SETSELECTION, TRUE, Q_ULONG(initDir->ucs2()));
- });
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, Q_ULONG(initDir->utf16()));
}
} else if (uMsg == BFFM_SELCHANGED) {
- QT_WA({
- resolveLibs();
- TCHAR path[MAX_PATH];
- ptrSHGetPathFromIDList(LPITEMIDLIST(lParam), path);
- QString tmpStr = QString::fromUcs2((ushort*)path);
- if (!tmpStr.isEmpty())
- SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
- else
- SendMessage(hwnd, BFFM_ENABLEOK, 0, 0);
- SendMessage(hwnd, BFFM_SETSTATUSTEXT, 1, Q_ULONG(path));
- } , {
- char path[MAX_PATH];
- SHGetPathFromIDListA(LPITEMIDLIST(lParam), path);
- QString tmpStr = QString::fromLocal8Bit(path);
- if (!tmpStr.isEmpty())
- SendMessageA(hwnd, BFFM_ENABLEOK, 1, 1);
- else
- SendMessageA(hwnd, BFFM_ENABLEOK, 0, 0);
- SendMessageA(hwnd, BFFM_SETSTATUSTEXT, 1, Q_ULONG(path));
- });
+ wchar_t path[MAX_PATH];
+ SHGetPathFromIDList(LPITEMIDLIST(lParam), path);
+ QString tmpStr = QString::fromWCharArray(path);
+ if (!tmpStr.isEmpty())
+ SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
+ else
+ SendMessage(hwnd, BFFM_ENABLEOK, 0, 0);
+ SendMessage(hwnd, BFFM_SETSTATUSTEXT, 1, Q_ULONG(path));
}
#endif
return 0;
@@ -666,76 +464,42 @@ QString Q3FileDialog::winGetExistingDirectory(const QString& initialDirectory,
QApplication::sendEvent(parent, &e);
QApplicationPrivate::enterModal(parent);
}
- QT_WA({
- resolveLibs();
- QString initDir = QDir::toNativeSeparators(initialDirectory);
- TCHAR path[MAX_PATH];
- TCHAR initPath[MAX_PATH];
- initPath[0] = 0;
- path[0] = 0;
- tTitle = title;
- BROWSEINFO bi;
- bi.hwndOwner = (parent ? parent->winId() : 0);
- bi.pidlRoot = NULL;
- bi.lpszTitle = (TCHAR*)tTitle.ucs2();
- bi.pszDisplayName = initPath;
- bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
- bi.lpfn = winGetExistDirCallbackProc;
- bi.lParam = Q_ULONG(&initDir);
- LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi);
- if (pItemIDList) {
- ptrSHGetPathFromIDList(pItemIDList, path);
- IMalloc *pMalloc;
- if (SHGetMalloc(&pMalloc) != NOERROR)
- result.clear();
- else {
- pMalloc->Free(pItemIDList);
- pMalloc->Release();
- result = QString::fromUcs2((ushort*)path);
- }
- } else
- result.clear();
- tTitle.clear();
- } , {
- QString initDir = QDir::toNativeSeparators(initialDirectory);
- char path[MAX_PATH];
- char initPath[MAX_PATH];
- QByteArray ctitle = title.toLocal8Bit();
- initPath[0]=0;
- path[0]=0;
- BROWSEINFOA bi;
- bi.hwndOwner = (parent ? parent->winId() : 0);
- bi.pidlRoot = NULL;
- bi.lpszTitle = ctitle;
- bi.pszDisplayName = initPath;
- bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
- bi.lpfn = winGetExistDirCallbackProc;
- bi.lParam = Q_ULONG(&initDir);
- LPITEMIDLIST pItemIDList = SHBrowseForFolderA(&bi);
- if (pItemIDList) {
- SHGetPathFromIDListA(pItemIDList, path);
- IMalloc *pMalloc;
- if (SHGetMalloc(&pMalloc) != NOERROR)
- result.clear();
- else {
- pMalloc->Free(pItemIDList);
- pMalloc->Release();
- result = QString::fromLocal8Bit(path);
- }
- } else
+
+ QString initDir = QDir::toNativeSeparators(initialDirectory);
+ wchar_t path[MAX_PATH];
+ wchar_t initPath[MAX_PATH];
+ initPath[0] = 0;
+ path[0] = 0;
+ tTitle = title;
+ BROWSEINFO bi;
+ bi.hwndOwner = (parent ? parent->winId() : 0);
+ bi.pidlRoot = NULL;
+ bi.lpszTitle = (wchar_t*)tTitle.utf16();
+ bi.pszDisplayName = initPath;
+ bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
+ bi.lpfn = winGetExistDirCallbackProc;
+ bi.lParam = Q_ULONG(&initDir);
+ LPITEMIDLIST pItemIDList = SHBrowseForFolder(&bi);
+ if (pItemIDList) {
+ SHGetPathFromIDList(pItemIDList, path);
+ IMalloc *pMalloc;
+ if (SHGetMalloc(&pMalloc) != NOERROR)
result.clear();
- });
+ else {
+ pMalloc->Free(pItemIDList);
+ pMalloc->Release();
+ result = QString::fromWCharArray(path);
+ }
+ } else
+ result.clear();
+ tTitle.clear();
+
if (parent) {
QApplicationPrivate::leaveModal(parent);
QEvent e(QEvent::WindowUnblocked);
QApplication::sendEvent(parent, &e);
}
- // Due to a bug on Windows Me, we need to reset the current
- // directory
- if ((qWinVersion() == Qt::WV_98 || qWinVersion() == Qt::WV_Me) && QDir::currentDirPath() != currentDir)
- QDir::setCurrent(currentDir);
-
if (!result.isEmpty())
result.replace(QLatin1Char('\\'), QLatin1Char('/'));
return result;
diff --git a/src/qt3support/network/q3dns.cpp b/src/qt3support/network/q3dns.cpp
index b80b76b..6d514c1 100644
--- a/src/qt3support/network/q3dns.cpp
+++ b/src/qt3support/network/q3dns.cpp
@@ -2242,53 +2242,31 @@ typedef struct {
typedef DWORD (WINAPI *GNP)( PFIXED_INFO, PULONG );
// ### FIXME: this code is duplicated in qfiledialog.cpp
-static QString getWindowsRegString( HKEY key, const QString &subKey )
+static QString getWindowsRegString(HKEY key, const QString &subKey)
{
QString s;
- QT_WA( {
- char buf[1024];
- DWORD bsz = sizeof(buf);
- int r = RegQueryValueEx( key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)buf, &bsz );
- if ( r == ERROR_SUCCESS ) {
- s = QString::fromUcs2( (unsigned short *)buf );
- } else if ( r == ERROR_MORE_DATA ) {
- char *ptr = new char[bsz+1];
- r = RegQueryValueEx( key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)ptr, &bsz );
- if ( r == ERROR_SUCCESS )
- s = QLatin1String(ptr);
- delete [] ptr;
- }
- } , {
- char buf[512];
- DWORD bsz = sizeof(buf);
- int r = RegQueryValueExA( key, subKey.local8Bit(), 0, 0, (LPBYTE)buf, &bsz );
- if ( r == ERROR_SUCCESS ) {
- s = QLatin1String(buf);
- } else if ( r == ERROR_MORE_DATA ) {
- char *ptr = new char[bsz+1];
- r = RegQueryValueExA( key, subKey.local8Bit(), 0, 0, (LPBYTE)ptr, &bsz );
- if ( r == ERROR_SUCCESS )
- s = QLatin1String(ptr);
- delete [] ptr;
- }
- } );
+
+ wchar_t buf[1024];
+ DWORD bsz = sizeof(buf) / sizeof(wchar_t);
+ int r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)buf, &bsz);
+ if (r == ERROR_SUCCESS) {
+ s = QString::fromWCharArray(buf);
+ } else if (r == ERROR_MORE_DATA) {
+ char *ptr = new char[bsz+1];
+ r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)ptr, &bsz);
+ if (r == ERROR_SUCCESS)
+ s = QLatin1String(ptr);
+ delete [] ptr;
+ }
+
return s;
}
static bool getDnsParamsFromRegistry( const QString &path,
- QString *domainName, QString *nameServer, QString *searchList )
+ QString *domainName, QString *nameServer, QString *searchList )
{
HKEY k;
- int r;
- QT_WA( {
- r = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
- (TCHAR*)path.ucs2(),
- 0, KEY_READ, &k );
- } , {
- r = RegOpenKeyExA( HKEY_LOCAL_MACHINE,
- path.latin1(),
- 0, KEY_READ, &k );
- } );
+ int r = RegOpenKeyEx( HKEY_LOCAL_MACHINE, (wchar_t*)path.utf16(), 0, KEY_READ, &k );
if ( r == ERROR_SUCCESS ) {
*domainName = getWindowsRegString( k, QLatin1String("DhcpDomain") );
@@ -2321,14 +2299,10 @@ void Q3Dns::doResInit()
bool gotNetworkParams = false;
// try the API call GetNetworkParams() first and use registry lookup only
// as a fallback
-#ifdef Q_OS_WINCE
- HINSTANCE hinstLib = LoadLibraryW( L"iphlpapi" );
-#else
- HINSTANCE hinstLib = LoadLibraryA( "iphlpapi" );
-#endif
+ HINSTANCE hinstLib = LoadLibrary( L"iphlpapi" );
if ( hinstLib != 0 ) {
#ifdef Q_OS_WINCE
- GNP getNetworkParams = (GNP) GetProcAddressW( hinstLib, L"GetNetworkParams" );
+ GNP getNetworkParams = (GNP) GetProcAddress( hinstLib, L"GetNetworkParams" );
#else
GNP getNetworkParams = (GNP) GetProcAddress( hinstLib, "GetNetworkParams" );
#endif
@@ -2362,13 +2336,7 @@ void Q3Dns::doResInit()
if ( getDnsParamsFromRegistry(
QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters"),
&domainName, &nameServer, &searchList )) {
- // for NT
separator = ' ';
- } else if ( getDnsParamsFromRegistry(
- QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP"),
- &domainName, &nameServer, &searchList )) {
- // for Windows 98
- separator = ',';
} else {
// Could not access the TCP/IP parameters
domainName = QLatin1String("");
diff --git a/src/qt3support/network/q3http.cpp b/src/qt3support/network/q3http.cpp
index 59adc27..dba4e88 100644
--- a/src/qt3support/network/q3http.cpp
+++ b/src/qt3support/network/q3http.cpp
@@ -785,7 +785,7 @@ int Q3HttpResponseHeader::minorVersion() const
return minVer;
}
-/*! \reimp
+/*! \internal
*/
bool Q3HttpResponseHeader::parseLine( const QString& line, int number )
{
@@ -952,7 +952,7 @@ int Q3HttpRequestHeader::minorVersion() const
return minVer;
}
-/*! \reimp
+/*! \internal
*/
bool Q3HttpRequestHeader::parseLine( const QString& line, int number )
{
diff --git a/src/qt3support/network/q3socketdevice_win.cpp b/src/qt3support/network/q3socketdevice_win.cpp
index 926d699..a0f0c0f 100644
--- a/src/qt3support/network/q3socketdevice_win.cpp
+++ b/src/qt3support/network/q3socketdevice_win.cpp
@@ -47,20 +47,15 @@
#include <string.h>
+# include <qt_windows.h>
#if defined (QT_NO_IPV6)
-# include <windows.h>
# include <winsock.h>
#else
# if defined (Q_CC_BOR) || defined (Q_CC_GNU)
# include <winsock2.h>
-# elif defined (Q_CC_INTEL)
-# include <winsock.h>
# else
-# include <windows.h>
-# if defined(Q_OS_WINCE)
# include <winsock.h>
# endif
-# endif
// Use our own defines and structs which we know are correct
# define QT_SS_MAXSIZE 128
# define QT_SS_ALIGNSIZE (sizeof(__int64))
diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp
index 0c17e0c..93a6079 100644
--- a/src/qt3support/other/q3dragobject.cpp
+++ b/src/qt3support/other/q3dragobject.cpp
@@ -191,8 +191,7 @@ Q3DragObject::~Q3DragObject()
Set the pixmap, \a pm, to display while dragging the object. The
platform-specific implementation will use this where it can - so
provide a small masked pixmap, and do not assume that the user
- will actually see it. For example, cursors on Windows 95 are of
- limited size.
+ will actually see it.
The \a hotspot is the point on (or off) the pixmap that should be
under the cursor as it is dragged. It is relative to the top-left
@@ -553,10 +552,6 @@ QTextCodec* qt_findcharset(const QByteArray& mimetype)
i = cs.indexOf(';');
if (i >= 0)
cs = cs.left(i);
- // win98 often has charset=utf16, and we need to get the correct codec for
- // it to be able to get Unicode text drops.
- if (cs == "utf16")
- cs = "ISO-10646-UCS-2";
// May return 0 if unknown charset
return QTextCodec::codecForName(cs);
}
diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp
index 352e497..0952663 100644
--- a/src/qt3support/other/q3process_win.cpp
+++ b/src/qt3support/other/q3process_win.cpp
@@ -308,108 +308,60 @@ bool Q3Process::start( QStringList *env )
// CreateProcess()
bool success;
d->newPid();
-#ifdef UNICODE
- if (!(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)) {
- STARTUPINFOW startupInfo = {
- sizeof( STARTUPINFO ), 0, 0, 0,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- 0, 0, 0,
- STARTF_USESTDHANDLES,
- 0, 0, 0,
- d->pipeStdin[0], d->pipeStdout[1], d->pipeStderr[1]
- };
- TCHAR *applicationName;
- if ( appName.isNull() )
- applicationName = 0;
- else
- applicationName = _wcsdup( (TCHAR*)appName.ucs2() );
- TCHAR *commandLine = _wcsdup( (TCHAR*)args.ucs2() );
- QByteArray envlist;
- if ( env != 0 ) {
- int pos = 0;
- // add PATH if necessary (for DLL loading)
- QByteArray path = qgetenv( "PATH" );
- if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) {
- QString tmp = QString::fromLatin1("PATH=%1").arg(QLatin1String(path.constData()));
- uint tmpSize = sizeof(TCHAR) * (tmp.length()+1);
- envlist.resize( envlist.size() + tmpSize );
- memcpy( envlist.data()+pos, tmp.ucs2(), tmpSize );
- pos += tmpSize;
- }
- // add the user environment
- for ( QStringList::Iterator it = env->begin(); it != env->end(); it++ ) {
- QString tmp = *it;
- uint tmpSize = sizeof(TCHAR) * (tmp.length()+1);
- envlist.resize( envlist.size() + tmpSize );
- memcpy( envlist.data()+pos, tmp.ucs2(), tmpSize );
- pos += tmpSize;
- }
- // add the 2 terminating 0 (actually 4, just to be on the safe side)
- envlist.resize( envlist.size()+4 );
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- }
- success = CreateProcessW( applicationName, commandLine,
- 0, 0, TRUE, ( comms==0 ? CREATE_NEW_CONSOLE : CREATE_NO_WINDOW )
+
+ STARTUPINFOW startupInfo = {
+ sizeof( STARTUPINFO ), 0, 0, 0,
+ (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
+ 0, 0, 0,
+ STARTF_USESTDHANDLES,
+ 0, 0, 0,
+ d->pipeStdin[0], d->pipeStdout[1], d->pipeStderr[1]
+ };
+ wchar_t *applicationName;
+ if ( appName.isNull() )
+ applicationName = 0;
+ else
+ applicationName = _wcsdup( (wchar_t*)appName.utf16() );
+ wchar_t *commandLine = _wcsdup( (wchar_t*)args.utf16() );
+ QByteArray envlist;
+ if ( env != 0 ) {
+ int pos = 0;
+ // add PATH if necessary (for DLL loading)
+ QByteArray path = qgetenv( "PATH" );
+ if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) {
+ QString tmp = QString::fromLatin1("PATH=%1").arg(QLatin1String(path.constData()));
+ uint tmpSize = sizeof(wchar_t) * (tmp.length() + 1);
+ envlist.resize( envlist.size() + tmpSize );
+ memcpy( envlist.data() + pos, tmp.utf16(), tmpSize );
+ pos += tmpSize;
+ }
+ // add the user environment
+ for ( QStringList::Iterator it = env->begin(); it != env->end(); it++ ) {
+ QString tmp = *it;
+ uint tmpSize = sizeof(wchar_t) * (tmp.length() + 1);
+ envlist.resize( envlist.size() + tmpSize );
+ memcpy( envlist.data() + pos, tmp.utf16(), tmpSize );
+ pos += tmpSize;
+ }
+ // add the 2 terminating 0 (actually 4, just to be on the safe side)
+ envlist.resize( envlist.size()+4 );
+ envlist[pos++] = 0;
+ envlist[pos++] = 0;
+ envlist[pos++] = 0;
+ envlist[pos++] = 0;
+ }
+ success = CreateProcess( applicationName, commandLine,
+ 0, 0, TRUE, ( comms == 0 ? CREATE_NEW_CONSOLE : CREATE_NO_WINDOW )
#ifndef Q_OS_WINCE
- | CREATE_UNICODE_ENVIRONMENT
+ | CREATE_UNICODE_ENVIRONMENT
#endif
- , env==0 ? 0 : envlist.data(),
- (TCHAR*)QDir::toNativeSeparators(workingDir.absPath()).ucs2(),
- &startupInfo, d->pid );
- free( applicationName );
- free( commandLine );
- } else
-#endif // UNICODE
- {
-#ifndef Q_OS_WINCE
- STARTUPINFOA startupInfo = { sizeof( STARTUPINFOA ), 0, 0, 0,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- 0, 0, 0,
- STARTF_USESTDHANDLES,
- 0, 0, 0,
- d->pipeStdin[0], d->pipeStdout[1], d->pipeStderr[1]
- };
- QByteArray envlist;
- if ( env != 0 ) {
- int pos = 0;
- // add PATH if necessary (for DLL loading)
- QByteArray path = qgetenv( "PATH" );
- if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) {
- Q3CString tmp = QString::fromLatin1("PATH=%1").arg(QString::fromLatin1(path.constData())).local8Bit();
- uint tmpSize = tmp.length() + 1;
- envlist.resize( envlist.size() + tmpSize );
- memcpy( envlist.data()+pos, tmp.data(), tmpSize );
- pos += tmpSize;
- }
- // add the user environment
- for ( QStringList::Iterator it = env->begin(); it != env->end(); it++ ) {
- Q3CString tmp = (*it).local8Bit();
- uint tmpSize = tmp.length() + 1;
- envlist.resize( envlist.size() + tmpSize );
- memcpy( envlist.data()+pos, tmp.data(), tmpSize );
- pos += tmpSize;
- }
- // add the terminating 0 (actually 2, just to be on the safe side)
- envlist.resize( envlist.size()+2 );
- envlist[pos++] = 0;
- envlist[pos++] = 0;
- }
- char *applicationName;
- if ( appName.isNull() )
- applicationName = 0;
- else
- applicationName = const_cast<char *>(appName.toLocal8Bit().data());
- success = CreateProcessA( applicationName,
- const_cast<char *>(args.toLocal8Bit().data()),
- 0, 0, TRUE, comms==0 ? CREATE_NEW_CONSOLE : DETACHED_PROCESS,
- env==0 ? 0 : envlist.data(),
- (const char*)QDir::toNativeSeparators(workingDir.absPath()).local8Bit(),
- &startupInfo, d->pid );
-#endif // Q_OS_WINCE
- }
+ , env == 0 ? 0 : envlist.data(),
+ (wchar_t*)QDir::toNativeSeparators(workingDir.absPath()).utf16(),
+ &startupInfo, d->pid );
+
+ free( applicationName );
+ free( commandLine );
+
if ( !success ) {
d->deletePid();
return false;
diff --git a/src/qt3support/sql/q3datatable.cpp b/src/qt3support/sql/q3datatable.cpp
index 638aff8..d8d3c2b 100644
--- a/src/qt3support/sql/q3datatable.cpp
+++ b/src/qt3support/sql/q3datatable.cpp
@@ -1726,8 +1726,6 @@ void Q3DataTable::repaintCell( int row, int col )
the content coordinate system. If \a selected is true the cell has
been selected and would normally be rendered differently than an
unselected cell.
-
- \sa QSql::isNull()
*/
void Q3DataTable::paintCell( QPainter * p, int row, int col, const QRect & cr,
diff --git a/src/qt3support/tools/q3cstring.cpp b/src/qt3support/tools/q3cstring.cpp
index 39f1c43..b33b9b6 100644
--- a/src/qt3support/tools/q3cstring.cpp
+++ b/src/qt3support/tools/q3cstring.cpp
@@ -77,11 +77,23 @@ QT_BEGIN_NAMESPACE
and '\0' (NUL byte) terminated; otherwise the results are
undefined.
- A Q3CString that has not been assigned to anything is \e null, i.e.
- both the length and the data pointer is 0. A Q3CString that
- references the empty string ("", a single '\0' char) is \e empty.
- Both null and empty Q3CStrings are legal parameters to the methods.
- Assigning \c{const char *} 0 to Q3CString produces a null Q3CString.
+ A default constructed Q3CString is \e null, i.e. both the length
+ and the data pointer are 0 and isNull() returns true.
+
+ \note However, if you ask for the data pointer of a null Q3CString
+ by calling data(), then because the internal representation of the
+ null Q3CString is shared, it will be detached and replaced with a
+ non-shared, empty representation, a non-null data pointer will be
+ returned, and subsequent calls to isNull() will return false. But
+ if you ask for the data pointer of a null Q3CString by calling
+ constData(), the shared internal representation is not detached, a
+ null data pointer is returned, and subsequent calls to isNull()
+ will continue to return true.
+
+ A Q3CString that references the empty string ("", a single '\0'
+ char) is \e empty, i.e. isEmpty() returns true. Both null and
+ empty Q3CStrings are legal parameters to the methods. Assigning
+ \c{const char *} 0 to Q3CString produces a null Q3CString.
The length() function returns the length of the string; resize()
resizes the string and truncate() truncates the string. A string
@@ -321,6 +333,16 @@ QT_BEGIN_NAMESPACE
Returns true if the string is null, i.e. if data() == 0; otherwise
returns false. A null string is also an empty string.
+ \note If you ask for the data pointer of a null Q3CString by
+ calling data(), then because the internal representation of the
+ null Q3CString is shared, it will be detached and replaced with a
+ non-shared, empty representation, a non-null data pointer will be
+ returned, and subsequent calls to isNull() will return false. But
+ if you ask for the data pointer of a null Q3CString by calling
+ constData(), the shared internal representation is not detached, a
+ null data pointer is returned, and subsequent calls to isNull()
+ will continue to return true.
+
Example:
\snippet doc/src/snippets/code/src.qt3support.tools.q3cstring.cpp 1
diff --git a/src/qt3support/widgets/q3datetimeedit.cpp b/src/qt3support/widgets/q3datetimeedit.cpp
index b6e303c..71a8ffd 100644
--- a/src/qt3support/widgets/q3datetimeedit.cpp
+++ b/src/qt3support/widgets/q3datetimeedit.cpp
@@ -114,39 +114,21 @@ static void readLocaleSettings()
lTimeSep = new QString();
#if defined(Q_WS_WIN)
- QT_WA({
- TCHAR data[10];
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, data, 10);
- *lDateSep = QString::fromUtf16((ushort*)data);
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, data, 10);
- *lTimeSep = QString::fromUtf16((ushort*)data);
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, data, 10);
- lAMPM = QString::fromUtf16((ushort*)data).toInt()==0;
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, data, 10);
- QString am = QString::fromUtf16((ushort*)data);
- if (!am.isEmpty())
- lAM = new QString(am);
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, data, 10);
- QString pm = QString::fromUtf16((ushort*)data);
- if (!pm.isEmpty() )
- lPM = new QString(pm);
- } , {
- char data[10];
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDATE, (char*)&data, 10);
- *lDateSep = QString::fromLocal8Bit(data);
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_STIME, (char*)&data, 10);
- *lTimeSep = QString::fromLocal8Bit(data);
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ITIME, (char*)&data, 10);
- lAMPM = QString::fromLocal8Bit(data).toInt()==0;
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_S1159, (char*)&data, 10);
- QString am = QString::fromLocal8Bit(data);
- if (!am.isEmpty())
- lAM = new QString(am);
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_S2359, (char*)&data, 10);
- QString pm = QString::fromLocal8Bit(data);
- if (!pm.isEmpty())
- lPM = new QString(pm);
- });
+ wchar_t data[10];
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, data, 10);
+ *lDateSep = QString::fromWCharArray(data);
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, data, 10);
+ *lTimeSep = QString::fromWCharArray(data);
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, data, 10);
+ lAMPM = QString::fromWCharArray(data).toInt() == 0;
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, data, 10);
+ QString am = QString::fromWCharArray(data);
+ if (!am.isEmpty())
+ lAM = new QString(am);
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, data, 10);
+ QString pm = QString::fromWCharArray(data);
+ if (!pm.isEmpty() )
+ lPM = new QString(pm);
#else
*lDateSep = QLatin1Char('-');
*lTimeSep = QLatin1Char(':');
@@ -1262,7 +1244,7 @@ Q3DateEdit::Order Q3DateEdit::order() const
}
-/*! \reimp
+/*! \internal
*/
void Q3DateEdit::stepUp()
@@ -1294,7 +1276,7 @@ void Q3DateEdit::stepUp()
-/*! \reimp
+/*! \internal
*/
@@ -1458,7 +1440,7 @@ bool Q3DateEdit::outOfRange(int y, int m, int d) const
return false; /* assume ok */
}
-/*! \reimp
+/*! \internal
*/
@@ -1552,7 +1534,7 @@ void Q3DateEdit::addNumber(int sec, int num)
}
-/*! \reimp
+/*! \internal
*/
@@ -1699,7 +1681,7 @@ void Q3DateEdit::removeFirstNumber(int sec)
d->ed->repaint(d->ed->rect());
}
-/*! \reimp
+/*! \internal
*/
@@ -2077,7 +2059,7 @@ void Q3TimeEdit::timerEvent(QTimerEvent *)
}
-/*! \reimp
+/*! \internal
*/
@@ -2123,7 +2105,7 @@ void Q3TimeEdit::stepUp()
}
-/*! \reimp
+/*! \internal
*/
@@ -2191,7 +2173,7 @@ QString Q3TimeEdit::sectionFormattedText(int sec)
}
-/*! \reimp
+/*! \internal
*/
@@ -2326,7 +2308,7 @@ bool Q3TimeEdit::outOfRange(int h, int m, int s) const
return true;
}
-/*! \reimp
+/*! \internal
*/
@@ -2495,7 +2477,7 @@ void Q3TimeEdit::removeFirstNumber(int sec)
d->ed->repaint(d->ed->rect());
}
-/*! \reimp
+/*! \internal
*/
void Q3TimeEdit::removeLastNumber(int sec)
@@ -2666,13 +2648,12 @@ Q3DateTimeEdit::~Q3DateTimeEdit()
}
-/*!
+/*! \fn void Q3DateTimeEdit::resizeEvent(QResizeEvent *event)
\reimp
- Intercepts and handles resize events which have special meaning
- for the Q3DateTimeEdit.
+ Intercepts and handles the resize \a event, which hase a
+ special meaning for the Q3DateTimeEdit.
*/
-
void Q3DateTimeEdit::resizeEvent(QResizeEvent *)
{
int dw = de->sizeHint().width();
diff --git a/src/qt3support/widgets/q3dockarea.cpp b/src/qt3support/widgets/q3dockarea.cpp
index a00bc81..a823caa 100644
--- a/src/qt3support/widgets/q3dockarea.cpp
+++ b/src/qt3support/widgets/q3dockarea.cpp
@@ -473,24 +473,25 @@ int Q3DockAreaLayout::widthForHeight(int h) const
contain Q3ToolBars since Q3ToolBar is a Q3DockWindow subclass.
QMainWindow contains four Q3DockAreas which you can use for your
- Q3ToolBars and Q3DockWindows, so in most situations you do not need
- to use the Q3DockArea class directly. Although QMainWindow contains
- support for its own dock areas it isn't convenient for adding new
- Q3DockAreas. If you need to create your own dock areas we suggest
- that you create a subclass of QWidget and add your Q3DockAreas to
- your subclass.
+ Q3ToolBars and Q3DockWindows, so in most situations you do not
+ need to use the Q3DockArea class directly. Although QMainWindow
+ contains support for its own dock areas, you can't add new ones.
+ You also can't add a Q3DockArea to your own subclass of QWidget.
+ It won't be shown.
\img qmainwindow-qdockareas.png QMainWindow's Q3DockAreas
\target lines
- \e Lines. Q3DockArea uses the concept of lines. A line is a
- horizontal region which may contain dock windows side-by-side. A
- dock area may have room for more than one line. When dock windows
- are docked into a dock area they are usually added at the right
- hand side of the top-most line that has room (unless manually
- placed by the user). When users move dock windows they may leave
- empty lines or gaps in non-empty lines. Qt::Dock windows can be lined
- up to minimize wasted space using the lineUp() function.
+ \section2 Lines.
+
+ Q3DockArea uses the concept of lines. A line is a horizontal
+ region which may contain dock windows side-by-side. A dock area
+ may have room for more than one line. When dock windows are docked
+ into a dock area they are usually added at the right hand side of
+ the top-most line that has room (unless manually placed by the
+ user). When users move dock windows they may leave empty lines or
+ gaps in non-empty lines. Qt::Dock windows can be lined up to
+ minimize wasted space using the lineUp() function.
The Q3DockArea class maintains a position list of all its child
dock windows. Qt::Dock windows are added to a dock area from position
diff --git a/src/qt3support/widgets/q3titlebar.cpp b/src/qt3support/widgets/q3titlebar.cpp
index a05e4e5..ee3decf 100644
--- a/src/qt3support/widgets/q3titlebar.cpp
+++ b/src/qt3support/widgets/q3titlebar.cpp
@@ -173,35 +173,20 @@ void Q3TitleBarPrivate::readColors()
bool colorsInitialized = false;
#ifdef Q_WS_WIN // ask system properties on windows
-#ifndef SPI_GETGRADIENTCAPTIONS
-#define SPI_GETGRADIENTCAPTIONS 0x1008
-#endif
-#ifndef COLOR_GRADIENTACTIVECAPTION
-#define COLOR_GRADIENTACTIVECAPTION 27
-#endif
-#ifndef COLOR_GRADIENTINACTIVECAPTION
-#define COLOR_GRADIENTINACTIVECAPTION 28
-#endif
if (QApplication::desktopSettingsAware()) {
pal.setColor(QPalette::Active, QPalette::Highlight, colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION)));
pal.setColor(QPalette::Inactive, QPalette::Highlight, colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION)));
pal.setColor(QPalette::Active, QPalette::HighlightedText, colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)));
pal.setColor(QPalette::Inactive, QPalette::HighlightedText, colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)));
- if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
- colorsInitialized = true;
- BOOL gradient;
- QT_WA({
- SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
- } , {
- SystemParametersInfoA(SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
- });
- if (gradient) {
- pal.setColor(QPalette::Active, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTACTIVECAPTION)));
- pal.setColor(QPalette::Inactive, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTINACTIVECAPTION)));
- } else {
- pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Active, QPalette::Highlight));
- pal.setColor(QPalette::Inactive, QPalette::Base, pal.color(QPalette::Inactive, QPalette::Highlight));
- }
+ colorsInitialized = true;
+ BOOL gradient = false;
+ SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
+ if (gradient) {
+ pal.setColor(QPalette::Active, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTACTIVECAPTION)));
+ pal.setColor(QPalette::Inactive, QPalette::Base, colorref2qrgb(GetSysColor(COLOR_GRADIENTINACTIVECAPTION)));
+ } else {
+ pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Active, QPalette::Highlight));
+ pal.setColor(QPalette::Inactive, QPalette::Base, pal.color(QPalette::Inactive, QPalette::Highlight));
}
}
#endif // Q_WS_WIN
diff --git a/src/script/qscriptvalue.cpp b/src/script/qscriptvalue.cpp
index 97ce61a..48e1318 100644
--- a/src/script/qscriptvalue.cpp
+++ b/src/script/qscriptvalue.cpp
@@ -574,9 +574,11 @@ void QScriptValue::setPrototype(const QScriptValue &prototype)
}
/*!
- Returns the scope object of this QScriptValue. This function is only
- relevant for function objects. The scope determines how variables are
- resolved when the function is invoked.
+ \since 4.6
+
+ Returns the scope object of this QScriptValue. This function is only
+ relevant for function objects. The scope determines how variables are
+ resolved when the function is invoked.
*/
QScriptValue QScriptValue::scope() const
{
@@ -588,9 +590,11 @@ QScriptValue QScriptValue::scope() const
}
/*!
- Sets the \a scope object of this QScriptValue. This function is only
- relevant for function objects. Changing the scope is useful when creating
- closures; see \l{Nested Functions and the Scope Chain}.
+ \since 4.6
+
+ Sets the \a scope object of this QScriptValue. This function is only
+ relevant for function objects. Changing the scope is useful when creating
+ closures; see \l{Nested Functions and the Scope Chain}.
*/
void QScriptValue::setScope(const QScriptValue &scope)
{
diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
index 1324c01..92fa36c 100644
--- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
@@ -460,7 +460,7 @@ void QScriptDebuggerScriptedConsoleCommandJob::handleResponse(
}
/*!
- \reimp
+ \internal
*/
QString QScriptDebuggerScriptedConsoleCommand::name() const
{
@@ -469,7 +469,7 @@ QString QScriptDebuggerScriptedConsoleCommand::name() const
}
/*!
- \reimp
+ \internal
*/
QString QScriptDebuggerScriptedConsoleCommand::group() const
{
@@ -478,7 +478,7 @@ QString QScriptDebuggerScriptedConsoleCommand::group() const
}
/*!
- \reimp
+ \internal
*/
QString QScriptDebuggerScriptedConsoleCommand::shortDescription() const
{
@@ -487,7 +487,7 @@ QString QScriptDebuggerScriptedConsoleCommand::shortDescription() const
}
/*!
- \reimp
+ \internal
*/
QString QScriptDebuggerScriptedConsoleCommand::longDescription() const
{
@@ -496,7 +496,7 @@ QString QScriptDebuggerScriptedConsoleCommand::longDescription() const
}
/*!
- \reimp
+ \internal
*/
QStringList QScriptDebuggerScriptedConsoleCommand::aliases() const
{
@@ -505,7 +505,7 @@ QStringList QScriptDebuggerScriptedConsoleCommand::aliases() const
}
/*!
- \reimp
+ \internal
*/
QStringList QScriptDebuggerScriptedConsoleCommand::seeAlso() const
{
@@ -514,7 +514,7 @@ QStringList QScriptDebuggerScriptedConsoleCommand::seeAlso() const
}
/*!
- \reimp
+ \internal
*/
QStringList QScriptDebuggerScriptedConsoleCommand::argumentTypes() const
{
@@ -523,7 +523,7 @@ QStringList QScriptDebuggerScriptedConsoleCommand::argumentTypes() const
}
/*!
- \reimp
+ \internal
*/
QStringList QScriptDebuggerScriptedConsoleCommand::subCommands() const
{
@@ -532,7 +532,7 @@ QStringList QScriptDebuggerScriptedConsoleCommand::subCommands() const
}
/*!
- \reimp
+ \internal
*/
QScriptDebuggerConsoleCommandJob *QScriptDebuggerScriptedConsoleCommand::createJob(
const QStringList &arguments,
diff --git a/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp b/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp
index c5e21ef..5b58c52 100644
--- a/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp
+++ b/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp
@@ -323,7 +323,7 @@ QScriptDebuggerBackend *QScriptEngineDebuggerFrontend::backend() const
}
/*!
- \reimp
+ \internal
*/
void QScriptEngineDebuggerFrontend::processCommand(int id, const QScriptDebuggerCommand &command)
{
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp
index 1a82377..474c53d 100644
--- a/src/sql/drivers/db2/qsql_db2.cpp
+++ b/src/sql/drivers/db2/qsql_db2.cpp
@@ -51,10 +51,6 @@
#include <qvector.h>
#include <QDebug>
-#ifndef UNICODE
-#define UNICODE
-#endif
-
#if defined(Q_CC_BOR)
// DB2's sqlsystm.h (included through sqlcli1.h) defines the SQL_BIGINT_TYPE
// and SQL_BIGUINT_TYPE to wrong the types for Borland; so do the defines to
@@ -63,6 +59,8 @@
#define SQL_BIGUINT_TYPE quint64
#endif
+#define UNICODE
+
#include <sqlcli1.h>
#include <string.h>
@@ -111,22 +109,14 @@ public:
static QString qFromTChar(SQLTCHAR* str)
{
-#ifdef UNICODE
return QString::fromUtf16(str);
-#else
- return QString::fromLocal8Bit((const char*) str);
-#endif
}
// dangerous!! (but fast). Don't use in functions that
// require out parameters!
static SQLTCHAR* qToTChar(const QString& str)
{
-#ifdef UNICODE
return (SQLTCHAR*)str.utf16();
-#else
- return (unsigned char*) str.ascii();
-#endif
}
static QString qWarnDB2Handle(int handleType, SQLHANDLE handle)
@@ -347,12 +337,8 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool& is
while (true) {
r = SQLGetData(hStmt,
- column+1,
-#ifdef UNICODE
+ column + 1,
SQL_C_WCHAR,
-#else
- SQL_C_CHAR,
-#endif
(SQLPOINTER)buf,
colSize * sizeof(SQLTCHAR),
&lengthIndicator);
@@ -740,7 +726,6 @@ bool QDB2Result::exec()
ind);
break; }
case QVariant::String:
-#ifdef UNICODE
{
QString str(values.at(i).toString());
if (*ind != SQL_NULL_DATA)
@@ -774,8 +759,6 @@ bool QDB2Result::exec()
}
break;
}
-#endif
- // fall through
default: {
QByteArray ba = values.at(i).toString().toAscii();
int len = ba.length() + 1;
@@ -849,12 +832,9 @@ bool QDB2Result::exec()
case QVariant::ByteArray:
break;
case QVariant::String:
-#ifdef UNICODE
if (bindValueType(i) & QSql::Out)
values[i] = QString::fromUtf16((ushort*)tmpStorage.takeFirst().constData());
break;
-#endif
- // fall through
default: {
values[i] = QString::fromAscii(tmpStorage.takeFirst().constData());
break; }
@@ -1542,13 +1522,7 @@ bool QDB2Driver::hasFeature(DriverFeature f) const
case FinishQuery:
return true;
case Unicode:
- // this is the query that shows the codepage for the types:
- // select typename, codepage from syscat.datatypes
-#ifdef UNICODE
return true;
-#else
- return false;
-#endif
}
return false;
}
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index d5fb10f..617f116 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -609,7 +609,7 @@ static QSqlField qFromOraInf(const OraFieldInfo &ofi)
QSqlField f(ofi.name, ofi.type);
f.setRequired(ofi.oraIsNull == 0);
- if (ofi.type == QVariant::String)
+ if (ofi.type == QVariant::String && ofi.oraType != SQLT_NUM && ofi.oraType != SQLT_VNU)
f.setLength(ofi.oraFieldLength);
else
f.setLength(ofi.oraPrecision == 0 ? 38 : int(ofi.oraPrecision));
@@ -1586,9 +1586,12 @@ void QOCICols::getValues(QVector<QVariant> &v, int index)
} else if ((d->q->numericalPrecisionPolicy() == QSql::LowPrecisionInt64)
&& (fld.typ == QVariant::LongLong)) {
qint64 qll = 0;
- OCINumberToInt(d->err, reinterpret_cast<OCINumber *>(fld.data), sizeof(qint64),
+ int r = OCINumberToInt(d->err, reinterpret_cast<OCINumber *>(fld.data), sizeof(qint64),
OCI_NUMBER_SIGNED, &qll);
- v[index + i] = qll;
+ if(r == OCI_SUCCESS)
+ v[index + i] = qll;
+ else
+ v[index + i] = QVariant();
break;
} else if ((d->q->numericalPrecisionPolicy() == QSql::LowPrecisionInt32)
&& (fld.typ == QVariant::Int)) {
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 6ceee82..2df0073 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -89,7 +89,8 @@ public:
enum DefaultCase{Lower, Mixed, Upper, Sensitive};
QODBCDriverPrivate()
: hEnv(0), hDbc(0), useSchema(false), disconnectCount(0), isMySqlServer(false),
- isMSSqlServer(false), hasSQLFetchScroll(true), hasMultiResultSets(false)
+ isMSSqlServer(false), hasSQLFetchScroll(true), hasMultiResultSets(false),
+ isQuoteInitialized(false), quote(QLatin1Char('"'))
{
unicode = false;
}
@@ -116,7 +117,10 @@ public:
QString &schema, QString &table);
DefaultCase defaultCase() const;
QString adjustCase(const QString&) const;
- QChar quoteChar() const;
+ QChar quoteChar();
+private:
+ bool isQuoteInitialized;
+ QChar quote;
};
class QODBCPrivate
@@ -255,9 +259,11 @@ static QVariant::Type qDecodeODBCType(SQLSMALLINT sqltype, const T* p, bool isSi
case SQL_SMALLINT:
case SQL_INTEGER:
case SQL_BIT:
- case SQL_TINYINT:
type = isSigned ? QVariant::Int : QVariant::UInt;
break;
+ case SQL_TINYINT:
+ type = QVariant::UInt;
+ break;
case SQL_BIGINT:
type = isSigned ? QVariant::LongLong : QVariant::ULongLong;
break;
@@ -564,10 +570,8 @@ static int qGetODBCVersion(const QString &connOpts)
return SQL_OV_ODBC2;
}
-QChar QODBCDriverPrivate::quoteChar() const
+QChar QODBCDriverPrivate::quoteChar()
{
- static bool isQuoteInitialized = false;
- static QChar quote = QChar::fromLatin1('"');
if (!isQuoteInitialized) {
char driverResponse[4];
SQLSMALLINT length;
@@ -577,9 +581,9 @@ QChar QODBCDriverPrivate::quoteChar() const
sizeof(driverResponse),
&length);
if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) {
- quote = QChar::fromLatin1(driverResponse[0]);
+ quote = QLatin1Char(driverResponse[0]);
} else {
- quote = QChar::fromLatin1('"');
+ quote = QLatin1Char('"');
}
isQuoteInitialized = true;
}
@@ -1111,7 +1115,7 @@ QVariant QODBCResult::data(int field)
d->fieldCache[i] = qGetBinaryData(d->hStmt, i);
break;
case QVariant::String:
- d->fieldCache[i] = qGetStringData(d->hStmt, i, info.length(), true);
+ d->fieldCache[i] = qGetStringData(d->hStmt, i, info.length(), d->unicode);
break;
case QVariant::Double:
switch(numericalPrecisionPolicy()) {
@@ -1536,6 +1540,7 @@ bool QODBCResult::exec()
values[i] = QVariant(QDateTime(QDate(dt.year, dt.month, dt.day),
QTime(dt.hour, dt.minute, dt.second, dt.fraction / 1000000)));
break; }
+ case QVariant::Bool:
case QVariant::Int:
case QVariant::UInt:
case QVariant::Double:
@@ -1778,7 +1783,7 @@ bool QODBCDriver::open(const QString & db,
if (!d->checkDriver()) {
setLastError(qMakeError(tr("Unable to connect - Driver doesn't support all "
- "needed functionality"), QSqlError::ConnectionError, d));
+ "functionality required"), QSqlError::ConnectionError, d));
setOpenError(true);
return false;
}
@@ -1842,14 +1847,7 @@ void QODBCDriverPrivate::checkUnicode()
unicode = false;
return;
#endif
-#if defined(Q_WS_WIN)
- QT_WA(
- {},
- {
- unicode = false;
- return;
- })
-#endif
+
SQLRETURN r;
SQLUINTEGER fFunc;
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 0c92013..c61c526 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -54,11 +54,33 @@
#include <qstringlist.h>
#include <qmutex.h>
+
#include <libpq-fe.h>
#include <pg_config.h>
#include <stdlib.h>
#include <math.h>
+// below code taken from an example at http://www.gnu.org/software/hello/manual/autoconf/Function-Portability.html
+#ifndef isnan
+ # define isnan(x) \
+ (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
+ : sizeof (x) == sizeof (double) ? isnan_d (x) \
+ : isnan_f (x))
+ static inline int isnan_f (float x) { return x != x; }
+ static inline int isnan_d (double x) { return x != x; }
+ static inline int isnan_ld (long double x) { return x != x; }
+#endif
+
+#ifndef isinf
+ # define isinf(x) \
+ (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
+ : sizeof (x) == sizeof (double) ? isinf_d (x) \
+ : isinf_f (x))
+ static inline int isinf_f (float x) { return isnan (x - x); }
+ static inline int isinf_d (double x) { return isnan (x - x); }
+ static inline int isinf_ld (long double x) { return isnan (x - x); }
+#endif
+
// workaround for postgres defining their OIDs in a private header file
#define QBOOLOID 16
@@ -601,10 +623,9 @@ static QPSQLDriver::Protocol getPSQLVersion(PGconn* connection)
{
QPSQLDriver::Protocol serverVersion = QPSQLDriver::Version6;
PGresult* result = PQexec(connection, "select version()");
- int status = PQresultStatus(result);
+ int status = PQresultStatus(result);
if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK) {
QString val = QString::fromAscii(PQgetvalue(result, 0, 0));
- PQclear(result);
QRegExp rx(QLatin1String("(\\d+)\\.(\\d+)"));
rx.setMinimal(true); // enforce non-greedy RegExp
if (rx.indexIn(val) != -1) {
@@ -645,6 +666,7 @@ static QPSQLDriver::Protocol getPSQLVersion(PGconn* connection)
}
}
}
+ PQclear(result);
if (serverVersion < QPSQLDriver::Version71)
qWarning("This version of PostgreSQL is not supported and may not work.");
@@ -1161,6 +1183,21 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
qPQfreemem(data);
break;
}
+ case QVariant::Double: {
+ double val = field.value().toDouble();
+ if (isnan(val))
+ r = QLatin1String("'NaN'");
+ else {
+ int res = isinf(val);
+ if (res == 1)
+ r = QLatin1String("'Infinity'");
+ else if (res == -1)
+ r = QLatin1String("'-Infinity'");
+ else
+ r = QSqlDriver::formatValue(field, trimStrings);
+ }
+ break;
+ }
default:
r = QSqlDriver::formatValue(field, trimStrings);
break;
@@ -1265,15 +1302,15 @@ QStringList QPSQLDriver::subscribedToNotificationsImplementation() const
void QPSQLDriver::_q_handleNotification(int)
{
PQconsumeInput(d->connection);
- PGnotify *notify = PQnotifies(d->connection);
- if (notify) {
- QString name(QLatin1String(notify->relname));
+ PGnotify *notify = 0;
+ while((notify = PQnotifies(d->connection)) != 0) {
+ QString name(QLatin1String(notify->relname));
if (d->seid.contains(name))
emit notification(name);
else
qWarning("QPSQLDriver: received notification for '%s' which isn't subscribed to.",
- qPrintable(name));
+ qPrintable(name));
qPQfreemem(notify);
}
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp
index 1989c45..d30e82c 100644
--- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp
@@ -388,7 +388,7 @@ bool QSQLite2Driver::open(const QString & db, const QString &, const QString &,
char* err = 0;
d->access = sqlite_open(QFile::encodeName(db), 0, &err);
if (err) {
- setLastError(QSqlError(tr("Error to open database"), QString::fromAscii(err),
+ setLastError(QSqlError(tr("Error opening database"), QString::fromAscii(err),
QSqlError::ConnectionError));
sqlite_freemem(err);
err = 0;
@@ -463,7 +463,7 @@ bool QSQLite2Driver::rollbackTransaction()
if (res == SQLITE_OK)
return true;
- setLastError(QSqlError(tr("Unable to rollback Transaction"),
+ setLastError(QSqlError(tr("Unable to rollback transaction"),
QString::fromAscii(err), QSqlError::TransactionError, res));
sqlite_freemem(err);
return false;
diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp
index ca51dc0..13e6d82 100644
--- a/src/sql/kernel/qsqlcachedresult.cpp
+++ b/src/sql/kernel/qsqlcachedresult.cpp
@@ -184,8 +184,11 @@ bool QSqlCachedResult::fetch(int i)
if (d->rowCacheEnd > 0)
setAt(d->cacheCount());
while (at() < i + 1) {
- if (!cacheNext())
+ if (!cacheNext()) {
+ if (d->canSeek(i))
+ break;
return false;
+ }
}
setAt(i);
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 5aef39e..4950303 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -1481,18 +1481,21 @@ QString QSqlDatabase::connectionName() const
}
/*!
- Sets the default numerical precision policy used by queries created
- on this database connection to \a precisionPolicy.
+ \since 4.6
- Note: Drivers that don't support fetching numerical values with low
- precision will ignore the precision policy. You can use
- QSqlDriver::hasFeature() to find out whether a driver supports this
- feature.
+ Sets the default numerical precision policy used by queries created
+ on this database connection to \a precisionPolicy.
- Note: Setting the default precision policy to \a precisionPolicy
- doesn't affect any currently active queries.
+ Note: Drivers that don't support fetching numerical values with low
+ precision will ignore the precision policy. You can use
+ QSqlDriver::hasFeature() to find out whether a driver supports this
+ feature.
- \sa QSql::NumericalPrecisionPolicy, numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy()
+ Note: Setting the default precision policy to \a precisionPolicy
+ doesn't affect any currently active queries.
+
+ \sa QSql::NumericalPrecisionPolicy, numericalPrecisionPolicy(),
+ QSqlQuery::setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy()
*/
void QSqlDatabase::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy)
{
@@ -1502,9 +1505,12 @@ void QSqlDatabase::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy pr
}
/*!
- Returns the current default precision policy for the database connection.
+ \since 4.6
+
+ Returns the current default precision policy for the database connection.
- \sa QSql::NumericalPrecisionPolicy, setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy()
+ \sa QSql::NumericalPrecisionPolicy, setNumericalPrecisionPolicy(),
+ QSqlQuery::numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy()
*/
QSql::NumericalPrecisionPolicy QSqlDatabase::numericalPrecisionPolicy() const
{
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index 77e389f..ca0da66 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -865,6 +865,8 @@ QStringList QSqlDriver::subscribedToNotificationsImplementation() const
}
/*!
+ \since 4.6
+
This slot returns whether \a identifier is escaped according to the database rules.
\a identifier can either be a table name or field name, dependent
on \a type.
@@ -876,7 +878,6 @@ QStringList QSqlDriver::subscribedToNotificationsImplementation() const
slot in your own QSqlDriver if your database engine uses a different
delimiter character.
- \since 4.5
\sa isIdentifierEscaped()
*/
bool QSqlDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType type) const
@@ -888,6 +889,8 @@ bool QSqlDriver::isIdentifierEscapedImplementation(const QString &identifier, Id
}
/*!
+ \since 4.6
+
This slot returns \a identifier with the leading and trailing delimiters removed,
\a identifier can either be a tablename or field name, dependent on \a type.
If \a identifier does not have leading and trailing delimiter characters, \a
@@ -898,7 +901,6 @@ bool QSqlDriver::isIdentifierEscapedImplementation(const QString &identifier, Id
dynamically detect and call \e this slot. It generally unnecessary
to reimplement this slot.
- \since 4.5
\sa stripDelimiters()
*/
QString QSqlDriver::stripDelimitersImplementation(const QString &identifier, IdentifierType type) const
@@ -914,13 +916,16 @@ QString QSqlDriver::stripDelimitersImplementation(const QString &identifier, Ide
}
/*!
- Sets the default numerical precision policy used by queries created
- by this driver to \a precisionPolicy.
+ \since 4.6
+
+ Sets the default numerical precision policy used by queries created
+ by this driver to \a precisionPolicy.
- Note: Setting the default precision policy to \a precisionPolicy
- doesn't affect any currently active queries.
+ Note: Setting the default precision policy to \a precisionPolicy
+ doesn't affect any currently active queries.
- \sa QSql::NumericalPrecisionPolicy, numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy()
+ \sa QSql::NumericalPrecisionPolicy, numericalPrecisionPolicy(),
+ QSqlQuery::setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy()
*/
void QSqlDriver::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy)
{
@@ -928,9 +933,12 @@ void QSqlDriver::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy prec
}
/*!
- Returns the current default precision policy for the database connection.
+ \since 4.6
+
+ Returns the current default precision policy for the database connection.
- \sa QSql::NumericalPrecisionPolicy, setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy()
+ \sa QSql::NumericalPrecisionPolicy, setNumericalPrecisionPolicy(),
+ QSqlQuery::numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy()
*/
QSql::NumericalPrecisionPolicy QSqlDriver::numericalPrecisionPolicy() const
{
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 156af26..4315a8c 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -205,7 +205,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement,
editQuery.addBindValue(rec.value(i));
}
for (i = 0; i < whereValues.count(); ++i) {
- if (whereValues.isGenerated(i))
+ if (whereValues.isGenerated(i) && !whereValues.isNull(i))
editQuery.addBindValue(whereValues.value(i));
}
@@ -538,6 +538,7 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in
isOk = updateRowInTable(index.row(), d->editBuffer);
if (isOk)
select();
+ emit dataChanged(index, index);
break; }
case OnRowChange:
if (index.row() == d->insertIndex) {
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 345dcf3..5f9d1dd 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -68,6 +68,7 @@
QT_BEGIN_NAMESPACE
+
double qstrtod(const char *s00, char const **se, bool *ok);
static bool parsePathDataFast(const QStringRef &data, QPainterPath &path);
@@ -320,6 +321,7 @@ static qreal toDouble(const QChar *&str)
++str;
}
}
+
temp[pos] = '\0';
qreal val;
@@ -365,16 +367,24 @@ static qreal toDouble(const QChar *&str)
return val;
}
-static qreal toDouble(const QString &str)
+static qreal toDouble(const QString &str, bool *ok = NULL)
{
const QChar *c = str.constData();
- return toDouble(c);
+ qreal res = toDouble(c);
+ if (ok) {
+ *ok = ((*c) == QLatin1Char('\0'));
+ }
+ return res;
}
-static qreal toDouble(const QStringRef &str)
+static qreal toDouble(const QStringRef &str, bool *ok = NULL)
{
const QChar *c = str.constData();
- return toDouble(c);
+ qreal res = toDouble(c);
+ if (ok) {
+ *ok = (c == (str.constData() + str.length()));
+ }
+ return res;
}
static QVector<qreal> parseNumbersList(const QChar *&str)
@@ -497,14 +507,17 @@ static bool constructColor(const QString &colorStr, const QString &opacity,
if (!resolveColor(colorStr, color, handler))
return false;
if (!opacity.isEmpty()) {
- qreal op = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)));
+ bool ok = true;
+ qreal op = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity, &ok)));
+ if (!ok)
+ op = 1.0;
color.setAlphaF(op);
}
return true;
}
static qreal parseLength(const QString &str, QSvgHandler::LengthType &type,
- QSvgHandler *handler)
+ QSvgHandler *handler, bool *ok = NULL)
{
QString numStr = str.trimmed();
@@ -533,15 +546,15 @@ static qreal parseLength(const QString &str, QSvgHandler::LengthType &type,
type = handler->defaultCoordinateSystem();
//type = QSvgHandler::LT_OTHER;
}
- qreal len = toDouble(numStr);
+ qreal len = toDouble(numStr, ok);
//qDebug()<<"len is "<<len<<", from '"<<numStr << "'";
return len;
}
-static inline qreal convertToNumber(const QString &str, QSvgHandler *handler)
+static inline qreal convertToNumber(const QString &str, QSvgHandler *handler, bool *ok = NULL)
{
QSvgHandler::LengthType type;
- qreal num = parseLength(str, type, handler);
+ qreal num = parseLength(str, type, handler, ok);
if (type == QSvgHandler::LT_PERCENT) {
num = num/100.0;
}
@@ -631,15 +644,32 @@ static void parseBrush(QSvgNode *node,
QString opacity = attributes.value(QLatin1String("fill-opacity")).toString();
QString myId = someId(attributes);
- value = value.trimmed();
- fillRule = fillRule.trimmed();
- if (!value.isEmpty() || !fillRule.isEmpty()) {
- Qt::FillRule f = Qt::WindingFill;
+ QSvgFillStyle *inherited =
+ static_cast<QSvgFillStyle*>(node->parent()->styleProperty(
+ QSvgStyleProperty::FILL));
+ QSvgFillStyle *prop = new QSvgFillStyle(QColor(Qt::black));
+
+ //fill-rule attribute handling
+ Qt::FillRule f = Qt::WindingFill;
+ if (!fillRule.isEmpty() && fillRule != QLatin1String("inherit")) {
if (fillRule == QLatin1String("evenodd"))
f = Qt::OddEvenFill;
+ } else if (inherited) {
+ f = inherited->fillRule();
+ }
+
+ //fill-opacity atttribute handling
+ qreal fillOpacity = 1.0;
+ if (!opacity.isEmpty() && opacity != QLatin1String("inherit")) {
+ fillOpacity = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)));
+ } else if (inherited) {
+ fillOpacity = inherited->fillOpacity();
+ }
+
+ //fill attribute handling
+ if ((!value.isEmpty()) && (value != QLatin1String("inherit")) ) {
if (value.startsWith(QLatin1String("url"))) {
value = value.remove(0, 3);
- QSvgFillStyle *prop = new QSvgFillStyle(0);
QSvgStyleProperty *style = styleFromUrl(node, value);
if (style) {
prop->setFillStyle(style);
@@ -648,30 +678,26 @@ static void parseBrush(QSvgNode *node,
prop->setGradientId(id);
prop->setGradientResolved(false);
}
- if (!opacity.isEmpty()) {
- qreal clampedOpacity = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)));
- prop->setFillOpacity(clampedOpacity);
- }
- if (!fillRule.isEmpty())
- prop->setFillRule(f);
- node->appendStyleProperty(prop,myId);
} else if (value != QLatin1String("none")) {
QColor color;
- if (constructColor(value, opacity, color, handler)) {
- QSvgFillStyle *prop = new QSvgFillStyle(QBrush(color));
- if (!fillRule.isEmpty())
- prop->setFillRule(f);
- node->appendStyleProperty(prop, myId);
- }
+ if (resolveColor(value, color, handler))
+ prop->setBrush(QBrush(color));
+ } else {
+ prop->setBrush(QBrush(Qt::NoBrush));
+ }
+ } else if (inherited) {
+ if (inherited->style()) {
+ prop->setFillStyle(inherited->style());
} else {
- QSvgFillStyle *prop = new QSvgFillStyle(QBrush(Qt::NoBrush));
- if (!fillRule.isEmpty())
- prop->setFillRule(f);
- node->appendStyleProperty(prop, myId);
+ prop->setBrush(inherited->qbrush());
}
}
+ prop->setFillOpacity(fillOpacity);
+ prop->setFillRule(f);
+ node->appendStyleProperty(prop,myId);
}
+
static void parseQPen(QPen &pen, QSvgNode *node,
const QSvgAttributes &attributes,
QSvgHandler *handler)
@@ -908,103 +934,155 @@ static void parsePen(QSvgNode *node,
//qDebug()<<"Node "<<node->type()<<", attrs are "<<value<<width;
- if (!value.isEmpty() || !width.isEmpty() || !linecap.isEmpty() || !linejoin.isEmpty()) {
- if (value != QLatin1String("none")) {
- QSvgStrokeStyle *inherited =
- static_cast<QSvgStrokeStyle*>(node->styleProperty(
- QSvgStyleProperty::STROKE));
- if (!inherited)
- inherited = static_cast<QSvgStrokeStyle*>(node->parent()->styleProperty(
- QSvgStyleProperty::STROKE));
- QPen pen(handler->defaultPen());
- if (inherited)
- pen = inherited->qpen();
+ /* All the below checks needed because g (or any container element) can have only one of these attributes.
+ * If it doesn't has any one of these, then processing below not needed */
+
+ if (!value.isEmpty() || !width.isEmpty() || !dashArray.isEmpty() || !linecap.isEmpty() ||
+ !linejoin.isEmpty() || !miterlimit.isEmpty() || !opacity.isEmpty() || !dashOffset.isEmpty() ) {
+ //if (value != QLatin1String("none")) {
+ /* If stroke = "none" then also, we need to parse below, because elements like 'g' may
+ have other defined stroke attributes, which will be inherited by its children */
+ QSvgStrokeStyle *inherited =
+ static_cast<QSvgStrokeStyle*>(node->parent()->styleProperty(
+ QSvgStyleProperty::STROKE));
+
+ QPen pen(handler->defaultPen());
+ bool stroke = false;
+ if (inherited) {
+ pen = inherited->qpen();
+ stroke = inherited->strokePresent();
+ }
- if (!value.isEmpty()) {
- if (value.startsWith(QLatin1String("url"))) {
- value = value.remove(0, 3);
- QSvgStyleProperty *style = styleFromUrl(node, value);
- if (style) {
- if (style->type() == QSvgStyleProperty::GRADIENT) {
- QBrush b(*((QSvgGradientStyle*)style)->qgradient());
- pen.setBrush(b);
- } else if (style->type() == QSvgStyleProperty::SOLID_COLOR) {
- pen.setColor(
- ((QSvgSolidColorStyle*)style)->qcolor());
- }
- } else {
- qWarning() << "QSvgHandler::parsePen could not resolve property" << idFromUrl(value);
+ // stroke-opacity attribute handling
+ qreal strokeAlpha;
+ if (!opacity.isEmpty() && opacity != QLatin1String("inherit")) {
+ strokeAlpha = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)));
+ } else {
+ strokeAlpha = pen.color().alphaF();
+ }
+
+ //stroke attribute handling
+ if (!value.isEmpty() && value != QLatin1String("inherit")) {
+ if (value.startsWith(QLatin1String("url"))) {
+ value = value.remove(0, 3);
+ QSvgStyleProperty *style = styleFromUrl(node, value);
+ if (style) {
+ if (style->type() == QSvgStyleProperty::GRADIENT) {
+ QBrush b(*((QSvgGradientStyle*)style)->qgradient());
+ pen.setBrush(b);
+ } else if (style->type() == QSvgStyleProperty::SOLID_COLOR) {
+ pen.setColor(
+ ((QSvgSolidColorStyle*)style)->qcolor());
}
+ pen.setStyle(Qt::SolidLine);
+ stroke = true;
} else {
- QColor color;
- if (constructColor(value, opacity, color, handler))
- pen.setColor(color);
+ qWarning() << "QSvgHandler::parsePen could not resolve property" << idFromUrl(value);
}
- //since we could inherit stroke="none"
- //we need to reset the style of our stroke to something
- pen.setStyle(Qt::SolidLine);
- }
- if (!width.isEmpty()) {
- QSvgHandler::LengthType lt;
- qreal widthF = parseLength(width, lt, handler);
- //### fixme
- if (!widthF) {
- pen.setStyle(Qt::NoPen);
- return;
+ } else if (value == QLatin1String("none")) {
+ QColor color; //### fixme: dafalut value for color.
+ color.setAlphaF(strokeAlpha);
+ pen.setColor(color);
+ stroke = false; // This is required because, parent may have a valid stroke but the child may have stroke = "none"
+ } else {
+ QColor color;
+ if (resolveColor(value, color, handler)) {
+ color.setAlphaF(strokeAlpha);
+ pen.setColor(color);
}
- pen.setWidthF(widthF);
- }
-
- if (!linejoin.isEmpty()) {
- if (linejoin == QLatin1String("miter"))
- pen.setJoinStyle(Qt::SvgMiterJoin);
- else if (linejoin == QLatin1String("round"))
- pen.setJoinStyle(Qt::RoundJoin);
- else if (linejoin == QLatin1String("bevel"))
- pen.setJoinStyle(Qt::BevelJoin);
+ stroke = true;
}
+ } else {
+ QColor color = pen.color();
+ color.setAlphaF(strokeAlpha);
+ pen.setColor(color);
+ }
- if (!linecap.isEmpty()) {
- if (linecap == QLatin1String("butt"))
- pen.setCapStyle(Qt::FlatCap);
- else if (linecap == QLatin1String("round"))
- pen.setCapStyle(Qt::RoundCap);
- else if (linecap == QLatin1String("square"))
- pen.setCapStyle(Qt::SquareCap);
- }
+ //stroke-width handling
+ if (!width.isEmpty() && width != QLatin1String("inherit")) {
+ qreal widthF;
+ QSvgHandler::LengthType lt;
+ widthF = parseLength(width, lt, handler);
+ pen.setWidthF(widthF);
+ } else if (inherited){
+ qreal widthF = inherited->qpen().widthF();
+ pen.setWidthF(widthF);
+ }
- qreal penw = pen.widthF();
- if (!dashArray.isEmpty()) {
- const QChar *s = dashArray.constData();
- QVector<qreal> dashes = parseNumbersList(s);
- qreal *d = dashes.data();
- if(penw != 0)
- for (int i = 0; i < dashes.size(); ++i) {
- *d /= penw;
- ++d;
- }
+ //stroke-linejoin attribute handling
+ if (!linejoin.isEmpty()) {
+ if (linejoin == QLatin1String("miter"))
+ pen.setJoinStyle(Qt::SvgMiterJoin);
+ else if (linejoin == QLatin1String("round"))
+ pen.setJoinStyle(Qt::RoundJoin);
+ else if (linejoin == QLatin1String("bevel"))
+ pen.setJoinStyle(Qt::BevelJoin);
+ }
- // if the dash count is odd the dashes should be duplicated
- if (dashes.size() % 2 != 0)
- dashes << QVector<qreal>(dashes);
+ //stroke-linecap attribute handling
+ if (!linecap.isEmpty()) {
+ if (linecap == QLatin1String("butt"))
+ pen.setCapStyle(Qt::FlatCap);
+ else if (linecap == QLatin1String("round"))
+ pen.setCapStyle(Qt::RoundCap);
+ else if (linecap == QLatin1String("square"))
+ pen.setCapStyle(Qt::SquareCap);
+ }
- pen.setDashPattern(dashes);
- }
- if (!dashOffset.isEmpty()) {
- qreal doffset = toDouble(dashOffset);
- if (penw != 0)
- doffset /= penw;
- pen.setDashOffset(doffset);
+ //strok-dasharray attribute handling
+ qreal penw = pen.widthF();
+ if (!dashArray.isEmpty() && dashArray != QLatin1String("inherit")) {
+ const QChar *s = dashArray.constData();
+ QVector<qreal> dashes = parseNumbersList(s);
+ qreal *d = dashes.data();
+ if (penw != 0)
+ for (int i = 0; i < dashes.size(); ++i) {
+ *d /= penw;
+ ++d;
+ }
+ // if the dash count is odd the dashes should be duplicated
+ if (dashes.size() % 2 != 0)
+ dashes << QVector<qreal>(dashes);
+ pen.setDashPattern(dashes);
+ } else if (inherited) {
+ QVector<qreal> dashes(inherited->qpen().dashPattern());
+ qreal *d = dashes.data();
+ if (!penw)
+ penw = 1.0;
+ qreal inheritpenw = inherited->qpen().widthF();
+ if (!inheritpenw)
+ inheritpenw = 1.0;
+ for ( int i = 0; i < dashes.size(); ++i) {
+ *d *= (inheritpenw/ penw);
+ ++d;
}
- if (!miterlimit.isEmpty())
- pen.setMiterLimit(toDouble(miterlimit));
+ pen.setDashPattern(dashes);
+ }
- node->appendStyleProperty(new QSvgStrokeStyle(pen), myId);
- } else {
- QPen pen(handler->defaultPen());
- pen.setStyle(Qt::NoPen);
- node->appendStyleProperty(new QSvgStrokeStyle(pen), myId);
+
+ //stroke-dashoffset attribute handling
+ if (!dashOffset.isEmpty() && dashOffset != QLatin1String("inherit")) {
+ qreal doffset = toDouble(dashOffset);
+ if (penw != 0)
+ doffset /= penw;
+ pen.setDashOffset(doffset);
+ } else if (inherited) {
+ qreal doffset = pen.dashOffset();
+ if (!penw)
+ penw = 1.0;
+ qreal inheritpenw = inherited->qpen().widthF();
+ if (!inheritpenw)
+ inheritpenw = 1.0;
+ doffset *= (inheritpenw/ penw);
+ pen.setDashOffset(doffset);
}
+
+ if (!miterlimit.isEmpty() && miterlimit != QLatin1String("inherit"))
+ pen.setMiterLimit(toDouble(miterlimit));
+
+ QSvgStrokeStyle *prop = new QSvgStrokeStyle(pen);
+ prop->setStroke(stroke);
+ node->appendStyleProperty(prop, myId);
}
}
@@ -1071,10 +1149,14 @@ static bool parseQFont(const QSvgAttributes &attributes,
font.setFamily(family.trimmed());
}
if (!size.isEmpty()) {
- QSvgHandler::LengthType dummy; // should always be pixel size
- fontSize = parseLength(size, dummy, handler);
- if (fontSize <= 0)
- fontSize = 1;
+ if (size == QLatin1String("inherit")) {
+ //inherited already
+ } else {
+ QSvgHandler::LengthType dummy; // should always be pixel size
+ fontSize = parseLength(size, dummy, handler);
+ if (fontSize <= 0)
+ fontSize = 1;
+ }
font.setPixelSize(qMax(1, int(fontSize)));
}
if (!style.isEmpty()) {
@@ -1154,9 +1236,13 @@ static void parseFont(QSvgNode *node,
font = inherited->qfont();
fontSize = inherited->pointSize();
}
- if (parseQFont(attributes, font, fontSize, handler)) {
+ // group or any container element can have only text-anchor and should
+ // be processed, because its children can inherit from it.
+ // So checking for text-anchor before parseQfont()
+ QString anchor = attributes.value(QLatin1String("text-anchor")).toString();
+ if (parseQFont(attributes, font, fontSize, handler) || (!anchor.isEmpty())) {
QString myId = someId(attributes);
- QString anchor = attributes.value(QLatin1String("text-anchor")).toString();
+ //QString anchor = attributes.value(QLatin1String("text-anchor")).toString();
QSvgTinyDocument *doc = node->document();
QSvgFontStyle *fontStyle = 0;
QString family = (font.family().isEmpty())?myId:font.family();
@@ -1865,7 +1951,7 @@ static bool parseDefaultTextStyle(QSvgNode *node,
if (fontStyle) {
font = fontStyle->qfont();
fontSize = fontStyle->pointSize();
- if (anchor.isEmpty())
+ if (anchor.isEmpty() || anchor == QLatin1String("inherit"))
anchor = fontStyle->textAnchor();
}
@@ -2946,7 +3032,11 @@ static bool parseStopNode(QSvgStyleProperty *parent,
QString colorStr = attrs.value(QString(), QLatin1String("stop-color")).toString();
QString opacityStr = attrs.value(QString(), QLatin1String("stop-opacity")).toString();
QColor color;
- qreal offset = convertToNumber(offsetStr, handler);
+
+ bool ok = true;
+ qreal offset = convertToNumber(offsetStr, handler, &ok);
+ if (!ok)
+ offset = 0.0;
if (colorStr.isEmpty()) {
colorStr = QLatin1String("#000000");
}
@@ -3035,12 +3125,16 @@ static QSvgNode *createSvgNode(QSvgNode *parent,
QStringList lst = viewBoxStr.split(QLatin1Char(' '), QString::SkipEmptyParts);
if (lst.count() != 4)
lst = viewBoxStr.split(QLatin1Char(','), QString::SkipEmptyParts);
+ int count = lst.count();
+ while (count < 4) {
+ lst.append(QLatin1String(""));
+ count++;
+ }
QString xStr = lst.at(0).trimmed();
QString yStr = lst.at(1).trimmed();
QString widthStr = lst.at(2).trimmed();
QString heightStr = lst.at(3).trimmed();
-
QSvgHandler::LengthType lt;
qreal x = parseLength(xStr, lt, handler);
qreal y = parseLength(yStr, lt, handler);
@@ -3048,15 +3142,14 @@ static QSvgNode *createSvgNode(QSvgNode *parent,
qreal h = parseLength(heightStr, lt, handler);
node->setViewBox(QRectF(x, y, w, h));
- } else if (width && height){
+
+ } else if (width && height) {
if (type == QSvgHandler::LT_PT) {
width = convertToPixels(width, false, type);
height = convertToPixels(height, false, type);
}
-
node->setViewBox(QRectF(0, 0, width, height));
}
-
handler->setDefaultCoordinateSystem(QSvgHandler::LT_PX);
return node;
@@ -3395,7 +3488,7 @@ void QSvgHandler::init()
m_style = 0;
m_animEnd = 0;
m_defaultCoords = LT_PX;
- m_defaultPen = QPen(Qt::black, 1, Qt::NoPen, Qt::FlatCap, Qt::SvgMiterJoin);
+ m_defaultPen = QPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
m_defaultPen.setMiterLimit(4);
parse();
}
diff --git a/src/svg/qsvgnode.cpp b/src/svg/qsvgnode.cpp
index 75c01a9..ce8b3fa 100644
--- a/src/svg/qsvgnode.cpp
+++ b/src/svg/qsvgnode.cpp
@@ -320,7 +320,7 @@ qreal QSvgNode::strokeWidth() const
{
QSvgStrokeStyle *stroke = static_cast<QSvgStrokeStyle*>(
styleProperty(QSvgStyleProperty::STROKE));
- if (!stroke || stroke->qpen().style() == Qt::NoPen)
+ if (!stroke || !stroke->strokePresent())
return 0;
return stroke->qpen().widthF();
}
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index fec6231..4c8247b 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -81,12 +81,12 @@ void QSvgQualityStyle::revert(QPainter *, QSvgExtraStates &)
}
QSvgFillStyle::QSvgFillStyle(const QBrush &brush)
- : m_fill(brush), m_style(0), m_fillRuleSet(false), m_fillOpacitySet(false), m_gradientResolved (true)
+ : m_fill(brush), m_style(0), m_fillRuleSet(false), m_fillOpacitySet(false), m_fillRule(Qt::WindingFill), m_fillOpacity(1.0), m_gradientResolved (true)
{
}
QSvgFillStyle::QSvgFillStyle(QSvgStyleProperty *style)
- : m_style(style), m_fillRuleSet(false), m_fillOpacitySet(false), m_gradientResolved (true)
+ : m_style(style), m_fillRuleSet(false), m_fillOpacitySet(false), m_fillRule(Qt::WindingFill), m_fillOpacity(1.0), m_gradientResolved (true)
{
}
@@ -102,6 +102,16 @@ void QSvgFillStyle::setFillOpacity(qreal opacity)
m_fillOpacity = opacity;
}
+void QSvgFillStyle::setFillStyle(QSvgStyleProperty* style)
+{
+ m_style = style;
+}
+
+void QSvgFillStyle::setBrush(QBrush brush)
+{
+ m_fill = brush;
+}
+
static void recursivelySetFill(QSvgNode *node, Qt::FillRule f)
{
if (node->type() == QSvgNode::PATH) {
@@ -195,14 +205,18 @@ void QSvgFontStyle::revert(QPainter *p, QSvgExtraStates &)
}
QSvgStrokeStyle::QSvgStrokeStyle(const QPen &pen)
- : m_stroke(pen)
+ : m_stroke(pen), m_strokePresent(true)
{
}
void QSvgStrokeStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &)
{
m_oldStroke = p->pen();
- p->setPen(m_stroke);
+ if (!m_strokePresent || !m_stroke.widthF() || !m_stroke.color().alphaF()) {
+ p->setPen(Qt::NoPen);
+ } else {
+ p->setPen(m_stroke);
+ }
}
void QSvgStrokeStyle::revert(QPainter *p, QSvgExtraStates &)
diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h
index e65b6f5..ac5e109 100644
--- a/src/svg/qsvgstyle_p.h
+++ b/src/svg/qsvgstyle_p.h
@@ -224,12 +224,29 @@ public:
void setFillRule(Qt::FillRule f);
void setFillOpacity(qreal opacity);
+ void setFillStyle(QSvgStyleProperty* style);
+ void setBrush(QBrush brush);
const QBrush & qbrush() const
{
return m_fill;
}
+ qreal fillOpacity() const
+ {
+ return m_fillOpacity;
+ }
+
+ Qt::FillRule fillRule() const
+ {
+ return m_fillRule;
+ }
+
+ QSvgStyleProperty* style() const
+ {
+ return m_style;
+ }
+
void setGradientId(const QString &Id)
{
m_gradientId = Id;
@@ -240,7 +257,6 @@ public:
return m_gradientId;
}
-
void setGradientResolved(bool resolved)
{
m_gradientResolved = resolved;
@@ -251,16 +267,6 @@ public:
return m_gradientResolved;
}
- void setFillStyle(QSvgStyleProperty* style)
- {
- m_style = style;
- }
-
- void setBrush(QBrush brush)
- {
- m_fill = brush;
- }
-
private:
// fill v v 'inherit' | <Paint.datatype>
// fill-opacity v v 'inherit' | <OpacityValue.datatype>
@@ -345,6 +351,16 @@ public:
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
+ void setStroke(bool stroke)
+ {
+ m_strokePresent = stroke;
+ }
+
+ bool strokePresent() const
+ {
+ return m_strokePresent;
+ }
+
const QPen & qpen() const
{
return m_stroke;
@@ -359,8 +375,8 @@ private:
// stroke-opacity v v 'inherit' | <OpacityValue.datatype>
// stroke-width v v 'inherit' | <StrokeWidthValue.datatype>
QPen m_stroke;
-
QPen m_oldStroke;
+ bool m_strokePresent;
};
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index 3047326..071b55e 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -151,7 +151,7 @@ namespace QTest {
int length = strlen(str);
for (int pos = 0; pos < length; pos +=255) {
QString uniText = QString::fromLatin1(str + pos, 255);
- OutputDebugStringW((const LPCWSTR) uniText.utf16());
+ OutputDebugString((wchar_t*)uniText.utf16());
}
if (QTestLog::outputFileName())
#elif defined(Q_OS_WIN)
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 435ecf4..70c8c8d 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -72,6 +72,8 @@
#include <windows.h> // for Sleep
#endif
#ifdef Q_OS_UNIX
+#include <errno.h>
+#include <signal.h>
#include <time.h>
#endif
@@ -401,7 +403,8 @@ QT_BEGIN_NAMESPACE
\overload
- Simulates clicking of \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ Simulates clicking of \a key with an optional \a modifier on a \a widget.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds.
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 13
@@ -414,7 +417,8 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
- Simulates clicking of \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ Simulates clicking of \a key with an optional \a modifier on a \a widget.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds.
Examples:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 14
@@ -429,20 +433,25 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
- Sends a Qt key event to \a widget with the given \a key and an associated \a action. Optionally, a keyboard \a modifier can be specified, as well as a \a delay (in milliseconds) of the test before sending the event.
+ Sends a Qt key event to \a widget with the given \a key and an associated \a action.
+ Optionally, a keyboard \a modifier can be specified, as well as a \a delay
+ (in milliseconds) of the test before sending the event.
*/
/*! \fn void QTest::keyEvent(KeyAction action, QWidget *widget, char ascii, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
\overload
- Sends a Qt key event to \a widget with the given key \a ascii and an associated \a action. Optionally, a keyboard \a modifier can be specified, as well as a \a delay (in milliseconds) of the test before sending the event.
+ Sends a Qt key event to \a widget with the given key \a ascii and an associated \a action.
+ Optionally, a keyboard \a modifier can be specified, as well as a \a delay
+ (in milliseconds) of the test before sending the event.
*/
/*! \fn void QTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
- Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay
+ is larger than 0, the test will wait for \a delay milliseconds.
\bold {Note:} At some point you should release the key using \l keyRelease().
@@ -453,7 +462,8 @@ QT_BEGIN_NAMESPACE
\overload
- Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ Simulates pressing a \a key with an optional \a modifier on a \a widget.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds.
\bold {Note:} At some point you should release the key using \l keyRelease().
@@ -462,7 +472,8 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
- Simulates releasing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ Simulates releasing a \a key with an optional \a modifier on a \a widget.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds.
\sa QTest::keyPress(), QTest::keyClick()
*/
@@ -471,7 +482,8 @@ QT_BEGIN_NAMESPACE
\overload
- Simulates releasing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ Simulates releasing a \a key with an optional \a modifier on a \a widget.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds.
\sa QTest::keyClick()
*/
@@ -687,6 +699,84 @@ QT_BEGIN_NAMESPACE
\sa QTest::qSleep()
*/
+/*!
+ \class QTest::QTouchEventSequence
+ \inmodule QtTest
+ \since 4.6
+
+ \brief The QTouchEventSequence class is used to simulate a sequence of touch events.
+
+ To simulate a sequence of touch events on a specific device for a widget, call
+ QTest::touchEvent to create a QTouchEventSequence instance. Add touch events to
+ the sequence by calling press(), move(), release() and stationary(), and let the
+ instance run out of scope to commit the sequence to the event system.
+*/
+
+/*!
+ \fn QTest::QTouchEventSequence::~QTouchEventSequence()
+
+ Commits this sequence of touch events and frees allocated resources.
+*/
+
+/*!
+ \fn QTouchEventSequence &QTest::QTouchEventSequence::press(int touchId, const QPoint &pt, QWidget *widget)
+
+ Adds a press event for touchpoint \a touchId at position \a pt to this sequence and returns
+ a reference to this QTouchEventSequence.
+
+ The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then
+ \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.
+
+ Simulates that the user pressed the touch screen or pad with the finger identified by \a touchId.
+*/
+
+/*!
+ \fn QTouchEventSequence &QTest::QTouchEventSequence::move(int touchId, const QPoint &pt, QWidget *widget)
+
+ Adds a move event for touchpoint \a touchId at position \a pt to this sequence and returns
+ a reference to this QTouchEventSequence.
+
+ The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then
+ \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.
+
+ Simulates that the user moved the finger identified by \a touchId.
+*/
+
+/*!
+ \fn QTouchEventSequence &QTest::QTouchEventSequence::release(int touchId, const QPoint &pt, QWidget *widget)
+
+ Adds a release event for touchpoint \a touchId at position \a pt to this sequence and returns
+ a reference to this QTouchEventSequence.
+
+ The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then
+ \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.
+
+ Simulates that the user lifted the finger identified by \a touchId.
+*/
+
+/*!
+ \fn QTouchEventSequence &QTest::QTouchEventSequence::stationary(int touchId)
+
+ Adds a stationary event for touchpoint \a touchId to this sequence and returns
+ a reference to this QTouchEventSequence.
+
+ Simulates that the user did not move the finger identified by \a touchId.
+*/
+
+/*!
+ \fn QTouchEventSequence QTest::touchEvent(QWidget *widget, QTouchEvent::DeviceType deviceType)
+
+ Creates and returns a QTouchEventSequence for the device \a deviceType to
+ simulate events for \a widget.
+
+ When adding touch events to the sequence, \a widget will also be used to translate
+ the position provided to screen coordinates, unless another widget is provided in the
+ respective calls to press(), move() etc.
+
+ The touch events are committed to the event system when the destructor of the
+ QTouchEventSequence is called (ie when the object returned runs out of scope).
+*/
+
namespace QTest
{
static QObject *currentTestObject = 0;
@@ -1330,6 +1420,80 @@ static void qInvokeTestMethods(QObject *testObject)
QTestLog::stopLogging();
}
+#ifdef Q_OS_UNIX
+class FatalSignalHandler
+{
+public:
+ FatalSignalHandler();
+ ~FatalSignalHandler();
+
+private:
+ static void signal(int);
+ sigset_t handledSignals;
+};
+
+void FatalSignalHandler::signal(int signum)
+{
+ qFatal("Received signal %d", signum);
+}
+
+FatalSignalHandler::FatalSignalHandler()
+{
+ sigemptyset(&handledSignals);
+
+ const int fatalSignals[] = {
+ SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, 0 };
+
+ struct sigaction act;
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = FatalSignalHandler::signal;
+
+ // Remove the handler after it is invoked.
+ act.sa_flags = SA_RESETHAND;
+
+ // Block all fatal signals in our signal handler so we don't try to close
+ // the testlog twice.
+ sigemptyset(&act.sa_mask);
+ for (int i = 0; fatalSignals[i]; ++i)
+ sigaddset(&act.sa_mask, fatalSignals[i]);
+
+ struct sigaction oldact;
+
+ for (int i = 0; fatalSignals[i]; ++i) {
+ sigaction(fatalSignals[i], &act, &oldact);
+ // Don't overwrite any non-default handlers
+ if (oldact.sa_flags & SA_SIGINFO || oldact.sa_handler != SIG_DFL) {
+ sigaction(fatalSignals[i], &oldact, 0);
+ } else {
+ sigaddset(&handledSignals, fatalSignals[i]);
+ }
+ }
+}
+
+
+FatalSignalHandler::~FatalSignalHandler()
+{
+ // Unregister any of our remaining signal handlers
+ struct sigaction act;
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = SIG_DFL;
+
+ struct sigaction oldact;
+
+ for (int i = 0; i < 32; ++i) {
+ if (!sigismember(&handledSignals, i))
+ continue;
+ sigaction(i, &act, &oldact);
+
+ // If someone overwrote it in the mean time, put it back
+ if (oldact.sa_handler != FatalSignalHandler::signal)
+ sigaction(i, &oldact, 0);
+ }
+}
+
+#endif
+
+
} // namespace
/*!
@@ -1424,14 +1588,14 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
QBenchmarkValgrindUtils::cleanup();
- } else {
+ } else
+#endif
+ {
+#ifdef Q_OS_UNIX
+ FatalSignalHandler handler;
#endif
-
qInvokeTestMethods(testObject);
-
-#ifdef QTESTLIB_USE_VALGRIND
}
-#endif
#ifndef QT_NO_EXCEPTIONS
} catch (...) {
@@ -1927,8 +2091,4 @@ bool QTest::compare_string_helper(const char *t1, const char *t2, const char *ac
\internal
*/
-/*! \fn int QTest::qt_snprintf(char *str, int size, const char *format, ...)
- \internal
-*/
-
QT_END_NAMESPACE
diff --git a/src/testlib/qtestfilelogger.cpp b/src/testlib/qtestfilelogger.cpp
index 0c146b4..a717058 100644
--- a/src/testlib/qtestfilelogger.cpp
+++ b/src/testlib/qtestfilelogger.cpp
@@ -72,15 +72,24 @@ void QTestFileLogger::init()
QTest::qt_snprintf(filename, sizeof(filename), "%s.log",
QTestResult::currentTestObjectName());
- #if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE)
- if (::fopen_s(&QTest::stream, filename, "wt")) {
- #else
- QTest::stream = ::fopen(filename, "wt");
- if (!QTest::stream) {
- #endif
- printf("Unable to open file for simple logging: %s", filename);
- ::exit(1);
+ // Keep filenames simple
+ for (int i = 0; i < sizeof(filename) && filename[i]; ++i) {
+ char& c = filename[i];
+ if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '-'
+ || c == '.')) {
+ c = '_';
}
+ }
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE)
+ if (::fopen_s(&QTest::stream, filename, "wt")) {
+#else
+ QTest::stream = ::fopen(filename, "wt");
+ if (!QTest::stream) {
+#endif
+ printf("Unable to open file for simple logging: %s", filename);
+ ::exit(1);
+ }
}
void QTestFileLogger::flush(const char *msg)
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index 1cf103b..b4f9b2f 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -28,26 +28,26 @@ win32:DEFINES += QT_NODLL
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
$$QT_BUILD_TREE/include/QtXml \
- ../../xml
+ $$QT_SOURCE_TREE/src/xml
DEPENDPATH += $$INCLUDEPATH \
- ../../corelib/global \
- ../../corelib/kernel \
- ../../corelib/tools \
- ../../corelib/io \
- ../../corelib/codecs \
- ../../xml
+ $$QT_SOURCE_TREE/src/corelib/global \
+ $$QT_SOURCE_TREE/src/corelib/kernel \
+ $$QT_SOURCE_TREE/src/corelib/tools \
+ $$QT_SOURCE_TREE/src/corelib/io \
+ $$QT_SOURCE_TREE/src/corelib/codecs \
+ $$QT_SOURCE_TREE/src/xml
hpux-acc*|hpuxi-acc* {
LIBS += ../bootstrap/libbootstrap.a
} else {
contains(CONFIG, debug_and_release_target) {
CONFIG(debug, debug|release) {
- LIBS+=-L../bootstrap/debug
+ LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/debug
} else {
- LIBS+=-L../bootstrap/release
+ LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/release
}
} else {
- LIBS += -L../bootstrap
+ LIBS += -L$$QT_BUILD_TREE/src/tools/bootstrap
}
LIBS += -lbootstrap
}
diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp
index 48ce9cc..8fe8a70 100644
--- a/src/tools/idc/main.cpp
+++ b/src/tools/idc/main.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include <QFile>
-#include <QSysInfo>
#include <QProcess>
#include <QLibraryInfo>
#include <qt_windows.h>
@@ -87,37 +86,19 @@ static bool runWithQtInEnvironment(const QString &cmd)
static bool attachTypeLibrary(const QString &applicationName, int resource, const QByteArray &data, QString *errorMessage)
{
- HANDLE hExe = 0;
- QT_WA({
- TCHAR *resourceName = MAKEINTRESOURCEW(resource);
- hExe = BeginUpdateResourceW((TCHAR*)applicationName.utf16(), false);
- if (hExe == 0) {
- if (errorMessage)
- *errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not open file.").arg(applicationName);
- return false;
- }
- if (!UpdateResourceW(hExe,L"TYPELIB",resourceName,0,(void*)data.data(),data.count())) {
- EndUpdateResource(hExe, true);
- if (errorMessage)
- *errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not update file.").arg(applicationName);
- return false;
- }
- }, {
- char *resourceName = MAKEINTRESOURCEA(resource);
- hExe = BeginUpdateResourceA(applicationName.toLocal8Bit(), false);
- if (hExe == 0) {
- if (errorMessage)
- *errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not open file.").arg(applicationName);
- return false;
- }
- if (!UpdateResourceA(hExe,"TYPELIB",resourceName,0,(void*)data.data(),data.count())) {
- EndUpdateResource(hExe, true);
- if (errorMessage)
- *errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not update file.").arg(applicationName);
- return false;
- }
- });
-
+ HANDLE hExe = BeginUpdateResource((const wchar_t *)applicationName.utf16(), false);
+ if (hExe == 0) {
+ if (errorMessage)
+ *errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not open file.").arg(applicationName);
+ return false;
+ }
+ if (!UpdateResource(hExe, L"TYPELIB", MAKEINTRESOURCE(resource), 0, (void*)data.data(), data.count())) {
+ EndUpdateResource(hExe, true);
+ if (errorMessage)
+ *errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not update file.").arg(applicationName);
+ return false;
+ }
+
if (!EndUpdateResource(hExe,false)) {
if (errorMessage)
*errorMessage = QString::fromLatin1("Failed to attach type library to binary %1 - could not write file.").arg(applicationName);
@@ -135,12 +116,7 @@ static bool registerServer(const QString &input)
if (input.endsWith(QLatin1String(".exe"))) {
ok = runWithQtInEnvironment(quotePath(input) + QLatin1String(" -regserver"));
} else {
- HMODULE hdll = 0;
- QT_WA({
- hdll = LoadLibraryW((TCHAR*)input.utf16());
- }, {
- hdll = LoadLibraryA(input.toLocal8Bit());
- });
+ HMODULE hdll = LoadLibrary((const wchar_t *)input.utf16());
if (!hdll) {
fprintf(stderr, "Couldn't load library file %s\n", (const char*)input.toLocal8Bit().data());
return false;
@@ -162,12 +138,7 @@ static bool unregisterServer(const QString &input)
if (input.endsWith(QLatin1String(".exe"))) {
ok = runWithQtInEnvironment(quotePath(input) + QLatin1String(" -unregserver"));
} else {
- HMODULE hdll = 0;
- QT_WA({
- hdll = LoadLibraryW((TCHAR*)input.utf16());
- }, {
- hdll = LoadLibraryA(input.toLocal8Bit());
- });
+ HMODULE hdll = LoadLibrary((const wchar_t *)input.utf16());
if (!hdll) {
fprintf(stderr, "Couldn't load library file %s\n", (const char*)input.toLocal8Bit().data());
return false;
@@ -191,12 +162,7 @@ static HRESULT dumpIdl(const QString &input, const QString &idlfile, const QStri
if (runWithQtInEnvironment(quotePath(input) + QLatin1String(" -dumpidl ") + idlfile + QLatin1String(" -version ") + version))
res = S_OK;
} else {
- HMODULE hdll = 0;
- QT_WA({
- hdll = LoadLibraryW((TCHAR*)input.utf16());
- }, {
- hdll = LoadLibraryA(input.toLocal8Bit());
- });
+ HMODULE hdll = LoadLibrary((const wchar_t *)input.utf16());
if (!hdll) {
fprintf(stderr, "Couldn't load library file %s\n", (const char*)input.toLocal8Bit().data());
return 3;
@@ -254,9 +220,6 @@ int runIdc(int argc, char **argv)
else
version = QLatin1String(argv[i]);
} else if (p == QLatin1String("/tlb") || p == QLatin1String("-tlb")) {
- if (QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based)
- fprintf(stderr, "IDC requires Windows NT/2000/XP!\n");
-
++i;
if (i > argc) {
error = QLatin1String("Missing name for type library file!");
diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp
index 1c6e3a5..bbb3af7 100644
--- a/src/tools/uic/uic.cpp
+++ b/src/tools/uic/uic.cpp
@@ -137,12 +137,12 @@ void Uic::writeCopyrightHeader(DomUI *ui)
out << "/*\n" << comment << "\n*/\n\n";
out << "/********************************************************************************\n";
- out << "** Form generated from reading ui file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
+ out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
out << "**\n";
- out << "** WARNING! All changes made in this file will be lost when recompiling ui file!\n";
+ out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";
out << "********************************************************************************/\n\n";
}
diff --git a/src/tools/uic3/main.cpp b/src/tools/uic3/main.cpp
index 38afc60..f4a9cba 100644
--- a/src/tools/uic3/main.cpp
+++ b/src/tools/uic3/main.cpp
@@ -114,7 +114,7 @@ int runUic3(int argc, char * argv[])
wrap = true;
if (opt == "wrap" || opt[1] == '\0') {
if (!(n < argc-1)) {
- error = "Missing name of converted ui file";
+ error = "Missing name of converted UI file";
break;
}
convertedUiFile = argv[++n];
@@ -230,7 +230,7 @@ int runUic3(int argc, char * argv[])
" %s [options] -decl <uiheaderfile> <uifile>\n"
"\t<uiheaderfile> name of the data file\n"
" %s [options] -wrap <converteduifile> <uifile>\n"
- "\t<converteduifile> name of the converted ui file\n"
+ "\t<converteduifile> name of the converted UI file\n"
"Generate implementation:\n"
" %s [options] -impl <headerfile> <uifile>\n"
"\t<headerfile> name of the declaration file\n"
@@ -254,7 +254,7 @@ int runUic3(int argc, char * argv[])
"\t-pch file Add #include \"file\" as the first statement in implementation\n"
"\t-nofwd Omit forward declarations of custom classes\n"
"\t-no-implicit-includes Do not generate #include-directives for custom classes\n"
- "\t-nounload Don't unload plugins after processing\n"
+ "\t-nounload Do not unload plugins after processing\n"
"\t-tr func Use func() instead of tr() for i18n\n"
"\t-L path Additional plugin search path\n"
"\t-version Display version of uic\n"
diff --git a/src/tools/uic3/uic.cpp b/src/tools/uic3/uic.cpp
index e911844..16b2754 100644
--- a/src/tools/uic3/uic.cpp
+++ b/src/tools/uic3/uic.cpp
@@ -144,12 +144,12 @@ void Uic::writeCopyrightHeader(DomUI *ui)
out << "/*\n" << comment << "\n*/\n\n";
out << "/********************************************************************************\n";
- out << "** Form generated from reading ui file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
+ out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
out << "**\n";
- out << "** WARNING! All changes made in this file will be lost when recompiling ui file!\n";
+ out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";
out << "********************************************************************************/\n\n";
}
diff --git a/src/winmain/qtmain_win.cpp b/src/winmain/qtmain_win.cpp
index c266cbf..5f929d6 100644
--- a/src/winmain/qtmain_win.cpp
+++ b/src/winmain/qtmain_win.cpp
@@ -89,18 +89,12 @@ extern "C"
int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdParamarg*/, int cmdShow)
#endif
{
- QByteArray cmdParam;
- QT_WA({
- LPTSTR cmdline = GetCommandLineW();
- cmdParam = QString::fromUtf16((const unsigned short *)cmdline).toLocal8Bit();
- }, {
- cmdParam = GetCommandLineA();
- });
+ QByteArray cmdParam = QString::fromWCharArray(GetCommandLine()).toLocal8Bit();
#if defined(Q_OS_WINCE)
- TCHAR appName[256];
- GetModuleFileName(0, appName, 255);
- cmdParam.prepend(QString::fromLatin1("\"%1\" ").arg(QString::fromUtf16((const unsigned short *)appName)).toLocal8Bit());
+ wchar_t appName[MAX_PATH];
+ GetModuleFileName(0, appName, MAX_PATH);
+ cmdParam.prepend(QString(QLatin1String("\"%1\" ")).arg(QString::fromWCharArray(appName)).toLocal8Bit());
#endif
int argc = 0;
@@ -108,9 +102,9 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdPara
qWinMain(instance, prevInstance, cmdParam.data(), cmdShow, argc, argv);
#if defined(Q_OS_WINCE)
- TCHAR uniqueAppID[256];
- GetModuleFileName(0, uniqueAppID, 255);
- QString uid = QString::fromUtf16((const unsigned short *)uniqueAppID).toLower().replace(QLatin1Char('\\'), QLatin1Char('_'));
+ wchar_t uniqueAppID[MAX_PATH];
+ GetModuleFileName(0, uniqueAppID, MAX_PATH);
+ QString uid = QString::fromWCharArray(uniqueAppID).toLower().replace(QLatin1String("\\"), QLatin1String("_"));
// If there exists an other instance of this application
// it will be the owner of a mutex with the unique ID.
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index d776cc4..6be6988 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -2403,7 +2403,7 @@ events are reported.
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
void QXmlDefaultHandler::setDocumentLocator(QXmlLocator*)
{
@@ -2412,7 +2412,7 @@ void QXmlDefaultHandler::setDocumentLocator(QXmlLocator*)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startDocument()
{
@@ -2422,7 +2422,7 @@ bool QXmlDefaultHandler::startDocument()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endDocument()
{
@@ -2432,7 +2432,7 @@ bool QXmlDefaultHandler::endDocument()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startPrefixMapping(const QString&, const QString&)
{
@@ -2442,7 +2442,7 @@ bool QXmlDefaultHandler::startPrefixMapping(const QString&, const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endPrefixMapping(const QString&)
{
@@ -2452,7 +2452,7 @@ bool QXmlDefaultHandler::endPrefixMapping(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startElement(const QString&, const QString&,
const QString&, const QXmlAttributes&)
@@ -2463,7 +2463,7 @@ bool QXmlDefaultHandler::startElement(const QString&, const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endElement(const QString&, const QString&,
const QString&)
@@ -2474,7 +2474,7 @@ bool QXmlDefaultHandler::endElement(const QString&, const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::characters(const QString&)
{
@@ -2484,7 +2484,7 @@ bool QXmlDefaultHandler::characters(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::ignorableWhitespace(const QString&)
{
@@ -2494,7 +2494,7 @@ bool QXmlDefaultHandler::ignorableWhitespace(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::processingInstruction(const QString&,
const QString&)
@@ -2505,7 +2505,7 @@ bool QXmlDefaultHandler::processingInstruction(const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::skippedEntity(const QString&)
{
@@ -2515,7 +2515,7 @@ bool QXmlDefaultHandler::skippedEntity(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::warning(const QXmlParseException&)
{
@@ -2525,7 +2525,7 @@ bool QXmlDefaultHandler::warning(const QXmlParseException&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::error(const QXmlParseException&)
{
@@ -2535,7 +2535,7 @@ bool QXmlDefaultHandler::error(const QXmlParseException&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::fatalError(const QXmlParseException&)
{
@@ -2545,7 +2545,7 @@ bool QXmlDefaultHandler::fatalError(const QXmlParseException&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::notationDecl(const QString&, const QString&,
const QString&)
@@ -2556,7 +2556,7 @@ bool QXmlDefaultHandler::notationDecl(const QString&, const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::unparsedEntityDecl(const QString&, const QString&,
const QString&, const QString&)
@@ -2590,7 +2590,7 @@ QString QXmlDefaultHandler::errorString() const
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startDTD(const QString&, const QString&, const QString&)
{
@@ -2600,7 +2600,7 @@ bool QXmlDefaultHandler::startDTD(const QString&, const QString&, const QString&
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endDTD()
{
@@ -2610,7 +2610,7 @@ bool QXmlDefaultHandler::endDTD()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startEntity(const QString&)
{
@@ -2620,7 +2620,7 @@ bool QXmlDefaultHandler::startEntity(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endEntity(const QString&)
{
@@ -2630,7 +2630,7 @@ bool QXmlDefaultHandler::endEntity(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startCDATA()
{
@@ -2640,7 +2640,7 @@ bool QXmlDefaultHandler::startCDATA()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endCDATA()
{
@@ -2650,7 +2650,7 @@ bool QXmlDefaultHandler::endCDATA()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::comment(const QString&)
{
@@ -2660,7 +2660,7 @@ bool QXmlDefaultHandler::comment(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::attributeDecl(const QString&, const QString&, const QString&, const QString&, const QString&)
{
@@ -2670,7 +2670,7 @@ bool QXmlDefaultHandler::attributeDecl(const QString&, const QString&, const QSt
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::internalEntityDecl(const QString&, const QString&)
{
@@ -2680,7 +2680,7 @@ bool QXmlDefaultHandler::internalEntityDecl(const QString&, const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::externalEntityDecl(const QString&, const QString&, const QString&)
{
diff --git a/src/xmlpatterns/Doxyfile b/src/xmlpatterns/Doxyfile
index 60a6c77..83f7062 100644
--- a/src/xmlpatterns/Doxyfile
+++ b/src/xmlpatterns/Doxyfile
@@ -1157,7 +1157,7 @@ DOT_PATH =
# contain dot files that are included in the documentation (see the
# \dotfile command).
-DOTFILE_DIRS =
+DOTFILE_DIRS = schema/doc/
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
# background. This is disabled by default, which results in a white background.
diff --git a/src/xmlpatterns/acceltree/qacceltree.cpp b/src/xmlpatterns/acceltree/qacceltree.cpp
index 6111af2..83ea949 100644
--- a/src/xmlpatterns/acceltree/qacceltree.cpp
+++ b/src/xmlpatterns/acceltree/qacceltree.cpp
@@ -42,6 +42,7 @@
#include <QStack>
#include "qabstractxmlreceiver.h"
+#include "qabstractxmlnodemodel_p.h"
#include "qacceliterators_p.h"
#include "qacceltree_p.h"
#include "qatomicstring_p.h"
@@ -55,6 +56,37 @@ QT_BEGIN_NAMESPACE
using namespace QPatternist;
+namespace QPatternist {
+
+ class AccelTreePrivate : public QAbstractXmlNodeModelPrivate
+ {
+ public:
+ AccelTreePrivate(AccelTree *accelTree)
+ : m_accelTree(accelTree)
+ {
+ }
+
+ virtual QSourceLocation sourceLocation(const QXmlNodeModelIndex &index) const
+ {
+ return m_accelTree->sourceLocation(index);
+ }
+
+ private:
+ AccelTree *m_accelTree;
+ };
+}
+
+AccelTree::AccelTree(const QUrl &docURI, const QUrl &bURI)
+ : QAbstractXmlNodeModel(new AccelTreePrivate(this))
+ , m_documentURI(docURI)
+ , m_baseURI(bURI)
+{
+ /* Pre-allocate at least a little bit. */
+ // TODO. Do it according to what an average 4 KB doc contains.
+ basicData.reserve(100);
+ data.reserve(30);
+}
+
void AccelTree::printStats(const NamePool::Ptr &np) const
{
Q_ASSERT(np);
@@ -674,6 +706,17 @@ void AccelTree::copyNodeTo(const QXmlNodeModelIndex &node,
}
+QSourceLocation AccelTree::sourceLocation(const QXmlNodeModelIndex &index) const
+{
+ const PreNumber key = toPreNumber(index);
+ if (sourcePositions.contains(key)) {
+ const QPair<qint64, qint64> position = sourcePositions.value(key);
+ return QSourceLocation(m_documentURI, position.first, position.second);
+ } else {
+ return QSourceLocation();
+ }
+}
+
void AccelTree::copyChildren(const QXmlNodeModelIndex &node,
QAbstractXmlReceiver *const receiver,
const NodeCopySettings &settings) const
diff --git a/src/xmlpatterns/acceltree/qacceltree_p.h b/src/xmlpatterns/acceltree/qacceltree_p.h
index 38de08c..0c68fab 100644
--- a/src/xmlpatterns/acceltree/qacceltree_p.h
+++ b/src/xmlpatterns/acceltree/qacceltree_p.h
@@ -91,6 +91,7 @@ namespace QPatternist
*/
class AccelTree : public QAbstractXmlNodeModel
{
+ friend class AccelTreePrivate;
public:
using QAbstractXmlNodeModel::createIndex;
@@ -99,15 +100,7 @@ namespace QPatternist
typedef PreNumber PostNumber;
typedef qint8 Depth;
- inline AccelTree(const QUrl &docURI,
- const QUrl &bURI) : m_documentURI(docURI),
- m_baseURI(bURI)
- {
- /* Pre-allocate at least a little bit. */
- // TODO. Do it according to what an average 4 KB doc contains.
- basicData.reserve(100);
- data.reserve(30);
- }
+ AccelTree(const QUrl &docURI, const QUrl &bURI);
/**
* @short Houses data for a node, and that all node kinds have.
@@ -280,6 +273,7 @@ namespace QPatternist
QHash<PreNumber, QString> data;
QVector<BasicNodeData> basicData;
+ QHash<PreNumber, QPair<qint64, qint64> > sourcePositions;
inline QUrl documentUri() const
{
@@ -381,6 +375,11 @@ namespace QPatternist
private:
/**
+ * Returns the source location for the object with the given @p index.
+ */
+ QSourceLocation sourceLocation(const QXmlNodeModelIndex &index) const;
+
+ /**
* Copies the children of @p node to @p receiver.
*/
inline void copyChildren(const QXmlNodeModelIndex &node,
diff --git a/src/xmlpatterns/acceltree/qacceltreebuilder.cpp b/src/xmlpatterns/acceltree/qacceltreebuilder.cpp
index 63372ac..e58cc92 100644
--- a/src/xmlpatterns/acceltree/qacceltreebuilder.cpp
+++ b/src/xmlpatterns/acceltree/qacceltreebuilder.cpp
@@ -49,15 +49,17 @@ template <bool FromDocument>
AccelTreeBuilder<FromDocument>::AccelTreeBuilder(const QUrl &docURI,
const QUrl &baseURI,
const NamePool::Ptr &np,
- ReportContext *const context) : m_preNumber(-1)
- , m_isPreviousAtomic(false)
- , m_hasCharacters(false)
- , m_isCharactersCompressed(false)
- , m_namePool(np)
- , m_document(new AccelTree(docURI, baseURI))
- , m_skippedDocumentNodes(0)
- , m_documentURI(docURI)
- , m_context(context)
+ ReportContext *const context,
+ Features features) : m_preNumber(-1)
+ , m_isPreviousAtomic(false)
+ , m_hasCharacters(false)
+ , m_isCharactersCompressed(false)
+ , m_namePool(np)
+ , m_document(new AccelTree(docURI, baseURI))
+ , m_skippedDocumentNodes(0)
+ , m_documentURI(docURI)
+ , m_context(context)
+ , m_features(features)
{
Q_ASSERT(m_namePool);
@@ -126,9 +128,18 @@ void AccelTreeBuilder<FromDocument>::item(const Item &it)
template <bool FromDocument>
void AccelTreeBuilder<FromDocument>::startElement(const QXmlName &name)
{
+ startElement(name, 1, 1);
+}
+
+template <bool FromDocument>
+void AccelTreeBuilder<FromDocument>::startElement(const QXmlName &name, qint64 line, qint64 column)
+{
startStructure();
- m_document->basicData.append(AccelTree::BasicNodeData(currentDepth(), currentParent(), QXmlNodeModelIndex::Element, -1, name));
+ AccelTree::BasicNodeData data(currentDepth(), currentParent(), QXmlNodeModelIndex::Element, -1, name);
+ m_document->basicData.append(data);
+ if (m_features & SourceLocationsFeature)
+ m_document->sourcePositions.insert(m_document->maximumPreNumber(), qMakePair(line, column));
++m_preNumber;
m_ancestors.push(m_preNumber);
diff --git a/src/xmlpatterns/acceltree/qacceltreebuilder_p.h b/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
index 6eb3102..5f6a287 100644
--- a/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
+++ b/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
@@ -90,15 +90,27 @@ namespace QPatternist
typedef QExplicitlySharedDataPointer<AccelTreeBuilder> Ptr;
/**
+ * Describes the memory relevant features the builder shall support.
+ */
+ enum Feature
+ {
+ NoneFeature, ///< No special features are enabled.
+ SourceLocationsFeature = 1 ///< The accel tree builder will store source locations for each start element.
+ };
+ Q_DECLARE_FLAGS(Features, Feature)
+
+ /**
* @param context may be @c null.
*/
AccelTreeBuilder(const QUrl &docURI,
const QUrl &baseURI,
const NamePool::Ptr &np,
- ReportContext *const context);
+ ReportContext *const context,
+ Features features = NoneFeature);
virtual void startDocument();
virtual void endDocument();
virtual void startElement(const QXmlName &name);
+ void startElement(const QXmlName &name, qint64 line, qint64 column);
virtual void endElement();
virtual void attribute(const QXmlName &name, const QStringRef &value);
virtual void characters(const QStringRef &ch);
@@ -175,8 +187,13 @@ namespace QPatternist
* a member.
*/
ReportContext *const m_context;
+
+ Features m_features;
};
+ Q_DECLARE_OPERATORS_FOR_FLAGS(AccelTreeBuilder<true>::Features)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(AccelTreeBuilder<false>::Features)
+
#include "qacceltreebuilder.cpp"
}
diff --git a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp
index 0e59821..1cd84db 100644
--- a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp
+++ b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp
@@ -46,7 +46,6 @@
#include <QtNetwork/QNetworkRequest>
-#include "qacceltreebuilder_p.h"
#include "qatomicstring_p.h"
#include "qautoptr_p.h"
#include "qcommonsequencetypes_p.h"
@@ -57,14 +56,12 @@ QT_BEGIN_NAMESPACE
using namespace QPatternist;
-static inline uint qHash(const QUrl &uri)
-{
- return qHash(uri.toString());
-}
-
AccelTreeResourceLoader::AccelTreeResourceLoader(const NamePool::Ptr &np,
- const NetworkAccessDelegator::Ptr &manager) : m_namePool(np)
- , m_networkAccessDelegator(manager)
+ const NetworkAccessDelegator::Ptr &manager,
+ AccelTreeBuilder<true>::Features features)
+ : m_namePool(np)
+ , m_networkAccessDelegator(manager)
+ , m_features(features)
{
Q_ASSERT(m_namePool);
Q_ASSERT(m_networkAccessDelegator);
@@ -74,7 +71,7 @@ bool AccelTreeResourceLoader::retrieveDocument(const QUrl &uri,
const ReportContext::Ptr &context)
{
Q_ASSERT(uri.isValid());
- AccelTreeBuilder<true> builder(uri, uri, m_namePool, context.data());
+ AccelTreeBuilder<true> builder(uri, uri, m_namePool, context.data(), m_features);
const AutoPtr<QNetworkReply> reply(load(uri, m_networkAccessDelegator, context));
@@ -88,18 +85,35 @@ bool AccelTreeResourceLoader::retrieveDocument(const QUrl &uri,
return success;
}
+bool AccelTreeResourceLoader::retrieveDocument(QIODevice *source, const QUrl &documentUri, const ReportContext::Ptr &context)
+{
+ Q_ASSERT(source);
+ Q_ASSERT(source->isReadable());
+ Q_ASSERT(documentUri.isValid());
+
+ AccelTreeBuilder<true> builder(documentUri, documentUri, m_namePool, context.data(), m_features);
+
+ bool success = false;
+ success = streamToReceiver(source, &builder, m_namePool, context, documentUri);
+
+ m_loadedDocuments.insert(documentUri, builder.builtDocument());
+
+ return success;
+}
+
QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri,
const NetworkAccessDelegator::Ptr &networkDelegator,
- const ReportContext::Ptr &context)
+ const ReportContext::Ptr &context, ErrorHandling errorHandling)
{
return load(uri,
networkDelegator->managerFor(uri),
- context);
+ context, errorHandling);
}
QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri,
QNetworkAccessManager *const networkManager,
- const ReportContext::Ptr &context)
+ const ReportContext::Ptr &context, ErrorHandling errorHandling)
+
{
Q_ASSERT(networkManager);
Q_ASSERT(uri.isValid());
@@ -120,7 +134,7 @@ QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri,
const QSourceLocation location(uri);
- if(context)
+ if(context && (errorHandling == FailOnError))
context->error(errorMessage, ReportContext::FODC0002, location);
return 0;
@@ -130,7 +144,7 @@ QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri,
}
bool AccelTreeResourceLoader::streamToReceiver(QIODevice *const dev,
- QAbstractXmlReceiver *const receiver,
+ AccelTreeBuilder<true> *const receiver,
const NamePool::Ptr &np,
const ReportContext::Ptr &context,
const QUrl &uri)
@@ -154,7 +168,7 @@ bool AccelTreeResourceLoader::streamToReceiver(QIODevice *const dev,
{
/* Send the name. */
receiver->startElement(np->allocateQName(reader.namespaceUri().toString(), reader.name().toString(),
- reader.prefix().toString()));
+ reader.prefix().toString()), reader.lineNumber(), reader.columnNumber());
/* Send namespace declarations. */
const QXmlStreamNamespaceDeclarations &nss = reader.namespaceDeclarations();
@@ -263,6 +277,22 @@ Item AccelTreeResourceLoader::openDocument(const QUrl &uri,
}
}
+Item AccelTreeResourceLoader::openDocument(QIODevice *source, const QUrl &documentUri,
+ const ReportContext::Ptr &context)
+{
+ const AccelTree::Ptr doc(m_loadedDocuments.value(documentUri));
+
+ if(doc)
+ return doc->root(QXmlNodeModelIndex()); /* Pass in dummy object. We know AccelTree doesn't use it. */
+ else
+ {
+ if(retrieveDocument(source, documentUri, context))
+ return m_loadedDocuments.value(documentUri)->root(QXmlNodeModelIndex()); /* Pass in dummy object. We know AccelTree doesn't use it. */
+ else
+ return Item();
+ }
+}
+
SequenceType::Ptr AccelTreeResourceLoader::announceDocument(const QUrl &uri, const Usage)
{
// TODO deal with the usage thingy
diff --git a/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h b/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h
index a650dfa..f24a88e 100644
--- a/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h
+++ b/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h
@@ -52,12 +52,12 @@
#ifndef Patternist_AccelTreeResourceLoader_H
#define Patternist_AccelTreeResourceLoader_H
-#include <QtCore/QHash>
#include <QtCore/QEventLoop>
#include <QtNetwork/QNetworkReply>
#include "qabstractxmlreceiver.h"
#include "qacceltree_p.h"
+#include "qacceltreebuilder_p.h"
#include "qdeviceresourceloader_p.h"
#include "qnamepool_p.h"
#include "qnetworkaccessdelegator_p.h"
@@ -115,13 +115,25 @@ namespace QPatternist
{
public:
/**
+ * Describes the behaviour of the resource loader in case of an
+ * error.
+ */
+ enum ErrorHandling
+ {
+ FailOnError, ///< The resource loader will report the error via the report context.
+ ContinueOnError ///< The resource loader will report no error and return an empty QNetworkReply.
+ };
+
+ /**
* AccelTreeResourceLoader does not own @p context.
*/
AccelTreeResourceLoader(const NamePool::Ptr &np,
- const NetworkAccessDelegator::Ptr &networkDelegator);
+ const NetworkAccessDelegator::Ptr &networkDelegator, AccelTreeBuilder<true>::Features = AccelTreeBuilder<true>::NoneFeature);
virtual Item openDocument(const QUrl &uri,
const ReportContext::Ptr &context);
+ virtual Item openDocument(QIODevice *source, const QUrl &documentUri,
+ const ReportContext::Ptr &context);
virtual SequenceType::Ptr announceDocument(const QUrl &uri, const Usage usageHint);
virtual bool isDocumentAvailable(const QUrl &uri);
@@ -133,7 +145,6 @@ namespace QPatternist
const ReportContext::Ptr &context,
const SourceLocationReflection *const where);
-
/**
* @short Helper function that do NetworkAccessDelegator::get(), but
* does it blocked.
@@ -149,14 +160,14 @@ namespace QPatternist
*/
static QNetworkReply *load(const QUrl &uri,
QNetworkAccessManager *const networkManager,
- const ReportContext::Ptr &context);
+ const ReportContext::Ptr &context, ErrorHandling handling = FailOnError);
/**
* @overload
*/
static QNetworkReply *load(const QUrl &uri,
const NetworkAccessDelegator::Ptr &networkDelegator,
- const ReportContext::Ptr &context);
+ const ReportContext::Ptr &context, ErrorHandling handling = FailOnError);
/**
* @short Returns the URIs this AccelTreeResourceLoader has loaded
@@ -165,14 +176,17 @@ namespace QPatternist
virtual QSet<QUrl> deviceURIs() const;
virtual void clear(const QUrl &uri);
+
private:
static bool streamToReceiver(QIODevice *const dev,
- QAbstractXmlReceiver *const receiver,
+ AccelTreeBuilder<true> *const receiver,
const NamePool::Ptr &np,
const ReportContext::Ptr &context,
const QUrl &uri);
bool retrieveDocument(const QUrl &uri,
const ReportContext::Ptr &context);
+ bool retrieveDocument(QIODevice *source, const QUrl &documentUri,
+ const ReportContext::Ptr &context);
/**
* If @p context is @c null, no error reporting should be done.
*/
@@ -185,6 +199,7 @@ namespace QPatternist
const NamePool::Ptr m_namePool;
const NetworkAccessDelegator::Ptr m_networkAccessDelegator;
QHash<QPair<QUrl, QString>, QString> m_unparsedTexts;
+ AccelTreeBuilder<true>::Features m_features;
};
}
diff --git a/src/xmlpatterns/api/api.pri b/src/xmlpatterns/api/api.pri
index a0298f2..9fcc2f5 100644
--- a/src/xmlpatterns/api/api.pri
+++ b/src/xmlpatterns/api/api.pri
@@ -3,11 +3,13 @@ HEADERS += $$PWD/qabstractxmlforwarditerator_p.h \
$$PWD/qabstracturiresolver.h \
$$PWD/qabstractxmlnodemodel.h \
$$PWD/qabstractxmlnodemodel_p.h \
+ $$PWD/qabstractxmlpullprovider_p.h \
$$PWD/qabstractxmlreceiver.h \
$$PWD/qabstractxmlreceiver_p.h \
$$PWD/qdeviceresourceloader_p.h \
$$PWD/qiodevicedelegate_p.h \
$$PWD/qnetworkaccessdelegator_p.h \
+ $$PWD/qpullbridge_p.h \
$$PWD/qresourcedelegator_p.h \
$$PWD/qsimplexmlnodemodel.h \
$$PWD/qsourcelocation.h \
@@ -20,6 +22,10 @@ HEADERS += $$PWD/qabstractxmlforwarditerator_p.h \
$$PWD/qxmlquery_p.h \
$$PWD/qxmlresultitems.h \
$$PWD/qxmlresultitems_p.h \
+ $$PWD/qxmlschema.h \
+ $$PWD/qxmlschema_p.h \
+ $$PWD/qxmlschemavalidator.h \
+ $$PWD/qxmlschemavalidator_p.h \
$$PWD/qxmlserializer.h \
$$PWD/qxmlserializer_p.h \
$$PWD/../../../tools/xmlpatterns/qcoloringmessagehandler_p.h \
@@ -29,9 +35,11 @@ SOURCES += $$PWD/qvariableloader.cpp \
$$PWD/qabstractmessagehandler.cpp \
$$PWD/qabstracturiresolver.cpp \
$$PWD/qabstractxmlnodemodel.cpp \
+ $$PWD/qabstractxmlpullprovider.cpp \
$$PWD/qabstractxmlreceiver.cpp \
$$PWD/qiodevicedelegate.cpp \
$$PWD/qnetworkaccessdelegator.cpp \
+ $$PWD/qpullbridge.cpp \
$$PWD/qresourcedelegator.cpp \
$$PWD/qsimplexmlnodemodel.cpp \
$$PWD/qsourcelocation.cpp \
@@ -41,6 +49,9 @@ SOURCES += $$PWD/qvariableloader.cpp \
$$PWD/qxmlnamepool.cpp \
$$PWD/qxmlquery.cpp \
$$PWD/qxmlresultitems.cpp \
+ $$PWD/qxmlschema.cpp \
+ $$PWD/qxmlschema_p.cpp \
+ $$PWD/qxmlschemavalidator.cpp \
$$PWD/qxmlserializer.cpp \
$$PWD/../../../tools/xmlpatterns/qcoloringmessagehandler.cpp \
$$PWD/../../../tools/xmlpatterns/qcoloroutput.cpp
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
index fde2c17..06f03e6 100644
--- a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
+++ b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
@@ -1666,4 +1666,20 @@ void QAbstractXmlNodeModel::copyNodeTo(const QXmlNodeModelIndex &node,
"This function is not expected to be called.");
}
+/*!
+ Returns the source location for the object with the given \a index
+ or a default constructed QSourceLocation in case no location
+ information is available.
+
+ \since 4.6
+*/
+QSourceLocation QAbstractXmlNodeModel::sourceLocation(const QXmlNodeModelIndex &index) const
+{
+ // TODO: make this method virtual in Qt5 to allow source location support in custom models
+ if (d_ptr)
+ return d_ptr->sourceLocation(index);
+ else
+ return QSourceLocation();
+}
+
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.h b/src/xmlpatterns/api/qabstractxmlnodemodel.h
index 9629f27..3d44547 100644
--- a/src/xmlpatterns/api/qabstractxmlnodemodel.h
+++ b/src/xmlpatterns/api/qabstractxmlnodemodel.h
@@ -56,6 +56,7 @@ QT_MODULE(XmlPatterns)
class QAbstractXmlNodeModel;
class QAbstractXmlNodeModelPrivate;
class QAbstractXmlReceiver;
+class QSourceLocation;
class QUrl;
class QXmlName;
class QXmlNodeModelIndex;
@@ -69,6 +70,7 @@ namespace QPatternist
class DynamicContext;
class Item;
class ItemType;
+ class XsdValidatedXmlNodeModel;
template<typename TResult, typename TSource, typename TMapper, typename Context> class ItemMappingIterator;
template<typename TResult, typename TSource, typename TMapper> class SequenceMappingIterator;
typedef QExplicitlySharedDataPointer<ItemType> ItemTypePtr;
@@ -315,6 +317,8 @@ public:
QAbstractXmlReceiver *const receiver,
const NodeCopySettings &) const;
+ QSourceLocation sourceLocation(const QXmlNodeModelIndex &index) const;
+
protected:
virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &origin) const = 0;
@@ -343,6 +347,7 @@ protected:
private:
friend class QPatternist::ItemMappingIterator<QXmlNodeModelIndex, QXmlNodeModelIndex, const QAbstractXmlNodeModel *, QExplicitlySharedDataPointer<QPatternist::DynamicContext> >;
friend class QPatternist::SequenceMappingIterator<QXmlNodeModelIndex, QXmlNodeModelIndex, const QAbstractXmlNodeModel *>;
+ friend class QPatternist::XsdValidatedXmlNodeModel;
inline QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<QXmlNodeModelIndex> > mapToSequence(const QXmlNodeModelIndex &ni,
const QExplicitlySharedDataPointer<QPatternist::DynamicContext> &) const;
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel_p.h b/src/xmlpatterns/api/qabstractxmlnodemodel_p.h
index 5d9e0eb..9061616 100644
--- a/src/xmlpatterns/api/qabstractxmlnodemodel_p.h
+++ b/src/xmlpatterns/api/qabstractxmlnodemodel_p.h
@@ -52,6 +52,9 @@
#ifndef QABSTRACTXMLNODEMODEL_P_H
#define QABSTRACTXMLNODEMODEL_P_H
+#include "qabstractxmlnodemodel.h"
+#include "qsourcelocation.h"
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -62,6 +65,13 @@ public:
virtual ~QAbstractXmlNodeModelPrivate()
{
}
+
+ virtual QSourceLocation sourceLocation(const QXmlNodeModelIndex &index) const
+ {
+ Q_UNUSED(index);
+
+ return QSourceLocation();
+ }
};
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/api/qabstractxmlpullprovider.cpp b/src/xmlpatterns/api/qabstractxmlpullprovider.cpp
new file mode 100644
index 0000000..f006988
--- /dev/null
+++ b/src/xmlpatterns/api/qabstractxmlpullprovider.cpp
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QHash>
+
+#include "qxmlname.h"
+#include "qnamepool_p.h"
+#include "qabstractxmlpullprovider_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+// TODO have example where query selects, and the events for the result are indented
+
+/*!
+ \internal
+ \class AbstractXmlPullProvider
+ \brief The AbstractXmlPullProvider class provides a pull-based stream interface for the XPath Data Model.
+ \reentrant
+ \ingroup xml-tools
+
+ AbstractXmlPullProvider allows a stream of items from the XPath Data Model -- essentially XML --
+ to be iterated over. The subclass of AbstractXmlPullProvider provides the events, and the
+ user calling next() and so on, consumes them. AbstractXmlPullProvider can be considered
+ a forward-only, non-reversible iterator.
+
+ Note that the content the events describes, are not necessarily a well-formed XML document, but
+ rather an instance of the XPath Data model, to be specific. For instance, maybe a pull provider
+ returns two atomic values, followed by an element tree, and at the end two document nodes.
+
+ If you are subclassing AbstractXmlPullProvider, be careful to correctly implement
+ the behaviors, as described for the individual members and events.
+
+ \sa AbstractXmlPullProvider::Event
+ */
+
+/*!
+ \enum AbstractXmlPullProvider::Event
+ \value StartOfInput The value AbstractXmlPullProvider::current() returns before the first call to next().
+ \value AtomicValue an atomic value such as an \c xs:integer, \c xs:hexBinary, or \c xs:dateTime. Atomic values
+ can only be top level items.
+ \value StartDocument Signals the start of a document node. Note that a AbstractXmlPullProvider can provide
+ a sequence of document nodes.
+ \value EndDocument Signals the end of a document node. StartDocument and EndDocument are always balanced
+ and always top-level events. For instance, StartDocument can never appear after any StartElement
+ events that hasn't been balanced by the corresponding amount of EndElement events.
+ \value StartElement Signals an element start tag.
+ \value EndElement Signals the end of an element. StartElement and EndElement events are always balanced.
+ \value Text Signals a text node. Adjacent text nodes cannot occur.
+ \value ProcessingInstruction A processing instruction. Its name is returned from name(), and its value in stringValue().
+ \value Comment a comment node. Its value can be retrieved with stingValue().
+ \value Attribute Signals an attribute node. Attribute events can only appear after Namespace events, or
+ if no such are sent, after the StartElement. In addition they must appear sequentially,
+ and each name must be unique. The ordering of attribute events is undefined and insignificant.
+ \value Namespace Signals a namespace binding. They occur very infrequently and are not needed for attributes
+ and elements. Namespace events can only appear after the StartElement event. The
+ ordering of namespace events is undefined and insignificant.
+ \value EndOfInput When next() is called after the last event, EndOfInput is returned.
+
+ \sa AbstractXmlPullProvider::current()
+ */
+
+/*!
+ Constucts a AbstractXmlPullProvider instance.
+ */
+AbstractXmlPullProvider::AbstractXmlPullProvider()
+{
+}
+
+/*!
+ Destructs this AbstractXmlPullProvider.
+ */
+AbstractXmlPullProvider::~AbstractXmlPullProvider()
+{
+}
+
+/*!
+ \fn Event AbstractXmlPullProvider::next() = 0;
+ Advances this AbstractXmlPullProvider, and returns the new event.
+
+ \sa current()
+ */
+
+/*!
+ \fn Event AbstractXmlPullProvider::current() const = 0;
+ Returns the event that next() returned the last time it was called. It doesn't
+ alter this AbstractXmlPullProvider.
+
+ current() may not modify this AbstractXmlPullProvider's state. Subsequent calls to current()
+ must return the same value.
+
+ \sa AbstractXmlPullProvider::Event
+ */
+
+/*!
+ \fn QName AbstractXmlPullProvider::name() const = 0;
+ If the current event is StartElement,
+ EndElement, ProcessingInstruction, Attribute, or Namespace, the node's name is returned.
+
+ If the current event is ProcessingInstruction,
+ the processing instruction target is in in the local name.
+
+ If the current event is Namespace, the name's namespace URI is the namespace, and
+ the local name is the prefix the name is binding to.
+
+ In all other cases, an invalid QName is returned.
+ */
+
+/*!
+ \fn QVariant AbstractXmlPullProvider::atomicValue() const = 0;
+
+ If current() event is AtomicValue, the atomic value is returned as a QVariant.
+ In all other cases, this function returns a null QVariant.
+ */
+
+/*!
+ \fn QString AbstractXmlPullProvider::stringValue() const = 0;
+
+ If current() is Text, the text node's value is returned.
+
+ If the current() event is Comment, its value is returned. The subclasser guarantees
+ it does not contain the string "-->".
+
+ If the current() event is ProcessingInstruction, its data is returned. The subclasser
+ guarantees the data does not contain the string "?>".
+
+ In other cases, it returns a default constructed string.
+ */
+
+/*!
+ \fn QHash<QXmlName, QString> AbstractXmlPullProvider::attributes() = 0;
+
+ If the current() is Element, the attributes of the element are returned,
+ an empty list of attributes otherwise.
+ */
+
+QT_END_NAMESPACE
+
diff --git a/src/xmlpatterns/api/qabstractxmlpullprovider_p.h b/src/xmlpatterns/api/qabstractxmlpullprovider_p.h
new file mode 100644
index 0000000..59dce72
--- /dev/null
+++ b/src/xmlpatterns/api/qabstractxmlpullprovider_p.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QABSTRACTXMLPULLPROVIDER_H
+#define QABSTRACTXMLPULLPROVIDER_H
+
+#include <QtCore/QtGlobal>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QXmlItem;
+class QXmlName;
+class QString;
+class QVariant;
+template<typename Key, typename Value> class QHash;
+
+namespace QPatternist
+{
+ class AbstractXmlPullProviderPrivate;
+
+ class AbstractXmlPullProvider
+ {
+ public:
+ AbstractXmlPullProvider();
+ virtual ~AbstractXmlPullProvider();
+
+ enum Event
+ {
+ StartOfInput = 1,
+ AtomicValue = 1 << 1,
+ StartDocument = 1 << 2,
+ EndDocument = 1 << 3,
+ StartElement = 1 << 4,
+ EndElement = 1 << 5,
+ Text = 1 << 6,
+ ProcessingInstruction = 1 << 7,
+ Comment = 1 << 8,
+ Attribute = 1 << 9,
+ Namespace = 1 << 10,
+ EndOfInput = 1 << 11
+ };
+
+ virtual Event next() = 0;
+ virtual Event current() const = 0;
+ virtual QXmlName name() const = 0;
+ virtual QVariant atomicValue() const = 0;
+ virtual QString stringValue() const = 0;
+
+ virtual QHash<QXmlName, QString> attributes() = 0;
+ virtual QHash<QXmlName, QXmlItem> attributeItems() = 0;
+
+ /* *** The functions below are internal. */
+ private:
+ Q_DISABLE_COPY(AbstractXmlPullProvider)
+ AbstractXmlPullProviderPrivate *d;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/api/qpullbridge.cpp b/src/xmlpatterns/api/qpullbridge.cpp
new file mode 100644
index 0000000..75df519
--- /dev/null
+++ b/src/xmlpatterns/api/qpullbridge.cpp
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QVariant>
+
+#include "qabstractxmlnodemodel_p.h"
+#include "qitemmappingiterator_p.h"
+#include "qitem_p.h"
+#include "qxmlname.h"
+#include "qxmlquery_p.h"
+
+#include "qpullbridge_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/*!
+ \brief Bridges a QPatternist::SequenceIterator to QAbstractXmlPullProvider.
+ \class QPatternist::PullBridge
+ \internal
+ \reentrant
+ \ingroup xml-tools
+
+ The approach of this class is rather straight forward since QPatternist::SequenceIterator
+ and QAbstractXmlPullProvider are conceptually similar. While QPatternist::SequenceIterator only
+ delivers top level items(since it's not an event stream, it's a list of items), PullBridge
+ needs to recursively iterate the children of nodes too, which is achieved through the
+ stack m_iterators.
+ */
+
+AbstractXmlPullProvider::Event PullBridge::next()
+{
+ m_index = m_iterators.top().second->next();
+
+ if(!m_index.isNull())
+ {
+ Item item(m_index);
+
+ if(item && item.isAtomicValue())
+ m_current = AtomicValue;
+ else
+ {
+ Q_ASSERT(item.isNode());
+
+ switch(m_index.kind())
+ {
+ case QXmlNodeModelIndex::Attribute:
+ {
+ m_current = Attribute;
+ break;
+ }
+ case QXmlNodeModelIndex::Comment:
+ {
+ m_current = Comment;
+ break;
+ }
+ case QXmlNodeModelIndex::Element:
+ {
+ m_iterators.push(qMakePair(StartElement, m_index.iterate(QXmlNodeModelIndex::AxisChild)));
+ m_current = StartElement;
+ break;
+ }
+ case QXmlNodeModelIndex::Document:
+ {
+ m_iterators.push(qMakePair(StartDocument, m_index.iterate(QXmlNodeModelIndex::AxisChild)));
+ m_current = StartDocument;
+ break;
+ }
+ case QXmlNodeModelIndex::Namespace:
+ {
+ m_current = Namespace;
+ break;
+ }
+ case QXmlNodeModelIndex::ProcessingInstruction:
+ {
+ m_current = ProcessingInstruction;
+ break;
+ }
+ case QXmlNodeModelIndex::Text:
+ {
+ m_current = Text;
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ if(m_iterators.isEmpty())
+ m_current = EndOfInput;
+ else
+ {
+ switch(m_iterators.top().first)
+ {
+ case StartOfInput:
+ {
+ m_current = EndOfInput;
+ break;
+ }
+ case StartElement:
+ {
+ m_current = EndElement;
+ m_iterators.pop();
+ break;
+ }
+ case StartDocument:
+ {
+ m_current = EndDocument;
+ m_iterators.pop();
+ break;
+ }
+ default:
+ {
+ Q_ASSERT_X(false, Q_FUNC_INFO,
+ "Invalid value.");
+ m_current = EndOfInput;
+ }
+ }
+ }
+
+ }
+
+ return m_current;
+}
+
+AbstractXmlPullProvider::Event PullBridge::current() const
+{
+ return m_current;
+}
+
+QXmlNodeModelIndex PullBridge::index() const
+{
+ return m_index;
+}
+
+QSourceLocation PullBridge::sourceLocation() const
+{
+ return m_index.model()->sourceLocation(m_index);
+}
+
+QXmlName PullBridge::name() const
+{
+ return m_index.name();
+}
+
+QVariant PullBridge::atomicValue() const
+{
+ return QVariant();
+}
+
+QString PullBridge::stringValue() const
+{
+ return QString();
+}
+
+QHash<QXmlName, QString> PullBridge::attributes()
+{
+ Q_ASSERT(m_current == StartElement);
+
+ QHash<QXmlName, QString> attributes;
+
+ QXmlNodeModelIndex::Iterator::Ptr it = m_index.iterate(QXmlNodeModelIndex::AxisAttribute);
+ QXmlNodeModelIndex index = it->next();
+ while (!index.isNull()) {
+ const Item attribute(index);
+ attributes.insert(index.name(), index.stringValue());
+
+ index = it->next();
+ }
+
+ return attributes;
+}
+
+QHash<QXmlName, QXmlItem> PullBridge::attributeItems()
+{
+ Q_ASSERT(m_current == StartElement);
+
+ QHash<QXmlName, QXmlItem> attributes;
+
+ QXmlNodeModelIndex::Iterator::Ptr it = m_index.iterate(QXmlNodeModelIndex::AxisAttribute);
+ QXmlNodeModelIndex index = it->next();
+ while (!index.isNull()) {
+ const Item attribute(index);
+ attributes.insert(index.name(), QXmlItem(index));
+
+ index = it->next();
+ }
+
+ return attributes;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/xmlpatterns/api/qpullbridge_p.h b/src/xmlpatterns/api/qpullbridge_p.h
new file mode 100644
index 0000000..23b9542
--- /dev/null
+++ b/src/xmlpatterns/api/qpullbridge_p.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef PATTERNIST_PULLBRIDGE_P_H
+#define PATTERNIST_PULLBRIDGE_P_H
+
+#include <QtCore/QPair>
+#include <QtCore/QStack>
+
+#include "qabstractxmlforwarditerator_p.h"
+#include "qabstractxmlpullprovider_p.h"
+#include "qitem_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ class PullBridge : public AbstractXmlPullProvider
+ {
+ public:
+ inline PullBridge(const QXmlNodeModelIndex::Iterator::Ptr &it) : m_current(StartOfInput)
+ {
+ Q_ASSERT(it);
+ m_iterators.push(qMakePair(StartOfInput, it));
+ }
+
+ virtual Event next();
+ virtual Event current() const;
+ virtual QXmlName name() const;
+ /**
+ * Returns always an empty QVariant.
+ */
+ virtual QVariant atomicValue() const;
+ virtual QString stringValue() const;
+ virtual QHash<QXmlName, QString> attributes();
+ virtual QHash<QXmlName, QXmlItem> attributeItems();
+
+ QXmlNodeModelIndex index() const;
+ QSourceLocation sourceLocation() const;
+
+ private:
+ typedef QStack<QPair<Event, QXmlNodeModelIndex::Iterator::Ptr> > IteratorStack;
+ IteratorStack m_iterators;
+ QXmlNodeModelIndex m_index;
+ Event m_current;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/api/qresourcedelegator.cpp b/src/xmlpatterns/api/qresourcedelegator.cpp
index 5a5bcf4..ad93848 100644
--- a/src/xmlpatterns/api/qresourcedelegator.cpp
+++ b/src/xmlpatterns/api/qresourcedelegator.cpp
@@ -45,14 +45,6 @@ QT_BEGIN_NAMESPACE
using namespace QPatternist;
-/**
- * Duplicated in qacceltreeresourceloader.cpp.
- */
-static inline uint qHash(const QUrl &uri)
-{
- return qHash(uri.toString());
-}
-
bool ResourceDelegator::isUnparsedTextAvailable(const QUrl &uri,
const QString &encoding)
{
diff --git a/src/xmlpatterns/api/qxmlnamepool.cpp b/src/xmlpatterns/api/qxmlnamepool.cpp
index 5b03975..66eb788 100644
--- a/src/xmlpatterns/api/qxmlnamepool.cpp
+++ b/src/xmlpatterns/api/qxmlnamepool.cpp
@@ -96,6 +96,10 @@ QXmlNamePool::~QXmlNamePool()
{
}
+QXmlNamePool::QXmlNamePool(QPatternist::NamePool *namePool) : d(QExplicitlySharedDataPointer<QPatternist::NamePool>(namePool))
+{
+}
+
/*!
Assigns the \a other name pool to this one.
*/
diff --git a/src/xmlpatterns/api/qxmlnamepool.h b/src/xmlpatterns/api/qxmlnamepool.h
index 68cf627..6c1fe4f 100644
--- a/src/xmlpatterns/api/qxmlnamepool.h
+++ b/src/xmlpatterns/api/qxmlnamepool.h
@@ -54,6 +54,8 @@ QT_MODULE(XmlPatterns)
namespace QPatternist
{
class NamePool;
+ class XsdSchemaParser;
+ class XsdValidatingInstanceReader;
}
namespace QPatternistSDK
@@ -73,10 +75,15 @@ public:
QXmlNamePool &operator=(const QXmlNamePool &other);
private:
+ QXmlNamePool(QPatternist::NamePool *namePool);
friend class QXmlQueryPrivate;
friend class QXmlQuery;
+ friend class QXmlSchemaPrivate;
+ friend class QXmlSchemaValidatorPrivate;
friend class QXmlSerializerPrivate;
friend class QXmlName;
+ friend class QPatternist::XsdSchemaParser;
+ friend class QPatternist::XsdValidatingInstanceReader;
friend class QPatternistSDK::Global;
QExplicitlySharedDataPointer<QPatternist::NamePool> d;
};
diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp
index 3d023a0..79ae7a9 100644
--- a/src/xmlpatterns/api/qxmlquery.cpp
+++ b/src/xmlpatterns/api/qxmlquery.cpp
@@ -231,6 +231,18 @@ QT_BEGIN_NAMESPACE
\value XQuery10 XQuery 1.0.
\value XSLT20 XSLT 2.0
+ \omitvalue XmlSchema11IdentityConstraintSelector The selector, the restricted
+ XPath pattern found in W3C XML Schema 1.1 for uniqueness
+ contraints. Apart from restricting the syntax, the type check stage
+ for the expression assumes a sequence of nodes to be the focus.
+ \omitvalue XmlSchema11IdentityConstraintField The field, the restricted
+ XPath pattern found in W3C XML Schema 1.1 for uniqueness
+ contraints. Apart from restricting the syntax, the type check stage
+ for the expression assumes a sequence of nodes to be the focus.
+ \omitvalue XPath20 Signifies XPath 2.0. Has no effect in the public API, it's
+ used internally. As With XmlSchema11IdentityConstraintSelector and
+ XmlSchema11IdentityConstraintField, the type check stage
+ for the expression assumes a sequence of nodes to be the focus.
\sa setQuery()
*/
@@ -415,7 +427,7 @@ void QXmlQuery::setQuery(QIODevice *sourceCode, const QUrl &documentURI)
return;
}
- d->queryURI = QXmlQueryPrivate::normalizeQueryURI(documentURI);
+ d->queryURI = QPatternist::XPathHelper::normalizeQueryURI(documentURI);
d->expression(sourceCode);
}
@@ -463,12 +475,12 @@ void QXmlQuery::setQuery(const QUrl &queryURI, const QUrl &baseURI)
{
Q_ASSERT_X(queryURI.isValid(), Q_FUNC_INFO, "The passed URI must be valid.");
- const QUrl canonicalURI(QXmlQueryPrivate::normalizeQueryURI(queryURI));
+ const QUrl canonicalURI(QPatternist::XPathHelper::normalizeQueryURI(queryURI));
Q_ASSERT(canonicalURI.isValid());
Q_ASSERT(!canonicalURI.isRelative());
Q_ASSERT(baseURI.isValid() || baseURI.isEmpty());
- d->queryURI = QXmlQueryPrivate::normalizeQueryURI(baseURI.isEmpty() ? queryURI : baseURI);
+ d->queryURI = QPatternist::XPathHelper::normalizeQueryURI(baseURI.isEmpty() ? queryURI : baseURI);
QPatternist::AutoPtr<QIODevice> result;
diff --git a/src/xmlpatterns/api/qxmlquery.h b/src/xmlpatterns/api/qxmlquery.h
index 4ddfc76..b4ac121 100644
--- a/src/xmlpatterns/api/qxmlquery.h
+++ b/src/xmlpatterns/api/qxmlquery.h
@@ -71,6 +71,8 @@ namespace QPatternistSDK
namespace QPatternist
{
+ class XsdSchemaParser;
+ class XsdValidatingInstanceReader;
class VariableLoader;
};
@@ -79,8 +81,11 @@ class Q_XMLPATTERNS_EXPORT QXmlQuery
public:
enum QueryLanguage
{
- XQuery10 = 1,
- XSLT20 = 2
+ XQuery10 = 1,
+ XSLT20 = 2,
+ XmlSchema11IdentityConstraintSelector = 1024,
+ XmlSchema11IdentityConstraintField = 2048,
+ XPath20 = 4096
};
QXmlQuery();
@@ -136,6 +141,8 @@ private:
friend class QXmlName;
friend class QXmlSerializer;
friend class QPatternistSDK::TestCase;
+ friend class QPatternist::XsdSchemaParser;
+ friend class QPatternist::XsdValidatingInstanceReader;
friend class QPatternist::VariableLoader;
template<typename TInputType> friend bool setFocusHelper(QXmlQuery *const queryInstance,
const TInputType &focusValue);
diff --git a/src/xmlpatterns/api/qxmlquery_p.h b/src/xmlpatterns/api/qxmlquery_p.h
index 05222be..cb2bbad 100644
--- a/src/xmlpatterns/api/qxmlquery_p.h
+++ b/src/xmlpatterns/api/qxmlquery_p.h
@@ -142,13 +142,10 @@ public:
if(!m_functionFactory)
{
- if(queryLanguage == QXmlQuery::XQuery10)
- m_functionFactory = QPatternist::FunctionFactoryCollection::xpath20Factory(namePool.d);
- else
- {
- Q_ASSERT(queryLanguage == QXmlQuery::XSLT20);
+ if(queryLanguage == QXmlQuery::XSLT20)
m_functionFactory = QPatternist::FunctionFactoryCollection::xslt20Factory(namePool.d);
- }
+ else
+ m_functionFactory = QPatternist::FunctionFactoryCollection::xpath20Factory(namePool.d);
}
const QPatternist::GenericStaticContext::Ptr genericStaticContext(new QPatternist::GenericStaticContext(namePool.d,
@@ -164,6 +161,14 @@ public:
if(!contextItem.isNull())
m_staticContext = QPatternist::StaticContext::Ptr(new QPatternist::StaticFocusContext(QPatternist::AtomicValue::qtToXDMType(contextItem), m_staticContext));
+ else if( queryLanguage == QXmlQuery::XmlSchema11IdentityConstraintField
+ || queryLanguage == QXmlQuery::XmlSchema11IdentityConstraintSelector
+ || queryLanguage == QXmlQuery::XPath20)
+ m_staticContext = QPatternist::StaticContext::Ptr(new QPatternist::StaticFocusContext(QPatternist::BuiltinTypes::node, m_staticContext));
+
+ for (int i = 0; i < m_additionalNamespaceBindings.count(); ++i) {
+ m_staticContext->namespaceBindings()->addBinding(m_additionalNamespaceBindings.at(i));
+ }
return m_staticContext;
}
@@ -207,19 +212,6 @@ public:
return m_resourceLoader;
}
-
- static inline QUrl normalizeQueryURI(const QUrl &uri)
- {
- Q_ASSERT_X(uri.isEmpty() || uri.isValid(), Q_FUNC_INFO,
- "The URI passed to QXmlQuery::setQuery() must be valid or empty.");
- if(uri.isEmpty())
- return QUrl::fromLocalFile(QCoreApplication::applicationFilePath());
- else if(uri.isRelative())
- return QUrl::fromLocalFile(QCoreApplication::applicationFilePath()).resolved(uri);
- else
- return uri;
- }
-
void setRequiredType(const QPatternist::SequenceType::Ptr &seqType)
{
Q_ASSERT(seqType);
@@ -278,6 +270,11 @@ public:
return m_expr;
}
+ inline void addAdditionalNamespaceBinding(const QXmlName &binding)
+ {
+ m_additionalNamespaceBindings.append(binding);
+ }
+
QXmlNamePool namePool;
QPointer<QAbstractMessageHandler> messageHandler;
/**
@@ -321,6 +318,8 @@ public:
QPatternist::SequenceType::Ptr m_requiredType;
QPatternist::FunctionFactory::Ptr m_functionFactory;
QPatternist::NetworkAccessDelegator::Ptr m_networkAccessDelegator;
+
+ QList<QXmlName> m_additionalNamespaceBindings;
};
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/api/qxmlschema.cpp b/src/xmlpatterns/api/qxmlschema.cpp
new file mode 100644
index 0000000..af4c715
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschema.cpp
@@ -0,0 +1,295 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxmlschema.h"
+#include "qxmlschema_p.h"
+
+#include <QtCore/QIODevice>
+#include <QtCore/QUrl>
+
+/*!
+ \class QXmlSchema
+
+ \brief The QXmlSchema class provides loading and validation of a W3C XML Schema.
+
+ \reentrant
+ \since 4.6
+ \ingroup xml-tools
+
+ The QXmlSchema class loads, compiles and validates W3C XML Schema files
+ that can be used further for validation of XML instance documents via
+ \l{QXmlSchemaValidator}.
+
+ The following example shows how to load a XML Schema file from the network
+ and test whether it is a valid schema document:
+
+ \snippet doc/src/snippets/qxmlschema/main.cpp 0
+
+ \sa QXmlSchemaValidator, {xmlpatterns/schema}{XML Schema Validation Example}
+*/
+
+/*!
+ Constructs an invalid, empty schema that cannot be used until
+ load() is called.
+ */
+QXmlSchema::QXmlSchema()
+ : d(new QXmlSchemaPrivate(QXmlNamePool()))
+{
+}
+
+/*!
+ Constructs a QXmlSchema that is a copy of \a other. The new
+ instance will share resources with the existing schema
+ to the extent possible.
+ */
+QXmlSchema::QXmlSchema(const QXmlSchema &other)
+ : d(other.d)
+{
+}
+
+/*!
+ Destroys this QXmlSchema.
+ */
+QXmlSchema::~QXmlSchema()
+{
+}
+
+/*!
+ Sets this QXmlSchema to a schema loaded from the \a source
+ URI.
+
+ If the schema \l {isValid()} {is invalid}, \c{false} is returned
+ and the behavior is undefined.
+
+ Example:
+
+ \snippet doc/src/snippets/qxmlschema/main.cpp 0
+
+ \sa isValid()
+ */
+bool QXmlSchema::load(const QUrl &source)
+{
+ d->load(source, QString());
+ return d->isValid();
+}
+
+/*!
+ Sets this QXmlSchema to a schema read from the \a source
+ device. The device must have been opened with at least
+ QIODevice::ReadOnly.
+
+ \a documentUri represents the schema obtained from the \a source
+ device. It is the base URI of the schema, that is used
+ internally to resolve relative URIs that appear in the schema, and
+ for message reporting.
+
+ If \a source is \c null or not readable, or if \a documentUri is not
+ a valid URI, behavior is undefined.
+
+ If the schema \l {isValid()} {is invalid}, \c{false} is returned
+ and the behavior is undefined.
+
+ Example:
+
+ \snippet doc/src/snippets/qxmlschema/main.cpp 1
+
+ \sa isValid()
+ */
+bool QXmlSchema::load(QIODevice *source, const QUrl &documentUri)
+{
+ d->load(source, documentUri, QString());
+ return d->isValid();
+}
+
+/*!
+ Sets this QXmlSchema to a schema read from the \a data
+
+ \a documentUri represents the schema obtained from the \a data.
+ It is the base URI of the schema, that is used internally to
+ resolve relative URIs that appear in the schema, and
+ for message reporting.
+
+ If \a documentUri is not a valid URI, behavior is undefined.
+ \sa isValid()
+
+ If the schema \l {isValid()} {is invalid}, \c{false} is returned
+ and the behavior is undefined.
+
+ Example:
+
+ \snippet doc/src/snippets/qxmlschema/main.cpp 2
+
+ \sa isValid()
+ */
+bool QXmlSchema::load(const QByteArray &data, const QUrl &documentUri)
+{
+ d->load(data, documentUri, QString());
+ return d->isValid();
+}
+
+/*!
+ Returns true if this schema is valid. Examples of invalid schemas
+ are ones that contain syntax errors or that do not conform the
+ W3C XML Schema specification.
+ */
+bool QXmlSchema::isValid() const
+{
+ return d->isValid();
+}
+
+/*!
+ Returns the name pool used by this QXmlSchema for constructing \l
+ {QXmlName} {names}. There is no setter for the name pool, because
+ mixing name pools causes errors due to name confusion.
+ */
+QXmlNamePool QXmlSchema::namePool() const
+{
+ return d->namePool();
+}
+
+/*!
+ Returns the document URI of the schema or an empty URI if no
+ schema has been set.
+ */
+QUrl QXmlSchema::documentUri() const
+{
+ return d->documentUri();
+}
+
+/*!
+ Changes the \l {QAbstractMessageHandler}{message handler} for this
+ QXmlSchema to \a handler. The schema sends all compile and
+ validation messages to this message handler. QXmlSchema does not take
+ ownership of \a handler.
+
+ Normally, the default message handler is sufficient. It writes
+ compile and validation messages to \e stderr. The default message
+ handler includes color codes if \e stderr can render colors.
+
+ When QXmlSchema calls QAbstractMessageHandler::message(),
+ the arguments are as follows:
+
+ \table
+ \header
+ \o message() argument
+ \o Semantics
+ \row
+ \o QtMsgType type
+ \o Only QtWarningMsg and QtFatalMsg are used. The former
+ identifies a warning, while the latter identifies an error.
+ \row
+ \o const QString & description
+ \o An XHTML document which is the actual message. It is translated
+ into the current language.
+ \row
+ \o const QUrl &identifier
+ \o Identifies the error with a URI, where the fragment is
+ the error code, and the rest of the URI is the error namespace.
+ \row
+ \o const QSourceLocation & sourceLocation
+ \o Identifies where the error occurred.
+ \endtable
+
+ */
+void QXmlSchema::setMessageHandler(QAbstractMessageHandler *handler)
+{
+ d->setMessageHandler(handler);
+}
+
+/*!
+ Returns the message handler that handles compile and validation
+ messages for this QXmlSchema.
+ */
+QAbstractMessageHandler *QXmlSchema::messageHandler() const
+{
+ return d->messageHandler();
+}
+
+/*!
+ Sets the URI resolver to \a resolver. QXmlSchema does not take
+ ownership of \a resolver.
+
+ \sa uriResolver()
+ */
+void QXmlSchema::setUriResolver(const QAbstractUriResolver *resolver)
+{
+ d->setUriResolver(resolver);
+}
+
+/*!
+ Returns the schema's URI resolver. If no URI resolver has been set,
+ QtXmlPatterns will use the URIs in schemas as they are.
+
+ The URI resolver provides a level of abstraction, or \e{polymorphic
+ URIs}. A resolver can rewrite \e{logical} URIs to physical ones, or
+ it can translate obsolete or invalid URIs to valid ones.
+
+ When QtXmlPatterns calls QAbstractUriResolver::resolve() the
+ absolute URI is the URI mandated by the schema specification, and the
+ relative URI is the URI specified by the user.
+
+ \sa setUriResolver()
+ */
+const QAbstractUriResolver *QXmlSchema::uriResolver() const
+{
+ return d->uriResolver();
+}
+
+/*!
+ Sets the network manager to \a manager.
+ QXmlSchema does not take ownership of \a manager.
+
+ \sa networkAccessManager()
+ */
+void QXmlSchema::setNetworkAccessManager(QNetworkAccessManager *manager)
+{
+ d->setNetworkAccessManager(manager);
+}
+
+/*!
+ Returns the network manager, or 0 if it has not been set.
+
+ \sa setNetworkAccessManager()
+ */
+QNetworkAccessManager *QXmlSchema::networkAccessManager() const
+{
+ return d->networkAccessManager();
+}
diff --git a/src/xmlpatterns/api/qxmlschema.h b/src/xmlpatterns/api/qxmlschema.h
new file mode 100644
index 0000000..b6ac010
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschema.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QXMLSCHEMA_H
+#define QXMLSCHEMA_H
+
+#include <QtCore/QSharedDataPointer>
+#include <QtCore/QUrl>
+#include <QtXmlPatterns/QXmlNamePool>
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(XmlPatterns)
+
+class QAbstractMessageHandler;
+class QAbstractUriResolver;
+class QIODevice;
+class QNetworkAccessManager;
+class QUrl;
+class QXmlNamePool;
+class QXmlSchemaPrivate;
+
+class Q_XMLPATTERNS_EXPORT QXmlSchema
+{
+ friend class QXmlSchemaValidatorPrivate;
+
+ public:
+ QXmlSchema();
+ QXmlSchema(const QXmlSchema &other);
+ ~QXmlSchema();
+
+ bool load(const QUrl &source);
+ bool load(QIODevice *source, const QUrl &documentUri = QUrl());
+ bool load(const QByteArray &data, const QUrl &documentUri = QUrl());
+
+ bool isValid() const;
+
+ QXmlNamePool namePool() const;
+ QUrl documentUri() const;
+
+ void setMessageHandler(QAbstractMessageHandler *handler);
+ QAbstractMessageHandler *messageHandler() const;
+
+ void setUriResolver(const QAbstractUriResolver *resolver);
+ const QAbstractUriResolver *uriResolver() const;
+
+ void setNetworkAccessManager(QNetworkAccessManager *networkmanager);
+ QNetworkAccessManager *networkAccessManager() const;
+
+ private:
+ QSharedDataPointer<QXmlSchemaPrivate> d;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/api/qxmlschema_p.cpp b/src/xmlpatterns/api/qxmlschema_p.cpp
new file mode 100644
index 0000000..0bcb565
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschema_p.cpp
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qacceltreeresourceloader_p.h"
+#include "qxmlschema.h"
+#include "qxmlschema_p.h"
+
+#include <QtCore/QBuffer>
+#include <QtCore/QIODevice>
+#include <QtCore/QUrl>
+
+QXmlSchemaPrivate::QXmlSchemaPrivate(const QXmlNamePool &namePool)
+ : m_namePool(namePool)
+ , m_userMessageHandler(0)
+ , m_uriResolver(0)
+ , m_userNetworkAccessManager(0)
+ , m_schemaContext(new QPatternist::XsdSchemaContext(m_namePool.d))
+ , m_schemaParserContext(new QPatternist::XsdSchemaParserContext(m_namePool.d, m_schemaContext))
+ , m_schemaIsValid(false)
+{
+ m_networkAccessManager = new QPatternist::ReferenceCountedValue<QNetworkAccessManager>(new QNetworkAccessManager());
+ m_messageHandler = new QPatternist::ReferenceCountedValue<QAbstractMessageHandler>(new QPatternist::ColoringMessageHandler());
+}
+
+QXmlSchemaPrivate::QXmlSchemaPrivate(const QPatternist::XsdSchemaContext::Ptr &schemaContext)
+ : m_namePool(QXmlNamePool(schemaContext->namePool().data()))
+ , m_userMessageHandler(0)
+ , m_uriResolver(0)
+ , m_userNetworkAccessManager(0)
+ , m_schemaContext(schemaContext)
+ , m_schemaParserContext(new QPatternist::XsdSchemaParserContext(m_namePool.d, m_schemaContext))
+ , m_schemaIsValid(false)
+{
+ m_networkAccessManager = new QPatternist::ReferenceCountedValue<QNetworkAccessManager>(new QNetworkAccessManager());
+ m_messageHandler = new QPatternist::ReferenceCountedValue<QAbstractMessageHandler>(new QPatternist::ColoringMessageHandler());
+}
+
+QXmlSchemaPrivate::QXmlSchemaPrivate(const QXmlSchemaPrivate &other)
+ : QSharedData(other)
+{
+ m_namePool = other.m_namePool;
+ m_userMessageHandler = other.m_userMessageHandler;
+ m_uriResolver = other.m_uriResolver;
+ m_userNetworkAccessManager = other.m_userNetworkAccessManager;
+ m_messageHandler = other.m_messageHandler;
+ m_networkAccessManager = other.m_networkAccessManager;
+
+ m_schemaContext = other.m_schemaContext;
+ m_schemaParserContext = other.m_schemaParserContext;
+ m_schemaIsValid = other.m_schemaIsValid;
+ m_documentUri = other.m_documentUri;
+}
+
+void QXmlSchemaPrivate::load(const QUrl &source, const QString &targetNamespace)
+{
+ m_documentUri = QPatternist::XPathHelper::normalizeQueryURI(source);
+
+ m_schemaContext->setMessageHandler(messageHandler());
+ m_schemaContext->setUriResolver(uriResolver());
+ m_schemaContext->setNetworkAccessManager(networkAccessManager());
+
+ const QPatternist::AutoPtr<QNetworkReply> reply(QPatternist::AccelTreeResourceLoader::load(source, m_schemaContext->networkAccessManager(),
+ m_schemaContext, QPatternist::AccelTreeResourceLoader::ContinueOnError));
+ if (reply)
+ load(reply.data(), source, targetNamespace);
+}
+
+void QXmlSchemaPrivate::load(const QByteArray &data, const QUrl &documentUri, const QString &targetNamespace)
+{
+ QByteArray localData(data);
+
+ QBuffer buffer(&localData);
+ buffer.open(QIODevice::ReadOnly);
+
+ load(&buffer, documentUri, targetNamespace);
+}
+
+void QXmlSchemaPrivate::load(QIODevice *source, const QUrl &documentUri, const QString &targetNamespace)
+{
+ m_schemaParserContext = QPatternist::XsdSchemaParserContext::Ptr(new QPatternist::XsdSchemaParserContext(m_namePool.d, m_schemaContext));
+ m_schemaIsValid = false;
+
+ if (!source) {
+ qWarning("A null QIODevice pointer cannot be passed.");
+ return;
+ }
+
+ if (!source->isReadable()) {
+ qWarning("The device must be readable.");
+ return;
+ }
+
+ m_documentUri = QPatternist::XPathHelper::normalizeQueryURI(documentUri);
+ m_schemaContext->setMessageHandler(messageHandler());
+ m_schemaContext->setUriResolver(uriResolver());
+ m_schemaContext->setNetworkAccessManager(networkAccessManager());
+
+ QPatternist::XsdSchemaParser parser(m_schemaContext, m_schemaParserContext, source);
+ parser.setDocumentURI(documentUri);
+ parser.setTargetNamespace(targetNamespace);
+
+ try {
+ parser.parse();
+ m_schemaParserContext->resolver()->resolve();
+
+ m_schemaIsValid = true;
+ } catch (QPatternist::Exception exception) {
+ m_schemaIsValid = false;
+ }
+}
+
+bool QXmlSchemaPrivate::isValid() const
+{
+ return m_schemaIsValid;
+}
+
+QXmlNamePool QXmlSchemaPrivate::namePool() const
+{
+ return m_namePool;
+}
+
+QUrl QXmlSchemaPrivate::documentUri() const
+{
+ return m_documentUri;
+}
+
+void QXmlSchemaPrivate::setMessageHandler(QAbstractMessageHandler *handler)
+{
+ m_userMessageHandler = handler;
+}
+
+QAbstractMessageHandler *QXmlSchemaPrivate::messageHandler() const
+{
+ if (m_userMessageHandler)
+ return m_userMessageHandler;
+
+ return m_messageHandler.data()->value;
+}
+
+void QXmlSchemaPrivate::setUriResolver(const QAbstractUriResolver *resolver)
+{
+ m_uriResolver = resolver;
+}
+
+const QAbstractUriResolver *QXmlSchemaPrivate::uriResolver() const
+{
+ return m_uriResolver;
+}
+
+void QXmlSchemaPrivate::setNetworkAccessManager(QNetworkAccessManager *networkmanager)
+{
+ m_userNetworkAccessManager = networkmanager;
+}
+
+QNetworkAccessManager *QXmlSchemaPrivate::networkAccessManager() const
+{
+ if (m_userNetworkAccessManager)
+ return m_userNetworkAccessManager;
+
+ return m_networkAccessManager.data()->value;
+}
diff --git a/src/xmlpatterns/api/qxmlschema_p.h b/src/xmlpatterns/api/qxmlschema_p.h
new file mode 100644
index 0000000..be2ebb8
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschema_p.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QXMLSCHEMA_P_H
+#define QXMLSCHEMA_P_H
+
+#include "qabstractmessagehandler.h"
+#include "qabstracturiresolver.h"
+#include "qautoptr_p.h"
+#include "qcoloringmessagehandler_p.h"
+#include "qreferencecountedvalue_p.h"
+
+#include "qxsdschemacontext_p.h"
+#include "qxsdschemaparser_p.h"
+#include "qxsdschemaparsercontext_p.h"
+
+#include <QtCore/QSharedData>
+#include <QtNetwork/QNetworkAccessManager>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QXmlSchemaPrivate : public QSharedData
+{
+ public:
+ QXmlSchemaPrivate(const QXmlNamePool &namePool);
+ QXmlSchemaPrivate(const QPatternist::XsdSchemaContext::Ptr &schemaContext);
+ QXmlSchemaPrivate(const QXmlSchemaPrivate &other);
+
+ void load(const QUrl &source, const QString &targetNamespace);
+ void load(QIODevice *source, const QUrl &documentUri, const QString &targetNamespace);
+ void load(const QByteArray &data, const QUrl &documentUri, const QString &targetNamespace);
+ bool isValid() const;
+ QXmlNamePool namePool() const;
+ QUrl documentUri() const;
+ void setMessageHandler(QAbstractMessageHandler *handler);
+ QAbstractMessageHandler *messageHandler() const;
+ void setUriResolver(const QAbstractUriResolver *resolver);
+ const QAbstractUriResolver *uriResolver() const;
+ void setNetworkAccessManager(QNetworkAccessManager *networkmanager);
+ QNetworkAccessManager *networkAccessManager() const;
+
+ QXmlNamePool m_namePool;
+ QAbstractMessageHandler* m_userMessageHandler;
+ const QAbstractUriResolver* m_uriResolver;
+ QNetworkAccessManager* m_userNetworkAccessManager;
+ QPatternist::ReferenceCountedValue<QAbstractMessageHandler>::Ptr m_messageHandler;
+ QPatternist::ReferenceCountedValue<QNetworkAccessManager>::Ptr m_networkAccessManager;
+
+ QPatternist::XsdSchemaContext::Ptr m_schemaContext;
+ QPatternist::XsdSchemaParserContext::Ptr m_schemaParserContext;
+ bool m_schemaIsValid;
+ QUrl m_documentUri;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp
new file mode 100644
index 0000000..9234d83
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxmlschemavalidator.h"
+#include "qxmlschemavalidator_p.h"
+
+#include "qacceltreeresourceloader_p.h"
+#include "qxmlschema.h"
+#include "qxmlschema_p.h"
+#include "qxsdvalidatinginstancereader_p.h"
+
+#include <QtCore/QBuffer>
+#include <QtCore/QIODevice>
+#include <QtCore/QUrl>
+
+/*!
+ \class QXmlSchemaValidator
+
+ \brief The QXmlSchemaValidator class validates XML instance documents against a W3C XML Schema.
+
+ \reentrant
+ \since 4.6
+ \ingroup xml-tools
+
+ The QXmlSchemaValidator class loads, parses an XML instance document and validates it
+ against a W3C XML Schema that has been compiled with \l{QXmlSchema}.
+
+ The following example shows how to load a XML Schema from a local
+ file, check whether it is a valid schema document and use it for validation
+ of an XML instance document:
+
+ \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 3
+
+ \sa QXmlSchema, {xmlpatterns/schema}{XML Schema Validation Example}
+*/
+
+/*!
+ Constructs a schema validator.
+ The schema used for validation must be referenced in the XML instance document
+ via the \c xsi:schemaLocation or \c xsi:noNamespaceSchemaLocation attribute.
+ */
+QXmlSchemaValidator::QXmlSchemaValidator()
+ : d(new QXmlSchemaValidatorPrivate(QXmlSchema()))
+{
+}
+
+/*!
+ Constructs a schema validator that will use \a schema for validation.
+ If an empty \l {QXmlSchema} schema is passed to the validator, the schema used
+ for validation must be referenced in the XML instance document
+ via the \c xsi:schemaLocation or \c xsi:noNamespaceSchemaLocation attribute.
+ */
+QXmlSchemaValidator::QXmlSchemaValidator(const QXmlSchema &schema)
+ : d(new QXmlSchemaValidatorPrivate(schema))
+{
+}
+
+/*!
+ Destroys this QXmlSchemaValidator.
+ */
+QXmlSchemaValidator::~QXmlSchemaValidator()
+{
+ delete d;
+}
+
+/*!
+ Sets the \a schema that shall be used for further validation.
+ If the schema is empty, the schema used for validation must be referenced
+ in the XML instance document via the \c xsi:schemaLocation or
+ \c xsi:noNamespaceSchemaLocation attribute.
+ */
+void QXmlSchemaValidator::setSchema(const QXmlSchema &schema)
+{
+ d->setSchema(schema);
+}
+
+/*!
+ Validates the XML instance document read from \a data with the
+ given \a documentUri against the schema.
+
+ Returns \c true if the XML instance document is valid according to the
+ schema, \c false otherwise.
+
+ Example:
+
+ \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 2
+ */
+bool QXmlSchemaValidator::validate(const QByteArray &data, const QUrl &documentUri) const
+{
+ QByteArray localData(data);
+
+ QBuffer buffer(&localData);
+ buffer.open(QIODevice::ReadOnly);
+
+ return validate(&buffer, documentUri);
+}
+
+/*!
+ Validates the XML instance document read from \a source against the schema.
+
+ Returns \c true if the XML instance document is valid according to the
+ schema, \c false otherwise.
+
+ Example:
+
+ \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 0
+ */
+bool QXmlSchemaValidator::validate(const QUrl &source) const
+{
+ d->m_context->setMessageHandler(messageHandler());
+ d->m_context->setUriResolver(uriResolver());
+ d->m_context->setNetworkAccessManager(networkAccessManager());
+
+ const QPatternist::AutoPtr<QNetworkReply> reply(QPatternist::AccelTreeResourceLoader::load(source, d->m_context->networkAccessManager(),
+ d->m_context, QPatternist::AccelTreeResourceLoader::ContinueOnError));
+ if (reply)
+ return validate(reply.data(), source);
+ else
+ return false;
+}
+
+/*!
+ Validates the XML instance document read from \a source with the
+ given \a documentUri against the schema.
+
+ Returns \c true if the XML instance document is valid according to the
+ schema, \c false otherwise.
+
+ Example:
+
+ \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 1
+ */
+bool QXmlSchemaValidator::validate(QIODevice *source, const QUrl &documentUri) const
+{
+ if (!source) {
+ qWarning("A null QIODevice pointer cannot be passed.");
+ return false;
+ }
+
+ if (!source->isReadable()) {
+ qWarning("The device must be readable.");
+ return false;
+ }
+
+ const QUrl normalizedUri = QPatternist::XPathHelper::normalizeQueryURI(documentUri);
+
+ d->m_context->setMessageHandler(messageHandler());
+ d->m_context->setUriResolver(uriResolver());
+ d->m_context->setNetworkAccessManager(networkAccessManager());
+
+ QPatternist::NetworkAccessDelegator::Ptr delegator(new QPatternist::NetworkAccessDelegator(d->m_context->networkAccessManager(),
+ d->m_context->networkAccessManager()));
+
+ QPatternist::AccelTreeResourceLoader loader(d->m_context->namePool(), delegator, QPatternist::AccelTreeBuilder<true>::SourceLocationsFeature);
+
+ QPatternist::Item item;
+ try {
+ item = loader.openDocument(source, normalizedUri, d->m_context);
+ } catch (QPatternist::Exception exception) {
+ return false;
+ }
+
+ QXmlNodeModelIndex index = item.asNode();
+ const QAbstractXmlNodeModel *model = item.asNode().model();
+
+ QPatternist::XsdValidatedXmlNodeModel *validatedModel = new QPatternist::XsdValidatedXmlNodeModel(model);
+
+ QPatternist::XsdValidatingInstanceReader reader(validatedModel, normalizedUri, d->m_context);
+ if (d->m_schema)
+ reader.addSchema(d->m_schema, d->m_schemaDocumentUri);
+ try {
+ reader.read();
+ } catch (QPatternist::Exception exception) {
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ Returns the name pool used by this QXmlSchemaValidator for constructing \l
+ {QXmlName} {names}. There is no setter for the name pool, because
+ mixing name pools causes errors due to name confusion.
+ */
+QXmlNamePool QXmlSchemaValidator::namePool() const
+{
+ return d->m_namePool;
+}
+
+/*!
+ Returns the schema that is used for validation.
+ */
+QXmlSchema QXmlSchemaValidator::schema() const
+{
+ return d->m_originalSchema;
+}
+
+/*!
+ Changes the \l {QAbstractMessageHandler}{message handler} for this
+ QXmlSchemaValidator to \a handler. The schema validator sends all parsing and
+ validation messages to this message handler. QXmlSchemaValidator does not take
+ ownership of \a handler.
+
+ Normally, the default message handler is sufficient. It writes
+ compile and validation messages to \e stderr. The default message
+ handler includes color codes if \e stderr can render colors.
+
+ When QXmlSchemaValidator calls QAbstractMessageHandler::message(),
+ the arguments are as follows:
+
+ \table
+ \header
+ \o message() argument
+ \o Semantics
+ \row
+ \o QtMsgType type
+ \o Only QtWarningMsg and QtFatalMsg are used. The former
+ identifies a warning, while the latter identifies an error.
+ \row
+ \o const QString & description
+ \o An XHTML document which is the actual message. It is translated
+ into the current language.
+ \row
+ \o const QUrl &identifier
+ \o Identifies the error with a URI, where the fragment is
+ the error code, and the rest of the URI is the error namespace.
+ \row
+ \o const QSourceLocation & sourceLocation
+ \o Identifies where the error occurred.
+ \endtable
+
+ */
+void QXmlSchemaValidator::setMessageHandler(QAbstractMessageHandler *handler)
+{
+ d->m_userMessageHandler = handler;
+}
+
+/*!
+ Returns the message handler that handles parsing and validation
+ messages for this QXmlSchemaValidator.
+ */
+QAbstractMessageHandler *QXmlSchemaValidator::messageHandler() const
+{
+ if (d->m_userMessageHandler)
+ return d->m_userMessageHandler;
+
+ return d->m_messageHandler.data()->value;
+}
+
+/*!
+ Sets the URI resolver to \a resolver. QXmlSchemaValidator does not take
+ ownership of \a resolver.
+
+ \sa uriResolver()
+ */
+void QXmlSchemaValidator::setUriResolver(const QAbstractUriResolver *resolver)
+{
+ d->m_uriResolver = resolver;
+}
+
+/*!
+ Returns the schema's URI resolver. If no URI resolver has been set,
+ QtXmlPatterns will use the URIs in instance documents as they are.
+
+ The URI resolver provides a level of abstraction, or \e{polymorphic
+ URIs}. A resolver can rewrite \e{logical} URIs to physical ones, or
+ it can translate obsolete or invalid URIs to valid ones.
+
+ When QtXmlPatterns calls QAbstractUriResolver::resolve() the
+ absolute URI is the URI mandated by the schema specification, and the
+ relative URI is the URI specified by the user.
+
+ \sa setUriResolver()
+ */
+const QAbstractUriResolver *QXmlSchemaValidator::uriResolver() const
+{
+ return d->m_uriResolver;
+}
+
+/*!
+ Sets the network manager to \a manager.
+ QXmlSchemaValidator does not take ownership of \a manager.
+
+ \sa networkAccessManager()
+ */
+void QXmlSchemaValidator::setNetworkAccessManager(QNetworkAccessManager *manager)
+{
+ d->m_userNetworkAccessManager = manager;
+}
+
+/*!
+ Returns the network manager, or 0 if it has not been set.
+
+ \sa setNetworkAccessManager()
+ */
+QNetworkAccessManager *QXmlSchemaValidator::networkAccessManager() const
+{
+ if (d->m_userNetworkAccessManager)
+ return d->m_userNetworkAccessManager;
+
+ return d->m_networkAccessManager.data()->value;
+}
diff --git a/src/xmlpatterns/api/qxmlschemavalidator.h b/src/xmlpatterns/api/qxmlschemavalidator.h
new file mode 100644
index 0000000..f32ac07
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschemavalidator.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QXMLSCHEMAVALIDATOR_H
+#define QXMLSCHEMAVALIDATOR_H
+
+#include <QtCore/QUrl>
+#include <QtXmlPatterns/QXmlNamePool>
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(XmlPatterns)
+
+class QAbstractMessageHandler;
+class QAbstractUriResolver;
+class QIODevice;
+class QNetworkAccessManager;
+class QUrl;
+class QXmlNamePool;
+class QXmlSchema;
+class QXmlSchemaValidatorPrivate;
+
+class Q_XMLPATTERNS_EXPORT QXmlSchemaValidator
+{
+ public:
+ QXmlSchemaValidator();
+ QXmlSchemaValidator(const QXmlSchema &schema);
+ ~QXmlSchemaValidator();
+
+ void setSchema(const QXmlSchema &schema);
+
+ bool validate(const QUrl &source) const;
+ bool validate(QIODevice *source, const QUrl &documentUri = QUrl()) const;
+ bool validate(const QByteArray &data, const QUrl &documentUri = QUrl()) const;
+
+ QXmlNamePool namePool() const;
+ QXmlSchema schema() const;
+
+ void setMessageHandler(QAbstractMessageHandler *handler);
+ QAbstractMessageHandler *messageHandler() const;
+
+ void setUriResolver(const QAbstractUriResolver *resolver);
+ const QAbstractUriResolver *uriResolver() const;
+
+ void setNetworkAccessManager(QNetworkAccessManager *networkmanager);
+ QNetworkAccessManager *networkAccessManager() const;
+
+ private:
+ QXmlSchemaValidatorPrivate* const d;
+
+ Q_DISABLE_COPY(QXmlSchemaValidator)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/api/qxmlschemavalidator_p.h b/src/xmlpatterns/api/qxmlschemavalidator_p.h
new file mode 100644
index 0000000..40dbefc
--- /dev/null
+++ b/src/xmlpatterns/api/qxmlschemavalidator_p.h
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QXMLSCHEMAVALIDATOR_P_H
+#define QXMLSCHEMAVALIDATOR_P_H
+
+#include "qabstractmessagehandler.h"
+#include "qabstracturiresolver.h"
+#include "qautoptr_p.h"
+#include "qcoloringmessagehandler_p.h"
+#include "qxmlschema.h"
+#include "qxmlschema_p.h"
+
+#include "qxsdschemacontext_p.h"
+#include "qxsdschema_p.h"
+
+#include <QtNetwork/QNetworkAccessManager>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QXmlSchemaValidatorPrivate
+{
+public:
+ QXmlSchemaValidatorPrivate(const QXmlSchema &schema)
+ : m_namePool(schema.namePool())
+ , m_userMessageHandler(0)
+ , m_uriResolver(0)
+ , m_userNetworkAccessManager(0)
+ {
+ setSchema(schema);
+
+ const QXmlSchemaPrivate *p = schema.d;
+
+ // initialize the environment properties with the ones from the schema
+
+ if (p->m_userNetworkAccessManager) // schema has user defined network access manager
+ m_userNetworkAccessManager = p->m_userNetworkAccessManager;
+ else
+ m_networkAccessManager = p->m_networkAccessManager;
+
+ if (p->m_userMessageHandler) // schema has user defined message handler
+ m_userMessageHandler = p->m_userMessageHandler;
+ else
+ m_messageHandler = p->m_messageHandler;
+
+ m_uriResolver = p->m_uriResolver;
+ }
+
+ void setSchema(const QXmlSchema &schema)
+ {
+ // use same name pool as the schema
+ m_namePool = schema.namePool();
+ m_schema = schema.d->m_schemaParserContext->schema();
+ m_schemaDocumentUri = schema.documentUri();
+
+ // create a new schema context
+ m_context = QPatternist::XsdSchemaContext::Ptr(new QPatternist::XsdSchemaContext(m_namePool.d));
+ m_context->m_schemaTypeFactory = schema.d->m_schemaContext->m_schemaTypeFactory;
+ m_context->m_builtinTypesFacetList = schema.d->m_schemaContext->m_builtinTypesFacetList;
+
+ m_originalSchema = schema;
+ }
+
+ QXmlNamePool m_namePool;
+ QAbstractMessageHandler* m_userMessageHandler;
+ const QAbstractUriResolver* m_uriResolver;
+ QNetworkAccessManager* m_userNetworkAccessManager;
+ QPatternist::ReferenceCountedValue<QAbstractMessageHandler>::Ptr m_messageHandler;
+ QPatternist::ReferenceCountedValue<QNetworkAccessManager>::Ptr m_networkAccessManager;
+
+ QXmlSchema m_originalSchema;
+ QPatternist::XsdSchemaContext::Ptr m_context;
+ QPatternist::XsdSchema::Ptr m_schema;
+ QUrl m_schemaDocumentUri;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/common.pri b/src/xmlpatterns/common.pri
index 2573a26..27253d8 100644
--- a/src/xmlpatterns/common.pri
+++ b/src/xmlpatterns/common.pri
@@ -10,6 +10,7 @@ INCLUDEPATH += $$PWD/acceltree \
$$PWD/iterators \
$$PWD/janitors \
$$PWD/parser \
+ $$PWD/schema \
$$PWD/type \
$$PWD/utils
diff --git a/src/xmlpatterns/data/data.pri b/src/xmlpatterns/data/data.pri
index 99591d4..ccfed42 100644
--- a/src/xmlpatterns/data/data.pri
+++ b/src/xmlpatterns/data/data.pri
@@ -1,8 +1,8 @@
HEADERS += $$PWD/qabstractdatetime_p.h \
$$PWD/qabstractduration_p.h \
$$PWD/qabstractfloatcasters_p.h \
- $$PWD/qabstractfloat_p.h \
$$PWD/qabstractfloatmathematician_p.h \
+ $$PWD/qabstractfloat_p.h \
$$PWD/qanyuri_p.h \
$$PWD/qatomiccaster_p.h \
$$PWD/qatomiccasters_p.h \
@@ -14,8 +14,8 @@ HEADERS += $$PWD/qabstractdatetime_p.h \
$$PWD/qbase64binary_p.h \
$$PWD/qboolean_p.h \
$$PWD/qcommonvalues_p.h \
+ $$PWD/qcomparisonfactory_p.h \
$$PWD/qdate_p.h \
- $$PWD/qschemadatetime_p.h \
$$PWD/qdaytimeduration_p.h \
$$PWD/qdecimal_p.h \
$$PWD/qderivedinteger_p.h \
@@ -24,19 +24,21 @@ HEADERS += $$PWD/qabstractdatetime_p.h \
$$PWD/qgday_p.h \
$$PWD/qgmonthday_p.h \
$$PWD/qgmonth_p.h \
- $$PWD/qgyear_p.h \
$$PWD/qgyearmonth_p.h \
+ $$PWD/qgyear_p.h \
$$PWD/qhexbinary_p.h \
$$PWD/qinteger_p.h \
$$PWD/qitem_p.h \
$$PWD/qnodebuilder_p.h \
- $$PWD/qschemanumeric_p.h \
$$PWD/qqnamevalue_p.h \
$$PWD/qresourceloader_p.h \
- $$PWD/qsorttuple.cpp \
+ $$PWD/qschemadatetime_p.h \
+ $$PWD/qschemanumeric_p.h \
$$PWD/qschematime_p.h \
+ $$PWD/qsorttuple.cpp \
$$PWD/quntypedatomic_p.h \
$$PWD/qvalidationerror_p.h \
+ $$PWD/qvaluefactory_p.h \
$$PWD/qyearmonthduration_p.h
SOURCES += $$PWD/qabstractdatetime.cpp \
@@ -53,8 +55,8 @@ SOURCES += $$PWD/qabstractdatetime.cpp \
$$PWD/qbase64binary.cpp \
$$PWD/qboolean.cpp \
$$PWD/qcommonvalues.cpp \
+ $$PWD/qcomparisonfactory.cpp \
$$PWD/qdate.cpp \
- $$PWD/qschemadatetime.cpp \
$$PWD/qdaytimeduration.cpp \
$$PWD/qdecimal.cpp \
$$PWD/qduration.cpp \
@@ -68,11 +70,13 @@ SOURCES += $$PWD/qabstractdatetime.cpp \
$$PWD/qitem.cpp \
$$PWD/qnodebuilder.cpp \
$$PWD/qnodemodel.cpp \
- $$PWD/qschemanumeric.cpp \
$$PWD/qqnamevalue.cpp \
$$PWD/qresourceloader.cpp \
- $$PWD/qsorttuple.cpp \
+ $$PWD/qschemadatetime.cpp \
+ $$PWD/qschemanumeric.cpp \
$$PWD/qschematime.cpp \
+ $$PWD/qsorttuple.cpp \
$$PWD/quntypedatomic.cpp \
$$PWD/qvalidationerror.cpp \
+ $$PWD/qvaluefactory.cpp \
$$PWD/qyearmonthduration.cpp
diff --git a/src/xmlpatterns/data/qboolean.cpp b/src/xmlpatterns/data/qboolean.cpp
index 07562fd..bb4ece1 100644
--- a/src/xmlpatterns/data/qboolean.cpp
+++ b/src/xmlpatterns/data/qboolean.cpp
@@ -76,7 +76,7 @@ bool Boolean::evaluateEBV(const Item &first,
{
Q_ASSERT(context);
context->error(QtXmlPatterns::tr("Effective Boolean Value cannot be calculated for a sequence "
- "containing two or more atomic values."),
+ "containing two or more atomic values."),
ReportContext::FORG0006,
QSourceLocation());
return false;
diff --git a/src/xmlpatterns/data/qcomparisonfactory.cpp b/src/xmlpatterns/data/qcomparisonfactory.cpp
new file mode 100644
index 0000000..c22d9e7
--- /dev/null
+++ b/src/xmlpatterns/data/qcomparisonfactory.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qatomiccomparators_p.h"
+#include "qatomicstring_p.h"
+#include "qcomparisonplatform_p.h"
+#include "qvaluefactory_p.h"
+
+#include "qcomparisonfactory_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/**
+ * @short Helper class for ComparisonFactory::fromLexical() which exposes
+ * CastingPlatform appropriately.
+ *
+ * @relates ComparisonFactory
+ */
+class PerformComparison : public ComparisonPlatform<PerformComparison, true>
+ , public SourceLocationReflection
+{
+public:
+ PerformComparison(const SourceLocationReflection *const sourceLocationReflection,
+ const AtomicComparator::Operator op) : m_sourceReflection(sourceLocationReflection)
+ , m_operator(op)
+ {
+ Q_ASSERT(m_sourceReflection);
+ }
+
+ bool operator()(const AtomicValue::Ptr &operand1,
+ const AtomicValue::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context)
+ {
+ const ItemType::Ptr asItemType((AtomicType::Ptr(type)));
+
+ /* One area where the Query Transform world differs from the Schema
+ * world is that @c xs:duration is not considedered comparable, because
+ * it's according to Schema is partially comparable. This means
+ * ComparisonPlatform::fetchComparator() flags it as impossible, and
+ * hence we need to override that.
+ *
+ * SchemaType::wxsTypeMatches() will return true for sub-types of @c
+ * xs:duration as well, but that's ok since AbstractDurationComparator
+ * works for them too. */
+ if(BuiltinTypes::xsDuration->wxsTypeMatches(type))
+ prepareComparison(AtomicComparator::Ptr(new AbstractDurationComparator()));
+ else if (BuiltinTypes::xsGYear->wxsTypeMatches(type) ||
+ BuiltinTypes::xsGYearMonth->wxsTypeMatches(type) ||
+ BuiltinTypes::xsGMonth->wxsTypeMatches(type) ||
+ BuiltinTypes::xsGMonthDay->wxsTypeMatches(type) ||
+ BuiltinTypes::xsGDay->wxsTypeMatches(type))
+ prepareComparison(AtomicComparator::Ptr(new AbstractDateTimeComparator()));
+ else
+ prepareComparison(fetchComparator(asItemType, asItemType, context));
+
+ return flexibleCompare(operand1, operand2, context);
+ }
+
+ const SourceLocationReflection *actualReflection() const
+ {
+ return m_sourceReflection;
+ }
+
+ AtomicComparator::Operator operatorID() const
+ {
+ return m_operator;
+ }
+
+private:
+ const SourceLocationReflection *const m_sourceReflection;
+ const AtomicComparator::Operator m_operator;
+};
+
+bool ComparisonFactory::compare(const AtomicValue::Ptr &operand1,
+ const AtomicComparator::Operator op,
+ const AtomicValue::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection)
+{
+ Q_ASSERT(operand1);
+ Q_ASSERT(operand2);
+ Q_ASSERT(context);
+ Q_ASSERT(sourceLocationReflection);
+ Q_ASSERT(type);
+ Q_ASSERT_X(type->category() == SchemaType::SimpleTypeAtomic, Q_FUNC_INFO,
+ "We can only compare atomic values.");
+
+ return PerformComparison(sourceLocationReflection, op)(operand1, operand2, type, context);
+}
+
+bool ComparisonFactory::constructAndCompare(const DerivedString<TypeString>::Ptr &operand1,
+ const AtomicComparator::Operator op,
+ const DerivedString<TypeString>::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection)
+{
+ Q_ASSERT(operand1);
+ Q_ASSERT(operand2);
+ Q_ASSERT(context);
+ Q_ASSERT(sourceLocationReflection);
+ Q_ASSERT(type);
+ Q_ASSERT_X(type->category() == SchemaType::SimpleTypeAtomic, Q_FUNC_INFO,
+ "We can only compare atomic values.");
+
+ const AtomicValue::Ptr value1 = ValueFactory::fromLexical(operand1->stringValue(), type, context, sourceLocationReflection);
+ const AtomicValue::Ptr value2 = ValueFactory::fromLexical(operand2->stringValue(), type, context, sourceLocationReflection);
+
+ return compare(value1, op, value2, type, context, sourceLocationReflection);
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/data/qcomparisonfactory_p.h b/src/xmlpatterns/data/qcomparisonfactory_p.h
new file mode 100644
index 0000000..1234548
--- /dev/null
+++ b/src/xmlpatterns/data/qcomparisonfactory_p.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_ComparisonFactory_H
+#define Patternist_ComparisonFactory_H
+
+#include "qatomiccomparator_p.h"
+#include "qderivedstring_p.h"
+#include "qitem_p.h"
+#include "qreportcontext_p.h"
+#include "qschematype_p.h"
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Provides compare(), which is a high-level helper function for
+ * comparing atomic values.
+ *
+ * This class wraps the helper class ComparisonPlatform with a more specific,
+ * high-level API.
+ *
+ * @see ComparisonPlatform
+ * @author Frans Englich <fenglich@trolltech.com>
+ * @ingroup Patternist_schema
+ */
+ class ComparisonFactory
+ {
+ public:
+ /**
+ * @short Returns the result of evaluating operator @p op applied to the atomic
+ * values @p operand1 and @p operand2.
+ *
+ * The caller guarantees that both values are of type @p type.
+ *
+ * ComparisonFactory does not take ownership of @p sourceLocationReflection.
+ */
+ static bool compare(const AtomicValue::Ptr &operand1,
+ const AtomicComparator::Operator op,
+ const AtomicValue::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection);
+
+ /**
+ * @short Returns the result of evaluating operator @p op applied to the atomic
+ * values @p operand1 and @p operand2.
+ *
+ * In opposite to compare() it converts the operands from string type
+ * to @p type and compares these constructed types.
+ *
+ * The caller guarantees that both values are of type @p type.
+ *
+ * ComparisonFactory does not take ownership of @p sourceLocationReflection.
+ */
+ static bool constructAndCompare(const DerivedString<TypeString>::Ptr &operand1,
+ const AtomicComparator::Operator op,
+ const DerivedString<TypeString>::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection);
+
+ private:
+ Q_DISABLE_COPY(ComparisonFactory)
+ };
+}
+
+QT_END_NAMESPACE
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/data/qitem_p.h b/src/xmlpatterns/data/qitem_p.h
index 1f50072..60c8510 100644
--- a/src/xmlpatterns/data/qitem_p.h
+++ b/src/xmlpatterns/data/qitem_p.h
@@ -128,6 +128,11 @@ namespace QPatternist
typedef QExplicitlySharedDataPointer<AtomicValue> Ptr;
/**
+ * A list if smart pointers wrapping AtomicValue instances.
+ */
+ typedef QList<AtomicValue::Ptr> List;
+
+ /**
* Determines whether this atomic value has an error. This is used
* for implementing casting.
*
diff --git a/src/xmlpatterns/data/qresourceloader_p.h b/src/xmlpatterns/data/qresourceloader_p.h
index 8cb174d..0ebc885 100644
--- a/src/xmlpatterns/data/qresourceloader_p.h
+++ b/src/xmlpatterns/data/qresourceloader_p.h
@@ -114,7 +114,7 @@ namespace QPatternist
*
* Typically this hint is given when the URI is available at
* compile-time, but it is used inside a conditional statement
- * whose branching can't be determined at compile time.
+ * whose branching cannot be determined at compile time.
*/
MayUse,
diff --git a/src/xmlpatterns/data/qvaluefactory.cpp b/src/xmlpatterns/data/qvaluefactory.cpp
new file mode 100644
index 0000000..63307c2
--- /dev/null
+++ b/src/xmlpatterns/data/qvaluefactory.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qatomiccaster_p.h"
+#include "qatomicstring_p.h"
+#include "qcastingplatform_p.h"
+#include "qvaluefactory_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/**
+ * @short Helper class for ValueFactory::fromLexical() which exposes
+ * CastingPlatform appropriately.
+ *
+ * @relates ValueFactory
+ */
+class PerformValueConstruction : public CastingPlatform<PerformValueConstruction, false>
+ , public SourceLocationReflection
+{
+public:
+ PerformValueConstruction(const SourceLocationReflection *const sourceLocationReflection,
+ const SchemaType::Ptr &toType) : m_sourceReflection(sourceLocationReflection)
+ , m_targetType(AtomicType::Ptr(toType))
+ {
+ Q_ASSERT(m_sourceReflection);
+ }
+
+ AtomicValue::Ptr operator()(const AtomicValue::Ptr &lexicalValue,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context)
+ {
+ prepareCasting(context, BuiltinTypes::xsString);
+ return AtomicValue::Ptr(const_cast<AtomicValue *>(cast(lexicalValue, context).asAtomicValue()));
+ }
+
+ const SourceLocationReflection *actualReflection() const
+ {
+ return m_sourceReflection;
+ }
+
+ ItemType::Ptr targetType() const
+ {
+ return m_targetType;
+ }
+
+private:
+ const SourceLocationReflection *const m_sourceReflection;
+ const ItemType::Ptr m_targetType;
+};
+
+AtomicValue::Ptr ValueFactory::fromLexical(const QString &lexicalValue,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection)
+{
+ Q_ASSERT(context);
+ Q_ASSERT(type);
+ Q_ASSERT_X(type->category() == SchemaType::SimpleTypeAtomic, Q_FUNC_INFO,
+ "We can only construct for atomic values.");
+
+ return PerformValueConstruction(sourceLocationReflection, type)(AtomicString::fromValue(lexicalValue),
+ type,
+ context);
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/data/qvaluefactory_p.h b/src/xmlpatterns/data/qvaluefactory_p.h
new file mode 100644
index 0000000..acc5733
--- /dev/null
+++ b/src/xmlpatterns/data/qvaluefactory_p.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_ValueFactory_H
+#define Patternist_ValueFactory_H
+
+#include "qitem_p.h"
+#include "qreportcontext_p.h"
+#include "qschematype_p.h"
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Provides fromLexical(), which allows instantiation of atomic
+ * values from arbitrary types.
+ *
+ * This class wraps the helper class CastingPlatform with a more specific,
+ * high-level API.
+ *
+ * @see CastingPlatform
+ * @author Frans Englich <fenglich@trolltech.com>
+ * @ingroup Patternist_schema
+ */
+ class ValueFactory
+ {
+ public:
+ /**
+ * @short Returns an AtomicValue of type @p type from the lexical space
+ * @p lexicalValue, and raise an error through @p context if that's
+ * impossible.
+ *
+ * ValueFactory does not take ownership of @p sourceLocationReflection.
+ */
+ static AtomicValue::Ptr fromLexical(const QString &lexicalValue,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection);
+
+ private:
+ Q_DISABLE_COPY(ValueFactory)
+ };
+}
+
+QT_END_NAMESPACE
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/environment/createReportContext.xsl b/src/xmlpatterns/environment/createReportContext.xsl
index 7ca96bf..5b754d2 100644
--- a/src/xmlpatterns/environment/createReportContext.xsl
+++ b/src/xmlpatterns/environment/createReportContext.xsl
@@ -242,6 +242,11 @@ namespace QPatternist
*/]]></xsl:text>
enum ErrorCode
{
+ /**
+ * XML Schema error code.
+ */
+ XSDError,
+
<!-- The order of the calls is significant. The templates takes into account
to avoid the last comma(extractXSLT20 does this). -->
<xsl:call-template name="extractXQuery10"/>
diff --git a/src/xmlpatterns/environment/qreportcontext.cpp b/src/xmlpatterns/environment/qreportcontext.cpp
index 34ef6ce..64afcdb 100644
--- a/src/xmlpatterns/environment/qreportcontext.cpp
+++ b/src/xmlpatterns/environment/qreportcontext.cpp
@@ -448,6 +448,7 @@ QString ReportContext::codeToString(const ReportContext::ErrorCode code)
case XTTE1545: result = "XTTE1545"; break;
case XTTE1550: result = "XTTE1550"; break;
case XTTE1555: result = "XTTE1555"; break;
+ case XSDError: result = "XSDError"; break;
}
Q_ASSERT_X(result, Q_FUNC_INFO, "Unknown enum value.");
diff --git a/src/xmlpatterns/environment/qreportcontext_p.h b/src/xmlpatterns/environment/qreportcontext_p.h
index ee78972..dbdf824 100644
--- a/src/xmlpatterns/environment/qreportcontext_p.h
+++ b/src/xmlpatterns/environment/qreportcontext_p.h
@@ -151,6 +151,10 @@ namespace QPatternist
*/
enum ErrorCode
{
+ /**
+ * XML Schema error code.
+ */
+ XSDError,
/**
* It is a static error if analysis of an expression relies on some
diff --git a/src/xmlpatterns/expr/qcastingplatform.cpp b/src/xmlpatterns/expr/qcastingplatform.cpp
index bc902f9..933d188 100644
--- a/src/xmlpatterns/expr/qcastingplatform.cpp
+++ b/src/xmlpatterns/expr/qcastingplatform.cpp
@@ -83,7 +83,7 @@ Item CastingPlatform<TSubClass, issueError>::cast(const Item &sourceValue,
else
{
bool castImpossible = false;
- const AtomicCaster::Ptr caster(locateCaster(sourceValue.type(), context, castImpossible));
+ const AtomicCaster::Ptr caster(locateCaster(sourceValue.type(), context, castImpossible, static_cast<const TSubClass *>(this), targetType()));
if(!issueError && castImpossible)
{
@@ -112,7 +112,7 @@ bool CastingPlatform<TSubClass, issueError>::prepareCasting(const ReportContext:
or numeric at compile time. We'll do lookup at runtime instead. */
bool castImpossible = false;
- m_caster = locateCaster(sourceType, context, castImpossible);
+ m_caster = locateCaster(sourceType, context, castImpossible, static_cast<const TSubClass *>(this), targetType());
return !castImpossible;
}
@@ -120,20 +120,22 @@ bool CastingPlatform<TSubClass, issueError>::prepareCasting(const ReportContext:
template <typename TSubClass, const bool issueError>
AtomicCaster::Ptr CastingPlatform<TSubClass, issueError>::locateCaster(const ItemType::Ptr &sourceType,
const ReportContext::Ptr &context,
- bool &castImpossible) const
+ bool &castImpossible,
+ const SourceLocationReflection *const location,
+ const ItemType::Ptr &targetType)
{
Q_ASSERT(sourceType);
- Q_ASSERT(targetType());
+ Q_ASSERT(targetType);
const AtomicCasterLocator::Ptr locator(static_cast<AtomicType *>(
- targetType().data())->casterLocator());
+ targetType.data())->casterLocator());
if(!locator)
{
if(issueError)
{
context->error(QtXmlPatterns::tr("No casting is possible with %1 as the target type.")
- .arg(formatType(context->namePool(), targetType())),
- ReportContext::XPTY0004, static_cast<const TSubClass *>(this));
+ .arg(formatType(context->namePool(), targetType)),
+ ReportContext::XPTY0004, location);
}
else
castImpossible = true;
@@ -141,15 +143,15 @@ AtomicCaster::Ptr CastingPlatform<TSubClass, issueError>::locateCaster(const Ite
return AtomicCaster::Ptr();
}
- const AtomicCaster::Ptr caster(static_cast<const AtomicType *>(sourceType.data())->accept(locator, static_cast<const TSubClass *>(this)));
+ const AtomicCaster::Ptr caster(static_cast<const AtomicType *>(sourceType.data())->accept(locator, location));
if(!caster)
{
if(issueError)
{
context->error(QtXmlPatterns::tr("It is not possible to cast from %1 to %2.")
.arg(formatType(context->namePool(), sourceType))
- .arg(formatType(context->namePool(), targetType())),
- ReportContext::XPTY0004, static_cast<const TSubClass *>(this));
+ .arg(formatType(context->namePool(), targetType)),
+ ReportContext::XPTY0004, location);
}
else
castImpossible = true;
diff --git a/src/xmlpatterns/expr/qcastingplatform_p.h b/src/xmlpatterns/expr/qcastingplatform_p.h
index 3aded3d..91f4a8c 100644
--- a/src/xmlpatterns/expr/qcastingplatform_p.h
+++ b/src/xmlpatterns/expr/qcastingplatform_p.h
@@ -52,16 +52,17 @@
#ifndef Patternist_CastingPlatform_H
#define Patternist_CastingPlatform_H
+#include "qatomiccasterlocator_p.h"
#include "qatomiccaster_p.h"
-#include "qqnamevalue_p.h"
#include "qatomicstring_p.h"
-#include "qvalidationerror_p.h"
-#include "qatomiccasterlocator_p.h"
#include "qatomictype_p.h"
#include "qbuiltintypes_p.h"
#include "qcommonsequencetypes_p.h"
-#include "qschematypefactory_p.h"
#include "qpatternistlocale_p.h"
+#include "qqnamevalue_p.h"
+#include "qschematypefactory_p.h"
+#include "qstaticcontext_p.h"
+#include "qvalidationerror_p.h"
QT_BEGIN_HEADER
@@ -101,6 +102,7 @@ namespace QPatternist
* function targetType() must be implemented such that CastingPlatform knows
* what type it shall cast to.
*
+ * @see ValueFactory
* @author Frans Englich <fenglich@trolltech.com>
* @ingroup Patternist_expressions
*/
@@ -167,9 +169,16 @@ namespace QPatternist
*
* @p castImpossible is not initialized. Initialize it to @c false.
*/
- AtomicCaster::Ptr locateCaster(const ItemType::Ptr &sourceType,
- const ReportContext::Ptr &context,
- bool &castImpossible) const;
+ static AtomicCaster::Ptr locateCaster(const ItemType::Ptr &sourceType,
+ const ReportContext::Ptr &context,
+ bool &castImpossible,
+ const SourceLocationReflection *const location,
+ const ItemType::Ptr &targetType);
+ private:
+ inline Item castWithCaster(const Item &sourceValue,
+ const AtomicCaster::Ptr &caster,
+ const DynamicContext::Ptr &context) const;
+
inline ItemType::Ptr targetType() const
{
diff --git a/src/xmlpatterns/expr/qexpressionfactory.cpp b/src/xmlpatterns/expr/qexpressionfactory.cpp
index e243037..0ddf3b1 100644
--- a/src/xmlpatterns/expr/qexpressionfactory.cpp
+++ b/src/xmlpatterns/expr/qexpressionfactory.cpp
@@ -81,9 +81,13 @@ Expression::Ptr ExpressionFactory::createExpression(const QString &expr,
const QUrl &queryURI,
const QXmlName &initialTemplateName)
{
- if(lang == QXmlQuery::XQuery10)
+ if(lang == QXmlQuery::XSLT20)
{
- return createExpression(Tokenizer::Ptr(new XQueryTokenizer(expr, queryURI)),
+ QByteArray query(expr.toUtf8());
+ QBuffer buffer(&query);
+ buffer.open(QIODevice::ReadOnly);
+
+ return createExpression(&buffer,
context,
lang,
requiredType,
@@ -92,12 +96,7 @@ Expression::Ptr ExpressionFactory::createExpression(const QString &expr,
}
else
{
- Q_ASSERT(lang == QXmlQuery::XSLT20);
- QByteArray query(expr.toUtf8());
- QBuffer buffer(&query);
- buffer.open(QIODevice::ReadOnly);
-
- return createExpression(&buffer,
+ return createExpression(Tokenizer::Ptr(new XQueryTokenizer(expr, queryURI)),
context,
lang,
requiredType,
@@ -118,16 +117,10 @@ Expression::Ptr ExpressionFactory::createExpression(QIODevice *const device,
Tokenizer::Ptr tokenizer;
- if(lang == QXmlQuery::XQuery10)
- {
-
- tokenizer = Tokenizer::Ptr(new XQueryTokenizer(QString::fromUtf8(device->readAll()), queryURI));
- }
- else
- {
- Q_ASSERT(lang == QXmlQuery::XSLT20);
+ if(lang == QXmlQuery::XSLT20)
tokenizer = Tokenizer::Ptr(new XSLTTokenizer(device, queryURI, context, context->namePool()));
- }
+ else
+ tokenizer = Tokenizer::Ptr(new XQueryTokenizer(QString::fromUtf8(device->readAll()), queryURI));
return createExpression(tokenizer, context, lang, requiredType, queryURI, initialTemplateName);
}
diff --git a/src/xmlpatterns/functions/qpatternplatform.cpp b/src/xmlpatterns/functions/qpatternplatform.cpp
index 74414f4..5339f28 100644
--- a/src/xmlpatterns/functions/qpatternplatform.cpp
+++ b/src/xmlpatterns/functions/qpatternplatform.cpp
@@ -168,8 +168,15 @@ void PatternPlatform::applyFlags(const Flags flags, QRegExp &patternP)
// TODO Apply the other flags, like 'x'.
}
+QRegExp PatternPlatform::parsePattern(const QString &pattern,
+ const ReportContext::Ptr &context) const
+{
+ return parsePattern(pattern, context, this);
+}
+
QRegExp PatternPlatform::parsePattern(const QString &patternP,
- const DynamicContext::Ptr &context) const
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const location)
{
if(patternP == QLatin1String("(.)\\3") ||
patternP == QLatin1String("\\3") ||
@@ -177,7 +184,7 @@ QRegExp PatternPlatform::parsePattern(const QString &patternP,
{
context->error(QLatin1String("We don't want to hang infinitely on K2-MatchesFunc-9, "
"10 and 11. See Trolltech task 148505."),
- ReportContext::FOER0000, this);
+ ReportContext::FOER0000, location);
return QRegExp();
}
@@ -189,14 +196,8 @@ QRegExp PatternPlatform::parsePattern(const QString &patternP,
* QChar::category(). */
rewrittenPattern.replace(QLatin1String("[\\i-[:]]"), QLatin1String("[a-zA-Z_]"));
rewrittenPattern.replace(QLatin1String("[\\c-[:]]"), QLatin1String("[a-zA-Z0-9_\\-\\.]"));
- rewrittenPattern.replace(QLatin1String("\\i"), QLatin1String("[a-zA-Z:_]"));
- rewrittenPattern.replace(QLatin1String("\\c"), QLatin1String("[a-zA-Z0-9:_\\-\\.]"));
- rewrittenPattern.replace(QLatin1String("\\p{L}"), QLatin1String("[a-zA-Z]"));
- rewrittenPattern.replace(QLatin1String("\\p{Lu}"), QLatin1String("[A-Z]"));
- rewrittenPattern.replace(QLatin1String("\\p{Ll}"), QLatin1String("[a-z]"));
- rewrittenPattern.replace(QLatin1String("\\p{Nd}"), QLatin1String("[0-9]"));
- QRegExp retval(rewrittenPattern);
+ QRegExp retval(rewrittenPattern, Qt::CaseSensitive, QRegExp::W3CXmlSchema11);
if(retval.isValid())
return retval;
@@ -204,7 +205,7 @@ QRegExp PatternPlatform::parsePattern(const QString &patternP,
{
context->error(QtXmlPatterns::tr("%1 is an invalid regular expression pattern: %2")
.arg(formatExpression(patternP), retval.errorString()),
- ReportContext::FORX0002, this);
+ ReportContext::FORX0002, location);
return QRegExp();
}
}
diff --git a/src/xmlpatterns/functions/qpatternplatform_p.h b/src/xmlpatterns/functions/qpatternplatform_p.h
index 3f4b18e..76f5332 100644
--- a/src/xmlpatterns/functions/qpatternplatform_p.h
+++ b/src/xmlpatterns/functions/qpatternplatform_p.h
@@ -122,6 +122,14 @@ namespace QPatternist
*/
inline int captureCount() const;
+ /**
+ * @short Parses pattern
+ */
+ static QRegExp parsePattern(const QString &pattern,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const location);
+
+
protected:
/**
* @short This constructor is protected, because this class is supposed to be sub-classed.
@@ -146,14 +154,18 @@ namespace QPatternist
};
typedef QFlags<PreCompiledPart> PreCompiledParts;
+ /**
+ * @short Calls the public parsePattern() function and passes in @c
+ * this as the location.
+ */
+ inline QRegExp parsePattern(const QString &pattern,
+ const ReportContext::Ptr &context) const;
+
Q_DISABLE_COPY(PatternPlatform)
Flags parseFlags(const QString &flags,
const DynamicContext::Ptr &context) const;
- QRegExp parsePattern(const QString &pattern,
- const DynamicContext::Ptr &context) const;
-
static void applyFlags(const Flags flags, QRegExp &pattern);
/**
diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp
index cc6c82e..d80c09f 100644
--- a/src/xmlpatterns/parser/qquerytransformparser.cpp
+++ b/src/xmlpatterns/parser/qquerytransformparser.cpp
@@ -300,11 +300,18 @@ static inline QSourceLocation fromYYLTYPE(const YYLTYPE &sourceLocator,
}
/**
+ * @internal
+ * @relates QXmlQuery
+ */
+typedef QFlags<QXmlQuery::QueryLanguage> QueryLanguages;
+
+/**
* @short Flags invalid expressions and declarations in the currently
* parsed language.
*
- * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0 and
- * XPath 2.0 inside XSL-T, it is the union of all the constructs in these
+ * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0, and
+ * XPath 2.0 inside XSL-T, and field and selector patterns in W3C XML Schema's
+ * identity constraints, it is the union of all the constructs in these
* languages. However, when dealing with each language individually, we
* regularly need to disallow some expressions, such as direct element
* constructors when parsing XSL-T, or the typeswitch when parsing XPath.
@@ -315,19 +322,46 @@ static inline QSourceLocation fromYYLTYPE(const YYLTYPE &sourceLocator,
* instance the @c let clause, should not be flagged as an error, because it's
* used for internal purposes.
*
- * Hence, this function is called from each expression and declaration which is
- * unavailable in XPath.
+ * Hence, this function is called from each expression and declaration with @p
+ * allowedLanguages stating what languages it is allowed in.
*
* If @p isInternal is @c true, no error is raised. Otherwise, if the current
- * language is not XQuery, an error is raised.
+ * language is not in @p allowedLanguages, an error is raised.
*/
-static void disallowedConstruct(const ParserContext *const parseInfo,
- const YYLTYPE &sourceLocator,
- const bool isInternal = false)
+static void allowedIn(const QueryLanguages allowedLanguages,
+ const ParserContext *const parseInfo,
+ const YYLTYPE &sourceLocator,
+ const bool isInternal = false)
{
- if(!isInternal && parseInfo->languageAccent != QXmlQuery::XQuery10)
+ /* We treat XPath 2.0 as a subset of XSL-T 2.0, so if XPath 2.0 is allowed
+ * and XSL-T is the language, it's ok. */
+ if(!isInternal &&
+ (!allowedLanguages.testFlag(parseInfo->languageAccent) && !(allowedLanguages.testFlag(QXmlQuery::XPath20) && parseInfo->languageAccent == QXmlQuery::XSLT20)))
{
- parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered which only is allowed in XQuery."),
+
+ QString langName;
+
+ switch(parseInfo->languageAccent)
+ {
+ case QXmlQuery::XPath20:
+ langName = QLatin1String("XPath 2.0");
+ break;
+ case QXmlQuery::XSLT20:
+ langName = QLatin1String("XSL-T 2.0");
+ break;
+ case QXmlQuery::XQuery10:
+ langName = QLatin1String("XQuery 1.0");
+ break;
+ case QXmlQuery::XmlSchema11IdentityConstraintSelector:
+ langName = QtXmlPatterns::tr("W3C XML Schema identity constraint selector");
+ break;
+ case QXmlQuery::XmlSchema11IdentityConstraintField:
+ langName = QtXmlPatterns::tr("W3C XML Schema identity constraint field");
+ break;
+ }
+
+ parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered "
+ "which is disallowed in the current language(%1).").arg(langName),
ReportContext::XPST0003,
fromYYLTYPE(sourceLocator, parseInfo));
@@ -1366,7 +1400,7 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
/* Line 221 of yacc.c. */
-#line 1289 "qquerytransformparser.cpp"
+#line 1323 "qquerytransformparser.cpp"
#ifdef short
# undef short
@@ -1850,54 +1884,54 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 1341, 1341, 1342, 1344, 1345, 1376, 1377, 1393, 1491,
- 1493, 1499, 1501, 1508, 1514, 1520, 1527, 1530, 1534, 1538,
- 1558, 1572, 1576, 1570, 1639, 1643, 1660, 1663, 1665, 1670,
- 1671, 1675, 1676, 1680, 1684, 1688, 1690, 1691, 1693, 1695,
- 1741, 1755, 1760, 1765, 1766, 1768, 1783, 1798, 1808, 1823,
- 1827, 1832, 1846, 1850, 1855, 1869, 1874, 1879, 1884, 1889,
- 1905, 1928, 1936, 1937, 1938, 1940, 1957, 1958, 1960, 1961,
- 1963, 1964, 1966, 2021, 2025, 2031, 2034, 2039, 2053, 2057,
- 2063, 2062, 2171, 2174, 2180, 2201, 2207, 2211, 2213, 2218,
- 2228, 2229, 2234, 2235, 2244, 2314, 2325, 2326, 2330, 2335,
- 2404, 2405, 2409, 2414, 2458, 2459, 2464, 2471, 2477, 2478,
- 2479, 2480, 2481, 2482, 2488, 2493, 2499, 2502, 2507, 2513,
- 2519, 2523, 2548, 2549, 2553, 2557, 2551, 2598, 2601, 2596,
- 2617, 2618, 2619, 2622, 2626, 2634, 2633, 2647, 2646, 2655,
- 2656, 2657, 2659, 2667, 2678, 2681, 2683, 2688, 2695, 2702,
- 2708, 2728, 2733, 2739, 2742, 2744, 2745, 2752, 2758, 2762,
- 2767, 2768, 2771, 2775, 2770, 2784, 2788, 2783, 2796, 2799,
- 2803, 2798, 2812, 2816, 2811, 2824, 2826, 2854, 2853, 2865,
- 2873, 2864, 2884, 2885, 2888, 2892, 2897, 2902, 2901, 2917,
- 2922, 2923, 2928, 2929, 2934, 2935, 2936, 2937, 2939, 2940,
- 2945, 2946, 2951, 2952, 2954, 2955, 2960, 2961, 2962, 2963,
- 2965, 2966, 2971, 2972, 2977, 2978, 2980, 2984, 2989, 2990,
- 2996, 2997, 3002, 3003, 3008, 3009, 3014, 3015, 3020, 3024,
- 3029, 3030, 3031, 3033, 3038, 3039, 3040, 3041, 3042, 3043,
- 3045, 3050, 3051, 3052, 3053, 3054, 3055, 3057, 3062, 3063,
- 3064, 3066, 3080, 3081, 3082, 3084, 3100, 3104, 3109, 3110,
- 3112, 3117, 3118, 3120, 3126, 3130, 3136, 3139, 3140, 3144,
- 3153, 3158, 3162, 3163, 3168, 3167, 3182, 3189, 3188, 3203,
- 3211, 3211, 3220, 3222, 3225, 3230, 3232, 3236, 3302, 3305,
- 3311, 3314, 3323, 3327, 3331, 3336, 3337, 3342, 3343, 3346,
- 3345, 3375, 3377, 3378, 3380, 3394, 3395, 3396, 3397, 3398,
- 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3408, 3407, 3417,
- 3428, 3433, 3435, 3440, 3441, 3443, 3447, 3449, 3453, 3462,
- 3468, 3469, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481,
- 3491, 3492, 3497, 3501, 3506, 3511, 3516, 3521, 3525, 3530,
- 3535, 3540, 3569, 3573, 3580, 3582, 3586, 3588, 3589, 3590,
- 3624, 3633, 3622, 3874, 3878, 3898, 3901, 3907, 3912, 3917,
- 3923, 3926, 3936, 3943, 3947, 3953, 3967, 3973, 3990, 3995,
- 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4016, 4024, 4023,
- 4063, 4066, 4071, 4086, 4091, 4098, 4110, 4114, 4110, 4120,
- 4122, 4126, 4128, 4143, 4147, 4156, 4161, 4165, 4171, 4174,
- 4179, 4184, 4189, 4190, 4191, 4192, 4194, 4195, 4196, 4197,
- 4202, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4246, 4251,
- 4256, 4262, 4263, 4265, 4270, 4275, 4280, 4285, 4301, 4302,
- 4304, 4309, 4314, 4318, 4330, 4343, 4353, 4358, 4363, 4368,
- 4382, 4396, 4397, 4399, 4409, 4411, 4416, 4423, 4430, 4432,
- 4434, 4435, 4437, 4441, 4446, 4447, 4449, 4455, 4457, 4459,
- 4460, 4462, 4474
+ 0, 1375, 1375, 1376, 1378, 1379, 1410, 1411, 1427, 1525,
+ 1527, 1533, 1535, 1542, 1548, 1554, 1561, 1564, 1568, 1572,
+ 1592, 1606, 1610, 1604, 1673, 1677, 1694, 1697, 1699, 1704,
+ 1705, 1709, 1710, 1714, 1718, 1722, 1724, 1725, 1727, 1729,
+ 1775, 1789, 1794, 1799, 1800, 1802, 1817, 1832, 1842, 1857,
+ 1861, 1866, 1880, 1884, 1889, 1903, 1908, 1913, 1918, 1923,
+ 1939, 1962, 1970, 1971, 1972, 1974, 1991, 1992, 1994, 1995,
+ 1997, 1998, 2000, 2055, 2059, 2065, 2068, 2073, 2087, 2091,
+ 2097, 2096, 2205, 2208, 2214, 2235, 2241, 2245, 2247, 2252,
+ 2262, 2263, 2268, 2269, 2278, 2348, 2359, 2360, 2364, 2369,
+ 2438, 2439, 2443, 2448, 2492, 2493, 2498, 2505, 2511, 2512,
+ 2513, 2514, 2515, 2516, 2522, 2527, 2533, 2536, 2541, 2547,
+ 2553, 2557, 2582, 2583, 2587, 2591, 2585, 2632, 2635, 2630,
+ 2651, 2652, 2653, 2656, 2660, 2668, 2667, 2681, 2680, 2689,
+ 2690, 2691, 2693, 2701, 2712, 2715, 2717, 2722, 2729, 2736,
+ 2742, 2762, 2767, 2773, 2776, 2778, 2779, 2786, 2792, 2796,
+ 2801, 2802, 2805, 2809, 2804, 2819, 2823, 2818, 2831, 2834,
+ 2838, 2833, 2848, 2852, 2847, 2860, 2862, 2890, 2889, 2901,
+ 2909, 2900, 2920, 2921, 2924, 2928, 2933, 2938, 2937, 2953,
+ 2959, 2960, 2966, 2967, 2973, 2974, 2975, 2976, 2978, 2979,
+ 2985, 2986, 2992, 2993, 2995, 2996, 3002, 3003, 3004, 3005,
+ 3007, 3008, 3018, 3019, 3025, 3026, 3028, 3032, 3037, 3038,
+ 3045, 3046, 3052, 3053, 3059, 3060, 3066, 3067, 3073, 3077,
+ 3082, 3083, 3084, 3086, 3092, 3093, 3094, 3095, 3096, 3097,
+ 3099, 3104, 3105, 3106, 3107, 3108, 3109, 3111, 3116, 3117,
+ 3118, 3120, 3134, 3135, 3136, 3138, 3155, 3159, 3164, 3165,
+ 3167, 3172, 3173, 3175, 3181, 3185, 3191, 3194, 3195, 3199,
+ 3208, 3213, 3217, 3218, 3223, 3222, 3237, 3245, 3244, 3260,
+ 3268, 3268, 3277, 3279, 3282, 3287, 3289, 3293, 3359, 3362,
+ 3368, 3371, 3380, 3384, 3388, 3393, 3394, 3399, 3400, 3403,
+ 3402, 3432, 3434, 3435, 3437, 3481, 3482, 3483, 3484, 3485,
+ 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3495, 3494, 3505,
+ 3516, 3521, 3523, 3528, 3529, 3534, 3538, 3540, 3544, 3553,
+ 3560, 3561, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574,
+ 3584, 3585, 3590, 3595, 3601, 3607, 3612, 3617, 3622, 3628,
+ 3633, 3638, 3668, 3672, 3679, 3681, 3685, 3690, 3691, 3692,
+ 3726, 3735, 3724, 3976, 3980, 4000, 4003, 4009, 4014, 4019,
+ 4025, 4028, 4038, 4045, 4049, 4055, 4069, 4075, 4092, 4097,
+ 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4118, 4126, 4125,
+ 4165, 4168, 4173, 4188, 4193, 4200, 4212, 4216, 4212, 4222,
+ 4224, 4228, 4230, 4245, 4249, 4258, 4263, 4267, 4273, 4276,
+ 4281, 4286, 4291, 4292, 4293, 4294, 4296, 4297, 4298, 4299,
+ 4304, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4348, 4353,
+ 4358, 4364, 4365, 4367, 4372, 4377, 4382, 4387, 4403, 4404,
+ 4406, 4411, 4416, 4420, 4432, 4445, 4455, 4460, 4465, 4470,
+ 4484, 4498, 4499, 4501, 4511, 4513, 4518, 4525, 4532, 4534,
+ 4536, 4537, 4539, 4543, 4548, 4549, 4551, 4557, 4559, 4561,
+ 4565, 4570, 4582
};
#endif
@@ -3726,7 +3760,7 @@ yyreduce:
{
case 5:
/* Line 1269 of yacc.c. */
-#line 1346 "querytransformparser.ypp"
+#line 1380 "querytransformparser.ypp"
{
/* Suppress more compiler warnings about unused defines. */
@@ -3760,7 +3794,7 @@ yyreduce:
case 7:
/* Line 1269 of yacc.c. */
-#line 1378 "querytransformparser.ypp"
+#line 1412 "querytransformparser.ypp"
{
const QRegExp encNameRegExp(QLatin1String("[A-Za-z][A-Za-z0-9._\\-]*"));
@@ -3779,7 +3813,7 @@ yyreduce:
case 8:
/* Line 1269 of yacc.c. */
-#line 1394 "querytransformparser.ypp"
+#line 1428 "querytransformparser.ypp"
{
/* In XSL-T, we can have dangling variable references, so resolve them
* before we proceed with other steps, such as checking circularity. */
@@ -3880,7 +3914,7 @@ yyreduce:
case 10:
/* Line 1269 of yacc.c. */
-#line 1494 "querytransformparser.ypp"
+#line 1528 "querytransformparser.ypp"
{
// TODO add to namespace context
parseInfo->moduleNamespace = parseInfo->staticContext->namePool()->allocateNamespace((yyvsp[(3) - (6)].sval));
@@ -3889,9 +3923,9 @@ yyreduce:
case 12:
/* Line 1269 of yacc.c. */
-#line 1502 "querytransformparser.ypp"
+#line 1536 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
if(parseInfo->hasSecondPrologPart)
parseInfo->staticContext->error(QtXmlPatterns::tr("A default namespace declaration must occur before function, "
"variable, and option declarations."), ReportContext::XPST0003, fromYYLTYPE((yyloc), parseInfo));
@@ -3900,7 +3934,7 @@ yyreduce:
case 13:
/* Line 1269 of yacc.c. */
-#line 1509 "querytransformparser.ypp"
+#line 1543 "querytransformparser.ypp"
{
if(parseInfo->hasSecondPrologPart)
parseInfo->staticContext->error(QtXmlPatterns::tr("A default namespace declaration must occur before function, "
@@ -3910,7 +3944,7 @@ yyreduce:
case 14:
/* Line 1269 of yacc.c. */
-#line 1515 "querytransformparser.ypp"
+#line 1549 "querytransformparser.ypp"
{
if(parseInfo->hasSecondPrologPart)
parseInfo->staticContext->error(QtXmlPatterns::tr("Namespace declarations must occur before function, "
@@ -3920,9 +3954,9 @@ yyreduce:
case 15:
/* Line 1269 of yacc.c. */
-#line 1521 "querytransformparser.ypp"
+#line 1555 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
if(parseInfo->hasSecondPrologPart)
parseInfo->staticContext->error(QtXmlPatterns::tr("Module imports must occur before function, "
"variable, and option declarations."), ReportContext::XPST0003, fromYYLTYPE((yyloc), parseInfo));
@@ -3931,7 +3965,7 @@ yyreduce:
case 17:
/* Line 1269 of yacc.c. */
-#line 1531 "querytransformparser.ypp"
+#line 1565 "querytransformparser.ypp"
{
parseInfo->hasSecondPrologPart = true;
}
@@ -3939,7 +3973,7 @@ yyreduce:
case 18:
/* Line 1269 of yacc.c. */
-#line 1535 "querytransformparser.ypp"
+#line 1569 "querytransformparser.ypp"
{
parseInfo->hasSecondPrologPart = true;
}
@@ -3947,16 +3981,16 @@ yyreduce:
case 19:
/* Line 1269 of yacc.c. */
-#line 1539 "querytransformparser.ypp"
+#line 1573 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
parseInfo->hasSecondPrologPart = true;
}
break;
case 20:
/* Line 1269 of yacc.c. */
-#line 1562 "querytransformparser.ypp"
+#line 1596 "querytransformparser.ypp"
{
Template::Ptr temp(create(new Template(parseInfo->currentImportPrecedence, (yyvsp[(5) - (7)].sequenceType)), (yyloc), parseInfo));
@@ -3969,7 +4003,7 @@ yyreduce:
case 21:
/* Line 1269 of yacc.c. */
-#line 1572 "querytransformparser.ypp"
+#line 1606 "querytransformparser.ypp"
{
parseInfo->isParsingPattern = true;
}
@@ -3977,7 +4011,7 @@ yyreduce:
case 22:
/* Line 1269 of yacc.c. */
-#line 1576 "querytransformparser.ypp"
+#line 1610 "querytransformparser.ypp"
{
parseInfo->isParsingPattern = false;
}
@@ -3985,7 +4019,7 @@ yyreduce:
case 23:
/* Line 1269 of yacc.c. */
-#line 1585 "querytransformparser.ypp"
+#line 1619 "querytransformparser.ypp"
{
/* In this grammar branch, we're guaranteed to be a template rule, but
* may also be a named template. */
@@ -4042,7 +4076,7 @@ yyreduce:
case 24:
/* Line 1269 of yacc.c. */
-#line 1639 "querytransformparser.ypp"
+#line 1673 "querytransformparser.ypp"
{
(yyval.enums.Double) = std::numeric_limits<xsDouble>::quiet_NaN();
}
@@ -4050,7 +4084,7 @@ yyreduce:
case 25:
/* Line 1269 of yacc.c. */
-#line 1644 "querytransformparser.ypp"
+#line 1678 "querytransformparser.ypp"
{
const AtomicValue::Ptr val(Decimal::fromLexical((yyvsp[(2) - (2)].sval)));
if(val->hasError())
@@ -4069,7 +4103,7 @@ yyreduce:
case 26:
/* Line 1269 of yacc.c. */
-#line 1660 "querytransformparser.ypp"
+#line 1694 "querytransformparser.ypp"
{
(yyval.qName) = QXmlName();
}
@@ -4077,7 +4111,7 @@ yyreduce:
case 28:
/* Line 1269 of yacc.c. */
-#line 1666 "querytransformparser.ypp"
+#line 1700 "querytransformparser.ypp"
{
(yyval.qName) = (yyvsp[(2) - (2)].qName);
}
@@ -4085,42 +4119,42 @@ yyreduce:
case 30:
/* Line 1269 of yacc.c. */
-#line 1672 "querytransformparser.ypp"
+#line 1706 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
}
break;
case 32:
/* Line 1269 of yacc.c. */
-#line 1677 "querytransformparser.ypp"
+#line 1711 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
}
break;
case 33:
/* Line 1269 of yacc.c. */
-#line 1681 "querytransformparser.ypp"
+#line 1715 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
}
break;
case 34:
/* Line 1269 of yacc.c. */
-#line 1685 "querytransformparser.ypp"
+#line 1719 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
}
break;
case 39:
/* Line 1269 of yacc.c. */
-#line 1696 "querytransformparser.ypp"
+#line 1730 "querytransformparser.ypp"
{
if(!(yyvsp[(6) - (7)].enums.Bool))
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
if((yyvsp[(3) - (7)].sval) == QLatin1String("xmlns"))
{
@@ -4166,7 +4200,7 @@ yyreduce:
case 40:
/* Line 1269 of yacc.c. */
-#line 1742 "querytransformparser.ypp"
+#line 1776 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::BoundarySpaceDecl))
{
@@ -4183,7 +4217,7 @@ yyreduce:
case 41:
/* Line 1269 of yacc.c. */
-#line 1756 "querytransformparser.ypp"
+#line 1790 "querytransformparser.ypp"
{
(yyval.enums.boundarySpacePolicy) = StaticContext::BSPStrip;
}
@@ -4191,7 +4225,7 @@ yyreduce:
case 42:
/* Line 1269 of yacc.c. */
-#line 1761 "querytransformparser.ypp"
+#line 1795 "querytransformparser.ypp"
{
(yyval.enums.boundarySpacePolicy) = StaticContext::BSPPreserve;
}
@@ -4199,7 +4233,7 @@ yyreduce:
case 45:
/* Line 1269 of yacc.c. */
-#line 1770 "querytransformparser.ypp"
+#line 1804 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::DeclareDefaultElementNamespace))
{
@@ -4216,7 +4250,7 @@ yyreduce:
case 46:
/* Line 1269 of yacc.c. */
-#line 1785 "querytransformparser.ypp"
+#line 1819 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::DeclareDefaultFunctionNamespace))
{
@@ -4233,7 +4267,7 @@ yyreduce:
case 47:
/* Line 1269 of yacc.c. */
-#line 1799 "querytransformparser.ypp"
+#line 1833 "querytransformparser.ypp"
{
if((yyvsp[(3) - (5)].qName).prefix() == StandardPrefixes::empty)
{
@@ -4246,9 +4280,9 @@ yyreduce:
case 48:
/* Line 1269 of yacc.c. */
-#line 1809 "querytransformparser.ypp"
+#line 1843 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
if(parseInfo->hasDeclaration(ParserContext::OrderingModeDecl))
{
parseInfo->staticContext->error(prologMessage("declare ordering"),
@@ -4264,7 +4298,7 @@ yyreduce:
case 49:
/* Line 1269 of yacc.c. */
-#line 1824 "querytransformparser.ypp"
+#line 1858 "querytransformparser.ypp"
{
(yyval.enums.orderingMode) = StaticContext::Ordered;
}
@@ -4272,7 +4306,7 @@ yyreduce:
case 50:
/* Line 1269 of yacc.c. */
-#line 1828 "querytransformparser.ypp"
+#line 1862 "querytransformparser.ypp"
{
(yyval.enums.orderingMode) = StaticContext::Unordered;
}
@@ -4280,7 +4314,7 @@ yyreduce:
case 51:
/* Line 1269 of yacc.c. */
-#line 1833 "querytransformparser.ypp"
+#line 1867 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::EmptyOrderDecl))
{
@@ -4297,7 +4331,7 @@ yyreduce:
case 52:
/* Line 1269 of yacc.c. */
-#line 1847 "querytransformparser.ypp"
+#line 1881 "querytransformparser.ypp"
{
(yyval.enums.orderingEmptySequence) = StaticContext::Least;
}
@@ -4305,7 +4339,7 @@ yyreduce:
case 53:
/* Line 1269 of yacc.c. */
-#line 1851 "querytransformparser.ypp"
+#line 1885 "querytransformparser.ypp"
{
(yyval.enums.orderingEmptySequence) = StaticContext::Greatest;
}
@@ -4313,7 +4347,7 @@ yyreduce:
case 54:
/* Line 1269 of yacc.c. */
-#line 1857 "querytransformparser.ypp"
+#line 1891 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::CopyNamespacesDecl))
{
@@ -4329,7 +4363,7 @@ yyreduce:
case 55:
/* Line 1269 of yacc.c. */
-#line 1870 "querytransformparser.ypp"
+#line 1904 "querytransformparser.ypp"
{
parseInfo->preserveNamespacesMode = true;
}
@@ -4337,7 +4371,7 @@ yyreduce:
case 56:
/* Line 1269 of yacc.c. */
-#line 1875 "querytransformparser.ypp"
+#line 1909 "querytransformparser.ypp"
{
parseInfo->preserveNamespacesMode = false;
}
@@ -4345,7 +4379,7 @@ yyreduce:
case 57:
/* Line 1269 of yacc.c. */
-#line 1880 "querytransformparser.ypp"
+#line 1914 "querytransformparser.ypp"
{
parseInfo->inheritNamespacesMode = true;
}
@@ -4353,7 +4387,7 @@ yyreduce:
case 58:
/* Line 1269 of yacc.c. */
-#line 1885 "querytransformparser.ypp"
+#line 1919 "querytransformparser.ypp"
{
parseInfo->inheritNamespacesMode = false;
}
@@ -4361,7 +4395,7 @@ yyreduce:
case 59:
/* Line 1269 of yacc.c. */
-#line 1890 "querytransformparser.ypp"
+#line 1924 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::DefaultCollationDecl))
{
@@ -4380,9 +4414,9 @@ yyreduce:
case 60:
/* Line 1269 of yacc.c. */
-#line 1906 "querytransformparser.ypp"
+#line 1940 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(3) - (5)].enums.Bool));
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, (yyloc), (yyvsp[(3) - (5)].enums.Bool));
if(parseInfo->hasDeclaration(ParserContext::BaseURIDecl))
{
parseInfo->staticContext->error(prologMessage("declare base-uri"),
@@ -4406,7 +4440,7 @@ yyreduce:
case 61:
/* Line 1269 of yacc.c. */
-#line 1929 "querytransformparser.ypp"
+#line 1963 "querytransformparser.ypp"
{
parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Import feature is not supported, "
"and therefore %1 declarations cannot occur.")
@@ -4417,7 +4451,7 @@ yyreduce:
case 65:
/* Line 1269 of yacc.c. */
-#line 1941 "querytransformparser.ypp"
+#line 1975 "querytransformparser.ypp"
{
if((yyvsp[(4) - (6)].sval).isEmpty())
{
@@ -4437,9 +4471,9 @@ yyreduce:
case 72:
/* Line 1269 of yacc.c. */
-#line 1968 "querytransformparser.ypp"
+#line 2002 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(3) - (9)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(3) - (9)].enums.Bool));
if(variableByName((yyvsp[(5) - (9)].qName), parseInfo))
{
parseInfo->staticContext->error(QtXmlPatterns::tr("A variable by name %1 has already "
@@ -4494,7 +4528,7 @@ yyreduce:
case 73:
/* Line 1269 of yacc.c. */
-#line 2022 "querytransformparser.ypp"
+#line 2056 "querytransformparser.ypp"
{
(yyval.expr).reset();
}
@@ -4502,7 +4536,7 @@ yyreduce:
case 74:
/* Line 1269 of yacc.c. */
-#line 2026 "querytransformparser.ypp"
+#line 2060 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (2)].expr);
}
@@ -4510,7 +4544,7 @@ yyreduce:
case 75:
/* Line 1269 of yacc.c. */
-#line 2031 "querytransformparser.ypp"
+#line 2065 "querytransformparser.ypp"
{
(yyval.expr).reset();
}
@@ -4518,7 +4552,7 @@ yyreduce:
case 76:
/* Line 1269 of yacc.c. */
-#line 2035 "querytransformparser.ypp"
+#line 2069 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (2)].expr);
}
@@ -4526,7 +4560,7 @@ yyreduce:
case 77:
/* Line 1269 of yacc.c. */
-#line 2040 "querytransformparser.ypp"
+#line 2074 "querytransformparser.ypp"
{
if(parseInfo->hasDeclaration(ParserContext::ConstructionDecl))
{
@@ -4543,7 +4577,7 @@ yyreduce:
case 78:
/* Line 1269 of yacc.c. */
-#line 2054 "querytransformparser.ypp"
+#line 2088 "querytransformparser.ypp"
{
(yyval.enums.constructionMode) = StaticContext::CMStrip;
}
@@ -4551,7 +4585,7 @@ yyreduce:
case 79:
/* Line 1269 of yacc.c. */
-#line 2058 "querytransformparser.ypp"
+#line 2092 "querytransformparser.ypp"
{
(yyval.enums.constructionMode) = StaticContext::CMPreserve;
}
@@ -4559,7 +4593,7 @@ yyreduce:
case 80:
/* Line 1269 of yacc.c. */
-#line 2063 "querytransformparser.ypp"
+#line 2097 "querytransformparser.ypp"
{
(yyval.enums.slot) = parseInfo->currentExpressionSlot() - (yyvsp[(6) - (7)].functionArguments).count();
}
@@ -4567,10 +4601,10 @@ yyreduce:
case 81:
/* Line 1269 of yacc.c. */
-#line 2067 "querytransformparser.ypp"
+#line 2101 "querytransformparser.ypp"
{
if(!(yyvsp[(3) - (11)].enums.Bool))
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(3) - (11)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(3) - (11)].enums.Bool));
/* If FunctionBody is null, it is 'external', otherwise the value is the body. */
const QXmlName::NamespaceCode ns((yyvsp[(4) - (11)].qName).namespaceURI());
@@ -4674,7 +4708,7 @@ yyreduce:
case 82:
/* Line 1269 of yacc.c. */
-#line 2171 "querytransformparser.ypp"
+#line 2205 "querytransformparser.ypp"
{
(yyval.functionArguments) = FunctionArgument::List();
}
@@ -4682,7 +4716,7 @@ yyreduce:
case 83:
/* Line 1269 of yacc.c. */
-#line 2175 "querytransformparser.ypp"
+#line 2209 "querytransformparser.ypp"
{
FunctionArgument::List l;
l.append((yyvsp[(1) - (1)].functionArgument));
@@ -4692,7 +4726,7 @@ yyreduce:
case 84:
/* Line 1269 of yacc.c. */
-#line 2181 "querytransformparser.ypp"
+#line 2215 "querytransformparser.ypp"
{
FunctionArgument::List::const_iterator it((yyvsp[(1) - (3)].functionArguments).constBegin());
const FunctionArgument::List::const_iterator end((yyvsp[(1) - (3)].functionArguments).constEnd());
@@ -4716,7 +4750,7 @@ yyreduce:
case 85:
/* Line 1269 of yacc.c. */
-#line 2202 "querytransformparser.ypp"
+#line 2236 "querytransformparser.ypp"
{
pushVariable((yyvsp[(2) - (3)].qName), (yyvsp[(3) - (3)].sequenceType), Expression::Ptr(), VariableDeclaration::FunctionArgument, (yyloc), parseInfo);
(yyval.functionArgument) = FunctionArgument::Ptr(new FunctionArgument((yyvsp[(2) - (3)].qName), (yyvsp[(3) - (3)].sequenceType)));
@@ -4725,7 +4759,7 @@ yyreduce:
case 86:
/* Line 1269 of yacc.c. */
-#line 2208 "querytransformparser.ypp"
+#line 2242 "querytransformparser.ypp"
{
(yyval.expr).reset();
}
@@ -4733,7 +4767,7 @@ yyreduce:
case 88:
/* Line 1269 of yacc.c. */
-#line 2214 "querytransformparser.ypp"
+#line 2248 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (3)].expr);
}
@@ -4741,7 +4775,7 @@ yyreduce:
case 91:
/* Line 1269 of yacc.c. */
-#line 2230 "querytransformparser.ypp"
+#line 2264 "querytransformparser.ypp"
{
(yyval.expr) = create(new CombineNodes((yyvsp[(1) - (3)].expr), CombineNodes::Union, (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
@@ -4749,7 +4783,7 @@ yyreduce:
case 93:
/* Line 1269 of yacc.c. */
-#line 2236 "querytransformparser.ypp"
+#line 2270 "querytransformparser.ypp"
{
/* We write this into a node test. The spec says, 5.5.3 The Meaning of a Pattern:
* "Similarly, / matches a document node, and only a document node,
@@ -4762,7 +4796,7 @@ yyreduce:
case 94:
/* Line 1269 of yacc.c. */
-#line 2245 "querytransformparser.ypp"
+#line 2279 "querytransformparser.ypp"
{
/* /axis::node-test
* =>
@@ -4836,7 +4870,7 @@ yyreduce:
case 95:
/* Line 1269 of yacc.c. */
-#line 2315 "querytransformparser.ypp"
+#line 2349 "querytransformparser.ypp"
{
/* //axis::node-test
* =>
@@ -4851,7 +4885,7 @@ yyreduce:
case 97:
/* Line 1269 of yacc.c. */
-#line 2327 "querytransformparser.ypp"
+#line 2361 "querytransformparser.ypp"
{
createIdPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisParent, (yylsp[(2) - (3)]), parseInfo);
}
@@ -4859,7 +4893,7 @@ yyreduce:
case 98:
/* Line 1269 of yacc.c. */
-#line 2331 "querytransformparser.ypp"
+#line 2365 "querytransformparser.ypp"
{
createIdPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisAncestor, (yylsp[(2) - (3)]), parseInfo);
}
@@ -4867,7 +4901,7 @@ yyreduce:
case 99:
/* Line 1269 of yacc.c. */
-#line 2336 "querytransformparser.ypp"
+#line 2370 "querytransformparser.ypp"
{
const Expression::List ands((yyvsp[(1) - (1)].expr)->operands());
const FunctionSignature::Ptr signature((yyvsp[(1) - (1)].expr)->as<FunctionCall>()->signature());
@@ -4939,7 +4973,7 @@ yyreduce:
case 101:
/* Line 1269 of yacc.c. */
-#line 2406 "querytransformparser.ypp"
+#line 2440 "querytransformparser.ypp"
{
(yyval.expr) = createPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisParent, (yylsp[(2) - (3)]), parseInfo);
}
@@ -4947,7 +4981,7 @@ yyreduce:
case 102:
/* Line 1269 of yacc.c. */
-#line 2410 "querytransformparser.ypp"
+#line 2444 "querytransformparser.ypp"
{
(yyval.expr) = createPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisAncestor, (yylsp[(2) - (3)]), parseInfo);
}
@@ -4955,7 +4989,7 @@ yyreduce:
case 103:
/* Line 1269 of yacc.c. */
-#line 2415 "querytransformparser.ypp"
+#line 2449 "querytransformparser.ypp"
{
const Expression::Ptr expr(findAxisStep((yyvsp[(1) - (1)].expr)));
@@ -5002,7 +5036,7 @@ yyreduce:
case 105:
/* Line 1269 of yacc.c. */
-#line 2460 "querytransformparser.ypp"
+#line 2494 "querytransformparser.ypp"
{
(yyval.expr) = create(new ExpressionSequence((yyvsp[(1) - (1)].expressionList)), (yyloc), parseInfo);
}
@@ -5010,7 +5044,7 @@ yyreduce:
case 106:
/* Line 1269 of yacc.c. */
-#line 2465 "querytransformparser.ypp"
+#line 2499 "querytransformparser.ypp"
{
Expression::List l;
l.append((yyvsp[(1) - (3)].expr));
@@ -5021,7 +5055,7 @@ yyreduce:
case 107:
/* Line 1269 of yacc.c. */
-#line 2472 "querytransformparser.ypp"
+#line 2506 "querytransformparser.ypp"
{
(yyvsp[(1) - (3)].expressionList).append((yyvsp[(3) - (3)].expr));
(yyval.expressionList) = (yyvsp[(1) - (3)].expressionList);
@@ -5030,7 +5064,7 @@ yyreduce:
case 113:
/* Line 1269 of yacc.c. */
-#line 2483 "querytransformparser.ypp"
+#line 2517 "querytransformparser.ypp"
{
(yyval.expr) = createDirAttributeValue((yyvsp[(3) - (4)].expressionList), parseInfo, (yyloc));
}
@@ -5038,7 +5072,7 @@ yyreduce:
case 114:
/* Line 1269 of yacc.c. */
-#line 2488 "querytransformparser.ypp"
+#line 2522 "querytransformparser.ypp"
{
QVector<QXmlName> result;
result.append(QXmlName(StandardNamespaces::InternalXSLT, StandardLocalNames::Default));
@@ -5048,7 +5082,7 @@ yyreduce:
case 115:
/* Line 1269 of yacc.c. */
-#line 2494 "querytransformparser.ypp"
+#line 2528 "querytransformparser.ypp"
{
(yyval.qNameVector) = (yyvsp[(2) - (2)].qNameVector);
}
@@ -5056,7 +5090,7 @@ yyreduce:
case 116:
/* Line 1269 of yacc.c. */
-#line 2499 "querytransformparser.ypp"
+#line 2533 "querytransformparser.ypp"
{
(yyval.qName) = QXmlName(StandardNamespaces::InternalXSLT, StandardLocalNames::Default);
}
@@ -5064,7 +5098,7 @@ yyreduce:
case 117:
/* Line 1269 of yacc.c. */
-#line 2503 "querytransformparser.ypp"
+#line 2537 "querytransformparser.ypp"
{
(yyval.qName) = (yyvsp[(2) - (2)].qName);
}
@@ -5072,7 +5106,7 @@ yyreduce:
case 118:
/* Line 1269 of yacc.c. */
-#line 2508 "querytransformparser.ypp"
+#line 2542 "querytransformparser.ypp"
{
QVector<QXmlName> result;
result.append((yyvsp[(1) - (1)].qName));
@@ -5082,7 +5116,7 @@ yyreduce:
case 119:
/* Line 1269 of yacc.c. */
-#line 2514 "querytransformparser.ypp"
+#line 2548 "querytransformparser.ypp"
{
(yyvsp[(1) - (3)].qNameVector).append((yyvsp[(3) - (3)].qName));
(yyval.qNameVector) = (yyvsp[(1) - (3)].qNameVector);
@@ -5091,7 +5125,7 @@ yyreduce:
case 120:
/* Line 1269 of yacc.c. */
-#line 2520 "querytransformparser.ypp"
+#line 2554 "querytransformparser.ypp"
{
(yyval.qName) = (yyvsp[(1) - (1)].qName);
}
@@ -5099,7 +5133,7 @@ yyreduce:
case 121:
/* Line 1269 of yacc.c. */
-#line 2524 "querytransformparser.ypp"
+#line 2558 "querytransformparser.ypp"
{
if((yyvsp[(1) - (1)].sval) == QLatin1String("#current"))
(yyval.qName) = QXmlName(StandardNamespaces::InternalXSLT, StandardLocalNames::current);
@@ -5126,7 +5160,7 @@ yyreduce:
case 124:
/* Line 1269 of yacc.c. */
-#line 2553 "querytransformparser.ypp"
+#line 2587 "querytransformparser.ypp"
{
/* We're pushing the range variable here, not the positional. */
(yyval.expr) = pushVariable((yyvsp[(3) - (7)].qName), quantificationType((yyvsp[(4) - (7)].sequenceType)), (yyvsp[(7) - (7)].expr), VariableDeclaration::RangeVariable, (yyloc), parseInfo);
@@ -5135,7 +5169,7 @@ yyreduce:
case 125:
/* Line 1269 of yacc.c. */
-#line 2557 "querytransformparser.ypp"
+#line 2591 "querytransformparser.ypp"
{
/* It is ok this appears after PositionalVar, because currentRangeSlot()
* uses a different "channel" than currentPositionSlot(), so they can't trash
@@ -5146,7 +5180,7 @@ yyreduce:
case 126:
/* Line 1269 of yacc.c. */
-#line 2564 "querytransformparser.ypp"
+#line 2598 "querytransformparser.ypp"
{
Q_ASSERT((yyvsp[(7) - (10)].expr));
Q_ASSERT((yyvsp[(10) - (10)].expr));
@@ -5182,7 +5216,7 @@ yyreduce:
case 127:
/* Line 1269 of yacc.c. */
-#line 2598 "querytransformparser.ypp"
+#line 2632 "querytransformparser.ypp"
{
pushVariable((yyvsp[(3) - (7)].qName), quantificationType((yyvsp[(4) - (7)].sequenceType)), (yyvsp[(7) - (7)].expr), VariableDeclaration::RangeVariable, (yyloc), parseInfo);
}
@@ -5190,7 +5224,7 @@ yyreduce:
case 128:
/* Line 1269 of yacc.c. */
-#line 2601 "querytransformparser.ypp"
+#line 2635 "querytransformparser.ypp"
{
/* It is ok this appears after PositionalVar, because currentRangeSlot()
* uses a different "channel" than currentPositionSlot(), so they can't trash
@@ -5201,7 +5235,7 @@ yyreduce:
case 129:
/* Line 1269 of yacc.c. */
-#line 2608 "querytransformparser.ypp"
+#line 2642 "querytransformparser.ypp"
{
(yyval.expr) = create(new ForClause((yyvsp[(9) - (10)].enums.slot), (yyvsp[(7) - (10)].expr), (yyvsp[(10) - (10)].expr), (yyvsp[(5) - (10)].enums.slot)), (yyloc), parseInfo);
@@ -5214,7 +5248,7 @@ yyreduce:
case 133:
/* Line 1269 of yacc.c. */
-#line 2622 "querytransformparser.ypp"
+#line 2656 "querytransformparser.ypp"
{
(yyval.enums.slot) = -1;
}
@@ -5222,7 +5256,7 @@ yyreduce:
case 134:
/* Line 1269 of yacc.c. */
-#line 2627 "querytransformparser.ypp"
+#line 2661 "querytransformparser.ypp"
{
pushVariable((yyvsp[(3) - (3)].qName), CommonSequenceTypes::ExactlyOneInteger, Expression::Ptr(),
VariableDeclaration::PositionalVariable, (yyloc), parseInfo);
@@ -5232,7 +5266,7 @@ yyreduce:
case 135:
/* Line 1269 of yacc.c. */
-#line 2634 "querytransformparser.ypp"
+#line 2668 "querytransformparser.ypp"
{
(yyval.expr) = pushVariable((yyvsp[(4) - (7)].qName), quantificationType((yyvsp[(5) - (7)].sequenceType)), (yyvsp[(7) - (7)].expr), VariableDeclaration::ExpressionVariable, (yyloc), parseInfo);
}
@@ -5240,9 +5274,9 @@ yyreduce:
case 136:
/* Line 1269 of yacc.c. */
-#line 2638 "querytransformparser.ypp"
+#line 2672 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (9)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (9)].enums.Bool));
Q_ASSERT(parseInfo->variables.top()->name == (yyvsp[(4) - (9)].qName));
(yyval.expr) = create(new LetClause((yyvsp[(8) - (9)].expr), (yyvsp[(9) - (9)].expr), parseInfo->variables.top()), (yyloc), parseInfo);
@@ -5252,13 +5286,13 @@ yyreduce:
case 137:
/* Line 1269 of yacc.c. */
-#line 2647 "querytransformparser.ypp"
+#line 2681 "querytransformparser.ypp"
{ (yyval.expr) = pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr), VariableDeclaration::ExpressionVariable, (yyloc), parseInfo);}
break;
case 138:
/* Line 1269 of yacc.c. */
-#line 2649 "querytransformparser.ypp"
+#line 2683 "querytransformparser.ypp"
{
Q_ASSERT(parseInfo->variables.top()->name == (yyvsp[(3) - (8)].qName));
(yyval.expr) = create(new LetClause((yyvsp[(7) - (8)].expr), (yyvsp[(8) - (8)].expr), parseInfo->variables.top()), (yyloc), parseInfo);
@@ -5268,7 +5302,7 @@ yyreduce:
case 142:
/* Line 1269 of yacc.c. */
-#line 2660 "querytransformparser.ypp"
+#line 2694 "querytransformparser.ypp"
{
if((yyvsp[(1) - (3)].orderSpecs).isEmpty())
(yyval.expr) = (yyvsp[(3) - (3)].expr);
@@ -5279,7 +5313,7 @@ yyreduce:
case 143:
/* Line 1269 of yacc.c. */
-#line 2668 "querytransformparser.ypp"
+#line 2702 "querytransformparser.ypp"
{
if((yyvsp[(3) - (5)].orderSpecs).isEmpty())
(yyval.expr) = create(new IfThenClause((yyvsp[(2) - (5)].expr), (yyvsp[(5) - (5)].expr), create(new EmptySequence, (yyloc), parseInfo)), (yyloc), parseInfo);
@@ -5292,7 +5326,7 @@ yyreduce:
case 144:
/* Line 1269 of yacc.c. */
-#line 2678 "querytransformparser.ypp"
+#line 2712 "querytransformparser.ypp"
{
(yyval.orderSpecs) = OrderSpecTransfer::List();
}
@@ -5300,7 +5334,7 @@ yyreduce:
case 146:
/* Line 1269 of yacc.c. */
-#line 2684 "querytransformparser.ypp"
+#line 2718 "querytransformparser.ypp"
{
(yyval.orderSpecs) = (yyvsp[(2) - (2)].orderSpecs);
}
@@ -5308,7 +5342,7 @@ yyreduce:
case 147:
/* Line 1269 of yacc.c. */
-#line 2689 "querytransformparser.ypp"
+#line 2723 "querytransformparser.ypp"
{
OrderSpecTransfer::List list;
list += (yyvsp[(1) - (3)].orderSpecs);
@@ -5319,7 +5353,7 @@ yyreduce:
case 148:
/* Line 1269 of yacc.c. */
-#line 2696 "querytransformparser.ypp"
+#line 2730 "querytransformparser.ypp"
{
OrderSpecTransfer::List list;
list.append((yyvsp[(1) - (1)].orderSpec));
@@ -5329,7 +5363,7 @@ yyreduce:
case 149:
/* Line 1269 of yacc.c. */
-#line 2703 "querytransformparser.ypp"
+#line 2737 "querytransformparser.ypp"
{
(yyval.orderSpec) = OrderSpecTransfer((yyvsp[(1) - (4)].expr), OrderBy::OrderSpec((yyvsp[(2) - (4)].enums.sortDirection), (yyvsp[(3) - (4)].enums.orderingEmptySequence)));
}
@@ -5337,7 +5371,7 @@ yyreduce:
case 150:
/* Line 1269 of yacc.c. */
-#line 2708 "querytransformparser.ypp"
+#line 2742 "querytransformparser.ypp"
{
/* Where does the specification state the default value is ascending?
*
@@ -5361,7 +5395,7 @@ yyreduce:
case 151:
/* Line 1269 of yacc.c. */
-#line 2729 "querytransformparser.ypp"
+#line 2763 "querytransformparser.ypp"
{
(yyval.enums.sortDirection) = OrderBy::OrderSpec::Ascending;
}
@@ -5369,7 +5403,7 @@ yyreduce:
case 152:
/* Line 1269 of yacc.c. */
-#line 2734 "querytransformparser.ypp"
+#line 2768 "querytransformparser.ypp"
{
(yyval.enums.sortDirection) = OrderBy::OrderSpec::Descending;
}
@@ -5377,7 +5411,7 @@ yyreduce:
case 153:
/* Line 1269 of yacc.c. */
-#line 2739 "querytransformparser.ypp"
+#line 2773 "querytransformparser.ypp"
{
(yyval.enums.orderingEmptySequence) = parseInfo->staticContext->orderingEmptySequence();
}
@@ -5385,7 +5419,7 @@ yyreduce:
case 156:
/* Line 1269 of yacc.c. */
-#line 2746 "querytransformparser.ypp"
+#line 2780 "querytransformparser.ypp"
{
if(parseInfo->isXSLT())
resolveAndCheckCollation<ReportContext::XTDE1035>((yyvsp[(2) - (2)].sval), parseInfo, (yyloc));
@@ -5396,7 +5430,7 @@ yyreduce:
case 157:
/* Line 1269 of yacc.c. */
-#line 2753 "querytransformparser.ypp"
+#line 2787 "querytransformparser.ypp"
{
/* We do nothing. We don't use collations, and we have this non-terminal
* in order to accept expressions. */
@@ -5405,7 +5439,7 @@ yyreduce:
case 158:
/* Line 1269 of yacc.c. */
-#line 2759 "querytransformparser.ypp"
+#line 2793 "querytransformparser.ypp"
{
parseInfo->orderStability.push(OrderBy::StableOrder);
}
@@ -5413,7 +5447,7 @@ yyreduce:
case 159:
/* Line 1269 of yacc.c. */
-#line 2763 "querytransformparser.ypp"
+#line 2797 "querytransformparser.ypp"
{
parseInfo->orderStability.push(OrderBy::UnstableOrder);
}
@@ -5421,7 +5455,7 @@ yyreduce:
case 162:
/* Line 1269 of yacc.c. */
-#line 2771 "querytransformparser.ypp"
+#line 2805 "querytransformparser.ypp"
{
pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
VariableDeclaration::RangeVariable, (yyloc), parseInfo);
@@ -5430,14 +5464,15 @@ yyreduce:
case 163:
/* Line 1269 of yacc.c. */
-#line 2775 "querytransformparser.ypp"
+#line 2809 "querytransformparser.ypp"
{(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
break;
case 164:
/* Line 1269 of yacc.c. */
-#line 2777 "querytransformparser.ypp"
+#line 2811 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
QuantifiedExpression::Some, (yyvsp[(6) - (9)].expr), (yyvsp[(9) - (9)].expr)), (yyloc), parseInfo);
parseInfo->finalizePushedVariable();
@@ -5446,7 +5481,7 @@ yyreduce:
case 165:
/* Line 1269 of yacc.c. */
-#line 2784 "querytransformparser.ypp"
+#line 2819 "querytransformparser.ypp"
{
(yyval.expr) = pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
VariableDeclaration::RangeVariable, (yyloc), parseInfo);
@@ -5455,13 +5490,13 @@ yyreduce:
case 166:
/* Line 1269 of yacc.c. */
-#line 2788 "querytransformparser.ypp"
+#line 2823 "querytransformparser.ypp"
{(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
break;
case 167:
/* Line 1269 of yacc.c. */
-#line 2790 "querytransformparser.ypp"
+#line 2825 "querytransformparser.ypp"
{
(yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
QuantifiedExpression::Some, (yyvsp[(7) - (9)].expr), (yyvsp[(9) - (9)].expr)), (yyloc), parseInfo);
@@ -5471,7 +5506,7 @@ yyreduce:
case 169:
/* Line 1269 of yacc.c. */
-#line 2799 "querytransformparser.ypp"
+#line 2834 "querytransformparser.ypp"
{
pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
VariableDeclaration::RangeVariable, (yyloc), parseInfo);
@@ -5480,14 +5515,15 @@ yyreduce:
case 170:
/* Line 1269 of yacc.c. */
-#line 2803 "querytransformparser.ypp"
+#line 2838 "querytransformparser.ypp"
{(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
break;
case 171:
/* Line 1269 of yacc.c. */
-#line 2805 "querytransformparser.ypp"
+#line 2840 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
QuantifiedExpression::Every, (yyvsp[(6) - (9)].expr), (yyvsp[(9) - (9)].expr)), (yyloc), parseInfo);
parseInfo->finalizePushedVariable();
@@ -5496,7 +5532,7 @@ yyreduce:
case 172:
/* Line 1269 of yacc.c. */
-#line 2812 "querytransformparser.ypp"
+#line 2848 "querytransformparser.ypp"
{
(yyval.expr) = pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
VariableDeclaration::RangeVariable, (yyloc), parseInfo);
@@ -5505,13 +5541,13 @@ yyreduce:
case 173:
/* Line 1269 of yacc.c. */
-#line 2816 "querytransformparser.ypp"
+#line 2852 "querytransformparser.ypp"
{(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
break;
case 174:
/* Line 1269 of yacc.c. */
-#line 2818 "querytransformparser.ypp"
+#line 2854 "querytransformparser.ypp"
{
(yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
QuantifiedExpression::Every, (yyvsp[(7) - (9)].expr), (yyvsp[(9) - (9)].expr)), (yyloc), parseInfo);
@@ -5521,7 +5557,7 @@ yyreduce:
case 176:
/* Line 1269 of yacc.c. */
-#line 2827 "querytransformparser.ypp"
+#line 2863 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (2)].expr);
}
@@ -5529,7 +5565,7 @@ yyreduce:
case 177:
/* Line 1269 of yacc.c. */
-#line 2854 "querytransformparser.ypp"
+#line 2890 "querytransformparser.ypp"
{
parseInfo->typeswitchSource.push((yyvsp[(3) - (4)].expr));
}
@@ -5537,9 +5573,9 @@ yyreduce:
case 178:
/* Line 1269 of yacc.c. */
-#line 2858 "querytransformparser.ypp"
+#line 2894 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
parseInfo->typeswitchSource.pop();
(yyval.expr) = (yyvsp[(6) - (6)].expr);
}
@@ -5547,7 +5583,7 @@ yyreduce:
case 179:
/* Line 1269 of yacc.c. */
-#line 2865 "querytransformparser.ypp"
+#line 2901 "querytransformparser.ypp"
{
if(!(yyvsp[(2) - (3)].qName).isNull())
{
@@ -5559,7 +5595,7 @@ yyreduce:
case 180:
/* Line 1269 of yacc.c. */
-#line 2873 "querytransformparser.ypp"
+#line 2909 "querytransformparser.ypp"
{
/* The variable shouldn't be in-scope for other case branches. */
if(!(yyvsp[(2) - (6)].qName).isNull())
@@ -5569,7 +5605,7 @@ yyreduce:
case 181:
/* Line 1269 of yacc.c. */
-#line 2879 "querytransformparser.ypp"
+#line 2915 "querytransformparser.ypp"
{
const Expression::Ptr instanceOf(create(new InstanceOf(parseInfo->typeswitchSource.top(), (yyvsp[(3) - (8)].sequenceType)), (yyloc), parseInfo));
(yyval.expr) = create(new IfThenClause(instanceOf, (yyvsp[(6) - (8)].expr), (yyvsp[(8) - (8)].expr)), (yyloc), parseInfo);
@@ -5578,7 +5614,7 @@ yyreduce:
case 184:
/* Line 1269 of yacc.c. */
-#line 2888 "querytransformparser.ypp"
+#line 2924 "querytransformparser.ypp"
{
(yyval.qName) = QXmlName();
}
@@ -5586,7 +5622,7 @@ yyreduce:
case 185:
/* Line 1269 of yacc.c. */
-#line 2893 "querytransformparser.ypp"
+#line 2929 "querytransformparser.ypp"
{
(yyval.qName) = (yyvsp[(2) - (3)].qName);
}
@@ -5594,7 +5630,7 @@ yyreduce:
case 186:
/* Line 1269 of yacc.c. */
-#line 2898 "querytransformparser.ypp"
+#line 2934 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(3) - (3)].expr);
}
@@ -5602,7 +5638,7 @@ yyreduce:
case 187:
/* Line 1269 of yacc.c. */
-#line 2902 "querytransformparser.ypp"
+#line 2938 "querytransformparser.ypp"
{
if(!(yyvsp[(3) - (3)].qName).isNull())
{
@@ -5615,7 +5651,7 @@ yyreduce:
case 188:
/* Line 1269 of yacc.c. */
-#line 2911 "querytransformparser.ypp"
+#line 2947 "querytransformparser.ypp"
{
if(!(yyvsp[(3) - (6)].qName).isNull())
parseInfo->finalizePushedVariable();
@@ -5625,107 +5661,119 @@ yyreduce:
case 189:
/* Line 1269 of yacc.c. */
-#line 2918 "querytransformparser.ypp"
+#line 2954 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new IfThenClause((yyvsp[(3) - (8)].expr), (yyvsp[(6) - (8)].expr), (yyvsp[(8) - (8)].expr)), (yyloc), parseInfo);
}
break;
case 191:
/* Line 1269 of yacc.c. */
-#line 2924 "querytransformparser.ypp"
+#line 2961 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new OrExpression((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 193:
/* Line 1269 of yacc.c. */
-#line 2930 "querytransformparser.ypp"
+#line 2968 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new AndExpression((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 199:
/* Line 1269 of yacc.c. */
-#line 2941 "querytransformparser.ypp"
+#line 2980 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new RangeExpression((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 201:
/* Line 1269 of yacc.c. */
-#line 2947 "querytransformparser.ypp"
+#line 2987 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new ArithmeticExpression((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.mathOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 202:
/* Line 1269 of yacc.c. */
-#line 2951 "querytransformparser.ypp"
+#line 2992 "querytransformparser.ypp"
{(yyval.enums.mathOperator) = AtomicMathematician::Add;}
break;
case 203:
/* Line 1269 of yacc.c. */
-#line 2952 "querytransformparser.ypp"
+#line 2993 "querytransformparser.ypp"
{(yyval.enums.mathOperator) = AtomicMathematician::Substract;}
break;
case 205:
/* Line 1269 of yacc.c. */
-#line 2956 "querytransformparser.ypp"
+#line 2997 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new ArithmeticExpression((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.mathOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 206:
/* Line 1269 of yacc.c. */
-#line 2960 "querytransformparser.ypp"
+#line 3002 "querytransformparser.ypp"
{(yyval.enums.mathOperator) = AtomicMathematician::Multiply;}
break;
case 207:
/* Line 1269 of yacc.c. */
-#line 2961 "querytransformparser.ypp"
+#line 3003 "querytransformparser.ypp"
{(yyval.enums.mathOperator) = AtomicMathematician::Div;}
break;
case 208:
/* Line 1269 of yacc.c. */
-#line 2962 "querytransformparser.ypp"
+#line 3004 "querytransformparser.ypp"
{(yyval.enums.mathOperator) = AtomicMathematician::IDiv;}
break;
case 209:
/* Line 1269 of yacc.c. */
-#line 2963 "querytransformparser.ypp"
+#line 3005 "querytransformparser.ypp"
{(yyval.enums.mathOperator) = AtomicMathematician::Mod;}
break;
case 211:
/* Line 1269 of yacc.c. */
-#line 2967 "querytransformparser.ypp"
+#line 3009 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10
+ | QXmlQuery::XPath20
+ | QXmlQuery::XmlSchema11IdentityConstraintField
+ | QXmlQuery::XmlSchema11IdentityConstraintSelector),
+ parseInfo, (yyloc));
(yyval.expr) = create(new CombineNodes((yyvsp[(1) - (3)].expr), CombineNodes::Union, (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 213:
/* Line 1269 of yacc.c. */
-#line 2973 "querytransformparser.ypp"
+#line 3020 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new CombineNodes((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.combinedNodeOp), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
break;
case 216:
/* Line 1269 of yacc.c. */
-#line 2981 "querytransformparser.ypp"
+#line 3029 "querytransformparser.ypp"
{
(yyval.enums.combinedNodeOp) = CombineNodes::Intersect;
}
@@ -5733,7 +5781,7 @@ yyreduce:
case 217:
/* Line 1269 of yacc.c. */
-#line 2985 "querytransformparser.ypp"
+#line 3033 "querytransformparser.ypp"
{
(yyval.enums.combinedNodeOp) = CombineNodes::Except;
}
@@ -5741,48 +5789,53 @@ yyreduce:
case 219:
/* Line 1269 of yacc.c. */
-#line 2991 "querytransformparser.ypp"
+#line 3039 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new InstanceOf((yyvsp[(1) - (4)].expr),
- SequenceType::Ptr((yyvsp[(4) - (4)].sequenceType))), (yyloc), parseInfo);
+ SequenceType::Ptr((yyvsp[(4) - (4)].sequenceType))), (yyloc), parseInfo);
}
break;
case 221:
/* Line 1269 of yacc.c. */
-#line 2998 "querytransformparser.ypp"
+#line 3047 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new TreatAs((yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].sequenceType)), (yyloc), parseInfo);
}
break;
case 223:
/* Line 1269 of yacc.c. */
-#line 3004 "querytransformparser.ypp"
+#line 3054 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new CastableAs((yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].sequenceType)), (yyloc), parseInfo);
}
break;
case 225:
/* Line 1269 of yacc.c. */
-#line 3010 "querytransformparser.ypp"
+#line 3061 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new CastAs((yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].sequenceType)), (yyloc), parseInfo);
}
break;
case 227:
/* Line 1269 of yacc.c. */
-#line 3016 "querytransformparser.ypp"
+#line 3068 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new UnaryExpression((yyvsp[(1) - (2)].enums.mathOperator), (yyvsp[(2) - (2)].expr), parseInfo->staticContext), (yyloc), parseInfo);
}
break;
case 228:
/* Line 1269 of yacc.c. */
-#line 3021 "querytransformparser.ypp"
+#line 3074 "querytransformparser.ypp"
{
(yyval.enums.mathOperator) = AtomicMathematician::Add;
}
@@ -5790,7 +5843,7 @@ yyreduce:
case 229:
/* Line 1269 of yacc.c. */
-#line 3025 "querytransformparser.ypp"
+#line 3078 "querytransformparser.ypp"
{
(yyval.enums.mathOperator) = AtomicMathematician::Substract;
}
@@ -5798,51 +5851,52 @@ yyreduce:
case 233:
/* Line 1269 of yacc.c. */
-#line 3034 "querytransformparser.ypp"
+#line 3087 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new GeneralComparison((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.valueOperator), (yyvsp[(3) - (3)].expr), parseInfo->isBackwardsCompat.top()), (yyloc), parseInfo);
}
break;
case 234:
/* Line 1269 of yacc.c. */
-#line 3038 "querytransformparser.ypp"
+#line 3092 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorEqual;}
break;
case 235:
/* Line 1269 of yacc.c. */
-#line 3039 "querytransformparser.ypp"
+#line 3093 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorNotEqual;}
break;
case 236:
/* Line 1269 of yacc.c. */
-#line 3040 "querytransformparser.ypp"
+#line 3094 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterOrEqual;}
break;
case 237:
/* Line 1269 of yacc.c. */
-#line 3041 "querytransformparser.ypp"
+#line 3095 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterThan;}
break;
case 238:
/* Line 1269 of yacc.c. */
-#line 3042 "querytransformparser.ypp"
+#line 3096 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorLessOrEqual;}
break;
case 239:
/* Line 1269 of yacc.c. */
-#line 3043 "querytransformparser.ypp"
+#line 3097 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorLessThan;}
break;
case 240:
/* Line 1269 of yacc.c. */
-#line 3046 "querytransformparser.ypp"
+#line 3100 "querytransformparser.ypp"
{
(yyval.expr) = create(new ValueComparison((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.valueOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
@@ -5850,43 +5904,43 @@ yyreduce:
case 241:
/* Line 1269 of yacc.c. */
-#line 3050 "querytransformparser.ypp"
+#line 3104 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorEqual;}
break;
case 242:
/* Line 1269 of yacc.c. */
-#line 3051 "querytransformparser.ypp"
+#line 3105 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorNotEqual;}
break;
case 243:
/* Line 1269 of yacc.c. */
-#line 3052 "querytransformparser.ypp"
+#line 3106 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterOrEqual;}
break;
case 244:
/* Line 1269 of yacc.c. */
-#line 3053 "querytransformparser.ypp"
+#line 3107 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterThan;}
break;
case 245:
/* Line 1269 of yacc.c. */
-#line 3054 "querytransformparser.ypp"
+#line 3108 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorLessOrEqual;}
break;
case 246:
/* Line 1269 of yacc.c. */
-#line 3055 "querytransformparser.ypp"
+#line 3109 "querytransformparser.ypp"
{(yyval.enums.valueOperator) = AtomicComparator::OperatorLessThan;}
break;
case 247:
/* Line 1269 of yacc.c. */
-#line 3058 "querytransformparser.ypp"
+#line 3112 "querytransformparser.ypp"
{
(yyval.expr) = create(new NodeComparison((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.nodeOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
@@ -5894,27 +5948,27 @@ yyreduce:
case 248:
/* Line 1269 of yacc.c. */
-#line 3062 "querytransformparser.ypp"
+#line 3116 "querytransformparser.ypp"
{(yyval.enums.nodeOperator) = QXmlNodeModelIndex::Is;}
break;
case 249:
/* Line 1269 of yacc.c. */
-#line 3063 "querytransformparser.ypp"
+#line 3117 "querytransformparser.ypp"
{(yyval.enums.nodeOperator) = QXmlNodeModelIndex::Precedes;}
break;
case 250:
/* Line 1269 of yacc.c. */
-#line 3064 "querytransformparser.ypp"
+#line 3118 "querytransformparser.ypp"
{(yyval.enums.nodeOperator) = QXmlNodeModelIndex::Follows;}
break;
case 251:
/* Line 1269 of yacc.c. */
-#line 3067 "querytransformparser.ypp"
+#line 3121 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Validation Feature is not supported. "
"Hence, %1-expressions may not be used.")
.arg(formatKeyword("validate")),
@@ -5927,26 +5981,27 @@ yyreduce:
case 252:
/* Line 1269 of yacc.c. */
-#line 3080 "querytransformparser.ypp"
+#line 3134 "querytransformparser.ypp"
{(yyval.enums.validationMode) = Validate::Strict;}
break;
case 253:
/* Line 1269 of yacc.c. */
-#line 3081 "querytransformparser.ypp"
+#line 3135 "querytransformparser.ypp"
{(yyval.enums.validationMode) = Validate::Strict;}
break;
case 254:
/* Line 1269 of yacc.c. */
-#line 3082 "querytransformparser.ypp"
+#line 3136 "querytransformparser.ypp"
{(yyval.enums.validationMode) = Validate::Lax;}
break;
case 255:
/* Line 1269 of yacc.c. */
-#line 3085 "querytransformparser.ypp"
+#line 3139 "querytransformparser.ypp"
{
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
/* We don't support any pragmas, so we only do the
* necessary validation and use the fallback expression. */
@@ -5964,7 +6019,7 @@ yyreduce:
case 256:
/* Line 1269 of yacc.c. */
-#line 3101 "querytransformparser.ypp"
+#line 3156 "querytransformparser.ypp"
{
(yyval.expr).reset();
}
@@ -5972,7 +6027,7 @@ yyreduce:
case 257:
/* Line 1269 of yacc.c. */
-#line 3105 "querytransformparser.ypp"
+#line 3160 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (3)].expr);
}
@@ -5980,15 +6035,15 @@ yyreduce:
case 260:
/* Line 1269 of yacc.c. */
-#line 3113 "querytransformparser.ypp"
+#line 3168 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
}
break;
case 263:
/* Line 1269 of yacc.c. */
-#line 3121 "querytransformparser.ypp"
+#line 3176 "querytransformparser.ypp"
{
/* This is "/step". That is, fn:root(self::node()) treat as document-node()/RelativePathExpr. */
(yyval.expr) = create(new Path(createRootExpression(parseInfo, (yyloc)), (yyvsp[(2) - (2)].expr)), (yyloc), parseInfo);
@@ -5997,7 +6052,7 @@ yyreduce:
case 264:
/* Line 1269 of yacc.c. */
-#line 3127 "querytransformparser.ypp"
+#line 3182 "querytransformparser.ypp"
{
(yyval.expr) = createSlashSlashPath(createRootExpression(parseInfo, (yyloc)), (yyvsp[(2) - (2)].expr), (yyloc), parseInfo);
}
@@ -6005,7 +6060,7 @@ yyreduce:
case 265:
/* Line 1269 of yacc.c. */
-#line 3131 "querytransformparser.ypp"
+#line 3186 "querytransformparser.ypp"
{
/* This is "/". That is, fn:root(self::node()) treat as document-node(). */
(yyval.expr) = createRootExpression(parseInfo, (yyloc));
@@ -6014,7 +6069,7 @@ yyreduce:
case 268:
/* Line 1269 of yacc.c. */
-#line 3141 "querytransformparser.ypp"
+#line 3196 "querytransformparser.ypp"
{
(yyval.expr) = create(new Path((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yyvsp[(2) - (3)].enums.pathKind)), (yyloc), parseInfo);
}
@@ -6022,7 +6077,7 @@ yyreduce:
case 269:
/* Line 1269 of yacc.c. */
-#line 3145 "querytransformparser.ypp"
+#line 3200 "querytransformparser.ypp"
{
const Expression::Ptr orderBy(createReturnOrderBy((yyvsp[(4) - (7)].orderSpecs), (yyvsp[(6) - (7)].expr), parseInfo->orderStability.pop(), (yyloc), parseInfo));
@@ -6035,7 +6090,7 @@ yyreduce:
case 270:
/* Line 1269 of yacc.c. */
-#line 3154 "querytransformparser.ypp"
+#line 3209 "querytransformparser.ypp"
{
(yyval.expr) = createSlashSlashPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yyloc), parseInfo);
}
@@ -6043,7 +6098,7 @@ yyreduce:
case 271:
/* Line 1269 of yacc.c. */
-#line 3159 "querytransformparser.ypp"
+#line 3214 "querytransformparser.ypp"
{
(yyval.expr) = NodeSortExpression::wrapAround((yyvsp[(1) - (1)].expr), parseInfo->staticContext);
}
@@ -6051,7 +6106,7 @@ yyreduce:
case 273:
/* Line 1269 of yacc.c. */
-#line 3164 "querytransformparser.ypp"
+#line 3219 "querytransformparser.ypp"
{
(yyval.expr) = create(new CurrentItemStore((yyvsp[(2) - (2)].expr)), (yyloc), parseInfo);
}
@@ -6059,7 +6114,7 @@ yyreduce:
case 274:
/* Line 1269 of yacc.c. */
-#line 3168 "querytransformparser.ypp"
+#line 3223 "querytransformparser.ypp"
{
const xsDouble version = (yyvsp[(1) - (1)].sval).toDouble();
@@ -6071,7 +6126,7 @@ yyreduce:
case 275:
/* Line 1269 of yacc.c. */
-#line 3176 "querytransformparser.ypp"
+#line 3231 "querytransformparser.ypp"
{
if((yyvsp[(2) - (3)].enums.Double) < 2)
(yyval.expr) = createCompatStore((yyvsp[(3) - (3)].expr), (yyloc), parseInfo);
@@ -6082,8 +6137,9 @@ yyreduce:
case 276:
/* Line 1269 of yacc.c. */
-#line 3183 "querytransformparser.ypp"
+#line 3238 "querytransformparser.ypp"
{
+ allowedIn(QXmlQuery::XSLT20, parseInfo, (yyloc));
Q_ASSERT(!(yyvsp[(2) - (5)].sval).isEmpty());
(yyval.expr) = create(new StaticBaseURIStore((yyvsp[(2) - (5)].sval), (yyvsp[(4) - (5)].expr)), (yyloc), parseInfo);
}
@@ -6091,8 +6147,9 @@ yyreduce:
case 277:
/* Line 1269 of yacc.c. */
-#line 3189 "querytransformparser.ypp"
+#line 3245 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, (yyloc));
parseInfo->resolvers.push(parseInfo->staticContext->namespaceBindings());
const NamespaceResolver::Ptr resolver(new DelegatingNamespaceResolver(parseInfo->staticContext->namespaceBindings()));
resolver->addBinding(QXmlName(parseInfo->staticContext->namePool()->allocateNamespace((yyvsp[(5) - (6)].sval)),
@@ -6104,7 +6161,7 @@ yyreduce:
case 278:
/* Line 1269 of yacc.c. */
-#line 3199 "querytransformparser.ypp"
+#line 3256 "querytransformparser.ypp"
{
parseInfo->staticContext->setNamespaceBindings(parseInfo->resolvers.pop());
(yyval.expr) = (yyvsp[(8) - (9)].expr);
@@ -6113,7 +6170,7 @@ yyreduce:
case 279:
/* Line 1269 of yacc.c. */
-#line 3204 "querytransformparser.ypp"
+#line 3261 "querytransformparser.ypp"
{
(yyval.expr) = create(new CallTemplate((yyvsp[(2) - (5)].qName), parseInfo->templateWithParams), (yyloc), parseInfo);
parseInfo->templateWithParametersHandled();
@@ -6123,7 +6180,7 @@ yyreduce:
case 280:
/* Line 1269 of yacc.c. */
-#line 3211 "querytransformparser.ypp"
+#line 3268 "querytransformparser.ypp"
{
parseInfo->startParsingWithParam();
}
@@ -6131,7 +6188,7 @@ yyreduce:
case 281:
/* Line 1269 of yacc.c. */
-#line 3215 "querytransformparser.ypp"
+#line 3272 "querytransformparser.ypp"
{
parseInfo->endParsingWithParam();
}
@@ -6139,42 +6196,42 @@ yyreduce:
case 282:
/* Line 1269 of yacc.c. */
-#line 3220 "querytransformparser.ypp"
+#line 3277 "querytransformparser.ypp"
{
}
break;
case 283:
/* Line 1269 of yacc.c. */
-#line 3223 "querytransformparser.ypp"
+#line 3280 "querytransformparser.ypp"
{
}
break;
case 284:
/* Line 1269 of yacc.c. */
-#line 3226 "querytransformparser.ypp"
+#line 3283 "querytransformparser.ypp"
{
}
break;
case 285:
/* Line 1269 of yacc.c. */
-#line 3230 "querytransformparser.ypp"
+#line 3287 "querytransformparser.ypp"
{
}
break;
case 286:
/* Line 1269 of yacc.c. */
-#line 3233 "querytransformparser.ypp"
+#line 3290 "querytransformparser.ypp"
{
}
break;
case 287:
/* Line 1269 of yacc.c. */
-#line 3237 "querytransformparser.ypp"
+#line 3294 "querytransformparser.ypp"
{
/* Note, this grammar rule is invoked for @c xsl:param @em and @c
* xsl:with-param. */
@@ -6242,7 +6299,7 @@ yyreduce:
case 288:
/* Line 1269 of yacc.c. */
-#line 3302 "querytransformparser.ypp"
+#line 3359 "querytransformparser.ypp"
{
(yyval.enums.Bool) = false;
}
@@ -6250,7 +6307,7 @@ yyreduce:
case 289:
/* Line 1269 of yacc.c. */
-#line 3306 "querytransformparser.ypp"
+#line 3363 "querytransformparser.ypp"
{
(yyval.enums.Bool) = true;
}
@@ -6258,7 +6315,7 @@ yyreduce:
case 290:
/* Line 1269 of yacc.c. */
-#line 3311 "querytransformparser.ypp"
+#line 3368 "querytransformparser.ypp"
{
(yyval.expr) = Expression::Ptr();
}
@@ -6266,7 +6323,7 @@ yyreduce:
case 291:
/* Line 1269 of yacc.c. */
-#line 3315 "querytransformparser.ypp"
+#line 3372 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (2)].expr);
}
@@ -6274,7 +6331,7 @@ yyreduce:
case 292:
/* Line 1269 of yacc.c. */
-#line 3324 "querytransformparser.ypp"
+#line 3381 "querytransformparser.ypp"
{
(yyval.enums.pathKind) = Path::RegularPath;
}
@@ -6282,7 +6339,7 @@ yyreduce:
case 293:
/* Line 1269 of yacc.c. */
-#line 3328 "querytransformparser.ypp"
+#line 3385 "querytransformparser.ypp"
{
(yyval.enums.pathKind) = Path::XSLTForEach;
}
@@ -6290,7 +6347,7 @@ yyreduce:
case 294:
/* Line 1269 of yacc.c. */
-#line 3332 "querytransformparser.ypp"
+#line 3389 "querytransformparser.ypp"
{
(yyval.enums.pathKind) = Path::ForApplyTemplate;
}
@@ -6298,7 +6355,7 @@ yyreduce:
case 296:
/* Line 1269 of yacc.c. */
-#line 3338 "querytransformparser.ypp"
+#line 3395 "querytransformparser.ypp"
{
(yyval.expr) = create(GenericPredicate::create((yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr), parseInfo->staticContext, fromYYLTYPE((yyloc), parseInfo)), (yyloc), parseInfo);
}
@@ -6306,7 +6363,7 @@ yyreduce:
case 299:
/* Line 1269 of yacc.c. */
-#line 3346 "querytransformparser.ypp"
+#line 3403 "querytransformparser.ypp"
{
if((yyvsp[(1) - (1)].enums.axis) == QXmlNodeModelIndex::AxisAttribute)
parseInfo->nodeTestSource = BuiltinTypes::attribute;
@@ -6315,7 +6372,7 @@ yyreduce:
case 300:
/* Line 1269 of yacc.c. */
-#line 3351 "querytransformparser.ypp"
+#line 3408 "querytransformparser.ypp"
{
if((yyvsp[(3) - (3)].itemType))
{
@@ -6344,7 +6401,7 @@ yyreduce:
case 304:
/* Line 1269 of yacc.c. */
-#line 3381 "querytransformparser.ypp"
+#line 3438 "querytransformparser.ypp"
{
if((yyvsp[(1) - (2)].enums.axis) == QXmlNodeModelIndex::AxisNamespace)
{
@@ -6356,84 +6413,114 @@ yyreduce:
}
else
(yyval.enums.axis) = (yyvsp[(1) - (2)].enums.axis);
+
+ switch((yyvsp[(1) - (2)].enums.axis))
+ {
+ case QXmlNodeModelIndex::AxisAttribute:
+ {
+ allowedIn(QueryLanguages( QXmlQuery::XPath20
+ | QXmlQuery::XQuery10
+ | QXmlQuery::XmlSchema11IdentityConstraintField
+ | QXmlQuery::XSLT20),
+ parseInfo, (yyloc));
+ break;
+ }
+ case QXmlNodeModelIndex::AxisChild:
+ {
+ allowedIn(QueryLanguages( QXmlQuery::XPath20
+ | QXmlQuery::XQuery10
+ | QXmlQuery::XmlSchema11IdentityConstraintField
+ | QXmlQuery::XmlSchema11IdentityConstraintSelector
+ | QXmlQuery::XSLT20),
+ parseInfo, (yyloc));
+ break;
+ }
+ default:
+ {
+ allowedIn(QueryLanguages( QXmlQuery::XPath20
+ | QXmlQuery::XQuery10
+ | QXmlQuery::XSLT20),
+ parseInfo, (yyloc));
+ }
+ }
}
break;
case 305:
/* Line 1269 of yacc.c. */
-#line 3394 "querytransformparser.ypp"
+#line 3481 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisAncestorOrSelf ;}
break;
case 306:
/* Line 1269 of yacc.c. */
-#line 3395 "querytransformparser.ypp"
+#line 3482 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisAncestor ;}
break;
case 307:
/* Line 1269 of yacc.c. */
-#line 3396 "querytransformparser.ypp"
+#line 3483 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisAttribute ;}
break;
case 308:
/* Line 1269 of yacc.c. */
-#line 3397 "querytransformparser.ypp"
+#line 3484 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisChild ;}
break;
case 309:
/* Line 1269 of yacc.c. */
-#line 3398 "querytransformparser.ypp"
+#line 3485 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisDescendantOrSelf;}
break;
case 310:
/* Line 1269 of yacc.c. */
-#line 3399 "querytransformparser.ypp"
+#line 3486 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisDescendant ;}
break;
case 311:
/* Line 1269 of yacc.c. */
-#line 3400 "querytransformparser.ypp"
+#line 3487 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisFollowing ;}
break;
case 312:
/* Line 1269 of yacc.c. */
-#line 3401 "querytransformparser.ypp"
+#line 3488 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisPreceding ;}
break;
case 313:
/* Line 1269 of yacc.c. */
-#line 3402 "querytransformparser.ypp"
+#line 3489 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisFollowingSibling;}
break;
case 314:
/* Line 1269 of yacc.c. */
-#line 3403 "querytransformparser.ypp"
+#line 3490 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisPrecedingSibling;}
break;
case 315:
/* Line 1269 of yacc.c. */
-#line 3404 "querytransformparser.ypp"
+#line 3491 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisParent ;}
break;
case 316:
/* Line 1269 of yacc.c. */
-#line 3405 "querytransformparser.ypp"
+#line 3492 "querytransformparser.ypp"
{(yyval.enums.axis) = QXmlNodeModelIndex::AxisSelf ;}
break;
case 317:
/* Line 1269 of yacc.c. */
-#line 3408 "querytransformparser.ypp"
+#line 3495 "querytransformparser.ypp"
{
parseInfo->nodeTestSource = BuiltinTypes::attribute;
}
@@ -6441,8 +6528,9 @@ yyreduce:
case 318:
/* Line 1269 of yacc.c. */
-#line 3412 "querytransformparser.ypp"
+#line 3499 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20 | QXmlQuery::XmlSchema11IdentityConstraintField), parseInfo, (yyloc));
(yyval.expr) = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, (yyvsp[(3) - (3)].itemType)), (yyloc), parseInfo);
parseInfo->restoreNodeTestSource();
@@ -6451,7 +6539,7 @@ yyreduce:
case 319:
/* Line 1269 of yacc.c. */
-#line 3418 "querytransformparser.ypp"
+#line 3506 "querytransformparser.ypp"
{
ItemType::Ptr nodeTest;
@@ -6466,7 +6554,7 @@ yyreduce:
case 320:
/* Line 1269 of yacc.c. */
-#line 3429 "querytransformparser.ypp"
+#line 3517 "querytransformparser.ypp"
{
(yyval.expr) = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, (yyvsp[(1) - (1)].itemType)), (yyloc), parseInfo);
}
@@ -6474,15 +6562,23 @@ yyreduce:
case 322:
/* Line 1269 of yacc.c. */
-#line 3436 "querytransformparser.ypp"
+#line 3524 "querytransformparser.ypp"
{
(yyval.expr) = create(new AxisStep(QXmlNodeModelIndex::AxisParent, BuiltinTypes::node), (yyloc), parseInfo);
}
break;
+ case 324:
+/* Line 1269 of yacc.c. */
+#line 3530 "querytransformparser.ypp"
+ {
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
+ }
+ break;
+
case 325:
/* Line 1269 of yacc.c. */
-#line 3444 "querytransformparser.ypp"
+#line 3535 "querytransformparser.ypp"
{
(yyval.itemType) = QNameTest::create(parseInfo->nodeTestSource, (yyvsp[(1) - (1)].qName));
}
@@ -6490,7 +6586,7 @@ yyreduce:
case 327:
/* Line 1269 of yacc.c. */
-#line 3450 "querytransformparser.ypp"
+#line 3541 "querytransformparser.ypp"
{
(yyval.itemType) = parseInfo->nodeTestSource;
}
@@ -6498,7 +6594,7 @@ yyreduce:
case 328:
/* Line 1269 of yacc.c. */
-#line 3454 "querytransformparser.ypp"
+#line 3545 "querytransformparser.ypp"
{
const NamePool::Ptr np(parseInfo->staticContext->namePool());
const ReflectYYLTYPE ryy((yyloc), parseInfo);
@@ -6511,8 +6607,9 @@ yyreduce:
case 329:
/* Line 1269 of yacc.c. */
-#line 3463 "querytransformparser.ypp"
+#line 3554 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
const QXmlName::LocalNameCode c = parseInfo->staticContext->namePool()->allocateLocalName((yyvsp[(1) - (1)].sval));
(yyval.itemType) = LocalNameTest::create(parseInfo->nodeTestSource, c);
}
@@ -6520,15 +6617,16 @@ yyreduce:
case 331:
/* Line 1269 of yacc.c. */
-#line 3470 "querytransformparser.ypp"
+#line 3562 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(GenericPredicate::create((yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr), parseInfo->staticContext, fromYYLTYPE((yylsp[(4) - (4)]), parseInfo)), (yyloc), parseInfo);
}
break;
case 339:
/* Line 1269 of yacc.c. */
-#line 3482 "querytransformparser.ypp"
+#line 3575 "querytransformparser.ypp"
{
(yyval.expr) = create(new ApplyTemplate(parseInfo->modeFor((yyvsp[(2) - (5)].qName)),
parseInfo->templateWithParams,
@@ -6541,7 +6639,7 @@ yyreduce:
case 341:
/* Line 1269 of yacc.c. */
-#line 3493 "querytransformparser.ypp"
+#line 3586 "querytransformparser.ypp"
{
(yyval.expr) = create(new Literal(AtomicString::fromValue((yyvsp[(1) - (1)].sval))), (yyloc), parseInfo);
}
@@ -6549,31 +6647,34 @@ yyreduce:
case 342:
/* Line 1269 of yacc.c. */
-#line 3498 "querytransformparser.ypp"
+#line 3591 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = createNumericLiteral<Double>((yyvsp[(1) - (1)].sval), (yyloc), parseInfo);
}
break;
case 343:
/* Line 1269 of yacc.c. */
-#line 3502 "querytransformparser.ypp"
+#line 3596 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = createNumericLiteral<Numeric>((yyvsp[(1) - (1)].sval), (yyloc), parseInfo);
}
break;
case 344:
/* Line 1269 of yacc.c. */
-#line 3507 "querytransformparser.ypp"
+#line 3602 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = resolveVariable((yyvsp[(2) - (2)].qName), (yyloc), parseInfo, false);
}
break;
case 345:
/* Line 1269 of yacc.c. */
-#line 3512 "querytransformparser.ypp"
+#line 3608 "querytransformparser.ypp"
{
/* See: http://www.w3.org/TR/xpath20/#id-variables */
(yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(QString(), (yyvsp[(1) - (1)].sval));
@@ -6582,7 +6683,7 @@ yyreduce:
case 346:
/* Line 1269 of yacc.c. */
-#line 3517 "querytransformparser.ypp"
+#line 3613 "querytransformparser.ypp"
{
(yyval.qName) = (yyvsp[(1) - (1)].qName);
}
@@ -6590,23 +6691,25 @@ yyreduce:
case 347:
/* Line 1269 of yacc.c. */
-#line 3522 "querytransformparser.ypp"
+#line 3618 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = (yyvsp[(2) - (3)].expr);
}
break;
case 348:
/* Line 1269 of yacc.c. */
-#line 3526 "querytransformparser.ypp"
+#line 3623 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
(yyval.expr) = create(new EmptySequence, (yyloc), parseInfo);
}
break;
case 349:
/* Line 1269 of yacc.c. */
-#line 3531 "querytransformparser.ypp"
+#line 3629 "querytransformparser.ypp"
{
(yyval.expr) = create(new ContextItem(), (yyloc), parseInfo);
}
@@ -6614,7 +6717,7 @@ yyreduce:
case 350:
/* Line 1269 of yacc.c. */
-#line 3536 "querytransformparser.ypp"
+#line 3634 "querytransformparser.ypp"
{
(yyval.expr) = (yyvsp[(2) - (2)].expr);
}
@@ -6622,8 +6725,9 @@ yyreduce:
case 351:
/* Line 1269 of yacc.c. */
-#line 3541 "querytransformparser.ypp"
+#line 3639 "querytransformparser.ypp"
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
if(XPathHelper::isReservedNamespace((yyvsp[(1) - (4)].qName).namespaceURI()) || (yyvsp[(1) - (4)].qName).namespaceURI() == StandardNamespaces::InternalXSLT)
{ /* We got a call to a builtin function. */
const ReflectYYLTYPE ryy((yyloc), parseInfo);
@@ -6653,7 +6757,7 @@ yyreduce:
case 352:
/* Line 1269 of yacc.c. */
-#line 3569 "querytransformparser.ypp"
+#line 3668 "querytransformparser.ypp"
{
(yyval.expressionList) = Expression::List();
}
@@ -6661,7 +6765,7 @@ yyreduce:
case 353:
/* Line 1269 of yacc.c. */
-#line 3574 "querytransformparser.ypp"
+#line 3673 "querytransformparser.ypp"
{
Expression::List list;
list.append((yyvsp[(1) - (1)].expr));
@@ -6671,15 +6775,15 @@ yyreduce:
case 355:
/* Line 1269 of yacc.c. */
-#line 3583 "querytransformparser.ypp"
+#line 3682 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
}
break;
case 360:
/* Line 1269 of yacc.c. */
-#line 3624 "querytransformparser.ypp"
+#line 3726 "querytransformparser.ypp"
{
(yyval.enums.tokenizerPosition) = parseInfo->tokenizer->commenceScanOnly();
parseInfo->scanOnlyStack.push(true);
@@ -6688,7 +6792,7 @@ yyreduce:
case 361:
/* Line 1269 of yacc.c. */
-#line 3633 "querytransformparser.ypp"
+#line 3735 "querytransformparser.ypp"
{
++parseInfo->elementConstructorDepth;
Expression::List constructors;
@@ -6836,7 +6940,7 @@ yyreduce:
case 362:
/* Line 1269 of yacc.c. */
-#line 3779 "querytransformparser.ypp"
+#line 3881 "querytransformparser.ypp"
{
/* We add the content constructor after the attribute constructors. This might result
* in nested ExpressionSequences, but it will be optimized away later on. */
@@ -6935,7 +7039,7 @@ yyreduce:
case 363:
/* Line 1269 of yacc.c. */
-#line 3875 "querytransformparser.ypp"
+#line 3977 "querytransformparser.ypp"
{
(yyval.expr) = create(new EmptySequence(), (yyloc), parseInfo);
}
@@ -6943,7 +7047,7 @@ yyreduce:
case 364:
/* Line 1269 of yacc.c. */
-#line 3879 "querytransformparser.ypp"
+#line 3981 "querytransformparser.ypp"
{
if(!(yyvsp[(4) - (5)].qName).isLexicallyEqual(parseInfo->tagStack.top()))
{
@@ -6965,7 +7069,7 @@ yyreduce:
case 365:
/* Line 1269 of yacc.c. */
-#line 3898 "querytransformparser.ypp"
+#line 4000 "querytransformparser.ypp"
{
(yyval.attributeHolders) = AttributeHolderVector();
}
@@ -6973,7 +7077,7 @@ yyreduce:
case 366:
/* Line 1269 of yacc.c. */
-#line 3902 "querytransformparser.ypp"
+#line 4004 "querytransformparser.ypp"
{
(yyvsp[(1) - (2)].attributeHolders).append((yyvsp[(2) - (2)].attributeHolder));
(yyval.attributeHolders) = (yyvsp[(1) - (2)].attributeHolders);
@@ -6982,7 +7086,7 @@ yyreduce:
case 367:
/* Line 1269 of yacc.c. */
-#line 3908 "querytransformparser.ypp"
+#line 4010 "querytransformparser.ypp"
{
(yyval.attributeHolder) = qMakePair((yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].expr));
}
@@ -6990,7 +7094,7 @@ yyreduce:
case 368:
/* Line 1269 of yacc.c. */
-#line 3913 "querytransformparser.ypp"
+#line 4015 "querytransformparser.ypp"
{
(yyval.expr) = createDirAttributeValue((yyvsp[(2) - (3)].expressionList), parseInfo, (yyloc));
}
@@ -6998,7 +7102,7 @@ yyreduce:
case 369:
/* Line 1269 of yacc.c. */
-#line 3918 "querytransformparser.ypp"
+#line 4020 "querytransformparser.ypp"
{
(yyval.expr) = createDirAttributeValue((yyvsp[(2) - (3)].expressionList), parseInfo, (yyloc));
}
@@ -7006,7 +7110,7 @@ yyreduce:
case 370:
/* Line 1269 of yacc.c. */
-#line 3923 "querytransformparser.ypp"
+#line 4025 "querytransformparser.ypp"
{
(yyval.expressionList) = Expression::List();
}
@@ -7014,7 +7118,7 @@ yyreduce:
case 371:
/* Line 1269 of yacc.c. */
-#line 3927 "querytransformparser.ypp"
+#line 4029 "querytransformparser.ypp"
{
Expression::Ptr content((yyvsp[(1) - (2)].expr));
@@ -7028,7 +7132,7 @@ yyreduce:
case 372:
/* Line 1269 of yacc.c. */
-#line 3937 "querytransformparser.ypp"
+#line 4039 "querytransformparser.ypp"
{
(yyvsp[(2) - (2)].expressionList).prepend(create(new Literal(AtomicString::fromValue((yyvsp[(1) - (2)].sval))), (yyloc), parseInfo));
(yyval.expressionList) = (yyvsp[(2) - (2)].expressionList);
@@ -7037,7 +7141,7 @@ yyreduce:
case 373:
/* Line 1269 of yacc.c. */
-#line 3943 "querytransformparser.ypp"
+#line 4045 "querytransformparser.ypp"
{
(yyval.expressionList) = Expression::List();
parseInfo->isPreviousEnclosedExpr = false;
@@ -7046,7 +7150,7 @@ yyreduce:
case 374:
/* Line 1269 of yacc.c. */
-#line 3948 "querytransformparser.ypp"
+#line 4050 "querytransformparser.ypp"
{
(yyvsp[(1) - (2)].expressionList).append((yyvsp[(2) - (2)].expr));
(yyval.expressionList) = (yyvsp[(1) - (2)].expressionList);
@@ -7056,7 +7160,7 @@ yyreduce:
case 375:
/* Line 1269 of yacc.c. */
-#line 3954 "querytransformparser.ypp"
+#line 4056 "querytransformparser.ypp"
{
if(parseInfo->staticContext->boundarySpacePolicy() == StaticContext::BSPStrip &&
XPathHelper::isWhitespaceOnly((yyvsp[(2) - (2)].sval)))
@@ -7074,7 +7178,7 @@ yyreduce:
case 376:
/* Line 1269 of yacc.c. */
-#line 3968 "querytransformparser.ypp"
+#line 4070 "querytransformparser.ypp"
{
(yyvsp[(1) - (2)].expressionList).append(create(new TextNodeConstructor(create(new Literal(AtomicString::fromValue((yyvsp[(2) - (2)].sval))), (yyloc), parseInfo)), (yyloc), parseInfo));
(yyval.expressionList) = (yyvsp[(1) - (2)].expressionList);
@@ -7084,7 +7188,7 @@ yyreduce:
case 377:
/* Line 1269 of yacc.c. */
-#line 3974 "querytransformparser.ypp"
+#line 4076 "querytransformparser.ypp"
{
/* We insert a text node constructor that send an empty text node between
* the two enclosed expressions, in order to ensure that no space is inserted.
@@ -7104,7 +7208,7 @@ yyreduce:
case 378:
/* Line 1269 of yacc.c. */
-#line 3991 "querytransformparser.ypp"
+#line 4093 "querytransformparser.ypp"
{
(yyval.expr) = create(new CommentConstructor(create(new Literal(AtomicString::fromValue((yyvsp[(2) - (2)].sval))), (yyloc), parseInfo)), (yyloc), parseInfo);
}
@@ -7112,7 +7216,7 @@ yyreduce:
case 379:
/* Line 1269 of yacc.c. */
-#line 3996 "querytransformparser.ypp"
+#line 4098 "querytransformparser.ypp"
{
const ReflectYYLTYPE ryy((yyloc), parseInfo);
NCNameConstructor::validateTargetName<StaticContext::Ptr,
@@ -7128,9 +7232,9 @@ yyreduce:
case 387:
/* Line 1269 of yacc.c. */
-#line 4017 "querytransformparser.ypp"
+#line 4119 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
(yyval.expr) = create(new DocumentConstructor((yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
@@ -7138,7 +7242,7 @@ yyreduce:
case 388:
/* Line 1269 of yacc.c. */
-#line 4024 "querytransformparser.ypp"
+#line 4126 "querytransformparser.ypp"
{
/* This value is incremented before the action below is executed. */
++parseInfo->elementConstructorDepth;
@@ -7147,10 +7251,10 @@ yyreduce:
case 389:
/* Line 1269 of yacc.c. */
-#line 4029 "querytransformparser.ypp"
+#line 4131 "querytransformparser.ypp"
{
Q_ASSERT(5);
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (5)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (5)].enums.Bool));
Expression::Ptr effExpr;
@@ -7184,7 +7288,7 @@ yyreduce:
case 390:
/* Line 1269 of yacc.c. */
-#line 4063 "querytransformparser.ypp"
+#line 4165 "querytransformparser.ypp"
{
(yyval.enums.Bool) = false;
}
@@ -7192,7 +7296,7 @@ yyreduce:
case 391:
/* Line 1269 of yacc.c. */
-#line 4067 "querytransformparser.ypp"
+#line 4169 "querytransformparser.ypp"
{
(yyval.enums.Bool) = true;
}
@@ -7200,9 +7304,9 @@ yyreduce:
case 392:
/* Line 1269 of yacc.c. */
-#line 4075 "querytransformparser.ypp"
+#line 4177 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (4)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (4)].enums.Bool));
const Expression::Ptr name(create(new AttributeNameValidator((yyvsp[(3) - (4)].expr)), (yyloc), parseInfo));
@@ -7215,7 +7319,7 @@ yyreduce:
case 393:
/* Line 1269 of yacc.c. */
-#line 4087 "querytransformparser.ypp"
+#line 4189 "querytransformparser.ypp"
{
(yyval.expr) = create(new TextNodeConstructor(createSimpleContent((yyvsp[(3) - (3)].expr), (yyloc), parseInfo)), (yyloc), parseInfo);
}
@@ -7223,9 +7327,9 @@ yyreduce:
case 394:
/* Line 1269 of yacc.c. */
-#line 4092 "querytransformparser.ypp"
+#line 4194 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
(yyval.expr) = create(new CommentConstructor(createSimpleContent((yyvsp[(3) - (3)].expr), (yyloc), parseInfo)), (yyloc), parseInfo);
}
@@ -7233,9 +7337,9 @@ yyreduce:
case 395:
/* Line 1269 of yacc.c. */
-#line 4099 "querytransformparser.ypp"
+#line 4201 "querytransformparser.ypp"
{
- disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (3)].expr));
+ allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (3)].expr));
if((yyvsp[(3) - (3)].expr))
{
@@ -7248,7 +7352,7 @@ yyreduce:
case 396:
/* Line 1269 of yacc.c. */
-#line 4110 "querytransformparser.ypp"
+#line 4212 "querytransformparser.ypp"
{
parseInfo->nodeTestSource = BuiltinTypes::attribute;
}
@@ -7256,7 +7360,7 @@ yyreduce:
case 397:
/* Line 1269 of yacc.c. */
-#line 4114 "querytransformparser.ypp"
+#line 4216 "querytransformparser.ypp"
{
parseInfo->restoreNodeTestSource();
}
@@ -7264,7 +7368,7 @@ yyreduce:
case 398:
/* Line 1269 of yacc.c. */
-#line 4117 "querytransformparser.ypp"
+#line 4219 "querytransformparser.ypp"
{
(yyval.expr) = create(new Literal(toItem(QNameValue::fromValue(parseInfo->staticContext->namePool(), (yyvsp[(2) - (3)].qName)))), (yyloc), parseInfo);
}
@@ -7272,7 +7376,7 @@ yyreduce:
case 400:
/* Line 1269 of yacc.c. */
-#line 4123 "querytransformparser.ypp"
+#line 4225 "querytransformparser.ypp"
{
(yyval.expr) = create(new Literal(toItem(QNameValue::fromValue(parseInfo->staticContext->namePool(), (yyvsp[(1) - (1)].qName)))), (yyloc), parseInfo);
}
@@ -7280,7 +7384,7 @@ yyreduce:
case 402:
/* Line 1269 of yacc.c. */
-#line 4129 "querytransformparser.ypp"
+#line 4231 "querytransformparser.ypp"
{
if(BuiltinTypes::xsQName->xdtTypeMatches((yyvsp[(1) - (1)].expr)->staticType()->itemType()))
(yyval.expr) = (yyvsp[(1) - (1)].expr);
@@ -7295,7 +7399,7 @@ yyreduce:
case 403:
/* Line 1269 of yacc.c. */
-#line 4144 "querytransformparser.ypp"
+#line 4246 "querytransformparser.ypp"
{
(yyval.expr) = create(new NCNameConstructor(create(new Literal(AtomicString::fromValue((yyvsp[(1) - (1)].sval))), (yyloc), parseInfo)), (yyloc), parseInfo);
}
@@ -7303,7 +7407,7 @@ yyreduce:
case 404:
/* Line 1269 of yacc.c. */
-#line 4148 "querytransformparser.ypp"
+#line 4250 "querytransformparser.ypp"
{
(yyval.expr) = create(new NCNameConstructor((yyvsp[(1) - (1)].expr)), (yyloc), parseInfo);
}
@@ -7311,7 +7415,7 @@ yyreduce:
case 405:
/* Line 1269 of yacc.c. */
-#line 4157 "querytransformparser.ypp"
+#line 4259 "querytransformparser.ypp"
{
(yyval.expr) = create(new ComputedNamespaceConstructor((yyvsp[(2) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
}
@@ -7319,7 +7423,7 @@ yyreduce:
case 406:
/* Line 1269 of yacc.c. */
-#line 4162 "querytransformparser.ypp"
+#line 4264 "querytransformparser.ypp"
{
(yyval.sequenceType) = makeGenericSequenceType((yyvsp[(1) - (1)].itemType), Cardinality::exactlyOne());
}
@@ -7327,7 +7431,7 @@ yyreduce:
case 407:
/* Line 1269 of yacc.c. */
-#line 4166 "querytransformparser.ypp"
+#line 4268 "querytransformparser.ypp"
{
(yyval.sequenceType) = makeGenericSequenceType((yyvsp[(1) - (2)].itemType), Cardinality::zeroOrOne());
}
@@ -7335,7 +7439,7 @@ yyreduce:
case 408:
/* Line 1269 of yacc.c. */
-#line 4171 "querytransformparser.ypp"
+#line 4273 "querytransformparser.ypp"
{
(yyval.sequenceType) = CommonSequenceTypes::ZeroOrMoreItems;
}
@@ -7343,7 +7447,7 @@ yyreduce:
case 409:
/* Line 1269 of yacc.c. */
-#line 4175 "querytransformparser.ypp"
+#line 4277 "querytransformparser.ypp"
{
(yyval.sequenceType) = (yyvsp[(2) - (2)].sequenceType);
}
@@ -7351,7 +7455,7 @@ yyreduce:
case 410:
/* Line 1269 of yacc.c. */
-#line 4180 "querytransformparser.ypp"
+#line 4282 "querytransformparser.ypp"
{
(yyval.sequenceType) = makeGenericSequenceType((yyvsp[(1) - (2)].itemType), (yyvsp[(2) - (2)].cardinality));
}
@@ -7359,7 +7463,7 @@ yyreduce:
case 411:
/* Line 1269 of yacc.c. */
-#line 4185 "querytransformparser.ypp"
+#line 4287 "querytransformparser.ypp"
{
(yyval.sequenceType) = CommonSequenceTypes::Empty;
}
@@ -7367,31 +7471,31 @@ yyreduce:
case 412:
/* Line 1269 of yacc.c. */
-#line 4189 "querytransformparser.ypp"
+#line 4291 "querytransformparser.ypp"
{(yyval.cardinality) = Cardinality::exactlyOne();}
break;
case 413:
/* Line 1269 of yacc.c. */
-#line 4190 "querytransformparser.ypp"
+#line 4292 "querytransformparser.ypp"
{(yyval.cardinality) = Cardinality::oneOrMore();}
break;
case 414:
/* Line 1269 of yacc.c. */
-#line 4191 "querytransformparser.ypp"
+#line 4293 "querytransformparser.ypp"
{(yyval.cardinality) = Cardinality::zeroOrMore();}
break;
case 415:
/* Line 1269 of yacc.c. */
-#line 4192 "querytransformparser.ypp"
+#line 4294 "querytransformparser.ypp"
{(yyval.cardinality) = Cardinality::zeroOrOne();}
break;
case 419:
/* Line 1269 of yacc.c. */
-#line 4198 "querytransformparser.ypp"
+#line 4300 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::item;
}
@@ -7399,7 +7503,7 @@ yyreduce:
case 420:
/* Line 1269 of yacc.c. */
-#line 4203 "querytransformparser.ypp"
+#line 4305 "querytransformparser.ypp"
{
const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(1) - (1)].qName)));
@@ -7435,7 +7539,7 @@ yyreduce:
case 428:
/* Line 1269 of yacc.c. */
-#line 4247 "querytransformparser.ypp"
+#line 4349 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::node;
}
@@ -7443,7 +7547,7 @@ yyreduce:
case 429:
/* Line 1269 of yacc.c. */
-#line 4252 "querytransformparser.ypp"
+#line 4354 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::document;
}
@@ -7451,7 +7555,7 @@ yyreduce:
case 430:
/* Line 1269 of yacc.c. */
-#line 4257 "querytransformparser.ypp"
+#line 4359 "querytransformparser.ypp"
{
// TODO support for document element testing
(yyval.itemType) = BuiltinTypes::document;
@@ -7460,7 +7564,7 @@ yyreduce:
case 433:
/* Line 1269 of yacc.c. */
-#line 4266 "querytransformparser.ypp"
+#line 4368 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::text;
}
@@ -7468,7 +7572,7 @@ yyreduce:
case 434:
/* Line 1269 of yacc.c. */
-#line 4271 "querytransformparser.ypp"
+#line 4373 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::comment;
}
@@ -7476,7 +7580,7 @@ yyreduce:
case 435:
/* Line 1269 of yacc.c. */
-#line 4276 "querytransformparser.ypp"
+#line 4378 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::pi;
}
@@ -7484,7 +7588,7 @@ yyreduce:
case 436:
/* Line 1269 of yacc.c. */
-#line 4281 "querytransformparser.ypp"
+#line 4383 "querytransformparser.ypp"
{
(yyval.itemType) = LocalNameTest::create(BuiltinTypes::pi, parseInfo->staticContext->namePool()->allocateLocalName((yyvsp[(3) - (4)].sval)));
}
@@ -7492,7 +7596,7 @@ yyreduce:
case 437:
/* Line 1269 of yacc.c. */
-#line 4286 "querytransformparser.ypp"
+#line 4388 "querytransformparser.ypp"
{
if(QXmlUtils::isNCName((yyvsp[(3) - (4)].sval)))
{
@@ -7511,7 +7615,7 @@ yyreduce:
case 440:
/* Line 1269 of yacc.c. */
-#line 4305 "querytransformparser.ypp"
+#line 4407 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::attribute;
}
@@ -7519,7 +7623,7 @@ yyreduce:
case 441:
/* Line 1269 of yacc.c. */
-#line 4310 "querytransformparser.ypp"
+#line 4412 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::attribute;
}
@@ -7527,7 +7631,7 @@ yyreduce:
case 442:
/* Line 1269 of yacc.c. */
-#line 4315 "querytransformparser.ypp"
+#line 4417 "querytransformparser.ypp"
{
(yyval.itemType) = QNameTest::create(BuiltinTypes::attribute, (yyvsp[(3) - (4)].qName));
}
@@ -7535,7 +7639,7 @@ yyreduce:
case 443:
/* Line 1269 of yacc.c. */
-#line 4319 "querytransformparser.ypp"
+#line 4421 "querytransformparser.ypp"
{
const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (6)].qName)));
@@ -7551,7 +7655,7 @@ yyreduce:
case 444:
/* Line 1269 of yacc.c. */
-#line 4331 "querytransformparser.ypp"
+#line 4433 "querytransformparser.ypp"
{
const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (6)].qName)));
@@ -7567,7 +7671,7 @@ yyreduce:
case 445:
/* Line 1269 of yacc.c. */
-#line 4344 "querytransformparser.ypp"
+#line 4446 "querytransformparser.ypp"
{
parseInfo->staticContext->error(QtXmlPatterns::tr("%1 is not in the in-scope attribute "
"declarations. Note that the schema import "
@@ -7580,7 +7684,7 @@ yyreduce:
case 446:
/* Line 1269 of yacc.c. */
-#line 4354 "querytransformparser.ypp"
+#line 4456 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::element;
}
@@ -7588,7 +7692,7 @@ yyreduce:
case 447:
/* Line 1269 of yacc.c. */
-#line 4359 "querytransformparser.ypp"
+#line 4461 "querytransformparser.ypp"
{
(yyval.itemType) = BuiltinTypes::element;
}
@@ -7596,7 +7700,7 @@ yyreduce:
case 448:
/* Line 1269 of yacc.c. */
-#line 4364 "querytransformparser.ypp"
+#line 4466 "querytransformparser.ypp"
{
(yyval.itemType) = QNameTest::create(BuiltinTypes::element, (yyvsp[(3) - (4)].qName));
}
@@ -7604,7 +7708,7 @@ yyreduce:
case 449:
/* Line 1269 of yacc.c. */
-#line 4369 "querytransformparser.ypp"
+#line 4471 "querytransformparser.ypp"
{
const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (7)].qName)));
@@ -7621,7 +7725,7 @@ yyreduce:
case 450:
/* Line 1269 of yacc.c. */
-#line 4383 "querytransformparser.ypp"
+#line 4485 "querytransformparser.ypp"
{
const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (7)].qName)));
@@ -7638,7 +7742,7 @@ yyreduce:
case 453:
/* Line 1269 of yacc.c. */
-#line 4400 "querytransformparser.ypp"
+#line 4502 "querytransformparser.ypp"
{
parseInfo->staticContext->error(QtXmlPatterns::tr("%1 is not in the in-scope attribute "
"declarations. Note that the schema import "
@@ -7651,7 +7755,7 @@ yyreduce:
case 455:
/* Line 1269 of yacc.c. */
-#line 4412 "querytransformparser.ypp"
+#line 4514 "querytransformparser.ypp"
{
(yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(StandardNamespaces::empty, (yyvsp[(1) - (1)].sval));
}
@@ -7659,7 +7763,7 @@ yyreduce:
case 457:
/* Line 1269 of yacc.c. */
-#line 4424 "querytransformparser.ypp"
+#line 4526 "querytransformparser.ypp"
{
if(parseInfo->nodeTestSource == BuiltinTypes::element)
(yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(parseInfo->staticContext->namespaceBindings()->lookupNamespaceURI(StandardPrefixes::empty), (yyvsp[(1) - (1)].sval));
@@ -7670,7 +7774,7 @@ yyreduce:
case 462:
/* Line 1269 of yacc.c. */
-#line 4438 "querytransformparser.ypp"
+#line 4540 "querytransformparser.ypp"
{
(yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(parseInfo->staticContext->defaultFunctionNamespace(), (yyvsp[(1) - (1)].sval));
}
@@ -7678,7 +7782,7 @@ yyreduce:
case 463:
/* Line 1269 of yacc.c. */
-#line 4442 "querytransformparser.ypp"
+#line 4544 "querytransformparser.ypp"
{
(yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(StandardNamespaces::InternalXSLT, (yyvsp[(2) - (2)].sval));
}
@@ -7686,7 +7790,7 @@ yyreduce:
case 466:
/* Line 1269 of yacc.c. */
-#line 4450 "querytransformparser.ypp"
+#line 4552 "querytransformparser.ypp"
{
parseInfo->staticContext->error(QtXmlPatterns::tr("The name of an extension expression must be in "
"a namespace."),
@@ -7694,9 +7798,25 @@ yyreduce:
}
break;
+ case 469:
+/* Line 1269 of yacc.c. */
+#line 4562 "querytransformparser.ypp"
+ {
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
+ }
+ break;
+
+ case 470:
+/* Line 1269 of yacc.c. */
+#line 4566 "querytransformparser.ypp"
+ {
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
+ }
+ break;
+
case 471:
/* Line 1269 of yacc.c. */
-#line 4463 "querytransformparser.ypp"
+#line 4571 "querytransformparser.ypp"
{
const ReflectYYLTYPE ryy((yyloc), parseInfo);
@@ -7712,7 +7832,7 @@ yyreduce:
case 472:
/* Line 1269 of yacc.c. */
-#line 4475 "querytransformparser.ypp"
+#line 4583 "querytransformparser.ypp"
{
(yyval.qName) = parseInfo->staticContext->namePool()->fromClarkName((yyvsp[(1) - (1)].sval));
}
@@ -7720,7 +7840,7 @@ yyreduce:
/* Line 1269 of yacc.c. */
-#line 7643 "qquerytransformparser.cpp"
+#line 7763 "qquerytransformparser.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -7938,7 +8058,7 @@ yyreturn:
/* Line 1486 of yacc.c. */
-#line 4479 "querytransformparser.ypp"
+#line 4587 "querytransformparser.ypp"
QString Tokenizer::tokenToString(const Token &token)
diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h
index b33ca55..bb01788 100644
--- a/src/xmlpatterns/parser/qquerytransformparser_p.h
+++ b/src/xmlpatterns/parser/qquerytransformparser_p.h
@@ -49,6 +49,57 @@
//
// We mean it.
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
/* A Bison parser, made by GNU Bison 2.3a. */
/* Skeleton interface for Bison's Yacc-like parsers in C
@@ -104,6 +155,25 @@
# undef SELF
#endif
+/* These tokens are defined to nothing on Windows because they're
+ * used in their documentation parser, for use in things like:
+ *
+ * int foo(IN char* name, OUT char* path);
+ *
+ * Hence this un-break fix. Note that this file was auto generated. */
+#ifdef IN
+# undef IN
+#endif
+#ifdef INSTANCE
+# undef INSTANCE
+#endif
+#ifdef STRICT
+# undef STRICT
+#endif
+#ifdef SELF
+# undef SELF
+#endif
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
diff --git a/src/xmlpatterns/parser/querytransformparser.ypp b/src/xmlpatterns/parser/querytransformparser.ypp
index f67eb5d..74cee11 100644
--- a/src/xmlpatterns/parser/querytransformparser.ypp
+++ b/src/xmlpatterns/parser/querytransformparser.ypp
@@ -227,11 +227,18 @@ static inline QSourceLocation fromYYLTYPE(const YYLTYPE &sourceLocator,
}
/**
+ * @internal
+ * @relates QXmlQuery
+ */
+typedef QFlags<QXmlQuery::QueryLanguage> QueryLanguages;
+
+/**
* @short Flags invalid expressions and declarations in the currently
* parsed language.
*
- * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0 and
- * XPath 2.0 inside XSL-T, it is the union of all the constructs in these
+ * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0, and
+ * XPath 2.0 inside XSL-T, and field and selector patterns in W3C XML Schema's
+ * identity constraints, it is the union of all the constructs in these
* languages. However, when dealing with each language individually, we
* regularly need to disallow some expressions, such as direct element
* constructors when parsing XSL-T, or the typeswitch when parsing XPath.
@@ -242,19 +249,46 @@ static inline QSourceLocation fromYYLTYPE(const YYLTYPE &sourceLocator,
* instance the @c let clause, should not be flagged as an error, because it's
* used for internal purposes.
*
- * Hence, this function is called from each expression and declaration which is
- * unavailable in XPath.
+ * Hence, this function is called from each expression and declaration with @p
+ * allowedLanguages stating what languages it is allowed in.
*
* If @p isInternal is @c true, no error is raised. Otherwise, if the current
- * language is not XQuery, an error is raised.
+ * language is not in @p allowedLanguages, an error is raised.
*/
-static void disallowedConstruct(const ParserContext *const parseInfo,
- const YYLTYPE &sourceLocator,
- const bool isInternal = false)
+static void allowedIn(const QueryLanguages allowedLanguages,
+ const ParserContext *const parseInfo,
+ const YYLTYPE &sourceLocator,
+ const bool isInternal = false)
{
- if(!isInternal && parseInfo->languageAccent != QXmlQuery::XQuery10)
+ /* We treat XPath 2.0 as a subset of XSL-T 2.0, so if XPath 2.0 is allowed
+ * and XSL-T is the language, it's ok. */
+ if(!isInternal &&
+ (!allowedLanguages.testFlag(parseInfo->languageAccent) && !(allowedLanguages.testFlag(QXmlQuery::XPath20) && parseInfo->languageAccent == QXmlQuery::XSLT20)))
{
- parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered which only is allowed in XQuery."),
+
+ QString langName;
+
+ switch(parseInfo->languageAccent)
+ {
+ case QXmlQuery::XPath20:
+ langName = QLatin1String("XPath 2.0");
+ break;
+ case QXmlQuery::XSLT20:
+ langName = QLatin1String("XSL-T 2.0");
+ break;
+ case QXmlQuery::XQuery10:
+ langName = QLatin1String("XQuery 1.0");
+ break;
+ case QXmlQuery::XmlSchema11IdentityConstraintSelector:
+ langName = QtXmlPatterns::tr("W3C XML Schema identity constraint selector");
+ break;
+ case QXmlQuery::XmlSchema11IdentityConstraintField:
+ langName = QtXmlPatterns::tr("W3C XML Schema identity constraint field");
+ break;
+ }
+
+ parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered "
+ "which is disallowed in the current language(%1).").arg(langName),
ReportContext::XPST0003,
fromYYLTYPE(sourceLocator, parseInfo));
@@ -1560,7 +1594,7 @@ Prolog: /* Empty. */
/* First part. */
| Prolog DefaultNamespaceDecl
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
if(parseInfo->hasSecondPrologPart)
parseInfo->staticContext->error(QtXmlPatterns::tr("A default namespace declaration must occur before function, "
"variable, and option declarations."), ReportContext::XPST0003, fromYYLTYPE(@$, parseInfo));
@@ -1579,7 +1613,7 @@ Prolog: /* Empty. */
}
| Prolog Import
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
if(parseInfo->hasSecondPrologPart)
parseInfo->staticContext->error(QtXmlPatterns::tr("Module imports must occur before function, "
"variable, and option declarations."), ReportContext::XPST0003, fromYYLTYPE(@$, parseInfo));
@@ -1597,7 +1631,7 @@ Prolog: /* Empty. */
}
| Prolog OptionDecl
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
parseInfo->hasSecondPrologPart = true;
}
@@ -1705,7 +1739,7 @@ OptionalPriority: /* Empty. */
const AtomicValue::Ptr val(Decimal::fromLexical($2));
if(val->hasError())
{
- parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must of type %2, which %3 isn't.")
+ parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must be of type %2, which %3 isn't.")
.arg(formatKeyword(QLatin1String("priority")),
formatType(parseInfo->staticContext->namePool(), BuiltinTypes::xsDecimal),
formatData($2)),
@@ -1730,20 +1764,20 @@ TemplateName: NAME ElementName
Setter: BoundarySpaceDecl /* [7] */
| DefaultCollationDecl
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
}
| BaseURIDecl
| ConstructionDecl
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
}
| OrderingModeDecl
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
}
| EmptyOrderDecl
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
}
| CopyNamespacesDecl
@@ -1755,7 +1789,7 @@ Separator: SEMI_COLON
NamespaceDecl: DECLARE NAMESPACE NCNAME G_EQ URILiteral IsInternal Separator /* [10] */
{
if(!$6)
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
if($3 == QLatin1String("xmlns"))
{
@@ -1867,7 +1901,7 @@ OptionDecl: DECLARE OPTION ElementName StringLiteral Separator
OrderingModeDecl: DECLARE ORDERING OrderingMode Separator /* [14] */
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
if(parseInfo->hasDeclaration(ParserContext::OrderingModeDecl))
{
parseInfo->staticContext->error(prologMessage("declare ordering"),
@@ -1964,7 +1998,7 @@ DefaultCollationDecl: DECLARE DEFAULT COLLATION StringLiteral Separator
BaseURIDecl: DECLARE BASEURI IsInternal URILiteral Separator /* [20] */
{
- disallowedConstruct(parseInfo, @$, $3);
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, @$, $3);
if(parseInfo->hasDeclaration(ParserContext::BaseURIDecl))
{
parseInfo->staticContext->error(prologMessage("declare base-uri"),
@@ -2026,7 +2060,7 @@ FileLocation: URILiteral
VarDecl: DECLARE VARIABLE IsInternal DOLLAR VarName TypeDeclaration
VariableValue OptionalDefaultValue Separator /* [24] */
{
- disallowedConstruct(parseInfo, @$, $3);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $3);
if(variableByName($5, parseInfo))
{
parseInfo->staticContext->error(QtXmlPatterns::tr("A variable by name %1 has already "
@@ -2126,7 +2160,7 @@ FunctionDecl: DECLARE FUNCTION IsInternal FunctionName LPAREN ParamList RPAREN
TypeDeclaration FunctionBody Separator /* [26] */
{
if(!$3)
- disallowedConstruct(parseInfo, @$, $3);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $3);
/* If FunctionBody is null, it is 'external', otherwise the value is the body. */
const QXmlName::NamespaceCode ns($4.namespaceURI());
@@ -2696,7 +2730,7 @@ LetClause: LET IsInternal DOLLAR VarName TypeDeclaration ASSIGN ExprSingle
}
LetTail /* [36] */
{
- disallowedConstruct(parseInfo, @$, $2);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
Q_ASSERT(parseInfo->variables.top()->name == $4);
$$ = create(new LetClause($<expr>8, $9, parseInfo->variables.top()), @$, parseInfo);
@@ -2835,6 +2869,7 @@ SomeQuantificationExpr: SOME DOLLAR VarName TypeDeclaration IN ExprSingle
{$<enums.slot>$ = parseInfo->staticContext->currentRangeSlot();}
SomeQuantificationTail /* [X] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new QuantifiedExpression($<enums.slot>8,
QuantifiedExpression::Some, $<expr>6, $9), @$, parseInfo);
parseInfo->finalizePushedVariable();
@@ -2863,6 +2898,7 @@ EveryQuantificationExpr: EVERY DOLLAR VarName TypeDeclaration IN ExprSingle
{$<enums.slot>$ = parseInfo->staticContext->currentRangeSlot();}
EveryQuantificationTail /* [X] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new QuantifiedExpression($<enums.slot>8,
QuantifiedExpression::Every, $<expr>6, $9), @$, parseInfo);
parseInfo->finalizePushedVariable();
@@ -2916,7 +2952,7 @@ TypeswitchExpr: TYPESWITCH LPAREN Expr RPAREN
}
CaseClause /* [43] */
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
parseInfo->typeswitchSource.pop();
$$ = $6;
}
@@ -2976,18 +3012,21 @@ CaseDefault: DEFAULT RETURN ExprSingle
IfExpr: IF LPAREN Expr RPAREN THEN ExprSingle ELSE ExprSingle /* [45] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new IfThenClause($3, $6, $8), @$, parseInfo);
}
OrExpr: AndExpr /* [46] */
| OrExpr OR AndExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new OrExpression($1, $3), @$, parseInfo);
}
AndExpr: ComparisonExpr /* [47] */
| AndExpr AND ComparisonExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new AndExpression($1, $3), @$, parseInfo);
}
@@ -2999,12 +3038,14 @@ ComparisonExpr: RangeExpr
RangeExpr: AdditiveExpr /* [49] */
| AdditiveExpr TO AdditiveExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new RangeExpression($1, $3), @$, parseInfo);
}
AdditiveExpr: MultiplicativeExpr /* [50] */
| AdditiveExpr AdditiveOperator MultiplicativeExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new ArithmeticExpression($1, $2, $3), @$, parseInfo);
}
@@ -3014,6 +3055,7 @@ AdditiveOperator: PLUS {$$ = AtomicMathematician::Add;}
MultiplicativeExpr: UnionExpr /* [51] */
| MultiplicativeExpr MultiplyOperator UnionExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new ArithmeticExpression($1, $2, $3), @$, parseInfo);
}
@@ -3025,12 +3067,18 @@ MultiplyOperator: STAR {$$ = AtomicMathematician::Multiply;}
UnionExpr: IntersectExceptExpr /* [52] */
| UnionExpr UnionOperator IntersectExceptExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10
+ | QXmlQuery::XPath20
+ | QXmlQuery::XmlSchema11IdentityConstraintField
+ | QXmlQuery::XmlSchema11IdentityConstraintSelector),
+ parseInfo, @$);
$$ = create(new CombineNodes($1, CombineNodes::Union, $3), @$, parseInfo);
}
IntersectExceptExpr: InstanceOfExpr /* [53] */
| IntersectExceptExpr IntersectOperator InstanceOfExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new CombineNodes($1, $2, $3), @$, parseInfo);
}
@@ -3049,31 +3097,36 @@ IntersectOperator: INTERSECT
InstanceOfExpr: TreatExpr /* [54] */
| TreatExpr INSTANCE OF SequenceType
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new InstanceOf($1,
- SequenceType::Ptr($4)), @$, parseInfo);
+ SequenceType::Ptr($4)), @$, parseInfo);
}
TreatExpr: CastableExpr /* [55] */
| CastableExpr TREAT AS SequenceType
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new TreatAs($1, $4), @$, parseInfo);
}
CastableExpr: CastExpr /* [56] */
| CastExpr CASTABLE AS SingleType
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new CastableAs($1, $4), @$, parseInfo);
}
CastExpr: UnaryExpr /* [57] */
| UnaryExpr CAST AS SingleType
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new CastAs($1, $4), @$, parseInfo);
}
UnaryExpr: ValueExpr /* [58] */
| UnaryOperator UnaryExpr
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new UnaryExpression($1, $2, parseInfo->staticContext), @$, parseInfo);
}
@@ -3092,6 +3145,7 @@ ValueExpr: ValidateExpr
GeneralComp: RangeExpr GeneralComparisonOperator RangeExpr /* [60] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new GeneralComparison($1, $2, $3, parseInfo->isBackwardsCompat.top()), @$, parseInfo);
}
@@ -3125,7 +3179,7 @@ NodeOperator: IS {$$ = QXmlNodeModelIndex::Is;}
ValidateExpr: ValidationMode EnclosedExpr /* [63] */
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Validation Feature is not supported. "
"Hence, %1-expressions may not be used.")
.arg(formatKeyword("validate")),
@@ -3143,6 +3197,7 @@ ValidationMode: VALIDATE {$$ = Validate::Strict;}
ExtensionExpr: Pragmas EnclosedOptionalExpr /* [65] */
{
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
/* We don't support any pragmas, so we only do the
* necessary validation and use the fallback expression. */
@@ -3171,7 +3226,7 @@ Pragmas: Pragmas Pragma
Pragma: PRAGMA_START PragmaName PragmaContents PRAGMA_END /* [66] */
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
}
PragmaContents: /* empty */ /* [67] */
@@ -3241,12 +3296,14 @@ StepExpr: FilteredAxisStep
}
| BASEURI StringLiteral CURLY_LBRACE Expr CURLY_RBRACE /* [X] */
{
+ allowedIn(QXmlQuery::XSLT20, parseInfo, @$);
Q_ASSERT(!$2.isEmpty());
$$ = create(new StaticBaseURIStore($2, $4), @$, parseInfo);
}
| DECLARE NAMESPACE NCNAME G_EQ STRING_LITERAL CURLY_LBRACE /* [X] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, @$);
parseInfo->resolvers.push(parseInfo->staticContext->namespaceBindings());
const NamespaceResolver::Ptr resolver(new DelegatingNamespaceResolver(parseInfo->staticContext->namespaceBindings()));
resolver->addBinding(QXmlName(parseInfo->staticContext->namePool()->allocateNamespace($5),
@@ -3449,6 +3506,36 @@ Axis: AxisToken COLONCOLON
}
else
$$ = $1;
+
+ switch($1)
+ {
+ case QXmlNodeModelIndex::AxisAttribute:
+ {
+ allowedIn(QueryLanguages( QXmlQuery::XPath20
+ | QXmlQuery::XQuery10
+ | QXmlQuery::XmlSchema11IdentityConstraintField
+ | QXmlQuery::XSLT20),
+ parseInfo, @$);
+ break;
+ }
+ case QXmlNodeModelIndex::AxisChild:
+ {
+ allowedIn(QueryLanguages( QXmlQuery::XPath20
+ | QXmlQuery::XQuery10
+ | QXmlQuery::XmlSchema11IdentityConstraintField
+ | QXmlQuery::XmlSchema11IdentityConstraintSelector
+ | QXmlQuery::XSLT20),
+ parseInfo, @$);
+ break;
+ }
+ default:
+ {
+ allowedIn(QueryLanguages( QXmlQuery::XPath20
+ | QXmlQuery::XQuery10
+ | QXmlQuery::XSLT20),
+ parseInfo, @$);
+ }
+ }
}
AxisToken: ANCESTOR_OR_SELF {$$ = QXmlNodeModelIndex::AxisAncestorOrSelf ;}
@@ -3470,6 +3557,7 @@ AbbrevForwardStep: AT_SIGN
}
NodeTest /* [72] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20 | QXmlQuery::XmlSchema11IdentityConstraintField), parseInfo, @$);
$$ = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, $3), @$, parseInfo);
parseInfo->restoreNodeTestSource();
@@ -3499,6 +3587,9 @@ AbbrevReverseStep: DOTDOT
NodeTest: NameTest /* [78] */
| KindTest
+ {
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
+ }
NameTest: ElementName /* [79] */
{
@@ -3521,6 +3612,7 @@ WildCard: STAR
}
| ANY_PREFIX
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
const QXmlName::LocalNameCode c = parseInfo->staticContext->namePool()->allocateLocalName($1);
$$ = LocalNameTest::create(parseInfo->nodeTestSource, c);
}
@@ -3528,6 +3620,7 @@ WildCard: STAR
FilterExpr: PrimaryExpr /* [81] */
| FilterExpr LBRACKET Expr RBRACKET
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(GenericPredicate::create($1, $3, parseInfo->staticContext, fromYYLTYPE(@4, parseInfo)), @$, parseInfo);
}
@@ -3556,15 +3649,18 @@ Literal: NumericLiteral
NumericLiteral: XPATH2_NUMBER /* [86] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = createNumericLiteral<Double>($1, @$, parseInfo);
}
| NUMBER
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = createNumericLiteral<Numeric>($1, @$, parseInfo);
}
VarRef: DOLLAR VarName /* [87] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = resolveVariable($2, @$, parseInfo, false);
}
@@ -3580,10 +3676,12 @@ VarName: NCNAME
ParenthesizedExpr: LPAREN Expr RPAREN /* [89] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = $2;
}
| LPAREN RPAREN
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
$$ = create(new EmptySequence, @$, parseInfo);
}
@@ -3599,6 +3697,7 @@ OrderingExpr: OrderingMode EnclosedExpr
FunctionCallExpr: FunctionName LPAREN FunctionArguments RPAREN /* [93] */
{
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
if(XPathHelper::isReservedNamespace($1.namespaceURI()) || $1.namespaceURI() == StandardNamespaces::InternalXSLT)
{ /* We got a call to a builtin function. */
const ReflectYYLTYPE ryy(@$, parseInfo);
@@ -3641,9 +3740,12 @@ FunctionArguments: /* empty */
Constructor: DirectConstructor /* [94] */
{
- disallowedConstruct(parseInfo, @$);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
}
| ComputedConstructor
+/* The reason we cannot call alloweIn() as the action for ComputedConstructor,
+ * is that we use the computed constructors for XSL-T, and therefore generate
+ * INTERNAL tokens. */
DirectConstructor: DirElemConstructor /* [95] */
| DirCommentConstructor
@@ -4075,7 +4177,7 @@ ComputedConstructor: CompDocConstructor
CompDocConstructor: DOCUMENT IsInternal EnclosedExpr /* [110] */
{
- disallowedConstruct(parseInfo, @$, $2);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
$$ = create(new DocumentConstructor($3), @$, parseInfo);
}
@@ -4088,7 +4190,7 @@ CompElemConstructor: ELEMENT IsInternal CompElementName
EnclosedOptionalExpr /* [111] */
{
Q_ASSERT(5);
- disallowedConstruct(parseInfo, @$, $2);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
Expression::Ptr effExpr;
@@ -4133,7 +4235,7 @@ CompAttrConstructor: ATTRIBUTE
CompAttributeName
EnclosedOptionalExpr /* [113] */
{
- disallowedConstruct(parseInfo, @$, $2);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
const Expression::Ptr name(create(new AttributeNameValidator($3), @$, parseInfo));
@@ -4150,14 +4252,14 @@ CompTextConstructor: TEXT IsInternal EnclosedExpr
CompCommentConstructor: COMMENT IsInternal EnclosedExpr /* [115] */
{
- disallowedConstruct(parseInfo, @$, $2);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
$$ = create(new CommentConstructor(createSimpleContent($3, @$, parseInfo)), @$, parseInfo);
}
CompPIConstructor: PROCESSING_INSTRUCTION CompPIName EnclosedOptionalExpr /* [116] */
{
- disallowedConstruct(parseInfo, @$, $2);
+ allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
if($3)
{
@@ -4517,7 +4619,13 @@ PragmaName: NCNAME
URILiteral: StringLiteral /* [140] */
StringLiteral: STRING_LITERAL /* [144] */
+ {
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
+ }
| XPATH2_STRING_LITERAL
+ {
+ allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
+ }
QName: QNAME /* [154] */
{
diff --git a/src/xmlpatterns/schema/.gitignore b/src/xmlpatterns/schema/.gitignore
new file mode 100644
index 0000000..2b29f27
--- /dev/null
+++ b/src/xmlpatterns/schema/.gitignore
@@ -0,0 +1 @@
+tests
diff --git a/src/xmlpatterns/schema/builtinschemas.qrc b/src/xmlpatterns/schema/builtinschemas.qrc
new file mode 100644
index 0000000..fb43d78
--- /dev/null
+++ b/src/xmlpatterns/schema/builtinschemas.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file alias="http://www.w3.org/XML/1998/namespace">schemas/xml.xsd</file>
+</qresource>
+</RCC>
diff --git a/src/xmlpatterns/schema/doc/All_diagram.dot b/src/xmlpatterns/schema/doc/All_diagram.dot
new file mode 100644
index 0000000..3352b723
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/All_diagram.dot
@@ -0,0 +1,13 @@
+digraph All {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="any"]
+ 1 -> 3 [label="element"]
+ 2 -> 3 [label="any"]
+ 2 -> 3 [label="element"]
+ 3 -> 3 [label="any"]
+ 3 -> 3 [label="element"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Alternative_diagram.dot b/src/xmlpatterns/schema/doc/Alternative_diagram.dot
new file mode 100644
index 0000000..2119c49
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Alternative_diagram.dot
@@ -0,0 +1,11 @@
+digraph Alternative {
+ mindist = 2.0
+ 1 -> 3 [label="complexType"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="simpleType"]
+ 2 -> 3 [label="complexType"]
+ 2 -> 3 [label="simpleType"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Annotation_diagram.dot b/src/xmlpatterns/schema/doc/Annotation_diagram.dot
new file mode 100644
index 0000000..260b6f7
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Annotation_diagram.dot
@@ -0,0 +1,9 @@
+digraph Annotation {
+ mindist = 2.0
+ 1 -> 2 [label="appinfo"]
+ 1 -> 2 [label="documentation"]
+ 2 -> 2 [label="appinfo"]
+ 2 -> 2 [label="documentation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/AnyAttribute_diagram.dot b/src/xmlpatterns/schema/doc/AnyAttribute_diagram.dot
new file mode 100644
index 0000000..d252ebd
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/AnyAttribute_diagram.dot
@@ -0,0 +1,6 @@
+digraph AnyAttribute {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Any_diagram.dot b/src/xmlpatterns/schema/doc/Any_diagram.dot
new file mode 100644
index 0000000..f54063f
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Any_diagram.dot
@@ -0,0 +1,6 @@
+digraph Any {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Assert_diagram.dot b/src/xmlpatterns/schema/doc/Assert_diagram.dot
new file mode 100644
index 0000000..7093bef
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Assert_diagram.dot
@@ -0,0 +1,6 @@
+digraph Assert {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Choice_diagram.dot b/src/xmlpatterns/schema/doc/Choice_diagram.dot
new file mode 100644
index 0000000..7b32016
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Choice_diagram.dot
@@ -0,0 +1,22 @@
+digraph Choice {
+ mindist = 2.0
+ 1 -> 3 [label="choice"]
+ 1 -> 3 [label="group"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="sequence"]
+ 1 -> 3 [label="any"]
+ 1 -> 3 [label="element"]
+ 2 -> 3 [label="choice"]
+ 2 -> 3 [label="group"]
+ 2 -> 3 [label="sequence"]
+ 2 -> 3 [label="any"]
+ 2 -> 3 [label="element"]
+ 3 -> 3 [label="choice"]
+ 3 -> 3 [label="group"]
+ 3 -> 3 [label="sequence"]
+ 3 -> 3 [label="any"]
+ 3 -> 3 [label="element"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/ComplexContentExtension_diagram.dot b/src/xmlpatterns/schema/doc/ComplexContentExtension_diagram.dot
new file mode 100644
index 0000000..6131612
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/ComplexContentExtension_diagram.dot
@@ -0,0 +1,47 @@
+digraph ComplexContentExtension {
+ mindist = 2.0
+ 1 -> 4 [label="choice"]
+ 1 -> 4 [label="group"]
+ 1 -> 4 [label="all"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 4 [label="sequence"]
+ 1 -> 6 [label="anyAttribute"]
+ 1 -> 7 [label="assert"]
+ 1 -> 3 [label="openContent"]
+ 1 -> 5 [label="attribute"]
+ 1 -> 5 [label="attributeGroup"]
+ 2 -> 4 [label="choice"]
+ 2 -> 4 [label="group"]
+ 2 -> 4 [label="all"]
+ 2 -> 4 [label="sequence"]
+ 2 -> 6 [label="anyAttribute"]
+ 2 -> 7 [label="assert"]
+ 2 -> 3 [label="openContent"]
+ 2 -> 5 [label="attribute"]
+ 2 -> 5 [label="attributeGroup"]
+ 3 -> 4 [label="choice"]
+ 3 -> 4 [label="group"]
+ 3 -> 4 [label="all"]
+ 3 -> 4 [label="sequence"]
+ 3 -> 6 [label="anyAttribute"]
+ 3 -> 7 [label="assert"]
+ 3 -> 5 [label="attribute"]
+ 3 -> 5 [label="attributeGroup"]
+ 4 -> 6 [label="anyAttribute"]
+ 4 -> 7 [label="assert"]
+ 4 -> 5 [label="attribute"]
+ 4 -> 5 [label="attributeGroup"]
+ 5 -> 6 [label="anyAttribute"]
+ 5 -> 7 [label="assert"]
+ 5 -> 5 [label="attribute"]
+ 5 -> 5 [label="attributeGroup"]
+ 6 -> 7 [label="assert"]
+ 7 -> 7 [label="assert"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+ 6 [shape=doublecircle, style=filled, color=green]
+ 7 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/ComplexContentRestriction_diagram.dot b/src/xmlpatterns/schema/doc/ComplexContentRestriction_diagram.dot
new file mode 100644
index 0000000..bfda892
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/ComplexContentRestriction_diagram.dot
@@ -0,0 +1,47 @@
+digraph ComplexContentRestriction {
+ mindist = 2.0
+ 1 -> 4 [label="choice"]
+ 1 -> 4 [label="group"]
+ 1 -> 4 [label="all"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 4 [label="sequence"]
+ 1 -> 6 [label="anyAttribute"]
+ 1 -> 7 [label="assert"]
+ 1 -> 3 [label="openContent"]
+ 1 -> 5 [label="attribute"]
+ 1 -> 5 [label="attributeGroup"]
+ 2 -> 4 [label="choice"]
+ 2 -> 4 [label="group"]
+ 2 -> 4 [label="all"]
+ 2 -> 4 [label="sequence"]
+ 2 -> 6 [label="anyAttribute"]
+ 2 -> 7 [label="assert"]
+ 2 -> 3 [label="openContent"]
+ 2 -> 5 [label="attribute"]
+ 2 -> 5 [label="attributeGroup"]
+ 3 -> 4 [label="choice"]
+ 3 -> 4 [label="group"]
+ 3 -> 4 [label="all"]
+ 3 -> 4 [label="sequence"]
+ 3 -> 6 [label="anyAttribute"]
+ 3 -> 7 [label="assert"]
+ 3 -> 5 [label="attribute"]
+ 3 -> 5 [label="attributeGroup"]
+ 4 -> 6 [label="anyAttribute"]
+ 4 -> 7 [label="assert"]
+ 4 -> 5 [label="attribute"]
+ 4 -> 5 [label="attributeGroup"]
+ 5 -> 6 [label="anyAttribute"]
+ 5 -> 7 [label="assert"]
+ 5 -> 5 [label="attribute"]
+ 5 -> 5 [label="attributeGroup"]
+ 6 -> 7 [label="assert"]
+ 7 -> 7 [label="assert"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+ 6 [shape=doublecircle, style=filled, color=green]
+ 7 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/ComplexContent_diagram.dot b/src/xmlpatterns/schema/doc/ComplexContent_diagram.dot
new file mode 100644
index 0000000..949c27e
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/ComplexContent_diagram.dot
@@ -0,0 +1,11 @@
+digraph ComplexContent {
+ mindist = 2.0
+ 1 -> 3 [label="restriction"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="extension"]
+ 2 -> 3 [label="restriction"]
+ 2 -> 3 [label="extension"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/DefaultOpenContent_diagram.dot b/src/xmlpatterns/schema/doc/DefaultOpenContent_diagram.dot
new file mode 100644
index 0000000..61e7d14
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/DefaultOpenContent_diagram.dot
@@ -0,0 +1,9 @@
+digraph DefaultOpenContent {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="any"]
+ 2 -> 3 [label="any"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/EnumerationFacet_diagram.dot b/src/xmlpatterns/schema/doc/EnumerationFacet_diagram.dot
new file mode 100644
index 0000000..91be76b
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/EnumerationFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph EnumerationFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Field_diagram.dot b/src/xmlpatterns/schema/doc/Field_diagram.dot
new file mode 100644
index 0000000..1c597b3
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Field_diagram.dot
@@ -0,0 +1,6 @@
+digraph Field {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/FractionDigitsFacet_diagram.dot b/src/xmlpatterns/schema/doc/FractionDigitsFacet_diagram.dot
new file mode 100644
index 0000000..5e098b3
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/FractionDigitsFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph FractionDigitsFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/GlobalAttribute_diagram.dot b/src/xmlpatterns/schema/doc/GlobalAttribute_diagram.dot
new file mode 100644
index 0000000..25a1a43
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/GlobalAttribute_diagram.dot
@@ -0,0 +1,9 @@
+digraph GlobalAttribute {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="simpleType"]
+ 2 -> 3 [label="simpleType"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/GlobalComplexType_diagram.dot b/src/xmlpatterns/schema/doc/GlobalComplexType_diagram.dot
new file mode 100644
index 0000000..05e40b7
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/GlobalComplexType_diagram.dot
@@ -0,0 +1,52 @@
+digraph GlobalComplexType {
+ mindist = 2.0
+ 1 -> 5 [label="choice"]
+ 1 -> 3 [label="complexContent"]
+ 1 -> 5 [label="group"]
+ 1 -> 5 [label="all"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 5 [label="sequence"]
+ 1 -> 3 [label="simpleContent"]
+ 1 -> 7 [label="anyAttribute"]
+ 1 -> 8 [label="assert"]
+ 1 -> 4 [label="openContent"]
+ 1 -> 6 [label="attribute"]
+ 1 -> 6 [label="attributeGroup"]
+ 2 -> 5 [label="choice"]
+ 2 -> 3 [label="complexContent"]
+ 2 -> 5 [label="group"]
+ 2 -> 5 [label="all"]
+ 2 -> 5 [label="sequence"]
+ 2 -> 3 [label="simpleContent"]
+ 2 -> 7 [label="anyAttribute"]
+ 2 -> 8 [label="assert"]
+ 2 -> 4 [label="openContent"]
+ 2 -> 6 [label="attribute"]
+ 2 -> 6 [label="attributeGroup"]
+ 4 -> 5 [label="choice"]
+ 4 -> 5 [label="group"]
+ 4 -> 5 [label="all"]
+ 4 -> 5 [label="sequence"]
+ 4 -> 7 [label="anyAttribute"]
+ 4 -> 8 [label="assert"]
+ 4 -> 6 [label="attribute"]
+ 4 -> 6 [label="attributeGroup"]
+ 5 -> 7 [label="anyAttribute"]
+ 5 -> 8 [label="assert"]
+ 5 -> 6 [label="attribute"]
+ 5 -> 6 [label="attributeGroup"]
+ 6 -> 7 [label="anyAttribute"]
+ 6 -> 8 [label="assert"]
+ 6 -> 6 [label="attribute"]
+ 6 -> 6 [label="attributeGroup"]
+ 7 -> 8 [label="assert"]
+ 8 -> 8 [label="assert"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+ 6 [shape=doublecircle, style=filled, color=green]
+ 7 [shape=doublecircle, style=filled, color=green]
+ 8 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/GlobalElement_diagram.dot b/src/xmlpatterns/schema/doc/GlobalElement_diagram.dot
new file mode 100644
index 0000000..20447a7
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/GlobalElement_diagram.dot
@@ -0,0 +1,32 @@
+digraph GlobalElement {
+ mindist = 2.0
+ 1 -> 3 [label="complexType"]
+ 1 -> 4 [label="alternative"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 5 [label="key"]
+ 1 -> 3 [label="simpleType"]
+ 1 -> 5 [label="keyref"]
+ 1 -> 5 [label="unique"]
+ 2 -> 3 [label="complexType"]
+ 2 -> 4 [label="alternative"]
+ 2 -> 5 [label="key"]
+ 2 -> 3 [label="simpleType"]
+ 2 -> 5 [label="keyref"]
+ 2 -> 5 [label="unique"]
+ 3 -> 4 [label="alternative"]
+ 3 -> 5 [label="key"]
+ 3 -> 5 [label="keyref"]
+ 3 -> 5 [label="unique"]
+ 4 -> 4 [label="alternative"]
+ 4 -> 5 [label="key"]
+ 4 -> 5 [label="keyref"]
+ 4 -> 5 [label="unique"]
+ 5 -> 5 [label="key"]
+ 5 -> 5 [label="keyref"]
+ 5 -> 5 [label="unique"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/GlobalSimpleType_diagram.dot b/src/xmlpatterns/schema/doc/GlobalSimpleType_diagram.dot
new file mode 100644
index 0000000..ccb7f54
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/GlobalSimpleType_diagram.dot
@@ -0,0 +1,13 @@
+digraph GlobalSimpleType {
+ mindist = 2.0
+ 1 -> 3 [label="restriction"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="list"]
+ 1 -> 3 [label="union"]
+ 2 -> 3 [label="restriction"]
+ 2 -> 3 [label="list"]
+ 2 -> 3 [label="union"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Import_diagram.dot b/src/xmlpatterns/schema/doc/Import_diagram.dot
new file mode 100644
index 0000000..3484bc3
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Import_diagram.dot
@@ -0,0 +1,6 @@
+digraph Import {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Include_diagram.dot b/src/xmlpatterns/schema/doc/Include_diagram.dot
new file mode 100644
index 0000000..357e4c9
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Include_diagram.dot
@@ -0,0 +1,6 @@
+digraph Include {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/KeyRef_diagram.dot b/src/xmlpatterns/schema/doc/KeyRef_diagram.dot
new file mode 100644
index 0000000..ff425b9
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/KeyRef_diagram.dot
@@ -0,0 +1,12 @@
+digraph KeyRef {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="selector"]
+ 2 -> 3 [label="selector"]
+ 3 -> 4 [label="field"]
+ 4 -> 4 [label="field"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=circle, style=filled, color=red]
+ 4 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Key_diagram.dot b/src/xmlpatterns/schema/doc/Key_diagram.dot
new file mode 100644
index 0000000..bbc09cd
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Key_diagram.dot
@@ -0,0 +1,12 @@
+digraph Key {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="selector"]
+ 2 -> 3 [label="selector"]
+ 3 -> 4 [label="field"]
+ 4 -> 4 [label="field"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=circle, style=filled, color=red]
+ 4 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LengthFacet_diagram.dot b/src/xmlpatterns/schema/doc/LengthFacet_diagram.dot
new file mode 100644
index 0000000..1f9205b
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LengthFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph LengthFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/List_diagram.dot b/src/xmlpatterns/schema/doc/List_diagram.dot
new file mode 100644
index 0000000..44cc698
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/List_diagram.dot
@@ -0,0 +1,9 @@
+digraph List {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="simpleType"]
+ 2 -> 3 [label="simpleType"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalAll_diagram.dot b/src/xmlpatterns/schema/doc/LocalAll_diagram.dot
new file mode 100644
index 0000000..88f1b61
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalAll_diagram.dot
@@ -0,0 +1,13 @@
+digraph LocalAll {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="any"]
+ 1 -> 3 [label="element"]
+ 2 -> 3 [label="any"]
+ 2 -> 3 [label="element"]
+ 3 -> 3 [label="any"]
+ 3 -> 3 [label="element"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalAttribute_diagram.dot b/src/xmlpatterns/schema/doc/LocalAttribute_diagram.dot
new file mode 100644
index 0000000..b01f0cf
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalAttribute_diagram.dot
@@ -0,0 +1,9 @@
+digraph LocalAttribute {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="simpleType"]
+ 2 -> 3 [label="simpleType"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalChoice_diagram.dot b/src/xmlpatterns/schema/doc/LocalChoice_diagram.dot
new file mode 100644
index 0000000..b16c47f
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalChoice_diagram.dot
@@ -0,0 +1,22 @@
+digraph LocalChoice {
+ mindist = 2.0
+ 1 -> 3 [label="choice"]
+ 1 -> 3 [label="group"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="sequence"]
+ 1 -> 3 [label="any"]
+ 1 -> 3 [label="element"]
+ 2 -> 3 [label="choice"]
+ 2 -> 3 [label="group"]
+ 2 -> 3 [label="sequence"]
+ 2 -> 3 [label="any"]
+ 2 -> 3 [label="element"]
+ 3 -> 3 [label="choice"]
+ 3 -> 3 [label="group"]
+ 3 -> 3 [label="sequence"]
+ 3 -> 3 [label="any"]
+ 3 -> 3 [label="element"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalComplexType_diagram.dot b/src/xmlpatterns/schema/doc/LocalComplexType_diagram.dot
new file mode 100644
index 0000000..92c54b7
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalComplexType_diagram.dot
@@ -0,0 +1,52 @@
+digraph LocalComplexType {
+ mindist = 2.0
+ 1 -> 5 [label="choice"]
+ 1 -> 3 [label="complexContent"]
+ 1 -> 5 [label="group"]
+ 1 -> 5 [label="all"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 5 [label="sequence"]
+ 1 -> 3 [label="simpleContent"]
+ 1 -> 7 [label="anyAttribute"]
+ 1 -> 8 [label="assert"]
+ 1 -> 4 [label="openContent"]
+ 1 -> 6 [label="attribute"]
+ 1 -> 6 [label="attributeGroup"]
+ 2 -> 5 [label="choice"]
+ 2 -> 3 [label="complexContent"]
+ 2 -> 5 [label="group"]
+ 2 -> 5 [label="all"]
+ 2 -> 5 [label="sequence"]
+ 2 -> 3 [label="simpleContent"]
+ 2 -> 7 [label="anyAttribute"]
+ 2 -> 8 [label="assert"]
+ 2 -> 4 [label="openContent"]
+ 2 -> 6 [label="attribute"]
+ 2 -> 6 [label="attributeGroup"]
+ 4 -> 5 [label="choice"]
+ 4 -> 5 [label="group"]
+ 4 -> 5 [label="all"]
+ 4 -> 5 [label="sequence"]
+ 4 -> 7 [label="anyAttribute"]
+ 4 -> 8 [label="assert"]
+ 4 -> 6 [label="attribute"]
+ 4 -> 6 [label="attributeGroup"]
+ 5 -> 7 [label="anyAttribute"]
+ 5 -> 8 [label="assert"]
+ 5 -> 6 [label="attribute"]
+ 5 -> 6 [label="attributeGroup"]
+ 6 -> 7 [label="anyAttribute"]
+ 6 -> 8 [label="assert"]
+ 6 -> 6 [label="attribute"]
+ 6 -> 6 [label="attributeGroup"]
+ 7 -> 8 [label="assert"]
+ 8 -> 8 [label="assert"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+ 6 [shape=doublecircle, style=filled, color=green]
+ 7 [shape=doublecircle, style=filled, color=green]
+ 8 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalElement_diagram.dot b/src/xmlpatterns/schema/doc/LocalElement_diagram.dot
new file mode 100644
index 0000000..397397a
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalElement_diagram.dot
@@ -0,0 +1,32 @@
+digraph LocalElement {
+ mindist = 2.0
+ 1 -> 3 [label="complexType"]
+ 1 -> 4 [label="alternative"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 5 [label="key"]
+ 1 -> 3 [label="simpleType"]
+ 1 -> 5 [label="keyref"]
+ 1 -> 5 [label="unique"]
+ 2 -> 3 [label="complexType"]
+ 2 -> 4 [label="alternative"]
+ 2 -> 5 [label="key"]
+ 2 -> 3 [label="simpleType"]
+ 2 -> 5 [label="keyref"]
+ 2 -> 5 [label="unique"]
+ 3 -> 4 [label="alternative"]
+ 3 -> 5 [label="key"]
+ 3 -> 5 [label="keyref"]
+ 3 -> 5 [label="unique"]
+ 4 -> 4 [label="alternative"]
+ 4 -> 5 [label="key"]
+ 4 -> 5 [label="keyref"]
+ 4 -> 5 [label="unique"]
+ 5 -> 5 [label="key"]
+ 5 -> 5 [label="keyref"]
+ 5 -> 5 [label="unique"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalSequence_diagram.dot b/src/xmlpatterns/schema/doc/LocalSequence_diagram.dot
new file mode 100644
index 0000000..0dc7f39
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalSequence_diagram.dot
@@ -0,0 +1,22 @@
+digraph LocalSequence {
+ mindist = 2.0
+ 1 -> 3 [label="choice"]
+ 1 -> 3 [label="group"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="sequence"]
+ 1 -> 3 [label="any"]
+ 1 -> 3 [label="element"]
+ 2 -> 3 [label="choice"]
+ 2 -> 3 [label="group"]
+ 2 -> 3 [label="sequence"]
+ 2 -> 3 [label="any"]
+ 2 -> 3 [label="element"]
+ 3 -> 3 [label="choice"]
+ 3 -> 3 [label="group"]
+ 3 -> 3 [label="sequence"]
+ 3 -> 3 [label="any"]
+ 3 -> 3 [label="element"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/LocalSimpleType_diagram.dot b/src/xmlpatterns/schema/doc/LocalSimpleType_diagram.dot
new file mode 100644
index 0000000..ac13305
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/LocalSimpleType_diagram.dot
@@ -0,0 +1,13 @@
+digraph LocalSimpleType {
+ mindist = 2.0
+ 1 -> 3 [label="restriction"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="list"]
+ 1 -> 3 [label="union"]
+ 2 -> 3 [label="restriction"]
+ 2 -> 3 [label="list"]
+ 2 -> 3 [label="union"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/MaxExclusiveFacet_diagram.dot b/src/xmlpatterns/schema/doc/MaxExclusiveFacet_diagram.dot
new file mode 100644
index 0000000..28364f7
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/MaxExclusiveFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph MaxExclusiveFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/MaxInclusiveFacet_diagram.dot b/src/xmlpatterns/schema/doc/MaxInclusiveFacet_diagram.dot
new file mode 100644
index 0000000..9e2c265
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/MaxInclusiveFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph MaxInclusiveFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/MaxLengthFacet_diagram.dot b/src/xmlpatterns/schema/doc/MaxLengthFacet_diagram.dot
new file mode 100644
index 0000000..d565217
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/MaxLengthFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph MaxLengthFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/MinExclusiveFacet_diagram.dot b/src/xmlpatterns/schema/doc/MinExclusiveFacet_diagram.dot
new file mode 100644
index 0000000..d3b3f1f
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/MinExclusiveFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph MinExclusiveFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/MinInclusiveFacet_diagram.dot b/src/xmlpatterns/schema/doc/MinInclusiveFacet_diagram.dot
new file mode 100644
index 0000000..e5ca65d
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/MinInclusiveFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph MinInclusiveFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/MinLengthFacet_diagram.dot b/src/xmlpatterns/schema/doc/MinLengthFacet_diagram.dot
new file mode 100644
index 0000000..1dcced4
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/MinLengthFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph MinLengthFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/NamedAttributeGroup_diagram.dot b/src/xmlpatterns/schema/doc/NamedAttributeGroup_diagram.dot
new file mode 100644
index 0000000..1754f67
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/NamedAttributeGroup_diagram.dot
@@ -0,0 +1,17 @@
+digraph NamedAttributeGroup {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 4 [label="anyAttribute"]
+ 1 -> 3 [label="attribute"]
+ 1 -> 3 [label="attributeGroup"]
+ 2 -> 4 [label="anyAttribute"]
+ 2 -> 3 [label="attribute"]
+ 2 -> 3 [label="attributeGroup"]
+ 3 -> 4 [label="anyAttribute"]
+ 3 -> 3 [label="attribute"]
+ 3 -> 3 [label="attributeGroup"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/NamedGroup_diagram.dot b/src/xmlpatterns/schema/doc/NamedGroup_diagram.dot
new file mode 100644
index 0000000..6d9a289
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/NamedGroup_diagram.dot
@@ -0,0 +1,13 @@
+digraph NamedGroup {
+ mindist = 2.0
+ 1 -> 3 [label="choice"]
+ 1 -> 3 [label="all"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="sequence"]
+ 2 -> 3 [label="choice"]
+ 2 -> 3 [label="all"]
+ 2 -> 3 [label="sequence"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Notation_diagram.dot b/src/xmlpatterns/schema/doc/Notation_diagram.dot
new file mode 100644
index 0000000..951f26a
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Notation_diagram.dot
@@ -0,0 +1,6 @@
+digraph Notation {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Override_diagram.dot b/src/xmlpatterns/schema/doc/Override_diagram.dot
new file mode 100644
index 0000000..448451a
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Override_diagram.dot
@@ -0,0 +1,21 @@
+digraph Override {
+ mindist = 2.0
+ 1 -> 2 [label="group"]
+ 1 -> 2 [label="complexType"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 2 [label="simpleType"]
+ 1 -> 2 [label="element"]
+ 1 -> 2 [label="notation"]
+ 1 -> 2 [label="attribute"]
+ 1 -> 2 [label="attributeGroup"]
+ 2 -> 2 [label="group"]
+ 2 -> 2 [label="complexType"]
+ 2 -> 2 [label="annotation"]
+ 2 -> 2 [label="simpleType"]
+ 2 -> 2 [label="element"]
+ 2 -> 2 [label="notation"]
+ 2 -> 2 [label="attribute"]
+ 2 -> 2 [label="attributeGroup"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/PatternFacet_diagram.dot b/src/xmlpatterns/schema/doc/PatternFacet_diagram.dot
new file mode 100644
index 0000000..794d74c
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/PatternFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph PatternFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Redefine_diagram.dot b/src/xmlpatterns/schema/doc/Redefine_diagram.dot
new file mode 100644
index 0000000..ba4871d
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Redefine_diagram.dot
@@ -0,0 +1,15 @@
+digraph Redefine {
+ mindist = 2.0
+ 1 -> 2 [label="group"]
+ 1 -> 2 [label="complexType"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 2 [label="simpleType"]
+ 1 -> 2 [label="attributeGroup"]
+ 2 -> 2 [label="group"]
+ 2 -> 2 [label="complexType"]
+ 2 -> 2 [label="annotation"]
+ 2 -> 2 [label="simpleType"]
+ 2 -> 2 [label="attributeGroup"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/ReferredAttributeGroup_diagram.dot b/src/xmlpatterns/schema/doc/ReferredAttributeGroup_diagram.dot
new file mode 100644
index 0000000..fd08872
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/ReferredAttributeGroup_diagram.dot
@@ -0,0 +1,6 @@
+digraph ReferredAttributeGroup {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/ReferredGroup_diagram.dot b/src/xmlpatterns/schema/doc/ReferredGroup_diagram.dot
new file mode 100644
index 0000000..c32f69f
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/ReferredGroup_diagram.dot
@@ -0,0 +1,13 @@
+digraph ReferredGroup {
+ mindist = 2.0
+ 1 -> 3 [label="choice"]
+ 1 -> 3 [label="all"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="sequence"]
+ 2 -> 3 [label="choice"]
+ 2 -> 3 [label="all"]
+ 2 -> 3 [label="sequence"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Schema_diagram.dot b/src/xmlpatterns/schema/doc/Schema_diagram.dot
new file mode 100644
index 0000000..7d39337
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Schema_diagram.dot
@@ -0,0 +1,66 @@
+digraph Schema {
+ mindist = 2.0
+ 1 -> 5 [label="group"]
+ 1 -> 5 [label="complexType"]
+ 1 -> 2 [label="import"]
+ 1 -> 2 [label="include"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="defaultOpenContent"]
+ 1 -> 5 [label="simpleType"]
+ 1 -> 5 [label="element"]
+ 1 -> 5 [label="notation"]
+ 1 -> 2 [label="override"]
+ 1 -> 5 [label="attribute"]
+ 1 -> 5 [label="attributeGroup"]
+ 1 -> 2 [label="redefine"]
+ 2 -> 5 [label="group"]
+ 2 -> 5 [label="complexType"]
+ 2 -> 2 [label="import"]
+ 2 -> 2 [label="include"]
+ 2 -> 2 [label="annotation"]
+ 2 -> 3 [label="defaultOpenContent"]
+ 2 -> 5 [label="simpleType"]
+ 2 -> 5 [label="element"]
+ 2 -> 5 [label="notation"]
+ 2 -> 2 [label="override"]
+ 2 -> 5 [label="attribute"]
+ 2 -> 5 [label="attributeGroup"]
+ 2 -> 2 [label="redefine"]
+ 3 -> 5 [label="group"]
+ 3 -> 5 [label="complexType"]
+ 3 -> 4 [label="annotation"]
+ 3 -> 5 [label="simpleType"]
+ 3 -> 5 [label="element"]
+ 3 -> 5 [label="notation"]
+ 3 -> 5 [label="attribute"]
+ 3 -> 5 [label="attributeGroup"]
+ 4 -> 5 [label="group"]
+ 4 -> 5 [label="complexType"]
+ 4 -> 5 [label="simpleType"]
+ 4 -> 5 [label="element"]
+ 4 -> 5 [label="notation"]
+ 4 -> 5 [label="attribute"]
+ 4 -> 5 [label="attributeGroup"]
+ 5 -> 5 [label="group"]
+ 5 -> 5 [label="complexType"]
+ 5 -> 6 [label="annotation"]
+ 5 -> 5 [label="simpleType"]
+ 5 -> 5 [label="element"]
+ 5 -> 5 [label="notation"]
+ 5 -> 5 [label="attribute"]
+ 5 -> 5 [label="attributeGroup"]
+ 6 -> 5 [label="group"]
+ 6 -> 5 [label="complexType"]
+ 6 -> 6 [label="annotation"]
+ 6 -> 5 [label="simpleType"]
+ 6 -> 5 [label="element"]
+ 6 -> 5 [label="notation"]
+ 6 -> 5 [label="attribute"]
+ 6 -> 5 [label="attributeGroup"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+ 6 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Selector_diagram.dot b/src/xmlpatterns/schema/doc/Selector_diagram.dot
new file mode 100644
index 0000000..f3e93dc
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Selector_diagram.dot
@@ -0,0 +1,6 @@
+digraph Selector {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Sequence_diagram.dot b/src/xmlpatterns/schema/doc/Sequence_diagram.dot
new file mode 100644
index 0000000..9172744
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Sequence_diagram.dot
@@ -0,0 +1,22 @@
+digraph Sequence {
+ mindist = 2.0
+ 1 -> 3 [label="choice"]
+ 1 -> 3 [label="group"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="sequence"]
+ 1 -> 3 [label="any"]
+ 1 -> 3 [label="element"]
+ 2 -> 3 [label="choice"]
+ 2 -> 3 [label="group"]
+ 2 -> 3 [label="sequence"]
+ 2 -> 3 [label="any"]
+ 2 -> 3 [label="element"]
+ 3 -> 3 [label="choice"]
+ 3 -> 3 [label="group"]
+ 3 -> 3 [label="sequence"]
+ 3 -> 3 [label="any"]
+ 3 -> 3 [label="element"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/SimpleContentExtension_diagram.dot b/src/xmlpatterns/schema/doc/SimpleContentExtension_diagram.dot
new file mode 100644
index 0000000..3ceebfd
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/SimpleContentExtension_diagram.dot
@@ -0,0 +1,23 @@
+digraph SimpleContentExtension {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 4 [label="anyAttribute"]
+ 1 -> 5 [label="assert"]
+ 1 -> 3 [label="attribute"]
+ 1 -> 3 [label="attributeGroup"]
+ 2 -> 4 [label="anyAttribute"]
+ 2 -> 5 [label="assert"]
+ 2 -> 3 [label="attribute"]
+ 2 -> 3 [label="attributeGroup"]
+ 3 -> 4 [label="anyAttribute"]
+ 3 -> 5 [label="assert"]
+ 3 -> 3 [label="attribute"]
+ 3 -> 3 [label="attributeGroup"]
+ 4 -> 5 [label="assert"]
+ 5 -> 5 [label="assert"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/SimpleContentRestriction_diagram.dot b/src/xmlpatterns/schema/doc/SimpleContentRestriction_diagram.dot
new file mode 100644
index 0000000..75b0b71
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/SimpleContentRestriction_diagram.dot
@@ -0,0 +1,87 @@
+digraph SimpleContentRestriction {
+ mindist = 2.0
+ 1 -> 3 [label="simpleType"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 4 [label="length"]
+ 1 -> 6 [label="anyAttribute"]
+ 1 -> 4 [label="maxExclusive"]
+ 1 -> 4 [label="totalDigits"]
+ 1 -> 4 [label="maxInclusive"]
+ 1 -> 4 [label="maxLength"]
+ 1 -> 7 [label="assert"]
+ 1 -> 4 [label="assertion"]
+ 1 -> 5 [label="attribute"]
+ 1 -> 4 [label="minExclusive"]
+ 1 -> 5 [label="attributeGroup"]
+ 1 -> 4 [label="minInclusive"]
+ 1 -> 4 [label="minLength"]
+ 1 -> 4 [label="whiteSpace"]
+ 1 -> 4 [label="pattern"]
+ 1 -> 4 [label="enumeration"]
+ 1 -> 4 [label="fractionDigits"]
+ 2 -> 3 [label="simpleType"]
+ 2 -> 4 [label="length"]
+ 2 -> 6 [label="anyAttribute"]
+ 2 -> 4 [label="maxExclusive"]
+ 2 -> 4 [label="totalDigits"]
+ 2 -> 4 [label="maxInclusive"]
+ 2 -> 4 [label="maxLength"]
+ 2 -> 7 [label="assert"]
+ 2 -> 4 [label="assertion"]
+ 2 -> 5 [label="attribute"]
+ 2 -> 4 [label="minExclusive"]
+ 2 -> 5 [label="attributeGroup"]
+ 2 -> 4 [label="minInclusive"]
+ 2 -> 4 [label="minLength"]
+ 2 -> 4 [label="whiteSpace"]
+ 2 -> 4 [label="pattern"]
+ 2 -> 4 [label="enumeration"]
+ 2 -> 4 [label="fractionDigits"]
+ 3 -> 4 [label="fractionDigits"]
+ 3 -> 4 [label="minLength"]
+ 3 -> 4 [label="whiteSpace"]
+ 3 -> 6 [label="anyAttribute"]
+ 3 -> 4 [label="length"]
+ 3 -> 7 [label="assert"]
+ 3 -> 4 [label="maxExclusive"]
+ 3 -> 4 [label="enumeration"]
+ 3 -> 4 [label="assertion"]
+ 3 -> 4 [label="maxInclusive"]
+ 3 -> 5 [label="attribute"]
+ 3 -> 4 [label="maxLength"]
+ 3 -> 4 [label="pattern"]
+ 3 -> 4 [label="totalDigits"]
+ 3 -> 5 [label="attributeGroup"]
+ 3 -> 4 [label="minExclusive"]
+ 3 -> 4 [label="minInclusive"]
+ 4 -> 4 [label="fractionDigits"]
+ 4 -> 4 [label="minLength"]
+ 4 -> 4 [label="whiteSpace"]
+ 4 -> 6 [label="anyAttribute"]
+ 4 -> 4 [label="length"]
+ 4 -> 7 [label="assert"]
+ 4 -> 4 [label="maxExclusive"]
+ 4 -> 4 [label="enumeration"]
+ 4 -> 4 [label="assertion"]
+ 4 -> 4 [label="maxInclusive"]
+ 4 -> 5 [label="attribute"]
+ 4 -> 4 [label="maxLength"]
+ 4 -> 4 [label="pattern"]
+ 4 -> 4 [label="totalDigits"]
+ 4 -> 5 [label="attributeGroup"]
+ 4 -> 4 [label="minExclusive"]
+ 4 -> 4 [label="minInclusive"]
+ 5 -> 6 [label="anyAttribute"]
+ 5 -> 7 [label="assert"]
+ 5 -> 5 [label="attribute"]
+ 5 -> 5 [label="attributeGroup"]
+ 6 -> 7 [label="assert"]
+ 7 -> 7 [label="assert"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+ 5 [shape=doublecircle, style=filled, color=green]
+ 6 [shape=doublecircle, style=filled, color=green]
+ 7 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/SimpleContent_diagram.dot b/src/xmlpatterns/schema/doc/SimpleContent_diagram.dot
new file mode 100644
index 0000000..c996329
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/SimpleContent_diagram.dot
@@ -0,0 +1,11 @@
+digraph SimpleContent {
+ mindist = 2.0
+ 1 -> 3 [label="restriction"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="extension"]
+ 2 -> 3 [label="restriction"]
+ 2 -> 3 [label="extension"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/SimpleRestriction_diagram.dot b/src/xmlpatterns/schema/doc/SimpleRestriction_diagram.dot
new file mode 100644
index 0000000..09cb041
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/SimpleRestriction_diagram.dot
@@ -0,0 +1,62 @@
+digraph SimpleRestriction {
+ mindist = 2.0
+ 1 -> 4 [label="fractionDigits"]
+ 1 -> 4 [label="minLength"]
+ 1 -> 4 [label="whiteSpace"]
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="simpleType"]
+ 1 -> 4 [label="length"]
+ 1 -> 4 [label="maxExclusive"]
+ 1 -> 4 [label="enumeration"]
+ 1 -> 4 [label="assertion"]
+ 1 -> 4 [label="maxInclusive"]
+ 1 -> 4 [label="maxLength"]
+ 1 -> 4 [label="pattern"]
+ 1 -> 4 [label="totalDigits"]
+ 1 -> 4 [label="minExclusive"]
+ 1 -> 4 [label="minInclusive"]
+ 2 -> 4 [label="fractionDigits"]
+ 2 -> 4 [label="minLength"]
+ 2 -> 4 [label="whiteSpace"]
+ 2 -> 3 [label="simpleType"]
+ 2 -> 4 [label="length"]
+ 2 -> 4 [label="maxExclusive"]
+ 2 -> 4 [label="enumeration"]
+ 2 -> 4 [label="assertion"]
+ 2 -> 4 [label="maxInclusive"]
+ 2 -> 4 [label="maxLength"]
+ 2 -> 4 [label="pattern"]
+ 2 -> 4 [label="totalDigits"]
+ 2 -> 4 [label="minExclusive"]
+ 2 -> 4 [label="minInclusive"]
+ 3 -> 4 [label="fractionDigits"]
+ 3 -> 4 [label="minLength"]
+ 3 -> 4 [label="whiteSpace"]
+ 3 -> 4 [label="length"]
+ 3 -> 4 [label="maxExclusive"]
+ 3 -> 4 [label="enumeration"]
+ 3 -> 4 [label="assertion"]
+ 3 -> 4 [label="maxInclusive"]
+ 3 -> 4 [label="maxLength"]
+ 3 -> 4 [label="pattern"]
+ 3 -> 4 [label="totalDigits"]
+ 3 -> 4 [label="minExclusive"]
+ 3 -> 4 [label="minInclusive"]
+ 4 -> 4 [label="fractionDigits"]
+ 4 -> 4 [label="minLength"]
+ 4 -> 4 [label="whiteSpace"]
+ 4 -> 4 [label="length"]
+ 4 -> 4 [label="maxExclusive"]
+ 4 -> 4 [label="enumeration"]
+ 4 -> 4 [label="assertion"]
+ 4 -> 4 [label="maxInclusive"]
+ 4 -> 4 [label="maxLength"]
+ 4 -> 4 [label="pattern"]
+ 4 -> 4 [label="totalDigits"]
+ 4 -> 4 [label="minExclusive"]
+ 4 -> 4 [label="minInclusive"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+ 4 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/TotalDigitsFacet_diagram.dot b/src/xmlpatterns/schema/doc/TotalDigitsFacet_diagram.dot
new file mode 100644
index 0000000..0ef4cd6
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/TotalDigitsFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph TotalDigitsFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Union_diagram.dot b/src/xmlpatterns/schema/doc/Union_diagram.dot
new file mode 100644
index 0000000..d6c1865
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Union_diagram.dot
@@ -0,0 +1,10 @@
+digraph Union {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="simpleType"]
+ 2 -> 3 [label="simpleType"]
+ 3 -> 3 [label="simpleType"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+ 3 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/Unique_diagram.dot b/src/xmlpatterns/schema/doc/Unique_diagram.dot
new file mode 100644
index 0000000..5b1d098
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/Unique_diagram.dot
@@ -0,0 +1,12 @@
+digraph Unique {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 -> 3 [label="selector"]
+ 2 -> 3 [label="selector"]
+ 3 -> 4 [label="field"]
+ 4 -> 4 [label="field"]
+ 1 [shape=circle, style=filled, color=blue]
+ 2 [shape=circle, style=filled, color=red]
+ 3 [shape=circle, style=filled, color=red]
+ 4 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/WhiteSpaceFacet_diagram.dot b/src/xmlpatterns/schema/doc/WhiteSpaceFacet_diagram.dot
new file mode 100644
index 0000000..596403c
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/WhiteSpaceFacet_diagram.dot
@@ -0,0 +1,6 @@
+digraph WhiteSpaceFacet {
+ mindist = 2.0
+ 1 -> 2 [label="annotation"]
+ 1 [shape=doublecircle, style=filled, color=blue]
+ 2 [shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/doc/legend.dot b/src/xmlpatterns/schema/doc/legend.dot
new file mode 100644
index 0000000..4f5792e
--- /dev/null
+++ b/src/xmlpatterns/schema/doc/legend.dot
@@ -0,0 +1,7 @@
+digraph {
+ size="5,4"
+ 1 [label=" start state ", shape=circle, style=filled, color=blue]
+ 2 [label="start/end state", shape=doublecircle, style=filled, color=blue]
+ 3 [label=" internal state", shape=circle, style=filled, color=red]
+ 4 [label=" end state ", shape=doublecircle, style=filled, color=green]
+}
diff --git a/src/xmlpatterns/schema/qnamespacesupport.cpp b/src/xmlpatterns/schema/qnamespacesupport.cpp
new file mode 100644
index 0000000..0ae5309
--- /dev/null
+++ b/src/xmlpatterns/schema/qnamespacesupport.cpp
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#include "qnamespacesupport_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+NamespaceSupport::NamespaceSupport()
+{
+}
+
+NamespaceSupport::NamespaceSupport(const NamePool::Ptr &namePool)
+ : m_namePool(namePool)
+{
+ // the XML namespace
+ m_ns.insert(StandardPrefixes::xml, StandardNamespaces::xml);
+}
+
+void NamespaceSupport::setPrefix(const QXmlName::PrefixCode prefixCode, const QXmlName::NamespaceCode namespaceCode)
+{
+ m_ns.insert(prefixCode, namespaceCode);
+}
+
+void NamespaceSupport::setPrefixes(const QXmlStreamNamespaceDeclarations &declarations)
+{
+ for (int i = 0; i < declarations.count(); i++) {
+ const QXmlStreamNamespaceDeclaration declaration = declarations.at(i);
+
+ const QXmlName::PrefixCode prefixCode = m_namePool->allocatePrefix(declaration.prefix().toString());
+ const QXmlName::NamespaceCode namespaceCode = m_namePool->allocateNamespace(declaration.namespaceUri().toString());
+ m_ns.insert(prefixCode, namespaceCode);
+ }
+}
+
+void NamespaceSupport::setTargetNamespace(const QXmlName::NamespaceCode namespaceCode)
+{
+ m_ns.insert(0, namespaceCode);
+}
+
+QXmlName::PrefixCode NamespaceSupport::prefix(const QXmlName::NamespaceCode namespaceCode) const
+{
+ NamespaceHash::const_iterator itc, it = m_ns.constBegin();
+ while ((itc=it) != m_ns.constEnd()) {
+ ++it;
+ if (*itc == namespaceCode)
+ return itc.key();
+ }
+ return 0;
+}
+
+QXmlName::NamespaceCode NamespaceSupport::uri(const QXmlName::PrefixCode prefixCode) const
+{
+ return m_ns.value(prefixCode);
+}
+
+bool NamespaceSupport::processName(const QString& qname, NameType type, QXmlName &name) const
+{
+ int len = qname.size();
+ const QChar *data = qname.constData();
+ for (int pos = 0; pos < len; ++pos) {
+ if (data[pos] == QLatin1Char(':')) {
+ const QXmlName::PrefixCode prefixCode = m_namePool->allocatePrefix(qname.left(pos));
+ if (!m_ns.contains(prefixCode))
+ return false;
+ const QXmlName::NamespaceCode namespaceCode = uri(prefixCode);
+ const QXmlName::LocalNameCode localNameCode = m_namePool->allocateLocalName(qname.mid(pos + 1));
+ name = QXmlName(namespaceCode, localNameCode, prefixCode);
+ return true;
+ }
+ }
+
+ // there was no ':'
+ QXmlName::NamespaceCode namespaceCode = 0;
+ // attributes don't take default namespace
+ if (type == ElementName && !m_ns.isEmpty()) {
+ namespaceCode = m_ns.value(0); // get default namespace
+ }
+
+ const QXmlName::LocalNameCode localNameCode = m_namePool->allocateLocalName(qname);
+ name = QXmlName(namespaceCode, localNameCode, 0);
+
+ return true;
+}
+
+void NamespaceSupport::pushContext()
+{
+ m_nsStack.push(m_ns);
+}
+
+void NamespaceSupport::popContext()
+{
+ m_ns.clear();
+ if(!m_nsStack.isEmpty())
+ m_ns = m_nsStack.pop();
+}
+
+QList<QXmlName> NamespaceSupport::namespaceBindings() const
+{
+ QList<QXmlName> bindings;
+
+ QHashIterator<QXmlName::PrefixCode, QXmlName::NamespaceCode> it(m_ns);
+ while (it.hasNext()) {
+ it.next();
+ bindings.append(QXmlName(it.value(), StandardLocalNames::empty, it.key()));
+ }
+
+ return bindings;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qnamespacesupport_p.h b/src/xmlpatterns/schema/qnamespacesupport_p.h
new file mode 100644
index 0000000..47c21a5
--- /dev/null
+++ b/src/xmlpatterns/schema/qnamespacesupport_p.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_NamespaceSupport_H
+#define Patternist_NamespaceSupport_H
+
+#include "qnamepool_p.h"
+
+#include <QtCore/QExplicitlySharedDataPointer>
+#include <QtCore/QHash>
+#include <QtCore/QSet>
+#include <QtCore/QStack>
+#include <QtCore/QXmlStreamNamespaceDeclarations>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A helper class for handling nested namespace declarations.
+ *
+ * This class is mostly an adaption of QXmlNamespaceSupport to the NamePool
+ * mechanism used in XmlPatterns.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class NamespaceSupport
+ {
+ public:
+ /**
+ * Describes whether the name to process is an attribute or element.
+ */
+ enum NameType
+ {
+ AttributeName, ///< An attribute name to process.
+ ElementName ///< An element name to process.
+ };
+
+ /**
+ * Creates an empty namespace support object.
+ */
+ NamespaceSupport();
+
+ /**
+ * Creates a new namespace support object.
+ *
+ * @param namePool The name pool where all processed names are stored in.
+ */
+ NamespaceSupport(const NamePool::Ptr &namePool);
+
+ /**
+ * Adds a new prefix-to-namespace binding.
+ *
+ * @param prefixCode The name pool code for the prefix.
+ * @param namespaceCode The name pool code for the namespace.
+ */
+ void setPrefix(const QXmlName::PrefixCode prefixCode, const QXmlName::NamespaceCode namespaceCode);
+
+ /**
+ * Adds the prefix-to-namespace bindings from @p declarations to
+ * the namespace support.
+ */
+ void setPrefixes(const QXmlStreamNamespaceDeclarations &declarations);
+
+ /**
+ * Sets the name pool code of the target namespace of the schema the
+ * namespace support works on.
+ */
+ void setTargetNamespace(const QXmlName::NamespaceCode code);
+
+ /**
+ * Returns the prefix code for the given namespace @p code.
+ */
+ QXmlName::PrefixCode prefix(const QXmlName::NamespaceCode code) const;
+
+ /**
+ * Returns the namespace code for the given prefix @p code.
+ */
+ QXmlName::NamespaceCode uri(const QXmlName::PrefixCode code) const;
+
+ /**
+ * Converts the given @p qualifiedName to a resolved QXmlName @p name according
+ * to the current namespace mapping.
+ *
+ * @param qualifiedName The full qualified name.
+ * @param type The type of name processing.
+ * @param name The resolved QXmlName.
+ *
+ * @returns @c true if the name could be processed correctly or @c false if the
+ * namespace prefix is unknown.
+ */
+ bool processName(const QString &qualifiedName, NameType type, QXmlName &name) const;
+
+ /**
+ * Pushes the current namespace mapping onto the stack.
+ */
+ void pushContext();
+
+ /**
+ * Pops the current namespace mapping from the stack.
+ */
+ void popContext();
+
+ /**
+ * Returns the list of namespace bindings.
+ */
+ QList<QXmlName> namespaceBindings() const;
+
+ private:
+ typedef QHash<QXmlName::PrefixCode, QXmlName::NamespaceCode> NamespaceHash;
+
+ NamePool::Ptr m_namePool;
+ QStack<NamespaceHash> m_nsStack;
+ NamespaceHash m_ns;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdalternative.cpp b/src/xmlpatterns/schema/qxsdalternative.cpp
new file mode 100644
index 0000000..ceaa34b
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdalternative.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdalternative_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdAlternative::setTest(const XsdXPathExpression::Ptr &test)
+{
+ m_test = test;
+}
+
+XsdXPathExpression::Ptr XsdAlternative::test() const
+{
+ return m_test;
+}
+
+void XsdAlternative::setType(const SchemaType::Ptr &type)
+{
+ m_type = type;
+}
+
+SchemaType::Ptr XsdAlternative::type() const
+{
+ return m_type;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdalternative_p.h b/src/xmlpatterns/schema/qxsdalternative_p.h
new file mode 100644
index 0000000..8dcfb12
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdalternative_p.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAlternative_H
+#define Patternist_XsdAlternative_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qschematype_p.h"
+#include "qxsdannotated_p.h"
+#include "qxsdxpathexpression_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD alternative object.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAlternative : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAlternative> Ptr;
+ typedef QList<XsdAlternative::Ptr> List;
+
+ /**
+ * Sets the xpath @p test of the alternative.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#tac-test">Test Definition</a>
+ */
+ void setTest(const XsdXPathExpression::Ptr &test);
+
+ /**
+ * Returns the xpath test of the alternative.
+ */
+ XsdXPathExpression::Ptr test() const;
+
+ /**
+ * Sets the @p type of the alternative.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#tac-type_definition">Type Definition</a>
+ */
+ void setType(const SchemaType::Ptr &type);
+
+ /**
+ * Returns the type of the alternative.
+ */
+ SchemaType::Ptr type() const;
+
+ private:
+ XsdXPathExpression::Ptr m_test;
+ SchemaType::Ptr m_type;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdannotated.cpp b/src/xmlpatterns/schema/qxsdannotated.cpp
new file mode 100644
index 0000000..d9d89f6
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdannotated.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdannotated_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdAnnotated::addAnnotation(const XsdAnnotation::Ptr &annotation)
+{
+ m_annotations.append(annotation);
+}
+
+void XsdAnnotated::addAnnotations(const XsdAnnotation::List &annotations)
+{
+ m_annotations << annotations;
+}
+
+XsdAnnotation::List XsdAnnotated::annotations() const
+{
+ return m_annotations;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdannotated_p.h b/src/xmlpatterns/schema/qxsdannotated_p.h
new file mode 100644
index 0000000..05010d9
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdannotated_p.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAnnotated_H
+#define Patternist_XsdAnnotated_H
+
+#include "qxsdannotation_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Base class for all XSD components with annotation content.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAnnotated
+ {
+ public:
+ /**
+ * Adds a new @p annotation to the component.
+ */
+ void addAnnotation(const XsdAnnotation::Ptr &annotation);
+
+ /**
+ * Adds a list of new @p annotations to the component.
+ */
+ void addAnnotations(const XsdAnnotation::List &annotations);
+
+ /**
+ * Returns the list of all annotations of the component.
+ */
+ XsdAnnotation::List annotations() const;
+
+ private:
+ XsdAnnotation::List m_annotations;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdannotation.cpp b/src/xmlpatterns/schema/qxsdannotation.cpp
new file mode 100644
index 0000000..d53e3b6
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdannotation.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdannotation_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdAnnotation::setId(const DerivedString<TypeID>::Ptr &id)
+{
+ m_id = id;
+}
+
+DerivedString<TypeID>::Ptr XsdAnnotation::id() const
+{
+ return m_id;
+}
+
+void XsdAnnotation::addApplicationInformation(const XsdApplicationInformation::Ptr &information)
+{
+ m_applicationInformation.append(information);
+}
+
+XsdApplicationInformation::List XsdAnnotation::applicationInformation() const
+{
+ return m_applicationInformation;
+}
+
+void XsdAnnotation::addDocumentation(const XsdDocumentation::Ptr &documentation)
+{
+ m_documentations.append(documentation);
+}
+
+XsdDocumentation::List XsdAnnotation::documentation() const
+{
+ return m_documentations;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdannotation_p.h b/src/xmlpatterns/schema/qxsdannotation_p.h
new file mode 100644
index 0000000..27fb555
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdannotation_p.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAnnotation_H
+#define Patternist_XsdAnnotation_H
+
+#include "qderivedstring_p.h"
+#include "qxsdapplicationinformation_p.h"
+#include "qxsddocumentation_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD annotation object.
+ *
+ * This class represents the <em>annotation</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cAnnotations">here</a>.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAnnotation : public NamedSchemaComponent
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAnnotation> Ptr;
+ typedef QList<XsdAnnotation::Ptr> List;
+
+ /**
+ * Sets the @p id of the annotation.
+ */
+ void setId(const DerivedString<TypeID>::Ptr &id);
+
+ /**
+ * Returns the @p id of the annotation.
+ */
+ DerivedString<TypeID>::Ptr id() const;
+
+ /**
+ * Adds an application @p information to the annotation.
+ *
+ * The application information is meant to be interpreted by
+ * a software system, e.g. other parts of the XML processor pipeline.
+ */
+ void addApplicationInformation(const XsdApplicationInformation::Ptr &information);
+
+ /**
+ * Returns the list of all application information of the annotation.
+ */
+ XsdApplicationInformation::List applicationInformation() const;
+
+ /**
+ * Adds a @p documentation to the annotation.
+ *
+ * The documentation is meant to be read by human being, e.g. additional
+ * constraints or information about schema components.
+ */
+ void addDocumentation(const XsdDocumentation::Ptr &documentation);
+
+ /**
+ * Returns the list of all documentations of the annotation.
+ */
+ XsdDocumentation::List documentation() const;
+
+ private:
+ DerivedString<TypeID>::Ptr m_id;
+ XsdApplicationInformation::List m_applicationInformation;
+ XsdDocumentation::List m_documentations;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdapplicationinformation.cpp b/src/xmlpatterns/schema/qxsdapplicationinformation.cpp
new file mode 100644
index 0000000..46d6d56
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdapplicationinformation.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdapplicationinformation_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdApplicationInformation::setSource(const AnyURI::Ptr &source)
+{
+ m_source = source;
+}
+
+AnyURI::Ptr XsdApplicationInformation::source() const
+{
+ return m_source;
+}
+
+void XsdApplicationInformation::setContent(const QString &content)
+{
+ m_content = content;
+}
+
+QString XsdApplicationInformation::content() const
+{
+ return m_content;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdapplicationinformation_p.h b/src/xmlpatterns/schema/qxsdapplicationinformation_p.h
new file mode 100644
index 0000000..2eec83a
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdapplicationinformation_p.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdApplicationInformation_H
+#define Patternist_XsdApplicationInformation_H
+
+#include "qanytype_p.h"
+#include "qanyuri_p.h"
+#include "qnamedschemacomponent_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD appinfo object.
+ *
+ * This class represents the <em>appinfo</em> component of an <em>annotation</em> object
+ * of a XML schema as described <a href="http://www.w3.org/TR/xmlschema11-1/#cAnnotations">here</a>.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdApplicationInformation : public NamedSchemaComponent
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdApplicationInformation> Ptr;
+ typedef QList<XsdApplicationInformation::Ptr> List;
+
+ /**
+ * Sets the @p source of the application information.
+ *
+ * The source points to an URL that contains more
+ * information.
+ */
+ void setSource(const AnyURI::Ptr &source);
+
+ /**
+ * Returns the source of the application information.
+ */
+ AnyURI::Ptr source() const;
+
+ /**
+ * Sets the @p content of the application information.
+ *
+ * The content can be of abritrary type.
+ */
+ void setContent(const QString &content);
+
+ /**
+ * Returns the content of the application information.
+ */
+ QString content() const;
+
+ private:
+ AnyURI::Ptr m_source;
+ QString m_content;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdassertion.cpp b/src/xmlpatterns/schema/qxsdassertion.cpp
new file mode 100644
index 0000000..8898bd2
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdassertion.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdassertion_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdAssertion::setTest(const XsdXPathExpression::Ptr &test)
+{
+ m_test = test;
+}
+
+XsdXPathExpression::Ptr XsdAssertion::test() const
+{
+ return m_test;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdassertion_p.h b/src/xmlpatterns/schema/qxsdassertion_p.h
new file mode 100644
index 0000000..56674e5
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdassertion_p.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAssertion_H
+#define Patternist_XsdAssertion_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+#include "qxsdxpathexpression_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD assertion object.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#cAssertions">Assertion Definition</a>
+ */
+ class XsdAssertion : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAssertion> Ptr;
+ typedef QList<XsdAssertion::Ptr> List;
+
+ /**
+ * Sets the @p test of the assertion.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#as-test">Test Definition</a>
+ */
+ void setTest(const XsdXPathExpression::Ptr &test);
+
+ /**
+ * Returns the test of the assertion.
+ */
+ XsdXPathExpression::Ptr test() const;
+
+ private:
+ XsdXPathExpression::Ptr m_test;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdattribute.cpp b/src/xmlpatterns/schema/qxsdattribute.cpp
new file mode 100644
index 0000000..7fd883e
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattribute.cpp
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdattribute_p.h"
+#include "qxsdcomplextype_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+
+void XsdAttribute::Scope::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdAttribute::Scope::Variety XsdAttribute::Scope::variety() const
+{
+ return m_variety;
+}
+
+void XsdAttribute::Scope::setParent(const NamedSchemaComponent::Ptr &parent)
+{
+ m_parent = parent;
+}
+
+NamedSchemaComponent::Ptr XsdAttribute::Scope::parent() const
+{
+ return m_parent;
+}
+
+void XsdAttribute::ValueConstraint::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdAttribute::ValueConstraint::Variety XsdAttribute::ValueConstraint::variety() const
+{
+ return m_variety;
+}
+
+void XsdAttribute::ValueConstraint::setValue(const QString &value)
+{
+ m_value = value;
+}
+
+QString XsdAttribute::ValueConstraint::value() const
+{
+ return m_value;
+}
+
+void XsdAttribute::ValueConstraint::setLexicalForm(const QString &form)
+{
+ m_lexicalForm = form;
+}
+
+QString XsdAttribute::ValueConstraint::lexicalForm() const
+{
+ return m_lexicalForm;
+}
+
+void XsdAttribute::setType(const AnySimpleType::Ptr &type)
+{
+ m_type = type;
+}
+
+AnySimpleType::Ptr XsdAttribute::type() const
+{
+ return m_type;
+}
+
+void XsdAttribute::setScope(const Scope::Ptr &scope)
+{
+ m_scope = scope;
+}
+
+XsdAttribute::Scope::Ptr XsdAttribute::scope() const
+{
+ return m_scope;
+}
+
+void XsdAttribute::setValueConstraint(const ValueConstraint::Ptr &constraint)
+{
+ m_valueConstraint = constraint;
+}
+
+XsdAttribute::ValueConstraint::Ptr XsdAttribute::valueConstraint() const
+{
+ return m_valueConstraint;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdattribute_p.h b/src/xmlpatterns/schema/qxsdattribute_p.h
new file mode 100644
index 0000000..220dd28
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattribute_p.h
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAttribute_H
+#define Patternist_XsdAttribute_H
+
+#include "qanysimpletype_p.h"
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD attribute object.
+ *
+ * This class represents the <em>attribute</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cAttribute_Declarations">here</a>.
+ *
+ * It contains information from either a top-level attribute declaration (as child of
+ * a <em>schema</em> object) or of a local attribute declaration (as child of <em>complexType</em>
+ * or <em>attributeGroup</em> object without a 'ref' attribute).
+ *
+ * All other occurrences of the <em>attribute</em> object are represented by the XsdAttributeUse class.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSAttributeDeclaration">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAttribute : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAttribute> Ptr;
+ typedef QList<XsdAttribute::Ptr> List;
+
+ /**
+ * @short Describes the scope of an attribute.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#sc_a">Scope Definition</a>
+ */
+ class Scope : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<Scope> Ptr;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#ad-scope">scope</a> of an attribute.
+ */
+ enum Variety
+ {
+ Global, ///< The attribute is defined globally as child of the <em>schema</em> object.
+ Local ///< The attribute is defined locally as child of a complex type or attribute group definition.
+ };
+
+ /**
+ * Sets the @p variety of the attribute scope.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#sc_a-variety">Variety Definition</a>
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the attribute scope.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the @p parent complex type or attribute group definition of the attribute scope.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#sc_a-parent">Parent Definition</a>
+ */
+ void setParent(const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * Returns the parent complex type or attribute group definition of the attribute scope.
+ */
+ NamedSchemaComponent::Ptr parent() const;
+
+ private:
+ Variety m_variety;
+ NamedSchemaComponent::Ptr m_parent;
+ };
+
+
+ /**
+ * @short Describes the value constraint of an attribute.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#vc_a">Value Constraint Definition</a>
+ */
+ class ValueConstraint : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<ValueConstraint> Ptr;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#ad-value_constraint">value constraint</a> of an attribute.
+ */
+ enum Variety
+ {
+ Default, ///< The attribute has a default value set.
+ Fixed ///< The attribute has a fixed value set.
+ };
+
+ /**
+ * Sets the @p variety of the attribute value constraint.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#vc_a-variety">Variety Definition</a>
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the attribute value constraint.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the @p value of the constraint.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#vc_a-value">Value Definition</a>
+ */
+ void setValue(const QString &value);
+
+ /**
+ * Returns the value of the constraint.
+ */
+ QString value() const;
+
+ /**
+ * Sets the lexical @p form of the constraint.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#vc_a-lexical_form">Lexical Form Definition</a>
+ */
+ void setLexicalForm(const QString &form);
+
+ /**
+ * Returns the lexical form of the constraint.
+ */
+ QString lexicalForm() const;
+
+ private:
+ Variety m_variety;
+ QString m_value;
+ QString m_lexicalForm;
+ };
+
+ /**
+ * Sets the simple @p type definition of the attribute.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ad-type_definition">Simple Type Definition</a>
+ */
+ void setType(const AnySimpleType::Ptr &type);
+
+ /**
+ * Returns the simple type definition of the attribute.
+ */
+ AnySimpleType::Ptr type() const;
+
+ /**
+ * Sets the @p scope of the attribute.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ad-scope">Scope Definition</a>
+ */
+ void setScope(const Scope::Ptr &scope);
+
+ /**
+ * Returns the scope of the attribute.
+ */
+ Scope::Ptr scope() const;
+
+ /**
+ * Sets the value @p constraint of the attribute.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ad-value_constraint">Value Constraint Definition</a>
+ */
+ void setValueConstraint(const ValueConstraint::Ptr &constraint);
+
+ /**
+ * Returns the value constraint of the attribute.
+ */
+ ValueConstraint::Ptr valueConstraint() const;
+
+ private:
+ AnySimpleType::Ptr m_type;
+ Scope::Ptr m_scope;
+ ValueConstraint::Ptr m_valueConstraint;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdattributegroup.cpp b/src/xmlpatterns/schema/qxsdattributegroup.cpp
new file mode 100644
index 0000000..ff62ef5
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributegroup.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdattributegroup_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdAttributeGroup::setAttributeUses(const XsdAttributeUse::List &attributeUses)
+{
+ m_attributeUses = attributeUses;
+}
+
+void XsdAttributeGroup::addAttributeUse(const XsdAttributeUse::Ptr &attributeUse)
+{
+ m_attributeUses.append(attributeUse);
+}
+
+XsdAttributeUse::List XsdAttributeGroup::attributeUses() const
+{
+ return m_attributeUses;
+}
+
+void XsdAttributeGroup::setWildcard(const XsdWildcard::Ptr &wildcard)
+{
+ m_wildcard = wildcard;
+}
+
+XsdWildcard::Ptr XsdAttributeGroup::wildcard() const
+{
+ return m_wildcard;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdattributegroup_p.h b/src/xmlpatterns/schema/qxsdattributegroup_p.h
new file mode 100644
index 0000000..3684df2
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributegroup_p.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAttributeGroup_H
+#define Patternist_XsdAttributeGroup_H
+
+#include "qxsdannotated_p.h"
+#include "qxsdattributeuse_p.h"
+#include "qxsdwildcard_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents the XSD attributeGroup object.
+ *
+ * This class represents the <em>attributeGroup</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cAttribute_Group_Definitions">here</a>.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSAttributeGroup">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAttributeGroup : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAttributeGroup> Ptr;
+ typedef QList<XsdAttributeGroup::Ptr> List;
+
+ /**
+ * Sets the list of attribute @p uses that are defined in the attribute group.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#agd-attribute_uses">Attribute Uses</a>
+ */
+ void setAttributeUses(const XsdAttributeUse::List &uses);
+
+ /**
+ * Adds a new attribute @p use to the attribute group.
+ */
+ void addAttributeUse(const XsdAttributeUse::Ptr &use);
+
+ /**
+ * Returns the list of all attribute uses of the attribute group.
+ */
+ XsdAttributeUse::List attributeUses() const;
+
+ /**
+ * Sets the attribute @p wildcard of the attribute group.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#agd-attribute_wildcard">Attribute Wildcard</a>
+ */
+ void setWildcard(const XsdWildcard::Ptr &wildcard);
+
+ /**
+ * Returns the attribute wildcard of the attribute group.
+ */
+ XsdWildcard::Ptr wildcard() const;
+
+ private:
+ XsdAttributeUse::List m_attributeUses;
+ XsdWildcard::Ptr m_wildcard;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdattributereference.cpp b/src/xmlpatterns/schema/qxsdattributereference.cpp
new file mode 100644
index 0000000..0b3ce03
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributereference.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdattributereference_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+bool XsdAttributeReference::isAttributeUse() const
+{
+ return false;
+}
+
+bool XsdAttributeReference::isReference() const
+{
+ return true;
+}
+
+void XsdAttributeReference::setType(Type type)
+{
+ m_type = type;
+}
+
+XsdAttributeReference::Type XsdAttributeReference::type() const
+{
+ return m_type;
+}
+
+void XsdAttributeReference::setReferenceName(const QXmlName &referenceName)
+{
+ m_referenceName = referenceName;
+}
+
+QXmlName XsdAttributeReference::referenceName() const
+{
+ return m_referenceName;
+}
+
+void XsdAttributeReference::setSourceLocation(const QSourceLocation &location)
+{
+ m_sourceLocation = location;
+}
+
+QSourceLocation XsdAttributeReference::sourceLocation() const
+{
+ return m_sourceLocation;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdattributereference_p.h b/src/xmlpatterns/schema/qxsdattributereference_p.h
new file mode 100644
index 0000000..0d2bdc1
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributereference_p.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAttributeReference_H
+#define Patternist_XsdAttributeReference_H
+
+#include "qxsdattributeuse_p.h"
+
+#include <QtXmlPatterns/QSourceLocation>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A helper class for attribute reference resolving.
+ *
+ * For easy resolving of attribute references, we have this class
+ * that can be used as a place holder for the real attribute use
+ * object it is referring to.
+ * So whenever the parser detects an attribute reference, it creates
+ * a XsdAttributeReference and returns it instead of the XsdAttributeUse.
+ * During a later phase, the resolver will look for all XsdAttributeReferences
+ * in the schema and will replace them with their referring XsdAttributeUse
+ * objects.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAttributeReference : public XsdAttributeUse
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAttributeReference> Ptr;
+
+ /**
+ * Describes the type of the attribute reference.
+ */
+ enum Type
+ {
+ AttributeUse, ///< The reference points to an attribute use.
+ AttributeGroup ///< The reference points to an attribute group.
+ };
+
+ /**
+ * Always returns false, used to avoid dynamic casts.
+ */
+ virtual bool isAttributeUse() const;
+
+ /**
+ * Always returns true, used to avoid dynamic casts.
+ */
+ virtual bool isReference() const;
+
+ /**
+ * Sets the @p type of the attribute reference.
+ */
+ void setType(Type type);
+
+ /**
+ * Returns the type of the attribute reference.
+ */
+ Type type() const;
+
+ /**
+ * Sets the @p name of the attribute or attribute group the
+ * attribute reference refers to.
+ */
+ void setReferenceName(const QXmlName &name);
+
+ /**
+ * Returns the name of the attribute or attribute group the
+ * attribute reference refers to.
+ */
+ QXmlName referenceName() const;
+
+ /**
+ * Sets the source @p location where the reference is located.
+ */
+ void setSourceLocation(const QSourceLocation &location);
+
+ /**
+ * Returns the source location where the reference is located.
+ */
+ QSourceLocation sourceLocation() const;
+
+ private:
+ Type m_type;
+ QXmlName m_referenceName;
+ QSourceLocation m_sourceLocation;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdattributeterm.cpp b/src/xmlpatterns/schema/qxsdattributeterm.cpp
new file mode 100644
index 0000000..78ddd2f
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributeterm.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdattributeterm_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+bool XsdAttributeTerm::isAttributeUse() const
+{
+ return false;
+}
+
+bool XsdAttributeTerm::isReference() const
+{
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdattributeterm_p.h b/src/xmlpatterns/schema/qxsdattributeterm_p.h
new file mode 100644
index 0000000..4852d46
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributeterm_p.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAttributeTerm_H
+#define Patternist_XsdAttributeTerm_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A base class for all attribute types.
+ *
+ * For easy resolving of attribute references, we use this as
+ * common base class for XsdAttribute and XsdAttributeReference.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAttributeTerm : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAttributeTerm> Ptr;
+
+ /**
+ * Returns @c true if the term is an attribute use, @c false otherwise.
+ */
+ virtual bool isAttributeUse() const;
+
+ /**
+ * Returns @c true if the term is an attribute use reference, @c false otherwise.
+ *
+ * @note The reference term is only used internally as helper during type resolving.
+ */
+ virtual bool isReference() const;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdattributeuse.cpp b/src/xmlpatterns/schema/qxsdattributeuse.cpp
new file mode 100644
index 0000000..d241167
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributeuse.cpp
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdattributeuse_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdAttributeUse::ValueConstraint::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdAttributeUse::ValueConstraint::Variety XsdAttributeUse::ValueConstraint::variety() const
+{
+ return m_variety;
+}
+
+void XsdAttributeUse::ValueConstraint::setValue(const QString &value)
+{
+ m_value = value;
+}
+
+QString XsdAttributeUse::ValueConstraint::value() const
+{
+ return m_value;
+}
+
+void XsdAttributeUse::ValueConstraint::setLexicalForm(const QString &form)
+{
+ m_lexicalForm = form;
+}
+
+QString XsdAttributeUse::ValueConstraint::lexicalForm() const
+{
+ return m_lexicalForm;
+}
+
+XsdAttributeUse::ValueConstraint::Ptr XsdAttributeUse::ValueConstraint::fromAttributeValueConstraint(const XsdAttribute::ValueConstraint::Ptr &constraint)
+{
+ XsdAttributeUse::ValueConstraint::Ptr newConstraint(new XsdAttributeUse::ValueConstraint());
+ switch (constraint->variety()) {
+ case XsdAttribute::ValueConstraint::Fixed: newConstraint->setVariety(Fixed); break;
+ case XsdAttribute::ValueConstraint::Default: newConstraint->setVariety(Default); break;
+ }
+ newConstraint->setValue(constraint->value());
+ newConstraint->setLexicalForm(constraint->lexicalForm());
+
+ return newConstraint;
+}
+
+XsdAttributeUse::XsdAttributeUse()
+ : m_useType(OptionalUse)
+{
+}
+
+bool XsdAttributeUse::isAttributeUse() const
+{
+ return true;
+}
+
+void XsdAttributeUse::setUseType(UseType type)
+{
+ m_useType = type;
+}
+
+XsdAttributeUse::UseType XsdAttributeUse::useType() const
+{
+ return m_useType;
+}
+
+bool XsdAttributeUse::isRequired() const
+{
+ return (m_useType == RequiredUse);
+}
+
+void XsdAttributeUse::setAttribute(const XsdAttribute::Ptr &attribute)
+{
+ m_attribute = attribute;
+}
+
+XsdAttribute::Ptr XsdAttributeUse::attribute() const
+{
+ return m_attribute;
+}
+
+void XsdAttributeUse::setValueConstraint(const ValueConstraint::Ptr &constraint)
+{
+ m_valueConstraint = constraint;
+}
+
+XsdAttributeUse::ValueConstraint::Ptr XsdAttributeUse::valueConstraint() const
+{
+ return m_valueConstraint;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdattributeuse_p.h b/src/xmlpatterns/schema/qxsdattributeuse_p.h
new file mode 100644
index 0000000..eb1dc40
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdattributeuse_p.h
@@ -0,0 +1,224 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdAttributeUse_H
+#define Patternist_XsdAttributeUse_H
+
+#include "qxsdattribute_p.h"
+#include "qxsdattributeterm_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD attribute use object.
+ *
+ * This class represents the <em>attribute use</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cAttributeUse">here</a>.
+ *
+ * It contains information from a local attribute declaration (as child of <em>complexType</em>
+ * or <em>attributeGroup</em> object).
+ *
+ * All other occurrences of the <em>attribute</em> object are represented by the XsdAttribute class.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSAttributeUse">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdAttributeUse : public XsdAttributeTerm
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdAttributeUse> Ptr;
+ typedef QList<XsdAttributeUse::Ptr> List;
+
+ /**
+ * Describes the value constraint of an attribute use.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#vc_au">Value Constraint Definition</a>
+ */
+ class ValueConstraint : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<ValueConstraint> Ptr;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#au-value_constraint">value constraint</a> of an attribute use.
+ */
+ enum Variety
+ {
+ Default, ///< The attribute use has a default value set.
+ Fixed ///< The attribute use has a fixed value set.
+ };
+
+ /**
+ * Sets the @p variety of the attribute use value constraint.
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the attribute use value constraint.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the @p value of the constraint.
+ */
+ void setValue(const QString &value);
+
+ /**
+ * Returns the value of the constraint.
+ */
+ QString value() const;
+
+ /**
+ * Sets the lexical @p form of the constraint.
+ */
+ void setLexicalForm(const QString &form);
+
+ /**
+ * Returns the lexical form of the constraint.
+ */
+ QString lexicalForm() const;
+
+ /**
+ * Creates a new value constraint from a XsdAttribute::ValueConstraint.
+ */
+ static ValueConstraint::Ptr fromAttributeValueConstraint(const XsdAttribute::ValueConstraint::Ptr &constraint);
+
+ private:
+ Variety m_variety;
+ QString m_value;
+ QString m_lexicalForm;
+ };
+
+ /**
+ * Describes the use type of the attribute use.
+ */
+ enum UseType
+ {
+ OptionalUse, ///< The attribute can be there but doesn't need to.
+ RequiredUse, ///< The attribute must be there.
+ ProhibitedUse ///< The attribute is not allowed to be there.
+ };
+
+ /**
+ * Creates a new attribute use object.
+ */
+ XsdAttributeUse();
+
+ /**
+ * Always returns true, used to avoid dynamic casts.
+ */
+ virtual bool isAttributeUse() const;
+
+ /**
+ * Sets the use @p type of the attribute use.
+ *
+ * @see UseType
+ */
+ void setUseType(UseType type);
+
+ /**
+ * Returns the use type of the attribute use.
+ */
+ UseType useType() const;
+
+ /**
+ * Returns whether the attribute use is required.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#au-required">Required Definition</a>
+ */
+ bool isRequired() const;
+
+ /**
+ * Sets the @p attribute the attribute use is referring to.
+ * That is either a local definition as child of a complexType
+ * or attributeGroup object, or a reference defined by the
+ * 'ref' attribute.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#au-attribute_declaration">Attribute Declaration</a>
+ */
+ void setAttribute(const XsdAttribute::Ptr &attribute);
+
+ /**
+ * Returns the attribute the attribute use is referring to.
+ */
+ XsdAttribute::Ptr attribute() const;
+
+ /**
+ * Sets the value @p constraint of the attribute use.
+ *
+ * @see http://www.w3.org/TR/xmlschema11-1/#vc_au
+ */
+ void setValueConstraint(const ValueConstraint::Ptr &constraint);
+
+ /**
+ * Returns the value constraint of the attribute use.
+ */
+ ValueConstraint::Ptr valueConstraint() const;
+
+ private:
+ UseType m_useType;
+ XsdAttribute::Ptr m_attribute;
+ ValueConstraint::Ptr m_valueConstraint;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdcomplextype.cpp b/src/xmlpatterns/schema/qxsdcomplextype.cpp
new file mode 100644
index 0000000..0ecca9e
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdcomplextype.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdcomplextype_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdComplexType::OpenContent::setMode(Mode mode)
+{
+ m_mode = mode;
+}
+
+XsdComplexType::OpenContent::Mode XsdComplexType::OpenContent::mode() const
+{
+ return m_mode;
+}
+
+void XsdComplexType::OpenContent::setWildcard(const XsdWildcard::Ptr &wildcard)
+{
+ m_wildcard = wildcard;
+}
+
+XsdWildcard::Ptr XsdComplexType::OpenContent::wildcard() const
+{
+ return m_wildcard;
+}
+
+void XsdComplexType::ContentType::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdComplexType::ContentType::Variety XsdComplexType::ContentType::variety() const
+{
+ return m_variety;
+}
+
+void XsdComplexType::ContentType::setParticle(const XsdParticle::Ptr &particle)
+{
+ m_particle = particle;
+}
+
+XsdParticle::Ptr XsdComplexType::ContentType::particle() const
+{
+ return m_particle;
+}
+
+void XsdComplexType::ContentType::setOpenContent(const OpenContent::Ptr &content)
+{
+ m_openContent = content;
+}
+
+XsdComplexType::OpenContent::Ptr XsdComplexType::ContentType::openContent() const
+{
+ return m_openContent;
+}
+
+void XsdComplexType::ContentType::setSimpleType(const AnySimpleType::Ptr &type)
+{
+ m_simpleType = type;
+}
+
+AnySimpleType::Ptr XsdComplexType::ContentType::simpleType() const
+{
+ return m_simpleType;
+}
+
+
+XsdComplexType::XsdComplexType()
+ : m_isAbstract(false)
+ , m_contentType(new ContentType())
+{
+ m_contentType->setVariety(ContentType::Empty);
+}
+
+void XsdComplexType::setIsAbstract(bool abstract)
+{
+ m_isAbstract = abstract;
+}
+
+bool XsdComplexType::isAbstract() const
+{
+ return m_isAbstract;
+}
+
+QString XsdComplexType::displayName(const NamePool::Ptr &np) const
+{
+ return np->displayName(name(np));
+}
+
+void XsdComplexType::setWxsSuperType(const SchemaType::Ptr &type)
+{
+ m_superType = type;
+}
+
+SchemaType::Ptr XsdComplexType::wxsSuperType() const
+{
+ return m_superType;
+}
+
+void XsdComplexType::setContext(const NamedSchemaComponent::Ptr &component)
+{
+ m_context = component;
+}
+
+NamedSchemaComponent::Ptr XsdComplexType::context() const
+{
+ return m_context;
+}
+
+void XsdComplexType::setContentType(const ContentType::Ptr &type)
+{
+ m_contentType = type;
+}
+
+XsdComplexType::ContentType::Ptr XsdComplexType::contentType() const
+{
+ return m_contentType;
+}
+
+void XsdComplexType::setAttributeUses(const XsdAttributeUse::List &attributeUses)
+{
+ m_attributeUses = attributeUses;
+}
+
+void XsdComplexType::addAttributeUse(const XsdAttributeUse::Ptr &attributeUse)
+{
+ m_attributeUses.append(attributeUse);
+}
+
+XsdAttributeUse::List XsdComplexType::attributeUses() const
+{
+ return m_attributeUses;
+}
+
+void XsdComplexType::setAttributeWildcard(const XsdWildcard::Ptr &wildcard)
+{
+ m_attributeWildcard = wildcard;
+}
+
+XsdWildcard::Ptr XsdComplexType::attributeWildcard() const
+{
+ return m_attributeWildcard;
+}
+
+XsdComplexType::TypeCategory XsdComplexType::category() const
+{
+ return ComplexType;
+}
+
+void XsdComplexType::setDerivationMethod(DerivationMethod method)
+{
+ m_derivationMethod = method;
+}
+
+XsdComplexType::DerivationMethod XsdComplexType::derivationMethod() const
+{
+ return m_derivationMethod;
+}
+
+void XsdComplexType::setProhibitedSubstitutions(const BlockingConstraints &substitutions)
+{
+ m_prohibitedSubstitutions = substitutions;
+}
+
+XsdComplexType::BlockingConstraints XsdComplexType::prohibitedSubstitutions() const
+{
+ return m_prohibitedSubstitutions;
+}
+
+void XsdComplexType::setAssertions(const XsdAssertion::List &assertions)
+{
+ m_assertions = assertions;
+}
+
+void XsdComplexType::addAssertion(const XsdAssertion::Ptr &assertion)
+{
+ m_assertions.append(assertion);
+}
+
+XsdAssertion::List XsdComplexType::assertions() const
+{
+ return m_assertions;
+}
+
+bool XsdComplexType::isDefinedBySchema() const
+{
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdcomplextype_p.h b/src/xmlpatterns/schema/qxsdcomplextype_p.h
new file mode 100644
index 0000000..ad04f99
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdcomplextype_p.h
@@ -0,0 +1,404 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdComplexType_H
+#define Patternist_XsdComplexType_H
+
+#include "qanytype_p.h"
+#include "qxsdassertion_p.h"
+#include "qxsdattributeuse_p.h"
+#include "qxsdparticle_p.h"
+#include "qxsdsimpletype_p.h"
+#include "qxsduserschematype_p.h"
+#include "qxsdwildcard_p.h"
+
+#include <QtCore/QSet>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD complexType object.
+ *
+ * This class represents the <em>complexType</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#Complex_Type_Definitions">here</a>.
+ *
+ * It contains information from either a top-level complex type declaration (as child of a <em>schema</em> object)
+ * or a local complex type declaration (as descendant of an <em>element</em> object).
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSComplexType">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdComplexType : public XsdUserSchemaType<AnyType>
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdComplexType> Ptr;
+
+ /**
+ * @short Describes the open content object of a complex type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ct-open_content">Open Content Definition</a>
+ */
+ class OpenContent : public QSharedData, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<OpenContent> Ptr;
+
+ /**
+ * Describes the mode of the open content.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#oc-mode">Mode Definition</a>
+ */
+ enum Mode
+ {
+ None,
+ Interleave,
+ Suffix
+ };
+
+ /**
+ * Sets the @p mode of the open content.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#oc-mode">Mode Definition</a>
+ */
+ void setMode(Mode mode);
+
+ /**
+ * Returns the mode of the open content.
+ */
+ Mode mode() const;
+
+ /**
+ * Sets the @p wildcard of the open content.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#oc-wildcard">Wildcard Definition</a>
+ */
+ void setWildcard(const XsdWildcard::Ptr &wildcard);
+
+ /**
+ * Returns the wildcard of the open content.
+ */
+ XsdWildcard::Ptr wildcard() const;
+
+ private:
+ Mode m_mode;
+ XsdWildcard::Ptr m_wildcard;
+ };
+
+ /**
+ * @short Describes the content type of a complex type.
+ */
+ class ContentType : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<ContentType> Ptr;
+
+ /**
+ * Describes the variety of the content type.
+ */
+ enum Variety
+ {
+ Empty = 0, ///< The complex type has no further content.
+ Simple, ///< The complex type has only simple type content (e.g. text, number etc.)
+ ElementOnly, ///< The complex type has further elements or attributes but no text as content.
+ Mixed ///< The complex type has further elements or attributes and text as content.
+ };
+
+ /**
+ * Sets the @p variety of the content type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ct-variety">Variety Definition</a>
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the content type.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the @p particle object of the content type.
+ *
+ * The content type has only a particle object if
+ * its variety is ElementOnly or Mixed.
+ *
+ * @see XsdParticle
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ct-particle">Particle Declaration</a>
+ */
+ void setParticle(const XsdParticle::Ptr &particle);
+
+ /**
+ * Returns the particle object of the content type,
+ * or an empty pointer if its variety is neither
+ * ElementOnly nor Mixed.
+ */
+ XsdParticle::Ptr particle() const;
+
+ /**
+ * Sets the open @p content object of the content type.
+ *
+ * The content type has only an open content object if
+ * its variety is ElementOnly or Mixed.
+ *
+ * @see OpenContent
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ct-open_content">Open Content Declaration</a>
+ */
+ void setOpenContent(const OpenContent::Ptr &content);
+
+ /**
+ * Returns the open content object of the content type,
+ * or an empty pointer if its variety is neither
+ * ElementOnly nor Mixed.
+ */
+ OpenContent::Ptr openContent() const;
+
+ /**
+ * Sets the simple @p type object of the content type.
+ *
+ * The content type has only a simple type object if
+ * its variety is Simple.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ct-simple_type_definition">Simple Type Definition</a>
+ */
+ void setSimpleType(const AnySimpleType::Ptr &type);
+
+ /**
+ * Returns the simple type object of the content type,
+ * or an empty pointer if its variety is not Simple.
+ */
+ AnySimpleType::Ptr simpleType() const;
+
+ private:
+ Variety m_variety;
+ XsdParticle::Ptr m_particle;
+ OpenContent::Ptr m_openContent;
+ XsdSimpleType::Ptr m_simpleType;
+ };
+
+
+ /**
+ * Creates a complex type object with empty content.
+ */
+ XsdComplexType();
+
+ /**
+ * Destroys the complex type object.
+ */
+ ~XsdComplexType() {};
+
+ /**
+ * Returns the display name of the complex type.
+ *
+ * The display name can be used to show the type name
+ * to the user.
+ *
+ * @param namePool The name pool where the type name is stored in.
+ */
+ virtual QString displayName(const NamePool::Ptr &namePool) const;
+
+ /**
+ * Sets the base type of the complex type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-base_type_definition">Base Type Definition</a>
+ */
+ void setWxsSuperType(const SchemaType::Ptr &type);
+
+ /**
+ * Returns the base type of the complex type.
+ */
+ virtual SchemaType::Ptr wxsSuperType() const;
+
+ /**
+ * Sets the context @p component of the complex type.
+ *
+ * The component is either an element declaration or a complex type definition.
+ */
+ void setContext(const NamedSchemaComponent::Ptr &component);
+
+ /**
+ * Returns the context component of the complex type.
+ */
+ NamedSchemaComponent::Ptr context() const;
+
+ /**
+ * Sets the derivation @p method of the complex type.
+ *
+ * The derivation method depends on whether the complex
+ * type object has an extension or restriction object as child.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-derivation_method">Derivation Method Definition</a>
+ * @see DerivationMethod
+ */
+ void setDerivationMethod(DerivationMethod method);
+
+ /**
+ * Returns the derivation method of the complex type.
+ */
+ virtual DerivationMethod derivationMethod() const;
+
+ /**
+ * Sets whether the complex type is @p abstract.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-abstract">Abstract Definition</a>
+ */
+ void setIsAbstract(bool abstract);
+
+ /**
+ * Returns whether the complex type is abstract.
+ */
+ virtual bool isAbstract() const;
+
+ /**
+ * Sets the list of all attribute @p uses of the complex type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-attribute_uses">Attribute Uses Declaration</a>
+ */
+ void setAttributeUses(const XsdAttributeUse::List &uses);
+
+ /**
+ * Adds a new attribute @p use to the complex type.
+ */
+ void addAttributeUse(const XsdAttributeUse::Ptr &use);
+
+ /**
+ * Returns the list of all attribute uses of the complex type.
+ */
+ XsdAttributeUse::List attributeUses() const;
+
+ /**
+ * Sets the attribute @p wildcard of the complex type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-attribute_wildcard">Attribute Wildcard Declaration</a>
+ */
+ void setAttributeWildcard(const XsdWildcard::Ptr &wildcard);
+
+ /**
+ * Returns the attribute wildcard of the complex type.
+ */
+ XsdWildcard::Ptr attributeWildcard() const;
+
+ /**
+ * Always returns SchemaType::ComplexType
+ */
+ virtual TypeCategory category() const;
+
+ /**
+ * Sets the content @p type of the complex type.
+ *
+ * @see ContentType
+ */
+ void setContentType(const ContentType::Ptr &type);
+
+ /**
+ * Returns the content type of the complex type.
+ */
+ ContentType::Ptr contentType() const;
+
+ /**
+ * Sets the prohibited @p substitutions of the complex type.
+ *
+ * Only ExtensionConstraint and RestrictionConstraint are allowed.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-prohibited_substitutions">Prohibited Substitutions Definition</a>
+ */
+ void setProhibitedSubstitutions(const BlockingConstraints &substitutions);
+
+ /**
+ * Returns the prohibited substitutions of the complex type.
+ */
+ BlockingConstraints prohibitedSubstitutions() const;
+
+ /**
+ * Sets the @p assertions of the complex type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-assertions">Assertions Definition</a>
+ */
+ void setAssertions(const XsdAssertion::List &assertions);
+
+ /**
+ * Adds an @p assertion to the complex type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ctd-assertions">Assertions Definition</a>
+ */
+ void addAssertion(const XsdAssertion::Ptr &assertion);
+
+ /**
+ * Returns the assertions of the complex type.
+ */
+ XsdAssertion::List assertions() const;
+
+ /**
+ * Always returns @c true.
+ */
+ virtual bool isDefinedBySchema() const;
+
+ private:
+ SchemaType::Ptr m_superType;
+ NamedSchemaComponent::Ptr m_context;
+ DerivationMethod m_derivationMethod;
+ bool m_isAbstract;
+ XsdAttributeUse::List m_attributeUses;
+ XsdWildcard::Ptr m_attributeWildcard;
+ ContentType::Ptr m_contentType;
+ BlockingConstraints m_prohibitedSubstitutions;
+ XsdAssertion::List m_assertions;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsddocumentation.cpp b/src/xmlpatterns/schema/qxsddocumentation.cpp
new file mode 100644
index 0000000..b3e1682
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsddocumentation.cpp
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsddocumentation_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdDocumentation::XsdDocumentation()
+{
+}
+
+XsdDocumentation::~XsdDocumentation()
+{
+}
+
+void XsdDocumentation::setSource(const AnyURI::Ptr &source)
+{
+ m_source = source;
+}
+
+AnyURI::Ptr XsdDocumentation::source() const
+{
+ return m_source;
+}
+
+void XsdDocumentation::setLanguage(const DerivedString<TypeLanguage>::Ptr &language)
+{
+ m_language = language;
+}
+
+DerivedString<TypeLanguage>::Ptr XsdDocumentation::language() const
+{
+ return m_language;
+}
+
+void XsdDocumentation::setContent(const QString &content)
+{
+ m_content = content;
+}
+
+QString XsdDocumentation::content() const
+{
+ return m_content;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsddocumentation_p.h b/src/xmlpatterns/schema/qxsddocumentation_p.h
new file mode 100644
index 0000000..049ba80
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsddocumentation_p.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdDocumentation_H
+#define Patternist_XsdDocumentation_H
+
+#include "qanytype_p.h"
+#include "qanyuri_p.h"
+#include "qderivedstring_p.h"
+#include "qnamedschemacomponent_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD documentation object.
+ *
+ * This class represents the <em>documentation</em> component of an <em>annotation</em> object
+ * of a XML schema as described <a href="http://www.w3.org/TR/xmlschema11-1/#cAnnotations">here</a>.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdDocumentation : public NamedSchemaComponent
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdDocumentation> Ptr;
+ typedef QList<XsdDocumentation::Ptr> List;
+
+ /**
+ * Creates a new documentation object.
+ */
+ XsdDocumentation();
+
+ /**
+ * Destroys the documentation object.
+ */
+ ~XsdDocumentation();
+
+ /**
+ * Sets the @p source of the documentation.
+ *
+ * The source points to an URL that contains more
+ * information.
+ */
+ void setSource(const AnyURI::Ptr &source);
+
+ /**
+ * Returns the source of the documentation.
+ */
+ AnyURI::Ptr source() const;
+
+ /**
+ * Sets the @p language of the documentation.
+ */
+ void setLanguage(const DerivedString<TypeLanguage>::Ptr &language);
+
+ /**
+ * Returns the language of the documentation.
+ */
+ DerivedString<TypeLanguage>::Ptr language() const;
+
+ /**
+ * Sets the @p content of the documentation.
+ *
+ * The content can be of abritrary type.
+ */
+ void setContent(const QString &content);
+
+ /**
+ * Returns the content of the documentation.
+ */
+ QString content() const;
+
+ private:
+ AnyURI::Ptr m_source;
+ DerivedString<TypeLanguage>::Ptr m_language;
+ QString m_content;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdelement.cpp b/src/xmlpatterns/schema/qxsdelement.cpp
new file mode 100644
index 0000000..c907144
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdelement.cpp
@@ -0,0 +1,244 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdelement_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdElement::Scope::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdElement::Scope::Variety XsdElement::Scope::variety() const
+{
+ return m_variety;
+}
+
+void XsdElement::Scope::setParent(const NamedSchemaComponent::Ptr &parent)
+{
+ m_parent = parent;
+}
+
+NamedSchemaComponent::Ptr XsdElement::Scope::parent() const
+{
+ return m_parent;
+}
+
+void XsdElement::ValueConstraint::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdElement::ValueConstraint::Variety XsdElement::ValueConstraint::variety() const
+{
+ return m_variety;
+}
+
+void XsdElement::ValueConstraint::setValue(const QString &value)
+{
+ m_value = value;
+}
+
+QString XsdElement::ValueConstraint::value() const
+{
+ return m_value;
+}
+
+void XsdElement::ValueConstraint::setLexicalForm(const QString &form)
+{
+ m_lexicalForm = form;
+}
+
+QString XsdElement::ValueConstraint::lexicalForm() const
+{
+ return m_lexicalForm;
+}
+
+void XsdElement::TypeTable::addAlternative(const XsdAlternative::Ptr &alternative)
+{
+ m_alternatives.append(alternative);
+}
+
+XsdAlternative::List XsdElement::TypeTable::alternatives() const
+{
+ return m_alternatives;
+}
+
+void XsdElement::TypeTable::setDefaultTypeDefinition(const XsdAlternative::Ptr &type)
+{
+ m_defaultTypeDefinition = type;
+}
+
+XsdAlternative::Ptr XsdElement::TypeTable::defaultTypeDefinition() const
+{
+ return m_defaultTypeDefinition;
+}
+
+
+XsdElement::XsdElement()
+ : m_isAbstract(false)
+{
+}
+
+bool XsdElement::isElement() const
+{
+ return true;
+}
+
+void XsdElement::setType(const SchemaType::Ptr &type)
+{
+ m_type = type;
+}
+
+SchemaType::Ptr XsdElement::type() const
+{
+ return m_type;
+}
+
+void XsdElement::setScope(const Scope::Ptr &scope)
+{
+ m_scope = scope;
+}
+
+XsdElement::Scope::Ptr XsdElement::scope() const
+{
+ return m_scope;
+}
+
+void XsdElement::setValueConstraint(const ValueConstraint::Ptr &constraint)
+{
+ m_valueConstraint = constraint;
+}
+
+XsdElement::ValueConstraint::Ptr XsdElement::valueConstraint() const
+{
+ return m_valueConstraint;
+}
+
+void XsdElement::setTypeTable(const TypeTable::Ptr &table)
+{
+ m_typeTable = table;
+}
+
+XsdElement::TypeTable::Ptr XsdElement::typeTable() const
+{
+ return m_typeTable;
+}
+
+void XsdElement::setIsAbstract(bool abstract)
+{
+ m_isAbstract = abstract;
+}
+
+bool XsdElement::isAbstract() const
+{
+ return m_isAbstract;
+}
+
+void XsdElement::setIsNillable(bool nillable)
+{
+ m_isNillable = nillable;
+}
+
+bool XsdElement::isNillable() const
+{
+ return m_isNillable;
+}
+
+void XsdElement::setDisallowedSubstitutions(const BlockingConstraints &substitutions)
+{
+ m_disallowedSubstitutions = substitutions;
+}
+
+XsdElement::BlockingConstraints XsdElement::disallowedSubstitutions() const
+{
+ return m_disallowedSubstitutions;
+}
+
+void XsdElement::setSubstitutionGroupExclusions(const SchemaType::DerivationConstraints &exclusions)
+{
+ m_substitutionGroupExclusions = exclusions;
+}
+
+SchemaType::DerivationConstraints XsdElement::substitutionGroupExclusions() const
+{
+ return m_substitutionGroupExclusions;
+}
+
+void XsdElement::setIdentityConstraints(const XsdIdentityConstraint::List &constraints)
+{
+ m_identityConstraints = constraints;
+}
+
+void XsdElement::addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
+{
+ m_identityConstraints.append(constraint);
+}
+
+XsdIdentityConstraint::List XsdElement::identityConstraints() const
+{
+ return m_identityConstraints;
+}
+
+void XsdElement::setSubstitutionGroupAffiliations(const XsdElement::List &affiliations)
+{
+ m_substitutionGroupAffiliations = affiliations;
+}
+
+XsdElement::List XsdElement::substitutionGroupAffiliations() const
+{
+ return m_substitutionGroupAffiliations;
+}
+
+void XsdElement::addSubstitutionGroup(const XsdElement::Ptr &element)
+{
+ m_substitutionGroups.insert(element);
+}
+
+XsdElement::List XsdElement::substitutionGroups() const
+{
+ return m_substitutionGroups.toList();
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdelement_p.h b/src/xmlpatterns/schema/qxsdelement_p.h
new file mode 100644
index 0000000..304e888
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdelement_p.h
@@ -0,0 +1,403 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdElement_H
+#define Patternist_XsdElement_H
+
+#include "qschemacomponent_p.h"
+#include "qschematype_p.h"
+#include "qxsdalternative_p.h"
+#include "qxsdidentityconstraint_p.h"
+#include "qxsdcomplextype_p.h"
+
+#include <QtCore/QList>
+#include <QtCore/QSet>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD element object.
+ *
+ * This class represents the <em>element</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cElement_Declarations">here</a>.
+ *
+ * It contains information from either a top-level element declaration (as child of a <em>schema</em> object)
+ * or a local element declaration (as descendant of an <em>complexType</em> object).
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSElementDecl">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdElement : public XsdTerm
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdElement> Ptr;
+ typedef QList<XsdElement::Ptr> List;
+
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#ed-value_constraint">constraint type</a> of the element.
+ */
+ enum ConstraintType
+ {
+ NoneConstraint, ///< The value of the element has no constraints.
+ DefaultConstraint, ///< The element has a default value set.
+ FixedConstraint ///< The element has a fixed value set.
+ };
+
+ /**
+ * Describes the scope of an element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#sc_e">Scope Definition</a>
+ */
+ class Scope : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<Scope> Ptr;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#ad-scope">scope</a> of an attribute.
+ */
+ enum Variety
+ {
+ Global, ///< The element is defined globally as child of the <em>schema</em> object.
+ Local ///< The element is defined locally as child of a complex type or model group definition.
+ };
+
+ /**
+ * Sets the @p variety of the element scope.
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the element scope.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the @p parent complex type or model group definition of the element scope.
+ */
+ void setParent(const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * Returns the parent complex type or model group definition of the element scope.
+ */
+ NamedSchemaComponent::Ptr parent() const;
+
+ private:
+ Variety m_variety;
+ NamedSchemaComponent::Ptr m_parent;
+ };
+
+ /**
+ * Describes a type table of an element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#tt">Type Table Definition</a>
+ */
+ class TypeTable : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<TypeTable> Ptr;
+
+ /**
+ * Adds an @p alternative to the type table.
+ */
+ void addAlternative(const XsdAlternative::Ptr &alternative);
+
+ /**
+ * Returns the alternatives of the type table.
+ */
+ XsdAlternative::List alternatives() const;
+
+ /**
+ * Sets the default @p type definition.
+ */
+ void setDefaultTypeDefinition(const XsdAlternative::Ptr &type);
+
+ /**
+ * Returns the default type definition.
+ */
+ XsdAlternative::Ptr defaultTypeDefinition() const;
+
+ private:
+ XsdAlternative::List m_alternatives;
+ XsdAlternative::Ptr m_defaultTypeDefinition;
+ };
+
+
+ /**
+ * Describes the value constraint of an element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#vc_e">Value Constraint Definition</a>
+ */
+ class ValueConstraint : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<ValueConstraint> Ptr;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#ed-value_constraint">value constraint</a> of an element.
+ */
+ enum Variety
+ {
+ Default, ///< The element has a default value set.
+ Fixed ///< The element has a fixed value set.
+ };
+
+ /**
+ * Sets the @p variety of the element value constraint.
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the element value constraint.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the @p value of the constraint.
+ */
+ void setValue(const QString &value);
+
+ /**
+ * Returns the value of the constraint.
+ */
+ QString value() const;
+
+ /**
+ * Sets the lexical @p form of the constraint.
+ */
+ void setLexicalForm(const QString &form);
+
+ /**
+ * Returns the lexical form of the constraint.
+ */
+ QString lexicalForm() const;
+
+ private:
+ Variety m_variety;
+ QString m_value;
+ QString m_lexicalForm;
+ };
+
+ /**
+ * Creates a new element object.
+ */
+ XsdElement();
+
+ /**
+ * Always returns @c true, used to avoid dynamic casts.
+ */
+ virtual bool isElement() const;
+
+ /**
+ * Sets the @p type of the element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-type_definition">Type Definition</a>
+ */
+ void setType(const SchemaType::Ptr &type);
+
+ /**
+ * Returns the type of the element.
+ */
+ SchemaType::Ptr type() const;
+
+ /**
+ * Sets the @p scope of the element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-scope">Scope Definition</a>
+ */
+ void setScope(const Scope::Ptr &scope);
+
+ /**
+ * Returns the scope of the element.
+ */
+ Scope::Ptr scope() const;
+
+ /**
+ * Sets the value @p constraint of the element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-value_constraint">Value Constraint Definition</a>
+ */
+ void setValueConstraint(const ValueConstraint::Ptr &constraint);
+
+ /**
+ * Returns the value constraint of the element.
+ */
+ ValueConstraint::Ptr valueConstraint() const;
+
+ /**
+ * Sets the type table of the element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-type_table">Type Table Definition</a>
+ */
+ void setTypeTable(const TypeTable::Ptr &table);
+
+ /**
+ * Returns the type table of the element.
+ */
+ TypeTable::Ptr typeTable() const;
+
+ /**
+ * Sets whether the element is @p abstract.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-abstract">Abstract Definition</a>
+ */
+ void setIsAbstract(bool abstract);
+
+ /**
+ * Returns whether the element is abstract.
+ */
+ bool isAbstract() const;
+
+ /**
+ * Sets whether the element is @p nillable.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-nillable">Nillable Definition</a>
+ */
+ void setIsNillable(bool nillable);
+
+ /**
+ * Returns whether the element is nillable.
+ */
+ bool isNillable() const;
+
+ /**
+ * Sets the disallowed @p substitutions of the element.
+ *
+ * Only ExtensionConstraint, RestrictionConstraint and SubstitutionConstraint are allowed.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-disallowed_substitutions">Disallowed Substitutions Definition</a>
+ */
+ void setDisallowedSubstitutions(const BlockingConstraints &substitutions);
+
+ /**
+ * Returns the disallowed substitutions of the element.
+ */
+ BlockingConstraints disallowedSubstitutions() const;
+
+ /**
+ * Sets the substitution group @p exclusions of the element.
+ *
+ * Only SchemaType::ExtensionConstraint and SchemaType::RestrictionConstraint are allowed.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-substitution_group_exclusions">Substitution Group Exclusions Definition</a>
+ */
+ void setSubstitutionGroupExclusions(const SchemaType::DerivationConstraints &exclusions);
+
+ /**
+ * Returns the substitution group exclusions of the element.
+ */
+ SchemaType::DerivationConstraints substitutionGroupExclusions() const;
+
+ /**
+ * Sets the identity @p constraints of the element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-identity-constraint_definitions">Identity Constraint Definition</a>
+ */
+ void setIdentityConstraints(const XsdIdentityConstraint::List &constraints);
+
+ /**
+ * Adds a new identity @p constraint to the element.
+ */
+ void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint);
+
+ /**
+ * Returns a list of all identity constraints of the element.
+ */
+ XsdIdentityConstraint::List identityConstraints() const;
+
+ /**
+ * Sets the substitution group @p affiliations of the element.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#ed-substituion_group_affiliations">Substitution Group Affiliations</a>
+ */
+ void setSubstitutionGroupAffiliations(const XsdElement::List &affiliations);
+
+ /**
+ * Returns the substitution group affiliations of the element.
+ */
+ XsdElement::List substitutionGroupAffiliations() const;
+
+ /**
+ * Adds a substitution group to the element.
+ */
+ void addSubstitutionGroup(const XsdElement::Ptr &elements);
+
+ /**
+ * Returns the substitution groups of the element.
+ */
+ XsdElement::List substitutionGroups() const;
+
+ private:
+ SchemaType::Ptr m_type;
+ Scope::Ptr m_scope;
+ ValueConstraint::Ptr m_valueConstraint;
+ TypeTable::Ptr m_typeTable;
+ bool m_isAbstract;
+ bool m_isNillable;
+ BlockingConstraints m_disallowedSubstitutions;
+ SchemaType::DerivationConstraints m_substitutionGroupExclusions;
+ XsdIdentityConstraint::List m_identityConstraints;
+ XsdElement::List m_substitutionGroupAffiliations;
+ QSet<XsdElement::Ptr> m_substitutionGroups;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdfacet.cpp b/src/xmlpatterns/schema/qxsdfacet.cpp
new file mode 100644
index 0000000..7bbbc9d
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdfacet.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdfacet_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdFacet::XsdFacet()
+ : m_type(None)
+{
+}
+
+void XsdFacet::setType(Type type)
+{
+ m_type = type;
+}
+
+XsdFacet::Type XsdFacet::type() const
+{
+ return m_type;
+}
+
+void XsdFacet::setValue(const AtomicValue::Ptr &value)
+{
+ m_value = value;
+}
+
+AtomicValue::Ptr XsdFacet::value() const
+{
+ return m_value;
+}
+
+void XsdFacet::setMultiValue(const AtomicValue::List &value)
+{
+ m_multiValue = value;
+}
+
+AtomicValue::List XsdFacet::multiValue() const
+{
+ return m_multiValue;
+}
+
+void XsdFacet::setAssertions(const XsdAssertion::List &assertions)
+{
+ m_assertions = assertions;
+}
+
+XsdAssertion::List XsdFacet::assertions() const
+{
+ return m_assertions;
+}
+
+void XsdFacet::setFixed(bool fixed)
+{
+ m_fixed = fixed;
+}
+
+bool XsdFacet::fixed() const
+{
+ return m_fixed;
+}
+
+QString XsdFacet::typeName(Type type)
+{
+ switch (type) {
+ case Length: return QLatin1String("length"); break;
+ case MinimumLength: return QLatin1String("minLength"); break;
+ case MaximumLength: return QLatin1String("maxLength"); break;
+ case Pattern: return QLatin1String("pattern"); break;
+ case WhiteSpace: return QLatin1String("whiteSpace"); break;
+ case MaximumInclusive: return QLatin1String("maxInclusive"); break;
+ case MaximumExclusive: return QLatin1String("maxExclusive"); break;
+ case MinimumInclusive: return QLatin1String("minInclusive"); break;
+ case MinimumExclusive: return QLatin1String("minExclusive"); break;
+ case TotalDigits: return QLatin1String("totalDigits"); break;
+ case FractionDigits: return QLatin1String("fractionDigits"); break;
+ case Enumeration: return QLatin1String("enumeration"); break;
+ case Assertion: return QLatin1String("assertion"); break;
+ case None: // fall through
+ default: return QLatin1String("none"); break;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdfacet_p.h b/src/xmlpatterns/schema/qxsdfacet_p.h
new file mode 100644
index 0000000..5d16b4e
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdfacet_p.h
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdFacet_H
+#define Patternist_XsdFacet_H
+
+#include "qitem_p.h"
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+#include "qxsdassertion_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD facet object.
+ *
+ * This class represents one of the following XML schema objects:
+ *
+ * <ul>
+ * <li><em>length</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-length">Definition</a></li>
+ * <li><em>minLength</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-minLength">Definition</a></li>
+ * <li><em>maxLength</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-maxLength">Definition</a></li>
+ * <li><em>pattern</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-pattern">Definition</a></li>
+ * <li><em>whiteSpace</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">Definition</a></li>
+ * <li><em>maxInclusive</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive">Definition</a></li>
+ * <li><em>maxExclusive</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive">Definition</a></li>
+ * <li><em>minInclusive</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-minInclusive">Definition</a></li>
+ * <li><em>minExclusive</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-minExclusive">Definition</a></li>
+ * <li><em>totalDigits</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-totalDigits">Definition</a></li>
+ * <li><em>fractionDigits</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-fractionDigits">Definition</a></li>
+ * <li><em>enumeration</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-enumeration">Definition</a></li>
+ * <li><em>assertion</em> <a href="http://www.w3.org/TR/xmlschema-2/#rf-assertion">Definition</a></li>
+ * </ul>
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSFacet">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdFacet : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdFacet> Ptr;
+
+ /**
+ * Describes the type of the facet.
+ */
+ enum Type
+ {
+ None = 0, ///< An invalid facet.
+ Length = 1 << 0, ///< Match the exact length (<a href="http://www.w3.org/TR/xmlschema-2/#rf-length">Length Definition</a>)
+ MinimumLength = 1 << 1, ///< Match the minimum length (<a href="http://www.w3.org/TR/xmlschema-2/#rf-minLength">Minimum Length Definition</a>)
+ MaximumLength = 1 << 2, ///< Match the maximum length (<a href="http://www.w3.org/TR/xmlschema-2/#rf-maxLength">Maximum Length Definition</a>)
+ Pattern = 1 << 3, ///< Match a regular expression (<a href="http://www.w3.org/TR/xmlschema-2/#rf-pattern">Pattern Definition</a>)
+ WhiteSpace = 1 << 4, ///< Match a whitespace rule (<a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">White Space Definition</a>)
+ MaximumInclusive = 1 << 5, ///< Match a maximum inclusive (<a href="http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive">Maximum Inclusive Definition</a>)
+ MaximumExclusive = 1 << 6, ///< Match a maximum exclusive (<a href="http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive">Maximum Exclusive Definition</a>)
+ MinimumInclusive = 1 << 7, ///< Match a minimum inclusive (<a href="http://www.w3.org/TR/xmlschema-2/#rf-minInclusive">Minimum Inclusive Definition</a>)
+ MinimumExclusive = 1 << 8, ///< Match a minimum exclusive (<a href="http://www.w3.org/TR/xmlschema-2/#rf-minExclusive">Minimum Exclusive Definition</a>)
+ TotalDigits = 1 << 9, ///< Match some integer digits (<a href="http://www.w3.org/TR/xmlschema-2/#rf-totalDigits">Total Digits Definition</a>)
+ FractionDigits = 1 << 10, ///< Match some double digits (<a href="http://www.w3.org/TR/xmlschema-2/#rf-fractionDigits">Fraction Digits Definition</a>)
+ Enumeration = 1 << 11, ///< Match an enumeration (<a href="http://www.w3.org/TR/xmlschema-2/#rf-enumeration">Enumeration Definition</a>)
+ Assertion = 1 << 12, ///< Match an assertion (<a href="http://www.w3.org/TR/xmlschema-2/#rf-assertion">Assertion Definition</a>)
+ };
+ typedef QHash<XsdFacet::Type, XsdFacet::Ptr> Hash;
+ typedef QHashIterator<XsdFacet::Type, XsdFacet::Ptr> HashIterator;
+
+ /**
+ * Creates a new facet object of type None.
+ */
+ XsdFacet();
+
+ /**
+ * Sets the @p type of the facet.
+ *
+ * @see Type
+ */
+ void setType(Type type);
+
+ /**
+ * Returns the type of the facet.
+ */
+ Type type() const;
+
+ /**
+ * Sets the @p value of the facet.
+ *
+ * Depending on the type of the facet the
+ * value can be a string, interger, double etc.
+ *
+ * @note This method should be used for all types of facets
+ * except Pattern, Enumeration and Assertion.
+ */
+ void setValue(const AtomicValue::Ptr &value);
+
+ /**
+ * Returns the value of the facet or an empty pointer if facet
+ * type is Pattern, Enumeration or Assertion.
+ */
+ AtomicValue::Ptr value() const;
+
+ /**
+ * Sets the @p value of the facet.
+ *
+ * @note This method should be used for if the type of the
+ * facet is Pattern or Enumeration.
+ */
+ void setMultiValue(const AtomicValue::List &value);
+
+ /**
+ * Returns the value of the facet or an empty pointer if facet
+ * type is not of type Pattern or Enumeration.
+ */
+ AtomicValue::List multiValue() const;
+
+ /**
+ * Sets the @p assertions of the facet.
+ *
+ * @note This method should be used if the type of the
+ * facet is Assertion.
+ */
+ void setAssertions(const XsdAssertion::List &assertions);
+
+ /**
+ * Returns the assertions of the facet or an empty pointer if facet
+ * type is not of type Assertion.
+ */
+ XsdAssertion::List assertions() const;
+
+ /**
+ * Sets whether the facet is @p fixed.
+ *
+ * All facets except pattern, enumeration and assertion can be fixed.
+ */
+ void setFixed(bool fixed);
+
+ /**
+ * Returns whether the facet is fixed.
+ */
+ bool fixed() const;
+
+ /**
+ * Returns the textual description of the facet @p type.
+ */
+ static QString typeName(Type type);
+
+ private:
+ Type m_type;
+ AtomicValue::Ptr m_value;
+ AtomicValue::List m_multiValue;
+ XsdAssertion::List m_assertions;
+ bool m_fixed;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdidcache.cpp b/src/xmlpatterns/schema/qxsdidcache.cpp
new file mode 100644
index 0000000..25788c8
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdidcache.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdidcache_p.h"
+
+#include <QtCore/QReadLocker>
+#include <QtCore/QWriteLocker>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdIdCache::addId(const QString &id)
+{
+ const QWriteLocker locker(&m_lock);
+ Q_ASSERT(!m_ids.contains(id));
+
+ m_ids.insert(id);
+}
+
+bool XsdIdCache::hasId(const QString &id) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_ids.contains(id);
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdirectionrecognizer_p.h b/src/xmlpatterns/schema/qxsdidcache_p.h
index 12307c6..dae967e 100644
--- a/src/gui/kernel/qdirectionrecognizer_p.h
+++ b/src/xmlpatterns/schema/qxsdidcache_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,9 +39,6 @@
**
****************************************************************************/
-#ifndef QDIRECTIONRECOGNIZER_P_H
-#define QDIRECTIONRECOGNIZER_P_H
-
//
// W A R N I N G
// -------------
@@ -51,55 +48,52 @@
// version without notice, or even be removed.
//
// We mean it.
-//
-#include "qpoint.h"
-#include "qlist.h"
-
-QT_BEGIN_NAMESPACE
+#ifndef Patternist_XsdIdCache_H
+#define Patternist_XsdIdCache_H
-struct Direction
-{
- Qt::DirectionType direction;
- QPoint point;
+#include "qschemacomponent_p.h"
- Direction(Qt::DirectionType dir, const QPoint &pt)
- : direction(dir), point(pt) { }
- Direction()
- : direction(Qt::NoDirection) { }
+#include <QtCore/QExplicitlySharedDataPointer>
+#include <QtCore/QReadWriteLock>
+#include <QtCore/QSet>
+#include <QtCore/QString>
- inline bool isEmpty() const { return direction == Qt::NoDirection; }
- inline bool isNull() const { return direction == Qt::NoDirection; }
-};
+QT_BEGIN_HEADER
-typedef QList<Direction> DirectionList;
+QT_BEGIN_NAMESPACE
-class QDirectionSimpleRecognizer
+namespace QPatternist
{
-public:
- QDirectionSimpleRecognizer();
- Direction addPosition(const QPoint &pos);
- DirectionList getDirections() const;
- void reset();
+ /**
+ * @short Helper class for keeping track of all existing IDs in a schema.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdIdCache : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdIdCache> Ptr;
-private:
- QPoint lastPoint;
- DirectionList directions;
-};
+ /**
+ * Adds an @p id to the id cache.
+ */
+ void addId(const QString &id);
-class QDirectionDiagonalRecognizer
-{
-public:
- QDirectionDiagonalRecognizer();
- Direction addPosition(const QPoint &pos);
- DirectionList getDirections() const;
- void reset();
+ /**
+ * Returns whether the id cache contains the given @p id already.
+ */
+ bool hasId(const QString &id) const;
-private:
- QPoint lastPoint;
- DirectionList directions;
-};
+ private:
+ QSet<QString> m_ids;
+ mutable QReadWriteLock m_lock;
+ };
+}
QT_END_NAMESPACE
-#endif // QDIRECTIONRECOGNIZER_P_H
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdidchelper.cpp b/src/xmlpatterns/schema/qxsdidchelper.cpp
new file mode 100644
index 0000000..a7fa00d
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdidchelper.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdidchelper_p.h"
+
+#include "qderivedstring_p.h"
+#include "qxsdschemahelper_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+FieldNode::FieldNode()
+{
+}
+
+FieldNode::FieldNode(const QXmlItem &item, const QString &data, const SchemaType::Ptr &type)
+ : m_item(item)
+ , m_data(data)
+ , m_type(type)
+{
+}
+
+bool FieldNode::isEmpty() const
+{
+ return m_item.isNull();
+}
+
+bool FieldNode::isEqualTo(const FieldNode &other, const NamePool::Ptr &namePool, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection) const
+{
+ if (m_type != other.m_type)
+ return false;
+
+ const DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(namePool, m_data);
+ const DerivedString<TypeString>::Ptr otherString = DerivedString<TypeString>::fromLexical(namePool, other.m_data);
+
+ return XsdSchemaHelper::constructAndCompare(string, AtomicComparator::OperatorEqual, otherString, m_type, context, reflection);
+}
+
+QXmlItem FieldNode::item() const
+{
+ return m_item;
+}
+
+TargetNode::TargetNode(const QXmlItem &item)
+ : m_item(item)
+{
+}
+
+QXmlItem TargetNode::item() const
+{
+ return m_item;
+}
+
+QVector<QXmlItem> TargetNode::fieldItems() const
+{
+ QVector<QXmlItem> items;
+
+ for (int i = 0; i < m_fields.count(); ++i)
+ items.append(m_fields.at(i).item());
+
+ return items;
+}
+
+int TargetNode::emptyFieldsCount() const
+{
+ int counter = 0;
+ for (int i = 0; i < m_fields.count(); ++i) {
+ if (m_fields.at(i).isEmpty())
+ ++counter;
+ }
+
+ return counter;
+}
+
+bool TargetNode::fieldsAreEqual(const TargetNode &other, const NamePool::Ptr &namePool, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection) const
+{
+ if (m_fields.count() != other.m_fields.count())
+ return false;
+
+ for (int i = 0; i < m_fields.count(); ++i) {
+ if (!m_fields.at(i).isEqualTo(other.m_fields.at(i), namePool, context, reflection))
+ return false;
+ }
+
+ return true;
+}
+
+void TargetNode::addField(const QXmlItem &item, const QString &data, const SchemaType::Ptr &type)
+{
+ m_fields.append(FieldNode(item, data, type));
+}
+
+bool TargetNode::operator==(const TargetNode &other) const
+{
+ return (m_item.toNodeModelIndex() == other.m_item.toNodeModelIndex());
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdidchelper_p.h b/src/xmlpatterns/schema/qxsdidchelper_p.h
new file mode 100644
index 0000000..ee593b8
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdidchelper_p.h
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdIdcHelper_H
+#define Patternist_XsdIdcHelper_H
+
+#include "qreportcontext_p.h"
+#include "qschematype_p.h"
+
+#include <QtXmlPatterns/QXmlItem>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+
+ /**
+ * @short A helper class for validating identity constraints.
+ *
+ * This class represents a field node from the key-sequence as defined in
+ * the validation rules at http://www.w3.org/TR/xmlschema11-1/#d0e32243.
+ */
+ class FieldNode
+ {
+ public:
+ /**
+ * Creates an empty field node.
+ */
+ FieldNode();
+
+ /**
+ * Creates a field node that is bound to a xml node.
+ *
+ * @param item The xml node the field is bound to.
+ * @param data The string content of that field.
+ * @param type The type that is bound to that field.
+ */
+ FieldNode(const QXmlItem &item, const QString &data, const SchemaType::Ptr &type);
+
+ /**
+ * Returns whether this field is empty.
+ *
+ * A field can be empty, if the xpath expression selects an absent attribute
+ * or element.
+ */
+ bool isEmpty() const;
+
+ /**
+ * Returns whether this field is equal to the @p other field.
+ *
+ * Equal means that both have the same type and there content is equal in the
+ * types value space.
+ */
+ bool isEqualTo(const FieldNode &other, const NamePool::Ptr &namePool, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection) const;
+
+ /**
+ * Returns the xml node item the field is bound to.
+ */
+ QXmlItem item() const;
+
+ private:
+ QXmlItem m_item;
+ QString m_data;
+ SchemaType::Ptr m_type;
+ };
+
+ /**
+ * @short A helper class for validating identity constraints.
+ *
+ * This class represents a target or qualified node from the target or qualified
+ * node set as defined in the validation rules at http://www.w3.org/TR/xmlschema11-1/#d0e32243.
+ *
+ * A target node is part of the qualified node set, if all of its fields are not empty.
+ */
+ class TargetNode
+ {
+ public:
+ /**
+ * Defines a set of target nodes.
+ */
+ typedef QSet<TargetNode> Set;
+
+ /**
+ * Creates a new target node that is bound to the xml node @p item.
+ */
+ explicit TargetNode(const QXmlItem &item);
+
+ /**
+ * Returns the xml node item the target node is bound to.
+ */
+ QXmlItem item() const;
+
+ /**
+ * Returns all xml node items, the fields of that target node are bound to.
+ */
+ QVector<QXmlItem> fieldItems() const;
+
+ /**
+ * Returns the number of fields that are empty.
+ */
+ int emptyFieldsCount() const;
+
+ /**
+ * Returns whether the target node has the same fields as the @p other target node.
+ */
+ bool fieldsAreEqual(const TargetNode &other, const NamePool::Ptr &namePool, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection) const;
+
+ /**
+ * Adds a new field to the target node with the given values.
+ */
+ void addField(const QXmlItem &item, const QString &data, const SchemaType::Ptr &type);
+
+ /**
+ * Returns whether the target node is equal to the @p other target node.
+ */
+ bool operator==(const TargetNode &other) const;
+
+ private:
+ QXmlItem m_item;
+ QVector<FieldNode> m_fields;
+ };
+
+ /**
+ * Creates a hash value for the given target @p node.
+ */
+ inline uint qHash(const QPatternist::TargetNode &node)
+ {
+ return qHash(node.item().toNodeModelIndex());
+ }
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdidentityconstraint.cpp b/src/xmlpatterns/schema/qxsdidentityconstraint.cpp
new file mode 100644
index 0000000..9d0207c
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdidentityconstraint.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdidentityconstraint_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdIdentityConstraint::setCategory(Category category)
+{
+ m_category = category;
+}
+
+XsdIdentityConstraint::Category XsdIdentityConstraint::category() const
+{
+ return m_category;
+}
+
+void XsdIdentityConstraint::setSelector(const XsdXPathExpression::Ptr &selector)
+{
+ m_selector = selector;
+}
+
+XsdXPathExpression::Ptr XsdIdentityConstraint::selector() const
+{
+ return m_selector;
+}
+
+void XsdIdentityConstraint::setFields(const XsdXPathExpression::List &fields)
+{
+ m_fields = fields;
+}
+
+void XsdIdentityConstraint::addField(const XsdXPathExpression::Ptr &field)
+{
+ m_fields.append(field);
+}
+
+XsdXPathExpression::List XsdIdentityConstraint::fields() const
+{
+ return m_fields;
+}
+
+void XsdIdentityConstraint::setReferencedKey(const XsdIdentityConstraint::Ptr &referencedKey)
+{
+ m_referencedKey = referencedKey;
+}
+
+XsdIdentityConstraint::Ptr XsdIdentityConstraint::referencedKey() const
+{
+ return m_referencedKey;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdidentityconstraint_p.h b/src/xmlpatterns/schema/qxsdidentityconstraint_p.h
new file mode 100644
index 0000000..b6bb3d0
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdidentityconstraint_p.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdIdentityConstraint_H
+#define Patternist_XsdIdentityConstraint_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+#include "qxsdxpathexpression_p.h"
+
+#include <QtCore/QStringList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD identity constraint object.
+ *
+ * This class represents the <em>identity constraint</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cIdentity-constraint_Definitions">here</a>.
+ *
+ * It contains information from either a <em>key</em> object, a <em>keyref</em> object or an
+ * <em>unique</em> object.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSIdentityConstraint">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdIdentityConstraint : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdIdentityConstraint> Ptr;
+ typedef QList<XsdIdentityConstraint::Ptr> List;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#icd-identity-constraint_category">category</a> of the identity constraint.
+ */
+ enum Category
+ {
+ Key = 1, ///< The constraint is a key constraint
+ KeyReference, ///< The constraint is a keyref constraint
+ Unique ///< The constraint is an unique constraint
+ };
+
+ /**
+ * Sets the @p category of the identity constraint.
+ *
+ * @see Category
+ */
+ void setCategory(Category category);
+
+ /**
+ * Returns the category of the identity constraint.
+ */
+ Category category() const;
+
+ /**
+ * Sets the @p selector of the identity constraint.
+ *
+ * The selector is a restricted XPath 1.0 expression,
+ * that selects a set of nodes.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#icd-selector"></a>
+ */
+ void setSelector(const XsdXPathExpression::Ptr &selector);
+
+ /**
+ * Returns the selector of the identity constraint.
+ */
+ XsdXPathExpression::Ptr selector() const;
+
+ /**
+ * Sets the @p fields of the identity constraint.
+ *
+ * Each field is a restricted XPath 1.0 expression,
+ * that selects a set of nodes.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#icd-fields"></a>
+ */
+ void setFields(const XsdXPathExpression::List &fields);
+
+ /**
+ * Adds a new @p field to the identity constraint.
+ */
+ void addField(const XsdXPathExpression::Ptr &field);
+
+ /**
+ * Returns all fields of the identity constraint.
+ */
+ XsdXPathExpression::List fields() const;
+
+ /**
+ * Sets the referenced @p key of the identity constraint.
+ *
+ * The key points to a identity constraint of type Key or Unique.
+ *
+ * The identity constraint has only a referenced key if its
+ * type is KeyReference.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#icd-referenced_key"></a>
+ */
+ void setReferencedKey(const XsdIdentityConstraint::Ptr &key);
+
+ /**
+ * Returns the referenced key of the identity constraint or an empty
+ * pointer if its type is not KeyReference.
+ */
+ XsdIdentityConstraint::Ptr referencedKey() const;
+
+ private:
+ Category m_category;
+ XsdXPathExpression::Ptr m_selector;
+ XsdXPathExpression::List m_fields;
+ XsdIdentityConstraint::Ptr m_referencedKey;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdinstancereader.cpp b/src/xmlpatterns/schema/qxsdinstancereader.cpp
new file mode 100644
index 0000000..9ff8d61
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdinstancereader.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdinstancereader_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdInstanceReader::XsdInstanceReader(const QAbstractXmlNodeModel *model, const XsdSchemaContext::Ptr &context)
+ : m_context(context)
+ , m_model(model->iterate(model->root(QXmlNodeModelIndex()), QXmlNodeModelIndex::AxisChild))
+{
+}
+
+bool XsdInstanceReader::atEnd() const
+{
+ return (m_model.current() == AbstractXmlPullProvider::EndOfInput);
+}
+
+void XsdInstanceReader::readNext()
+{
+ m_model.next();
+
+ if (m_model.current() == AbstractXmlPullProvider::StartElement) {
+ m_cachedAttributes = m_model.attributes();
+ m_cachedAttributeItems = m_model.attributeItems();
+ m_cachedSourceLocation = m_model.sourceLocation();
+ m_cachedItem = QXmlItem(m_model.index());
+ }
+}
+
+bool XsdInstanceReader::isStartElement() const
+{
+ return (m_model.current() == AbstractXmlPullProvider::StartElement);
+}
+
+bool XsdInstanceReader::isEndElement() const
+{
+ return (m_model.current() == AbstractXmlPullProvider::EndElement);
+}
+
+bool XsdInstanceReader::hasChildText() const
+{
+ const QXmlNodeModelIndex index = m_model.index();
+ QXmlNodeModelIndex::Iterator::Ptr it = index.model()->iterate(index, QXmlNodeModelIndex::AxisChild);
+
+ QXmlNodeModelIndex currentIndex = it->next();
+ while (!currentIndex.isNull()) {
+ if (currentIndex.kind() == QXmlNodeModelIndex::Text)
+ return true;
+
+ currentIndex = it->next();
+ }
+
+ return false;
+}
+
+bool XsdInstanceReader::hasChildElement() const
+{
+ const QXmlNodeModelIndex index = m_model.index();
+ QXmlNodeModelIndex::Iterator::Ptr it = index.model()->iterate(index, QXmlNodeModelIndex::AxisChild);
+
+ QXmlNodeModelIndex currentIndex = it->next();
+ while (!currentIndex.isNull()) {
+ if (currentIndex.kind() == QXmlNodeModelIndex::Element)
+ return true;
+
+ currentIndex = it->next();
+ }
+
+ return false;
+}
+
+QXmlName XsdInstanceReader::name() const
+{
+ return m_model.name();
+}
+
+QXmlName XsdInstanceReader::convertToQName(const QString &name) const
+{
+ const int pos = name.indexOf(QLatin1Char(':'));
+
+ QXmlName::PrefixCode prefixCode = 0;
+ QXmlName::NamespaceCode namespaceCode;
+ QXmlName::LocalNameCode localNameCode;
+ if (pos != -1) {
+ prefixCode = m_context->namePool()->allocatePrefix(name.left(pos));
+ namespaceCode = m_cachedItem.toNodeModelIndex().namespaceForPrefix(prefixCode);
+ localNameCode = m_context->namePool()->allocateLocalName(name.mid(pos + 1));
+ } else {
+ prefixCode = StandardPrefixes::empty;
+ namespaceCode = m_cachedItem.toNodeModelIndex().namespaceForPrefix(prefixCode);
+ if (namespaceCode == -1)
+ namespaceCode = StandardNamespaces::empty;
+ localNameCode = m_context->namePool()->allocateLocalName(name);
+ }
+
+ return QXmlName(namespaceCode, localNameCode, prefixCode);
+}
+
+bool XsdInstanceReader::hasAttribute(const QXmlName &name) const
+{
+ return m_cachedAttributes.contains(name);
+}
+
+QString XsdInstanceReader::attribute(const QXmlName &name) const
+{
+ Q_ASSERT(m_cachedAttributes.contains(name));
+
+ return m_cachedAttributes.value(name);
+}
+
+QSet<QXmlName> XsdInstanceReader::attributeNames() const
+{
+ return m_cachedAttributes.keys().toSet();
+}
+
+QString XsdInstanceReader::text() const
+{
+ const QXmlNodeModelIndex index = m_model.index();
+ QXmlNodeModelIndex::Iterator::Ptr it = index.model()->iterate(index, QXmlNodeModelIndex::AxisChild);
+
+ QString result;
+
+ QXmlNodeModelIndex currentIndex = it->next();
+ while (!currentIndex.isNull()) {
+ if (currentIndex.kind() == QXmlNodeModelIndex::Text) {
+ result.append(Item(currentIndex).stringValue());
+ }
+
+ currentIndex = it->next();
+ }
+
+ return result;
+}
+
+QXmlItem XsdInstanceReader::item() const
+{
+ return m_cachedItem;
+}
+
+QXmlItem XsdInstanceReader::attributeItem(const QXmlName &name) const
+{
+ return m_cachedAttributeItems.value(name);
+}
+
+QSourceLocation XsdInstanceReader::sourceLocation() const
+{
+ return m_cachedSourceLocation;
+}
+
+QVector<QXmlName> XsdInstanceReader::namespaceBindings(const QXmlNodeModelIndex &index) const
+{
+ return index.namespaceBindings();
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdinstancereader_p.h b/src/xmlpatterns/schema/qxsdinstancereader_p.h
new file mode 100644
index 0000000..af189e3
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdinstancereader_p.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdInstanceReader_H
+#define Patternist_XsdInstanceReader_H
+
+#include "qabstractxmlnodemodel.h"
+#include "qpullbridge_p.h"
+#include "qxsdschemacontext_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short The schema instance reader.
+ *
+ * This class reads in a xml instance document from a QAbstractXmlNodeModel
+ * and provides a QXmlStreamReader like interface with some additional context
+ * information.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdInstanceReader
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdInstanceReader> Ptr;
+
+ /**
+ * Creates a new instance reader that will read the data from
+ * the given @p model.
+ *
+ * @param model The model the data are read from.
+ * @param context The context that is used for error reporting etc.
+ */
+ XsdInstanceReader(const QAbstractXmlNodeModel *model, const XsdSchemaContext::Ptr &context);
+
+ protected:
+ /**
+ * Returns @c true if the end of the document is reached, @c false otherwise.
+ */
+ bool atEnd() const;
+
+ /**
+ * Reads the next node from the document.
+ */
+ void readNext();
+
+ /**
+ * Returns whether the current node is a start element.
+ */
+ bool isStartElement() const;
+
+ /**
+ * Returns whether the current node is an end element.
+ */
+ bool isEndElement() const;
+
+ /**
+ * Returns whether the current node has a text node among its children.
+ */
+ bool hasChildText() const;
+
+ /**
+ * Returns whether the current node has an element node among its children.
+ */
+ bool hasChildElement() const;
+
+ /**
+ * Returns the name of the current node.
+ */
+ QXmlName name() const;
+
+ /**
+ * Returns whether the current node has an attribute with the given @p name.
+ */
+ bool hasAttribute(const QXmlName &name) const;
+
+ /**
+ * Returns the attribute with the given @p name of the current node.
+ */
+ QString attribute(const QXmlName &name) const;
+
+ /**
+ * Returns the list of attribute names of the current node.
+ */
+ QSet<QXmlName> attributeNames() const;
+
+ /**
+ * Returns the concatenated text of all direct child text nodes.
+ */
+ QString text() const;
+
+ /**
+ * Converts a qualified name into a QXmlName according to the namespace
+ * mappings of the current node.
+ */
+ QXmlName convertToQName(const QString &name) const;
+
+ /**
+ * Returns a source location object for the current position.
+ */
+ QSourceLocation sourceLocation() const;
+
+ /**
+ * Returns the QXmlItem for the current position.
+ */
+ QXmlItem item() const;
+
+ /**
+ * Returns the QXmlItem for the attribute with the given @p name at the current position.
+ */
+ QXmlItem attributeItem(const QXmlName &name) const;
+
+ /**
+ * Returns the namespace bindings for the given node model @p index.
+ */
+ QVector<QXmlName> namespaceBindings(const QXmlNodeModelIndex &index) const;
+
+ /**
+ * The shared schema context.
+ */
+ XsdSchemaContext::Ptr m_context;
+
+ private:
+ PullBridge m_model;
+ QHash<QXmlName, QString> m_cachedAttributes;
+ QHash<QXmlName, QXmlItem> m_cachedAttributeItems;
+ QSourceLocation m_cachedSourceLocation;
+ QXmlItem m_cachedItem;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdmodelgroup.cpp b/src/xmlpatterns/schema/qxsdmodelgroup.cpp
new file mode 100644
index 0000000..ca7eb42
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdmodelgroup.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdmodelgroup_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdModelGroup::XsdModelGroup()
+ : m_compositor(SequenceCompositor)
+{
+}
+
+bool XsdModelGroup::isModelGroup() const
+{
+ return true;
+}
+
+void XsdModelGroup::setCompositor(ModelCompositor compositor)
+{
+ m_compositor = compositor;
+}
+
+XsdModelGroup::ModelCompositor XsdModelGroup::compositor() const
+{
+ return m_compositor;
+}
+
+void XsdModelGroup::setParticles(const XsdParticle::List &particles)
+{
+ m_particles = particles;
+}
+
+XsdParticle::List XsdModelGroup::particles() const
+{
+ return m_particles;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdmodelgroup_p.h b/src/xmlpatterns/schema/qxsdmodelgroup_p.h
new file mode 100644
index 0000000..f01d5bf
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdmodelgroup_p.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdModelGroup_H
+#define Patternist_XsdModelGroup_H
+
+#include "qxsdparticle_p.h"
+#include "qxsdterm_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+template<typename N> class QList;
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD model group object.
+ *
+ * This class represents the <em>model group</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cModel_Group_Definitions">here</a>.
+ *
+ * It contains information from either a <em>sequence</em> object, a <em>choice</em> object or an
+ * <em>all</em> object.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSModelGroup">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdModelGroup : public XsdTerm
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdModelGroup> Ptr;
+ typedef QList<XsdModelGroup::Ptr> List;
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#mg-compositor">compositor</a> of the model group.
+ */
+ enum ModelCompositor
+ {
+ SequenceCompositor, ///< The model group is a sequence.
+ ChoiceCompositor, ///< The model group is a choice.
+ AllCompositor ///< The model group contains elements only.
+ };
+
+ /**
+ * Creates a new model group object.
+ */
+ XsdModelGroup();
+
+ /**
+ * Returns always @c true, used to avoid dynamic casts.
+ */
+ virtual bool isModelGroup() const;
+
+ /**
+ * Sets the @p compositor of the model group.
+ *
+ * @see ModelCompositor
+ */
+ void setCompositor(ModelCompositor compositor);
+
+ /**
+ * Returns the compositor of the model group.
+ */
+ ModelCompositor compositor() const;
+
+ /**
+ * Sets the list of @p particles of the model group.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#mg-particles">Particles Definition</a>
+ */
+ void setParticles(const XsdParticle::List &particles);
+
+ /**
+ * Returns the list of particles of the model group.
+ */
+ XsdParticle::List particles() const;
+
+ private:
+ ModelCompositor m_compositor;
+ XsdParticle::List m_particles;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdnotation.cpp b/src/xmlpatterns/schema/qxsdnotation.cpp
new file mode 100644
index 0000000..59697d7
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdnotation.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdnotation_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdNotation::setPublicId(const DerivedString<TypeToken>::Ptr &id)
+{
+ m_publicId = id;
+}
+
+DerivedString<TypeToken>::Ptr XsdNotation::publicId() const
+{
+ return m_publicId;
+}
+
+void XsdNotation::setSystemId(const AnyURI::Ptr &id)
+{
+ m_systemId = id;
+}
+
+AnyURI::Ptr XsdNotation::systemId() const
+{
+ return m_systemId;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdnotation_p.h b/src/xmlpatterns/schema/qxsdnotation_p.h
new file mode 100644
index 0000000..1ad2c47
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdnotation_p.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdNotation_H
+#define Patternist_XsdNotation_H
+
+#include "qanyuri_p.h"
+#include "qderivedstring_p.h"
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD notation object, which should not
+ * be confused with the atomic type @c xs:NOTATION.
+ *
+ * This class represents the <em>notation</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cNotation_Declarations">here</a>.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#XS-NotationDecl">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdNotation : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdNotation> Ptr;
+ typedef QList<XsdNotation::Ptr> List;
+
+ /**
+ * Sets the public @p identifier of the notation.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#nd-public_identifier">Public Identifier Definition</a>
+ */
+ void setPublicId(const DerivedString<TypeToken>::Ptr &identifier);
+
+ /**
+ * Returns the public identifier of the notation.
+ */
+ DerivedString<TypeToken>::Ptr publicId() const;
+
+ /**
+ * Sets the system @p identifier of the notation.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#nd-system_identifier">System Identifier Definition</a>
+ */
+ void setSystemId(const AnyURI::Ptr &identifier);
+
+ /**
+ * Returns the system identifier of the notation.
+ */
+ AnyURI::Ptr systemId() const;
+
+ private:
+ DerivedString<TypeToken>::Ptr m_publicId;
+ AnyURI::Ptr m_systemId;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdparticle.cpp b/src/xmlpatterns/schema/qxsdparticle.cpp
new file mode 100644
index 0000000..0e58bf6
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdparticle.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdparticle_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdParticle::XsdParticle()
+ : m_minimumOccurs(1)
+ , m_maximumOccurs(1)
+ , m_maximumOccursUnbounded(false)
+{
+}
+
+void XsdParticle::setMinimumOccurs(unsigned int occurs)
+{
+ m_minimumOccurs = occurs;
+}
+
+unsigned int XsdParticle::minimumOccurs() const
+{
+ return m_minimumOccurs;
+}
+
+void XsdParticle::setMaximumOccurs(unsigned int occurs)
+{
+ m_maximumOccurs = occurs;
+}
+
+unsigned int XsdParticle::maximumOccurs() const
+{
+ return m_maximumOccurs;
+}
+
+void XsdParticle::setMaximumOccursUnbounded(bool unbounded)
+{
+ m_maximumOccursUnbounded = unbounded;
+}
+
+bool XsdParticle::maximumOccursUnbounded() const
+{
+ return m_maximumOccursUnbounded;
+}
+
+void XsdParticle::setTerm(const XsdTerm::Ptr &term)
+{
+ m_term = term;
+}
+
+XsdTerm::Ptr XsdParticle::term() const
+{
+ return m_term;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdparticle_p.h b/src/xmlpatterns/schema/qxsdparticle_p.h
new file mode 100644
index 0000000..a183192
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdparticle_p.h
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdParticle_H
+#define Patternist_XsdParticle_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qxsdterm_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD particle object.
+ *
+ * This class represents the <em>particle</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#cParticles">here</a>.
+ *
+ * It contains information about the number of occurrence and a reference to
+ * either an <em>element</em> object, a <em>group</em> object or an <em>any</em> object.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSParticle">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdParticle : public NamedSchemaComponent
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdParticle> Ptr;
+ typedef QList<XsdParticle::Ptr> List;
+
+ /**
+ * Creates a new particle object.
+ */
+ XsdParticle();
+
+ /**
+ * Sets the minimum @p occurrence of the particle.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#p-min_occurs">Minimum Occurrence Definition</a>
+ */
+ void setMinimumOccurs(unsigned int occurrence);
+
+ /**
+ * Returns the minimum occurrence of the particle.
+ */
+ unsigned int minimumOccurs() const;
+
+ /**
+ * Sets the maximum @p occurrence of the particle.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#p-max_occurs">Maximum Occurrence Definition</a>
+ */
+ void setMaximumOccurs(unsigned int occurrence);
+
+ /**
+ * Returns the maximum occurrence of the particle.
+ *
+ * @note This value has only a meaning if maximumOccursUnbounded is @c false.
+ */
+ unsigned int maximumOccurs() const;
+
+ /**
+ * Sets whether the maximum occurrence of the particle is unbounded.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#p-max_occurs">Maximum Occurrence Definition</a>
+ */
+ void setMaximumOccursUnbounded(bool unbounded);
+
+ /**
+ * Returns whether the maximum occurrence of the particle is unbounded.
+ */
+ bool maximumOccursUnbounded() const;
+
+ /**
+ * Sets the @p term of the particle.
+ *
+ * The term can be an element, a model group or an element wildcard.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#p-term">Term Definition</a>
+ */
+ void setTerm(const XsdTerm::Ptr &term);
+
+ /**
+ * Returns the term of the particle.
+ */
+ XsdTerm::Ptr term() const;
+
+ private:
+ unsigned int m_minimumOccurs;
+ unsigned int m_maximumOccurs;
+ bool m_maximumOccursUnbounded;
+ XsdTerm::Ptr m_term;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdparticlechecker.cpp b/src/xmlpatterns/schema/qxsdparticlechecker.cpp
new file mode 100644
index 0000000..f7fa442
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdparticlechecker.cpp
@@ -0,0 +1,540 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdparticlechecker_p.h"
+
+#include "qxsdelement_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdschemahelper_p.h"
+#include "qxsdstatemachine_p.h"
+#include "qxsdstatemachinebuilder_p.h"
+#include "qxsdtypechecker_p.h"
+
+#include <QtCore/QFile>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+namespace QPatternist
+{
+ /**
+ * This template specialization is picked up by XsdStateMachine and allows us
+ * to print nice edge labels.
+ */
+ template <>
+ QString XsdStateMachine<XsdTerm::Ptr>::transitionTypeToString(XsdTerm::Ptr term) const
+ {
+ if (!term)
+ return QLatin1String("(empty)");
+
+ if (term->isElement()) {
+ return XsdElement::Ptr(term)->displayName(m_namePool);
+ } else if (term->isWildcard()) {
+ const XsdWildcard::Ptr wildcard(term);
+ return QLatin1String("(wildcard)");
+ } else {
+ return QString();
+ }
+ }
+}
+
+/**
+ * This method is used by the isUPAConform method to check whether @p term and @p otherTerm
+ * are the same resp. match each other.
+ */
+static bool termMatches(const XsdTerm::Ptr &term, const XsdTerm::Ptr &otherTerm, const NamePool::Ptr &namePool)
+{
+ if (term->isElement()) {
+ const XsdElement::Ptr element(term);
+
+ if (otherTerm->isElement()) {
+ // both, the term and the other term are elements
+
+ const XsdElement::Ptr otherElement(otherTerm);
+
+ // if they have the same name they match
+ if (element->name(namePool) == otherElement->name(namePool))
+ return true;
+
+ } else if (otherTerm->isWildcard()) {
+ // the term is an element and the other term a wildcard
+
+ const XsdWildcard::Ptr wildcard(otherTerm);
+
+ // wildcards using XsdWildcard::absentNamespace, so we have to fix that here
+ QXmlName name = element->name(namePool);
+ if (name.namespaceURI() == StandardNamespaces::empty)
+ name.setNamespaceURI(namePool->allocateNamespace(XsdWildcard::absentNamespace()));
+
+ // if the wildcards namespace constraint allows the elements name, they match
+ if (XsdSchemaHelper::wildcardAllowsExpandedName(name, wildcard, namePool))
+ return true;
+ }
+ } else if (term->isWildcard()) {
+ const XsdWildcard::Ptr wildcard(term);
+
+ if (otherTerm->isElement()) {
+ // the term is a wildcard and the other term an element
+
+ const XsdElement::Ptr otherElement(otherTerm);
+
+ // wildcards using XsdWildcard::absentNamespace, so we have to fix that here
+ QXmlName name = otherElement->name(namePool);
+ if (name.namespaceURI() == StandardNamespaces::empty)
+ name.setNamespaceURI(namePool->allocateNamespace(XsdWildcard::absentNamespace()));
+
+ // if the wildcards namespace constraint allows the elements name, they match
+ if (XsdSchemaHelper::wildcardAllowsExpandedName(name, wildcard, namePool))
+ return true;
+
+ } else if (otherTerm->isWildcard()) {
+ // both, the term and the other term are wildcards
+
+ const XsdWildcard::Ptr otherWildcard(otherTerm);
+
+ // check if the range of the wildcard overlaps.
+ const XsdWildcard::Ptr intersectionWildcard = XsdSchemaHelper::wildcardIntersection(wildcard, otherWildcard);
+ if (!intersectionWildcard ||
+ (intersectionWildcard && !(intersectionWildcard->namespaceConstraint()->variety() != XsdWildcard::NamespaceConstraint::Not && intersectionWildcard->namespaceConstraint()->namespaces().isEmpty())))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/**
+ * This method is used by the subsumes algorithm to check whether the @p derivedTerm is validly derived from the @p baseTerm.
+ *
+ * @param baseTerm The term of the base component (type or group).
+ * @param derivedTerm The term of the derived component (type or group).
+ * @param particles A hash to map the passed base and derived term to the particles they belong to.
+ * @param context The schema context.
+ * @param errorMsg The error message in the case that an error occurs.
+ */
+static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &derivedTerm, const QHash<XsdTerm::Ptr, XsdParticle::Ptr> &particles, const XsdSchemaContext::Ptr &context, QString &errorMsg)
+{
+ const NamePool::Ptr namePool(context->namePool());
+
+ // find the particles where the base and derived term belongs to
+ const XsdParticle::Ptr baseParticle = particles.value(baseTerm);
+ const XsdParticle::Ptr derivedParticle = particles.value(derivedTerm);
+
+ // check that an empty particle can not be derived from a non-empty particle
+ if (derivedParticle && baseParticle) {
+ if (XsdSchemaHelper::isParticleEmptiable(derivedParticle) && !XsdSchemaHelper::isParticleEmptiable(baseParticle)) {
+ errorMsg = QtXmlPatterns::tr("empty particle cannot be derived from non-empty particle");
+ return false;
+ }
+ }
+
+ if (baseTerm->isElement()) {
+ const XsdElement::Ptr element(baseTerm);
+
+ if (derivedTerm->isElement()) {
+ // if both terms are elements
+
+ const XsdElement::Ptr derivedElement(derivedTerm);
+
+ // check names are equal
+ if (element->name(namePool) != derivedElement->name(namePool)) {
+ errorMsg = QtXmlPatterns::tr("derived particle is missing element %1").arg(formatKeyword(element->displayName(namePool)));
+ return false;
+ }
+
+ // check value constraints are equal (if available)
+ if (element->valueConstraint() && element->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) {
+ if (!derivedElement->valueConstraint()) {
+ errorMsg = QtXmlPatterns::tr("derived element %1 is missing value constraint as defined in base particle").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+
+ if (derivedElement->valueConstraint()->variety() != XsdElement::ValueConstraint::Fixed) {
+ errorMsg = QtXmlPatterns::tr("derived element %1 has weaker value constraint than base particle").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+
+ const QSourceLocation dummyLocation(QUrl(QLatin1String("http://dummy.org")), 1, 1);
+ const XsdTypeChecker checker(context, QVector<QXmlName>(), dummyLocation);
+ if (!checker.valuesAreEqual(element->valueConstraint()->value(), derivedElement->valueConstraint()->value(), derivedElement->type())) {
+ errorMsg = QtXmlPatterns::tr("fixed value constraint of element %1 differs from value constraint in base particle").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+ }
+
+ // check that a derived element can not be nillable if the base element is not nillable
+ if (!element->isNillable() && derivedElement->isNillable()) {
+ errorMsg = QtXmlPatterns::tr("derived element %1 cannot be nillable as base element is not nillable").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+
+ // check that the constraints of the derived element are more strict then the constraints of the base element
+ const XsdElement::BlockingConstraints baseConstraints = element->disallowedSubstitutions();
+ const XsdElement::BlockingConstraints derivedConstraints = derivedElement->disallowedSubstitutions();
+ if (((baseConstraints & XsdElement::RestrictionConstraint) && !(derivedConstraints & XsdElement::RestrictionConstraint)) ||
+ ((baseConstraints & XsdElement::ExtensionConstraint) && !(derivedConstraints & XsdElement::ExtensionConstraint)) ||
+ ((baseConstraints & XsdElement::SubstitutionConstraint) && !(derivedConstraints & XsdElement::SubstitutionConstraint))) {
+ errorMsg = QtXmlPatterns::tr("block constraints of derived element %1 must not be more weaker than in the base element").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+
+ // if the type of both elements is the same we can stop testing here
+ if (element->type()->name(namePool) == derivedElement->type()->name(namePool))
+ return true;
+
+ // check that the type of the derived element can validly derived from the type of the base element
+ if (derivedElement->type()->isSimpleType()) {
+ if (!XsdSchemaHelper::isSimpleDerivationOk(derivedElement->type(), element->type(), SchemaType::DerivationConstraints())) {
+ errorMsg = QtXmlPatterns::tr("simple type of derived element %1 cannot be validly derived from base element").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+ } else if (derivedElement->type()->isComplexType()) {
+ if (!XsdSchemaHelper::isComplexDerivationOk(derivedElement->type(), element->type(), SchemaType::DerivationConstraints())) {
+ errorMsg = QtXmlPatterns::tr("complex type of derived element %1 cannot be validly derived from base element").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+ }
+
+ // if both, derived and base element, have a complex type that contains a particle itself, apply the subsumes algorithm
+ // recursive on their particles
+ if (element->type()->isComplexType() && derivedElement->type()->isComplexType()) {
+ if (element->type()->isDefinedBySchema() && derivedElement->type()->isDefinedBySchema()) {
+ const XsdComplexType::Ptr baseType(element->type());
+ const XsdComplexType::Ptr derivedType(derivedElement->type());
+ if ((baseType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly ||
+ baseType->contentType()->variety() == XsdComplexType::ContentType::Mixed) &&
+ (derivedType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly ||
+ derivedType->contentType()->variety() == XsdComplexType::ContentType::Mixed)) {
+
+ return XsdParticleChecker::subsumes(baseType->contentType()->particle(), derivedType->contentType()->particle(), context, errorMsg);
+ }
+ }
+ }
+
+ return true;
+ } else if (derivedTerm->isWildcard()) {
+ // derive a wildcard from an element is not allowed
+ errorMsg = QtXmlPatterns::tr("element %1 is missing in derived particle").arg(formatKeyword(element->displayName(namePool)));
+ return false;
+ }
+ } else if (baseTerm->isWildcard()) {
+ const XsdWildcard::Ptr wildcard(baseTerm);
+
+ if (derivedTerm->isElement()) {
+ // the base term is a wildcard and derived term an element
+
+ const XsdElement::Ptr derivedElement(derivedTerm);
+
+ // wildcards using XsdWildcard::absentNamespace, so we have to fix that here
+ QXmlName name = derivedElement->name(namePool);
+ if (name.namespaceURI() == StandardNamespaces::empty)
+ name.setNamespaceURI(namePool->allocateNamespace(XsdWildcard::absentNamespace()));
+
+ // check that name of the element is allowed by the wildcards namespace constraint
+ if (!XsdSchemaHelper::wildcardAllowsExpandedName(name, wildcard, namePool)) {
+ errorMsg = QtXmlPatterns::tr("element %1 does not match namespace constraint of wildcard in base particle").arg(formatKeyword(derivedElement->displayName(namePool)));
+ return false;
+ }
+
+ } else if (derivedTerm->isWildcard()) {
+ // both, derived and base term are wildcards
+
+ const XsdWildcard::Ptr derivedWildcard(derivedTerm);
+
+ // check that the derived wildcard is a valid subset of the base wildcard
+ if (!XsdSchemaHelper::isWildcardSubset(derivedWildcard, wildcard)) {
+ errorMsg = QtXmlPatterns::tr("wildcard in derived particle is not a valid subset of wildcard in base particle");
+ return false;
+ }
+
+ if (!XsdSchemaHelper::checkWildcardProcessContents(wildcard, derivedWildcard)) {
+ errorMsg = QtXmlPatterns::tr("processContent of wildcard in derived particle is weaker than wildcard in base particle");
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+typedef QHash<QXmlName, XsdElement::Ptr> ElementHash;
+
+/**
+ * Internal helper method that checks if the given @p particle contains an element with the
+ * same name and type twice.
+ */
+static bool hasDuplicatedElementsInternal(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool, ElementHash &hash, XsdElement::Ptr &conflictingElement)
+{
+ const XsdTerm::Ptr term = particle->term();
+ if (term->isElement()) {
+ const XsdElement::Ptr mainElement(term);
+ XsdElement::List substGroups = mainElement->substitutionGroups();
+ if (substGroups.isEmpty())
+ substGroups << mainElement;
+
+ for (int i = 0; i < substGroups.count(); ++i) {
+ const XsdElement::Ptr element = substGroups.at(i);
+ if (hash.contains(element->name(namePool))) {
+ if (element->type()->name(namePool) != hash.value(element->name(namePool))->type()->name(namePool)) {
+ conflictingElement = element;
+ return true;
+ }
+ } else {
+ hash.insert(element->name(namePool), element);
+ }
+ }
+ } else if (term->isModelGroup()) {
+ const XsdModelGroup::Ptr group(term);
+ const XsdParticle::List particles = group->particles();
+ for (int i = 0; i < particles.count(); ++i) {
+ if (hasDuplicatedElementsInternal(particles.at(i), namePool, hash, conflictingElement))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool XsdParticleChecker::hasDuplicatedElements(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool, XsdElement::Ptr &conflictingElement)
+{
+ ElementHash hash;
+ return hasDuplicatedElementsInternal(particle, namePool, hash, conflictingElement);
+}
+
+bool XsdParticleChecker::isUPAConform(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool)
+{
+ /**
+ * The algorithm is implemented like described in http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html#S2.2
+ */
+
+ // create a state machine for the given particle
+ XsdStateMachine<XsdTerm::Ptr> stateMachine(namePool);
+
+ XsdStateMachineBuilder builder(&stateMachine, namePool);
+ const XsdStateMachine<XsdTerm::Ptr>::StateId endState = builder.reset();
+ const XsdStateMachine<XsdTerm::Ptr>::StateId startState = builder.buildParticle(particle, endState);
+ builder.addStartState(startState);
+
+/*
+ static int counter = 0;
+ {
+ QFile file(QString("/tmp/file_upa%1.dot").arg(counter));
+ file.open(QIODevice::WriteOnly);
+ stateMachine.outputGraph(&file, "Base");
+ file.close();
+ }
+ ::system(QString("dot -Tpng /tmp/file_upa%1.dot -o/tmp/file_upa%1.png").arg(counter).toLatin1().data());
+*/
+ const XsdStateMachine<XsdTerm::Ptr> dfa = stateMachine.toDFA();
+/*
+ {
+ QFile file(QString("/tmp/file_upa%1dfa.dot").arg(counter));
+ file.open(QIODevice::WriteOnly);
+ dfa.outputGraph(&file, "Base");
+ file.close();
+ }
+ ::system(QString("dot -Tpng /tmp/file_upa%1dfa.dot -o/tmp/file_upa%1dfa.png").arg(counter).toLatin1().data());
+*/
+ const QHash<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateType> states = dfa.states();
+ const QHash<XsdStateMachine<XsdTerm::Ptr>::StateId, QHash<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > > transitions = dfa.transitions();
+
+ // the basic idea of that algorithm is to iterate over all states of that machine and check that no two edges
+ // that match on the same term leave a state, so for a given term it should always be obvious which edge to take
+ QHashIterator<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateType> stateIt(states);
+ while (stateIt.hasNext()) { // iterate over all states
+ stateIt.next();
+
+ // fetch all transitions the current state allows
+ const QHash<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > currentTransitions = transitions.value(stateIt.key());
+ QHashIterator<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > transitionIt(currentTransitions);
+ while (transitionIt.hasNext()) { // iterate over all transitions
+ transitionIt.next();
+
+ if (transitionIt.value().size() > 1) {
+ // we have one state with two edges leaving it, that means
+ // the XsdTerm::Ptr exists twice, that is an error
+ return false;
+ }
+
+ QHashIterator<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > innerTransitionIt(currentTransitions);
+ while (innerTransitionIt.hasNext()) { // iterate over all transitions again, as we have to compare all transitions with all
+ innerTransitionIt.next();
+
+ if (transitionIt.key() == innerTransitionIt.key()) // do no compare with ourself
+ continue;
+
+ // use the helper method termMatches to check if both term matches
+ if (termMatches(transitionIt.key(), innerTransitionIt.key(), namePool))
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+bool XsdParticleChecker::subsumes(const XsdParticle::Ptr &particle, const XsdParticle::Ptr &derivedParticle, const XsdSchemaContext::Ptr &context, QString &errorMsg)
+{
+ /**
+ * The algorithm is implemented like described in http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html#S2.3
+ */
+
+ const NamePool::Ptr namePool(context->namePool());
+
+ XsdStateMachine<XsdTerm::Ptr> baseStateMachine(namePool);
+ XsdStateMachine<XsdTerm::Ptr> derivedStateMachine(namePool);
+
+ // build up state machines for both particles
+ {
+ XsdStateMachineBuilder builder(&baseStateMachine, namePool);
+ const XsdStateMachine<XsdTerm::Ptr>::StateId endState = builder.reset();
+ const XsdStateMachine<XsdTerm::Ptr>::StateId startState = builder.buildParticle(particle, endState);
+ builder.addStartState(startState);
+
+ baseStateMachine = baseStateMachine.toDFA();
+ }
+ {
+ XsdStateMachineBuilder builder(&derivedStateMachine, namePool);
+ const XsdStateMachine<XsdTerm::Ptr>::StateId endState = builder.reset();
+ const XsdStateMachine<XsdTerm::Ptr>::StateId startState = builder.buildParticle(derivedParticle, endState);
+ builder.addStartState(startState);
+
+ derivedStateMachine = derivedStateMachine.toDFA();
+ }
+
+ QHash<XsdTerm::Ptr, XsdParticle::Ptr> particlesHash = XsdStateMachineBuilder::particleLookupMap(particle);
+ particlesHash.unite(XsdStateMachineBuilder::particleLookupMap(derivedParticle));
+
+/*
+ static int counter = 0;
+ {
+ QFile file(QString("/tmp/file_base%1.dot").arg(counter));
+ file.open(QIODevice::WriteOnly);
+ baseStateMachine.outputGraph(&file, QLatin1String("Base"));
+ file.close();
+ }
+ {
+ QFile file(QString("/tmp/file_derived%1.dot").arg(counter));
+ file.open(QIODevice::WriteOnly);
+ derivedStateMachine.outputGraph(&file, QLatin1String("Base"));
+ file.close();
+ }
+ ::system(QString("dot -Tpng /tmp/file_base%1.dot -o/tmp/file_base%1.png").arg(counter).toLatin1().data());
+ ::system(QString("dot -Tpng /tmp/file_derived%1.dot -o/tmp/file_derived%1.png").arg(counter).toLatin1().data());
+*/
+
+ const XsdStateMachine<XsdTerm::Ptr>::StateId baseStartState = baseStateMachine.startState();
+ const QHash<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateType> baseStates = baseStateMachine.states();
+ const QHash<XsdStateMachine<XsdTerm::Ptr>::StateId, QHash<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > > baseTransitions = baseStateMachine.transitions();
+
+ const XsdStateMachine<XsdTerm::Ptr>::StateId derivedStartState = derivedStateMachine.startState();
+ const QHash<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateType> derivedStates = derivedStateMachine.states();
+ const QHash<XsdStateMachine<XsdTerm::Ptr>::StateId, QHash<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > > derivedTransitions = derivedStateMachine.transitions();
+
+ // @see http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html#S2.3.1
+
+ // define working set
+ QList<QPair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId> > workSet;
+ QList<QPair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId> > processedSet;
+
+ // 1) fill working set initially with start states
+ workSet.append(qMakePair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId>(baseStartState, derivedStartState));
+ processedSet.append(qMakePair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId>(baseStartState, derivedStartState));
+
+ while (!workSet.isEmpty()) { // while there are state sets to process
+
+ // 3) dequeue on state set
+ const QPair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId> set = workSet.takeFirst();
+
+ const QHash<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > derivedTrans = derivedTransitions.value(set.second);
+ QHashIterator<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > derivedIt(derivedTrans);
+
+ const QHash<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > baseTrans = baseTransitions.value(set.first);
+
+ while (derivedIt.hasNext()) {
+ derivedIt.next();
+
+ bool found = false;
+ QHashIterator<XsdTerm::Ptr, QVector<XsdStateMachine<XsdTerm::Ptr>::StateId> > baseIt(baseTrans);
+ while (baseIt.hasNext()) {
+ baseIt.next();
+ if (derivedTermValid(baseIt.key(), derivedIt.key(), particlesHash, context, errorMsg)) {
+ const QPair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId> endSet =
+ qMakePair<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateId>(baseIt.value().first(), derivedIt.value().first());
+ if (!processedSet.contains(endSet) && !workSet.contains(endSet)) {
+ workSet.append(endSet);
+ processedSet.append(endSet);
+ }
+
+ found = true;
+ }
+ }
+
+ if (!found) {
+ return false;
+ }
+ }
+ }
+
+ // 5)
+ QHashIterator<XsdStateMachine<XsdTerm::Ptr>::StateId, XsdStateMachine<XsdTerm::Ptr>::StateType> it(derivedStates);
+ while (it.hasNext()) {
+ it.next();
+
+ if (it.value() == XsdStateMachine<XsdTerm::Ptr>::EndState || it.value() == XsdStateMachine<XsdTerm::Ptr>::StartEndState) {
+ for (int i = 0; i < processedSet.count(); ++i) {
+ if (processedSet.at(i).second == it.key() &&
+ (baseStates.value(processedSet.at(i).first) != XsdStateMachine<XsdTerm::Ptr>::EndState &&
+ baseStates.value(processedSet.at(i).first) != XsdStateMachine<XsdTerm::Ptr>::StartEndState)) {
+ errorMsg = QtXmlPatterns::tr("derived particle allows content that is not allowed in the base particle");
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdparticlechecker_p.h b/src/xmlpatterns/schema/qxsdparticlechecker_p.h
new file mode 100644
index 0000000..feed108
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdparticlechecker_p.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdParticleChecker_H
+#define Patternist_XsdParticleChecker_H
+
+#include "qxsdelement_p.h"
+#include "qxsdparticle_p.h"
+#include "qxsdschemacontext_p.h"
+#include "qxsdwildcard_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A helper class to check validity of particles.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdParticleChecker
+ {
+ public:
+ /**
+ * Checks whether the given @p particle has two or more element
+ * declarations with the same name but different type definitions.
+ */
+ static bool hasDuplicatedElements(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool, XsdElement::Ptr &conflictingElement);
+
+ /**
+ * Checks whether the given @p particle is valid according the
+ * UPA (http://www.w3.org/TR/xmlschema-1/#cos-nonambig) constraint.
+ */
+ static bool isUPAConform(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool);
+
+ /**
+ * Checks whether the given @p particle subsumes the given @p derivedParticle.
+ * (http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict)
+ */
+ static bool subsumes(const XsdParticle::Ptr &particle, const XsdParticle::Ptr &derivedParticle, const XsdSchemaContext::Ptr &context, QString &errorMsg);
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdreference.cpp b/src/xmlpatterns/schema/qxsdreference.cpp
new file mode 100644
index 0000000..176dc31
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdreference.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdreference_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+bool XsdReference::isReference() const
+{
+ return true;
+}
+
+void XsdReference::setType(Type type)
+{
+ m_type = type;
+}
+
+XsdReference::Type XsdReference::type() const
+{
+ return m_type;
+}
+
+void XsdReference::setReferenceName(const QXmlName &referenceName)
+{
+ m_referenceName = referenceName;
+}
+
+QXmlName XsdReference::referenceName() const
+{
+ return m_referenceName;
+}
+
+void XsdReference::setSourceLocation(const QSourceLocation &location)
+{
+ m_sourceLocation = location;
+}
+
+QSourceLocation XsdReference::sourceLocation() const
+{
+ return m_sourceLocation;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdreference_p.h b/src/xmlpatterns/schema/qxsdreference_p.h
new file mode 100644
index 0000000..1354d77
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdreference_p.h
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdReference_H
+#define Patternist_XsdReference_H
+
+#include "qxsdterm_p.h"
+
+#include <QtXmlPatterns/QSourceLocation>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A helper class for element and group reference resolving.
+ *
+ * For easy resolving of element and group references, we have this class
+ * that can be used as a place holder for the real element or group
+ * object it is referring to.
+ * So whenever the parser detects an element or group reference, it creates
+ * a XsdReference and returns it instead of the XsdElement or XsdModelGroup.
+ * During a later phase, the resolver will look for all XsdReferences
+ * in the schema and will replace them with their referring XsdElement or
+ * XsdModelGroup objects.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdReference : public XsdTerm
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdReference> Ptr;
+
+ /**
+ * Describes the type of the reference.
+ */
+ enum Type
+ {
+ Element, ///< The reference points to an element.
+ ModelGroup ///< The reference points to a model group.
+ };
+
+ /**
+ * Returns always @c true, used to avoid dynamic casts.
+ */
+ virtual bool isReference() const;
+
+ /**
+ * Sets the @p type of the reference.
+ *
+ * @see Type
+ */
+ void setType(Type type);
+
+ /**
+ * Returns the type of the reference.
+ */
+ Type type() const;
+
+ /**
+ * Sets the @p name of the referenced object.
+ *
+ * The name can either be a top-level element declaration
+ * or a top-level group declaration.
+ */
+ void setReferenceName(const QXmlName &ame);
+
+ /**
+ * Returns the name of the referenced object.
+ */
+ QXmlName referenceName() const;
+
+ /**
+ * Sets the source @p location where the reference is located.
+ */
+ void setSourceLocation(const QSourceLocation &location);
+
+ /**
+ * Returns the source location where the reference is located.
+ */
+ QSourceLocation sourceLocation() const;
+
+ private:
+ Type m_type;
+ QXmlName m_referenceName;
+ QSourceLocation m_sourceLocation;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschema.cpp b/src/xmlpatterns/schema/qxsdschema.cpp
new file mode 100644
index 0000000..aac5773
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschema.cpp
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschema_p.h"
+
+#include <QtCore/QReadLocker>
+#include <QtCore/QWriteLocker>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchema::XsdSchema(const NamePool::Ptr &namePool)
+ : m_namePool(namePool)
+{
+}
+
+XsdSchema::~XsdSchema()
+{
+}
+
+NamePool::Ptr XsdSchema::namePool() const
+{
+ return m_namePool;
+}
+
+void XsdSchema::setTargetNamespace(const QString &targetNamespace)
+{
+ m_targetNamespace = targetNamespace;
+}
+
+QString XsdSchema::targetNamespace() const
+{
+ return m_targetNamespace;
+}
+
+void XsdSchema::addElement(const XsdElement::Ptr &element)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_elements.insert(element->name(m_namePool), element);
+}
+
+XsdElement::Ptr XsdSchema::element(const QXmlName &name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_elements.value(name);
+}
+
+XsdElement::List XsdSchema::elements() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_elements.values();
+}
+
+void XsdSchema::addAttribute(const XsdAttribute::Ptr &attribute)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_attributes.insert(attribute->name(m_namePool), attribute);
+}
+
+XsdAttribute::Ptr XsdSchema::attribute(const QXmlName &name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_attributes.value(name);
+}
+
+XsdAttribute::List XsdSchema::attributes() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_attributes.values();
+}
+
+void XsdSchema::addType(const SchemaType::Ptr &type)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_types.insert(type->name(m_namePool), type);
+}
+
+SchemaType::Ptr XsdSchema::type(const QXmlName &name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_types.value(name);
+}
+
+SchemaType::List XsdSchema::types() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_types.values();
+}
+
+XsdSimpleType::List XsdSchema::simpleTypes() const
+{
+ QReadLocker locker(&m_lock);
+
+ XsdSimpleType::List retval;
+
+ const SchemaType::List types = m_types.values();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isSimpleType() && types.at(i)->isDefinedBySchema())
+ retval.append(types.at(i));
+ }
+
+ return retval;
+}
+
+XsdComplexType::List XsdSchema::complexTypes() const
+{
+ QReadLocker locker(&m_lock);
+
+ XsdComplexType::List retval;
+
+ const SchemaType::List types = m_types.values();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isComplexType() && types.at(i)->isDefinedBySchema())
+ retval.append(types.at(i));
+ }
+
+ return retval;
+}
+
+void XsdSchema::addAnonymousType(const SchemaType::Ptr &type)
+{
+ const QWriteLocker locker(&m_lock);
+
+ // search for not used anonymous type name
+ QXmlName typeName = type->name(m_namePool);
+ while (m_anonymousTypes.contains(typeName)) {
+ typeName = m_namePool->allocateQName(QString(), QLatin1String("merged_") + m_namePool->stringForLocalName(typeName.localName()), QString());
+ }
+
+ m_anonymousTypes.insert(typeName, type);
+}
+
+SchemaType::List XsdSchema::anonymousTypes() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_anonymousTypes.values();
+}
+
+void XsdSchema::addAttributeGroup(const XsdAttributeGroup::Ptr &group)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_attributeGroups.insert(group->name(m_namePool), group);
+}
+
+XsdAttributeGroup::Ptr XsdSchema::attributeGroup(const QXmlName name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_attributeGroups.value(name);
+}
+
+XsdAttributeGroup::List XsdSchema::attributeGroups() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_attributeGroups.values();
+}
+
+void XsdSchema::addElementGroup(const XsdModelGroup::Ptr &group)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_elementGroups.insert(group->name(m_namePool), group);
+}
+
+XsdModelGroup::Ptr XsdSchema::elementGroup(const QXmlName &name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_elementGroups.value(name);
+}
+
+XsdModelGroup::List XsdSchema::elementGroups() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_elementGroups.values();
+}
+
+void XsdSchema::addNotation(const XsdNotation::Ptr &notation)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_notations.insert(notation->name(m_namePool), notation);
+}
+
+XsdNotation::Ptr XsdSchema::notation(const QXmlName &name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_notations.value(name);
+}
+
+XsdNotation::List XsdSchema::notations() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_notations.values();
+}
+
+void XsdSchema::addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
+{
+ const QWriteLocker locker(&m_lock);
+
+ m_identityConstraints.insert(constraint->name(m_namePool), constraint);
+}
+
+XsdIdentityConstraint::Ptr XsdSchema::identityConstraint(const QXmlName &name) const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_identityConstraints.value(name);
+}
+
+XsdIdentityConstraint::List XsdSchema::identityConstraints() const
+{
+ const QReadLocker locker(&m_lock);
+
+ return m_identityConstraints.values();
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschema_p.h b/src/xmlpatterns/schema/qxsdschema_p.h
new file mode 100644
index 0000000..d697673
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschema_p.h
@@ -0,0 +1,301 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchema_H
+#define Patternist_XsdSchema_H
+
+#include "qschematype_p.h"
+#include "qxsdannotated_p.h"
+#include "qxsdattribute_p.h"
+#include "qxsdattributegroup_p.h"
+#include "qxsdcomplextype_p.h"
+#include "qxsdelement_p.h"
+#include "qxsdidentityconstraint_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdnotation_p.h"
+#include "qxsdsimpletype_p.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QReadWriteLock>
+
+/**
+ * @defgroup Patternist_schema XML Schema Processing
+ */
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD schema object.
+ *
+ * The class provides access to all components of a parsed XSD.
+ *
+ * @note In the documentation of this class objects, which are direct
+ * children of the <em>schema</em> object, are called top-level objects.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSModel">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchema : public QSharedData, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdSchema> Ptr;
+ typedef QList<XsdSchema::Ptr> List;
+
+ /**
+ * Creates a new schema object.
+ *
+ * @param namePool The namepool that should be used for names of
+ * all schema components.
+ */
+ XsdSchema(const NamePool::Ptr &namePool);
+
+ /**
+ * Destroys the schema object.
+ */
+ ~XsdSchema();
+
+ /**
+ * Returns the namepool that is used for names of
+ * all schema components.
+ */
+ NamePool::Ptr namePool() const;
+
+ /**
+ * Sets the @p targetNamespace of the schema.
+ */
+ void setTargetNamespace(const QString &targetNamespace);
+
+ /**
+ * Returns the target namespace of the schema.
+ */
+ QString targetNamespace() const;
+
+ /**
+ * Adds a new top-level @p element to the schema.
+ *
+ * @param element The new element.
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-element">Element Declaration</a>
+ */
+ void addElement(const XsdElement::Ptr &element);
+
+ /**
+ * Returns the top-level element of the schema with
+ * the given @p name or an empty pointer if none exist.
+ */
+ XsdElement::Ptr element(const QXmlName &name) const;
+
+ /**
+ * Returns the list of all top-level elements.
+ */
+ XsdElement::List elements() const;
+
+ /**
+ * Adds a new top-level @p attribute to the schema.
+ *
+ * @param attribute The new attribute.
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-attribute">Attribute Declaration</a>
+ */
+ void addAttribute(const XsdAttribute::Ptr &attribute);
+
+ /**
+ * Returns the top-level attribute of the schema with
+ * the given @p name or an empty pointer if none exist.
+ */
+ XsdAttribute::Ptr attribute(const QXmlName &name) const;
+
+ /**
+ * Returns the list of all top-level attributes.
+ */
+ XsdAttribute::List attributes() const;
+
+ /**
+ * Adds a new top-level @p type to the schema.
+ * That can be a simple or a complex type.
+ *
+ * @param type The new type.
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-datatype">Simple Type Declaration</a>
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-type">Complex Type Declaration</a>
+ */
+ void addType(const SchemaType::Ptr &type);
+
+ /**
+ * Returns the top-level type of the schema with
+ * the given @p name or an empty pointer if none exist.
+ */
+ SchemaType::Ptr type(const QXmlName &name) const;
+
+ /**
+ * Returns the list of all top-level types.
+ */
+ SchemaType::List types() const;
+
+ /**
+ * Returns the list of all top-level simple types.
+ */
+ XsdSimpleType::List simpleTypes() const;
+
+ /**
+ * Returns the list of all top-level complex types.
+ */
+ XsdComplexType::List complexTypes() const;
+
+ /**
+ * Adds an anonymous @p type to the schema.
+ * Anonymous types have no name and are declared
+ * locally inside an element object.
+ *
+ * @param type The new anonymous type.
+ */
+ void addAnonymousType(const SchemaType::Ptr &type);
+
+ /**
+ * Returns the list of all anonymous types.
+ */
+ SchemaType::List anonymousTypes() const;
+
+ /**
+ * Adds a new top-level attribute @p group to the schema.
+ *
+ * @param group The new attribute group.
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-attributeGroup">Attribute Group Declaration</a>
+ */
+ void addAttributeGroup(const XsdAttributeGroup::Ptr &group);
+
+ /**
+ * Returns the top-level attribute group of the schema with
+ * the given @p name or an empty pointer if none exist.
+ */
+ XsdAttributeGroup::Ptr attributeGroup(const QXmlName name) const;
+
+ /**
+ * Returns the list of all top-level attribute groups.
+ */
+ XsdAttributeGroup::List attributeGroups() const;
+
+ /**
+ * Adds a new top-level element @p group to the schema.
+ *
+ * @param group The new element group.
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-namedModelGroup">Element Group Declaration</a>
+ */
+ void addElementGroup(const XsdModelGroup::Ptr &group);
+
+ /**
+ * Returns the top-level element group of the schema with
+ * the given @p name or an empty pointer if none exist.
+ */
+ XsdModelGroup::Ptr elementGroup(const QXmlName &name) const;
+
+ /**
+ * Returns the list of all top-level element groups.
+ */
+ XsdModelGroup::List elementGroups() const;
+
+ /**
+ * Adds a new top-level @p notation to the schema.
+ *
+ * @param notation The new notation.
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#declare-notation">Notation Declaration</a>
+ */
+ void addNotation(const XsdNotation::Ptr &notation);
+
+ /**
+ * Returns the top-level notation of the schema with
+ * the given @p name or an empty pointer if none exist.
+ */
+ XsdNotation::Ptr notation(const QXmlName &name) const;
+
+ /**
+ * Returns the list of all top-level notations.
+ */
+ XsdNotation::List notations() const;
+
+ /**
+ * Adds a new identity @p constraint to the schema.
+ */
+ void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint);
+
+ /**
+ * Returns the identity constraint with the given @p name
+ * or an empty pointer if none exist.
+ */
+ XsdIdentityConstraint::Ptr identityConstraint(const QXmlName &name) const;
+
+ /**
+ * Returns the list of all identity constraints in this schema.
+ */
+ XsdIdentityConstraint::List identityConstraints() const;
+
+ private:
+ NamePool::Ptr m_namePool;
+ QString m_targetNamespace;
+ QHash<QXmlName, XsdElement::Ptr> m_elements;
+ QHash<QXmlName, XsdAttribute::Ptr> m_attributes;
+ QHash<QXmlName, SchemaType::Ptr> m_types;
+ QHash<QXmlName, SchemaType::Ptr> m_anonymousTypes;
+ QHash<QXmlName, XsdAttributeGroup::Ptr> m_attributeGroups;
+ QHash<QXmlName, XsdModelGroup::Ptr> m_elementGroups;
+ QHash<QXmlName, XsdNotation::Ptr> m_notations;
+ QHash<QXmlName, XsdIdentityConstraint::Ptr> m_identityConstraints;
+ mutable QReadWriteLock m_lock;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemachecker.cpp b/src/xmlpatterns/schema/qxsdschemachecker.cpp
new file mode 100644
index 0000000..d2001eb
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemachecker.cpp
@@ -0,0 +1,2061 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemachecker_p.h"
+
+#include "qderivedinteger_p.h"
+#include "qderivedstring_p.h"
+#include "qpatternplatform_p.h"
+#include "qqnamevalue_p.h"
+#include "qsourcelocationreflection_p.h"
+#include "qvaluefactory_p.h"
+#include "qxsdattributereference_p.h"
+#include "qxsdparticlechecker_p.h"
+#include "qxsdreference_p.h"
+#include "qxsdschemacontext_p.h"
+#include "qxsdschemahelper_p.h"
+#include "qxsdschemaparsercontext_p.h"
+#include "qxsdschematypesfactory_p.h"
+#include "qxsdtypechecker_p.h"
+
+#include "qxsdschemachecker_helper.cpp"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaChecker::XsdSchemaChecker(const QExplicitlySharedDataPointer<XsdSchemaContext> &context, const XsdSchemaParserContext *parserContext)
+ : m_context(context)
+ , m_namePool(parserContext->namePool())
+ , m_schema(parserContext->schema())
+{
+ setupAllowedAtomicFacets();
+}
+
+XsdSchemaChecker::~XsdSchemaChecker()
+{
+}
+
+/*
+ * This method is called after the resolver has set the base type for every
+ * type and information about deriavtion and 'is simple type vs. is complex type'
+ * are available.
+ */
+void XsdSchemaChecker::basicCheck()
+{
+ // first check that there is no circular inheritance, only the
+ // wxsSuperType is used here
+ checkBasicCircularInheritances();
+
+ // check the basic constraints like simple type can not inherit from complex type etc.
+ checkBasicSimpleTypeConstraints();
+ checkBasicComplexTypeConstraints();
+}
+
+void XsdSchemaChecker::check()
+{
+ checkCircularInheritances();
+ checkInheritanceRestrictions();
+ checkSimpleDerivationRestrictions();
+ checkSimpleTypeConstraints();
+ checkComplexTypeConstraints();
+ checkDuplicatedAttributeUses();
+
+ checkElementConstraints();
+ checkAttributeConstraints();
+ checkAttributeUseConstraints();
+// checkElementDuplicates();
+}
+
+void XsdSchemaChecker::addComponentLocationHash(const ComponentLocationHash &hash)
+{
+ m_componentLocationHash.unite(hash);
+}
+
+/**
+ * Checks whether the @p otherType is the same as @p myType or if one of its
+ * ancestors is the same as @p myType.
+ */
+static bool matchesType(const SchemaType::Ptr &myType, const SchemaType::Ptr &otherType, QSet<SchemaType::Ptr> visitedTypes)
+{
+ bool retval = false;
+
+ if (otherType) {
+ if (visitedTypes.contains(otherType)) {
+ return true;
+ } else {
+ visitedTypes.insert(otherType);
+ }
+ // simple types can have different varieties, so we have to check each of them
+ if (otherType->isSimpleType()) {
+ const XsdSimpleType::Ptr simpleType = otherType;
+ if (simpleType->category() == XsdSimpleType::SimpleTypeAtomic) {
+ // for atomic type we use the same test as in SchemaType::wxsTypeMatches
+ retval = (myType == simpleType ? true : matchesType(myType, simpleType->wxsSuperType(), visitedTypes));
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeList) {
+ // for list type we test against the itemType property
+ retval = (myType == simpleType->itemType() ? true : matchesType(myType, simpleType->itemType()->wxsSuperType(), visitedTypes));
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeUnion) {
+ // for union type we test against each member type
+ const XsdSimpleType::List members = simpleType->memberTypes();
+ for (int i = 0; i < members.count(); ++i) {
+ if (myType == members.at(i) ? true : matchesType(myType, members.at(i)->wxsSuperType(), visitedTypes)) {
+ retval = true;
+ break;
+ }
+ }
+ } else {
+ // reached xsAnySimple type whichs category is None
+ retval = false;
+ }
+ } else {
+ // if no simple type we handle it like in SchemaType::wxsTypeMatches
+ retval = (myType == otherType ? true : matchesType(myType, otherType->wxsSuperType(), visitedTypes));
+ }
+ } else // if otherType is null it doesn't match
+ retval = false;
+
+ return retval;
+}
+
+/**
+ * Checks whether there is a circular inheritance for the union inheritance.
+ */
+static bool hasCircularUnionInheritance(const XsdSimpleType::Ptr &type, const SchemaType::Ptr &otherType, NamePool::Ptr &namePool)
+{
+ if (type == otherType) {
+ return true;
+ }
+
+ if (!otherType->isSimpleType() || !otherType->isDefinedBySchema()) {
+ return false;
+ }
+
+ const XsdSimpleType::Ptr simpleOtherType = otherType;
+
+ if (simpleOtherType->category() == XsdSimpleType::SimpleTypeUnion) {
+ const XsdSimpleType::List memberTypes = simpleOtherType->memberTypes();
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ if (otherType->wxsSuperType() == type) {
+ return true;
+ }
+ if (hasCircularUnionInheritance(type, memberTypes.at(i), namePool)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+static inline bool wxsTypeMatches(const SchemaType::Ptr &type, const SchemaType::Ptr &otherType, QSet<SchemaType::Ptr> &visitedTypes, SchemaType::Ptr &conflictingType)
+{
+ if (!otherType)
+ return false;
+
+ if (visitedTypes.contains(otherType)) { // inheritance loop detected
+ conflictingType = otherType;
+ return true;
+ } else {
+ visitedTypes.insert(otherType);
+ }
+
+ if (type == otherType)
+ return true;
+
+ return wxsTypeMatches(type, otherType->wxsSuperType(), visitedTypes, conflictingType);
+}
+
+void XsdSchemaChecker::checkBasicCircularInheritances()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+ const QSourceLocation location = sourceLocationForType(type);
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 3)
+
+ // check normal base type inheritance
+ QSet<SchemaType::Ptr> visitedTypes;
+ SchemaType::Ptr conflictingType;
+
+ if (wxsTypeMatches(type, type->wxsSuperType(), visitedTypes, conflictingType)) {
+ if (conflictingType)
+ m_context->error(QtXmlPatterns::tr("%1 has inheritance loop in its base type %2")
+ .arg(formatType(m_namePool, type))
+ .arg(formatType(m_namePool, conflictingType)),
+ XsdSchemaContext::XSDError, location);
+ else
+ m_context->error(QtXmlPatterns::tr("circular inheritance of base type %1").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location);
+
+ return;
+ }
+ }
+}
+
+void XsdSchemaChecker::checkCircularInheritances()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+ const QSourceLocation location = sourceLocationForType(type);
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 3)
+
+ // check normal base type inheritance
+ QSet<SchemaType::Ptr> visitedTypes;
+ if (matchesType(type, type->wxsSuperType(), visitedTypes)) {
+ m_context->error(QtXmlPatterns::tr("circular inheritance of base type %1").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // check union member inheritance
+ if (type->isSimpleType() && type->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleType = type;
+ if (simpleType->category() == XsdSimpleType::SimpleTypeUnion) {
+ const XsdSimpleType::List memberTypes = simpleType->memberTypes();
+ for (int j = 0; j < memberTypes.count(); ++j) {
+ if (hasCircularUnionInheritance(simpleType, memberTypes.at(j), m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("circular inheritance of union %1").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkInheritanceRestrictions()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+ const QSourceLocation location = sourceLocationForType(type);
+
+ // check inheritance restrictions given by final property of base class
+ const SchemaType::Ptr baseType = type->wxsSuperType();
+ if (baseType->isDefinedBySchema()) {
+ if ((type->derivationMethod() == SchemaType::DerivationRestriction) && (baseType->derivationConstraints() & SchemaType::RestrictionConstraint)) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by restriction as the latter defines it as final")
+ .arg(formatType(m_namePool, type))
+ .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location);
+ return;
+ } else if ((type->derivationMethod() == SchemaType::DerivationExtension) && (baseType->derivationConstraints() & SchemaType::ExtensionConstraint)) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by extension as the latter defines it as final")
+ .arg(formatType(m_namePool, type))
+ .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkBasicSimpleTypeConstraints()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+
+ if (!type->isSimpleType())
+ continue;
+
+ const XsdSimpleType::Ptr simpleType = type;
+
+ const QSourceLocation location = sourceLocation(simpleType);
+
+ // check inheritance restrictions of simple type defined by schema constraints
+ const SchemaType::Ptr baseType = simpleType->wxsSuperType();
+
+ if (baseType->isComplexType() && (simpleType->name(m_namePool) != BuiltinTypes::xsAnySimpleType->name(m_namePool))) {
+ m_context->error(QtXmlPatterns::tr("base type of simple type %1 cannot be complex type %2")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, baseType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ if (baseType == BuiltinTypes::xsAnyType) {
+ if (type->name(m_namePool) != BuiltinTypes::xsAnySimpleType->name(m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 cannot have direct base type %2")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, BuiltinTypes::xsAnyType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkSimpleTypeConstraints()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+
+ if (!type->isSimpleType())
+ continue;
+
+ const XsdSimpleType::Ptr simpleType = type;
+
+ const QSourceLocation location = sourceLocation(simpleType);
+
+ if (simpleType->category() == XsdSimpleType::None) {
+ // additional checks
+ // check that no user defined type has xs:AnySimpleType as base type (except xs:AnyAtomicType)
+ if (simpleType->wxsSuperType()->name(m_namePool) == BuiltinTypes::xsAnySimpleType->name(m_namePool)) {
+ if (simpleType->name(m_namePool) != BuiltinTypes::xsAnyAtomicType->name(m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 is not allowed to have base type %2")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, simpleType->wxsSuperType())),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ // check that no user defined type has xs:AnyAtomicType as base type
+ if (simpleType->wxsSuperType()->name(m_namePool) == BuiltinTypes::xsAnyAtomicType->name(m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 is not allowed to have base type %2")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, simpleType->wxsSuperType())),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e37310
+ if (simpleType->category() == XsdSimpleType::SimpleTypeAtomic) {
+ // 1.1
+ if ((simpleType->wxsSuperType()->category() != XsdSimpleType::SimpleTypeAtomic) && (simpleType->name(m_namePool) != BuiltinTypes::xsAnyAtomicType->name(m_namePool))) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 can only have simple atomic type as base type")
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ }
+ // 1.2
+ if (simpleType->wxsSuperType()->derivationConstraints() & SchemaType::RestrictionConstraint) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 cannot derive from %2 as the latter defines restriction as final")
+ .arg(formatType(m_namePool, simpleType->wxsSuperType()))
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ }
+
+ // 1.3
+ // checked by checkConstrainingFacets already
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeList) {
+ const AnySimpleType::Ptr itemType = simpleType->itemType();
+
+ // 2.1 or @see http://www.w3.org/TR/xmlschema-2/#cos-list-of-atomic
+ if (itemType->category() != SchemaType::SimpleTypeAtomic && itemType->category() != SchemaType::SimpleTypeUnion) {
+ m_context->error(QtXmlPatterns::tr("variety of item type of %1 must be either atomic or union").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.1 second part
+ if (itemType->category() == SchemaType::SimpleTypeUnion && itemType->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleItemType = itemType;
+ const AnySimpleType::List memberTypes = simpleItemType->memberTypes();
+ for (int j = 0; j < memberTypes.count(); ++j) {
+ if (memberTypes.at(j)->category() != SchemaType::SimpleTypeAtomic) {
+ m_context->error(QtXmlPatterns::tr("variety of member types of %1 must be atomic").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+
+ // 2.2.1
+ if (simpleType->wxsSuperType()->name(m_namePool) == BuiltinTypes::xsAnySimpleType->name(m_namePool)) {
+ if (itemType->isSimpleType() && itemType->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleItemType = itemType;
+
+ // 2.2.1.1
+ if (simpleItemType->derivationConstraints() & XsdSimpleType::ListConstraint) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by list as the latter defines it as final")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.2.1.2
+ const XsdFacet::Hash facets = simpleType->facets();
+ XsdFacet::HashIterator it(facets);
+
+ bool invalidFacetFound = false;
+ while (it.hasNext()) {
+ it.next();
+ if (it.key() != XsdFacet::WhiteSpace) {
+ invalidFacetFound = true;
+ break;
+ }
+ }
+
+ if (invalidFacetFound) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 is only allowed to have %2 facet")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatKeyword("whiteSpace")),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ } else { // 2.2.2
+ // 2.2.2.1
+ if (simpleType->wxsSuperType()->category() != XsdSimpleType::SimpleTypeList) {
+ m_context->error(QtXmlPatterns::tr("base type of simple type %1 must have variety of type list").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.2.2.2
+ if (simpleType->wxsSuperType()->derivationConstraints() & SchemaType::RestrictionConstraint) {
+ m_context->error(QtXmlPatterns::tr("base type of simple type %1 has defined derivation by restriction as final").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.2.2.3
+ if (!XsdSchemaHelper::isSimpleDerivationOk(itemType, XsdSimpleType::Ptr(simpleType->wxsSuperType())->itemType(), SchemaType::DerivationConstraints())) {
+ m_context->error(QtXmlPatterns::tr("item type of base type does not match item type of %1").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.2.2.4
+ const XsdFacet::Hash facets = simpleType->facets();
+ XsdFacet::HashIterator it(facets);
+
+ bool invalidFacetFound = false;
+ XsdFacet::Type invalidFacetType = XsdFacet::None;
+ while (it.hasNext()) {
+ it.next();
+ const XsdFacet::Type facetType = it.key();
+ if (facetType != XsdFacet::Length &&
+ facetType != XsdFacet::MinimumLength &&
+ facetType != XsdFacet::MaximumLength &&
+ facetType != XsdFacet::WhiteSpace &&
+ facetType != XsdFacet::Pattern &&
+ facetType != XsdFacet::Enumeration) {
+ invalidFacetType = facetType;
+ invalidFacetFound = true;
+ break;
+ }
+ }
+
+ if (invalidFacetFound) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 contains not allowed facet type %2")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatKeyword(XsdFacet::typeName(invalidFacetType))),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.2.2.5
+ // TODO: check value constraints
+ }
+
+
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeUnion) {
+ const AnySimpleType::List memberTypes = simpleType->memberTypes();
+
+ if (simpleType->wxsSuperType()->name(m_namePool) == BuiltinTypes::xsAnySimpleType->name(m_namePool)) { // 3.1.1
+ // 3.3.1.1
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ const AnySimpleType::Ptr memberType = memberTypes.at(i);
+
+ if (memberType->derivationConstraints() & XsdSimpleType::UnionConstraint) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by union as the latter defines it as final")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, memberType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+
+ // 3.3.1.2
+ if (!simpleType->facets().isEmpty()) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to have any facets")
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ } else {
+ // 3.1.2.1
+ if (simpleType->wxsSuperType()->category() != SchemaType::SimpleTypeUnion) {
+ m_context->error(QtXmlPatterns::tr("base type %1 of simple type %2 must have variety of union")
+ .arg(formatType(m_namePool, simpleType->wxsSuperType()))
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 3.1.2.2
+ if (simpleType->wxsSuperType()->derivationConstraints() & SchemaType::DerivationRestriction) {
+ m_context->error(QtXmlPatterns::tr("base type %1 of simple type %2 is not allowed to have restriction in %3 attribute")
+ .arg(formatType(m_namePool, simpleType->wxsSuperType()))
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatAttribute("final")),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ //3.1.2.3
+ if (simpleType->wxsSuperType()->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleBaseType(simpleType->wxsSuperType());
+
+ AnySimpleType::List baseMemberTypes = simpleBaseType->memberTypes();
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ const AnySimpleType::Ptr memberType = memberTypes.at(i);
+ const AnySimpleType::Ptr baseMemberType = baseMemberTypes.at(i);
+
+ if (!XsdSchemaHelper::isSimpleDerivationOk(memberType, baseMemberType, SchemaType::DerivationConstraints())) {
+ m_context->error(QtXmlPatterns::tr("member type %1 cannot be derived from member type %2 of %3's base type %4")
+ .arg(formatType(m_namePool, memberType))
+ .arg(formatType(m_namePool, baseMemberType))
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, simpleBaseType)),
+ XsdSchemaContext::XSDError, location);
+ }
+ }
+ }
+
+ // 3.1.2.4
+ const XsdFacet::Hash facets = simpleType->facets();
+ XsdFacet::HashIterator it(facets);
+
+ bool invalidFacetFound = false;
+ XsdFacet::Type invalidFacetType = XsdFacet::None;
+ while (it.hasNext()) {
+ it.next();
+ const XsdFacet::Type facetType = it.key();
+ if (facetType != XsdFacet::Pattern &&
+ facetType != XsdFacet::Enumeration) {
+ invalidFacetType = facetType;
+ invalidFacetFound = true;
+ break;
+ }
+ }
+
+ if (invalidFacetFound) {
+ m_context->error(QtXmlPatterns::tr("simple type %1 contains not allowed facet type %2")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatKeyword(XsdFacet::typeName(invalidFacetType))),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 3.1.2.5
+ // TODO: check value constraints
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkBasicComplexTypeConstraints()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+
+ if (!type->isComplexType() || !type->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = type;
+
+ const QSourceLocation location = sourceLocation(complexType);
+
+ // check inheritance restrictions of complex type defined by schema constraints
+ const SchemaType::Ptr baseType = complexType->wxsSuperType();
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 2)
+ if (baseType->isSimpleType() && (complexType->derivationMethod() != XsdComplexType::DerivationExtension)) {
+ m_context->error(QtXmlPatterns::tr("derivation method of %1 must be extension because the base type %2 is a simple type")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+}
+
+void XsdSchemaChecker::checkComplexTypeConstraints()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+
+ if (!type->isComplexType() || !type->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = type;
+
+ const QSourceLocation location = sourceLocation(complexType);
+
+ if (complexType->contentType()->particle()) {
+ XsdElement::Ptr duplicatedElement;
+ if (XsdParticleChecker::hasDuplicatedElements(complexType->contentType()->particle(), m_namePool, duplicatedElement)) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 has duplicated element %2 in its content model")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatKeyword(duplicatedElement->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ if (!XsdParticleChecker::isUPAConform(complexType->contentType()->particle(), m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 has non-deterministic content")
+ .arg(formatType(m_namePool, complexType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+
+ // check inheritance restrictions of complex type defined by schema constraints
+ const SchemaType::Ptr baseType = complexType->wxsSuperType();
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-ct-extends
+ if (complexType->derivationMethod() == XsdComplexType::DerivationExtension) {
+ if (baseType->isComplexType() && baseType->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexBaseType = baseType;
+
+ // we can skip 1.1 here, as it is tested in checkInheritanceRestrictions() already
+
+ // 1.2 and 1.3
+ QString errorMsg;
+ if (!XsdSchemaHelper::isValidAttributeUsesExtension(complexType->attributeUses(), complexBaseType->attributeUses(),
+ complexType->attributeWildcard(), complexBaseType->attributeWildcard(), m_context, errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 1.4
+ bool validContentType = false;
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple && complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ if (complexType->contentType()->simpleType() == complexBaseType->contentType()->simpleType()) {
+ validContentType = true; // 1.4.1
+ }
+ } else if (complexType->contentType()->variety() == XsdComplexType::ContentType::Empty && complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Empty) {
+ validContentType = true; // 1.4.2
+ } else { // 1.4.3
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly || complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed) { // 1.4.3.1
+ if (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Empty) {
+ validContentType = true; // 1.4.3.2.1
+ } else { // 1.4.3.2.2
+ if (complexType->contentType()->particle()) { // our own check
+ if ((complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly && complexBaseType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly) ||
+ (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed && complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Mixed)) { // 1.4.3.2.2.1
+ if (isValidParticleExtension(complexType->contentType()->particle(), complexBaseType->contentType()->particle())) {
+ validContentType = true; // 1.4.3.2.2.2
+ }
+ }
+ }
+ // 1.4.3.2.2.3 and 1.4.3.2.2.4 handle 'open content' that we do not support yet
+ }
+ }
+ }
+
+ // 1.5 WTF?!?
+
+ if (!validContentType) {
+ m_context->error(QtXmlPatterns::tr("content model of complex type %1 is not a valid extension of content model of %2")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, complexBaseType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ } else if (baseType->isSimpleType()) {
+ // 2.1
+ if (complexType->contentType()->variety() != XsdComplexType::ContentType::Simple) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 must have simple content")
+ .arg(formatType(m_namePool, complexType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ if (complexType->contentType()->simpleType() != baseType) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 must have the same simple type as its base class %2")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // 2.2 tested in checkInheritanceRestrictions() already
+ }
+ } else if (complexType->derivationMethod() == XsdComplexType::DerivationRestriction) {
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e21402
+ const SchemaType::Ptr baseType(complexType->wxsSuperType());
+
+ bool derivationOk = false;
+ QString errorMsg;
+
+ // we can partly skip 1 here, as it is tested in checkInheritanceRestrictions() already
+ if (baseType->isComplexType()) {
+
+ // 2.1
+ if (baseType->name(m_namePool) == BuiltinTypes::xsAnyType->name(m_namePool)) {
+ derivationOk = true;
+ }
+
+ if (baseType->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexBaseType(baseType);
+
+ // 2.2.1
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ // 2.2.2.1
+ if (XsdSchemaHelper::isSimpleDerivationOk(complexType->contentType()->simpleType(), complexBaseType->contentType()->simpleType(), SchemaType::DerivationConstraints()))
+ derivationOk = true;
+
+ // 2.2.2.2
+ if (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Mixed) {
+ if (XsdSchemaHelper::isParticleEmptiable(complexBaseType->contentType()->particle()))
+ derivationOk = true;
+ }
+ }
+
+ // 2.3.1
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Empty) {
+ // 2.3.2.1
+ if (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Empty)
+ derivationOk = true;
+
+ // 2.3.2.2
+ if (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly || complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Mixed) {
+ if (XsdSchemaHelper::isParticleEmptiable(complexBaseType->contentType()->particle()))
+ derivationOk = true;
+ }
+ }
+
+ // 2.4.1.1
+ if (((complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly) &&
+ (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly || complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Mixed)) ||
+ // 2.4.1.2
+ (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed && complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Mixed)) {
+
+ // 2.4.2
+ if (XsdParticleChecker::subsumes(complexBaseType->contentType()->particle(), complexType->contentType()->particle(), m_context, errorMsg))
+ derivationOk = true;
+ }
+ }
+ }
+
+ if (!derivationOk) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 cannot be derived from base type %2%3")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType))
+ .arg(errorMsg.isEmpty() ? QString() : QLatin1String(": ") + errorMsg),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ if (baseType->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexBaseType(baseType);
+
+ QString errorMsg;
+ if (!XsdSchemaHelper::isValidAttributeUsesRestriction(complexType->attributeUses(), complexBaseType->attributeUses(),
+ complexType->attributeWildcard(), complexBaseType->attributeWildcard(), m_context, errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+
+ // check that complex type with simple content is not allowed to inherit from
+ // built in complex type xs:AnyType
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ if (baseType->name(m_namePool) == BuiltinTypes::xsAnyType->name(m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 with simple content cannot be derived from complex base type %2")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkSimpleDerivationRestrictions()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+
+ if (type->isComplexType())
+ continue;
+
+ if (type->category() != SchemaType::SimpleTypeList && type->category() != SchemaType::SimpleTypeUnion)
+ continue;
+
+ const XsdSimpleType::Ptr simpleType = type;
+ const QSourceLocation location = sourceLocation(simpleType);
+
+ // check all simple types derived by list
+ if (simpleType->category() == XsdSimpleType::SimpleTypeList) {
+ const AnySimpleType::Ptr itemType = simpleType->itemType();
+
+ if (itemType->isComplexType()) {
+ m_context->error(QtXmlPatterns::tr("item type of simple type %1 cannot be a complex type")
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+
+ if (itemType->isSimpleType() && itemType->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleItemType = itemType;
+ if (simpleItemType->derivationConstraints() & XsdSimpleType::ListConstraint) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by list as the latter defines it as final")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, simpleItemType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#cos-list-of-atomic
+ if (itemType->category() != SchemaType::SimpleTypeAtomic && itemType->category() != SchemaType::SimpleTypeUnion) {
+ m_context->error(QtXmlPatterns::tr("variety of item type of %1 must be either atomic or union").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ if (itemType->category() == SchemaType::SimpleTypeUnion && itemType->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleItemType = itemType;
+ const AnySimpleType::List memberTypes = simpleItemType->memberTypes();
+ for (int j = 0; j < memberTypes.count(); ++j) {
+ if (memberTypes.at(j)->category() != SchemaType::SimpleTypeAtomic) {
+ m_context->error(QtXmlPatterns::tr("variety of member types of %1 must be atomic").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+ }
+
+ // check all simple types derived by union
+ if (simpleType->category() == XsdSimpleType::SimpleTypeUnion) {
+ const AnySimpleType::List memberTypes = simpleType->memberTypes();
+
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ const AnySimpleType::Ptr memberType = memberTypes.at(i);
+
+ if (memberType->isComplexType()) {
+ m_context->error(QtXmlPatterns::tr("member type of simple type %1 cannot be a complex type")
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#cos-no-circular-unions
+ if (simpleType->name(m_namePool) == memberType->name(m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to have a member type with the same name as itself")
+ .arg(formatType(m_namePool, simpleType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+
+ if (memberType->isSimpleType() && memberType->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleMemberType = memberType;
+ if (simpleMemberType->derivationConstraints() & XsdSimpleType::UnionConstraint) {
+ m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by union as the latter defines it as final")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatType(m_namePool, simpleMemberType)),
+ XsdSchemaContext::XSDError, location);
+ return;
+ }
+ }
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkConstrainingFacets()
+{
+ // first the global simple types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (!(types.at(i)->isSimpleType()) || !(types.at(i)->isDefinedBySchema()))
+ continue;
+
+ const XsdSimpleType::Ptr simpleType = types.at(i);
+ checkConstrainingFacets(simpleType->facets(), simpleType);
+ }
+
+ // and afterwards all anonymous simple types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (!(anonymousTypes.at(i)->isSimpleType()) || !(anonymousTypes.at(i)->isDefinedBySchema()))
+ continue;
+
+ const XsdSimpleType::Ptr simpleType = anonymousTypes.at(i);
+ checkConstrainingFacets(simpleType->facets(), simpleType);
+ }
+}
+
+void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, const XsdSimpleType::Ptr &simpleType)
+{
+ if (facets.isEmpty())
+ return;
+
+ SchemaType::Ptr comparableBaseType;
+ if (!simpleType->wxsSuperType()->isDefinedBySchema())
+ comparableBaseType = simpleType->wxsSuperType();
+ else
+ comparableBaseType = simpleType->primitiveType();
+
+ const XsdSchemaSourceLocationReflection reflection(sourceLocation(simpleType));
+
+ // start checks
+ if (facets.contains(XsdFacet::Length)) {
+ const XsdFacet::Ptr lengthFacet = facets.value(XsdFacet::Length);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr lengthValue = lengthFacet->value();
+
+ // @see http://www.w3.org/TR/xmlschema-2/#length-minLength-maxLength
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ const XsdFacet::Ptr minLengthFacet = facets.value(XsdFacet::MinimumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr minLengthValue = minLengthFacet->value();
+
+ bool foundSuperMinimumLength = false;
+ SchemaType::Ptr baseType = simpleType->wxsSuperType();
+ while (baseType) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(baseType);
+ if (baseFacets.contains(XsdFacet::MinimumLength) && !baseFacets.contains(XsdFacet::Length)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr superValue(baseFacets.value(XsdFacet::MinimumLength)->value());
+ if (minLengthValue->toInteger() == superValue->toInteger()) {
+ foundSuperMinimumLength = true;
+ break;
+ }
+ }
+
+ baseType = baseType->wxsSuperType();
+ }
+
+ if ((minLengthValue->toInteger() > lengthValue->toInteger()) || !foundSuperMinimumLength) {
+ m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet")
+ .arg(formatKeyword("length"))
+ .arg(formatKeyword("minLength")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#length-minLength-maxLength
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ const XsdFacet::Ptr maxLengthFacet = facets.value(XsdFacet::MaximumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr maxLengthValue = maxLengthFacet->value();
+
+ bool foundSuperMaximumLength = false;
+ SchemaType::Ptr baseType = simpleType->wxsSuperType();
+ while (baseType) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(baseType);
+ if (baseFacets.contains(XsdFacet::MaximumLength) && !baseFacets.contains(XsdFacet::Length)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr superValue(baseFacets.value(XsdFacet::MaximumLength)->value());
+ if (maxLengthValue->toInteger() == superValue->toInteger()) {
+ foundSuperMaximumLength = true;
+ break;
+ }
+ }
+
+ baseType = baseType->wxsSuperType();
+ }
+
+ if ((maxLengthValue->toInteger() < lengthValue->toInteger()) || !foundSuperMaximumLength) {
+ m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet")
+ .arg(formatKeyword("length"))
+ .arg(formatKeyword("maxLength")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#length-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::Length)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacets.value(XsdFacet::Length)->value();
+ if (lengthValue->toInteger() != baseValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must have the same value as %2 facet of base type")
+ .arg(formatKeyword("length"))
+ .arg(formatKeyword("length")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ const XsdFacet::Ptr minLengthFacet = facets.value(XsdFacet::MinimumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr minLengthValue = minLengthFacet->value();
+
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ const XsdFacet::Ptr maxLengthFacet = facets.value(XsdFacet::MaximumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr maxLengthValue = maxLengthFacet->value();
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minLength-less-than-equal-to-maxLength
+ if (maxLengthValue->toInteger() < minLengthValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet")
+ .arg(formatKeyword("minLength"))
+ .arg(formatKeyword("maxLength")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minLength-valid-restriction
+ //TODO: check parent facets
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minLength-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::MinimumLength)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacets.value(XsdFacet::MinimumLength)->value();
+ if (minLengthValue->toInteger() < baseValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be equal or greater than %2 facet of base type")
+ .arg(formatKeyword("minLength"))
+ .arg(formatKeyword("minLength")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ const XsdFacet::Ptr maxLengthFacet = facets.value(XsdFacet::MaximumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr maxLengthValue = maxLengthFacet->value();
+
+ // @see http://www.w3.org/TR/xmlschema-2/#maxLength-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::MaximumLength)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue(baseFacets.value(XsdFacet::MaximumLength)->value());
+ if (maxLengthValue->toInteger() > baseValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("maxLength"))
+ .arg(formatKeyword("maxLength")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ // we keep the patterns in separated facets
+ // @see http://www.w3.org/TR/xmlschema-2/#src-multiple-patterns
+
+ // @see http://www.w3.org/TR/xmlschema-2/#cvc-pattern-valid
+ const XsdFacet::Ptr patternFacet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = patternFacet->multiValue();
+
+ for (int i = 0; i < multiValue.count(); ++i) {
+ const DerivedString<TypeString>::Ptr value = multiValue.at(i);
+ const QRegExp exp = PatternPlatform::parsePattern(value->stringValue(), m_context, &reflection);
+ if (!exp.isValid()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet contains invalid regular expression").arg(formatKeyword("pattern")), XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ // @see http://www.w3.org/TR/xmlschema-2/#src-multiple-enumerations
+
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+
+ if (BuiltinTypes::xsNOTATION->wxsTypeMatches(simpleType)) {
+ const AtomicValue::List notationNames = facet->multiValue();
+ for (int k = 0; k < notationNames.count(); ++k) {
+ const QNameValue::Ptr notationName = notationNames.at(k);
+ if (!m_schema->notation(notationName->qName())) {
+ m_context->error(QtXmlPatterns::tr("unknown notation %1 used in %2 facet")
+ .arg(formatKeyword(m_namePool, notationName->qName()))
+ .arg(formatKeyword("enumeration")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ }
+ }
+ } else if (BuiltinTypes::xsQName->wxsTypeMatches(simpleType)) {
+ } else {
+ const XsdTypeChecker checker(m_context, QVector<QXmlName>(), sourceLocation(simpleType));
+
+ const AnySimpleType::Ptr baseType = simpleType->wxsSuperType();
+ const XsdFacet::Hash baseFacets = XsdTypeChecker::mergedFacetsForType(baseType, m_context);
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ for (int k = 0; k < multiValue.count(); ++k) {
+ const QString stringValue = multiValue.at(k)->as<DerivedString<TypeString> >()->stringValue();
+ const QString actualValue = XsdTypeChecker::normalizedValue(stringValue, baseFacets);
+
+ QString errorMsg;
+ if (!checker.isValidString(actualValue, baseType, errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet contains invalid value %2: %3")
+ .arg(formatKeyword("enumeration"))
+ .arg(formatData(stringValue))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::WhiteSpace)) {
+ const XsdFacet::Ptr whiteSpaceFacet = facets.value(XsdFacet::WhiteSpace);
+ const DerivedString<TypeString>::Ptr whiteSpaceValue = whiteSpaceFacet->value();
+
+ // @see http://www.w3.org/TR/xmlschema-2/#whiteSpace-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::WhiteSpace)) {
+ const QString value = whiteSpaceValue->stringValue();
+ const QString baseValue = DerivedString<TypeString>::Ptr(baseFacets.value(XsdFacet::WhiteSpace)->value())->stringValue();
+ if (value == XsdSchemaToken::toString(XsdSchemaToken::Replace) || value == XsdSchemaToken::toString(XsdSchemaToken::Preserve)) {
+ if (baseValue == XsdSchemaToken::toString(XsdSchemaToken::Collapse)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet cannot be %2 or %3 if %4 facet of base type is %5")
+ .arg(formatKeyword("whiteSpace"))
+ .arg(formatData("replace"))
+ .arg(formatData("preserve"))
+ .arg(formatKeyword("whiteSpace"))
+ .arg(formatData("collapse")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ if (value == XsdSchemaToken::toString(XsdSchemaToken::Preserve) && baseValue == XsdSchemaToken::toString(XsdSchemaToken::Replace)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet cannot be %2 if %3 facet of base type is %4")
+ .arg(formatKeyword("whiteSpace"))
+ .arg(formatData("preserve"))
+ .arg(formatKeyword("whiteSpace"))
+ .arg(formatData("replace")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr maxFacet = facets.value(XsdFacet::MaximumInclusive);
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minInclusive-less-than-equal-to-maxInclusive
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr minFacet = facets.value(XsdFacet::MinimumInclusive);
+
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, maxFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet")
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#maxInclusive-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("maxInclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type")
+ .arg(formatKeyword("maxInclusive"))
+ .arg(formatKeyword("maxExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr maxFacet = facets.value(XsdFacet::MaximumExclusive);
+
+ // @see http://www.w3.org/TR/xmlschema-2/#maxInclusive-maxExclusive
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet and %2 facet cannot appear together")
+ .arg(formatKeyword("maxExclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minExclusive-less-than-equal-to-maxExclusive
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr minFacet = facets.value(XsdFacet::MinimumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, maxFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet")
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("maxExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#maxExclusive-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("maxExclusive"))
+ .arg(formatKeyword("maxExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("maxExclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorLessOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type")
+ .arg(formatKeyword("maxExclusive"))
+ .arg(formatKeyword("minInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorLessOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type")
+ .arg(formatKeyword("maxExclusive"))
+ .arg(formatKeyword("minExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr minFacet = facets.value(XsdFacet::MinimumExclusive);
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minInclusive-minExclusive
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet and %2 facet cannot appear together")
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("minInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minExclusive-less-than-maxInclusive
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr maxFacet = facets.value(XsdFacet::MaximumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, maxFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet")
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minExclusive-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorLessThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be greater than or equal to %2 facet of base type")
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("minExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type")
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("maxExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr minFacet = facets.value(XsdFacet::MinimumInclusive);
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minInclusive-less-than-maxExclusive
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr maxFacet = facets.value(XsdFacet::MaximumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, maxFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet")
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("maxExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#minInclusive-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorLessThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be greater than or equal to %2 facet of base type")
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("minInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorLessOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type")
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("minExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("maxInclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ if (baseFacets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive);
+ if (comparableBaseType) {
+ if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type")
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("maxExclusive")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::TotalDigits)) {
+ const XsdFacet::Ptr totalDigitsFacet = facets.value(XsdFacet::TotalDigits);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr totalDigitsValue = totalDigitsFacet->value();
+
+ // @see http://www.w3.org/TR/xmlschema-2/#totalDigits-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::TotalDigits)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::TotalDigits);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacet->value();
+
+ if (totalDigitsValue->toInteger() > baseValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("totalDigits"))
+ .arg(formatKeyword("totalDigits")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ if (facets.contains(XsdFacet::FractionDigits)) {
+ const XsdFacet::Ptr fractionDigitsFacet = facets.value(XsdFacet::FractionDigits);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr fractionDigitsValue = fractionDigitsFacet->value();
+
+ // http://www.w3.org/TR/xmlschema-2/#fractionDigits-totalDigits
+ if (facets.contains(XsdFacet::TotalDigits)) {
+ const XsdFacet::Ptr totalDigitsFacet = facets.value(XsdFacet::TotalDigits);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr totalDigitsValue = totalDigitsFacet->value();
+
+ if (fractionDigitsValue->toInteger() > totalDigitsValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet")
+ .arg(formatKeyword("fractionDigits"))
+ .arg(formatKeyword("totalDigits")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#fractionDigits-valid-restriction
+ if (simpleType->derivationMethod() == XsdSimpleType::DerivationRestriction) {
+ const XsdFacet::Hash baseFacets = m_context->facetsForType(simpleType->wxsSuperType());
+ if (baseFacets.contains(XsdFacet::FractionDigits)) {
+ const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::FractionDigits);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacet->value();
+
+ if (fractionDigitsValue->toInteger() > baseValue->toInteger()) {
+ m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type")
+ .arg(formatKeyword("fractionDigits"))
+ .arg(formatKeyword("fractionDigits")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+
+
+ // check whether facets are allowed for simple types variety
+ if (simpleType->wxsSuperType()->category() == SchemaType::SimpleTypeAtomic) {
+ if (simpleType->primitiveType()) {
+ const QXmlName primitiveTypeName = simpleType->primitiveType()->name(m_namePool);
+ if (m_allowedAtomicFacets.contains(primitiveTypeName)) {
+ const QSet<XsdFacet::Type> allowedFacets = m_allowedAtomicFacets.value(primitiveTypeName);
+ QSet<XsdFacet::Type> availableFacets = facets.keys().toSet();
+
+ if (!availableFacets.subtract(allowedFacets).isEmpty()) {
+ m_context->error(QtXmlPatterns::tr("simple type contains not allowed facet %1")
+ .arg(formatKeyword(XsdFacet::typeName(availableFacets.toList().first()))),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ } else if (simpleType->wxsSuperType()->category() == SchemaType::SimpleTypeList) {
+ if (facets.contains(XsdFacet::MaximumInclusive) || facets.contains(XsdFacet::MinimumInclusive) ||
+ facets.contains(XsdFacet::MaximumExclusive) || facets.contains(XsdFacet::MinimumExclusive) ||
+ facets.contains(XsdFacet::TotalDigits) || facets.contains(XsdFacet::FractionDigits))
+ {
+ m_context->error(QtXmlPatterns::tr("%1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list")
+ .arg(formatKeyword("maxInclusive"))
+ .arg(formatKeyword("maxExclusive"))
+ .arg(formatKeyword("minInclusive"))
+ .arg(formatKeyword("minExclusive"))
+ .arg(formatKeyword("totalDigits"))
+ .arg(formatKeyword("fractionDigits")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ }
+ } else if (simpleType->wxsSuperType()->category() == SchemaType::SimpleTypeUnion) {
+ if (facets.contains(XsdFacet::MaximumInclusive) || facets.contains(XsdFacet::MinimumInclusive) ||
+ facets.contains(XsdFacet::MaximumExclusive) || facets.contains(XsdFacet::MinimumExclusive) ||
+ facets.contains(XsdFacet::TotalDigits) || facets.contains(XsdFacet::FractionDigits) ||
+ facets.contains(XsdFacet::MinimumLength) || facets.contains(XsdFacet::MaximumLength) ||
+ facets.contains(XsdFacet::Length) || facets.contains(XsdFacet::WhiteSpace))
+ {
+ m_context->error(QtXmlPatterns::tr("only %1 and %2 facets are allowed when derived by union")
+ .arg(formatKeyword("pattern"))
+ .arg(formatKeyword("enumeration")),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ }
+ }
+
+ // check whether value of facet matches the value space of the simple types base type
+ const SchemaType::Ptr baseType = simpleType->wxsSuperType();
+ if (!baseType->isDefinedBySchema()) {
+ const XsdSchemaSourceLocationReflection reflection(sourceLocation(simpleType));
+
+ XsdFacet::HashIterator it(facets);
+ while (it.hasNext()) {
+ it.next();
+ const XsdFacet::Ptr facet = it.value();
+ if (facet->type() == XsdFacet::MaximumInclusive ||
+ facet->type() == XsdFacet::MaximumExclusive ||
+ facet->type() == XsdFacet::MinimumInclusive ||
+ facet->type() == XsdFacet::MinimumExclusive) {
+ const DerivedString<TypeString>::Ptr stringValue = facet->value();
+ const AtomicValue::Ptr value = ValueFactory::fromLexical(stringValue->stringValue(), baseType, m_context, &reflection);
+ if (value->hasError()) {
+ m_context->error(QtXmlPatterns::tr("%1 contains %2 facet with invalid data: %3")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatKeyword(XsdFacet::typeName(facet->type())))
+ .arg(formatData(stringValue->stringValue())),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+
+ // @see http://www.w3.org/TR/xmlschema-2/#enumeration-valid-restriction
+ if (facet->type() == XsdFacet::Enumeration && baseType != BuiltinTypes::xsNOTATION) {
+ const AtomicValue::List multiValue = facet->multiValue();
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString stringValue = DerivedString<TypeString>::Ptr(multiValue.at(j))->stringValue();
+ const AtomicValue::Ptr value = ValueFactory::fromLexical(stringValue, baseType, m_context, &reflection);
+ if (value->hasError()) {
+ m_context->error(QtXmlPatterns::tr("%1 contains %2 facet with invalid data: %3")
+ .arg(formatType(m_namePool, simpleType))
+ .arg(formatKeyword(XsdFacet::typeName(XsdFacet::Enumeration)))
+ .arg(formatData(stringValue)),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+ }
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkDuplicatedAttributeUses()
+{
+ // first all global attribute groups
+ const XsdAttributeGroup::List attributeGroups = m_schema->attributeGroups();
+ for (int i = 0; i < attributeGroups.count(); ++i) {
+ const XsdAttributeGroup::Ptr attributeGroup = attributeGroups.at(i);
+ const XsdAttributeUse::List uses = attributeGroup->attributeUses();
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 4)
+ XsdAttribute::Ptr conflictingAttribute;
+ if (hasDuplicatedAttributeUses(uses, conflictingAttribute)) {
+ m_context->error(QtXmlPatterns::tr("attribute group %1 contains attribute %2 twice")
+ .arg(formatKeyword(attributeGroup->displayName(m_namePool)))
+ .arg(formatKeyword(conflictingAttribute->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(attributeGroup));
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 5)
+ if (hasMultipleIDAttributeUses(uses)) {
+ m_context->error(QtXmlPatterns::tr("attribute group %1 contains two different attributes that both have types derived from %2")
+ .arg(formatKeyword(attributeGroup->displayName(m_namePool)))
+ .arg(formatType(m_namePool, BuiltinTypes::xsID)),
+ XsdSchemaContext::XSDError, sourceLocation(attributeGroup));
+ return;
+ }
+
+ if (hasConstraintIDAttributeUse(uses, conflictingAttribute)) {
+ m_context->error(QtXmlPatterns::tr("attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3")
+ .arg(formatKeyword(attributeGroup->displayName(m_namePool)))
+ .arg(formatKeyword(conflictingAttribute->displayName(m_namePool)))
+ .arg(formatType(m_namePool, BuiltinTypes::xsID)),
+ XsdSchemaContext::XSDError, sourceLocation(attributeGroup));
+ return;
+ }
+ }
+
+ // then the global and anonymous complex types
+ SchemaType::List types = m_schema->types();
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ if (!(types.at(i)->isComplexType()) || !types.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = types.at(i);
+ const XsdAttributeUse::List attributeUses = complexType->attributeUses();
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 4)
+ XsdAttribute::Ptr conflictingAttribute;
+ if (hasDuplicatedAttributeUses(attributeUses, conflictingAttribute)) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 contains attribute %2 twice")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatKeyword(conflictingAttribute->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 5)
+ if (hasMultipleIDAttributeUses(attributeUses)) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 contains two different attributes that both have types derived from %2")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, BuiltinTypes::xsID)),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+
+ if (hasConstraintIDAttributeUse(attributeUses, conflictingAttribute)) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 contains attribute %2 that has value constraint but type that inherits from %3")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatKeyword(conflictingAttribute->displayName(m_namePool)))
+ .arg(formatType(m_namePool, BuiltinTypes::xsID)),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ }
+}
+
+void XsdSchemaChecker::checkElementConstraints()
+{
+ const QSet<XsdElement::Ptr> elements = collectAllElements(m_schema);
+ QSetIterator<XsdElement::Ptr> it(elements);
+ while (it.hasNext()) {
+ const XsdElement::Ptr element = it.next();
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#e-props-correct
+
+ // 2 and xs:ID check
+ if (element->valueConstraint()) {
+ const SchemaType::Ptr type = element->type();
+
+ AnySimpleType::Ptr targetType;
+ if (type->isSimpleType() && type->category() == SchemaType::SimpleTypeAtomic) {
+ targetType = type;
+
+ // if it is a XsdSimpleType, use its primitive type as target type
+ if (type->isDefinedBySchema())
+ targetType = XsdSimpleType::Ptr(type)->primitiveType();
+
+ } else if (type->isComplexType() && type->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexType(type);
+
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ const AnySimpleType::Ptr simpleType = complexType->contentType()->simpleType();
+ if (simpleType->category() == AnySimpleType::SimpleTypeAtomic) {
+ targetType = simpleType;
+
+ if (simpleType->isDefinedBySchema())
+ targetType = XsdSimpleType::Ptr(simpleType)->primitiveType();
+ }
+ } else if (complexType->contentType()->variety() != XsdComplexType::ContentType::Mixed) {
+ m_context->error(QtXmlPatterns::tr("element %1 is not allowed to have a value constraint if its base type is complex")
+ .arg(formatKeyword(element->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+ }
+ if ((targetType == BuiltinTypes::xsID) || BuiltinTypes::xsID->wxsTypeMatches(type)) {
+ m_context->error(QtXmlPatterns::tr("element %1 is not allowed to have a value constraint if its type is derived from %2")
+ .arg(formatKeyword(element->displayName(m_namePool)))
+ .arg(formatType(m_namePool, BuiltinTypes::xsID)),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+
+ if (type->isSimpleType()) {
+ QString errorMsg;
+ if (!isValidValue(element->valueConstraint()->value(), type, errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("value constraint of element %1 is not of elements type: %2")
+ .arg(formatKeyword(element->displayName(m_namePool)))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+ } else if (type->isComplexType() && type->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexType(type);
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ QString errorMsg;
+ if (!isValidValue(element->valueConstraint()->value(), complexType->contentType()->simpleType(), errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("value constraint of element %1 is not of elements type: %2")
+ .arg(formatKeyword(element->displayName(m_namePool)))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+ }
+ }
+ }
+
+ if (!element->substitutionGroupAffiliations().isEmpty()) {
+ // 3
+ if (!element->scope() || element->scope()->variety() != XsdElement::Scope::Global) {
+ m_context->error(QtXmlPatterns::tr("element %1 is not allowed to have substitution group affiliation as it is no global element").arg(formatKeyword(element->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+
+ // 4
+ const XsdElement::List affiliations = element->substitutionGroupAffiliations();
+ for (int i = 0; i < affiliations.count(); ++i) {
+ const XsdElement::Ptr affiliation = affiliations.at(i);
+
+ bool derivationOk = false;
+ if (element->type()->isComplexType() && affiliation->type()->isComplexType()) {
+ if (XsdSchemaHelper::isComplexDerivationOk(element->type(), affiliation->type(), affiliation->substitutionGroupExclusions())) {
+ derivationOk = true;
+ }
+ }
+ if (element->type()->isComplexType() && affiliation->type()->isSimpleType()) {
+ if (XsdSchemaHelper::isComplexDerivationOk(element->type(), affiliation->type(), affiliation->substitutionGroupExclusions())) {
+ derivationOk = true;
+ }
+ }
+ if (element->type()->isSimpleType()) {
+ if (XsdSchemaHelper::isSimpleDerivationOk(element->type(), affiliation->type(), affiliation->substitutionGroupExclusions())) {
+ derivationOk = true;
+ }
+ }
+
+ if (!derivationOk) {
+ m_context->error(QtXmlPatterns::tr("type of element %1 cannot be derived from type of substitution group affiliation").arg(formatKeyword(element->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+ }
+
+ // 5 was checked in XsdSchemaResolver::resolveSubstitutionGroupAffiliations() already
+ }
+ }
+}
+
+void XsdSchemaChecker::checkAttributeConstraints()
+{
+ // all global attributes
+ XsdAttribute::List attributes = m_schema->attributes();
+
+ // and all local attributes
+ SchemaType::List types = m_schema->types();
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ if (!types.at(i)->isComplexType() || !types.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType(types.at(i));
+ const XsdAttributeUse::List uses = complexType->attributeUses();
+ for (int j = 0; j < uses.count(); ++j)
+ attributes.append(uses.at(j)->attribute());
+ }
+
+ for (int i = 0; i < attributes.count(); ++i) {
+ const XsdAttribute::Ptr attribute = attributes.at(i);
+
+ if (!attribute->valueConstraint())
+ continue;
+
+ if (attribute->valueConstraint()->variety() == XsdAttribute::ValueConstraint::Default || attribute->valueConstraint()->variety() == XsdAttribute::ValueConstraint::Fixed) {
+ const SchemaType::Ptr type = attribute->type();
+
+ QString errorMsg;
+ if (!isValidValue(attribute->valueConstraint()->value(), attribute->type(), errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("value constraint of attribute %1 is not of attributes type: %2")
+ .arg(formatKeyword(attribute->displayName(m_namePool)))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, sourceLocation(attribute));
+ return;
+ }
+ }
+
+ if (BuiltinTypes::xsID->wxsTypeMatches(attribute->type())) {
+ m_context->error(QtXmlPatterns::tr("attribute %1 has value constraint but has type derived from %2")
+ .arg(formatKeyword(attribute->displayName(m_namePool)))
+ .arg(formatType(m_namePool, BuiltinTypes::xsID)),
+ XsdSchemaContext::XSDError, sourceLocation(attribute));
+ return;
+ }
+ }
+}
+
+bool XsdSchemaChecker::isValidValue(const QString &stringValue, const AnySimpleType::Ptr &type, QString &errorMsg) const
+{
+ if (BuiltinTypes::xsAnySimpleType->name(m_namePool) == type->name(m_namePool))
+ return true; // no need to check xs:anyType content
+
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(type, m_context);
+ const QString actualValue = XsdTypeChecker::normalizedValue(stringValue, facets);
+
+ const XsdTypeChecker checker(m_context, QVector<QXmlName>(), QSourceLocation(QUrl(QLatin1String("http://dummy.org")), 1, 1));
+ return checker.isValidString(actualValue, type, errorMsg);
+}
+
+void XsdSchemaChecker::checkAttributeUseConstraints()
+{
+ XsdComplexType::List complexTypes;
+
+ SchemaType::List types = m_schema->types();
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+ if (type->isComplexType() && type->isDefinedBySchema())
+ complexTypes.append(XsdComplexType::Ptr(type));
+ }
+
+ for (int i = 0; i < complexTypes.count(); ++i) {
+ const XsdComplexType::Ptr complexType(complexTypes.at(i));
+ const SchemaType::Ptr baseType = complexType->wxsSuperType();
+ if (!baseType || !baseType->isComplexType() || !baseType->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexBaseType(baseType);
+
+ const XsdAttributeUse::List attributeUses = complexType->attributeUses();
+ QHash<QXmlName, XsdAttributeUse::Ptr> lookupHash;
+ for (int j = 0; j < attributeUses.count(); ++j)
+ lookupHash.insert(attributeUses.at(j)->attribute()->name(m_namePool), attributeUses.at(j));
+
+ const XsdAttributeUse::List baseAttributeUses = complexBaseType->attributeUses();
+ for (int j = 0; j < baseAttributeUses.count(); ++j) {
+ const XsdAttributeUse::Ptr baseAttributeUse = baseAttributeUses.at(j);
+
+ if (lookupHash.contains(baseAttributeUse->attribute()->name(m_namePool))) {
+ const XsdAttributeUse::Ptr attributeUse = lookupHash.value(baseAttributeUse->attribute()->name(m_namePool));
+
+ if (baseAttributeUse->useType() == XsdAttributeUse::RequiredUse) {
+ if (attributeUse->useType() == XsdAttributeUse::OptionalUse || attributeUse->useType() == XsdAttributeUse::ProhibitedUse) {
+ m_context->error(QtXmlPatterns::tr("%1 attribute in derived complex type must be %2 like in base type")
+ .arg(formatAttribute("use"))
+ .arg(formatData("required")),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ }
+
+ if (baseAttributeUse->valueConstraint()) {
+ if (baseAttributeUse->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Fixed) {
+ if (!attributeUse->valueConstraint()) {
+ m_context->error(QtXmlPatterns::tr("attribute %1 in derived complex type must have %2 value constraint like in base type")
+ .arg(formatKeyword(attributeUse->attribute()->displayName(m_namePool)))
+ .arg(formatData("fixed")),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ } else {
+ if (attributeUse->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Fixed) {
+ const XsdTypeChecker checker(m_context, QVector<QXmlName>(), sourceLocation(complexType));
+ if (!checker.valuesAreEqual(attributeUse->valueConstraint()->value(), baseAttributeUse->valueConstraint()->value(), attributeUse->attribute()->type())) {
+ m_context->error(QtXmlPatterns::tr("attribute %1 in derived complex type must have the same %2 value constraint like in base type")
+ .arg(formatKeyword(attributeUse->attribute()->displayName(m_namePool)))
+ .arg(formatData("fixed")),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ } else {
+ m_context->error(QtXmlPatterns::tr("attribute %1 in derived complex type must have %2 value constraint")
+ .arg(formatKeyword(attributeUse->attribute()->displayName(m_namePool)))
+ .arg(formatData("fixed")),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // additional check that process content property of attribute wildcard in derived type is
+ // not weaker than the wildcard in base type
+ const XsdWildcard::Ptr baseWildcard(complexBaseType->attributeWildcard());
+ const XsdWildcard::Ptr derivedWildcard(complexType->attributeWildcard());
+ if (baseWildcard && derivedWildcard) {
+ if (!XsdSchemaHelper::checkWildcardProcessContents(baseWildcard, derivedWildcard)) {
+ m_context->error(QtXmlPatterns::tr("processContent of base wildcard must be weaker than derived wildcard"), XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ }
+ }
+}
+
+void XsdSchemaChecker::checkElementDuplicates()
+{
+ // check all global types...
+ SchemaType::List types = m_schema->types();
+
+ // .. and anonymous types
+ types << m_schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ const SchemaType::Ptr type = types.at(i);
+
+ if (!type->isComplexType() || !type->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType(type);
+
+ if ((complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly) || (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed)) {
+ DuplicatedElementMap elementMap;
+ DuplicatedWildcardMap wildcardMap;
+
+ checkElementDuplicates(complexType->contentType()->particle(), elementMap, wildcardMap);
+ }
+ }
+}
+
+void XsdSchemaChecker::checkElementDuplicates(const XsdParticle::Ptr &particle, DuplicatedElementMap &elementMap, DuplicatedWildcardMap &wildcardMap)
+{
+ if (particle->term()->isElement()) {
+ const XsdElement::Ptr element(particle->term());
+
+ if (elementMap.contains(element->name(m_namePool))) {
+ if (element->type() != elementMap.value(element->name(m_namePool))) {
+ m_context->error(QtXmlPatterns::tr("element %1 exists twice with different types")
+ .arg(formatKeyword(element->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+ } else {
+ elementMap.insert(element->name(m_namePool), element->type());
+ }
+
+ // check substitution group affiliation
+ const XsdElement::List substElements = element->substitutionGroupAffiliations();
+ for (int i = 0; i < substElements.count(); ++i) {
+ const XsdElement::Ptr substElement = substElements.at(i);
+ if (elementMap.contains(substElement->name(m_namePool))) {
+ if (substElement->type() != elementMap.value(substElement->name(m_namePool))) {
+ m_context->error(QtXmlPatterns::tr("element %1 exists twice with different types")
+ .arg(formatKeyword(substElement->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, sourceLocation(element));
+ return;
+ }
+ } else {
+ elementMap.insert(substElement->name(m_namePool), substElement->type());
+ }
+ }
+ } else if (particle->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr group(particle->term());
+ const XsdParticle::List particles = group->particles();
+ for (int i = 0; i < particles.count(); ++i)
+ checkElementDuplicates(particles.at(i), elementMap, wildcardMap);
+ } else if (particle->term()->isWildcard()) {
+ const XsdWildcard::Ptr wildcard(particle->term());
+
+ bool error = false;
+ if (!wildcardMap.contains(wildcard->namespaceConstraint()->variety())) {
+ if (!wildcardMap.isEmpty())
+ error = true;
+ } else {
+ const XsdWildcard::Ptr otherWildcard = wildcardMap.value(wildcard->namespaceConstraint()->variety());
+ if ((wildcard->processContents() != otherWildcard->processContents()) || (wildcard->namespaceConstraint()->namespaces() != otherWildcard->namespaceConstraint()->namespaces()))
+ error = true;
+ }
+
+ if (error) {
+ m_context->error(QtXmlPatterns::tr("particle contains non-deterministic wildcards"), XsdSchemaContext::XSDError, sourceLocation(wildcard));
+ return;
+ } else {
+ wildcardMap.insert(wildcard->namespaceConstraint()->variety(), wildcard);
+ }
+ }
+}
+
+QSourceLocation XsdSchemaChecker::sourceLocation(const NamedSchemaComponent::Ptr &component) const
+{
+ if (m_componentLocationHash.contains(component)) {
+ return m_componentLocationHash.value(component);
+ } else {
+ QSourceLocation location;
+ location.setLine(1);
+ location.setColumn(1);
+ location.setUri(QString::fromLatin1("dummyUri"));
+
+ return location;
+ }
+}
+
+QSourceLocation XsdSchemaChecker::sourceLocationForType(const SchemaType::Ptr &type) const
+{
+ if (type->isSimpleType())
+ return sourceLocation(XsdSimpleType::Ptr(type));
+ else
+ return sourceLocation(XsdComplexType::Ptr(type));
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp b/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp
new file mode 100644
index 0000000..28957b7
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp
@@ -0,0 +1,306 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+bool XsdSchemaChecker::hasDuplicatedAttributeUses(const XsdAttributeUse::List &list, XsdAttribute::Ptr &conflictingAttribute) const
+{
+ const int length = list.count();
+
+ for (int i = 0; i < length; ++i) {
+ for (int j = 0; j < length; ++j) {
+ if (i == j)
+ continue;
+
+ if (list.at(i)->attribute()->name(m_namePool) == list.at(j)->attribute()->name(m_namePool)) {
+ conflictingAttribute = list.at(i)->attribute();
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+bool XsdSchemaChecker::hasMultipleIDAttributeUses(const XsdAttributeUse::List &list) const
+{
+ const int length = list.count();
+
+ bool hasIdDerivedAttribute = false;
+ for (int i = 0; i < length; ++i) {
+ if (BuiltinTypes::xsID->wxsTypeMatches(list.at(i)->attribute()->type())) {
+ if (hasIdDerivedAttribute)
+ return true;
+ else
+ hasIdDerivedAttribute = true;
+ }
+ }
+
+ return false;
+}
+
+bool XsdSchemaChecker::hasConstraintIDAttributeUse(const XsdAttributeUse::List &list, XsdAttribute::Ptr &conflictingAttribute) const
+{
+ const int length = list.count();
+
+ for (int i = 0; i < length; ++i) {
+ const XsdAttributeUse::Ptr attributeUse(list.at(i));
+ if (BuiltinTypes::xsID->wxsTypeMatches(attributeUse->attribute()->type())) {
+ if (attributeUse->valueConstraint()) {
+ conflictingAttribute = attributeUse->attribute();
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+bool XsdSchemaChecker::particleEqualsRecursively(const XsdParticle::Ptr &particle, const XsdParticle::Ptr &otherParticle) const
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-particle-extend
+ //TODO: find out what 'properties' of a particle should be checked here...
+
+ if (particle->minimumOccurs() != otherParticle->minimumOccurs())
+ return false;
+
+ if (particle->maximumOccursUnbounded() != otherParticle->maximumOccursUnbounded())
+ return false;
+
+ if (particle->maximumOccurs() != otherParticle->maximumOccurs())
+ return false;
+
+ const XsdTerm::Ptr term = particle->term();
+ const XsdTerm::Ptr otherTerm = otherParticle->term();
+
+ if (term->isElement() && !(otherTerm->isElement()))
+ return false;
+
+ if (term->isModelGroup() && !(otherTerm->isModelGroup()))
+ return false;
+
+ if (term->isWildcard() && !(otherTerm->isWildcard()))
+ return false;
+
+ if (term->isElement()) {
+ const XsdElement::Ptr element = term;
+ const XsdElement::Ptr otherElement = otherTerm;
+
+ if (element->name(m_namePool) != otherElement->name(m_namePool))
+ return false;
+
+ if (element->type()->name(m_namePool) != otherElement->type()->name(m_namePool))
+ return false;
+ }
+
+ if (term->isModelGroup()) {
+ const XsdModelGroup::Ptr group = term;
+ const XsdModelGroup::Ptr otherGroup = otherTerm;
+
+ if (group->particles().count() != otherGroup->particles().count())
+ return false;
+
+ for (int i = 0; i < group->particles().count(); ++i) {
+ if (!particleEqualsRecursively(group->particles().at(i), otherGroup->particles().at(i)))
+ return false;
+ }
+ }
+
+ if (term->isWildcard()) {
+ }
+
+ return true;
+}
+
+bool XsdSchemaChecker::isValidParticleExtension(const XsdParticle::Ptr &extension, const XsdParticle::Ptr &base) const
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-particle-extend
+
+ // 1
+ if (extension == base)
+ return true;
+
+ // 2
+ if (extension->minimumOccurs() == 1 && extension->maximumOccurs() == 1 && extension->maximumOccursUnbounded() == false) {
+ if (extension->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr modelGroup = extension->term();
+ if (modelGroup->compositor() == XsdModelGroup::SequenceCompositor) {
+ if (particleEqualsRecursively(modelGroup->particles().first(), base))
+ return true;
+ }
+ }
+ }
+
+ // 3
+ if (extension->minimumOccurs() == base->minimumOccurs()) { // 3.1
+ if (extension->term()->isModelGroup() && base->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr extensionGroup(extension->term());
+ const XsdModelGroup::Ptr baseGroup(base->term());
+
+ if (extensionGroup->compositor() == XsdModelGroup::AllCompositor && baseGroup->compositor() == XsdModelGroup::AllCompositor) {
+ const XsdParticle::List extensionParticles = extensionGroup->particles();
+ const XsdParticle::List baseParticles = baseGroup->particles();
+ for (int i = 0; i < baseParticles.count() && i < extensionParticles.count(); ++i) {
+ if (baseParticles.at(i) != extensionParticles.at(i))
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+QSet<XsdElement::Ptr> collectAllElements(const XsdParticle::Ptr &particle)
+{
+ QSet<XsdElement::Ptr> elements;
+
+ const XsdTerm::Ptr term(particle->term());
+ if (term->isElement()) {
+ elements.insert(XsdElement::Ptr(term));
+ } else if (term->isModelGroup()) {
+ const XsdModelGroup::Ptr group(term);
+
+ for (int i = 0; i < group->particles().count(); ++i)
+ elements.unite(collectAllElements(group->particles().at(i)));
+ }
+
+ return elements;
+}
+
+QSet<XsdElement::Ptr> collectAllElements(const XsdSchema::Ptr &schema)
+{
+ QSet<XsdElement::Ptr> elements;
+
+ // collect global elements
+ const XsdElement::List elementList = schema->elements();
+ for (int i = 0; i < elementList.count(); ++i)
+ elements.insert(elementList.at(i));
+
+ // collect all elements from global groups
+ const XsdModelGroup::List groupList = schema->elementGroups();
+ for (int i = 0; i < groupList.count(); ++i) {
+ const XsdModelGroup::Ptr group(groupList.at(i));
+
+ for (int j = 0; j < group->particles().count(); ++j)
+ elements.unite(collectAllElements(group->particles().at(j)));
+ }
+
+ // collect all elements from complex type definitions
+ SchemaType::List types;
+ types << schema->types() << schema->anonymousTypes();
+
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isComplexType() && types.at(i)->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexType(types.at(i));
+ if (complexType->contentType()->particle())
+ elements.unite(collectAllElements(complexType->contentType()->particle()));
+ }
+ }
+
+ return elements;
+}
+
+bool XsdSchemaChecker::elementSequenceAccepted(const XsdModelGroup::Ptr &sequence, const XsdParticle::Ptr &particle) const
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-accept
+
+ if (particle->term()->isWildcard()) { // 1
+ const XsdWildcard::Ptr wildcard(particle->term());
+
+ // 1.1
+ if ((unsigned int)sequence->particles().count() < particle->minimumOccurs())
+ return false;
+
+ // 1.2
+ if (!particle->maximumOccursUnbounded()) {
+ if ((unsigned int)sequence->particles().count() > particle->maximumOccurs())
+ return false;
+ }
+
+ // 1.3
+ const XsdParticle::List particles(sequence->particles());
+ for (int i = 0; i < particles.count(); ++i) {
+ if (particles.at(i)->term()->isElement()) {
+ if (!XsdSchemaHelper::wildcardAllowsExpandedName(XsdElement::Ptr(particles.at(i)->term())->name(m_namePool), wildcard, m_namePool))
+ return false;
+ }
+ }
+ } else if (particle->term()->isElement()) { // 2
+ const XsdElement::Ptr element(particle->term());
+
+ // 2.1
+ if ((unsigned int)sequence->particles().count() < particle->minimumOccurs())
+ return false;
+
+ // 2.2
+ if (!particle->maximumOccursUnbounded()) {
+ if ((unsigned int)sequence->particles().count() > particle->maximumOccurs())
+ return false;
+ }
+
+ // 2.3
+ const XsdParticle::List particles(sequence->particles());
+ for (int i = 0; i < particles.count(); ++i) {
+ bool isValid = false;
+ if (particles.at(i)->term()->isElement()) {
+ const XsdElement::Ptr seqElement(particles.at(i)->term());
+
+ // 2.3.1
+ if (element->name(m_namePool) == seqElement->name(m_namePool))
+ isValid = true;
+
+ // 2.3.2
+ if (element->scope() && element->scope()->variety() == XsdElement::Scope::Global) {
+ if (!(element->disallowedSubstitutions() & NamedSchemaComponent::SubstitutionConstraint)) {
+ //TODO: continue
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemachecker_p.h b/src/xmlpatterns/schema/qxsdschemachecker_p.h
new file mode 100644
index 0000000..843f909
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemachecker_p.h
@@ -0,0 +1,284 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaChecker_H
+#define Patternist_XsdSchemaChecker_H
+
+#include "qschematype_p.h"
+#include "qxsdattribute_p.h"
+#include "qxsdattributegroup_p.h"
+#include "qxsdelement_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdnotation_p.h"
+#include "qxsdschema_p.h"
+#include "qxsdsimpletype_p.h"
+
+#include <QtCore/QExplicitlySharedDataPointer>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ class XsdSchemaContext;
+ class XsdSchemaParserContext;
+
+ /**
+ * @short Encapsulates the checking of schema valitity after reference resolving has finished.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaChecker : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdSchemaChecker> Ptr;
+
+ /**
+ * Creates a new schema checker.
+ *
+ * @param context The context that is used for customization.
+ * @param parserContext The context that contains all the data structures.
+ */
+ XsdSchemaChecker(const QExplicitlySharedDataPointer<XsdSchemaContext> &context, const XsdSchemaParserContext *parserContext);
+
+ /**
+ * Destroys the schema checker.
+ */
+ ~XsdSchemaChecker();
+
+ /**
+ * Starts a basic check process.
+ *
+ * This check only validates the basic super type inheritance
+ * of simple and complex types.
+ */
+ void basicCheck();
+
+ /**
+ * Starts the real check process.
+ */
+ void check();
+
+ /**
+ * Checks the constraining facets of all global and anonymous simple types for validity.
+ */
+ void checkConstrainingFacets();
+
+ /**
+ * Adds the component location hash, so the checker is able to report meaning full
+ * error messages.
+ */
+ void addComponentLocationHash(const QHash<NamedSchemaComponent::Ptr, QSourceLocation> &hash);
+
+ private:
+ void checkSimpleRestrictionBaseType();
+
+ /**
+ * Checks that no simple or complex type inherits itself.
+ */
+ void checkBasicCircularInheritances();
+
+ /**
+ * Checks the advanced circular inheritance.
+ */
+ void checkCircularInheritances();
+
+ /**
+ * Checks for inheritance restrictions given by final or finalDefault
+ * attributes.
+ */
+ void checkInheritanceRestrictions();
+
+ /**
+ * Checks for various constraints for simple types defined by schema.
+ */
+ void checkBasicSimpleTypeConstraints();
+ void checkSimpleTypeConstraints();
+
+ /**
+ * Checks for various constraints for complex types defined by schema.
+ */
+ void checkBasicComplexTypeConstraints();
+ void checkComplexTypeConstraints();
+
+ /**
+ * Checks for list and union derivation restrictions given by final or finalDefault
+ * attributes.
+ */
+ void checkSimpleDerivationRestrictions();
+
+ /**
+ * Checks the set of constraining @p facets that belongs to @p simpleType for validity.
+ */
+ void checkConstrainingFacets(const XsdFacet::Hash &facets, const XsdSimpleType::Ptr &simpleType);
+
+ /**
+ * Checks for duplicated attribute uses (attributes with the same name) inside a complex type.
+ */
+ void checkDuplicatedAttributeUses();
+
+ /**
+ * Check the element constraints.
+ */
+ void checkElementConstraints();
+
+ /**
+ * Check the attribute constraints.
+ */
+ void checkAttributeConstraints();
+
+ /**
+ * Check the attribute use constraints.
+ */
+ void checkAttributeUseConstraints();
+
+ /**
+ * A map used to find duplicated elements inside a model group.
+ */
+ typedef QHash<QXmlName, SchemaType::Ptr> DuplicatedElementMap;
+
+ /**
+ * A map used to find duplicated wildcards inside a model group.
+ */
+ typedef QHash<XsdWildcard::NamespaceConstraint::Variety, XsdWildcard::Ptr> DuplicatedWildcardMap;
+
+ /**
+ * Check for duplicated elements and element wildcards in all complex type particles.
+ */
+ void checkElementDuplicates();
+
+ /**
+ * Check for duplicated elements and element wildcards in the given @p particle.
+ *
+ * @param particle The particle to check.
+ * @param elementMap A map to find the duplicated elements.
+ * @param wildcardMap A map to find the duplicated element wildcards.
+ */
+ void checkElementDuplicates(const XsdParticle::Ptr &particle, DuplicatedElementMap &elementMap, DuplicatedWildcardMap &wildcardMap);
+
+ /**
+ * Setup fast lookup list for allowed facets of atomic simple types.
+ */
+ void setupAllowedAtomicFacets();
+
+ /**
+ * Returns the source location of the given schema @p component or a dummy
+ * source location if the component is not found in the component location hash.
+ */
+ QSourceLocation sourceLocation(const NamedSchemaComponent::Ptr &component) const;
+
+ /**
+ * Returns the source location of the given schema @p type or a dummy
+ * source location if the type is not found in the component location hash.
+ */
+ QSourceLocation sourceLocationForType(const SchemaType::Ptr &type) const;
+
+ /**
+ * Checks that the string @p value is valid according the value space of @p type
+ * for the given @p component.
+ */
+ bool isValidValue(const QString &value, const AnySimpleType::Ptr &type, QString &errorMsg) const;
+
+ /**
+ * Returns the list of facets for the given @p type.
+ */
+ XsdFacet::Hash facetsForType(const SchemaType::Ptr &type) const;
+
+ /**
+ * Returns whether the given @p list of attribute uses contains two (or more) attribute
+ * uses that point to attributes with the same name. @p conflictingAttribute
+ * will contain the conflicting attribute in that case.
+ */
+ bool hasDuplicatedAttributeUses(const XsdAttributeUse::List &list, XsdAttribute::Ptr &conflictingAttribute) const;
+
+ /**
+ * Returns whether the given @p list of attribute uses contains two (or more) attribute
+ * uses that have a type inherited by xs:ID.
+ */
+ bool hasMultipleIDAttributeUses(const XsdAttributeUse::List &list) const;
+
+ /**
+ * Returns whether the given @p list of attribute uses contains an attribute
+ * uses that has a type inherited by xs:ID with a value constraint. @p conflictingAttribute
+ * will contain the conflicting attribute in that case.
+ */
+ bool hasConstraintIDAttributeUse(const XsdAttributeUse::List &list, XsdAttribute::Ptr &conflictingAttribute) const;
+
+ /**
+ * Checks whether the @p particle equals the @p otherParticle recursively.
+ */
+ bool particleEqualsRecursively(const XsdParticle::Ptr &particle, const XsdParticle::Ptr &otherParticle) const;
+
+ /**
+ * Checks whether the @p extension particle is a valid extension of the @p base particle.
+ */
+ bool isValidParticleExtension(const XsdParticle::Ptr &extension, const XsdParticle::Ptr &base) const;
+
+ /**
+ * Checks whether the @p sequence of elements is accepted by the given @p particle.
+ */
+ bool elementSequenceAccepted(const XsdModelGroup::Ptr &sequence, const XsdParticle::Ptr &particle) const;
+
+ QExplicitlySharedDataPointer<XsdSchemaContext> m_context;
+ NamePool::Ptr m_namePool;
+ XsdSchema::Ptr m_schema;
+ QHash<QXmlName, QSet<XsdFacet::Type> > m_allowedAtomicFacets;
+ QHash<NamedSchemaComponent::Ptr, QSourceLocation> m_componentLocationHash;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp b/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp
new file mode 100644
index 0000000..a36ecc2
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp
@@ -0,0 +1,327 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemachecker_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdSchemaChecker::setupAllowedAtomicFacets()
+{
+ // string
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Length
+ << XsdFacet::MinimumLength
+ << XsdFacet::MaximumLength
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsString->name(m_namePool), facets);
+ }
+
+ // boolean
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsBoolean->name(m_namePool), facets);
+ }
+
+ // float
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsFloat->name(m_namePool), facets);
+ }
+
+ // double
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsDouble->name(m_namePool), facets);
+ }
+
+ // decimal
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::TotalDigits
+ << XsdFacet::FractionDigits
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsDecimal->name(m_namePool), facets);
+ }
+
+ // duration
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsDuration->name(m_namePool), facets);
+ }
+
+ // dateTime
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsDateTime->name(m_namePool), facets);
+ }
+
+ // time
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsTime->name(m_namePool), facets);
+ }
+
+ // date
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsDate->name(m_namePool), facets);
+ }
+
+ // gYearMonth
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsGYearMonth->name(m_namePool), facets);
+ }
+
+ // gYear
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsGYear->name(m_namePool), facets);
+ }
+
+ // gMonthDay
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsGMonthDay->name(m_namePool), facets);
+ }
+
+ // gDay
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsGDay->name(m_namePool), facets);
+ }
+
+ // gMonth
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::MaximumInclusive
+ << XsdFacet::MaximumExclusive
+ << XsdFacet::MinimumInclusive
+ << XsdFacet::MinimumExclusive
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsGMonth->name(m_namePool), facets);
+ }
+
+ // hexBinary
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Length
+ << XsdFacet::MinimumLength
+ << XsdFacet::MaximumLength
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsHexBinary->name(m_namePool), facets);
+ }
+
+ // base64Binary
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Length
+ << XsdFacet::MinimumLength
+ << XsdFacet::MaximumLength
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsBase64Binary->name(m_namePool), facets);
+ }
+
+ // anyURI
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Length
+ << XsdFacet::MinimumLength
+ << XsdFacet::MaximumLength
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsAnyURI->name(m_namePool), facets);
+ }
+
+ // QName
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Length
+ << XsdFacet::MinimumLength
+ << XsdFacet::MaximumLength
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsQName->name(m_namePool), facets);
+ }
+
+ // NOTATION
+ {
+ QSet<XsdFacet::Type> facets;
+ facets << XsdFacet::Length
+ << XsdFacet::MinimumLength
+ << XsdFacet::MaximumLength
+ << XsdFacet::Pattern
+ << XsdFacet::Enumeration
+ << XsdFacet::WhiteSpace
+ << XsdFacet::Assertion;
+
+ m_allowedAtomicFacets.insert(BuiltinTypes::xsNOTATION->name(m_namePool), facets);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemacontext.cpp b/src/xmlpatterns/schema/qxsdschemacontext.cpp
new file mode 100644
index 0000000..6d646bc
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemacontext.cpp
@@ -0,0 +1,528 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemacontext_p.h"
+
+#include "qderivedinteger_p.h"
+#include "qderivedstring_p.h"
+#include "qxsdschematypesfactory_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaContext::XsdSchemaContext(const NamePool::Ptr &namePool)
+ : m_namePool(namePool)
+ , m_networkAccessManager(0)
+ , m_uriResolver(0)
+ , m_messageHandler(0)
+{
+}
+
+NamePool::Ptr XsdSchemaContext::namePool() const
+{
+ return m_namePool;
+}
+
+QUrl XsdSchemaContext::baseURI() const
+{
+ return m_baseURI;
+}
+
+void XsdSchemaContext::setBaseURI(const QUrl &uri)
+{
+ m_baseURI = uri;
+}
+
+void XsdSchemaContext::setNetworkAccessManager(QNetworkAccessManager *accessManager)
+{
+ m_networkAccessManager = accessManager;
+}
+
+QNetworkAccessManager* XsdSchemaContext::networkAccessManager() const
+{
+ return m_networkAccessManager;
+}
+
+void XsdSchemaContext::setMessageHandler(QAbstractMessageHandler *handler)
+{
+ m_messageHandler = handler;
+}
+
+QAbstractMessageHandler* XsdSchemaContext::messageHandler() const
+{
+ return m_messageHandler;
+}
+
+QSourceLocation XsdSchemaContext::locationFor(const SourceLocationReflection *const) const
+{
+ return QSourceLocation();
+}
+
+void XsdSchemaContext::setUriResolver(const QAbstractUriResolver *uriResolver)
+{
+ m_uriResolver = uriResolver;
+}
+
+const QAbstractUriResolver* XsdSchemaContext::uriResolver() const
+{
+ return m_uriResolver;
+}
+
+XsdFacet::Hash XsdSchemaContext::facetsForType(const AnySimpleType::Ptr &type) const
+{
+ if (type->isDefinedBySchema())
+ return XsdSimpleType::Ptr(type)->facets();
+ else {
+ if (m_builtinTypesFacetList.isEmpty())
+ m_builtinTypesFacetList = setupBuiltinTypesFacetList();
+
+ return m_builtinTypesFacetList.value(type);
+ }
+}
+
+SchemaTypeFactory::Ptr XsdSchemaContext::schemaTypeFactory() const
+{
+ if (!m_schemaTypeFactory)
+ m_schemaTypeFactory = SchemaTypeFactory::Ptr(new XsdSchemaTypesFactory(m_namePool));
+
+ return m_schemaTypeFactory;
+}
+
+QHash<SchemaType::Ptr, XsdFacet::Hash> XsdSchemaContext::setupBuiltinTypesFacetList() const
+{
+ QHash<SchemaType::Ptr, XsdFacet::Hash> hash;
+
+ const XsdFacet::Ptr fixedCollapseWhiteSpace(new XsdFacet());
+ fixedCollapseWhiteSpace->setType(XsdFacet::WhiteSpace);
+ fixedCollapseWhiteSpace->setValue(DerivedString<TypeString>::fromLexical(m_namePool, XsdSchemaToken::toString(XsdSchemaToken::Collapse)));
+ fixedCollapseWhiteSpace->setFixed(true);
+
+ const XsdFacet::Ptr collapseWhiteSpace(new XsdFacet());
+ collapseWhiteSpace->setType(XsdFacet::WhiteSpace);
+ collapseWhiteSpace->setValue(DerivedString<TypeString>::fromLexical(m_namePool, XsdSchemaToken::toString(XsdSchemaToken::Collapse)));
+ collapseWhiteSpace->setFixed(false);
+
+ const XsdFacet::Ptr preserveWhiteSpace(new XsdFacet());
+ preserveWhiteSpace->setType(XsdFacet::WhiteSpace);
+ preserveWhiteSpace->setValue(DerivedString<TypeString>::fromLexical(m_namePool, XsdSchemaToken::toString(XsdSchemaToken::Preserve)));
+ preserveWhiteSpace->setFixed(false);
+
+ const XsdFacet::Ptr replaceWhiteSpace(new XsdFacet());
+ replaceWhiteSpace->setType(XsdFacet::WhiteSpace);
+ replaceWhiteSpace->setValue(DerivedString<TypeString>::fromLexical(m_namePool, XsdSchemaToken::toString(XsdSchemaToken::Replace)));
+ replaceWhiteSpace->setFixed(false);
+
+ const XsdFacet::Ptr fixedZeroFractionDigits(new XsdFacet());
+ fixedZeroFractionDigits->setType(XsdFacet::FractionDigits);
+ fixedZeroFractionDigits->setValue(DerivedInteger<TypeNonNegativeInteger>::fromValue(m_namePool, 0));
+ fixedZeroFractionDigits->setFixed(true);
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsString];
+ facets.insert(preserveWhiteSpace->type(), preserveWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsBoolean];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsDecimal];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsFloat];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsDouble];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsDuration];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsDateTime];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsTime];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsDate];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsGYearMonth];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsGYear];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsGMonthDay];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsGDay];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsGMonth];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsHexBinary];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsBase64Binary];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsAnyURI];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsQName];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNOTATION];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNormalizedString];
+ facets.insert(replaceWhiteSpace->type(), replaceWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsToken];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsLanguage];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+
+ const XsdFacet::Ptr pattern(new XsdFacet());
+ pattern->setType(XsdFacet::Pattern);
+ pattern->setMultiValue(AtomicValue::List() << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*")));
+ facets.insert(pattern->type(), pattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNMTOKEN];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+
+ const XsdFacet::Ptr pattern(new XsdFacet());
+ pattern->setType(XsdFacet::Pattern);
+ pattern->setMultiValue(AtomicValue::List() << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("\\c+")));
+ facets.insert(pattern->type(), pattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsName];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+
+ const XsdFacet::Ptr pattern(new XsdFacet());
+ pattern->setType(XsdFacet::Pattern);
+ pattern->setMultiValue(AtomicValue::List() << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("\\i\\c*")));
+ facets.insert(pattern->type(), pattern);
+ }
+
+ const XsdFacet::Ptr ncNamePattern(new XsdFacet());
+ {
+ ncNamePattern->setType(XsdFacet::Pattern);
+ AtomicValue::List patterns;
+ patterns << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("\\i\\c*"));
+ patterns << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("[\\i-[:]][\\c-[:]]*"));
+ ncNamePattern->setMultiValue(patterns);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNCName];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+ facets.insert(ncNamePattern->type(), ncNamePattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsID];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+ facets.insert(ncNamePattern->type(), ncNamePattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsIDREF];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+ facets.insert(ncNamePattern->type(), ncNamePattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsENTITY];
+ facets.insert(collapseWhiteSpace->type(), collapseWhiteSpace);
+ facets.insert(ncNamePattern->type(), ncNamePattern);
+ }
+
+ const XsdFacet::Ptr integerPattern(new XsdFacet());
+ integerPattern->setType(XsdFacet::Pattern);
+ integerPattern->setMultiValue(AtomicValue::List() << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("[\\-+]?[0-9]+")));
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsInteger];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNonPositiveInteger];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("0")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNegativeInteger];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("-1")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsLong];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("9223372036854775807")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+
+ const XsdFacet::Ptr minInclusive(new XsdFacet());
+ minInclusive->setType(XsdFacet::MinimumInclusive);
+ minInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("-9223372036854775808")));
+ facets.insert(minInclusive->type(), minInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsInt];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("2147483647")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+
+ const XsdFacet::Ptr minInclusive(new XsdFacet());
+ minInclusive->setType(XsdFacet::MinimumInclusive);
+ minInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("-2147483648")));
+ facets.insert(minInclusive->type(), minInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsShort];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("32767")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+
+ const XsdFacet::Ptr minInclusive(new XsdFacet());
+ minInclusive->setType(XsdFacet::MinimumInclusive);
+ minInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("-32768")));
+ facets.insert(minInclusive->type(), minInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsByte];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("127")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+
+ const XsdFacet::Ptr minInclusive(new XsdFacet());
+ minInclusive->setType(XsdFacet::MinimumInclusive);
+ minInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("-128")));
+ facets.insert(minInclusive->type(), minInclusive);
+ }
+
+ const XsdFacet::Ptr unsignedMinInclusive(new XsdFacet());
+ unsignedMinInclusive->setType(XsdFacet::MinimumInclusive);
+ unsignedMinInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("0")));
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsNonNegativeInteger];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+ facets.insert(unsignedMinInclusive->type(), unsignedMinInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsUnsignedLong];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+ facets.insert(unsignedMinInclusive->type(), unsignedMinInclusive);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("18446744073709551615")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsUnsignedInt];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+ facets.insert(unsignedMinInclusive->type(), unsignedMinInclusive);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("4294967295")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsUnsignedShort];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+ facets.insert(unsignedMinInclusive->type(), unsignedMinInclusive);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("65535")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsUnsignedByte];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+ facets.insert(integerPattern->type(), integerPattern);
+ facets.insert(unsignedMinInclusive->type(), unsignedMinInclusive);
+
+ const XsdFacet::Ptr maxInclusive(new XsdFacet());
+ maxInclusive->setType(XsdFacet::MaximumInclusive);
+ maxInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("255")));
+ facets.insert(maxInclusive->type(), maxInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsPositiveInteger];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+ facets.insert(fixedZeroFractionDigits->type(), fixedZeroFractionDigits);
+
+ const XsdFacet::Ptr minInclusive(new XsdFacet());
+ minInclusive->setType(XsdFacet::MinimumInclusive);
+ minInclusive->setValue(DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("1")));
+ facets.insert(minInclusive->type(), minInclusive);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsYearMonthDuration];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+
+ const XsdFacet::Ptr pattern(new XsdFacet());
+ pattern->setType(XsdFacet::Pattern);
+ pattern->setMultiValue(AtomicValue::List() << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("[^DT]*")));
+ facets.insert(pattern->type(), pattern);
+ }
+
+ {
+ XsdFacet::Hash &facets = hash[BuiltinTypes::xsDayTimeDuration];
+ facets.insert(fixedCollapseWhiteSpace->type(), fixedCollapseWhiteSpace);
+
+ const XsdFacet::Ptr pattern(new XsdFacet());
+ pattern->setType(XsdFacet::Pattern);
+ pattern->setMultiValue(AtomicValue::List() << DerivedString<TypeString>::fromLexical(m_namePool, QString::fromLatin1("[^YM]*(T.*)?")));
+ facets.insert(pattern->type(), pattern);
+ }
+
+ return hash;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemacontext_p.h b/src/xmlpatterns/schema/qxsdschemacontext_p.h
new file mode 100644
index 0000000..9c00964
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemacontext_p.h
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaContext_H
+#define Patternist_XsdSchemaContext_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qreportcontext_p.h"
+#include "qschematypefactory_p.h"
+#include "qxsdschematoken_p.h"
+#include "qxsdschema_p.h"
+#include "qxsdschemachecker_p.h"
+#include "qxsdschemaresolver_p.h"
+
+#include <QtCore/QUrl>
+#include <QtNetwork/QNetworkAccessManager>
+#include <QtXmlPatterns/QAbstractMessageHandler>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A context for schema parsing and validation.
+ *
+ * This class provides the infrastructure for error reporting and
+ * network access. Additionally it stores objects that are used by
+ * both, the parser and the validator.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaContext : public ReportContext
+ {
+ public:
+ /**
+ * A smart pointer wrapping XsdSchemaContext instances.
+ */
+ typedef QExplicitlySharedDataPointer<XsdSchemaContext> Ptr;
+
+ /**
+ * Creates a new schema context object.
+ *
+ * @param namePool The name pool all names belong to.
+ */
+ XsdSchemaContext(const NamePool::Ptr &namePool);
+
+ /**
+ * Returns the name pool of the schema context.
+ */
+ virtual NamePool::Ptr namePool() const;
+
+ /**
+ * Sets the base URI for the main schema.
+ *
+ * The main schema is the one that includes resp. imports
+ * all the other schema files.
+ */
+ virtual void setBaseURI(const QUrl &uri);
+
+ /**
+ * Returns the base URI of the main schema.
+ */
+ virtual QUrl baseURI() const;
+
+ /**
+ * Sets the network access manager that should be used
+ * to access referenced schema definitions.
+ */
+ void setNetworkAccessManager(QNetworkAccessManager *accessManager);
+
+ /**
+ * Returns the network access manager that is used to
+ * access referenced schema definitions.
+ */
+ virtual QNetworkAccessManager* networkAccessManager() const;
+
+ /**
+ * Sets the message @p handler used by the context for error reporting.
+ */
+ void setMessageHandler(QAbstractMessageHandler *handler);
+
+ /**
+ * Returns the message handler used by the context for
+ * error reporting.
+ */
+ virtual QAbstractMessageHandler* messageHandler() const;
+
+ /**
+ * Always returns an empty source location.
+ */
+ virtual QSourceLocation locationFor(const SourceLocationReflection *const reflection) const;
+
+ /**
+ * Sets the uri @p resolver that is used for resolving URIs in the
+ * schema parser.
+ */
+ void setUriResolver(const QAbstractUriResolver *resolver);
+
+ /**
+ * Returns the uri resolver that is used for resolving URIs in the
+ * schema parser.
+ */
+ virtual const QAbstractUriResolver* uriResolver() const;
+
+ /**
+ * Returns the list of facets for the given simple @p type.
+ */
+ XsdFacet::Hash facetsForType(const AnySimpleType::Ptr &type) const;
+
+ /**
+ * Returns a schema type factory that contains some predefined schema types.
+ */
+ SchemaTypeFactory::Ptr schemaTypeFactory() const;
+
+ /**
+ * The following variables should not be accessed directly.
+ */
+ mutable SchemaTypeFactory::Ptr m_schemaTypeFactory;
+ mutable QHash<SchemaType::Ptr, XsdFacet::Hash> m_builtinTypesFacetList;
+
+ private:
+ QHash<SchemaType::Ptr, XsdFacet::Hash> setupBuiltinTypesFacetList() const;
+
+ NamePool::Ptr m_namePool;
+ QNetworkAccessManager* m_networkAccessManager;
+ QUrl m_baseURI;
+ const QAbstractUriResolver* m_uriResolver;
+ QAbstractMessageHandler* m_messageHandler;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemadebugger.cpp b/src/xmlpatterns/schema/qxsdschemadebugger.cpp
new file mode 100644
index 0000000..5d2d6f0
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemadebugger.cpp
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemadebugger_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaDebugger::XsdSchemaDebugger(const NamePool::Ptr &namePool)
+ : m_namePool(namePool)
+{
+}
+
+void XsdSchemaDebugger::dumpParticle(const XsdParticle::Ptr &particle, int level)
+{
+ QString prefix; prefix.fill(QLatin1Char(' '), level);
+
+ qDebug("%s min=%s max=%s", qPrintable(prefix), qPrintable(QString::number(particle->minimumOccurs())),
+ qPrintable(particle->maximumOccursUnbounded() ? QLatin1String("unbounded") : QString::number(particle->maximumOccurs())));
+
+ if (particle->term()->isElement()) {
+ qDebug("%selement (%s)", qPrintable(prefix), qPrintable(XsdElement::Ptr(particle->term())->displayName(m_namePool)));
+ } else if (particle->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr group(particle->term());
+ if (group->compositor() == XsdModelGroup::SequenceCompositor) {
+ qDebug("%ssequence", qPrintable(prefix));
+ } else if (group->compositor() == XsdModelGroup::AllCompositor) {
+ qDebug("%sall", qPrintable(prefix));
+ } else if (group->compositor() == XsdModelGroup::ChoiceCompositor) {
+ qDebug("%schoice", qPrintable(prefix));
+ }
+
+ for (int i = 0; i < group->particles().count(); ++i)
+ dumpParticle(group->particles().at(i), level + 5);
+ } else if (particle->term()->isWildcard()) {
+ XsdWildcard::Ptr wildcard(particle->term());
+ qDebug("%swildcard (process=%d)", qPrintable(prefix), wildcard->processContents());
+ }
+}
+
+void XsdSchemaDebugger::dumpInheritance(const SchemaType::Ptr &type, int level)
+{
+ QString prefix; prefix.fill(QLatin1Char(' '), level);
+ qDebug("%s-->%s", qPrintable(prefix), qPrintable(type->displayName(m_namePool)));
+ if (type->wxsSuperType())
+ dumpInheritance(type->wxsSuperType(), ++level);
+}
+
+void XsdSchemaDebugger::dumpWildcard(const XsdWildcard::Ptr &wildcard)
+{
+ QVector<QString> varietyNames;
+ varietyNames.append(QLatin1String("Any"));
+ varietyNames.append(QLatin1String("Enumeration"));
+ varietyNames.append(QLatin1String("Not"));
+
+ QVector<QString> processContentsNames;
+ processContentsNames.append(QLatin1String("Strict"));
+ processContentsNames.append(QLatin1String("Lax"));
+ processContentsNames.append(QLatin1String("Skip"));
+
+ qDebug(" processContents: %s", qPrintable(processContentsNames.at((int)wildcard->processContents())));
+ const XsdWildcard::NamespaceConstraint::Ptr constraint = wildcard->namespaceConstraint();
+ qDebug(" variety: %s", qPrintable(varietyNames.at((int)constraint->variety())));
+ if (constraint->variety() != XsdWildcard::NamespaceConstraint::Any)
+ qDebug() << " namespaces:" << constraint->namespaces();
+}
+
+void XsdSchemaDebugger::dumpType(const SchemaType::Ptr &type)
+{
+ if (type->isComplexType()) {
+ const XsdComplexType::Ptr complexType(type);
+ qDebug("\n+++ Complex Type +++");
+ qDebug("Name: %s (abstract: %s)", qPrintable(complexType->displayName(m_namePool)), complexType->isAbstract() ? "yes" : "no");
+ if (complexType->wxsSuperType())
+ qDebug(" base type: %s", qPrintable(complexType->wxsSuperType()->displayName(m_namePool)));
+ else
+ qDebug(" base type: (none)");
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Empty)
+ qDebug(" content type: empty");
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple)
+ qDebug(" content type: simple");
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly)
+ qDebug(" content type: element-only");
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed)
+ qDebug(" content type: mixed");
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ if (complexType->contentType()->simpleType())
+ qDebug(" simple type: %s", qPrintable(complexType->contentType()->simpleType()->displayName(m_namePool)));
+ else
+ qDebug(" simple type: (none)");
+ }
+
+ const XsdAttributeUse::List uses = complexType->attributeUses();
+ qDebug(" %d attributes", uses.count());
+ for (int i = 0; i < uses.count(); ++i) {
+ qDebug(" attr: %s", qPrintable(uses.at(i)->attribute()->displayName(m_namePool)));
+ }
+ qDebug(" has attribute wildcard: %s", complexType->attributeWildcard() ? "yes" : "no");
+ if (complexType->attributeWildcard()) {
+ dumpWildcard(complexType->attributeWildcard());
+ }
+
+ if (complexType->contentType()->particle()) {
+ dumpParticle(complexType->contentType()->particle(), 5);
+ }
+ } else {
+ qDebug("\n+++ Simple Type +++");
+ qDebug("Name: %s", qPrintable(type->displayName(m_namePool)));
+ if (type->isDefinedBySchema()) {
+ const XsdSimpleType::Ptr simpleType(type);
+ if (simpleType->primitiveType())
+ qDebug(" primitive type: %s", qPrintable(simpleType->primitiveType()->displayName(m_namePool)));
+ else
+ qDebug(" primitive type: (none)");
+ }
+ dumpInheritance(type, 0);
+ }
+}
+
+
+void XsdSchemaDebugger::dumpElement(const XsdElement::Ptr &element)
+{
+ QStringList disallowedSubstGroup;
+ if (element->disallowedSubstitutions() & XsdElement::RestrictionConstraint)
+ disallowedSubstGroup << QLatin1String("restriction");
+ if (element->disallowedSubstitutions() & XsdElement::ExtensionConstraint)
+ disallowedSubstGroup << QLatin1String("extension");
+ if (element->disallowedSubstitutions() & XsdElement::SubstitutionConstraint)
+ disallowedSubstGroup << QLatin1String("substitution");
+
+
+ qDebug() << "Name:" << element->displayName(m_namePool);
+ qDebug() << "IsAbstract:" << (element->isAbstract() ? "yes" : "no");
+ qDebug() << "Type:" << element->type()->displayName(m_namePool);
+ qDebug() << "DisallowedSubstitutionGroups:" << disallowedSubstGroup.join(QLatin1String("' "));
+}
+
+void XsdSchemaDebugger::dumpAttribute(const XsdAttribute::Ptr &attribute)
+{
+ qDebug() << "Name:" << attribute->displayName(m_namePool);
+ qDebug() << "Type:" << attribute->type()->displayName(m_namePool);
+}
+
+void XsdSchemaDebugger::dumpSchema(const XsdSchema::Ptr &schema)
+{
+ qDebug() << "------------------------------ Schema -------------------------------";
+
+ // elements
+ {
+ qDebug() << "Global Elements:";
+ const XsdElement::List elements = schema->elements();
+ for (int i = 0; i < elements.count(); ++i) {
+ dumpElement(elements.at(i));
+ }
+ }
+
+ // attributes
+ {
+ qDebug() << "Global Attributes:";
+ const XsdAttribute::List attributes = schema->attributes();
+ for (int i = 0; i < attributes.count(); ++i) {
+ dumpAttribute(attributes.at(i));
+ }
+ }
+
+ // types
+ {
+ qDebug() << "Global Types:";
+ const SchemaType::List types = schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ dumpType(types.at(i));
+ }
+ }
+
+ // anonymous types
+ {
+ qDebug() << "Anonymous Types:";
+ const SchemaType::List types = schema->anonymousTypes();
+ for (int i = 0; i < types.count(); ++i) {
+ dumpType(types.at(i));
+ }
+ }
+
+ qDebug() << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemadebugger_p.h b/src/xmlpatterns/schema/qxsdschemadebugger_p.h
new file mode 100644
index 0000000..cc3f7de
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemadebugger_p.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaDebugger_H
+#define Patternist_XsdSchemaDebugger_H
+
+#include "qxsdschema_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * A helper class to print out the structure of a compiled schema.
+ */
+ class XsdSchemaDebugger
+ {
+ public:
+ /**
+ * Creates a new schema debugger.
+ *
+ * @param namePool The name pool that the schema uses.
+ */
+ XsdSchemaDebugger(const NamePool::Ptr &namePool);
+
+ /**
+ * Dumps the structure of the given @p particle.
+ *
+ * @param particle The particle to dump.
+ * @param level The level of indention.
+ */
+ void dumpParticle(const XsdParticle::Ptr &particle, int level = 0);
+
+ /**
+ * Dumps the inheritance path of the given @p type.
+ *
+ * @param type The type to dump.
+ * @param level The level of indention.
+ */
+ void dumpInheritance(const SchemaType::Ptr &type, int level = 0);
+
+ /**
+ * Dumps the structure of the given @p wildcard.
+ */
+ void dumpWildcard(const XsdWildcard::Ptr &wildcard);
+
+ /**
+ * Dumps the structure of the given @p type.
+ */
+ void dumpType(const SchemaType::Ptr &type);
+
+ /**
+ * Dumps the structure of the given @p element.
+ */
+ void dumpElement(const XsdElement::Ptr &element);
+
+ /**
+ * Dumps the structure of the given @p attribute.
+ */
+ void dumpAttribute(const XsdAttribute::Ptr &attribute);
+
+ /**
+ * Dumps the structure of the complete @p schema.
+ */
+ void dumpSchema(const XsdSchema::Ptr &schema);
+
+ private:
+ const NamePool::Ptr m_namePool;
+ };
+
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemahelper.cpp b/src/xmlpatterns/schema/qxsdschemahelper.cpp
new file mode 100644
index 0000000..70812b2
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemahelper.cpp
@@ -0,0 +1,821 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemahelper_p.h"
+
+#include "qbuiltintypes_p.h"
+#include "qvaluefactory_p.h"
+#include "qxsdcomplextype_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdsimpletype_p.h"
+#include "qxsdtypechecker_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/*
+ * Calculates the effective total range minimum of the given @p particle as
+ * described by the algorithm in the schema spec.
+ */
+static inline unsigned int effectiveTotalRangeMinimum(const XsdParticle::Ptr &particle)
+{
+ const XsdModelGroup::Ptr group = particle->term();
+
+ if (group->compositor() == XsdModelGroup::ChoiceCompositor) {
+ // @see http://www.w3.org/TR/xmlschema11-1/# cos-choice-range
+
+ int minValue = -1;
+
+ const XsdParticle::List particles = group->particles();
+ if (particles.isEmpty())
+ minValue = 0;
+
+ for (int i = 0; i < particles.count(); ++i) {
+ const XsdParticle::Ptr particle = particles.at(i);
+
+ if (particle->term()->isElement() || particle->term()->isWildcard()) {
+ if (minValue == -1) {
+ minValue = particle->minimumOccurs();
+ } else {
+ minValue = qMin((unsigned int)minValue, particle->minimumOccurs());
+ }
+ } else if (particle->term()->isModelGroup()) {
+ if (minValue == -1) {
+ minValue = effectiveTotalRangeMinimum(particle);
+ } else {
+ minValue = qMin((unsigned int)minValue, effectiveTotalRangeMinimum(particle));
+ }
+ }
+ }
+
+ return (particle->minimumOccurs() * minValue);
+
+ } else {
+ // @see http://www.w3.org/TR/xmlschema11-1/# cos-seq-range
+
+ unsigned int sum = 0;
+ const XsdParticle::List particles = group->particles();
+ for (int i = 0; i < particles.count(); ++i) {
+ const XsdParticle::Ptr particle = particles.at(i);
+
+ if (particle->term()->isElement() || particle->term()->isWildcard())
+ sum += particle->minimumOccurs();
+ else if (particle->term()->isModelGroup())
+ sum += effectiveTotalRangeMinimum(particle);
+ }
+
+ return (particle->minimumOccurs() * sum);
+ }
+}
+
+bool XsdSchemaHelper::isParticleEmptiable(const XsdParticle::Ptr &particle)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-group-emptiable
+
+ if (particle->minimumOccurs() == 0)
+ return true;
+
+ if (!(particle->term()->isModelGroup()))
+ return false;
+
+ return (effectiveTotalRangeMinimum(particle) == 0);
+}
+
+bool XsdSchemaHelper::wildcardAllowsNamespaceName(const QString &nameSpace, const XsdWildcard::NamespaceConstraint::Ptr &constraint)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-wildcard-namespace
+
+ // 1
+ if (constraint->variety() == XsdWildcard::NamespaceConstraint::Any)
+ return true;
+
+ // 2
+ if (constraint->variety() == XsdWildcard::NamespaceConstraint::Not) { // 2.1
+ if (!constraint->namespaces().contains(nameSpace)) // 2.2
+ if (nameSpace != XsdWildcard::absentNamespace()) // 2.3
+ return true;
+ }
+
+ // 3
+ if (constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) {
+ if (constraint->namespaces().contains(nameSpace))
+ return true;
+ }
+
+ return false;
+}
+
+bool XsdSchemaHelper::wildcardAllowsExpandedName(const QXmlName &name, const XsdWildcard::Ptr &wildcard, const NamePool::Ptr &namePool)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-wildcard-name
+
+ // 1
+ if (!wildcardAllowsNamespaceName(namePool->stringForNamespace(name.namespaceURI()), wildcard->namespaceConstraint()))
+ return false;
+
+ // 2, 3, 4
+ //TODO: we have no disallowed namespace yet
+
+ return true;
+}
+
+// small helper function that should be available in Qt 4.6
+template<class T>
+static inline bool containsSet(const QSet<T> &super, const QSet<T> &sub)
+{
+ QSetIterator<T> it(sub);
+ while (it.hasNext()) {
+ if (!super.contains(it.next()))
+ return false;
+ }
+
+ return true;
+}
+
+bool XsdSchemaHelper::isWildcardSubset(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-ns-subset
+ // wildcard =^ sub
+ // otherWildcard =^ super
+
+ const XsdWildcard::NamespaceConstraint::Ptr constraint(wildcard->namespaceConstraint());
+ const XsdWildcard::NamespaceConstraint::Ptr otherConstraint(otherWildcard->namespaceConstraint());
+
+ // 1
+ if (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Any)
+ return true;
+
+ // 2
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+ if (containsSet<QString>(otherConstraint->namespaces(), constraint->namespaces()))
+ return true;
+ }
+
+ // 3
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not)) {
+ if (constraint->namespaces().intersect(otherConstraint->namespaces()).isEmpty())
+ return true;
+ }
+
+ // 4
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not)) {
+ if (containsSet<QString>(constraint->namespaces(), otherConstraint->namespaces()))
+ return true;
+ }
+
+ return false;
+}
+
+XsdWildcard::Ptr XsdSchemaHelper::wildcardUnion(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-aw-union
+
+ XsdWildcard::Ptr unionWildcard(new XsdWildcard());
+
+ const XsdWildcard::NamespaceConstraint::Ptr constraint(wildcard->namespaceConstraint());
+ const XsdWildcard::NamespaceConstraint::Ptr otherConstraint(otherWildcard->namespaceConstraint());
+
+ // 1
+ if ((constraint->variety() == otherConstraint->variety()) &&
+ (constraint->namespaces() == otherConstraint->namespaces())) {
+ unionWildcard->namespaceConstraint()->setVariety(constraint->variety());
+ unionWildcard->namespaceConstraint()->setNamespaces(constraint->namespaces());
+ return unionWildcard;
+ }
+
+ // 2
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Any) || (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Any)) {
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ return unionWildcard;
+ }
+
+ // 3
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Enumeration);
+ unionWildcard->namespaceConstraint()->setNamespaces(constraint->namespaces() + otherConstraint->namespaces());
+ return unionWildcard;
+ }
+
+ // 4
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not)) {
+ if (constraint->namespaces() != otherConstraint->namespaces()) {
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Not);
+ unionWildcard->namespaceConstraint()->setNamespaces(QSet<QString>() << XsdWildcard::absentNamespace());
+ return unionWildcard;
+ }
+ }
+
+ // 5
+ QSet<QString> sSet, negatedSet;
+ bool matches5 = false;
+ if (((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) && !constraint->namespaces().contains(XsdWildcard::absentNamespace()))
+ && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ negatedSet = constraint->namespaces();
+ sSet = otherConstraint->namespaces();
+ matches5 = true;
+ } else if (((otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not) && !otherConstraint->namespaces().contains(XsdWildcard::absentNamespace()))
+ && (constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ negatedSet = otherConstraint->namespaces();
+ sSet = constraint->namespaces();
+ matches5 = true;
+ }
+
+ if (matches5) {
+ if (sSet.contains(negatedSet.values().first()) && sSet.contains(XsdWildcard::absentNamespace())) { // 5.1
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ return unionWildcard;
+ }
+ if (sSet.contains(negatedSet.values().first()) && !sSet.contains(XsdWildcard::absentNamespace())) { // 5.2
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Not);
+ unionWildcard->namespaceConstraint()->setNamespaces(QSet<QString>() << XsdWildcard::absentNamespace());
+ return unionWildcard;
+ }
+ if (!sSet.contains(negatedSet.values().first()) && sSet.contains(XsdWildcard::absentNamespace())) { // 5.3
+ return XsdWildcard::Ptr(); // not expressible
+ }
+ if (!sSet.contains(negatedSet.values().first()) && !sSet.contains(XsdWildcard::absentNamespace())) { // 5.4
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Not);
+ unionWildcard->namespaceConstraint()->setNamespaces(negatedSet);
+ return unionWildcard;
+ }
+ }
+
+ // 6
+ bool matches6 = false;
+ if (((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) && constraint->namespaces().contains(XsdWildcard::absentNamespace()))
+ && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ negatedSet = constraint->namespaces();
+ sSet = otherConstraint->namespaces();
+ matches6 = true;
+ } else if (((otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not) && otherConstraint->namespaces().contains(XsdWildcard::absentNamespace()))
+ && (constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ negatedSet = otherConstraint->namespaces();
+ sSet = constraint->namespaces();
+ matches6 = true;
+ }
+
+ if (matches6) {
+ if (sSet.contains(XsdWildcard::absentNamespace())) { // 6.1
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ return unionWildcard;
+ }
+ if (!sSet.contains(XsdWildcard::absentNamespace())) { // 6.2
+ unionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Not);
+ unionWildcard->namespaceConstraint()->setNamespaces(QSet<QString>() += XsdWildcard::absentNamespace());
+ return unionWildcard;
+ }
+ }
+
+ return XsdWildcard::Ptr();
+}
+
+XsdWildcard::Ptr XsdSchemaHelper::wildcardIntersection(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-aw-intersect
+
+ const XsdWildcard::NamespaceConstraint::Ptr constraint(wildcard->namespaceConstraint());
+ const XsdWildcard::NamespaceConstraint::Ptr otherConstraint(otherWildcard->namespaceConstraint());
+
+ const XsdWildcard::Ptr intersectionWildcard(new XsdWildcard());
+
+ // 1
+ if ((constraint->variety() == otherConstraint->variety()) &&
+ (constraint->namespaces() == otherConstraint->namespaces())) {
+ intersectionWildcard->namespaceConstraint()->setVariety(constraint->variety());
+ intersectionWildcard->namespaceConstraint()->setNamespaces(constraint->namespaces());
+ return intersectionWildcard;
+ }
+
+ // 2
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Any) &&
+ (otherConstraint->variety() != XsdWildcard::NamespaceConstraint::Any)) {
+ intersectionWildcard->namespaceConstraint()->setVariety(otherConstraint->variety());
+ intersectionWildcard->namespaceConstraint()->setNamespaces(otherConstraint->namespaces());
+ return intersectionWildcard;
+ }
+
+ // 2
+ if ((constraint->variety() != XsdWildcard::NamespaceConstraint::Any) &&
+ (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Any)) {
+ intersectionWildcard->namespaceConstraint()->setVariety(constraint->variety());
+ intersectionWildcard->namespaceConstraint()->setNamespaces(constraint->namespaces());
+ return intersectionWildcard;
+ }
+
+ // 3
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) &&
+ (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ QSet<QString> set = otherConstraint->namespaces();
+ set.subtract(constraint->namespaces());
+ set.remove(XsdWildcard::absentNamespace());
+
+ intersectionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Enumeration);
+ intersectionWildcard->namespaceConstraint()->setNamespaces(set);
+
+ return intersectionWildcard;
+ }
+
+ // 3
+ if ((otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not) &&
+ (constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ QSet<QString> set = constraint->namespaces();
+ set.subtract(otherConstraint->namespaces());
+ set.remove(XsdWildcard::absentNamespace());
+
+ intersectionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Enumeration);
+ intersectionWildcard->namespaceConstraint()->setNamespaces(set);
+
+ return intersectionWildcard;
+ }
+
+ // 4
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) &&
+ (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
+
+ QSet<QString> set = constraint->namespaces();
+ set.intersect(otherConstraint->namespaces());
+
+ intersectionWildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Enumeration);
+ intersectionWildcard->namespaceConstraint()->setNamespaces(set);
+
+ return intersectionWildcard;
+ }
+
+ // 6
+ if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) &&
+ (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not)) {
+ if (!(constraint->namespaces().contains(XsdWildcard::absentNamespace())) && otherConstraint->namespaces().contains(XsdWildcard::absentNamespace())) {
+ return wildcard;
+ }
+ if (constraint->namespaces().contains(XsdWildcard::absentNamespace()) && !(otherConstraint->namespaces().contains(XsdWildcard::absentNamespace()))) {
+ return otherWildcard;
+ }
+ }
+
+ // 5 as not expressible return empty wildcard
+ return XsdWildcard::Ptr();
+}
+
+static SchemaType::DerivationConstraints convertBlockingConstraints(const NamedSchemaComponent::BlockingConstraints &constraints)
+{
+ SchemaType::DerivationConstraints result = 0;
+
+ if (constraints & NamedSchemaComponent::RestrictionConstraint)
+ result |= SchemaType::RestrictionConstraint;
+ if (constraints & NamedSchemaComponent::ExtensionConstraint)
+ result |= SchemaType::ExtensionConstraint;
+
+ return result;
+}
+
+bool XsdSchemaHelper::isValidlySubstitutable(const SchemaType::Ptr &type, const SchemaType::Ptr &otherType, const SchemaType::DerivationConstraints &constraints)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#key-val-sub-type
+
+ // 1
+ if (type->isComplexType() && otherType->isComplexType()) {
+ SchemaType::DerivationConstraints keywords = constraints;
+ if (otherType->isDefinedBySchema())
+ keywords |= convertBlockingConstraints(XsdComplexType::Ptr(otherType)->prohibitedSubstitutions());
+
+ return isComplexDerivationOk(type, otherType, keywords);
+ }
+
+ // 2
+ if (type->isComplexType() && otherType->isSimpleType()) {
+ return isComplexDerivationOk(type, otherType, constraints);
+ }
+
+ // 3
+ if (type->isSimpleType() && otherType->isSimpleType()) {
+ return isSimpleDerivationOk(type, otherType, constraints);
+ }
+
+ return false;
+}
+
+bool XsdSchemaHelper::isSimpleDerivationOk(const SchemaType::Ptr &derivedType, const SchemaType::Ptr &baseType, const SchemaType::DerivationConstraints &constraints)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-st-derived-ok
+
+ // 1
+ if (derivedType == baseType)
+ return true;
+
+ // 2.1
+ if ((constraints & SchemaType::RestrictionConstraint) || derivedType->wxsSuperType()->derivationConstraints() & SchemaType::RestrictionConstraint) {
+ return false;
+ }
+
+ // 2.2.1
+ if (derivedType->wxsSuperType() == baseType)
+ return true;
+
+ // 2.2.2
+ if (derivedType->wxsSuperType() != BuiltinTypes::xsAnyType) {
+ if (isSimpleDerivationOk(derivedType->wxsSuperType(), baseType, constraints))
+ return true;
+ }
+
+ // 2.2.3
+ if (derivedType->category() == SchemaType::SimpleTypeList || derivedType->category() == SchemaType::SimpleTypeUnion) {
+ if (baseType == BuiltinTypes::xsAnySimpleType)
+ return true;
+ }
+
+ // 2.2.4
+ if (baseType->category() == SchemaType::SimpleTypeUnion && baseType->isDefinedBySchema()) { // 2.2.4.1
+ const AnySimpleType::List memberTypes = XsdSimpleType::Ptr(baseType)->memberTypes();
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ if (isSimpleDerivationOk(derivedType, memberTypes.at(i), constraints)) { // 2.2.4.2
+ if (XsdSimpleType::Ptr(baseType)->facets().isEmpty()) { // 2.2.4.3
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+bool XsdSchemaHelper::isComplexDerivationOk(const SchemaType::Ptr &derivedType, const SchemaType::Ptr &baseType, const SchemaType::DerivationConstraints &constraints)
+{
+ if (!derivedType)
+ return false;
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-ct-derived-ok
+
+ // 1
+ if (derivedType != baseType) {
+ if ((derivedType->derivationMethod() == SchemaType::DerivationRestriction) && (constraints & SchemaType::RestrictionConstraint))
+ return false;
+ if ((derivedType->derivationMethod() == SchemaType::DerivationExtension) && (constraints & SchemaType::ExtensionConstraint))
+ return false;
+ }
+
+ // 2.1
+ if (derivedType == baseType)
+ return true;
+
+ // 2.2
+ if (derivedType->wxsSuperType() == baseType)
+ return true;
+
+ // 2.3
+ bool isOk = true;
+ if (derivedType->wxsSuperType() == BuiltinTypes::xsAnyType) { // 2.3.1
+ isOk = false;
+ } else { // 2.3.2
+ if (!derivedType->wxsSuperType())
+ return false;
+
+ if (derivedType->wxsSuperType()->isComplexType()) { // 2.3.2.1
+ isOk = isComplexDerivationOk(derivedType->wxsSuperType(), baseType, constraints);
+ } else { // 2.3.2.2
+ isOk = isSimpleDerivationOk(derivedType->wxsSuperType(), baseType, constraints);
+ }
+ }
+ if (isOk)
+ return true;
+
+ return false;
+}
+
+bool XsdSchemaHelper::constructAndCompare(const DerivedString<TypeString>::Ptr &operand1,
+ const AtomicComparator::Operator op,
+ const DerivedString<TypeString>::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection)
+{
+ Q_ASSERT_X(type->category() == SchemaType::SimpleTypeAtomic, Q_FUNC_INFO,
+ "We can only compare atomic values.");
+
+ // we can not cast a xs:String to a xs:QName, so lets go the safe way
+ if (type->name(context->namePool()) == BuiltinTypes::xsQName->name(context->namePool()))
+ return false;
+
+ const AtomicValue::Ptr value1 = ValueFactory::fromLexical(operand1->stringValue(), type, context, sourceLocationReflection);
+ if (value1->hasError())
+ return false;
+
+ const AtomicValue::Ptr value2 = ValueFactory::fromLexical(operand2->stringValue(), type, context, sourceLocationReflection);
+ if (value2->hasError())
+ return false;
+
+ return ComparisonFactory::compare(value1, op, value2, type, context, sourceLocationReflection);
+}
+
+bool XsdSchemaHelper::checkWildcardProcessContents(const XsdWildcard::Ptr &baseWildcard, const XsdWildcard::Ptr &derivedWildcard)
+{
+ if (baseWildcard->processContents() == XsdWildcard::Strict) {
+ if (derivedWildcard->processContents() == XsdWildcard::Lax || derivedWildcard->processContents() == XsdWildcard::Skip) {
+ return false;
+ }
+ } else if (baseWildcard->processContents() == XsdWildcard::Lax) {
+ if (derivedWildcard->processContents() == XsdWildcard::Skip)
+ return false;
+ }
+
+ return true;
+}
+
+bool XsdSchemaHelper::foundSubstitutionGroupTransitive(const XsdElement::Ptr &head, const XsdElement::Ptr &member, QSet<XsdElement::Ptr> &visitedElements)
+{
+ if (visitedElements.contains(member))
+ return false;
+ else
+ visitedElements.insert(member);
+
+ if (member->substitutionGroupAffiliations().isEmpty())
+ return false;
+
+ if (member->substitutionGroupAffiliations().contains(head)) {
+ return true;
+ } else {
+ const XsdElement::List affiliations = member->substitutionGroupAffiliations();
+ for (int i = 0; i < affiliations.count(); ++i) {
+ if (foundSubstitutionGroupTransitive(head, affiliations.at(i), visitedElements))
+ return true;
+ }
+
+ return false;
+ }
+}
+
+void XsdSchemaHelper::foundSubstitutionGroupTypeInheritance(const SchemaType::Ptr &headType, const SchemaType::Ptr &memberType,
+ QSet<SchemaType::DerivationMethod> &derivationSet, NamedSchemaComponent::BlockingConstraints &blockSet)
+{
+ if (!memberType)
+ return;
+
+ if (memberType == headType)
+ return;
+
+ derivationSet.insert(memberType->derivationMethod());
+
+ if (memberType->isComplexType()) {
+ const XsdComplexType::Ptr complexType(memberType);
+ blockSet |= complexType->prohibitedSubstitutions();
+ }
+
+ foundSubstitutionGroupTypeInheritance(headType, memberType->wxsSuperType(), derivationSet, blockSet);
+}
+
+bool XsdSchemaHelper::substitutionGroupOkTransitive(const XsdElement::Ptr &head, const XsdElement::Ptr &member, const NamePool::Ptr &namePool)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-equiv-derived-ok-rec
+
+ // 1
+ if ((member->name(namePool) == head->name(namePool)) && (member->type() == head->type()))
+ return true;
+
+ // 2.1
+ if (head->disallowedSubstitutions() & NamedSchemaComponent::SubstitutionConstraint)
+ return false;
+
+ // 2.2
+ {
+ QSet<XsdElement::Ptr> visitedElements;
+ if (!foundSubstitutionGroupTransitive(head, member, visitedElements))
+ return false;
+ }
+
+ // 2.3
+ {
+ QSet<SchemaType::DerivationMethod> derivationSet;
+ NamedSchemaComponent::BlockingConstraints blockSet;
+
+ foundSubstitutionGroupTypeInheritance(head->type(), member->type(), derivationSet, blockSet);
+
+ NamedSchemaComponent::BlockingConstraints checkSet(blockSet);
+ checkSet |= head->disallowedSubstitutions();
+ if (head->type()->isComplexType()) {
+ const XsdComplexType::Ptr complexType(head->type());
+ checkSet |= complexType->prohibitedSubstitutions();
+ }
+
+ if ((checkSet & NamedSchemaComponent::RestrictionConstraint) && derivationSet.contains(SchemaType::DerivationRestriction))
+ return false;
+ if ((checkSet & NamedSchemaComponent::ExtensionConstraint) && derivationSet.contains(SchemaType::DerivationExtension))
+ return false;
+ if (checkSet & NamedSchemaComponent::SubstitutionConstraint)
+ return false;
+ }
+
+ return true;
+}
+
+bool XsdSchemaHelper::isValidAttributeGroupRestriction(const XsdAttributeGroup::Ptr &derivedAttributeGroup, const XsdAttributeGroup::Ptr &attributeGroup, const XsdSchemaContext::Ptr &context, QString &errorMsg)
+{
+ // @see http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction
+
+ const XsdAttributeUse::List derivedAttributeUses = derivedAttributeGroup->attributeUses();
+ const XsdAttributeUse::List baseAttributeUses = attributeGroup->attributeUses();
+
+ return isValidAttributeUsesRestriction(derivedAttributeUses, baseAttributeUses,
+ derivedAttributeGroup->wildcard(), attributeGroup->wildcard(), context, errorMsg);
+}
+
+bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::List &derivedAttributeUses, const XsdAttributeUse::List &baseAttributeUses,
+ const XsdWildcard::Ptr &derivedWildcard, const XsdWildcard::Ptr &wildcard, const XsdSchemaContext::Ptr &context, QString &errorMsg)
+{
+ const NamePool::Ptr namePool(context->namePool());
+
+ QHash<QXmlName, XsdAttributeUse::Ptr> baseAttributeUsesLookup;
+ for (int i = 0; i < baseAttributeUses.count(); ++i)
+ baseAttributeUsesLookup.insert(baseAttributeUses.at(i)->attribute()->name(namePool), baseAttributeUses.at(i));
+
+ QHash<QXmlName, XsdAttributeUse::Ptr> derivedAttributeUsesLookup;
+ for (int i = 0; i < derivedAttributeUses.count(); ++i)
+ derivedAttributeUsesLookup.insert(derivedAttributeUses.at(i)->attribute()->name(namePool), derivedAttributeUses.at(i));
+
+ // 2
+ for (int i = 0; i < derivedAttributeUses.count(); ++i) {
+ const XsdAttributeUse::Ptr derivedAttributeUse = derivedAttributeUses.at(i);
+
+ // prohibited attributes are no real attributes, so skip them in that test here
+ if (derivedAttributeUse->useType() == XsdAttributeUse::ProhibitedUse)
+ continue;
+
+ if (baseAttributeUsesLookup.contains(derivedAttributeUse->attribute()->name(namePool))) {
+ const XsdAttributeUse::Ptr baseAttributeUse(baseAttributeUsesLookup.value(derivedAttributeUse->attribute()->name(namePool)));
+
+ // 2.1.1
+ if (baseAttributeUse->isRequired() == true && derivedAttributeUse->isRequired() == false) {
+ errorMsg = QtXmlPatterns::tr("base attribute %1 is required but derived attribute is not").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+
+ // 2.1.2
+ if (!isSimpleDerivationOk(derivedAttributeUse->attribute()->type(), baseAttributeUse->attribute()->type(), SchemaType::DerivationConstraints())) {
+ errorMsg = QtXmlPatterns::tr("type of derived attribute %1 cannot be validly derived from type of base attribute").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+
+ // 2.1.3
+ XsdAttributeUse::ValueConstraint::Ptr derivedConstraint;
+ if (derivedAttributeUse->valueConstraint())
+ derivedConstraint = derivedAttributeUse->valueConstraint();
+ else if (derivedAttributeUse->attribute()->valueConstraint())
+ derivedConstraint = XsdAttributeUse::ValueConstraint::fromAttributeValueConstraint(derivedAttributeUse->attribute()->valueConstraint());
+
+ XsdAttributeUse::ValueConstraint::Ptr baseConstraint;
+ if (baseAttributeUse->valueConstraint())
+ baseConstraint = baseAttributeUse->valueConstraint();
+ else if (baseAttributeUse->attribute()->valueConstraint())
+ baseConstraint = XsdAttributeUse::ValueConstraint::fromAttributeValueConstraint(baseAttributeUse->attribute()->valueConstraint());
+
+ bool ok = false;
+ if (!baseConstraint || baseConstraint->variety() == XsdAttributeUse::ValueConstraint::Default)
+ ok = true;
+
+ if (derivedConstraint && baseConstraint) {
+ const XsdTypeChecker checker(context, QVector<QXmlName>(), QSourceLocation(QUrl(QLatin1String("http://dummy.org")), 1, 1));
+ if (derivedConstraint->variety() == XsdAttributeUse::ValueConstraint::Fixed && checker.valuesAreEqual(derivedConstraint->value(), baseConstraint->value(), baseAttributeUse->attribute()->type()))
+ ok = true;
+ }
+
+ if (!ok) {
+ errorMsg = QtXmlPatterns::tr("value constraint of derived attribute %1 does not match value constraint of base attribute").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+ } else {
+ if (!wildcard) {
+ errorMsg = QtXmlPatterns::tr("derived attribute %1 does not exists in the base definition").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+
+ QXmlName name = derivedAttributeUse->attribute()->name(namePool);
+
+ // wildcards using XsdWildcard::absentNamespace, so we have to fix that here
+ if (name.namespaceURI() == StandardNamespaces::empty)
+ name.setNamespaceURI(namePool->allocateNamespace(XsdWildcard::absentNamespace()));
+
+ if (!wildcardAllowsExpandedName(name, wildcard, namePool)) {
+ errorMsg = QtXmlPatterns::tr("derived attribute %1 does not match the wildcard in the base definition").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+ }
+ }
+
+ // 3
+ for (int i = 0; i < baseAttributeUses.count(); ++i) {
+ const XsdAttributeUse::Ptr baseAttributeUse = baseAttributeUses.at(i);
+
+ if (baseAttributeUse->isRequired()) {
+ if (derivedAttributeUsesLookup.contains(baseAttributeUse->attribute()->name(namePool))) {
+ if (!derivedAttributeUsesLookup.value(baseAttributeUse->attribute()->name(namePool))->isRequired()) {
+ errorMsg = QtXmlPatterns::tr("base attribute %1 is required but derived attribute is not").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+ } else {
+ errorMsg = QtXmlPatterns::tr("base attribute %1 is required but missing in derived definition").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool)));
+ return false;
+ }
+ }
+ }
+
+ // 4
+ if (derivedWildcard) {
+ if (!wildcard) {
+ errorMsg = QtXmlPatterns::tr("derived definition contains an %1 element that does not exists in the base definition").arg(formatElement("anyAttribute"));
+ return false;
+ }
+
+ if (!isWildcardSubset(derivedWildcard, wildcard)) {
+ errorMsg = QtXmlPatterns::tr("derived wildcard is not a subset of the base wildcard");
+ return false;
+ }
+
+ if (!checkWildcardProcessContents(wildcard, derivedWildcard)) {
+ errorMsg = QtXmlPatterns::tr("%1 of derived wildcard is not a valid restriction of %2 of base wildcard").arg(formatKeyword("processContents")).arg(formatKeyword("processContents"));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool XsdSchemaHelper::isValidAttributeUsesExtension(const XsdAttributeUse::List &derivedAttributeUses, const XsdAttributeUse::List &attributeUses,
+ const XsdWildcard::Ptr &derivedWildcard, const XsdWildcard::Ptr &wildcard, const XsdSchemaContext::Ptr &context, QString &errorMsg)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cos-ct-extends
+
+ const NamePool::Ptr namePool(context->namePool());
+
+ // 1.2
+ QHash<QXmlName, XsdAttribute::Ptr> lookupHash;
+ for (int i = 0; i < derivedAttributeUses.count(); ++i)
+ lookupHash.insert(derivedAttributeUses.at(i)->attribute()->name(namePool), derivedAttributeUses.at(i)->attribute());
+
+ for (int i = 0; i < attributeUses.count(); ++i) {
+ const QXmlName attributeName = attributeUses.at(i)->attribute()->name(namePool);
+ if (!lookupHash.contains(attributeName)) {
+ errorMsg = QtXmlPatterns::tr("attribute %1 from base type is missing in derived type").arg(formatKeyword(namePool->displayName(attributeName)));
+ return false;
+ }
+
+ if (lookupHash.value(attributeName)->type() != attributeUses.at(i)->attribute()->type()) {
+ errorMsg = QtXmlPatterns::tr("type of derived attribute %1 differs from type of base attribute").arg(formatKeyword(namePool->displayName(attributeName)));
+ return false;
+ }
+ }
+
+ // 1.3
+ if (wildcard) {
+ if (!derivedWildcard) {
+ errorMsg = QtXmlPatterns::tr("base definition contains an %1 element that is missing in the derived definition").arg(formatElement("anyAttribute"));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemahelper_p.h b/src/xmlpatterns/schema/qxsdschemahelper_p.h
new file mode 100644
index 0000000..71fdfe7
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemahelper_p.h
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaHelper_H
+#define Patternist_XsdSchemaHelper_H
+
+#include "qcomparisonfactory_p.h"
+#include "qschematype_p.h"
+#include "qxsdattributegroup_p.h"
+#include "qxsdelement_p.h"
+#include "qxsdparticle_p.h"
+#include "qxsdschemacontext_p.h"
+#include "qxsdwildcard_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+
+ /**
+ * @short Contains helper methods that are used by XsdSchemaParser, XsdSchemaResolver and XsdSchemaChecker.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaHelper
+ {
+ public:
+ /**
+ * Checks whether the given @p particle is emptiable as defined by the
+ * algorithm in the schema spec.
+ */
+ static bool isParticleEmptiable(const XsdParticle::Ptr &particle);
+
+ /**
+ * Checks whether the given @p nameSpace is allowed by the given namespace @p constraint.
+ */
+ static bool wildcardAllowsNamespaceName(const QString &nameSpace,
+ const XsdWildcard::NamespaceConstraint::Ptr &constraint);
+
+ /**
+ * Checks whether the given @p name is allowed by the namespace constraint of the given @p wildcard.
+ */
+ static bool wildcardAllowsExpandedName(const QXmlName &name,
+ const XsdWildcard::Ptr &wildcard,
+ const NamePool::Ptr &namePool);
+
+ /**
+ * Checks whether the @p wildcard is a subset of @p otherWildcard.
+ */
+ static bool isWildcardSubset(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard);
+
+ /**
+ * Returns the union of the given @p wildcard and @p otherWildcard.
+ */
+ static XsdWildcard::Ptr wildcardUnion(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard);
+
+ /**
+ * Returns the intersection of the given @p wildcard and @p otherWildcard.
+ */
+ static XsdWildcard::Ptr wildcardIntersection(const XsdWildcard::Ptr &wildcard,
+ const XsdWildcard::Ptr &otherWildcard);
+
+ /**
+ * Returns whether the given @p type is validly substitutable for an @p otherType
+ * under the given @p constraints.
+ */
+ static bool isValidlySubstitutable(const SchemaType::Ptr &type,
+ const SchemaType::Ptr &otherType,
+ const SchemaType::DerivationConstraints &constraints);
+
+ /**
+ * Returns whether the simple @p derivedType can be derived from the simple @p baseType
+ * under the given @p constraints.
+ */
+ static bool isSimpleDerivationOk(const SchemaType::Ptr &derivedType,
+ const SchemaType::Ptr &baseType,
+ const SchemaType::DerivationConstraints &constraints);
+
+ /**
+ * Returns whether the complex @p derivedType can be derived from the complex @p baseType
+ * under the given @p constraints.
+ */
+ static bool isComplexDerivationOk(const SchemaType::Ptr &derivedType,
+ const SchemaType::Ptr &baseType,
+ const SchemaType::DerivationConstraints &constraints);
+
+ /**
+ * This method takes the two string based operands @p operand1 and @p operand2 and converts them to instances of type @p type.
+ * If the conversion fails, @c false is returned, otherwise the instances are compared by the given operator @p op and the
+ * result of the comparison is returned.
+ */
+ static bool constructAndCompare(const DerivedString<TypeString>::Ptr &operand1,
+ const AtomicComparator::Operator op,
+ const DerivedString<TypeString>::Ptr &operand2,
+ const SchemaType::Ptr &type,
+ const ReportContext::Ptr &context,
+ const SourceLocationReflection *const sourceLocationReflection);
+
+ /**
+ * Returns whether the process content property of the @p derivedWildcard is valid
+ * according to the process content property of its @p baseWildcard.
+ */
+ static bool checkWildcardProcessContents(const XsdWildcard::Ptr &baseWildcard,
+ const XsdWildcard::Ptr &derivedWildcard);
+
+ /**
+ * Checks whether @[ member is a member of the substitution group with the given @p head.
+ */
+ static bool foundSubstitutionGroupTransitive(const XsdElement::Ptr &head,
+ const XsdElement::Ptr &member,
+ QSet<XsdElement::Ptr> &visitedElements);
+
+ /**
+ * A helper method that iterates over the type hierarchy from @p memberType up to @p headType and collects all
+ * @p derivationSet and @p blockSet constraints that exists on the way there.
+ */
+ static void foundSubstitutionGroupTypeInheritance(const SchemaType::Ptr &headType,
+ const SchemaType::Ptr &memberType,
+ QSet<SchemaType::DerivationMethod> &derivationSet,
+ NamedSchemaComponent::BlockingConstraints &blockSet);
+
+ /**
+ * Checks if the @p member is transitive to @p head.
+ */
+ static bool substitutionGroupOkTransitive(const XsdElement::Ptr &head,
+ const XsdElement::Ptr &member,
+ const NamePool::Ptr &namePool);
+
+ /**
+ * Checks if @p derivedAttributeGroup is a valid restriction for @p attributeGroup.
+ */
+ static bool isValidAttributeGroupRestriction(const XsdAttributeGroup::Ptr &derivedAttributeGroup,
+ const XsdAttributeGroup::Ptr &attributeGroup,
+ const XsdSchemaContext::Ptr &context,
+ QString &errorMsg);
+
+ /**
+ * Checks if @p derivedAttributeUses are a valid restriction for @p attributeUses.
+ */
+ static bool isValidAttributeUsesRestriction(const XsdAttributeUse::List &derivedAttributeUses,
+ const XsdAttributeUse::List &attributeUses,
+ const XsdWildcard::Ptr &derivedWildcard,
+ const XsdWildcard::Ptr &wildcard,
+ const XsdSchemaContext::Ptr &context,
+ QString &errorMsg);
+
+ /**
+ * Checks if @p derivedAttributeUses are a valid extension for @p attributeUses.
+ */
+ static bool isValidAttributeUsesExtension(const XsdAttributeUse::List &derivedAttributeUses,
+ const XsdAttributeUse::List &attributeUses,
+ const XsdWildcard::Ptr &derivedWildcard,
+ const XsdWildcard::Ptr &wildcard,
+ const XsdSchemaContext::Ptr &context,
+ QString &errorMsg);
+
+ private:
+ Q_DISABLE_COPY(XsdSchemaHelper)
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemamerger.cpp b/src/xmlpatterns/schema/qxsdschemamerger.cpp
new file mode 100644
index 0000000..1714068
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemamerger.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemamerger_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaMerger::XsdSchemaMerger(const XsdSchema::Ptr &schema, const XsdSchema::Ptr &otherSchema)
+{
+ merge(schema, otherSchema);
+}
+
+XsdSchema::Ptr XsdSchemaMerger::mergedSchema() const
+{
+ return m_mergedSchema;
+}
+
+void XsdSchemaMerger::merge(const XsdSchema::Ptr &schema, const XsdSchema::Ptr &otherSchema)
+{
+ m_mergedSchema = XsdSchema::Ptr(new XsdSchema(otherSchema->namePool()));
+
+ // first fill the merged schema with the values from schema
+ if (schema) {
+ const XsdElement::List elements = schema->elements();
+ for (int i = 0; i < elements.count(); ++i) {
+ m_mergedSchema->addElement(elements.at(i));
+ }
+
+ const XsdAttribute::List attributes = schema->attributes();
+ for (int i = 0; i < attributes.count(); ++i) {
+ m_mergedSchema->addAttribute(attributes.at(i));
+ }
+
+ const SchemaType::List types = schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ m_mergedSchema->addType(types.at(i));
+ }
+
+ const SchemaType::List anonymousTypes = schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ m_mergedSchema->addAnonymousType(anonymousTypes.at(i));
+ }
+
+ const XsdModelGroup::List elementGroups = schema->elementGroups();
+ for (int i = 0; i < elementGroups.count(); ++i) {
+ m_mergedSchema->addElementGroup(elementGroups.at(i));
+ }
+
+ const XsdAttributeGroup::List attributeGroups = schema->attributeGroups();
+ for (int i = 0; i < attributeGroups.count(); ++i) {
+ m_mergedSchema->addAttributeGroup(attributeGroups.at(i));
+ }
+
+ const XsdNotation::List notations = schema->notations();
+ for (int i = 0; i < notations.count(); ++i) {
+ m_mergedSchema->addNotation(notations.at(i));
+ }
+
+ const XsdIdentityConstraint::List identityConstraints = schema->identityConstraints();
+ for (int i = 0; i < identityConstraints.count(); ++i) {
+ m_mergedSchema->addIdentityConstraint(identityConstraints.at(i));
+ }
+ }
+
+ // then merge in the values from the otherSchema
+ {
+ const XsdElement::List elements = otherSchema->elements();
+ for (int i = 0; i < elements.count(); ++i) {
+ if (!m_mergedSchema->element(elements.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addElement(elements.at(i));
+ }
+
+ const XsdAttribute::List attributes = otherSchema->attributes();
+ for (int i = 0; i < attributes.count(); ++i) {
+ if (!m_mergedSchema->attribute(attributes.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addAttribute(attributes.at(i));
+ }
+
+ const SchemaType::List types = otherSchema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (!m_mergedSchema->type(types.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addType(types.at(i));
+ }
+
+ const SchemaType::List anonymousTypes = otherSchema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ // add anonymous type as they are
+ m_mergedSchema->addAnonymousType(anonymousTypes.at(i));
+ }
+
+ const XsdModelGroup::List elementGroups = otherSchema->elementGroups();
+ for (int i = 0; i < elementGroups.count(); ++i) {
+ if (!m_mergedSchema->elementGroup(elementGroups.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addElementGroup(elementGroups.at(i));
+ }
+
+ const XsdAttributeGroup::List attributeGroups = otherSchema->attributeGroups();
+ for (int i = 0; i < attributeGroups.count(); ++i) {
+ if (!m_mergedSchema->attributeGroup(attributeGroups.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addAttributeGroup(attributeGroups.at(i));
+ }
+
+ const XsdNotation::List notations = otherSchema->notations();
+ for (int i = 0; i < notations.count(); ++i) {
+ if (!m_mergedSchema->notation(notations.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addNotation(notations.at(i));
+ }
+
+ const XsdIdentityConstraint::List identityConstraints = otherSchema->identityConstraints();
+ for (int i = 0; i < identityConstraints.count(); ++i) {
+ if (!m_mergedSchema->identityConstraint(identityConstraints.at(i)->name(otherSchema->namePool())))
+ m_mergedSchema->addIdentityConstraint(identityConstraints.at(i));
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemamerger_p.h b/src/xmlpatterns/schema/qxsdschemamerger_p.h
new file mode 100644
index 0000000..8b522c5
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemamerger_p.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaMerger_H
+#define Patternist_XsdSchemaMerger_H
+
+#include "qxsdschema_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A helper class that merges two schemas into one.
+ *
+ * This class is used in XsdValidatingInstanceReader to merge the schema
+ * given in the constructor with a schema defined in the instance document
+ * via xsi:schemaLocation or xsi:noNamespaceSchema location.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaMerger : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdSchemaMerger> Ptr;
+
+ /**
+ * Creates a new schema merger object that merges @p schema with @p otherSchema.
+ */
+ XsdSchemaMerger(const XsdSchema::Ptr &schema, const XsdSchema::Ptr &otherSchema);
+
+ /**
+ * Returns the merged schema.
+ */
+ XsdSchema::Ptr mergedSchema() const;
+
+ private:
+ void merge(const XsdSchema::Ptr &schema, const XsdSchema::Ptr &otherSchema);
+
+ XsdSchema::Ptr m_mergedSchema;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
new file mode 100644
index 0000000..4e6a643
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp
@@ -0,0 +1,6078 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemaparser_p.h"
+
+#include "private/qxmlutils_p.h"
+#include "qacceltreeresourceloader_p.h"
+#include "qautoptr_p.h"
+#include "qboolean_p.h"
+#include "qcommonnamespaces_p.h"
+#include "qderivedinteger_p.h"
+#include "qderivedstring_p.h"
+#include "qqnamevalue_p.h"
+#include "qxmlquery_p.h"
+#include "qxpathhelper_p.h"
+#include "qxsdattributereference_p.h"
+#include "qxsdreference_p.h"
+#include "qxsdschematoken_p.h"
+
+#include <QtCore/QFile>
+#include <QtXmlPatterns/QXmlQuery>
+
+QT_BEGIN_NAMESPACE
+
+/**
+ * @page schema_overview Overview
+ * @section structure_and_components Structure and Components
+ *
+ * The schema validator code consists of 4 major components
+ *
+ * <dl>
+ * <dt>The schema parser (QPatternist::XsdSchemaParser)</dt>
+ * <dd>This component parses a XML document that is supplied via a QIODevice. It creates
+ * a so called (incomplete) 'compiled schema', which is a representation of the XML Schema
+ * structure as C++ objects.
+ * As the parser is a streaming parser, it can't resolve references to types or elements/attributes
+ * in place, therefor it creates resolver tasks which are passed to the schema resolver component
+ * for resolving at a later point in time.
+ * The parser does furthermore the basic XML structure constraint checking, e.g. if all required
+ * attributes are available or the order of the elements is correct.</dd>
+ *
+ * <dt>The schema resolver (QPatternist::XsdSchemaResolver)</dt>
+ * <dd>This component is activated after the schema parser component has been finished the parsing
+ * of all schemas. The resolver has been supplied with resolve tasks by the schema parser that
+ * it will resolve in this step now. Between working on the single resolver tasks, the resolver
+ * calls check methods from the schema checker component to make sure that some assertions are
+ * valid (e.g. no circular inheritance of types), so that the resolver can work without hassle.
+ * During resoving references to attribute or element groups it also checks for circular references
+ * of these groups.
+ * At the end of that phase we have a compiled schema that is fully resolved (not necessarily valid though).</dd>
+ *
+ * <dt>The schema checker (QPatternist::XsdSchemaChecker)</dt>
+ * <dd>This component does all the schema constraint checking as given by the Schema specification.
+ * At the end of that phase we have fully resolved and valid compiled schema that can be used for validation
+ * of instance documents.</dd>
+ *
+ * <dt>The validator (QPatternist::XsdValidatingInstanceReader)</dt>
+ * <dd>This component is responsible for validating a XML instance document, provided via a QIODevice, against
+ * a valid compiled schema.</dd>
+ * </dl>
+ *
+ * @ingroup Patternist_schema
+ */
+
+using namespace QPatternist;
+
+namespace QPatternist
+{
+
+/**
+ * @short A helper class for automatically handling namespace scopes of elements.
+ *
+ * This class should be instantiated at the beginning of each parse XYZ method.
+ */
+class ElementNamespaceHandler
+{
+ public:
+ /**
+ * Creates a new element namespace handler object.
+ *
+ * It checks whether the @p parser is on the right @p tag and it creates a new namespace
+ * context that contains the inherited and local namespace declarations.
+ */
+ ElementNamespaceHandler(const XsdSchemaToken::NodeName &tag, XsdSchemaParser *parser)
+ : m_parser(parser)
+ {
+ Q_ASSERT(m_parser->isStartElement() && (XsdSchemaToken::toToken(m_parser->name()) == tag) && (XsdSchemaToken::toToken(m_parser->namespaceUri()) == XsdSchemaToken::XML_NS_SCHEMA_URI));
+ m_parser->m_namespaceSupport.pushContext();
+ m_parser->m_namespaceSupport.setPrefixes(m_parser->namespaceDeclarations());
+ }
+
+ /**
+ * Destroys the element namespace handler object.
+ *
+ * It destroys the local namespace context.
+ */
+ ~ElementNamespaceHandler()
+ {
+ m_parser->m_namespaceSupport.popContext();
+ }
+
+ private:
+ XsdSchemaParser *m_parser;
+};
+
+/**
+ * A helper class that checks for the right occurrence of
+ * xml tags with the help of a DFA.
+ */
+class TagValidationHandler
+{
+ public:
+ TagValidationHandler(XsdTagScope::Type tag, XsdSchemaParser *parser, const NamePool::Ptr &namePool)
+ : m_parser(parser), m_machine(namePool)
+ {
+ Q_ASSERT(m_parser->m_stateMachines.contains(tag));
+
+ m_machine = m_parser->m_stateMachines.value(tag);
+ m_machine.reset();
+ }
+
+ void validate(XsdSchemaToken::NodeName token)
+ {
+ if (token == XsdSchemaToken::NoKeyword) {
+ const QList<XsdSchemaToken::NodeName> tokens = m_machine.possibleTransitions();
+
+ QStringList elementNames;
+ for (int i = 0; i < tokens.count(); ++i)
+ elementNames.append(formatElement(XsdSchemaToken::toString(tokens.at(i))));
+
+ m_parser->error(QtXmlPatterns::tr("can not process unknown element %1, expected elements are: %2")
+ .arg(formatElement(m_parser->name().toString()))
+ .arg(elementNames.join(QLatin1String(", "))));
+ return;
+ }
+
+ if (!m_machine.proceed(token)) {
+ const QList<XsdSchemaToken::NodeName> tokens = m_machine.possibleTransitions();
+
+ QStringList elementNames;
+ for (int i = 0; i < tokens.count(); ++i)
+ elementNames.append(formatElement(XsdSchemaToken::toString(tokens.at(i))));
+
+ m_parser->error(QtXmlPatterns::tr("element %1 is not allowed in this scope, possible elements are: %2")
+ .arg(formatElement(XsdSchemaToken::toString(token)))
+ .arg(elementNames.join(QLatin1String(", "))));
+ return;
+ }
+ }
+
+ void finalize() const
+ {
+ if (!m_machine.inEndState()) {
+ const QList<XsdSchemaToken::NodeName> tokens = m_machine.possibleTransitions();
+
+ QStringList elementNames;
+ for (int i = 0; i < tokens.count(); ++i)
+ elementNames.append(formatElement(XsdSchemaToken::toString(tokens.at(i))));
+
+ m_parser->error(QtXmlPatterns::tr("child element is missing in that scope, possible child elements are: %1")
+ .arg(elementNames.join(QLatin1String(", "))));
+ }
+ }
+
+ private:
+ XsdSchemaParser *m_parser;
+ XsdStateMachine<XsdSchemaToken::NodeName> m_machine;
+};
+
+}
+
+/**
+ * Returns a list of all particles with group references that appear at any level of
+ * the given unresolved @p group.
+ */
+static XsdParticle::List collectGroupRef(const XsdModelGroup::Ptr &group)
+{
+ XsdParticle::List refParticles;
+
+ XsdParticle::List particles = group->particles();
+ for (int i = 0; i < particles.count(); ++i) {
+ if (particles.at(i)->term()->isReference()) {
+ const XsdReference::Ptr reference(particles.at(i)->term());
+ if (reference->type() == XsdReference::ModelGroup)
+ refParticles.append(particles.at(i));
+ }
+ if (particles.at(i)->term()->isModelGroup()) {
+ refParticles << collectGroupRef(XsdModelGroup::Ptr(particles.at(i)->term()));
+ }
+ }
+
+ return refParticles;
+}
+
+/**
+ * Helper function that works around the limited facilities of
+ * QUrl/AnyURI::fromLexical to detect invalid URIs
+ */
+inline static bool isValidUri(const QString &string)
+{
+ // an empty URI points to the current document as defined in RFC 2396 (4.2)
+ if (string.isEmpty())
+ return true;
+
+ // explicit check as that is not checked by the code below
+ if (string.startsWith(QLatin1String("##")))
+ return false;
+
+ const AnyURI::Ptr uri = AnyURI::fromLexical(string);
+ return (!(uri->hasError()));
+}
+
+XsdSchemaParser::XsdSchemaParser(const XsdSchemaContext::Ptr &context, const XsdSchemaParserContext::Ptr &parserContext, QIODevice *device)
+ : MaintainingReader<XsdSchemaToken, XsdTagScope::Type>(parserContext->elementDescriptions(), QSet<XsdSchemaToken::NodeName>(), context, device)
+ , m_context(context)
+ , m_parserContext(parserContext)
+ , m_namePool(m_parserContext->namePool())
+ , m_namespaceSupport(m_namePool)
+{
+ m_schema = m_parserContext->schema();
+ m_schemaResolver = m_parserContext->resolver();
+ m_idCache = XsdIdCache::Ptr(new XsdIdCache());
+
+ setupStateMachines();
+ setupBuiltinTypeNames();
+}
+
+void XsdSchemaParser::setIncludedSchemas(const NamespaceSet &schemas)
+{
+ m_includedSchemas = schemas;
+}
+
+void XsdSchemaParser::setImportedSchemas(const NamespaceSet &schemas)
+{
+ m_importedSchemas = schemas;
+}
+
+void XsdSchemaParser::setRedefinedSchemas(const NamespaceSet &schemas)
+{
+ m_redefinedSchemas = schemas;
+}
+
+void XsdSchemaParser::setTargetNamespace(const QString &targetNamespace)
+{
+ m_targetNamespace = targetNamespace;
+}
+
+void XsdSchemaParser::setTargetNamespaceExtended(const QString &targetNamespace)
+{
+ m_targetNamespace = targetNamespace;
+ m_namespaceSupport.setTargetNamespace(m_namePool->allocateNamespace(m_targetNamespace));
+}
+
+void XsdSchemaParser::setDocumentURI(const QUrl &uri)
+{
+ m_documentURI = uri;
+
+ // prevent to get included/imported/redefined twice
+ m_includedSchemas.insert(uri);
+ m_importedSchemas.insert(uri);
+}
+
+QUrl XsdSchemaParser::documentURI() const
+{
+ return m_documentURI;
+}
+
+bool XsdSchemaParser::isAnyAttributeAllowed() const
+{
+ return false;
+}
+
+bool XsdSchemaParser::parse(ParserType parserType)
+{
+ m_componentLocationHash.clear();
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ if (isSchemaTag(XsdSchemaToken::Schema, token, namespaceToken)) {
+ parseSchema(parserType);
+ } else {
+ error(QtXmlPatterns::tr("document is not a XML schema"));
+ }
+ }
+ }
+
+ m_schemaResolver->addComponentLocationHash(m_componentLocationHash);
+ m_schemaResolver->setDefaultOpenContent(m_defaultOpenContent, m_defaultOpenContentAppliesToEmpty);
+
+ if (QXmlStreamReader::error() != QXmlStreamReader::NoError)
+ error(errorString());
+
+ return true;
+}
+
+void XsdSchemaParser::error(const QString &msg)
+{
+ MaintainingReader<XsdSchemaToken, XsdTagScope::Type>::error(msg, XsdSchemaContext::XSDError);
+}
+
+void XsdSchemaParser::attributeContentError(const char *attributeName, const char *elementName, const QString &value, const SchemaType::Ptr &type)
+{
+ if (type) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element contains invalid content: {%3} is not a value of type %4")
+ .arg(formatAttribute(attributeName))
+ .arg(formatElement(elementName))
+ .arg(formatData(value))
+ .arg(formatType(m_namePool, type)));
+ } else {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element contains invalid content: {%3}")
+ .arg(formatAttribute(attributeName))
+ .arg(formatElement(elementName))
+ .arg(formatData(value)));
+ }
+}
+
+void XsdSchemaParser::parseSchema(ParserType parserType)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Schema, this);
+
+ validateElement(XsdTagScope::Schema);
+
+ // parse attributes
+
+ if (parserType == TopLevelParser) {
+ if (hasAttribute(QString::fromLatin1("targetNamespace"))) {
+ m_targetNamespace = readNamespaceAttribute(QString::fromLatin1("targetNamespace"), "schema");
+ }
+ } else if (parserType == IncludeParser) {
+ // m_targetNamespace is set to the target namespace of the including schema at this point
+
+ if (hasAttribute(QString::fromLatin1("targetNamespace"))) {
+ const QString targetNamespace = readNamespaceAttribute(QString::fromLatin1("targetNamespace"), "schema");
+
+ if (m_targetNamespace != targetNamespace) {
+ error(QtXmlPatterns::tr("target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema")
+ .arg(formatURI(targetNamespace)).arg(formatURI(m_targetNamespace)));
+ return;
+ }
+ }
+ } else if (parserType == ImportParser) {
+ // m_targetNamespace is set to the target namespace from the namespace attribute of the <import> tag at this point
+
+ QString targetNamespace;
+ if (hasAttribute(QString::fromLatin1("targetNamespace"))) {
+ targetNamespace = readNamespaceAttribute(QString::fromLatin1("targetNamespace"), "schema");
+ }
+
+ if (m_targetNamespace != targetNamespace) {
+ error(QtXmlPatterns::tr("target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema")
+ .arg(formatURI(targetNamespace)).arg(formatURI(m_targetNamespace)));
+ return;
+ }
+ } else if (parserType == RedefineParser) {
+ // m_targetNamespace is set to the target namespace of the redefining schema at this point
+
+ if (hasAttribute(QString::fromLatin1("targetNamespace"))) {
+ const QString targetNamespace = readNamespaceAttribute(QString::fromLatin1("targetNamespace"), "schema");
+
+ if (m_targetNamespace != targetNamespace) {
+ error(QtXmlPatterns::tr("target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema")
+ .arg(formatURI(targetNamespace)).arg(formatURI(m_targetNamespace)));
+ return;
+ }
+ }
+ }
+
+ if (hasAttribute(QString::fromLatin1("attributeFormDefault"))) {
+ const QString value = readAttribute(QString::fromLatin1("attributeFormDefault"));
+ if (value != QString::fromLatin1("qualified") && value != QString::fromLatin1("unqualified")) {
+ attributeContentError("attributeFormDefault", "schema", value);
+ return;
+ }
+
+ m_attributeFormDefault = value;
+ } else {
+ m_attributeFormDefault = QString::fromLatin1("unqualified");
+ }
+
+ if (hasAttribute(QString::fromLatin1("elementFormDefault"))) {
+ const QString value = readAttribute(QString::fromLatin1("elementFormDefault"));
+ if (value != QString::fromLatin1("qualified") && value != QString::fromLatin1("unqualified")) {
+ attributeContentError("elementFormDefault", "schema", value);
+ return;
+ }
+
+ m_elementFormDefault = value;
+ } else {
+ m_elementFormDefault = QString::fromLatin1("unqualified");
+ }
+
+ if (hasAttribute(QString::fromLatin1("blockDefault"))) {
+ const QString blockDefault = readAttribute(QString::fromLatin1("blockDefault"));
+ const QStringList blockDefaultList = blockDefault.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < blockDefaultList.count(); ++i) {
+ const QString value = blockDefaultList.at(i);
+ if (value != QString::fromLatin1("#all") &&
+ value != QString::fromLatin1("extension") &&
+ value != QString::fromLatin1("restriction") &&
+ value != QString::fromLatin1("substitution")) {
+ attributeContentError("blockDefault", "schema", value);
+ return;
+ }
+ }
+
+ m_blockDefault = blockDefault;
+ }
+
+ if (hasAttribute(QString::fromLatin1("finalDefault"))) {
+ const QString finalDefault = readAttribute(QString::fromLatin1("finalDefault"));
+ const QStringList finalDefaultList = finalDefault.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < finalDefaultList.count(); ++i) {
+ const QString value = finalDefaultList.at(i);
+ if (value != QString::fromLatin1("#all") &&
+ value != QString::fromLatin1("extension") &&
+ value != QString::fromLatin1("restriction") &&
+ value != QString::fromLatin1("list") &&
+ value != QString::fromLatin1("union")) {
+ attributeContentError("finalDefault", "schema", value);
+ return;
+ }
+ }
+
+ m_finalDefault = finalDefault;
+ }
+
+ if (hasAttribute(QString::fromLatin1("xpathDefaultNamespace"))) {
+ const QString xpathDefaultNamespace = readAttribute(QString::fromLatin1("xpathDefaultNamespace"));
+ if (xpathDefaultNamespace != QString::fromLatin1("##defaultNamespace") &&
+ xpathDefaultNamespace != QString::fromLatin1("##targetNamespace") &&
+ xpathDefaultNamespace != QString::fromLatin1("##local")) {
+ if (!isValidUri(xpathDefaultNamespace)) {
+ attributeContentError("xpathDefaultNamespace", "schema", xpathDefaultNamespace);
+ return;
+ }
+ }
+ m_xpathDefaultNamespace = xpathDefaultNamespace;
+ } else {
+ m_xpathDefaultNamespace = QString::fromLatin1("##local");
+ }
+
+ if (hasAttribute(QString::fromLatin1("defaultAttributes"))) {
+ const QString attrGroupName = readQNameAttribute(QString::fromLatin1("defaultAttributes"), "schema");
+ convertName(attrGroupName, NamespaceSupport::ElementName, m_defaultAttributes); // translate qualified name into QXmlName
+ }
+
+ if (hasAttribute(QString::fromLatin1("version"))) {
+ const QString version = readAttribute(QString::fromLatin1("version"));
+ }
+
+ if (hasAttribute(CommonNamespaces::XML, QString::fromLatin1("lang"))) {
+ const QString value = readAttribute(QString::fromLatin1("lang"), CommonNamespaces::XML);
+
+ const QRegExp exp(QString::fromLatin1("[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"));
+ if (!exp.exactMatch(value)) {
+ attributeContentError("xml:lang", "schema", value);
+ return;
+ }
+ }
+
+ validateIdAttribute("schema");
+
+ TagValidationHandler tagValidator(XsdTagScope::Schema, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Include, token, namespaceToken)) {
+ parseInclude();
+ } else if (isSchemaTag(XsdSchemaToken::Import, token, namespaceToken)) {
+ parseImport();
+ } else if (isSchemaTag(XsdSchemaToken::Redefine, token, namespaceToken)) {
+ parseRedefine();
+ } else if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ m_schema->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::DefaultOpenContent, token, namespaceToken)) {
+ parseDefaultOpenContent();
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ const XsdSimpleType::Ptr type = parseGlobalSimpleType();
+ addType(type);
+ } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) {
+ const XsdComplexType::Ptr type = parseGlobalComplexType();
+ addType(type);
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdModelGroup::Ptr group = parseNamedGroup();
+ addElementGroup(group);
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ XsdAttributeGroup::Ptr attributeGroup = parseNamedAttributeGroup();
+ addAttributeGroup(attributeGroup);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdElement::Ptr element = parseGlobalElement();
+ addElement(element);
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttribute::Ptr attribute = parseGlobalAttribute();
+ addAttribute(attribute);
+ } else if (isSchemaTag(XsdSchemaToken::Notation, token, namespaceToken)) {
+ const XsdNotation::Ptr notation = parseNotation();
+ addNotation(notation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ m_schema->setTargetNamespace(m_targetNamespace);
+}
+
+void XsdSchemaParser::parseInclude()
+{
+ Q_ASSERT(isStartElement() && XsdSchemaToken::toToken(name()) == XsdSchemaToken::Include &&
+ XsdSchemaToken::toToken(namespaceUri()) == XsdSchemaToken::XML_NS_SCHEMA_URI);
+
+ validateElement(XsdTagScope::Include);
+
+ // parse attributes
+ const QString schemaLocation = readAttribute(QString::fromLatin1("schemaLocation"));
+
+ QUrl url(schemaLocation);
+ if (url.isRelative()) {
+ Q_ASSERT(m_documentURI.isValid());
+
+ url = m_documentURI.resolved(url);
+ }
+
+ if (m_includedSchemas.contains(url)) {
+ // we have included that file already, according to the schema spec we are
+ // allowed to silently skip it.
+ } else {
+ m_includedSchemas.insert(url);
+
+ const AutoPtr<QNetworkReply> reply(AccelTreeResourceLoader::load(url, m_context->networkAccessManager(),
+ m_context, AccelTreeResourceLoader::ContinueOnError));
+ if (reply) {
+ // parse the included schema by a different parser but with the same context
+ XsdSchemaParser parser(m_context, m_parserContext, reply.data());
+ parser.setDocumentURI(url);
+ parser.setTargetNamespaceExtended(m_targetNamespace);
+ parser.setIncludedSchemas(m_includedSchemas);
+ parser.setImportedSchemas(m_importedSchemas);
+ parser.setRedefinedSchemas(m_redefinedSchemas);
+ if (!parser.parse(XsdSchemaParser::IncludeParser))
+ return;
+ }
+ }
+
+ validateIdAttribute("include");
+
+ TagValidationHandler tagValidator(XsdTagScope::Include, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ m_schema->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseImport()
+{
+ Q_ASSERT(isStartElement() && XsdSchemaToken::toToken(name()) == XsdSchemaToken::Import &&
+ XsdSchemaToken::toToken(namespaceUri()) == XsdSchemaToken::XML_NS_SCHEMA_URI);
+
+ validateElement(XsdTagScope::Import);
+
+ // parse attributes
+ QString importNamespace;
+ if (hasAttribute(QString::fromLatin1("namespace"))) {
+ importNamespace = readAttribute(QString::fromLatin1("namespace"));
+ if (importNamespace == m_targetNamespace) {
+ error(QtXmlPatterns::tr("%1 element is not allowed to have the same %2 attribute value as the target namespace %3")
+ .arg(formatElement("import"))
+ .arg(formatAttribute("namespace"))
+ .arg(formatURI(m_targetNamespace)));
+ return;
+ }
+ } else {
+ if (m_targetNamespace.isEmpty()) {
+ error(QtXmlPatterns::tr("%1 element without %2 attribute is not allowed inside schema without target namespace")
+ .arg(formatElement("import"))
+ .arg(formatAttribute("namespace")));
+ return;
+ }
+ }
+
+ if (hasAttribute(QString::fromLatin1("schemaLocation"))) {
+ const QString schemaLocation = readAttribute(QString::fromLatin1("schemaLocation"));
+
+ QUrl url(schemaLocation);
+ if (url.isRelative()) {
+ Q_ASSERT(m_documentURI.isValid());
+
+ url = m_documentURI.resolved(url);
+ }
+
+ if (m_importedSchemas.contains(url)) {
+ // we have imported that file already, according to the schema spec we are
+ // allowed to silently skip it.
+ } else {
+ m_importedSchemas.insert(url);
+
+ // as it is possible that well known schemas (e.g. XSD for XML) are only referenced by
+ // namespace we should add it as well
+ m_importedSchemas.insert(importNamespace);
+
+ AutoPtr<QNetworkReply> reply(AccelTreeResourceLoader::load(url, m_context->networkAccessManager(),
+ m_context, AccelTreeResourceLoader::ContinueOnError));
+ if (reply) {
+ // parse the included schema by a different parser but with the same context
+ XsdSchemaParser parser(m_context, m_parserContext, reply.data());
+ parser.setDocumentURI(url);
+ parser.setTargetNamespace(importNamespace);
+ parser.setIncludedSchemas(m_includedSchemas);
+ parser.setImportedSchemas(m_importedSchemas);
+ parser.setRedefinedSchemas(m_redefinedSchemas);
+ if (!parser.parse(XsdSchemaParser::ImportParser))
+ return;
+ }
+ }
+ } else {
+ // check whether it is a known namespace we have a builtin schema for
+ if (!importNamespace.isEmpty()) {
+ if (!m_importedSchemas.contains(importNamespace)) {
+ m_importedSchemas.insert(importNamespace);
+
+ QFile file(QString::fromLatin1(":") + importNamespace);
+ if (file.open(QIODevice::ReadOnly)) {
+ XsdSchemaParser parser(m_context, m_parserContext, &file);
+ parser.setDocumentURI(importNamespace);
+ parser.setTargetNamespace(importNamespace);
+ parser.setIncludedSchemas(m_includedSchemas);
+ parser.setImportedSchemas(m_importedSchemas);
+ parser.setRedefinedSchemas(m_redefinedSchemas);
+ if (!parser.parse(XsdSchemaParser::ImportParser))
+ return;
+ }
+ }
+ } else {
+ // we don't import anything... that is valid according to the schema
+ }
+ }
+
+ validateIdAttribute("import");
+
+ TagValidationHandler tagValidator(XsdTagScope::Import, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ m_schema->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseRedefine()
+{
+ Q_ASSERT(isStartElement() && XsdSchemaToken::toToken(name()) == XsdSchemaToken::Redefine &&
+ XsdSchemaToken::toToken(namespaceUri()) == XsdSchemaToken::XML_NS_SCHEMA_URI);
+
+ validateElement(XsdTagScope::Redefine);
+
+ // parse attributes
+ validateIdAttribute("redefine");
+
+ const QString schemaLocation = readAttribute(QString::fromLatin1("schemaLocation"));
+
+ TagValidationHandler tagValidator(XsdTagScope::Redefine, this, m_namePool);
+
+ XsdSimpleType::List redefinedSimpleTypes;
+ XsdComplexType::List redefinedComplexTypes;
+ XsdModelGroup::List redefinedGroups;
+ XsdAttributeGroup::List redefinedAttributeGroups;
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ m_schema->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ const XsdSimpleType::Ptr type = parseGlobalSimpleType();
+ redefinedSimpleTypes.append(type);
+
+ const QXmlName baseTypeName = m_parserContext->resolver()->baseTypeNameOfType(type);
+ if (baseTypeName != type->name(m_namePool)) {
+ error(QString::fromLatin1("redefined simple type %1 must have itself as base type").arg(formatType(m_namePool, type)));
+ return;
+ }
+ } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) {
+ const XsdComplexType::Ptr type = parseGlobalComplexType();
+ redefinedComplexTypes.append(type);
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#src-redefine
+
+ // 5
+ const QXmlName baseTypeName = m_parserContext->resolver()->baseTypeNameOfType(type);
+ if (baseTypeName != type->name(m_namePool)) {
+ error(QString::fromLatin1("redefined complex type %1 must have itself as base type").arg(formatType(m_namePool, type)));
+ return;
+ }
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdModelGroup::Ptr group = parseNamedGroup();
+ redefinedGroups.append(group);
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeGroup::Ptr group = parseNamedAttributeGroup();
+ redefinedAttributeGroups.append(group);
+
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ bool locationMustResolve = false;
+ if (!redefinedSimpleTypes.isEmpty() || !redefinedComplexTypes.isEmpty() ||
+ !redefinedGroups.isEmpty() || !redefinedAttributeGroups.isEmpty()) {
+ locationMustResolve = true;
+ }
+
+ QUrl url(schemaLocation);
+ if (url.isRelative()) {
+ Q_ASSERT(m_documentURI.isValid());
+
+ url = m_documentURI.resolved(url);
+ }
+
+ // we parse the schema given in the redefine tag into its own context
+ const XsdSchemaParserContext::Ptr redefinedContext(new XsdSchemaParserContext(m_namePool, m_context));
+
+ if (m_redefinedSchemas.contains(url)) {
+ // we have redefined that file already, according to the schema spec we are
+ // allowed to silently skip it.
+ } else {
+ m_redefinedSchemas.insert(url);
+ QNetworkReply *reply = AccelTreeResourceLoader::load(url, m_context->networkAccessManager(),
+ m_context,
+ (locationMustResolve ? AccelTreeResourceLoader::FailOnError : AccelTreeResourceLoader::ContinueOnError));
+ if (reply) {
+ // parse the included schema by a different parser but with the same context
+ XsdSchemaParser parser(m_context, redefinedContext, reply);
+ parser.setDocumentURI(url);
+ parser.setTargetNamespaceExtended(m_targetNamespace);
+ parser.setIncludedSchemas(m_includedSchemas);
+ parser.setImportedSchemas(m_importedSchemas);
+ parser.setRedefinedSchemas(m_redefinedSchemas);
+ if (!parser.parse(XsdSchemaParser::RedefineParser))
+ return;
+
+ delete reply;
+ }
+ }
+
+ XsdSimpleType::List contextSimpleTypes = redefinedContext->schema()->simpleTypes();
+ XsdComplexType::List contextComplexTypes = redefinedContext->schema()->complexTypes();
+ XsdModelGroup::List contextGroups = redefinedContext->schema()->elementGroups();
+ XsdAttributeGroup::List contextAttributeGroups = redefinedContext->schema()->attributeGroups();
+
+ // now we do the actual redefinition:
+
+ // iterate over all redefined simple types
+ for (int i = 0; i < redefinedSimpleTypes.count(); ++i) {
+ XsdSimpleType::Ptr redefinedType = redefinedSimpleTypes.at(i);
+
+ //TODONEXT: validation
+
+ // search the definition they override in the context types
+ bool found = false;
+ for (int j = 0; j < contextSimpleTypes.count(); ++j) {
+ XsdSimpleType::Ptr contextType = contextSimpleTypes.at(j);
+
+ if (redefinedType->name(m_namePool) == contextType->name(m_namePool)) { // we found the right type
+ found = true;
+
+ // 1) set name of context type to empty name
+ contextType->setName(m_parserContext->createAnonymousName(QString()));
+
+ // 2) set the context type as base type for the redefined type
+ redefinedType->setWxsSuperType(contextType);
+
+ // 3) remove the base type resolving job from the resolver as
+ // we have set the base type here explicitely
+ m_parserContext->resolver()->removeSimpleRestrictionBase(redefinedType);
+
+ // 4) add the redefined type to the schema
+ addType(redefinedType);
+
+ // 5) add the context type as anonymous type, so the resolver
+ // can resolve it further.
+ addAnonymousType(contextType);
+
+ // 6) remove the context type from the list
+ contextSimpleTypes.removeAt(j);
+
+ break;
+ }
+ }
+
+ if (!found) {
+ error(QString::fromLatin1("no matching type found to redefine simple type %1").arg(formatType(m_namePool, redefinedType)));
+ return;
+ }
+ }
+
+ // add all remaining context simple types to the schema
+ for (int i = 0; i < contextSimpleTypes.count(); ++i) {
+ addType(contextSimpleTypes.at(i));
+ }
+
+ // iterate over all redefined complex types
+ for (int i = 0; i < redefinedComplexTypes.count(); ++i) {
+ XsdComplexType::Ptr redefinedType = redefinedComplexTypes.at(i);
+
+ //TODONEXT: validation
+
+ // search the definition they override in the context types
+ bool found = false;
+ for (int j = 0; j < contextComplexTypes.count(); ++j) {
+ XsdComplexType::Ptr contextType = contextComplexTypes.at(j);
+
+ if (redefinedType->name(m_namePool) == contextType->name(m_namePool)) { // we found the right type
+ found = true;
+
+ // 1) set name of context type to empty name
+ contextType->setName(m_parserContext->createAnonymousName(QString()));
+
+ // 2) set the context type as base type for the redefined type
+ redefinedType->setWxsSuperType(contextType);
+
+ // 3) remove the base type resolving job from the resolver as
+ // we have set the base type here explicitely
+ m_parserContext->resolver()->removeComplexBaseType(redefinedType);
+
+ // 4) add the redefined type to the schema
+ addType(redefinedType);
+
+ // 5) add the context type as anonymous type, so the resolver
+ // can resolve its attribute uses etc.
+ addAnonymousType(contextType);
+
+ // 6) remove the context type from the list
+ contextComplexTypes.removeAt(j);
+
+ break;
+ }
+ }
+
+ if (!found) {
+ error(QString::fromLatin1("no matching type found to redefine complex type %1").arg(formatType(m_namePool, redefinedType)));
+ return;
+ }
+ }
+
+ // iterate over all redefined element groups
+ for (int i = 0; i < redefinedGroups.count(); ++i) {
+ const XsdModelGroup::Ptr group(redefinedGroups.at(i));
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#src-redefine
+
+ // 6
+ const XsdParticle::List particles = collectGroupRef(group);
+ XsdParticle::Ptr referencedParticle;
+ int sameNameCounter = 0;
+ for (int i = 0; i < particles.count(); ++i) {
+ const XsdReference::Ptr ref(particles.at(i)->term());
+ if (ref->referenceName() == group->name(m_namePool)) {
+ referencedParticle = particles.at(i);
+
+ if (referencedParticle->minimumOccurs() != 1 || referencedParticle->maximumOccurs() != 1 || referencedParticle->maximumOccursUnbounded()) { // 6.1.2
+ error(QString::fromLatin1("redefined group %1 can not contain reference to itself with minOccurs or maxOccurs != 1").arg(formatKeyword(group->displayName(m_namePool))));
+ return;
+ }
+ sameNameCounter++;
+ }
+ }
+
+ // 6.1.1
+ if (sameNameCounter > 1) {
+ error(QString::fromLatin1("redefined group %1 can not contain multiple references to itself").arg(formatKeyword(group->displayName(m_namePool))));
+ return;
+ }
+
+ // search the group definition in the included schema (S2)
+ XsdModelGroup::Ptr contextGroup;
+ for (int j = 0; j < contextGroups.count(); ++j) {
+ if (group->name(m_namePool) == contextGroups.at(j)->name(m_namePool)) {
+ contextGroup = contextGroups.at(j);
+ break;
+ }
+ }
+
+ if (!contextGroup) { // 6.2.1
+ error(QString::fromLatin1("redefined group %1 has no occurrence in included schema").arg(formatKeyword(group->displayName(m_namePool))));
+ return;
+ }
+
+ if (sameNameCounter == 1) {
+ // there was a self reference in the redefined group, so use the
+ // group from the included schema
+
+ // set a anonymous name to the group of the included schema
+ contextGroup->setName(m_parserContext->createAnonymousName(m_namePool->stringForNamespace(contextGroup->name(m_namePool).namespaceURI())));
+
+ // replace the self-reference with the group from the included schema
+ referencedParticle->setTerm(contextGroup);
+
+ addElementGroup(group);
+
+ addElementGroup(contextGroup);
+ contextGroups.removeAll(contextGroup);
+ } else {
+ // there was no self reference in the redefined group
+
+ // just add the redefined group...
+ addElementGroup(group);
+
+ // we have to add them, otherwise it is not resolved and we can't validate it later
+ contextGroup->setName(m_parserContext->createAnonymousName(m_namePool->stringForNamespace(contextGroup->name(m_namePool).namespaceURI())));
+ addElementGroup(contextGroup);
+
+ m_schemaResolver->addRedefinedGroups(group, contextGroup);
+
+ // ...and forget about the group from the included schema
+ contextGroups.removeAll(contextGroup);
+ }
+ }
+
+ // iterate over all redefined attribute groups
+ for (int i = 0; i < redefinedAttributeGroups.count(); ++i) {
+ const XsdAttributeGroup::Ptr group(redefinedAttributeGroups.at(i));
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#src-redefine
+
+ // 7
+
+ // 7.1
+ int sameNameCounter = 0;
+ for (int j = 0; j < group->attributeUses().count(); ++j) {
+ const XsdAttributeUse::Ptr attributeUse(group->attributeUses().at(j));
+ if (attributeUse->isReference()) {
+ const XsdAttributeReference::Ptr reference(attributeUse);
+ if (reference->type() == XsdAttributeReference::AttributeGroup) {
+ if (group->name(m_namePool) == reference->referenceName())
+ sameNameCounter++;
+ }
+ }
+ }
+ if (sameNameCounter > 1) {
+ error(QString::fromLatin1("redefined attribute group %1 can not contain multiple references to itself").arg(formatKeyword(group->displayName(m_namePool))));
+ return;
+ }
+
+ // search the attribute group definition in the included schema (S2)
+ XsdAttributeGroup::Ptr baseGroup;
+ for (int j = 0; j < contextAttributeGroups.count(); ++j) {
+ const XsdAttributeGroup::Ptr contextGroup(contextAttributeGroups.at(j));
+ if (group->name(m_namePool) == contextGroup->name(m_namePool)) {
+ baseGroup = contextGroup;
+ break;
+ }
+ }
+
+ if (!baseGroup) { // 7.2.1
+ error(QString::fromLatin1("redefined attribute group %1 has no occurrence in included schema").arg(formatKeyword(group->displayName(m_namePool))));
+ return;
+ }
+
+ if (sameNameCounter == 1) {
+
+ // first set an anonymous name to the attribute group from the included
+ // schema
+ baseGroup->setName(m_parserContext->createAnonymousName(m_namePool->stringForNamespace(baseGroup->name(m_namePool).namespaceURI())));
+
+ // iterate over the attribute uses of the redefined attribute group
+ // and replace the self-reference with the attribute group from the
+ // included schema
+ for (int j = 0; j < group->attributeUses().count(); ++j) {
+ const XsdAttributeUse::Ptr attributeUse(group->attributeUses().at(j));
+ if (attributeUse->isReference()) {
+ const XsdAttributeReference::Ptr reference(attributeUse);
+ if (reference->type() == XsdAttributeReference::AttributeGroup) {
+ if (group->name(m_namePool) == reference->referenceName()) {
+ reference->setReferenceName(baseGroup->name(m_namePool));
+ break;
+ }
+ }
+ }
+ }
+
+ // add both groups to the target schema
+ addAttributeGroup(baseGroup);
+ addAttributeGroup(group);
+
+ contextAttributeGroups.removeAll(baseGroup);
+ }
+
+ if (sameNameCounter == 0) { // 7.2
+
+ // we have to add them, otherwise it is not resolved and we can't validate it later
+ baseGroup->setName(m_parserContext->createAnonymousName(m_namePool->stringForNamespace(baseGroup->name(m_namePool).namespaceURI())));
+ addAttributeGroup(baseGroup);
+
+ m_schemaResolver->addRedefinedAttributeGroups(group, baseGroup);
+
+ // just add the redefined attribute group to the target schema...
+ addAttributeGroup(group);
+
+ // ... and forget about the one from the included schema
+ contextAttributeGroups.removeAll(baseGroup);
+ }
+ }
+
+ // add all remaining context complex types to the schema
+ for (int i = 0; i < contextComplexTypes.count(); ++i) {
+ addType(contextComplexTypes.at(i));
+ }
+
+ // add all remaining context element groups to the schema
+ for (int i = 0; i < contextGroups.count(); ++i) {
+ addElementGroup(contextGroups.at(i));
+ }
+
+ // add all remaining context attribute groups to the schema
+ for (int i = 0; i < contextAttributeGroups.count(); ++i) {
+ addAttributeGroup(contextAttributeGroups.at(i));
+ }
+
+ // copy all elements, attributes and notations
+ const XsdElement::List contextElements = redefinedContext->schema()->elements();
+ for (int i = 0; i < contextElements.count(); ++i) {
+ addElement(contextElements.at(i));
+ }
+
+ const XsdAttribute::List contextAttributes = redefinedContext->schema()->attributes();
+ for (int i = 0; i < contextAttributes.count(); ++i) {
+ addAttribute(contextAttributes.at(i));
+ }
+
+ const XsdNotation::List contextNotations = redefinedContext->schema()->notations();
+ for (int i = 0; i < contextNotations.count(); ++i) {
+ addNotation(contextNotations.at(i));
+ }
+
+ // push all data to resolve from the context resolver to our resolver
+ redefinedContext->resolver()->copyDataTo(m_parserContext->resolver());
+
+ tagValidator.finalize();
+}
+
+XsdAnnotation::Ptr XsdSchemaParser::parseAnnotation()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Annotation, this);
+
+ validateElement(XsdTagScope::Annotation);
+
+ // parse attributes
+ validateIdAttribute("annotation");
+
+ TagValidationHandler tagValidator(XsdTagScope::Annotation, this, m_namePool);
+
+ const XsdAnnotation::Ptr annotation(new XsdAnnotation());
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Appinfo, token, namespaceToken)) {
+ const XsdApplicationInformation::Ptr info = parseAppInfo();
+ annotation->addApplicationInformation(info);
+ } else if (isSchemaTag(XsdSchemaToken::Documentation, token, namespaceToken)) {
+ const XsdDocumentation::Ptr documentation = parseDocumentation();
+ annotation->addDocumentation(documentation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return annotation;
+}
+
+XsdApplicationInformation::Ptr XsdSchemaParser::parseAppInfo()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Appinfo, this);
+
+ validateElement(XsdTagScope::AppInfo);
+
+ const XsdApplicationInformation::Ptr info(new XsdApplicationInformation());
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("source"))) {
+ const QString value = readAttribute(QString::fromLatin1("source"));
+
+ if (!isValidUri(value)) {
+ attributeContentError("source", "appinfo", value, BuiltinTypes::xsAnyURI);
+ return info;
+ }
+
+ if (!value.isEmpty()) {
+ const AnyURI::Ptr source = AnyURI::fromLexical(value);
+ info->setSource(source);
+ }
+ }
+
+ while (!atEnd()) { //EVAL: can be anything... what to do?
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ parseUnknownDocumentation();
+ }
+
+ return info;
+}
+
+XsdDocumentation::Ptr XsdSchemaParser::parseDocumentation()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Documentation, this);
+
+ validateElement(XsdTagScope::Documentation);
+
+ const XsdDocumentation::Ptr documentation(new XsdDocumentation());
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("source"))) {
+ const QString value = readAttribute(QString::fromLatin1("source"));
+
+ if (!isValidUri(value)) {
+ attributeContentError("source", "documentation", value, BuiltinTypes::xsAnyURI);
+ return documentation;
+ }
+
+ if (!value.isEmpty()) {
+ const AnyURI::Ptr source = AnyURI::fromLexical(value);
+ documentation->setSource(source);
+ }
+ }
+
+ if (hasAttribute(CommonNamespaces::XML, QString::fromLatin1("lang"))) {
+ const QString value = readAttribute(QString::fromLatin1("lang"), CommonNamespaces::XML);
+
+ const QRegExp exp(QString::fromLatin1("[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"));
+ if (!exp.exactMatch(value)) {
+ attributeContentError("xml:lang", "documentation", value);
+ return documentation;
+ }
+ }
+
+ while (!atEnd()) { //EVAL: can by any... what to do?
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ parseUnknownDocumentation();
+ }
+
+ return documentation;
+}
+
+void XsdSchemaParser::parseDefaultOpenContent()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::DefaultOpenContent, this);
+
+ validateElement(XsdTagScope::DefaultOpenContent);
+
+ m_defaultOpenContent = XsdComplexType::OpenContent::Ptr(new XsdComplexType::OpenContent());
+
+ if (hasAttribute(QString::fromLatin1("appliesToEmpty"))) {
+ const QString value = readAttribute(QString::fromLatin1("appliesToEmpty"));
+ const Boolean::Ptr appliesToEmpty = Boolean::fromLexical(value);
+ if (appliesToEmpty->hasError()) {
+ attributeContentError("appliesToEmpty", "defaultOpenContent", value, BuiltinTypes::xsBoolean);
+ return;
+ }
+
+ m_defaultOpenContentAppliesToEmpty = appliesToEmpty->as<Boolean>()->value();
+ } else {
+ m_defaultOpenContentAppliesToEmpty = false;
+ }
+
+ if (hasAttribute(QString::fromLatin1("mode"))) {
+ const QString mode = readAttribute(QString::fromLatin1("mode"));
+
+ if (mode == QString::fromLatin1("interleave")) {
+ m_defaultOpenContent->setMode(XsdComplexType::OpenContent::Interleave);
+ } else if (mode == QString::fromLatin1("suffix")) {
+ m_defaultOpenContent->setMode(XsdComplexType::OpenContent::Suffix);
+ } else {
+ attributeContentError("mode", "defaultOpenContent", mode);
+ return;
+ }
+ } else {
+ m_defaultOpenContent->setMode(XsdComplexType::OpenContent::Interleave);
+ }
+
+ validateIdAttribute("defaultOpenContent");
+
+ TagValidationHandler tagValidator(XsdTagScope::DefaultOpenContent, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ m_defaultOpenContent->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Any, token, namespaceToken)) {
+ const XsdParticle::Ptr particle;
+ const XsdWildcard::Ptr wildcard = parseAny(particle);
+ m_defaultOpenContent->setWildcard(wildcard);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+XsdSimpleType::Ptr XsdSchemaParser::parseGlobalSimpleType()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::SimpleType, this);
+
+ validateElement(XsdTagScope::GlobalSimpleType);
+
+ const XsdSimpleType::Ptr simpleType(new XsdSimpleType());
+ simpleType->setCategory(XsdSimpleType::SimpleTypeAtomic); // just to make sure it's not invalid
+
+ // parse attributes
+ const SchemaType::DerivationConstraints allowedConstraints(SchemaType::ExtensionConstraint | SchemaType::RestrictionConstraint | SchemaType::ListConstraint | SchemaType::UnionConstraint);
+ simpleType->setDerivationConstraints(readDerivationConstraintAttribute(allowedConstraints, "simpleType"));
+
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("simpleType"));
+ simpleType->setName(objectName);
+
+ validateIdAttribute("simpleType");
+
+ TagValidationHandler tagValidator(XsdTagScope::GlobalSimpleType, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ simpleType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Restriction, token, namespaceToken)) {
+ parseSimpleRestriction(simpleType);
+ } else if (isSchemaTag(XsdSchemaToken::List, token, namespaceToken)) {
+ parseList(simpleType);
+ } else if (isSchemaTag(XsdSchemaToken::Union, token, namespaceToken)) {
+ parseUnion(simpleType);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return simpleType;
+}
+
+XsdSimpleType::Ptr XsdSchemaParser::parseLocalSimpleType()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::SimpleType, this);
+
+ validateElement(XsdTagScope::LocalSimpleType);
+
+ const XsdSimpleType::Ptr simpleType(new XsdSimpleType());
+ simpleType->setCategory(XsdSimpleType::SimpleTypeAtomic); // just to make sure it's not invalid
+ simpleType->setName(m_parserContext->createAnonymousName(m_targetNamespace));
+
+ validateIdAttribute("simpleType");
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalSimpleType, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ simpleType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Restriction, token, namespaceToken)) {
+ parseSimpleRestriction(simpleType);
+ } else if (isSchemaTag(XsdSchemaToken::List, token, namespaceToken)) {
+ parseList(simpleType);
+ } else if (isSchemaTag(XsdSchemaToken::Union, token, namespaceToken)) {
+ parseUnion(simpleType);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return simpleType;
+}
+
+void XsdSchemaParser::parseSimpleRestriction(const XsdSimpleType::Ptr &ptr)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Restriction, this);
+
+ validateElement(XsdTagScope::SimpleRestriction);
+
+ ptr->setDerivationMethod(XsdSimpleType::DerivationRestriction);
+
+ // The base attribute and simpleType member are mutually exclusive,
+ // so we keep track of that
+ bool hasBaseAttribute = false;
+ bool hasBaseTypeSpecified = false;
+
+ QXmlName baseName;
+ if (hasAttribute(QString::fromLatin1("base"))) {
+ const QString base = readQNameAttribute(QString::fromLatin1("base"), "restriction");
+ convertName(base, NamespaceSupport::ElementName, baseName); // translate qualified name into QXmlName
+ m_schemaResolver->addSimpleRestrictionBase(ptr, baseName, currentSourceLocation()); // add to resolver
+
+ hasBaseAttribute = true;
+ hasBaseTypeSpecified = true;
+ }
+ validateIdAttribute("restriction");
+
+ XsdFacet::Hash facets;
+ QList<XsdFacet::Ptr> patternFacets;
+ QList<XsdFacet::Ptr> enumerationFacets;
+ QList<XsdFacet::Ptr> assertionFacets;
+
+ TagValidationHandler tagValidator(XsdTagScope::SimpleRestriction, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ ptr->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ if (hasBaseAttribute) {
+ error(QtXmlPatterns::tr("%1 element is not allowed inside %2 element if %3 attribute is present")
+ .arg(formatElement("simpleType"))
+ .arg(formatElement("restriction"))
+ .arg(formatAttribute("base")));
+ return;
+ }
+
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(ptr);
+ ptr->setWxsSuperType(type);
+ ptr->setCategory(type->category());
+ hasBaseTypeSpecified = true;
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+ } else if (isSchemaTag(XsdSchemaToken::MinExclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMinExclusiveFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::MinInclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMinInclusiveFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::MaxExclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMaxExclusiveFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::MaxInclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMaxInclusiveFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::TotalDigits, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseTotalDigitsFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::FractionDigits, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseFractionDigitsFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::Length, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseLengthFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::MinLength, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMinLengthFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::MaxLength, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMaxLengthFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::Enumeration, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseEnumerationFacet();
+ enumerationFacets.append(facet);
+ } else if (isSchemaTag(XsdSchemaToken::WhiteSpace, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseWhiteSpaceFacet();
+ addFacet(facet, facets, ptr);
+ } else if (isSchemaTag(XsdSchemaToken::Pattern, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parsePatternFacet();
+ patternFacets.append(facet);
+ } else if (isSchemaTag(XsdSchemaToken::Assertion, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseAssertionFacet();
+ assertionFacets.append(facet);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!hasBaseTypeSpecified) {
+ error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element")
+ .arg(formatElement("restriction"))
+ .arg(formatAttribute("base"))
+ .arg(formatElement("simpleType")));
+ return;
+ }
+
+ // merge all pattern facets into one multi value facet
+ if (!patternFacets.isEmpty()) {
+ const XsdFacet::Ptr patternFacet(new XsdFacet());
+ patternFacet->setType(XsdFacet::Pattern);
+
+ AtomicValue::List multiValue;
+ for (int i = 0; i < patternFacets.count(); ++i)
+ multiValue << patternFacets.at(i)->multiValue();
+
+ patternFacet->setMultiValue(multiValue);
+ addFacet(patternFacet, facets, ptr);
+ }
+
+ // merge all enumeration facets into one multi value facet
+ if (!enumerationFacets.isEmpty()) {
+ const XsdFacet::Ptr enumerationFacet(new XsdFacet());
+ enumerationFacet->setType(XsdFacet::Enumeration);
+
+ AtomicValue::List multiValue;
+ for (int i = 0; i < enumerationFacets.count(); ++i)
+ multiValue << enumerationFacets.at(i)->multiValue();
+
+ enumerationFacet->setMultiValue(multiValue);
+ addFacet(enumerationFacet, facets, ptr);
+ }
+
+ // merge all assertion facets into one facet
+ if (!assertionFacets.isEmpty()) {
+ const XsdFacet::Ptr assertionFacet(new XsdFacet());
+ assertionFacet->setType(XsdFacet::Assertion);
+
+ XsdAssertion::List assertions;
+ for (int i = 0; i < assertionFacets.count(); ++i)
+ assertions << assertionFacets.at(i)->assertions();
+
+ assertionFacet->setAssertions(assertions);
+ addFacet(assertionFacet, facets, ptr);
+ }
+
+ ptr->setFacets(facets);
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseList(const XsdSimpleType::Ptr &ptr)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::List, this);
+
+ validateElement(XsdTagScope::List);
+
+ ptr->setCategory(XsdSimpleType::SimpleTypeList);
+ ptr->setDerivationMethod(XsdSimpleType::DerivationList);
+ ptr->setWxsSuperType(BuiltinTypes::xsAnySimpleType);
+
+ // The itemType attribute and simpleType member are mutually exclusive,
+ // so we keep track of that
+ bool hasItemTypeAttribute = false;
+ bool hasItemTypeSpecified = false;
+
+ if (hasAttribute(QString::fromLatin1("itemType"))) {
+ const QString itemType = readQNameAttribute(QString::fromLatin1("itemType"), "list");
+ QXmlName typeName;
+ convertName(itemType, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addSimpleListType(ptr, typeName, currentSourceLocation()); // add to resolver
+
+ hasItemTypeAttribute = true;
+ hasItemTypeSpecified = true;
+ }
+
+ validateIdAttribute("list");
+
+ TagValidationHandler tagValidator(XsdTagScope::List, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ ptr->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ if (hasItemTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element is not allowed inside %2 element if %3 attribute is present")
+ .arg(formatElement("simpleType"))
+ .arg(formatElement("list"))
+ .arg(formatAttribute("itemType")));
+ return;
+ }
+
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(ptr);
+ ptr->setItemType(type);
+
+ hasItemTypeSpecified = true;
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!hasItemTypeSpecified) {
+ error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element")
+ .arg(formatElement("list"))
+ .arg(formatAttribute("itemType"))
+ .arg(formatElement("simpleType")));
+ return;
+ }
+
+ tagValidator.finalize();
+
+ // add the default white space facet that every simple type with list derivation has
+ const XsdFacet::Ptr defaultFacet(new XsdFacet());
+ defaultFacet->setType(XsdFacet::WhiteSpace);
+ defaultFacet->setFixed(true);
+ defaultFacet->setValue(DerivedString<TypeString>::fromLexical(m_namePool, XsdSchemaToken::toString(XsdSchemaToken::Collapse)));
+ XsdFacet::Hash facets;
+ facets.insert(defaultFacet->type(), defaultFacet);
+ ptr->setFacets(facets);
+}
+
+void XsdSchemaParser::parseUnion(const XsdSimpleType::Ptr &ptr)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Union, this);
+
+ validateElement(XsdTagScope::Union);
+
+ ptr->setCategory(XsdSimpleType::SimpleTypeUnion);
+ ptr->setDerivationMethod(XsdSimpleType::DerivationUnion);
+ ptr->setWxsSuperType(BuiltinTypes::xsAnySimpleType);
+
+ // The memberTypes attribute is not allowed to be empty,
+ // so we keep track of that
+ bool hasMemberTypesAttribute = false;
+ bool hasMemberTypesSpecified = false;
+
+ if (hasAttribute(QString::fromLatin1("memberTypes"))) {
+ hasMemberTypesAttribute = true;
+
+ const QStringList memberTypes = readAttribute(QString::fromLatin1("memberTypes")).split(QLatin1Char(' '), QString::SkipEmptyParts);
+ QList<QXmlName> typeNames;
+
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ QXmlName typeName;
+ convertName(memberTypes.at(i), NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ typeNames.append(typeName);
+ }
+
+ if (!typeNames.isEmpty()) {
+ m_schemaResolver->addSimpleUnionTypes(ptr, typeNames, currentSourceLocation()); // add to resolver
+ hasMemberTypesSpecified = true;
+ }
+ }
+
+ validateIdAttribute("union");
+
+ AnySimpleType::List memberTypes;
+
+ TagValidationHandler tagValidator(XsdTagScope::Union, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ ptr->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(ptr);
+ memberTypes.append(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!memberTypes.isEmpty()) {
+ ptr->setMemberTypes(memberTypes);
+ hasMemberTypesSpecified = true;
+ }
+
+ if (!hasMemberTypesSpecified) {
+ error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element")
+ .arg(formatElement("union"))
+ .arg(formatAttribute("memberTypes"))
+ .arg(formatElement("simpleType")));
+ return;
+ }
+
+ tagValidator.finalize();
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseMinExclusiveFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::MinExclusive, this);
+
+ validateElement(XsdTagScope::MinExclusiveFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::MinimumExclusive);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "minExclusive", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ // as minExclusive can have a value of type anySimpleType, we just read
+ // the string here and store it for later intepretation
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "minExclusive", value, BuiltinTypes::xsAnySimpleType);
+ return facet;
+ } else {
+ facet->setValue(string);
+ }
+
+ validateIdAttribute("minExclusive");
+
+ TagValidationHandler tagValidator(XsdTagScope::MinExclusiveFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseMinInclusiveFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::MinInclusive, this);
+
+ validateElement(XsdTagScope::MinInclusiveFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::MinimumInclusive);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "minInclusive", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ // as minInclusive can have a value of type anySimpleType, we just read
+ // the string here and store it for later intepretation
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "minInclusive", value, BuiltinTypes::xsAnySimpleType);
+ return facet;
+ } else {
+ facet->setValue(string);
+ }
+
+ validateIdAttribute("minInclusive");
+
+ TagValidationHandler tagValidator(XsdTagScope::MinInclusiveFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseMaxExclusiveFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::MaxExclusive, this);
+
+ validateElement(XsdTagScope::MaxExclusiveFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::MaximumExclusive);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "maxExclusive", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ // as maxExclusive can have a value of type anySimpleType, we just read
+ // the string here and store it for later intepretation
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "maxExclusive", value, BuiltinTypes::xsAnySimpleType);
+ return facet;
+ } else {
+ facet->setValue(string);
+ }
+
+ validateIdAttribute("maxExclusive");
+
+ TagValidationHandler tagValidator(XsdTagScope::MaxExclusiveFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseMaxInclusiveFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::MaxInclusive, this);
+
+ validateElement(XsdTagScope::MaxInclusiveFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::MaximumInclusive);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "maxInclusive", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ // as maxInclusive can have a value of type anySimpleType, we just read
+ // the string here and store it for later intepretation
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "maxInclusive", value, BuiltinTypes::xsAnySimpleType);
+ return facet;
+ } else {
+ facet->setValue(string);
+ }
+
+ validateIdAttribute("maxInclusive");
+
+ TagValidationHandler tagValidator(XsdTagScope::MaxInclusiveFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseTotalDigitsFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::TotalDigits, this);
+
+ validateElement(XsdTagScope::TotalDigitsFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::TotalDigits);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "totalDigits", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedInteger<TypePositiveInteger>::Ptr integer = DerivedInteger<TypePositiveInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("value", "totalDigits", value, BuiltinTypes::xsPositiveInteger);
+ return facet;
+ } else {
+ facet->setValue(integer);
+ }
+
+ validateIdAttribute("totalDigits");
+
+ TagValidationHandler tagValidator(XsdTagScope::TotalDigitsFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseFractionDigitsFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::FractionDigits, this);
+
+ validateElement(XsdTagScope::FractionDigitsFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::FractionDigits);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "fractionDigits", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedInteger<TypeNonNegativeInteger>::Ptr integer = DerivedInteger<TypeNonNegativeInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("value", "fractionDigits", value, BuiltinTypes::xsNonNegativeInteger);
+ return facet;
+ } else {
+ facet->setValue(integer);
+ }
+
+ validateIdAttribute("fractionDigits");
+
+ TagValidationHandler tagValidator(XsdTagScope::FractionDigitsFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseLengthFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Length, this);
+
+ validateElement(XsdTagScope::LengthFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::Length);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "length", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedInteger<TypeNonNegativeInteger>::Ptr integer = DerivedInteger<TypeNonNegativeInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("value", "length", value, BuiltinTypes::xsNonNegativeInteger);
+ return facet;
+ } else {
+ facet->setValue(integer);
+ }
+
+ validateIdAttribute("length");
+
+ TagValidationHandler tagValidator(XsdTagScope::LengthFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseMinLengthFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::MinLength, this);
+
+ validateElement(XsdTagScope::MinLengthFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::MinimumLength);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "minLength", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedInteger<TypeNonNegativeInteger>::Ptr integer = DerivedInteger<TypeNonNegativeInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("value", "minLength", value, BuiltinTypes::xsNonNegativeInteger);
+ return facet;
+ } else {
+ facet->setValue(integer);
+ }
+
+ validateIdAttribute("minLength");
+
+ TagValidationHandler tagValidator(XsdTagScope::MinLengthFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseMaxLengthFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::MaxLength, this);
+
+ validateElement(XsdTagScope::MaxLengthFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::MaximumLength);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "maxLength", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedInteger<TypeNonNegativeInteger>::Ptr integer = DerivedInteger<TypeNonNegativeInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("value", "maxLength", value, BuiltinTypes::xsNonNegativeInteger);
+ return facet;
+ } else {
+ facet->setValue(integer);
+ }
+
+ validateIdAttribute("maxLength");
+
+ TagValidationHandler tagValidator(XsdTagScope::MaxLengthFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseEnumerationFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Enumeration, this);
+
+ validateElement(XsdTagScope::EnumerationFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::Enumeration);
+
+ // parse attributes
+ facet->setFixed(false); // not defined in schema, but can't hurt
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+
+ // as enumeration can have a value of type anySimpleType, we just read
+ // the string here and store it for later intepretation
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "enumeration", value);
+ return facet;
+ } else {
+ AtomicValue::List multiValue;
+ multiValue << string;
+ facet->setMultiValue(multiValue);
+ }
+ m_schemaResolver->addEnumerationFacetValue(string, m_namespaceSupport);
+
+ validateIdAttribute("enumeration");
+
+ TagValidationHandler tagValidator(XsdTagScope::EnumerationFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseWhiteSpaceFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::WhiteSpace, this);
+
+ validateElement(XsdTagScope::WhiteSpaceFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::WhiteSpace);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ const Boolean::Ptr fixed = Boolean::fromLexical(value);
+ if (fixed->hasError()) {
+ attributeContentError("fixed", "whiteSpace", value, BuiltinTypes::xsBoolean);
+ return facet;
+ }
+
+ facet->setFixed(fixed->as<Boolean>()->value());
+ } else {
+ facet->setFixed(false); // the default value
+ }
+
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ if (value != XsdSchemaToken::toString(XsdSchemaToken::Collapse) &&
+ value != XsdSchemaToken::toString(XsdSchemaToken::Preserve) &&
+ value != XsdSchemaToken::toString(XsdSchemaToken::Replace)) {
+ attributeContentError("value", "whiteSpace", value);
+ return facet;
+ } else {
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "whiteSpace", value);
+ return facet;
+ } else {
+ facet->setValue(string);
+ }
+ }
+
+ validateIdAttribute("whiteSpace");
+
+ TagValidationHandler tagValidator(XsdTagScope::WhiteSpaceFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parsePatternFacet()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Pattern, this);
+
+ validateElement(XsdTagScope::PatternFacet);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::Pattern);
+
+ // parse attributes
+
+ // as pattern can have a value of type anySimpleType, we just read
+ // the string here and store it for later intepretation
+ const QString value = readAttribute(QString::fromLatin1("value"));
+ DerivedString<TypeString>::Ptr string = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ if (string->hasError()) {
+ attributeContentError("value", "pattern", value);
+ return facet;
+ } else {
+ AtomicValue::List multiValue;
+ multiValue << string;
+ facet->setMultiValue(multiValue);
+ }
+
+ validateIdAttribute("pattern");
+
+ TagValidationHandler tagValidator(XsdTagScope::PatternFacet, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ facet->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return facet;
+}
+
+XsdFacet::Ptr XsdSchemaParser::parseAssertionFacet()
+{
+ // this is just a wrapper function around the parseAssertion() method
+
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assertion, XsdTagScope::Assertion);
+
+ const XsdFacet::Ptr facet = XsdFacet::Ptr(new XsdFacet());
+ facet->setType(XsdFacet::Assertion);
+ facet->setAssertions(XsdAssertion::List() << assertion);
+
+ return facet;
+}
+
+XsdComplexType::Ptr XsdSchemaParser::parseGlobalComplexType()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::ComplexType, this);
+
+ validateElement(XsdTagScope::GlobalComplexType);
+
+ bool hasTypeSpecified = false;
+ bool hasComplexContent = false;
+
+ const XsdComplexType::Ptr complexType(new XsdComplexType());
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("abstract"))) {
+ const QString abstract = readAttribute(QString::fromLatin1("abstract"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(abstract);
+ if (value->hasError()) {
+ attributeContentError("abstract", "complexType", abstract, BuiltinTypes::xsBoolean);
+ return complexType;
+ }
+
+ complexType->setIsAbstract(value->as<Boolean>()->value());
+ } else {
+ complexType->setIsAbstract(false); // default value
+ }
+
+ complexType->setProhibitedSubstitutions(readBlockingConstraintAttribute(NamedSchemaComponent::ExtensionConstraint | NamedSchemaComponent::RestrictionConstraint, "complexType"));
+ complexType->setDerivationConstraints(readDerivationConstraintAttribute(SchemaType::ExtensionConstraint | SchemaType::RestrictionConstraint, "complexType"));
+
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("complexType"));
+ complexType->setName(objectName);
+
+ bool effectiveMixed = false;
+ if (hasAttribute(QString::fromLatin1("mixed"))) {
+ const QString mixed = readAttribute(QString::fromLatin1("mixed"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(mixed);
+ if (value->hasError()) {
+ attributeContentError("mixed", "complexType", mixed, BuiltinTypes::xsBoolean);
+ return complexType;
+ }
+
+ effectiveMixed = value->as<Boolean>()->value();
+ }
+
+ validateIdAttribute("complexType");
+
+ TagValidationHandler tagValidator(XsdTagScope::GlobalComplexType, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleContent, token, namespaceToken)) {
+ if (effectiveMixed) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("complexType"))
+ .arg(formatElement("simpleContent"))
+ .arg(formatAttribute("mixed")));
+ return complexType;
+ }
+
+ parseSimpleContent(complexType);
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::ComplexContent, token, namespaceToken)) {
+ bool mixed;
+ parseComplexContent(complexType, &mixed);
+ hasTypeSpecified = true;
+
+ effectiveMixed = (effectiveMixed || mixed);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::OpenContent, token, namespaceToken)) {
+ const XsdComplexType::OpenContent::Ptr openContent = parseOpenContent();
+ complexType->contentType()->setOpenContent(openContent);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::All, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalAll(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(complexType);
+ complexType->addAttributeUse(attributeUse);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ complexType->addAttributeUse(attributeUse);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ complexType->setAttributeWildcard(wildcard);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Assert, token, namespaceToken)) {
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assert, XsdTagScope::Assert);
+ complexType->addAssertion(assertion);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ if (!hasTypeSpecified) {
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ }
+
+ if (hasComplexContent == true) {
+ resolveComplexContentType(complexType, effectiveMixed);
+ }
+
+ return complexType;
+}
+
+XsdComplexType::Ptr XsdSchemaParser::parseLocalComplexType()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::ComplexType, this);
+
+ validateElement(XsdTagScope::LocalComplexType);
+
+ bool hasTypeSpecified = false;
+ bool hasComplexContent = true;
+
+ const XsdComplexType::Ptr complexType(new XsdComplexType());
+ complexType->setName(m_parserContext->createAnonymousName(m_targetNamespace));
+
+ // parse attributes
+ bool effectiveMixed = false;
+ if (hasAttribute(QString::fromLatin1("mixed"))) {
+ const QString mixed = readAttribute(QString::fromLatin1("mixed"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(mixed);
+ if (value->hasError()) {
+ attributeContentError("mixed", "complexType", mixed, BuiltinTypes::xsBoolean);
+ return complexType;
+ }
+
+ effectiveMixed = value->as<Boolean>()->value();
+ }
+
+ validateIdAttribute("complexType");
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalComplexType, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleContent, token, namespaceToken)) {
+ parseSimpleContent(complexType);
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::ComplexContent, token, namespaceToken)) {
+ bool mixed;
+ parseComplexContent(complexType, &mixed);
+ hasTypeSpecified = true;
+
+ effectiveMixed = (effectiveMixed || mixed);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::OpenContent, token, namespaceToken)) {
+ const XsdComplexType::OpenContent::Ptr openContent = parseOpenContent();
+ complexType->contentType()->setOpenContent(openContent);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::All, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalAll(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(complexType);
+ complexType->addAttributeUse(attributeUse);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ complexType->addAttributeUse(attributeUse);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ complexType->setAttributeWildcard(wildcard);
+
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Assert, token, namespaceToken)) {
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assert, XsdTagScope::Assert);
+ complexType->addAssertion(assertion);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ if (!hasTypeSpecified) {
+ complexType->setWxsSuperType(BuiltinTypes::xsAnyType);
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ hasComplexContent = true;
+ }
+
+ if (hasComplexContent == true) {
+ resolveComplexContentType(complexType, effectiveMixed);
+ }
+
+ return complexType;
+}
+
+void XsdSchemaParser::resolveComplexContentType(const XsdComplexType::Ptr &complexType, bool effectiveMixed)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#dcl.ctd.ctcc.common
+
+ // 1
+ // the effectiveMixed contains the effective mixed value
+
+ // 2
+ bool hasEmptyContent = false;
+ if (!complexType->contentType()->particle()) {
+ hasEmptyContent = true; // 2.1.1
+ } else {
+ if (complexType->contentType()->particle()->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr group = complexType->contentType()->particle()->term();
+ if (group->compositor() == XsdModelGroup::SequenceCompositor || group->compositor() == XsdModelGroup::AllCompositor) {
+ if (group->particles().isEmpty())
+ hasEmptyContent = true; // 2.1.2
+ } else if (group->compositor() == XsdModelGroup::ChoiceCompositor) {
+ if ((complexType->contentType()->particle()->minimumOccurs() == 0) && group->particles().isEmpty())
+ hasEmptyContent = true; // 2.1.3
+ }
+
+ if ((complexType->contentType()->particle()->maximumOccursUnbounded() == false) && (complexType->contentType()->particle()->maximumOccurs() == 0))
+ hasEmptyContent = true; // 2.1.4
+ }
+ }
+
+ const XsdParticle::Ptr explicitContent = (hasEmptyContent ? XsdParticle::Ptr() : complexType->contentType()->particle());
+
+ // do all the other work (3, 4, 5 and 6) in the resolver, as they need access to the base type object
+ m_schemaResolver->addComplexContentType(complexType, explicitContent, effectiveMixed);
+}
+
+void XsdSchemaParser::parseSimpleContent(const XsdComplexType::Ptr &complexType)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::SimpleContent, this);
+
+ validateElement(XsdTagScope::SimpleContent);
+
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::Simple);
+
+ // parse attributes
+ validateIdAttribute("simpleContent");
+
+ TagValidationHandler tagValidator(XsdTagScope::SimpleContent, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Restriction, token, namespaceToken)) {
+ parseSimpleContentRestriction(complexType);
+ } else if (isSchemaTag(XsdSchemaToken::Extension, token, namespaceToken)) {
+ parseSimpleContentExtension(complexType);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseSimpleContentRestriction(const XsdComplexType::Ptr &complexType)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Restriction, this);
+
+ validateElement(XsdTagScope::SimpleContentRestriction);
+
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+
+ // parse attributes
+ const QString baseType = readQNameAttribute(QString::fromLatin1("base"), "restriction");
+ QXmlName typeName;
+ convertName(baseType, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+
+ validateIdAttribute("restriction");
+
+ XsdFacet::Hash facets;
+ QList<XsdFacet::Ptr> patternFacets;
+ QList<XsdFacet::Ptr> enumerationFacets;
+ QList<XsdFacet::Ptr> assertionFacets;
+
+ TagValidationHandler tagValidator(XsdTagScope::SimpleContentRestriction, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(complexType); //TODO: investigate what the schema spec really wants here?!?
+ complexType->contentType()->setSimpleType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+ } else if (isSchemaTag(XsdSchemaToken::MinExclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMinExclusiveFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::MinInclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMinInclusiveFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::MaxExclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMaxExclusiveFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::MaxInclusive, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMaxInclusiveFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::TotalDigits, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseTotalDigitsFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::FractionDigits, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseFractionDigitsFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::Length, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseLengthFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::MinLength, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMinLengthFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::MaxLength, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseMaxLengthFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::Enumeration, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseEnumerationFacet();
+ enumerationFacets.append(facet);
+ } else if (isSchemaTag(XsdSchemaToken::WhiteSpace, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseWhiteSpaceFacet();
+ addFacet(facet, facets, complexType);
+ } else if (isSchemaTag(XsdSchemaToken::Pattern, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parsePatternFacet();
+ patternFacets.append(facet);
+ } else if (isSchemaTag(XsdSchemaToken::Assertion, token, namespaceToken)) {
+ const XsdFacet::Ptr facet = parseAssertionFacet();
+ assertionFacets.append(facet);
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(complexType);
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ complexType->setAttributeWildcard(wildcard);
+ } else if (isSchemaTag(XsdSchemaToken::Assert, token, namespaceToken)) {
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assert, XsdTagScope::Assert);
+ complexType->addAssertion(assertion);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ // merge all pattern facets into one multi value facet
+ if (!patternFacets.isEmpty()) {
+ const XsdFacet::Ptr patternFacet(new XsdFacet());
+ patternFacet->setType(XsdFacet::Pattern);
+
+ AtomicValue::List multiValue;
+ for (int i = 0; i < patternFacets.count(); ++i)
+ multiValue << patternFacets.at(i)->multiValue();
+
+ patternFacet->setMultiValue(multiValue);
+ addFacet(patternFacet, facets, complexType);
+ }
+
+ // merge all enumeration facets into one multi value facet
+ if (!enumerationFacets.isEmpty()) {
+ const XsdFacet::Ptr enumerationFacet(new XsdFacet());
+ enumerationFacet->setType(XsdFacet::Enumeration);
+
+ AtomicValue::List multiValue;
+ for (int i = 0; i < enumerationFacets.count(); ++i)
+ multiValue << enumerationFacets.at(i)->multiValue();
+
+ enumerationFacet->setMultiValue(multiValue);
+ addFacet(enumerationFacet, facets, complexType);
+ }
+
+ // merge all assertion facets into one facet
+ if (!assertionFacets.isEmpty()) {
+ const XsdFacet::Ptr assertionFacet(new XsdFacet());
+ assertionFacet->setType(XsdFacet::Assertion);
+
+ XsdAssertion::List assertions;
+ for (int i = 0; i < assertionFacets.count(); ++i)
+ assertions << assertionFacets.at(i)->assertions();
+
+ assertionFacet->setAssertions(assertions);
+ addFacet(assertionFacet, facets, complexType);
+ }
+
+ m_schemaResolver->addComplexBaseType(complexType, typeName, currentSourceLocation(), facets); // add to resolver
+}
+
+void XsdSchemaParser::parseSimpleContentExtension(const XsdComplexType::Ptr &complexType)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Extension, this);
+
+ validateElement(XsdTagScope::SimpleContentExtension);
+
+ complexType->setDerivationMethod(XsdComplexType::DerivationExtension);
+
+ // parse attributes
+ const QString baseType = readQNameAttribute(QString::fromLatin1("base"), "extension");
+ QXmlName typeName;
+ convertName(baseType, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addComplexBaseType(complexType, typeName, currentSourceLocation()); // add to resolver
+
+ validateIdAttribute("extension");
+
+ TagValidationHandler tagValidator(XsdTagScope::SimpleContentExtension, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(complexType);
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ complexType->setAttributeWildcard(wildcard);
+ } else if (isSchemaTag(XsdSchemaToken::Assert, token, namespaceToken)) {
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assert, XsdTagScope::Assert);
+ complexType->addAssertion(assertion);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseComplexContent(const XsdComplexType::Ptr &complexType, bool *mixed)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::ComplexContent, this);
+
+ validateElement(XsdTagScope::ComplexContent);
+
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::ElementOnly);
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("mixed"))) {
+ const QString mixedStr = readAttribute(QString::fromLatin1("mixed"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(mixedStr);
+ if (value->hasError()) {
+ attributeContentError("mixed", "complexType", mixedStr, BuiltinTypes::xsBoolean);
+ return;
+ }
+
+ *mixed = value->as<Boolean>()->value();
+ } else {
+ *mixed = false;
+ }
+
+ validateIdAttribute("complexContent");
+
+ TagValidationHandler tagValidator(XsdTagScope::ComplexContent, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Restriction, token, namespaceToken)) {
+ parseComplexContentRestriction(complexType);
+ } else if (isSchemaTag(XsdSchemaToken::Extension, token, namespaceToken)) {
+ parseComplexContentExtension(complexType);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseComplexContentRestriction(const XsdComplexType::Ptr &complexType)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Restriction, this);
+
+ validateElement(XsdTagScope::ComplexContentRestriction);
+
+ complexType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+
+ // parse attributes
+ const QString baseType = readQNameAttribute(QString::fromLatin1("base"), "restriction");
+ QXmlName typeName;
+ convertName(baseType, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addComplexBaseType(complexType, typeName, currentSourceLocation()); // add to resolver
+
+ validateIdAttribute("restriction");
+
+ TagValidationHandler tagValidator(XsdTagScope::ComplexContentRestriction, this, m_namePool);
+
+ bool hasContent = false;
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::OpenContent, token, namespaceToken)) {
+ const XsdComplexType::OpenContent::Ptr openContent = parseOpenContent();
+ complexType->contentType()->setOpenContent(openContent);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::All, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalAll(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(complexType);
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ complexType->setAttributeWildcard(wildcard);
+ } else if (isSchemaTag(XsdSchemaToken::Assert, token, namespaceToken)) {
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assert, XsdTagScope::Assert);
+ complexType->addAssertion(assertion);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!hasContent)
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::Empty);
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseComplexContentExtension(const XsdComplexType::Ptr &complexType)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Extension, this);
+
+ validateElement(XsdTagScope::ComplexContentExtension);
+
+ complexType->setDerivationMethod(XsdComplexType::DerivationExtension);
+
+ // parse attributes
+ const QString baseType = readQNameAttribute(QString::fromLatin1("base"), "extension");
+ QXmlName typeName;
+ convertName(baseType, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addComplexBaseType(complexType, typeName, currentSourceLocation()); // add to resolver
+
+ validateIdAttribute("extension");
+
+ TagValidationHandler tagValidator(XsdTagScope::ComplexContentExtension, this, m_namePool);
+
+ bool hasContent = false;
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ complexType->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::OpenContent, token, namespaceToken)) {
+ const XsdComplexType::OpenContent::Ptr openContent = parseOpenContent();
+ complexType->contentType()->setOpenContent(openContent);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::All, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalAll(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, complexType);
+ particle->setTerm(term);
+ complexType->contentType()->setParticle(particle);
+ hasContent = true;
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(complexType);
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ complexType->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ complexType->setAttributeWildcard(wildcard);
+ } else if (isSchemaTag(XsdSchemaToken::Assert, token, namespaceToken)) {
+ const XsdAssertion::Ptr assertion = parseAssertion(XsdSchemaToken::Assert, XsdTagScope::Assert);
+ complexType->addAssertion(assertion);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!hasContent)
+ complexType->contentType()->setVariety(XsdComplexType::ContentType::Empty);
+
+ tagValidator.finalize();
+}
+
+
+XsdAssertion::Ptr XsdSchemaParser::parseAssertion(const XsdSchemaToken::NodeName &nodeName, const XsdTagScope::Type &tag)
+{
+ const ElementNamespaceHandler namespaceHandler(nodeName, this);
+
+ validateElement(tag);
+
+ const XsdAssertion::Ptr assertion(new XsdAssertion());
+
+ // parse attributes
+
+ const XsdXPathExpression::Ptr expression = readXPathExpression("assertion");
+ assertion->setTest(expression);
+
+ const QString test = readXPathAttribute(QString::fromLatin1("test"), XPath20, "assertion");
+ expression->setExpression(test);
+
+ validateIdAttribute("assertion");
+
+ TagValidationHandler tagValidator(tag, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ assertion->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return assertion;
+}
+
+XsdComplexType::OpenContent::Ptr XsdSchemaParser::parseOpenContent()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::OpenContent, this);
+
+ validateElement(XsdTagScope::OpenContent);
+
+ const XsdComplexType::OpenContent::Ptr openContent(new XsdComplexType::OpenContent());
+
+ if (hasAttribute(QString::fromLatin1("mode"))) {
+ const QString mode = readAttribute(QString::fromLatin1("mode"));
+
+ if (mode == QString::fromLatin1("none")) {
+ m_defaultOpenContent->setMode(XsdComplexType::OpenContent::None);
+ } else if (mode == QString::fromLatin1("interleave")) {
+ m_defaultOpenContent->setMode(XsdComplexType::OpenContent::Interleave);
+ } else if (mode == QString::fromLatin1("suffix")) {
+ m_defaultOpenContent->setMode(XsdComplexType::OpenContent::Suffix);
+ } else {
+ attributeContentError("mode", "openContent", mode);
+ return openContent;
+ }
+ } else {
+ openContent->setMode(XsdComplexType::OpenContent::Interleave);
+ }
+
+ validateIdAttribute("openContent");
+
+ TagValidationHandler tagValidator(XsdTagScope::OpenContent, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ openContent->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Any, token, namespaceToken)) {
+ const XsdParticle::Ptr particle;
+ const XsdWildcard::Ptr wildcard = parseAny(particle);
+ openContent->setWildcard(wildcard);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return openContent;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseNamedGroup()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Group, this);
+
+ validateElement(XsdTagScope::NamedGroup);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ XsdModelGroup::Ptr group;
+
+ QXmlName objectName;
+ if (hasAttribute(QString::fromLatin1("name"))) {
+ objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("group"));
+ }
+
+ validateIdAttribute("group");
+
+ TagValidationHandler tagValidator(XsdTagScope::NamedGroup, this, m_namePool);
+
+ XsdAnnotation::Ptr annotation;
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ annotation = parseAnnotation();
+ } else if (isSchemaTag(XsdSchemaToken::All, token, namespaceToken)) {
+ group = parseAll(modelGroup);
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ group = parseChoice(modelGroup);
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ group = parseSequence(modelGroup);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ group->setName(objectName);
+
+ if (annotation)
+ group->addAnnotation(annotation);
+
+ return group;
+}
+
+XsdTerm::Ptr XsdSchemaParser::parseReferredGroup(const XsdParticle::Ptr &particle)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Group, this);
+
+ validateElement(XsdTagScope::ReferredGroup);
+
+ const XsdReference::Ptr reference(new XsdReference());
+ reference->setType(XsdReference::ModelGroup);
+ reference->setSourceLocation(currentSourceLocation());
+
+ // parse attributes
+ if (!parseMinMaxConstraint(particle, "group")) {
+ return reference;
+ }
+
+ const QString value = readQNameAttribute(QString::fromLatin1("ref"), "group");
+ QXmlName referenceName;
+ convertName(value, NamespaceSupport::ElementName, referenceName); // translate qualified name into QXmlName
+ reference->setReferenceName(referenceName);
+
+ validateIdAttribute("group");
+
+ TagValidationHandler tagValidator(XsdTagScope::ReferredGroup, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ reference->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return reference;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseAll(const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::All, this);
+
+ validateElement(XsdTagScope::All);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ modelGroup->setCompositor(XsdModelGroup::AllCompositor);
+
+ validateIdAttribute("all");
+
+ TagValidationHandler tagValidator(XsdTagScope::All, this, m_namePool);
+
+ XsdParticle::List particles;
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ modelGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalElement(particle, parent);
+ particle->setTerm(term);
+
+ if (particle->maximumOccursUnbounded() || particle->maximumOccurs() > 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must be %3 or %4")
+ .arg(formatAttribute("maxOccurs"))
+ .arg(formatElement("all"))
+ .arg(formatData("0"))
+ .arg(formatData("1")));
+ return modelGroup;
+ }
+
+ particles.append(particle);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ modelGroup->setParticles(particles);
+
+ tagValidator.finalize();
+
+ return modelGroup;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseLocalAll(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::All, this);
+
+ validateElement(XsdTagScope::LocalAll);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ modelGroup->setCompositor(XsdModelGroup::AllCompositor);
+
+ // parse attributes
+ if (!parseMinMaxConstraint(particle, "all")) {
+ return modelGroup;
+ }
+ if (particle->maximumOccursUnbounded() || particle->maximumOccurs() != 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3")
+ .arg(formatAttribute("maxOccurs"))
+ .arg(formatElement("all"))
+ .arg(formatData("1")));
+ return modelGroup;
+ }
+ if (particle->minimumOccurs() != 0 && particle->minimumOccurs() != 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3 or %4")
+ .arg(formatAttribute("minOccurs"))
+ .arg(formatElement("all"))
+ .arg(formatData("0"))
+ .arg(formatData("1")));
+ return modelGroup;
+ }
+
+ validateIdAttribute("all");
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalAll, this, m_namePool);
+
+ XsdParticle::List particles;
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ modelGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalElement(particle, parent);
+ particle->setTerm(term);
+
+ if (particle->maximumOccursUnbounded() || particle->maximumOccurs() > 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3 or %4")
+ .arg(formatAttribute("maxOccurs"))
+ .arg(formatElement("all"))
+ .arg(formatData("0"))
+ .arg(formatData("1")));
+ return modelGroup;
+ }
+
+ particles.append(particle);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ modelGroup->setParticles(particles);
+
+ tagValidator.finalize();
+
+ return modelGroup;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseChoice(const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Choice, this);
+
+ validateElement(XsdTagScope::Choice);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ modelGroup->setCompositor(XsdModelGroup::ChoiceCompositor);
+
+ validateIdAttribute("choice");
+
+ XsdParticle::List particles;
+
+ TagValidationHandler tagValidator(XsdTagScope::Choice, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ modelGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalElement(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ m_schemaResolver->addAllGroupCheck(term);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Any, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseAny(particle);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ modelGroup->setParticles(particles);
+
+ tagValidator.finalize();
+
+ return modelGroup;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseLocalChoice(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Choice, this);
+
+ validateElement(XsdTagScope::LocalChoice);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ modelGroup->setCompositor(XsdModelGroup::ChoiceCompositor);
+
+ // parse attributes
+ if (!parseMinMaxConstraint(particle, "choice")) {
+ return modelGroup;
+ }
+
+ validateIdAttribute("choice");
+
+ XsdParticle::List particles;
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalChoice, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ modelGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalElement(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ m_schemaResolver->addAllGroupCheck(term);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Any, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseAny(particle);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ modelGroup->setParticles(particles);
+
+ tagValidator.finalize();
+
+ return modelGroup;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseSequence(const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Sequence, this);
+
+ validateElement(XsdTagScope::Sequence);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ modelGroup->setCompositor(XsdModelGroup::SequenceCompositor);
+
+ validateIdAttribute("sequence");
+
+ XsdParticle::List particles;
+
+ TagValidationHandler tagValidator(XsdTagScope::Sequence, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ modelGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalElement(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ m_schemaResolver->addAllGroupCheck(term);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Any, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseAny(particle);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ modelGroup->setParticles(particles);
+
+ tagValidator.finalize();
+
+ return modelGroup;
+}
+
+XsdModelGroup::Ptr XsdSchemaParser::parseLocalSequence(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Sequence, this);
+
+ validateElement(XsdTagScope::LocalSequence);
+
+ const XsdModelGroup::Ptr modelGroup(new XsdModelGroup());
+ modelGroup->setCompositor(XsdModelGroup::SequenceCompositor);
+
+ // parse attributes
+ if (!parseMinMaxConstraint(particle, "sequence")) {
+ return modelGroup;
+ }
+
+ validateIdAttribute("sequence");
+
+ XsdParticle::List particles;
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalSequence, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ modelGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Element, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalElement(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Group, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseReferredGroup(particle);
+ m_schemaResolver->addAllGroupCheck(term);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Choice, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalChoice(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Sequence, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseLocalSequence(particle, parent);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else if (isSchemaTag(XsdSchemaToken::Any, token, namespaceToken)) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ const XsdTerm::Ptr term = parseAny(particle);
+ particle->setTerm(term);
+ particles.append(particle);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ modelGroup->setParticles(particles);
+
+ tagValidator.finalize();
+
+ return modelGroup;
+}
+
+XsdAttribute::Ptr XsdSchemaParser::parseGlobalAttribute()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Attribute, this);
+
+ validateElement(XsdTagScope::GlobalAttribute);
+
+ const XsdAttribute::Ptr attribute(new XsdAttribute());
+ attribute->setScope(XsdAttribute::Scope::Ptr(new XsdAttribute::Scope()));
+ attribute->scope()->setVariety(XsdAttribute::Scope::Global);
+
+ if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("attribute"))
+ .arg(formatAttribute("default"))
+ .arg(formatAttribute("fixed")));
+ return attribute;
+ }
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("default"))) {
+ const QString value = readAttribute(QString::fromLatin1("default"));
+ attribute->setValueConstraint(XsdAttribute::ValueConstraint::Ptr(new XsdAttribute::ValueConstraint()));
+ attribute->valueConstraint()->setVariety(XsdAttribute::ValueConstraint::Default);
+ attribute->valueConstraint()->setValue(value);
+ } else if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ attribute->setValueConstraint(XsdAttribute::ValueConstraint::Ptr(new XsdAttribute::ValueConstraint()));
+ attribute->valueConstraint()->setVariety(XsdAttribute::ValueConstraint::Fixed);
+ attribute->valueConstraint()->setValue(value);
+ }
+
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("attribute"));
+ if ((objectName.namespaceURI() == StandardNamespaces::xsi) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("type")) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("nil")) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("schemaLocation")) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("noNamespaceSchemaLocation"))) {
+
+ error(QtXmlPatterns::tr("content of %1 attribute of %2 element must not be from namespace %3")
+ .arg(formatAttribute("name"))
+ .arg(formatElement("attribute"))
+ .arg(formatURI(CommonNamespaces::XSI)));
+ return attribute;
+ }
+ if (m_namePool->stringForLocalName(objectName.localName()) == QString::fromLatin1("xmlns")) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must not be %3")
+ .arg(formatAttribute("name"))
+ .arg(formatElement("attribute"))
+ .arg(formatData("xmlns")));
+ return attribute;
+ }
+ attribute->setName(objectName);
+
+ bool hasTypeAttribute = false;
+ bool hasTypeSpecified = false;
+
+ if (hasAttribute(QString::fromLatin1("type"))) {
+ hasTypeAttribute = true;
+
+ const QString type = readQNameAttribute(QString::fromLatin1("type"), "attribute");
+ QXmlName typeName;
+ convertName(type, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addAttributeType(attribute, typeName, currentSourceLocation()); // add to resolver
+ hasTypeSpecified = true;
+ }
+
+ validateIdAttribute("attribute");
+
+ TagValidationHandler tagValidator(XsdTagScope::GlobalAttribute, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ attribute->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ if (hasTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("attribute"))
+ .arg(formatElement("simpleType"))
+ .arg(formatAttribute("type")));
+ break;
+ }
+
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(attribute);
+ attribute->setType(type);
+ hasTypeSpecified = true;
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!hasTypeSpecified) {
+ attribute->setType(BuiltinTypes::xsAnySimpleType); // default value
+ return attribute;
+ }
+
+ tagValidator.finalize();
+
+ return attribute;
+}
+
+XsdAttributeUse::Ptr XsdSchemaParser::parseLocalAttribute(const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Attribute, this);
+
+ validateElement(XsdTagScope::LocalAttribute);
+
+ bool hasRefAttribute = false;
+ bool hasTypeAttribute = false;
+ bool hasTypeSpecified = false;
+
+ XsdAttributeUse::Ptr attributeUse;
+ if (hasAttribute(QString::fromLatin1("ref"))) {
+ const XsdAttributeReference::Ptr reference = XsdAttributeReference::Ptr(new XsdAttributeReference());
+ reference->setType(XsdAttributeReference::AttributeUse);
+ reference->setSourceLocation(currentSourceLocation());
+
+ attributeUse = reference;
+ hasRefAttribute = true;
+ } else {
+ attributeUse = XsdAttributeUse::Ptr(new XsdAttributeUse());
+ }
+
+ if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("attribute"))
+ .arg(formatAttribute("default"))
+ .arg(formatAttribute("fixed")));
+ return attributeUse;
+ }
+
+ if (hasRefAttribute) {
+ if (hasAttribute(QString::fromLatin1("form"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("attribute"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("form")));
+ return attributeUse;
+ }
+ if (hasAttribute(QString::fromLatin1("name"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("attribute"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("name")));
+ return attributeUse;
+ }
+ if (hasAttribute(QString::fromLatin1("type"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("attribute"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("type")));
+ return attributeUse;
+ }
+ }
+
+ // parse attributes
+
+ // default, fixed and use are handled by both, attribute use and attribute reference
+ if (hasAttribute(QString::fromLatin1("default"))) {
+ const QString value = readAttribute(QString::fromLatin1("default"));
+ attributeUse->setValueConstraint(XsdAttributeUse::ValueConstraint::Ptr(new XsdAttributeUse::ValueConstraint()));
+ attributeUse->valueConstraint()->setVariety(XsdAttributeUse::ValueConstraint::Default);
+ attributeUse->valueConstraint()->setValue(value);
+ } else if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ attributeUse->setValueConstraint(XsdAttributeUse::ValueConstraint::Ptr(new XsdAttributeUse::ValueConstraint()));
+ attributeUse->valueConstraint()->setVariety(XsdAttributeUse::ValueConstraint::Fixed);
+ attributeUse->valueConstraint()->setValue(value);
+ }
+
+ if (hasAttribute(QString::fromLatin1("use"))) {
+ const QString value = readAttribute(QString::fromLatin1("use"));
+ if (value != QString::fromLatin1("optional") &&
+ value != QString::fromLatin1("prohibited") &&
+ value != QString::fromLatin1("required")) {
+ attributeContentError("use", "attribute", value);
+ return attributeUse;
+ }
+
+ if (value == QString::fromLatin1("optional"))
+ attributeUse->setUseType(XsdAttributeUse::OptionalUse);
+ else if (value == QString::fromLatin1("prohibited"))
+ attributeUse->setUseType(XsdAttributeUse::ProhibitedUse);
+ else if (value == QString::fromLatin1("required"))
+ attributeUse->setUseType(XsdAttributeUse::RequiredUse);
+
+ if (attributeUse->valueConstraint() && attributeUse->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Default && value != QString::fromLatin1("optional")) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must have the value %3 because the %4 attribute is set")
+ .arg(formatAttribute("use"))
+ .arg(formatElement("attribute"))
+ .arg(formatData("optional"))
+ .arg(formatElement("default")));
+ return attributeUse;
+ }
+ }
+
+ const XsdAttribute::Ptr attribute(new XsdAttribute());
+
+ attributeUse->setAttribute(attribute);
+ m_componentLocationHash.insert(attribute, currentSourceLocation());
+
+ attribute->setScope(XsdAttribute::Scope::Ptr(new XsdAttribute::Scope()));
+ attribute->scope()->setVariety(XsdAttribute::Scope::Local);
+ attribute->scope()->setParent(parent);
+
+ // now make a difference between attribute reference and attribute use
+ if (hasRefAttribute) {
+ const QString reference = readQNameAttribute(QString::fromLatin1("ref"), "attribute");
+ QXmlName referenceName;
+ convertName(reference, NamespaceSupport::ElementName, referenceName); // translate qualified name into QXmlName
+
+ const XsdAttributeReference::Ptr attributeReference = attributeUse;
+ attributeReference->setReferenceName(referenceName);
+ } else {
+ if (hasAttribute(QString::fromLatin1("name"))) {
+ const QString attributeName = readNameAttribute("attribute");
+
+ QXmlName objectName;
+ if (hasAttribute(QString::fromLatin1("form"))) {
+ const QString value = readAttribute(QString::fromLatin1("form"));
+ if (value != QString::fromLatin1("qualified") && value != QString::fromLatin1("unqualified")) {
+ attributeContentError("form", "attribute", value);
+ return attributeUse;
+ }
+
+ if (value == QString::fromLatin1("qualified")) {
+ objectName = m_namePool->allocateQName(m_targetNamespace, attributeName);
+ } else {
+ objectName = m_namePool->allocateQName(QString(), attributeName);
+ }
+ } else {
+ if (m_attributeFormDefault == QString::fromLatin1("qualified")) {
+ objectName = m_namePool->allocateQName(m_targetNamespace, attributeName);
+ } else {
+ objectName = m_namePool->allocateQName(QString(), attributeName);
+ }
+ }
+
+ if ((objectName.namespaceURI() == StandardNamespaces::xsi) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("type")) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("nil")) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("schemaLocation")) &&
+ (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("noNamespaceSchemaLocation"))) {
+
+ error(QtXmlPatterns::tr("content of %1 attribute of %2 element must not be from namespace %3")
+ .arg(formatAttribute("name"))
+ .arg(formatElement("attribute"))
+ .arg(formatURI(CommonNamespaces::XSI)));
+ return attributeUse;
+ }
+ if (m_namePool->stringForLocalName(objectName.localName()) == QString::fromLatin1("xmlns")) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must not be %3")
+ .arg(formatAttribute("name"))
+ .arg(formatElement("attribute"))
+ .arg(formatData("xmlns")));
+ return attributeUse;
+ }
+
+ attribute->setName(objectName);
+ }
+
+ if (hasAttribute(QString::fromLatin1("type"))) {
+ hasTypeAttribute = true;
+
+ const QString type = readQNameAttribute(QString::fromLatin1("type"), "attribute");
+ QXmlName typeName;
+ convertName(type, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addAttributeType(attribute, typeName, currentSourceLocation()); // add to resolver
+ hasTypeSpecified = true;
+ }
+
+ if (attributeUse->valueConstraint()) {
+ //TODO: check whether assigning the value constraint of the attribute use to the attribute is correct
+ if (!attribute->valueConstraint())
+ attribute->setValueConstraint(XsdAttribute::ValueConstraint::Ptr(new XsdAttribute::ValueConstraint()));
+
+ attribute->valueConstraint()->setVariety((XsdAttribute::ValueConstraint::Variety)attributeUse->valueConstraint()->variety());
+ attribute->valueConstraint()->setValue(attributeUse->valueConstraint()->value());
+ attribute->valueConstraint()->setLexicalForm(attributeUse->valueConstraint()->lexicalForm());
+ }
+ }
+
+ validateIdAttribute("attribute");
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalAttribute, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ attribute->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ if (hasTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("attribute"))
+ .arg(formatElement("simpleType"))
+ .arg(formatAttribute("type")));
+ break;
+ }
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("attribute"))
+ .arg(formatElement("simpleType"))
+ .arg(formatAttribute("ref")));
+ break;
+ }
+
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(attribute);
+ attribute->setType(type);
+ hasTypeSpecified = true;
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ if (!hasTypeSpecified) {
+ attribute->setType(BuiltinTypes::xsAnySimpleType); // default value
+ }
+
+ tagValidator.finalize();
+
+ return attributeUse;
+}
+
+XsdAttributeGroup::Ptr XsdSchemaParser::parseNamedAttributeGroup()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::AttributeGroup, this);
+
+ validateElement(XsdTagScope::NamedAttributeGroup);
+
+ const XsdAttributeGroup::Ptr attributeGroup(new XsdAttributeGroup());
+
+ // parse attributes
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("attributeGroup"));
+ attributeGroup->setName(objectName);
+
+ validateIdAttribute("attributeGroup");
+
+ TagValidationHandler tagValidator(XsdTagScope::NamedAttributeGroup, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ attributeGroup->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Attribute, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(attributeGroup);
+
+ if (attributeUse->useType() == XsdAttributeUse::ProhibitedUse) {
+ warning(QtXmlPatterns::tr("specifying use='prohibited' inside an attribute group has no effect"));
+ } else {
+ attributeGroup->addAttributeUse(attributeUse);
+ }
+ } else if (isSchemaTag(XsdSchemaToken::AttributeGroup, token, namespaceToken)) {
+ const XsdAttributeUse::Ptr attributeUse = parseReferredAttributeGroup();
+ attributeGroup->addAttributeUse(attributeUse);
+ } else if (isSchemaTag(XsdSchemaToken::AnyAttribute, token, namespaceToken)) {
+ const XsdWildcard::Ptr wildcard = parseAnyAttribute();
+ attributeGroup->setWildcard(wildcard);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return attributeGroup;
+}
+
+XsdAttributeUse::Ptr XsdSchemaParser::parseReferredAttributeGroup()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::AttributeGroup, this);
+
+ validateElement(XsdTagScope::ReferredAttributeGroup);
+
+ const XsdAttributeReference::Ptr attributeReference(new XsdAttributeReference());
+ attributeReference->setType(XsdAttributeReference::AttributeGroup);
+ attributeReference->setSourceLocation(currentSourceLocation());
+
+ // parse attributes
+ const QString reference = readQNameAttribute(QString::fromLatin1("ref"), "attributeGroup");
+ QXmlName referenceName;
+ convertName(reference, NamespaceSupport::ElementName, referenceName); // translate qualified name into QXmlName
+ attributeReference->setReferenceName(referenceName);
+
+ validateIdAttribute("attributeGroup");
+
+ TagValidationHandler tagValidator(XsdTagScope::ReferredAttributeGroup, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ attributeReference->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return attributeReference;
+}
+
+XsdElement::Ptr XsdSchemaParser::parseGlobalElement()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Element, this);
+
+ validateElement(XsdTagScope::GlobalElement);
+
+ const XsdElement::Ptr element(new XsdElement());
+ element->setScope(XsdElement::Scope::Ptr(new XsdElement::Scope()));
+ element->scope()->setVariety(XsdElement::Scope::Global);
+
+ bool hasTypeAttribute = false;
+ bool hasTypeSpecified = false;
+ bool hasSubstitutionGroup = false;
+
+ // parse attributes
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("element"));
+ element->setName(objectName);
+
+ if (hasAttribute(QString::fromLatin1("abstract"))) {
+ const QString abstract = readAttribute(QString::fromLatin1("abstract"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(abstract);
+ if (value->hasError()) {
+ attributeContentError("abstract", "element", abstract, BuiltinTypes::xsBoolean);
+ return element;
+ }
+
+ element->setIsAbstract(value->as<Boolean>()->value());
+ } else {
+ element->setIsAbstract(false); // the default value
+ }
+
+ if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("default"))
+ .arg(formatAttribute("fixed")));
+ return element;
+ }
+
+ if (hasAttribute(QString::fromLatin1("default"))) {
+ const QString value = readAttribute(QString::fromLatin1("default"));
+ element->setValueConstraint(XsdElement::ValueConstraint::Ptr(new XsdElement::ValueConstraint()));
+ element->valueConstraint()->setVariety(XsdElement::ValueConstraint::Default);
+ element->valueConstraint()->setValue(value);
+ } else if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ element->setValueConstraint(XsdElement::ValueConstraint::Ptr(new XsdElement::ValueConstraint()));
+ element->valueConstraint()->setVariety(XsdElement::ValueConstraint::Fixed);
+ element->valueConstraint()->setValue(value);
+ }
+
+ element->setDisallowedSubstitutions(readBlockingConstraintAttribute(NamedSchemaComponent::ExtensionConstraint | NamedSchemaComponent::RestrictionConstraint | NamedSchemaComponent::SubstitutionConstraint, "element"));
+ element->setSubstitutionGroupExclusions(readDerivationConstraintAttribute(SchemaType::ExtensionConstraint | SchemaType::RestrictionConstraint, "element"));
+
+ if (hasAttribute(QString::fromLatin1("nillable"))) {
+ const QString nillable = readAttribute(QString::fromLatin1("nillable"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(nillable);
+ if (value->hasError()) {
+ attributeContentError("nillable", "element", nillable, BuiltinTypes::xsBoolean);
+ return element;
+ }
+
+ element->setIsNillable(value->as<Boolean>()->value());
+ } else {
+ element->setIsNillable(false); // the default value
+ }
+
+ if (hasAttribute(QString::fromLatin1("type"))) {
+ const QString type = readQNameAttribute(QString::fromLatin1("type"), "element");
+ QXmlName typeName;
+ convertName(type, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addElementType(element, typeName, currentSourceLocation()); // add to resolver
+
+ hasTypeAttribute = true;
+ hasTypeSpecified = true;
+ }
+
+ if (hasAttribute(QString::fromLatin1("substitutionGroup"))) {
+ QList<QXmlName> elementNames;
+
+ const QString value = readAttribute(QString::fromLatin1("substitutionGroup"));
+ const QStringList substitutionGroups = value.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ if (substitutionGroups.isEmpty()) {
+ attributeContentError("substitutionGroup", "element", value, BuiltinTypes::xsQName);
+ return element;
+ }
+
+ for (int i = 0; i < substitutionGroups.count(); ++i) {
+ const QString value = substitutionGroups.at(i).simplified();
+ if (!XPathHelper::isQName(value)) {
+ attributeContentError("substitutionGroup", "element", value, BuiltinTypes::xsQName);
+ return element;
+ }
+
+ QXmlName elementName;
+ convertName(value, NamespaceSupport::ElementName, elementName); // translate qualified name into QXmlName
+ elementNames.append(elementName);
+ }
+
+ m_schemaResolver->addSubstitutionGroupAffiliation(element, elementNames, currentSourceLocation()); // add to resolver
+
+ hasSubstitutionGroup = true;
+ }
+
+ validateIdAttribute("element");
+
+ XsdAlternative::List alternatives;
+
+ TagValidationHandler tagValidator(XsdTagScope::GlobalElement, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ element->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ if (hasTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("simpleType"))
+ .arg(formatAttribute("type")));
+ return element;
+ }
+
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(element);
+ element->setType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) {
+ if (hasTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("complexType"))
+ .arg(formatAttribute("type")));
+ return element;
+ }
+
+ const XsdComplexType::Ptr type = parseLocalComplexType();
+ type->setContext(element);
+ element->setType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::Alternative, token, namespaceToken)) {
+ const XsdAlternative::Ptr alternative = parseAlternative();
+ alternatives.append(alternative);
+ } else if (isSchemaTag(XsdSchemaToken::Unique, token, namespaceToken)) {
+ const XsdIdentityConstraint::Ptr constraint = parseUnique();
+ element->addIdentityConstraint(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Key, token, namespaceToken)) {
+ const XsdIdentityConstraint::Ptr constraint = parseKey();
+ element->addIdentityConstraint(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Keyref, token, namespaceToken)) {
+ const XsdIdentityConstraint::Ptr constraint = parseKeyRef(element);
+ element->addIdentityConstraint(constraint);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ if (!hasTypeSpecified) {
+ if (hasSubstitutionGroup)
+ m_schemaResolver->addSubstitutionGroupType(element);
+ else
+ element->setType(BuiltinTypes::xsAnyType);
+ }
+
+ if (!alternatives.isEmpty()) {
+ element->setTypeTable(XsdElement::TypeTable::Ptr(new XsdElement::TypeTable()));
+
+ for (int i = 0; i < alternatives.count(); ++i) {
+ if (alternatives.at(i)->test())
+ element->typeTable()->addAlternative(alternatives.at(i));
+
+ if (i == (alternatives.count() - 1)) { // the final one
+ if (!alternatives.at(i)->test()) {
+ element->typeTable()->setDefaultTypeDefinition(alternatives.at(i));
+ } else {
+ const XsdAlternative::Ptr alternative(new XsdAlternative());
+ if (element->type())
+ alternative->setType(element->type());
+ else
+ m_schemaResolver->addAlternativeType(alternative, element); // add to resolver
+
+ element->typeTable()->setDefaultTypeDefinition(alternative);
+ }
+ }
+ }
+ }
+
+ return element;
+}
+
+XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Element, this);
+
+ validateElement(XsdTagScope::LocalElement);
+
+ bool hasRefAttribute = false;
+ bool hasTypeAttribute = false;
+ bool hasTypeSpecified = false;
+
+ XsdTerm::Ptr term;
+ XsdElement::Ptr element;
+ if (hasAttribute(QString::fromLatin1("ref"))) {
+ term = XsdReference::Ptr(new XsdReference());
+ hasRefAttribute = true;
+ } else {
+ term = XsdElement::Ptr(new XsdElement());
+ element = term;
+ }
+
+ if (hasRefAttribute) {
+ if (hasAttribute(QString::fromLatin1("name"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("name")));
+ return term;
+ } else if (hasAttribute(QString::fromLatin1("block"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("block")));
+ return term;
+ } else if (hasAttribute(QString::fromLatin1("nillable"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("nillable")));
+ return term;
+ } else if (hasAttribute(QString::fromLatin1("default"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("default")));
+ return term;
+ } else if (hasAttribute(QString::fromLatin1("fixed"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("fixed")));
+ return term;
+ } else if (hasAttribute(QString::fromLatin1("form"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("form")));
+ return term;
+ } else if (hasAttribute(QString::fromLatin1("type"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("ref"))
+ .arg(formatAttribute("type")));
+ return term;
+ }
+ }
+
+ // parse attributes
+ if (!parseMinMaxConstraint(particle, "element")) {
+ return element;
+ }
+
+ if (!hasAttribute(QString::fromLatin1("name")) && !hasAttribute(QString::fromLatin1("ref"))) {
+ error(QtXmlPatterns::tr("%1 element must have either %2 or %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("name"))
+ .arg(formatAttribute("ref")));
+ return element;
+ }
+
+ if (hasRefAttribute) {
+ const QString ref = readQNameAttribute(QString::fromLatin1("ref"), "element");
+ QXmlName referenceName;
+ convertName(ref, NamespaceSupport::ElementName, referenceName); // translate qualified name into QXmlName
+
+ const XsdReference::Ptr reference = term;
+ reference->setReferenceName(referenceName);
+ reference->setType(XsdReference::Element);
+ reference->setSourceLocation(currentSourceLocation());
+ } else {
+ element->setScope(XsdElement::Scope::Ptr(new XsdElement::Scope()));
+ element->scope()->setVariety(XsdElement::Scope::Local);
+ element->scope()->setParent(parent);
+
+ if (hasAttribute(QString::fromLatin1("name"))) {
+ const QString elementName = readNameAttribute("element");
+
+ QXmlName objectName;
+ if (hasAttribute(QString::fromLatin1("form"))) {
+ const QString value = readAttribute(QString::fromLatin1("form"));
+ if (value != QString::fromLatin1("qualified") && value != QString::fromLatin1("unqualified")) {
+ attributeContentError("form", "element", value);
+ return element;
+ }
+
+ if (value == QString::fromLatin1("qualified")) {
+ objectName = m_namePool->allocateQName(m_targetNamespace, elementName);
+ } else {
+ objectName = m_namePool->allocateQName(QString(), elementName);
+ }
+ } else {
+ if (m_elementFormDefault == QString::fromLatin1("qualified")) {
+ objectName = m_namePool->allocateQName(m_targetNamespace, elementName);
+ } else {
+ objectName = m_namePool->allocateQName(QString(), elementName);
+ }
+ }
+
+ element->setName(objectName);
+ }
+
+ if (hasAttribute(QString::fromLatin1("nillable"))) {
+ const QString nillable = readAttribute(QString::fromLatin1("nillable"));
+
+ const Boolean::Ptr value = Boolean::fromLexical(nillable);
+ if (value->hasError()) {
+ attributeContentError("nillable", "element", nillable, BuiltinTypes::xsBoolean);
+ return term;
+ }
+
+ element->setIsNillable(value->as<Boolean>()->value());
+ } else {
+ element->setIsNillable(false); // the default value
+ }
+
+ if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) {
+ error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together")
+ .arg(formatElement("element"))
+ .arg(formatAttribute("default"))
+ .arg(formatAttribute("fixed")));
+ return element;
+ }
+
+ if (hasAttribute(QString::fromLatin1("default"))) {
+ const QString value = readAttribute(QString::fromLatin1("default"));
+ element->setValueConstraint(XsdElement::ValueConstraint::Ptr(new XsdElement::ValueConstraint()));
+ element->valueConstraint()->setVariety(XsdElement::ValueConstraint::Default);
+ element->valueConstraint()->setValue(value);
+ } else if (hasAttribute(QString::fromLatin1("fixed"))) {
+ const QString value = readAttribute(QString::fromLatin1("fixed"));
+ element->setValueConstraint(XsdElement::ValueConstraint::Ptr(new XsdElement::ValueConstraint()));
+ element->valueConstraint()->setVariety(XsdElement::ValueConstraint::Fixed);
+ element->valueConstraint()->setValue(value);
+ }
+
+ if (hasAttribute(QString::fromLatin1("type"))) {
+ const QString type = readQNameAttribute(QString::fromLatin1("type"), "element");
+ QXmlName typeName;
+ convertName(type, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addElementType(element, typeName, currentSourceLocation()); // add to resolver
+
+ hasTypeAttribute = true;
+ hasTypeSpecified = true;
+ }
+
+ element->setDisallowedSubstitutions(readBlockingConstraintAttribute(NamedSchemaComponent::ExtensionConstraint | NamedSchemaComponent::RestrictionConstraint | NamedSchemaComponent::SubstitutionConstraint, "element"));
+ }
+
+ validateIdAttribute("element");
+
+ XsdAlternative::List alternatives;
+
+ TagValidationHandler tagValidator(XsdTagScope::LocalElement, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ element->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("simpleType"))
+ .arg(formatAttribute("ref")));
+ return term;
+ } else if (hasTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("simpleType"))
+ .arg(formatAttribute("type")));
+ return term;
+ }
+
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ type->setContext(element);
+ element->setType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) {
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("complexType"))
+ .arg(formatAttribute("ref")));
+ return term;
+ } else if (hasTypeAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("complexType"))
+ .arg(formatAttribute("type")));
+ return term;
+ }
+
+ const XsdComplexType::Ptr type = parseLocalComplexType();
+ type->setContext(element);
+ element->setType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::Alternative, token, namespaceToken)) {
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("alternative"))
+ .arg(formatAttribute("ref")));
+ return term;
+ }
+
+ const XsdAlternative::Ptr alternative = parseAlternative();
+ alternatives.append(alternative);
+ } else if (isSchemaTag(XsdSchemaToken::Unique, token, namespaceToken)) {
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("unique"))
+ .arg(formatAttribute("ref")));
+ return term;
+ }
+
+ const XsdIdentityConstraint::Ptr constraint = parseUnique();
+ element->addIdentityConstraint(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Key, token, namespaceToken)) {
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("key"))
+ .arg(formatAttribute("ref")));
+ return term;
+ }
+
+ const XsdIdentityConstraint::Ptr constraint = parseKey();
+ element->addIdentityConstraint(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Keyref, token, namespaceToken)) {
+ if (hasRefAttribute) {
+ error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute")
+ .arg(formatElement("element"))
+ .arg(formatElement("keyref"))
+ .arg(formatAttribute("ref")));
+ return term;
+ }
+
+ const XsdIdentityConstraint::Ptr constraint = parseKeyRef(element);
+ element->addIdentityConstraint(constraint);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ if (!hasTypeSpecified && !hasRefAttribute)
+ element->setType(BuiltinTypes::xsAnyType);
+
+ if (!hasRefAttribute && !alternatives.isEmpty()) {
+ element->setTypeTable(XsdElement::TypeTable::Ptr(new XsdElement::TypeTable()));
+
+ for (int i = 0; i < alternatives.count(); ++i) {
+ if (alternatives.at(i)->test())
+ element->typeTable()->addAlternative(alternatives.at(i));
+
+ if (i == (alternatives.count() - 1)) { // the final one
+ if (!alternatives.at(i)->test()) {
+ element->typeTable()->setDefaultTypeDefinition(alternatives.at(i));
+ } else {
+ const XsdAlternative::Ptr alternative(new XsdAlternative());
+ if (element->type())
+ alternative->setType(element->type());
+ else
+ m_schemaResolver->addAlternativeType(alternative, element); // add to resolver
+
+ element->typeTable()->setDefaultTypeDefinition(alternative);
+ }
+ }
+ }
+ }
+
+ return term;
+}
+
+XsdIdentityConstraint::Ptr XsdSchemaParser::parseUnique()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Unique, this);
+
+ validateElement(XsdTagScope::Unique);
+
+ const XsdIdentityConstraint::Ptr constraint(new XsdIdentityConstraint());
+ constraint->setCategory(XsdIdentityConstraint::Unique);
+
+ // parse attributes
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("unique"));
+ constraint->setName(objectName);
+
+ validateIdAttribute("unique");
+
+ TagValidationHandler tagValidator(XsdTagScope::Unique, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ constraint->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Selector, token, namespaceToken)) {
+ parseSelector(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Field, token, namespaceToken)) {
+ parseField(constraint);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ // add constraint to schema for further checking
+ addIdentityConstraint(constraint);
+
+ tagValidator.finalize();
+
+ return constraint;
+}
+
+XsdIdentityConstraint::Ptr XsdSchemaParser::parseKey()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Key, this);
+
+ validateElement(XsdTagScope::Key);
+
+ const XsdIdentityConstraint::Ptr constraint(new XsdIdentityConstraint());
+ constraint->setCategory(XsdIdentityConstraint::Key);
+
+ // parse attributes
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("key"));
+ constraint->setName(objectName);
+
+ validateIdAttribute("key");
+
+ TagValidationHandler tagValidator(XsdTagScope::Key, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ constraint->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Selector, token, namespaceToken)) {
+ parseSelector(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Field, token, namespaceToken)) {
+ parseField(constraint);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ // add constraint to schema for further checking
+ addIdentityConstraint(constraint);
+
+ tagValidator.finalize();
+
+ return constraint;
+}
+
+XsdIdentityConstraint::Ptr XsdSchemaParser::parseKeyRef(const XsdElement::Ptr &element)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Keyref, this);
+
+ validateElement(XsdTagScope::KeyRef);
+
+ const XsdIdentityConstraint::Ptr constraint(new XsdIdentityConstraint());
+ constraint->setCategory(XsdIdentityConstraint::KeyReference);
+
+ // parse attributes
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("keyref"));
+ constraint->setName(objectName);
+
+ const QString refer = readQNameAttribute(QString::fromLatin1("refer"), "keyref");
+ QXmlName referenceName;
+ convertName(refer, NamespaceSupport::ElementName, referenceName); // translate qualified name into QXmlName
+ m_schemaResolver->addKeyReference(element, constraint, referenceName, currentSourceLocation()); // add to resolver
+
+ validateIdAttribute("keyref");
+
+ TagValidationHandler tagValidator(XsdTagScope::KeyRef, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ constraint->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::Selector, token, namespaceToken)) {
+ parseSelector(constraint);
+ } else if (isSchemaTag(XsdSchemaToken::Field, token, namespaceToken)) {
+ parseField(constraint);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ // add constraint to schema for further checking
+ addIdentityConstraint(constraint);
+
+ tagValidator.finalize();
+
+ return constraint;
+}
+
+void XsdSchemaParser::parseSelector(const XsdIdentityConstraint::Ptr &ptr)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Selector, this);
+
+ validateElement(XsdTagScope::Selector);
+
+ // parse attributes
+ const XsdXPathExpression::Ptr expression = readXPathExpression("selector");
+
+ const QString xpath = readXPathAttribute(QString::fromLatin1("xpath"), XPathSelector, "selector");
+ expression->setExpression(xpath);
+
+ ptr->setSelector(expression);
+
+ validateIdAttribute("selector");
+
+ TagValidationHandler tagValidator(XsdTagScope::Selector, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ expression->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+void XsdSchemaParser::parseField(const XsdIdentityConstraint::Ptr &ptr)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Field, this);
+
+ validateElement(XsdTagScope::Field);
+
+ // parse attributes
+ const XsdXPathExpression::Ptr expression = readXPathExpression("field");
+
+ const QString xpath = readXPathAttribute(QString::fromLatin1("xpath"), XPathField, "field");
+ expression->setExpression(xpath);
+
+ ptr->addField(expression);
+
+ validateIdAttribute("field");
+
+ TagValidationHandler tagValidator(XsdTagScope::Field, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ expression->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+}
+
+XsdAlternative::Ptr XsdSchemaParser::parseAlternative()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Alternative, this);
+
+ validateElement(XsdTagScope::Alternative);
+
+ const XsdAlternative::Ptr alternative(new XsdAlternative());
+
+ bool hasTypeSpecified = false;
+
+ if (hasAttribute(QString::fromLatin1("test"))) {
+ const XsdXPathExpression::Ptr expression = readXPathExpression("alternative");
+
+ const QString test = readXPathAttribute(QString::fromLatin1("test"), XPath20, "alternative");
+ expression->setExpression(test);
+
+ alternative->setTest(expression);
+ }
+
+ if (hasAttribute(QString::fromLatin1("type"))) {
+ const QString type = readQNameAttribute(QString::fromLatin1("type"), "alternative");
+ QXmlName typeName;
+ convertName(type, NamespaceSupport::ElementName, typeName); // translate qualified name into QXmlName
+ m_schemaResolver->addAlternativeType(alternative, typeName, currentSourceLocation()); // add to resolver
+
+ hasTypeSpecified = true;
+ }
+
+ validateIdAttribute("alternative");
+
+ TagValidationHandler tagValidator(XsdTagScope::Alternative, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ alternative->addAnnotation(annotation);
+ } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
+ const XsdSimpleType::Ptr type = parseLocalSimpleType();
+ alternative->setType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+
+ hasTypeSpecified = true;
+ } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) {
+ const XsdComplexType::Ptr type = parseLocalComplexType();
+ alternative->setType(type);
+
+ // add it to list of anonymous types as well
+ addAnonymousType(type);
+
+ hasTypeSpecified = true;
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ if (!hasTypeSpecified) {
+ error(QtXmlPatterns::tr("%1 element must have either %2 attribute or %3 or %4 as child element")
+ .arg(formatElement("alternative"))
+ .arg(formatAttribute("type"))
+ .arg(formatElement("simpleType"))
+ .arg(formatElement("complexType")));
+ return alternative;
+ }
+
+ return alternative;
+}
+
+XsdNotation::Ptr XsdSchemaParser::parseNotation()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Notation, this);
+
+ validateElement(XsdTagScope::Notation);
+
+ const XsdNotation::Ptr notation(new XsdNotation());
+
+ // parse attributes
+ const QXmlName objectName = m_namePool->allocateQName(m_targetNamespace, readNameAttribute("notation"));
+ notation->setName(objectName);
+
+ bool hasOptionalAttribute = false;
+
+ if (hasAttribute(QString::fromLatin1("public"))) {
+ const QString value = readAttribute(QString::fromLatin1("public"));
+ if (!value.isEmpty()) {
+ const DerivedString<TypeToken>::Ptr publicId = DerivedString<TypeToken>::fromLexical(m_namePool, value);
+ if (publicId->hasError()) {
+ attributeContentError("public", "notation", value, BuiltinTypes::xsToken);
+ return notation;
+ }
+ notation->setPublicId(publicId);
+ }
+
+ hasOptionalAttribute = true;
+ }
+
+ if (hasAttribute(QString::fromLatin1("system"))) {
+ const QString value = readAttribute(QString::fromLatin1("system"));
+ if (!isValidUri(value)) {
+ attributeContentError("system", "notation", value, BuiltinTypes::xsAnyURI);
+ return notation;
+ }
+
+ if (!value.isEmpty()) {
+ const AnyURI::Ptr systemId = AnyURI::fromLexical(value);
+ notation->setSystemId(systemId);
+ }
+
+ hasOptionalAttribute = true;
+ }
+
+ if (!hasOptionalAttribute) {
+ error(QtXmlPatterns::tr("%1 element requires either %2 or %3 attribute")
+ .arg(formatElement("notation"))
+ .arg(formatAttribute("public"))
+ .arg(formatAttribute("system")));
+ return notation;
+ }
+
+ validateIdAttribute("notation");
+
+ TagValidationHandler tagValidator(XsdTagScope::Notation, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isCharacters() || isEntityReference()) {
+ if (!text().toString().trimmed().isEmpty()) {
+ error(QtXmlPatterns::tr("text or entity references not allowed inside %1 element").arg(formatElement("notation")));
+ return notation;
+ }
+ }
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ notation->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return notation;
+}
+
+XsdWildcard::Ptr XsdSchemaParser::parseAny(const XsdParticle::Ptr &particle)
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::Any, this);
+
+ validateElement(XsdTagScope::Any);
+
+ const XsdWildcard::Ptr wildcard(new XsdWildcard());
+
+ // parse attributes
+ if (!parseMinMaxConstraint(particle, "any")) {
+ return wildcard;
+ }
+
+ if (hasAttribute(QString::fromLatin1("namespace"))) {
+ const QSet<QString> values = readAttribute(QString::fromLatin1("namespace")).split(QLatin1Char(' '), QString::SkipEmptyParts).toSet();
+ if ((values.contains(QString::fromLatin1("##any")) || values.contains(QString::fromLatin1("##other"))) && values.count() != 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must contain %3, %4 or a list of URIs")
+ .arg(formatAttribute("namespace"))
+ .arg(formatElement("any"))
+ .arg(formatData("##any"))
+ .arg(formatData("##other")));
+ return wildcard;
+ }
+
+ if (values.contains(QString::fromLatin1("##any"))) {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ } else if (values.contains(QString::fromLatin1("##other"))) {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Not);
+ if (!m_targetNamespace.isEmpty())
+ wildcard->namespaceConstraint()->setNamespaces(QSet<QString>() << m_targetNamespace);
+ else
+ wildcard->namespaceConstraint()->setNamespaces(QSet<QString>() << XsdWildcard::absentNamespace());
+ } else {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Enumeration);
+ QStringList newValues = values.toList();
+
+ // replace the ##targetNamespace entry
+ for (int i = 0; i < newValues.count(); ++i) {
+ if (newValues.at(i) == QString::fromLatin1("##targetNamespace")) {
+ if (!m_targetNamespace.isEmpty())
+ newValues[i] = m_targetNamespace;
+ else
+ newValues[i] = XsdWildcard::absentNamespace();
+ } else if (newValues.at(i) == QString::fromLatin1("##local")) {
+ newValues[i] = XsdWildcard::absentNamespace();
+ }
+ }
+
+ // check for invalid URIs
+ for (int i = 0; i < newValues.count(); ++i) {
+ const QString stringValue = newValues.at(i);
+ if (stringValue == XsdWildcard::absentNamespace())
+ continue;
+
+ if (!isValidUri(stringValue)) {
+ attributeContentError("namespace", "any", stringValue, BuiltinTypes::xsAnyURI);
+ return wildcard;
+ }
+ }
+
+ wildcard->namespaceConstraint()->setNamespaces(newValues.toSet());
+ }
+ } else {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ }
+
+ if (hasAttribute(QString::fromLatin1("processContents"))) {
+ const QString value = readAttribute(QString::fromLatin1("processContents"));
+ if (value != QString::fromLatin1("lax") &&
+ value != QString::fromLatin1("skip") &&
+ value != QString::fromLatin1("strict")) {
+ attributeContentError("processContents", "any", value);
+ return wildcard;
+ }
+
+ if (value == QString::fromLatin1("lax")) {
+ wildcard->setProcessContents(XsdWildcard::Lax);
+ } else if (value == QString::fromLatin1("skip")) {
+ wildcard->setProcessContents(XsdWildcard::Skip);
+ } else if (value == QString::fromLatin1("strict")) {
+ wildcard->setProcessContents(XsdWildcard::Strict);
+ }
+ } else {
+ wildcard->setProcessContents(XsdWildcard::Strict);
+ }
+
+ validateIdAttribute("any");
+
+ TagValidationHandler tagValidator(XsdTagScope::Any, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ wildcard->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return wildcard;
+}
+
+XsdWildcard::Ptr XsdSchemaParser::parseAnyAttribute()
+{
+ const ElementNamespaceHandler namespaceHandler(XsdSchemaToken::AnyAttribute, this);
+
+ validateElement(XsdTagScope::AnyAttribute);
+
+ const XsdWildcard::Ptr wildcard(new XsdWildcard());
+
+ // parse attributes
+ if (hasAttribute(QString::fromLatin1("namespace"))) {
+ const QSet<QString> values = readAttribute(QString::fromLatin1("namespace")).split(QLatin1Char(' '), QString::SkipEmptyParts).toSet();
+ if ((values.contains(QString::fromLatin1("##any")) || values.contains(QString::fromLatin1("##other"))) && values.count() != 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must contain %3, %4 or a list of URIs")
+ .arg(formatAttribute("namespace"))
+ .arg(formatElement("anyAttribute"))
+ .arg(formatData("##any"))
+ .arg(formatData("##other")));
+ return wildcard;
+ }
+
+ if (values.contains(QString::fromLatin1("##any"))) {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ } else if (values.contains(QString::fromLatin1("##other"))) {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Not);
+ if (!m_targetNamespace.isEmpty())
+ wildcard->namespaceConstraint()->setNamespaces(QSet<QString>() << m_targetNamespace);
+ else
+ wildcard->namespaceConstraint()->setNamespaces(QSet<QString>() << XsdWildcard::absentNamespace());
+ } else {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Enumeration);
+ QStringList newValues = values.toList();
+
+ // replace the ##targetNamespace entry
+ for (int i = 0; i < newValues.count(); ++i) {
+ if (newValues.at(i) == QString::fromLatin1("##targetNamespace")) {
+ if (!m_targetNamespace.isEmpty())
+ newValues[i] = m_targetNamespace;
+ else
+ newValues[i] = XsdWildcard::absentNamespace();
+ } else if (newValues.at(i) == QString::fromLatin1("##local")) {
+ newValues[i] = XsdWildcard::absentNamespace();
+ }
+ }
+
+ // check for invalid URIs
+ for (int i = 0; i < newValues.count(); ++i) {
+ const QString stringValue = newValues.at(i);
+ if (stringValue == XsdWildcard::absentNamespace())
+ continue;
+
+ if (!isValidUri(stringValue)) {
+ attributeContentError("namespace", "anyAttribute", stringValue, BuiltinTypes::xsAnyURI);
+ return wildcard;
+ }
+ }
+
+ wildcard->namespaceConstraint()->setNamespaces(newValues.toSet());
+ }
+ } else {
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ }
+
+ if (hasAttribute(QString::fromLatin1("processContents"))) {
+ const QString value = readAttribute(QString::fromLatin1("processContents"));
+ if (value != QString::fromLatin1("lax") &&
+ value != QString::fromLatin1("skip") &&
+ value != QString::fromLatin1("strict")) {
+ attributeContentError("processContents", "anyAttribute", value);
+ return wildcard;
+ }
+
+ if (value == QString::fromLatin1("lax")) {
+ wildcard->setProcessContents(XsdWildcard::Lax);
+ } else if (value == QString::fromLatin1("skip")) {
+ wildcard->setProcessContents(XsdWildcard::Skip);
+ } else if (value == QString::fromLatin1("strict")) {
+ wildcard->setProcessContents(XsdWildcard::Strict);
+ }
+ } else {
+ wildcard->setProcessContents(XsdWildcard::Strict);
+ }
+
+ validateIdAttribute("anyAttribute");
+
+ TagValidationHandler tagValidator(XsdTagScope::AnyAttribute, this, m_namePool);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ const XsdSchemaToken::NodeName token = XsdSchemaToken::toToken(name());
+ const XsdSchemaToken::NodeName namespaceToken = XsdSchemaToken::toToken(namespaceUri());
+
+ tagValidator.validate(token);
+
+ if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
+ const XsdAnnotation::Ptr annotation = parseAnnotation();
+ wildcard->addAnnotation(annotation);
+ } else {
+ parseUnknown();
+ }
+ }
+ }
+
+ tagValidator.finalize();
+
+ return wildcard;
+}
+
+
+void XsdSchemaParser::parseUnknownDocumentation()
+{
+ Q_ASSERT(isStartElement());
+ m_namespaceSupport.pushContext();
+ m_namespaceSupport.setPrefixes(namespaceDeclarations());
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ parseUnknownDocumentation();
+ }
+
+ m_namespaceSupport.popContext();
+}
+
+void XsdSchemaParser::parseUnknown()
+{
+ Q_ASSERT(isStartElement());
+ m_namespaceSupport.pushContext();
+ m_namespaceSupport.setPrefixes(namespaceDeclarations());
+
+ error(QtXmlPatterns::tr("%1 element is not allowed in this context").arg(formatElement(name().toString())));
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ parseUnknown();
+ }
+
+ m_namespaceSupport.popContext();
+}
+
+bool XsdSchemaParser::parseMinMaxConstraint(const XsdParticle::Ptr &particle, const char *elementName)
+{
+ if (hasAttribute(QString::fromLatin1("minOccurs"))) {
+ const QString value = readAttribute(QString::fromLatin1("minOccurs"));
+
+ DerivedInteger<TypeNonNegativeInteger>::Ptr integer = DerivedInteger<TypeNonNegativeInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("minOccurs", elementName, value, BuiltinTypes::xsNonNegativeInteger);
+ return false;
+ } else {
+ particle->setMinimumOccurs(integer->as< DerivedInteger<TypeNonNegativeInteger> >()->storedValue());
+ }
+ } else {
+ particle->setMinimumOccurs(1);
+ }
+
+ if (hasAttribute(QString::fromLatin1("maxOccurs"))) {
+ const QString value = readAttribute(QString::fromLatin1("maxOccurs"));
+
+ if (value == QString::fromLatin1("unbounded")) {
+ particle->setMaximumOccursUnbounded(true);
+ } else {
+ particle->setMaximumOccursUnbounded(false);
+ DerivedInteger<TypeNonNegativeInteger>::Ptr integer = DerivedInteger<TypeNonNegativeInteger>::fromLexical(m_namePool, value);
+ if (integer->hasError()) {
+ attributeContentError("maxOccurs", elementName, value, BuiltinTypes::xsNonNegativeInteger);
+ return false;
+ } else {
+ particle->setMaximumOccurs(integer->as< DerivedInteger<TypeNonNegativeInteger> >()->storedValue());
+ }
+ }
+ } else {
+ particle->setMaximumOccursUnbounded(false);
+ particle->setMaximumOccurs(1);
+ }
+
+ if (!particle->maximumOccursUnbounded()) {
+ if (particle->maximumOccurs() < particle->minimumOccurs()) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element has larger value than %3 attribute")
+ .arg(formatAttribute("minOccurs"))
+ .arg(formatElement(elementName))
+ .arg(formatAttribute("maxOccurs")));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+QSourceLocation XsdSchemaParser::currentSourceLocation() const
+{
+ QSourceLocation location;
+ location.setLine(lineNumber());
+ location.setColumn(columnNumber());
+ location.setUri(m_documentURI);
+
+ return location;
+}
+
+void XsdSchemaParser::convertName(const QString &qualifiedName, NamespaceSupport::NameType type, QXmlName &name)
+{
+ bool result = m_namespaceSupport.processName(qualifiedName, type, name);
+ if (!result) {
+ error(QtXmlPatterns::tr("prefix of qualified name %1 is not defined").arg(formatKeyword(qualifiedName)));
+ }
+}
+
+QString XsdSchemaParser::readNameAttribute(const char *elementName)
+{
+ const QString value = readAttribute(QString::fromLatin1("name")).simplified();
+ if (!QXmlUtils::isNCName(value)) {
+ attributeContentError("name", elementName, value, BuiltinTypes::xsNCName);
+ return QString();
+ } else {
+ return value;
+ }
+}
+
+QString XsdSchemaParser::readQNameAttribute(const QString &typeAttribute, const char *elementName)
+{
+ const QString value = readAttribute(typeAttribute).simplified();
+ if (!XPathHelper::isQName(value)) {
+ attributeContentError(typeAttribute.toLatin1(), elementName, value, BuiltinTypes::xsQName);
+ return QString();
+ } else {
+ return value;
+ }
+}
+
+QString XsdSchemaParser::readNamespaceAttribute(const QString &attributeName, const char *elementName)
+{
+ const QString value = readAttribute(attributeName);
+ if (value.isEmpty()) {
+ attributeContentError(attributeName.toLatin1(), elementName, value, BuiltinTypes::xsAnyURI);
+ return QString();
+ }
+
+ return value;
+}
+
+SchemaType::DerivationConstraints XsdSchemaParser::readDerivationConstraintAttribute(const SchemaType::DerivationConstraints &allowedConstraints, const char *elementName)
+{
+ // first convert the flags into strings for easier comparision
+ QSet<QString> allowedContent;
+ if (allowedConstraints & SchemaType::RestrictionConstraint)
+ allowedContent.insert(QString::fromLatin1("restriction"));
+ if (allowedConstraints & SchemaType::ExtensionConstraint)
+ allowedContent.insert(QString::fromLatin1("extension"));
+ if (allowedConstraints & SchemaType::ListConstraint)
+ allowedContent.insert(QString::fromLatin1("list"));
+ if (allowedConstraints & SchemaType::UnionConstraint)
+ allowedContent.insert(QString::fromLatin1("union"));
+
+ // read content from the attribute if available, otherwise use the default definitions from the schema tag
+ QString content;
+ if (hasAttribute(QString::fromLatin1("final"))) {
+ content = readAttribute(QString::fromLatin1("final"));
+
+ // split string into list to validate the content of the attribute
+ const QStringList values = content.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < values.count(); i++) {
+ const QString value = values.at(i);
+ if (!allowedContent.contains(value) && (value != QString::fromLatin1("#all"))) {
+ attributeContentError("final", elementName, value);
+ return SchemaType::DerivationConstraints();
+ }
+
+ if ((value == QString::fromLatin1("#all")) && values.count() != 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must either contain %3 or the other values")
+ .arg(formatAttribute("final"))
+ .arg(formatElement(elementName))
+ .arg(formatData("#all")));
+ return SchemaType::DerivationConstraints();
+ }
+ }
+ } else {
+ // content of the default value has been validated in parseSchema already
+ content = m_finalDefault;
+ }
+
+ QSet<QString> contentSet = content.split(QLatin1Char(' '), QString::SkipEmptyParts).toSet();
+
+ // if the '#all' tag is defined, we return all allowed values
+ if (contentSet.contains(QString::fromLatin1("#all"))) {
+ return allowedConstraints;
+ } else { // return the values from content set that intersects with the allowed values
+ contentSet.intersect(allowedContent);
+
+ SchemaType::DerivationConstraints constraints;
+
+ if (contentSet.contains(QString::fromLatin1("restriction")))
+ constraints |= SchemaType::RestrictionConstraint;
+ if (contentSet.contains(QString::fromLatin1("extension")))
+ constraints |= SchemaType::ExtensionConstraint;
+ if (contentSet.contains(QString::fromLatin1("list")))
+ constraints |= SchemaType::ListConstraint;
+ if (contentSet.contains(QString::fromLatin1("union")))
+ constraints |= SchemaType::UnionConstraint;
+
+ return constraints;
+ }
+}
+
+NamedSchemaComponent::BlockingConstraints XsdSchemaParser::readBlockingConstraintAttribute(const NamedSchemaComponent::BlockingConstraints &allowedConstraints, const char *elementName)
+{
+ // first convert the flags into strings for easier comparision
+ QSet<QString> allowedContent;
+ if (allowedConstraints & NamedSchemaComponent::RestrictionConstraint)
+ allowedContent.insert(QString::fromLatin1("restriction"));
+ if (allowedConstraints & NamedSchemaComponent::ExtensionConstraint)
+ allowedContent.insert(QString::fromLatin1("extension"));
+ if (allowedConstraints & NamedSchemaComponent::SubstitutionConstraint)
+ allowedContent.insert(QString::fromLatin1("substitution"));
+
+ // read content from the attribute if available, otherwise use the default definitions from the schema tag
+ QString content;
+ if (hasAttribute(QString::fromLatin1("block"))) {
+ content = readAttribute(QString::fromLatin1("block"));
+
+ // split string into list to validate the content of the attribute
+ const QStringList values = content.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < values.count(); i++) {
+ const QString value = values.at(i);
+ if (!allowedContent.contains(value) && (value != QString::fromLatin1("#all"))) {
+ attributeContentError("block", elementName, value);
+ return NamedSchemaComponent::BlockingConstraints();
+ }
+
+ if ((value == QString::fromLatin1("#all")) && values.count() != 1) {
+ error(QtXmlPatterns::tr("%1 attribute of %2 element must either contain %3 or the other values")
+ .arg(formatAttribute("block"))
+ .arg(formatElement(elementName))
+ .arg(formatData("#all")));
+ return NamedSchemaComponent::BlockingConstraints();
+ }
+ }
+ } else {
+ // content of the default value has been validated in parseSchema already
+ content = m_blockDefault;
+ }
+
+ QSet<QString> contentSet = content.split(QLatin1Char(' '), QString::SkipEmptyParts).toSet();
+
+ // if the '#all' tag is defined, we return all allowed values
+ if (contentSet.contains(QString::fromLatin1("#all"))) {
+ return allowedConstraints;
+ } else { // return the values from content set that intersects with the allowed values
+ contentSet.intersect(allowedContent);
+
+ NamedSchemaComponent::BlockingConstraints constraints;
+
+ if (contentSet.contains(QString::fromLatin1("restriction")))
+ constraints |= NamedSchemaComponent::RestrictionConstraint;
+ if (contentSet.contains(QString::fromLatin1("extension")))
+ constraints |= NamedSchemaComponent::ExtensionConstraint;
+ if (contentSet.contains(QString::fromLatin1("substitution")))
+ constraints |= NamedSchemaComponent::SubstitutionConstraint;
+
+ return constraints;
+ }
+}
+
+XsdXPathExpression::Ptr XsdSchemaParser::readXPathExpression(const char *elementName)
+{
+ const XsdXPathExpression::Ptr expression(new XsdXPathExpression());
+
+ const QList<QXmlName> namespaceBindings = m_namespaceSupport.namespaceBindings();
+ QXmlName emptyName;
+ for (int i = 0; i < namespaceBindings.count(); ++i) {
+ if (namespaceBindings.at(i).prefix() == StandardPrefixes::empty)
+ emptyName = namespaceBindings.at(i);
+ }
+
+ expression->setNamespaceBindings(namespaceBindings);
+
+ QString xpathDefaultNamespace;
+ if (hasAttribute(QString::fromLatin1("xpathDefaultNamespace"))) {
+ xpathDefaultNamespace = readAttribute(QString::fromLatin1("xpathDefaultNamespace"));
+ if (xpathDefaultNamespace != QString::fromLatin1("##defaultNamespace") &&
+ xpathDefaultNamespace != QString::fromLatin1("##targetNamespace") &&
+ xpathDefaultNamespace != QString::fromLatin1("##local")) {
+ if (!isValidUri(xpathDefaultNamespace)) {
+ attributeContentError("xpathDefaultNamespace", elementName, xpathDefaultNamespace, BuiltinTypes::xsAnyURI);
+ return expression;
+ }
+ }
+ } else {
+ xpathDefaultNamespace = m_xpathDefaultNamespace;
+ }
+
+ AnyURI::Ptr namespaceURI;
+ if (xpathDefaultNamespace == QString::fromLatin1("##defaultNamespace")) {
+ if (!emptyName.isNull())
+ namespaceURI = AnyURI::fromLexical(m_namePool->stringForNamespace(emptyName.namespaceURI()));
+ } else if (xpathDefaultNamespace == QString::fromLatin1("##targetNamespace")) {
+ if (!m_targetNamespace.isEmpty())
+ namespaceURI = AnyURI::fromLexical(m_targetNamespace);
+ } else if (xpathDefaultNamespace == QString::fromLatin1("##local")) {
+ // it is absent
+ } else {
+ namespaceURI = AnyURI::fromLexical(xpathDefaultNamespace);
+ }
+ if (namespaceURI) {
+ if (namespaceURI->hasError()) {
+ attributeContentError("xpathDefaultNamespace", elementName, xpathDefaultNamespace, BuiltinTypes::xsAnyURI);
+ return expression;
+ }
+
+ expression->setDefaultNamespace(namespaceURI);
+ }
+
+ //TODO: read the base uri if qmaintaining reader support it
+
+ return expression;
+}
+
+QString XsdSchemaParser::readXPathAttribute(const QString &attributeName, XPathType type, const char *elementName)
+{
+ const QString value = readAttribute(attributeName);
+ if (value.isEmpty() || value.startsWith(QLatin1Char('/'))) {
+ attributeContentError(attributeName.toLatin1(), elementName, value);
+ return QString();
+ }
+
+ QXmlNamePool namePool(m_namePool.data());
+
+ QXmlQuery::QueryLanguage language = QXmlQuery::XPath20;
+ switch (type) {
+ case XPath20: language = QXmlQuery::XPath20; break;
+ case XPathSelector: language = QXmlQuery::XmlSchema11IdentityConstraintSelector; break;
+ case XPathField: language = QXmlQuery::XmlSchema11IdentityConstraintField; break;
+ };
+
+ QXmlQuery query(language, namePool);
+ QXmlQueryPrivate *queryPrivate = query.d;
+
+ const QList<QXmlName> namespaceBindings = m_namespaceSupport.namespaceBindings();
+ for (int i = 0; i < namespaceBindings.count(); ++i) {
+ if (!namespaceBindings.at(i).prefix() == StandardPrefixes::empty)
+ queryPrivate->addAdditionalNamespaceBinding(namespaceBindings.at(i));
+ }
+
+ query.setQuery(value, m_documentURI);
+ if (!query.isValid()) {
+ attributeContentError(attributeName.toLatin1(), elementName, value);
+ return QString();
+ }
+
+ return value;
+}
+
+void XsdSchemaParser::validateIdAttribute(const char *elementName)
+{
+ if (hasAttribute(QString::fromLatin1("id"))) {
+ const QString value = readAttribute(QString::fromLatin1("id"));
+ DerivedString<TypeID>::Ptr id = DerivedString<TypeID>::fromLexical(m_namePool, value);
+ if (id->hasError()) {
+ attributeContentError("id", elementName, value, BuiltinTypes::xsID);
+ } else {
+ if (m_idCache->hasId(value)) {
+ error(QtXmlPatterns::tr("component with id %1 has been defined previously").arg(formatData(value)));
+ } else {
+ m_idCache->addId(value);
+ }
+ }
+ }
+}
+
+bool XsdSchemaParser::isSchemaTag(XsdSchemaToken::NodeName tag, XsdSchemaToken::NodeName token, XsdSchemaToken::NodeName namespaceToken) const
+{
+ return ((tag == token) && (namespaceToken == XsdSchemaToken::XML_NS_SCHEMA_URI));
+}
+
+void XsdSchemaParser::addElement(const XsdElement::Ptr &element)
+{
+ const QXmlName objectName = element->name(m_namePool);
+ if (m_schema->element(objectName)) {
+ error(QtXmlPatterns::tr("element %1 already defined").arg(formatElement(m_namePool->displayName(objectName))));
+ } else {
+ m_schema->addElement(element);
+ m_componentLocationHash.insert(element, currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addAttribute(const XsdAttribute::Ptr &attribute)
+{
+ const QXmlName objectName = attribute->name(m_namePool);
+ if (m_schema->attribute(objectName)) {
+ error(QtXmlPatterns::tr("attribute %1 already defined").arg(formatAttribute(m_namePool->displayName(objectName))));
+ } else {
+ m_schema->addAttribute(attribute);
+ m_componentLocationHash.insert(attribute, currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addType(const SchemaType::Ptr &type)
+{
+ // we don't import redefinitions of builtin types, that just causes problems
+ if (m_builtinTypeNames.contains(type->name(m_namePool)))
+ return;
+
+ const QXmlName objectName = type->name(m_namePool);
+ if (m_schema->type(objectName)) {
+ error(QtXmlPatterns::tr("type %1 already defined").arg(formatType(m_namePool, objectName)));
+ } else {
+ m_schema->addType(type);
+ if (type->isSimpleType())
+ m_componentLocationHash.insert(XsdSimpleType::Ptr(type), currentSourceLocation());
+ else
+ m_componentLocationHash.insert(XsdComplexType::Ptr(type), currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addAnonymousType(const SchemaType::Ptr &type)
+{
+ m_schema->addAnonymousType(type);
+ if (type->isSimpleType())
+ m_componentLocationHash.insert(XsdSimpleType::Ptr(type), currentSourceLocation());
+ else
+ m_componentLocationHash.insert(XsdComplexType::Ptr(type), currentSourceLocation());
+}
+
+void XsdSchemaParser::addAttributeGroup(const XsdAttributeGroup::Ptr &group)
+{
+ const QXmlName objectName = group->name(m_namePool);
+ if (m_schema->attributeGroup(objectName)) {
+ error(QtXmlPatterns::tr("attribute group %1 already defined").arg(formatKeyword(m_namePool, objectName)));
+ } else {
+ m_schema->addAttributeGroup(group);
+ m_componentLocationHash.insert(group, currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addElementGroup(const XsdModelGroup::Ptr &group)
+{
+ const QXmlName objectName = group->name(m_namePool);
+ if (m_schema->elementGroup(objectName)) {
+ error(QtXmlPatterns::tr("element group %1 already defined").arg(formatKeyword(m_namePool, objectName)));
+ } else {
+ m_schema->addElementGroup(group);
+ m_componentLocationHash.insert(group, currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addNotation(const XsdNotation::Ptr &notation)
+{
+ const QXmlName objectName = notation->name(m_namePool);
+ if (m_schema->notation(objectName)) {
+ error(QtXmlPatterns::tr("notation %1 already defined").arg(formatKeyword(m_namePool, objectName)));
+ } else {
+ m_schema->addNotation(notation);
+ m_componentLocationHash.insert(notation, currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
+{
+ const QXmlName objectName = constraint->name(m_namePool);
+ if (m_schema->identityConstraint(objectName)) {
+ error(QtXmlPatterns::tr("identity constraint %1 already defined").arg(formatKeyword(m_namePool, objectName)));
+ } else {
+ m_schema->addIdentityConstraint(constraint);
+ m_componentLocationHash.insert(constraint, currentSourceLocation());
+ }
+}
+
+void XsdSchemaParser::addFacet(const XsdFacet::Ptr &facet, XsdFacet::Hash &facets, const SchemaType::Ptr &type)
+{
+ // @see http://www.w3.org/TR/xmlschema-2/#src-single-facet-value
+ if (facets.contains(facet->type())) {
+ error(QtXmlPatterns::tr("duplicated facets in simple type %1").arg(formatType(m_namePool, type)));
+ return;
+ }
+
+ facets.insert(facet->type(), facet);
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemaparser_p.h b/src/xmlpatterns/schema/qxsdschemaparser_p.h
new file mode 100644
index 0000000..51a8e3d
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaparser_p.h
@@ -0,0 +1,721 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaParser_H
+#define Patternist_XsdSchemaParser_H
+
+#include "qnamespacesupport_p.h"
+#include "qxsdalternative_p.h"
+#include "qxsdattribute_p.h"
+#include "qxsdattributegroup_p.h"
+#include "qxsdattributeterm_p.h"
+#include "qxsdcomplextype_p.h"
+#include "qxsdelement_p.h"
+#include "qxsdidcache_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdnotation_p.h"
+#include "qxsdsimpletype_p.h"
+#include "qxsdschemacontext_p.h"
+#include "qxsdschemaparsercontext_p.h"
+#include "qxsdstatemachine_p.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QSet>
+#include <QtCore/QUrl>
+#include <QtXml/QXmlStreamReader>
+#include <QtXmlPatterns/QXmlNamePool>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Implements the parsing of XML schema file.
+ *
+ * This class parses a XML schema in XML presentation from an QIODevice
+ * and returns object representation as XsdSchema.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaParser : public MaintainingReader<XsdSchemaToken, XsdTagScope::Type>
+ {
+ friend class ElementNamespaceHandler;
+ friend class TagValidationHandler;
+
+ public:
+ enum ParserType
+ {
+ TopLevelParser,
+ IncludeParser,
+ ImportParser,
+ RedefineParser
+ };
+
+ /**
+ * Creates a new schema parser object.
+ */
+ XsdSchemaParser(const XsdSchemaContext::Ptr &context, const XsdSchemaParserContext::Ptr &parserContext, QIODevice *device);
+
+ /**
+ * Parses the XML schema file.
+ *
+ * @return @c true on success, @c false if the schema is somehow invalid.
+ */
+ bool parse(ParserType parserType = TopLevelParser);
+
+ /**
+ * Describes a set of namespace URIs
+ */
+ typedef QSet<QUrl> NamespaceSet;
+
+ /**
+ * Sets which @p schemas have been included already, so the parser
+ * can detect circular includes.
+ */
+ void setIncludedSchemas(const NamespaceSet &schemas);
+
+ /**
+ * Sets which @p schemas have been imported already, so the parser
+ * can detect circular imports.
+ */
+ void setImportedSchemas(const NamespaceSet &schemas);
+
+ /**
+ * Sets which @p schemas have been redefined already, so the parser
+ * can detect circular redefines.
+ */
+ void setRedefinedSchemas(const NamespaceSet &schemas);
+
+ /**
+ * Sets the target namespace of the schema to parse.
+ */
+ void setTargetNamespace(const QString &targetNamespace);
+
+ /**
+ * Sets the document URI of the schema to parse.
+ */
+ void setDocumentURI(const QUrl &uri);
+
+ /**
+ * Returns the document URI of the schema to parse.
+ */
+ QUrl documentURI() const;
+
+ /**
+ * Reimplemented from MaintainingReader, always returns @c false.
+ */
+ bool isAnyAttributeAllowed() const;
+
+ private:
+ /**
+ * Used internally to report any kind of parsing error or
+ * schema inconsistency.
+ */
+ virtual void error(const QString &msg);
+
+ void attributeContentError(const char *attributeName, const char *elementName, const QString &value, const SchemaType::Ptr &type = SchemaType::Ptr());
+
+ /**
+ * Sets the target namespace of the schema to parse.
+ */
+ void setTargetNamespaceExtended(const QString &targetNamespace);
+
+ /**
+ * This method is called for parsing the top-level <em>schema</em> object.
+ */
+ void parseSchema(ParserType parserType);
+
+ /**
+ * This method is called for parsing any top-level <em>include</em> object.
+ */
+ void parseInclude();
+
+ /**
+ * This method is called for parsing any top-level <em>import</em> object.
+ */
+ void parseImport();
+
+ /**
+ * This method is called for parsing any top-level <em>redefine</em> object.
+ */
+ void parseRedefine();
+
+ /**
+ * This method is called for parsing any <em>annotation</em> object everywhere
+ * in the schema.
+ */
+ XsdAnnotation::Ptr parseAnnotation();
+
+ /**
+ * This method is called for parsing an <em>appinfo</em> object as child of
+ * an <em>annotation</em> object.
+ */
+ XsdApplicationInformation::Ptr parseAppInfo();
+
+ /**
+ * This method is called for parsing a <em>documentation</em> object as child of
+ * an <em>annotation</em> object.
+ */
+ XsdDocumentation::Ptr parseDocumentation();
+
+ /**
+ * This method is called for parsing a <em>defaultOpenContent</em> object.
+ */
+ void parseDefaultOpenContent();
+
+ /**
+ * This method is called for parsing any top-level <em>simpleType</em> object.
+ */
+ XsdSimpleType::Ptr parseGlobalSimpleType();
+
+ /**
+ * This method is called for parsing any <em>simpleType</em> object as descendant
+ * of an <em>element</em> or <em>complexType</em> object.
+ */
+ XsdSimpleType::Ptr parseLocalSimpleType();
+
+ /**
+ * This method is called for parsing a <em>restriction</em> object as child
+ * of a <em>simpleType</em> object.
+ */
+ void parseSimpleRestriction(const XsdSimpleType::Ptr &ptr);
+
+ /**
+ * This method is called for parsing a <em>list</em> object as child
+ * of a <em>simpleType</em> object.
+ */
+ void parseList(const XsdSimpleType::Ptr &ptr);
+
+ /**
+ * This method is called for parsing a <em>union</em> object as child
+ * of a <em>simpleType</em> object.
+ */
+ void parseUnion(const XsdSimpleType::Ptr &ptr);
+
+ /**
+ * This method is called for parsing a <em>minExclusive</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseMinExclusiveFacet();
+
+ /**
+ * This method is called for parsing a <em>minInclusive</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseMinInclusiveFacet();
+
+ /**
+ * This method is called for parsing a <em>maxExclusive</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseMaxExclusiveFacet();
+
+ /**
+ * This method is called for parsing a <em>maxInclusive</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseMaxInclusiveFacet();
+
+ /**
+ * This method is called for parsing a <em>totalDigits</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseTotalDigitsFacet();
+
+ /**
+ * This method is called for parsing a <em>fractionDigits</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseFractionDigitsFacet();
+
+ /**
+ * This method is called for parsing a <em>length</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseLengthFacet();
+
+ /**
+ * This method is called for parsing a <em>minLength</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseMinLengthFacet();
+
+ /**
+ * This method is called for parsing a <em>maxLength</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseMaxLengthFacet();
+
+ /**
+ * This method is called for parsing an <em>enumeration</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseEnumerationFacet();
+
+ /**
+ * This method is called for parsing a <em>whiteSpace</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseWhiteSpaceFacet();
+
+ /**
+ * This method is called for parsing a <em>pattern</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parsePatternFacet();
+
+ /**
+ * This method is called for parsing an <em>assertion</em> object as child
+ * of a <em>restriction</em> object.
+ */
+ XsdFacet::Ptr parseAssertionFacet();
+
+ /**
+ * This method is called for parsing any top-level <em>complexType</em> object.
+ */
+ XsdComplexType::Ptr parseGlobalComplexType();
+
+ /**
+ * This method is called for parsing any <em>complexType</em> object as descendant
+ * of an <em>element</em> object.
+ */
+ XsdComplexType::Ptr parseLocalComplexType();
+
+ /**
+ * This method resolves the content type of the @p complexType for the given
+ * @p effectiveMixed value.
+ */
+ void resolveComplexContentType(const XsdComplexType::Ptr &complexType, bool effectiveMixed);
+
+ /**
+ * This method is called for parsing a <em>simpleContent</em> object as child
+ * of a <em>complexType</em> object.
+ */
+ void parseSimpleContent(const XsdComplexType::Ptr &complexType);
+
+ /**
+ * This method is called for parsing a <em>restriction</em> object as child
+ * of a <em>simpleContent</em> object.
+ */
+ void parseSimpleContentRestriction(const XsdComplexType::Ptr &complexType);
+
+ /**
+ * This method is called for parsing an <em>extension</em> object as child
+ * of a <em>simpleContent</em> object.
+ */
+ void parseSimpleContentExtension(const XsdComplexType::Ptr &complexType);
+
+ /**
+ * This method is called for parsing a <em>complexContent</em> object as child
+ * of a <em>complexType</em> object.
+ *
+ * @param complexType The complex type the complex content belongs to.
+ * @param mixed The output parameter for the mixed value.
+ */
+ void parseComplexContent(const XsdComplexType::Ptr &complexType, bool *mixed);
+
+ /**
+ * This method is called for parsing a <em>restriction</em> object as child
+ * of a <em>complexContent</em> object.
+ */
+ void parseComplexContentRestriction(const XsdComplexType::Ptr &complexType);
+
+ /**
+ * This method is called for parsing an <em>extension</em> object as child
+ * of a <em>complexContent</em> object.
+ */
+ void parseComplexContentExtension(const XsdComplexType::Ptr &complexType);
+
+ /**
+ * This method is called for parsing an <em>assert</em> object as child
+ * of a <em>complexType</em> or parsing a <em>assertion</em> facet object as
+ * child of a <em>simpleType</em>.
+ *
+ * @param nodeName Either XsdSchemaToken::Assert or XsdSchemaToken::Assertion.
+ * @param tag Either XsdTagScope::Assert or XsdTagScope::Assertion.
+ */
+ XsdAssertion::Ptr parseAssertion(const XsdSchemaToken::NodeName &nodeName, const XsdTagScope::Type &tag);
+
+ /**
+ * This method is called for parsing an <em>openContent</em> object.
+ */
+ XsdComplexType::OpenContent::Ptr parseOpenContent();
+
+ /**
+ * This method is called for parsing a top-level <em>group</em> object.
+ */
+ XsdModelGroup::Ptr parseNamedGroup();
+
+ /**
+ * This method is called for parsing a non-top-level <em>group</em> object
+ * that contains a <em>ref</em> attribute.
+ */
+ XsdTerm::Ptr parseReferredGroup(const XsdParticle::Ptr &particle);
+
+ /**
+ * This method is called for parsing an <em>all</em> object as child
+ * of a top-level <em>group</em> object.
+ *
+ * @param parent The schema component the <em>all</em> object is part of.
+ */
+ XsdModelGroup::Ptr parseAll(const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing an <em>all</em> object as descendant
+ * of a <em>complexType</em> object.
+ *
+ * @param particle The particle the <em>all</em> object belongs to.
+ * @param parent The schema component the <em>all</em> object is part of.
+ */
+ XsdModelGroup::Ptr parseLocalAll(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing a <em>choice</em> object as child
+ * of a top-level <em>group</em> object.
+ *
+ * @param parent The schema component the <em>choice</em> object is part of.
+ */
+ XsdModelGroup::Ptr parseChoice(const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing a <em>choice</em> object as descendant
+ * of a <em>complexType</em> object or a <em>choice</em> object.
+ *
+ * @param particle The particle the <em>choice</em> object belongs to.
+ * @param parent The schema component the <em>choice</em> object is part of.
+ */
+ XsdModelGroup::Ptr parseLocalChoice(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing a <em>sequence</em> object as child
+ * of a top-level <em>group</em> object.
+ *
+ * @param parent The schema component the <em>sequence</em> object is part of.
+ */
+ XsdModelGroup::Ptr parseSequence(const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing a <em>sequence</em> object as descendant
+ * of a <em>complexType</em> object or a <em>sequence</em> object.
+ *
+ * @param particle The particle the <em>sequence</em> object belongs to.
+ * @param parent The schema component the <em>sequence</em> object is part of.
+ */
+ XsdModelGroup::Ptr parseLocalSequence(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * A helper method that parses the minOccurs and maxOccurs constraints for
+ * the given @p particle that has the given @p tagName.
+ */
+ bool parseMinMaxConstraint(const XsdParticle::Ptr &particle, const char* tagName);
+
+ /**
+ * This method is called for parsing any top-level <em>attribute</em> object.
+ */
+ XsdAttribute::Ptr parseGlobalAttribute();
+
+ /**
+ * This method is called for parsing any non-top-level <em>attribute</em> object as a
+ * descendant of a <em>complexType</em> object or an <em>attributeGroup</em> object.
+ *
+ * @param parent The parent component the <em>attribute</em> object is part of.
+ */
+ XsdAttributeUse::Ptr parseLocalAttribute(const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing a top-level <em>attributeGroup</em> object.
+ */
+ XsdAttributeGroup::Ptr parseNamedAttributeGroup();
+
+ /**
+ * This method is called for parsing a non-top-level <em>attributeGroup</em> object
+ * that contains a <em>ref</em> attribute.
+ */
+ XsdAttributeUse::Ptr parseReferredAttributeGroup();
+
+ /**
+ * This method is called for parsing any top-level <em>element</em> object.
+ */
+ XsdElement::Ptr parseGlobalElement();
+
+ /**
+ * This method is called for parsing any non-top-level <em>element</em> object as a
+ * descendant of a <em>complexType</em> object or a <em>group</em> object.
+ *
+ * @param particle The particle the <em>element</em> object belongs to.
+ * @param parent The parent component the <em>element</em> object is part of.
+ */
+ XsdTerm::Ptr parseLocalElement(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent);
+
+ /**
+ * This method is called for parsing a <em>unique</em> object as child of an <em>element</em> object.
+ */
+ XsdIdentityConstraint::Ptr parseUnique();
+
+ /**
+ * This method is called for parsing a <em>key</em> object as child of an <em>element</em> object.
+ */
+ XsdIdentityConstraint::Ptr parseKey();
+
+ /**
+ * This method is called for parsing a <em>keyref</em> object as child of an <em>element</em> object.
+ */
+ XsdIdentityConstraint::Ptr parseKeyRef(const XsdElement::Ptr &element);
+
+ /**
+ * This method is called for parsing a <em>selector</em> object as child of an <em>unique</em> object,
+ * <em>key</em> object or <em>keyref</em> object,
+ *
+ * @param ptr The identity constraint it belongs to.
+ */
+ void parseSelector(const XsdIdentityConstraint::Ptr &ptr);
+
+ /**
+ * This method is called for parsing a <em>field</em> object as child of an <em>unique</em> object,
+ * <em>key</em> object or <em>keyref</em> object,
+ *
+ * @param ptr The identity constraint it belongs to.
+ */
+ void parseField(const XsdIdentityConstraint::Ptr &ptr);
+
+ /**
+ * This method is called for parsing an <em>alternative</em> object inside an <em>element</em> object.
+ */
+ XsdAlternative::Ptr parseAlternative();
+
+ /**
+ * This method is called for parsing a top-level <em>notation</em> object.
+ */
+ XsdNotation::Ptr parseNotation();
+
+ /**
+ * This method is called for parsing an <em>any</em> object somewhere in
+ * the schema.
+ *
+ * @param particle The particle the <em>any</em> object belongs to.
+ */
+ XsdWildcard::Ptr parseAny(const XsdParticle::Ptr &particle);
+
+ /**
+ * This method is called for parsing an <em>anyAttribute</em> object somewhere in
+ * the schema.
+ */
+ XsdWildcard::Ptr parseAnyAttribute();
+
+ /**
+ * This method is called for parsing unknown object as descendant of the <em>annotation</em> object.
+ */
+ void parseUnknownDocumentation();
+
+ /**
+ * This method is called for parsing unknown object in the schema.
+ */
+ void parseUnknown();
+
+ /**
+ * Returnes an source location for the current position.
+ */
+ QSourceLocation currentSourceLocation() const;
+
+ /**
+ * Converts a @p qualified name into a QXmlName @p name and does some error handling.
+ */
+ void convertName(const QString &qualified, NamespaceSupport::NameType type, QXmlName &name);
+
+ /**
+ * A helper method that reads in a 'name' attribute and checks it for syntactic errors.
+ */
+ inline QString readNameAttribute(const char *elementName);
+
+ /**
+ * A helper method that reads in an attribute that contains an QName and
+ * checks it for syntactic errors.
+ */
+ inline QString readQNameAttribute(const QString &typeAttribute, const char *elementName);
+
+ /**
+ * A helper method that reads in a namespace attribute and checks for syntactic errors.
+ */
+ inline QString readNamespaceAttribute(const QString &attributeName, const char *elementName);
+
+ /**
+ * A helper method that reads the final attribute and does correct handling of schema default definitions.
+ */
+ inline SchemaType::DerivationConstraints readDerivationConstraintAttribute(const SchemaType::DerivationConstraints &allowedConstraints, const char *elementName);
+
+ /**
+ * A helper method that reads the block attribute and does correct handling of schema default definitions.
+ */
+ inline NamedSchemaComponent::BlockingConstraints readBlockingConstraintAttribute(const NamedSchemaComponent::BlockingConstraints &allowedConstraints, const char *elementName);
+
+ /**
+ * A helper method that reads all components for a xpath expression for the current scope.
+ */
+ XsdXPathExpression::Ptr readXPathExpression(const char *elementName);
+
+ /**
+ * Describes the type of XPath that is allowed by the readXPathAttribute method.
+ */
+ enum XPathType {
+ XPath20,
+ XPathSelector,
+ XPathField
+ };
+
+ /**
+ * A helper method that reads an attribute that represents a xpath query and does basic
+ * validation.
+ */
+ QString readXPathAttribute(const QString &attributeName, XPathType type, const char *elementName);
+
+ /**
+ * A helper method that reads in an "id" attribute, checks it for syntactic errors
+ * and tests whether a component with the same id has already been parsed.
+ */
+ inline void validateIdAttribute(const char *elementName);
+
+ /**
+ * Adds an @p element to the schema and checks for duplicated entries.
+ */
+ void addElement(const XsdElement::Ptr &element);
+
+ /**
+ * Adds an @p attribute to the schema and checks for duplicated entries.
+ */
+ void addAttribute(const XsdAttribute::Ptr &attribute);
+
+ /**
+ * Adds a @p type to the schema and checks for duplicated entries.
+ */
+ void addType(const SchemaType::Ptr &type);
+
+ /**
+ * Adds an anonymous @p type to the schema and checks for duplicated entries.
+ */
+ void addAnonymousType(const SchemaType::Ptr &type);
+
+ /**
+ * Adds an attribute @p group to the schema and checks for duplicated entries.
+ */
+ void addAttributeGroup(const XsdAttributeGroup::Ptr &group);
+
+ /**
+ * Adds an element @p group to the schema and checks for duplicated entries.
+ */
+ void addElementGroup(const XsdModelGroup::Ptr &group);
+
+ /**
+ * Adds a @p notation to the schema and checks for duplicated entries.
+ */
+ void addNotation(const XsdNotation::Ptr &notation);
+
+ /**
+ * Adds an identity @p constraint to the schema and checks for duplicated entries.
+ */
+ void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint);
+
+ /**
+ * Adds the @p facet to the list of @p facets for @p type and checks for duplicates.
+ */
+ void addFacet(const XsdFacet::Ptr &facet, XsdFacet::Hash &facets, const SchemaType::Ptr &type);
+
+ /**
+ * Sets up the state machines for validating the right occurrence of xml elements.
+ */
+ void setupStateMachines();
+
+ /**
+ * Sets up a list of names of known builtin types.
+ */
+ void setupBuiltinTypeNames();
+
+ /**
+ * Checks whether the given @p tag is equal to the given @p token and
+ * the given @p namespaceToken is the XML Schema namespace.
+ */
+ inline bool isSchemaTag(XsdSchemaToken::NodeName tag, XsdSchemaToken::NodeName token, XsdSchemaToken::NodeName namespaceToken) const;
+
+ XsdSchemaContext::Ptr m_context;
+ XsdSchemaParserContext::Ptr m_parserContext;
+ NamePool::Ptr m_namePool;
+ NamespaceSupport m_namespaceSupport;
+ XsdSchemaResolver::Ptr m_schemaResolver;
+ XsdSchema::Ptr m_schema;
+
+ QString m_targetNamespace;
+ QString m_attributeFormDefault;
+ QString m_elementFormDefault;
+ QString m_blockDefault;
+ QString m_finalDefault;
+ QString m_xpathDefaultNamespace;
+ QXmlName m_defaultAttributes;
+ XsdComplexType::OpenContent::Ptr m_defaultOpenContent;
+ bool m_defaultOpenContentAppliesToEmpty;
+
+ NamespaceSet m_includedSchemas;
+ NamespaceSet m_importedSchemas;
+ NamespaceSet m_redefinedSchemas;
+ QUrl m_documentURI;
+ XsdIdCache::Ptr m_idCache;
+ QHash<XsdTagScope::Type, XsdStateMachine<XsdSchemaToken::NodeName> > m_stateMachines;
+ ComponentLocationHash m_componentLocationHash;
+ QSet<QXmlName> m_builtinTypeNames;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp b/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp
new file mode 100644
index 0000000..abd6262
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp
@@ -0,0 +1,1110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemaparser_p.h"
+
+#include "qbuiltintypes_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/**
+ * @page using_dfa_for_schema Using DFA for validation of correct XML tag occurrence
+ *
+ * This page describes how to use DFAs for validating that the XML child tags of an
+ * XML parent tag occur in the right order.
+ *
+ * To validate the occurence of XML tags one need a regular expression that describes
+ * which tags can appear how often in what context. For example the regular expression
+ * of the global <em>attribute</em> tag in XML Schema is (annotation?, simpleType?).
+ * That means the <em>attribute</em> tag can contain an <em>annotation</em> tag followed
+ * by a <em>simpleType</em> tag, or just one <em>simpleType</em> tag and even no child
+ * tag at all.
+ * So the regular expression describes some kind of language and all the various occurrences
+ * of the child tags can be seen as words of that language.
+ * We can create a DFA now, that accepts all words (and only these words) of that language
+ * and whenever we want to check if a sequence of child tags belongs to the language,
+ * we test if the sequence passes the DFA successfully.
+ *
+ * The following example shows how to create the DFA for the regular expression method
+ * above.
+ *
+ * \dotfile GlobalAttribute_diagram.dot
+ *
+ * At first we need a start state (1), that's the state the DFA is before it
+ * starts running. As our regular expression allows that there are no child tags, the
+ * start state is an end state as well (marked by the double circle).
+ * Now we fetch the first token from the XML file (let's assume it is an <em>annotation</em> tag)
+ * and check if there is an edge labled with the tag name leaving the current state of the DFA.
+ * If there is no such edge, the input doesn't fullfill the rules of the regular expression,
+ * so we throw an error. Otherwise we follow that edge and the DFA is set to the new state (2) the
+ * edge points to. Now we fetch the next token from the XML file and do the previous steps again.
+ * If there is no further input from the XML file, we check whether the DFA is in an end state and
+ * throw an error if not.
+ *
+ * So the algorithm for checking is quite simple, the whole logic is encoded in the DFA and creating
+ * one for a regular expression is sometimes not easy, however the ones for XML Schema are straight
+ * forward.
+ *
+ * <h2>Legend:</h2>
+ * \dotfile legend.dot
+ * <br>
+ *
+ * <h2>DFA for <em>all</em> tag</h2>
+ * \dotfile All_diagram.dot
+ * <br>
+ * <h2>DFA for <em>alternative</em> tag</h2>
+ * \dotfile Alternative_diagram.dot
+ * <br>
+ * <h2>DFA for <em>annotation</em> tag</h2>
+ * \dotfile Annotation_diagram.dot
+ * <br>
+ * <h2>DFA for <em>anyAttribute</em> tag</h2>
+ * \dotfile AnyAttribute_diagram.dot
+ * <br>
+ * <h2>DFA for <em>any</em> tag</h2>
+ * \dotfile Any_diagram.dot
+ * <br>
+ * <h2>DFA for <em>assert</em> tag</h2>
+ * \dotfile Assert_diagram.dot
+ * <br>
+ * <h2>DFA for <em>choice</em> tag</h2>
+ * \dotfile Choice_diagram.dot
+ * <br>
+ * <h2>DFA for <em>complexContent</em> tag</h2>
+ * \dotfile ComplexContent_diagram.dot
+ * <br>
+ * <h2>DFA for <em>extension</em> tag inside a <em>complexContent</em> tag</h2>
+ * \dotfile ComplexContentExtension_diagram.dot
+ * <br>
+ * <h2>DFA for <em>restriction</em> tag inside a <em>complexContent</em> tag</h2>
+ * \dotfile ComplexContentRestriction_diagram.dot
+ * <br>
+ * <h2>DFA for <em>defaultOpenContent</em> tag</h2>
+ * \dotfile DefaultOpenContent_diagram.dot
+ * <br>
+ * <h2>DFA for <em>enumeration</em> tag</h2>
+ * \dotfile EnumerationFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>field</em> tag</h2>
+ * \dotfile Field_diagram.dot
+ * <br>
+ * <h2>DFA for <em>fractionDigits</em> tag</h2>
+ * \dotfile FractionDigitsFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>attribute</em> tag</h2>
+ * \dotfile GlobalAttribute_diagram.dot
+ * <br>
+ * <h2>DFA for <em>complexType</em> tag</h2>
+ * \dotfile GlobalComplexType_diagram.dot
+ * <br>
+ * <h2>DFA for <em>element</em> tag</h2>
+ * \dotfile GlobalElement_diagram.dot
+ * <br>
+ * <h2>DFA for <em>simpleType</em> tag</h2>
+ * \dotfile GlobalSimpleType_diagram.dot
+ * <br>
+ * <h2>DFA for <em>import</em> tag</h2>
+ * \dotfile Import_diagram.dot
+ * <br>
+ * <h2>DFA for <em>include</em> tag</h2>
+ * \dotfile Include_diagram.dot
+ * <br>
+ * <h2>DFA for <em>key</em> tag</h2>
+ * \dotfile Key_diagram.dot
+ * <br>
+ * <h2>DFA for <em>keyref</em> tag</h2>
+ * \dotfile KeyRef_diagram.dot
+ * <br>
+ * <h2>DFA for <em>length</em> tag</h2>
+ * \dotfile LengthFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>list</em> tag</h2>
+ * \dotfile List_diagram.dot
+ * <br>
+ * <h2>DFA for <em>all</em> tag</h2>
+ * \dotfile LocalAll_diagram.dot
+ * <br>
+ * <h2>DFA for <em>attribute</em> tag</h2>
+ * \dotfile LocalAttribute_diagram.dot
+ * <br>
+ * <h2>DFA for <em>choice</em> tag</h2>
+ * \dotfile LocalChoice_diagram.dot
+ * <br>
+ * <h2>DFA for <em>complexType</em> tag</h2>
+ * \dotfile LocalComplexType_diagram.dot
+ * <br>
+ * <h2>DFA for <em>element</em> tag</h2>
+ * \dotfile LocalElement_diagram.dot
+ * <br>
+ * <h2>DFA for <em>sequence</em> tag</h2>
+ * \dotfile LocalSequence_diagram.dot
+ * <br>
+ * <h2>DFA for <em>simpleType</em> tag that </h2>
+ * \dotfile LocalSimpleType_diagram.dot
+ * <br>
+ * <h2>DFA for <em>maxExclusive</em> tag</h2>
+ * \dotfile MaxExclusiveFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>maxInclusive</em> tag</h2>
+ * \dotfile MaxInclusiveFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>maxLength</em> tag</h2>
+ * \dotfile MaxLengthFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>minExclusive</em> tag</h2>
+ * \dotfile MinExclusiveFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>minInclusive</em> tag</h2>
+ * \dotfile MinInclusiveFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>minLength</em> tag</h2>
+ * \dotfile MinLengthFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>attributeGroup</em> tag without <em>ref</em> attribute</h2>
+ * \dotfile NamedAttributeGroup_diagram.dot
+ * <br>
+ * <h2>DFA for <em>group</em> tag without <em>ref</em> attribute</h2>
+ * \dotfile NamedGroup_diagram.dot
+ * <br>
+ * <h2>DFA for <em>notation</em> tag</h2>
+ * \dotfile Notation_diagram.dot
+ * <br>
+ * <h2>DFA for <em>override</em> tag</h2>
+ * \dotfile Override_diagram.dot
+ * <br>
+ * <h2>DFA for <em>pattern</em> tag</h2>
+ * \dotfile PatternFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>redefine</em> tag</h2>
+ * \dotfile Redefine_diagram.dot
+ * <br>
+ * <h2>DFA for <em>attributeGroup</em> tag with <em>ref</em> attribute</h2>
+ * \dotfile ReferredAttributeGroup_diagram.dot
+ * <br>
+ * <h2>DFA for <em>group</em> tag with <em>ref</em> attribute</h2>
+ * \dotfile ReferredGroup_diagram.dot
+ * <br>
+ * <h2>DFA for <em>schema</em> tag</h2>
+ * \dotfile Schema_diagram.dot
+ * <br>
+ * <h2>DFA for <em>selector</em> tag</h2>
+ * \dotfile Selector_diagram.dot
+ * <br>
+ * <h2>DFA for <em>sequence</em> tag</h2>
+ * \dotfile Sequence_diagram.dot
+ * <br>
+ * <h2>DFA for <em>simpleContent</em> tag</h2>
+ * \dotfile SimpleContent_diagram.dot
+ * <br>
+ * <h2>DFA for <em>extension</em> tag inside a <em>simpleContent</em> tag</h2>
+ * \dotfile SimpleContentExtension_diagram.dot
+ * <br>
+ * <h2>DFA for <em>restriction</em> tag inside a <em>simpleContent</em> tag</h2>
+ * \dotfile SimpleContentRestriction_diagram.dot
+ * <br>
+ * <h2>DFA for <em>restriction</em> tag inside a <em>simpleType</em> tag</h2>
+ * \dotfile SimpleRestriction_diagram.dot
+ * <br>
+ * <h2>DFA for <em>totalDigits</em> tag</h2>
+ * \dotfile TotalDigitsFacet_diagram.dot
+ * <br>
+ * <h2>DFA for <em>union</em> tag</h2>
+ * \dotfile Union_diagram.dot
+ * <br>
+ * <h2>DFA for <em>unique</em> tag</h2>
+ * \dotfile Unique_diagram.dot
+ * <br>
+ * <h2>DFA for <em>whiteSpace</em> tag</h2>
+ * \dotfile WhiteSpaceFacet_diagram.dot
+ */
+
+void XsdSchemaParser::setupStateMachines()
+{
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, simpleType?) : attribute
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+
+ m_stateMachines.insert(XsdTagScope::GlobalAttribute, machine);
+ m_stateMachines.insert(XsdTagScope::LocalAttribute, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, ((simpleType | complexType)?, alternative*, (unique | key | keyref)*)) : element
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s4 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(startState, XsdSchemaToken::ComplexType, s2);
+ machine.addTransition(startState, XsdSchemaToken::Alternative, s3);
+ machine.addTransition(startState, XsdSchemaToken::Unique, s4);
+ machine.addTransition(startState, XsdSchemaToken::Key, s4);
+ machine.addTransition(startState, XsdSchemaToken::Keyref, s4);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(s1, XsdSchemaToken::ComplexType, s2);
+ machine.addTransition(s1, XsdSchemaToken::Alternative, s3);
+ machine.addTransition(s1, XsdSchemaToken::Unique, s4);
+ machine.addTransition(s1, XsdSchemaToken::Key, s4);
+ machine.addTransition(s1, XsdSchemaToken::Keyref, s4);
+
+ machine.addTransition(s2, XsdSchemaToken::Alternative, s3);
+ machine.addTransition(s2, XsdSchemaToken::Unique, s4);
+ machine.addTransition(s2, XsdSchemaToken::Key, s4);
+ machine.addTransition(s2, XsdSchemaToken::Keyref, s4);
+
+ machine.addTransition(s3, XsdSchemaToken::Alternative, s3);
+ machine.addTransition(s3, XsdSchemaToken::Unique, s4);
+ machine.addTransition(s3, XsdSchemaToken::Key, s4);
+ machine.addTransition(s3, XsdSchemaToken::Keyref, s4);
+
+ machine.addTransition(s4, XsdSchemaToken::Unique, s4);
+ machine.addTransition(s4, XsdSchemaToken::Key, s4);
+ machine.addTransition(s4, XsdSchemaToken::Keyref, s4);
+
+ m_stateMachines.insert(XsdTagScope::GlobalElement, machine);
+ m_stateMachines.insert(XsdTagScope::LocalElement, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (simpleContent | complexContent | (openContent?, (group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?), assert*))) : complexType
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s4 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s5 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s6 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s7 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleContent, s2);
+ machine.addTransition(startState, XsdSchemaToken::ComplexContent, s2);
+ machine.addTransition(startState, XsdSchemaToken::OpenContent, s3);
+ machine.addTransition(startState, XsdSchemaToken::Group, s4);
+ machine.addTransition(startState, XsdSchemaToken::All, s4);
+ machine.addTransition(startState, XsdSchemaToken::Choice, s4);
+ machine.addTransition(startState, XsdSchemaToken::Sequence, s4);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s5);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s5);
+ machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s6);
+ machine.addTransition(startState, XsdSchemaToken::Assert, s7);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleContent, s2);
+ machine.addTransition(s1, XsdSchemaToken::ComplexContent, s2);
+ machine.addTransition(s1, XsdSchemaToken::OpenContent, s3);
+ machine.addTransition(s1, XsdSchemaToken::Group, s4);
+ machine.addTransition(s1, XsdSchemaToken::All, s4);
+ machine.addTransition(s1, XsdSchemaToken::Choice, s4);
+ machine.addTransition(s1, XsdSchemaToken::Sequence, s4);
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s5);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s5);
+ machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s6);
+ machine.addTransition(s1, XsdSchemaToken::Assert, s7);
+
+ machine.addTransition(s3, XsdSchemaToken::Group, s4);
+ machine.addTransition(s3, XsdSchemaToken::All, s4);
+ machine.addTransition(s3, XsdSchemaToken::Choice, s4);
+ machine.addTransition(s3, XsdSchemaToken::Sequence, s4);
+ machine.addTransition(s3, XsdSchemaToken::Attribute, s5);
+ machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s5);
+ machine.addTransition(s3, XsdSchemaToken::AnyAttribute, s6);
+ machine.addTransition(s3, XsdSchemaToken::Assert, s7);
+
+ machine.addTransition(s4, XsdSchemaToken::Attribute, s5);
+ machine.addTransition(s4, XsdSchemaToken::AttributeGroup, s5);
+ machine.addTransition(s4, XsdSchemaToken::AnyAttribute, s6);
+ machine.addTransition(s4, XsdSchemaToken::Assert, s7);
+
+ machine.addTransition(s5, XsdSchemaToken::Attribute, s5);
+ machine.addTransition(s5, XsdSchemaToken::AttributeGroup, s5);
+ machine.addTransition(s5, XsdSchemaToken::AnyAttribute, s6);
+ machine.addTransition(s5, XsdSchemaToken::Assert, s7);
+
+ machine.addTransition(s6, XsdSchemaToken::Assert, s7);
+
+ machine.addTransition(s7, XsdSchemaToken::Assert, s7);
+
+ m_stateMachines.insert(XsdTagScope::GlobalComplexType, machine);
+ m_stateMachines.insert(XsdTagScope::LocalComplexType, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (restriction | extension)) : simpleContent/complexContent
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::InternalState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Restriction, s2);
+ machine.addTransition(startState, XsdSchemaToken::Extension, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::Restriction, s2);
+ machine.addTransition(s1, XsdSchemaToken::Extension, s2);
+
+ m_stateMachines.insert(XsdTagScope::SimpleContent, machine);
+ m_stateMachines.insert(XsdTagScope::ComplexContent, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern | assertion)*)?, ((attribute | attributeGroup)*, anyAttribute?), assert*) : simpleContent restriction
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s4 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s5 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s6 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(startState, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(startState, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(startState, XsdSchemaToken::Length, s3);
+ machine.addTransition(startState, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(startState, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(startState, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(startState, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(startState, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(startState, XsdSchemaToken::Assertion, s3);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(startState, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(s1, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(s1, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(s1, XsdSchemaToken::Length, s3);
+ machine.addTransition(s1, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(s1, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(s1, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(s1, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(s1, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(s1, XsdSchemaToken::Assertion, s3);
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s1, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s2, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(s2, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(s2, XsdSchemaToken::Length, s3);
+ machine.addTransition(s2, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(s2, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(s2, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(s2, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(s2, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(s2, XsdSchemaToken::Assertion, s3);
+ machine.addTransition(s2, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s2, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s3, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(s3, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(s3, XsdSchemaToken::Length, s3);
+ machine.addTransition(s3, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(s3, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(s3, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(s3, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(s3, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(s3, XsdSchemaToken::Assertion, s3);
+ machine.addTransition(s3, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s3, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s3, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s4, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s4, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s4, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s4, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s5, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s6, XsdSchemaToken::Assert, s6);
+
+ m_stateMachines.insert(XsdTagScope::SimpleContentRestriction, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, ((attribute | attributeGroup)*, anyAttribute?), assert*) : simple content extension
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s4 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s2);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s2);
+ machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s3);
+ machine.addTransition(startState, XsdSchemaToken::Assert, s4);
+
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s2);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s2);
+ machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s3);
+ machine.addTransition(s1, XsdSchemaToken::Assert, s4);
+
+ machine.addTransition(s2, XsdSchemaToken::Attribute, s2);
+ machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s2);
+ machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s3);
+ machine.addTransition(s2, XsdSchemaToken::Assert, s4);
+
+ machine.addTransition(s3, XsdSchemaToken::Assert, s4);
+
+ machine.addTransition(s4, XsdSchemaToken::Assert, s4);
+
+ m_stateMachines.insert(XsdTagScope::SimpleContentExtension, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, openContent?, ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?), assert*)) : complex content restriction/complex content extension
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s4 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s5 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s6 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::OpenContent, s2);
+ machine.addTransition(startState, XsdSchemaToken::Group, s3);
+ machine.addTransition(startState, XsdSchemaToken::All, s3);
+ machine.addTransition(startState, XsdSchemaToken::Choice, s3);
+ machine.addTransition(startState, XsdSchemaToken::Sequence, s3);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(startState, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s1, XsdSchemaToken::OpenContent, s2);
+ machine.addTransition(s1, XsdSchemaToken::Group, s3);
+ machine.addTransition(s1, XsdSchemaToken::All, s3);
+ machine.addTransition(s1, XsdSchemaToken::Choice, s3);
+ machine.addTransition(s1, XsdSchemaToken::Sequence, s3);
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s1, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s2, XsdSchemaToken::Group, s3);
+ machine.addTransition(s2, XsdSchemaToken::All, s3);
+ machine.addTransition(s2, XsdSchemaToken::Choice, s3);
+ machine.addTransition(s2, XsdSchemaToken::Sequence, s3);
+ machine.addTransition(s2, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s2, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s3, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s3, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s3, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s4, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s4, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s4, XsdSchemaToken::AnyAttribute, s5);
+ machine.addTransition(s4, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s5, XsdSchemaToken::Assert, s6);
+
+ machine.addTransition(s6, XsdSchemaToken::Assert, s6);
+
+ m_stateMachines.insert(XsdTagScope::ComplexContentRestriction, machine);
+ m_stateMachines.insert(XsdTagScope::ComplexContentExtension, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, ((attribute | attributeGroup)*, anyAttribute?)) : named attribute group
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s2);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s2);
+ machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s3);
+
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s2);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s2);
+ machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s3);
+
+ machine.addTransition(s2, XsdSchemaToken::Attribute, s2);
+ machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s2);
+ machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s3);
+
+ m_stateMachines.insert(XsdTagScope::NamedAttributeGroup, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (all | choice | sequence)?) : group
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::All, s2);
+ machine.addTransition(startState, XsdSchemaToken::Choice, s2);
+ machine.addTransition(startState, XsdSchemaToken::Sequence, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::All, s2);
+ machine.addTransition(s1, XsdSchemaToken::Choice, s2);
+ machine.addTransition(s1, XsdSchemaToken::Sequence, s2);
+
+ m_stateMachines.insert(XsdTagScope::NamedGroup, machine);
+ m_stateMachines.insert(XsdTagScope::ReferredGroup, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (element | any)*) : all
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Element, s2);
+ machine.addTransition(startState, XsdSchemaToken::Any, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::Element, s2);
+ machine.addTransition(s1, XsdSchemaToken::Any, s2);
+
+ machine.addTransition(s2, XsdSchemaToken::Element, s2);
+ machine.addTransition(s2, XsdSchemaToken::Any, s2);
+
+ m_stateMachines.insert(XsdTagScope::All, machine);
+ m_stateMachines.insert(XsdTagScope::LocalAll, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (element | group | choice | sequence | any)*) : choice sequence
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Element, s2);
+ machine.addTransition(startState, XsdSchemaToken::Group, s2);
+ machine.addTransition(startState, XsdSchemaToken::Choice, s2);
+ machine.addTransition(startState, XsdSchemaToken::Sequence, s2);
+ machine.addTransition(startState, XsdSchemaToken::Any, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::Element, s2);
+ machine.addTransition(s1, XsdSchemaToken::Group, s2);
+ machine.addTransition(s1, XsdSchemaToken::Choice, s2);
+ machine.addTransition(s1, XsdSchemaToken::Sequence, s2);
+ machine.addTransition(s1, XsdSchemaToken::Any, s2);
+
+ machine.addTransition(s2, XsdSchemaToken::Element, s2);
+ machine.addTransition(s2, XsdSchemaToken::Group, s2);
+ machine.addTransition(s2, XsdSchemaToken::Choice, s2);
+ machine.addTransition(s2, XsdSchemaToken::Sequence, s2);
+ machine.addTransition(s2, XsdSchemaToken::Any, s2);
+
+ m_stateMachines.insert(XsdTagScope::Choice, machine);
+ m_stateMachines.insert(XsdTagScope::LocalChoice, machine);
+ m_stateMachines.insert(XsdTagScope::Sequence, machine);
+ m_stateMachines.insert(XsdTagScope::LocalSequence, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?) : any/selector/field/notation/include/import/referred attribute group/anyAttribute/all facets/assert
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+
+ m_stateMachines.insert(XsdTagScope::Any, machine);
+ m_stateMachines.insert(XsdTagScope::Selector, machine);
+ m_stateMachines.insert(XsdTagScope::Field, machine);
+ m_stateMachines.insert(XsdTagScope::Notation, machine);
+ m_stateMachines.insert(XsdTagScope::Include, machine);
+ m_stateMachines.insert(XsdTagScope::Import, machine);
+ m_stateMachines.insert(XsdTagScope::ReferredAttributeGroup, machine);
+ m_stateMachines.insert(XsdTagScope::AnyAttribute, machine);
+ m_stateMachines.insert(XsdTagScope::MinExclusiveFacet, machine);
+ m_stateMachines.insert(XsdTagScope::MinInclusiveFacet, machine);
+ m_stateMachines.insert(XsdTagScope::MaxExclusiveFacet, machine);
+ m_stateMachines.insert(XsdTagScope::MaxInclusiveFacet, machine);
+ m_stateMachines.insert(XsdTagScope::TotalDigitsFacet, machine);
+ m_stateMachines.insert(XsdTagScope::FractionDigitsFacet, machine);
+ m_stateMachines.insert(XsdTagScope::LengthFacet, machine);
+ m_stateMachines.insert(XsdTagScope::MinLengthFacet, machine);
+ m_stateMachines.insert(XsdTagScope::MaxLengthFacet, machine);
+ m_stateMachines.insert(XsdTagScope::EnumerationFacet, machine);
+ m_stateMachines.insert(XsdTagScope::WhiteSpaceFacet, machine);
+ m_stateMachines.insert(XsdTagScope::PatternFacet, machine);
+ m_stateMachines.insert(XsdTagScope::Assert, machine);
+ m_stateMachines.insert(XsdTagScope::Assertion, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (selector, field+)) : unique/key/keyref
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::InternalState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::InternalState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Selector, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::Selector, s2);
+ machine.addTransition(s2, XsdSchemaToken::Field, s3);
+ machine.addTransition(s3, XsdSchemaToken::Field, s3);
+
+ m_stateMachines.insert(XsdTagScope::Unique, machine);
+ m_stateMachines.insert(XsdTagScope::Key, machine);
+ m_stateMachines.insert(XsdTagScope::KeyRef, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (simpleType | complexType)?) : alternative
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(startState, XsdSchemaToken::ComplexType, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(s1, XsdSchemaToken::ComplexType, s2);
+
+ m_stateMachines.insert(XsdTagScope::Alternative, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (appinfo | documentation)* : annotation
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Appinfo, s1);
+ machine.addTransition(startState, XsdSchemaToken::Documentation, s1);
+
+ machine.addTransition(s1, XsdSchemaToken::Appinfo, s1);
+ machine.addTransition(s1, XsdSchemaToken::Documentation, s1);
+
+ m_stateMachines.insert(XsdTagScope::Annotation, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (restriction | list | union)) : simpleType
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::InternalState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Restriction, s2);
+ machine.addTransition(startState, XsdSchemaToken::List, s2);
+ machine.addTransition(startState, XsdSchemaToken::Union, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::Restriction, s2);
+ machine.addTransition(s1, XsdSchemaToken::List, s2);
+ machine.addTransition(s1, XsdSchemaToken::Union, s2);
+
+ m_stateMachines.insert(XsdTagScope::GlobalSimpleType, machine);
+ m_stateMachines.insert(XsdTagScope::LocalSimpleType, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern | assertion)*)) : simple type restriction
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(startState, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(startState, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(startState, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(startState, XsdSchemaToken::Length, s3);
+ machine.addTransition(startState, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(startState, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(startState, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(startState, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(startState, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(startState, XsdSchemaToken::Assertion, s3);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(s1, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(s1, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(s1, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(s1, XsdSchemaToken::Length, s3);
+ machine.addTransition(s1, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(s1, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(s1, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(s1, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(s1, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(s1, XsdSchemaToken::Assertion, s3);
+
+ machine.addTransition(s2, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(s2, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(s2, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(s2, XsdSchemaToken::Length, s3);
+ machine.addTransition(s2, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(s2, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(s2, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(s2, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(s2, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(s2, XsdSchemaToken::Assertion, s3);
+
+ machine.addTransition(s3, XsdSchemaToken::MinExclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::MinInclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::MaxExclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::MaxInclusive, s3);
+ machine.addTransition(s3, XsdSchemaToken::TotalDigits, s3);
+ machine.addTransition(s3, XsdSchemaToken::FractionDigits, s3);
+ machine.addTransition(s3, XsdSchemaToken::Length, s3);
+ machine.addTransition(s3, XsdSchemaToken::MinLength, s3);
+ machine.addTransition(s3, XsdSchemaToken::MaxLength, s3);
+ machine.addTransition(s3, XsdSchemaToken::Enumeration, s3);
+ machine.addTransition(s3, XsdSchemaToken::WhiteSpace, s3);
+ machine.addTransition(s3, XsdSchemaToken::Pattern, s3);
+ machine.addTransition(s3, XsdSchemaToken::Assertion, s3);
+
+ m_stateMachines.insert(XsdTagScope::SimpleRestriction, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, simpleType?) : list
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+
+ m_stateMachines.insert(XsdTagScope::List, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, simpleType*) : union
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s2);
+ machine.addTransition(s2, XsdSchemaToken::SimpleType, s2);
+
+ m_stateMachines.insert(XsdTagScope::Union, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for ((include | import | redefine |i override | annotation)*, (defaultOpenContent, annotation*)?, (((simpleType | complexType | group | attributeGroup) | element | attribute | notation), annotation*)*) : schema
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s3 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s4 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s5 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Include, s1);
+ machine.addTransition(startState, XsdSchemaToken::Import, s1);
+ machine.addTransition(startState, XsdSchemaToken::Redefine, s1);
+ machine.addTransition(startState, XsdSchemaToken::Override, s1);
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::DefaultOpenContent, s2);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s4);
+ machine.addTransition(startState, XsdSchemaToken::ComplexType, s4);
+ machine.addTransition(startState, XsdSchemaToken::Group, s4);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(startState, XsdSchemaToken::Element, s4);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(startState, XsdSchemaToken::Notation, s4);
+
+ machine.addTransition(s1, XsdSchemaToken::Include, s1);
+ machine.addTransition(s1, XsdSchemaToken::Import, s1);
+ machine.addTransition(s1, XsdSchemaToken::Redefine, s1);
+ machine.addTransition(s1, XsdSchemaToken::Override, s1);
+ machine.addTransition(s1, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(s1, XsdSchemaToken::DefaultOpenContent, s2);
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s4);
+ machine.addTransition(s1, XsdSchemaToken::ComplexType, s4);
+ machine.addTransition(s1, XsdSchemaToken::Group, s4);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s1, XsdSchemaToken::Element, s4);
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s1, XsdSchemaToken::Notation, s4);
+
+ machine.addTransition(s2, XsdSchemaToken::Annotation, s3);
+ machine.addTransition(s2, XsdSchemaToken::SimpleType, s4);
+ machine.addTransition(s2, XsdSchemaToken::ComplexType, s4);
+ machine.addTransition(s2, XsdSchemaToken::Group, s4);
+ machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s2, XsdSchemaToken::Element, s4);
+ machine.addTransition(s2, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s2, XsdSchemaToken::Notation, s4);
+
+ machine.addTransition(s3, XsdSchemaToken::SimpleType, s4);
+ machine.addTransition(s3, XsdSchemaToken::ComplexType, s4);
+ machine.addTransition(s3, XsdSchemaToken::Group, s4);
+ machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s3, XsdSchemaToken::Element, s4);
+ machine.addTransition(s3, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s3, XsdSchemaToken::Notation, s4);
+
+ machine.addTransition(s4, XsdSchemaToken::SimpleType, s4);
+ machine.addTransition(s4, XsdSchemaToken::ComplexType, s4);
+ machine.addTransition(s4, XsdSchemaToken::Group, s4);
+ machine.addTransition(s4, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s4, XsdSchemaToken::Element, s4);
+ machine.addTransition(s4, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s4, XsdSchemaToken::Notation, s4);
+ machine.addTransition(s4, XsdSchemaToken::Annotation, s5);
+
+ machine.addTransition(s5, XsdSchemaToken::SimpleType, s4);
+ machine.addTransition(s5, XsdSchemaToken::ComplexType, s4);
+ machine.addTransition(s5, XsdSchemaToken::Group, s4);
+ machine.addTransition(s5, XsdSchemaToken::AttributeGroup, s4);
+ machine.addTransition(s5, XsdSchemaToken::Element, s4);
+ machine.addTransition(s5, XsdSchemaToken::Attribute, s4);
+ machine.addTransition(s5, XsdSchemaToken::Notation, s4);
+ machine.addTransition(s5, XsdSchemaToken::Annotation, s5);
+
+ m_stateMachines.insert(XsdTagScope::Schema, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation?, any) : defaultOpenContent
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::InternalState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s2 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::Any, s2);
+
+ machine.addTransition(s1, XsdSchemaToken::Any, s2);
+
+ m_stateMachines.insert(XsdTagScope::DefaultOpenContent, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation | (simpleType | complexType | group | attributeGroup))* : redefine
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s1);
+ machine.addTransition(startState, XsdSchemaToken::ComplexType, s1);
+ machine.addTransition(startState, XsdSchemaToken::Group, s1);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s1);
+
+ machine.addTransition(s1, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s1);
+ machine.addTransition(s1, XsdSchemaToken::ComplexType, s1);
+ machine.addTransition(s1, XsdSchemaToken::Group, s1);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s1);
+
+ m_stateMachines.insert(XsdTagScope::Redefine, machine);
+ }
+
+ {
+ XsdStateMachine<XsdSchemaToken::NodeName> machine(m_namePool);
+
+ // setup state machine for (annotation | (simpleType | complexType | group | attributeGroup | element | attribute | notation))* : override
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId startState = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::StartEndState);
+ const XsdStateMachine<XsdSchemaToken::NodeName>::StateId s1 = machine.addState(XsdStateMachine<XsdSchemaToken::NodeName>::EndState);
+
+ machine.addTransition(startState, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(startState, XsdSchemaToken::SimpleType, s1);
+ machine.addTransition(startState, XsdSchemaToken::ComplexType, s1);
+ machine.addTransition(startState, XsdSchemaToken::Group, s1);
+ machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s1);
+ machine.addTransition(startState, XsdSchemaToken::Element, s1);
+ machine.addTransition(startState, XsdSchemaToken::Attribute, s1);
+ machine.addTransition(startState, XsdSchemaToken::Notation, s1);
+
+ machine.addTransition(s1, XsdSchemaToken::Annotation, s1);
+ machine.addTransition(s1, XsdSchemaToken::SimpleType, s1);
+ machine.addTransition(s1, XsdSchemaToken::ComplexType, s1);
+ machine.addTransition(s1, XsdSchemaToken::Group, s1);
+ machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s1);
+ machine.addTransition(s1, XsdSchemaToken::Element, s1);
+ machine.addTransition(s1, XsdSchemaToken::Attribute, s1);
+ machine.addTransition(s1, XsdSchemaToken::Notation, s1);
+
+ m_stateMachines.insert(XsdTagScope::Override, machine);
+ }
+}
+
+void XsdSchemaParser::setupBuiltinTypeNames()
+{
+ m_builtinTypeNames.reserve(48);
+
+ m_builtinTypeNames.insert(BuiltinTypes::xsAnyType->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsAnySimpleType->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsUntyped->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsAnyAtomicType->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsUntypedAtomic->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsDateTime->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsDate->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsTime->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsDuration->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsYearMonthDuration->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsDayTimeDuration->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsFloat->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsDouble->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsInteger->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsDecimal->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNonPositiveInteger->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNegativeInteger->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsLong->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsInt->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsShort->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsByte->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNonNegativeInteger->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsUnsignedLong->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsUnsignedInt->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsUnsignedShort->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsUnsignedByte->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsPositiveInteger->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsGYearMonth->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsGYear->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsGMonthDay->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsGDay->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsGMonth->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsBoolean->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsBase64Binary->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsHexBinary->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsAnyURI->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsQName->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsString->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNormalizedString->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsToken->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsLanguage->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNMTOKEN->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsName->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNCName->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsID->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsIDREF->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsENTITY->name(m_namePool));
+ m_builtinTypeNames.insert(BuiltinTypes::xsNOTATION->name(m_namePool));
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp b/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp
new file mode 100644
index 0000000..0f711d8
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp
@@ -0,0 +1,603 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemaparsercontext_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaParserContext::XsdSchemaParserContext(const NamePool::Ptr &namePool, const XsdSchemaContext::Ptr &context)
+ : m_namePool(namePool)
+ , m_schema(new XsdSchema(m_namePool))
+ , m_checker(new XsdSchemaChecker(context, this))
+ , m_resolver(new XsdSchemaResolver(context, this))
+ , m_elementDescriptions(setupElementDescriptions())
+{
+}
+
+NamePool::Ptr XsdSchemaParserContext::namePool() const
+{
+ return m_namePool;
+}
+
+XsdSchemaResolver::Ptr XsdSchemaParserContext::resolver() const
+{
+ return m_resolver;
+}
+
+XsdSchemaChecker::Ptr XsdSchemaParserContext::checker() const
+{
+ return m_checker;
+}
+
+XsdSchema::Ptr XsdSchemaParserContext::schema() const
+{
+ return m_schema;
+}
+
+ElementDescription<XsdSchemaToken, XsdTagScope::Type>::Hash XsdSchemaParserContext::elementDescriptions() const
+{
+ return m_elementDescriptions;
+}
+
+QXmlName XsdSchemaParserContext::createAnonymousName(const QString &targetNamespace) const
+{
+ m_anonymousNameCounter.ref();
+
+ const QString name = QString::fromLatin1("__AnonymousClass_%1").arg((int)m_anonymousNameCounter);
+
+ return m_namePool->allocateQName(targetNamespace, name);
+}
+
+ElementDescription<XsdSchemaToken, XsdTagScope::Type>::Hash XsdSchemaParserContext::setupElementDescriptions()
+{
+ enum
+ {
+ ReservedForElements = 60
+ };
+
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type>::Hash elementDescriptions;
+ elementDescriptions.reserve(ReservedForElements);
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Schema];
+ description.optionalAttributes.reserve(10);
+ //description.tagToken = XsdSchemaToken::Schema;
+ description.optionalAttributes.insert(XsdSchemaToken::AttributeFormDefault);
+ description.optionalAttributes.insert(XsdSchemaToken::BlockDefault);
+ description.optionalAttributes.insert(XsdSchemaToken::DefaultAttributes);
+ description.optionalAttributes.insert(XsdSchemaToken::XPathDefaultNamespace);
+ description.optionalAttributes.insert(XsdSchemaToken::ElementFormDefault);
+ description.optionalAttributes.insert(XsdSchemaToken::FinalDefault);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::TargetNamespace);
+ description.optionalAttributes.insert(XsdSchemaToken::Version);
+ description.optionalAttributes.insert(XsdSchemaToken::XmlLanguage);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Include];
+ //description.tagToken = XsdSchemaToken::Include;
+ description.requiredAttributes.insert(XsdSchemaToken::SchemaLocation);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Import];
+ //description.tagToken = XsdSchemaToken::Import;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Namespace);
+ description.optionalAttributes.insert(XsdSchemaToken::SchemaLocation);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Redefine];
+ //description.tagToken = XsdSchemaToken::Redefine;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::SchemaLocation);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Override];
+ //description.tagToken = XsdSchemaToken::Override;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::SchemaLocation);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Annotation];
+ //description.tagToken = XsdSchemaToken::Annotation;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::AppInfo];
+ //description.tagToken = XsdSchemaToken::Appinfo;
+ description.optionalAttributes.insert(XsdSchemaToken::Source);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Documentation];
+ //description.tagToken = XsdSchemaToken::Documentation;
+ description.optionalAttributes.insert(XsdSchemaToken::Source);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::GlobalSimpleType];
+ //description.tagToken = XsdSchemaToken::SimpleType;
+ description.optionalAttributes.insert(XsdSchemaToken::Final);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalSimpleType];
+ //description.tagToken = XsdSchemaToken::SimpleType;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::SimpleRestriction];
+ //description.tagToken = XsdSchemaToken::Restriction;
+ description.optionalAttributes.insert(XsdSchemaToken::Base);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::List];
+ //description.tagToken = XsdSchemaToken::List;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::ItemType);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Union];
+ //description.tagToken = XsdSchemaToken::Union;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MemberTypes);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::MinExclusiveFacet];
+ //description.tagToken = XsdSchemaToken::MinExclusive;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::MinInclusiveFacet];
+ //description.tagToken = XsdSchemaToken::MinInclusive;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::MaxExclusiveFacet];
+ //description.tagToken = XsdSchemaToken::MaxExclusive;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::MaxInclusiveFacet];
+ //description.tagToken = XsdSchemaToken::MaxInclusive;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::TotalDigitsFacet];
+ //description.tagToken = XsdSchemaToken::TotalDigits;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::FractionDigitsFacet];
+ //description.tagToken = XsdSchemaToken::FractionDigits;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LengthFacet];
+ //description.tagToken = XsdSchemaToken::Length;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::MinLengthFacet];
+ //description.tagToken = XsdSchemaToken::MinLength;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::MaxLengthFacet];
+ //description.tagToken = XsdSchemaToken::MaxLength;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::EnumerationFacet];
+ //description.tagToken = XsdSchemaToken::Enumeration;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::WhiteSpaceFacet];
+ //description.tagToken = XsdSchemaToken::WhiteSpace;
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::PatternFacet];
+ //description.tagToken = XsdSchemaToken::Pattern;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Value);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::GlobalComplexType];
+ description.optionalAttributes.reserve(7);
+ //description.tagToken = XsdSchemaToken::ComplexType;
+ description.optionalAttributes.insert(XsdSchemaToken::Abstract);
+ description.optionalAttributes.insert(XsdSchemaToken::Block);
+ description.optionalAttributes.insert(XsdSchemaToken::DefaultAttributesApply);
+ description.optionalAttributes.insert(XsdSchemaToken::Final);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Mixed);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalComplexType];
+ //description.tagToken = XsdSchemaToken::ComplexType;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Mixed);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::SimpleContent];
+ //description.tagToken = XsdSchemaToken::SimpleContent;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::SimpleContentRestriction];
+ //description.tagToken = XsdSchemaToken::Restriction;
+ description.requiredAttributes.insert(XsdSchemaToken::Base);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::SimpleContentExtension];
+ //description.tagToken = XsdSchemaToken::Extension;
+ description.requiredAttributes.insert(XsdSchemaToken::Base);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::ComplexContent];
+ //description.tagToken = XsdSchemaToken::ComplexContent;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Mixed);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::ComplexContentRestriction];
+ //description.tagToken = XsdSchemaToken::Restriction;
+ description.requiredAttributes.insert(XsdSchemaToken::Base);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::ComplexContentExtension];
+ //description.tagToken = XsdSchemaToken::Extension;
+ description.requiredAttributes.insert(XsdSchemaToken::Base);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::NamedGroup];
+ //description.tagToken = XsdSchemaToken::Group;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::ReferredGroup];
+ description.optionalAttributes.reserve(4);
+ //description.tagToken = XsdSchemaToken::Group;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MaxOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::MinOccurs);
+ description.requiredAttributes.insert(XsdSchemaToken::Ref);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::All];
+ //description.tagToken = XsdSchemaToken::All;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalAll];
+ //description.tagToken = XsdSchemaToken::All;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MaxOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::MinOccurs);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Choice];
+ //description.tagToken = XsdSchemaToken::Choice;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalChoice];
+ //description.tagToken = XsdSchemaToken::Choice;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MaxOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::MinOccurs);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Sequence];
+ //description.tagToken = XsdSchemaToken::Sequence;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalSequence];
+ //description.tagToken = XsdSchemaToken::Sequence;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MaxOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::MinOccurs);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::GlobalAttribute];
+ description.optionalAttributes.reserve(5);
+ //description.tagToken = XsdSchemaToken::Attribute;
+ description.optionalAttributes.insert(XsdSchemaToken::Default);
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ description.optionalAttributes.insert(XsdSchemaToken::Type);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalAttribute];
+ description.optionalAttributes.reserve(8);
+ //description.tagToken = XsdSchemaToken::Attribute;
+ description.optionalAttributes.insert(XsdSchemaToken::Default);
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Form);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Name);
+ description.optionalAttributes.insert(XsdSchemaToken::Ref);
+ description.optionalAttributes.insert(XsdSchemaToken::Type);
+ description.optionalAttributes.insert(XsdSchemaToken::Use);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::NamedAttributeGroup];
+ //description.tagToken = XsdSchemaToken::AttributeGroup;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::ReferredAttributeGroup];
+ //description.tagToken = XsdSchemaToken::AttributeGroup;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Ref);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::LocalElement];
+ description.optionalAttributes.reserve(11);
+ //description.tagToken = XsdSchemaToken::Element;
+ description.optionalAttributes.insert(XsdSchemaToken::Block);
+ description.optionalAttributes.insert(XsdSchemaToken::Default);
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Form);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MinOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::MaxOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::Name);
+ description.optionalAttributes.insert(XsdSchemaToken::Nillable);
+ description.optionalAttributes.insert(XsdSchemaToken::Ref);
+ description.optionalAttributes.insert(XsdSchemaToken::Type);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::GlobalElement];
+ description.optionalAttributes.reserve(10);
+ //description.tagToken = XsdSchemaToken::Element;
+ description.optionalAttributes.insert(XsdSchemaToken::Abstract);
+ description.optionalAttributes.insert(XsdSchemaToken::Block);
+ description.optionalAttributes.insert(XsdSchemaToken::Default);
+ description.optionalAttributes.insert(XsdSchemaToken::Final);
+ description.optionalAttributes.insert(XsdSchemaToken::Fixed);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ description.optionalAttributes.insert(XsdSchemaToken::Nillable);
+ description.optionalAttributes.insert(XsdSchemaToken::SubstitutionGroup);
+ description.optionalAttributes.insert(XsdSchemaToken::Type);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Unique];
+ //description.tagToken = XsdSchemaToken::Unique;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Key];
+ //description.tagToken = XsdSchemaToken::Key;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::KeyRef];
+ //description.tagToken = XsdSchemaToken::Keyref;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ description.requiredAttributes.insert(XsdSchemaToken::Refer);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Selector];
+ //description.tagToken = XsdSchemaToken::Selector;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Xpath);
+ description.optionalAttributes.insert(XsdSchemaToken::XPathDefaultNamespace);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Field];
+ //description.tagToken = XsdSchemaToken::Field;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Xpath);
+ description.optionalAttributes.insert(XsdSchemaToken::XPathDefaultNamespace);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Notation];
+ description.optionalAttributes.reserve(4);
+ //description.tagToken = XsdSchemaToken::Notation;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Name);
+ description.optionalAttributes.insert(XsdSchemaToken::Public);
+ description.optionalAttributes.insert(XsdSchemaToken::System);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Any];
+ description.optionalAttributes.reserve(7);
+ //description.tagToken = XsdSchemaToken::Any;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::MaxOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::MinOccurs);
+ description.optionalAttributes.insert(XsdSchemaToken::Namespace);
+ description.optionalAttributes.insert(XsdSchemaToken::NotNamespace);
+ description.optionalAttributes.insert(XsdSchemaToken::NotQName);
+ description.optionalAttributes.insert(XsdSchemaToken::ProcessContents);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::AnyAttribute];
+ description.optionalAttributes.reserve(5);
+ //description.tagToken = XsdSchemaToken::AnyAttribute;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Namespace);
+ description.optionalAttributes.insert(XsdSchemaToken::NotNamespace);
+ description.optionalAttributes.insert(XsdSchemaToken::NotQName);
+ description.optionalAttributes.insert(XsdSchemaToken::ProcessContents);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Alternative];
+ //description.tagToken = XsdSchemaToken::Alternative;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Test);
+ description.optionalAttributes.insert(XsdSchemaToken::Type);
+ description.optionalAttributes.insert(XsdSchemaToken::XPathDefaultNamespace);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::OpenContent];
+ //description.tagToken = XsdSchemaToken::OpenContent;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Mode);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::DefaultOpenContent];
+ //description.tagToken = XsdSchemaToken::DefaultOpenContent;
+ description.optionalAttributes.insert(XsdSchemaToken::AppliesToEmpty);
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.optionalAttributes.insert(XsdSchemaToken::Mode);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Assert];
+ //description.tagToken = XsdSchemaToken::Assert;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Test);
+ description.optionalAttributes.insert(XsdSchemaToken::XPathDefaultNamespace);
+ }
+
+ {
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type> &description = elementDescriptions[XsdTagScope::Assertion];
+ //description.tagToken = XsdSchemaToken::Assertion;
+ description.optionalAttributes.insert(XsdSchemaToken::Id);
+ description.requiredAttributes.insert(XsdSchemaToken::Test);
+ description.optionalAttributes.insert(XsdSchemaToken::XPathDefaultNamespace);
+ }
+
+ Q_ASSERT_X(elementDescriptions.count() == ReservedForElements, Q_FUNC_INFO,
+ qPrintable(QString::fromLatin1("Expected is %1, actual is %2.").arg(ReservedForElements).arg(elementDescriptions.count())));
+
+ return elementDescriptions;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h b/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h
new file mode 100644
index 0000000..572d5e3
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaParserContext_H
+#define Patternist_XsdSchemaParserContext_H
+
+#include "qmaintainingreader_p.h" // for definition of ElementDescription
+#include "qxsdschematoken_p.h"
+#include "qxsdschema_p.h"
+#include "qxsdschemachecker_p.h"
+#include "qxsdschemacontext_p.h"
+#include "qxsdschemaresolver_p.h"
+
+#include <QtCore/QSharedData>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A namespace class that contains identifiers for the different
+ * scopes a tag from the xml schema spec can appear in.
+ */
+ class XsdTagScope
+ {
+ public:
+ enum Type
+ {
+ Schema,
+ Include,
+ Import,
+ Redefine,
+ Annotation,
+ AppInfo,
+ Documentation,
+ GlobalSimpleType,
+ LocalSimpleType,
+ SimpleRestriction,
+ List,
+ Union,
+ MinExclusiveFacet,
+ MinInclusiveFacet,
+ MaxExclusiveFacet,
+ MaxInclusiveFacet,
+ TotalDigitsFacet,
+ FractionDigitsFacet,
+ LengthFacet,
+ MinLengthFacet,
+ MaxLengthFacet,
+ EnumerationFacet,
+ WhiteSpaceFacet,
+ PatternFacet,
+ GlobalComplexType,
+ LocalComplexType,
+ SimpleContent,
+ SimpleContentRestriction,
+ SimpleContentExtension,
+ ComplexContent,
+ ComplexContentRestriction,
+ ComplexContentExtension,
+ NamedGroup,
+ ReferredGroup,
+ All,
+ LocalAll,
+ Choice,
+ LocalChoice,
+ Sequence,
+ LocalSequence,
+ GlobalAttribute,
+ LocalAttribute,
+ NamedAttributeGroup,
+ ReferredAttributeGroup,
+ GlobalElement,
+ LocalElement,
+ Unique,
+ Key,
+ KeyRef,
+ Selector,
+ Field,
+ Notation,
+ Any,
+ AnyAttribute,
+ Alternative,
+ Assert,
+ Assertion,
+ OpenContent,
+ DefaultOpenContent,
+ Override
+ };
+ };
+
+ /**
+ * A hash that keeps the mapping between the single components that can appear
+ * in a schema document (e.g. elements, attributes, type definitions) and their
+ * source locations inside the document.
+ */
+ typedef QHash<NamedSchemaComponent::Ptr, QSourceLocation> ComponentLocationHash;
+
+ /**
+ * @short A context for schema parsing.
+ *
+ * This class provides a context for all components that are
+ * nedded for parsing and compiling the XML schema.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaParserContext : public QSharedData
+ {
+ public:
+ /**
+ * A smart pointer wrapping XsdSchemaParserContext instances.
+ */
+ typedef QExplicitlySharedDataPointer<XsdSchemaParserContext> Ptr;
+
+ /**
+ * Creates a new schema parser context object.
+ *
+ * @param namePool The name pool where all names of the schema will be stored in.
+ * @param context The schema context to use for error reporting etc.
+ */
+ XsdSchemaParserContext(const NamePool::Ptr &namePool, const XsdSchemaContext::Ptr &context);
+
+ /**
+ * Returns the name pool of the schema parser context.
+ */
+ NamePool::Ptr namePool() const;
+
+ /**
+ * Returns the schema resolver of the schema context.
+ */
+ XsdSchemaResolver::Ptr resolver() const;
+
+ /**
+ * Returns the schema resolver of the schema context.
+ */
+ XsdSchemaChecker::Ptr checker() const;
+
+ /**
+ * Returns the schema object of the schema context.
+ */
+ XsdSchema::Ptr schema() const;
+
+ /**
+ * Returns the element descriptions for the schema parser.
+ *
+ * The element descriptions are a fast lookup table for
+ * verifying whether certain attributes are allowed for
+ * a given element type.
+ */
+ ElementDescription<XsdSchemaToken, XsdTagScope::Type>::Hash elementDescriptions() const;
+
+ /**
+ * Returns an unique name that is used by the schema parser
+ * for anonymous types.
+ *
+ * @param targetNamespace The namespace of the name.
+ */
+ QXmlName createAnonymousName(const QString &targetNamespace) const;
+
+ private:
+ /**
+ * Fills the element description hash with the required and prohibited
+ * attributes.
+ */
+ static ElementDescription<XsdSchemaToken, XsdTagScope::Type>::Hash setupElementDescriptions();
+
+ NamePool::Ptr m_namePool;
+ XsdSchema::Ptr m_schema;
+ XsdSchemaChecker::Ptr m_checker;
+ XsdSchemaResolver::Ptr m_resolver;
+ const ElementDescription<XsdSchemaToken, XsdTagScope::Type>::Hash m_elementDescriptions;
+ mutable QAtomicInt m_anonymousNameCounter;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschemaresolver.cpp b/src/xmlpatterns/schema/qxsdschemaresolver.cpp
new file mode 100644
index 0000000..9290b6e
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaresolver.cpp
@@ -0,0 +1,1736 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschemaresolver_p.h"
+
+#include "qderivedinteger_p.h"
+#include "qderivedstring_p.h"
+#include "qqnamevalue_p.h"
+#include "qxsdattributereference_p.h"
+#include "qxsdparticlechecker_p.h"
+#include "qxsdreference_p.h"
+#include "qxsdschemacontext_p.h"
+#include "qxsdschemahelper_p.h"
+#include "qxsdschemaparsercontext_p.h"
+#include "qxsdschematypesfactory_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaResolver::XsdSchemaResolver(const QExplicitlySharedDataPointer<XsdSchemaContext> &context, const XsdSchemaParserContext *parserContext)
+ : m_context(context)
+ , m_checker(parserContext->checker())
+ , m_namePool(parserContext->namePool())
+ , m_schema(parserContext->schema())
+{
+ m_keyReferences.reserve(20);
+ m_simpleRestrictionBases.reserve(20);
+ m_simpleListTypes.reserve(20);
+ m_simpleUnionTypes.reserve(20);
+ m_elementTypes.reserve(20);
+ m_complexBaseTypes.reserve(20);
+ m_attributeTypes.reserve(20);
+ m_alternativeTypes.reserve(20);
+ m_alternativeTypeElements.reserve(20);
+ m_substitutionGroupAffiliations.reserve(20);
+
+ m_predefinedSchemaTypes = m_context->schemaTypeFactory()->types().values();
+}
+
+XsdSchemaResolver::~XsdSchemaResolver()
+{
+}
+
+void XsdSchemaResolver::resolve()
+{
+ m_checker->addComponentLocationHash(m_componentLocationHash);
+
+ // resolve the base types for all types
+ resolveSimpleRestrictionBaseTypes();
+ resolveComplexBaseTypes();
+
+ // do the basic checks which depend on having a base type available
+ m_checker->basicCheck();
+
+ // resolve further types that only map a type name to a type object
+ resolveSimpleListType();
+ resolveSimpleUnionTypes();
+ resolveElementTypes();
+ resolveAttributeTypes();
+ resolveAlternativeTypes();
+
+ // resolve objects that do not need information about inheritance
+ resolveKeyReferences();
+ resolveSubstitutionGroupAffiliations();
+
+ // resolve objects that do need information about inheritance
+ resolveSimpleRestrictions();
+ resolveSimpleContentComplexTypes();
+
+ // resolve objects which replace place holders
+ resolveTermReferences();
+ resolveAttributeTermReferences();
+
+ // resolve additional objects that do need information about inheritance
+ resolveAttributeInheritance();
+ resolveComplexContentComplexTypes();
+ resolveSubstitutionGroups();
+
+ resolveEnumerationFacetValues();
+
+ checkRedefinedGroups();
+ checkRedefinedAttributeGroups();
+
+ // check the constraining facets before we resolve them
+ m_checker->checkConstrainingFacets();
+
+ // add it again, as we may have added new components in the meantime
+ m_checker->addComponentLocationHash(m_componentLocationHash);
+
+ m_checker->check();
+}
+
+void XsdSchemaResolver::addKeyReference(const XsdElement::Ptr &element, const XsdIdentityConstraint::Ptr &keyRef, const QXmlName &reference, const QSourceLocation &location)
+{
+ KeyReference item;
+ item.element = element;
+ item.keyRef = keyRef;
+ item.reference = reference;
+ item.location = location;
+
+ m_keyReferences.append(item);
+}
+
+void XsdSchemaResolver::addSimpleRestrictionBase(const XsdSimpleType::Ptr &simpleType, const QXmlName &baseName, const QSourceLocation &location)
+{
+ SimpleRestrictionBase item;
+ item.simpleType = simpleType;
+ item.baseName = baseName;
+ item.location = location;
+
+ m_simpleRestrictionBases.append(item);
+}
+
+void XsdSchemaResolver::removeSimpleRestrictionBase(const XsdSimpleType::Ptr &type)
+{
+ for (int i = 0; i < m_simpleRestrictionBases.count(); ++i) {
+ if (m_simpleRestrictionBases.at(i).simpleType == type) {
+ m_simpleRestrictionBases.remove(i);
+ break;
+ }
+ }
+}
+
+void XsdSchemaResolver::addSimpleListType(const XsdSimpleType::Ptr &simpleType, const QXmlName &typeName, const QSourceLocation &location)
+{
+ SimpleListType item;
+ item.simpleType = simpleType;
+ item.typeName = typeName;
+ item.location = location;
+
+ m_simpleListTypes.append(item);
+}
+
+void XsdSchemaResolver::addSimpleUnionTypes(const XsdSimpleType::Ptr &simpleType, const QList<QXmlName> &typeNames, const QSourceLocation &location)
+{
+ SimpleUnionType item;
+ item.simpleType = simpleType;
+ item.typeNames = typeNames;
+ item.location = location;
+
+ m_simpleUnionTypes.append(item);
+}
+
+void XsdSchemaResolver::addElementType(const XsdElement::Ptr &element, const QXmlName &typeName, const QSourceLocation &location)
+{
+ ElementType item;
+ item.element = element;
+ item.typeName = typeName;
+ item.location = location;
+
+ m_elementTypes.append(item);
+}
+
+void XsdSchemaResolver::addComplexBaseType(const XsdComplexType::Ptr &complexType, const QXmlName &baseName, const QSourceLocation &location, const XsdFacet::Hash &facets)
+{
+ ComplexBaseType item;
+ item.complexType = complexType;
+ item.baseName = baseName;
+ item.location = location;
+ item.facets = facets;
+
+ m_complexBaseTypes.append(item);
+}
+
+void XsdSchemaResolver::removeComplexBaseType(const XsdComplexType::Ptr &type)
+{
+ for (int i = 0; i < m_complexBaseTypes.count(); ++i) {
+ if (m_complexBaseTypes.at(i).complexType == type) {
+ m_complexBaseTypes.remove(i);
+ break;
+ }
+ }
+}
+
+void XsdSchemaResolver::addComplexContentType(const XsdComplexType::Ptr &complexType, const XsdParticle::Ptr &content, bool mixed)
+{
+ ComplexContentType item;
+ item.complexType = complexType;
+ item.explicitContent = content;
+ item.effectiveMixed = mixed;
+ m_complexContentTypes.append(item);
+}
+
+void XsdSchemaResolver::addAttributeType(const XsdAttribute::Ptr &attribute, const QXmlName &typeName, const QSourceLocation &location)
+{
+ AttributeType item;
+ item.attribute = attribute;
+ item.typeName = typeName;
+ item.location = location;
+
+ m_attributeTypes.append(item);
+}
+
+void XsdSchemaResolver::addAlternativeType(const XsdAlternative::Ptr &alternative, const QXmlName &typeName, const QSourceLocation &location)
+{
+ AlternativeType item;
+ item.alternative = alternative;
+ item.typeName = typeName;
+ item.location = location;
+
+ m_alternativeTypes.append(item);
+}
+
+void XsdSchemaResolver::addAlternativeType(const XsdAlternative::Ptr &alternative, const XsdElement::Ptr &element)
+{
+ AlternativeTypeElement item;
+ item.alternative = alternative;
+ item.element = element;
+
+ m_alternativeTypeElements.append(item);
+}
+
+void XsdSchemaResolver::addSubstitutionGroupAffiliation(const XsdElement::Ptr &element, const QList<QXmlName> &elementNames, const QSourceLocation &location)
+{
+ SubstitutionGroupAffiliation item;
+ item.element = element;
+ item.elementNames = elementNames;
+ item.location = location;
+
+ m_substitutionGroupAffiliations.append(item);
+}
+
+void XsdSchemaResolver::addSubstitutionGroupType(const XsdElement::Ptr &element)
+{
+ m_substitutionGroupTypes.append(element);
+}
+
+void XsdSchemaResolver::addComponentLocationHash(const ComponentLocationHash &hash)
+{
+ m_componentLocationHash.unite(hash);
+}
+
+void XsdSchemaResolver::addEnumerationFacetValue(const AtomicValue::Ptr &facetValue, const NamespaceSupport &namespaceSupport)
+{
+ m_enumerationFacetValues.insert(facetValue, namespaceSupport);
+}
+
+void XsdSchemaResolver::addRedefinedGroups(const XsdModelGroup::Ptr &redefinedGroup, const XsdModelGroup::Ptr &group)
+{
+ RedefinedGroups item;
+ item.redefinedGroup = redefinedGroup;
+ item.group = group;
+
+ m_redefinedGroups.append(item);
+}
+
+void XsdSchemaResolver::addRedefinedAttributeGroups(const XsdAttributeGroup::Ptr &redefinedGroup, const XsdAttributeGroup::Ptr &group)
+{
+ RedefinedAttributeGroups item;
+ item.redefinedGroup = redefinedGroup;
+ item.group = group;
+
+ m_redefinedAttributeGroups.append(item);
+}
+
+void XsdSchemaResolver::addAllGroupCheck(const XsdReference::Ptr &reference)
+{
+ m_allGroups.insert(reference);
+}
+
+void XsdSchemaResolver::copyDataTo(const XsdSchemaResolver::Ptr &other) const
+{
+ other->m_keyReferences << m_keyReferences;
+ other->m_simpleRestrictionBases << m_simpleRestrictionBases;
+ other->m_simpleListTypes << m_simpleListTypes;
+ other->m_simpleUnionTypes << m_simpleUnionTypes;
+ other->m_elementTypes << m_elementTypes;
+ other->m_complexBaseTypes << m_complexBaseTypes;
+ other->m_complexContentTypes << m_complexContentTypes;
+ other->m_attributeTypes << m_attributeTypes;
+ other->m_alternativeTypes << m_alternativeTypes;
+ other->m_alternativeTypeElements << m_alternativeTypeElements;
+ other->m_substitutionGroupAffiliations << m_substitutionGroupAffiliations;
+ other->m_substitutionGroupTypes << m_substitutionGroupTypes;
+}
+
+QXmlName XsdSchemaResolver::baseTypeNameOfType(const SchemaType::Ptr &type) const
+{
+ for (int i = 0; i < m_simpleRestrictionBases.count(); ++i) {
+ if (m_simpleRestrictionBases.at(i).simpleType == type)
+ return m_simpleRestrictionBases.at(i).baseName;
+ }
+
+ for (int i = 0; i < m_complexBaseTypes.count(); ++i) {
+ if (m_complexBaseTypes.at(i).complexType == type)
+ return m_complexBaseTypes.at(i).baseName;
+ }
+
+ return QXmlName();
+}
+
+QXmlName XsdSchemaResolver::typeNameOfAttribute(const XsdAttribute::Ptr &attribute) const
+{
+ for (int i = 0; i < m_attributeTypes.count(); ++i) {
+ if (m_attributeTypes.at(i).attribute == attribute)
+ return m_attributeTypes.at(i).typeName;
+ }
+
+ return QXmlName();
+}
+
+void XsdSchemaResolver::setDefaultOpenContent(const XsdComplexType::OpenContent::Ptr &openContent, bool appliesToEmpty)
+{
+ m_defaultOpenContent = openContent;
+ m_defaultOpenContentAppliesToEmpty = appliesToEmpty;
+}
+
+void XsdSchemaResolver::resolveKeyReferences()
+{
+ for (int i = 0; i < m_keyReferences.count(); ++i) {
+ const KeyReference ref = m_keyReferences.at(i);
+
+ const XsdIdentityConstraint::Ptr constraint = m_schema->identityConstraint(ref.reference);
+ if (!constraint) {
+ m_context->error(QtXmlPatterns::tr("%1 references unknown %2 or %3 element %4")
+ .arg(formatKeyword(ref.keyRef->displayName(m_namePool)))
+ .arg(formatElement("key"))
+ .arg(formatElement("unique"))
+ .arg(formatKeyword(m_namePool, ref.reference)),
+ XsdSchemaContext::XSDError, ref.location);
+ return;
+ }
+
+ if (constraint->category() != XsdIdentityConstraint::Key && constraint->category() != XsdIdentityConstraint::Unique) { // only key and unique can be referenced
+ m_context->error(QtXmlPatterns::tr("%1 references identity constraint %2 that is no %3 or %4 element")
+ .arg(formatKeyword(ref.keyRef->displayName(m_namePool)))
+ .arg(formatKeyword(m_namePool, ref.reference))
+ .arg(formatElement("key"))
+ .arg(formatElement("unique")),
+ XsdSchemaContext::XSDError, ref.location);
+ return;
+ }
+
+ if (constraint->fields().count() != ref.keyRef->fields().count()) {
+ m_context->error(QtXmlPatterns::tr("%1 has a different number of fields from the identity constraint %2 that it references")
+ .arg(formatKeyword(ref.keyRef->displayName(m_namePool)))
+ .arg(formatKeyword(m_namePool, ref.reference)),
+ XsdSchemaContext::XSDError, ref.location);
+ return;
+ }
+
+ ref.keyRef->setReferencedKey(constraint);
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleRestrictionBaseTypes()
+{
+ // iterate over all simple types that are derived by restriction
+ for (int i = 0; i < m_simpleRestrictionBases.count(); ++i) {
+ const SimpleRestrictionBase item = m_simpleRestrictionBases.at(i);
+
+ // find the base type
+ SchemaType::Ptr type = m_schema->type(item.baseName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(item.baseName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("base type %1 of %2 element cannot be resolved")
+ .arg(formatType(m_namePool, item.baseName))
+ .arg(formatElement("restriction")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ item.simpleType->setWxsSuperType(type);
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleRestrictions()
+{
+ XsdSimpleType::List simpleTypes;
+
+ // first collect the global simple types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isSimpleType() && (types.at(i)->derivationMethod() == SchemaType::DerivationRestriction))
+ simpleTypes.append(types.at(i));
+ }
+
+ // then collect all anonymous simple types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (anonymousTypes.at(i)->isSimpleType() && (anonymousTypes.at(i)->derivationMethod() == SchemaType::DerivationRestriction))
+ simpleTypes.append(anonymousTypes.at(i));
+ }
+
+ QSet<XsdSimpleType::Ptr> visitedTypes;
+ for (int i = 0; i < simpleTypes.count(); ++i) {
+ resolveSimpleRestrictions(simpleTypes.at(i), visitedTypes);
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleRestrictions(const XsdSimpleType::Ptr &simpleType, QSet<XsdSimpleType::Ptr> &visitedTypes)
+{
+ if (visitedTypes.contains(simpleType))
+ return;
+ else
+ visitedTypes.insert(simpleType);
+
+ if (simpleType->derivationMethod() != XsdSimpleType::DerivationRestriction)
+ return;
+
+ // as xs:NMTOKENS, xs:ENTITIES and xs:IDREFS are provided by our XsdSchemaTypesFactory, they are
+ // setup correctly already and shouldn't be handled here
+ if (m_predefinedSchemaTypes.contains(simpleType))
+ return;
+
+ const SchemaType::Ptr baseType = simpleType->wxsSuperType();
+ Q_ASSERT(baseType);
+
+ if (baseType->isDefinedBySchema())
+ resolveSimpleRestrictions(XsdSimpleType::Ptr(baseType), visitedTypes);
+
+ simpleType->setCategory(baseType->category());
+
+ if (simpleType->category() == XsdSimpleType::SimpleTypeAtomic) {
+ QSet<AnySimpleType::Ptr> visitedPrimitiveTypes;
+ const AnySimpleType::Ptr primitiveType = findPrimitiveType(baseType, visitedPrimitiveTypes);
+ simpleType->setPrimitiveType(primitiveType);
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeList) {
+ const XsdSimpleType::Ptr simpleBaseType = baseType;
+ simpleType->setItemType(simpleBaseType->itemType());
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeUnion) {
+ const XsdSimpleType::Ptr simpleBaseType = baseType;
+ simpleType->setMemberTypes(simpleBaseType->memberTypes());
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleListType()
+{
+ // iterate over all simple types where the item type shall be resolved
+ for (int i = 0; i < m_simpleListTypes.count(); ++i) {
+ const SimpleListType item = m_simpleListTypes.at(i);
+
+ // try to resolve the name
+ SchemaType::Ptr type = m_schema->type(item.typeName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(item.typeName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("item type %1 of %2 element cannot be resolved")
+ .arg(formatType(m_namePool, item.typeName))
+ .arg(formatElement("list")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ item.simpleType->setItemType(type);
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleUnionTypes()
+{
+ // iterate over all simple types where the union member types shall be resolved
+ for (int i = 0; i < m_simpleUnionTypes.count(); ++i) {
+ const SimpleUnionType item = m_simpleUnionTypes.at(i);
+
+ AnySimpleType::List memberTypes;
+
+ // iterate over all union member type names
+ const QList<QXmlName> typeNames = item.typeNames;
+ for (int j = 0; j < typeNames.count(); ++j) {
+ const QXmlName typeName = typeNames.at(j);
+
+ // try to resolve the name
+ SchemaType::Ptr type = m_schema->type(typeName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(typeName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("member type %1 of %2 element cannot be resolved")
+ .arg(formatType(m_namePool, typeName))
+ .arg(formatElement("union")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ memberTypes.append(type);
+ }
+
+ // append the types that have been defined as <simpleType> children
+ memberTypes << item.simpleType->memberTypes();
+
+ item.simpleType->setMemberTypes(memberTypes);
+ }
+}
+
+void XsdSchemaResolver::resolveElementTypes()
+{
+ for (int i = 0; i < m_elementTypes.count(); ++i) {
+ const ElementType item = m_elementTypes.at(i);
+
+ SchemaType::Ptr type = m_schema->type(item.typeName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(item.typeName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("type %1 of %2 element cannot be resolved")
+ .arg(formatType(m_namePool, item.typeName))
+ .arg(formatElement("element")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ item.element->setType(type);
+ }
+}
+
+void XsdSchemaResolver::resolveComplexBaseTypes()
+{
+ for (int i = 0; i < m_complexBaseTypes.count(); ++i) {
+ const ComplexBaseType item = m_complexBaseTypes.at(i);
+
+ SchemaType::Ptr type = m_schema->type(item.baseName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(item.baseName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("base type %1 of complex type cannot be resolved").arg(formatType(m_namePool, item.baseName)), XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ if (item.complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ if (type->isComplexType() && type->isDefinedBySchema()) {
+ const XsdComplexType::Ptr baseType = type;
+ if (baseType->contentType()->variety() != XsdComplexType::ContentType::Simple) {
+ m_context->error(QtXmlPatterns::tr("%1 cannot have complex base type that has a %2")
+ .arg(formatElement("simpleContent"))
+ .arg(formatElement("complexContent")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+ }
+
+ item.complexType->setWxsSuperType(type);
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleContentComplexTypes()
+{
+ XsdComplexType::List complexTypes;
+
+ // first collect the global complex types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isComplexType() && types.at(i)->isDefinedBySchema())
+ complexTypes.append(types.at(i));
+ }
+
+ // then collect all anonymous simple types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (anonymousTypes.at(i)->isComplexType() && anonymousTypes.at(i)->isDefinedBySchema())
+ complexTypes.append(anonymousTypes.at(i));
+ }
+
+ QSet<XsdComplexType::Ptr> visitedTypes;
+ for (int i = 0; i < complexTypes.count(); ++i) {
+ if (XsdComplexType::Ptr(complexTypes.at(i))->contentType()->variety() == XsdComplexType::ContentType::Simple)
+ resolveSimpleContentComplexTypes(complexTypes.at(i), visitedTypes);
+ }
+}
+
+void XsdSchemaResolver::resolveSimpleContentComplexTypes(const XsdComplexType::Ptr &complexType, QSet<XsdComplexType::Ptr> &visitedTypes)
+{
+ if (visitedTypes.contains(complexType))
+ return;
+ else
+ visitedTypes.insert(complexType);
+
+ const SchemaType::Ptr baseType = complexType->wxsSuperType();
+
+ // at this point simple types have been resolved already, so we care about
+ // complex types here only
+
+ // http://www.w3.org/TR/xmlschema11-1/#dcl.ctd.ctsc
+ // 1
+ if (baseType->isComplexType() && baseType->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexBaseType = baseType;
+
+ resolveSimpleContentComplexTypes(complexBaseType, visitedTypes);
+
+ if (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ if (complexType->derivationMethod() == XsdComplexType::DerivationRestriction) {
+ if (complexType->contentType()->simpleType()) {
+ // 1.1 contains the content of the <simpleType> already
+ } else {
+ // 1.2
+ const XsdSimpleType::Ptr anonType(new XsdSimpleType());
+ anonType->setCategory(complexBaseType->contentType()->simpleType()->category());
+ anonType->setDerivationMethod(XsdSimpleType::DerivationRestriction);
+ anonType->setWxsSuperType(complexBaseType->contentType()->simpleType());
+ anonType->setFacets(complexTypeFacets(complexType));
+
+ QSet<AnySimpleType::Ptr> visitedPrimitiveTypes;
+ const AnySimpleType::Ptr primitiveType = findPrimitiveType(anonType->wxsSuperType(), visitedPrimitiveTypes);
+ anonType->setPrimitiveType(primitiveType);
+
+ complexType->contentType()->setSimpleType(anonType);
+
+ m_schema->addAnonymousType(anonType);
+ m_componentLocationHash.insert(anonType, m_componentLocationHash.value(complexType));
+ }
+ } else if (complexBaseType->derivationMethod() == XsdComplexType::DerivationExtension) { // 3
+ complexType->contentType()->setSimpleType(complexBaseType->contentType()->simpleType());
+ }
+ } else if (complexBaseType->contentType()->variety() == XsdComplexType::ContentType::Mixed &&
+ complexType->derivationMethod() == XsdComplexType::DerivationRestriction &&
+ XsdSchemaHelper::isParticleEmptiable(complexBaseType->contentType()->particle())) { // 2
+ // simple type was already set in parser
+
+ const XsdSimpleType::Ptr anonType(new XsdSimpleType());
+ anonType->setCategory(complexType->contentType()->simpleType()->category());
+ anonType->setDerivationMethod(XsdSimpleType::DerivationRestriction);
+ anonType->setWxsSuperType(complexType->contentType()->simpleType());
+ anonType->setFacets(complexTypeFacets(complexType));
+
+ QSet<AnySimpleType::Ptr> visitedPrimitiveTypes;
+ const AnySimpleType::Ptr primitiveType = findPrimitiveType(anonType->wxsSuperType(), visitedPrimitiveTypes);
+ anonType->setPrimitiveType(primitiveType);
+
+ complexType->contentType()->setSimpleType(anonType);
+
+ m_schema->addAnonymousType(anonType);
+ m_componentLocationHash.insert(anonType, m_componentLocationHash.value(complexType));
+ } else {
+ complexType->contentType()->setSimpleType(BuiltinTypes::xsAnySimpleType);
+ }
+ } else if (baseType->isSimpleType()) { // 4
+ complexType->contentType()->setSimpleType(baseType);
+ } else { // 5
+ complexType->contentType()->setSimpleType(BuiltinTypes::xsAnySimpleType);
+ }
+}
+
+void XsdSchemaResolver::resolveComplexContentComplexTypes()
+{
+ XsdComplexType::List complexTypes;
+
+ // first collect the global complex types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isComplexType() && types.at(i)->isDefinedBySchema())
+ complexTypes.append(types.at(i));
+ }
+
+ // then collect all anonymous simple types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (anonymousTypes.at(i)->isComplexType() && anonymousTypes.at(i)->isDefinedBySchema())
+ complexTypes.append(anonymousTypes.at(i));
+ }
+
+ QSet<XsdComplexType::Ptr> visitedTypes;
+ for (int i = 0; i < complexTypes.count(); ++i) {
+ if (XsdComplexType::Ptr(complexTypes.at(i))->contentType()->variety() != XsdComplexType::ContentType::Simple)
+ resolveComplexContentComplexTypes(complexTypes.at(i), visitedTypes);
+ }
+}
+
+void XsdSchemaResolver::resolveComplexContentComplexTypes(const XsdComplexType::Ptr &complexType, QSet<XsdComplexType::Ptr> &visitedTypes)
+{
+ if (visitedTypes.contains(complexType))
+ return;
+ else
+ visitedTypes.insert(complexType);
+
+ ComplexContentType item;
+ bool foundCorrespondingItem = false;
+ for (int i = 0; i < m_complexContentTypes.count(); ++i) {
+ if (m_complexContentTypes.at(i).complexType == complexType) {
+ item = m_complexContentTypes.at(i);
+ foundCorrespondingItem = true;
+ break;
+ }
+ }
+
+ if (!foundCorrespondingItem)
+ return;
+
+ const SchemaType::Ptr baseType = complexType->wxsSuperType();
+
+ // at this point simple types have been resolved already, so we care about
+ // complex types here only
+ if (baseType->isComplexType() && baseType->isDefinedBySchema())
+ resolveComplexContentComplexTypes(XsdComplexType::Ptr(baseType), visitedTypes);
+
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#dcl.ctd.ctcc.common
+
+ // 3
+ XsdParticle::Ptr effectiveContent;
+ if (!item.explicitContent) { // 3.1
+ if (item.effectiveMixed == true) { // 3.1.1
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setMinimumOccurs(1);
+ particle->setMaximumOccurs(1);
+ particle->setMaximumOccursUnbounded(false);
+
+ const XsdModelGroup::Ptr sequence(new XsdModelGroup());
+ sequence->setCompositor(XsdModelGroup::SequenceCompositor);
+ particle->setTerm(sequence);
+
+ effectiveContent = particle;
+ } else { // 3.1.2
+ effectiveContent = XsdParticle::Ptr();
+ }
+ } else { // 3.2
+ effectiveContent = item.explicitContent;
+ }
+
+ // 4
+ XsdComplexType::ContentType::Ptr explicitContentType(new XsdComplexType::ContentType());
+ if (item.complexType->derivationMethod() == XsdComplexType::DerivationRestriction) { // 4.1
+ if (!effectiveContent) { // 4.1.1
+ explicitContentType->setVariety(XsdComplexType::ContentType::Empty);
+ } else { // 4.1.2
+ if (item.effectiveMixed == true)
+ explicitContentType->setVariety(XsdComplexType::ContentType::Mixed);
+ else
+ explicitContentType->setVariety(XsdComplexType::ContentType::ElementOnly);
+
+ explicitContentType->setParticle(effectiveContent);
+ }
+ } else if (item.complexType->derivationMethod() == XsdComplexType::DerivationExtension) { // 4.2
+ const SchemaType::Ptr baseType = item.complexType->wxsSuperType();
+ if (baseType->isSimpleType() || (baseType->isComplexType() && baseType->isDefinedBySchema() && (XsdComplexType::Ptr(baseType)->contentType()->variety() == XsdComplexType::ContentType::Empty ||
+ XsdComplexType::Ptr(baseType)->contentType()->variety() == XsdComplexType::ContentType::Simple))) { // 4.2.1
+ if (!effectiveContent) {
+ explicitContentType->setVariety(XsdComplexType::ContentType::Empty);
+ } else {
+ if (item.effectiveMixed == true)
+ explicitContentType->setVariety(XsdComplexType::ContentType::Mixed);
+ else
+ explicitContentType->setVariety(XsdComplexType::ContentType::ElementOnly);
+
+ explicitContentType->setParticle(effectiveContent);
+ }
+ } else if (baseType->isComplexType() && baseType->isDefinedBySchema() && (XsdComplexType::Ptr(baseType)->contentType()->variety() == XsdComplexType::ContentType::ElementOnly ||
+ XsdComplexType::Ptr(baseType)->contentType()->variety() == XsdComplexType::ContentType::Mixed) && !effectiveContent) { // 4.2.2
+ const XsdComplexType::Ptr complexBaseType(baseType);
+
+ explicitContentType = complexBaseType->contentType();
+ } else { // 4.2.3
+ explicitContentType->setVariety(item.effectiveMixed ? XsdComplexType::ContentType::Mixed : XsdComplexType::ContentType::ElementOnly);
+
+ XsdParticle::Ptr baseParticle;
+ if (baseType == BuiltinTypes::xsAnyType) {
+ // we need a workaround here, since the xsAnyType is no real (aka XsdComplexType) complex type...
+
+ baseParticle = XsdParticle::Ptr(new XsdParticle());
+ baseParticle->setMinimumOccurs(1);
+ baseParticle->setMaximumOccurs(1);
+ baseParticle->setMaximumOccursUnbounded(false);
+
+ const XsdModelGroup::Ptr group(new XsdModelGroup());
+ group->setCompositor(XsdModelGroup::SequenceCompositor);
+
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setMinimumOccurs(0);
+ particle->setMaximumOccursUnbounded(true);
+
+ const XsdWildcard::Ptr wildcard(new XsdWildcard());
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ wildcard->setProcessContents(XsdWildcard::Lax);
+
+ particle->setTerm(wildcard);
+ XsdParticle::List particles;
+ particles.append(particle);
+ group->setParticles(particles);
+ baseParticle->setTerm(group);
+ } else {
+ const XsdComplexType::Ptr complexBaseType(baseType);
+ baseParticle = complexBaseType->contentType()->particle();
+ }
+ if (baseParticle && baseParticle->term()->isModelGroup() && (XsdModelGroup::Ptr(baseParticle->term())->compositor() == XsdModelGroup::AllCompositor) &&
+ (!item.explicitContent)) { // 4.2.3.1
+
+ explicitContentType->setParticle(baseParticle);
+ } else if (baseParticle && baseParticle->term()->isModelGroup() && (XsdModelGroup::Ptr(baseParticle->term())->compositor() == XsdModelGroup::AllCompositor) &&
+ (effectiveContent->term()->isModelGroup() && (XsdModelGroup::Ptr(effectiveContent->term())->compositor() == XsdModelGroup::AllCompositor))) { // 4.2.3.2
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setMinimumOccurs(effectiveContent->minimumOccurs());
+ particle->setMaximumOccurs(1);
+ particle->setMaximumOccursUnbounded(false);
+
+ const XsdModelGroup::Ptr group(new XsdModelGroup());
+ group->setCompositor(XsdModelGroup::AllCompositor);
+ XsdParticle::List particles = XsdModelGroup::Ptr(baseParticle->term())->particles();
+ particles << XsdModelGroup::Ptr(effectiveContent->term())->particles();
+ group->setParticles(particles);
+ particle->setTerm(group);
+
+ explicitContentType->setParticle(particle);
+ } else { // 4.2.3.3
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setMinimumOccurs(1);
+ particle->setMaximumOccurs(1);
+ particle->setMaximumOccursUnbounded(false);
+
+ const XsdModelGroup::Ptr group(new XsdModelGroup());
+ group->setCompositor(XsdModelGroup::SequenceCompositor);
+
+ if (effectiveContent && effectiveContent->term()->isModelGroup() && XsdModelGroup::Ptr(effectiveContent->term())->compositor() == XsdModelGroup::AllCompositor) {
+ m_context->error(QtXmlPatterns::tr("content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type")
+ .arg(formatType(m_namePool, complexType)).arg(formatKeyword("all")), XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+
+ if (baseParticle && baseParticle->term()->isModelGroup() && XsdModelGroup::Ptr(baseParticle->term())->compositor() == XsdModelGroup::AllCompositor) {
+ m_context->error(QtXmlPatterns::tr("complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, baseType))
+ .arg(formatKeyword("all")), XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+
+ XsdParticle::List particles;
+ if (baseParticle)
+ particles << baseParticle;
+ if (effectiveContent)
+ particles << effectiveContent;
+ group->setParticles(particles);
+ particle->setTerm(group);
+
+ explicitContentType->setParticle(particle);
+ }
+
+ if (baseType->isDefinedBySchema()) { // xs:anyType has no open content
+ const XsdComplexType::Ptr complexBaseType(baseType);
+ explicitContentType->setOpenContent(complexBaseType->contentType()->openContent());
+ }
+ }
+ }
+
+ // 5
+ XsdComplexType::OpenContent::Ptr wildcardElement;
+ if (item.complexType->contentType()->openContent()) { // 5.1
+ wildcardElement = item.complexType->contentType()->openContent();
+ } else {
+ if (m_defaultOpenContent) { // 5.2
+ if ((explicitContentType->variety() != XsdComplexType::ContentType::Empty) || // 5.2.1
+ (explicitContentType->variety() == XsdComplexType::ContentType::Empty && m_defaultOpenContentAppliesToEmpty)) { // 5.2.2
+ wildcardElement = m_defaultOpenContent;
+ }
+ }
+ }
+
+ // 6
+ if (!wildcardElement) { // 6.1
+ item.complexType->setContentType(explicitContentType);
+ } else {
+ if (wildcardElement->mode() == XsdComplexType::OpenContent::None) { // 6.2
+ const XsdComplexType::ContentType::Ptr contentType(new XsdComplexType::ContentType());
+ contentType->setVariety(explicitContentType->variety());
+ contentType->setParticle(explicitContentType->particle());
+
+ item.complexType->setContentType(contentType);
+ } else { // 6.3
+ const XsdComplexType::ContentType::Ptr contentType(new XsdComplexType::ContentType());
+
+ if (explicitContentType->variety() == XsdComplexType::ContentType::Empty)
+ contentType->setVariety(XsdComplexType::ContentType::ElementOnly);
+ else
+ contentType->setVariety(explicitContentType->variety());
+
+ if (explicitContentType->variety() == XsdComplexType::ContentType::Empty) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setMinimumOccurs(1);
+ particle->setMaximumOccurs(1);
+ const XsdModelGroup::Ptr sequence(new XsdModelGroup());
+ sequence->setCompositor(XsdModelGroup::SequenceCompositor);
+ particle->setTerm(sequence);
+ contentType->setParticle(particle);
+ } else {
+ contentType->setParticle(explicitContentType->particle());
+ }
+
+ const XsdComplexType::OpenContent::Ptr openContent(new XsdComplexType::OpenContent());
+ if (wildcardElement)
+ openContent->setMode(wildcardElement->mode());
+ else
+ openContent->setMode(XsdComplexType::OpenContent::Interleave);
+
+ if (wildcardElement)
+ openContent->setWildcard(wildcardElement->wildcard());
+
+ item.complexType->setContentType(contentType);
+ }
+ }
+}
+
+void XsdSchemaResolver::resolveAttributeTypes()
+{
+ for (int i = 0; i < m_attributeTypes.count(); ++i) {
+ const AttributeType item = m_attributeTypes.at(i);
+
+ SchemaType::Ptr type = m_schema->type(item.typeName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(item.typeName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("type %1 of %2 element cannot be resolved")
+ .arg(formatType(m_namePool, item.typeName))
+ .arg(formatElement("attribute")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ if (!type->isSimpleType() && type->category() != SchemaType::None) {
+ m_context->error(QtXmlPatterns::tr("type of %1 element must be a simple type, %2 is not")
+ .arg(formatElement("attribute"))
+ .arg(formatType(m_namePool, item.typeName)),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+
+ item.attribute->setType(type);
+ }
+}
+
+void XsdSchemaResolver::resolveAlternativeTypes()
+{
+ for (int i = 0; i < m_alternativeTypes.count(); ++i) {
+ const AlternativeType item = m_alternativeTypes.at(i);
+
+ SchemaType::Ptr type = m_schema->type(item.typeName);
+ if (!type) {
+ // maybe it's a basic type...
+ type = m_context->schemaTypeFactory()->createSchemaType(item.typeName);
+ if (!type) {
+ m_context->error(QtXmlPatterns::tr("type %1 of %2 element cannot be resolved")
+ .arg(formatType(m_namePool, item.typeName))
+ .arg(formatElement("alternative")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+ }
+
+ item.alternative->setType(type);
+ }
+
+ for (int i = 0; i < m_alternativeTypeElements.count(); ++i) {
+ const AlternativeTypeElement item = m_alternativeTypeElements.at(i);
+ item.alternative->setType(item.element->type());
+ }
+}
+
+bool hasCircularSubstitutionGroup(const XsdElement::Ptr &current, const XsdElement::Ptr &head, const NamePool::Ptr &namePool)
+{
+ if (current == head)
+ return true;
+ else {
+ const XsdElement::List elements = current->substitutionGroupAffiliations();
+ for (int i = 0; i < elements.count(); ++i) {
+ if (hasCircularSubstitutionGroup(elements.at(i), head, namePool))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void XsdSchemaResolver::resolveSubstitutionGroupAffiliations()
+{
+ for (int i = 0; i < m_substitutionGroupAffiliations.count(); ++i) {
+ const SubstitutionGroupAffiliation item = m_substitutionGroupAffiliations.at(i);
+
+ XsdElement::List affiliations;
+ for (int j = 0; j < item.elementNames.count(); ++j) {
+ const XsdElement::Ptr element = m_schema->element(item.elementNames.at(j));
+ if (!element) {
+ m_context->error(QtXmlPatterns::tr("substitution group %1 of %2 element cannot be resolved")
+ .arg(formatKeyword(m_namePool, item.elementNames.at(j)))
+ .arg(formatElement("element")),
+ XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#e-props-correct 5)
+ if (hasCircularSubstitutionGroup(element, item.element, m_namePool)) {
+ m_context->error(QtXmlPatterns::tr("substitution group %1 has circular definition").arg(formatKeyword(m_namePool, item.elementNames.at(j))), XsdSchemaContext::XSDError, item.location);
+ return;
+ }
+
+ affiliations.append(element);
+ }
+
+ item.element->setSubstitutionGroupAffiliations(affiliations);
+ }
+
+ for (int i = 0; i < m_substitutionGroupTypes.count(); ++i) {
+ const XsdElement::Ptr element = m_substitutionGroupTypes.at(i);
+ element->setType(element->substitutionGroupAffiliations().first()->type());
+ }
+}
+
+bool isSubstGroupHeadOf(const XsdElement::Ptr &head, const XsdElement::Ptr &element, const NamePool::Ptr &namePool)
+{
+ if (head->name(namePool) == element->name(namePool))
+ return true;
+
+ const XsdElement::List affiliations = element->substitutionGroupAffiliations();
+ for (int i = 0; i < affiliations.count(); ++i) {
+ if (isSubstGroupHeadOf(head, affiliations.at(i), namePool))
+ return true;
+ }
+
+ return false;
+}
+
+void XsdSchemaResolver::resolveSubstitutionGroups()
+{
+ const XsdElement::List elements = m_schema->elements();
+ for (int i = 0; i < elements.count(); ++i) {
+ const XsdElement::Ptr element = elements.at(i);
+
+ // the element is always itself in the substitution group
+ element->addSubstitutionGroup(element);
+
+ for (int j = 0; j < elements.count(); ++j) {
+ if (i == j)
+ continue;
+
+ if (isSubstGroupHeadOf(element, elements.at(j), m_namePool))
+ element->addSubstitutionGroup(elements.at(j));
+ }
+ }
+}
+
+void XsdSchemaResolver::resolveTermReferences()
+{
+ // first the global complex types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (!(types.at(i)->isComplexType()) || !types.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = types.at(i);
+ if (complexType->contentType()->variety() != XsdComplexType::ContentType::ElementOnly && complexType->contentType()->variety() != XsdComplexType::ContentType::Mixed)
+ continue;
+
+ resolveTermReference(complexType->contentType()->particle(), QSet<QXmlName>());
+ }
+
+ // then all anonymous complex types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (!(anonymousTypes.at(i)->isComplexType()) || !anonymousTypes.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = anonymousTypes.at(i);
+ if (complexType->contentType()->variety() != XsdComplexType::ContentType::ElementOnly && complexType->contentType()->variety() != XsdComplexType::ContentType::Mixed)
+ continue;
+
+ resolveTermReference(complexType->contentType()->particle(), QSet<QXmlName>());
+ }
+
+ const XsdModelGroup::List groups = m_schema->elementGroups();
+ for (int i = 0; i < groups.count(); ++i) {
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setTerm(groups.at(i));
+ resolveTermReference(particle, QSet<QXmlName>());
+ }
+}
+
+void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, QSet<QXmlName> visitedGroups)
+{
+ if (!particle)
+ return;
+
+ const XsdTerm::Ptr term = particle->term();
+
+ // if it is a model group, we iterate over it recursive...
+ if (term->isModelGroup()) {
+ const XsdModelGroup::Ptr modelGroup = term;
+ const XsdParticle::List particles = modelGroup->particles();
+
+ for (int i = 0; i < particles.count(); ++i) {
+ resolveTermReference(particles.at(i), visitedGroups);
+ }
+
+ // check for unique names of elements inside all compositor
+ if (modelGroup->compositor() != XsdModelGroup::ChoiceCompositor) {
+ for (int i = 0; i < particles.count(); ++i) {
+ const XsdParticle::Ptr particle = particles.at(i);
+ const XsdTerm::Ptr term = particle->term();
+
+ if (!(term->isElement()))
+ continue;
+
+ for (int j = 0; j < particles.count(); ++j) {
+ const XsdParticle::Ptr otherParticle = particles.at(j);
+ const XsdTerm::Ptr otherTerm = otherParticle->term();
+
+ if (otherTerm->isElement() && i != j) {
+ const XsdElement::Ptr element = term;
+ const XsdElement::Ptr otherElement = otherTerm;
+
+ if (element->name(m_namePool) == otherElement->name(m_namePool)) {
+ if (modelGroup->compositor() == XsdModelGroup::AllCompositor) {
+ m_context->error(QtXmlPatterns::tr("duplicated element names %1 in %2 element")
+ .arg(formatKeyword(element->displayName(m_namePool)))
+ .arg(formatElement("all")),
+ XsdSchemaContext::XSDError, sourceLocation(modelGroup));
+ return;
+ } else if (modelGroup->compositor() == XsdModelGroup::SequenceCompositor) {
+ if (element->type() != otherElement->type()) { // not same variety
+ m_context->error(QtXmlPatterns::tr("duplicated element names %1 in %2 element")
+ .arg(formatKeyword(element->displayName(m_namePool)))
+ .arg(formatElement("sequence")),
+ XsdSchemaContext::XSDError, sourceLocation(modelGroup));
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return;
+ }
+
+ // ...otherwise we have reached the end of recursion...
+ if (!term->isReference())
+ return;
+
+ // ...or we have reached a reference term that must be resolved
+ const XsdReference::Ptr reference = term;
+ switch (reference->type()) {
+ case XsdReference::Element:
+ {
+ const XsdElement::Ptr element = m_schema->element(reference->referenceName());
+ if (element) {
+ particle->setTerm(element);
+ } else {
+ m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved")
+ .arg(formatKeyword(m_namePool, reference->referenceName()))
+ .arg(formatElement("element")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return;
+ }
+ }
+ break;
+ case XsdReference::ModelGroup:
+ {
+ const XsdModelGroup::Ptr modelGroup = m_schema->elementGroup(reference->referenceName());
+ if (modelGroup) {
+ if (visitedGroups.contains(modelGroup->name(m_namePool))) {
+ m_context->error(QtXmlPatterns::tr("circular group reference for %1").arg(formatKeyword(modelGroup->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ } else {
+ visitedGroups.insert(modelGroup->name(m_namePool));
+ }
+
+ particle->setTerm(modelGroup);
+
+ // start recursive iteration here as well to get all references resolved
+ const XsdParticle::List particles = modelGroup->particles();
+ for (int i = 0; i < particles.count(); ++i) {
+ resolveTermReference(particles.at(i), visitedGroups);
+ }
+
+ if (modelGroup->compositor() == XsdModelGroup::AllCompositor) {
+ if (m_allGroups.contains(reference)) {
+ m_context->error(QtXmlPatterns::tr("%1 element is not allowed in this scope").arg(formatElement("all")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return;
+ }
+ if (particle->maximumOccursUnbounded() || particle->maximumOccurs() != 1) {
+ m_context->error(QtXmlPatterns::tr("%1 element cannot have %2 attribute with value other than %3")
+ .arg(formatElement("all"))
+ .arg(formatAttribute("maxOccurs"))
+ .arg(formatData("1")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return;
+ }
+ if (particle->minimumOccurs() != 0 && particle->minimumOccurs() != 1) {
+ m_context->error(QtXmlPatterns::tr("%1 element cannot have %2 attribute with value other than %3 or %4")
+ .arg(formatElement("all"))
+ .arg(formatAttribute("minOccurs"))
+ .arg(formatData("0"))
+ .arg(formatData("1")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return;
+ }
+ }
+ } else {
+ m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved")
+ .arg(formatKeyword(m_namePool, reference->referenceName()))
+ .arg(formatElement("group")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return;
+ }
+ }
+ break;
+ }
+}
+
+void XsdSchemaResolver::resolveAttributeTermReferences()
+{
+ // first all global attribute groups
+ const XsdAttributeGroup::List attributeGroups = m_schema->attributeGroups();
+ for (int i = 0; i < attributeGroups.count(); ++i) {
+ XsdWildcard::Ptr wildcard = attributeGroups.at(i)->wildcard();
+ const XsdAttributeUse::List uses = resolveAttributeTermReferences(attributeGroups.at(i)->attributeUses(), wildcard, QSet<QXmlName>());
+ attributeGroups.at(i)->setAttributeUses(uses);
+ attributeGroups.at(i)->setWildcard(wildcard);
+ }
+
+ // then the global complex types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (!(types.at(i)->isComplexType()) || !types.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = types.at(i);
+ const XsdAttributeUse::List attributeUses = complexType->attributeUses();
+
+ XsdWildcard::Ptr wildcard = complexType->attributeWildcard();
+ const XsdAttributeUse::List uses = resolveAttributeTermReferences(attributeUses, wildcard, QSet<QXmlName>());
+ complexType->setAttributeUses(uses);
+ complexType->setAttributeWildcard(wildcard);
+ }
+
+ // and afterwards all anonymous complex types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (!(anonymousTypes.at(i)->isComplexType()) || !anonymousTypes.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = anonymousTypes.at(i);
+ const XsdAttributeUse::List attributeUses = complexType->attributeUses();
+
+ XsdWildcard::Ptr wildcard = complexType->attributeWildcard();
+ const XsdAttributeUse::List uses = resolveAttributeTermReferences(attributeUses, wildcard, QSet<QXmlName>());
+ complexType->setAttributeUses(uses);
+ complexType->setAttributeWildcard(wildcard);
+ }
+}
+
+XsdAttributeUse::List XsdSchemaResolver::resolveAttributeTermReferences(const XsdAttributeUse::List &attributeUses, XsdWildcard::Ptr &wildcard, QSet<QXmlName> visitedAttributeGroups)
+{
+ XsdAttributeUse::List resolvedAttributeUses;
+
+ for (int i = 0; i < attributeUses.count(); ++i) {
+ const XsdAttributeUse::Ptr attributeUse = attributeUses.at(i);
+ if (attributeUse->isAttributeUse()) {
+ // it is a real attribute use, so no need to resolve it
+ resolvedAttributeUses.append(attributeUse);
+ } else if (attributeUse->isReference()) {
+ // it is just a reference, so resolve it to the real attribute use
+
+ const XsdAttributeReference::Ptr reference = attributeUse;
+ if (reference->type() == XsdAttributeReference::AttributeUse) {
+
+ // lookup the real attribute
+ const XsdAttribute::Ptr attribute = m_schema->attribute(reference->referenceName());
+ if (!attribute) {
+ m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved")
+ .arg(formatKeyword(m_namePool, reference->referenceName()))
+ .arg(formatElement("attribute")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return XsdAttributeUse::List();
+ }
+
+ // if both, reference and definition have a fixed or default value set, then they must be equal
+ if (attribute->valueConstraint() && attributeUse->valueConstraint()) {
+ if (attribute->valueConstraint()->value() != attributeUse->valueConstraint()->value()) {
+ m_context->error(QtXmlPatterns::tr("%1 or %2 attribute of reference %3 does not match with the attribute declaration %4")
+ .arg(formatAttribute("fixed"))
+ .arg(formatAttribute("default"))
+ .arg(formatKeyword(m_namePool, reference->referenceName()))
+ .arg(formatKeyword(attribute->displayName(m_namePool))),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return XsdAttributeUse::List();
+ }
+ }
+
+ attributeUse->setAttribute(attribute);
+ if (!attributeUse->valueConstraint() && attribute->valueConstraint())
+ attributeUse->setValueConstraint(XsdAttributeUse::ValueConstraint::fromAttributeValueConstraint(attribute->valueConstraint()));
+
+ resolvedAttributeUses.append(attributeUse);
+ } else if (reference->type() == XsdAttributeReference::AttributeGroup) {
+ const XsdAttributeGroup::Ptr attributeGroup = m_schema->attributeGroup(reference->referenceName());
+ if (!attributeGroup) {
+ m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved")
+ .arg(formatKeyword(m_namePool, reference->referenceName()))
+ .arg(formatElement("attributeGroup")),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return XsdAttributeUse::List();
+ }
+ if (visitedAttributeGroups.contains(attributeGroup->name(m_namePool))) {
+ m_context->error(QtXmlPatterns::tr("attribute group %1 has circular reference").arg(formatKeyword(m_namePool, reference->referenceName())),
+ XsdSchemaContext::XSDError, reference->sourceLocation());
+ return XsdAttributeUse::List();
+ } else {
+ visitedAttributeGroups.insert(attributeGroup->name(m_namePool));
+ }
+
+ // resolve attribute wildcards as defined in http://www.w3.org/TR/xmlschema11-1/#declare-attributeGroup-wildcard
+ XsdWildcard::Ptr childWildcard;
+ resolvedAttributeUses << resolveAttributeTermReferences(attributeGroup->attributeUses(), childWildcard, visitedAttributeGroups);
+ if (!childWildcard) {
+ if (attributeGroup->wildcard()) {
+ if (wildcard) {
+ const XsdWildcard::ProcessContents contents = wildcard->processContents();
+ wildcard = XsdSchemaHelper::wildcardIntersection(wildcard, attributeGroup->wildcard());
+ wildcard->setProcessContents(contents);
+ } else {
+ wildcard = attributeGroup->wildcard();
+ }
+ }
+ } else {
+ XsdWildcard::Ptr newWildcard;
+ if (attributeGroup->wildcard()) {
+ const XsdWildcard::ProcessContents contents = attributeGroup->wildcard()->processContents();
+ newWildcard = XsdSchemaHelper::wildcardIntersection(attributeGroup->wildcard(), childWildcard);
+ newWildcard->setProcessContents(contents);
+ } else {
+ newWildcard = childWildcard;
+ }
+
+ if (wildcard) {
+ const XsdWildcard::ProcessContents contents = wildcard->processContents();
+ wildcard = XsdSchemaHelper::wildcardIntersection(wildcard, newWildcard);
+ wildcard->setProcessContents(contents);
+ } else {
+ wildcard = newWildcard;
+ }
+ }
+ }
+ }
+ }
+
+ return resolvedAttributeUses;
+}
+
+void XsdSchemaResolver::resolveAttributeInheritance()
+{
+ // collect the global and anonymous complex types
+ SchemaType::List types = m_schema->types();
+ types << m_schema->anonymousTypes();
+
+ QSet<XsdComplexType::Ptr> visitedTypes;
+ for (int i = 0; i < types.count(); ++i) {
+ if (!(types.at(i)->isComplexType()) || !types.at(i)->isDefinedBySchema())
+ continue;
+
+ const XsdComplexType::Ptr complexType = types.at(i);
+
+ resolveAttributeInheritance(complexType, visitedTypes);
+ }
+}
+
+bool isValidWildcardRestriction(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &baseWildcard)
+{
+ if (wildcard->namespaceConstraint()->variety() == baseWildcard->namespaceConstraint()->variety()) {
+ if (!XsdSchemaHelper::checkWildcardProcessContents(baseWildcard, wildcard))
+ return false;
+ }
+
+ if (wildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Any &&
+ baseWildcard->namespaceConstraint()->variety() != XsdWildcard::NamespaceConstraint::Any ) {
+ return false;
+ }
+ if (baseWildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Not &&
+ wildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Enumeration) {
+ if (!baseWildcard->namespaceConstraint()->namespaces().intersect(wildcard->namespaceConstraint()->namespaces()).isEmpty())
+ return false;
+ }
+ if (baseWildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Enumeration &&
+ wildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Enumeration) {
+ if (!wildcard->namespaceConstraint()->namespaces().subtract(baseWildcard->namespaceConstraint()->namespaces()).isEmpty())
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * Since we inherit the attributes from our base class we have to walk up in the
+ * inheritance hierarchy first and resolve the attribute inheritance top-down.
+ */
+void XsdSchemaResolver::resolveAttributeInheritance(const XsdComplexType::Ptr &complexType, QSet<XsdComplexType::Ptr> &visitedTypes)
+{
+ if (visitedTypes.contains(complexType))
+ return;
+ else
+ visitedTypes.insert(complexType);
+
+ const SchemaType::Ptr baseType = complexType->wxsSuperType();
+ Q_ASSERT(baseType);
+
+ if (!(baseType->isComplexType()) || !baseType->isDefinedBySchema())
+ return;
+
+ const XsdComplexType::Ptr complexBaseType = baseType;
+
+ resolveAttributeInheritance(complexBaseType, visitedTypes);
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#dcl.ctd.attuses
+
+ // 1 and 2 (the attribute groups have been resolved here already)
+ const XsdAttributeUse::List uses = complexBaseType->attributeUses();
+
+ if (complexType->derivationMethod() == XsdComplexType::DerivationRestriction) { // 3.2
+ const XsdAttributeUse::List currentUses = complexType->attributeUses();
+
+ // 3.2.1 and 3.2.2 As we also keep the prohibited attributes as objects, the algorithm below
+ // handles both the same way
+
+ // add only these attribute uses of the base type that match one of the following criteria:
+ // 1: there is no attribute use with the same name in type
+ // 2: there is no attribute with the same name marked as prohibited in type
+ for (int j = 0; j < uses.count(); ++j) {
+ const XsdAttributeUse::Ptr use = uses.at(j);
+ bool found = false;
+ for (int k = 0; k < currentUses.count(); ++k) {
+ if (use->attribute()->name(m_namePool) == currentUses.at(k)->attribute()->name(m_namePool)) {
+ found = true;
+
+ // check if prohibited usage is violated
+ if ((use->useType() == XsdAttributeUse::ProhibitedUse) && (currentUses.at(k)->useType() != XsdAttributeUse::ProhibitedUse)) {
+ m_context->error(QtXmlPatterns::tr("%1 attribute in %2 must have %3 use like in base type %4")
+ .arg(formatAttribute(use->attribute()->displayName(m_namePool)))
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatData("prohibited"))
+ .arg(formatType(m_namePool, complexBaseType)),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+
+ break;
+ }
+ }
+
+ if (!found && uses.at(j)->useType() != XsdAttributeUse::ProhibitedUse) {
+ complexType->addAttributeUse(uses.at(j));
+ }
+ }
+ } else if (complexType->derivationMethod() == XsdComplexType::DerivationExtension) { // 3.1
+ QHash<QXmlName, XsdAttributeUse::Ptr> availableUses;
+
+ // fill hash with attribute uses of current type for faster lookup
+ {
+ const XsdAttributeUse::List attributeUses = complexType->attributeUses();
+
+ for (int i = 0; i < attributeUses.count(); ++i) {
+ availableUses.insert(attributeUses.at(i)->attribute()->name(m_namePool), attributeUses.at(i));
+ }
+ }
+
+ // just add the attribute uses of the base type
+ for (int i = 0; i < uses.count(); ++i) {
+ const XsdAttributeUse::Ptr currentAttributeUse = uses.at(i);
+
+ // if the base type defines the attribute as prohibited but we override it in current type, then don't copy the prohibited attribute use
+ if ((currentAttributeUse->useType() == XsdAttributeUse::ProhibitedUse) && availableUses.contains(currentAttributeUse->attribute()->name(m_namePool)))
+ continue;
+
+ complexType->addAttributeUse(uses.at(i));
+ }
+ }
+
+ // handle attribute wildcards: @see http://www.w3.org/TR/xmlschema11-1/#dcl.ctd.anyatt
+
+ // 1
+ const XsdWildcard::Ptr completeWildcard(complexType->attributeWildcard());
+
+ if (complexType->derivationMethod() == XsdComplexType::DerivationRestriction) {
+ if (complexType->wxsSuperType()->isComplexType() && complexType->wxsSuperType()->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexBaseType(complexType->wxsSuperType());
+ if (complexType->attributeWildcard()) {
+ if (complexBaseType->attributeWildcard()) {
+ if (!isValidWildcardRestriction(complexType->attributeWildcard(), complexBaseType->attributeWildcard())) {
+ m_context->error(QtXmlPatterns::tr("attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, complexBaseType)),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ } else {
+ m_context->error(QtXmlPatterns::tr("%1 has attribute wildcard but its base type %2 has not")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, complexBaseType)),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ }
+ }
+ complexType->setAttributeWildcard(completeWildcard); // 2.1
+ } else if (complexType->derivationMethod() == XsdComplexType::DerivationExtension) {
+ XsdWildcard::Ptr baseWildcard; // 2.2.1
+ if (complexType->wxsSuperType()->isComplexType() && complexType->wxsSuperType()->isDefinedBySchema())
+ baseWildcard = XsdComplexType::Ptr(complexType->wxsSuperType())->attributeWildcard(); // 2.2.1.1
+ else
+ baseWildcard = XsdWildcard::Ptr(); // 2.2.1.2
+
+ if (!baseWildcard) {
+ complexType->setAttributeWildcard(completeWildcard); // 2.2.2.1
+ } else if (!completeWildcard) {
+ complexType->setAttributeWildcard(baseWildcard); // 2.2.2.2
+ } else {
+ XsdWildcard::Ptr unionWildcard = XsdSchemaHelper::wildcardUnion(completeWildcard, baseWildcard);
+ if (unionWildcard) {
+ unionWildcard->setProcessContents(completeWildcard->processContents());
+ complexType->setAttributeWildcard(unionWildcard); // 2.2.2.3
+ } else {
+ m_context->error(QtXmlPatterns::tr("union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible")
+ .arg(formatType(m_namePool, complexType))
+ .arg(formatType(m_namePool, complexBaseType)),
+ XsdSchemaContext::XSDError, sourceLocation(complexType));
+ return;
+ }
+ }
+ }
+}
+
+void XsdSchemaResolver::resolveEnumerationFacetValues()
+{
+ XsdSimpleType::List simpleTypes;
+
+ // first collect the global simple types
+ const SchemaType::List types = m_schema->types();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i)->isSimpleType())
+ simpleTypes.append(types.at(i));
+ }
+
+ // then collect all anonymous simple types
+ const SchemaType::List anonymousTypes = m_schema->anonymousTypes();
+ for (int i = 0; i < anonymousTypes.count(); ++i) {
+ if (anonymousTypes.at(i)->isSimpleType())
+ simpleTypes.append(anonymousTypes.at(i));
+ }
+ // process all simple types
+ for (int i = 0; i < simpleTypes.count(); ++i) {
+ const XsdSimpleType::Ptr simpleType = simpleTypes.at(i);
+
+ // we resolve the enumeration values only for xs:QName and xs:NOTATION based types
+ if (BuiltinTypes::xsQName->wxsTypeMatches(simpleType) ||
+ BuiltinTypes::xsNOTATION->wxsTypeMatches(simpleType)) {
+ const XsdFacet::Hash facets = simpleType->facets();
+ if (facets.contains(XsdFacet::Enumeration)) {
+ AtomicValue::List newValues;
+
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const AtomicValue::List values = facet->multiValue();
+ for (int j = 0; j < values.count(); ++j) {
+ const AtomicValue::Ptr value = values.at(j);
+
+ Q_ASSERT(m_enumerationFacetValues.contains(value));
+ const NamespaceSupport support( m_enumerationFacetValues.value(value) );
+
+ const QString qualifiedName = value->as<DerivedString<TypeString> >()->stringValue();
+ if (!XPathHelper::isQName(qualifiedName)) {
+ m_context->error(QtXmlPatterns::tr("enumeration facet contains invalid content: {%1} is not a value of type %2")
+ .arg(formatData(qualifiedName))
+ .arg(formatType(m_namePool, BuiltinTypes::xsQName)),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+
+ QXmlName qNameValue;
+ bool result = support.processName(qualifiedName, NamespaceSupport::ElementName, qNameValue);
+ if (!result) {
+ m_context->error(QtXmlPatterns::tr("namespace prefix of qualified name %1 is not defined").arg(formatData(qualifiedName)),
+ XsdSchemaContext::XSDError, sourceLocation(simpleType));
+ return;
+ }
+
+ newValues.append(QNameValue::fromValue(m_namePool, qNameValue));
+ }
+ facet->setMultiValue(newValues);
+ }
+ }
+ }
+}
+
+QSourceLocation XsdSchemaResolver::sourceLocation(const NamedSchemaComponent::Ptr component) const
+{
+ if (m_componentLocationHash.contains(component)) {
+ return m_componentLocationHash.value(component);
+ } else {
+ QSourceLocation location;
+ location.setLine(1);
+ location.setColumn(1);
+ location.setUri(QString::fromLatin1("dummyUri"));
+
+ return location;
+ }
+}
+
+XsdFacet::Hash XsdSchemaResolver::complexTypeFacets(const XsdComplexType::Ptr &complexType) const
+{
+ for (int i = 0; i < m_complexBaseTypes.count(); ++i) {
+ if (m_complexBaseTypes.at(i).complexType == complexType)
+ return m_complexBaseTypes.at(i).facets;
+ }
+
+ return XsdFacet::Hash();
+}
+
+void XsdSchemaResolver::checkRedefinedGroups()
+{
+ for (int i = 0; i < m_redefinedGroups.count(); ++i) {
+ const RedefinedGroups item = m_redefinedGroups.at(i);
+
+ // create dummy particles...
+ const XsdParticle::Ptr redefinedParticle(new XsdParticle());
+ redefinedParticle->setTerm(item.redefinedGroup);
+ const XsdParticle::Ptr particle(new XsdParticle());
+ particle->setTerm(item.group);
+
+ // so that we can pass them to XsdParticleChecker::subsumes()
+ QString errorMsg;
+ if (!XsdParticleChecker::subsumes(particle, redefinedParticle, m_context, errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("%1 element %2 is not a valid restriction of the %3 element it redefines: %4")
+ .arg(formatElement("group"))
+ .arg(formatData(item.redefinedGroup->displayName(m_namePool)))
+ .arg(formatElement("group"))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, sourceLocation(item.redefinedGroup));
+ return;
+ }
+ }
+}
+
+void XsdSchemaResolver::checkRedefinedAttributeGroups()
+{
+ for (int i = 0; i < m_redefinedAttributeGroups.count(); ++i) {
+ const RedefinedAttributeGroups item = m_redefinedAttributeGroups.at(i);
+
+ QString errorMsg;
+ if (!XsdSchemaHelper::isValidAttributeGroupRestriction(item.redefinedGroup, item.group, m_context, errorMsg)) {
+ m_context->error(QtXmlPatterns::tr("%1 element %2 is not a valid restriction of the %3 element it redefines: %4")
+ .arg(formatElement("attributeGroup"))
+ .arg(formatData(item.redefinedGroup->displayName(m_namePool)))
+ .arg(formatElement("attributeGroup"))
+ .arg(errorMsg),
+ XsdSchemaContext::XSDError, sourceLocation(item.redefinedGroup));
+ return;
+ }
+ }
+}
+
+AnySimpleType::Ptr XsdSchemaResolver::findPrimitiveType(const AnySimpleType::Ptr &type, QSet<AnySimpleType::Ptr> &visitedTypes)
+{
+ if (visitedTypes.contains(type)) {
+ // found invalid circular reference...
+ return AnySimpleType::Ptr();
+ } else {
+ visitedTypes.insert(type);
+ }
+
+ const QXmlName typeName = type->name(m_namePool);
+ if (typeName == BuiltinTypes::xsString->name(m_namePool) ||
+ typeName == BuiltinTypes::xsBoolean->name(m_namePool) ||
+ typeName == BuiltinTypes::xsFloat->name(m_namePool) ||
+ typeName == BuiltinTypes::xsDouble->name(m_namePool) ||
+ typeName == BuiltinTypes::xsDecimal->name(m_namePool) ||
+ typeName == BuiltinTypes::xsDuration->name(m_namePool) ||
+ typeName == BuiltinTypes::xsDateTime->name(m_namePool) ||
+ typeName == BuiltinTypes::xsTime->name(m_namePool) ||
+ typeName == BuiltinTypes::xsDate->name(m_namePool) ||
+ typeName == BuiltinTypes::xsGYearMonth->name(m_namePool) ||
+ typeName == BuiltinTypes::xsGYear->name(m_namePool) ||
+ typeName == BuiltinTypes::xsGMonthDay->name(m_namePool) ||
+ typeName == BuiltinTypes::xsGDay->name(m_namePool) ||
+ typeName == BuiltinTypes::xsGMonth->name(m_namePool) ||
+ typeName == BuiltinTypes::xsHexBinary->name(m_namePool) ||
+ typeName == BuiltinTypes::xsBase64Binary->name(m_namePool) ||
+ typeName == BuiltinTypes::xsAnyURI->name(m_namePool) ||
+ typeName == BuiltinTypes::xsQName->name(m_namePool) ||
+ typeName == BuiltinTypes::xsNOTATION->name(m_namePool) ||
+ typeName == BuiltinTypes::xsAnySimpleType->name(m_namePool))
+ return type;
+ else {
+ if (type->wxsSuperType())
+ return findPrimitiveType(type->wxsSuperType(), visitedTypes);
+ else {
+ return AnySimpleType::Ptr();
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschemaresolver_p.h b/src/xmlpatterns/schema/qxsdschemaresolver_p.h
new file mode 100644
index 0000000..60901b5
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschemaresolver_p.h
@@ -0,0 +1,578 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaResolver_H
+#define Patternist_XsdSchemaResolver_H
+
+#include "qnamespacesupport_p.h"
+#include "qschematype_p.h"
+#include "qschematypefactory_p.h"
+#include "qxsdalternative_p.h"
+#include "qxsdattribute_p.h"
+#include "qxsdattributegroup_p.h"
+#include "qxsdelement_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdnotation_p.h"
+#include "qxsdreference_p.h"
+#include "qxsdschema_p.h"
+#include "qxsdschemachecker_p.h"
+#include "qxsdsimpletype_p.h"
+
+#include <QtCore/QExplicitlySharedDataPointer>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ class XsdSchemaContext;
+ class XsdSchemaParserContext;
+
+ /**
+ * @short Encapsulates the resolving of type/element references in a schema after parsing has finished.
+ *
+ * This class collects task for resolving types or element references. After the parsing has finished,
+ * one can start the resolve process by calling resolve().
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaResolver : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdSchemaResolver> Ptr;
+
+ /**
+ * Creates a new schema resolver.
+ *
+ * @param context The schema context used for error reporting etc..
+ * @param parserContext The schema parser context where all objects to resolve belong to.
+ */
+ XsdSchemaResolver(const QExplicitlySharedDataPointer<XsdSchemaContext> &context, const XsdSchemaParserContext *parserContext);
+
+ /**
+ * Destroys the schema resolver.
+ */
+ ~XsdSchemaResolver();
+
+ /**
+ * Starts the resolve process.
+ */
+ void resolve();
+
+ /**
+ * Adds a resolve task for key references.
+ *
+ * The resolver will try to set the referencedKey property of @p keyRef to the <em>key</em> or <em>unique</em> object
+ * of @p element that has the given @p name.
+ */
+ void addKeyReference(const XsdElement::Ptr &element, const XsdIdentityConstraint::Ptr &keyRef, const QXmlName &name, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for the base type of restriction of a simple type.
+ *
+ * The resolver will set the base type of @p simpleType to the type named by @p baseName.
+ */
+ void addSimpleRestrictionBase(const XsdSimpleType::Ptr &simpleType, const QXmlName &baseName, const QSourceLocation &location);
+
+ /**
+ * Removes the resolve task for the base type of restriction of the simple @p type.
+ */
+ void removeSimpleRestrictionBase(const XsdSimpleType::Ptr &type);
+
+ /**
+ * Adds a resolve task for the list type of a simple type.
+ *
+ * The resolver will set the itemType property of @p simpleType to the type named by @p typeName.
+ */
+ void addSimpleListType(const XsdSimpleType::Ptr &simpleType, const QXmlName &typeName, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for the member types of a simple type.
+ *
+ * The resolver will set the memberTypes property of @p simpleType to the types named by @p typeNames.
+ */
+ void addSimpleUnionTypes(const XsdSimpleType::Ptr &simpleType, const QList<QXmlName> &typeNames, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for the type of an element.
+ *
+ * The resolver will set the type of the @p element to the type named by @p typeName.
+ */
+ void addElementType(const XsdElement::Ptr &element, const QXmlName &typeName, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for the base type of a complex type.
+ *
+ * The resolver will set the base type of @p complexType to the type named by @p baseName.
+ */
+ void addComplexBaseType(const XsdComplexType::Ptr &complexType, const QXmlName &baseName, const QSourceLocation &location, const XsdFacet::Hash &facets = XsdFacet::Hash());
+
+ /**
+ * Removes the resolve task for the base type of the complex @p type.
+ */
+ void removeComplexBaseType(const XsdComplexType::Ptr &type);
+
+ /**
+ * Adds a resolve task for the content type of a complex type.
+ *
+ * The resolver will set the content type properties for @p complexType based on the
+ * given explicit @p content and effective @p mixed value.
+ */
+ void addComplexContentType(const XsdComplexType::Ptr &complexType, const XsdParticle::Ptr &content, bool mixed);
+
+ /**
+ * Adds a resolve task for the type of an attribute.
+ *
+ * The resolver will set the type of the @p attribute to the type named by @p typeName.
+ */
+ void addAttributeType(const XsdAttribute::Ptr &attribute, const QXmlName &typeName, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for the type of an alternative.
+ *
+ * The resolver will set the type of the @p alternative to the type named by @p typeName.
+ */
+ void addAlternativeType(const XsdAlternative::Ptr &alternative, const QXmlName &typeName, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for the type of an alternative.
+ *
+ * The resolver will set the type of the @p alternative to the type of the @p element after
+ * the type of the @p element has been resolved.
+ */
+ void addAlternativeType(const XsdAlternative::Ptr &alternative, const XsdElement::Ptr &element);
+
+ /**
+ * Adds a resolve task for the substituion group affiliations of an element.
+ *
+ * The resolver will set the substitution group affiliations of the @p element to the
+ * top-level element named by @p elementNames.
+ */
+ void addSubstitutionGroupAffiliation(const XsdElement::Ptr &element, const QList<QXmlName> &elementName, const QSourceLocation &location);
+
+ /**
+ * Adds a resolve task for an element that has no type specified, only a substitution group
+ * affiliation.
+ *
+ * The resolver will set the type of the substitution group affiliation as type for the element.
+ */
+ void addSubstitutionGroupType(const XsdElement::Ptr &element);
+
+ /**
+ * Adds the component location hash, so the resolver is able to report meaning full
+ * error messages.
+ */
+ void addComponentLocationHash(const QHash<NamedSchemaComponent::Ptr, QSourceLocation> &hash);
+
+ /**
+ * Add a resolve task for enumeration facet values.
+ *
+ * In case the enumeration is of type QName or NOTATION, we have to resolve the QName later,
+ * so we store the namespace bindings together with the facet value here and resolve it as soon as
+ * we have all type information available.
+ */
+ void addEnumerationFacetValue(const AtomicValue::Ptr &facetValue, const NamespaceSupport &namespaceSupport);
+
+ /**
+ * Add a check job for redefined groups.
+ *
+ * When an element group is redefined, we have to check whether the redefined group is a valid
+ * restriction of the group it redefines. As we need all type information for that, we keep them
+ * here for later checking.
+ */
+ void addRedefinedGroups(const XsdModelGroup::Ptr &redefinedGroup, const XsdModelGroup::Ptr &group);
+
+ /**
+ * Add a check job for redefined attribute groups.
+ *
+ * When an attribute group is redefined, we have to check whether the redefined group is a valid
+ * restriction of the group it redefines. As we need all type information for that, we keep them
+ * here for later checking.
+ */
+ void addRedefinedAttributeGroups(const XsdAttributeGroup::Ptr &redefinedGroup, const XsdAttributeGroup::Ptr &group);
+
+ /**
+ * Adds a check for nested <em>all</em> groups.
+ */
+ void addAllGroupCheck(const XsdReference::Ptr &reference);
+
+ /**
+ * Copies the data to resolve to an @p other resolver.
+ *
+ * @note That functionality is only used by the redefine algorithm in the XsdSchemaParser.
+ */
+ void copyDataTo(const XsdSchemaResolver::Ptr &other) const;
+
+ /**
+ * Returns the to resolve base type name for the given @p type.
+ *
+ * @note That functionality is only used by the redefine algorithm in the XsdSchemaParser.
+ */
+ QXmlName baseTypeNameOfType(const SchemaType::Ptr &type) const;
+
+ /**
+ * Returns the to resolve type name for the given @p attribute.
+ *
+ * @note That functionality is only used by the redefine algorithm in the XsdSchemaParser.
+ */
+ QXmlName typeNameOfAttribute(const XsdAttribute::Ptr &attribute) const;
+
+ /**
+ * Sets the defaultOpenContent object from the schema parser.
+ */
+ void setDefaultOpenContent(const XsdComplexType::OpenContent::Ptr &openContent, bool appliesToEmpty);
+
+ private:
+ /**
+ * Resolves key references.
+ */
+ void resolveKeyReferences();
+
+ /**
+ * Resolves the base types of simple types derived by restriction.
+ */
+ void resolveSimpleRestrictionBaseTypes();
+
+ /**
+ * Resolves the other properties except the base type
+ * of all simple restrictions.
+ */
+ void resolveSimpleRestrictions();
+
+ /**
+ * Resolves the other properties except the base type
+ * of the given simple restriction.
+ *
+ * @param simpleType The restricted type to resolve.
+ * @param visitedTypes A set of already resolved types, used for termination of recursion.
+ */
+ void resolveSimpleRestrictions(const XsdSimpleType::Ptr &simpleType, QSet<XsdSimpleType::Ptr> &visitedTypes);
+
+ /**
+ * Resolves the item type property of simple types derived by list.
+ */
+ void resolveSimpleListType();
+
+ /**
+ * Resolves the member types property of simple types derived by union.
+ */
+ void resolveSimpleUnionTypes();
+
+ /**
+ * Resolves element types.
+ */
+ void resolveElementTypes();
+
+ /**
+ * Resolves base type of complex types.
+ */
+ void resolveComplexBaseTypes();
+
+ /**
+ * Resolves the simple content model of a complex type
+ * depending on its base type.
+ */
+ void resolveSimpleContentComplexTypes();
+
+ /**
+ * Resolves the complex content model of a complex type
+ * depending on its base type.
+ */
+ void resolveComplexContentComplexTypes();
+
+ /**
+ * Resolves the simple content model of a complex type
+ * depending on its base type.
+ *
+ * @param complexType The complex type to resolve.
+ * @param visitedTypes A set of already resolved types, used for termination of recursion.
+ */
+ void resolveSimpleContentComplexTypes(const XsdComplexType::Ptr &complexType, QSet<XsdComplexType::Ptr> &visitedTypes);
+
+ /**
+ * Resolves the complex content model of a complex type
+ * depending on its base type.
+ *
+ * @param complexType The complex type to resolve.
+ * @param visitedTypes A set of already resolved types, used for termination of recursion.
+ */
+ void resolveComplexContentComplexTypes(const XsdComplexType::Ptr &complexType, QSet<XsdComplexType::Ptr> &visitedTypes);
+
+ /**
+ * Resolves attribute types.
+ */
+ void resolveAttributeTypes();
+
+ /**
+ * Resolves alternative types.
+ */
+ void resolveAlternativeTypes();
+
+ /**
+ * Resolves substitution group affiliations.
+ */
+ void resolveSubstitutionGroupAffiliations();
+
+ /**
+ * Resolves substitution groups.
+ */
+ void resolveSubstitutionGroups();
+
+ /**
+ * Resolves all XsdReferences in the schema by their corresponding XsdElement or XsdModelGroup terms.
+ */
+ void resolveTermReferences();
+
+ /**
+ * Resolves all XsdReferences in the @p particle recursive by their corresponding XsdElement or XsdModelGroup terms.
+ */
+ void resolveTermReference(const XsdParticle::Ptr &particle, QSet<QXmlName> visitedGroups);
+
+ /**
+ * Resolves all XsdAttributeReferences in the schema by their corresponding XsdAttributeUse objects.
+ */
+ void resolveAttributeTermReferences();
+
+ /**
+ * Resolves all XsdAttributeReferences in the list of @p attributeUses by their corresponding XsdAttributeUse objects.
+ */
+ XsdAttributeUse::List resolveAttributeTermReferences(const XsdAttributeUse::List &attributeUses, XsdWildcard::Ptr &wildcard, QSet<QXmlName> visitedAttributeGroups);
+
+ /**
+ * Resolves the attribute inheritance of complex types.
+ *
+ * @note This method must be called after all base types have been resolved.
+ */
+ void resolveAttributeInheritance();
+
+ /**
+ * Resolves the attribute inheritance of the given complex types.
+ *
+ * @param complexType The complex type to resolve.
+ * @param visitedTypes A set of already resolved types, used for termination of recursion.
+ *
+ * @note This method must be called after all base types have been resolved.
+ */
+ void resolveAttributeInheritance(const XsdComplexType::Ptr &complexType, QSet<XsdComplexType::Ptr> &visitedTypes);
+
+ /**
+ * Resolves the enumeration facet values for QName and NOTATION based facets.
+ */
+ void resolveEnumerationFacetValues();
+
+ /**
+ * Returns the source location of the given schema @p component or a dummy
+ * source location if the component is not found in the component location hash.
+ */
+ QSourceLocation sourceLocation(const NamedSchemaComponent::Ptr component) const;
+
+ /**
+ * Returns the facets that are marked for the given complex @p type with a simple
+ * type restriction.
+ */
+ XsdFacet::Hash complexTypeFacets(const XsdComplexType::Ptr &complexType) const;
+
+ /**
+ * Finds the primitive type for the given simple @p type.
+ *
+ * The type is found by walking up the inheritance tree, until one of the builtin
+ * primitive type definitions is reached.
+ */
+ AnySimpleType::Ptr findPrimitiveType(const AnySimpleType::Ptr &type, QSet<AnySimpleType::Ptr> &visitedTypes);
+
+ /**
+ * Checks the redefined groups.
+ */
+ void checkRedefinedGroups();
+
+ /**
+ * Checks the redefined attribute groups.
+ */
+ void checkRedefinedAttributeGroups();
+
+ class KeyReference
+ {
+ public:
+ XsdElement::Ptr element;
+ XsdIdentityConstraint::Ptr keyRef;
+ QXmlName reference;
+ QSourceLocation location;
+ };
+
+ class SimpleRestrictionBase
+ {
+ public:
+ XsdSimpleType::Ptr simpleType;
+ QXmlName baseName;
+ QSourceLocation location;
+ };
+
+ class SimpleListType
+ {
+ public:
+ XsdSimpleType::Ptr simpleType;
+ QXmlName typeName;
+ QSourceLocation location;
+ };
+
+ class SimpleUnionType
+ {
+ public:
+ XsdSimpleType::Ptr simpleType;
+ QList<QXmlName> typeNames;
+ QSourceLocation location;
+ };
+
+ class ElementType
+ {
+ public:
+ XsdElement::Ptr element;
+ QXmlName typeName;
+ QSourceLocation location;
+ };
+
+ class ComplexBaseType
+ {
+ public:
+ XsdComplexType::Ptr complexType;
+ QXmlName baseName;
+ QSourceLocation location;
+ XsdFacet::Hash facets;
+ };
+
+ class ComplexContentType
+ {
+ public:
+ XsdComplexType::Ptr complexType;
+ XsdParticle::Ptr explicitContent;
+ bool effectiveMixed;
+ };
+
+ class AttributeType
+ {
+ public:
+ XsdAttribute::Ptr attribute;
+ QXmlName typeName;
+ QSourceLocation location;
+ };
+
+ class AlternativeType
+ {
+ public:
+ XsdAlternative::Ptr alternative;
+ QXmlName typeName;
+ QSourceLocation location;
+ };
+
+ class AlternativeTypeElement
+ {
+ public:
+ XsdAlternative::Ptr alternative;
+ XsdElement::Ptr element;
+ };
+
+ class SubstitutionGroupAffiliation
+ {
+ public:
+ XsdElement::Ptr element;
+ QList<QXmlName> elementNames;
+ QSourceLocation location;
+ };
+
+ class RedefinedGroups
+ {
+ public:
+ XsdModelGroup::Ptr redefinedGroup;
+ XsdModelGroup::Ptr group;
+ };
+
+ class RedefinedAttributeGroups
+ {
+ public:
+ XsdAttributeGroup::Ptr redefinedGroup;
+ XsdAttributeGroup::Ptr group;
+ };
+
+ QVector<KeyReference> m_keyReferences;
+ QVector<SimpleRestrictionBase> m_simpleRestrictionBases;
+ QVector<SimpleListType> m_simpleListTypes;
+ QVector<SimpleUnionType> m_simpleUnionTypes;
+ QVector<ElementType> m_elementTypes;
+ QVector<ComplexBaseType> m_complexBaseTypes;
+ QVector<ComplexContentType> m_complexContentTypes;
+ QVector<AttributeType> m_attributeTypes;
+ QVector<AlternativeType> m_alternativeTypes;
+ QVector<AlternativeTypeElement> m_alternativeTypeElements;
+ QVector<SubstitutionGroupAffiliation> m_substitutionGroupAffiliations;
+ QVector<XsdElement::Ptr> m_substitutionGroupTypes;
+ QVector<RedefinedGroups> m_redefinedGroups;
+ QVector<RedefinedAttributeGroups> m_redefinedAttributeGroups;
+ QHash<AtomicValue::Ptr, NamespaceSupport> m_enumerationFacetValues;
+ QSet<XsdReference::Ptr> m_allGroups;
+
+ QExplicitlySharedDataPointer<XsdSchemaContext> m_context;
+ QExplicitlySharedDataPointer<XsdSchemaChecker> m_checker;
+ NamePool::Ptr m_namePool;
+ XsdSchema::Ptr m_schema;
+ QHash<NamedSchemaComponent::Ptr, QSourceLocation> m_componentLocationHash;
+ XsdComplexType::OpenContent::Ptr m_defaultOpenContent;
+ bool m_defaultOpenContentAppliesToEmpty;
+ SchemaType::List m_predefinedSchemaTypes;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschematoken.cpp b/src/xmlpatterns/schema/qxsdschematoken.cpp
new file mode 100644
index 0000000..b462731
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschematoken.cpp
@@ -0,0 +1,2981 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* NOTE: This file is AUTO GENERATED by qautomaton2cpp.xsl. */
+
+#include "qxsdschematoken_p.h"
+
+QT_BEGIN_NAMESPACE
+
+XsdSchemaToken::NodeName XsdSchemaToken::classifier2(const QChar *data)
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 105, 100
+ };
+ if(memcmp(&data[0], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Id;
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier3(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+ if (data[1] == 108)
+
+
+ {
+
+ if(data[2] == 108)
+
+
+ return All;
+
+ }
+
+ else if (data[1] == 110)
+
+
+ {
+
+ if(data[2] == 121)
+
+
+ return Any;
+
+ }
+
+
+ }
+
+ else if (data[0] == 107)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 121
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Key;
+
+ }
+
+ else if (data[0] == 114)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 102
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Ref;
+
+ }
+
+ else if (data[0] == 117)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 115, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Use;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier4(const QChar *data)
+
+ {
+ if (data[0] == 98)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 115, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
+
+
+ return Base;
+
+ }
+
+ else if (data[0] == 102)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 114, 109
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
+
+
+ return Form;
+
+ }
+
+ else if (data[0] == 108)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 105, 115, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
+
+
+ return List;
+
+ }
+
+ else if (data[0] == 109)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 100, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
+
+
+ return Mode;
+
+ }
+
+ else if (data[0] == 110)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 109, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
+
+
+ return Name;
+
+ }
+
+ else if (data[0] == 116)
+
+
+ {
+ if (data[1] == 101)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 115, 116
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Test;
+
+ }
+
+ else if (data[1] == 121)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 112, 101
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Type;
+
+ }
+
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier5(const QChar *data)
+
+ {
+ if (data[0] == 98)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 111, 99, 107
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Block;
+
+ }
+
+ else if (data[0] == 102)
+
+
+ {
+ if (data[1] == 105)
+
+
+ {
+ if (data[2] == 101)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 100
+ };
+ if(memcmp(&data[3], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Field;
+
+ }
+
+ else if (data[2] == 110)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 108
+ };
+ if(memcmp(&data[3], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Final;
+
+ }
+
+ else if (data[2] == 120)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 100
+ };
+ if(memcmp(&data[3], &string, sizeof(QChar) * 2) == 0)
+
+
+ return Fixed;
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[0] == 103)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 114, 111, 117, 112
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Group;
+
+ }
+
+ else if (data[0] == 109)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 105, 120, 101, 100
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Mixed;
+
+ }
+
+ else if (data[0] == 114)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 102, 101, 114
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Refer;
+
+ }
+
+ else if (data[0] == 117)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Union;
+
+ }
+
+ else if (data[0] == 118)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 108, 117, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Value;
+
+ }
+
+ else if (data[0] == 120)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 112, 97, 116, 104
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Xpath;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier6(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 115, 115, 101, 114, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Assert;
+
+ }
+
+ else if (data[0] == 99)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 104, 111, 105, 99, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Choice;
+
+ }
+
+ else if (data[0] == 105)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 109, 112, 111, 114, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Import;
+
+ }
+
+ else if (data[0] == 107)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 121, 114, 101, 102
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Keyref;
+
+ }
+
+ else if (data[0] == 108)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 110, 103, 116, 104
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Length;
+
+ }
+
+ else if (data[0] == 112)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 117, 98, 108, 105, 99
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Public;
+
+ }
+
+ else if (data[0] == 115)
+
+
+ {
+ if (data[1] == 99)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 104, 101, 109, 97
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Schema;
+
+ }
+
+ else if (data[1] == 111)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 117, 114, 99, 101
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Source;
+
+ }
+
+ else if (data[1] == 121)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 115, 116, 101, 109
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
+
+
+ return System;
+
+ }
+
+
+ }
+
+ else if (data[0] == 117)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 105, 113, 117, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Unique;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier7(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 112, 112, 105, 110, 102, 111
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Appinfo;
+
+ }
+
+ else if (data[0] == 100)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 102, 97, 117, 108, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Default;
+
+ }
+
+ else if (data[0] == 101)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 101, 109, 101, 110, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Element;
+
+ }
+
+ else if (data[0] == 105)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 99, 108, 117, 100, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Include;
+
+ }
+
+ else if (data[0] == 112)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 116, 116, 101, 114, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Pattern;
+
+ }
+
+ else if (data[0] == 114)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 112, 108, 97, 99, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Replace;
+
+ }
+
+ else if (data[0] == 118)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 114, 115, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Version;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier8(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 98, 115, 116, 114, 97, 99, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Abstract;
+
+ }
+
+ else if (data[0] == 99)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 108, 108, 97, 112, 115, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Collapse;
+
+ }
+
+ else if (data[0] == 105)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 116, 101, 109, 84, 121, 112, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return ItemType;
+
+ }
+
+ else if (data[0] == 110)
+
+
+ {
+ if (data[1] == 105)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 108, 97, 98, 108, 101
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 6) == 0)
+
+
+ return Nillable;
+
+ }
+
+ else if (data[1] == 111)
+
+
+ {
+ if (data[2] == 116)
+
+
+ {
+ if (data[3] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 116, 105, 111, 110
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 4) == 0)
+
+
+ return Notation;
+
+ }
+
+ else if (data[3] == 81)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 78, 97, 109, 101
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 4) == 0)
+
+
+ return NotQName;
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[0] == 111)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 118, 101, 114, 114, 105, 100, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Override;
+
+ }
+
+ else if (data[0] == 112)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 114, 101, 115, 101, 114, 118, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Preserve;
+
+ }
+
+ else if (data[0] == 114)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 100, 101, 102, 105, 110, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Redefine;
+
+ }
+
+ else if (data[0] == 115)
+
+
+ {
+ if (data[1] == 101)
+
+
+ {
+ if (data[2] == 108)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 99, 116, 111, 114
+ };
+ if(memcmp(&data[3], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Selector;
+
+ }
+
+ else if (data[2] == 113)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 117, 101, 110, 99, 101
+ };
+ if(memcmp(&data[3], &string, sizeof(QChar) * 5) == 0)
+
+
+ return Sequence;
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[0] == 120)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 109, 108, 58, 108, 97, 110, 103
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
+
+
+ return XmlLanguage;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier9(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+ if (data[1] == 115)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 115, 101, 114, 116, 105, 111, 110
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Assertion;
+
+ }
+
+ else if (data[1] == 116)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 116, 114, 105, 98, 117, 116, 101
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 7) == 0)
+
+
+ return Attribute;
+
+ }
+
+
+ }
+
+ else if (data[0] == 101)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 120, 116, 101, 110, 115, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 8) == 0)
+
+
+ return Extension;
+
+ }
+
+ else if (data[0] == 109)
+
+
+ {
+ if (data[1] == 97)
+
+
+ {
+ if (data[2] == 120)
+
+
+ {
+ if (data[3] == 76)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 110, 103, 116, 104
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 5) == 0)
+
+
+ return MaxLength;
+
+ }
+
+ else if (data[3] == 79)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 99, 99, 117, 114, 115
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 5) == 0)
+
+
+ return MaxOccurs;
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[1] == 105)
+
+
+ {
+ if (data[2] == 110)
+
+
+ {
+ if (data[3] == 76)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 110, 103, 116, 104
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 5) == 0)
+
+
+ return MinLength;
+
+ }
+
+ else if (data[3] == 79)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 99, 99, 117, 114, 115
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 5) == 0)
+
+
+ return MinOccurs;
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[0] == 110)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 109, 101, 115, 112, 97, 99, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 8) == 0)
+
+
+ return Namespace;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier10(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 110, 111, 116, 97, 116, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 9) == 0)
+
+
+ return Annotation;
+
+ }
+
+ else if (data[0] == 115)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 105, 109, 112, 108, 101, 84, 121, 112, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 9) == 0)
+
+
+ return SimpleType;
+
+ }
+
+ else if (data[0] == 119)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 104, 105, 116, 101, 83, 112, 97, 99, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 9) == 0)
+
+
+ return WhiteSpace;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier11(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 116, 101, 114, 110, 97, 116, 105, 118, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return Alternative;
+
+ }
+
+ else if (data[0] == 99)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 109, 112, 108, 101, 120, 84, 121, 112, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return ComplexType;
+
+ }
+
+ else if (data[0] == 101)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 117, 109, 101, 114, 97, 116, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return Enumeration;
+
+ }
+
+ else if (data[0] == 109)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 109, 98, 101, 114, 84, 121, 112, 101, 115
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return MemberTypes;
+
+ }
+
+ else if (data[0] == 111)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 112, 101, 110, 67, 111, 110, 116, 101, 110, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return OpenContent;
+
+ }
+
+ else if (data[0] == 114)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 115, 116, 114, 105, 99, 116, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return Restriction;
+
+ }
+
+ else if (data[0] == 116)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 116, 97, 108, 68, 105, 103, 105, 116, 115
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 10) == 0)
+
+
+ return TotalDigits;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier12(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 11) == 0)
+
+
+ return AnyAttribute;
+
+ }
+
+ else if (data[0] == 98)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 111, 99, 107, 68, 101, 102, 97, 117, 108, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 11) == 0)
+
+
+ return BlockDefault;
+
+ }
+
+ else if (data[0] == 102)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 105, 110, 97, 108, 68, 101, 102, 97, 117, 108, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 11) == 0)
+
+
+ return FinalDefault;
+
+ }
+
+ else if (data[0] == 109)
+
+
+ {
+ if (data[1] == 97)
+
+
+ {
+ if (data[2] == 120)
+
+
+ {
+ if (data[3] == 69)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 120, 99, 108, 117, 115, 105, 118, 101
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 8) == 0)
+
+
+ return MaxExclusive;
+
+ }
+
+ else if (data[3] == 73)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 99, 108, 117, 115, 105, 118, 101
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 8) == 0)
+
+
+ return MaxInclusive;
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[1] == 105)
+
+
+ {
+ if (data[2] == 110)
+
+
+ {
+ if (data[3] == 69)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 120, 99, 108, 117, 115, 105, 118, 101
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 8) == 0)
+
+
+ return MinExclusive;
+
+ }
+
+ else if (data[3] == 73)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 110, 99, 108, 117, 115, 105, 118, 101
+ };
+ if(memcmp(&data[4], &string, sizeof(QChar) * 8) == 0)
+
+
+ return MinInclusive;
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ else if (data[0] == 110)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 11) == 0)
+
+
+ return NotNamespace;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier13(const QChar *data)
+
+ {
+ if (data[0] == 100)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 12) == 0)
+
+
+ return Documentation;
+
+ }
+
+ else if (data[0] == 115)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 105, 109, 112, 108, 101, 67, 111, 110, 116, 101, 110, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 12) == 0)
+
+
+ return SimpleContent;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier14(const QChar *data)
+
+ {
+ if (data[0] == 97)
+
+
+ {
+ if (data[1] == 112)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 112, 108, 105, 101, 115, 84, 111, 69, 109, 112, 116, 121
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 12) == 0)
+
+
+ return AppliesToEmpty;
+
+ }
+
+ else if (data[1] == 116)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 116, 114, 105, 98, 117, 116, 101, 71, 114, 111, 117, 112
+ };
+ if(memcmp(&data[2], &string, sizeof(QChar) * 12) == 0)
+
+
+ return AttributeGroup;
+
+ }
+
+
+ }
+
+ else if (data[0] == 99)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 111, 109, 112, 108, 101, 120, 67, 111, 110, 116, 101, 110, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 13) == 0)
+
+
+ return ComplexContent;
+
+ }
+
+ else if (data[0] == 102)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 114, 97, 99, 116, 105, 111, 110, 68, 105, 103, 105, 116, 115
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 13) == 0)
+
+
+ return FractionDigits;
+
+ }
+
+ else if (data[0] == 115)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 99, 104, 101, 109, 97, 76, 111, 99, 97, 116, 105, 111, 110
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 13) == 0)
+
+
+ return SchemaLocation;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier15(const QChar *data)
+
+ {
+ if (data[0] == 112)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 114, 111, 99, 101, 115, 115, 67, 111, 110, 116, 101, 110, 116, 115
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 14) == 0)
+
+
+ return ProcessContents;
+
+ }
+
+ else if (data[0] == 116)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 114, 103, 101, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 14) == 0)
+
+
+ return TargetNamespace;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier17(const QChar *data)
+
+ {
+ if (data[0] == 100)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 102, 97, 117, 108, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 16) == 0)
+
+
+ return DefaultAttributes;
+
+ }
+
+ else if (data[0] == 115)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 117, 98, 115, 116, 105, 116, 117, 116, 105, 111, 110, 71, 114, 111, 117, 112
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 16) == 0)
+
+
+ return SubstitutionGroup;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier18(const QChar *data)
+
+ {
+ if (data[0] == 100)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 101, 102, 97, 117, 108, 116, 79, 112, 101, 110, 67, 111, 110, 116, 101, 110, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 17) == 0)
+
+
+ return DefaultOpenContent;
+
+ }
+
+ else if (data[0] == 101)
+
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 108, 101, 109, 101, 110, 116, 70, 111, 114, 109, 68, 101, 102, 97, 117, 108, 116
+ };
+ if(memcmp(&data[1], &string, sizeof(QChar) * 17) == 0)
+
+
+ return ElementFormDefault;
+
+ }
+
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier20(const QChar *data)
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 97, 116, 116, 114, 105, 98, 117, 116, 101, 70, 111, 114, 109, 68, 101, 102, 97, 117, 108, 116
+ };
+ if(memcmp(&data[0], &string, sizeof(QChar) * 20) == 0)
+
+
+ return AttributeFormDefault;
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier21(const QChar *data)
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 120, 112, 97, 116, 104, 68, 101, 102, 97, 117, 108, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101
+ };
+ if(memcmp(&data[0], &string, sizeof(QChar) * 21) == 0)
+
+
+ return XPathDefaultNamespace;
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier22(const QChar *data)
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 100, 101, 102, 97, 117, 108, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 65, 112, 112, 108, 121
+ };
+ if(memcmp(&data[0], &string, sizeof(QChar) * 22) == 0)
+
+
+ return DefaultAttributesApply;
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::classifier32(const QChar *data)
+
+ {
+
+ static const unsigned short string[] =
+ {
+ 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 119, 51, 46, 111, 114, 103, 47, 50, 48, 48, 49, 47, 88, 77, 76, 83, 99, 104, 101, 109, 97
+ };
+ if(memcmp(&data[0], &string, sizeof(QChar) * 32) == 0)
+
+
+ return XML_NS_SCHEMA_URI;
+
+
+ return NoKeyword;
+ }
+ XsdSchemaToken::NodeName XsdSchemaToken::toToken(const QChar *data, int length)
+ {
+ switch(length)
+ {
+
+ case 2:
+ return classifier2(data);
+
+
+ case 3:
+ return classifier3(data);
+
+
+ case 4:
+ return classifier4(data);
+
+
+ case 5:
+ return classifier5(data);
+
+
+ case 6:
+ return classifier6(data);
+
+
+ case 7:
+ return classifier7(data);
+
+
+ case 8:
+ return classifier8(data);
+
+
+ case 9:
+ return classifier9(data);
+
+
+ case 10:
+ return classifier10(data);
+
+
+ case 11:
+ return classifier11(data);
+
+
+ case 12:
+ return classifier12(data);
+
+
+ case 13:
+ return classifier13(data);
+
+
+ case 14:
+ return classifier14(data);
+
+
+ case 15:
+ return classifier15(data);
+
+
+ case 17:
+ return classifier17(data);
+
+
+ case 18:
+ return classifier18(data);
+
+
+ case 20:
+ return classifier20(data);
+
+
+ case 21:
+ return classifier21(data);
+
+
+ case 22:
+ return classifier22(data);
+
+
+ case 32:
+ return classifier32(data);
+
+
+ default:
+ return NoKeyword;
+ }
+ }
+
+
+ QString XsdSchemaToken::toString(NodeName token)
+ {
+ const unsigned short *data = 0;
+ int length = 0;
+
+ switch(token)
+ {
+
+ case Abstract:
+ {
+ static const unsigned short staticallyStoredAbstract[] =
+ {
+ 97, 98, 115, 116, 114, 97, 99, 116, 0
+ };
+ data = staticallyStoredAbstract;
+ length = 8;
+ break;
+ }
+
+ case All:
+ {
+ static const unsigned short staticallyStoredAll[] =
+ {
+ 97, 108, 108, 0
+ };
+ data = staticallyStoredAll;
+ length = 3;
+ break;
+ }
+
+ case Alternative:
+ {
+ static const unsigned short staticallyStoredAlternative[] =
+ {
+ 97, 108, 116, 101, 114, 110, 97, 116, 105, 118, 101, 0
+ };
+ data = staticallyStoredAlternative;
+ length = 11;
+ break;
+ }
+
+ case Annotation:
+ {
+ static const unsigned short staticallyStoredAnnotation[] =
+ {
+ 97, 110, 110, 111, 116, 97, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredAnnotation;
+ length = 10;
+ break;
+ }
+
+ case Any:
+ {
+ static const unsigned short staticallyStoredAny[] =
+ {
+ 97, 110, 121, 0
+ };
+ data = staticallyStoredAny;
+ length = 3;
+ break;
+ }
+
+ case AnyAttribute:
+ {
+ static const unsigned short staticallyStoredAnyAttribute[] =
+ {
+ 97, 110, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0
+ };
+ data = staticallyStoredAnyAttribute;
+ length = 12;
+ break;
+ }
+
+ case Appinfo:
+ {
+ static const unsigned short staticallyStoredAppinfo[] =
+ {
+ 97, 112, 112, 105, 110, 102, 111, 0
+ };
+ data = staticallyStoredAppinfo;
+ length = 7;
+ break;
+ }
+
+ case AppliesToEmpty:
+ {
+ static const unsigned short staticallyStoredAppliesToEmpty[] =
+ {
+ 97, 112, 112, 108, 105, 101, 115, 84, 111, 69, 109, 112, 116, 121, 0
+ };
+ data = staticallyStoredAppliesToEmpty;
+ length = 14;
+ break;
+ }
+
+ case Assert:
+ {
+ static const unsigned short staticallyStoredAssert[] =
+ {
+ 97, 115, 115, 101, 114, 116, 0
+ };
+ data = staticallyStoredAssert;
+ length = 6;
+ break;
+ }
+
+ case Assertion:
+ {
+ static const unsigned short staticallyStoredAssertion[] =
+ {
+ 97, 115, 115, 101, 114, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredAssertion;
+ length = 9;
+ break;
+ }
+
+ case Attribute:
+ {
+ static const unsigned short staticallyStoredAttribute[] =
+ {
+ 97, 116, 116, 114, 105, 98, 117, 116, 101, 0
+ };
+ data = staticallyStoredAttribute;
+ length = 9;
+ break;
+ }
+
+ case AttributeFormDefault:
+ {
+ static const unsigned short staticallyStoredAttributeFormDefault[] =
+ {
+ 97, 116, 116, 114, 105, 98, 117, 116, 101, 70, 111, 114, 109, 68, 101, 102, 97, 117, 108, 116, 0
+ };
+ data = staticallyStoredAttributeFormDefault;
+ length = 20;
+ break;
+ }
+
+ case AttributeGroup:
+ {
+ static const unsigned short staticallyStoredAttributeGroup[] =
+ {
+ 97, 116, 116, 114, 105, 98, 117, 116, 101, 71, 114, 111, 117, 112, 0
+ };
+ data = staticallyStoredAttributeGroup;
+ length = 14;
+ break;
+ }
+
+ case Base:
+ {
+ static const unsigned short staticallyStoredBase[] =
+ {
+ 98, 97, 115, 101, 0
+ };
+ data = staticallyStoredBase;
+ length = 4;
+ break;
+ }
+
+ case Block:
+ {
+ static const unsigned short staticallyStoredBlock[] =
+ {
+ 98, 108, 111, 99, 107, 0
+ };
+ data = staticallyStoredBlock;
+ length = 5;
+ break;
+ }
+
+ case BlockDefault:
+ {
+ static const unsigned short staticallyStoredBlockDefault[] =
+ {
+ 98, 108, 111, 99, 107, 68, 101, 102, 97, 117, 108, 116, 0
+ };
+ data = staticallyStoredBlockDefault;
+ length = 12;
+ break;
+ }
+
+ case Choice:
+ {
+ static const unsigned short staticallyStoredChoice[] =
+ {
+ 99, 104, 111, 105, 99, 101, 0
+ };
+ data = staticallyStoredChoice;
+ length = 6;
+ break;
+ }
+
+ case Collapse:
+ {
+ static const unsigned short staticallyStoredCollapse[] =
+ {
+ 99, 111, 108, 108, 97, 112, 115, 101, 0
+ };
+ data = staticallyStoredCollapse;
+ length = 8;
+ break;
+ }
+
+ case ComplexContent:
+ {
+ static const unsigned short staticallyStoredComplexContent[] =
+ {
+ 99, 111, 109, 112, 108, 101, 120, 67, 111, 110, 116, 101, 110, 116, 0
+ };
+ data = staticallyStoredComplexContent;
+ length = 14;
+ break;
+ }
+
+ case ComplexType:
+ {
+ static const unsigned short staticallyStoredComplexType[] =
+ {
+ 99, 111, 109, 112, 108, 101, 120, 84, 121, 112, 101, 0
+ };
+ data = staticallyStoredComplexType;
+ length = 11;
+ break;
+ }
+
+ case Default:
+ {
+ static const unsigned short staticallyStoredDefault[] =
+ {
+ 100, 101, 102, 97, 117, 108, 116, 0
+ };
+ data = staticallyStoredDefault;
+ length = 7;
+ break;
+ }
+
+ case DefaultAttributes:
+ {
+ static const unsigned short staticallyStoredDefaultAttributes[] =
+ {
+ 100, 101, 102, 97, 117, 108, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 0
+ };
+ data = staticallyStoredDefaultAttributes;
+ length = 17;
+ break;
+ }
+
+ case DefaultAttributesApply:
+ {
+ static const unsigned short staticallyStoredDefaultAttributesApply[] =
+ {
+ 100, 101, 102, 97, 117, 108, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 65, 112, 112, 108, 121, 0
+ };
+ data = staticallyStoredDefaultAttributesApply;
+ length = 22;
+ break;
+ }
+
+ case DefaultOpenContent:
+ {
+ static const unsigned short staticallyStoredDefaultOpenContent[] =
+ {
+ 100, 101, 102, 97, 117, 108, 116, 79, 112, 101, 110, 67, 111, 110, 116, 101, 110, 116, 0
+ };
+ data = staticallyStoredDefaultOpenContent;
+ length = 18;
+ break;
+ }
+
+ case Documentation:
+ {
+ static const unsigned short staticallyStoredDocumentation[] =
+ {
+ 100, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredDocumentation;
+ length = 13;
+ break;
+ }
+
+ case Element:
+ {
+ static const unsigned short staticallyStoredElement[] =
+ {
+ 101, 108, 101, 109, 101, 110, 116, 0
+ };
+ data = staticallyStoredElement;
+ length = 7;
+ break;
+ }
+
+ case ElementFormDefault:
+ {
+ static const unsigned short staticallyStoredElementFormDefault[] =
+ {
+ 101, 108, 101, 109, 101, 110, 116, 70, 111, 114, 109, 68, 101, 102, 97, 117, 108, 116, 0
+ };
+ data = staticallyStoredElementFormDefault;
+ length = 18;
+ break;
+ }
+
+ case Enumeration:
+ {
+ static const unsigned short staticallyStoredEnumeration[] =
+ {
+ 101, 110, 117, 109, 101, 114, 97, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredEnumeration;
+ length = 11;
+ break;
+ }
+
+ case Extension:
+ {
+ static const unsigned short staticallyStoredExtension[] =
+ {
+ 101, 120, 116, 101, 110, 115, 105, 111, 110, 0
+ };
+ data = staticallyStoredExtension;
+ length = 9;
+ break;
+ }
+
+ case Field:
+ {
+ static const unsigned short staticallyStoredField[] =
+ {
+ 102, 105, 101, 108, 100, 0
+ };
+ data = staticallyStoredField;
+ length = 5;
+ break;
+ }
+
+ case Final:
+ {
+ static const unsigned short staticallyStoredFinal[] =
+ {
+ 102, 105, 110, 97, 108, 0
+ };
+ data = staticallyStoredFinal;
+ length = 5;
+ break;
+ }
+
+ case FinalDefault:
+ {
+ static const unsigned short staticallyStoredFinalDefault[] =
+ {
+ 102, 105, 110, 97, 108, 68, 101, 102, 97, 117, 108, 116, 0
+ };
+ data = staticallyStoredFinalDefault;
+ length = 12;
+ break;
+ }
+
+ case Fixed:
+ {
+ static const unsigned short staticallyStoredFixed[] =
+ {
+ 102, 105, 120, 101, 100, 0
+ };
+ data = staticallyStoredFixed;
+ length = 5;
+ break;
+ }
+
+ case Form:
+ {
+ static const unsigned short staticallyStoredForm[] =
+ {
+ 102, 111, 114, 109, 0
+ };
+ data = staticallyStoredForm;
+ length = 4;
+ break;
+ }
+
+ case FractionDigits:
+ {
+ static const unsigned short staticallyStoredFractionDigits[] =
+ {
+ 102, 114, 97, 99, 116, 105, 111, 110, 68, 105, 103, 105, 116, 115, 0
+ };
+ data = staticallyStoredFractionDigits;
+ length = 14;
+ break;
+ }
+
+ case Group:
+ {
+ static const unsigned short staticallyStoredGroup[] =
+ {
+ 103, 114, 111, 117, 112, 0
+ };
+ data = staticallyStoredGroup;
+ length = 5;
+ break;
+ }
+
+ case Id:
+ {
+ static const unsigned short staticallyStoredId[] =
+ {
+ 105, 100, 0
+ };
+ data = staticallyStoredId;
+ length = 2;
+ break;
+ }
+
+ case Import:
+ {
+ static const unsigned short staticallyStoredImport[] =
+ {
+ 105, 109, 112, 111, 114, 116, 0
+ };
+ data = staticallyStoredImport;
+ length = 6;
+ break;
+ }
+
+ case Include:
+ {
+ static const unsigned short staticallyStoredInclude[] =
+ {
+ 105, 110, 99, 108, 117, 100, 101, 0
+ };
+ data = staticallyStoredInclude;
+ length = 7;
+ break;
+ }
+
+ case ItemType:
+ {
+ static const unsigned short staticallyStoredItemType[] =
+ {
+ 105, 116, 101, 109, 84, 121, 112, 101, 0
+ };
+ data = staticallyStoredItemType;
+ length = 8;
+ break;
+ }
+
+ case Key:
+ {
+ static const unsigned short staticallyStoredKey[] =
+ {
+ 107, 101, 121, 0
+ };
+ data = staticallyStoredKey;
+ length = 3;
+ break;
+ }
+
+ case Keyref:
+ {
+ static const unsigned short staticallyStoredKeyref[] =
+ {
+ 107, 101, 121, 114, 101, 102, 0
+ };
+ data = staticallyStoredKeyref;
+ length = 6;
+ break;
+ }
+
+ case Length:
+ {
+ static const unsigned short staticallyStoredLength[] =
+ {
+ 108, 101, 110, 103, 116, 104, 0
+ };
+ data = staticallyStoredLength;
+ length = 6;
+ break;
+ }
+
+ case List:
+ {
+ static const unsigned short staticallyStoredList[] =
+ {
+ 108, 105, 115, 116, 0
+ };
+ data = staticallyStoredList;
+ length = 4;
+ break;
+ }
+
+ case MaxExclusive:
+ {
+ static const unsigned short staticallyStoredMaxExclusive[] =
+ {
+ 109, 97, 120, 69, 120, 99, 108, 117, 115, 105, 118, 101, 0
+ };
+ data = staticallyStoredMaxExclusive;
+ length = 12;
+ break;
+ }
+
+ case MaxInclusive:
+ {
+ static const unsigned short staticallyStoredMaxInclusive[] =
+ {
+ 109, 97, 120, 73, 110, 99, 108, 117, 115, 105, 118, 101, 0
+ };
+ data = staticallyStoredMaxInclusive;
+ length = 12;
+ break;
+ }
+
+ case MaxLength:
+ {
+ static const unsigned short staticallyStoredMaxLength[] =
+ {
+ 109, 97, 120, 76, 101, 110, 103, 116, 104, 0
+ };
+ data = staticallyStoredMaxLength;
+ length = 9;
+ break;
+ }
+
+ case MaxOccurs:
+ {
+ static const unsigned short staticallyStoredMaxOccurs[] =
+ {
+ 109, 97, 120, 79, 99, 99, 117, 114, 115, 0
+ };
+ data = staticallyStoredMaxOccurs;
+ length = 9;
+ break;
+ }
+
+ case MemberTypes:
+ {
+ static const unsigned short staticallyStoredMemberTypes[] =
+ {
+ 109, 101, 109, 98, 101, 114, 84, 121, 112, 101, 115, 0
+ };
+ data = staticallyStoredMemberTypes;
+ length = 11;
+ break;
+ }
+
+ case MinExclusive:
+ {
+ static const unsigned short staticallyStoredMinExclusive[] =
+ {
+ 109, 105, 110, 69, 120, 99, 108, 117, 115, 105, 118, 101, 0
+ };
+ data = staticallyStoredMinExclusive;
+ length = 12;
+ break;
+ }
+
+ case MinInclusive:
+ {
+ static const unsigned short staticallyStoredMinInclusive[] =
+ {
+ 109, 105, 110, 73, 110, 99, 108, 117, 115, 105, 118, 101, 0
+ };
+ data = staticallyStoredMinInclusive;
+ length = 12;
+ break;
+ }
+
+ case MinLength:
+ {
+ static const unsigned short staticallyStoredMinLength[] =
+ {
+ 109, 105, 110, 76, 101, 110, 103, 116, 104, 0
+ };
+ data = staticallyStoredMinLength;
+ length = 9;
+ break;
+ }
+
+ case MinOccurs:
+ {
+ static const unsigned short staticallyStoredMinOccurs[] =
+ {
+ 109, 105, 110, 79, 99, 99, 117, 114, 115, 0
+ };
+ data = staticallyStoredMinOccurs;
+ length = 9;
+ break;
+ }
+
+ case Mixed:
+ {
+ static const unsigned short staticallyStoredMixed[] =
+ {
+ 109, 105, 120, 101, 100, 0
+ };
+ data = staticallyStoredMixed;
+ length = 5;
+ break;
+ }
+
+ case Mode:
+ {
+ static const unsigned short staticallyStoredMode[] =
+ {
+ 109, 111, 100, 101, 0
+ };
+ data = staticallyStoredMode;
+ length = 4;
+ break;
+ }
+
+ case Name:
+ {
+ static const unsigned short staticallyStoredName[] =
+ {
+ 110, 97, 109, 101, 0
+ };
+ data = staticallyStoredName;
+ length = 4;
+ break;
+ }
+
+ case Namespace:
+ {
+ static const unsigned short staticallyStoredNamespace[] =
+ {
+ 110, 97, 109, 101, 115, 112, 97, 99, 101, 0
+ };
+ data = staticallyStoredNamespace;
+ length = 9;
+ break;
+ }
+
+ case Nillable:
+ {
+ static const unsigned short staticallyStoredNillable[] =
+ {
+ 110, 105, 108, 108, 97, 98, 108, 101, 0
+ };
+ data = staticallyStoredNillable;
+ length = 8;
+ break;
+ }
+
+ case NotNamespace:
+ {
+ static const unsigned short staticallyStoredNotNamespace[] =
+ {
+ 110, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 0
+ };
+ data = staticallyStoredNotNamespace;
+ length = 12;
+ break;
+ }
+
+ case NotQName:
+ {
+ static const unsigned short staticallyStoredNotQName[] =
+ {
+ 110, 111, 116, 81, 78, 97, 109, 101, 0
+ };
+ data = staticallyStoredNotQName;
+ length = 8;
+ break;
+ }
+
+ case Notation:
+ {
+ static const unsigned short staticallyStoredNotation[] =
+ {
+ 110, 111, 116, 97, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredNotation;
+ length = 8;
+ break;
+ }
+
+ case OpenContent:
+ {
+ static const unsigned short staticallyStoredOpenContent[] =
+ {
+ 111, 112, 101, 110, 67, 111, 110, 116, 101, 110, 116, 0
+ };
+ data = staticallyStoredOpenContent;
+ length = 11;
+ break;
+ }
+
+ case Override:
+ {
+ static const unsigned short staticallyStoredOverride[] =
+ {
+ 111, 118, 101, 114, 114, 105, 100, 101, 0
+ };
+ data = staticallyStoredOverride;
+ length = 8;
+ break;
+ }
+
+ case Pattern:
+ {
+ static const unsigned short staticallyStoredPattern[] =
+ {
+ 112, 97, 116, 116, 101, 114, 110, 0
+ };
+ data = staticallyStoredPattern;
+ length = 7;
+ break;
+ }
+
+ case Preserve:
+ {
+ static const unsigned short staticallyStoredPreserve[] =
+ {
+ 112, 114, 101, 115, 101, 114, 118, 101, 0
+ };
+ data = staticallyStoredPreserve;
+ length = 8;
+ break;
+ }
+
+ case ProcessContents:
+ {
+ static const unsigned short staticallyStoredProcessContents[] =
+ {
+ 112, 114, 111, 99, 101, 115, 115, 67, 111, 110, 116, 101, 110, 116, 115, 0
+ };
+ data = staticallyStoredProcessContents;
+ length = 15;
+ break;
+ }
+
+ case Public:
+ {
+ static const unsigned short staticallyStoredPublic[] =
+ {
+ 112, 117, 98, 108, 105, 99, 0
+ };
+ data = staticallyStoredPublic;
+ length = 6;
+ break;
+ }
+
+ case Redefine:
+ {
+ static const unsigned short staticallyStoredRedefine[] =
+ {
+ 114, 101, 100, 101, 102, 105, 110, 101, 0
+ };
+ data = staticallyStoredRedefine;
+ length = 8;
+ break;
+ }
+
+ case Ref:
+ {
+ static const unsigned short staticallyStoredRef[] =
+ {
+ 114, 101, 102, 0
+ };
+ data = staticallyStoredRef;
+ length = 3;
+ break;
+ }
+
+ case Refer:
+ {
+ static const unsigned short staticallyStoredRefer[] =
+ {
+ 114, 101, 102, 101, 114, 0
+ };
+ data = staticallyStoredRefer;
+ length = 5;
+ break;
+ }
+
+ case Replace:
+ {
+ static const unsigned short staticallyStoredReplace[] =
+ {
+ 114, 101, 112, 108, 97, 99, 101, 0
+ };
+ data = staticallyStoredReplace;
+ length = 7;
+ break;
+ }
+
+ case Restriction:
+ {
+ static const unsigned short staticallyStoredRestriction[] =
+ {
+ 114, 101, 115, 116, 114, 105, 99, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredRestriction;
+ length = 11;
+ break;
+ }
+
+ case Schema:
+ {
+ static const unsigned short staticallyStoredSchema[] =
+ {
+ 115, 99, 104, 101, 109, 97, 0
+ };
+ data = staticallyStoredSchema;
+ length = 6;
+ break;
+ }
+
+ case SchemaLocation:
+ {
+ static const unsigned short staticallyStoredSchemaLocation[] =
+ {
+ 115, 99, 104, 101, 109, 97, 76, 111, 99, 97, 116, 105, 111, 110, 0
+ };
+ data = staticallyStoredSchemaLocation;
+ length = 14;
+ break;
+ }
+
+ case Selector:
+ {
+ static const unsigned short staticallyStoredSelector[] =
+ {
+ 115, 101, 108, 101, 99, 116, 111, 114, 0
+ };
+ data = staticallyStoredSelector;
+ length = 8;
+ break;
+ }
+
+ case Sequence:
+ {
+ static const unsigned short staticallyStoredSequence[] =
+ {
+ 115, 101, 113, 117, 101, 110, 99, 101, 0
+ };
+ data = staticallyStoredSequence;
+ length = 8;
+ break;
+ }
+
+ case SimpleContent:
+ {
+ static const unsigned short staticallyStoredSimpleContent[] =
+ {
+ 115, 105, 109, 112, 108, 101, 67, 111, 110, 116, 101, 110, 116, 0
+ };
+ data = staticallyStoredSimpleContent;
+ length = 13;
+ break;
+ }
+
+ case SimpleType:
+ {
+ static const unsigned short staticallyStoredSimpleType[] =
+ {
+ 115, 105, 109, 112, 108, 101, 84, 121, 112, 101, 0
+ };
+ data = staticallyStoredSimpleType;
+ length = 10;
+ break;
+ }
+
+ case Source:
+ {
+ static const unsigned short staticallyStoredSource[] =
+ {
+ 115, 111, 117, 114, 99, 101, 0
+ };
+ data = staticallyStoredSource;
+ length = 6;
+ break;
+ }
+
+ case SubstitutionGroup:
+ {
+ static const unsigned short staticallyStoredSubstitutionGroup[] =
+ {
+ 115, 117, 98, 115, 116, 105, 116, 117, 116, 105, 111, 110, 71, 114, 111, 117, 112, 0
+ };
+ data = staticallyStoredSubstitutionGroup;
+ length = 17;
+ break;
+ }
+
+ case System:
+ {
+ static const unsigned short staticallyStoredSystem[] =
+ {
+ 115, 121, 115, 116, 101, 109, 0
+ };
+ data = staticallyStoredSystem;
+ length = 6;
+ break;
+ }
+
+ case TargetNamespace:
+ {
+ static const unsigned short staticallyStoredTargetNamespace[] =
+ {
+ 116, 97, 114, 103, 101, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 0
+ };
+ data = staticallyStoredTargetNamespace;
+ length = 15;
+ break;
+ }
+
+ case Test:
+ {
+ static const unsigned short staticallyStoredTest[] =
+ {
+ 116, 101, 115, 116, 0
+ };
+ data = staticallyStoredTest;
+ length = 4;
+ break;
+ }
+
+ case TotalDigits:
+ {
+ static const unsigned short staticallyStoredTotalDigits[] =
+ {
+ 116, 111, 116, 97, 108, 68, 105, 103, 105, 116, 115, 0
+ };
+ data = staticallyStoredTotalDigits;
+ length = 11;
+ break;
+ }
+
+ case Type:
+ {
+ static const unsigned short staticallyStoredType[] =
+ {
+ 116, 121, 112, 101, 0
+ };
+ data = staticallyStoredType;
+ length = 4;
+ break;
+ }
+
+ case Union:
+ {
+ static const unsigned short staticallyStoredUnion[] =
+ {
+ 117, 110, 105, 111, 110, 0
+ };
+ data = staticallyStoredUnion;
+ length = 5;
+ break;
+ }
+
+ case Unique:
+ {
+ static const unsigned short staticallyStoredUnique[] =
+ {
+ 117, 110, 105, 113, 117, 101, 0
+ };
+ data = staticallyStoredUnique;
+ length = 6;
+ break;
+ }
+
+ case Use:
+ {
+ static const unsigned short staticallyStoredUse[] =
+ {
+ 117, 115, 101, 0
+ };
+ data = staticallyStoredUse;
+ length = 3;
+ break;
+ }
+
+ case Value:
+ {
+ static const unsigned short staticallyStoredValue[] =
+ {
+ 118, 97, 108, 117, 101, 0
+ };
+ data = staticallyStoredValue;
+ length = 5;
+ break;
+ }
+
+ case Version:
+ {
+ static const unsigned short staticallyStoredVersion[] =
+ {
+ 118, 101, 114, 115, 105, 111, 110, 0
+ };
+ data = staticallyStoredVersion;
+ length = 7;
+ break;
+ }
+
+ case WhiteSpace:
+ {
+ static const unsigned short staticallyStoredWhiteSpace[] =
+ {
+ 119, 104, 105, 116, 101, 83, 112, 97, 99, 101, 0
+ };
+ data = staticallyStoredWhiteSpace;
+ length = 10;
+ break;
+ }
+
+ case XML_NS_SCHEMA_URI:
+ {
+ static const unsigned short staticallyStoredXML_NS_SCHEMA_URI[] =
+ {
+ 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 119, 51, 46, 111, 114, 103, 47, 50, 48, 48, 49, 47, 88, 77, 76, 83, 99, 104, 101, 109, 97, 0
+ };
+ data = staticallyStoredXML_NS_SCHEMA_URI;
+ length = 32;
+ break;
+ }
+
+ case XPathDefaultNamespace:
+ {
+ static const unsigned short staticallyStoredXPathDefaultNamespace[] =
+ {
+ 120, 112, 97, 116, 104, 68, 101, 102, 97, 117, 108, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 0
+ };
+ data = staticallyStoredXPathDefaultNamespace;
+ length = 21;
+ break;
+ }
+
+ case XmlLanguage:
+ {
+ static const unsigned short staticallyStoredXmlLanguage[] =
+ {
+ 120, 109, 108, 58, 108, 97, 110, 103, 0
+ };
+ data = staticallyStoredXmlLanguage;
+ length = 8;
+ break;
+ }
+
+ case Xpath:
+ {
+ static const unsigned short staticallyStoredXpath[] =
+ {
+ 120, 112, 97, 116, 104, 0
+ };
+ data = staticallyStoredXpath;
+ length = 5;
+ break;
+ }
+
+ default:
+ /* It's either the default token, or an undefined enum
+ * value. We silence a compiler warning, and return the
+ * empty string. */
+ ;
+ }
+
+ union
+ {
+ const unsigned short *data;
+ const QChar *asQChar;
+ } converter;
+ converter.data = data;
+
+ return QString::fromRawData(converter.asQChar, length);
+ }
+
+QT_END_NAMESPACE
+
diff --git a/src/xmlpatterns/schema/qxsdschematoken_p.h b/src/xmlpatterns/schema/qxsdschematoken_p.h
new file mode 100644
index 0000000..f54f633
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschematoken_p.h
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+/* NOTE: This file is AUTO GENERATED by qautomaton2cpp.xsl. */
+
+#ifndef QPatternist_XsdSchemaToken_h
+#define QPatternist_XsdSchemaToken_h
+
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+
+class XsdSchemaToken
+ {
+ public:
+ enum NodeName
+
+ {
+ NoKeyword,
+Abstract,
+All,
+Alternative,
+Annotation,
+Any,
+AnyAttribute,
+Appinfo,
+AppliesToEmpty,
+Assert,
+Assertion,
+Attribute,
+AttributeFormDefault,
+AttributeGroup,
+Base,
+Block,
+BlockDefault,
+Choice,
+Collapse,
+ComplexContent,
+ComplexType,
+Default,
+DefaultAttributes,
+DefaultAttributesApply,
+DefaultOpenContent,
+Documentation,
+Element,
+ElementFormDefault,
+Enumeration,
+Extension,
+Field,
+Final,
+FinalDefault,
+Fixed,
+Form,
+FractionDigits,
+Group,
+Id,
+Import,
+Include,
+ItemType,
+Key,
+Keyref,
+Length,
+List,
+MaxExclusive,
+MaxInclusive,
+MaxLength,
+MaxOccurs,
+MemberTypes,
+MinExclusive,
+MinInclusive,
+MinLength,
+MinOccurs,
+Mixed,
+Mode,
+Name,
+Namespace,
+Nillable,
+NotNamespace,
+NotQName,
+Notation,
+OpenContent,
+Override,
+Pattern,
+Preserve,
+ProcessContents,
+Public,
+Redefine,
+Ref,
+Refer,
+Replace,
+Restriction,
+Schema,
+SchemaLocation,
+Selector,
+Sequence,
+SimpleContent,
+SimpleType,
+Source,
+SubstitutionGroup,
+System,
+TargetNamespace,
+Test,
+TotalDigits,
+Type,
+Union,
+Unique,
+Use,
+Value,
+Version,
+WhiteSpace,
+XML_NS_SCHEMA_URI,
+XPathDefaultNamespace,
+XmlLanguage,
+Xpath
+ };
+
+ static inline NodeName toToken(const QString &value);
+static inline NodeName toToken(const QStringRef &value);
+static NodeName toToken(const QChar *data, int length);
+static QString toString(NodeName token);
+
+
+ private:
+ static inline NodeName classifier2(const QChar *data);
+static inline NodeName classifier3(const QChar *data);
+static inline NodeName classifier4(const QChar *data);
+static inline NodeName classifier5(const QChar *data);
+static inline NodeName classifier6(const QChar *data);
+static inline NodeName classifier7(const QChar *data);
+static inline NodeName classifier8(const QChar *data);
+static inline NodeName classifier9(const QChar *data);
+static inline NodeName classifier10(const QChar *data);
+static inline NodeName classifier11(const QChar *data);
+static inline NodeName classifier12(const QChar *data);
+static inline NodeName classifier13(const QChar *data);
+static inline NodeName classifier14(const QChar *data);
+static inline NodeName classifier15(const QChar *data);
+static inline NodeName classifier17(const QChar *data);
+static inline NodeName classifier18(const QChar *data);
+static inline NodeName classifier20(const QChar *data);
+static inline NodeName classifier21(const QChar *data);
+static inline NodeName classifier22(const QChar *data);
+static inline NodeName classifier32(const QChar *data);
+
+ };
+
+ inline XsdSchemaToken::NodeName XsdSchemaToken::toToken(const QString &value)
+ {
+ return toToken(value.constData(), value.length());
+ }
+
+ inline XsdSchemaToken::NodeName XsdSchemaToken::toToken(const QStringRef &value)
+ {
+ return toToken(value.constData(), value.length());
+ }
+
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdschematypesfactory.cpp b/src/xmlpatterns/schema/qxsdschematypesfactory.cpp
new file mode 100644
index 0000000..430433f
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschematypesfactory.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdschematypesfactory_p.h"
+
+#include "qbasictypesfactory_p.h"
+#include "qbuiltintypes_p.h"
+#include "qderivedinteger_p.h"
+#include "qderivedstring_p.h"
+#include "qcommonnamespaces_p.h"
+#include "qxsdschematoken_p.h"
+#include "qxsdsimpletype_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaTypesFactory::XsdSchemaTypesFactory(const NamePool::Ptr &namePool)
+ : m_namePool(namePool)
+{
+ m_types.reserve(3);
+
+ const XsdFacet::Ptr whiteSpaceFacet(new XsdFacet());
+ whiteSpaceFacet->setType(XsdFacet::WhiteSpace);
+ whiteSpaceFacet->setFixed(true);
+ whiteSpaceFacet->setValue(DerivedString<TypeString>::fromLexical(m_namePool, XsdSchemaToken::toString(XsdSchemaToken::Collapse)));
+
+ const XsdFacet::Ptr minLengthFacet(new XsdFacet());
+ minLengthFacet->setType(XsdFacet::MinimumLength);
+ minLengthFacet->setValue(DerivedInteger<TypeNonNegativeInteger>::fromLexical(namePool, QLatin1String("1")));
+
+ XsdFacet::Hash facets;
+ facets.insert(whiteSpaceFacet->type(), whiteSpaceFacet);
+ facets.insert(minLengthFacet->type(), minLengthFacet);
+
+ {
+ const QXmlName typeName = m_namePool->allocateQName(CommonNamespaces::WXS, QLatin1String("NMTOKENS"));
+ const XsdSimpleType::Ptr type(new XsdSimpleType());
+ type->setName(typeName);
+ type->setWxsSuperType(BuiltinTypes::xsAnySimpleType);
+ type->setCategory(XsdSimpleType::SimpleTypeList);
+ type->setItemType(BuiltinTypes::xsNMTOKEN);
+ type->setDerivationMethod(XsdSimpleType::DerivationRestriction);
+ type->setFacets(facets);
+ m_types.insert(typeName, type);
+ }
+ {
+ const QXmlName typeName = m_namePool->allocateQName(CommonNamespaces::WXS, QLatin1String("IDREFS"));
+ const XsdSimpleType::Ptr type(new XsdSimpleType());
+ type->setName(typeName);
+ type->setWxsSuperType(BuiltinTypes::xsAnySimpleType);
+ type->setCategory(XsdSimpleType::SimpleTypeList);
+ type->setItemType(BuiltinTypes::xsIDREF);
+ type->setDerivationMethod(XsdSimpleType::DerivationRestriction);
+ type->setFacets(facets);
+ m_types.insert(typeName, type);
+ }
+ {
+ const QXmlName typeName = m_namePool->allocateQName(CommonNamespaces::WXS, QLatin1String("ENTITIES"));
+ const XsdSimpleType::Ptr type(new XsdSimpleType());
+ type->setName(typeName);
+ type->setWxsSuperType(BuiltinTypes::xsAnySimpleType);
+ type->setCategory(XsdSimpleType::SimpleTypeList);
+ type->setItemType(BuiltinTypes::xsENTITY);
+ type->setDerivationMethod(XsdSimpleType::DerivationRestriction);
+ type->setFacets(facets);
+ m_types.insert(typeName, type);
+ }
+}
+
+SchemaType::Ptr XsdSchemaTypesFactory::createSchemaType(const QXmlName name) const
+{
+ if (m_types.contains(name)) {
+ return m_types.value(name);
+ } else {
+ if (!m_basicTypesFactory)
+ m_basicTypesFactory = BasicTypesFactory::self(m_namePool);
+
+ return m_basicTypesFactory->createSchemaType(name);
+ }
+}
+
+SchemaType::Hash XsdSchemaTypesFactory::types() const
+{
+ return m_types;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdschematypesfactory_p.h b/src/xmlpatterns/schema/qxsdschematypesfactory_p.h
new file mode 100644
index 0000000..ed082ac
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdschematypesfactory_p.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSchemaTypesFactory_H
+#define Patternist_XsdSchemaTypesFactory_H
+
+#include <QtCore/QHash>
+#include "qschematypefactory_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+
+ /**
+ * @short Factory for creating schema types for the types defined in XSD.
+ *
+ * @ingroup Patternist_types
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSchemaTypesFactory : public SchemaTypeFactory
+ {
+ public:
+ /**
+ * Creates a new schema type factory.
+ *
+ * @param namePool The name pool all type names belong to.
+ */
+ XsdSchemaTypesFactory(const NamePool::Ptr &namePool);
+
+ /**
+ * Creates a primitive type for @p name. If @p name is not supported,
+ * @c null is returned.
+ *
+ * @note This does not handle user defined types, only builtin types.
+ */
+ virtual SchemaType::Ptr createSchemaType(const QXmlName) const;
+
+ /**
+ * Returns a hash of all available types.
+ */
+ virtual SchemaType::Hash types() const;
+
+ private:
+ /**
+ * A dictonary of all predefined schema types.
+ */
+ SchemaType::Hash m_types;
+
+ NamePool::Ptr m_namePool;
+ mutable SchemaTypeFactory::Ptr m_basicTypesFactory;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdsimpletype.cpp b/src/xmlpatterns/schema/qxsdsimpletype.cpp
new file mode 100644
index 0000000..8b367ba
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdsimpletype.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#include "qxsdsimpletype_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+QString XsdSimpleType::displayName(const NamePool::Ptr &np) const
+{
+ return np->displayName(name(np));
+}
+
+void XsdSimpleType::setWxsSuperType(const SchemaType::Ptr &type)
+{
+ m_superType = type;
+}
+
+SchemaType::Ptr XsdSimpleType::wxsSuperType() const
+{
+ return m_superType;
+}
+
+void XsdSimpleType::setContext(const NamedSchemaComponent::Ptr &component)
+{
+ m_context = component;
+}
+
+NamedSchemaComponent::Ptr XsdSimpleType::context() const
+{
+ return m_context;
+}
+
+void XsdSimpleType::setPrimitiveType(const AnySimpleType::Ptr &type)
+{
+ m_primitiveType = type;
+}
+
+AnySimpleType::Ptr XsdSimpleType::primitiveType() const
+{
+ return m_primitiveType;
+}
+
+void XsdSimpleType::setItemType(const AnySimpleType::Ptr &type)
+{
+ m_itemType = type;
+}
+
+AnySimpleType::Ptr XsdSimpleType::itemType() const
+{
+ return m_itemType;
+}
+
+void XsdSimpleType::setMemberTypes(const AnySimpleType::List &types)
+{
+ m_memberTypes = types;
+}
+
+AnySimpleType::List XsdSimpleType::memberTypes() const
+{
+ return m_memberTypes;
+}
+
+void XsdSimpleType::setFacets(const XsdFacet::Hash &facets)
+{
+ m_facets = facets;
+}
+
+XsdFacet::Hash XsdSimpleType::facets() const
+{
+ return m_facets;
+}
+
+void XsdSimpleType::setCategory(TypeCategory category)
+{
+ m_typeCategory = category;
+}
+
+XsdSimpleType::TypeCategory XsdSimpleType::category() const
+{
+ return m_typeCategory;
+}
+
+void XsdSimpleType::setDerivationMethod(DerivationMethod method)
+{
+ m_derivationMethod = method;
+}
+
+XsdSimpleType::DerivationMethod XsdSimpleType::derivationMethod() const
+{
+ return m_derivationMethod;
+}
+
+bool XsdSimpleType::isDefinedBySchema() const
+{
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdsimpletype_p.h b/src/xmlpatterns/schema/qxsdsimpletype_p.h
new file mode 100644
index 0000000..12053f0
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdsimpletype_p.h
@@ -0,0 +1,219 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdSimpleType_H
+#define Patternist_XsdSimpleType_H
+
+#include "qanysimpletype_p.h"
+#include "qxsdfacet_p.h"
+#include "qxsduserschematype_p.h"
+
+#include <QtCore/QSet>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD simpleType object.
+ *
+ * This class represents the <em>simpleType</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema-2/#rf-defn">here</a>.
+ *
+ * It contains information from either a top-level simple type declaration (as child of a <em>schema</em> object)
+ * or a local simple type declaration (as descendant of an <em>element</em> or <em>complexType</em> object).
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSSimpleType">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdSimpleType : public XsdUserSchemaType<AnySimpleType>
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdSimpleType> Ptr;
+
+ /**
+ * Returns the display name of the simple type.
+ *
+ * @param namePool The name pool the type name is stored in.
+ */
+ virtual QString displayName(const NamePool::Ptr &namePool) const;
+
+ /**
+ * Sets the base @p type of the simple type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#defn-basetype">Base Type Definition</a>
+ */
+ void setWxsSuperType(const SchemaType::Ptr &type);
+
+ /**
+ * Returns the base type of the simple type or an empty pointer if no base type is
+ * set.
+ */
+ virtual SchemaType::Ptr wxsSuperType() const;
+
+ /**
+ * Sets the context @p component of the simple type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#std-context">Context Definition</a>
+ */
+ void setContext(const NamedSchemaComponent::Ptr &component);
+
+ /**
+ * Returns the context component of the simple type.
+ */
+ NamedSchemaComponent::Ptr context() const;
+
+ /**
+ * Sets the primitive @p type of the simple type.
+ *
+ * The primitive type is only specified if the category is SimpleTypeAtomic.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#defn-primitive">Primitive Type Definition</a>
+ */
+ void setPrimitiveType(const AnySimpleType::Ptr &type);
+
+ /**
+ * Returns the primitive type of the simple type or an empty pointer if the category is
+ * not SimpleTypeAtomic.
+ */
+ AnySimpleType::Ptr primitiveType() const;
+
+ /**
+ * Sets the list item @p type of the simple type.
+ *
+ * The list item type is only specified if the category is SimpleTypeList.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#defn-itemType">Item Type Definition</a>
+ */
+ void setItemType(const AnySimpleType::Ptr &type);
+
+ /**
+ * Returns the list item type of the simple type or an empty pointer if the category is
+ * not SimpleTypeList.
+ */
+ AnySimpleType::Ptr itemType() const;
+
+ /**
+ * Sets the member @p types of the simple type.
+ *
+ * The member types are only specified if the category is SimpleTypeUnion.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#defn-memberTypes">Member Types Definition</a>
+ */
+ void setMemberTypes(const AnySimpleType::List &types);
+
+ /**
+ * Returns the list member types of the simple type or an empty list if the category is
+ * not SimpleTypeUnion.
+ */
+ AnySimpleType::List memberTypes() const;
+
+ /**
+ * Sets the @p facets of the simple type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#defn-facets">Facets Definition</a>
+ */
+ void setFacets(const XsdFacet::Hash &facets);
+
+ /**
+ * Returns the facets of the simple type.
+ */
+ XsdFacet::Hash facets() const;
+
+ /**
+ * Sets the @p category (variety) of the simple type.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#defn-variety">Variety Definition</a>
+ */
+ void setCategory(TypeCategory category);
+
+ /**
+ * Returns the category (variety) of the simple type.
+ */
+ virtual TypeCategory category() const;
+
+ /**
+ * Sets the derivation @p method of the simple type.
+ *
+ * @see DerivationMethod
+ */
+ void setDerivationMethod(DerivationMethod method);
+
+ /**
+ * Returns the derivation method of the simple type.
+ */
+ virtual DerivationMethod derivationMethod() const;
+
+ /**
+ * Always returns @c true.
+ */
+ virtual bool isDefinedBySchema() const;
+
+ private:
+ SchemaType::Ptr m_superType;
+ NamedSchemaComponent::Ptr m_context;
+ AnySimpleType::Ptr m_primitiveType;
+ AnySimpleType::Ptr m_itemType;
+ AnySimpleType::List m_memberTypes;
+ XsdFacet::Hash m_facets;
+ TypeCategory m_typeCategory;
+ DerivationMethod m_derivationMethod;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdstatemachine.cpp b/src/xmlpatterns/schema/qxsdstatemachine.cpp
new file mode 100644
index 0000000..3a59042
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdstatemachine.cpp
@@ -0,0 +1,477 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * NOTE: This file is included by qxsdstatemachine_p.h
+ * if you need some includes, put them in qxsdstatemachine_p.h (outside of the namespace)
+ */
+
+template <typename TransitionType>
+XsdStateMachine<TransitionType>::XsdStateMachine()
+ : m_counter(50)
+{
+}
+
+template <typename TransitionType>
+XsdStateMachine<TransitionType>::XsdStateMachine(const NamePool::Ptr &namePool)
+ : m_namePool(namePool)
+ , m_counter(50)
+{
+}
+
+template <typename TransitionType>
+typename XsdStateMachine<TransitionType>::StateId XsdStateMachine<TransitionType>::addState(StateType type)
+{
+#ifndef QT_NO_DEBUG
+ // make sure we don't have two start states
+ if (type == StartState) {
+ QHashIterator<StateId, StateType> it(m_states);
+ while (it.hasNext()) {
+ it.next();
+ Q_ASSERT(it.value() != StartState && it.value() != StartEndState);
+ }
+ }
+#endif // QT_NO_DEBUG
+
+ // reserve new state id
+ const StateId id = ++m_counter;
+ m_states.insert(id, type);
+
+ // if it is a start state, we make it to our current state
+ if (type == StartState || type == StartEndState)
+ m_currentState = id;
+
+ return id;
+}
+
+template <typename TransitionType>
+void XsdStateMachine<TransitionType>::addTransition(StateId start, TransitionType transition, StateId end)
+{
+ QHash<TransitionType, QVector<StateId> > &hash = m_transitions[start];
+ QVector<StateId> &states = hash[transition];
+ if (!states.contains(end))
+ states.append(end);
+}
+
+template <typename TransitionType>
+void XsdStateMachine<TransitionType>::addEpsilonTransition(StateId start, StateId end)
+{
+ QVector<StateId> &states = m_epsilonTransitions[start];
+ states.append(end);
+}
+
+template <typename TransitionType>
+void XsdStateMachine<TransitionType>::reset()
+{
+ // reset the machine to the start state
+ QHashIterator<StateId, StateType> it(m_states);
+ while (it.hasNext()) {
+ it.next();
+ if (it.value() == StartState || it.value() == StartEndState) {
+ m_currentState = it.key();
+ return;
+ }
+ }
+
+ Q_ASSERT(false);
+}
+
+template <typename TransitionType>
+void XsdStateMachine<TransitionType>::clear()
+{
+ m_states.clear();
+ m_transitions.clear();
+ m_epsilonTransitions.clear();
+ m_currentState = -1;
+ m_counter = 50;
+}
+
+template <typename TransitionType>
+bool XsdStateMachine<TransitionType>::proceed(TransitionType transition)
+{
+ // check that we are not in an invalid state
+ if (!m_transitions.contains(m_currentState)) {
+ return false;
+ }
+
+ // fetch the transition entry for the current state
+ const QHash<TransitionType, QVector<StateId> > &entry = m_transitions[m_currentState];
+ if (entry.contains(transition)) { // is there an transition for the given input?
+ m_currentState = entry.value(transition).first();
+ m_lastTransition = transition;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+template <typename TransitionType>
+QList<TransitionType> XsdStateMachine<TransitionType>::possibleTransitions() const
+{
+ // check that we are not in an invalid state
+ if (!m_transitions.contains(m_currentState)) {
+ return QList<TransitionType>();
+ }
+
+ // fetch the transition entry for the current state
+ const QHash<TransitionType, QVector<StateId> > &entry = m_transitions[m_currentState];
+
+ return entry.keys();
+}
+
+template <typename TransitionType>
+template <typename InputType>
+bool XsdStateMachine<TransitionType>::proceed(InputType input)
+{
+ // check that we are not in an invalid state
+ if (!m_transitions.contains(m_currentState)) {
+ return false;
+ }
+
+ // fetch the transition entry for the current state
+ const QHash<TransitionType, QVector<StateId> > &entry = m_transitions[m_currentState];
+ QHashIterator<TransitionType, QVector<StateId> > it(entry);
+ while (it.hasNext()) {
+ it.next();
+ if (inputEqualsTransition(input, it.key())) {
+ m_currentState = it.value().first();
+ m_lastTransition = it.key();
+ return true;
+ }
+ }
+
+ return false;
+}
+
+template <typename TransitionType>
+template <typename InputType>
+bool XsdStateMachine<TransitionType>::inputEqualsTransition(InputType input, TransitionType transition) const
+{
+ return false;
+}
+
+template <typename TransitionType>
+bool XsdStateMachine<TransitionType>::inEndState() const
+{
+ // check if current state is an end state
+ return (m_states.value(m_currentState) == StartEndState || m_states.value(m_currentState) == EndState);
+}
+
+template <typename TransitionType>
+TransitionType XsdStateMachine<TransitionType>::lastTransition() const
+{
+ return m_lastTransition;
+}
+
+template <typename TransitionType>
+typename XsdStateMachine<TransitionType>::StateId XsdStateMachine<TransitionType>::startState() const
+{
+ QHashIterator<StateId, StateType> it(m_states);
+ while (it.hasNext()) {
+ it.next();
+ if (it.value() == StartState || it.value() == StartEndState)
+ return it.key();
+ }
+
+ Q_ASSERT(false); // should never be reached
+ return -1;
+}
+
+template <typename TransitionType>
+QString XsdStateMachine<TransitionType>::transitionTypeToString(TransitionType type) const
+{
+ Q_UNUSED(type)
+
+ return QString();
+}
+
+template <typename TransitionType>
+bool XsdStateMachine<TransitionType>::outputGraph(QIODevice *device, const QString &graphName) const
+{
+ if (!device->isOpen()) {
+ qWarning("device must be open for writing");
+ return false;
+ }
+
+ QByteArray graph;
+ QTextStream s(&graph);
+
+ QHashIterator<StateId, QHash<TransitionType, QVector<StateId> > > it(m_transitions);
+ QHashIterator<StateId, StateType> it3(m_states);
+
+ s << "digraph " << graphName << " {\n";
+ s << " mindist = 2.0\n";
+
+ // draw edges
+ while (it.hasNext()) {
+ it.next();
+
+ QHashIterator<TransitionType, QVector<StateId> > it2(it.value());
+ while (it2.hasNext()) {
+ it2.next();
+ for (int i = 0; i < it2.value().count(); ++i)
+ s << " " << it.key() << " -> " << it2.value().at(i) << " [label=\"" << transitionTypeToString(it2.key()) << "\"]\n";
+ }
+ }
+
+ QHashIterator<StateId, QVector<StateId> > it4(m_epsilonTransitions);
+ while (it4.hasNext()) {
+ it4.next();
+
+ const QVector<StateId> states = it4.value();
+ for (int i = 0; i < states.count(); ++i)
+ s << " " << it4.key() << " -> " << states.at(i) << " [label=\"&#949;\"]\n";
+ }
+
+ // draw node infos
+ while (it3.hasNext()) {
+ it3.next();
+
+ QString style;
+ if (it3.value() == StartState) {
+ style = QLatin1String("shape=circle, style=filled, color=blue");
+ } else if (it3.value() == StartEndState) {
+ style = QLatin1String("shape=doublecircle, style=filled, color=blue");
+ } else if (it3.value() == InternalState) {
+ style = QLatin1String("shape=circle, style=filled, color=red");
+ } else if (it3.value() == EndState) {
+ style = QLatin1String("shape=doublecircle, style=filled, color=green");
+ }
+
+ s << " " << it3.key() << " [" << style << "]\n";
+ }
+
+ s << "}\n";
+
+ s.flush();
+
+ if (device->write(graph) == -1)
+ return false;
+
+ return true;
+}
+
+
+template <typename TransitionType>
+typename XsdStateMachine<TransitionType>::StateId XsdStateMachine<TransitionType>::dfaStateForNfaState(QSet<StateId> nfaState,
+ QList< QPair<QSet<StateId>, StateId> > &stateTable,
+ XsdStateMachine<TransitionType> &dfa) const
+{
+ // check whether we have the given state in our lookup table
+ // already, in that case simply return it
+ for (int i = 0; i < stateTable.count(); ++i) {
+ if (stateTable.at(i).first == nfaState)
+ return stateTable.at(i).second;
+ }
+
+ // check if the NFA state set contains a Start or End
+ // state, in that case our new DFA state will be a
+ // Start or End state as well
+ StateType type = InternalState;
+ QSetIterator<StateId> it(nfaState);
+ bool hasStartState = false;
+ bool hasEndState = false;
+ while (it.hasNext()) {
+ const StateId state = it.next();
+ if (m_states.value(state) == EndState) {
+ hasEndState = true;
+ } else if (m_states.value(state) == StartState) {
+ hasStartState = true;
+ }
+ }
+ if (hasStartState) {
+ if (hasEndState)
+ type = StartEndState;
+ else
+ type = StartState;
+ } else if (hasEndState) {
+ type = EndState;
+ }
+
+ // create the new DFA state
+ const StateId dfaState = dfa.addState(type);
+
+ // add the new DFA state to the lookup table
+ stateTable.append(qMakePair<QSet<StateId>, StateId>(nfaState, dfaState));
+
+ return dfaState;
+}
+
+
+template <typename TransitionType>
+QSet<typename XsdStateMachine<TransitionType>::StateId> XsdStateMachine<TransitionType>::epsilonClosure(const QSet<StateId> &input) const
+{
+ // every state can reach itself by epsilon transition, so include the input states
+ // in the result as well
+ QSet<StateId> result = input;
+
+ // add the input states to the list of to be processed states
+ QList<StateId> workStates = input.toList();
+ while (!workStates.isEmpty()) { // while there are states to be processed left...
+
+ // dequeue one state from list
+ const StateId state = workStates.takeFirst();
+
+ // get the list of states that can be reached by the epsilon transition
+ // from the current 'state'
+ const QVector<StateId> targetStates = m_epsilonTransitions.value(state);
+ for (int i = 0; i < targetStates.count(); ++i) {
+ // if we have this target state not in our result set yet...
+ if (!result.contains(targetStates.at(i))) {
+ // ... add it to the result set
+ result.insert(targetStates.at(i));
+
+ // add the target state to the list of to be processed states as well,
+ // as we want to have the epsilon transitions not only for the first
+ // level of following states
+ workStates.append(targetStates.at(i));
+ }
+ }
+ }
+
+ return result;
+}
+
+template <typename TransitionType>
+QSet<typename XsdStateMachine<TransitionType>::StateId> XsdStateMachine<TransitionType>::move(const QSet<StateId> &states, TransitionType input) const
+{
+ QSet<StateId> result;
+
+ QSetIterator<StateId> it(states);
+ while (it.hasNext()) { // iterate over all given states
+ const StateId state = it.next();
+
+ // get the transition table for the current state
+ const QHash<TransitionType, QVector<StateId> > transitions = m_transitions.value(state);
+
+ // get the target states for the given input
+ const QVector<StateId> targetStates = transitions.value(input);
+
+ // add all target states to the result
+ for (int i = 0; i < targetStates.size(); ++i)
+ result.insert(targetStates.at(i));
+ }
+
+ return result;
+}
+
+template <typename TransitionType>
+XsdStateMachine<TransitionType> XsdStateMachine<TransitionType>::toDFA() const
+{
+ XsdStateMachine<TransitionType> dfa(m_namePool);
+ dfa.m_counter = 100;
+ QList< QPair< QSet<StateId>, StateId> > table;
+ QList< QSet<StateId> > isMarked;
+
+ // search the start state as the algorithm starts with it...
+ StateId startState = -1;
+ QHashIterator<StateId, StateType> stateTypeIt(m_states);
+ while (stateTypeIt.hasNext()) {
+ stateTypeIt.next();
+ if (stateTypeIt.value() == StartState) {
+ startState = stateTypeIt.key();
+ break;
+ }
+ }
+ Q_ASSERT(startState != -1);
+
+ // our list of state set that still have to be processed
+ QList< QSet<StateId> > workStates;
+
+ // add the start state to the list of to processed state sets
+ workStates.append(epsilonClosure(QSet<StateId>() << startState));
+
+ while (!workStates.isEmpty()) { // as long as there are state sets to process left
+
+ // enqueue set of states
+ const QSet<StateId> states = workStates.takeFirst();
+
+ if (isMarked.contains(states)) // we processed this state set already
+ continue;
+
+ // mark as processed
+ isMarked.append(states);
+
+ // select a list of all inputs that are possible for
+ // the 'states' set
+ QList<TransitionType> input;
+
+ {
+ QSetIterator<StateId> it(states);
+ while (it.hasNext()) {
+ input << m_transitions.value(it.next()).keys();
+ }
+ }
+
+ // get the state in DFA that corresponds to the 'states' set in the NFA
+ const StateId dfaBegin = dfaStateForNfaState(states, table, dfa);
+
+ for (int i = 0; i < input.count(); ++i) { // for each possible input
+ // retrieve the states that can be reached from the 'states' set by the
+ // given input or by epsilon transition
+ const QSet<StateId> followStates = epsilonClosure(move(states, input.at(i)));
+
+ // get the state in DFA that corresponds to the 'followStates' set in the NFA
+ const StateId dfaEnd = dfaStateForNfaState(followStates, table, dfa);
+
+ // adds a new transition to the DFA that corresponds to the transitions between
+ // 'states' and 'followStates' in the NFA
+ dfa.addTransition(dfaBegin, input.at(i), dfaEnd);
+
+ // add the 'followStates' to the list of to be processed state sets
+ workStates.append(followStates);
+ }
+ }
+
+ return dfa;
+}
+
+template <typename TransitionType>
+QHash<typename XsdStateMachine<TransitionType>::StateId, typename XsdStateMachine<TransitionType>::StateType> XsdStateMachine<TransitionType>::states() const
+{
+ return m_states;
+}
+
+template <typename TransitionType>
+QHash<typename XsdStateMachine<TransitionType>::StateId, QHash<TransitionType, QVector<typename XsdStateMachine<TransitionType>::StateId> > > XsdStateMachine<TransitionType>::transitions() const
+{
+ return m_transitions;
+}
diff --git a/src/xmlpatterns/schema/qxsdstatemachine_p.h b/src/xmlpatterns/schema/qxsdstatemachine_p.h
new file mode 100644
index 0000000..68bc801
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdstatemachine_p.h
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdStateMachine_H
+#define Patternist_XsdStateMachine_H
+
+#include "qnamepool_p.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QSet>
+#include <QtCore/QTextStream>
+
+class QIODevice;
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A state machine used for evaluation.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ template <typename TransitionType>
+ class XsdStateMachine
+ {
+ public:
+ typedef qint32 StateId;
+
+ /**
+ * Describes the type of state.
+ */
+ enum StateType
+ {
+ StartState, ///< The state the machine will start with.
+ StartEndState, ///< The state the machine will start with, can be end state as well.
+ InternalState, ///< Any state that is not start or end state.
+ EndState ///< Any state where the machine is allowed to stop.
+ };
+
+ /**
+ * Creates a new state machine object.
+ */
+ XsdStateMachine();
+
+ /**
+ * Creates a new state machine object.
+ *
+ * The name pool to use for accessing object names.
+ */
+ XsdStateMachine(const NamePool::Ptr &namePool);
+
+ /**
+ * Adds a new state of the given @p type to the state machine.
+ *
+ * @return The id of the new state.
+ */
+ StateId addState(StateType type);
+
+ /**
+ * Adds a new @p transition to the state machine.
+ *
+ * @param start The start state.
+ * @param transition The transition to come from the start to the end state.
+ * @param end The end state.
+ */
+ void addTransition(StateId start, TransitionType transition, StateId end);
+
+ /**
+ * Adds a new epsilon @p transition to the state machine.
+ *
+ * @param start The start state.
+ * @param end The end state.
+ */
+ void addEpsilonTransition(StateId start, StateId end);
+
+ /**
+ * Resets the machine to the start state.
+ */
+ void reset();
+
+ /**
+ * Removes all states and transitions from the state machine.
+ */
+ void clear();
+
+ /**
+ * Continues execution of the machine with the given input @p transition.
+ *
+ * @return @c true if the transition was successfull, @c false otherwise.
+ */
+ bool proceed(TransitionType transition);
+
+ /**
+ * Returns the list of transitions that are reachable from the current
+ * state.
+ */
+ QList<TransitionType> possibleTransitions() const;
+
+ /**
+ * Continues execution of the machine with the given @p input.
+ *
+ * @note To use this method, inputEqualsTransition must be implemented
+ * to find the right transition to use.
+ *
+ * @return @c true if the transition was successfull, @c false otherwise.
+ */
+ template <typename InputType>
+ bool proceed(InputType input);
+
+ /**
+ * Returns whether the given @p input matches the given @p transition.
+ */
+ template <typename InputType>
+ bool inputEqualsTransition(InputType input, TransitionType transition) const;
+
+ /**
+ * Returns whether the machine is in an allowed end state.
+ */
+ bool inEndState() const;
+
+ /**
+ * Returns the last transition that was taken.
+ */
+ TransitionType lastTransition() const;
+
+ /**
+ * Returns the start state of the machine.
+ */
+ StateId startState() const;
+
+ /**
+ * This method should be redefined by template specialization for every
+ * concret TransitionType.
+ */
+ QString transitionTypeToString(TransitionType type) const;
+
+ /**
+ * Outputs the state machine in DOT format to the given
+ * output @p device.
+ */
+ bool outputGraph(QIODevice *device, const QString &graphName) const;
+
+ /**
+ * Returns a DFA that is equal to the NFA of the state machine.
+ */
+ XsdStateMachine<TransitionType> toDFA() const;
+
+ /**
+ * Returns the information of all states of the state machine.
+ */
+ QHash<StateId, StateType> states() const;
+
+ /**
+ * Returns the information of all transitions of the state machine.
+ */
+ QHash<StateId, QHash<TransitionType, QVector<StateId> > > transitions() const;
+
+ private:
+ /**
+ * Returns the DFA state for the given @p nfaStat from the given @p stateTable.
+ * If there is no corresponding DFA state yet, a new one is created.
+ */
+ StateId dfaStateForNfaState(QSet<StateId> nfaState, QList< QPair< QSet<StateId>, StateId> > &stateTable, XsdStateMachine<TransitionType> &dfa) const;
+
+ /**
+ * Returns the set of all states that can be reached from the set of @p input states
+ * by the epsilon transition.
+ */
+ QSet<StateId> epsilonClosure(const QSet<StateId> &input) const;
+
+ /**
+ * Returns the set of all states that can be reached from the set of given @p states
+ * by the given @p input.
+ */
+ QSet<StateId> move(const QSet<StateId> &states, TransitionType input) const;
+
+ NamePool::Ptr m_namePool;
+ QHash<StateId, StateType> m_states;
+ QHash<StateId, QHash<TransitionType, QVector<StateId> > > m_transitions;
+ QHash<StateId, QVector<StateId> > m_epsilonTransitions;
+ StateId m_currentState;
+ qint32 m_counter;
+ TransitionType m_lastTransition;
+ };
+
+ #include "qxsdstatemachine.cpp"
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp b/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp
new file mode 100644
index 0000000..ae7fefe
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp
@@ -0,0 +1,260 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdstatemachinebuilder_p.h"
+
+#include "qxsdelement_p.h"
+#include "qxsdmodelgroup_p.h"
+#include "qxsdschemahelper_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/*
+ * This methods takes a list of objects and returns a list of list
+ * of all combinations the objects can be ordered.
+ *
+ * e.g. input = [ 1, 2, 3 ]
+ * output = [
+ * [ 1, 2, 3 ],
+ * [ 1, 3, 2 ],
+ * [ 2, 1, 3 ],
+ * [ 2, 3, 1 ],
+ * [ 3, 1, 2 ],
+ * [ 3, 2, 1 ]
+ * ]
+ *
+ * The method is used to create all possible combinations for the particles
+ * in an <all> model group.
+ */
+template <typename T>
+QList< QList<T> > allCombinations(const QList<T> &input)
+{
+ if (input.count() == 1)
+ return (QList< QList<T> >() << input);
+
+ QList< QList<T> > result;
+ for (int i = 0; i < input.count(); ++i) {
+ QList<T> subList = input;
+ T value = subList.takeAt(i);
+
+ QList< QList<T> > subLists = allCombinations(subList);
+ for (int j = 0; j < subLists.count(); ++j) {
+ subLists[j].prepend(value);
+ }
+ result << subLists;
+ }
+
+ return result;
+}
+
+XsdStateMachineBuilder::XsdStateMachineBuilder(XsdStateMachine<XsdTerm::Ptr> *machine, const NamePool::Ptr &namePool, Mode mode)
+ : m_stateMachine(machine), m_namePool(namePool), m_mode(mode)
+{
+}
+
+XsdStateMachine<XsdTerm::Ptr>::StateId XsdStateMachineBuilder::reset()
+{
+ Q_ASSERT(m_stateMachine);
+
+ m_stateMachine->clear();
+
+ return m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::EndState);
+}
+
+XsdStateMachine<XsdTerm::Ptr>::StateId XsdStateMachineBuilder::addStartState(XsdStateMachine<XsdTerm::Ptr>::StateId state)
+{
+ const XsdStateMachine<XsdTerm::Ptr>::StateId startState = m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::StartState);
+ m_stateMachine->addEpsilonTransition(startState, state);
+
+ return startState;
+}
+
+/*
+ * Create the FSA according to Algorithm Tp(S) from http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html
+ */
+XsdStateMachine<XsdTerm::Ptr>::StateId XsdStateMachineBuilder::buildParticle(const XsdParticle::Ptr &particle, XsdStateMachine<XsdTerm::Ptr>::StateId endState)
+{
+ XsdStateMachine<XsdTerm::Ptr>::StateId currentStartState = endState;
+ XsdStateMachine<XsdTerm::Ptr>::StateId currentEndState = endState;
+
+ // 2
+ if (particle->maximumOccursUnbounded()) {
+ const XsdStateMachine<XsdTerm::Ptr>::StateId t = m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::InternalState);
+ const XsdStateMachine<XsdTerm::Ptr>::StateId n = buildTerm(particle->term(), t);
+
+ m_stateMachine->addEpsilonTransition(t, n);
+ m_stateMachine->addEpsilonTransition(n, endState);
+
+ currentEndState = t;
+ currentStartState = t;
+ } else { // 3
+ int count = (particle->maximumOccurs() - particle->minimumOccurs());
+ if (count > 100)
+ count = 100;
+
+ for (int i = 0; i < count; ++i) {
+ currentStartState = buildTerm(particle->term(), currentEndState);
+ m_stateMachine->addEpsilonTransition(currentStartState, endState);
+ currentEndState = currentStartState;
+ }
+ }
+
+ int minOccurs = particle->minimumOccurs();
+ if (minOccurs > 100)
+ minOccurs = 100;
+
+ for (int i = 0; i < minOccurs; ++i) {
+ currentStartState = buildTerm(particle->term(), currentEndState);
+ currentEndState = currentStartState;
+ }
+
+ return currentStartState;
+}
+
+/*
+ * Create the FSA according to Algorithm Tt(S) from http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html
+ */
+XsdStateMachine<XsdTerm::Ptr>::StateId XsdStateMachineBuilder::buildTerm(const XsdTerm::Ptr &term, XsdStateMachine<XsdTerm::Ptr>::StateId endState)
+{
+ if (term->isWildcard()) { // 1
+ const XsdStateMachine<XsdTerm::Ptr>::StateId b = m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::InternalState);
+ m_stateMachine->addTransition(b, term, endState);
+ return b;
+ } else if (term->isElement()) { // 2
+ const XsdStateMachine<XsdTerm::Ptr>::StateId b = m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::InternalState);
+ m_stateMachine->addTransition(b, term, endState);
+
+ const XsdElement::Ptr element(term);
+ if (m_mode == CheckingMode) {
+ const XsdElement::List substGroups = element->substitutionGroups();
+ for (int i = 0; i < substGroups.count(); ++i)
+ m_stateMachine->addTransition(b, substGroups.at(i), endState);
+ } else if (m_mode == ValidatingMode) {
+ const XsdElement::List substGroups = element->substitutionGroups();
+ for (int i = 0; i < substGroups.count(); ++i) {
+ if (XsdSchemaHelper::substitutionGroupOkTransitive(element, substGroups.at(i), m_namePool))
+ m_stateMachine->addTransition(b, substGroups.at(i), endState);
+ }
+ }
+
+ return b;
+ } else if (term->isModelGroup()) {
+ const XsdModelGroup::Ptr group(term);
+
+ if (group->compositor() == XsdModelGroup::ChoiceCompositor) { // 3
+ const XsdStateMachine<XsdTerm::Ptr>::StateId b = m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::InternalState);
+
+ for (int i = 0; i < group->particles().count(); ++i) {
+ const XsdParticle::Ptr particle(group->particles().at(i));
+ if (particle->maximumOccurs() != 0) {
+ const XsdStateMachine<XsdTerm::Ptr>::StateId state = buildParticle(particle, endState);
+ m_stateMachine->addEpsilonTransition(b, state);
+ }
+ }
+
+ return b;
+ } else if (group->compositor() == XsdModelGroup::SequenceCompositor) { // 4
+ XsdStateMachine<XsdTerm::Ptr>::StateId currentStartState = endState;
+ XsdStateMachine<XsdTerm::Ptr>::StateId currentEndState = endState;
+
+ for (int i = (group->particles().count() - 1); i >= 0; --i) { // iterate reverse
+ const XsdParticle::Ptr particle(group->particles().at(i));
+ if (particle->maximumOccurs() != 0) {
+ currentStartState = buildParticle(particle, currentEndState);
+ currentEndState = currentStartState;
+ }
+ }
+
+ return currentStartState;
+ } else if (group->compositor() == XsdModelGroup::AllCompositor) {
+ const XsdStateMachine<XsdTerm::Ptr>::StateId newStartState = m_stateMachine->addState(XsdStateMachine<XsdTerm::Ptr>::InternalState);
+
+ const QList<XsdParticle::List> list = allCombinations(group->particles());
+
+ for (int i = 0; i < list.count(); ++i) {
+ XsdStateMachine<XsdTerm::Ptr>::StateId currentStartState = endState;
+ XsdStateMachine<XsdTerm::Ptr>::StateId currentEndState = endState;
+
+ const XsdParticle::List particles = list.at(i);
+ for (int j = (particles.count() - 1); j >= 0; --j) { // iterate reverse
+ const XsdParticle::Ptr particle(particles.at(j));
+ if (particle->maximumOccurs() != 0) {
+ currentStartState = buildParticle(particle, currentEndState);
+ currentEndState = currentStartState;
+ }
+ }
+ m_stateMachine->addEpsilonTransition(newStartState, currentStartState);
+ }
+
+ if (list.isEmpty())
+ return endState;
+ else
+ return newStartState;
+ }
+ }
+
+ Q_ASSERT(false);
+ return 0;
+}
+
+static void internalParticleLookupMap(const XsdParticle::Ptr &particle, QHash<XsdTerm::Ptr, XsdParticle::Ptr> &hash)
+{
+ hash.insert(particle->term(), particle);
+
+ if (particle->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr group(particle->term());
+ const XsdParticle::List particles = group->particles();
+ for (int i = 0; i < particles.count(); ++i)
+ internalParticleLookupMap(particles.at(i), hash);
+ }
+}
+
+QHash<XsdTerm::Ptr, XsdParticle::Ptr> XsdStateMachineBuilder::particleLookupMap(const XsdParticle::Ptr &particle)
+{
+ QHash<XsdTerm::Ptr, XsdParticle::Ptr> result;
+ internalParticleLookupMap(particle, result);
+
+ return result;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h b/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h
new file mode 100644
index 0000000..08d69de
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdStateMachineBuilder_H
+#define Patternist_XsdStateMachineBuilder_H
+
+#include "qxsdparticle_p.h"
+#include "qxsdstatemachine_p.h"
+#include "qxsdterm_p.h"
+
+#include <QtCore/QExplicitlySharedDataPointer>
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A helper class to build up validation state machines.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdStateMachineBuilder : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdStateMachineBuilder> Ptr;
+
+ enum Mode
+ {
+ CheckingMode,
+ ValidatingMode
+ };
+
+ /**
+ * Creates a new state machine builder.
+ *
+ * @param machine The state machine it should work on.
+ * @param namePool The name pool used by all schema components.
+ * @param mode The mode the machine shall be build for.
+ */
+ XsdStateMachineBuilder(XsdStateMachine<XsdTerm::Ptr> *machine, const NamePool::Ptr &namePool, Mode mode = CheckingMode);
+
+ /**
+ * Resets the state machine.
+ *
+ * @returns The initial end state.
+ */
+ XsdStateMachine<XsdTerm::Ptr>::StateId reset();
+
+ /**
+ * Prepends a start state to the given @p state.
+ * That is needed to allow the conversion of the state machine from a FSA to a DFA.
+ */
+ XsdStateMachine<XsdTerm::Ptr>::StateId addStartState(XsdStateMachine<XsdTerm::Ptr>::StateId state);
+
+ /**
+ * Creates the state machine for the given @p particle that should have the
+ * given @p endState.
+ *
+ * @returns The new start state.
+ */
+ XsdStateMachine<XsdTerm::Ptr>::StateId buildParticle(const XsdParticle::Ptr &particle, XsdStateMachine<XsdTerm::Ptr>::StateId endState);
+
+ /**
+ * Creates the state machine for the given @p term that should have the
+ * given @p endState.
+ *
+ * @returns The new start state.
+ */
+ XsdStateMachine<XsdTerm::Ptr>::StateId buildTerm(const XsdTerm::Ptr &term, XsdStateMachine<XsdTerm::Ptr>::StateId endState);
+
+ /**
+ * Returns a hash that maps each term that appears inside @p particle, to the particle it belongs.
+ *
+ * @note These information are used by XsdParticleChecker to check particle inheritance.
+ */
+ static QHash<XsdTerm::Ptr, XsdParticle::Ptr> particleLookupMap(const XsdParticle::Ptr &particle);
+
+ private:
+ XsdStateMachine<XsdTerm::Ptr> *m_stateMachine;
+ NamePool::Ptr m_namePool;
+ Mode m_mode;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdterm.cpp b/src/xmlpatterns/schema/qxsdterm.cpp
new file mode 100644
index 0000000..a1349c9
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdterm.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdterm_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+bool XsdTerm::isElement() const
+{
+ return false;
+}
+
+bool XsdTerm::isModelGroup() const
+{
+ return false;
+}
+
+bool XsdTerm::isWildcard() const
+{
+ return false;
+}
+
+bool XsdTerm::isReference() const
+{
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdterm_p.h b/src/xmlpatterns/schema/qxsdterm_p.h
new file mode 100644
index 0000000..c42bb40
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdterm_p.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdTerm_H
+#define Patternist_XsdTerm_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A base class for all particles of a model group.
+ *
+ * This class is the base class for all particles of a model group
+ * as the <em>element</em>, <em>group</em> or <em>any</em> tag, it is not supposed to
+ * be instantiated directly.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSTerm">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdTerm : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdTerm> Ptr;
+
+ /**
+ * Returns @c true if the term is an element, @c false otherwise.
+ */
+ virtual bool isElement() const;
+
+ /**
+ * Returns @c true if the term is a model group (group tag), @c false otherwise.
+ */
+ virtual bool isModelGroup() const;
+
+ /**
+ * Returns @c true if the term is a wildcard (any tag), @c false otherwise.
+ */
+ virtual bool isWildcard() const;
+
+ /**
+ * Returns @c true if the term is a reference, @c false otherwise.
+ *
+ * @note The reference term is only used internally as helper during type resolving.
+ */
+ virtual bool isReference() const;
+
+ protected:
+ /**
+ * This constructor only exists to ensure this class is subclassed.
+ */
+ inline XsdTerm() {};
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdtypechecker.cpp b/src/xmlpatterns/schema/qxsdtypechecker.cpp
new file mode 100644
index 0000000..acb10ef
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdtypechecker.cpp
@@ -0,0 +1,1338 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdtypechecker_p.h"
+
+#include "qabstractdatetime_p.h"
+#include "qbase64binary_p.h"
+#include "qboolean_p.h"
+#include "qdecimal_p.h"
+#include "qderivedinteger_p.h"
+#include "qduration_p.h"
+#include "qgenericstaticcontext_p.h"
+#include "qhexbinary_p.h"
+#include "qnamespaceresolver_p.h"
+#include "qpatternplatform_p.h"
+#include "qqnamevalue_p.h"
+#include "qvaluefactory_p.h"
+#include "qxmlnamepool.h"
+#include "qxsdschemahelper_p.h"
+#include "qxsdschemamerger_p.h"
+#include "qxsdstatemachine_p.h"
+
+#include "qxsdschemadebugger_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdSchemaSourceLocationReflection::XsdSchemaSourceLocationReflection(const QSourceLocation &location)
+ : m_sourceLocation(location)
+{
+}
+
+const SourceLocationReflection* XsdSchemaSourceLocationReflection::actualReflection() const
+{
+ return this;
+}
+
+QSourceLocation XsdSchemaSourceLocationReflection::sourceLocation() const
+{
+ return m_sourceLocation;
+}
+
+
+static AnySimpleType::Ptr comparableType(const AnySimpleType::Ptr &type)
+{
+ if (!type->isDefinedBySchema()) {
+ return type;
+ } else {
+ const XsdSimpleType::Ptr simpleType(type);
+ if (type->category() == SchemaType::SimpleTypeAtomic) {
+ return simpleType->primitiveType();
+ } else if (type->category() == SchemaType::SimpleTypeList) {
+ return simpleType->itemType();
+ } else if (type->category() == SchemaType::SimpleTypeUnion) {
+ return simpleType->memberTypes().first();
+ }
+ }
+
+ Q_ASSERT(false);
+ return AnySimpleType::Ptr();
+}
+
+static int totalDigitsForSignedLongLong(long long value)
+{
+ QString number = QString::number(value);
+ if (number.startsWith(QLatin1Char('-')))
+ number = number.mid(1);
+
+ return number.length();
+}
+
+static int totalDigitsForUnsignedLongLong(unsigned long long value)
+{
+ const QString number = QString::number(value);
+ return number.length();
+}
+
+static int totalDigitsForDecimal(const QString &lexicalValue)
+{
+ const QLatin1Char zeroChar('0');
+ const int length = lexicalValue.length() - 1;
+
+ // strip leading zeros
+ int pos = 0;
+ while (lexicalValue.at(pos) == zeroChar && (pos != length))
+ pos++;
+
+ QString value = lexicalValue.mid(pos);
+
+ // if contains '.' strip trailing zeros
+ if (value.contains(QLatin1Char('.'))) {
+ pos = value.length() - 1;
+ while (value.at(pos) == zeroChar) {
+ pos--;
+ }
+
+ value = value.left(pos + 1);
+ }
+
+ // check number of digits of remaining string
+ int totalDigits = 0;
+ for (int i = 0; i < value.count(); ++i)
+ if (value.at(i).isDigit())
+ ++totalDigits;
+
+ if (totalDigits == 0)
+ totalDigits = 1;
+
+ return totalDigits;
+}
+
+static int fractionDigitsForDecimal(const QString &lexicalValue)
+{
+ // we use the lexical value here, as the conversion to double might strip
+ // away decimal positions
+
+ QString trimmedValue(lexicalValue.trimmed());
+ const int pos = trimmedValue.indexOf(QLatin1Char('.'));
+ if (pos == -1) // no '.' -> 0 fraction digits
+ return 0;
+ else
+ return (trimmedValue.length() - pos - 1);
+}
+
+XsdTypeChecker::XsdTypeChecker(const XsdSchemaContext::Ptr &context, const QVector<QXmlName> &namespaceBindings, const QSourceLocation &location)
+ : m_context(context)
+ , m_namePool(m_context->namePool())
+ , m_namespaceBindings(namespaceBindings)
+ , m_reflection(new XsdSchemaSourceLocationReflection(location))
+{
+}
+
+XsdTypeChecker::~XsdTypeChecker()
+{
+}
+
+QString XsdTypeChecker::normalizedValue(const QString &value, const XsdFacet::Hash &facets)
+{
+ if (!facets.contains(XsdFacet::WhiteSpace))
+ return value;
+
+ const XsdFacet::Ptr whiteSpaceFacet = facets.value(XsdFacet::WhiteSpace);
+
+ const DerivedString<TypeString>::Ptr facetValue = whiteSpaceFacet->value();
+ const QString stringValue = facetValue->stringValue();
+ if (stringValue == XsdSchemaToken::toString(XsdSchemaToken::Preserve))
+ return value;
+ else if (stringValue == XsdSchemaToken::toString(XsdSchemaToken::Replace)) {
+ QString newValue(value);
+ newValue.replace(QLatin1Char('\t'), QLatin1Char(' '));
+ newValue.replace(QLatin1Char('\n'), QLatin1Char(' '));
+ newValue.replace(QLatin1Char('\r'), QLatin1Char(' '));
+
+ return newValue;
+ } else if (stringValue == XsdSchemaToken::toString(XsdSchemaToken::Collapse)) {
+ return value.simplified();
+ }
+
+ return value;
+}
+
+XsdFacet::Hash XsdTypeChecker::mergedFacetsForType(const SchemaType::Ptr &type, const XsdSchemaContext::Ptr &context)
+{
+ if (!type)
+ return XsdFacet::Hash();
+
+ const XsdFacet::Hash baseFacets = mergedFacetsForType(type->wxsSuperType(), context);
+ const XsdFacet::Hash facets = context->facetsForType(type);
+
+ XsdFacet::Hash result = baseFacets;
+ XsdFacet::HashIterator it(facets);
+ while (it.hasNext()) {
+ it.next();
+
+ result.insert(it.key(), it.value());
+ }
+
+ return result;
+}
+
+bool XsdTypeChecker::isValidString(const QString &normalizedString, const AnySimpleType::Ptr &type, QString &errorMsg, AnySimpleType::Ptr *boundType) const
+{
+ if (type->name(m_namePool) == BuiltinTypes::xsAnySimpleType->name(m_namePool)) {
+ if (boundType)
+ *boundType = type;
+
+ return true;
+ }
+
+ if (!type->isDefinedBySchema()) {
+ // special QName check
+ if (BuiltinTypes::xsQName->wxsTypeMatches(type)) {
+ if (!XPathHelper::isQName(normalizedString)) {
+ errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2").arg(formatData(normalizedString)).arg(formatType(m_namePool, type));
+ return false;
+ }
+ }
+
+ const AtomicValue::Ptr value = fromLexical(normalizedString, type, m_context, m_reflection);
+ if (value->hasError()) {
+ errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2").arg(formatData(normalizedString)).arg(formatType(m_namePool, type));
+ return false;
+ }
+
+ if (!checkConstrainingFacets(value, normalizedString, type, errorMsg)) {
+ return false;
+ }
+
+ if (boundType)
+ *boundType = type;
+
+ } else {
+ const XsdSimpleType::Ptr simpleType(type);
+
+ if (simpleType->category() == XsdSimpleType::SimpleTypeAtomic) {
+ AnySimpleType::Ptr targetType = simpleType->primitiveType();
+ if (!simpleType->wxsSuperType()->isDefinedBySchema())
+ targetType = simpleType->wxsSuperType();
+
+ const AtomicValue::Ptr value = fromLexical(normalizedString, targetType, m_context, m_reflection);
+ if (value->hasError()) {
+ errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2").arg(formatData(normalizedString)).arg(formatType(m_namePool, targetType));
+ return false;
+ }
+
+ if (!checkConstrainingFacets(value, normalizedString, type, errorMsg)) {
+ return false;
+ }
+
+ if (boundType)
+ *boundType = type;
+
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeList) {
+ QStringList entries = normalizedString.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < entries.count(); ++i) {
+ entries[i] = normalizedValue(entries.at(i), mergedFacetsForType(simpleType->itemType(), m_context));
+ }
+
+ if (!checkConstrainingFacetsList(entries, normalizedString, simpleType->itemType(), mergedFacetsForType(simpleType, m_context), errorMsg)) {
+ return false;
+ }
+
+ for (int i = 0; i < entries.count(); ++i) {
+ if (!isValidString(entries.at(i), simpleType->itemType(), errorMsg)) {
+ return false;
+ }
+ }
+
+ if (boundType)
+ *boundType = simpleType->itemType();
+
+ } else if (simpleType->category() == XsdSimpleType::SimpleTypeUnion) {
+ if (!checkConstrainingFacetsUnion(normalizedString, normalizedString, simpleType, mergedFacetsForType(simpleType, m_context), errorMsg)) {
+ return false;
+ }
+
+ const AnySimpleType::List memberTypes = simpleType->memberTypes();
+
+ bool foundValidType = false;
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ const XsdFacet::Hash mergedFacets = mergedFacetsForType(memberTypes.at(i), m_context);
+ if (isValidString(normalizedValue(normalizedString, mergedFacets), memberTypes.at(i), errorMsg)) {
+ foundValidType = true;
+
+ if (boundType)
+ *boundType = memberTypes.at(i);
+
+ break;
+ }
+ }
+
+ if (!foundValidType) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::valuesAreEqual(const QString &value, const QString &otherValue, const AnySimpleType::Ptr &type) const
+{
+ const AnySimpleType::Ptr targetType = comparableType(type);
+
+ // if the type is xs:anySimpleType we just do string comparison...
+ if (targetType->name(m_namePool) == BuiltinTypes::xsAnySimpleType->name(m_namePool))
+ return (value == otherValue);
+
+ if (BuiltinTypes::xsQName->wxsTypeMatches(type)) {
+ const QXmlName valueName = convertToQName(value);
+ const QXmlName otherValueName = convertToQName(otherValue);
+
+ if (valueName == otherValueName)
+ return true;
+ }
+
+ if (type->category() == SchemaType::SimpleTypeAtomic) {
+ // ... otherwise we use the casting platform for value comparison
+ const DerivedString<TypeString>::Ptr valueStr = DerivedString<TypeString>::fromLexical(m_namePool, value);
+ const DerivedString<TypeString>::Ptr otherValueStr = DerivedString<TypeString>::fromLexical(m_namePool, otherValue);
+
+ return XsdSchemaHelper::constructAndCompare(valueStr, AtomicComparator::OperatorEqual, otherValueStr, targetType, m_context, m_reflection);
+ } else if (type->category() == SchemaType::SimpleTypeList) {
+ const QStringList values = value.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ const QStringList otherValues = otherValue.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ if (values.count() != otherValues.count())
+ return false;
+
+ for (int i = 0; i < values.count(); ++i) {
+ if (!valuesAreEqual(values.at(i), otherValues.at(i), XsdSimpleType::Ptr(type)->itemType()))
+ return false;
+ }
+
+ return true;
+ } else if (type->category() == SchemaType::SimpleTypeUnion) {
+ const AnySimpleType::List memberTypes = XsdSimpleType::Ptr(type)->memberTypes();
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ if (valuesAreEqual(value, otherValue, memberTypes.at(i))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ return false;
+}
+
+bool XsdTypeChecker::checkConstrainingFacets(const AtomicValue::Ptr &value, const QString &lexicalValue, const AnySimpleType::Ptr &type, QString &errorMsg) const
+{
+ const XsdFacet::Hash facets = mergedFacetsForType(type, m_context);
+
+ if (BuiltinTypes::xsString->wxsTypeMatches(type) ||
+ BuiltinTypes::xsUntypedAtomic->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsString(value->stringValue(), facets, BuiltinTypes::xsString, errorMsg);
+ } else if (BuiltinTypes::xsAnyURI->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsString(value->stringValue(), facets, BuiltinTypes::xsAnyURI, errorMsg);
+ } else if (BuiltinTypes::xsNOTATION->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsNotation(value->as<QNameValue>()->qName(), facets, errorMsg);
+ } else if (BuiltinTypes::xsUnsignedByte->wxsTypeMatches(type) ||
+ BuiltinTypes::xsUnsignedInt->wxsTypeMatches(type) ||
+ BuiltinTypes::xsUnsignedLong->wxsTypeMatches(type) ||
+ BuiltinTypes::xsUnsignedShort->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsUnsignedInteger(value->as<Numeric>()->toUnsignedInteger(), lexicalValue, facets, errorMsg);
+ } else if (BuiltinTypes::xsInteger->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsSignedInteger(value->as<Numeric>()->toInteger(), lexicalValue, facets, errorMsg);
+ } else if (BuiltinTypes::xsFloat->wxsTypeMatches(type) ||
+ BuiltinTypes::xsDouble->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDouble(value->as<Numeric>()->toDouble(), lexicalValue, facets, errorMsg);
+ } else if (BuiltinTypes::xsDecimal->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDecimal(value, lexicalValue, facets, errorMsg);
+ } else if (BuiltinTypes::xsDateTime->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsDateTime, errorMsg);
+ } else if (BuiltinTypes::xsDate->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsDate, errorMsg);
+ } else if (BuiltinTypes::xsGYear->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsGYear, errorMsg);
+ } else if (BuiltinTypes::xsGYearMonth->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsGYearMonth, errorMsg);
+ } else if (BuiltinTypes::xsGMonth->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsGMonth, errorMsg);
+ } else if (BuiltinTypes::xsGMonthDay->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsGMonthDay, errorMsg);
+ } else if (BuiltinTypes::xsGDay->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsGDay, errorMsg);
+ } else if (BuiltinTypes::xsTime->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDateTime(value->as<AbstractDateTime>()->toDateTime(), lexicalValue, facets, BuiltinTypes::xsTime, errorMsg);
+ } else if (BuiltinTypes::xsDuration->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsDuration(value, lexicalValue, facets, errorMsg);
+ } else if (BuiltinTypes::xsBoolean->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsBoolean(value->as<Boolean>()->value(), lexicalValue, facets, errorMsg);
+ } else if (BuiltinTypes::xsHexBinary->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsBinary(value->as<Base64Binary>()->asByteArray(), facets, BuiltinTypes::xsHexBinary, errorMsg);
+ } else if (BuiltinTypes::xsBase64Binary->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsBinary(value->as<Base64Binary>()->asByteArray(), facets, BuiltinTypes::xsBase64Binary, errorMsg);
+ } else if (BuiltinTypes::xsQName->wxsTypeMatches(type)) {
+ return checkConstrainingFacetsQName(value->as<QNameValue>()->qName(), lexicalValue, facets, errorMsg);
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsString(const QString &value, const XsdFacet::Hash &facets, const AnySimpleType::Ptr &type, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Length)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Length);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value();
+ if (length->toInteger() != value.length()) {
+ errorMsg = QtXmlPatterns::tr("string content does not match the length facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value();
+ if (length->toInteger() > value.length()) {
+ errorMsg = QtXmlPatterns::tr("string content does not match the minLength facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value();
+ if (length->toInteger() < value.length()) {
+ errorMsg = QtXmlPatterns::tr("string content does not match the maxLength facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(value)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("string content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const DerivedString<TypeString>::Ptr valueStr = DerivedString<TypeString>::fromLexical(m_namePool, value);
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ if (XsdSchemaHelper::constructAndCompare(valueStr, AtomicComparator::OperatorEqual, multiValue.at(j), type, m_context, m_reflection)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("string content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection);
+ if (facetValue->toInteger() < value) {
+ errorMsg = QtXmlPatterns::tr("signed integer content does not match the maxInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection);
+ if (facetValue->toInteger() <= value) {
+ errorMsg = QtXmlPatterns::tr("signed integer content does not match the maxExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection);
+ if (facetValue->toInteger() > value) {
+ errorMsg = QtXmlPatterns::tr("signed integer content does not match the minInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection);
+ if (facetValue->toInteger() >= value) {
+ errorMsg = QtXmlPatterns::tr("signed integer content does not match the minExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const DerivedString<TypeString>::Ptr valueStr = DerivedString<TypeString>::fromLexical(m_namePool, QString::number(value));
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ if (XsdSchemaHelper::constructAndCompare(valueStr, AtomicComparator::OperatorEqual, multiValue.at(j), BuiltinTypes::xsLong, m_context, m_reflection)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("signed integer content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("signed integer content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::TotalDigits)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::TotalDigits);
+ const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value();
+
+ if (totalDigitsForSignedLongLong(value) > facetValue->toInteger()) {
+ errorMsg = QtXmlPatterns::tr("signed integer content does not match in the totalDigits facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection);
+ if (facetValue->toUnsignedInteger() < value) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the maxInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection);
+ if (facetValue->toUnsignedInteger() <= value) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the maxExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection);
+ if (facetValue->toUnsignedInteger() > value) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the minInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection);
+ if (facetValue->toUnsignedInteger() >= value) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the minExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const DerivedString<TypeString>::Ptr valueStr = DerivedString<TypeString>::fromLexical(m_namePool, QString::number(value));
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ if (XsdSchemaHelper::constructAndCompare(valueStr, AtomicComparator::OperatorEqual, multiValue.at(j), BuiltinTypes::xsUnsignedLong, m_context, m_reflection)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::TotalDigits)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::TotalDigits);
+ const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value();
+
+ if (totalDigitsForUnsignedLongLong(value) > facetValue->toInteger()) {
+ errorMsg = QtXmlPatterns::tr("unsigned integer content does not match in the totalDigits facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection);
+ if (facetValue->toDouble() < value) {
+ errorMsg = QtXmlPatterns::tr("double content does not match the maxInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection);
+ if (facetValue->toDouble() <= value) {
+ errorMsg = QtXmlPatterns::tr("double content does not match the maxExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection);
+ if (facetValue->toDouble() > value) {
+ errorMsg = QtXmlPatterns::tr("double content does not match the minInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive);
+ const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection);
+ if (facetValue->toDouble() >= value) {
+ errorMsg = QtXmlPatterns::tr("double content does not match the minExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const DerivedString<TypeString>::Ptr valueStr = DerivedString<TypeString>::fromLexical(m_namePool, QString::number(value));
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ if (XsdSchemaHelper::constructAndCompare(valueStr, AtomicComparator::OperatorEqual, multiValue.at(j), BuiltinTypes::xsDouble, m_context, m_reflection)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("double content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("double content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsDecimal(const AtomicValue::Ptr &value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::FractionDigits)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::FractionDigits);
+ const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value();
+
+ if (fractionDigitsForDecimal(lexicalValue) > facetValue->toInteger()) {
+ errorMsg = QtXmlPatterns::tr("decimal content does not match in the fractionDigits facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::TotalDigits)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::TotalDigits);
+ const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value();
+
+ if (totalDigitsForDecimal(lexicalValue) > facetValue->toInteger()) {
+ errorMsg = QtXmlPatterns::tr("decimal content does not match in the totalDigits facet");
+ return false;
+ }
+ }
+
+ return checkConstrainingFacetsDouble(value->as<Decimal>()->toDouble(), lexicalValue, facets, errorMsg);
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, const QString &lexicalValue, const XsdFacet::Hash &facets, const AnySimpleType::Ptr &type, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive);
+ const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection);
+ if (facetValue->toDateTime() < value) {
+ errorMsg = QtXmlPatterns::tr("date time content does not match the maxInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive);
+ const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection);
+ if (facetValue->toDateTime() <= value) {
+ errorMsg = QtXmlPatterns::tr("date time content does not match the maxExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive);
+ const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection);
+ if (facetValue->toDateTime() > value) {
+ errorMsg = QtXmlPatterns::tr("date time content does not match the minInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive);
+ const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection);
+ if (facetValue->toDateTime() >= value) {
+ errorMsg = QtXmlPatterns::tr("date time content does not match the minExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection);
+ if (facetValue->toDateTime() == value) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("date time content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("date time content does not match pattern facet");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::MaximumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive);
+ const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue);
+
+ if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MaximumInclusive)->value(), AtomicComparator::OperatorLessThan, value, BuiltinTypes::xsDuration, m_context, m_reflection)) {
+ errorMsg = QtXmlPatterns::tr("duration content does not match the maxInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive);
+ const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue);
+
+ if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MaximumExclusive)->value(), AtomicComparator::OperatorLessOrEqual, value, BuiltinTypes::xsDuration, m_context, m_reflection)) {
+ errorMsg = QtXmlPatterns::tr("duration content does not match the maxExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumInclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive);
+ const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue);
+
+ if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MinimumInclusive)->value(), AtomicComparator::OperatorGreaterThan, value, BuiltinTypes::xsDuration, m_context, m_reflection)) {
+ errorMsg = QtXmlPatterns::tr("duration content does not match the minInclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumExclusive)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive);
+ const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue);
+
+ if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MinimumExclusive)->value(), AtomicComparator::OperatorGreaterOrEqual, value, BuiltinTypes::xsDuration, m_context, m_reflection)) {
+ errorMsg = QtXmlPatterns::tr("duration content does not match the minExclusive facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue);
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ if (XsdSchemaHelper::constructAndCompare(multiValue.at(j), AtomicComparator::OperatorEqual, value, BuiltinTypes::xsDuration, m_context, m_reflection)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("duration content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("duration content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsBoolean(bool, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("boolean content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsBinary(const QByteArray &value, const XsdFacet::Hash &facets, const AnySimpleType::Ptr &type, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Length)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Length);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value();
+ if (length->toInteger() != value.length()) {
+ errorMsg = QtXmlPatterns::tr("binary content does not match the length facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value();
+ if (length->toInteger() > value.length()) {
+ errorMsg = QtXmlPatterns::tr("binary content does not match the minLength facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumLength);
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value();
+ if (length->toInteger() < value.length()) {
+ errorMsg = QtXmlPatterns::tr("binary content does not match the maxLength facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const Base64Binary::Ptr binary = ValueFactory::fromLexical(multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection);
+ const QByteArray facetValue = binary->as<Base64Binary>()->asByteArray();
+ if (value == facetValue) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("binary content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ //TODO: implement
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsQName(const QXmlName &value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Length)) {
+ // always true
+ }
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ // always true
+ }
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ // always true
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ if (!XPathHelper::isQName(lexicalValue)) {
+ errorMsg = QtXmlPatterns::tr("invalid QName content: %1").arg(formatData(lexicalValue));
+ return false;
+ }
+
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QXmlName facetValue = multiValue.at(j)->as<QNameValue>()->qName();
+
+ if (value == facetValue) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("QName content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("QName content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsNotation(const QXmlName &value, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Length)) {
+ // deprecated by spec
+ }
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ // deprecated by spec
+ }
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ // deprecated by spec
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QXmlName facetValue = multiValue.at(j)->as<QNameValue>()->qName();
+
+ if (value == facetValue) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("notation content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ //TODO: implement
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsList(const QStringList &values, const QString &lexicalValue, const AnySimpleType::Ptr &itemType, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Length)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr value = facets.value(XsdFacet::Length)->value();
+ if (value->toInteger() != values.count()) {
+ errorMsg = QtXmlPatterns::tr("list content does not match length facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MinimumLength)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr value = facets.value(XsdFacet::MinimumLength)->value();
+ if (value->toInteger() > values.count()) {
+ errorMsg = QtXmlPatterns::tr("list content does not match minLength facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::MaximumLength)) {
+ const DerivedInteger<TypeNonNegativeInteger>::Ptr value = facets.value(XsdFacet::MaximumLength)->value();
+ if (value->toInteger() < values.count()) {
+ errorMsg = QtXmlPatterns::tr("list content does not match maxLength facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Enumeration)) {
+
+ bool found = false;
+
+ // we have to handle lists with QName derived items differently
+ if (BuiltinTypes::xsQName->wxsTypeMatches(itemType) || BuiltinTypes::xsNOTATION->wxsTypeMatches(itemType)) {
+ // first convert the string values from the instance document to a list of QXmlName
+ QList<QXmlName> instanceValues;
+ for (int i = 0; i < values.count(); ++i) {
+ instanceValues.append(convertToQName(values.at(i)));
+ }
+
+ // fetch the values from the facet and create a list of QXmlNames for each of them
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ for (int i = 0; i < multiValue.count(); ++i) {
+ const QStringList facetValueList = multiValue.at(i)->as<DerivedString<TypeString> >()->stringValue().split(QLatin1Char(' '), QString::SkipEmptyParts);
+
+ // create the list of atomic string values
+ QList<QXmlName> facetValues;
+ for (int j = 0; j < facetValueList.count(); ++j) {
+ facetValues.append(convertToQName(facetValueList.at(j)));
+ }
+
+ // check if both lists have the same length
+ if (instanceValues.count() != facetValues.count())
+ continue;
+
+ // check if both lists are equal, that means the contain equal items in the same order
+ bool matchesAll = true;
+ for (int j = 0; j < instanceValues.count(); ++j) {
+ if (instanceValues.at(j) != facetValues.at(j)) {
+ matchesAll = false;
+ break;
+ }
+ }
+
+ if (matchesAll) {
+ found = true;
+ break;
+ }
+ }
+ } else {
+ // first convert the string values from the instance document to atomic values of type string
+ AtomicValue::List instanceValues;
+ for (int i = 0; i < values.count(); ++i) {
+ instanceValues.append(DerivedString<TypeString>::fromLexical(m_namePool, values.at(i)));
+ }
+
+ // fetch the values from the facet and create a list of atomic string values for each of them
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+
+ const AnySimpleType::Ptr targetType = comparableType(itemType);
+
+ const AtomicValue::List multiValue = facet->multiValue();
+ for (int i = 0; i < multiValue.count(); ++i) {
+ const QStringList facetValueList = multiValue.at(i)->as<DerivedString<TypeString> >()->stringValue().split(QLatin1Char(' '), QString::SkipEmptyParts);
+
+ // create the list of atomic string values
+ AtomicValue::List facetValues;
+ for (int j = 0; j < facetValueList.count(); ++j) {
+ facetValues.append(DerivedString<TypeString>::fromLexical(m_namePool, facetValueList.at(j)));
+ }
+
+ // check if both lists have the same length
+ if (instanceValues.count() != facetValues.count())
+ continue;
+
+ // check if both lists are equal, that means the contain equal items in the same order
+ bool matchesAll = true;
+ for (int j = 0; j < instanceValues.count(); ++j) {
+ if (!XsdSchemaHelper::constructAndCompare(instanceValues.at(j), AtomicComparator::OperatorEqual, facetValues.at(j), targetType, m_context, m_reflection)) {
+ matchesAll = false;
+ break;
+ }
+ }
+
+ if (matchesAll) {
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("list content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("list content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+bool XsdTypeChecker::checkConstrainingFacetsUnion(const QString &value, const QString &lexicalValue, const XsdSimpleType::Ptr &simpleType, const XsdFacet::Hash &facets, QString &errorMsg) const
+{
+ if (facets.contains(XsdFacet::Enumeration)) {
+ const AnySimpleType::List memberTypes = simpleType->memberTypes();
+
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Enumeration);
+
+ // convert the instance value into an atomic string value
+ const DerivedString<TypeString>::Ptr valueString = DerivedString<TypeString>::fromLexical(m_namePool, value);
+
+ // collect the facet values into a list of atomic string values
+ const AtomicValue::List facetValues = facet->multiValue();
+
+ // compare the instance value against the facetValues for each member type and
+ // search for a match
+
+ bool found = false;
+ for (int i = 0; i < memberTypes.count(); ++i) {
+ const AnySimpleType::Ptr targetType = comparableType(memberTypes.at(i));
+ for (int j = 0; j < facetValues.count(); ++j) {
+ if (XsdSchemaHelper::constructAndCompare(valueString, AtomicComparator::OperatorEqual, facetValues.at(j), targetType, m_context, m_reflection)) {
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("union content is not listed in the enumeration facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Pattern)) {
+ const XsdFacet::Ptr facet = facets.value(XsdFacet::Pattern);
+ const AtomicValue::List multiValue = facet->multiValue();
+ bool found = false;
+ for (int j = 0; j < multiValue.count(); ++j) {
+ const QString pattern = multiValue.at(j)->as<DerivedString<TypeString> >()->stringValue();
+ const QRegExp exp = PatternPlatform::parsePattern(pattern, m_context, m_reflection);
+ if (exp.exactMatch(lexicalValue)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ errorMsg = QtXmlPatterns::tr("union content does not match pattern facet");
+ return false;
+ }
+ }
+ if (facets.contains(XsdFacet::Assertion)) {
+ //TODO: implement
+ }
+
+ return true;
+}
+
+AtomicValue::Ptr XsdTypeChecker::fromLexical(const QString &value, const SchemaType::Ptr &type, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection) const
+{
+ if (type->name(m_namePool) == BuiltinTypes::xsNOTATION->name(m_namePool) || type->name(m_namePool) == BuiltinTypes::xsQName->name(m_namePool)) {
+ if (value.simplified().isEmpty())
+ return ValidationError::createError(QtXmlPatterns::tr("data of type %1 are not allowed to be empty").arg(formatType(m_namePool, BuiltinTypes::xsNOTATION)));
+
+ const QXmlName valueName = convertToQName(value);
+ return QNameValue::fromValue(m_namePool, valueName);
+ } else {
+ return ValueFactory::fromLexical(value, type, context, reflection);
+ }
+}
+
+QXmlName XsdTypeChecker::convertToQName(const QString &name) const
+{
+ const int pos = name.indexOf(QLatin1Char(':'));
+
+ QXmlName::PrefixCode prefixCode = 0;
+ QXmlName::NamespaceCode namespaceCode;
+ QXmlName::LocalNameCode localNameCode;
+ if (pos != -1) {
+ prefixCode = m_context->namePool()->allocatePrefix(name.left(pos));
+ namespaceCode = StandardNamespaces::empty;
+ for (int i = 0; i < m_namespaceBindings.count(); ++i) {
+ if (m_namespaceBindings.at(i).prefix() == prefixCode) {
+ namespaceCode = m_namespaceBindings.at(i).namespaceURI();
+ break;
+ }
+ }
+ localNameCode = m_context->namePool()->allocateLocalName(name.mid(pos + 1));
+ } else {
+ prefixCode = StandardPrefixes::empty;
+ namespaceCode = StandardNamespaces::empty;
+ for (int i = 0; i < m_namespaceBindings.count(); ++i) {
+ if (m_namespaceBindings.at(i).prefix() == prefixCode) {
+ namespaceCode = m_namespaceBindings.at(i).namespaceURI();
+ break;
+ }
+ }
+ localNameCode = m_context->namePool()->allocateLocalName(name);
+ }
+
+ return QXmlName(namespaceCode, localNameCode, prefixCode);
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdtypechecker_p.h b/src/xmlpatterns/schema/qxsdtypechecker_p.h
new file mode 100644
index 0000000..88a0c63
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdtypechecker_p.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdTypeChecker_H
+#define Patternist_XsdTypeChecker_H
+
+#include <QtXmlPatterns/QSourceLocation>
+
+#include "qschematype_p.h"
+#include "qsourcelocationreflection_p.h"
+#include "qxsdschemacontext_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QXmlQuery;
+
+namespace QPatternist
+{
+ /**
+ * @short An implementation of SourceLocationReflection that takes a QSourceLocation.
+ *
+ * This is a convenience class which provides a QSourceLocation with a SourceLocationReflection
+ * interface.
+ */
+ class XsdSchemaSourceLocationReflection : public SourceLocationReflection
+ {
+ public:
+ XsdSchemaSourceLocationReflection(const QSourceLocation &location);
+
+ virtual const SourceLocationReflection *actualReflection() const;
+ virtual QSourceLocation sourceLocation() const;
+
+ private:
+ const QSourceLocation m_sourceLocation;
+ };
+
+ /**
+ * @short The class that provides methods for checking a string against a type.
+ *
+ * The class provides functionality for type-aware string handling.
+ */
+ class XsdTypeChecker
+ {
+ public:
+ /**
+ * Creates a new type checker.
+ *
+ * @param context The schema context that is used for error reporting.
+ * @param namespaceBindings The namespace bindings that shall be used to check against xs:QName based types.
+ * @param location The source location that is used for error reporting.
+ */
+ XsdTypeChecker(const XsdSchemaContext::Ptr &context, const QVector<QXmlName> &namespaceBindings, const QSourceLocation &location);
+
+ /**
+ * Destroys the type checker.
+ */
+ ~XsdTypeChecker();
+
+ /**
+ * Returns all facets for the given @p type.
+ *
+ * The list of facets is created by following the type hierarchy from xs:anyType down to the given type
+ * and merging the facets in each step.
+ */
+ static XsdFacet::Hash mergedFacetsForType(const SchemaType::Ptr &type, const XsdSchemaContext::Ptr &context);
+
+ /**
+ * Returns the normalized value for the given @p value.
+ *
+ * The normalized value is the original value with all the white space facets
+ * applied on it.
+ *
+ * @param value The original value.
+ * @param facets The hash of all facets of the values type.
+ */
+ static QString normalizedValue(const QString &value, const XsdFacet::Hash &facets);
+
+ /**
+ * Checks whether the @p normalizedString is valid according the given @p type.
+ *
+ * @param normalizedString The string in normalized form (whitespace facets applied).
+ * @param type The type the string shall be tested against.
+ * @param errorMsg Contains the error message if the normalizedString does not match the type.
+ * @param boundType The type the data was bound to during validation.
+ *
+ * @note The @p boundType only differs from @p type if the type is derived from an based union value.
+ */
+ bool isValidString(const QString &normalizedString, const AnySimpleType::Ptr &type, QString &errorMsg, AnySimpleType::Ptr *boundType = 0) const;
+
+ /**
+ * Returns whether the given @p value and @p otherValue are of @p type and are equal.
+ */
+ bool valuesAreEqual(const QString &value, const QString &otherValue, const AnySimpleType::Ptr &type) const;
+
+ private:
+ Q_DISABLE_COPY(XsdTypeChecker)
+
+ /**
+ * Checks the given value against the facets of @p type.
+ */
+ bool checkConstrainingFacets(const AtomicValue::Ptr &value, const QString &lexicalValue, const AnySimpleType::Ptr &type, QString &errorMsg) const;
+ bool checkConstrainingFacetsString(const QString &value, const XsdFacet::Hash &facets, const AnySimpleType::Ptr &type, QString &errorMsg) const;
+ bool checkConstrainingFacetsSignedInteger(long long value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsUnsignedInteger(unsigned long long value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsDouble(double value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsDecimal(const AtomicValue::Ptr &value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsDateTime(const QDateTime &value, const QString &lexicalValue, const XsdFacet::Hash &facets, const AnySimpleType::Ptr &type, QString &errorMsg) const;
+ bool checkConstrainingFacetsDuration(const AtomicValue::Ptr &value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsBoolean(bool value, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsBinary(const QByteArray &value, const XsdFacet::Hash &facets, const AnySimpleType::Ptr &type, QString &errorMsg) const;
+ bool checkConstrainingFacetsQName(const QXmlName&, const QString &lexicalValue, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsNotation(const QXmlName &value, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsList(const QStringList &values, const QString &lexicalValue, const AnySimpleType::Ptr &itemType, const XsdFacet::Hash &facets, QString &errorMsg) const;
+ bool checkConstrainingFacetsUnion(const QString &value, const QString &lexicalValue, const XsdSimpleType::Ptr &simpleType, const XsdFacet::Hash &facets, QString &errorMsg) const;
+
+ /**
+ * Creates an atomic value of @p type from the given string @p value.
+ */
+ AtomicValue::Ptr fromLexical(const QString &value, const SchemaType::Ptr &type, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection) const;
+
+ /**
+ * Converts a qualified name into a QXmlName according to the namespace
+ * mappings of the current node.
+ */
+ QXmlName convertToQName(const QString &name) const;
+
+ XsdSchemaContext::Ptr m_context;
+ XsdSchema::Ptr m_schema;
+ const NamePool::Ptr m_namePool;
+ QVector<QXmlName> m_namespaceBindings;
+ SourceLocationReflection* m_reflection;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsduserschematype.cpp b/src/xmlpatterns/schema/qxsduserschematype.cpp
new file mode 100644
index 0000000..bb545b4
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsduserschematype.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * NOTE: This file is included by qxsduserschematype_p.h
+ * if you need some includes, put them in qxsduserschematype_p.h (outside of the namespace)
+ */
+
+template<typename TSuperClass>
+void XsdUserSchemaType<TSuperClass>::setName(const QXmlName &name)
+{
+ m_name = name;
+}
+
+template<typename TSuperClass>
+QXmlName XsdUserSchemaType<TSuperClass>::name(const NamePool::Ptr&) const
+{
+ return m_name;
+}
+
+template<typename TSuperClass>
+QString XsdUserSchemaType<TSuperClass>::displayName(const NamePool::Ptr &np) const
+{
+ return np->displayName(m_name);
+}
+
+template<typename TSuperClass>
+void XsdUserSchemaType<TSuperClass>::setDerivationConstraints(const SchemaType::DerivationConstraints &constraints)
+{
+ m_derivationConstraints = constraints;
+}
+
+template<typename TSuperClass>
+SchemaType::DerivationConstraints XsdUserSchemaType<TSuperClass>::derivationConstraints() const
+{
+ return m_derivationConstraints;
+}
diff --git a/src/xmlpatterns/schema/qxsduserschematype_p.h b/src/xmlpatterns/schema/qxsduserschematype_p.h
new file mode 100644
index 0000000..9138d09
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsduserschematype_p.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdUserSchemaType_H
+#define Patternist_XsdUserSchemaType_H
+
+#include "qnamedschemacomponent_p.h"
+#include "qschematype_p.h"
+#include "qxsdannotated_p.h"
+
+template<typename N, typename M> class QHash;
+template<typename N> class QList;
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A base class for all user defined simple and complex types.
+ *
+ * This class was introduced to combine the SchemaType class and the
+ * NamedSchemaComponent class without explicit inheritance.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ template<typename TSuperClass>
+ class XsdUserSchemaType : public TSuperClass, public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdUserSchemaType> Ptr;
+
+ /**
+ * Sets the @p name of the type.
+ */
+ void setName(const QXmlName &name);
+
+ /**
+ * Returns the name of the type.
+ *
+ * @param namePool The pool the name belongs to.
+ */
+ virtual QXmlName name(const NamePool::Ptr &namePool) const;
+
+ /**
+ * Returns the display name of the type.
+ *
+ * @param namePool The pool the name belongs to.
+ */
+ virtual QString displayName(const NamePool::Ptr &namePool) const;
+
+ /**
+ * Sets the derivation @p constraints of the type.
+ */
+ void setDerivationConstraints(const SchemaType::DerivationConstraints &constraints);
+
+ /**
+ * Returns the derivation constraints of the type.
+ */
+ SchemaType::DerivationConstraints derivationConstraints() const;
+
+ private:
+ QXmlName m_name;
+ SchemaType::DerivationConstraints m_derivationConstraints;
+ };
+
+ #include "qxsduserschematype.cpp"
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp
new file mode 100644
index 0000000..944ae79
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdvalidatedxmlnodemodel_p.h"
+
+#include <QtCore/QUrl>
+#include <QtCore/QVariant>
+#include <QtCore/QVector>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+XsdValidatedXmlNodeModel::XsdValidatedXmlNodeModel(const QAbstractXmlNodeModel *model)
+ : m_internalModel(model)
+{
+}
+
+XsdValidatedXmlNodeModel::~XsdValidatedXmlNodeModel()
+{
+}
+
+QUrl XsdValidatedXmlNodeModel::baseUri(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->baseUri(index);
+}
+
+QUrl XsdValidatedXmlNodeModel::documentUri(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->documentUri(index);
+}
+
+QXmlNodeModelIndex::NodeKind XsdValidatedXmlNodeModel::kind(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->kind(index);
+}
+
+QXmlNodeModelIndex::DocumentOrder XsdValidatedXmlNodeModel::compareOrder(const QXmlNodeModelIndex &index, const QXmlNodeModelIndex &otherIndex) const
+{
+ return m_internalModel->compareOrder(index, otherIndex);
+}
+
+QXmlNodeModelIndex XsdValidatedXmlNodeModel::root(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->root(index);
+}
+
+QXmlName XsdValidatedXmlNodeModel::name(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->name(index);
+}
+
+QString XsdValidatedXmlNodeModel::stringValue(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->stringValue(index);
+}
+
+QVariant XsdValidatedXmlNodeModel::typedValue(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->typedValue(index);
+}
+
+QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<QXmlNodeModelIndex> > XsdValidatedXmlNodeModel::iterate(const QXmlNodeModelIndex &index, QXmlNodeModelIndex::Axis axis) const
+{
+ return m_internalModel->iterate(index, axis);
+}
+
+QPatternist::ItemIteratorPtr XsdValidatedXmlNodeModel::sequencedTypedValue(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->sequencedTypedValue(index);
+}
+
+QPatternist::ItemTypePtr XsdValidatedXmlNodeModel::type(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->type(index);
+}
+
+QXmlName::NamespaceCode XsdValidatedXmlNodeModel::namespaceForPrefix(const QXmlNodeModelIndex &index, const QXmlName::PrefixCode prefix) const
+{
+ return m_internalModel->namespaceForPrefix(index, prefix);
+}
+
+bool XsdValidatedXmlNodeModel::isDeepEqual(const QXmlNodeModelIndex &index, const QXmlNodeModelIndex &otherIndex) const
+{
+ return m_internalModel->isDeepEqual(index, otherIndex);
+}
+
+void XsdValidatedXmlNodeModel::sendNamespaces(const QXmlNodeModelIndex &index, QAbstractXmlReceiver *const receiver) const
+{
+ m_internalModel->sendNamespaces(index, receiver);
+}
+
+QVector<QXmlName> XsdValidatedXmlNodeModel::namespaceBindings(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->namespaceBindings(index);
+}
+
+QXmlNodeModelIndex XsdValidatedXmlNodeModel::elementById(const QXmlName &name) const
+{
+ return m_internalModel->elementById(name);
+}
+
+QVector<QXmlNodeModelIndex> XsdValidatedXmlNodeModel::nodesByIdref(const QXmlName &name) const
+{
+ return m_internalModel->nodesByIdref(name);
+}
+
+void XsdValidatedXmlNodeModel::copyNodeTo(const QXmlNodeModelIndex &index, QAbstractXmlReceiver *const receiver, const NodeCopySettings &settings) const
+{
+ return m_internalModel->copyNodeTo(index, receiver, settings);
+}
+
+QXmlNodeModelIndex XsdValidatedXmlNodeModel::nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &origin) const
+{
+ return m_internalModel->nextFromSimpleAxis(axis, origin);
+}
+
+QVector<QXmlNodeModelIndex> XsdValidatedXmlNodeModel::attributes(const QXmlNodeModelIndex &index) const
+{
+ return m_internalModel->attributes(index);
+}
+
+void XsdValidatedXmlNodeModel::setAssignedElement(const QXmlNodeModelIndex &index, const XsdElement::Ptr &element)
+{
+ m_assignedElements.insert(index, element);
+}
+
+XsdElement::Ptr XsdValidatedXmlNodeModel::assignedElement(const QXmlNodeModelIndex &index) const
+{
+ if (m_assignedElements.contains(index))
+ return m_assignedElements.value(index);
+ else
+ return XsdElement::Ptr();
+}
+
+void XsdValidatedXmlNodeModel::setAssignedAttribute(const QXmlNodeModelIndex &index, const XsdAttribute::Ptr &attribute)
+{
+ m_assignedAttributes.insert(index, attribute);
+}
+
+XsdAttribute::Ptr XsdValidatedXmlNodeModel::assignedAttribute(const QXmlNodeModelIndex &index) const
+{
+ if (m_assignedAttributes.contains(index))
+ return m_assignedAttributes.value(index);
+ else
+ return XsdAttribute::Ptr();
+}
+
+void XsdValidatedXmlNodeModel::setAssignedType(const QXmlNodeModelIndex &index, const SchemaType::Ptr &type)
+{
+ m_assignedTypes.insert(index, type);
+}
+
+SchemaType::Ptr XsdValidatedXmlNodeModel::assignedType(const QXmlNodeModelIndex &index) const
+{
+ if (m_assignedTypes.contains(index))
+ return m_assignedTypes.value(index);
+ else
+ return SchemaType::Ptr();
+}
+
+void XsdValidatedXmlNodeModel::addIdIdRefBinding(const QString &id, const NamedSchemaComponent::Ptr &binding)
+{
+ m_idIdRefBindings[id].insert(binding);
+}
+
+QStringList XsdValidatedXmlNodeModel::idIdRefBindingIds() const
+{
+ return m_idIdRefBindings.keys();
+}
+
+QSet<NamedSchemaComponent::Ptr> XsdValidatedXmlNodeModel::idIdRefBindings(const QString &id) const
+{
+ return m_idIdRefBindings.value(id);
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h
new file mode 100644
index 0000000..6b6c03d
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdValidatedXmlNodeModel_H
+#define Patternist_XsdValidatedXmlNodeModel_H
+
+#include "qabstractxmlnodemodel.h"
+
+#include "qabstractxmlforwarditerator_p.h"
+#include "qitem_p.h"
+#include "qschematype_p.h"
+#include "qxsdelement_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short A delegate class that wraps around a QAbstractXmlNodeModel and provides
+ * additional validation specific information.
+ *
+ * This class represents the input XML document enriched with additional type
+ * information that has been assigned during validation.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdValidatedXmlNodeModel : public QAbstractXmlNodeModel
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdValidatedXmlNodeModel> Ptr;
+ typedef QList<Ptr> List;
+
+ /**
+ * Creates a new validated xml node model.
+ */
+ XsdValidatedXmlNodeModel(const QAbstractXmlNodeModel *model);
+
+ /**
+ * Destroys the validated xml node model.
+ */
+ virtual ~XsdValidatedXmlNodeModel();
+
+ virtual QUrl baseUri(const QXmlNodeModelIndex &ni) const;
+ virtual QUrl documentUri(const QXmlNodeModelIndex &ni) const;
+ virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex &ni) const;
+ virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex &ni1, const QXmlNodeModelIndex &ni2) const;
+ virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex &n) const;
+ virtual QXmlName name(const QXmlNodeModelIndex &ni) const;
+ virtual QString stringValue(const QXmlNodeModelIndex &n) const;
+ virtual QVariant typedValue(const QXmlNodeModelIndex &n) const;
+ virtual QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<QXmlNodeModelIndex> > iterate(const QXmlNodeModelIndex &ni, QXmlNodeModelIndex::Axis axis) const;
+ virtual QPatternist::ItemIteratorPtr sequencedTypedValue(const QXmlNodeModelIndex &ni) const;
+ virtual QPatternist::ItemTypePtr type(const QXmlNodeModelIndex &ni) const;
+ virtual QXmlName::NamespaceCode namespaceForPrefix(const QXmlNodeModelIndex &ni, const QXmlName::PrefixCode prefix) const;
+ virtual bool isDeepEqual(const QXmlNodeModelIndex &ni1, const QXmlNodeModelIndex &ni2) const;
+ virtual void sendNamespaces(const QXmlNodeModelIndex &n, QAbstractXmlReceiver *const receiver) const;
+ virtual QVector<QXmlName> namespaceBindings(const QXmlNodeModelIndex &n) const;
+ virtual QXmlNodeModelIndex elementById(const QXmlName &NCName) const;
+ virtual QVector<QXmlNodeModelIndex> nodesByIdref(const QXmlName &NCName) const;
+ virtual void copyNodeTo(const QXmlNodeModelIndex &node, QAbstractXmlReceiver *const receiver, const NodeCopySettings &) const;
+
+ /**
+ * Sets the @p element that is assigned to the xml node at @p index.
+ */
+ void setAssignedElement(const QXmlNodeModelIndex &index, const XsdElement::Ptr &element);
+
+ /**
+ * Returns the element that is assigned to the xml node at @p index.
+ */
+ XsdElement::Ptr assignedElement(const QXmlNodeModelIndex &index) const;
+
+ /**
+ * Sets the @p attribute that is assigned to the xml node at @p index.
+ */
+ void setAssignedAttribute(const QXmlNodeModelIndex &index, const XsdAttribute::Ptr &attribute);
+
+ /**
+ * Returns the attribute that is assigned to the xml node at @p index.
+ */
+ XsdAttribute::Ptr assignedAttribute(const QXmlNodeModelIndex &index) const;
+
+ /**
+ * Sets the @p type that is assigned to the xml node at @p index.
+ *
+ * @note The type can be a different than the type of the element or
+ * attribute that is assigned to the index, since the instance
+ * document can overwrite it by xsi:type.
+ */
+ void setAssignedType(const QXmlNodeModelIndex &index, const SchemaType::Ptr &type);
+
+ /**
+ * Returns the type that is assigned to the xml node at @p index.
+ */
+ SchemaType::Ptr assignedType(const QXmlNodeModelIndex &index) const;
+
+ /**
+ * Adds the attribute or element @p binding with the given @p id.
+ */
+ void addIdIdRefBinding(const QString &id, const NamedSchemaComponent::Ptr &binding);
+
+ /**
+ * Returns a list of all binding ids.
+ */
+ QStringList idIdRefBindingIds() const;
+
+ /**
+ * Returns the set of bindings with the given @p id.
+ */
+ QSet<NamedSchemaComponent::Ptr> idIdRefBindings(const QString &id) const;
+
+ protected:
+ virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &origin) const;
+ virtual QVector<QXmlNodeModelIndex> attributes(const QXmlNodeModelIndex &element) const;
+
+ private:
+ QExplicitlySharedDataPointer<const QAbstractXmlNodeModel> m_internalModel;
+ QHash<QXmlNodeModelIndex, XsdElement::Ptr> m_assignedElements;
+ QHash<QXmlNodeModelIndex, XsdAttribute::Ptr> m_assignedAttributes;
+ QHash<QXmlNodeModelIndex, SchemaType::Ptr> m_assignedTypes;
+ QHash<QString, QSet<NamedSchemaComponent::Ptr> > m_idIdRefBindings;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
new file mode 100644
index 0000000..8af70f6
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
@@ -0,0 +1,1276 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdvalidatinginstancereader_p.h"
+
+#include "qabstractdatetime_p.h"
+#include "qacceltreeresourceloader_p.h"
+#include "qbase64binary_p.h"
+#include "qboolean_p.h"
+#include "qcommonnamespaces_p.h"
+#include "qderivedinteger_p.h"
+#include "qduration_p.h"
+#include "qgenericstaticcontext_p.h"
+#include "qhexbinary_p.h"
+#include "qnamespaceresolver_p.h"
+#include "qpatternplatform_p.h"
+#include "qqnamevalue_p.h"
+#include "qsourcelocationreflection_p.h"
+#include "qvaluefactory_p.h"
+#include "qxmlnamepool.h"
+#include "qxmlquery_p.h"
+#include "qxmlschema_p.h"
+#include "qxsdschemahelper_p.h"
+#include "qxsdschemamerger_p.h"
+#include "qxsdstatemachine_p.h"
+#include "qxsdstatemachinebuilder_p.h"
+#include "qxsdtypechecker_p.h"
+
+#include "qxsdschemadebugger_p.h"
+
+#include <QtCore/QFile>
+#include <QtXmlPatterns/QXmlQuery>
+#include <QtXmlPatterns/QXmlResultItems>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+namespace QPatternist
+{
+ template <>
+ template <>
+ bool XsdStateMachine<XsdTerm::Ptr>::inputEqualsTransition<QXmlName>(QXmlName name, XsdTerm::Ptr term) const
+ {
+ if (term->isElement()) {
+ return (XsdElement::Ptr(term)->name(m_namePool) == name);
+ } else if (term->isWildcard()) {
+ // wildcards using XsdWildcard::absentNamespace, so we have to fix that here
+ if (name.namespaceURI() == StandardNamespaces::empty) {
+ name.setNamespaceURI(m_namePool->allocateNamespace(XsdWildcard::absentNamespace()));
+ }
+
+ return XsdSchemaHelper::wildcardAllowsExpandedName(name, XsdWildcard::Ptr(term), m_namePool);
+ }
+
+ return false;
+ }
+}
+
+XsdValidatingInstanceReader::XsdValidatingInstanceReader(XsdValidatedXmlNodeModel *model, const QUrl &documentUri, const XsdSchemaContext::Ptr &context)
+ : XsdInstanceReader(model, context)
+ , m_model(model)
+ , m_namePool(m_context->namePool())
+ , m_xsiNilName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("nil")))
+ , m_xsiTypeName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("type")))
+ , m_xsiSchemaLocationName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("schemaLocation")))
+ , m_xsiNoNamespaceSchemaLocationName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("noNamespaceSchemaLocation")))
+ , m_documentUri(documentUri)
+{
+ m_idRefsType = m_context->schemaTypeFactory()->createSchemaType(m_namePool->allocateQName(CommonNamespaces::WXS, QLatin1String("IDREFS")));
+}
+
+void XsdValidatingInstanceReader::addSchema(const XsdSchema::Ptr &schema, const QUrl &locationUrl)
+{
+ if (!m_mergedSchemas.contains(locationUrl)) {
+ m_mergedSchemas.insert(locationUrl, QStringList() << schema->targetNamespace());
+ } else {
+ QStringList &targetNamespaces = m_mergedSchemas[locationUrl];
+ if (targetNamespaces.contains(schema->targetNamespace()))
+ return;
+
+ targetNamespaces.append(schema->targetNamespace());
+ }
+
+ const XsdSchemaMerger merger(m_schema, schema);
+ m_schema = merger.mergedSchema();
+/*
+ XsdSchemaDebugger dbg(m_namePool);
+ dbg.dumpSchema(m_schema);
+*/
+}
+
+bool XsdValidatingInstanceReader::read()
+{
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ return true;
+
+ if (isStartElement()) {
+ const QXmlName elementName = name();
+ const QXmlItem currentItem = item();
+ bool hasStateMachine = false;
+ XsdElement::Ptr processedElement;
+
+ if (!validate(hasStateMachine, processedElement))
+ return false;
+
+ read();
+
+ if (processedElement) { // for wildcard with 'skip' we have no element
+ m_model->setAssignedElement(currentItem.toNodeModelIndex(), processedElement);
+
+ // check identity constraints after all child nodes have been
+ // validated, so that we know there assigned types
+ validateIdentityConstraint(processedElement, currentItem);
+ }
+
+ if (!m_stateMachines.isEmpty() && hasStateMachine) {
+ if (!m_stateMachines.top().inEndState()) {
+ error(QtXmlPatterns::tr("element %1 is missing child element").arg(formatKeyword(m_namePool->displayName(elementName))));
+ return false;
+ }
+ m_stateMachines.pop();
+ }
+ }
+ }
+
+ // final validations
+
+ // check IDREF occurrences
+ const QStringList ids = m_model->idIdRefBindingIds();
+ QSetIterator<QString> it(m_idRefs);
+ while (it.hasNext()) {
+ const QString id = it.next();
+ if (!ids.contains(id)) {
+ error(QtXmlPatterns::tr("there is one IDREF value with no corresponding ID: %1").arg(formatKeyword(id)));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void XsdValidatingInstanceReader::error(const QString &msg) const
+{
+ m_context.data()->error(msg, XsdSchemaContext::XSDError, sourceLocation());
+}
+
+bool XsdValidatingInstanceReader::loadSchema(const QString &targetNamespace, const QUrl &location)
+{
+ const AutoPtr<QNetworkReply> reply(AccelTreeResourceLoader::load(location, m_context->networkAccessManager(),
+ m_context, AccelTreeResourceLoader::ContinueOnError));
+ if (!reply)
+ return true;
+
+ // we have to create a separated schema context here, that however shares the type factory
+ XsdSchemaContext::Ptr context(new XsdSchemaContext(m_namePool));
+ context->m_schemaTypeFactory = m_context->m_schemaTypeFactory;
+
+ QXmlSchemaPrivate schema(context);
+ schema.load(reply.data(), location, targetNamespace);
+ if (!schema.isValid()) {
+ error(QtXmlPatterns::tr("loaded schema file is invalid"));
+ return false;
+ }
+
+ addSchema(schema.m_schemaParserContext->schema(), location);
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Ptr &processedElement)
+{
+ // first check if a custom schema is defined
+ if (hasAttribute(m_xsiSchemaLocationName)) {
+ const QString schemaLocation = attribute(m_xsiSchemaLocationName);
+ const QStringList parts = schemaLocation.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ if ((parts.count()%2) == 1) {
+ error(QtXmlPatterns::tr("%1 contains invalid data").arg(formatKeyword(m_namePool, m_xsiSchemaLocationName)));
+ return false;
+ }
+
+ for (int i = 0; i < parts.count(); i += 2) {
+ const QString identifier = QString::fromLatin1("%1 %2").arg(parts.at(i)).arg(parts.at(i + 1));
+ if (m_processedSchemaLocations.contains(identifier))
+ continue;
+ else
+ m_processedSchemaLocations.insert(identifier);
+
+ // check constraint 4) from http://www.w3.org/TR/xmlschema-1/#schema-loc (only valid for XML Schema 1.0?)
+ if (m_processedNamespaces.contains(parts.at(i))) {
+ error(QtXmlPatterns::tr("xsi:schemaLocation namespace %1 has already appeared earlier in the instance document").arg(formatKeyword(parts.at(i))));
+ return false;
+ }
+
+ QUrl url(parts.at(i + 1));
+ if (url.isRelative()) {
+ Q_ASSERT(m_documentUri.isValid());
+
+ url = m_documentUri.resolved(url);
+ }
+
+ loadSchema(parts.at(i), url);
+ }
+ }
+
+ if (hasAttribute(m_xsiNoNamespaceSchemaLocationName)) {
+ const QString schemaLocation = attribute(m_xsiNoNamespaceSchemaLocationName);
+
+ if (!m_processedSchemaLocations.contains(schemaLocation)) {
+ m_processedSchemaLocations.insert(schemaLocation);
+
+ if (m_processedNamespaces.contains(QString())) {
+ error(QtXmlPatterns::tr("xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute"));
+ return false;
+ }
+
+ QUrl url(schemaLocation);
+ if (url.isRelative()) {
+ Q_ASSERT(m_documentUri.isValid());
+
+ url = m_documentUri.resolved(url);
+ }
+
+ loadSchema(QString(), url);
+ }
+ }
+
+ m_processedNamespaces.insert(m_namePool->stringForNamespace(name().namespaceURI()));
+
+ if (!m_schema) {
+ error(QtXmlPatterns::tr("no schema defined for validation"));
+ return false;
+ }
+
+ // check if we are 'inside' a type definition
+ if (m_stateMachines.isEmpty()) {
+ // find out the type of the top-level element
+ XsdElement::Ptr element = elementByName(name());
+ if (!element) {
+ if (!hasAttribute(m_xsiTypeName)) {
+ error(QtXmlPatterns::tr("no definition for element %1 available").arg(formatKeyword(m_namePool, name())));
+ return false;
+ }
+
+ // This instance document has an element with no definition in the schema
+ // but an explicitly given type, that is fine according to the spec.
+ // We will create an element definition manually here and continue the
+ // normal validation process
+ element = XsdElement::Ptr(new XsdElement());
+ element->setName(name());
+ element->setIsAbstract(false);
+ element->setIsNillable(hasAttribute(m_xsiNilName));
+
+ const QString type = qNameAttribute(m_xsiTypeName);
+ const QXmlName typeName = convertToQName(type);
+
+ const SchemaType::Ptr elementType = typeByName(typeName);
+ if (!elementType) {
+ error(QtXmlPatterns::tr("specified type %1 is not known to the schema").arg(formatType(m_namePool, typeName)));
+ return false;
+ }
+ element->setType(elementType);
+ }
+
+ // rememeber the element we process
+ processedElement = element;
+
+ if (!validateElement(element, hasStateMachine)) {
+ return false;
+ }
+
+ } else {
+ if (!m_stateMachines.top().proceed<QXmlName>(name())) {
+ error(QtXmlPatterns::tr("element %1 is not defined in this scope").arg(formatKeyword(m_namePool, name())));
+ return false;
+ }
+
+ const XsdTerm::Ptr term = m_stateMachines.top().lastTransition();
+ if (term->isElement()) {
+ const XsdElement::Ptr element(term);
+
+ // rememeber the element we process
+ processedElement = element;
+
+ if (!validateElement(element, hasStateMachine))
+ return false;
+
+ } else {
+ const XsdWildcard::Ptr wildcard(term);
+ if (wildcard->processContents() != XsdWildcard::Skip) {
+ XsdElement::Ptr elementDeclaration = elementByName(name());
+ if (!elementDeclaration) {
+ if (hasAttribute(m_xsiTypeName)) {
+ // This instance document has an element with no definition in the schema
+ // but an explicitly given type, that is fine according to the spec.
+ // We will create an element definition manually here and continue the
+ // normal validation process
+ elementDeclaration = XsdElement::Ptr(new XsdElement());
+ elementDeclaration->setName(name());
+ elementDeclaration->setIsAbstract(false);
+ elementDeclaration->setIsNillable(hasAttribute(m_xsiNilName));
+
+ const QString type = qNameAttribute(m_xsiTypeName);
+ const QXmlName typeName = convertToQName(type);
+
+ const SchemaType::Ptr elementType = typeByName(typeName);
+ if (!elementType) {
+ error(QtXmlPatterns::tr("specified type %1 is not known to the schema").arg(formatType(m_namePool, typeName)));
+ return false;
+ }
+ elementDeclaration->setType(elementType);
+ }
+ }
+
+ if (!elementDeclaration) {
+ if (wildcard->processContents() == XsdWildcard::Strict) {
+ error(QtXmlPatterns::tr("declaration for element %1 does not exist").arg(formatKeyword(m_namePool->displayName(name()))));
+ return false;
+ } else {
+ // in this case we put a state machine for the xs:anyType on the statemachine stack,
+ // so we accept every content of this element
+
+ createAndPushStateMachine(anyType()->contentType()->particle());
+ hasStateMachine = true;
+ }
+ } else {
+ if (!validateElement(elementDeclaration, hasStateMachine)) {
+ if (wildcard->processContents() == XsdWildcard::Strict) {
+ error(QtXmlPatterns::tr("element %1 contains invalid content").arg(formatKeyword(m_namePool->displayName(name()))));
+ return false;
+ }
+ }
+
+ // rememeber the type of that element node
+ m_model->setAssignedType(item().toNodeModelIndex(), elementDeclaration->type());
+ }
+ } else { // wildcard process contents type is Skip
+ // in this case we put a state machine for the xs:anyType on the statemachine stack,
+ // so we accept every content of this element
+
+ const XsdWildcard::Ptr wildcard(new XsdWildcard());
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ wildcard->setProcessContents(XsdWildcard::Skip);
+
+ const XsdParticle::Ptr outerParticle(new XsdParticle());
+ outerParticle->setMinimumOccurs(1);
+ outerParticle->setMaximumOccurs(1);
+
+ const XsdParticle::Ptr innerParticle(new XsdParticle());
+ innerParticle->setMinimumOccurs(0);
+ innerParticle->setMaximumOccursUnbounded(true);
+ innerParticle->setTerm(wildcard);
+
+ const XsdModelGroup::Ptr outerModelGroup(new XsdModelGroup());
+ outerModelGroup->setCompositor(XsdModelGroup::SequenceCompositor);
+ outerModelGroup->setParticles(XsdParticle::List() << innerParticle);
+ outerParticle->setTerm(outerModelGroup);
+
+ createAndPushStateMachine(outerParticle);
+ hasStateMachine = true;
+ }
+ }
+ }
+
+ return true;
+}
+
+void XsdValidatingInstanceReader::createAndPushStateMachine(const XsdParticle::Ptr &particle)
+{
+ XsdStateMachine<XsdTerm::Ptr> stateMachine(m_namePool);
+
+ XsdStateMachineBuilder builder(&stateMachine, m_namePool, XsdStateMachineBuilder::ValidatingMode);
+ const XsdStateMachine<XsdTerm::Ptr>::StateId endState = builder.reset();
+ const XsdStateMachine<XsdTerm::Ptr>::StateId startState = builder.buildParticle(particle, endState);
+ builder.addStartState(startState);
+
+/*
+ QString fileName = QString("/tmp/foo_%1.dot").arg(m_namePool->displayName(complexType->name(m_namePool)));
+ QString pngFileName = QString("/tmp/foo_%1.png").arg(m_namePool->displayName(complexType->name(m_namePool)));
+ QFile file(fileName);
+ file.open(QIODevice::WriteOnly);
+ stateMachine.outputGraph(&file, "Hello");
+ file.close();
+ ::system(QString("dot -Tpng %1 -o%2").arg(fileName).arg(pngFileName).toLatin1().data());
+*/
+
+ stateMachine = stateMachine.toDFA();
+
+ m_stateMachines.push(stateMachine);
+}
+
+bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declaration, bool &hasStateMachine)
+{
+ // http://www.w3.org/TR/xmlschema11-1/#d0e10998
+
+ bool isNilled = false;
+
+ // 1 tested already, 'declaration' corresponds D
+
+ // 2
+ if (declaration->isAbstract()) {
+ error(QtXmlPatterns::tr("element %1 is declared as abstract").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+
+ // 3
+ if (!declaration->isNillable()) {
+ if (hasAttribute(m_xsiNilName)) {
+ error(QtXmlPatterns::tr("element %1 is not nillable").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false; // 3.1
+ }
+ } else {
+ if (hasAttribute(m_xsiNilName)) {
+ const QString value = attribute(m_xsiNilName);
+ const Boolean::Ptr nil = Boolean::fromLexical(value);
+ if (nil->hasError()) {
+ error(QtXmlPatterns::tr("attribute %1 contains invalid data: %1").arg(formatKeyword(QLatin1String("nil"))).arg(formatData(value)));
+ return false;
+ }
+
+ // 3.2.3
+ if (nil->as<Boolean>()->value() == true) {
+ // 3.2.3.1
+ if (hasChildElement() || hasChildText()) {
+ error(QtXmlPatterns::tr("element contains content although it is nillable"));
+ return false;
+ }
+
+ // 3.2.3.2
+ if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) {
+ error(QtXmlPatterns::tr("fixed value constrained not allowed if element is nillable"));
+ return false;
+ }
+ }
+
+ isNilled = nil->as<Boolean>()->value();
+ }
+ }
+
+ SchemaType::Ptr finalElementType = declaration->type();
+
+ // 4
+ if (hasAttribute(m_xsiTypeName)) {
+ const QString type = qNameAttribute(m_xsiTypeName);
+ const QXmlName typeName = convertToQName(type);
+
+ const SchemaType::Ptr elementType = typeByName(typeName);
+ // 4.1
+ if (!elementType) {
+ error(QtXmlPatterns::tr("specified type %1 is not known to the schema").arg(formatType(m_namePool, typeName)));
+ return false;
+ }
+
+ // 4.2
+ SchemaType::DerivationConstraints constraints = 0;
+ if (declaration->disallowedSubstitutions() & NamedSchemaComponent::ExtensionConstraint)
+ constraints |= SchemaType::ExtensionConstraint;
+ if (declaration->disallowedSubstitutions() & NamedSchemaComponent::RestrictionConstraint)
+ constraints |= SchemaType::RestrictionConstraint;
+
+ if (!XsdSchemaHelper::isValidlySubstitutable(elementType, declaration->type(), constraints)) {
+ if (declaration->type()->name(m_namePool) != BuiltinTypes::xsAnyType->name(m_namePool)) { // xs:anyType is a valid substitutable type here
+ error(QtXmlPatterns::tr("specified type %1 is not validly substitutable with element type %2").arg(formatType(m_namePool, elementType)).arg(formatType(m_namePool, declaration->type())));
+ return false;
+ }
+ }
+
+ finalElementType = elementType;
+ }
+
+ if (!validateElementType(declaration, finalElementType, isNilled, hasStateMachine))
+ return false;
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validateElementType(const XsdElement::Ptr &declaration, const SchemaType::Ptr &type, bool isNilled, bool &hasStateMachine)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e11749
+
+ // 1 checked already
+
+ // 2
+ if (type->isComplexType() && type->isDefinedBySchema()) {
+ if (XsdComplexType::Ptr(type)->isAbstract()) {
+ error(QtXmlPatterns::tr("complex type %1 is not allowed to be abstract").arg(formatType(m_namePool, type)));
+ return false;
+ }
+ }
+
+ // 3
+ if (type->isSimpleType())
+ return validateElementSimpleType(declaration, type, isNilled); // 3.1
+ else
+ return validateElementComplexType(declaration, type, isNilled, hasStateMachine); // 3.2
+}
+
+bool XsdValidatingInstanceReader::validateElementSimpleType(const XsdElement::Ptr &declaration, const SchemaType::Ptr &type, bool isNilled)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e11749
+
+ // 3.1.1
+ const QSet<QXmlName> allowedAttributes(QSet<QXmlName>() << m_xsiNilName << m_xsiTypeName << m_xsiSchemaLocationName << m_xsiNoNamespaceSchemaLocationName);
+ QSet<QXmlName> elementAttributes = attributeNames();
+ elementAttributes.subtract(allowedAttributes);
+ if (!elementAttributes.isEmpty()) {
+ error(QtXmlPatterns::tr("element %1 contains not allowed attributes").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+
+ // 3.1.2
+ if (hasChildElement()) {
+ error(QtXmlPatterns::tr("element %1 contains not allowed child element").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+
+ // 3.1.3
+ if (!isNilled) {
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(type, m_context);
+
+ QString actualValue;
+ if (hasChildText()) {
+ actualValue = XsdTypeChecker::normalizedValue(text(), facets);
+ } else {
+ if (declaration->valueConstraint())
+ actualValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets);
+ }
+
+ QString errorMsg;
+ AnySimpleType::Ptr boundType;
+
+ const XsdTypeChecker checker(m_context, namespaceBindings(item().toNodeModelIndex()), sourceLocation());
+ if (!checker.isValidString(actualValue, type, errorMsg, &boundType)) {
+ error(QtXmlPatterns::tr("content of element %1 does not match its type definition: %2").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg));
+ return false;
+ }
+
+ // additional check
+ if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) {
+ const QString actualConstraintValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets);
+ if (!text().isEmpty() && !checker.valuesAreEqual(actualValue, actualConstraintValue, type)) {
+ error(QtXmlPatterns::tr("content of element %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+ }
+
+ // 4 checked in validateElement already
+
+ // rememeber the type of that element node
+ m_model->setAssignedType(item().toNodeModelIndex(), type);
+
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(type, m_context);
+ const QString actualValue = XsdTypeChecker::normalizedValue(text(), facets);
+
+ if (BuiltinTypes::xsID->wxsTypeMatches(type)) {
+ addIdIdRefBinding(actualValue, declaration);
+ }
+
+ if (m_idRefsType->wxsTypeMatches(type)) {
+ const QStringList idRefs = actualValue.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < idRefs.count(); ++i) {
+ m_idRefs.insert(idRefs.at(i));
+ }
+ } else if (BuiltinTypes::xsIDREF->wxsTypeMatches(type)) {
+ m_idRefs.insert(actualValue);
+ }
+
+ return true;
+}
+
+static bool hasIDAttributeUse(const XsdAttributeUse::List &uses)
+{
+ const int count = uses.count();
+ for (int i = 0; i < count; ++i) {
+ if (BuiltinTypes::xsID->wxsTypeMatches(uses.at(i)->attribute()->type()))
+ return true;
+ }
+
+ return false;
+}
+
+bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::Ptr &declaration, const SchemaType::Ptr &type, bool isNilled, bool &hasStateMachine)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-complex-type
+
+ // 1
+ if (!isNilled) {
+ XsdComplexType::Ptr complexType;
+
+ if (type->isDefinedBySchema()) {
+ complexType = XsdComplexType::Ptr(type);
+ } else {
+ if (type->name(m_namePool) == BuiltinTypes::xsAnyType->name(m_namePool))
+ complexType = anyType();
+ }
+
+ if (complexType) {
+ // 1.1
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Empty) {
+ if (hasChildText() || hasChildElement()) {
+ error(QtXmlPatterns::tr("element %1 contains not allowed child content").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+
+ // 1.2
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) {
+ if (hasChildElement()) {
+ error(QtXmlPatterns::tr("element %1 contains not allowed child element").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(complexType->contentType()->simpleType(), m_context);
+ QString actualValue;
+ if (hasChildText()) {
+ actualValue = XsdTypeChecker::normalizedValue(text(), facets);
+ } else {
+ if (declaration->valueConstraint())
+ actualValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets);
+ }
+
+ QString errorMsg;
+ AnySimpleType::Ptr boundType;
+ const XsdTypeChecker checker(m_context, namespaceBindings(item().toNodeModelIndex()), sourceLocation());
+ if (!checker.isValidString(actualValue, complexType->contentType()->simpleType(), errorMsg, &boundType)) {
+ error(QtXmlPatterns::tr("content of element %1 does not match its type definition: %2").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg));
+ return false;
+ }
+
+ // additional check
+ if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) {
+ if (!checker.valuesAreEqual(actualValue, declaration->valueConstraint()->value(), boundType)) {
+ error(QtXmlPatterns::tr("content of element %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+ }
+
+ // 1.3
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly) {
+ if (!text().simplified().isEmpty()) {
+ error(QtXmlPatterns::tr("element %1 contains not allowed text content").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+
+ // 1.4
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly ||
+ complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed) {
+
+ if (complexType->contentType()->particle()) {
+ createAndPushStateMachine(complexType->contentType()->particle());
+ hasStateMachine = true;
+ }
+
+ // additional check
+ if (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed) {
+ if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) {
+ if (hasChildElement()) {
+ error(QtXmlPatterns::tr("element %1 can not contain other elements, as it has a fixed content").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(complexType->contentType()->simpleType(), m_context);
+ QString actualValue;
+ if (hasChildText()) {
+ actualValue = XsdTypeChecker::normalizedValue(text(), facets);
+ } else {
+ if (declaration->valueConstraint())
+ actualValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets);
+ }
+
+ if (actualValue != declaration->valueConstraint()->value()) {
+ error(QtXmlPatterns::tr("content of element %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (type->isDefinedBySchema()) {
+ const XsdComplexType::Ptr complexType(type);
+
+ // create a lookup hash for faster access
+ QHash<QXmlName, XsdAttributeUse::Ptr> attributeUseHash;
+ {
+ const XsdAttributeUse::List attributeUses = complexType->attributeUses();
+ for (int i = 0; i < attributeUses.count(); ++i)
+ attributeUseHash.insert(attributeUses.at(i)->attribute()->name(m_namePool), attributeUses.at(i));
+ }
+
+ const QSet<QXmlName> attributes(attributeNames());
+
+ // 3
+ QHashIterator<QXmlName, XsdAttributeUse::Ptr> usesIt(attributeUseHash);
+ while (usesIt.hasNext()) {
+ usesIt.next();
+
+ if (usesIt.value()->isRequired()) {
+ if (!attributes.contains(usesIt.key())) {
+ error(QtXmlPatterns::tr("element %1 is missing required attribute %2").arg(formatKeyword(declaration->displayName(m_namePool)))
+ .arg(formatKeyword(m_namePool->displayName(usesIt.key()))));
+ return false;
+ }
+ }
+ }
+
+ bool hasIDAttribute = hasIDAttributeUse(complexType->attributeUses());
+
+ // 2
+ QSetIterator<QXmlName> it(attributes);
+ while (it.hasNext()) {
+ const QXmlName attributeName = it.next();
+
+ // skip builtin attributes
+ if (attributeName == m_xsiNilName ||
+ attributeName == m_xsiTypeName ||
+ attributeName == m_xsiSchemaLocationName ||
+ attributeName == m_xsiNoNamespaceSchemaLocationName)
+ continue;
+
+ // 2.1
+ if (attributeUseHash.contains(attributeName) && (attributeUseHash.value(attributeName)->useType() != XsdAttributeUse::ProhibitedUse)) {
+ if (!validateAttribute(attributeUseHash.value(attributeName), attribute(attributeName)))
+ return false;
+ } else { // 2.2
+ if (complexType->attributeWildcard()) {
+ const XsdWildcard::Ptr wildcard(complexType->attributeWildcard());
+ if (!validateAttributeWildcard(attributeName, wildcard)) {
+ error(QtXmlPatterns::tr("attribute %1 does not match the attribute wildcard").arg(formatKeyword(m_namePool->displayName(attributeName))));
+ return false;
+ }
+
+ if (wildcard->processContents() != XsdWildcard::Skip) {
+ const XsdAttribute::Ptr attributeDeclaration = attributeByName(attributeName);
+
+ if (!attributeDeclaration) {
+ if (wildcard->processContents() == XsdWildcard::Strict) {
+ error(QtXmlPatterns::tr("declaration for attribute %1 does not exist").arg(formatKeyword(m_namePool->displayName(attributeName))));
+ return false;
+ }
+ } else {
+ if (BuiltinTypes::xsID->wxsTypeMatches(attributeDeclaration->type())) {
+ if (hasIDAttribute) {
+ error(QtXmlPatterns::tr("element %1 contains two attributes of type %2")
+ .arg(formatKeyword(declaration->displayName(m_namePool)))
+ .arg(formatKeyword("ID")));
+ return false;
+ }
+
+ hasIDAttribute = true;
+ }
+
+ if (!validateAttribute(attributeDeclaration, attribute(attributeName))) {
+ if (wildcard->processContents() == XsdWildcard::Strict) {
+ error(QtXmlPatterns::tr("attribute %1 contains invalid content").arg(formatKeyword(m_namePool->displayName(attributeName))));
+ return false;
+ }
+ }
+ }
+ }
+ } else {
+ error(QtXmlPatterns::tr("element %1 contains unknown attribute %2").arg(formatKeyword(declaration->displayName(m_namePool)))
+ .arg(formatKeyword(m_namePool->displayName(attributeName))));
+ return false;
+ }
+ }
+ }
+ }
+
+ // 4
+ // so what?...
+
+ // 5
+ // hmm...
+
+ // 6
+ // TODO: check assertions
+
+ // 7
+ // TODO: check type table restrictions
+
+ // rememeber the type of that element node
+ m_model->setAssignedType(item().toNodeModelIndex(), type);
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validateAttribute(const XsdAttributeUse::Ptr &declaration, const QString &value)
+{
+ const AnySimpleType::Ptr attributeType = declaration->attribute()->type();
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(attributeType, m_context);
+
+ const QString actualValue = XsdTypeChecker::normalizedValue(value, facets);
+
+ QString errorMsg;
+ AnySimpleType::Ptr boundType;
+
+ const QXmlNodeModelIndex index = attributeItem(declaration->attribute()->name(m_namePool)).toNodeModelIndex();
+
+ const XsdTypeChecker checker(m_context, namespaceBindings(index), sourceLocation());
+ if (!checker.isValidString(actualValue, attributeType, errorMsg, &boundType)) {
+ error(QtXmlPatterns::tr("content of attribute %1 does not match its type definition: %2").arg(formatKeyword(declaration->attribute()->displayName(m_namePool))).arg(errorMsg));
+ return false;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-au
+ if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Fixed) {
+ const QString actualConstraintValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets);
+ if (!checker.valuesAreEqual(actualValue, actualConstraintValue, attributeType)) {
+ error(QtXmlPatterns::tr("content of attribute %1 does not match defined value constraint").arg(formatKeyword(declaration->attribute()->displayName(m_namePool))));
+ return false;
+ }
+ }
+
+ if (BuiltinTypes::xsID->wxsTypeMatches(declaration->attribute()->type())) {
+ addIdIdRefBinding(actualValue, declaration->attribute());
+ }
+
+ if (m_idRefsType->wxsTypeMatches(declaration->attribute()->type())) {
+ const QStringList idRefs = actualValue.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < idRefs.count(); ++i)
+ m_idRefs.insert(idRefs.at(i));
+ } else if (BuiltinTypes::xsIDREF->wxsTypeMatches(declaration->attribute()->type())) {
+ m_idRefs.insert(actualValue);
+ }
+
+ m_model->setAssignedType(index, declaration->attribute()->type());
+ m_model->setAssignedAttribute(index, declaration->attribute());
+
+ return true;
+}
+
+//TODO: merge that with the method above
+bool XsdValidatingInstanceReader::validateAttribute(const XsdAttribute::Ptr &declaration, const QString &value)
+{
+ const AnySimpleType::Ptr attributeType = declaration->type();
+ const XsdFacet::Hash facets = XsdTypeChecker::mergedFacetsForType(attributeType, m_context);
+
+ const QString actualValue = XsdTypeChecker::normalizedValue(value, facets);
+
+ QString errorMsg;
+ AnySimpleType::Ptr boundType;
+
+ const QXmlNodeModelIndex index = attributeItem(declaration->name(m_namePool)).toNodeModelIndex();
+
+ const XsdTypeChecker checker(m_context, namespaceBindings(index), sourceLocation());
+ if (!checker.isValidString(actualValue, attributeType, errorMsg, &boundType)) {
+ error(QtXmlPatterns::tr("content of attribute %1 does not match its type definition: %2").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg));
+ return false;
+ }
+
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-au
+ if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdAttribute::ValueConstraint::Fixed) {
+ const QString actualConstraintValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets);
+ if (!checker.valuesAreEqual(actualValue, actualConstraintValue, attributeType)) {
+ error(QtXmlPatterns::tr("content of attribute %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+
+ if (BuiltinTypes::xsID->wxsTypeMatches(declaration->type())) {
+ addIdIdRefBinding(actualValue, declaration);
+ }
+
+ if (m_idRefsType->wxsTypeMatches(declaration->type())) {
+ const QStringList idRefs = actualValue.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < idRefs.count(); ++i)
+ m_idRefs.insert(idRefs.at(i));
+ } else if (BuiltinTypes::xsIDREF->wxsTypeMatches(declaration->type())) {
+ m_idRefs.insert(actualValue);
+ }
+
+ m_model->setAssignedType(index, declaration->type());
+ m_model->setAssignedAttribute(index, declaration);
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validateAttributeWildcard(const QXmlName &attributeName, const XsdWildcard::Ptr &wildcard)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#cvc-wildcard
+
+ // wildcards using XsdWildcard::absentNamespace, so we have to fix that here
+ QXmlName name(attributeName);
+ if (name.namespaceURI() == StandardNamespaces::empty) {
+ name.setNamespaceURI(m_namePool->allocateNamespace(XsdWildcard::absentNamespace()));
+ }
+
+ return XsdSchemaHelper::wildcardAllowsExpandedName(name, wildcard, m_namePool);
+}
+
+bool XsdValidatingInstanceReader::validateIdentityConstraint(const XsdElement::Ptr &element, const QXmlItem &currentItem)
+{
+ const XsdIdentityConstraint::List constraints = element->identityConstraints();
+
+ for (int i = 0; i < constraints.count(); ++i) {
+ const XsdIdentityConstraint::Ptr constraint = constraints.at(i);
+
+ TargetNode::Set targetNodeSet, qualifiedNodeSet;
+ selectNodeSets(element, currentItem, constraint, targetNodeSet, qualifiedNodeSet);
+
+ if (constraint->category() == XsdIdentityConstraint::Unique) {
+ if (!validateUniqueIdentityConstraint(element, constraint, qualifiedNodeSet))
+ return false;
+ } else if (constraint->category() == XsdIdentityConstraint::Key) {
+ if (!validateKeyIdentityConstraint(element, constraint, targetNodeSet, qualifiedNodeSet))
+ return false;
+ }
+ }
+
+ // we do the keyref check in a separated run to make sure that all keys are available
+ for (int i = 0; i < constraints.count(); ++i) {
+ const XsdIdentityConstraint::Ptr constraint = constraints.at(i);
+ if (constraint->category() == XsdIdentityConstraint::KeyReference) {
+ TargetNode::Set targetNodeSet, qualifiedNodeSet;
+ selectNodeSets(element, currentItem, constraint, targetNodeSet, qualifiedNodeSet);
+
+ if (!validateKeyRefIdentityConstraint(element, constraint, qualifiedNodeSet))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validateUniqueIdentityConstraint(const XsdElement::Ptr&, const XsdIdentityConstraint::Ptr &constraint, const TargetNode::Set &qualifiedNodeSet)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e32243
+
+ // 4.1
+ const XsdSchemaSourceLocationReflection reflection(sourceLocation());
+
+ QSetIterator<TargetNode> it(qualifiedNodeSet);
+ while (it.hasNext()) {
+ const TargetNode node = it.next();
+ QSetIterator<TargetNode> innerIt(qualifiedNodeSet);
+ while (innerIt.hasNext()) {
+ const TargetNode innerNode = innerIt.next();
+
+ if (node == innerNode) // do not compare with ourself
+ continue;
+
+ if (node.fieldsAreEqual(innerNode, m_namePool, m_context, &reflection)) {
+ error(QtXmlPatterns::tr("non-unique value found for constraint %1").arg(formatKeyword(constraint->displayName(m_namePool))));
+ return false;
+ }
+ }
+ }
+
+ m_idcKeys.insert(constraint->name(m_namePool), qualifiedNodeSet);
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validateKeyIdentityConstraint(const XsdElement::Ptr &element, const XsdIdentityConstraint::Ptr &constraint, const TargetNode::Set &targetNodeSet, const TargetNode::Set &qualifiedNodeSet)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e32243
+
+ // 4.2
+ const XsdSchemaSourceLocationReflection reflection(sourceLocation());
+
+ // 4.2.1
+ if (targetNodeSet.count() != qualifiedNodeSet.count()) {
+ error(QtXmlPatterns::tr("key constraint %1 contains absent fields").arg(formatKeyword(constraint->displayName(m_namePool))));
+ return false;
+ }
+
+ // 4.2.2
+ if (!validateUniqueIdentityConstraint(element, constraint, qualifiedNodeSet))
+ return false;
+
+ // 4.2.3
+ QSetIterator<TargetNode> it(qualifiedNodeSet);
+ while (it.hasNext()) {
+ const TargetNode node = it.next();
+ const QVector<QXmlItem> fieldItems = node.fieldItems();
+ for (int i = 0; i < fieldItems.count(); ++i) {
+ const QXmlNodeModelIndex index = fieldItems.at(i).toNodeModelIndex();
+ if (m_model->kind(index) == QXmlNodeModelIndex::Element) {
+ const XsdElement::Ptr declaration = m_model->assignedElement(index);
+ if (declaration && declaration->isNillable()) {
+ error(QtXmlPatterns::tr("key constraint %1 contains references nillable element %2")
+ .arg(formatKeyword(constraint->displayName(m_namePool)))
+ .arg(formatKeyword(declaration->displayName(m_namePool))));
+ return false;
+ }
+ }
+ }
+ }
+
+ m_idcKeys.insert(constraint->name(m_namePool), qualifiedNodeSet);
+
+ return true;
+}
+
+bool XsdValidatingInstanceReader::validateKeyRefIdentityConstraint(const XsdElement::Ptr&, const XsdIdentityConstraint::Ptr &constraint, const TargetNode::Set &qualifiedNodeSet)
+{
+ // @see http://www.w3.org/TR/xmlschema11-1/#d0e32243
+
+ // 4.3
+ const XsdSchemaSourceLocationReflection reflection(sourceLocation());
+
+ const TargetNode::Set keySet = m_idcKeys.value(constraint->referencedKey()->name(m_namePool));
+
+ QSetIterator<TargetNode> it(qualifiedNodeSet);
+ while (it.hasNext()) {
+ const TargetNode node = it.next();
+
+ bool foundMatching = false;
+
+ QSetIterator<TargetNode> keyIt(keySet);
+ while (keyIt.hasNext()) {
+ const TargetNode keyNode = keyIt.next();
+
+ if (node.fieldsAreEqual(keyNode, m_namePool, m_context, &reflection)) {
+ foundMatching = true;
+ break;
+ }
+ }
+
+ if (!foundMatching) {
+ error(QtXmlPatterns::tr("no referenced value found for key reference %1").arg(formatKeyword(constraint->displayName(m_namePool))));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+QXmlQuery XsdValidatingInstanceReader::createXQuery(const QList<QXmlName> &namespaceBindings, const QXmlItem &contextNode, const QString &queryString) const
+{
+ // create a public name pool from our name pool
+ QXmlNamePool namePool(m_namePool.data());
+
+ // the QXmlQuery shall work with the same name pool as we do
+ QXmlQuery query(namePool);
+
+ // add additional namespace bindings
+ QXmlQueryPrivate *queryPrivate = query.d;
+
+ for (int i = 0; i < namespaceBindings.count(); ++i) {
+ if (!namespaceBindings.at(i).prefix() == StandardPrefixes::empty)
+ queryPrivate->addAdditionalNamespaceBinding(namespaceBindings.at(i));
+ }
+
+ // set the context node for that query and the query string
+ query.setFocus(contextNode);
+ query.setQuery(queryString, m_documentUri);
+
+ return query;
+}
+
+bool XsdValidatingInstanceReader::selectNodeSets(const XsdElement::Ptr&, const QXmlItem &currentItem, const XsdIdentityConstraint::Ptr &constraint, TargetNode::Set &targetNodeSet, TargetNode::Set &qualifiedNodeSet)
+{
+ // at first select all target nodes
+ const XsdXPathExpression::Ptr selector = constraint->selector();
+ const XsdXPathExpression::List fields = constraint->fields();
+
+ QXmlQuery query = createXQuery(selector->namespaceBindings(), currentItem, selector->expression());
+
+ QXmlResultItems resultItems;
+ query.evaluateTo(&resultItems);
+
+ // now we iterate over all target nodes and select the fields for each node
+ QXmlItem item(resultItems.next());
+ while (!item.isNull()) {
+
+ TargetNode targetNode(item);
+
+ for (int i = 0; i < fields.count(); ++i) {
+ const XsdXPathExpression::Ptr field = fields.at(i);
+ QXmlQuery fieldQuery = createXQuery(field->namespaceBindings(), item, field->expression());
+
+ QXmlResultItems fieldResultItems;
+ fieldQuery.evaluateTo(&fieldResultItems);
+
+ // copy result into vetor for better testing...
+ QVector<QXmlItem> fieldVector;
+ QXmlItem fieldItem(fieldResultItems.next());
+ while (!fieldItem.isNull()) {
+ fieldVector.append(fieldItem);
+ fieldItem = fieldResultItems.next();
+ }
+
+ if (fieldVector.count() > 1) {
+ error(QtXmlPatterns::tr("more than one value found for field %1").arg(formatData(field->expression())));
+ return false;
+ }
+
+ if (fieldVector.count() == 1) {
+ fieldItem = fieldVector.first();
+
+ const QXmlNodeModelIndex index = fieldItem.toNodeModelIndex();
+ const SchemaType::Ptr type = m_model->assignedType(index);
+
+ bool typeOk = true;
+ if (type->isComplexType()) {
+ if (type->isDefinedBySchema()) {
+ if (XsdComplexType::Ptr(type)->contentType()->variety() != XsdComplexType::ContentType::Simple)
+ typeOk = false;
+ } else {
+ typeOk = false;
+ }
+ }
+ if (!typeOk) {
+ error(QtXmlPatterns::tr("field %1 has no simple type").arg(formatData(field->expression())));
+ return false;
+ }
+
+ SchemaType::Ptr targetType = type;
+ QString value = m_model->stringValue(fieldItem.toNodeModelIndex());
+
+ if (type->isDefinedBySchema()) {
+ if (type->isSimpleType())
+ targetType = XsdSimpleType::Ptr(type)->primitiveType();
+ else
+ targetType = XsdComplexType::Ptr(type)->contentType()->simpleType();
+ } else {
+ if (BuiltinTypes::xsAnySimpleType->name(m_namePool) == type->name(m_namePool)) {
+ targetType = BuiltinTypes::xsString;
+ value = QLatin1String("___anySimpleType_value");
+ }
+ }
+
+ // if it is xs:QName derived type, we normalize the name content
+ // and do a string comparison
+ if (BuiltinTypes::xsQName->wxsTypeMatches(type)) {
+ targetType = BuiltinTypes::xsString;
+
+ const QXmlName qName = convertToQName(value.trimmed());
+ value = QString::fromLatin1("%1:%2").arg(m_namePool->stringForNamespace(qName.namespaceURI())).arg(m_namePool->stringForLocalName(qName.localName()));
+ }
+
+ targetNode.addField(fieldItem, value, targetType);
+ } else {
+ // we add an empty entry here, that makes comparison easier later on
+ targetNode.addField(QXmlItem(), QString(), SchemaType::Ptr());
+ }
+ }
+
+ targetNodeSet.insert(targetNode);
+
+ item = resultItems.next();
+ }
+
+ // copy all items from target node set to qualified node set, that have no empty fields
+ QSetIterator<TargetNode> it(targetNodeSet);
+ while (it.hasNext()) {
+ const TargetNode node = it.next();
+ if (node.emptyFieldsCount() == 0)
+ qualifiedNodeSet.insert(node);
+ }
+
+ return true;
+}
+
+XsdElement::Ptr XsdValidatingInstanceReader::elementByName(const QXmlName &name) const
+{
+ return m_schema->element(name);
+}
+
+XsdAttribute::Ptr XsdValidatingInstanceReader::attributeByName(const QXmlName &name) const
+{
+ return m_schema->attribute(name);
+}
+
+SchemaType::Ptr XsdValidatingInstanceReader::typeByName(const QXmlName &name) const
+{
+ const SchemaType::Ptr type = m_schema->type(name);
+ if (type)
+ return type;
+
+ return m_context->schemaTypeFactory()->createSchemaType(name);
+}
+
+void XsdValidatingInstanceReader::addIdIdRefBinding(const QString &id, const NamedSchemaComponent::Ptr &binding)
+{
+ if (!m_model->idIdRefBindings(id).isEmpty()) {
+ error(QtXmlPatterns::tr("ID value '%1' is not unique").arg(formatKeyword(id)));
+ return;
+ }
+
+ m_model->addIdIdRefBinding(id, binding);
+}
+
+QString XsdValidatingInstanceReader::qNameAttribute(const QXmlName &attributeName)
+{
+ const QString value = attribute(attributeName).simplified();
+ if (!XPathHelper::isQName(value)) {
+ error(QtXmlPatterns::tr("'%1' attribute contains invalid QName content: %2").arg(m_namePool->displayName(attributeName)).arg(formatData(value)));
+ return QString();
+ } else {
+ return value;
+ }
+}
+
+XsdComplexType::Ptr XsdValidatingInstanceReader::anyType()
+{
+ if (m_anyType)
+ return m_anyType;
+
+ const XsdWildcard::Ptr wildcard(new XsdWildcard());
+ wildcard->namespaceConstraint()->setVariety(XsdWildcard::NamespaceConstraint::Any);
+ wildcard->setProcessContents(XsdWildcard::Lax);
+
+ const XsdParticle::Ptr outerParticle(new XsdParticle());
+ outerParticle->setMinimumOccurs(1);
+ outerParticle->setMaximumOccurs(1);
+
+ const XsdParticle::Ptr innerParticle(new XsdParticle());
+ innerParticle->setMinimumOccurs(0);
+ innerParticle->setMaximumOccursUnbounded(true);
+ innerParticle->setTerm(wildcard);
+
+ const XsdModelGroup::Ptr outerModelGroup(new XsdModelGroup());
+ outerModelGroup->setCompositor(XsdModelGroup::SequenceCompositor);
+ outerModelGroup->setParticles(XsdParticle::List() << innerParticle);
+ outerParticle->setTerm(outerModelGroup);
+
+ m_anyType = XsdComplexType::Ptr(new XsdComplexType());
+ m_anyType->setName(BuiltinTypes::xsAnyType->name(m_namePool));
+ m_anyType->setDerivationMethod(XsdComplexType::DerivationRestriction);
+ m_anyType->contentType()->setVariety(XsdComplexType::ContentType::Mixed);
+ m_anyType->contentType()->setParticle(outerParticle);
+ m_anyType->setAttributeWildcard(wildcard);
+ m_anyType->setIsAbstract(false);
+
+ return m_anyType;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h b/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h
new file mode 100644
index 0000000..8ea4d28
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h
@@ -0,0 +1,296 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdValidatingInstanceReader_H
+#define Patternist_XsdValidatingInstanceReader_H
+
+#include "qxsdidchelper_p.h"
+#include "qxsdinstancereader_p.h"
+#include "qxsdstatemachine_p.h"
+#include "qxsdvalidatedxmlnodemodel_p.h"
+
+#include <QtCore/QStack>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QXmlQuery;
+
+namespace QPatternist
+{
+ /**
+ * @short The validating schema instance reader.
+ *
+ * This class reads in a xml instance document from a QAbstractXmlNodeModel and
+ * validates it against a given xml schema.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdValidatingInstanceReader : public XsdInstanceReader
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdValidatingInstanceReader> Ptr;
+
+ /**
+ * Creates a new validating instance reader that reads the data from
+ * the given @p model.
+ *
+ * @param model The model the data shall be read from.
+ * @param documentUri The uri of the document the model is from.
+ * @param context The context that is used to report errors etc.
+ */
+ XsdValidatingInstanceReader(XsdValidatedXmlNodeModel *model, const QUrl &documentUri, const XsdSchemaContext::Ptr &context);
+
+ /**
+ * Adds a new @p schema to the pool of schemas that shall be used
+ * for validation.
+ * The schema is located at the given @p url.
+ */
+ void addSchema(const XsdSchema::Ptr &schema, const QUrl &url);
+
+ /**
+ * Reads and validates the instance document.
+ */
+ bool read();
+
+ private:
+ /**
+ * Loads a schema with the given @p targetNamespace from the given @p location
+ * and adds it to the pool of schemas that are used for validation.
+ *
+ * This method is used to load schemas defined in the xsi:schemaLocation or
+ * xsi:noNamespaceSchemaLocation attributes in the instance document.
+ */
+ bool loadSchema(const QString &targetNamespace, const QUrl &location);
+
+ /**
+ * Reports an error via the report context.
+ */
+ void error(const QString &msg) const;
+
+ /**
+ * Validates the current element tag of the instance document.
+ *
+ * @param hasStateMachine Used to remember whether this element represents the start tag
+ * of a complex type and therefor pushes a new state machine on the stack.
+ * @param element Used to remember which element has been validated in this step.
+ */
+ bool validate(bool &hasStateMachine, XsdElement::Ptr &element);
+
+ /**
+ * Validates the current tag of the instance document against the given element @p declaration.
+ *
+ * @param declaration The element declaration to validate against.
+ * @param hasStateMachine Used to remember whether this element represents the start tag
+ * of a complex type and therefor pushes a new state machine on the stack.
+ */
+ bool validateElement(const XsdElement::Ptr &declaration, bool &hasStateMachine);
+
+ /**
+ * Validates the current tag of the instance document against the given @p type of the element @p declaration.
+ *
+ * @param declaration The element declaration to validate against.
+ * @param type The type to validate against.
+ * @param isNilled Defines whether the element is nilled by the instance document.
+ * @param hasStateMachine Used to remember whether this element represents the start tag
+ * of a complex type and therefor pushes a new state machine on the stack.
+ *
+ * @note The @p type can differ from the element @p declaration type if the instance document has defined
+ * it via xsi:type attribute.
+ */
+ bool validateElementType(const XsdElement::Ptr &declaration, const SchemaType::Ptr &type, bool isNilled, bool &hasStateMachine);
+
+ /**
+ * Validates the current tag of the instance document against the given simple @p type of the element @p declaration.
+ *
+ * @param declaration The element declaration to validate against.
+ * @param type The type to validate against.
+ * @param isNilled Defines whether the element is nilled by the instance document.
+ *
+ * @note The @p type can differ from the element @p declaration type if the instance document has defined
+ * it via xsi:type attribute.
+ */
+ bool validateElementSimpleType(const XsdElement::Ptr &declaration, const SchemaType::Ptr &type, bool isNilled);
+
+ /**
+ * Validates the current tag of the instance document against the given complex @p type of the element @p declaration.
+ *
+ * @param declaration The element declaration to validate against.
+ * @param type The type to validate against.
+ * @param isNilled Defines whether the element is nilled by the instance document.
+ * @param hasStateMachine Used to remember whether this element represents the start tag
+ * of a complex type and therefor pushes a new state machine on the stack.
+ *
+ * @note The @p type can differ from the element @p declaration type if the instance document has defined
+ * it via xsi:type attribute.
+ */
+ bool validateElementComplexType(const XsdElement::Ptr &declaration, const SchemaType::Ptr &type, bool isNilled, bool &hasStateMachine);
+
+ /**
+ * Validates the given @p value against the attribute use @p declaration.
+ */
+ bool validateAttribute(const XsdAttributeUse::Ptr &declaration, const QString &value);
+
+ /**
+ * Validates the given @p value against the attribute @p declaration.
+ */
+ bool validateAttribute(const XsdAttribute::Ptr &declaration, const QString &value);
+
+ /**
+ * Validates the given @p attributeName against the @p wildcard.
+ */
+ bool validateAttributeWildcard(const QXmlName &attributeName, const XsdWildcard::Ptr &wildcard);
+
+ /**
+ * Validates the identity constraints of an @p element.
+ */
+ bool validateIdentityConstraint(const XsdElement::Ptr &element, const QXmlItem &currentItem);
+
+ /**
+ * Validates the <em>unique</em> identity @p constraint of the @p element.
+ */
+ bool validateUniqueIdentityConstraint(const XsdElement::Ptr &element, const XsdIdentityConstraint::Ptr &constraint, const TargetNode::Set &qualifiedNodeSet);
+
+ /**
+ * Validates the <em>key</em> identity @p constraint of the @p element.
+ */
+ bool validateKeyIdentityConstraint(const XsdElement::Ptr &element, const XsdIdentityConstraint::Ptr &constraint, const TargetNode::Set &targetNodeSet, const TargetNode::Set &qualifiedNodeSet);
+
+ /**
+ * Validates the <em>keyref</em> identity @p constraint of the @p element.
+ */
+ bool validateKeyRefIdentityConstraint(const XsdElement::Ptr &element, const XsdIdentityConstraint::Ptr &constraint, const TargetNode::Set &qualifiedNodeSet);
+
+ /**
+ * Selects two sets of nodes that match the given identity @p constraint.
+ *
+ * @param element The element the identity constraint belongs to.
+ * @param currentItem The current element that will be used as focus for the XQuery.
+ * @param constraint The constraint (selector and fields) that describe the two sets.
+ * @param targetNodeSet The target node set as defined by the schema specification.
+ * @param qualifiedNodeSet The qualified node set as defined by the schema specification.
+ */
+ bool selectNodeSets(const XsdElement::Ptr &element, const QXmlItem &currentItem, const XsdIdentityConstraint::Ptr &constraint, TargetNode::Set &targetNodeSet, TargetNode::Set &qualifiedNodeSet);
+
+ /**
+ * Creates an QXmlQuery object with the defined @p namespaceBindings that has the @p contextNode as focus
+ * and will execute @p query.
+ */
+ QXmlQuery createXQuery(const QList<QXmlName> &namespaceBindings, const QXmlItem &contextNode, const QString &query) const;
+
+ /**
+ * Returns the element declaration with the given @p name from the pool of all schemas.
+ */
+ XsdElement::Ptr elementByName(const QXmlName &name) const;
+
+ /**
+ * Returns the attribute declaration with the given @p name from the pool of all schemas.
+ */
+ XsdAttribute::Ptr attributeByName(const QXmlName &name) const;
+
+ /**
+ * Returns the type declaration with the given @p name from the pool of all schemas.
+ */
+ SchemaType::Ptr typeByName(const QXmlName &name) const;
+
+ /**
+ * Adds the ID/IDREF binding to the validated model and checks for duplicates.
+ */
+ void addIdIdRefBinding(const QString &id, const NamedSchemaComponent::Ptr &binding);
+
+ /**
+ * Helper method that reads an attribute of type xs:QName and does
+ * syntax checking.
+ */
+ QString qNameAttribute(const QXmlName &attributeName);
+
+ /**
+ * Returns the xs:anyType that is used to build up the state machine.
+ * We need that as the BuiltinTypes::xsAnyType is not a XsdComplexType.
+ */
+ XsdComplexType::Ptr anyType();
+
+ /**
+ * Helper method that creates a state machine for the given @p particle
+ * and pushes it on the state machine stack.
+ */
+ void createAndPushStateMachine(const XsdParticle::Ptr &particle);
+
+ typedef QHash<QUrl, QStringList> MergedSchemas;
+ typedef QHashIterator<QUrl, QStringList> MergedSchemasIterator;
+
+ XsdValidatedXmlNodeModel::Ptr m_model;
+ MergedSchemas m_mergedSchemas;
+ XsdSchema::Ptr m_schema;
+ const NamePool::Ptr m_namePool;
+ const QXmlName m_xsiNilName;
+ const QXmlName m_xsiTypeName;
+ const QXmlName m_xsiSchemaLocationName;
+ const QXmlName m_xsiNoNamespaceSchemaLocationName;
+
+ QStack<XsdStateMachine<XsdTerm::Ptr> > m_stateMachines;
+ QUrl m_documentUri;
+ XsdComplexType::Ptr m_anyType;
+ QSet<QString> m_processedNamespaces;
+ QSet<QString> m_processedSchemaLocations;
+ QSet<QString> m_idRefs;
+ QHash<QXmlName, TargetNode::Set> m_idcKeys;
+ SchemaType::Ptr m_idRefsType;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdwildcard.cpp b/src/xmlpatterns/schema/qxsdwildcard.cpp
new file mode 100644
index 0000000..561a169
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdwildcard.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdwildcard_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+QString XsdWildcard::absentNamespace()
+{
+ return QLatin1String("__ns_absent");
+}
+
+void XsdWildcard::NamespaceConstraint::setVariety(Variety variety)
+{
+ m_variety = variety;
+}
+
+XsdWildcard::NamespaceConstraint::Variety XsdWildcard::NamespaceConstraint::variety() const
+{
+ return m_variety;
+}
+
+void XsdWildcard::NamespaceConstraint::setNamespaces(const QSet<QString> &namespaces)
+{
+ m_namespaces = namespaces;
+}
+
+QSet<QString> XsdWildcard::NamespaceConstraint::namespaces() const
+{
+ return m_namespaces;
+}
+
+void XsdWildcard::NamespaceConstraint::setDisallowedNames(const QSet<QString> &names)
+{
+ m_disallowedNames = names;
+}
+
+QSet<QString> XsdWildcard::NamespaceConstraint::disallowedNames() const
+{
+ return m_disallowedNames;
+}
+
+XsdWildcard::XsdWildcard()
+ : m_namespaceConstraint(new NamespaceConstraint())
+ , m_processContents(Strict)
+{
+ m_namespaceConstraint->setVariety(NamespaceConstraint::Any);
+}
+
+bool XsdWildcard::isWildcard() const
+{
+ return true;
+}
+
+void XsdWildcard::setNamespaceConstraint(const NamespaceConstraint::Ptr &namespaceConstraint)
+{
+ m_namespaceConstraint = namespaceConstraint;
+}
+
+XsdWildcard::NamespaceConstraint::Ptr XsdWildcard::namespaceConstraint() const
+{
+ return m_namespaceConstraint;
+}
+
+void XsdWildcard::setProcessContents(ProcessContents contents)
+{
+ m_processContents = contents;
+}
+
+XsdWildcard::ProcessContents XsdWildcard::processContents() const
+{
+ return m_processContents;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdwildcard_p.h b/src/xmlpatterns/schema/qxsdwildcard_p.h
new file mode 100644
index 0000000..a925ab4
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdwildcard_p.h
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdWildcard_H
+#define Patternist_XsdWildcard_H
+
+#include "qxsdterm_p.h"
+
+#include <QtCore/QSet>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD wildcard object.
+ *
+ * This class represents the <em>wildcard</em> object of a XML schema as described
+ * <a href="http://www.w3.org/TR/xmlschema11-1/#Wildcards">here</a>.
+ *
+ * It contains information from either an <em>any</em> object or an <em>anyAttribute</em> object.
+ *
+ * @see <a href="http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSWildcard">XML Schema API reference</a>
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class XsdWildcard : public XsdTerm
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdWildcard> Ptr;
+
+ /**
+ * Defines the absent namespace that is used in wildcards.
+ */
+ static QString absentNamespace();
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#w-namespace_constraint">namespace constraint</a> of the wildcard.
+ */
+ class NamespaceConstraint : public QSharedData
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<NamespaceConstraint> Ptr;
+
+ /**
+ * Describes the variety of the namespace constraint.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#nc-variety">Variety Definition</a>
+ */
+ enum Variety
+ {
+ Any, ///< Any namespace is allowed.
+ Enumeration, ///< Namespaces in the namespaces set are allowed.
+ Not ///< Namespaces in the namespaces set are not allowed.
+ };
+
+ /**
+ * Sets the @p variety of the namespace constraint.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#nc-variety">Variety Definition</a>
+ */
+ void setVariety(Variety variety);
+
+ /**
+ * Returns the variety of the namespace constraint.
+ */
+ Variety variety() const;
+
+ /**
+ * Sets the set of @p namespaces of the namespace constraint.
+ */
+ void setNamespaces(const QSet<QString> &namespaces);
+
+ /**
+ * Returns the set of namespaces of the namespace constraint.
+ */
+ QSet<QString> namespaces() const;
+
+ /**
+ * Sets the set of disallowed @p names of the namespace constraint.
+ */
+ void setDisallowedNames(const QSet<QString> &names);
+
+ /**
+ * Returns the set of disallowed names of the namespace constraint.
+ */
+ QSet<QString> disallowedNames() const;
+
+ private:
+ Variety m_variety;
+ QSet<QString> m_namespaces;
+ QSet<QString> m_disallowedNames;
+ };
+
+ /**
+ * Describes the <a href="http://www.w3.org/TR/xmlschema11-1/#w-process_contents">type of content processing</a> of the wildcard.
+ */
+ enum ProcessContents
+ {
+ Strict, ///< There must be a top-level declaration for the item available, or the item must have an xsi:type, and the item must be valid as appropriate.
+ Lax, ///< If the item has a uniquely determined declaration available, it must be valid with respect to that definition.
+ Skip ///< No constraints at all: the item must simply be well-formed XML.
+ };
+
+ /**
+ * Creates a new wildcard object.
+ */
+ XsdWildcard();
+
+ /**
+ * Returns always @c true, used to avoid dynamic casts.
+ */
+ virtual bool isWildcard() const;
+
+ /**
+ * Sets the namespace @p constraint of the wildcard.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#w-namespace_constraint">Namespace Constraint Definition</a>
+ */
+ void setNamespaceConstraint(const NamespaceConstraint::Ptr &constraint);
+
+ /**
+ * Returns the namespace constraint of the wildcard.
+ */
+ NamespaceConstraint::Ptr namespaceConstraint() const;
+
+ /**
+ * Sets the process @p contents of the wildcard.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#w-process_contents">Process Contents Definition</a>
+ */
+ void setProcessContents(ProcessContents contents);
+
+ /**
+ * Returns the process contents of the wildcard.
+ */
+ ProcessContents processContents() const;
+
+ private:
+ NamespaceConstraint::Ptr m_namespaceConstraint;
+ ProcessContents m_processContents;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/qxsdxpathexpression.cpp b/src/xmlpatterns/schema/qxsdxpathexpression.cpp
new file mode 100644
index 0000000..aa08cbc
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdxpathexpression.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qxsdxpathexpression_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+void XsdXPathExpression::setNamespaceBindings(const QList<QXmlName> &set)
+{
+ m_namespaceBindings = set;
+}
+
+QList<QXmlName> XsdXPathExpression::namespaceBindings() const
+{
+ return m_namespaceBindings;
+}
+
+void XsdXPathExpression::setDefaultNamespace(const AnyURI::Ptr &defaultNs)
+{
+ m_defaultNamespace = defaultNs;
+}
+
+AnyURI::Ptr XsdXPathExpression::defaultNamespace() const
+{
+ return m_defaultNamespace;
+}
+
+void XsdXPathExpression::setBaseURI(const AnyURI::Ptr &uri)
+{
+ m_baseURI = uri;
+}
+
+AnyURI::Ptr XsdXPathExpression::baseURI() const
+{
+ return m_baseURI;
+}
+
+void XsdXPathExpression::setExpression(const QString &expression)
+{
+ m_expression = expression;
+}
+
+QString XsdXPathExpression::expression() const
+{
+ return m_expression;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/schema/qxsdxpathexpression_p.h b/src/xmlpatterns/schema/qxsdxpathexpression_p.h
new file mode 100644
index 0000000..6f149d7
--- /dev/null
+++ b/src/xmlpatterns/schema/qxsdxpathexpression_p.h
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_XsdXPathExpression_H
+#define Patternist_XsdXPathExpression_H
+
+#include "qanyuri_p.h"
+#include "qnamedschemacomponent_p.h"
+#include "qxsdannotated_p.h"
+
+#include <QtCore/QList>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Represents a XSD assertion object.
+ *
+ * @ingroup Patternist_schema
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#x">XPathExpression Definition</a>
+ */
+ class XsdXPathExpression : public NamedSchemaComponent, public XsdAnnotated
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<XsdXPathExpression> Ptr;
+ typedef QList<XsdXPathExpression::Ptr> List;
+
+ /**
+ * Sets the list of namespace @p bindings of the XPath expression.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#x-namespace_bindings">Namespace Bindings Definition</a>
+ *
+ * @note We can't use a QSet<QXmlName> here, as the hash method does not take the prefix
+ * in account, so we loose entries.
+ */
+ void setNamespaceBindings(const QList<QXmlName> &bindings);
+
+ /**
+ * Returns the list of namespace bindings of the XPath expression.
+ */
+ QList<QXmlName> namespaceBindings() const;
+
+ /**
+ * Sets the default namespace of the XPath expression.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#x-default_namespace">Default Namespace Definition</a>
+ */
+ void setDefaultNamespace(const AnyURI::Ptr &defaultNamespace);
+
+ /**
+ * Returns the default namespace of the XPath expression.
+ */
+ AnyURI::Ptr defaultNamespace() const;
+
+ /**
+ * Sets the base @p uri of the XPath expression.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#x-base_URI">Base URI Definition</a>
+ */
+ void setBaseURI(const AnyURI::Ptr &uri);
+
+ /**
+ * Returns the base uri of the XPath expression.
+ */
+ AnyURI::Ptr baseURI() const;
+
+ /**
+ * Sets the @p expression string of the XPath expression.
+ *
+ * @see <a href="http://www.w3.org/TR/xmlschema11-1/#x-expression">Expression Definition</a>
+ */
+ void setExpression(const QString &expression);
+
+ /**
+ * Returns the expression string of the XPath expression.
+ */
+ QString expression() const;
+
+ private:
+ QList<QXmlName> m_namespaceBindings;
+ AnyURI::Ptr m_defaultNamespace;
+ AnyURI::Ptr m_baseURI;
+ QString m_expression;
+ };
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/schema/schema.pri b/src/xmlpatterns/schema/schema.pri
new file mode 100644
index 0000000..b00d64b
--- /dev/null
+++ b/src/xmlpatterns/schema/schema.pri
@@ -0,0 +1,93 @@
+HEADERS += $$PWD/qnamespacesupport_p.h \
+ $$PWD/qxsdalternative_p.h \
+ $$PWD/qxsdannotated_p.h \
+ $$PWD/qxsdannotation_p.h \
+ $$PWD/qxsdapplicationinformation_p.h \
+ $$PWD/qxsdassertion_p.h \
+ $$PWD/qxsdattribute_p.h \
+ $$PWD/qxsdattributereference_p.h \
+ $$PWD/qxsdattributeterm_p.h \
+ $$PWD/qxsdattributeuse_p.h \
+ $$PWD/qxsdattributegroup_p.h \
+ $$PWD/qxsdcomplextype_p.h \
+ $$PWD/qxsddocumentation_p.h \
+ $$PWD/qxsdelement_p.h \
+ $$PWD/qxsdfacet_p.h \
+ $$PWD/qxsdidcache_p.h \
+ $$PWD/qxsdidchelper_p.h \
+ $$PWD/qxsdidentityconstraint_p.h \
+ $$PWD/qxsdinstancereader_p.h \
+ $$PWD/qxsdmodelgroup_p.h \
+ $$PWD/qxsdnotation_p.h \
+ $$PWD/qxsdparticle_p.h \
+ $$PWD/qxsdparticlechecker_p.h \
+ $$PWD/qxsdreference_p.h \
+ $$PWD/qxsdsimpletype_p.h \
+ $$PWD/qxsdschema_p.h \
+ $$PWD/qxsdschemachecker_p.h \
+ $$PWD/qxsdschemacontext_p.h \
+ $$PWD/qxsdschemadebugger_p.h \
+ $$PWD/qxsdschemahelper_p.h \
+ $$PWD/qxsdschemamerger_p.h \
+ $$PWD/qxsdschemaparser_p.h \
+ $$PWD/qxsdschemaparsercontext_p.h \
+ $$PWD/qxsdschemaresolver_p.h \
+ $$PWD/qxsdschematoken_p.h \
+ $$PWD/qxsdschematypesfactory_p.h \
+ $$PWD/qxsdstatemachine_p.h \
+ $$PWD/qxsdstatemachinebuilder_p.h \
+ $$PWD/qxsdterm_p.h \
+ $$PWD/qxsdtypechecker_p.h \
+ $$PWD/qxsduserschematype_p.h \
+ $$PWD/qxsdvalidatedxmlnodemodel_p.h \
+ $$PWD/qxsdvalidatinginstancereader_p.h \
+ $$PWD/qxsdwildcard_p.h \
+ $$PWD/qxsdxpathexpression_p.h
+
+SOURCES += $$PWD/qnamespacesupport.cpp \
+ $$PWD/qxsdalternative.cpp \
+ $$PWD/qxsdannotated.cpp \
+ $$PWD/qxsdannotation.cpp \
+ $$PWD/qxsdapplicationinformation.cpp \
+ $$PWD/qxsdassertion.cpp \
+ $$PWD/qxsdattribute.cpp \
+ $$PWD/qxsdattributereference.cpp \
+ $$PWD/qxsdattributeterm.cpp \
+ $$PWD/qxsdattributeuse.cpp \
+ $$PWD/qxsdattributegroup.cpp \
+ $$PWD/qxsdcomplextype.cpp \
+ $$PWD/qxsddocumentation.cpp \
+ $$PWD/qxsdelement.cpp \
+ $$PWD/qxsdfacet.cpp \
+ $$PWD/qxsdidcache.cpp \
+ $$PWD/qxsdidchelper.cpp \
+ $$PWD/qxsdidentityconstraint.cpp \
+ $$PWD/qxsdinstancereader.cpp \
+ $$PWD/qxsdmodelgroup.cpp \
+ $$PWD/qxsdnotation.cpp \
+ $$PWD/qxsdparticle.cpp \
+ $$PWD/qxsdparticlechecker.cpp \
+ $$PWD/qxsdreference.cpp \
+ $$PWD/qxsdsimpletype.cpp \
+ $$PWD/qxsdschema.cpp \
+ $$PWD/qxsdschemachecker.cpp \
+ $$PWD/qxsdschemachecker_setup.cpp \
+ $$PWD/qxsdschemacontext.cpp \
+ $$PWD/qxsdschemadebugger.cpp \
+ $$PWD/qxsdschemahelper.cpp \
+ $$PWD/qxsdschemamerger.cpp \
+ $$PWD/qxsdschemaparser.cpp \
+ $$PWD/qxsdschemaparser_setup.cpp \
+ $$PWD/qxsdschemaparsercontext.cpp \
+ $$PWD/qxsdschemaresolver.cpp \
+ $$PWD/qxsdschematoken.cpp \
+ $$PWD/qxsdschematypesfactory.cpp \
+ $$PWD/qxsdstatemachinebuilder.cpp \
+ $$PWD/qxsdterm.cpp \
+ $$PWD/qxsdtypechecker.cpp \
+ $$PWD/qxsdwildcard.cpp \
+ $$PWD/qxsdvalidatedxmlnodemodel.cpp \
+ $$PWD/qxsdvalidatinginstancereader.cpp \
+ $$PWD/qxsdxpathexpression.cpp
+
+RESOURCES += $$PWD/builtinschemas.qrc
diff --git a/src/xmlpatterns/schema/schemas/xml.xsd b/src/xmlpatterns/schema/schemas/xml.xsd
new file mode 100644
index 0000000..eeb9db5
--- /dev/null
+++ b/src/xmlpatterns/schema/schemas/xml.xsd
@@ -0,0 +1,145 @@
+<?xml version='1.0'?>
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ id (as an attribute name): denotes an attribute whose value
+ should be interpreted as if declared to be of type ID.
+ This name is reserved by virtue of its definition in the
+ xml:id specification.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
+ attributes on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ &lt;schema . . .>
+ . . .
+ &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ &lt;type . . .>
+ . . .
+ &lt;attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2007/08/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself, or with the XML namespace itself. In other words, if the XML
+ Schema or XML namespaces change, the version of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2007/08/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+ <xs:annotation>
+ <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values is probably never
+ going to be a realistic possibility. See
+ RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
+ at http://www.iana.org/assignments/lang-tag-apps.htm for
+ further information.
+
+ The union allows for the 'un-declaration' of xml:lang with
+ the empty string.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:language">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value=""/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="id" type="xs:ID">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xml-id/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ <xs:attribute ref="xml:id"/>
+ </xs:attributeGroup>
+
+</xs:schema>
diff --git a/src/xmlpatterns/schema/schemas/xml.xsd-LICENSE b/src/xmlpatterns/schema/schemas/xml.xsd-LICENSE
new file mode 100644
index 0000000..2c687d8
--- /dev/null
+++ b/src/xmlpatterns/schema/schemas/xml.xsd-LICENSE
@@ -0,0 +1,40 @@
+W3C® SOFTWARE NOTICE AND LICENSE
+
+This license came from: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+This work (and included software, documentation such as READMEs, or other
+related items) is being provided by the copyright holders under the following
+license. By obtaining, using and/or copying this work, you (the licensee)
+agree that you have read, understood, and will comply with the following
+terms and conditions.
+
+Permission to copy, modify, and distribute this software and its
+documentation, with or without modification, for any purpose and without
+fee or royalty is hereby granted, provided that you include the following on
+ALL copies of the software and documentation or portions thereof, including
+modifications:
+
+ 1. The full text of this NOTICE in a location viewable to users of the
+ redistributed or derivative work.
+ 2. Any pre-existing intellectual property disclaimers, notices, or terms
+ and conditions. If none exist, the W3C Software Short Notice should be
+ included (hypertext is preferred, text is permitted)
+ within the body of any redistributed or derivative code.
+ 3. Notice of any changes or modifications to the files, including the date
+ changes were made. (We recommend you provide URIs to the location from
+ which the code is derived.)
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
+MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
+PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
+ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in
+advertising or publicity pertaining to the software without specific, written
+prior permission. Title to copyright in this software and any associated
+documentation will at all times remain with copyright holders.
diff --git a/src/xmlpatterns/schema/tokens.xml b/src/xmlpatterns/schema/tokens.xml
new file mode 100644
index 0000000..5420695
--- /dev/null
+++ b/src/xmlpatterns/schema/tokens.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tokenAutomaton scope="public"
+ className="XsdSchemaToken"
+ headerFile="qxsdschematoken_p.h"
+ sourceFile="qxsdschematoken.cpp"
+ defaultToken="NoKeyword"
+ tokenEnum="NodeName"
+ hasToString="true"
+ includeGuardName="QPatternist_XsdSchemaToken_h">
+ <tokens>
+ <token>abstract</token>
+ <token>all</token>
+ <token>alternative</token>
+ <token>annotation</token>
+ <token>any</token>
+ <token>anyAttribute</token>
+ <token>appinfo</token>
+ <token>appliesToEmpty</token>
+ <token>assert</token>
+ <token>assertion</token>
+ <token>attribute</token>
+ <token>attributeFormDefault</token>
+ <token>attributeGroup</token>
+ <token>base</token>
+ <token>block</token>
+ <token>blockDefault</token>
+ <token>choice</token>
+ <token>collapse</token>
+ <token>complexContent</token>
+ <token>complexType</token>
+ <token>default</token>
+ <token>defaultAttributes</token>
+ <token>defaultAttributesApply</token>
+ <token>defaultOpenContent</token>
+ <token>documentation</token>
+ <token>element</token>
+ <token>elementFormDefault</token>
+ <token>enumeration</token>
+ <token>extension</token>
+ <token>field</token>
+ <token>final</token>
+ <token>finalDefault</token>
+ <token>fixed</token>
+ <token>form</token>
+ <token>fractionDigits</token>
+ <token>group</token>
+ <token>id</token>
+ <token>import</token>
+ <token>include</token>
+ <token>itemType</token>
+ <token>key</token>
+ <token>keyref</token>
+ <token>length</token>
+ <token>list</token>
+ <token>maxExclusive</token>
+ <token>maxInclusive</token>
+ <token>maxLength</token>
+ <token>maxOccurs</token>
+ <token>memberTypes</token>
+ <token>minExclusive</token>
+ <token>minInclusive</token>
+ <token>minLength</token>
+ <token>minOccurs</token>
+ <token>mixed</token>
+ <token>mode</token>
+ <token>name</token>
+ <token>namespace</token>
+ <token>nillable</token>
+ <token>notation</token>
+ <token>notNamespace</token>
+ <token>notQName</token>
+ <token>openContent</token>
+ <token>override</token>
+ <token>preserve</token>
+ <token>pattern</token>
+ <token>processContents</token>
+ <token>public</token>
+ <token>redefine</token>
+ <token>ref</token>
+ <token>refer</token>
+ <token>replace</token>
+ <token>restriction</token>
+ <token>schema</token>
+ <token>schemaLocation</token>
+ <token>selector</token>
+ <token>sequence</token>
+ <token>simpleContent</token>
+ <token>simpleType</token>
+ <token>source</token>
+ <token>substitutionGroup</token>
+ <token>system</token>
+ <token>targetNamespace</token>
+ <token>test</token>
+ <token>totalDigits</token>
+ <token>type</token>
+ <token>union</token>
+ <token>unique</token>
+ <token>use</token>
+ <token>value</token>
+ <token>version</token>
+ <token>whiteSpace</token>
+ <token>xpath</token>
+ <token name="XPathDefaultNamespace">xpathDefaultNamespace</token>
+ <token name="XmlLanguage">xml:lang</token>
+ <token name="XML_NS_SCHEMA_URI">http://www.w3.org/2001/XMLSchema</token>
+ </tokens>
+
+ <boilerplate>
+
+ <prolog>/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+</prolog>
+
+ </boilerplate>
+
+</tokenAutomaton>
diff --git a/src/xmlpatterns/type/qanysimpletype.cpp b/src/xmlpatterns/type/qanysimpletype.cpp
index 9e5c876..659f4499 100644
--- a/src/xmlpatterns/type/qanysimpletype.cpp
+++ b/src/xmlpatterns/type/qanysimpletype.cpp
@@ -80,4 +80,14 @@ SchemaType::DerivationMethod AnySimpleType::derivationMethod() const
return DerivationRestriction;
}
+bool AnySimpleType::isSimpleType() const
+{
+ return true;
+}
+
+bool AnySimpleType::isComplexType() const
+{
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/type/qanysimpletype_p.h b/src/xmlpatterns/type/qanysimpletype_p.h
index 8009c3b..a633052 100644
--- a/src/xmlpatterns/type/qanysimpletype_p.h
+++ b/src/xmlpatterns/type/qanysimpletype_p.h
@@ -73,6 +73,8 @@ namespace QPatternist
class AnySimpleType : public AnyType
{
public:
+ typedef QExplicitlySharedDataPointer<AnySimpleType> Ptr;
+ typedef QList<AnySimpleType::Ptr> List;
friend class BuiltinTypes;
virtual ~AnySimpleType();
@@ -105,6 +107,16 @@ namespace QPatternist
*/
virtual SchemaType::DerivationMethod derivationMethod() const;
+ /**
+ * Always returns @c true.
+ */
+ virtual bool isSimpleType() const;
+
+ /**
+ * Always returns @c false.
+ */
+ virtual bool isComplexType() const;
+
protected:
AnySimpleType();
diff --git a/src/xmlpatterns/type/qanytype.cpp b/src/xmlpatterns/type/qanytype.cpp
index 3d8714e..cabe56f 100644
--- a/src/xmlpatterns/type/qanytype.cpp
+++ b/src/xmlpatterns/type/qanytype.cpp
@@ -69,7 +69,7 @@ QXmlName AnyType::name(const NamePool::Ptr &np) const
return np->allocateQName(StandardNamespaces::xs, QLatin1String("anyType"));
}
-QString AnyType::displayName(const NamePool::Ptr &) const
+QString AnyType::displayName(const NamePool::Ptr &np) const
{
/* A bit faster than calling name()->displayName() */
return QLatin1String("xs:anyType");
@@ -85,9 +85,19 @@ SchemaType::TypeCategory AnyType::category() const
return None;
}
+bool AnyType::isComplexType() const
+{
+ return true;
+}
+
SchemaType::DerivationMethod AnyType::derivationMethod() const
{
return NoDerivation;
}
+SchemaType::DerivationConstraints AnyType::derivationConstraints() const
+{
+ return SchemaType::DerivationConstraints();
+}
+
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/type/qanytype_p.h b/src/xmlpatterns/type/qanytype_p.h
index ae5cac8..7bc5554 100644
--- a/src/xmlpatterns/type/qanytype_p.h
+++ b/src/xmlpatterns/type/qanytype_p.h
@@ -114,6 +114,16 @@ namespace QPatternist
*/
virtual DerivationMethod derivationMethod() const;
+ /**
+ * @returns an empty set of derivation constraint flags.
+ */
+ virtual DerivationConstraints derivationConstraints() const;
+
+ /**
+ * Always returns @c true.
+ */
+ virtual bool isComplexType() const;
+
protected:
/**
* @short This constructor is protected, because this
diff --git a/src/xmlpatterns/type/qnamedschemacomponent.cpp b/src/xmlpatterns/type/qnamedschemacomponent.cpp
new file mode 100644
index 0000000..c7bdc30
--- /dev/null
+++ b/src/xmlpatterns/type/qnamedschemacomponent.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnamedschemacomponent_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+NamedSchemaComponent::NamedSchemaComponent()
+{
+}
+
+NamedSchemaComponent::~NamedSchemaComponent()
+{
+}
+
+void NamedSchemaComponent::setName(const QXmlName &name)
+{
+ m_name = name;
+}
+
+QXmlName NamedSchemaComponent::name(const NamePool::Ptr&) const
+{
+ return m_name;
+}
+
+QString NamedSchemaComponent::displayName(const NamePool::Ptr &np) const
+{
+ return np->displayName(m_name);
+}
+
+QT_END_NAMESPACE
diff --git a/src/xmlpatterns/type/qnamedschemacomponent_p.h b/src/xmlpatterns/type/qnamedschemacomponent_p.h
new file mode 100644
index 0000000..ab8a916
--- /dev/null
+++ b/src/xmlpatterns/type/qnamedschemacomponent_p.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtXmlPatterns of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef Patternist_NamedSchemaComponent_H
+#define Patternist_NamedSchemaComponent_H
+
+#include "qnamepool_p.h"
+#include "qschemacomponent_p.h"
+#include "qxmlname.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+namespace QPatternist
+{
+ /**
+ * @short Base class for all named components that can appear in a W3C XML Schema.
+ *
+ * @ingroup Patternist_types
+ * @author Tobias Koenig <tobias.koenig@trolltech.com>
+ */
+ class NamedSchemaComponent : public SchemaComponent
+ {
+ public:
+ typedef QExplicitlySharedDataPointer<NamedSchemaComponent> Ptr;
+
+ /**
+ * Describes the blocking constraints that are given by the 'block' attributes.
+ */
+ enum BlockingConstraint
+ {
+ RestrictionConstraint = 1,
+ ExtensionConstraint = 2,
+ SubstitutionConstraint = 4
+ };
+ Q_DECLARE_FLAGS(BlockingConstraints, BlockingConstraint)
+
+ /**
+ * Creates a new named schema component.
+ */
+ NamedSchemaComponent();
+
+ /**
+ * Destroys the named schema component.
+ */
+ virtual ~NamedSchemaComponent();
+
+ /**
+ * Sets the @p name of the schema component.
+ */
+ void setName(const QXmlName &name);
+
+ /**
+ * Returns the name of the schema component.
+ *
+ * @param namePool The name pool the name belongs to.
+ */
+ virtual QXmlName name(const NamePool::Ptr &namePool) const;
+
+ /**
+ * Returns the display name of the schema component.
+ *
+ * @param namePool The name pool the name belongs to.
+ */
+ virtual QString displayName(const NamePool::Ptr &namePool) const;
+
+ private:
+ QXmlName m_name;
+ };
+
+ Q_DECLARE_OPERATORS_FOR_FLAGS(NamedSchemaComponent::BlockingConstraints)
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/xmlpatterns/type/qprimitives_p.h b/src/xmlpatterns/type/qprimitives_p.h
index 818cb22..78bd4ae 100644
--- a/src/xmlpatterns/type/qprimitives_p.h
+++ b/src/xmlpatterns/type/qprimitives_p.h
@@ -53,6 +53,8 @@
#define Patternist_Primitives_H
#include <QtGlobal>
+#include <QtCore/QHash>
+#include <QtCore/QUrl>
/**
* @file
@@ -72,6 +74,17 @@ QT_BEGIN_NAMESPACE
class QString;
/**
+ * @internal
+ *
+ * A method to allow a QHash or QSet with QUrl
+ * as key type.
+ */
+inline uint qHash(const QUrl &uri)
+{
+ return qHash(uri.toString());
+}
+
+/**
* @short The namespace for the internal API of QtXmlPatterns
* @internal
*/
diff --git a/src/xmlpatterns/type/qschematype.cpp b/src/xmlpatterns/type/qschematype.cpp
index e7b8738..51ac41d 100644
--- a/src/xmlpatterns/type/qschematype.cpp
+++ b/src/xmlpatterns/type/qschematype.cpp
@@ -72,4 +72,9 @@ bool SchemaType::isComplexType() const
return category() == ComplexType;
}
+bool SchemaType::isDefinedBySchema() const
+{
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/type/qschematype_p.h b/src/xmlpatterns/type/qschematype_p.h
index 38ed9b6..eaac28a 100644
--- a/src/xmlpatterns/type/qschematype_p.h
+++ b/src/xmlpatterns/type/qschematype_p.h
@@ -57,6 +57,7 @@
#include "qxmlname.h"
template<typename N, typename M> class QHash;
+template<typename N> class QList;
QT_BEGIN_HEADER
@@ -80,6 +81,7 @@ namespace QPatternist
typedef QExplicitlySharedDataPointer<SchemaType> Ptr;
typedef QHash<QXmlName, SchemaType::Ptr> Hash;
+ typedef QList<SchemaType::Ptr> List;
/**
* Schema types are divided into different categories such as
@@ -117,6 +119,18 @@ namespace QPatternist
NoDerivation = 16
};
+ /**
+ * Describes the derivation constraints that are given by the 'final' or 'block' attributes.
+ */
+ enum DerivationConstraint
+ {
+ RestrictionConstraint = 1,
+ ExtensionConstraint = 2,
+ ListConstraint = 4,
+ UnionConstraint = 8
+ };
+ Q_DECLARE_FLAGS(DerivationConstraints, DerivationConstraint)
+
SchemaType();
virtual ~SchemaType();
@@ -137,6 +151,11 @@ namespace QPatternist
virtual DerivationMethod derivationMethod() const = 0;
/**
+ * Determines what derivation constraints exists for the type.
+ */
+ virtual DerivationConstraints derivationConstraints() const = 0;
+
+ /**
* Determines whether the type is an abstract type.
*
* @note It is important a correct value is returned, since
@@ -202,7 +221,7 @@ namespace QPatternist
* @note Do not re-implement this function, but instead override category()
* and let it return an appropriate value.
*/
- bool isSimpleType() const;
+ virtual bool isSimpleType() const;
/**
* Determines whether the type is a complex type, by introspecting
@@ -211,8 +230,15 @@ namespace QPatternist
* @note Do not re-implement this function, but instead override category()
* and let it return an appropriate value.
*/
- bool isComplexType() const;
+ virtual bool isComplexType() const;
+
+ /**
+ * Returns whether the value has been defined by a schema (is not a built in type).
+ */
+ virtual bool isDefinedBySchema() const;
};
+
+ Q_DECLARE_OPERATORS_FOR_FLAGS(SchemaType::DerivationConstraints)
}
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/type/type.pri b/src/xmlpatterns/type/type.pri
index ef5976a..5425298 100644
--- a/src/xmlpatterns/type/type.pri
+++ b/src/xmlpatterns/type/type.pri
@@ -24,6 +24,7 @@ HEADERS += $$PWD/qabstractnodetest_p.h \
$$PWD/qitemtype_p.h \
$$PWD/qlocalnametest_p.h \
$$PWD/qmultiitemtype_p.h \
+ $$PWD/qnamedschemacomponent_p.h \
$$PWD/qnamespacenametest_p.h \
$$PWD/qnonetype_p.h \
$$PWD/qnumerictype_p.h \
@@ -57,6 +58,7 @@ SOURCES += $$PWD/qabstractnodetest.cpp \
$$PWD/qitemtype.cpp \
$$PWD/qlocalnametest.cpp \
$$PWD/qmultiitemtype.cpp \
+ $$PWD/qnamedschemacomponent.cpp \
$$PWD/qnamespacenametest.cpp \
$$PWD/qnonetype.cpp \
$$PWD/qnumerictype.cpp \
diff --git a/src/xmlpatterns/utils/qpatternistlocale_p.h b/src/xmlpatterns/utils/qpatternistlocale_p.h
index 5dcd917..dc287bd 100644
--- a/src/xmlpatterns/utils/qpatternistlocale_p.h
+++ b/src/xmlpatterns/utils/qpatternistlocale_p.h
@@ -168,6 +168,16 @@ namespace QPatternist
}
/**
+ * @short Formats name of any type.
+ */
+ static inline QString formatType(const NamePool::Ptr &np, const QXmlName &name)
+ {
+ return QLatin1String("<span class='XQuery-type'>") +
+ escape(np->displayName(name)) +
+ QLatin1String("</span>");
+ }
+
+ /**
* @short Formats Cardinality.
*/
static inline QString formatType(const Cardinality &type)
diff --git a/src/xmlpatterns/utils/qxpathhelper.cpp b/src/xmlpatterns/utils/qxpathhelper.cpp
index 377d097..69f5494 100644
--- a/src/xmlpatterns/utils/qxpathhelper.cpp
+++ b/src/xmlpatterns/utils/qxpathhelper.cpp
@@ -125,4 +125,16 @@ ItemType::Ptr XPathHelper::typeFromKind(const QXmlNodeModelIndex::NodeKind nodeK
}
}
+QUrl XPathHelper::normalizeQueryURI(const QUrl &uri)
+{
+ Q_ASSERT_X(uri.isEmpty() || uri.isValid(), Q_FUNC_INFO,
+ "The URI passed to QXmlQuery::setQuery() must be valid or empty.");
+ if(uri.isEmpty())
+ return QUrl::fromLocalFile(QCoreApplication::applicationFilePath());
+ else if(uri.isRelative())
+ return QUrl::fromLocalFile(QCoreApplication::applicationFilePath()).resolved(uri);
+ else
+ return uri;
+}
+
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/utils/qxpathhelper_p.h b/src/xmlpatterns/utils/qxpathhelper_p.h
index 8b7dc6e..4a37bb6 100644
--- a/src/xmlpatterns/utils/qxpathhelper_p.h
+++ b/src/xmlpatterns/utils/qxpathhelper_p.h
@@ -128,6 +128,11 @@ namespace QPatternist
static QPatternist::ItemTypePtr typeFromKind(const QXmlNodeModelIndex::NodeKind nodeKind);
/**
+ * Normalizes an @p uri by resolving it to the application directory if empty.
+ */
+ static QUrl normalizeQueryURI(const QUrl &uri);
+
+ /**
* @short Determines whether @p consists only of whitespace. Characters
* considered whitespace are the ones for which QChar::isSpace() returns @c true for.
*
diff --git a/src/xmlpatterns/xmlpatterns.pro b/src/xmlpatterns/xmlpatterns.pro
index e9d8af9..fb6aa1a 100644
--- a/src/xmlpatterns/xmlpatterns.pro
+++ b/src/xmlpatterns/xmlpatterns.pro
@@ -21,6 +21,8 @@ include($$PWD/iterators/iterators.pri)
include($$PWD/janitors/janitors.pri)
include($$PWD/parser/parser.pri)
include($$PWD/projection/projection.pri)
+include($$PWD/schema/schema.pri)
+include($$PWD/schematron/schematron.pri)
include($$PWD/type/type.pri)
include($$PWD/utils/utils.pri)
include($$PWD/qobjectmodel/qobjectmodel.pri)