aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cmake/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/shared_qml_module/CMakeLists.txt14
-rw-r--r--tests/auto/cmake/shared_qml_module/Scheduler/CMakeLists.txt33
-rw-r--r--tests/auto/cmake/shared_qml_module/Scheduler/MainScreen.qml5
-rw-r--r--tests/auto/cmake/shared_qml_module/Scheduler/schedulerglobal.h15
-rw-r--r--tests/auto/cmake/shared_qml_module/Scheduler/task.cpp47
-rw-r--r--tests/auto/cmake/shared_qml_module/Scheduler/task.h34
-rw-r--r--tests/auto/cmake/shared_qml_module/SchedulerApp/CMakeLists.txt44
-rw-r--r--tests/auto/cmake/shared_qml_module/SchedulerApp/Main.qml12
-rw-r--r--tests/auto/cmake/shared_qml_module/SchedulerApp/main.cpp21
-rw-r--r--tests/auto/cmake/shared_qml_module/external/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/shared_qml_module/external/nested/module/CMakeLists.txt15
-rw-r--r--tests/auto/cmake/shared_qml_module/external/nested/module/Test.qml3
-rw-r--r--tests/auto/cmake/shared_qml_module/tests/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/shared_qml_module/tests/auto/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/shared_qml_module/tests/auto/unit/CMakeLists.txt40
-rw-r--r--tests/auto/cmake/shared_qml_module/tests/auto/unit/dummy.cpp1
-rw-r--r--tests/auto/cmake/shared_qml_module/tests/auto/unit/tst_models.cpp45
-rw-r--r--tests/auto/cmake/test_generate_qmlls_ini/main.cpp12
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugprocess.cpp2
-rw-r--r--tests/auto/qml/ecmascripttests/TestExpectations3
-rw-r--r--tests/auto/qml/ecmascripttests/test262runner.cpp18
-rw-r--r--tests/auto/qml/linebylinelex/BLACKLIST5
-rw-r--r--tests/auto/qml/linebylinelex/CMakeLists.txt22
-rw-r--r--tests/auto/qml/linebylinelex/tst_linebylinelex.cpp15
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp2
-rw-r--r--tests/auto/qml/qmlcachegen/CMakeLists.txt1
-rw-r--r--tests/auto/qml/qmlcachegen/data/aotstats/AotstatsClean.qml11
-rw-r--r--tests/auto/qml/qmlcachegen/data/aotstats/AotstatsMixed.qml7
-rw-r--r--tests/auto/qml/qmlcachegen/data/aotstats/cachegentest.qrc5
-rw-r--r--tests/auto/qml/qmlcachegen/data/aotstats/qmldir3
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp133
-rw-r--r--tests/auto/qml/qmlcppcodegen/CMakeLists.txt4
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt29
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/writableVariantMap.h31
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/writeVariantMap.qml10
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp17
-rw-r--r--tests/auto/qml/qmlformat/data/enumWithValues.formatted.qml12
-rw-r--r--tests/auto/qml/qmlformat/data/enumWithValues.qml12
-rw-r--r--tests/auto/qml/qmlformat/tst_qmlformat.cpp4
-rw-r--r--tests/auto/qml/qmlimportscanner/data/CompositeSingleton.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/CompositeWithEnum.json32
-rw-r--r--tests/auto/qml/qmlimportscanner/data/CompositeWithinSingleton.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/Drawer.qml.json32
-rw-r--r--tests/auto/qml/qmlimportscanner/data/Imports.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/ListProperty.qml.json44
-rw-r--r--tests/auto/qml/qmlimportscanner/data/QTBUG-45916.js.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/Simple.qml.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/Singleton.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/Things.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/javascriptMethods.qml.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/localImport.qml.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/parentEnum.qml.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/qmldirImportAndDepend.qml.json36
-rw-r--r--tests/auto/qml/qmlimportscanner/data/qtQmlOnly.qml.json32
-rw-r--r--tests/auto/qml/qmlimportscanner/data/rootPath.json42
-rw-r--r--tests/auto/qml/qmllint/data/Qtbug111015/qmldir3
-rw-r--r--tests/auto/qml/qmllint/data/Qtbug111015/qtbug111015.qmltypes20
-rw-r--r--tests/auto/qml/qmllint/data/Things/plugins.qmltypes2
-rw-r--r--tests/auto/qml/qmllint/data/jsonArrayIsRecognized.qml8
-rw-r--r--tests/auto/qml/qmllint/data/jsonObjectIsRecognized.qml8
-rw-r--r--tests/auto/qml/qmllint/data/something.qml2
-rw-r--r--tests/auto/qml/qmllint/lintplugin.cpp2
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp21
-rw-r--r--tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp2
-rw-r--r--tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp128
-rw-r--r--tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h45
-rw-r--r--tests/auto/qml/qqmlbinding/CMakeLists.txt2
-rw-r--r--tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp16
-rw-r--r--tests/auto/qml/qqmlconnections/CMakeLists.txt1
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp2
-rw-r--r--tests/auto/qml/qqmlimport/CMakeLists.txt8
-rw-r--r--tests/auto/qml/qqmlimport/qmlimports.qt.conf3
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp18
-rw-r--r--tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired1.qml6
-rw-r--r--tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired2.qml8
-rw-r--r--tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/qmldir4
-rw-r--r--tests/auto/qml/qqmllanguage/data/asValueType.qml7
-rw-r--r--tests/auto/qml/qqmllanguage/data/asValueTypeGood.qml35
-rw-r--r--tests/auto/qml/qqmllanguage/data/invokableCtors.qml12
-rw-r--r--tests/auto/qml/qqmllanguage/data/jsonArrayProperty.qml191
-rw-r--r--tests/auto/qml/qqmllanguage/data/nestedVectors.qml27
-rw-r--r--tests/auto/qml/qqmllanguage/data/optimizedSequenceShift.qml14
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.cpp8
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h101
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp313
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp6
-rw-r--r--tests/auto/qml/qqmlparser/tst_qqmlparser.cpp72
-rw-r--r--tests/auto/qml/qqmlqt/data/qtbug_125495.qml5
-rw-r--r--tests/auto/qml/qqmlqt/tst_qqmlqt.cpp14
-rw-r--r--tests/auto/qml/qqmltimer/CMakeLists.txt1
-rw-r--r--tests/auto/qml/qqmltimer/tst_qqmltimer.cpp20
-rw-r--r--tests/auto/qml/qqmlvaluetypes/data/constructors.qml14
-rw-r--r--tests/auto/qml/qqmlvaluetypes/data/matrix4x4_invokables.qml4
-rw-r--r--tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp23
-rw-r--r--tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp12
-rw-r--r--tests/auto/qml/qv4estable/tst_qv4estable.cpp6
-rw-r--r--tests/auto/qml/qv4mm/tst_qv4mm.cpp146
-rw-r--r--tests/auto/qmldom/domdata/domitem/crashes/bracketsInBinding.qml5
-rw-r--r--tests/auto/qmldom/domdata/domitem/fileLocationRegions/comments.qml12
-rw-r--r--tests/auto/qmldom/domdata/domitem/lambdas.qml41
-rw-r--r--tests/auto/qmldom/domitem/tst_qmldomitem.h503
-rw-r--r--tests/auto/qmldom/reformatter/tst_reformatter.h7
-rw-r--r--tests/auto/qmlls/modules/data/highlighting/basic.qml11
-rw-r--r--tests/auto/qmlls/modules/data/highlighting/bigFile.qml351
-rw-r--r--tests/auto/qmlls/modules/data/renameUsages/RenameMe.qml5
-rw-r--r--tests/auto/qmlls/modules/data/renameUsages/RenameMe2.ui.qml5
-rw-r--r--tests/auto/qmlls/modules/data/renameUsages/main.qml6
-rw-r--r--tests/auto/qmlls/modules/tst_qmlls_modules.cpp276
-rw-r--r--tests/auto/qmlls/modules/tst_qmlls_modules.h7
-rw-r--r--tests/auto/qmlls/qqmlcodemodel/data/FileA.qml5
-rw-r--r--tests/auto/qmlls/qqmlcodemodel/data/FileA2.qml5
-rw-r--r--tests/auto/qmlls/qqmlcodemodel/data/FileB.qml5
-rw-r--r--tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.cpp54
-rw-r--r--tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.h2
-rw-r--r--tests/auto/qmlls/utils/CMakeLists.txt30
-rw-r--r--tests/auto/qmlls/utils/data/highlights/Identifiers.qml37
-rw-r--r--tests/auto/qmlls/utils/data/highlights/bindings.qml12
-rw-r--r--tests/auto/qmlls/utils/data/highlights/comments.qml19
-rw-r--r--tests/auto/qmlls/utils/data/highlights/enums.qml11
-rw-r--r--tests/auto/qmlls/utils/data/highlights/identifiers.qml37
-rw-r--r--tests/auto/qmlls/utils/data/highlights/imports.qml9
-rw-r--r--tests/auto/qmlls/utils/data/highlights/literals.qml14
-rw-r--r--tests/auto/qmlls/utils/data/highlights/methodAndSignal.qml11
-rw-r--r--tests/auto/qmlls/utils/data/highlights/objectAndComponent.qml11
-rw-r--r--tests/auto/qmlls/utils/data/highlights/pragmas.qml10
-rw-r--r--tests/auto/qmlls/utils/data/highlights/properties.qml13
-rw-r--r--tests/auto/qmlls/utils/data/highlights/scriptExpressions.qml116
-rw-r--r--tests/auto/qmlls/utils/data/renaming/RenameMe.qml5
-rw-r--r--tests/auto/qmlls/utils/data/renaming/RenameMe2.ui.qml5
-rw-r--r--tests/auto/qmlls/utils/data/renaming/RenamedByQmldir.qml4
-rw-r--r--tests/auto/qmlls/utils/data/renaming/UnrelatedFile.qml0
-rw-r--r--tests/auto/qmlls/utils/data/renaming/main.qml7
-rw-r--r--tests/auto/qmlls/utils/data/renaming/qmldir6
-rw-r--r--tests/auto/qmlls/utils/tst_qmlls_documentationHints.cpp134
-rw-r--r--tests/auto/qmlls/utils/tst_qmlls_documentationHints.h24
-rw-r--r--tests/auto/qmlls/utils/tst_qmlls_highlighting.cpp650
-rw-r--r--tests/auto/qmlls/utils/tst_qmlls_highlighting.h37
-rw-r--r--tests/auto/qmlls/utils/tst_qmlls_utils.cpp976
-rw-r--r--tests/auto/qmlls/utils/tst_qmlls_utils.h3
-rw-r--r--tests/auto/quick/CMakeLists.txt1
-rw-r--r--tests/auto/quick/doc/how-tos/how-to-qml/BLACKLIST5
-rw-r--r--tests/auto/quick/doc/how-tos/how-to-qml/tst_how-to-qml.cpp1
-rw-r--r--tests/auto/quick/platform/CMakeLists.txt6
-rw-r--r--tests/auto/quick/platform/android/CMakeLists.txt4
-rw-r--r--tests/auto/quick/platform/android/qtandroiditemmodel/CMakeLists.txt25
-rw-r--r--tests/auto/quick/platform/android/qtandroiditemmodel/testdata/src/org/qtproject/qt/android/tests/TestModel.java120
-rw-r--r--tests/auto/quick/platform/android/qtandroiditemmodel/tst_qtandroiditemmodel.cpp182
-rw-r--r--tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST3
-rw-r--r--tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp22
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp45
-rw-r--r--tests/auto/quick/qquickapplication/BLACKLIST4
-rw-r--r--tests/auto/quick/qquickflickable/BLACKLIST4
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp2
-rw-r--r--tests/auto/quick/qquickimage/data/multiframeAsyncRetain.qml7
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp61
-rw-r--r--tests/auto/quick/qquickitem/tst_qquickitem.cpp2
-rw-r--r--tests/auto/quick/qquickitem2/CMakeLists.txt5
-rw-r--r--tests/auto/quick/qquickitem2/data/embedded.qml30
-rw-r--r--tests/auto/quick/qquickitem2/data/embedded_FocusScope.qml37
-rw-r--r--tests/auto/quick/qquickitem2/data/mapCoordinatesWithWindows.qml20
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp82
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml43
-rw-r--r--tests/auto/quick/qquicklistview/BLACKLIST4
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp2
-rw-r--r--tests/auto/quick/qquickpath/tst_qquickpath.cpp103
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp6
-rw-r--r--tests/auto/quick/qquickpixmapcache/data/slowLoading.qml13
-rw-r--r--tests/auto/quick/qquickpixmapcache/deviceloadingimage.cpp35
-rw-r--r--tests/auto/quick/qquickpixmapcache/deviceloadingimage.h6
-rw-r--r--tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp50
-rw-r--r--tests/auto/quick/qquickshape/data/filltransform.qml58
-rw-r--r--tests/auto/quick/qquickshape/tst_qquickshape.cpp37
-rw-r--r--tests/auto/quick/qquicktableview/data/reordertableview.qml52
-rw-r--r--tests/auto/quick/qquicktableview/tst_qquicktableview.cpp247
-rw-r--r--tests/auto/quick/qquicktext/BLACKLIST1
-rw-r--r--tests/auto/quick/qquicktextedit/data/hAlignVisual.qml6
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp56
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp11
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp10
-rw-r--r--tests/auto/quick/qquickwindowcontainer/tst_qquickwindowcontainer.cpp8
-rw-r--r--tests/auto/quickcontrols/accessibility/data/actionAccessibility/button.qml12
-rw-r--r--tests/auto/quickcontrols/accessibility/tst_accessibility.cpp22
-rw-r--r--tests/auto/quickcontrols/controls/CMakeLists.txt1
-rw-r--r--tests/auto/quickcontrols/controls/basic/BLACKLIST5
-rw-r--r--tests/auto/quickcontrols/controls/basic/tst_basic.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/data/combobox/shader.frag19
-rw-r--r--tests/auto/quickcontrols/controls/data/combobox/shader.frag.qsbbin0 -> 577 bytes
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_abstractbutton.qml172
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_combobox.qml86
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_selectionrectangle.qml53
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_splitview.qml99
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_tabbar.qml10
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_tumbler.qml188
-rw-r--r--tests/auto/quickcontrols/controls/fluentwinui3/BLACKLIST14
-rw-r--r--tests/auto/quickcontrols/controls/fluentwinui3/CMakeLists.txt38
-rw-r--r--tests/auto/quickcontrols/controls/fluentwinui3/dependencies.qml6
-rw-r--r--tests/auto/quickcontrols/controls/fluentwinui3/dummy_imports.qml12
-rw-r--r--tests/auto/quickcontrols/controls/fluentwinui3/tst_fluentwinui3.cpp13
-rw-r--r--tests/auto/quickcontrols/controls/fusion/tst_fusion.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/imagine/tst_imagine.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/ios/tst_ios.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/macos/tst_macos.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/material/tst_material.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/universal/tst_universal.cpp3
-rw-r--r--tests/auto/quickcontrols/controls/windows/tst_windows.cpp3
-rw-r--r--tests/auto/quickcontrols/focus/tst_focus.cpp8
-rw-r--r--tests/auto/quickcontrols/font/tst_font.cpp2
-rw-r--r--tests/auto/quickcontrols/palette/data/comboBoxPopupWithApplicationWindow.qml32
-rw-r--r--tests/auto/quickcontrols/palette/data/comboBoxPopupWithThemeDefault.qml17
-rw-r--r--tests/auto/quickcontrols/palette/data/comboBoxPopupWithWindow.qml33
-rw-r--r--tests/auto/quickcontrols/palette/tst_palette.cpp94
-rw-r--r--tests/auto/quickcontrols/qquickapplicationwindow/tst_qquickapplicationwindow.cpp6
-rw-r--r--tests/auto/quickcontrols/qquickdrawer/tst_qquickdrawer.cpp3
-rw-r--r--tests/auto/quickcontrols/qquickiconlabel/tst_qquickiconlabel.cpp2
-rw-r--r--tests/auto/quickcontrols/qquickmaterialstyle/tst_qquickmaterialstyle.cpp16
-rw-r--r--tests/auto/quickcontrols/qquickmenu/data/nativeDynamicSubmenus.qml53
-rw-r--r--tests/auto/quickcontrols/qquickmenu/data/nativeEmptyMenu.qml51
-rw-r--r--tests/auto/quickcontrols/qquickmenu/data/nativeMenuSeparator.qml43
-rw-r--r--tests/auto/quickcontrols/qquickmenu/data/nativeMixedItems.qml69
-rw-r--r--tests/auto/quickcontrols/qquickmenu/data/nativeStatic.qml53
-rw-r--r--tests/auto/quickcontrols/qquickmenu/tst_qquickmenu.cpp710
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/invaliddelegate.qml40
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/menubarAsHeader.qml64
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/menubaritems.qml (renamed from tests/auto/quickcontrols/qquickmenubar/data/menubar.qml)11
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/menus.qml85
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/mixed.qml55
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/nodelegate.qml40
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/data/showandhide.qml40
-rw-r--r--tests/auto/quickcontrols/qquickmenubar/tst_qquickmenubar.cpp967
-rw-r--r--tests/auto/quickcontrols/qquickpopup/BLACKLIST7
-rw-r--r--tests/auto/quickcontrols/qquickpopup/data/popupCenterIn.qml22
-rw-r--r--tests/auto/quickcontrols/qquickpopup/data/popupWindowFocusHandling.qml28
-rw-r--r--tests/auto/quickcontrols/qquickpopup/data/popupWithButtonInBackground.qml28
-rw-r--r--tests/auto/quickcontrols/qquickpopup/data/reparentingPopup.qml49
-rw-r--r--tests/auto/quickcontrols/qquickpopup/data/simplepopup.qml23
-rw-r--r--tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp398
-rw-r--r--tests/auto/quickcontrols/qquicktextarea/tst_qquicktextarea.cpp10
-rw-r--r--tests/auto/quickcontrols/qquickuniversalstyle/tst_qquickuniversalstyle.cpp16
-rw-r--r--tests/auto/quickcontrols/snippets/tst_snippets.cpp3
-rw-r--r--tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp1
-rw-r--r--tests/auto/quickwidgets/qquickwidget/BLACKLIST7
-rw-r--r--tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp4
-rw-r--r--tests/baseline/controls/BLACKLIST15
-rw-r--r--tests/baseline/controls/data/textarea/textarea.qml3
-rw-r--r--tests/baseline/controls/data/textfield/textfield.qml5
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_fillItem.qml177
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_gradient_xf.qml81
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_intersecting8.qml64
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_rectangle.qml151
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_spread_xf.qml47
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_updatecolor.qml77
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_updatefill.qml214
-rw-r--r--tests/baseline/scenegraph/data/shape/shape_updategradient.qml105
-rw-r--r--tests/baseline/scenegraph/data/shared/qt_logo.svg26
-rw-r--r--tests/baseline/scenegraph/data/shared/svg/text_stroking.svg23
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-constr-201-t.svg69
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-coord-01-t.svg51
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-01-t.svg223
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-02-t.svg86
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-03-t.svg83
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-04-t.svg72
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-05-t.svg72
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-06-t.svg66
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-07-t.svg65
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-08-t.svg70
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-09-t.svg96
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-units-01-t.svg111
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-viewattr-05-t.svg90
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-desc-02-t.svg99
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-01-t.svg94
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-02-t.svg102
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-03-t.svg85
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-06-t.svg88
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-02-t.svg68
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-03-t.svg62
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-04-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-201-t.svg174
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-202-t.svg175
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-203-t.svg97
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-kern-01-t.svg238
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-overview-201-t.svg114
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/intro-compat-201-t.svgbin0 -> 7154 bytes
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-201-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-202-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-203-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-204-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-205-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-206-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-207-t.svg48
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-208-t.svg52
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-209-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-01-t.svg72
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-03-t.svg95
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-04-t.svg84
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-05-t.svg44
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-201-t.svg109
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-01-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-02-t.svg55
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-03-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-04-t.svg64
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-05-t.svg60
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-04-t.svg81
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-05-t.svg88
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-07-t.svg70
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-08-t.svg88
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-09-t.svg92
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-11-t.svg95
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-12-t.svg93
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-15-t.svg60
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-16-t.svg66
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-17-t.svg80
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-18-t.svg74
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-202-t.svg82
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-204-t.svg61
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-205-t.svg52
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-other-201-t.svg65
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-01-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-02-t.svg57
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-03-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-04-t.svg57
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-05-t.svg81
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-06-t.svg73
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-07-t.svg53
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-08-t.svg76
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-202-t.svg175
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-204-t.svg181
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-207-t.svg106
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-202-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-204-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-205-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-01-t.svg132
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-02-t.svg105
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-04-t.svg65
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-05-t.svg63
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-06-t.svg68
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-07-t.svg67
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-08-t.svg63
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-09-t.svg61
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-10-t.svg97
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-12-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-13-t.svg47
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-14-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-15-t.svg52
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-01-t.svg54
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-02-t.svg57
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-03-t.svg53
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-06-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-07-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-08-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-01-t.svg74
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-03-t.svg76
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-01-t.svg46
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-02-t.svg52
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-03-t.svg86
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-01-t.svg59
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-02-t.svg50
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-03-t.svg82
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-intro-01-t.svg96
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-01-t.svg68
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-02-t.svg66
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-01-t.svg64
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-02-t.svg63
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-01-t.svg70
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-02-t.svg64
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-01-t.svg60
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-02-t.svg55
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-03-t.svg64
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-class-201-t.svg92
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-common-201-t.svg110
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-01-t.svg46
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-02-t.svg336
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-03-t.svg97
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-204-t.svg150
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-209-t.svg74
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-210-t.svg82
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-01-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-201-t.svg104
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-205-t.svg72
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-206-t.svg65
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-02-t.svg45
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-03-t.svg45
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-04-t.svg45
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-05-t.svg53
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-06-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-01-t.svg55
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-03-t.svg226
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-201-t.svg87
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-202-t.svg86
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-203-t.svg68
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-204-t.svg49
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-01-t.svg88
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-03-t.svg53
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-09-t.svg81
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-201-t.svg94
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-202-t.svg66
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-203-t.svg47
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-204-t.svg47
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-205-t.svg188
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-206-t.svg48
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-207-t.svg78
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-208-t.svg57
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-209-t.svg64
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-01-t.svg59
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-02-t.svg58
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-03-t.svg58
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-inherit-01-t.svg61
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-pres-01-t.svg47
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-01-t.svg63
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-07-t.svg58
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-08-t.svg75
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-201-t.svg61
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-202-t.svg895
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-201-t.svg68
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-202-t.svg152
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-205-t.svg52
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-206-t.svg71
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-207-t.svg88
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-208-t.svg79
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-209-t.svg60
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-210-t.svg66
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-221-t.svg72
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-222-t.svg63
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-edit-201-t.svg130
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-01-t.svg52
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-02-t.svg60
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-03-t.svg62
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-04-t.svg76
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-202-t.svg85
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-01-t.svg61
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-04-t.svg53
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-05-t.svg45
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-06-t.svg56
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-201-t.svg55
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-04-t.svg171
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-06-t.svg95
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-07-t.svg43
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-08-t.svg42
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-09-t.svg55
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-tselect-03-t.svg87
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-01-t.svg58
-rw-r--r--tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-02-t.svg65
-rw-r--r--tests/baseline/scenegraph/data/text/text_context_font_merging.qml18
-rw-r--r--tests/baseline/scenegraph/data/text/text_prefertypolinemetrics.qml24
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/coordsOther.qml38
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/coordsOtherCurveRenderer.qml38
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/coordsTrans.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/coordsTransCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fillMode.qml59
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fontsElem.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fontsElemCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fontsGlyph.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fontsGlyphCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fontsOther.qml35
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/fontsOtherCurveRenderer.qml35
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/introCompat.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/jpegRequired.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/jpegRequiredCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintColor.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintColorCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintFill.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintFillCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintGrad.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintGradCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintStroke.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintStrokeCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintVfill.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/paintVfillCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/pathsData.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/pathsDataCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/renderElems.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/renderElemsCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/renderGroups.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/renderGroupsCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesCircle.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesCircleCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesEllipse.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesEllipseCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesIntro.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesIntroCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesLine.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesLineCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesPolygon.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesPolygonCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesPolyline.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesPolylineCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesRect.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/shapesRectCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structCommon.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structCommonCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structCond.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structCondCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structDefs.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structDefsCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structDiscard.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structDiscardCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structFrag.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structFragCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structGroup.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structGroupCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structSvg.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structSvgCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structUse.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/structUseCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/styling.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/stylingCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textAlign.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textAlignCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textArea.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textAreaCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textIntro.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textIntroCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textOther.qml32
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textOtherCurveRenderer.qml32
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textStroke.qml6
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textText.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textTextCurveRenderer.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textWs.qml28
-rw-r--r--tests/baseline/scenegraph/data/vectorimages/textWsCurveRenderer.qml28
-rw-r--r--tests/manual/painterpathquickshape/ControlPanel.qml14
-rw-r--r--tests/manual/painterpathquickshape/ControlledShape.qml1
-rw-r--r--tests/manual/platforms/android/qml_in_android_service/.gitignore2
-rw-r--r--tests/manual/platforms/android/qml_in_android_service/CMakeLists.txt33
-rw-r--r--tests/manual/platforms/android/qml_in_android_service/Main.qml100
-rw-r--r--tests/manual/platforms/android/qml_in_android_service/main.cpp10
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/.gitignore33
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/README.md35
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/build.gradle83
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/AndroidManifest.xml32
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/MainActivity.java20
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/QmlService.java204
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/layout/view_main.xml142
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/values/strings.xml12
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/backup_rules.xml10
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/data_extraction_rules.xml10
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/build.gradle4
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/gradle.properties22
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/gradle/wrapper/gradle-wrapper.properties7
-rw-r--r--tests/manual/platforms/android/qml_in_java_based_android_project/settings.gradle23
-rw-r--r--tests/manual/quickcontrols/CMakeLists.txt1
-rw-r--r--tests/manual/quickcontrols/menus/CMakeLists.txt47
-rw-r--r--tests/manual/quickcontrols/menus/Main.qml453
-rw-r--r--tests/manual/quickcontrols/menus/Menu.qml6
-rw-r--r--tests/manual/quickcontrols/menus/cppsettings.cpp43
-rw-r--r--tests/manual/quickcontrols/menus/cppsettings.h38
-rw-r--r--tests/manual/quickcontrols/menus/icons/warning.pngbin0 -> 1212 bytes
-rw-r--r--tests/manual/quickcontrols/menus/icons/warning@2x.pngbin0 -> 2118 bytes
-rw-r--r--tests/manual/quickcontrols/menus/main.cpp27
-rw-r--r--tests/manual/quickcontrols/testbench/controls/Menu.qml3
-rw-r--r--tests/manual/quickcontrols/testbench/controls/ToolBar.qml2
-rw-r--r--tests/manual/quickcontrols/testbench/testbench.qml6
-rw-r--r--tests/manual/svg/data/image/1.svg3
-rw-r--r--tests/manual/svg/data/image/2.svg3
-rw-r--r--tests/manual/svg/data/image/3.svg6
-rw-r--r--tests/manual/svg/data/image/data.pngbin0 -> 6901 bytes
-rw-r--r--tests/manual/svg/data/image/qtlogo.pngbin0 -> 6901 bytes
-rw-r--r--tests/manual/svg/data/styling/stroking_text.svg4
-rw-r--r--tests/manual/tableview/abstracttablemodel/main.qml36
-rw-r--r--tests/manual/windowembedding/examples/clipping.qml17
-rw-r--r--tests/manual/windowembedding/examples/stacking.qml42
-rw-r--r--tests/manual/windowembedding/examples/transform.qml25
561 files changed, 29771 insertions, 1345 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 0e168cf6ad..9d2ef3bd88 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -129,6 +129,7 @@ endif()
if(TARGET Qt::Quick)
if(NOT CMAKE_CROSSCOMPILING)
+ _qt_internal_test_expect_pass(shared_qml_module)
_qt_internal_test_expect_pass(qtquickcompiler BINARY qqc_test)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.21")
_qt_internal_test_expect_pass(test_common_import_path
diff --git a/tests/auto/cmake/shared_qml_module/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/CMakeLists.txt
new file mode 100644
index 0000000000..867caa4aad
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(scheduler VERSION 0.1 LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.8)
+
+add_custom_target(custom_qmllint_target ALL)
+set(QT_QMLLINT_ALL_TARGET custom_qmllint_target)
+
+add_subdirectory(external)
+add_subdirectory(Scheduler)
+add_subdirectory(SchedulerApp)
+add_subdirectory(tests)
diff --git a/tests/auto/cmake/shared_qml_module/Scheduler/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/Scheduler/CMakeLists.txt
new file mode 100644
index 0000000000..a40688d3a3
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/Scheduler/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(scheduler VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
+
+qt_add_qml_module(scheduler
+ URI Scheduler
+ VERSION 1.0
+ SOURCES
+ task.h
+ task.cpp
+ schedulerglobal.h
+ QML_FILES
+ MainScreen.qml
+)
+
+target_compile_definitions(scheduler
+ PRIVATE
+ SCHEDULER_LIBRARY
+)
+
+target_include_directories(scheduler
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+target_link_libraries(scheduler
+ PRIVATE
+ Qt6::Quick
+)
diff --git a/tests/auto/cmake/shared_qml_module/Scheduler/MainScreen.qml b/tests/auto/cmake/shared_qml_module/Scheduler/MainScreen.qml
new file mode 100644
index 0000000000..6260b4f918
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/Scheduler/MainScreen.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Rectangle {
+ color: "tomato"
+}
diff --git a/tests/auto/cmake/shared_qml_module/Scheduler/schedulerglobal.h b/tests/auto/cmake/shared_qml_module/Scheduler/schedulerglobal.h
new file mode 100644
index 0000000000..cd24bcc8b9
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/Scheduler/schedulerglobal.h
@@ -0,0 +1,15 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef SCHEDULEGLOBAL_H
+#define SCHEDULEGLOBAL_H
+
+#include <QtGlobal>
+
+#if defined(SCHEDULER_LIBRARY)
+#define SCHEDULER_EXPORT Q_DECL_EXPORT
+#else
+#define SCHEDULER_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // SCHEDULEGLOBAL_H
diff --git a/tests/auto/cmake/shared_qml_module/Scheduler/task.cpp b/tests/auto/cmake/shared_qml_module/Scheduler/task.cpp
new file mode 100644
index 0000000000..534a614139
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/Scheduler/task.cpp
@@ -0,0 +1,47 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "task.h"
+
+Task::Task()
+{
+}
+
+Task::Task(const QString &name, int durationInMinutes)
+ : mName(name)
+ , mDurationInMinutes(durationInMinutes)
+{
+}
+
+QString Task::name() const
+{
+ return mName;
+}
+
+void Task::setName(const QString &name)
+{
+ mName = name;
+}
+
+int Task::durationInMinutes() const
+{
+ return mDurationInMinutes;
+}
+
+void Task::setDurationInMinutes(int durationInMinutes)
+{
+ mDurationInMinutes = durationInMinutes;
+}
+
+bool Task::read(const QJsonObject &json)
+{
+ mName = json.value("name").toString();
+ mDurationInMinutes = json.value("durationInMinutes").toInt();
+ return true;
+}
+
+void Task::write(QJsonObject &json) const
+{
+ json["name"] = mName;
+ json["durationInMinutes"] = mDurationInMinutes;
+}
diff --git a/tests/auto/cmake/shared_qml_module/Scheduler/task.h b/tests/auto/cmake/shared_qml_module/Scheduler/task.h
new file mode 100644
index 0000000000..916f939508
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/Scheduler/task.h
@@ -0,0 +1,34 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef TASK_H
+#define TASK_H
+
+#include <QObject>
+#include <QJsonObject>
+
+#include "schedulerglobal.h"
+
+class SCHEDULER_EXPORT Task : public QObject
+{
+ Q_OBJECT
+
+public:
+ Task();
+ Task(const QString &name, int durationInMinutes);
+
+ bool read(const QJsonObject &json);
+ void write(QJsonObject &json) const;
+
+ QString name() const;
+ void setName(const QString &name);
+
+ int durationInMinutes() const;
+ void setDurationInMinutes(int durationInMinutes);
+
+private:
+ QString mName;
+ int mDurationInMinutes = 0;
+};
+
+#endif // TASK_H
diff --git a/tests/auto/cmake/shared_qml_module/SchedulerApp/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/SchedulerApp/CMakeLists.txt
new file mode 100644
index 0000000000..fdbb1df701
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/SchedulerApp/CMakeLists.txt
@@ -0,0 +1,44 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(schedulerapp VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
+
+qt_add_executable(schedulerapp
+ main.cpp
+)
+
+qt_add_qml_module(schedulerapp
+ URI SchedulerApp
+ DEPENDENCIES
+ TARGET scheduler
+ IMPORTS
+ TARGET nested_module
+ VERSION 1.0
+ QML_FILES
+ Main.qml
+)
+
+# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
+# If you are developing for iOS or macOS you should consider setting an
+# explicit, fixed bundle identifier manually though.
+set_target_properties(schedulerapp PROPERTIES
+# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.schedulerapp
+ MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ MACOSX_BUNDLE TRUE
+ WIN32_EXECUTABLE TRUE
+)
+
+target_link_libraries(schedulerapp
+ PRIVATE Qt6::Quick
+)
+
+include(GNUInstallDirs)
+install(TARGETS schedulerapp
+ BUNDLE DESTINATION .
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
diff --git a/tests/auto/cmake/shared_qml_module/SchedulerApp/Main.qml b/tests/auto/cmake/shared_qml_module/SchedulerApp/Main.qml
new file mode 100644
index 0000000000..4dddb35ae8
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/SchedulerApp/Main.qml
@@ -0,0 +1,12 @@
+import QtQuick.Controls
+import Scheduler
+
+ApplicationWindow {
+ width: 640
+ height: 480
+ visible: true
+ title: qsTr("Scheduler")
+
+ MainScreen {}
+ Test {}
+}
diff --git a/tests/auto/cmake/shared_qml_module/SchedulerApp/main.cpp b/tests/auto/cmake/shared_qml_module/SchedulerApp/main.cpp
new file mode 100644
index 0000000000..6422d91bfa
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/SchedulerApp/main.cpp
@@ -0,0 +1,21 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+//
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ qputenv("QT_QUICK_CONTROLS_STYLE", "Material");
+
+ QQmlApplicationEngine engine;
+ QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed,
+ &app, []() { QCoreApplication::exit(-1); },
+ Qt::QueuedConnection);
+ engine.loadFromModule("SchedulerApp", "Main");
+
+ return app.exec();
+}
diff --git a/tests/auto/cmake/shared_qml_module/external/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/external/CMakeLists.txt
new file mode 100644
index 0000000000..798a23e1a5
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/external/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(nested/module)
diff --git a/tests/auto/cmake/shared_qml_module/external/nested/module/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/external/nested/module/CMakeLists.txt
new file mode 100644
index 0000000000..da75d2333a
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/external/nested/module/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+cmake_minimum_required(VERSION 3.16)
+
+project(scheduler VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
+
+qt_add_qml_module(nested_module
+ URI nested.module
+ VERSION 1.0
+ QML_FILES
+ Test.qml
+)
diff --git a/tests/auto/cmake/shared_qml_module/external/nested/module/Test.qml b/tests/auto/cmake/shared_qml_module/external/nested/module/Test.qml
new file mode 100644
index 0000000000..3052615aef
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/external/nested/module/Test.qml
@@ -0,0 +1,3 @@
+import QtQuick
+
+Item {}
diff --git a/tests/auto/cmake/shared_qml_module/tests/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/tests/CMakeLists.txt
new file mode 100644
index 0000000000..0653827192
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/tests/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(auto)
diff --git a/tests/auto/cmake/shared_qml_module/tests/auto/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/tests/auto/CMakeLists.txt
new file mode 100644
index 0000000000..269aea0c60
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/tests/auto/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(unit)
diff --git a/tests/auto/cmake/shared_qml_module/tests/auto/unit/CMakeLists.txt b/tests/auto/cmake/shared_qml_module/tests/auto/unit/CMakeLists.txt
new file mode 100644
index 0000000000..9d5f1d9f5e
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/tests/auto/unit/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(tst_models LANGUAGES CXX)
+
+enable_testing()
+
+find_package(Qt6 REQUIRED COMPONENTS Gui Test Quick)
+
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+add_executable(tst_models tst_models.cpp)
+add_test(NAME tst_models COMMAND tst_models)
+
+target_link_libraries(tst_models
+ PRIVATE
+ scheduler
+ Qt6::Gui
+ Qt6::Test
+ Qt6::Quick
+)
+
+
+qt_add_qml_module(tst_models
+ URI unittest
+ DEPENDENCIES
+ TARGET scheduler
+)
+
+
+qt_add_executable(tst_models_dummy_helper dummy.cpp)
+qt_add_qml_module(tst_models_dummy_helper
+ URI unimportant
+ DEPENDENCIES
+ TARGET nested_module
+)
diff --git a/tests/auto/cmake/shared_qml_module/tests/auto/unit/dummy.cpp b/tests/auto/cmake/shared_qml_module/tests/auto/unit/dummy.cpp
new file mode 100644
index 0000000000..237c8ce181
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/tests/auto/unit/dummy.cpp
@@ -0,0 +1 @@
+int main() {}
diff --git a/tests/auto/cmake/shared_qml_module/tests/auto/unit/tst_models.cpp b/tests/auto/cmake/shared_qml_module/tests/auto/unit/tst_models.cpp
new file mode 100644
index 0000000000..0a7119fbcc
--- /dev/null
+++ b/tests/auto/cmake/shared_qml_module/tests/auto/unit/tst_models.cpp
@@ -0,0 +1,45 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QtTest>
+
+
+class tst_models : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_models();
+ ~tst_models();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+ void qtconf();
+};
+
+tst_models::tst_models() {}
+
+tst_models::~tst_models() {}
+
+void tst_models::initTestCase() {}
+
+void tst_models::cleanupTestCase() {}
+
+void tst_models::qtconf()
+{
+ auto importPaths = QLibraryInfo::paths(QLibraryInfo::QmlImportsPath);
+ QCOMPARE_GE(importPaths.size(), 2);
+ if (importPaths.at(0).endsWith("shared_qml_module")) {
+ QVERIFY(importPaths.at(1).endsWith("external/nested"));
+ } else if (importPaths.at(0).endsWith("external/nested")) {
+ QVERIFY(importPaths.at(1).endsWith("shared_qml_module"));
+ } else {
+ QFAIL("Expected import paths were not found");
+ }
+}
+
+QTEST_MAIN(tst_models)
+
+#include "tst_models.moc"
diff --git a/tests/auto/cmake/test_generate_qmlls_ini/main.cpp b/tests/auto/cmake/test_generate_qmlls_ini/main.cpp
index a7bdbf1e18..2d663cdc23 100644
--- a/tests/auto/cmake/test_generate_qmlls_ini/main.cpp
+++ b/tests/auto/cmake/test_generate_qmlls_ini/main.cpp
@@ -5,6 +5,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qdir.h>
#include <QtCore/qfile.h>
+#include <QtCore/qlibraryinfo.h>
#include <QtQml/qqml.h>
#include <QtTest/qtest.h>
@@ -33,6 +34,7 @@ void tst_generate_qmlls_ini::qmllsIniAreCorrect()
QSKIP(u"Cannot find source directory '%1', skipping test..."_s.arg(SOURCE_DIRECTORY)
.toLatin1());
+ const QString &docPath = QLibraryInfo::path(QLibraryInfo::DocumentationPath);
{
auto file = QFile(source.absoluteFilePath(qmllsIniName));
QVERIFY(file.exists());
@@ -41,8 +43,8 @@ void tst_generate_qmlls_ini::qmllsIniAreCorrect()
auto secondFolder = QDir(build.absolutePath().append(u"/qml/hello/subfolders"_s));
QVERIFY(secondFolder.exists());
QCOMPARE(fileContent,
- u"[General]\nbuildDir=%1%2%3\nno-cmake-calls=false\n"_s.arg(build.absolutePath(), QDir::listSeparator(),
- secondFolder.absolutePath()));
+ u"[General]\nbuildDir=%1%2%3\nno-cmake-calls=false\ndocDir=%4\n"_s.arg(build.absolutePath(), QDir::listSeparator(),
+ secondFolder.absolutePath(), docPath));
}
{
@@ -55,7 +57,7 @@ void tst_generate_qmlls_ini::qmllsIniAreCorrect()
QVERIFY(file.open(QFile::ReadOnly | QFile::Text));
const auto fileContent = QString::fromUtf8(file.readAll());
QCOMPARE(fileContent,
- u"[General]\nbuildDir=%1\nno-cmake-calls=false\n"_s.arg(buildSubfolder.absolutePath()));
+ u"[General]\nbuildDir=%1\nno-cmake-calls=false\ndocDir=%2\n"_s.arg(buildSubfolder.absolutePath(), docPath));
}
}
@@ -70,7 +72,7 @@ void tst_generate_qmlls_ini::qmllsIniAreCorrect()
const auto fileContent = QString::fromUtf8(file.readAll());
QCOMPARE(
fileContent,
- u"[General]\nbuildDir=%1\nno-cmake-calls=false\n"_s.arg(build.absolutePath()));
+ u"[General]\nbuildDir=%1\nno-cmake-calls=false\ndocDir=%2\n"_s.arg(build.absolutePath(), docPath));
}
}
{
@@ -86,7 +88,7 @@ void tst_generate_qmlls_ini::qmllsIniAreCorrect()
const auto fileContent = QString::fromUtf8(file.readAll());
QCOMPARE(
fileContent,
- u"[General]\nbuildDir=%1\nno-cmake-calls=false\n"_s.arg(build.absolutePath()));
+ u"[General]\nbuildDir=%1\nno-cmake-calls=false\ndocDir=%2\n"_s.arg(build.absolutePath(), docPath));
}
}
}
diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
index 9e5bc17623..97477370c8 100644
--- a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
+++ b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
@@ -56,7 +56,7 @@ QString QQmlDebugProcess::stateString() const
void QQmlDebugProcess::start(const QStringList &arguments)
{
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
// make sure m_executable points to the actual binary even if it's inside an app bundle
QFileInfo binFile(m_executable);
if (!binFile.isExecutable()) {
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations
index 2e96de7819..cc5eae456d 100644
--- a/tests/auto/qml/ecmascripttests/TestExpectations
+++ b/tests/auto/qml/ecmascripttests/TestExpectations
@@ -98,7 +98,6 @@ built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js
built-ins/Array/prototype/slice/length-exceeding-integer-limit.js fails
built-ins/Array/prototype/some/15.4.4.17-3-28.js fails
built-ins/Array/prototype/some/15.4.4.17-3-29.js fails
-built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js fails
built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js fails
built-ins/Array/prototype/splice/clamps-length-to-integer-limit.js fails
built-ins/Array/prototype/splice/create-ctor-non-object.js fails
@@ -254,8 +253,6 @@ built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional.js fails
built-ins/String/prototype/toLowerCase/Final_Sigma_U180E.js fails
built-ins/String/prototype/toLowerCase/special_casing_conditional.js fails
built-ins/TypedArray/prototype/constructor.js fails
-built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan.js fails
-built-ins/TypedArray/prototype/slice/bit-precision.js fails
built-ins/TypedArray/prototype/sort/arraylength-internal.js fails
built-ins/TypedArray/prototype/sort/comparefn-call-throws.js fails
built-ins/TypedArray/prototype/sort/comparefn-calls.js fails
diff --git a/tests/auto/qml/ecmascripttests/test262runner.cpp b/tests/auto/qml/ecmascripttests/test262runner.cpp
index 90ac10a38b..d87a8a9552 100644
--- a/tests/auto/qml/ecmascripttests/test262runner.cpp
+++ b/tests/auto/qml/ecmascripttests/test262runner.cpp
@@ -222,10 +222,20 @@ void Test262Runner::createProcesses()
}
});
- QObject::connect(&p, &QProcess::finished, this, [&, i](int, QProcess::ExitStatus status) {
- if (status != QProcess::NormalExit) {
- qDebug() << QStringLiteral("Process %1 of %2 exited with a non-normal status")
- .arg(i).arg(processCount - 1);
+ QObject::connect(&p, &QProcess::finished, this,
+ [this, processCount, i](int exitCode, QProcess::ExitStatus status) {
+ if (status != QProcess::NormalExit || exitCode != 0) {
+ TestData &testData(currentTasks[i]);
+
+ auto &result = testData.stillNeedStrictRun
+ ? testData.sloppyResult
+ : testData.strictResult;
+ result = TestCase::Result(
+ TestCase::Crashes,
+ QStringLiteral("Process %1 of %2 exited with a non-normal status")
+ .arg(i).arg(processCount - 1));
+
+ addResult(testData);
}
--runningCount;
diff --git a/tests/auto/qml/linebylinelex/BLACKLIST b/tests/auto/qml/linebylinelex/BLACKLIST
deleted file mode 100644
index 0fd7f604e3..0000000000
--- a/tests/auto/qml/linebylinelex/BLACKLIST
+++ /dev/null
@@ -1,5 +0,0 @@
-# QTBUG-105697
-[testFormatter]
-android
-[testLineByLineLex]
-android
diff --git a/tests/auto/qml/linebylinelex/CMakeLists.txt b/tests/auto/qml/linebylinelex/CMakeLists.txt
index 8b05ca0527..92d956a972 100644
--- a/tests/auto/qml/linebylinelex/CMakeLists.txt
+++ b/tests/auto/qml/linebylinelex/CMakeLists.txt
@@ -10,12 +10,12 @@ endif()
# Collect linebyline test data
file(GLOB_RECURSE test_data_glob
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/..
- linebylinelex/data/*)
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ data/*)
# Collect qmlformat test data
file(GLOB_RECURSE test_data_glob2
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/..
- qmlformat/data/*)
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ../qmlformat/data/*)
list(APPEND test_data ${test_data_glob} ${test_data_glob2})
qt_internal_add_test(tst_linebylinelex
@@ -25,17 +25,5 @@ qt_internal_add_test(tst_linebylinelex
Qt::Qml
Qt::QuickTestUtilsPrivate
TESTDATA ${test_data}
-)
-
-## Scopes:
-#####################################################################
-
-qt_internal_extend_target(tst_linebylinelex CONDITION ANDROID OR IOS
- DEFINES
- QT_QMLTEST_DATADIR=":/"
-)
-
-qt_internal_extend_target(tst_linebylinelex CONDITION NOT ANDROID AND NOT IOS
- DEFINES
- QT_QMLTEST_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/.."
+ BUILTIN_TESTDATA
)
diff --git a/tests/auto/qml/linebylinelex/tst_linebylinelex.cpp b/tests/auto/qml/linebylinelex/tst_linebylinelex.cpp
index d94f325020..040ccfa9a6 100644
--- a/tests/auto/qml/linebylinelex/tst_linebylinelex.cpp
+++ b/tests/auto/qml/linebylinelex/tst_linebylinelex.cpp
@@ -13,7 +13,7 @@ QT_USE_NAMESPACE
using namespace Qt::StringLiterals;
using namespace QQmlJS;
-class TestLineByLineLex : public QQmlDataTest
+class TestLineByLineLex : public QObject
{
Q_OBJECT
@@ -21,7 +21,7 @@ public:
TestLineByLineLex();
private Q_SLOTS:
- void initTestCase() override;
+ void initTestCase();
void testLineByLineLex_data();
void testLineByLineLex();
@@ -34,17 +34,14 @@ private:
QString m_qmljsrootgenPath;
QString m_qmltyperegistrarPath;
- QString m_baseDir;
};
TestLineByLineLex::TestLineByLineLex()
- : QQmlDataTest(QT_QMLTEST_DATADIR), m_baseDir(QString::fromLocal8Bit(QT_QMLTEST_DATADIR))
{
}
void TestLineByLineLex::initTestCase()
{
- QQmlDataTest::initTestCase();
}
void TestLineByLineLex::testLineByLineLex_data()
@@ -59,22 +56,18 @@ void TestLineByLineLex::testLineByLineLex()
{
QFETCH(QString, filename);
- QString filePath = m_baseDir + u"/linebylinelex/data/"_s + filename;
+ QString filePath = QFINDTESTDATA("data/" + filename);
runLex(filePath);
}
void TestLineByLineLex::testFormatter_data()
{
QTest::addColumn<QString>("filename");
- QDir formatData(m_baseDir + u"/qmlformat/data"_s);
- bool hasTestData = false; // ### TODO: fix test to always have data
+ QDir formatData(QFINDTESTDATA("qmlformat/data"));
for (const QFileInfo &fInfo :
formatData.entryInfoList(QStringList({ u"*.qml"_s, u"*.js"_s }), QDir::Files)) {
QTest::newRow(qPrintable(fInfo.fileName())) << fInfo.absoluteFilePath();
- hasTestData = true;
}
- if (!hasTestData)
- QSKIP("No test data found!");
}
void TestLineByLineLex::testFormatter()
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index daa16eba72..7bf3b34f86 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -5948,7 +5948,7 @@ void tst_QJSEngine::functionCtorGeneratedCUIsNotCollectedByGc()
const QString program = "new Function('a', 'b', 'let x = \"Hello\"; return a + b');";
auto sumFunc = engine.evaluate(program);
QVERIFY(sumFunc.isCallable());
- auto *function = QJSValuePrivate::asManagedType<QV4::FunctionObject>(&sumFunc);
+ auto *function = QJSValuePrivate::asManagedType<QV4::JavaScriptFunctionObject>(&sumFunc);
auto *cu = function->d()->function->executableCompilationUnit();
QVERIFY(cu->runtimeStrings); // should exist for "Hello"
QVERIFY(cu->runtimeStrings[0]->isMarked());
diff --git a/tests/auto/qml/qmlcachegen/CMakeLists.txt b/tests/auto/qml/qmlcachegen/CMakeLists.txt
index 2dacff35b5..d88de460e9 100644
--- a/tests/auto/qml/qmlcachegen/CMakeLists.txt
+++ b/tests/auto/qml/qmlcachegen/CMakeLists.txt
@@ -28,6 +28,7 @@ qt_internal_add_test(tst_qmlcachegen
Qt::Gui
Qt::QmlPrivate
Qt::QuickTestUtilsPrivate
+ Qt::QmlCompilerPrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/qml/qmlcachegen/data/aotstats/AotstatsClean.qml b/tests/auto/qml/qmlcachegen/data/aotstats/AotstatsClean.qml
new file mode 100644
index 0000000000..b48004dc87
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/aotstats/AotstatsClean.qml
@@ -0,0 +1,11 @@
+import QtQml
+
+QtObject {
+ property int i: 100
+ property int j: i * 2
+
+ function s() : string {
+ let s = "abc"
+ return s + "def "
+ }
+}
diff --git a/tests/auto/qml/qmlcachegen/data/aotstats/AotstatsMixed.qml b/tests/auto/qml/qmlcachegen/data/aotstats/AotstatsMixed.qml
new file mode 100644
index 0000000000..3d96760e96
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/aotstats/AotstatsMixed.qml
@@ -0,0 +1,7 @@
+import QtQml
+
+QtObject {
+ property int i: Math.max(1, 2) // OK
+ function f() { return 1 } // Error: No specified return type
+ property string s: g() // Error: g?
+}
diff --git a/tests/auto/qml/qmlcachegen/data/aotstats/cachegentest.qrc b/tests/auto/qml/qmlcachegen/data/aotstats/cachegentest.qrc
new file mode 100644
index 0000000000..4f156ad2ef
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/aotstats/cachegentest.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/cachegentest">
+ <file alias="qmldir">qmldir</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/qml/qmlcachegen/data/aotstats/qmldir b/tests/auto/qml/qmlcachegen/data/aotstats/qmldir
new file mode 100644
index 0000000000..72047cc99d
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/aotstats/qmldir
@@ -0,0 +1,3 @@
+module cachegentest
+AotstatsClean 254.0 AotstatsClean.qml
+AotstatsMixed 254.0 AotstatsMixed.qml
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 17a914c1dd..34ad3bbc98 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -3,6 +3,7 @@
#include <qtest.h>
+#include <QJsonDocument>
#include <QQmlComponent>
#include <QQmlEngine>
#include <QProcess>
@@ -11,6 +12,7 @@
#include <QSysInfo>
#include <QLoggingCategory>
#include <private/qqmlcomponent_p.h>
+#include <private/qqmljscompilerstats_p.h>
#include <private/qqmlscriptdata_p.h>
#include <private/qv4compileddata_p.h>
#include <qtranslator.h>
@@ -67,6 +69,10 @@ private slots:
void scriptStringCachegenInteraction();
void saveableUnitPointer();
+
+ void aotstatsSerialization();
+ void aotstatsGeneration_data();
+ void aotstatsGeneration();
};
// A wrapper around QQmlComponent to ensure the temporary reference counts
@@ -895,6 +901,133 @@ void tst_qmlcachegen::saveableUnitPointer()
QCOMPARE(unit.flags, flags);
}
+void tst_qmlcachegen::aotstatsSerialization()
+{
+ const auto createEntry = [](const auto &d, const auto &n, const auto &e, const auto &l,
+ const auto &c, const auto &s) -> QQmlJS::AotStatsEntry {
+ QQmlJS::AotStatsEntry entry;
+ entry.codegenDuration = d;
+ entry.functionName = n;
+ entry.errorMessage = e;
+ entry.line = l;
+ entry.column = c;
+ entry.codegenSuccessful = s;
+ return entry;
+ };
+
+ const auto equal = [](const auto &e1, const auto &e2) -> bool {
+ return e1.codegenDuration == e2.codegenDuration && e1.functionName == e2.functionName
+ && e1.errorMessage == e2.errorMessage && e1.line == e2.line
+ && e1.column == e2.column && e1.codegenSuccessful == e2.codegenSuccessful;
+ };
+
+ // AotStats
+ // +-ModuleA
+ // | +-File1
+ // | | +-e1
+ // | | +-e2
+ // | +-File2
+ // | | +-e3
+ // +-ModuleB
+ // | +-File3
+ // | | +-e4
+
+ QQmlJS::AotStats original;
+ QQmlJS::AotStatsEntry e1 = createEntry(std::chrono::microseconds(500), "f1", "", 1, 1, true);
+ QQmlJS::AotStatsEntry e2 = createEntry(std::chrono::microseconds(200), "f2", "err1", 5, 4, false);
+ QQmlJS::AotStatsEntry e3 = createEntry(std::chrono::microseconds(750), "f3", "", 20, 4, true);
+ QQmlJS::AotStatsEntry e4 = createEntry(std::chrono::microseconds(300), "f4", "err2", 5, 8, false);
+ original.addEntry("ModuleA", "File1", e1);
+ original.addEntry("ModuleA", "File1", e2);
+ original.addEntry("ModuleA", "File2", e3);
+ original.addEntry("ModuleB", "File3", e4);
+
+ const auto parsed = QQmlJS::AotStats::fromJsonDocument(original.toJsonDocument());
+ QCOMPARE(parsed.entries().size(), original.entries().size());
+
+ const auto &parsedA = parsed.entries()["ModuleA"];
+ const auto &originalA = original.entries()["ModuleA"];
+ QCOMPARE(parsedA.size(), originalA.size());
+ QCOMPARE(parsedA["File1"].size(), originalA["File1"].size());
+ QVERIFY(equal(parsedA["File1"][0], originalA["File1"][0]));
+ QVERIFY(equal(parsedA["File1"][1], originalA["File1"][1]));
+ QCOMPARE(parsedA["File2"].size(), originalA["File2"].size());
+ QVERIFY(equal(parsedA["File2"][0], originalA["File2"][0]));
+
+ const auto &parsedB = parsed.entries()["ModuleB"];
+ const auto &originalB = original.entries()["ModuleB"];
+ QCOMPARE(parsedB.size(), originalB.size());
+ QCOMPARE(parsedB["File3"].size(), originalB["File3"].size());
+ QVERIFY(equal(parsedB["File3"][0], originalB["File3"][0]));
+}
+
+struct FunctionEntry
+{
+ QString name;
+ QString errorMessage;
+ bool codegenSuccessful;
+};
+
+void tst_qmlcachegen::aotstatsGeneration_data()
+{
+ QTest::addColumn<QString>("qmlFile");
+ QTest::addColumn<QList<FunctionEntry>>("entries");
+
+ QTest::addRow("clean") << "AotstatsClean.qml"
+ << QList<FunctionEntry>{ { "j", "", true }, { "s", "", true } };
+
+ const QString fError = "function without return type annotation returns int. This may prevent "
+ "proper compilation to Cpp.";
+ const QString sError = "method g cannot be resolved.";
+ QTest::addRow("mixed") << "AotstatsMixed.qml"
+ << QList<FunctionEntry>{ { "i", "", true },
+ { "f", fError, false },
+ { "s", sError, false } };
+}
+
+void tst_qmlcachegen::aotstatsGeneration()
+{
+#if defined(QTEST_CROSS_COMPILED)
+ QSKIP("Cannot call qmlcachegen on cross-compiled target.");
+#endif
+ QFETCH(QString, qmlFile);
+ QFETCH(QList<FunctionEntry>, entries);
+
+ QTemporaryDir dir;
+ QProcess proc;
+ proc.setProgram(QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + "/qmlcachegen"_L1);
+ const QString cppOutput = dir.filePath(qmlFile + ".cpp");
+ const QString aotstatsOutput = cppOutput + ".aotstats";
+ proc.setArguments({ "--bare",
+ "--resource-path", "/cachegentest/data/aotstats/" + qmlFile,
+ "-i", testFile("aotstats/qmldir"),
+ "--resource", testFile("aotstats/cachegentest.qrc"),
+ "--dump-aot-stats",
+ "--module-id=Aotstats",
+ "-o", cppOutput,
+ testFile("aotstats/" + qmlFile) });
+ proc.start();
+ QVERIFY(proc.waitForFinished() && proc.exitStatus() == QProcess::NormalExit);
+
+ QVERIFY(QFileInfo::exists(aotstatsOutput));
+ QFile aotstatsFile(aotstatsOutput);
+ QVERIFY(aotstatsFile.open(QIODevice::Text | QIODevice::ReadOnly));
+ const auto document = QJsonDocument::fromJson(aotstatsFile.readAll());
+ const auto aotstats = QQmlJS::AotStats::fromJsonDocument(document);
+ QVERIFY(aotstats.entries().size() == 1); // One module
+ const auto &moduleEntries = aotstats.entries()["Aotstats"];
+ QVERIFY(moduleEntries.size() == 1); // Only one qml file was compiled
+ const auto &fileEntries = moduleEntries[moduleEntries.keys().first()];
+
+ for (const auto &entry : entries) {
+ const auto it = std::find_if(fileEntries.cbegin(), fileEntries.cend(),
+ [&](const auto &e) { return e.functionName == entry.name; });
+ QVERIFY(it != fileEntries.cend());
+ QVERIFY(it->codegenSuccessful == entry.codegenSuccessful);
+ QVERIFY(it->errorMessage == entry.errorMessage);
+ }
+}
+
const QQmlScriptString &ScriptStringProps::undef() const
{
return m_undef;
diff --git a/tests/auto/qml/qmlcppcodegen/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/CMakeLists.txt
index 42ad6d23d6..715ad6162a 100644
--- a/tests/auto/qml/qmlcppcodegen/CMakeLists.txt
+++ b/tests/auto/qml/qmlcppcodegen/CMakeLists.txt
@@ -19,6 +19,8 @@ qt_internal_add_test(tst_qmlcppcodegen
codegen_test_moduleplugin
codegen_test_hidden
codegen_test_hiddenplugin
+ codegen_test_stringbuilder
+ codegen_test_stringbuilderplugin
)
qt_internal_add_test(tst_qmlcppcodegen_interpreted
@@ -31,6 +33,8 @@ qt_internal_add_test(tst_qmlcppcodegen_interpreted
codegen_test_moduleplugin
codegen_test_hidden
codegen_test_hiddenplugin
+ codegen_test_stringbuilder
+ codegen_test_stringbuilderplugin
DEFINES
QT_TEST_FORCE_INTERPRETER
)
diff --git a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt
index 8c5449d192..7f2e6ad967 100644
--- a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt
+++ b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt
@@ -346,6 +346,33 @@ add_dependencies(codegen_test_hidden Qt::Quick)
qt_autogen_tools_initial_setup(codegen_test_hiddenplugin)
+qt_policy(SET QTP0004 NEW)
+
+qt_add_library(codegen_test_stringbuilder STATIC)
+qt_autogen_tools_initial_setup(codegen_test_stringbuilder)
+
+set_target_properties(codegen_test_stringbuilder PROPERTIES
+ # We really want qmlcachegen here, even if qmlsc is available
+ QT_QMLCACHEGEN_EXECUTABLE qmlcachegen
+ QT_QMLCACHEGEN_ARGUMENTS --validate-basic-blocks
+)
+
+target_compile_definitions(codegen_test_stringbuilder PRIVATE
+ -DGENERATED_CPP_FOLDER="${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmlcache"
+ QT_USE_QSTRINGBUILDER
+)
+
+qt6_add_qml_module(codegen_test_stringbuilder
+ URI StringBuilderTestTypes
+ SOURCES
+ writableVariantMap.h
+ QML_FILES
+ writeVariantMap.qml
+ OUTPUT_DIRECTORY stringbuilderTestTypes
+ __QT_INTERNAL_DISAMBIGUATE_QMLDIR_RESOURCE
+)
+
+qt_autogen_tools_initial_setup(codegen_test_stringbuilderplugin)
qt_add_library(codegen_test_module STATIC)
qt_autogen_tools_initial_setup(codegen_test_module)
@@ -356,7 +383,7 @@ set_target_properties(codegen_test_module PROPERTIES
QT_QMLCACHEGEN_ARGUMENTS --validate-basic-blocks
)
-qt_policy(SET QTP0004 NEW)
+
target_compile_definitions(codegen_test_module PUBLIC
-DGENERATED_CPP_FOLDER="${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmlcache"
diff --git a/tests/auto/qml/qmlcppcodegen/data/writableVariantMap.h b/tests/auto/qml/qmlcppcodegen/data/writableVariantMap.h
new file mode 100644
index 0000000000..3c0fedd28b
--- /dev/null
+++ b/tests/auto/qml/qmlcppcodegen/data/writableVariantMap.h
@@ -0,0 +1,31 @@
+#pragma once
+#include <QObject>
+#include <QVariantMap>
+#include <QtQml/qqmlregistration.h>
+
+class WritableVariantMap : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+ Q_PROPERTY(QVariantMap data READ data WRITE setData NOTIFY dataChanged)
+
+public:
+ WritableVariantMap(QObject *parent = nullptr) : QObject(parent) { }
+
+ QVariantMap data() const { return m_data; }
+ void setData(const QVariantMap &data)
+ {
+ if (m_data != data) {
+ m_data = data;
+ emit dataChanged();
+ }
+ }
+
+signals:
+ void dataChanged();
+
+private:
+ QVariantMap m_data;
+};
+
+
diff --git a/tests/auto/qml/qmlcppcodegen/data/writeVariantMap.qml b/tests/auto/qml/qmlcppcodegen/data/writeVariantMap.qml
new file mode 100644
index 0000000000..536e53b408
--- /dev/null
+++ b/tests/auto/qml/qmlcppcodegen/data/writeVariantMap.qml
@@ -0,0 +1,10 @@
+pragma Strict
+import StringBuilderTestTypes
+
+WritableVariantMap {
+ id: dragSource
+ property string modelData: "Drag Me"
+ data: ({
+ "text/plain": "%" + dragSource.modelData + "%"
+ })
+}
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 9b66143f62..53cc068e8c 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -256,6 +256,7 @@ private slots:
void voidConversion();
void voidFunction();
void writeBack();
+ void writeVariantMap();
};
static QByteArray arg1()
@@ -5107,6 +5108,22 @@ void tst_QmlCppCodegen::writeBack()
QCOMPARE(person->property("ints"), QVariant::fromValue(QList<int>({12, 22, 2, 1, 0, 0, 33})));
}
+void tst_QmlCppCodegen::writeVariantMap()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, QUrl(u"qrc:/qt/qml/StringBuilderTestTypes/writeVariantMap.qml"_s));
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+
+ const QVariantMap v = object->property("data").toMap();
+ QCOMPARE(v.size(), 1);
+ const QVariant textPlain = v[u"text/plain"_s];
+ QCOMPARE(textPlain.metaType(), QMetaType::fromType<QString>());
+ QCOMPARE(textPlain.toString(), u"%Drag Me%"_s);
+
+}
+
QTEST_MAIN(tst_QmlCppCodegen)
#include "tst_qmlcppcodegen.moc"
diff --git a/tests/auto/qml/qmlformat/data/enumWithValues.formatted.qml b/tests/auto/qml/qmlformat/data/enumWithValues.formatted.qml
new file mode 100644
index 0000000000..bbf978936f
--- /dev/null
+++ b/tests/auto/qml/qmlformat/data/enumWithValues.formatted.qml
@@ -0,0 +1,12 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Rectangle {
+ enum AxisAlignment {
+ Bottom = 0,
+ Left = 1,
+ Right = 2
+ }
+}
diff --git a/tests/auto/qml/qmlformat/data/enumWithValues.qml b/tests/auto/qml/qmlformat/data/enumWithValues.qml
new file mode 100644
index 0000000000..2dbe7fbac5
--- /dev/null
+++ b/tests/auto/qml/qmlformat/data/enumWithValues.qml
@@ -0,0 +1,12 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Rectangle{
+enum AxisAlignment{
+Bottom = 0,
+Left = 1,
+Right = 2
+}
+}
diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
index da3ebc69a2..11d4c9d2c7 100644
--- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -390,7 +390,9 @@ void TestQmlformat::testFormat_data()
QTest::newRow("javascriptBlock")
<< "javascriptBlock.qml"
<< "javascriptBlock.formatted.qml" << QStringList{} << RunOption::OnCopy;
-
+ QTest::newRow("enumWithValues")
+ << "enumWithValues.qml"
+ << "enumWithValues.formatted.qml" << QStringList{} << RunOption::OnCopy;
//plainJS
QTest::newRow("nestedLambdaWithIfElse")
<< "lambdaWithIfElseInsideLambda.js"
diff --git a/tests/auto/qml/qmlimportscanner/data/CompositeSingleton.json b/tests/auto/qml/qmlimportscanner/data/CompositeSingleton.json
index 028685f566..8860b629d1 100644
--- a/tests/auto/qml/qmlimportscanner/data/CompositeSingleton.json
+++ b/tests/auto/qml/qmlimportscanner/data/CompositeSingleton.json
@@ -10,29 +10,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -40,9 +36,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -50,12 +46,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/CompositeWithEnum.json b/tests/auto/qml/qmlimportscanner/data/CompositeWithEnum.json
index 77faf99e6c..085d0bf6d4 100644
--- a/tests/auto/qml/qmlimportscanner/data/CompositeWithEnum.json
+++ b/tests/auto/qml/qmlimportscanner/data/CompositeWithEnum.json
@@ -5,24 +5,20 @@
"type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -30,9 +26,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -40,12 +36,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/CompositeWithinSingleton.json b/tests/auto/qml/qmlimportscanner/data/CompositeWithinSingleton.json
index cf446c33bd..c0cad1e3a1 100644
--- a/tests/auto/qml/qmlimportscanner/data/CompositeWithinSingleton.json
+++ b/tests/auto/qml/qmlimportscanner/data/CompositeWithinSingleton.json
@@ -10,29 +10,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -40,9 +36,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -50,12 +46,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/Drawer.qml.json b/tests/auto/qml/qmlimportscanner/data/Drawer.qml.json
index 0a885f058e..3abcd58b1c 100644
--- a/tests/auto/qml/qmlimportscanner/data/Drawer.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/Drawer.qml.json
@@ -1,23 +1,19 @@
[
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -25,9 +21,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -35,12 +31,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/Imports.json b/tests/auto/qml/qmlimportscanner/data/Imports.json
index 20b9c524c4..ee6903b1da 100644
--- a/tests/auto/qml/qmlimportscanner/data/Imports.json
+++ b/tests/auto/qml/qmlimportscanner/data/Imports.json
@@ -10,29 +10,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -40,9 +36,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -50,12 +46,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/ListProperty.qml.json b/tests/auto/qml/qmlimportscanner/data/ListProperty.qml.json
index f07b7e8494..0e733b551f 100644
--- a/tests/auto/qml/qmlimportscanner/data/ListProperty.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/ListProperty.qml.json
@@ -1,39 +1,29 @@
[
{
"classname": "QtQuick2Plugin",
- "name": "QtQuick",
"linkTarget": "Qt6::qtquick2plugin",
+ "name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
- },
- {
- "name": "Things",
- "plugin": "doesNotExistPlugin",
- "relativePath": "Things",
"type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -41,9 +31,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -51,12 +41,14 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
+ "type": "module"
},
{
- "name": "QML",
+ "name": "Things",
+ "plugin": "doesNotExistPlugin",
+ "relativePath": "Things",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/QTBUG-45916.js.json b/tests/auto/qml/qmlimportscanner/data/QTBUG-45916.js.json
index 3aa7bc8282..d0d427f595 100644
--- a/tests/auto/qml/qmlimportscanner/data/QTBUG-45916.js.json
+++ b/tests/auto/qml/qmlimportscanner/data/QTBUG-45916.js.json
@@ -5,29 +5,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -35,9 +31,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -45,12 +41,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/Simple.qml.json b/tests/auto/qml/qmlimportscanner/data/Simple.qml.json
index 3aa7bc8282..d0d427f595 100644
--- a/tests/auto/qml/qmlimportscanner/data/Simple.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/Simple.qml.json
@@ -5,29 +5,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -35,9 +31,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -45,12 +41,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/Singleton.json b/tests/auto/qml/qmlimportscanner/data/Singleton.json
index 90f0ff19ad..1813d01efe 100644
--- a/tests/auto/qml/qmlimportscanner/data/Singleton.json
+++ b/tests/auto/qml/qmlimportscanner/data/Singleton.json
@@ -10,29 +10,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -40,9 +36,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -50,12 +46,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/Things.json b/tests/auto/qml/qmlimportscanner/data/Things.json
index 7782dd7c5f..a6081c89d8 100644
--- a/tests/auto/qml/qmlimportscanner/data/Things.json
+++ b/tests/auto/qml/qmlimportscanner/data/Things.json
@@ -11,29 +11,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -41,9 +37,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -51,12 +47,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/javascriptMethods.qml.json b/tests/auto/qml/qmlimportscanner/data/javascriptMethods.qml.json
index 8fe2da0078..7094d1c8e3 100644
--- a/tests/auto/qml/qmlimportscanner/data/javascriptMethods.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/javascriptMethods.qml.json
@@ -1,27 +1,19 @@
[
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
- "name": "QtQml",
- "plugin": "qmlmetaplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
- },
- {
"classname": "QtQmlPlugin",
"linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
+ "name": "QtQml",
"plugin": "qmlplugin",
"pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "prefer": ":/qt-project.org/imports/QtQml/",
+ "relativePath": "QtQml",
+ "type": "module"
},
{
- "name": "Methods.js",
- "type": "javascript"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -29,9 +21,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -39,12 +31,12 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
+ "type": "module"
},
{
- "name": "QML",
- "type": "module"
+ "name": "Methods.js",
+ "type": "javascript"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/localImport.qml.json b/tests/auto/qml/qmlimportscanner/data/localImport.qml.json
index 7782dd7c5f..a6081c89d8 100644
--- a/tests/auto/qml/qmlimportscanner/data/localImport.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/localImport.qml.json
@@ -11,29 +11,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -41,9 +37,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -51,12 +47,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/parentEnum.qml.json b/tests/auto/qml/qmlimportscanner/data/parentEnum.qml.json
index 3aa7bc8282..d0d427f595 100644
--- a/tests/auto/qml/qmlimportscanner/data/parentEnum.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/parentEnum.qml.json
@@ -5,29 +5,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -35,9 +31,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -45,12 +41,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/qmldirImportAndDepend.qml.json b/tests/auto/qml/qmlimportscanner/data/qmldirImportAndDepend.qml.json
index 7782dd7c5f..a6081c89d8 100644
--- a/tests/auto/qml/qmlimportscanner/data/qmldirImportAndDepend.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/qmldirImportAndDepend.qml.json
@@ -11,29 +11,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -41,9 +37,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -51,12 +47,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/qtQmlOnly.qml.json b/tests/auto/qml/qmlimportscanner/data/qtQmlOnly.qml.json
index 0a885f058e..3abcd58b1c 100644
--- a/tests/auto/qml/qmlimportscanner/data/qtQmlOnly.qml.json
+++ b/tests/auto/qml/qmlimportscanner/data/qtQmlOnly.qml.json
@@ -1,23 +1,19 @@
[
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -25,9 +21,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -35,12 +31,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmlimportscanner/data/rootPath.json b/tests/auto/qml/qmlimportscanner/data/rootPath.json
index b468a8acb1..41ce0f9a45 100644
--- a/tests/auto/qml/qmlimportscanner/data/rootPath.json
+++ b/tests/auto/qml/qmlimportscanner/data/rootPath.json
@@ -5,29 +5,25 @@
"name": "QtQuick",
"plugin": "qtquick2plugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQuick/",
"relativePath": "QtQuick",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQuick/"
+ "type": "module"
},
{
- "classname": "QtQmlMetaPlugin",
- "linkTarget": "Qt6::QmlMeta",
+ "classname": "QtQmlPlugin",
+ "linkTarget": "Qt6::qmlplugin",
"name": "QtQml",
- "plugin": "qmlmetaplugin",
+ "plugin": "qmlplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/",
"relativePath": "QtQml",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/"
+ "type": "module"
},
{
- "classname": "QtQmlPlugin",
- "linkTarget": "Qt6::qmlplugin",
- "name": "QtQml.Base",
- "plugin": "qmlplugin",
- "pluginIsOptional": true,
- "relativePath": "QtQml/Base",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Base/"
+ "name": "QML",
+ "prefer": ":/qt-project.org/imports/QML/",
+ "relativePath": "QML",
+ "type": "module"
},
{
"classname": "QtQmlModelsPlugin",
@@ -35,9 +31,9 @@
"name": "QtQml.Models",
"plugin": "modelsplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/Models/",
"relativePath": "QtQml/Models",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/Models/"
+ "type": "module"
},
{
"classname": "QtQmlWorkerScriptPlugin",
@@ -45,12 +41,8 @@
"name": "QtQml.WorkerScript",
"plugin": "workerscriptplugin",
"pluginIsOptional": true,
+ "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/",
"relativePath": "QtQml/WorkerScript",
- "type": "module",
- "prefer": ":/qt-project.org/imports/QtQml/WorkerScript/"
- },
- {
- "name": "QML",
"type": "module"
},
{
@@ -72,12 +64,12 @@
"type": "module"
},
{
- "name": "Imports",
- "relativePath": "Imports",
+ "name": "Module",
"type": "module"
},
{
- "name": "Module",
+ "name": "Imports",
+ "relativePath": "Imports",
"type": "module"
}
]
diff --git a/tests/auto/qml/qmllint/data/Qtbug111015/qmldir b/tests/auto/qml/qmllint/data/Qtbug111015/qmldir
new file mode 100644
index 0000000000..3bf1d48e13
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Qtbug111015/qmldir
@@ -0,0 +1,3 @@
+module Qtbug111015
+typeinfo qtbug111015.qmltypes
+import QtQml
diff --git a/tests/auto/qml/qmllint/data/Qtbug111015/qtbug111015.qmltypes b/tests/auto/qml/qmllint/data/Qtbug111015/qtbug111015.qmltypes
new file mode 100644
index 0000000000..7de521a379
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Qtbug111015/qtbug111015.qmltypes
@@ -0,0 +1,20 @@
+import QtQuick.tooling 1.2
+
+Module {
+ Component {
+ file: "typewithjsonobjectlist.h"
+ name: "TypeWithJsonObjectList"
+ exports: ["QmlLintTestLib/TypeWithJsonObjectList 1.0"]
+ accessSemantics: "reference"
+ prototype: "QObject"
+ Property { name: "jsonObjectList"; type: "QJsonObject"; isList: true; read: "getJsonObjectList"; index: 0; isReadonly: true }
+ }
+ Component {
+ file: "typewithjsonarray.h"
+ name: "TypeWithJsonArray"
+ exports: ["QmlLintTestLib/TypeWithJsonArray 1.0"]
+ accessSemantics: "reference"
+ prototype: "QObject"
+ Property { name: "jsonArray"; type: "QJsonArray"; read: "getJsonArray"; index: 0; isReadonly: true }
+ }
+}
diff --git a/tests/auto/qml/qmllint/data/Things/plugins.qmltypes b/tests/auto/qml/qmllint/data/Things/plugins.qmltypes
index 47ae34cc00..3b0da602ac 100644
--- a/tests/auto/qml/qmllint/data/Things/plugins.qmltypes
+++ b/tests/auto/qml/qmllint/data/Things/plugins.qmltypes
@@ -112,6 +112,6 @@ Module {
prototype: "QObject"
exports: ["Things/ConstInvokable 1.0"]
exportMetaObjectRevisions: [256]
- Method { name: "getObject"; type: "QObject"; isPointer: true; isConstant: true }
+ Method { name: "getObject"; type: "QObject"; isPointer: true; isTypeConstant: true }
}
}
diff --git a/tests/auto/qml/qmllint/data/jsonArrayIsRecognized.qml b/tests/auto/qml/qmllint/data/jsonArrayIsRecognized.qml
new file mode 100644
index 0000000000..89c52e0e52
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/jsonArrayIsRecognized.qml
@@ -0,0 +1,8 @@
+import QtQuick
+import Qtbug111015 1.0
+
+Item {
+ TypeWithJsonArray {
+ jsonArray: []
+ }
+}
diff --git a/tests/auto/qml/qmllint/data/jsonObjectIsRecognized.qml b/tests/auto/qml/qmllint/data/jsonObjectIsRecognized.qml
new file mode 100644
index 0000000000..0a96fa9f92
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/jsonObjectIsRecognized.qml
@@ -0,0 +1,8 @@
+import QtQuick
+import Qtbug111015 1.0
+
+Item {
+ TypeWithJsonObjectList {
+ jsonObjectList: []
+ }
+}
diff --git a/tests/auto/qml/qmllint/data/something.qml b/tests/auto/qml/qmllint/data/something.qml
new file mode 100644
index 0000000000..38998f606d
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/something.qml
@@ -0,0 +1,2 @@
+import ModuleInImportPath
+A {}
diff --git a/tests/auto/qml/qmllint/lintplugin.cpp b/tests/auto/qml/qmllint/lintplugin.cpp
index 65795c103c..58b174cb6b 100644
--- a/tests/auto/qml/qmllint/lintplugin.cpp
+++ b/tests/auto/qml/qmllint/lintplugin.cpp
@@ -23,7 +23,7 @@ public:
void run(const QQmlSA::Element &element) override
{
auto property = element.property(u"radius"_s);
- if (!property.isValid() || element.property(u"radius"_s).typeName() != u"qreal") {
+ if (!property.isValid() || element.property(u"radius"_s).typeName() != u"double") {
emitWarning(u"Failed to verify radius property", plugin, element.sourceLocation());
return;
}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 57cb7228d8..02b0ea69d2 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -105,6 +105,7 @@ private Q_SLOTS:
void valueTypesFromString();
void ignoreSettingsNotCommandLineOptions();
+ void backslashedQmldirPath();
void environment_data();
void environment();
@@ -113,6 +114,7 @@ private Q_SLOTS:
void testPlugin();
void quickPlugin();
#endif
+
private:
enum DefaultImportOption { NoDefaultImports, UseDefaultImports };
enum ContainOption { StringNotContained, StringContained };
@@ -1026,7 +1028,7 @@ expression: \${expr} \${expr} \\\${expr} \\\${expr}`)",
{ Message { QStringLiteral("Ready") } } } };
QTest::newRow("nullBinding") << QStringLiteral("nullBinding.qml")
<< Result{ { Message{ QStringLiteral(
- "Cannot assign literal of type null to qreal") } } };
+ "Cannot assign literal of type null to double") } } };
QTest::newRow("missingRequiredAlias")
<< QStringLiteral("missingRequiredAlias.qml")
<< Result { { Message {
@@ -1345,6 +1347,8 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("locale") << QStringLiteral("locale.qml");
QTest::newRow("constInvokable") << QStringLiteral("useConstInvokable.qml");
QTest::newRow("dontCheckJSTypes") << QStringLiteral("dontCheckJSTypes.qml");
+ QTest::newRow("jsonObjectIsRecognized") << QStringLiteral("jsonObjectIsRecognized.qml");
+ QTest::newRow("jsonArrayIsRecognized") << QStringLiteral("jsonArrayIsRecognized.qml");
}
void TestQmllint::cleanQmlCode()
@@ -1799,7 +1803,7 @@ void TestQmllint::settingsFile()
.arg(testFile("settings/unusedImportWarning/unused.qml"))));
QVERIFY(runQmllint("settings/bare/bare.qml", false, {}, false, false)
.contains(QStringLiteral("Failed to find the following builtins: "
- "builtins.qmltypes, jsroot.qmltypes")));
+ "jsroot.qmltypes, builtins.qmltypes")));
QVERIFY(runQmllint("settings/qmltypes/qmltypes.qml", false, QStringList(), false)
.contains(QStringLiteral("not a qmldir file. Assuming qmltypes.")));
QVERIFY(runQmllint("settings/qmlimports/qmlimports.qml", true, QStringList(), false).isEmpty());
@@ -1907,7 +1911,7 @@ void TestQmllint::missingBuiltinsNoCrash()
checkResult(warnings,
Result { { Message { QStringLiteral("Failed to find the following builtins: "
- "builtins.qmltypes, jsroot.qmltypes") } } });
+ "jsroot.qmltypes, builtins.qmltypes") } } });
}
void TestQmllint::absolutePath()
@@ -2120,7 +2124,7 @@ void TestQmllint::quickPlugin()
Message { u"SplitView attached property only works with Items"_s },
Message { u"ScrollIndicator must be attached to a Flickable"_s },
Message { u"ScrollBar must be attached to a Flickable or ScrollView"_s },
- Message { u"Accessible must be attached to an Item"_s },
+ Message { u"Accessible must be attached to an Item or an Action"_s },
Message { u"EnterKey attached property only works with Items"_s },
Message {
u"LayoutDirection attached property only works with Items and Windows"_s },
@@ -2252,5 +2256,14 @@ void TestQmllint::ignoreSettingsNotCommandLineOptions()
QCOMPARE(output, QString());
}
+void TestQmllint::backslashedQmldirPath()
+{
+ const QString qmldirPath
+ = testFile(u"ImportPath/ModuleInImportPath/qmldir"_s).replace('/', QDir::separator());
+ const QString output = runQmllint(
+ testFile(u"something.qml"_s), true, QStringList{ u"-i"_s, qmldirPath });
+ QVERIFY(output.isEmpty());
+}
+
QTEST_GUILESS_MAIN(TestQmllint)
#include "tst_qmllint.moc"
diff --git a/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp b/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp
index 31c27c3cd7..cdbd9695fd 100644
--- a/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp
+++ b/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp
@@ -153,7 +153,7 @@ void tst_qmltc_qprocess::noBuiltins()
QVERIFY(file.rename(original));
};
- for (QString builtin : { u"builtins.qmltypes"_s, u"jsroot.qmltypes"_s }) {
+ for (QString builtin : { u"jsroot.qmltypes"_s, u"builtins.qmltypes"_s }) {
const auto path = QLibraryInfo::path(QLibraryInfo::QmlImportsPath) + u"/"_s + builtin;
QScopeGuard scope(std::bind(renameBack, path));
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
index 822caea0d0..e79e9b84b6 100644
--- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
+++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
@@ -498,17 +498,17 @@ void tst_qmltyperegistrar::hasIsConstantInParameters()
QVERIFY(qmltypesData.contains(R"( Signal {
name: "mySignal"
Parameter { name: "myObject"; type: "QObject"; isPointer: true }
- Parameter { name: "myConstObject"; type: "QObject"; isPointer: true; isConstant: true }
- Parameter { name: "myConstObject2"; type: "QObject"; isPointer: true; isConstant: true }
+ Parameter { name: "myConstObject"; type: "QObject"; isPointer: true; isTypeConstant: true }
+ Parameter { name: "myConstObject2"; type: "QObject"; isPointer: true; isTypeConstant: true }
Parameter { name: "myObject2"; type: "QObject"; isPointer: true }
- Parameter { name: "myConstObject3"; type: "QObject"; isPointer: true; isConstant: true }
+ Parameter { name: "myConstObject3"; type: "QObject"; isPointer: true; isTypeConstant: true }
}
)"));
QVERIFY(qmltypesData.contains(R"(Signal {
name: "myVolatileSignal"
- Parameter { name: "a"; type: "volatile QObject"; isPointer: true; isConstant: true }
- Parameter { name: "b"; type: "volatile QObject"; isPointer: true; isConstant: true }
+ Parameter { name: "a"; type: "volatile QObject"; isPointer: true; isTypeConstant: true }
+ Parameter { name: "b"; type: "volatile QObject"; isPointer: true; isTypeConstant: true }
Parameter { name: "nonConst"; type: "volatile QObject"; isPointer: true }
}
)"));
@@ -682,7 +682,6 @@ void tst_qmltyperegistrar::constructibleValueType()
name: "Constructible"
accessSemantics: "value"
exports: ["QmlTypeRegistrarTest/constructible 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
Method {
name: "Constructible"
@@ -701,7 +700,6 @@ void tst_qmltyperegistrar::structuredValueType()
name: "Structured"
accessSemantics: "value"
exports: ["QmlTypeRegistrarTest/structured 1.0"]
- isCreatable: true
isStructured: true
exportMetaObjectRevisions: [256]
Property { name: "i"; type: "int"; index: 0; isFinal: true }
@@ -735,51 +733,50 @@ void tst_qmltyperegistrar::typedEnum()
accessSemantics: "reference"
prototype: "QObject"
exports: ["QmlTypeRegistrarTest/TypedEnum 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
Enum {
name: "UChar"
- type: "uchar"
+ type: "quint8"
values: ["V0"]
}
Enum {
name: "Int8_T"
- type: "int8_t"
+ type: "qint8"
values: ["V1"]
}
Enum {
name: "UInt8_T"
- type: "uint8_t"
+ type: "quint8"
values: ["V2"]
}
Enum {
name: "Int16_T"
- type: "int16_t"
+ type: "short"
values: ["V3"]
}
Enum {
name: "UInt16_T"
- type: "uint16_t"
+ type: "ushort"
values: ["V4"]
}
Enum {
name: "Int32_T"
- type: "int32_t"
+ type: "int"
values: ["V5"]
}
Enum {
name: "UInt32_T"
- type: "uint32_t"
+ type: "uint"
values: ["V6"]
}
Enum {
name: "S"
- type: "qint16"
+ type: "short"
values: ["A", "B", "C"]
}
Enum {
name: "T"
- type: "quint16"
+ type: "ushort"
values: ["D", "E", "F"]
}
Enum {
@@ -805,7 +802,7 @@ void tst_qmltyperegistrar::listSignal()
prototype: "QObject"
Signal {
name: "objectListHappened"
- Parameter { type: "QList<QObject*>" }
+ Parameter { type: "QObjectList" }
}
})"));
}
@@ -823,7 +820,7 @@ void tst_qmltyperegistrar::withNamespace()
read: "bar"
index: 0
isReadonly: true
- isConstant: true
+ isPropertyConstant: true
}
})"));
@@ -833,9 +830,15 @@ void tst_qmltyperegistrar::withNamespace()
accessSemantics: "reference"
prototype: "Testing::Foo"
exports: ["QmlTypeRegistrarTest/Bar 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
- Property { name: "barProp"; type: "int"; read: "bar"; index: 0; isReadonly: true; isConstant: true }
+ Property {
+ name: "barProp"
+ type: "int"
+ read: "bar"
+ index: 0
+ isReadonly: true
+ isPropertyConstant: true
+ }
})"));
QVERIFY(qmltypesData.contains(R"(Component {
@@ -843,7 +846,14 @@ void tst_qmltyperegistrar::withNamespace()
name: "Testing::Foo"
accessSemantics: "reference"
prototype: "QObject"
- Property { name: "fooProp"; type: "int"; read: "foo"; index: 0; isReadonly: true; isConstant: true }
+ Property {
+ name: "fooProp"
+ type: "int"
+ read: "foo"
+ index: 0
+ isReadonly: true
+ isPropertyConstant: true
+ }
})"));
QVERIFY(qmltypesData.contains(R"(Component {
@@ -853,7 +863,6 @@ void tst_qmltyperegistrar::withNamespace()
prototype: "Testing::Bar"
extension: "Bar"
exports: ["QmlTypeRegistrarTest/Baz 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
attachedType: "Testing::Foo"
})"));
@@ -937,7 +946,6 @@ void tst_qmltyperegistrar::nameExplosion()
"QmlTypeRegistrarTest/Name2 1.0",
"QmlTypeRegistrarTest/NameExplosion 1.0"
]
- isCreatable: true
exportMetaObjectRevisions: [256]
})"));
@@ -962,7 +970,6 @@ void tst_qmltyperegistrar::javaScriptExtension()
extension: "SymbolPrototype"
extensionIsJavaScript: true
exports: ["QmlTypeRegistrarTest/JavaScriptExtension 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
})"));
}
@@ -978,7 +985,6 @@ void tst_qmltyperegistrar::relatedAddedInVersion()
"QmlTypeRegistrarTest/AddedIn1_0 1.0",
"QmlTypeRegistrarTest/AddedIn1_0 1.5"
]
- isCreatable: true
exportMetaObjectRevisions: [256, 261]
})"));
}
@@ -991,12 +997,11 @@ void tst_qmltyperegistrar::longNumberTypes()
accessSemantics: "reference"
prototype: "QObject"
exports: ["QmlTypeRegistrarTest/LongNumberTypes 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
- Property { name: "a"; type: "qint64"; index: 0 }
- Property { name: "b"; type: "int64_t"; index: 1 }
- Property { name: "c"; type: "quint64"; index: 2 }
- Property { name: "d"; type: "uint64_t"; index: 3 }
+ Property { name: "a"; type: "qlonglong"; index: 0 }
+ Property { name: "b"; type: "qlonglong"; index: 1 }
+ Property { name: "c"; type: "qulonglong"; index: 2 }
+ Property { name: "d"; type: "qulonglong"; index: 3 }
})"));
}
@@ -1017,9 +1022,66 @@ void tst_qmltyperegistrar::constReturnType()
accessSemantics: "reference"
prototype: "QObject"
exports: ["QmlTypeRegistrarTest/ConstInvokable 1.0"]
- isCreatable: true
exportMetaObjectRevisions: [256]
- Method { name: "getObject"; type: "QObject"; isPointer: true; isConstant: true }
+ Method { name: "getObject"; type: "QObject"; isPointer: true; isTypeConstant: true }
+ })"));
+}
+
+void tst_qmltyperegistrar::usingDeclaration()
+{
+ QVERIFY(qmltypesData.contains(R"(Component {
+ file: "tst_qmltyperegistrar.h"
+ name: "WithMyInt"
+ accessSemantics: "reference"
+ prototype: "QObject"
+ exports: ["QmlTypeRegistrarTest/WithMyInt 1.0"]
+ exportMetaObjectRevisions: [256]
+ Property { name: "a"; type: "int"; read: "a"; index: 0; isReadonly: true; isPropertyConstant: true }
+ })"));
+}
+
+void tst_qmltyperegistrar::enumsRegistered()
+{
+ QCOMPARE(QMetaType::fromName("SizeEnums::Unit"), QMetaType::fromType<SizeEnums::Unit>());
+ QCOMPARE(QMetaType::fromName("Local::Flag"), QMetaType::fromType<Local::Flag>());
+ QCOMPARE(QMetaType::fromName("Local::Flags"), QMetaType::fromType<Local::Flags>());
+ QCOMPARE(QMetaType::fromName("ValueTypeWithEnum1::Quality"),
+ QMetaType::fromType<ValueTypeWithEnum1::Quality>());
+ QCOMPARE(QMetaType::fromName("ValueTypeWithEnum2::Quality"),
+ QMetaType::fromType<ValueTypeWithEnum2::Quality>());
+ QCOMPARE(QMetaType::fromName("BaseNamespace::BBB"), QMetaType::fromType<BaseNamespace::BBB>());
+ QCOMPARE(QMetaType::fromName("ExtensionValueType::EEE"),
+ QMetaType::fromType<ExtensionValueType::EEE>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::UChar"), QMetaType::fromType<TypedEnum::UChar>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::Int8_T"), QMetaType::fromType<TypedEnum::Int8_T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::UInt8_T"), QMetaType::fromType<TypedEnum::UInt8_T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::Int16_T"), QMetaType::fromType<TypedEnum::Int16_T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::UInt16_T"), QMetaType::fromType<TypedEnum::UInt16_T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::Int32_T"), QMetaType::fromType<TypedEnum::Int32_T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::UInt32_T"), QMetaType::fromType<TypedEnum::UInt32_T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::S"), QMetaType::fromType<TypedEnum::S>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::T"), QMetaType::fromType<TypedEnum::T>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::U"), QMetaType::fromType<TypedEnum::U>());
+ QCOMPARE(QMetaType::fromName("TypedEnum::V"), QMetaType::fromType<TypedEnum::V>());
+ QCOMPARE(QMetaType::fromName("NetworkManager::NM"), QMetaType::fromType<NetworkManager::NM>());
+ QCOMPARE(QMetaType::fromName("NotNamespace::Abc"), QMetaType::fromType<NotNamespace::Abc>());
+}
+
+void tst_qmltyperegistrar::doNotDuplicateQtNamespace()
+{
+ QVERIFY(!qmltypesData.contains(R"(file: "qnamespace.h")"));
+}
+
+void tst_qmltyperegistrar::slotsBeforeInvokables()
+{
+ QVERIFY(qmltypesData.contains(R"(Component {
+ file: "tst_qmltyperegistrar.h"
+ name: "SlotsBeforeInvokables"
+ accessSemantics: "reference"
+ prototype: "QObject"
+ Method { name: "bar" }
+ Method { name: "foo" }
+ Method { name: "baz" }
})"));
}
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
index 371fb840d1..1eff2af024 100644
--- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
+++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
@@ -17,6 +17,7 @@
#include <QtQml/qqmlcomponent.h>
#include <QtCore/qabstractitemmodel.h>
+#include <QtCore/qnamespace.h>
#include <QtCore/qproperty.h>
#include <QtCore/qrect.h>
#include <QtCore/qtemporaryfile.h>
@@ -792,6 +793,45 @@ public:
Q_INVOKABLE const QObject *getObject() { return nullptr; }
};
+using myint = int;
+
+struct IntAlias
+{
+ Q_GADGET
+ QML_FOREIGN(myint)
+ QML_USING(int);
+};
+
+class WithMyInt : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+ Q_PROPERTY(myint a READ a CONSTANT)
+public:
+ myint a() const { return 10; }
+};
+
+class UsesQtNamespace : public QObject
+{
+ Q_OBJECT
+ QML_ANONYMOUS
+ Q_PROPERTY(Qt::Key key READ key CONSTANT)
+public:
+ Qt::Key key() const { return Qt::Key_Escape; }
+};
+
+class SlotsBeforeInvokables : public QObject
+{
+ Q_OBJECT
+ QML_ANONYMOUS
+public:
+ Q_INVOKABLE void foo() {}
+public Q_SLOTS:
+ void bar() {}
+public:
+ Q_INVOKABLE void baz() {}
+};
+
class tst_qmltyperegistrar : public QObject
{
Q_OBJECT
@@ -865,6 +905,11 @@ private slots:
void enumList();
void constReturnType();
+ void usingDeclaration();
+ void enumsRegistered();
+ void doNotDuplicateQtNamespace();
+ void slotsBeforeInvokables();
+
private:
QByteArray qmltypesData;
};
diff --git a/tests/auto/qml/qqmlbinding/CMakeLists.txt b/tests/auto/qml/qqmlbinding/CMakeLists.txt
index 0419240921..0249bb0f25 100644
--- a/tests/auto/qml/qqmlbinding/CMakeLists.txt
+++ b/tests/auto/qml/qqmlbinding/CMakeLists.txt
@@ -28,6 +28,7 @@ qt_internal_add_test(tst_qqmlbinding
Qt::Gui
Qt::GuiPrivate
Qt::QmlPrivate
+ Qt::QmlMetaPrivate
Qt::QuickPrivate
Qt::QuickTestUtilsPrivate
TESTDATA ${test_data}
@@ -42,6 +43,7 @@ qt_internal_add_test(tst_qqmlbinding_no_deferred_properties
Qt::Gui
Qt::GuiPrivate
Qt::QmlPrivate
+ Qt::QmlMetaPrivate
Qt::QuickPrivate
Qt::QuickTestUtilsPrivate
TESTDATA ${test_data}
diff --git a/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp
index 494d765798..b13379a103 100644
--- a/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp
+++ b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp
@@ -1,13 +1,17 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
-#include <qtest.h>
+
+#include "WithBindableProperties.h"
+
+#include <private/qmlutils_p.h>
+#include <private/qqmlbind_p.h>
+#include <private/qqmlcomponentattached_p.h>
+#include <private/qquickrectangle_p.h>
+
+#include <QtTest/qtest.h>
+
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
-#include <QtQml/private/qqmlbind_p.h>
-#include <QtQml/private/qqmlcomponentattached_p.h>
-#include <QtQuick/private/qquickrectangle_p.h>
-#include <QtQuickTestUtils/private/qmlutils_p.h>
-#include "WithBindableProperties.h"
class tst_qqmlbinding : public QQmlDataTest
{
diff --git a/tests/auto/qml/qqmlconnections/CMakeLists.txt b/tests/auto/qml/qqmlconnections/CMakeLists.txt
index dd1814fed1..0e6947370d 100644
--- a/tests/auto/qml/qqmlconnections/CMakeLists.txt
+++ b/tests/auto/qml/qqmlconnections/CMakeLists.txt
@@ -27,6 +27,7 @@ qt_internal_add_test(tst_qqmlconnections
Qt::Gui
Qt::GuiPrivate
Qt::QmlPrivate
+ Qt::QmlMetaPrivate
Qt::QuickPrivate
Qt::QuickTestUtilsPrivate
TESTDATA ${test_data}
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index bd60093a7b..79e26b65db 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -8034,7 +8034,7 @@ public:
void init(QV4::ExecutionEngine *v4, QV4::WeakValue *weakRef, bool *resultPtr)
{
- QV4::QObjectWrapper::wrap(v4, this);
+ (void) QV4::QObjectWrapper::wrap(v4, this); // Intentionally drop the wrapper
QQmlEngine::setObjectOwnership(this, QQmlEngine::JavaScriptOwnership);
this->resultPtr = resultPtr;
diff --git a/tests/auto/qml/qqmlimport/CMakeLists.txt b/tests/auto/qml/qqmlimport/CMakeLists.txt
index 803234787b..b8b720f5dc 100644
--- a/tests/auto/qml/qqmlimport/CMakeLists.txt
+++ b/tests/auto/qml/qqmlimport/CMakeLists.txt
@@ -35,6 +35,7 @@ qt_internal_add_test(tst_qqmlimport
SOURCES
tst_qqmlimport.cpp
LIBRARIES
+ Qt::CorePrivate
Qt::Gui
Qt::Qml
Qt::QmlPrivate
@@ -58,6 +59,13 @@ qt_internal_add_resource(tst_qqmlimport "preferred2"
"qmldir"
)
+qt_internal_add_resource(tst_qqmlimport "qtconf"
+ PREFIX
+ "/"
+ FILES
+ "qmlimports.qt.conf"
+)
+
## Scopes:
#####################################################################
diff --git a/tests/auto/qml/qqmlimport/qmlimports.qt.conf b/tests/auto/qml/qqmlimport/qmlimports.qt.conf
new file mode 100644
index 0000000000..3a63cc797f
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/qmlimports.qt.conf
@@ -0,0 +1,3 @@
+[Paths]
+Prefix = ""
+QmlImports = ":/a/path", ":/another/path", ":/even/more/path"
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index ff1513d0d6..fe14281387 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -17,6 +17,7 @@
#include <QtCore/qscopeguard.h>
#include <QtCore/qlibraryinfo.h>
+#include <QtCore/private/qlibraryinfo_p.h>
class TheThing : public QObject
{
@@ -68,6 +69,7 @@ private slots:
void qualifiedScriptImport();
void invalidImportUrl();
void registerTypesFromImplicitImport();
+ void containsAllQtConfEntries();
private:
QQmlModuleRegistration noimportRegistration;
@@ -202,6 +204,22 @@ void tst_QQmlImport::registerTypesFromImplicitImport()
QCOMPARE(t->m_width, 640);
}
+void tst_QQmlImport::containsAllQtConfEntries()
+{
+ QString qtConfPath(u":/qmlimports.qt.conf");
+ QLibraryInfoPrivate::setQtconfManualPath(&qtConfPath);
+ QLibraryInfoPrivate::reload();
+ auto cleanup = qScopeGuard([](){
+ QLibraryInfoPrivate::setQtconfManualPath(nullptr);
+ QLibraryInfoPrivate::reload();
+ });
+ QQmlEngine engine;
+ auto importPaths = engine.importPathList();
+ QVERIFY(importPaths.contains(u"qrc:/a/path"));
+ QVERIFY(importPaths.contains(u"qrc:/another/path"));
+ QVERIFY(importPaths.contains(u"qrc:/even/more/path"));
+}
+
void tst_QQmlImport::testDesignerSupported()
{
std::unique_ptr<QQuickView> window = std::make_unique<QQuickView>();
diff --git a/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired1.qml b/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired1.qml
new file mode 100644
index 0000000000..f549e851a3
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired1.qml
@@ -0,0 +1,6 @@
+pragma Singleton
+import QtQml
+
+QtObject {
+ required property int i
+}
diff --git a/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired2.qml b/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired2.qml
new file mode 100644
index 0000000000..1f9e7e3a42
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/SingletonWithRequired2.qml
@@ -0,0 +1,8 @@
+pragma Singleton
+import QtQml
+
+QtObject {
+ property QtObject o: QtObject {
+ required property int i
+ }
+}
diff --git a/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/qmldir b/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/qmldir
new file mode 100644
index 0000000000..46e397ca76
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/SingletonWithRequiredProperties/qmldir
@@ -0,0 +1,4 @@
+module SingletonWithRequiredProperties
+
+singleton SingletonWithRequired1 1.0 SingletonWithRequired1.qml
+singleton SingletonWithRequired2 1.0 SingletonWithRequired2.qml
diff --git a/tests/auto/qml/qqmllanguage/data/asValueType.qml b/tests/auto/qml/qqmllanguage/data/asValueType.qml
index 6a5500e344..b51dc9c6ec 100644
--- a/tests/auto/qml/qqmllanguage/data/asValueType.qml
+++ b/tests/auto/qml/qqmllanguage/data/asValueType.qml
@@ -10,4 +10,11 @@ QtObject {
property var e: ({x: 10, y: 20}) as point
property var f: "red" as withString
property var g: "green" as string
+ property rect bb
+ property var p: bb as size;
+ property var q: this as size;
+ property var r: ({}) as size;
+ property var s: 11 as size;
+ property var t: Component as size;
+ property var u: Qt as size;
}
diff --git a/tests/auto/qml/qqmllanguage/data/asValueTypeGood.qml b/tests/auto/qml/qqmllanguage/data/asValueTypeGood.qml
new file mode 100644
index 0000000000..777ada3848
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/asValueTypeGood.qml
@@ -0,0 +1,35 @@
+pragma ValueTypeBehavior: Assertable
+import QtQml as Q
+import StaticTest as S
+
+Q.QtObject {
+ property var a
+ property rect b: a as Q.rect
+ property bool c: a instanceof Q.rect
+ property bool d: ({x: 10, y: 20}) instanceof Q.point
+ property var e: ({x: 10, y: 20}) as Q.point
+ property var f: "red" as S.withString
+ property var g: "green" as Q.string
+
+ property var h: new S.withString("red")
+ property var i: {
+ let p = new Q.point;
+ p.x = 10
+ p.y = 20
+ return p
+ }
+
+ property var j: 4.0 as Q.int
+ property var k: (4.5 / 1.5) as Q.int
+ property var l: 5 as Q.double
+ property var m: "something" as Q.var
+ property var n: 1 as Q.bool
+ property var o: Infinity as Q.int
+
+ property var p: b as Q.size;
+ property var q: this as Q.size;
+ property var r: ({}) as Q.size;
+ property var s: 11 as Q.size;
+ property var t: Q.Component as Q.size;
+ property var u: Q.Qt as Q.size;
+}
diff --git a/tests/auto/qml/qqmllanguage/data/invokableCtors.qml b/tests/auto/qml/qqmllanguage/data/invokableCtors.qml
new file mode 100644
index 0000000000..35a8d7bf08
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/invokableCtors.qml
@@ -0,0 +1,12 @@
+import QtQml as QQ
+import Test as VV
+
+QQ.QtObject {
+ property QQ.QtObject oo: new QQ.QtObject()
+ property QQ.QtObject pp: new QQ.QtObject(oo)
+ property VV.vv v: new VV.vv("green")
+
+ property VV.InvokableSingleton i: new VV.InvokableSingleton(5, oo)
+ property VV.InvokableExtended k: new VV.InvokableExtended()
+ property VV.InvokableUncreatable l: new VV.InvokableUncreatable()
+}
diff --git a/tests/auto/qml/qqmllanguage/data/jsonArrayProperty.qml b/tests/auto/qml/qqmllanguage/data/jsonArrayProperty.qml
new file mode 100644
index 0000000000..5bd563a288
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/jsonArrayProperty.qml
@@ -0,0 +1,191 @@
+import QtQml
+import TypeWithQJsonArrayProperty
+
+TypeWithQJsonArrayProperty {
+ function jsArray() { return [1, 2, 3] }
+
+ jsonArray: jsArray()
+
+ property list<int> concatenatedJsonArray: jsonArray.concat([4, 5, 6])
+ property list<int> concatenatedJsArray: jsArray().concat([4, 5, 6])
+
+ property bool entriesMatch: {
+ var iterator = jsonArray.entries();
+ for (var [index, element] of jsArray().entries()) {
+ var v = iterator.next().value;
+ if (index !== v[0] || element !== v[1]) {
+ console.log(index, v[0], element, v[1]);
+ return false;
+ }
+ }
+
+ var iterator = jsArray().entries();
+ for (var [index, element] of jsonArray.entries()) {
+ var v = iterator.next().value;
+ if (index !== v[0] || element !== v[1]) {
+ console.log(index, v[0], element, v[1]);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ property bool jsonArrayEvery: jsonArray.every(element => element != 0)
+ property bool jsArrayEvery: jsArray().every(element => element != 0)
+
+ property list<int> jsonArrayFiltered: jsonArray.filter(element => element > 2)
+ property list<int> jsArrayFiltered: jsArray().filter(element => element > 2)
+
+ property int jsonArrayFind: jsonArray.find(element => element === 2)
+ property int jsArrayFind: jsArray().find(element => element === 2)
+
+ property int jsonArrayFindIndex: jsonArray.findIndex(element => element === 1)
+ property int jsArrayFindIndex: jsArray().findIndex(element => element === 1)
+
+ property string jsonArrayForEach
+ property string jsArrayForEach
+
+ property bool jsonArrayIncludes: jsonArray.includes(3)
+ property bool jsArrayIncludes: jsArray().includes(3)
+
+ property int jsonArrayIndexOf: jsonArray.indexOf(2)
+ property int jsArrayIndexOf: jsArray().indexOf(2)
+
+ property string jsonArrayJoin: jsonArray.join()
+ property string jsArrayJoin: jsArray().join()
+
+ property bool keysMatch: {
+ var iterator = jsonArray.keys();
+ for (var index of jsArray().keys()) {
+ var v = iterator.next().value;
+ if (index !== v) {
+ console.log(index, v);
+ return false;
+ }
+ }
+
+ var iterator = jsArray().keys();
+ for (var index of jsonArray.keys()) {
+ var v = iterator.next().value;
+ if (index !== v) {
+ console.log(index, v);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ property int jsonArrayLastIndexOf: jsonArray.lastIndexOf(1)
+ property int jsArrayLastIndexOf: jsArray().lastIndexOf(1)
+
+ property list<string> jsonArrayMap: jsonArray.map(element => element.toString())
+ property list<string> jsArrayMap: jsArray().map(element => element.toString())
+
+ property int jsonArrayReduce: jsonArray.reduce((acc, element) => acc - element, 40)
+ property int jsArrayReduce: jsArray().reduce((acc, element) => acc - element, 40)
+
+ property string jsonArrayReduceRight: jsonArray.reduceRight((acc, element) => acc + element.toString(), "")
+ property string jsArrayReduceRight: jsArray().reduceRight((acc, element) => acc + element.toString(), "")
+
+ property list<int> jsonArraySlice: jsonArray.slice(0, 1)
+ property list<int> jsArraySlice: jsArray().slice(0, 1)
+
+ property bool jsonArraySome: jsonArray.some(element => element === 1)
+ property bool jsArraySome: jsArray().some(element => element === 1)
+
+ property string stringifiedLocaleJsonArray: jsonArray.toLocaleString()
+ property string stringifiedLocaleJsArray: jsArray().toLocaleString()
+
+ property string stringifiedJsonArray: jsonArray.toString()
+ property string stringifiedJsArray: jsArray().toString()
+
+ property bool valuesMatch: {
+ var iterator = jsonArray.values();
+ for (var obj of jsArray().values()) {
+ var v = iterator.next().value;
+ if (obj !== v) {
+ console.log(obj, v);
+ return false;
+ }
+ }
+
+ var iterator = jsArray().values();
+ for (var obj of jsonArray.values()) {
+ var v = iterator.next().value;
+ if (obj !== v) {
+ console.log(obj, v);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ // In-place mutation methods.
+ // Set by onCompleted if mutating jsonArray and then accessing it
+ // respects the mutation and the mutation behaves as for an array.
+ property bool jsonArrayWasCopiedWithin: false
+ property bool jsonArrayWasFilled: false
+ property bool jsonArrayWasPopped: false
+ property bool jsonArrayWasPushed: false
+ property bool jsonArrayWasReversed: false
+ property bool jsonArrayWasShifted: false
+ property bool jsonArrayWasSpliced: false
+ property bool jsonArrayWasUnshifted: false
+ property bool jsonArrayWasSorted: false
+
+ Component.onCompleted: {
+ function equals(lhs, rhs) {
+ return lhs.toString() === rhs.toString()
+ }
+
+ jsonArray.forEach(element => jsonArrayForEach += "-" + element + "-");
+ jsArray().forEach(element => jsArrayForEach += "-" + element + "-");
+
+ var array = jsArray()
+
+ jsonArray.copyWithin(1, 0, 1)
+ array.copyWithin(1, 0, 1)
+ jsonArrayWasCopiedWithin = equals(jsonArray, array)
+
+ jsonArray.fill(7, 0, 1)
+ array.fill(7, 0, 1)
+ jsonArrayWasFilled = equals(jsonArray, array)
+
+ jsonArray.pop()
+ array.pop()
+ jsonArrayWasPopped = equals(jsonArray, array)
+
+ jsonArray.push(23)
+ jsonArray.push(11)
+ jsonArray.push(54)
+ jsonArray.push(42)
+ array.push(23)
+ array.push(11)
+ array.push(54)
+ array.push(42)
+ jsonArrayWasPushed = equals(jsonArray, array)
+
+ jsonArray.reverse()
+ array.reverse()
+ jsonArrayWasReversed = equals(jsonArray, array)
+
+ jsonArray.shift()
+ array.shift()
+ jsonArrayWasShifted = equals(jsonArray, array)
+
+ jsonArray.splice(2, 1, [1, 2], 7, [1, 5])
+ array.splice(2, 1, [1, 2], 7, [1, 5])
+ jsonArrayWasSpliced = equals(jsonArray, array)
+
+ jsonArray.unshift(4, 71)
+ array.unshift(4, 71)
+ jsonArrayWasUnshifted = equals(jsonArray, array)
+
+ jsonArray.sort()
+ array.sort()
+ jsonArrayWasSorted = equals(jsonArray, array)
+ }
+}
diff --git a/tests/auto/qml/qqmllanguage/data/nestedVectors.qml b/tests/auto/qml/qqmllanguage/data/nestedVectors.qml
new file mode 100644
index 0000000000..0bcea52133
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/nestedVectors.qml
@@ -0,0 +1,27 @@
+import Test
+import QtQml
+
+NestedVectors {
+ id: self
+
+ property var list1
+
+ Component.onCompleted: {
+ list1 = self.getList()
+
+ let list2 = []
+ let data1 = []
+ data1.push(2)
+ data1.push(3)
+ data1.push(4)
+
+ let data2 = []
+ data2.push(5)
+ data2.push(6)
+
+ list2.push(data1)
+ list2.push(data2)
+
+ self.setList(list2)
+ }
+}
diff --git a/tests/auto/qml/qqmllanguage/data/optimizedSequenceShift.qml b/tests/auto/qml/qqmllanguage/data/optimizedSequenceShift.qml
new file mode 100644
index 0000000000..32765895a0
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/optimizedSequenceShift.qml
@@ -0,0 +1,14 @@
+import QtQml
+
+QtObject {
+ id: root
+
+ property int changes: 0
+
+ property list<int> numbers: [1, 2, 3, 4, 5]
+ onNumbersChanged: ++changes
+
+ property var one: numbers.shift.bind([1,2,3])()
+
+ Component.onCompleted: root.numbers.shift()
+}
diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp
index ffff0a6979..526cca4b5b 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.cpp
+++ b/tests/auto/qml/qqmllanguage/testtypes.cpp
@@ -174,6 +174,14 @@ void registerTypes()
qmlRegisterTypesAndRevisions<NonSingleton>("EnumScopeTest", 1);
qmlRegisterTypesAndRevisions<EnumProviderSingletonQml>("EnumScopeTest", 1);
+ qmlRegisterTypesAndRevisions<TypeWithQJsonArrayProperty>("TypeWithQJsonArrayProperty", 1);
+ qmlRegisterTypesAndRevisions<
+ InvokableSingleton,
+ InvokableExtended,
+ InvokableUncreatable,
+ InvokableValueType
+ >("Test", 1);
+ qmlRegisterTypesAndRevisions<NestedVectors>("Test", 1);
}
QVariant myCustomVariantTypeConverter(const QString &data)
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h
index bcf02c1cf9..ce6abf3504 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.h
+++ b/tests/auto/qml/qqmllanguage/testtypes.h
@@ -6,6 +6,7 @@
#include <QtCore/qobject.h>
#include <QtCore/qrect.h>
#include <QtCore/qdatetime.h>
+#include <QtCore/qjsonarray.h>
#include <QtGui/qtransform.h>
#include <QtGui/qcolor.h>
#include <QtGui/qvector2d.h>
@@ -2942,4 +2943,104 @@ public:
}
};
+class TypeWithQJsonArrayProperty : public QObject {
+ Q_OBJECT
+ QML_ELEMENT
+
+ Q_PROPERTY(QJsonArray jsonArray READ jsonArray WRITE setJsonArray NOTIFY jsonArrayChanged)
+
+public:
+ TypeWithQJsonArrayProperty(QObject *parent = nullptr) : QObject(parent) {}
+
+ const QJsonArray& jsonArray() { return m_jsonArray; }
+ void setJsonArray(const QJsonArray& a) { m_jsonArray = a; }
+
+signals:
+ void jsonArrayChanged();
+
+private:
+ QJsonArray m_jsonArray;
+};
+
+class InvokableSingleton : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+ QML_SINGLETON
+public:
+ InvokableSingleton() = default;
+ Q_INVOKABLE InvokableSingleton(int a, QObject *parent) : QObject(parent), m_a(a) {}
+
+ int m_a = 0;
+};
+
+class InvokableExtension : public QObject
+{
+ Q_OBJECT
+public:
+ Q_INVOKABLE InvokableExtension(QObject *parent = nullptr) : QObject(parent) {}
+};
+
+class InvokableExtended : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+ QML_EXTENDED(InvokableExtension)
+
+public:
+ Q_INVOKABLE InvokableExtended() = default;
+};
+
+class InvokableUncreatable : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+ QML_UNCREATABLE("no")
+
+public:
+ Q_INVOKABLE InvokableUncreatable() = default;
+};
+
+class InvokableValueType
+{
+ Q_GADGET
+ QML_VALUE_TYPE(vv)
+public:
+ Q_INVOKABLE InvokableValueType() = default;
+ Q_INVOKABLE InvokableValueType(const QString &s) : m_s(s) {}
+ QString m_s;
+};
+
+class NestedVectors : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+public:
+ NestedVectors(QObject *parent = nullptr) : QObject(parent)
+ {
+ std::vector<int> data;
+ data.push_back(1);
+ data.push_back(2);
+ data.push_back(3);
+ m_list.push_back(data);
+ data.clear();
+ data.push_back(4);
+ data.push_back(5);
+ m_list.push_back(data);
+ }
+
+ Q_INVOKABLE std::vector<std::vector<int>> getList()
+ {
+ return m_list;
+ }
+
+ Q_INVOKABLE void setList(std::vector<std::vector<int>> list)
+ {
+ m_list = list;
+ }
+
+private:
+ std::vector<std::vector<int>> m_list;
+};
+
#endif // TESTTYPES_H
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 2f382e8d8e..b90dfd2b53 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -38,7 +38,7 @@
#include <deque>
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_DARWIN)
#include <unistd.h>
#endif
@@ -48,7 +48,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
static inline bool isCaseSensitiveFileSystem(const QString &path) {
Q_UNUSED(path);
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_DARWIN)
return pathconf(path.toLatin1().constData(), _PC_CASE_SENSITIVE);
#elif defined(Q_OS_WIN)
return false;
@@ -249,6 +249,8 @@ private slots:
void compositeSingletonSelectors();
void compositeSingletonRegistered();
void compositeSingletonCircular();
+ void compositeSingletonRequiredProperties();
+ void compositeSingletonRequiredProperties_data();
void singletonsHaveContextAndEngine();
@@ -410,7 +412,9 @@ private slots:
void objectAndGadgetMethodCallsRejectThisObject();
void objectAndGadgetMethodCallsAcceptThisObject();
+
void asValueType();
+ void asValueTypeGood();
void longConversion();
@@ -453,6 +457,12 @@ private slots:
void enumScopes();
void typedObjectList();
+ void invokableCtors();
+
+ void jsonArrayPropertyBehavesLikeAnArray();
+
+ void nestedVectors();
+ void optimizedSequenceShift();
private:
QQmlEngine engine;
@@ -4907,6 +4917,36 @@ void tst_qqmllanguage::compositeSingletonCircular()
QCOMPARE(o->property("value").toInt(), 2);
}
+void tst_qqmllanguage::compositeSingletonRequiredProperties()
+{
+ QFETCH(QString, warning);
+ QFETCH(QString, singletonName);
+ QQmlEngine engine;
+ engine.addImportPath(dataDirectory());
+ {
+ QTest::ignoreMessage(QtMsgType::QtWarningMsg, qPrintable(warning));
+ std::unique_ptr<QObject> singleton {engine.singletonInstance<QObject *>(
+ "SingletonWithRequiredProperties",
+ singletonName
+ )};
+ QVERIFY(!singleton);
+ }
+}
+
+void tst_qqmllanguage::compositeSingletonRequiredProperties_data()
+{
+ QTest::addColumn<QString>("warning");
+ QTest::addColumn<QString>("singletonName");
+
+ QString warning1 = testFileUrl("SingletonWithRequiredProperties/SingletonWithRequired1.qml").toString()
+ + ":5:5: Required property i was not initialized";
+ QString warning2 = testFileUrl("SingletonWithRequiredProperties/SingletonWithRequired2.qml").toString()
+ + ":6:9: Required property i was not initialized";
+
+ QTest::addRow("toplevelRequired") << warning1 << "SingletonWithRequired1";
+ QTest::addRow("subObjectRequired") << warning2 << "SingletonWithRequired2";
+}
+
void tst_qqmllanguage::singletonsHaveContextAndEngine()
{
QObject *qmlSingleton = nullptr;
@@ -5411,24 +5451,30 @@ void tst_qqmllanguage::namespacedPropertyTypes()
void tst_qqmllanguage::qmlTypeCanBeResolvedByName_data()
{
QTest::addColumn<QUrl>("componentUrl");
+ QTest::addColumn<QString>("name");
// Built-in C++ types
- QTest::newRow("C++ - Anonymous") << testFileUrl("quickTypeByName_anon.qml");
- QTest::newRow("C++ - Named") << testFileUrl("quickTypeByName_named.qml");
+ QTest::newRow("C++ - Anonymous") << testFileUrl("quickTypeByName_anon.qml")
+ << QStringLiteral("QtQuick/Item");
+ QTest::newRow("C++ - Named") << testFileUrl("quickTypeByName_named.qml")
+ << QStringLiteral("QtQuick/Item");
// Composite types with a qmldir
- QTest::newRow("QML - Anonymous - qmldir") << testFileUrl("compositeTypeByName_anon_qmldir.qml");
- QTest::newRow("QML - Named - qmldir") << testFileUrl("compositeTypeByName_named_qmldir.qml");
+ QTest::newRow("QML - Anonymous - qmldir") << testFileUrl("compositeTypeByName_anon_qmldir.qml")
+ << QStringLiteral("SimpleType");
+ QTest::newRow("QML - Named - qmldir") << testFileUrl("compositeTypeByName_named_qmldir.qml")
+ << QStringLiteral("SimpleType");
}
void tst_qqmllanguage::qmlTypeCanBeResolvedByName()
{
QFETCH(QUrl, componentUrl);
+ QFETCH(QString, name);
QQmlEngine engine;
QQmlComponent component(&engine, componentUrl);
VERIFY_ERRORS(0);
- QTest::ignoreMessage(QtMsgType::QtWarningMsg, "[object Object]"); // a bit crude, but it will do
+ QTest::ignoreMessage(QtMsgType::QtWarningMsg, qPrintable(name));
QScopedPointer<QObject> o(component.create());
QVERIFY(!o.isNull());
@@ -8059,7 +8105,60 @@ void tst_qqmllanguage::asValueType()
QTest::ignoreMessage(
QtWarningMsg,
+ "Could not find any constructor for value type QQmlRectFValueType "
+ "to call with value undefined");
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
qPrintable(url.toString() + ":7:5: Unable to assign [undefined] to QRectF"_L1));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":10: Coercing a value to QML/point using a type "
+ "assertion. This behavior is deprecated. Add 'pragma "
+ "ValueTypeBehavior: Assertable' to prevent it."_L1));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":14: Coercing between incompatible value types mistakenly "
+ "yields null rather than undefined. Add 'pragma "
+ "ValueTypeBehavior: Assertable' to prevent this."_L1));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":15: Coercing from instances of object types to value "
+ "types mistakenly yields null rather than undefined. Add "
+ "'pragma ValueTypeBehavior: Assertable' to prevent "
+ "this."_L1));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":16: Coercing a value to QML/size using a type "
+ "assertion. This behavior is deprecated. Add 'pragma "
+ "ValueTypeBehavior: Assertable' to prevent it."_L1));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":11: Coercing a value to StaticTest/withString using a "
+ "type assertion. This behavior is deprecated. Add 'pragma "
+ "ValueTypeBehavior: Assertable' to prevent it."_L1));
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ "Could not find any constructor for value type QQmlSizeFValueType to call "
+ "with value 11");
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":18: Coercing a value to QML/size using a type "
+ "assertion. This behavior is deprecated. Add 'pragma "
+ "ValueTypeBehavior: Assertable' to prevent it."_L1));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":19: Coercing a value to QML/size using a type "
+ "assertion. This behavior is deprecated. Add 'pragma "
+ "ValueTypeBehavior: Assertable' to prevent it."_L1));
+
QScopedPointer<QObject> o(c.create());
QCOMPARE(o->property("a"), QVariant());
@@ -8082,6 +8181,84 @@ void tst_qqmllanguage::asValueType()
const QVariant string = o->property("g");
QCOMPARE(string.metaType(), QMetaType::fromType<QString>());
QCOMPARE(string.toString(), u"green");
+
+ const QVariant p = o->property("p");
+ QCOMPARE(p.metaType(), QMetaType::fromType<std::nullptr_t>());
+
+ const QVariant q = o->property("q");
+ QCOMPARE(q.metaType(), QMetaType::fromType<std::nullptr_t>());
+
+ const QVariant r = o->property("r");
+ QCOMPARE(r.metaType(), QMetaType::fromType<QSizeF>());
+ QCOMPARE(r.value<QSizeF>(), QSizeF());
+
+ const QVariant s = o->property("s");
+ QCOMPARE(s.metaType(), QMetaType());
+
+ const QVariant t = o->property("t");
+ QCOMPARE(t.metaType(), QMetaType::fromType<QSizeF>());
+ QCOMPARE(t.value<QSizeF>(), QSizeF());
+
+ const QVariant u = o->property("u");
+ QCOMPARE(u.metaType(), QMetaType::fromType<QSizeF>());
+ QCOMPARE(u.value<QSizeF>(), QSizeF());
+}
+
+void tst_qqmllanguage::asValueTypeGood()
+{
+ QQmlEngine engine;
+ const QUrl url = testFileUrl("asValueTypeGood.qml");
+ QQmlComponent c(&engine, url);
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ qPrintable(url.toString() + ":7:5: Unable to assign [undefined] to QRectF"_L1));
+ QScopedPointer<QObject> o(c.create());
+
+ QCOMPARE(o->property("a"), QVariant());
+ QCOMPARE(o->property("b").value<QRectF>(), QRectF());
+ QVERIFY(!o->property("c").toBool());
+
+ const QRectF rect(1, 2, 3, 4);
+ o->setProperty("a", QVariant(rect));
+ QCOMPARE(o->property("b").value<QRectF>(), rect);
+ QVERIFY(o->property("c").toBool());
+
+ QVERIFY(!o->property("d").toBool());
+ QVERIFY(!o->property("e").isValid());
+ QVERIFY(!o->property("f").isValid());
+
+ const QVariant string = o->property("g");
+ QCOMPARE(string.metaType(), QMetaType::fromType<QString>());
+ QCOMPARE(string.toString(), u"green");
+
+ const ValueTypeWithString withString = o->property("h").value<ValueTypeWithString>();
+ QCOMPARE(withString.toString(), u"red");
+
+ const QPointF point = o->property("i").value<QPointF>();
+ QCOMPARE(point.x(), 10.0);
+ QCOMPARE(point.y(), 20.0);
+
+ const QVariant j = o->property("j");
+ QCOMPARE(j.metaType(), QMetaType::fromType<int>());
+ QCOMPARE(j.toInt(), 4);
+
+ QVERIFY(!o->property("k").isValid());
+ QVERIFY(!o->property("l").isValid());
+
+ const QVariant m = o->property("m");
+ QCOMPARE(m.metaType(), QMetaType::fromType<QString>());
+ QCOMPARE(m.toString(), u"something");
+
+ QVERIFY(!o->property("n").isValid());
+ QVERIFY(!o->property("o").isValid());
+ QVERIFY(!o->property("p").isValid());
+ QVERIFY(!o->property("q").isValid());
+ QVERIFY(!o->property("r").isValid());
+ QVERIFY(!o->property("s").isValid());
+ QVERIFY(!o->property("t").isValid());
+ QVERIFY(!o->property("u").isValid());
}
void tst_qqmllanguage::typedEnums_data()
@@ -8659,6 +8836,128 @@ void tst_qqmllanguage::typedObjectList()
QVERIFY(list.at(&list, 0) != nullptr);
}
+void tst_qqmllanguage::jsonArrayPropertyBehavesLikeAnArray() {
+ QQmlEngine e;
+ QQmlComponent c(&e, testFileUrl("jsonArrayProperty.qml"));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+
+ QCOMPARE(o->property("concatenatedJsonArray"), o->property("concatenatedJsArray"));
+ QVERIFY(o->property("entriesMatch").toBool());
+ QCOMPARE(o->property("jsonArrayEvery"), o->property("jsArrayEvery"));
+ QCOMPARE(o->property("jsonArrayFiltered"), o->property("jsArrayFiltered"));
+ QCOMPARE(o->property("jsonArrayFind"), o->property("jsArrayFind"));
+ QCOMPARE(o->property("jsonArrayFindIndex"), o->property("jsArrayFindIndex"));
+ QCOMPARE(o->property("jsonArrayForEach"), o->property("jsArrayForEach"));
+ QCOMPARE(o->property("jsonArrayIncludes"), o->property("jsArrayIncludes"));
+ QCOMPARE(o->property("jsonArrayIndexOf"), o->property("jsArrayIndexOf"));
+ QCOMPARE(o->property("jsonArrayJoin"), o->property("jsArrayJoin"));
+ QVERIFY(o->property("keysMatch").toBool());
+ QCOMPARE(o->property("jsonArrayLastIndexOf"), o->property("jsArrayLastIndexOf"));
+ QCOMPARE(o->property("jsonArrayMap"), o->property("jsArrayMap"));
+ QCOMPARE(o->property("jsonArrayReduce"), o->property("jsArrayReduce"));
+ QCOMPARE(o->property("jsonArrayReduceRight"), o->property("jsArrayReduceRight"));
+ QCOMPARE(o->property("jsonArraySlice"), o->property("jsArraySlice"));
+ QCOMPARE(o->property("jsonArraySome"), o->property("jsArraySome"));
+ QCOMPARE(o->property("stringifiedLocaleJsonArray"), o->property("stringifiedLocaleJsArray"));
+ QCOMPARE(o->property("stringifiedJsonArray"), o->property("stringifiedJsArray"));
+ QVERIFY(o->property("valuesMatch").toBool());
+
+ QVERIFY(o->property("jsonArrayWasCopiedWithin").toBool());
+ QVERIFY(o->property("jsonArrayWasFilled").toBool());
+ QVERIFY(o->property("jsonArrayWasPopped").toBool());
+ QVERIFY(o->property("jsonArrayWasPushed").toBool());
+ QVERIFY(o->property("jsonArrayWasReversed").toBool());
+ QVERIFY(o->property("jsonArrayWasShifted").toBool());
+ QVERIFY(o->property("jsonArrayWasSpliced").toBool());
+ QVERIFY(o->property("jsonArrayWasUnshifted").toBool());
+ QVERIFY(o->property("jsonArrayWasSorted").toBool());
+}
+
+void tst_qqmllanguage::invokableCtors()
+{
+ QQmlEngine e;
+
+ const QUrl url = testFileUrl("invokableCtors.qml");
+
+ QQmlComponent c(&e, url);
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+
+ const QString urlString = url.toString();
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(
+ urlString + ":9: You are calling a Q_INVOKABLE constructor of "
+ "InvokableSingleton which is a singleton in QML."));
+
+ // Extended types look like types without any constructors.
+ // Therefore they aren't even FunctionObjects.
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(
+ urlString + ":10: TypeError: Type error"));
+
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(
+ urlString + ":11: You are calling a Q_INVOKABLE constructor of "
+ "InvokableUncreatable which is uncreatable in QML."));
+
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+
+ QObject *oo = qvariant_cast<QObject *>(o->property("oo"));
+ QVERIFY(oo);
+ QObject *pp = qvariant_cast<QObject *>(o->property("pp"));
+ QVERIFY(pp);
+ QCOMPARE(pp->parent(), oo);
+
+ InvokableValueType vv = qvariant_cast<InvokableValueType>(o->property("v"));
+ QCOMPARE(vv.m_s, "green");
+
+ InvokableSingleton *i = qvariant_cast<InvokableSingleton *>(o->property("i"));
+ QVERIFY(i);
+ QCOMPARE(i->m_a, 5);
+ QCOMPARE(i->parent(), oo);
+
+ QVariant k = o->property("k");
+ QCOMPARE(k.metaType(), QMetaType::fromType<InvokableExtended *>());
+ QCOMPARE(k.value<InvokableExtended *>(), nullptr);
+
+ InvokableUncreatable *l = qvariant_cast<InvokableUncreatable *>(o->property("l"));
+ QVERIFY(l);
+}
+
+void tst_qqmllanguage::nestedVectors()
+{
+ QQmlEngine e;
+ QQmlComponent c(&e, testFileUrl("nestedVectors.qml"));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+
+ NestedVectors *n = qobject_cast<NestedVectors *>(o.data());
+ QVERIFY(n);
+
+ const std::vector<std::vector<int>> expected1 { { 1, 2, 3 }, { 4, 5 } };
+ const QVariant list1 = n->property("list1");
+ QCOMPARE(list1.metaType(), QMetaType::fromType<std::vector<std::vector<int>>>());
+ QCOMPARE(list1.value<std::vector<std::vector<int>>>(), expected1);
+
+ const std::vector<std::vector<int>> expected2 { { 2, 3, 4 }, { 5, 6 } };
+ QCOMPARE(n->getList(), expected2);
+}
+
+void tst_qqmllanguage::optimizedSequenceShift()
+{
+ QQmlEngine e;
+ QQmlComponent c(&e, testFileUrl("optimizedSequenceShift.qml"));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+
+ QCOMPARE(o->property("changes").toInt(), 2);
+
+ const QVariant one = o->property("one");
+ QCOMPARE(one.metaType(), QMetaType::fromType<int>());
+ QCOMPARE(one.toInt(), 1);
+}
+
QTEST_MAIN(tst_qqmllanguage)
#include "tst_qqmllanguage.moc"
diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
index e57eb1b65a..67e1591b8b 100644
--- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
+++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
@@ -17,7 +17,7 @@
#include <QtQuickShapes/private/qquickshapesglobal_p.h>
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_DARWIN)
// For _PC_CASE_SENSITIVE
#include <unistd.h>
#endif
@@ -242,9 +242,9 @@ void tst_qqmlmoduleplugin::incorrectPluginCase()
QString expectedError = QLatin1String("module \"org.qtproject.WrongCase\" plugin \"PluGin\" not found");
-#if defined(Q_OS_MAC) || defined(Q_OS_WIN32)
+#if defined(Q_OS_DARWIN) || defined(Q_OS_WIN32)
bool caseSensitive = true;
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_DARWIN)
int res = pathconf(QDir::currentPath().toLatin1().constData(), _PC_CASE_SENSITIVE);
if (res == -1)
QSKIP("Could not establish case sensitivity of file system");
diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp
index eb8c6c260f..62f67e548f 100644
--- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp
+++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp
@@ -34,6 +34,10 @@ private slots:
void codeLocationsWithContinuationStringLiteral_data();
void noSubstitutionTemplateLiteral();
void templateLiteral();
+ void numericSeparator_data();
+ void numericSeparator();
+ void invalidNumericSeparator_data();
+ void invalidNumericSeparator();
void leadingSemicolonInClass();
void templatedReadonlyProperty();
void qmlImportInJS();
@@ -496,6 +500,74 @@ void tst_qqmlparser::templateLiteral()
QVERIFY(e);
}
+void tst_qqmlparser::numericSeparator_data() {
+ QTest::addColumn<QString>("code");
+ QTest::addColumn<double>("expected_value");
+
+ QTest::newRow("Separator in decimal literal") << "1_000_000_000" << 1000000000.0;
+ QTest::newRow("Separator in fractional part") << "1000.22_33" << 1000.2233;
+ QTest::newRow("Separator in exponent part") << "1e1_0_0" << std::pow(10, 100);
+ QTest::newRow("Separator in positive exponent part") << "1e+1_0_0" << 1e100;
+ QTest::newRow("Separator in negative exponent part") << "1e-1_0_0" << 1e-100;
+ QTest::newRow("Separator in binary literal with b prefix") << "0b1010_0001_1000_0101" << static_cast<double>(0b1010000110000101);
+ QTest::newRow("Separator in binary literal with B prefix") << "0B01_10_01_10" << static_cast<double>(0b01100110);
+ QTest::newRow("Separator in octal literal with o prefix") << "0o1234_5670" << static_cast<double>(012345670);
+ QTest::newRow("Separator in octal literal with O prefix") << "0O7777_0000" << static_cast<double>(077770000);
+ QTest::newRow("Separator in hex literal with x prefix") << "0xA0_B0_C0" << static_cast<double>(0xA0B0C0);
+ QTest::newRow("Separator in hex literal with X prefix") << "0X1000_AAAA" << static_cast<double>(0x1000AAAA);
+}
+
+void tst_qqmlparser::numericSeparator() {
+ using namespace QQmlJS;
+
+ QFETCH(QString, code);
+ QFETCH(double, expected_value);
+
+ QQmlJS::Engine engine;
+
+ QQmlJS::Lexer lexer(&engine);
+ lexer.setCode(code, 1);
+
+ QQmlJS::Parser parser(&engine);
+ QVERIFY(parser.parseExpression());
+
+ AST::ExpressionNode *expression = parser.expression();
+ QVERIFY(expression);
+
+ auto *literal = QQmlJS::AST::cast<QQmlJS::AST::NumericLiteral *>(expression);
+ QVERIFY(literal);
+
+ QCOMPARE(literal->value, expected_value);
+ QCOMPARE(literal->firstSourceLocation().begin(), 0u);
+ QCOMPARE(literal->lastSourceLocation().end(), quint32(code.size()));
+}
+
+void tst_qqmlparser::invalidNumericSeparator_data() {
+ QTest::addColumn<QString>("code");
+ QTest::addColumn<QString>("error");
+
+ QTest::newRow("Trailing numeric separator") << "1_" << "A trailing numeric separator is not allowed in numeric literals";
+ QTest::newRow("Multiple numeric separators") << "1__2" << "There can be at most one numeric separator between digits";
+}
+
+void tst_qqmlparser::invalidNumericSeparator() {
+ using namespace QQmlJS;
+
+ QFETCH(QString, code);
+ QFETCH(QString, error);
+
+ QQmlJS::Engine engine;
+
+ QQmlJS::Lexer lexer(&engine);
+ lexer.setCode(code, 1);
+
+ QQmlJS::Parser parser(&engine);
+ QVERIFY(!parser.parseExpression());
+
+ QVERIFY(lexer.errorCode() != Lexer::NoError);
+ QCOMPARE(lexer.errorMessage(), error);
+}
+
void tst_qqmlparser::leadingSemicolonInClass()
{
QQmlJS::Engine engine;
diff --git a/tests/auto/qml/qqmlqt/data/qtbug_125495.qml b/tests/auto/qml/qqmlqt/data/qtbug_125495.qml
new file mode 100644
index 0000000000..88f9cb259f
--- /dev/null
+++ b/tests/auto/qml/qqmlqt/data/qtbug_125495.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+
+Item {
+ property font fontProperty: Qt.font({ styleName: "Some Style" });
+}
diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
index 9fea41104d..8139ec48d7 100644
--- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
+++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
@@ -85,6 +85,8 @@ private slots:
void timeRoundtrip_data();
void timeRoundtrip();
+ void fontSetsStyleName();
+
private:
QQmlEngine engine;
};
@@ -1469,6 +1471,18 @@ void tst_qqmlqt::timeRoundtrip()
QCOMPARE(tp.m_getTime, tp.m_putTime);
}
+void tst_qqmlqt::fontSetsStyleName() {
+ QQmlComponent component(&engine, testFileUrl("qtbug_125495.qml"));
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(object != nullptr);
+
+ QFont f;
+ f.setStyleName("Some Style");
+
+ QCOMPARE(qvariant_cast<QFont>(object->property("fontProperty")), f);
+}
+
QTEST_MAIN(tst_qqmlqt)
#include "tst_qqmlqt.moc"
diff --git a/tests/auto/qml/qqmltimer/CMakeLists.txt b/tests/auto/qml/qqmltimer/CMakeLists.txt
index f66e054dc6..88d596be85 100644
--- a/tests/auto/qml/qqmltimer/CMakeLists.txt
+++ b/tests/auto/qml/qqmltimer/CMakeLists.txt
@@ -21,6 +21,7 @@ qt_internal_add_test(tst_qqmltimer
Qt::Gui
Qt::GuiPrivate
Qt::QmlPrivate
+ Qt::QmlMetaPrivate
Qt::QuickPrivate
)
diff --git a/tests/auto/qml/qqmltimer/tst_qqmltimer.cpp b/tests/auto/qml/qqmltimer/tst_qqmltimer.cpp
index a6c61abd57..495f7044f6 100644
--- a/tests/auto/qml/qqmltimer/tst_qqmltimer.cpp
+++ b/tests/auto/qml/qqmltimer/tst_qqmltimer.cpp
@@ -1,14 +1,18 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
-#include <QtTest/QSignalSpy>
-#include <qtest.h>
-#include <QtQml/qqmlengine.h>
-#include <QtQml/qqmlcomponent.h>
-#include <QtQml/private/qqmltimer_p.h>
-#include <QtQuick/qquickitem.h>
-#include <QDebug>
-#include <QtCore/QPauseAnimation>
+
#include <private/qabstractanimation_p.h>
+#include <private/qqmltimer_p.h>
+
+#include <QtQuick/qquickitem.h>
+
+#include <QtQml/qqmlcomponent.h>
+#include <QtQml/qqmlengine.h>
+
+#include <QtTest/qsignalspy.h>
+#include <QtTest/qtest.h>
+
+#include <QtCore/qpauseanimation.h>
void consistentWait(int ms)
{
diff --git a/tests/auto/qml/qqmlvaluetypes/data/constructors.qml b/tests/auto/qml/qqmlvaluetypes/data/constructors.qml
new file mode 100644
index 0000000000..d94d6d8ad4
--- /dev/null
+++ b/tests/auto/qml/qqmlvaluetypes/data/constructors.qml
@@ -0,0 +1,14 @@
+import QtQuick as Q
+
+Q.QtObject {
+ property var point: new Q.point()
+ property var size: new Q.size()
+ property var rect: new Q.rect()
+ property var color: new Q.color()
+ property var vector2d: new Q.vector2d()
+ property var vector3d: new Q.vector3d()
+ property var vector4d: new Q.vector4d()
+ property var quaternion: new Q.quaternion()
+ property var matrix4x4: new Q.matrix4x4()
+ property var font: new Q.font()
+}
diff --git a/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_invokables.qml b/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_invokables.qml
index c28901956d..1827b57ca9 100644
--- a/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_invokables.qml
+++ b/tests/auto/qml/qqmlvaluetypes/data/matrix4x4_invokables.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick
Item {
property bool success: false
@@ -6,6 +6,7 @@ Item {
property variant m1: Qt.matrix4x4(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4)
property variant m2: Qt.matrix4x4(5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8)
property variant m3: Qt.matrix4x4(123,22,6,42,55,54,67,77,777,1,112,22,55,6696,77,777)
+ property matrix4x4 m4: PlanarTransform.fromAffineMatrix(1, 2, 3, 4, 5, 6)
property variant v1: Qt.vector4d(1,2,3,4)
property variant v2: Qt.vector3d(1,2,3)
property real factor: 2.23
@@ -101,6 +102,7 @@ Item {
if (m1.transposed() != Qt.matrix4x4(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4)) success = false;
if (m1.fuzzyEquals(m2)) success = false;
if (!m1.fuzzyEquals(m2, 10)) success = false;
+ if (m4 != Qt.matrix4x4(1, 3, 0, 5, 2, 4, 0, 6, 0, 0, 1, 0, 0, 0, 0, 1)) success = false;
if (!testTransformation()) success = false;
if (!testMatrixMapping()) success = false;
}
diff --git a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
index 2634044238..ea521053ae 100644
--- a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
+++ b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
@@ -78,6 +78,7 @@ private slots:
void writeBackOnFunctionCall();
void valueTypeConversions();
void readReferenceOnGetOwnProperty();
+ void constructors();
private:
QQmlEngine engine;
@@ -1832,6 +1833,28 @@ void tst_qqmlvaluetypes::readReferenceOnGetOwnProperty()
QVERIFY(o->property("allo").toBool());
}
+void tst_qqmlvaluetypes::constructors()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, testFileUrl("constructors.qml"));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+
+ QCOMPARE(o->property("point"), QVariant(QPointF()));
+ QCOMPARE(o->property("size"), QVariant(QSizeF()));
+ QCOMPARE(o->property("rect"), QVariant(QRectF()));
+ QCOMPARE(o->property("color"), QVariant(QColor()));
+ QCOMPARE(o->property("vector2d"), QVariant(QVector2D()));
+ QCOMPARE(o->property("vector3d"), QVariant(QVector3D()));
+ QCOMPARE(o->property("vector4d"), QVariant(QVector4D()));
+ QCOMPARE(o->property("quaternion"), QVariant(QQuaternion()));
+ QCOMPARE(o->property("matrix4x4"), QVariant(QMatrix4x4()));
+ QCOMPARE(o->property("font"), QVariant(QFont()));
+
+}
+
#undef CHECK_TYPE_IS_NOT_VALUETYPE
QTEST_MAIN(tst_qqmlvaluetypes)
diff --git a/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp b/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp
index eebe4a6c05..bb6e59cb17 100644
--- a/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp
+++ b/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp
@@ -321,14 +321,12 @@ void tst_QQmlXmlListModel::headers()
QTRY_COMPARE_WITH_TIMEOUT(qvariant_cast<QQmlXmlListModel::Status>(model->property("status")),
QQmlXmlListModel::Error, 10000);
- QVariantMap expectedHeaders;
- expectedHeaders["Accept"] = "application/xml,*/*";
+ QLatin1String expectedAcceptHeader = "application/xml,*/*"_L1;
- QCOMPARE(factory.lastSentHeaders.size(), expectedHeaders.size());
- for (auto it = expectedHeaders.cbegin(), end = expectedHeaders.cend(); it != end; ++it) {
- QVERIFY(factory.lastSentHeaders.contains(it.key()));
- QCOMPARE(factory.lastSentHeaders[it.key()].toString(), it.value().toString());
- }
+ QCOMPARE(factory.lastSentHeaders.size(), 1);
+ QVariant acceptHeader = factory.lastSentHeaders["accept"];
+ QVERIFY(acceptHeader.isValid());
+ QCOMPARE(acceptHeader.toString(), expectedAcceptHeader);
}
void tst_QQmlXmlListModel::source()
diff --git a/tests/auto/qml/qv4estable/tst_qv4estable.cpp b/tests/auto/qml/qv4estable/tst_qv4estable.cpp
index 45df62b23e..7d137ae7d2 100644
--- a/tests/auto/qml/qv4estable/tst_qv4estable.cpp
+++ b/tests/auto/qml/qv4estable/tst_qv4estable.cpp
@@ -18,7 +18,7 @@ void tst_qv4estable::checkRemoveAvoidsHeapBufferOverflow()
QV4::ESTable estable;
// Fill the ESTable with values so it is at max capacity.
- QCOMPARE_EQ(estable.m_capacity, 8);
+ QCOMPARE_EQ(estable.m_capacity, 8U);
for (uint i = 0; i < estable.m_capacity; ++i) {
estable.set(QV4::Value::fromUInt32(i), QV4::Value::fromUInt32(i));
}
@@ -27,8 +27,8 @@ void tst_qv4estable::checkRemoveAvoidsHeapBufferOverflow()
for (uint i = 0; i < estable.m_capacity; ++i) {
QVERIFY(estable.m_keys[i].sameValueZero(QV4::Value::fromUInt32(i)));
}
- QCOMPARE_EQ(estable.m_capacity, 8);
- QCOMPARE_EQ(estable.m_size, 8);
+ QCOMPARE_EQ(estable.m_capacity, 8U);
+ QCOMPARE_EQ(estable.m_size, 8U);
// Remove the first item from the set to verify that asan does not trip.
// Relies on the CI platform propagating asan flag to all tests.
diff --git a/tests/auto/qml/qv4mm/tst_qv4mm.cpp b/tests/auto/qml/qv4mm/tst_qv4mm.cpp
index 5bcdcd4624..a414199181 100644
--- a/tests/auto/qml/qv4mm/tst_qv4mm.cpp
+++ b/tests/auto/qml/qv4mm/tst_qv4mm.cpp
@@ -13,6 +13,8 @@
#include <private/qv4identifiertable_p.h>
#include <private/qv4arraydata_p.h>
#include <private/qqmlcomponentattached_p.h>
+#include <private/qv4mapobject_p.h>
+#include <private/qv4setobject_p.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
@@ -37,6 +39,7 @@ private slots:
void sharedInternalClassDataMarking();
void gcTriggeredInOnDestroyed();
void weakValuesAssignedAfterThePhaseThatShouldHandleWeakValues();
+ void mapAndSetKeepValuesAlive();
};
tst_qv4mm::tst_qv4mm()
@@ -502,6 +505,149 @@ void tst_qv4mm::weakValuesAssignedAfterThePhaseThatShouldHandleWeakValues()
QVERIFY(ddata->jsWrapper.valueRef()->heapObject()->inUse());
}
+void tst_qv4mm::mapAndSetKeepValuesAlive()
+{
+ {
+ QJSEngine jsEngine;
+ QV4::ExecutionEngine &engine = *jsEngine.handle();
+
+ QV4::Scope scope(&engine);
+ auto map = jsEngine.evaluate("new Map()");
+ QV4::ScopedFunctionObject afunction(scope, engine.memoryManager->alloc<QV4::FunctionObject>()); // hack, we just need about any function object
+ QV4::Value thisObject = QJSValuePrivate::asReturnedValue(&map);
+
+ QVERIFY(!engine.memoryManager->gcBlocked);
+ // no scoped classes, as that would defeat the point of the test
+ // we block the gc instead so that the allocation can't trigger the gc
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::InCriticalSection;
+ QV4::Heap::String *key = engine.newString(QString::fromLatin1("key"));
+ QV4::Heap::String *value = engine.newString(QString::fromLatin1("value"));
+ QV4::Value values[2] = { QV4::Value::fromHeapObject(key), QV4::Value::fromHeapObject(value) };
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::Unblocked;
+ QVERIFY(!key->isMarked());
+ QVERIFY(!value->isMarked());
+
+ auto sm = engine.memoryManager->gcStateMachine.get();
+ sm->reset();
+ while (sm->state != QV4::GCState::HandleQObjectWrappers) {
+ QV4::GCStateInfo& stateInfo = sm->stateInfoMap[int(sm->state)];
+ sm->state = stateInfo.execute(sm, sm->stateData);
+ }
+ QV4::MapPrototype::method_set(afunction.getPointer(), &thisObject, values, 2);
+ QVERIFY(key->isMarked());
+ QVERIFY(value->isMarked());
+ bool gcComplete = engine.memoryManager->tryForceGCCompletion();
+ QVERIFY(gcComplete);
+ QVERIFY(key->inUse());
+ QVERIFY(value->inUse());
+ gc(engine);
+ QCOMPARE(map.property("size").toInt(), 1);
+ }
+ {
+ QJSEngine jsEngine;
+ QV4::ExecutionEngine &engine = *jsEngine.handle();
+
+ QV4::Scope scope(&engine);
+ auto map = jsEngine.evaluate("new WeakMap()");
+ QV4::ScopedFunctionObject afunction(scope, engine.memoryManager->alloc<QV4::FunctionObject>()); // hack, we just need about any function object
+ QV4::Value thisObject = QJSValuePrivate::asReturnedValue(&map);
+
+ QVERIFY(!engine.memoryManager->gcBlocked);
+ // no scoped classes, as that would defeat the point of the test
+ // we block the gc instead so that the allocation can't trigger the gc
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::InCriticalSection;
+ QV4::Heap::Object *key = engine.newObject();
+ QV4::Heap::String *value = engine.newString(QString::fromLatin1("value"));
+ QV4::Value values[2] = { QV4::Value::fromHeapObject(key), QV4::Value::fromHeapObject(value) };
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::Unblocked;
+ QVERIFY(!key->isMarked());
+ QVERIFY(!value->isMarked());
+
+ auto sm = engine.memoryManager->gcStateMachine.get();
+ sm->reset();
+ while (sm->state != QV4::GCState::HandleQObjectWrappers) {
+ QV4::GCStateInfo& stateInfo = sm->stateInfoMap[int(sm->state)];
+ sm->state = stateInfo.execute(sm, sm->stateData);
+ }
+ QV4::WeakMapPrototype::method_set(afunction.getPointer(), &thisObject, values, 2);
+ QVERIFY(!engine.hasException);
+ QVERIFY(key->isMarked());
+ QVERIFY(value->isMarked());
+ bool gcComplete = engine.memoryManager->tryForceGCCompletion();
+ QVERIFY(gcComplete);
+ QVERIFY(key->inUse());
+ QVERIFY(value->inUse());
+ gc(engine);
+ QCOMPARE(map.property("size").toInt(), 0);
+ }
+ {
+ QJSEngine jsEngine;
+ QV4::ExecutionEngine &engine = *jsEngine.handle();
+
+ QV4::Scope scope(&engine);
+ auto map = jsEngine.evaluate("new Set()");
+ QV4::ScopedFunctionObject afunction(scope, engine.memoryManager->alloc<QV4::FunctionObject>()); // hack, we just need about any function object
+ QV4::Value thisObject = QJSValuePrivate::asReturnedValue(&map);
+
+ QVERIFY(!engine.memoryManager->gcBlocked);
+ // no scoped classes, as that would defeat the point of the test
+ // we block the gc instead so that the allocation can't trigger the gc
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::InCriticalSection;
+ QV4::Heap::Object *key = engine.newObject();
+ QV4::Value values[1] = { QV4::Value::fromHeapObject(key) };
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::Unblocked;
+ QVERIFY(!key->isMarked());
+
+ auto sm = engine.memoryManager->gcStateMachine.get();
+ sm->reset();
+ while (sm->state != QV4::GCState::HandleQObjectWrappers) {
+ QV4::GCStateInfo& stateInfo = sm->stateInfoMap[int(sm->state)];
+ sm->state = stateInfo.execute(sm, sm->stateData);
+ }
+ QV4::SetPrototype::method_add(afunction.getPointer(), &thisObject, values, 1);
+ QVERIFY(!engine.hasException);
+ QVERIFY(key->isMarked());
+ bool gcComplete = engine.memoryManager->tryForceGCCompletion();
+ QVERIFY(gcComplete);
+ QVERIFY(key->inUse());
+ gc(engine);
+ QCOMPARE(map.property("size").toInt(), 1);
+ }
+ {
+ QJSEngine jsEngine;
+ QV4::ExecutionEngine &engine = *jsEngine.handle();
+
+ QV4::Scope scope(&engine);
+ auto map = jsEngine.evaluate("new WeakSet()");
+ QV4::ScopedFunctionObject afunction(scope, engine.memoryManager->alloc<QV4::FunctionObject>()); // hack, we just need about any function object
+ QV4::Value thisObject = QJSValuePrivate::asReturnedValue(&map);
+
+ QVERIFY(!engine.memoryManager->gcBlocked);
+ // no scoped classes, as that would defeat the point of the test
+ // we block the gc instead so that the allocation can't trigger the gc
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::InCriticalSection;
+ QV4::Heap::Object *key = engine.newObject();
+ QV4::Value values[1] = { QV4::Value::fromHeapObject(key) };
+ engine.memoryManager->gcBlocked = QV4::MemoryManager::Unblocked;
+ QVERIFY(!key->isMarked());
+
+ auto sm = engine.memoryManager->gcStateMachine.get();
+ sm->reset();
+ while (sm->state != QV4::GCState::HandleQObjectWrappers) {
+ QV4::GCStateInfo& stateInfo = sm->stateInfoMap[int(sm->state)];
+ sm->state = stateInfo.execute(sm, sm->stateData);
+ }
+ QV4::WeakSetPrototype::method_add(afunction.getPointer(), &thisObject, values, 1);
+ QVERIFY(!engine.hasException);
+ QVERIFY(key->isMarked());
+ bool gcComplete = engine.memoryManager->tryForceGCCompletion();
+ QVERIFY(gcComplete);
+ QVERIFY(key->inUse());
+ gc(engine);
+ QCOMPARE(map.property("size").toInt(), 0);
+ }
+}
+
QTEST_MAIN(tst_qv4mm)
#include "tst_qv4mm.moc"
diff --git a/tests/auto/qmldom/domdata/domitem/crashes/bracketsInBinding.qml b/tests/auto/qmldom/domdata/domitem/crashes/bracketsInBinding.qml
new file mode 100644
index 0000000000..bef28ffc45
--- /dev/null
+++ b/tests/auto/qmldom/domdata/domitem/crashes/bracketsInBinding.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+ property int foo: {}
+}
diff --git a/tests/auto/qmldom/domdata/domitem/fileLocationRegions/comments.qml b/tests/auto/qmldom/domdata/domitem/fileLocationRegions/comments.qml
new file mode 100644
index 0000000000..a69505c544
--- /dev/null
+++ b/tests/auto/qmldom/domdata/domitem/fileLocationRegions/comments.qml
@@ -0,0 +1,12 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQml
+
+/*
+splitting
+multiline
+*/
+// single line
+/* another comment */
+QtObject {}
diff --git a/tests/auto/qmldom/domdata/domitem/lambdas.qml b/tests/auto/qmldom/domdata/domitem/lambdas.qml
new file mode 100644
index 0000000000..c241bb77ae
--- /dev/null
+++ b/tests/auto/qmldom/domdata/domitem/lambdas.qml
@@ -0,0 +1,41 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ signal helloSignal
+
+ function method() {
+ console.log("helloMethod");
+ let myLambda = function(a, b) { return a + b };
+ let myArrow = (v, w) => a + b;
+ }
+
+ onHelloSignal: function(x, y, z) { console.log("HelloLambda"); }
+
+ function testNestedFunctions() {
+ function nested(tic, tac, toe) { return tic + tac/3 + toe/2}
+ nested()
+ }
+
+ function generators() {
+ function *myGeneratorDeclaration(a, b) { yield 5 };
+ let myGenerator = function*(tic, tac, toe) { yield tic + tac - toe };
+ }
+
+ function *generatorInQmlObject() {
+ function nested(q,w,e,r) { return q + w + e - r; }
+ function *nested2(a,z,e,r) { yield a + z + e - r; yield 42; }
+ yield 4;
+ yield* nested2(1,2,3,4);
+ const t = (function (a) {
+ return a + 100;
+ });
+ }
+ function traditionalLambda() {
+ const tradition = (function (a) {
+ return a + 100;
+ });
+ }
+}
diff --git a/tests/auto/qmldom/domitem/tst_qmldomitem.h b/tests/auto/qmldom/domitem/tst_qmldomitem.h
index 4464333b6e..3291cc0585 100644
--- a/tests/auto/qmldom/domitem/tst_qmldomitem.h
+++ b/tests/auto/qmldom/domitem/tst_qmldomitem.h
@@ -2874,6 +2874,9 @@ private slots:
QTest::addRow("lambda")
<< baseDir + u"/crashes/lambda.qml"_s;
+
+ QTest::addRow("bracketsInBinding")
+ << baseDir + u"/crashes/bracketsInBinding.qml"_s;
}
void crashes()
{
@@ -3189,6 +3192,157 @@ private slots:
envPtrChild->loadPendingDependencies();
}
+ void populateLazyFileBeforeCommitToBase()
+ {
+ DomItem qmlObject;
+ DomCreationOptions options;
+ options.setFlag(DomCreationOption::WithScriptExpressions);
+ options.setFlag(DomCreationOption::WithSemanticAnalysis);
+ options.setFlag(DomCreationOption::WithRecovery);
+
+ std::shared_ptr<DomEnvironment> envPtr = DomEnvironment::create(
+ qmltypeDirs, QQmlJS::Dom::DomEnvironment::Option::SingleThreaded, options);
+
+ const QString fileName{ QDir::cleanPath(baseDir + u"/propertyBindings.qml"_s) };
+
+ {
+ DomItem envChild = DomItem(envPtr).makeCopy(DomItem::CopyOption::EnvConnected).item();
+ auto envPtrChild = envChild.ownerAs<DomEnvironment>();
+ envPtrChild->loadFile(
+ FileToLoad::fromFileSystem(envPtrChild, fileName),
+ [&qmlObject](Path, const DomItem &, const DomItem &newIt) {
+ qmlObject = newIt.fileObject();
+ });
+ envPtrChild->loadPendingDependencies();
+
+ const DomItem childEnv = DomItem(envPtrChild->shared_from_this());
+ // populate the lazy file by accessing it via the DomItem interface
+ const DomItem mainComponent =
+ childEnv.field(Fields::qmlFileWithPath)
+ .key(fileName)
+ .field(Fields::currentItem)
+ .field(Fields::components)
+ .key(QString());
+ QVERIFY(mainComponent);
+
+ envPtrChild->commitToBase(DomItem(envPtrChild));
+ } // destroy the temporary environment that the file was loaded into
+
+ // also make sure that the main component also exists in the base environment after the
+ // commitToBase call.
+ const DomItem env = DomItem(envPtr->shared_from_this());
+ const DomItem mainComponent = env.field(Fields::qmlFileWithPath)
+ .key(fileName)
+ .field(Fields::currentItem)
+ .field(Fields::components)
+ .key(QString());
+ QVERIFY(mainComponent);
+ }
+
+ void populateLazyFileAfterCommitToBase()
+ {
+ DomItem qmlObject;
+ DomCreationOptions options;
+ options.setFlag(DomCreationOption::WithScriptExpressions);
+ options.setFlag(DomCreationOption::WithSemanticAnalysis);
+ options.setFlag(DomCreationOption::WithRecovery);
+
+ std::shared_ptr<DomEnvironment> envPtr = DomEnvironment::create(
+ qmltypeDirs, QQmlJS::Dom::DomEnvironment::Option::SingleThreaded, options);
+
+ const QString fileName{ QDir::cleanPath(baseDir + u"/propertyBindings.qml"_s) };
+
+ {
+ DomItem envChild = DomItem(envPtr).makeCopy(DomItem::CopyOption::EnvConnected).item();
+ auto envPtrChild = envChild.ownerAs<DomEnvironment>();
+ envPtrChild->loadFile(
+ FileToLoad::fromFileSystem(envPtrChild, fileName),
+ [&qmlObject](Path, const DomItem &, const DomItem &newIt) {
+ qmlObject = newIt.fileObject();
+ });
+ envPtrChild->loadPendingDependencies();
+ envPtrChild->commitToBase(DomItem(envPtrChild));
+ } // destroy the temporary environment that the file was loaded into
+
+ const DomItem env = DomItem(envPtr->shared_from_this());
+ // populate the lazy file by accessing it via the DomItem interface
+ const DomItem mainComponent = env.field(Fields::qmlFileWithPath)
+ .key(fileName)
+ .field(Fields::currentItem)
+ .field(Fields::components)
+ .key(QString());
+ QVERIFY(mainComponent);
+ }
+
+ void qtbug_124799()
+ {
+ // reproduces the completion crash in QTBUG-124799 that was actually not completion related:
+ // triggering the completion was triggering the population of a file, that led to a
+ // heap-use-after-free. The steps to reproduce the crash are following:
+ // 1. load a file in a temporary environment
+ // 2. grab an unpopulated qqmljsscope from the type resolver of the loaded file
+ // 3. destroy the temporary environment
+ // 4. update the loaded file with new content, to make sure the QQmlJSImporter (used to
+ // populate of qmlfiles) has no more strong references in the QmlFile.
+ // 5. populate the unpopulated qqmljsscope: its factory should have kept track that its
+ // environment is not the temporary one but the base one (because of the commitToBase()
+ // call) and use the correct QQmlJSImporter (if its the one from the temporary environment
+ // this will lead to the heap-use-after-free memory error you get when triggering
+ // completions before this fix)
+
+ DomItem qmlObject;
+ DomCreationOptions options;
+ options.setFlag(DomCreationOption::WithScriptExpressions);
+ options.setFlag(DomCreationOption::WithSemanticAnalysis);
+ options.setFlag(DomCreationOption::WithRecovery);
+
+ std::shared_ptr<DomEnvironment> envPtr = DomEnvironment::create(
+ qmltypeDirs, QQmlJS::Dom::DomEnvironment::Option::SingleThreaded, options);
+
+ const QString fileName{ QDir::cleanPath(baseDir + u"/propertyBindings.qml"_s) };
+
+ QQmlJSScope::ConstPtr populateAfterEnvironmentDestruction;
+
+ {
+ DomItem envChild = DomItem(envPtr).makeCopy(DomItem::CopyOption::EnvConnected).item();
+ auto envPtrChild = envChild.ownerAs<DomEnvironment>();
+ envPtrChild->loadFile(
+ FileToLoad::fromFileSystem(envPtrChild, fileName),
+ [&qmlObject](Path, const DomItem &, const DomItem &newIt) {
+ qmlObject = newIt.fileObject();
+ });
+ envPtrChild->loadPendingDependencies();
+
+ auto qmlFilePtr = qmlObject.ownerAs<QmlFile>();
+ auto resolver = qmlFilePtr->typeResolver();
+ // simulate completion by grabbing some type from the resolver
+ populateAfterEnvironmentDestruction = resolver->importedTypes()[u"Derived"_s].scope;
+ envPtrChild->commitToBase(DomItem(envPtrChild));
+ }
+
+ // update the file
+ {
+ DomItem envChild = DomItem(envPtr).makeCopy(DomItem::CopyOption::EnvConnected).item();
+ auto envPtrChild = envChild.ownerAs<DomEnvironment>();
+
+ // simulate user typing something
+ QFile file(fileName);
+ QVERIFY(file.open(QFile::ReadOnly));
+ const QString content = file.readAll();
+ const QString newContent = content + "\n // important comment here\n";
+ envPtrChild->loadFile(FileToLoad::fromMemory(envPtrChild, fileName, newContent),
+ [&qmlObject](Path, const DomItem &, const DomItem &newIt) {
+ qmlObject = newIt.fileObject();
+ });
+ envPtrChild->loadPendingDependencies();
+ envPtrChild->commitToBase(DomItem(envPtrChild));
+ }
+
+ // step 3: populate the lazy qqmljsscope, it should not crash
+ QCOMPARE(populateAfterEnvironmentDestruction->filePath(),
+ QDir::cleanPath(baseDir + u"/Derived.qml"_s));
+ }
+
void visitTreeFilter()
{
DomItem qmlObject;
@@ -3404,6 +3558,355 @@ private slots:
QVERIFY(comments.contains(u"/*Ast Comment*/ "_s));
}
+ void commentLocations()
+ {
+ auto envPtr = DomEnvironment::create(
+ QStringList(),
+ QQmlJS::Dom::DomEnvironment::Option::SingleThreaded
+ | QQmlJS::Dom::DomEnvironment::Option::NoDependencies);
+
+ const auto filePath = baseDir + u"/fileLocationRegions/comments.qml"_s;
+ QFile f(filePath);
+ QVERIFY(f.open(QIODevice::ReadOnly | QIODevice::Text));
+ QString code = f.readAll();
+ DomItem file;
+ envPtr->loadFile(FileToLoad::fromMemory(envPtr, filePath, code),
+ [&file](Path, const DomItem &, const DomItem &newIt) {
+ file = newIt.fileObject();
+ });
+ envPtr->loadPendingDependencies();
+
+ const auto expctedCommentLocations = QSet {
+ QQmlJS::SourceLocation(0, 41, 1, 1),
+ QQmlJS::SourceLocation(42,68, 2, 1),
+ QQmlJS::SourceLocation(126,25, 6, 1),
+ QQmlJS::SourceLocation(152,14, 10, 1),
+ QQmlJS::SourceLocation(167,21, 11, 1)
+ };
+
+ QSet<SourceLocation> locs;
+ file.fileObject(GoTo::MostLikely).visitTree(Path(), [&locs](Path, const DomItem &item, bool){
+ if (item.internalKind() == DomType::Comment) {
+ const auto comment = item.as<Comment>();
+ if (comment) {
+ locs << comment->info().sourceLocation();
+ }
+ }
+ return true;
+ }, VisitOption::Default, emptyChildrenVisitor, emptyChildrenVisitor);
+
+
+ QCOMPARE(locs, expctedCommentLocations);
+ }
+
+ void lambdas()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem mainObject = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0);
+ {
+ const DomItem lambda = mainObject.field(Fields::methods)
+ .key(u"method"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements)
+ .index(1)
+ .field(Fields::declarations)
+ .index(0)
+ .field(Fields::initializer);
+ QVERIFY(lambda);
+ QCOMPARE(lambda.internalKind(), DomType::ScriptFunctionExpression);
+ QCOMPARE(lambda.field(Fields::name).value().toString(), u"myLambda"_s);
+ QCOMPARE(lambda.field(Fields::parameters).indexes(), 2);
+ QCOMPARE(lambda.field(Fields::parameters).index(0).field(Fields::identifier).value().toString(), u"a");
+ QCOMPARE(lambda.field(Fields::parameters).index(1).field(Fields::identifier).value().toString(), u"b");
+
+ auto scope = lambda.semanticScope();
+ QVERIFY(scope);
+ QVERIFY(scope->jsIdentifier(u"b"_s));
+
+ const DomItem body = lambda.field(Fields::body);
+ QCOMPARE(body.internalKind(), DomType::ScriptBlockStatement);
+ }
+ }
+ void arrow()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem mainObject = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0);
+ {
+ const DomItem arrow = mainObject.field(Fields::methods)
+ .key(u"method"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements)
+ .index(2)
+ .field(Fields::declarations)
+ .index(0)
+ .field(Fields::initializer);
+ QVERIFY(arrow);
+ QCOMPARE(arrow.internalKind(), DomType::ScriptFunctionExpression);
+ QCOMPARE(arrow.field(Fields::name).value().toString(), u"myArrow"_s);
+ QCOMPARE(arrow.field(Fields::parameters).indexes(), 2);
+ QCOMPARE(arrow.field(Fields::parameters)
+ .index(0)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"v");
+ QCOMPARE(arrow.field(Fields::parameters)
+ .index(1)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"w");
+
+ auto scope = arrow.semanticScope();
+ QVERIFY(scope);
+ QVERIFY(scope->jsIdentifier(u"w"_s));
+
+ const DomItem body = arrow.field(Fields::body);
+ QCOMPARE(body.internalKind(), DomType::ScriptBlockStatement);
+ QCOMPARE(body.field(Fields::statements).indexes(), 1);
+ QCOMPARE(body.field(Fields::statements).index(0).internalKind(),
+ DomType::ScriptReturnStatement);
+ }
+ }
+ void lamdbaInBinding()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem mainObject = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0);
+ {
+ const DomItem lambda = mainObject.field(Fields::bindings)
+ .key(u"onHelloSignal"_s)
+ .index(0)
+ .field(Fields::value)
+ .field(Fields::scriptElement);
+ QVERIFY(lambda);
+ QCOMPARE(lambda.internalKind(), DomType::ScriptFunctionExpression);
+ QCOMPARE(lambda.field(Fields::name).value().toString(), QString());
+ QCOMPARE(lambda.field(Fields::parameters).indexes(), 3);
+ QCOMPARE(lambda.field(Fields::parameters).index(0).field(Fields::identifier).value().toString(), u"x");
+ QCOMPARE(lambda.field(Fields::parameters).index(2).field(Fields::identifier).value().toString(), u"z");
+ auto scope = lambda.semanticScope();
+ QVERIFY(scope);
+ QVERIFY(scope->jsIdentifier(u"z"_s));
+ const DomItem body = lambda.field(Fields::body);
+ QCOMPARE(body.internalKind(), DomType::ScriptBlockStatement);
+ }
+ }
+ void nestedFunction()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem mainObject = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0);
+ {
+ const DomItem nested = mainObject.field(Fields::methods)
+ .key(u"testNestedFunctions"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements)
+ .index(0);
+ QVERIFY(nested);
+ QCOMPARE(nested.internalKind(), DomType::ScriptFunctionExpression);
+ QCOMPARE(nested.field(Fields::name).value().toString(), u"nested"_s);
+ QCOMPARE(nested.field(Fields::parameters).indexes(), 3);
+ QCOMPARE(nested.field(Fields::parameters)
+ .index(0)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"tic");
+ QCOMPARE(nested.field(Fields::parameters)
+ .index(2)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"toe");
+ const DomItem body = nested.field(Fields::body);
+ QCOMPARE(body.internalKind(), DomType::ScriptBlockStatement);
+ auto scope = nested.semanticScope();
+ QVERIFY(scope);
+ QVERIFY(scope->jsIdentifier(u"toe"_s));
+ }
+ }
+ void generatorDeclaration()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem mainObject = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0);
+ {
+ const DomItem generator = mainObject.field(Fields::methods)
+ .key(u"generators"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements)
+ .index(0);
+ QVERIFY(generator);
+ QCOMPARE(generator.internalKind(), DomType::ScriptFunctionExpression);
+ QCOMPARE(generator.field(Fields::name).value().toString(), u"myGeneratorDeclaration"_s);
+ QCOMPARE(generator.field(Fields::parameters).indexes(), 2);
+ QCOMPARE(generator.field(Fields::parameters)
+ .index(0)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"a");
+ QCOMPARE(generator.field(Fields::parameters)
+ .index(1)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"b");
+ const DomItem body = generator.field(Fields::body);
+ QCOMPARE(body.internalKind(), DomType::ScriptBlockStatement);
+ auto scope = generator.semanticScope();
+ QVERIFY(scope);
+ QVERIFY(scope->jsIdentifier(u"b"_s));
+
+ const DomItem yieldExpression =
+ generator.field(Fields::body).field(Fields::statements).index(0);
+ QCOMPARE(yieldExpression.internalKind(), DomType::ScriptYieldExpression);
+ QCOMPARE(yieldExpression.field(Fields::expression).value().toInteger(), 5);
+ }
+ }
+ void generatorExpression()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem mainObject = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0);
+ {
+ const DomItem generator = mainObject.field(Fields::methods)
+ .key(u"generators"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements)
+ .index(1)
+ .field(Fields::declarations)
+ .index(0)
+ .field(Fields::initializer);
+ QVERIFY(generator);
+ QCOMPARE(generator.internalKind(), DomType::ScriptFunctionExpression);
+ QCOMPARE(generator.field(Fields::name).value().toString(), u"myGenerator"_s);
+ QCOMPARE(generator.field(Fields::parameters).indexes(), 3);
+ QCOMPARE(generator.field(Fields::parameters)
+ .index(0)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"tic");
+ QCOMPARE(generator.field(Fields::parameters)
+ .index(2)
+ .field(Fields::identifier)
+ .value()
+ .toString(),
+ u"toe");
+ const DomItem body = generator.field(Fields::body);
+ QCOMPARE(body.internalKind(), DomType::ScriptBlockStatement);
+ auto scope = generator.semanticScope();
+ QVERIFY(scope);
+ QVERIFY(scope->jsIdentifier(u"toe"_s));
+ }
+ }
+ void generatorDeclarationInQmlObject()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem statements = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0)
+ .field(Fields::methods)
+ .key(u"generatorInQmlObject"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements);
+ {
+ const DomItem nested = statements.index(0);
+ QVERIFY(nested);
+ QCOMPARE(nested.internalKind(), DomType::ScriptFunctionExpression);
+
+ const DomItem nested2 = statements.index(1);
+ QVERIFY(nested2);
+ QCOMPARE(nested2.internalKind(), DomType::ScriptFunctionExpression);
+
+ const DomItem yield = statements.index(2);
+ QVERIFY(yield);
+ QCOMPARE(yield.internalKind(), DomType::ScriptYieldExpression);
+
+ const DomItem yieldStar = statements.index(3);
+ QVERIFY(yieldStar);
+ QCOMPARE(yieldStar.internalKind(), DomType::ScriptYieldExpression);
+
+ }
+ }
+ void traditionalLambda()
+ {
+ using namespace Qt::StringLiterals;
+ const QString testFile = baseDir + u"/lambdas.qml"_s;
+ const DomItem fileObject = rootQmlObjectFromFile(testFile, qmltypeDirs).fileObject();
+ const DomItem initializer = fileObject.field(Fields::components)
+ .key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0)
+ .field(Fields::methods)
+ .key(u"traditionalLambda"_s)
+ .index(0)
+ .field(Fields::body)
+ .field(Fields::scriptElement)
+ .field(Fields::statements)
+ .index(0)
+ .field(Fields::declarations)
+ .index(0)
+ .field(Fields::initializer);
+ QVERIFY(initializer);
+ QCOMPARE(initializer.internalKind(), DomType::ScriptParenthesizedExpression);
+ const DomItem lambda = initializer.field(Fields::expression);
+ QVERIFY(lambda);
+ QCOMPARE(lambda.internalKind(), DomType::ScriptFunctionExpression);
+ }
+
+
private:
QString baseDir;
QStringList qmltypeDirs;
diff --git a/tests/auto/qmldom/reformatter/tst_reformatter.h b/tests/auto/qmldom/reformatter/tst_reformatter.h
index 31d80097c1..5cf800c80c 100644
--- a/tests/auto/qmldom/reformatter/tst_reformatter.h
+++ b/tests/auto/qmldom/reformatter/tst_reformatter.h
@@ -461,6 +461,13 @@ private slots:
<< QStringLiteral(u"function *g(a,b){}") << QStringLiteral(u"function* g(a, b) {}");
QTest::newRow("AnonymousGenerator") << QStringLiteral(u"let g=function * (a,b){}")
<< QStringLiteral(u"let g = function* (a, b) {}");
+ QTest::newRow("yield") << QStringLiteral(u"let g=function*(a,b){yield a;}")
+ << QStringLiteral(u"let g = function* (a, b) {\nyield a;\n}");
+ QTest::newRow("yield*") << QStringLiteral(u"let g=function*(a,b){yield*a;}")
+ << QStringLiteral(u"let g = function* (a, b) {\nyield* a;\n}");
+ QTest::newRow("yield*NoSemicolon")
+ << QStringLiteral(u"let g=function*(a,b){yield*a}")
+ << QStringLiteral(u"let g = function* (a, b) {\nyield* a;\n}");
}
// https://262.ecma-international.org/7.0/#prod-HoistableDeclaration
diff --git a/tests/auto/qmlls/modules/data/highlighting/basic.qml b/tests/auto/qmlls/modules/data/highlighting/basic.qml
new file mode 100644
index 0000000000..264f553b22
--- /dev/null
+++ b/tests/auto/qmlls/modules/data/highlighting/basic.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ id: rootId
+ function a() {
+
+ }
+}
diff --git a/tests/auto/qmlls/modules/data/highlighting/bigFile.qml b/tests/auto/qmlls/modules/data/highlighting/bigFile.qml
new file mode 100644
index 0000000000..9832e8e98a
--- /dev/null
+++ b/tests/auto/qmlls/modules/data/highlighting/bigFile.qml
@@ -0,0 +1,351 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ id: rootId
+ function f() {
+ let sum = 0, sum2 = 0;
+ for (let i = 1; i < 42; i = i + 2) {
+ sum = sum + i;
+ {
+ let sum = 42; // another unrelated sum
+ }
+ }
+ }
+
+ readonly property int helloProperty: 0
+ property int p2: 1
+
+ function withProperty() {
+ let sum = 0, sum2 = 0;
+ for (const i = 1; i < 42; i = i + 2) {
+ sum = sum + i;
+ helloProperty = helloProperty + sum - i * p2;
+ {
+ let helloProperty = "evil";
+ }
+ }
+ }
+ Item {
+ function f() {
+ return helloProperty + p2;
+ }
+ property string helloProperty
+ }
+ component IC: Item {
+ property var helloProperty
+ function f() {
+ return helloProperty + p2;
+ }
+ }
+ component NestedComponent: Item {
+ property NestedComponent2 inner: NestedComponent2 {}
+ property int p2
+ }
+ component NestedComponent2: Item {
+ property NestedComponent3 inner
+ property int p2
+ inner: NestedComponent3 {}
+ }
+ component NestedComponent3: Item {
+ property NestedComponent4 inner
+ property int p2
+ inner: NestedComponent4 {}
+ }
+ component NestedComponent4: Item {
+ property int helloProperty
+ property int p2
+ }
+ NestedComponent {
+ id: myNested
+ }
+ function nestedUsages() {
+ let x = myNested.inner.inner.inner.helloProperty + helloProperty;
+ let a = myNested.p2 + p2;
+ let b = myNested.inner.p2 + p2;
+ let c = myNested.inner.inner.p2 + p2;
+ let d = myNested.inner.inner.inner.p2 + p2;
+ }
+
+ function recursive(n: int): int {
+ if (n > 3)
+ return 1 + recursive(recursive(x - 1) + recursive(x - 2) - recursive(x - 3));
+ else
+ return recursive(0);
+ }
+
+ property int helloRecursive: recursive(42)
+ Rectangle {
+ function f() {
+ return rootId.recursive(123);
+ }
+ }
+
+ signal helloSignal
+
+ function callSignals() {
+ helloSignal();
+ if (false) {
+ helloSignal();
+ } else {
+ // helloSignal() // not a usage btw
+ if (true)
+ helloSignal();
+ }
+ }
+ function callSignals2() {
+ helloSignal();
+ if (false) {
+ widthChanged();
+ } else {
+ // helloSignal() // not a usage btw
+ if (true)
+ widthChanged();
+ rootId.widthChanged();
+ }
+ }
+ Item {
+ function callSignalsInChild() {
+ widthChanged();
+ rootId.widthChanged();
+ }
+ }
+
+ function myHelloHandler() {
+ let x = 32;
+ }
+ onHelloSignal: myHelloHandler
+
+ property int helloPropertyBinding
+ helloPropertyBinding: 123
+
+ property int checkHandlers
+ onCheckHandlersChanged: myHelloHandler
+ onChildrenChanged: myHelloHandler
+ function callChanged() {
+ checkHandlersChanged();
+ childrenChanged();
+ }
+ property int _: 48
+ property int ______42: 48
+ property int _123a: 48
+ on_Changed: myHelloHandler
+ on______42Changed: myHelloHandler
+ on_123AChanged: myHelloHandler
+ function weirdPropertynames() {
+ _Changed();
+ ______42Changed();
+ _123aChanged();
+ }
+
+ TapHandler {
+ onTapped: myHelloHandler
+ function f() {
+ tapped();
+ }
+ }
+
+ function anotherF() {
+ helloPropertyChanged();
+ }
+ onHelloPropertyChanged: myHelloHandler
+ // Type {}
+ function foo(mouse) {
+ }
+
+ MouseArea {
+ id: area1
+ onClicked: foo
+ property int insideMouseArea1
+ }
+
+ MouseArea {
+ id: area2
+ Connections {
+ function onClicked(mouse) {
+ area1.clicked();
+ area3.clicked();
+ }
+ }
+ property int insideMouseArea2
+
+ MouseArea {
+ id: area3
+ }
+ }
+
+ property Connections c: Connections {
+ target: area3
+ onClicked: function (mouse) {}
+ }
+ function useMouseAreas() {
+ area1.clicked();
+ area2.clicked();
+ area3.clicked();
+ }
+
+ function checkParameters(a: int, b: double, {
+ x,
+ y = {},
+ z = [x, y]
+ }) {
+ return a + b + c + x + y + z;
+ }
+
+ function deconstructingUsages(xxx) {
+ let {
+ a,
+ b
+ } = xxx;
+ let c = a + b;
+ }
+
+ function k() {
+ }
+
+ function mafik() {
+ var patron = 34;
+ const upperLimit = 42;
+ do {
+ ++patron;
+ if (patron < 2)
+ continue;
+ else
+ ++patron;
+ } while (patron < upperLimit)
+ switch (patron) {
+ case 1:
+ return 23;
+ default:
+ break;
+ }
+ try {
+ {}
+ } catch (error) {
+ {}
+ } finally {}
+ for (const a in [1, 2, 3]) {
+ throw 2;
+ }
+ }
+
+ enum Test {
+ LOG
+ }
+
+ readonly property int t: 34
+ signal tt
+ required property int k
+
+ signal kkk(string a)
+ signal yyy(string a)
+
+ function ttt() {
+ }
+
+ function createComplexExpression(...objects) {
+ // Create an object that holds some data
+ let data = {
+ a: 5,
+ b: 10,
+ c: 3
+ };
+
+ // Create a complex expression using the data object
+ let expression = ((data.a + data.b * data.c) / (data.a - data.b)) ** data.c;
+
+ return expression;
+ }
+
+ function set1() {
+ const array = [1, 2, 3, 4];
+ const [a, b] = [1, 2];
+ const [aa, , bb] = array;
+ const [aaa = 23, bbb] = array;
+ const [a1, b1, ...rest1] = array;
+ const [a2, , b2, ...rest2] = array;
+ const [a3, b3, ...{
+ pop,
+ push
+ }] = array;
+ const [a4, b4, ...[c, d]] = array;
+
+ const obj = {
+ _a: 1,
+ _b: 2
+ };
+ const {
+ a5,
+ b5
+ } = obj;
+ const {
+ a6: a_,
+ b6: b1_
+ } = obj;
+ const {
+ a7: a11 = 4,
+ b11 = 34,
+ c1: b111,
+ d1
+ } = obj;
+ let key = a;
+ const {
+ [key]: a___
+ } = obj;
+ }
+
+ function set2(s: int): int {
+ // declare first
+ let a, b, a1, b1, c, d, rest, pop, push;
+ const array = [1, 2, 3, 4];
+ [a, b] = array;
+ [a, , b] = array;
+ [a = aDefault, b] = array;
+ [a, b, ...rest] = array;
+ [a, , b, ...rest] = array;
+ [a, b, ...{
+ pop,
+ push
+ }] = array;
+ [a, b, ...[c, d]] = array;
+
+ const obj = {
+ _a: 1,
+ _b: 2
+ };
+ ({
+ a,
+ b
+ } = obj); // brackets are required
+ ({
+ a: a1,
+ b: b1
+ } = obj);
+
+ const complicatedObject = {
+ a: 1,
+ b: {
+ c: 2,
+ d: {
+ e: 3,
+ f: [4, 5, 6]
+ }
+ },
+ g: [7, 8, 9]
+ };
+
+ const {
+ patron,
+ b: {
+ mafik,
+ d: {
+ e,
+ f: [, secondF, ...restF]
+ }
+ },
+ g: [firstG, ...restG]
+ } = complicatedObject;
+ }
+}
diff --git a/tests/auto/qmlls/modules/data/renameUsages/RenameMe.qml b/tests/auto/qmlls/modules/data/renameUsages/RenameMe.qml
new file mode 100644
index 0000000000..7680c63f95
--- /dev/null
+++ b/tests/auto/qmlls/modules/data/renameUsages/RenameMe.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+ property int helloProperty
+} \ No newline at end of file
diff --git a/tests/auto/qmlls/modules/data/renameUsages/RenameMe2.ui.qml b/tests/auto/qmlls/modules/data/renameUsages/RenameMe2.ui.qml
new file mode 100644
index 0000000000..b9197def63
--- /dev/null
+++ b/tests/auto/qmlls/modules/data/renameUsages/RenameMe2.ui.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+ property int helloProperty
+}
diff --git a/tests/auto/qmlls/modules/data/renameUsages/main.qml b/tests/auto/qmlls/modules/data/renameUsages/main.qml
new file mode 100644
index 0000000000..b59508f92f
--- /dev/null
+++ b/tests/auto/qmlls/modules/data/renameUsages/main.qml
@@ -0,0 +1,6 @@
+import QtQuick
+
+Item {
+ RenameMe {}
+ RenameMe2 {}
+}
diff --git a/tests/auto/qmlls/modules/tst_qmlls_modules.cpp b/tests/auto/qmlls/modules/tst_qmlls_modules.cpp
index 9145bb7566..fa050b0727 100644
--- a/tests/auto/qmlls/modules/tst_qmlls_modules.cpp
+++ b/tests/auto/qmlls/modules/tst_qmlls_modules.cpp
@@ -3,6 +3,7 @@
#include "tst_qmlls_modules.h"
#include "QtQmlLS/private/qqmllsutils_p.h"
+#include "QtQmlLS/private/qqmlsemantictokens_p.h"
#include <algorithm>
#include <memory>
#include <optional>
@@ -97,8 +98,10 @@ void tst_qmlls_modules::cleanup()
}
m_uriToClose.clear();
- disconnect(&m_server, nullptr, this, nullptr);
- m_server.closeWriteChannel();
+ // note: properly exit the language server
+ m_protocol->requestShutdown(nullptr, []() {});
+ m_protocol->notifyExit(nullptr);
+
m_server.waitForFinished();
QTRY_COMPARE(m_server.state(), QProcess::NotRunning);
QCOMPARE(m_server.exitStatus(), QProcess::NormalExit);
@@ -372,7 +375,7 @@ void tst_qmlls_modules::buildDir()
didChange.textDocument.uri = *uri;
didChange.textDocument.version = 2;
- // change the file content to force qqmlcodemodel to recreate a new DomItem
+ // change the file content to force qqml— to recreate a new DomItem
// if it reuses the old DomItem then it will not know about the added build directory
TextDocumentContentChangeEvent change;
change.range = Range{ Position{ 4, 0 }, Position{ 4, 0 } };
@@ -870,6 +873,12 @@ void tst_qmlls_modules::renameUsages_data()
QVERIFY(file.open(QIODeviceBase::ReadOnly));
jsIdentifierUsagesContent = QString::fromUtf8(file.readAll());
}
+ QString renamingContent;
+ {
+ QFile file(testFile("renameUsages/main.qml").toUtf8());
+ QVERIFY(file.open(QIODeviceBase::ReadOnly));
+ renamingContent = QString::fromUtf8(file.readAll());
+ }
// TODO: create workspace edit for the tests
QLspSpecification::WorkspaceEdit sumRenames{
@@ -905,6 +914,51 @@ void tst_qmlls_modules::renameUsages_data()
"Invalid EcmaScript identifier!",
std::nullopt,
};
+
+ const QString renameUsagesPath = u"renameUsages/main.qml"_s;
+ const QByteArray renameUsagesUri = testFileUrl("renameUsages/main.qml").toEncoded();
+ const QByteArray renameMeUri = testFileUrl("renameUsages/RenameMe.qml").toEncoded();
+ const QByteArray renameMe2Uri = testFileUrl("renameUsages/RenameMe2.ui.qml").toEncoded();
+
+ const QByteArray newFileUri = testFileUrl("renameUsages/HelloWorld.qml").toEncoded();
+ const QByteArray newFileUri2 = testFileUrl("renameUsages/HelloWorld.ui.qml").toEncoded();
+
+ {
+
+ const QLspSpecification::WorkspaceEdit qmlComponentRename{
+ std::nullopt,
+ QList<QLspSpecification::WorkspaceEdit::DocumentChange>{
+ TextDocumentEdit{
+ OptionalVersionedTextDocumentIdentifier{ { renameUsagesUri } },
+ {
+ TextEdit{ rangeFrom(renamingContent, 4, 5,
+ strlen("RenameMe")),
+ "HelloWorld" },
+ } },
+ RenameFile{ "rename", renameMeUri, newFileUri } }
+ };
+
+ QTest::addRow("renameQmlComponent")
+ << renameUsagesPath << 4 << 8 << u"HelloWorld"_s << qmlComponentRename << noError;
+ }
+
+ {
+ QLspSpecification::WorkspaceEdit qmlComponentRename{
+ std::nullopt,
+ QList<QLspSpecification::WorkspaceEdit::DocumentChange>{
+ TextDocumentEdit{
+ OptionalVersionedTextDocumentIdentifier{ { renameUsagesUri } },
+ {
+ TextEdit{ rangeFrom(renamingContent, 5, 5,
+ strlen("RenameMe2")),
+ "HelloWorld" },
+ } },
+ RenameFile{ "rename", renameMe2Uri, newFileUri2 } }
+ };
+
+ QTest::addRow("renameUiQmlComponent")
+ << renameUsagesPath << 5 << 8 << u"HelloWorld"_s << qmlComponentRename << noError;
+ }
}
void tst_qmlls_modules::compareQTextDocumentEdit(const TextDocumentEdit &a,
@@ -965,7 +1019,7 @@ void tst_qmlls_modules::renameUsages()
auto clean = [didFinish]() { *didFinish = true; };
m_protocol->requestRename(
params,
- [&](auto res) {
+ [&](auto &&res) {
QScopeGuard cleanup(clean);
auto *result = std::get_if<QLspSpecification::WorkspaceEdit>(&res);
@@ -990,6 +1044,22 @@ void tst_qmlls_modules::renameUsages()
compareQTextDocumentEdit(
std::get<TextDocumentEdit>(documentChanges[i]),
std::get<TextDocumentEdit>(expectedDocumentChanges[i]));
+ } else if (std::holds_alternative<RenameFile>(documentChanges[i])) {
+ const auto &actual = std::get<RenameFile>(documentChanges[i]);
+ const auto &expected = std::get<RenameFile>(expectedDocumentChanges[i]);
+
+ QCOMPARE(actual.kind, expected.kind);
+ QCOMPARE(expected.kind, "rename");
+ QCOMPARE(actual.oldUri, expected.oldUri);
+ QCOMPARE(actual.newUri, expected.newUri);
+ QCOMPARE(actual.options.has_value(), expected.options.has_value());
+ if (expected.options.has_value()) {
+ QCOMPARE(actual.options->overwrite, expected.options->overwrite);
+ QCOMPARE(actual.options->ignoreIfExists,
+ expected.options->ignoreIfExists);
+ }
+ QCOMPARE(actual.annotationId, expected.annotationId);
+
} else {
QFAIL("TODO: implement me!");
}
@@ -1494,4 +1564,202 @@ void tst_qmlls_modules::quickFixes()
QTRY_VERIFY_WITH_TIMEOUT(codeActionOk, 5000);
}
+static QQmlJS::Dom::DomItem fileObject(const QString &filePath)
+{
+ QFile f(filePath);
+ QQmlJS::Dom::DomItem file;
+ if (!f.open(QIODevice::ReadOnly))
+ return file;
+ QString code = f.readAll();
+ QQmlJS::Dom::DomCreationOptions options;
+ options.setFlag(QQmlJS::Dom::DomCreationOption::WithScriptExpressions);
+ options.setFlag(QQmlJS::Dom::DomCreationOption::WithSemanticAnalysis);
+ options.setFlag(QQmlJS::Dom::DomCreationOption::WithRecovery);
+
+ QStringList dirs = {QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)};
+ auto envPtr = QQmlJS::Dom::DomEnvironment::create(dirs,
+ QQmlJS::Dom::DomEnvironment::Option::SingleThreaded
+ | QQmlJS::Dom::DomEnvironment::Option::NoDependencies, options);
+ envPtr->loadBuiltins();
+ envPtr->loadFile(QQmlJS::Dom::FileToLoad::fromMemory(envPtr, filePath, code),
+ [&file](QQmlJS::Dom::Path, const QQmlJS::Dom::DomItem &, const QQmlJS::Dom::DomItem &newIt) {
+ file = newIt.fileObject();
+ });
+ envPtr->loadPendingDependencies();
+ return file;
+};
+
+void tst_qmlls_modules::semanticHighlightingFull_data()
+{
+ QTest::addColumn<QString>("filePath");
+ QTest::addRow("bigfile") << u"highlighting/bigFile.qml"_s;
+}
+
+void tst_qmlls_modules::semanticHighlightingFull()
+{
+ QFETCH(QString, filePath);
+ const auto item = fileObject(testFile(filePath));
+ Highlights highlights;
+ const auto expectedData = highlights.collectTokens(item, std::nullopt);
+
+ const auto uri = openFile(filePath);
+ QVERIFY(uri);
+ QLspSpecification::SemanticTokensParams params;
+ params.textDocument.uri = *uri;
+ std::shared_ptr<bool> didFinish = std::make_shared<bool>(false);
+ const auto cleanup = [didFinish]() { *didFinish = true; };
+
+ auto &&responseHandler = [&](auto res) {
+ QScopeGuard callAtExit(cleanup);
+ const auto *const result = std::get_if<QLspSpecification::SemanticTokens>(&res);
+ QVERIFY(result);
+ QList<int> data = result->data;
+ QCOMPARE(data.size(), expectedData.size());
+ QCOMPARE(data, expectedData);
+ };
+
+ auto &&errorHandler = [&](auto &error) {
+ QScopeGuard callAtExit(cleanup);
+ ProtocolBase::defaultResponseErrorHandler(error);
+ QVERIFY2(false, "error occurred on full semantic tokens");
+ };
+
+ m_protocol->requestSemanticTokens(params, std::move(responseHandler), std::move(errorHandler));
+ QTRY_VERIFY_WITH_TIMEOUT(*didFinish, 10000);
+}
+
+void tst_qmlls_modules::semanticHighlightingRange_data()
+{
+ QTest::addColumn<QString>("filePath");
+ QTest::addColumn<QLspSpecification::Range>("range");
+ QTest::addRow("bigfile") << u"highlighting/bigFile.qml"_s
+ << QLspSpecification::Range{ { 6, 0 }, { 15, 0 } };
+}
+
+void tst_qmlls_modules::semanticHighlightingRange()
+{
+ QFETCH(QString, filePath);
+ QFETCH(QLspSpecification::Range, range);
+
+ const auto item = fileObject(testFile(filePath));
+ Highlights highlights;
+ const auto qmlFile = item.as<QQmlJS::Dom::QmlFile>();
+ const auto code = qmlFile->code();
+ const int startOffset = int(QQmlLSUtils::textOffsetFrom(code, range.start.line, range.end.character));
+ const int endOffset = int(QQmlLSUtils::textOffsetFrom(code, range.end.line, range.end.character));
+ const auto expectedData = highlights.collectTokens(item, HighlightsRange{startOffset, endOffset});
+
+ const auto uri = openFile(filePath);
+ QVERIFY(uri);
+ QLspSpecification::SemanticTokensRangeParams params;
+ params.textDocument.uri = *uri;
+ params.range = range;
+
+ std::shared_ptr<bool> didFinish = std::make_shared<bool>(false);
+ const auto cleanup = [didFinish]() { *didFinish = true; };
+
+ auto &&responseHandler = [&](auto res) {
+ QScopeGuard callAtExit(cleanup);
+ const auto *const result = std::get_if<QLspSpecification::SemanticTokens>(&res);
+ QVERIFY(result);
+ QList<int> data = result->data;
+ QCOMPARE(data.size(), expectedData.size());
+ QCOMPARE(data, expectedData);
+ };
+
+ auto &&errorHandler = [&](auto &error) {
+ QScopeGuard callAtExit(cleanup);
+ ProtocolBase::defaultResponseErrorHandler(error);
+ QVERIFY2(false, "error occurred on full semantic tokens");
+ };
+
+ m_protocol->requestSemanticTokensRange(params, std::move(responseHandler),
+ std::move(errorHandler));
+ QTRY_VERIFY_WITH_TIMEOUT(*didFinish, 10000);
+}
+
+void tst_qmlls_modules::semanticHighlightingDelta_data()
+{
+ QTest::addColumn<QString>("filePath");
+ QTest::addRow("basicDelta") << u"highlighting/basic.qml"_s;
+}
+
+void tst_qmlls_modules::semanticHighlightingDelta()
+{
+ QSKIP("This test should be skipped until QTBUG-124870 is fixed");
+ QFETCH(QString, filePath);
+ QFETCH(QString, deltaFilePath);
+
+ const auto fileItem = fileObject(testFile(filePath));
+ const auto deltaFileItem = fileObject(testFile(deltaFilePath));
+ Highlights highlights;
+ auto fullDocumentSemanticTokensData = highlights.collectTokens(fileItem, std::nullopt);
+ auto editedDocumentSemanticTokensData = highlights.collectTokens(deltaFileItem, std::nullopt);
+ const auto expectedEdits = HighlightingUtils::computeDiff(fullDocumentSemanticTokensData, editedDocumentSemanticTokensData);
+
+ const auto uri = openFile(filePath);
+ QVERIFY(uri);
+ const auto deltaUri = openFile(deltaFilePath);
+ QVERIFY(deltaUri);
+
+ std::shared_ptr<bool> didFinish = std::make_shared<bool>(false);
+ const auto cleanup = [didFinish]() { *didFinish = true; };
+
+ QLspSpecification::SemanticTokensDeltaParams params;
+ QLspSpecification::Responses::SemanticTokensDeltaResultType result;
+
+ auto &&errorHandler = [&](auto &error) {
+ QScopeGuard callAtExit(cleanup);
+ ProtocolBase::defaultResponseErrorHandler(error);
+ QVERIFY2(false, "error occurred on semantic tokens/delta");
+ };
+
+ QLspSpecification::SemanticTokensParams fullParams;
+ fullParams.textDocument.uri = *uri;
+ m_protocol->requestSemanticTokens(fullParams,
+ [&](auto res) {
+ QScopeGuard callAtExit(cleanup);
+ if (auto r = std::get_if<QLspSpecification::SemanticTokens>(&res)) {
+ params.previousResultId = r->resultId.value();
+ fullDocumentSemanticTokensData = r->data;
+ }
+ }, errorHandler);
+ QTRY_VERIFY_WITH_TIMEOUT(*didFinish, 10000);
+
+ // Change the file
+ DidChangeTextDocumentParams didChange;
+ didChange.textDocument.uri = *uri;
+ didChange.textDocument.version = 2;
+
+ TextDocumentContentChangeEvent change;
+ change.range = Range{ Position{ 8, 4 }, Position{ 8, 4 } };
+ change.text = "const Patron = 42";
+
+ didChange.contentChanges.append(change);
+ m_protocol->notifyDidChangeTextDocument(didChange);
+
+ *didFinish = false;
+ params.textDocument.uri = *uri;
+ m_protocol->requestSemanticTokensDelta(params,
+ [&](auto res) {
+ QScopeGuard callAtExit(cleanup);
+ result = res;
+ }, std::move(errorHandler));
+ QTRY_VERIFY_WITH_TIMEOUT(*didFinish, 10000);
+
+ if (const auto *const delta = std::get_if<QLspSpecification::SemanticTokensDelta>(&result)) {
+ QVERIFY(delta);
+ const auto data = delta->edits.front().data;
+ const auto start = delta->edits.front().start;
+ const auto deleteCount = delta->edits.front().deleteCount;
+ QCOMPARE(start, expectedEdits.front().start);
+ QCOMPARE(deleteCount, expectedEdits.front().deleteCount);
+ QCOMPARE(data, expectedEdits.front().data);
+ } else {
+ const auto *const full = std::get_if<QLspSpecification::SemanticTokens>(&result);
+ QVERIFY(full);
+ QCOMPARE(full->data, expectedEdits.front().data);
+ }
+}
+
QTEST_MAIN(tst_qmlls_modules)
diff --git a/tests/auto/qmlls/modules/tst_qmlls_modules.h b/tests/auto/qmlls/modules/tst_qmlls_modules.h
index d48bc99407..d7b601cf5a 100644
--- a/tests/auto/qmlls/modules/tst_qmlls_modules.h
+++ b/tests/auto/qmlls/modules/tst_qmlls_modules.h
@@ -69,7 +69,12 @@ private slots:
void hover_data();
void hover();
void checkQuickSnippets();
-
+ void semanticHighlightingFull_data();
+ void semanticHighlightingFull();
+ void semanticHighlightingRange_data();
+ void semanticHighlightingRange();
+ void semanticHighlightingDelta_data();
+ void semanticHighlightingDelta();
private:
QProcess m_server;
std::unique_ptr<QLanguageServerProtocol> m_protocol;
diff --git a/tests/auto/qmlls/qqmlcodemodel/data/FileA.qml b/tests/auto/qmlls/qqmlcodemodel/data/FileA.qml
new file mode 100644
index 0000000000..5560aee727
--- /dev/null
+++ b/tests/auto/qmlls/qqmlcodemodel/data/FileA.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+
+}
diff --git a/tests/auto/qmlls/qqmlcodemodel/data/FileA2.qml b/tests/auto/qmlls/qqmlcodemodel/data/FileA2.qml
new file mode 100644
index 0000000000..7680c63f95
--- /dev/null
+++ b/tests/auto/qmlls/qqmlcodemodel/data/FileA2.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+ property int helloProperty
+} \ No newline at end of file
diff --git a/tests/auto/qmlls/qqmlcodemodel/data/FileB.qml b/tests/auto/qmlls/qqmlcodemodel/data/FileB.qml
new file mode 100644
index 0000000000..03cd2f9fb3
--- /dev/null
+++ b/tests/auto/qmlls/qqmlcodemodel/data/FileB.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+FileA {
+ property int helloPropertyInB
+}
diff --git a/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.cpp b/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.cpp
index f56839d99a..a3293769e5 100644
--- a/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.cpp
+++ b/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.cpp
@@ -128,4 +128,58 @@ void tst_qmlls_qqmlcodemodel::fileNamesToWatch()
QVERIFY(fileNames.contains(u"helloworld.h"_s));
}
+QString tst_qmlls_qqmlcodemodel::readFile(const QString &filename) const
+{
+ QFile f(testFile(filename));
+ if (!f.open(QFile::ReadOnly)) {
+ QTest::qFail("Can't read test file", __FILE__, __LINE__);
+ return {};
+ }
+ return f.readAll();
+}
+
+void tst_qmlls_qqmlcodemodel::openFiles()
+{
+ QmlLsp::QQmlCodeModel model;
+
+ const QByteArray fileAUrl = testFileUrl(u"FileA.qml"_s).toEncoded();
+ const QString fileAPath = testFile(u"FileA.qml"_s);
+
+ // open file A
+ model.newOpenFile(fileAUrl, 0, readFile(u"FileA.qml"_s));
+
+ QTRY_VERIFY_WITH_TIMEOUT(model.validEnv().field(Fields::qmlFileWithPath).key(fileAPath), 3000);
+
+ {
+ const DomItem fileAComponents = model.validEnv()
+ .field(Fields::qmlFileWithPath)
+ .key(fileAPath)
+ .field(Fields::currentItem)
+ .field(Fields::components);
+ // if there is no component then the lazy qml file was not loaded correctly.
+ QCOMPARE(fileAComponents.size(), 1);
+ }
+
+ model.newDocForOpenFile(fileAUrl, 1, readFile(u"FileA2.qml"_s));
+
+ {
+ const DomItem fileAComponents = model.validEnv()
+ .field(Fields::qmlFileWithPath)
+ .key(fileAPath)
+ .field(Fields::currentItem)
+ .field(Fields::components);
+ // if there is no component then the lazy qml file was not loaded correctly.
+ QCOMPARE(fileAComponents.size(), 1);
+
+ // also check if the property is there
+ const DomItem properties = fileAComponents.key(QString())
+ .index(0)
+ .field(Fields::objects)
+ .index(0)
+ .field(Fields::propertyDefs);
+ QVERIFY(properties);
+ QVERIFY(properties.key(u"helloProperty"_s));
+ }
+}
+
QTEST_MAIN(tst_qmlls_qqmlcodemodel)
diff --git a/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.h b/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.h
index 45c88d908e..a913f4bd19 100644
--- a/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.h
+++ b/tests/auto/qmlls/qqmlcodemodel/tst_qmlls_qqmlcodemodel.h
@@ -23,6 +23,7 @@ class tst_qmlls_qqmlcodemodel : public QQmlDataTest
Q_OBJECT
public:
tst_qmlls_qqmlcodemodel();
+ QString readFile(const QString &filename) const;
private slots:
void buildPathsForFileUrl_data();
@@ -30,6 +31,7 @@ private slots:
void fileNamesToWatch();
void findFilePathsFromFileNames_data();
void findFilePathsFromFileNames();
+ void openFiles();
};
#endif // TST_QMLLS_QQMLCODEMODEL_H
diff --git a/tests/auto/qmlls/utils/CMakeLists.txt b/tests/auto/qmlls/utils/CMakeLists.txt
index a8a4e9f0c4..ba81707b30 100644
--- a/tests/auto/qmlls/utils/CMakeLists.txt
+++ b/tests/auto/qmlls/utils/CMakeLists.txt
@@ -27,6 +27,36 @@ qt_internal_add_test(tst_qmlls_utils
TESTDATA ${test_data}
)
+qt_internal_add_test(tst_qmlls_highlighting
+ SOURCES
+ tst_qmlls_highlighting.cpp
+ DEFINES
+ QT_QMLLS_HIGHLIGHTS_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data"
+ LIBRARIES
+ Qt::Core
+ Qt::QmlDomPrivate
+ Qt::LanguageServerPrivate
+ Qt::Test
+ Qt::QuickTestUtilsPrivate
+ Qt::QmlLSPrivate
+ TESTDATA ${test_data}
+)
+
+qt_internal_add_test(tst_qmlls_documentationHints
+ SOURCES
+ tst_qmlls_documentationHints.cpp
+ DEFINES
+ QT_QMLLS_DOCUMENTATION_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data"
+ LIBRARIES
+ Qt::Core
+ Qt::QmlDomPrivate
+ Qt::LanguageServerPrivate
+ Qt::Test
+ Qt::QuickTestUtilsPrivate
+ Qt::QmlLSPrivate
+ TESTDATA ${test_data}
+)
+
qt_internal_extend_target(tst_qmlls_utils CONDITION ANDROID OR IOS
DEFINES
QT_QMLLS_UTILS_DATADIR=":/domdata"
diff --git a/tests/auto/qmlls/utils/data/highlights/Identifiers.qml b/tests/auto/qmlls/utils/data/highlights/Identifiers.qml
new file mode 100644
index 0000000000..7725b6d5e4
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/Identifiers.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ readonly property int test: 34
+ signal pressed()
+ function f() {
+ let sum = 0, sum2 = 0
+ for(let i = 1; i < 42; i = i + 2) {
+ sum = test + i
+ {
+ let sum = 42; // another unrelated sum
+ }
+ }
+ // signal and property changed
+ testChanged();
+ pressed();
+ }
+
+ // attached
+ Keys.onPressed: {
+ }
+
+ // propertychanged handler
+ onTestChanged: {
+ f(); // method identifier
+ }
+
+ // signal handler
+ onPressed: {}
+
+ enum K { Plus}
+ property int tt: Identifiers.Plus // component and enum value
+
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/bindings.qml b/tests/auto/qmlls/utils/data/highlights/bindings.qml
new file mode 100644
index 0000000000..ac1592e778
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/bindings.qml
@@ -0,0 +1,12 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ property int x: 45
+
+ Behavior on width {}
+
+ x: width
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/comments.qml b/tests/auto/qmlls/utils/data/highlights/comments.qml
new file mode 100644
index 0000000000..351aaee36c
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/comments.qml
@@ -0,0 +1,19 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+import QtQuick
+Item {
+/*
+ multiline comment
+*/
+
+/* single line comment */
+// another
+
+ function inc() {
+ // in
+
+ /*
+ inside js
+ */
+ }
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/enums.qml b/tests/auto/qmlls/utils/data/highlights/enums.qml
new file mode 100644
index 0000000000..22183bf37f
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/enums.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQml
+
+QtObject {
+ enum Osc {
+ Sin,
+ Saw = 1
+ }
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/identifiers.qml b/tests/auto/qmlls/utils/data/highlights/identifiers.qml
new file mode 100644
index 0000000000..7725b6d5e4
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/identifiers.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ readonly property int test: 34
+ signal pressed()
+ function f() {
+ let sum = 0, sum2 = 0
+ for(let i = 1; i < 42; i = i + 2) {
+ sum = test + i
+ {
+ let sum = 42; // another unrelated sum
+ }
+ }
+ // signal and property changed
+ testChanged();
+ pressed();
+ }
+
+ // attached
+ Keys.onPressed: {
+ }
+
+ // propertychanged handler
+ onTestChanged: {
+ f(); // method identifier
+ }
+
+ // signal handler
+ onPressed: {}
+
+ enum K { Plus}
+ property int tt: Identifiers.Plus // component and enum value
+
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/imports.qml b/tests/auto/qmlls/utils/data/highlights/imports.qml
new file mode 100644
index 0000000000..1e69077070
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/imports.qml
@@ -0,0 +1,9 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQml 2.15
+import "X" as Patron
+
+Item {
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/literals.qml b/tests/auto/qmlls/utils/data/highlights/literals.qml
new file mode 100644
index 0000000000..520ed5d2ef
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/literals.qml
@@ -0,0 +1,14 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ property int a: 123
+ property string b: "single"
+ property string c: "multi
+ line string";
+ property bool d: true
+ property var e: null
+
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/methodAndSignal.qml b/tests/auto/qmlls/utils/data/highlights/methodAndSignal.qml
new file mode 100644
index 0000000000..4e8319f049
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/methodAndSignal.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ signal p()
+ signal q(int a)
+ signal r(a: int)
+ function a(b: int) : int {}
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/objectAndComponent.qml b/tests/auto/qmlls/utils/data/highlights/objectAndComponent.qml
new file mode 100644
index 0000000000..9165e4b1b5
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/objectAndComponent.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ component Patron: Item {}
+ Item {
+ id: inner
+ }
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/pragmas.qml b/tests/auto/qmlls/utils/data/highlights/pragmas.qml
new file mode 100644
index 0000000000..cf99c93584
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/pragmas.qml
@@ -0,0 +1,10 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+pragma Singleton
+pragma FunctionSignatureBehavior: Enforced
+pragma ValueTypeBehavior: Copy,Addressable
+
+import QtQml
+
+QtObject {}
diff --git a/tests/auto/qmlls/utils/data/highlights/properties.qml b/tests/auto/qmlls/utils/data/highlights/properties.qml
new file mode 100644
index 0000000000..bde60915ca
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/properties.qml
@@ -0,0 +1,13 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ Item {
+ property int k
+ readonly property int kk
+ required property int kkk
+ default property int kkkk
+ }
+}
diff --git a/tests/auto/qmlls/utils/data/highlights/scriptExpressions.qml b/tests/auto/qmlls/utils/data/highlights/scriptExpressions.qml
new file mode 100644
index 0000000000..ee0b4ff5f8
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/highlights/scriptExpressions.qml
@@ -0,0 +1,116 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ function k() {
+ }
+
+ function mafik() {
+ var patron = 34;
+ const upperLimit = 42;
+ do {
+ ++patron;
+ if (patron < 2)
+ continue;
+ else
+ ++patron;
+ } while (patron < upperLimit)
+ switch (patron) {
+ case 1:
+ return 23;
+ default:
+ break;
+ }
+ try {
+ {}
+ } catch (error) {
+ {}
+ } finally {}
+ for (const a in [1, 2, 3]) {
+ throw 2;
+ }
+ }
+
+ enum Test {
+ LOG
+ }
+
+ readonly property int t: 34
+ signal tt
+ required property int k
+
+ signal kkk(string a)
+ signal yyy(a: string)
+
+ function ttt() {
+
+ }
+
+function createComplexExpression(...objects) {
+ // Create an object that holds some data
+ let data = {
+ a: 5,
+ b: 10,
+ c: 3
+ };
+
+ // Create a complex expression using the data object
+ let expression = ((data.a + data.b * data.c) / (data.a - data.b)) ** data.c;
+
+ return expression;
+}
+
+ function set1() {
+ const array = [1,2,3,4];
+ const [a, b] = [1,2];
+ const [aa, , bb] = array;
+ const [aaa = 23, bbb] = array;
+ const [a1, b1, ...rest1] = array;
+ const [a2, , b2, ...rest2] = array;
+ const [a3, b3, ...{ pop, push }] = array;
+ const [a4, b4, ...[c, d]] = array;
+
+ const obj = {_a:1,_b:2};
+ const { a5, b5 } = obj;
+ const { a6: a_, b6: b1_ } = obj;
+ const { a7: a11 = 4, b11 = 34, c1: b111, d1 } = obj;
+ let key = a;
+ const { [key]: a___ } = obj;
+ }
+
+ function set2(s : int) : int {
+ // declare first
+ let a, b, a1, b1, c, d, rest, pop, push;
+ const array = [1,2,3,4];
+ [a, b] = array;
+ [a, , b] = array;
+ [a = aDefault, b] = array;
+ [a, b, ...rest] = array;
+ [a, , b, ...rest] = array;
+ [a, b, ...{ pop, push }] = array;
+ [a, b, ...[c, d]] = array;
+
+ const obj = {_a:1,_b:2};
+ ({ a, b } = obj); // brackets are required
+ ({ a: a1, b: b1 } = obj);
+
+ const complicatedObject = {
+ a: 1,
+ b: {
+ c: 2,
+ d: {
+ e: 3,
+ f: [4, 5, 6]
+ }
+ },
+ g: [7, 8, 9]
+ };
+
+ const { patron, b: { mafik, d: { e, f: [ , secondF, ...restF ] } }, g: [ firstG, ...restG ] } = complicatedObject;
+ }
+
+
+}
+
diff --git a/tests/auto/qmlls/utils/data/renaming/RenameMe.qml b/tests/auto/qmlls/utils/data/renaming/RenameMe.qml
new file mode 100644
index 0000000000..adc3da9800
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/renaming/RenameMe.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+ property int i42
+} \ No newline at end of file
diff --git a/tests/auto/qmlls/utils/data/renaming/RenameMe2.ui.qml b/tests/auto/qmlls/utils/data/renaming/RenameMe2.ui.qml
new file mode 100644
index 0000000000..35320e03ff
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/renaming/RenameMe2.ui.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Item {
+ property string i42
+} \ No newline at end of file
diff --git a/tests/auto/qmlls/utils/data/renaming/RenamedByQmldir.qml b/tests/auto/qmlls/utils/data/renaming/RenamedByQmldir.qml
new file mode 100644
index 0000000000..f97cbcf115
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/renaming/RenamedByQmldir.qml
@@ -0,0 +1,4 @@
+import QtQuick
+
+Item {
+}
diff --git a/tests/auto/qmlls/utils/data/renaming/UnrelatedFile.qml b/tests/auto/qmlls/utils/data/renaming/UnrelatedFile.qml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/renaming/UnrelatedFile.qml
diff --git a/tests/auto/qmlls/utils/data/renaming/main.qml b/tests/auto/qmlls/utils/data/renaming/main.qml
new file mode 100644
index 0000000000..10afda9773
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/renaming/main.qml
@@ -0,0 +1,7 @@
+import QtQuick
+
+Item {
+ RenameMe {}
+ RenameMe2 {}
+ HelloWorld {}
+}
diff --git a/tests/auto/qmlls/utils/data/renaming/qmldir b/tests/auto/qmlls/utils/data/renaming/qmldir
new file mode 100644
index 0000000000..8cff297e26
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/renaming/qmldir
@@ -0,0 +1,6 @@
+module renaming
+RenameMe 254.0 RenameMe.qml
+RenameMe2 254.0 RenameMe2.ui.qml
+RenameMe3 254.0 subfolder/RenameMe3.qml
+main 254.0 main.qml
+HelloWorld 254.0 RenamedByQmldir.qml \ No newline at end of file
diff --git a/tests/auto/qmlls/utils/tst_qmlls_documentationHints.cpp b/tests/auto/qmlls/utils/tst_qmlls_documentationHints.cpp
new file mode 100644
index 0000000000..dcb6f47df9
--- /dev/null
+++ b/tests/auto/qmlls/utils/tst_qmlls_documentationHints.cpp
@@ -0,0 +1,134 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "tst_qmlls_documentationHints.h"
+
+#include <QtQmlLS/private/qdochtmlparser_p.h>
+#include <QtQmlDom/private/qqmldomtop_p.h>
+
+tst_qmlls_documentationHints::tst_qmlls_documentationHints()
+ : QQmlDataTest(QT_QMLLS_DOCUMENTATION_DATADIR) , m_documentationDataDir(QT_QMLLS_DOCUMENTATION_DATADIR + "/documentationHints"_L1)
+{
+}
+
+void tst_qmlls_documentationHints::qdochtmlparser_data()
+{
+ using namespace QQmlJS::Dom;
+ QTest::addColumn<QString>("filePath");
+ QTest::addColumn<QString>("keyword");
+ QTest::addColumn<DomType>("domType");
+ QTest::addColumn<HtmlExtractor::ExtractionMode>("extractionMode");
+ QTest::addColumn<QString>("expectedDocumentation");
+
+ QTest::addRow("qml-object-type-extended-plaintext")
+ << testFile("qdochtmlparser/qml-qtqml-qtobject.html")
+ << "QtObject"
+ << DomType::QmlObject
+ << HtmlExtractor::ExtractionMode::Extended
+ << R"(The QtObject type is a non-visual element which contains only the objectName property.
+It can be useful to create a QtObject if you need an extremely lightweight type to enclose a set of custom properties:
+
+ import QtQuick
+
+ Item {
+ QtObject {
+ id: attributes
+ property string name
+ property int size
+ property variant attributes
+ }
+
+ Text { text: attributes.name }
+ }
+
+It can also be useful for C++ integration, as it is just a plain QObject. See the QObject documentation for further details.)";
+
+ QTest::addRow("qml-object-type-simplified-plaintext")
+ << testFile("qdochtmlparser/qml-qtqml-qtobject.html")
+ << "QtObject"
+ << DomType::QmlObject
+ << HtmlExtractor::ExtractionMode::Simplified
+ << R"(A basic QML type.)";
+
+ QTest::addRow("qml-property-simplified-plaintext")
+ << testFile("qdochtmlparser/qml-qtqml-qtobject.html")
+ << "objectName"
+ << DomType::PropertyDefinition
+ << HtmlExtractor::ExtractionMode::Simplified
+ << R"(This property holds the QObject::objectName for this specific object instance.)";
+
+ QTest::addRow("qml-property-simplified-plaintext-from-Qt5")
+ << testFile("qdochtmlparser/qml-qtqml-qtobject-qt-5.html")
+ << "objectName"
+ << DomType::PropertyDefinition
+ << HtmlExtractor::ExtractionMode::Simplified
+ << R"(This property holds the QObject::objectName for this specific object instance.)";
+
+ QTest::addRow("qml-property-simplified-plaintext")
+ << testFile("qdochtmlparser/qml-qtquick-item.html")
+ << "width"
+ << DomType::PropertyDefinition
+ << HtmlExtractor::ExtractionMode::Simplified
+ << R"(Defines the item's position and size. The default value is 0.)";
+
+ QTest::addRow("qml-group-property-simplified-plaintext")
+ << testFile("qdochtmlparser/qml-qtquick-item.html")
+ << "anchors.fill"
+ << DomType::PropertyDefinition
+ << HtmlExtractor::ExtractionMode::Simplified
+ << R"(Anchors provide a way to position an item by specifying its relationship with other items.)";
+ QTest::addRow("qml-functions")
+ << testFile("qdochtmlparser/qml-qtquick-item.html")
+ << "mapFromGlobal"
+ << DomType::MethodInfo
+ << HtmlExtractor::ExtractionMode::Simplified
+ << "Maps the point (x, y), which is in the global coordinate system, to the item's coordinate system,"
+ " and returns a point matching the mapped coordinate.";
+
+ QTest::addRow("qml-functions-list")
+ << testFile("qdochtmlparser/qml-qtquick-item.html")
+ << "mapFromItem"
+ << DomType::MethodInfo
+ << HtmlExtractor::ExtractionMode::Simplified
+ << "Maps the point (x, y) or rect (x, y, width, height), which is in item's coordinate system,"
+ " to this item's coordinate system, and returns a point or rect matching the mapped coordinate.";
+ QTest::addRow("qml-signal")
+ << testFile("qdochtmlparser/qml-qtquick-mousearea.html")
+ << "pressAndHold"
+ << DomType::MethodInfo
+ << HtmlExtractor::ExtractionMode::Simplified
+ << "This signal is emitted when there is a long press (currently 800ms). The mouse parameter provides information about the press, "
+ "including the x and y position of the press, and which button is pressed.";
+
+ // Some properties and methods can be shown as in groups in qt-docs, like width and height of Item.
+ QTest::addRow("multiple-entries")
+ << testFile("qdochtmlparser/qml-qtquick-mousearea.html")
+ << "pressAndHold"
+ << DomType::MethodInfo
+ << HtmlExtractor::ExtractionMode::Simplified
+ << "This signal is emitted when there is a long press (currently 800ms). The mouse parameter provides information about the press, "
+ "including the x and y position of the press, and which button is pressed.";
+}
+
+void tst_qmlls_documentationHints::qdochtmlparser()
+{
+ using namespace QQmlJS::Dom;
+ QFETCH(QString, filePath);
+ QFETCH(QString, keyword);
+ QFETCH(DomType, domType);
+ QFETCH(HtmlExtractor::ExtractionMode, extractionMode);
+ QFETCH(QString, expectedDocumentation);
+
+ const auto htmlCode = [](const QString &testFileName) {
+ QFile file(testFileName);
+ if (file.open(QIODeviceBase::ReadOnly | QIODevice::Text))
+ return QString::fromUtf8(file.readAll());
+ return QString{};
+ }(filePath);
+
+ ExtractDocumentation extractor(domType);
+ const auto actual = extractor.execute(htmlCode, keyword, extractionMode);
+ QCOMPARE(actual, expectedDocumentation);
+}
+
+QTEST_MAIN(tst_qmlls_documentationHints)
diff --git a/tests/auto/qmlls/utils/tst_qmlls_documentationHints.h b/tests/auto/qmlls/utils/tst_qmlls_documentationHints.h
new file mode 100644
index 0000000000..f3b0f4ddd1
--- /dev/null
+++ b/tests/auto/qmlls/utils/tst_qmlls_documentationHints.h
@@ -0,0 +1,24 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef TST_QMLLS_DOCUMENTATION_H
+#define TST_QMLLS_DOCUMENTATION_H
+
+#include <QtQuickTestUtils/private/qmlutils_p.h>
+#include <QtCore/qobject.h>
+#include <QtTest/qtest.h>
+
+class tst_qmlls_documentationHints : public QQmlDataTest
+{
+ Q_OBJECT
+public:
+ tst_qmlls_documentationHints();
+private slots:
+ void qdochtmlparser_data();
+ void qdochtmlparser();
+
+private:
+ QString m_documentationDataDir;
+};
+
+#endif // TST_QMLLS_DOCUMENTATION_H
diff --git a/tests/auto/qmlls/utils/tst_qmlls_highlighting.cpp b/tests/auto/qmlls/utils/tst_qmlls_highlighting.cpp
new file mode 100644
index 0000000000..f21de11990
--- /dev/null
+++ b/tests/auto/qmlls/utils/tst_qmlls_highlighting.cpp
@@ -0,0 +1,650 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "tst_qmlls_highlighting.h"
+
+#include <QtQml/private/qqmljsengine_p.h>
+#include <QtQml/private/qqmljslexer_p.h>
+#include <QtQml/private/qqmljsparser_p.h>
+#include <QtQmlDom/private/qqmldomitem_p.h>
+#include <QtQmlDom/private/qqmldomtop_p.h>
+#include <QtQmlLS/private/qqmlsemantictokens_p.h>
+#include <QtCore/qlibraryinfo.h>
+#include <QtLanguageServer/private/qlanguageserverspectypes_p.h>
+
+#include <qlist.h>
+
+using namespace QLspSpecification;
+
+tst_qmlls_highlighting::tst_qmlls_highlighting()
+ : QQmlDataTest(QT_QMLLS_HIGHLIGHTS_DATADIR) , m_highlightingDataDir(QT_QMLLS_HIGHLIGHTS_DATADIR + "/highlights"_L1)
+{
+}
+
+// Token encoding as in:
+// https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#textDocument_semanticTokens
+void tst_qmlls_highlighting::encodeSemanticTokens_data()
+{
+ QTest::addColumn<Highlights>("highlights");
+ QTest::addColumn<QList<int>>("expectedMemoryLayout");
+
+ {
+ Highlights c;
+ c.highlights().insert(0, Token());
+ QTest::addRow("empty-token-single") << c << QList {0, 0, 0, 0, 0};
+ }
+ {
+ Highlights c;
+ QQmlJS::SourceLocation loc(0, 1, 1, 1);
+ c.highlights().insert(0, Token(loc, 0, 0));
+ QTest::addRow("single-token") << c << QList {0, 0, 1, 0, 0};
+ }
+ {
+ Highlights c;
+ Token t1(QQmlJS::SourceLocation(0, 1, 1, 1), 0, 0);
+ Token t2(QQmlJS::SourceLocation(1, 1, 3, 3), 0, 0);
+ c.highlights().insert(t1.offset, t1);
+ c.highlights().insert(t2.offset, t2);
+ QTest::addRow("different-lines") << c << QList {0, 0, 1, 0, 0, 2, 2, 1, 0, 0};
+ }
+ {
+ Highlights c;
+ Token t1(QQmlJS::SourceLocation(0, 1, 1, 1), 0, 0);
+ Token t2(QQmlJS::SourceLocation(1, 1, 1, 3), 0, 0);
+ c.highlights().insert(t1.offset, t1);
+ c.highlights().insert(t2.offset, t2);
+ QTest::addRow("same-line-different-column") << c << QList {0, 0, 1, 0, 0, 0, 2, 1, 0, 0};
+ }
+ {
+ Highlights c;
+ Token t1(QQmlJS::SourceLocation(0, 1, 1, 1), 1, 0);
+ c.highlights().insert(t1.offset, t1);
+ QTest::addRow("token-type") << c << QList {0, 0, 1, 1, 0};
+ }
+ {
+ Highlights c;
+ Token t1(QQmlJS::SourceLocation(0, 1, 1, 1), 1, 1);
+ c.highlights().insert(t1.offset, t1);
+ QTest::addRow("token-modifier") << c << QList {0, 0, 1, 1, 1};
+ }
+}
+
+void tst_qmlls_highlighting::encodeSemanticTokens()
+{
+ QFETCH(Highlights, highlights);
+ QFETCH(QList<int>, expectedMemoryLayout);
+ const auto encoded = HighlightingUtils::encodeSemanticTokens(highlights);
+ QCOMPARE(encoded, expectedMemoryLayout);
+}
+
+struct LineLength
+{
+ quint32 startLine;
+ quint32 length;
+};
+
+void tst_qmlls_highlighting::sourceLocationsFromMultiLineToken_data()
+{
+ QTest::addColumn<QString>("source");
+ QTest::addColumn<QList<LineLength>>("expectedLines");
+
+ QTest::addRow("multilineComment1") << R"("line 1
+line 2
+line 3 ")" << QList{ LineLength{ 1, 7 }, LineLength{ 2, 6 }, LineLength{ 3, 8 } };
+
+ QTest::addRow("prePostNewlines") <<
+ R"("
+
+")" << QList{ LineLength{ 1, 1 }, LineLength{ 2, 0 }, LineLength{ 3, 1 } };
+ QTest::addRow("windows-newline")
+ << QString::fromUtf8("\"test\r\nwindows\r\nnewline\"")
+ << QList{ LineLength{ 1, 5 }, LineLength{ 2, 7 }, LineLength{ 3, 8 } };
+}
+
+void tst_qmlls_highlighting::sourceLocationsFromMultiLineToken()
+{
+ QFETCH(QString, source);
+ QFETCH(QList<LineLength>, expectedLines);
+ using namespace QQmlJS::AST;
+
+ QQmlJS::Engine jsEngine;
+ QQmlJS::Lexer lexer(&jsEngine);
+ lexer.setCode(source, 1, true);
+ QQmlJS::Parser parser(&jsEngine);
+ parser.parseExpression();
+ const auto expression = parser.expression();
+
+ auto *literal = QQmlJS::AST::cast<QQmlJS::AST::StringLiteral *>(expression);
+ const auto locs =
+ HighlightingUtils::sourceLocationsFromMultiLineToken(source, literal->literalToken);
+
+ [&]() {
+ QCOMPARE(locs.size(), expectedLines.size());
+
+ for (auto i = 0; i < locs.size(); ++i) {
+ QCOMPARE(locs[i].startLine, expectedLines[i].startLine);
+ QCOMPARE(locs[i].length, expectedLines[i].length);
+ }
+ }();
+
+ if (QTest::currentTestFailed()) {
+
+ qDebug() << "Actual locations";
+ for (auto i = 0; i < locs.size(); ++i) {
+ qDebug() << "Startline :" << locs[i].startLine << "Length " << locs[i].length;
+ }
+
+ qDebug() << "Expected locations";
+ for (auto i = 0; i < expectedLines.size(); ++i) {
+ qDebug() << "Startline :" << expectedLines[i].startLine
+ << "Length :" << expectedLines[i].length;
+ }
+ }
+}
+
+void tst_qmlls_highlighting::highlights_data()
+{
+ using namespace QQmlJS::Dom;
+ QTest::addColumn<DomItem>("fileItem");
+ QTest::addColumn<Token>("expectedHighlightedToken");
+
+ const auto fileObject = [](const QString &filePath){
+ QFile f(filePath);
+ DomItem file;
+ if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
+ return file;
+ QString code = f.readAll();
+ DomCreationOptions options;
+ options.setFlag(DomCreationOption::WithScriptExpressions);
+ options.setFlag(DomCreationOption::WithSemanticAnalysis);
+ options.setFlag(DomCreationOption::WithRecovery);
+
+ QStringList dirs = {QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)};
+ auto envPtr = DomEnvironment::create(dirs,
+ QQmlJS::Dom::DomEnvironment::Option::SingleThreaded
+ | QQmlJS::Dom::DomEnvironment::Option::NoDependencies, options);
+ envPtr->loadBuiltins();
+ envPtr->loadFile(FileToLoad::fromMemory(envPtr, filePath, code),
+ [&file](Path, const DomItem &, const DomItem &newIt) {
+ file = newIt.fileObject();
+ });
+ envPtr->loadPendingDependencies();
+ return file;
+ };
+
+ { // Comments
+ const auto filePath = m_highlightingDataDir + "/comments.qml";
+ const auto fileItem = fileObject(filePath);
+ // Copyright (C) 2023 The Qt Company Ltd.
+ QTest::addRow("single-line-1")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(0, 41, 1, 1), int(SemanticTokenTypes::Comment), 0);
+
+ /* single line comment */
+ QTest::addRow("single-line-2") << fileItem
+ << Token(QQmlJS::SourceLocation(162, 28, 9, 1),
+ int(SemanticTokenTypes::Comment), 0);
+
+ // Multiline comments are split into multiple locations
+ QTest::addRow("multiline-first-line")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(133, 2, 5, 1), int(SemanticTokenTypes::Comment), 0);
+ QTest::addRow("multiline-second-line") << fileItem
+ << Token(QQmlJS::SourceLocation(136, 21, 6, 1),
+ int(SemanticTokenTypes::Comment), 0);
+ QTest::addRow("multiline-third-line")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(158, 2, 7, 1), int(SemanticTokenTypes::Comment), 0);
+
+ // Comments Inside Js blocks
+ QTest::addRow("inside-js") << fileItem
+ << Token(QQmlJS::SourceLocation(232, 5, 13, 9),
+ int(SemanticTokenTypes::Comment), 0);
+ }
+ { // Imports
+ const auto filePath = m_highlightingDataDir + "/imports.qml";
+ const auto fileItem = fileObject(filePath);
+ QTest::addRow("import-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(112, 6, 4, 1), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("module-uri") << fileItem
+ << Token(QQmlJS::SourceLocation(119, 7, 4, 8),
+ int(SemanticTokenTypes::Namespace), 0);
+ QTest::addRow("directory-uri")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(152, 3, 6, 8), int(SemanticTokenTypes::String), 0);
+ QTest::addRow("as-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(156, 2, 6, 12),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("version-number")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(140, 4, 5, 14), int(SemanticTokenTypes::Number), 0);
+ QTest::addRow("qualified-namespace") << fileItem
+ << Token(QQmlJS::SourceLocation(159, 6, 6, 15),
+ int(SemanticTokenTypes::Namespace), 0);
+ }
+ { // Bindings
+ const auto filePath = m_highlightingDataDir + "/bindings.qml";
+ const auto fileItem = fileObject(filePath);
+
+ // normal binding
+ QTest::addRow("normalBinding") << fileItem
+ << Token(QQmlJS::SourceLocation(189, 1, 11, 5),
+ int(SemanticTokenTypes::Property), 0);
+ // on binding
+ QTest::addRow("on-binding") << fileItem
+ << Token(QQmlJS::SourceLocation(175, 5, 9, 17),
+ int(SemanticTokenTypes::Property), 0);
+ QTest::addRow("on-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(172, 2, 9, 14),
+ int(SemanticTokenTypes::Keyword), 0);
+ }
+ { // Pragmas
+ const auto filePath = m_highlightingDataDir + "/pragmas.qml";
+ const auto fileItem = fileObject(filePath);
+ QTest::addRow("pragma-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(112, 6, 4, 1), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("pragma-name") << fileItem
+ << Token(QQmlJS::SourceLocation(136, 25, 5, 8),
+ int(SemanticTokenTypes::Variable), 0);
+ QTest::addRow("pragma-value") << fileItem
+ << Token(QQmlJS::SourceLocation(198, 4, 6, 27),
+ int(SemanticTokenTypes::Variable), 0);
+ }
+ { // Enums
+ const auto filePath = m_highlightingDataDir + "/enums.qml";
+ const auto fileItem = fileObject(filePath);
+ QTest::addRow("enum-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(141, 4, 7, 5), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("enum-name")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(146, 3, 7, 10), int(SemanticTokenTypes::Enum), 0);
+ QTest::addRow("enum-item") << fileItem
+ << Token(QQmlJS::SourceLocation(160, 3, 8, 9),
+ int(SemanticTokenTypes::EnumMember), 0);
+ QTest::addRow("enum-value")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(179, 1, 9, 15), int(SemanticTokenTypes::Number), 0);
+ }
+ { // objects and inline components
+ const auto filePath = m_highlightingDataDir + "/objectAndComponent.qml";
+ const auto fileItem = fileObject(filePath);
+
+ // object
+ QTest::addRow("object-identifier")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(169, 4, 8, 5), int(SemanticTokenTypes::Type), 0);
+ QTest::addRow("object-id-property") << fileItem
+ << Token(QQmlJS::SourceLocation(184, 2, 9, 9),
+ int(SemanticTokenTypes::Property), 0);
+ QTest::addRow("object-id-name") << fileItem
+ << Token(QQmlJS::SourceLocation(188, 5, 9, 13),
+ int(SemanticTokenTypes::Variable), 0);
+
+ // component
+ QTest::addRow("component-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(139, 9, 7, 5), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("component-name")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(149, 6, 7, 15), int(SemanticTokenTypes::Type), 0);
+ }
+ { // property definition
+ const auto filePath = m_highlightingDataDir + "/properties.qml";
+ const auto fileItem = fileObject(filePath);
+
+ int definitionModifier = 1 << int(SemanticTokenModifiers::Definition);
+ QTest::addRow("property-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(154, 8, 8, 9), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("property-type")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(163, 3, 8, 18), int(SemanticTokenTypes::Type), 0);
+ QTest::addRow("property-name")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(167, 1, 8, 22), int(SemanticTokenTypes::Property),
+ definitionModifier);
+ int readOnlyModifier = definitionModifier | (1 << int(SemanticTokenModifiers::Readonly));
+ QTest::addRow("readonly-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(177, 8, 9, 9), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("readonly-modifier")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(199, 2, 9, 31), int(SemanticTokenTypes::Property),
+ readOnlyModifier);
+ int requiredModifier = definitionModifier | (1 << int(SemanticTokenModifiers::Abstract));
+ QTest::addRow("required-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(210, 8, 10, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("required-modifier")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(232, 3, 10, 31), int(SemanticTokenTypes::Property),
+ requiredModifier);
+ int defaultModifier =
+ definitionModifier | (1 << int(SemanticTokenModifiers::DefaultLibrary));
+ QTest::addRow("default-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(244, 7, 11, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("default-modifier")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(265, 4, 11, 30), int(SemanticTokenTypes::Property),
+ defaultModifier);
+ }
+ {
+ // methods and signals
+ const auto filePath = m_highlightingDataDir + "/methodAndSignal.qml";
+ const auto fileItem = fileObject(filePath);
+
+ QTest::addRow("signal-keyword")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(139, 6, 7, 5), int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("signal-name")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(146, 1, 7, 12), int(SemanticTokenTypes::Method), 0);
+ QTest::addRow("signal-type")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(163, 3, 8, 14), int(SemanticTokenTypes::Type), 0);
+ QTest::addRow("signal-type-2")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(186, 3, 9, 17), int(SemanticTokenTypes::Type), 0);
+ QTest::addRow("function-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(195, 9, 10, 5),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("function-name") << fileItem
+ << Token(QQmlJS::SourceLocation(204, 1, 10, 14),
+ int(SemanticTokenTypes::Method), 0);
+ QTest::addRow("function-prm-type")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(209, 3, 10, 19), int(SemanticTokenTypes::Type), 0);
+ QTest::addRow("function-prm-name") << fileItem
+ << Token(QQmlJS::SourceLocation(206, 1, 10, 16),
+ int(SemanticTokenTypes::Parameter), 0);
+ QTest::addRow("function-rtn-type")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(216, 3, 10, 26), int(SemanticTokenTypes::Type), 0);
+ }
+ { // literals
+ const auto filePath = m_highlightingDataDir + "/literals.qml";
+ const auto fileItem = fileObject(filePath);
+
+ QTest::addRow("number") << fileItem
+ << Token(QQmlJS::SourceLocation(155, 3, 7, 21),
+ int(SemanticTokenTypes::Number), 0);
+ QTest::addRow("singleline-string")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(182, 8, 8, 24), int(SemanticTokenTypes::String), 0);
+ QTest::addRow("multiline-string-first")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(214, 6, 9, 24), int(SemanticTokenTypes::String), 0);
+ QTest::addRow("multiline-string-second") << fileItem
+ << Token(QQmlJS::SourceLocation(221, 16, 10, 1),
+ int(SemanticTokenTypes::String), 0);
+ QTest::addRow("boolean") << fileItem
+ << Token(QQmlJS::SourceLocation(260, 4, 11, 22),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("null") << fileItem
+ << Token(QQmlJS::SourceLocation(285, 4, 12, 21),
+ int(SemanticTokenTypes::Keyword), 0);
+ }
+ { // identifiers
+ const auto filePath = m_highlightingDataDir + "/Identifiers.qml";
+ const auto fileItem = fileObject(filePath);
+ QTest::addRow("js-property") << fileItem
+ << Token(QQmlJS::SourceLocation(222, 3, 10, 13),
+ int(SemanticTokenTypes::Variable), 0);
+ QTest::addRow("property-id")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(302, 4, 12, 19), int(SemanticTokenTypes::Property),
+ (1 << int(SemanticTokenModifiers::Readonly)));
+ QTest::addRow("property-changed") << fileItem
+ << Token(QQmlJS::SourceLocation(451, 11, 18, 9),
+ int(SemanticTokenTypes::Method), 0);
+ QTest::addRow("signal") << fileItem
+ << Token(QQmlJS::SourceLocation(474, 7, 19, 9),
+ int(SemanticTokenTypes::Method), 0);
+
+ QTest::addRow("attached-id")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(512, 4, 23, 5), int(SemanticTokenTypes::Type), 0);
+ QTest::addRow("attached-signalhandler") << fileItem
+ << Token(QQmlJS::SourceLocation(517, 9, 23, 10),
+ int(SemanticTokenTypes::Method), 0);
+ QTest::addRow("propchanged-handler") << fileItem
+ << Token(QQmlJS::SourceLocation(572, 13, 27, 5),
+ int(SemanticTokenTypes::Method), 0);
+ QTest::addRow("method-id")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(597, 1, 28, 9), int(SemanticTokenTypes::Method), 0);
+ QTest::addRow("signal-handler")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(656, 9, 32, 5), int(SemanticTokenTypes::Method), 0);
+ }
+ { // script expressions
+ const auto filePath = m_highlightingDataDir + "/scriptExpressions.qml";
+ const auto fileItem = fileObject(filePath);
+
+ QTest::addRow("var-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(192, 3, 11, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("const-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(217, 5, 12, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ const auto modifier = (1 << int(SemanticTokenModifiers::Readonly));
+ QTest::addRow("const-name") << fileItem
+ << Token(QQmlJS::SourceLocation(223, 10, 12, 15),
+ int(SemanticTokenTypes::Variable), modifier);
+ QTest::addRow("do-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(248, 2, 13, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("if-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(287, 2, 15, 13),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("continue-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(319, 8, 16, 17),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("else-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(341, 4, 17, 13),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("while-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(382, 5, 19, 11),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("switch-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(418, 6, 20, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("case-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(444, 4, 21, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("return-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(464, 6, 22, 13),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("default-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(483, 7, 23, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("break-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(504, 5, 24, 13),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("try-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(529, 3, 26, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("catch-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(560, 5, 28, 11),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("finally-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(601, 7, 30, 11),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("for-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(620, 3, 31, 9),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("throw-keyword") << fileItem
+ << Token(QQmlJS::SourceLocation(661, 5, 32, 13),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("for-declaration") << fileItem
+ << Token(QQmlJS::SourceLocation(625, 5, 31, 14),
+ int(SemanticTokenTypes::Keyword), 0);
+ QTest::addRow("destructuring")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(1511, 2, 73, 16), int(SemanticTokenTypes::Variable),
+ (1 << int(SemanticTokenModifiers::Readonly)));
+ QTest::addRow("obj-destructuring")
+ << fileItem
+ << Token(QQmlJS::SourceLocation(1589, 2, 76, 17), int(SemanticTokenTypes::Variable),
+ (1 << int(SemanticTokenModifiers::Readonly)));
+ }
+}
+
+void tst_qmlls_highlighting::highlights()
+{
+ using namespace QQmlJS::Dom;
+ QFETCH(DomItem, fileItem);
+ QFETCH(Token, expectedHighlightedToken);
+
+ Highlights h;
+ HighlightingVisitor hv(h, std::nullopt);
+
+ fileItem.visitTree(QQmlJS::Dom::Path(), hv, VisitOption::Default, emptyChildrenVisitor,
+ emptyChildrenVisitor);
+
+ const auto highlights = h.highlights();
+ QVERIFY(highlights.contains(expectedHighlightedToken.offset));
+ QCOMPARE(highlights.value(expectedHighlightedToken.offset), expectedHighlightedToken);
+}
+
+void tst_qmlls_highlighting::rangeOverlapsWithSourceLocation_data()
+{
+ QTest::addColumn<QQmlJS::SourceLocation>("sourceLocation");
+ QTest::addColumn<HighlightsRange>("range");
+ QTest::addColumn<bool>("overlaps");
+
+ QTest::addRow("sl-inside-range")
+ << QQmlJS::SourceLocation(5, 1, 1, 1) << HighlightsRange{ 0, 100 } << true;
+ QTest::addRow("sl-exceeds-rightBoundRange")
+ << QQmlJS::SourceLocation(5, 1000, 1, 1) << HighlightsRange{ 0, 100 } << true;
+ QTest::addRow("sl-exceeds-leftRightBoundRange")
+ << QQmlJS::SourceLocation(5, 1000, 1, 1) << HighlightsRange{ 8, 100 } << true;
+ QTest::addRow("sl-exceeds-leftBoundRange")
+ << QQmlJS::SourceLocation(5, 100, 1, 1) << HighlightsRange{ 8, 1000 } << true;
+ QTest::addRow("no-overlaps") << QQmlJS::SourceLocation(5, 100, 1, 1)
+ << HighlightsRange{ 8000, 100000 } << false;
+}
+
+void tst_qmlls_highlighting::rangeOverlapsWithSourceLocation()
+{
+ QFETCH(QQmlJS::SourceLocation, sourceLocation);
+ QFETCH(HighlightsRange, range);
+ QFETCH(bool, overlaps);
+ QVERIFY(overlaps == HighlightingUtils::rangeOverlapsWithSourceLocation(sourceLocation, range));
+}
+
+void tst_qmlls_highlighting::updateResultID_data()
+{
+ QTest::addColumn<QByteArray>("currentId");
+ QTest::addColumn<QByteArray>("expectedNextId");
+
+ QTest::addRow("zero-to-one") << QByteArray("0") << QByteArray("1");
+ QTest::addRow("nine-to-ten") << QByteArray("9") << QByteArray("10");
+ QTest::addRow("nineteen-to-twenty") << QByteArray("19") << QByteArray("20");
+ QTest::addRow("twodigit-to-threedigit") << QByteArray("99") << QByteArray("100");
+}
+
+void tst_qmlls_highlighting::updateResultID()
+{
+ QFETCH(QByteArray, currentId);
+ QFETCH(QByteArray, expectedNextId);
+
+ HighlightingUtils::updateResultID(currentId);
+ QCOMPARE(currentId, expectedNextId);
+}
+
+void tst_qmlls_highlighting::computeDiff_data()
+{
+ QTest::addColumn<QList<int>>("oldData");
+ QTest::addColumn<QList<int>>("newData");
+ QTest::addColumn<QList<SemanticTokensEdit>>("expected");
+
+ {
+ QList<int> oldData { 2,5,3,0,3, 0,5,4,1,0, 3,2,7,2,0};
+ QList<int> newData { 3,5,3,0,3, 0,5,4,1,0, 3,2,7,2,0};
+ SemanticTokensEdit expected;
+ expected.start = 0;
+ expected.deleteCount = 1;
+ expected.data = QList{3};
+ QTest::addRow("simple") << oldData << newData << QList{expected};
+ }
+ {
+ QList<int> oldData { 0, 0, 5, 5, 0};
+ QList<int> newData { 3, 3, 3, 3, 3, 0, 0, 5, 5, 0};
+ SemanticTokensEdit expected;
+ expected.start = 0;
+ expected.deleteCount = 0;
+ expected.data = QList{3, 3, 3, 3, 3};
+ QTest::addRow("prepend") << oldData << newData << QList{expected};
+ }
+ {
+ QList<int> oldData { 3, 3, 3, 3, 3, 0, 0, 5, 5, 0};
+ QList<int> newData { 0, 0, 5, 5, 0};
+ SemanticTokensEdit expected;
+ expected.start = 0;
+ expected.deleteCount = 5;
+ expected.data = {};
+ QTest::addRow("remove-front") << oldData << newData << QList{expected};
+ }
+ {
+ QList<int> oldData { 0, 0, 5, 5, 0};
+ QList<int> newData { 0, 0, 5, 5, 0, 1, 0, 23, 5, 0};
+ SemanticTokensEdit expected;
+ expected.start = 5;
+ expected.deleteCount = 0;
+ expected.data = QList{1, 0, 23, 5, 0};
+ QTest::addRow("append") << oldData << newData << QList{expected};
+ }
+ {
+ QList<int> oldData { 0, 0, 5, 5, 0, 1, 0, 23, 5, 0};
+ QList<int> newData { 0, 0, 5, 5, 0};
+ SemanticTokensEdit expected;
+ expected.start = 5;
+ expected.deleteCount = 5;
+ expected.data = {};
+ QTest::addRow("remove-back") << oldData << newData << QList{expected};
+ }
+ {
+ QList<int> oldData { 0, 0, 5, 5, 0, 1, 0, 23, 5, 0};
+ QList<int> newData { 0, 0, 5, 5, 0, 3, 3, 3, 3, 3, 1, 0, 23, 5, 0};
+ SemanticTokensEdit expected;
+ expected.start = 5;
+ expected.deleteCount = 0;
+ expected.data = QList{3, 3, 3, 3, 3};
+ QTest::addRow("insert-middle") << oldData << newData << QList{expected};
+ }
+ {
+ QList<int> oldData { 0, 0, 5, 5, 0, 3, 3, 3, 3, 3, 1, 0, 23, 5, 0};
+ QList<int> newData { 0, 0, 5, 5, 0, 1, 0, 23, 5, 0};
+ SemanticTokensEdit expected;
+ expected.start = 5;
+ expected.deleteCount = 5;
+ expected.data = {};
+ QTest::addRow("remove-middle") << oldData << newData << QList{expected};
+ }
+}
+
+void tst_qmlls_highlighting::computeDiff()
+{
+ QFETCH(QList<int>, oldData);
+ QFETCH(QList<int>, newData);
+ QFETCH(QList<SemanticTokensEdit>, expected);
+
+ const auto edits = HighlightingUtils::computeDiff(oldData, newData);
+ QCOMPARE(edits.size(), expected.size());
+
+ qsizetype i = 0;
+ for (const auto &edit : edits) {
+ QCOMPARE(edit.start, expected.at(i).start);
+ QCOMPARE(edit.deleteCount, expected.at(i).deleteCount);
+ QCOMPARE(edit.data, expected.at(i).data);
+ ++i;
+ }
+}
+
+
+QTEST_MAIN(tst_qmlls_highlighting)
diff --git a/tests/auto/qmlls/utils/tst_qmlls_highlighting.h b/tests/auto/qmlls/utils/tst_qmlls_highlighting.h
new file mode 100644
index 0000000000..a1d0e3c9b1
--- /dev/null
+++ b/tests/auto/qmlls/utils/tst_qmlls_highlighting.h
@@ -0,0 +1,37 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef TST_QMLLS_HIGHLIGHTING_H
+#define TST_QMLLS_HIGHLIGHTING_H
+
+#include <QtQuickTestUtils/private/qmlutils_p.h>
+#include <QtCore/qobject.h>
+#include <QtTest/qtest.h>
+
+class tst_qmlls_highlighting : public QQmlDataTest
+{
+ Q_OBJECT
+public:
+ tst_qmlls_highlighting();
+private slots:
+ void encodeSemanticTokens_data();
+ void encodeSemanticTokens();
+ void sourceLocationsFromMultiLineToken_data();
+ void sourceLocationsFromMultiLineToken();
+
+ void highlights_data();
+ void highlights();
+
+ void rangeOverlapsWithSourceLocation_data();
+ void rangeOverlapsWithSourceLocation();
+
+ void updateResultID_data();
+ void updateResultID();
+
+ void computeDiff_data();
+ void computeDiff();
+private:
+ QString m_highlightingDataDir;
+};
+
+#endif // TST_QMLLS_HIGHLIGHTING_H
diff --git a/tests/auto/qmlls/utils/tst_qmlls_utils.cpp b/tests/auto/qmlls/utils/tst_qmlls_utils.cpp
index c8808e2d7c..332dc13590 100644
--- a/tests/auto/qmlls/utils/tst_qmlls_utils.cpp
+++ b/tests/auto/qmlls/utils/tst_qmlls_utils.cpp
@@ -39,7 +39,7 @@ tst_qmlls_utils::createEnvironmentAndLoadFile(const QString &filePath)
{
CacheKey cacheKey = QDir::cleanPath(filePath + u"/.."_s);
if (auto entry = cache.find(cacheKey); entry != cache.end()) {
- DomItem env{ *entry };
+ QQmlJS::Dom::DomItem env{ *entry };
return { env, env.field(QQmlJS::Dom::Fields::qmlFileWithPath).key(filePath) };
};
@@ -663,7 +663,7 @@ void tst_qmlls_utils::findBaseObject()
struct UsageData
{
QString testFileName;
- QList<QQmlLSUtilsLocation> expectedUsages;
+ QQmlLSUtils::Usages expectedUsages;
};
void tst_qmlls_utils::findUsages_data()
@@ -679,33 +679,41 @@ void tst_qmlls_utils::findUsages_data()
return QString{};
};
- const auto makeUsages = [](const QString &fileName, QList<QQmlLSUtilsLocation> &locations) {
+ const auto makeUsages = [](const QString &fileName, QList<QQmlLSUtils::Location> &locations) {
UsageData data;
std::sort(locations.begin(), locations.end());
- data.expectedUsages = locations;
+ data.expectedUsages = { locations, {} };
data.testFileName = fileName;
return data;
};
{
- QList<QQmlLSUtilsLocation> expectedUsages;
+ QList<QQmlLSUtils::Location> expectedUsages;
const auto testFileName = testFile("findUsages/jsIdentifier/jsIdentifier.qml");
const auto testFileContent = readFileContent(testFileName);
{
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 13, strlen("sum"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 13, strlen("sum"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 19, strlen("sum"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 13,
+ strlen("sum"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 13,
+ strlen("sum"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 19,
+ strlen("sum"));
const auto sumUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findSumFromDeclaration") << 8 << 13 << sumUsages;
QTest::addRow("findSumFromUsage") << 10 << 20 << sumUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 17, strlen("i"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 24, strlen("i"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 32, strlen("i"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 36, strlen("i"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 25, strlen("i"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 17,
+ strlen("i"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 24,
+ strlen("i"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 32,
+ strlen("i"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 36,
+ strlen("i"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 25,
+ strlen("i"));
const auto iUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findIFromDeclaration") << 9 << 17 << iUsages;
QTest::addRow("findIFromUsage") << 9 << 24 << iUsages;
@@ -718,40 +726,54 @@ void tst_qmlls_utils::findUsages_data()
const auto testFileContent = readFileContent(testFileName);
const auto otherFileContent = readFileContent(otherFile);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 18, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 13, 13, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 13, 29, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 20, 9, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 21, 9, strlen("helloPropertyChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 5, strlen("onHelloPropertyChanged"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 18,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 13, 13,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 13, 29,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 20, 9,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 21, 9,
+ strlen("helloPropertyChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 5,
+ strlen("onHelloPropertyChanged"));
const auto helloPropertyUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findPropertyFromDeclaration") << 8 << 18 << helloPropertyUsages;
QTest::addRow("findPropertyFromUsage") << 13 << 13 << helloPropertyUsages;
QTest::addRow("findPropertyFromUsage2") << 13 << 29 << helloPropertyUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 36, 20, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 38, 25, strlen("helloProperty"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 36, 20,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 38, 25,
+ strlen("helloProperty"));
const auto subItemHelloPropertyUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findPropertyFromDeclarationInSubItem") << 38 << 25 << subItemHelloPropertyUsages;
QTest::addRow("findPropertyFromUsageInSubItem") << 36 << 20 << subItemHelloPropertyUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 27, 22, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 29, 20, strlen("helloProperty"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 27, 22,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 29, 20,
+ strlen("helloProperty"));
const auto ICHelloPropertyUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findPropertyFromDeclarationInIC") << 27 << 22 << ICHelloPropertyUsages;
QTest::addRow("findPropertyFromUsageInIC") << 29 << 20 << ICHelloPropertyUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(otherFile, otherFileContent, 4, 18, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 42, 9, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 44, 20, strlen("helloProperty"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 46, 9, strlen("OnHelloPropertyChanged"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(otherFile, otherFileContent, 4, 18,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 42, 9,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 44, 20,
+ strlen("helloProperty"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 46, 9,
+ strlen("OnHelloPropertyChanged"));
const auto helloPropertyUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findPropertyFromOtherFile") << 42 << 13 << helloPropertyUsages;
@@ -770,35 +792,52 @@ void tst_qmlls_utils::findUsages_data()
const auto componentFileContent3 = readFileContent(componentFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 7, 18, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 31, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 34, 37, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 35, 43, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 36, 49, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 42, 26, strlen("p2"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 7, 18,
+ strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 31,
+ strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 34, 37,
+ strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 35, 43,
+ strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 36, 49,
+ strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 42, 26,
+ strlen("p2"));
const auto p2Usages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findPropertyFromDeclaration2") << 7 << 18 << p2Usages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 29, 13, strlen("myNested"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 32, 17, strlen("myNested"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 17, strlen("myNested"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 34, 17, strlen("myNested"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 35, 17, strlen("myNested"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 36, 17, strlen("myNested"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 29, 13,
+ strlen("myNested"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 32, 17,
+ strlen("myNested"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 17,
+ strlen("myNested"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 34, 17,
+ strlen("myNested"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 35, 17,
+ strlen("myNested"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 36, 17,
+ strlen("myNested"));
const auto nestedUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findIdFromUsage") << 36 << 20 << nestedUsages;
QTest::addRow("findIdFromDefinition") << 29 << 17 << nestedUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 35, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 32, 32, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 35, 32, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 36, 32, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 16, 9, strlen("inner"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 35,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 32, 32,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 35, 32,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 36, 32,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 16, 9,
+ strlen("inner"));
const auto nestedComponent3Usages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findPropertyFromUsageInFieldMemberExpression")
<< 36 << 34 << nestedComponent3Usages;
@@ -807,12 +846,17 @@ void tst_qmlls_utils::findUsages_data()
<< 14 << 38 << nestedComponent3Usages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(componentFileName, componentFileContent, 4, 37, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 50, 32, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 52, 32, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 53, 32, strlen("inner"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 54, 32, strlen("inner"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(componentFileName, componentFileContent,
+ 4, 37, strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 50, 32,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 52, 32,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 53, 32,
+ strlen("inner"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 54, 32,
+ strlen("inner"));
const auto nestedComponent3Usages = makeUsages(testFileName, expectedUsages);
const auto nestedComponent3UsagesFromOtherFile =
makeUsages(componentFileName, expectedUsages);
@@ -823,19 +867,21 @@ void tst_qmlls_utils::findUsages_data()
<< 4 << 38 << nestedComponent3UsagesFromOtherFile;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 35, 38, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 20, 22, strlen("p2"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 35, 38,
+ strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 20, 22,
+ strlen("p2"));
const auto nestedComponent3P2Usages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findProperty2FromUsageInFieldMemberExpression")
<< 35 << 39 << nestedComponent3P2Usages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(componentFileName3, componentFileContent3,
- 5, 18, strlen("p2"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 53, 44,
- strlen("p2"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(componentFileName3, componentFileContent3,
+ 5, 18, strlen("p2"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 53, 44,
+ strlen("p2"));
const auto nestedComponent3P2Usages = makeUsages(testFileName, expectedUsages);
const auto nestedComponent3P2UsagesFromOtherFile = makeUsages(componentFileName3, expectedUsages);
QTest::addRow("findProperty2FromUsageInFieldMemberExpressionInOtherFile")
@@ -845,28 +891,40 @@ void tst_qmlls_utils::findUsages_data()
}
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
+ QList<QQmlLSUtils::Location> expectedUsages;
const auto testFileName = testFile("findUsages/idUsages/idUsages.qml");
const auto testFileContent = readFileContent(testFileName);
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 7, 9, strlen("rootId"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 11, 17, strlen("rootId"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 12, 20, strlen("rootId"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 17, 9, strlen("rootId"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 7, 9,
+ strlen("rootId"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 11, 17,
+ strlen("rootId"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 12, 20,
+ strlen("rootId"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 17, 9,
+ strlen("rootId"));
const auto rootIdUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findIdFromUsageInChild") << 12 << 20 << rootIdUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
+ QList<QQmlLSUtils::Location> expectedUsages;
const auto testFileName = testFile("findUsages/recursive/recursive.qml");
const auto testFileContent = readFileContent(testFileName);
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 14, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 24, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 34, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 51, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 68, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 12, 20, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 15, 34, strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 19, 27, strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 14,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 24,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 34,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 51,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 68,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 12, 20,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 15, 34,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 19, 27,
+ strlen("recursive"));
const auto recursiveUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findFunctionUsage") << 10 << 30 << recursiveUsages;
QTest::addRow("findFunctionUsage2") << 12 << 24 << recursiveUsages;
@@ -874,26 +932,26 @@ void tst_qmlls_utils::findUsages_data()
QTest::addRow("findFunctionUsageFromDefinition") << 8 << 17 << recursiveUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
+ QList<QQmlLSUtils::Location> expectedUsages;
const auto testFileName = testFile("findUsages/recursive/recursive.qml");
const auto testFileContent = readFileContent(testFileName);
const auto otherFileName = testFile("findUsages/recursive/RecursiveInOtherFile.qml");
const auto otherFileContent = readFileContent(otherFileName);
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 27, 61,
- strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 4, 14,
- strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 6, 24,
- strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 6, 34,
- strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 6, 51,
- strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 6, 68,
- strlen("recursive"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 8, 20,
- strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 27, 61,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 4, 14,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 6, 24,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 6, 34,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 6, 51,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 6, 68,
+ strlen("recursive"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 8, 20,
+ strlen("recursive"));
const auto recursiveUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findFunctionUsageFromOtherFile") << 27 << 64 << recursiveUsages;
@@ -909,26 +967,38 @@ void tst_qmlls_utils::findUsages_data()
const auto otherFileName = testFile("findUsages/signalsAndHandlers/widthChangedInAnotherFile.qml");
const auto otherFileContent = readFileContent(otherFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 12, strlen("helloSignal"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 11, 9, strlen("helloSignal"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 13, 13, strlen("helloSignal"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 17, 17, strlen("helloSignal"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 21, 9, strlen("helloSignal"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 39, 5, strlen("onHelloSignal"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 12,
+ strlen("helloSignal"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 11, 9,
+ strlen("helloSignal"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 13, 13,
+ strlen("helloSignal"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 17, 17,
+ strlen("helloSignal"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 21, 9,
+ strlen("helloSignal"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 39, 5,
+ strlen("onHelloSignal"));
const auto helloSignalUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findQmlSignalUsageFromDefinition") << 8 << 17 << helloSignalUsages;
QTest::addRow("findQmlSignalUsageFromUsage") << 13 << 17 << helloSignalUsages;
QTest::addRow("findQmlSignalUsageFromHandler") << 39 << 11 << helloSignalUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 5, 5, strlen("onWidthChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 13, strlen("widthChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 27, 17, strlen("widthChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 28, 20, strlen("widthChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 34, 20, strlen("widthChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 13, strlen("widthChanged"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 5, 5,
+ strlen("onWidthChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 13,
+ strlen("widthChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 27, 17,
+ strlen("widthChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 28, 20,
+ strlen("widthChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 34, 20,
+ strlen("widthChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 13,
+ strlen("widthChanged"));
const auto widthChangedUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findCppSignalUsageFromUsage") << 27 << 23 << widthChangedUsages;
QTest::addRow("findCppSignalUsageFromQualifiedUsage") << 28 << 23 << widthChangedUsages;
@@ -938,11 +1008,11 @@ void tst_qmlls_utils::findUsages_data()
{
const auto testFileName = testFile("findUsages/binding/binding.qml");
const auto testFileContent = readFileContent(testFileName);
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 18,
- strlen("helloPropertyBinding"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 5,
- strlen("helloPropertyBinding"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 18,
+ strlen("helloPropertyBinding"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 5,
+ strlen("helloPropertyBinding"));
const auto helloPropertyBindingUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findBindingUsagesFromDefinition") << 9 << 21 << helloPropertyBindingUsages;
QTest::addRow("findBindingUsagesFromBinding") << 10 << 19 << helloPropertyBindingUsages;
@@ -951,80 +1021,107 @@ void tst_qmlls_utils::findUsages_data()
const auto testFileName = testFile("findUsages/signalsAndHandlers/signalAndHandlers2.qml");
const auto testFileContent = readFileContent(testFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 7, 14, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 20, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 29, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 15, 24, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 17, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 24, 24, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 25, 21, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 19, strlen("myHelloHandler"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 42, 29, strlen("myHelloHandler"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 7, 14,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 20,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 29,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 15, 24,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 17,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 24, 24,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 25, 21,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 19,
+ strlen("myHelloHandler"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 42, 29,
+ strlen("myHelloHandler"));
const auto myHelloHandlerUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findJSMethodFromUsageInBinding") << 8 << 27 << myHelloHandlerUsages;
QTest::addRow("findJSMethodFromDefinition") << 7 << 22 << myHelloHandlerUsages;
QTest::addRow("findJSMethodFromDefinition2") << 7 << 9 << myHelloHandlerUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 13, 18, strlen("checkHandlers"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 5,
- strlen("onCheckHandlersChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 17, 9,
- strlen("checkHandlersChanged"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 13, 18,
+ strlen("checkHandlers"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 5,
+ strlen("onCheckHandlersChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 17, 9,
+ strlen("checkHandlersChanged"));
const auto checkHandlersUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findQmlPropertyHandlerFromDefinition") << 13 << 18 << checkHandlersUsages;
QTest::addRow("findQmlPropertyHandlerFromHandler") << 14 << 5 << checkHandlersUsages;
QTest::addRow("findQmlPropertyHandlerFromSignalCall") << 17 << 9 << checkHandlersUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 15, 5,
- strlen("onChildrenChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 18, 9, strlen("childrenChanged"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 15, 5,
+ strlen("onChildrenChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 18, 9,
+ strlen("childrenChanged"));
const auto checkCppHandlersUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findCppPropertyHandlerFromHandler") << 15 << 5 << checkCppHandlersUsages;
QTest::addRow("findCppPropertyHandlerFromSignalCall") << 18 << 9 << checkCppHandlersUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 20, 18, strlen("_"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 5, strlen("on_Changed"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 27, 9, strlen("_Changed"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 20, 18,
+ strlen("_"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 5,
+ strlen("on_Changed"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 27, 9,
+ strlen("_Changed"));
const auto checkHandlersUsages2 = makeUsages(testFileName, expectedUsages);
QTest::addRow("findQmlPropertyHandler2FromDefinition") << 20 << 18 << checkHandlersUsages2;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 21, 18, strlen("______42"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 24, 5,
- strlen("on______42Changed"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 28, 9, strlen("______42Changed"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 21, 18,
+ strlen("______42"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 24, 5,
+ strlen("on______42Changed"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 28, 9,
+ strlen("______42Changed"));
const auto checkHandlersUsages3 = makeUsages(testFileName, expectedUsages);
QTest::addRow("findQmlPropertyHandler3FromDefinition") << 21 << 18 << checkHandlersUsages3;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 22, 18, strlen("_123a"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 25, 5, strlen("on_123AChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 29, 9, strlen("_123aChanged"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 22, 18,
+ strlen("_123a"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 25, 5,
+ strlen("on_123AChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 29, 9,
+ strlen("_123aChanged"));
const auto checkHandlersUsages4 = makeUsages(testFileName, expectedUsages);
QTest::addRow("findQmlPropertyHandler4FromDefinition") << 22 << 18 << checkHandlersUsages4;
}
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
+ QList<QQmlLSUtils::Location> expectedUsages;
const auto testFileName = testFile("findUsages/connections/connections.qml");
const auto testFileContent = readFileContent(testFileName);
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 9, strlen("onClicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 17, 23, strlen("clicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 15, strlen("clicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 16, 22, strlen("onClicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 34, 15, strlen("clicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 18, 23, strlen("clicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 28, 9, strlen("onClicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 35, 15, strlen("clicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 9,
+ strlen("onClicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 17, 23,
+ strlen("clicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 15,
+ strlen("clicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 16, 22,
+ strlen("onClicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 34, 15,
+ strlen("clicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 18, 23,
+ strlen("clicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 28, 9,
+ strlen("onClicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 35, 15,
+ strlen("clicked"));
const auto signalInConnection = makeUsages(testFileName, expectedUsages);
QTest::addRow("findSignalsInConnectionFromSignal") << 33 << 15 << signalInConnection;
QTest::addRow("findSignalsInConnectionFromHandler") << 9 << 9 << signalInConnection;
@@ -1035,41 +1132,51 @@ void tst_qmlls_utils::findUsages_data()
testFile("findUsages/parametersAndDeconstruction/parametersAndDeconstruction.qml");
const auto testFileContent = readFileContent(testFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 30, strlen("a"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 16, strlen("a"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 30,
+ strlen("a"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 16,
+ strlen("a"));
const auto aParamUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findMethodParameterA") << 9 << 16 << aParamUsages;
QTest::addRow("findMethodParameterAFromUsage") << 8 << 30 << aParamUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 50, strlen("x"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 28, strlen("x"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 50,
+ strlen("x"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 28,
+ strlen("x"));
const auto xParamUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findMethodParameterXDeconstructed") << 8 << 50 << xParamUsages;
QTest::addRow("findMethodParameterXDeconstructedFromUsage") << 9 << 28 << xParamUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 53, strlen("y"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 32, strlen("y"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 53,
+ strlen("y"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 32,
+ strlen("y"));
const auto yParamUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findMethodParameterYDeconstructed") << 8 << 53 << yParamUsages;
QTest::addRow("findMethodParameterYDeconstructedFromUsage") << 9 << 32 << yParamUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 59, strlen("z"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 36, strlen("z"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 59,
+ strlen("z"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 36,
+ strlen("z"));
const auto zParamUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("findMethodParameterZDeconstructed") << 8 << 59 << zParamUsages;
QTest::addRow("findMethodParameterZDeconstructedFromUsage") << 9 << 36 << zParamUsages;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 13, 14, strlen("a"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 17, strlen("a"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 13, 14,
+ strlen("a"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 17,
+ strlen("a"));
const auto deconstructedAUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("deconstructed") << 14 << 17 << deconstructedAUsages;
QTest::addRow("deconstructedFromDefinition") << 13 << 14 << deconstructedAUsages;
@@ -1081,12 +1188,17 @@ void tst_qmlls_utils::findUsages_data()
const auto otherFileName = testFile("findUsages/groupPropertyUsage/fontFamilyUsage.qml");
const auto otherFileContent = readFileContent(otherFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 5, 34, strlen("family"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 17, strlen("family"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 35, strlen("family"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 10, strlen("family"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 48, strlen("family"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 5, 34,
+ strlen("family"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 17,
+ strlen("family"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 35,
+ strlen("family"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 10,
+ strlen("family"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 48,
+ strlen("family"));
const auto groupPropertyUsages1 = makeUsages(testFileName, expectedUsages);
QTest::addRow("groupPropertyUsages1") << 14 << 17 << groupPropertyUsages1;
const auto groupPropertyUsages1FromOtherFile =
@@ -1095,13 +1207,19 @@ void tst_qmlls_utils::findUsages_data()
<< 5 << 37 << groupPropertyUsages1FromOtherFile;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 5, strlen("font"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 24, 5, strlen("font"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 12, 13, strlen("font"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 30, strlen("font"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 32, 41, strlen("font"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 33, 43, strlen("font"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 5,
+ strlen("font"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 24, 5,
+ strlen("font"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 12, 13,
+ strlen("font"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 30,
+ strlen("font"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 32, 41,
+ strlen("font"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 33, 43,
+ strlen("font"));
const auto groupPropertyUsages2 = makeUsages(testFileName, expectedUsages);
QTest::addRow("groupPropertyUsages2") << 23 << 5 << groupPropertyUsages2;
}
@@ -1110,20 +1228,26 @@ void tst_qmlls_utils::findUsages_data()
const auto testFileName =
testFile("findUsages/attachedPropertyUsage/attachedPropertyUsage.qml");
const auto testFileContent = readFileContent(testFileName);
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 5, strlen("Keys"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 12, 25, strlen("Keys"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 5,
+ strlen("Keys"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 12, 25,
+ strlen("Keys"));
const auto attachedPropertyUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("attachedPropertyUsages") << 12 << 25 << attachedPropertyUsages;
}
{
const auto testFileName = testFile("findUsages/inlineComponents/inlineComponents.qml");
const auto testFileContent = readFileContent(testFileName);
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 22, strlen("foo"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 10, 44, strlen("foo"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 27, strlen("foo"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 20, 20, strlen("foo"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 22,
+ strlen("foo"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 10, 44,
+ strlen("foo"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 27,
+ strlen("foo"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 20, 20,
+ strlen("foo"));
const auto inlineUsages = makeUsages(testFileName, expectedUsages);
QTest::addRow("inlineUsagesFromProperty") << 9 << 22 << inlineUsages;
QTest::addRow("inlineUsagesFromUsageOfBaseProperty") << 14 << 27 << inlineUsages;
@@ -1132,26 +1256,38 @@ void tst_qmlls_utils::findUsages_data()
{
const auto testFileName = testFile("findUsages/propertyChanges/propertyChanges.qml");
const auto testFileContent = readFileContent(testFileName);
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 9, strlen("onClicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 16, 21, strlen("onClicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 19, 25, strlen("onClicked"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 25, 17, strlen("onClicked"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 9,
+ strlen("onClicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 16, 21,
+ strlen("onClicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 19, 25,
+ strlen("onClicked"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 25, 17,
+ strlen("onClicked"));
const auto propertyChanges = makeUsages(testFileName, expectedUsages);
QTest::addRow("propertyChanges1") << 16 << 21 << propertyChanges;
}
{
const auto testFileName = testFile("findUsages/bindings/bindings.qml");
const auto testFileContent = readFileContent(testFileName);
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 11, 23, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 14, 27, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 21, 27, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 27, 19, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 27, 41, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 34, 17, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 13, 20, strlen("patronChanged"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 20, 23, strlen("\"patronChanged\""));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 11, 23,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 14, 27,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 21, 27,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 27, 19,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 27, 41,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 34, 17,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 13, 20,
+ strlen("patronChanged"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 20, 23,
+ strlen("\"patronChanged\""));
const auto bindings = makeUsages(testFileName, expectedUsages);
QTest::addRow("propertyInBindingsFromDecl") << 11 << 23 << bindings;
QTest::addRow("generalizedGroupPropertyBindings") << 27 << 19 << bindings;
@@ -1162,28 +1298,33 @@ void tst_qmlls_utils::findUsages_data()
const auto otherFileName = testFile("findUsages/enums/EnumsFromAnotherFile.qml");
const auto otherFileContent = readFileContent(otherFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 9, 9, strlen("Patron"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 22, 35, strlen("Patron"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 23, 34, strlen("Patron"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 9, 9,
+ strlen("Patron"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 22, 35,
+ strlen("Patron"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 23, 34,
+ strlen("Patron"));
const auto enums = makeUsages(testFileName, expectedUsages);
QTest::addRow("enumValuesFromDeclaration") << 9 << 9 << enums;
QTest::addRow("enumValuesFromUsage") << 22 << 35 << enums;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 8, 10, strlen("Cats"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 22, 30, strlen("Cats"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 8, 10,
+ strlen("Cats"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 22, 30,
+ strlen("Cats"));
const auto enums = makeUsages(testFileName, expectedUsages);
QTest::addRow("enumNameFromDeclaration") << 8 << 10 << enums;
QTest::addRow("enumNameFromUsage") << 22 << 30 << enums;
}
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 26, 46,
- strlen("FromAnotherUniverse"));
- expectedUsages << QQmlLSUtilsLocation::from(otherFileName, otherFileContent, 4, 68,
- strlen("FromAnotherUniverse"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 26, 46,
+ strlen("FromAnotherUniverse"));
+ expectedUsages << QQmlLSUtils::Location::from(otherFileName, otherFileContent, 4, 68,
+ strlen("FromAnotherUniverse"));
const auto enums = makeUsages(testFileName, expectedUsages);
QTest::addRow("enumNameFromDeclarationInOtherFile") << 26 << 50 << enums;
const auto enumsFromOtherFile = makeUsages(otherFileName, expectedUsages);
@@ -1194,13 +1335,19 @@ void tst_qmlls_utils::findUsages_data()
const auto testFileName = testFile("findUsages/inlineComponents/inlineComponents2.qml");
const auto testFileContent = readFileContent(testFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 4, 15, strlen("MyIC"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 5, 5, strlen("MyIC"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 5, 12, strlen("MyIC"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 5, 19, strlen("MyIC"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 6, 19, strlen("MyIC"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 6, 26, strlen("MyIC"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 4, 15,
+ strlen("MyIC"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 5, 5,
+ strlen("MyIC"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 5, 12,
+ strlen("MyIC"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 5, 19,
+ strlen("MyIC"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 6, 19,
+ strlen("MyIC"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 6, 26,
+ strlen("MyIC"));
const auto inlineComponents = makeUsages(testFileName, expectedUsages);
QTest::addRow("findICUsagesFromDefinition") << 4 << 16 << inlineComponents;
QTest::addRow("findICUsagesFromDefinition2") << 4 << 9 << inlineComponents;
@@ -1215,20 +1362,20 @@ void tst_qmlls_utils::findUsages_data()
testFile("findUsages/inlineComponents/InlineComponentProvider.qml");
const auto providerFileContent = readFileContent(providerFileName);
{
- QList<QQmlLSUtilsLocation> expectedUsages;
- expectedUsages << QQmlLSUtilsLocation::from(providerFileName, providerFileContent, 4,
- 15, strlen("IC1"));
- expectedUsages << QQmlLSUtilsLocation::from(providerFileName, providerFileContent, 5,
- 36, strlen("IC1"));
- expectedUsages << QQmlLSUtilsLocation::from(providerFileName, providerFileContent, 7, 5,
- strlen("IC1"));
- expectedUsages << QQmlLSUtilsLocation::from(providerFileName, providerFileContent, 17,
- 13, strlen("IC1"));
-
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 25, 38,
- strlen("IC1"));
- expectedUsages << QQmlLSUtilsLocation::from(testFileName, testFileContent, 25, 84,
- strlen("IC1"));
+ QList<QQmlLSUtils::Location> expectedUsages;
+ expectedUsages << QQmlLSUtils::Location::from(providerFileName, providerFileContent, 4,
+ 15, strlen("IC1"));
+ expectedUsages << QQmlLSUtils::Location::from(providerFileName, providerFileContent, 5,
+ 36, strlen("IC1"));
+ expectedUsages << QQmlLSUtils::Location::from(providerFileName, providerFileContent, 7,
+ 5, strlen("IC1"));
+ expectedUsages << QQmlLSUtils::Location::from(providerFileName, providerFileContent, 17,
+ 13, strlen("IC1"));
+
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 25, 38,
+ strlen("IC1"));
+ expectedUsages << QQmlLSUtils::Location::from(testFileName, testFileContent, 25, 84,
+ strlen("IC1"));
{
const auto usagesForTestFile = makeUsages(testFileName, expectedUsages);
@@ -1255,7 +1402,13 @@ void tst_qmlls_utils::findUsages()
QFETCH(int, line);
QFETCH(int, character);
QFETCH(UsageData, data);
- QVERIFY(std::is_sorted(data.expectedUsages.begin(), data.expectedUsages.end()));
+
+ {
+ auto usagesInFilename = data.expectedUsages.usagesInFilename();
+ QVERIFY(std::is_sorted(usagesInFilename.begin(), usagesInFilename.end()));
+ auto usagesInFile = data.expectedUsages.usagesInFile();
+ QVERIFY(std::is_sorted(usagesInFile.begin(), usagesInFile.end()));
+ }
auto [env, file] = createEnvironmentAndLoadFile(data.testFileName);
@@ -1275,17 +1428,19 @@ void tst_qmlls_utils::findUsages()
if constexpr (enable_debug_output) {
if (usages != data.expectedUsages) {
qDebug() << "Got:\n";
- for (auto &x : usages) {
+ for (auto &x : usages.usagesInFile()) {
qDebug() << x.filename << "(" << x.sourceLocation.startLine << ", "
<< x.sourceLocation.startColumn << "), " << x.sourceLocation.offset << "+"
<< x.sourceLocation.length;
}
+ qDebug() << "with usages in filenames:" << usages.usagesInFilename();
qDebug() << "But expected: \n";
- for (auto &x : data.expectedUsages) {
+ for (auto &x : data.expectedUsages.usagesInFile()) {
qDebug() << x.filename << "(" << x.sourceLocation.startLine << ", "
<< x.sourceLocation.startColumn << "), " << x.sourceLocation.offset << "+"
<< x.sourceLocation.length;
}
+ qDebug() << "with usages in filenames:" << data.expectedUsages.usagesInFilename();
}
}
@@ -1299,7 +1454,7 @@ void tst_qmlls_utils::renameUsages_data()
QTest::addColumn<int>("line");
QTest::addColumn<int>("character");
QTest::addColumn<QString>("newName");
- QTest::addColumn<QList<QQmlLSUtilsEdit>>("expectedRenames");
+ QTest::addColumn<QQmlLSUtils::RenameUsages>("expectedRenames");
QTest::addColumn<QString>("expectedError");
const QString testFileName = testFile(u"JSUsages.qml"_s);
@@ -1308,97 +1463,140 @@ void tst_qmlls_utils::renameUsages_data()
const QString testFileFromAnotherFileContent = readFileContent(testFileNameFromAnotherFile);
const QString noError;
- const QList<QQmlLSUtilsEdit> noRenames;
-
- QList<QQmlLSUtilsEdit> methodFRename{
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 72, 14, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 74, 24, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 74, 34, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 74, 51, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 74, 68, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 76, 20, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 79, 34, strlen("recursive"),
- u"newNameNewMe"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 84, 27, strlen("recursive"),
- u"newNameNewMe"_s),
+ const QQmlLSUtils::RenameUsages noRenames;
+
+ QQmlLSUtils::RenameUsages methodFRename{
+ {
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 72, 14, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 74, 24, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 74, 34, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 74, 51, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 74, 68, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 76, 20, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 79, 34, strlen("recursive"),
+ u"newNameNewMe"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 84, 27, strlen("recursive"),
+ u"newNameNewMe"_s),
+ },
+ {}
};
- QList<QQmlLSUtilsEdit> JSIdentifierSumRename{
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 8, 13, strlen("sum"),
- u"sumsumsum123"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 10, 13, strlen("sum"),
- u"sumsumsum123"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 10, 19, strlen("sum"),
- u"sumsumsum123"_s),
+ QQmlLSUtils::RenameUsages JSIdentifierSumRename{
+ {
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 8, 13, strlen("sum"),
+ u"sumsumsum123"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 10, 13, strlen("sum"),
+ u"sumsumsum123"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 10, 19, strlen("sum"),
+ u"sumsumsum123"_s),
+ },
+ {}
};
- QList<QQmlLSUtilsEdit> qmlSignalRename{
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 88, 12, strlen("helloSignal"),
- u"finalSignal"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 91, 9, strlen("helloSignal"),
- u"finalSignal"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 93, 13, strlen("helloSignal"),
- u"finalSignal"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 97, 17, strlen("helloSignal"),
- u"finalSignal"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 101, 9, strlen("helloSignal"),
- u"finalSignal"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 119, 5, strlen("onHelloSignal"),
- u"onFinalSignal"_s),
+ QQmlLSUtils::RenameUsages qmlSignalRename{
+ {
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 88, 12,
+ strlen("helloSignal"), u"finalSignal"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 91, 9, strlen("helloSignal"),
+ u"finalSignal"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 93, 13,
+ strlen("helloSignal"), u"finalSignal"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 97, 17,
+ strlen("helloSignal"), u"finalSignal"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 101, 9,
+ strlen("helloSignal"), u"finalSignal"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 119, 5,
+ strlen("onHelloSignal"), u"onFinalSignal"_s),
+ },
+ {}
};
- QList<QQmlLSUtilsEdit> helloPropertyRename{
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 17, 18, strlen("helloProperty"),
- u"freshPropertyName"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 24, 13, strlen("helloProperty"),
- u"freshPropertyName"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 24, 29, strlen("helloProperty"),
- u"freshPropertyName"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 65, 60, strlen("helloProperty"),
- u"freshPropertyName"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 151, 9, strlen("helloPropertyChanged"),
- u"freshPropertyNameChanged"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 153, 5,
- strlen("onHelloPropertyChanged"), u"onFreshPropertyNameChanged"_s),
- QQmlLSUtilsEdit::from(testFileNameFromAnotherFile, testFileFromAnotherFileContent, 12, 16,
- strlen("helloProperty"), u"freshPropertyName"_s),
+ QQmlLSUtils::RenameUsages helloPropertyRename{
+ {
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 17, 18,
+ strlen("helloProperty"), u"freshPropertyName"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 24, 13,
+ strlen("helloProperty"), u"freshPropertyName"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 24, 29,
+ strlen("helloProperty"), u"freshPropertyName"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 65, 60,
+ strlen("helloProperty"), u"freshPropertyName"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 151, 9,
+ strlen("helloPropertyChanged"),
+ u"freshPropertyNameChanged"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 153, 5,
+ strlen("onHelloPropertyChanged"),
+ u"onFreshPropertyNameChanged"_s),
+ QQmlLSUtils::Edit::from(testFileNameFromAnotherFile, testFileFromAnotherFileContent,
+ 12, 16, strlen("helloProperty"), u"freshPropertyName"_s),
+ },
+ {}
};
- QList<QQmlLSUtilsEdit> nestedComponentRename{
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 42, 15, strlen("NestedComponent"),
- u"SuperInlineComponent"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 61, 5, strlen("NestedComponent"),
- u"SuperInlineComponent"_s),
+ QQmlLSUtils::RenameUsages nestedComponentRename{
+ {
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 42, 15,
+ strlen("NestedComponent"), u"SuperInlineComponent"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 61, 5,
+ strlen("NestedComponent"), u"SuperInlineComponent"_s),
+ },
+ {}
};
- QList<QQmlLSUtilsEdit> myNestedIdRename{
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 62, 13, strlen("myNested"),
- u"freshNewIdForMyNested"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 65, 17, strlen("myNested"),
- u"freshNewIdForMyNested"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 66, 17, strlen("myNested"),
- u"freshNewIdForMyNested"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 67, 17, strlen("myNested"),
- u"freshNewIdForMyNested"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 68, 17, strlen("myNested"),
- u"freshNewIdForMyNested"_s),
- QQmlLSUtilsEdit::from(testFileName, testFileContent, 69, 17, strlen("myNested"),
- u"freshNewIdForMyNested"_s),
+ QQmlLSUtils::RenameUsages myNestedIdRename{
+ {
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 62, 13, strlen("myNested"),
+ u"freshNewIdForMyNested"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 65, 17, strlen("myNested"),
+ u"freshNewIdForMyNested"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 66, 17, strlen("myNested"),
+ u"freshNewIdForMyNested"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 67, 17, strlen("myNested"),
+ u"freshNewIdForMyNested"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 68, 17, strlen("myNested"),
+ u"freshNewIdForMyNested"_s),
+ QQmlLSUtils::Edit::from(testFileName, testFileContent, 69, 17, strlen("myNested"),
+ u"freshNewIdForMyNested"_s),
+ },
+ {}
};
- std::sort(methodFRename.begin(), methodFRename.end());
- std::sort(JSIdentifierSumRename.begin(), JSIdentifierSumRename.end());
- std::sort(qmlSignalRename.begin(), qmlSignalRename.end());
- std::sort(helloPropertyRename.begin(), helloPropertyRename.end());
- std::sort(helloPropertyRename.begin(), helloPropertyRename.end());
- std::sort(nestedComponentRename.begin(), nestedComponentRename.end());
- std::sort(myNestedIdRename.begin(), myNestedIdRename.end());
+ const QString renameFileQml = testFile("renaming/main.qml");
+ const QString renameFileQmlContent = readFileContent(renameFileQml);
+ const QQmlLSUtils::RenameUsages renameComponent1{
+ {
+ QQmlLSUtils::Edit::from(renameFileQml, renameFileQmlContent, 4, 5,
+ strlen("RenameMe"), u"FreshNewComponentName"_s),
+ },
+ {
+ { testFile("renaming/RenameMe.qml"),
+ testFile(u"renaming/FreshNewComponentName.qml"_s) },
+ }
+ };
+ const QQmlLSUtils::RenameUsages renameComponent2{
+ {
+ QQmlLSUtils::Edit::from(renameFileQml, renameFileQmlContent, 5, 5,
+ strlen("RenameMe2"), u"AnotherOneThankYou"_s),
+ },
+ {
+ { testFile("renaming/RenameMe2.ui.qml"),
+ testFile(u"renaming/AnotherOneThankYou.ui.qml"_s) },
+ }
+ };
+ const QQmlLSUtils::RenameUsages renameComponentNamedByQmldir{
+ {
+ QQmlLSUtils::Edit::from(renameFileQml, renameFileQmlContent, 6, 5,
+ strlen("HelloWorld"), u"AnotherOneThankYou"_s),
+ },
+ // make sure that the file itself does not get renamed
+ {}
+ };
const QString parserError = u"Invalid EcmaScript identifier!"_s;
@@ -1461,6 +1659,16 @@ void tst_qmlls_utils::renameUsages_data()
QTest::addRow("JSIdentifierStartsWithNumber")
<< testFileName << 67 << 13 << u"123"_s << noRenames << parserError;
+
+ QTest::addRow("renameQmlFile") << testFile(u"renaming/main.qml"_s) << 4 << 9
+ << u"FreshNewComponentName"_s << renameComponent1 << noError;
+
+ QTest::addRow("renameUiQmlFile") << testFile(u"renaming/main.qml"_s) << 5 << 9
+ << u"AnotherOneThankYou"_s << renameComponent2 << noError;
+
+ QTest::addRow("renameQmlFileRenamedByQmldir")
+ << testFile(u"renaming/main.qml"_s) << 6 << 8 << u"AnotherOneThankYou"_s
+ << renameComponentNamedByQmldir << noError;
}
void tst_qmlls_utils::renameUsages()
@@ -1471,10 +1679,15 @@ void tst_qmlls_utils::renameUsages()
QFETCH(int, line);
QFETCH(int, character);
QFETCH(QString, newName);
- QFETCH(QList<QQmlLSUtilsEdit>, expectedRenames);
+ QFETCH(QQmlLSUtils::RenameUsages, expectedRenames);
QFETCH(QString, expectedError);
- QVERIFY(std::is_sorted(expectedRenames.begin(), expectedRenames.end()));
+ {
+ const auto renameInFile = expectedRenames.renameInFile();
+ QVERIFY(std::is_sorted(renameInFile.constBegin(), renameInFile.constEnd()));
+ const auto renameInFilename = expectedRenames.renameInFilename();
+ QVERIFY(std::is_sorted(renameInFilename.begin(), renameInFilename.end()));
+ }
auto [env, file] = createEnvironmentAndLoadFile(filePath);
@@ -1505,21 +1718,29 @@ void tst_qmlls_utils::renameUsages()
if constexpr (enable_debug_output) {
if (edits != expectedRenames) {
qDebug() << "Got:\n";
- for (auto &x : edits) {
+ for (auto &x : edits.renameInFile()) {
qDebug() << x.replacement << x.location.filename << "("
<< x.location.sourceLocation.startLine << ", "
<< x.location.sourceLocation.startColumn << "), "
<< x.location.sourceLocation.offset << "+"
<< x.location.sourceLocation.length;
}
+ qDebug() << "with renames in filenames:";
+ for (auto &x : edits.renameInFilename()) {
+ qDebug() << x.oldFilename << "->" << x.newFilename;
+ }
qDebug() << "But expected: \n";
- for (auto &x : expectedRenames) {
+ for (auto &x : expectedRenames.renameInFile()) {
qDebug() << x.replacement << x.location.filename << "("
<< x.location.sourceLocation.startLine << ", "
<< x.location.sourceLocation.startColumn << "), "
<< x.location.sourceLocation.offset << "+"
<< x.location.sourceLocation.length;
}
+ qDebug() << "with renames in filenames:";
+ for (auto &x : expectedRenames.renameInFilename()) {
+ qDebug() << x.oldFilename << "->" << x.newFilename;
+ }
}
}
QCOMPARE(edits, expectedRenames);
@@ -1676,11 +1897,13 @@ void tst_qmlls_utils::resolveExpressionType_data()
// keep in mind that line and character are starting at 1!
QTest::addColumn<int>("line");
QTest::addColumn<int>("character");
- QTest::addColumn<QQmlLSUtilsResolveOptions>("resolveOption");
+ QTest::addColumn<QQmlLSUtils::ResolveOptions>("resolveOption");
QTest::addColumn<QString>("expectedFile");
// startline of the owners definition
QTest::addColumn<int>("expectedLine");
- QTest::addColumn<QQmlLSUtilsIdentifierType>("expectedType");
+ QTest::addColumn<QQmlLSUtils::IdentifierType>("expectedType");
+
+ using namespace QQmlLSUtils;
const int noLine = -1;
const QString noFile;
@@ -1828,10 +2051,10 @@ void tst_qmlls_utils::resolveExpressionType()
QFETCH(QString, filePath);
QFETCH(int, line);
QFETCH(int, character);
- QFETCH(QQmlLSUtilsResolveOptions, resolveOption);
+ QFETCH(QQmlLSUtils::ResolveOptions, resolveOption);
QFETCH(QString, expectedFile);
QFETCH(int, expectedLine);
- QFETCH(QQmlLSUtilsIdentifierType, expectedType);
+ QFETCH(QQmlLSUtils::IdentifierType, expectedType);
// they all start at 1.
Q_ASSERT(line > 0);
@@ -3930,97 +4153,4 @@ void tst_qmlls_utils::cmakeBuildCommand()
QCOMPARE(QQmlLSUtils::cmakeBuildCommand(path), expected);
}
-void tst_qmlls_utils::qdochtmlparser_data()
-{
- QTest::addColumn<QString>("filePath");
- QTest::addColumn<QDocHtmlExtractor::Element>("element");
- QTest::addColumn<QDocHtmlExtractor::ExtractionMode>("extractionMode");
- QTest::addColumn<QString>("expectedDocumentation");
-
- QTest::addRow("qml-object-type-extended-plaintext")
- << testFile("qdochtmlparser/qml-qtqml-qtobject.html")
- << QDocHtmlExtractor::Element{"QtObject", QDocHtmlExtractor::ElementType::QmlType}
- << QDocHtmlExtractor::ExtractionMode::Extended
- << R"(The QtObject type is a non-visual element which contains only the objectName property.
-It can be useful to create a QtObject if you need an extremely lightweight type to enclose a set of custom properties:
-
- import QtQuick
-
- Item {
- QtObject {
- id: attributes
- property string name
- property int size
- property variant attributes
- }
-
- Text { text: attributes.name }
- }
-
-It can also be useful for C++ integration, as it is just a plain QObject. See the QObject documentation for further details.)";
-
- QTest::addRow("qml-object-type-simplified-plaintext")
- << testFile("qdochtmlparser/qml-qtqml-qtobject.html")
- << QDocHtmlExtractor::Element{"QtObject", QDocHtmlExtractor::ElementType::QmlType}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << R"(A basic QML type.)";
-
- QTest::addRow("qml-property-simplified-plaintext")
- << testFile("qdochtmlparser/qml-qtqml-qtobject.html")
- << QDocHtmlExtractor::Element{"objectName",QDocHtmlExtractor::ElementType::QmlProperty}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << R"(This property holds the QObject::objectName for this specific object instance.)";
-
- QTest::addRow("qml-property-simplified-plaintext-from-Qt5")
- << testFile("qdochtmlparser/qml-qtqml-qtobject-qt-5.html") << QDocHtmlExtractor::Element{"objectName", QDocHtmlExtractor::ElementType::QmlProperty}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << R"(This property holds the QObject::objectName for this specific object instance.)";
-
- QTest::addRow("qml-property-simplified-plaintext")
- << testFile("qdochtmlparser/qml-qtquick-item.html") << QDocHtmlExtractor::Element{"width", QDocHtmlExtractor::ElementType::QmlProperty}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << R"(Defines the item's position and size. The default value is 0.)";
-
- QTest::addRow("qml-group-property-simplified-plaintext")
- << testFile("qdochtmlparser/qml-qtquick-item.html") << QDocHtmlExtractor::Element{"anchors.fill", QDocHtmlExtractor::ElementType::QmlProperty}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << R"(Anchors provide a way to position an item by specifying its relationship with other items.)";
- QTest::addRow("qml-functions")
- << testFile("qdochtmlparser/qml-qtquick-item.html") << QDocHtmlExtractor::Element{"mapFromGlobal", QDocHtmlExtractor::ElementType::QmlMethod}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << "Maps the point (x, y), which is in the global coordinate system, to the item's coordinate system,"
- " and returns a point matching the mapped coordinate.";
-
- QTest::addRow("qml-functions-list")
- << testFile("qdochtmlparser/qml-qtquick-item.html") << QDocHtmlExtractor::Element{"mapFromItem", QDocHtmlExtractor::ElementType::QmlMethod}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << "Maps the point (x, y) or rect (x, y, width, height), which is in item's coordinate system,"
- " to this item's coordinate system, and returns a point or rect matching the mapped coordinate.";
- QTest::addRow("qml-signal")
- << testFile("qdochtmlparser/qml-qtquick-mousearea.html") << QDocHtmlExtractor::Element{"pressAndHold", QDocHtmlExtractor::ElementType::QmlSignal}
- << QDocHtmlExtractor::ExtractionMode::Simplified
- << "This signal is emitted when there is a long press (currently 800ms). The mouse parameter provides information about the press, "
- "including the x and y position of the press, and which button is pressed.";
-}
-
-void tst_qmlls_utils::qdochtmlparser()
-{
- QFETCH(QString, filePath);
- QFETCH(QDocHtmlExtractor::Element, element);
- QFETCH(QDocHtmlExtractor::ExtractionMode, extractionMode);
- QFETCH(QString, expectedDocumentation);
-
- const auto htmlCode = [](const QString &testFileName) {
- QFile file(testFileName);
- if (file.open(QIODeviceBase::ReadOnly | QIODevice::Text))
- return QString::fromUtf8(file.readAll());
- return QString{};
- }(filePath);
-
-
- QDocHtmlExtractor extractor(htmlCode);
- const auto actual = extractor.extract(element, extractionMode);
- QCOMPARE(actual, expectedDocumentation);
-}
-
QTEST_MAIN(tst_qmlls_utils)
diff --git a/tests/auto/qmlls/utils/tst_qmlls_utils.h b/tests/auto/qmlls/utils/tst_qmlls_utils.h
index 51fa74dd0a..2f1ea19a2c 100644
--- a/tests/auto/qmlls/utils/tst_qmlls_utils.h
+++ b/tests/auto/qmlls/utils/tst_qmlls_utils.h
@@ -80,9 +80,6 @@ private slots:
void cmakeBuildCommand();
- void qdochtmlparser_data();
- void qdochtmlparser();
-
private:
using EnvironmentAndFile = std::tuple<QQmlJS::Dom::DomItem, QQmlJS::Dom::DomItem>;
diff --git a/tests/auto/quick/CMakeLists.txt b/tests/auto/quick/CMakeLists.txt
index 3ecf89f351..32a893defb 100644
--- a/tests/auto/quick/CMakeLists.txt
+++ b/tests/auto/quick/CMakeLists.txt
@@ -95,6 +95,7 @@ if(QT_FEATURE_private_tests)
add_subdirectory(qquickspritesequence)
add_subdirectory(qquickrhiitem)
add_subdirectory(rendernode)
+ add_subdirectory(platform)
if(QT_FEATURE_opengl)
add_subdirectory(qquickframebufferobject)
diff --git a/tests/auto/quick/doc/how-tos/how-to-qml/BLACKLIST b/tests/auto/quick/doc/how-tos/how-to-qml/BLACKLIST
new file mode 100644
index 0000000000..c878ca06be
--- /dev/null
+++ b/tests/auto/quick/doc/how-tos/how-to-qml/BLACKLIST
@@ -0,0 +1,5 @@
+# QTBUG-126222
+[activeFocusDebugging]
+macOS
+ubuntu-22.04
+
diff --git a/tests/auto/quick/doc/how-tos/how-to-qml/tst_how-to-qml.cpp b/tests/auto/quick/doc/how-tos/how-to-qml/tst_how-to-qml.cpp
index 66dcb208fc..9b750a59ef 100644
--- a/tests/auto/quick/doc/how-tos/how-to-qml/tst_how-to-qml.cpp
+++ b/tests/auto/quick/doc/how-tos/how-to-qml/tst_how-to-qml.cpp
@@ -60,6 +60,7 @@ void tst_HowToQml::activeFocusDebugging()
auto *window = qobject_cast<QQuickWindow*>(engine.rootObjects().at(0));
window->show();
+ window->requestActivate();
QTest::ignoreMessage(QtDebugMsg, QRegularExpression("activeFocusItem: .*\"ActiveFocusDebuggingMain\""));
QVERIFY(QTest::qWaitForWindowActive(window));
diff --git a/tests/auto/quick/platform/CMakeLists.txt b/tests/auto/quick/platform/CMakeLists.txt
new file mode 100644
index 0000000000..6a5f5760fc
--- /dev/null
+++ b/tests/auto/quick/platform/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+if(ANDROID)
+ add_subdirectory(android)
+endif()
diff --git a/tests/auto/quick/platform/android/CMakeLists.txt b/tests/auto/quick/platform/android/CMakeLists.txt
new file mode 100644
index 0000000000..d902be5aac
--- /dev/null
+++ b/tests/auto/quick/platform/android/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+add_subdirectory(qtandroiditemmodel)
diff --git a/tests/auto/quick/platform/android/qtandroiditemmodel/CMakeLists.txt b/tests/auto/quick/platform/android/qtandroiditemmodel/CMakeLists.txt
new file mode 100644
index 0000000000..d8cdb763c0
--- /dev/null
+++ b/tests/auto/quick/platform/android/qtandroiditemmodel/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## tst_qtandroiditemmodel Test:
+#####################################################################
+
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtandroiditemmodel LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
+qt_internal_add_test(tst_qtandroiditemmodel
+ SOURCES
+ tst_qtandroiditemmodel.cpp
+ LIBRARIES
+ Qt::Gui
+ Qt::Quick
+ Qt::QuickPrivate
+)
+
+set_property(TARGET tst_qtandroiditemmodel APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/testdata
+)
diff --git a/tests/auto/quick/platform/android/qtandroiditemmodel/testdata/src/org/qtproject/qt/android/tests/TestModel.java b/tests/auto/quick/platform/android/qtandroiditemmodel/testdata/src/org/qtproject/qt/android/tests/TestModel.java
new file mode 100644
index 0000000000..6bfb1dbc2f
--- /dev/null
+++ b/tests/auto/quick/platform/android/qtandroiditemmodel/testdata/src/org/qtproject/qt/android/tests/TestModel.java
@@ -0,0 +1,120 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+package org.qtproject.qt.android.tests;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.qtproject.qt.android.QtAbstractItemModel;
+import org.qtproject.qt.android.QtModelIndex;
+
+public class TestModel extends QtAbstractItemModel {
+ int m_rows = 0;
+ int m_cols = 0;
+
+ @Override
+ public int columnCount(QtModelIndex parent) {
+ return parent.isValid() ? 0 : m_cols;
+ }
+
+ @Override
+ public Object data(QtModelIndex index, int role) {
+ int r = index.row();
+ int c = index.column();
+ if (r < 0 || c < 0 || c > m_cols || r > m_rows)
+ return null;
+
+ switch (role) {
+ case 0:
+ return String.format("r%d/c%d", r, c);
+ case 1:
+ return new Boolean(((r + c) % 2) == 0);
+ case 2:
+ return new Integer((c << 8) + r);
+ case 3:
+ return new Double((r + 1.0) / (c + 1.0));
+ case 4:
+ return new Long((c << 8) * (r << 8));
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public QtModelIndex index(int row, int column, QtModelIndex parent) {
+ return hasIndex(row, column, parent) ? createIndex(row, column, 0) : new QtModelIndex();
+ }
+
+ @Override
+ public QtModelIndex parent(QtModelIndex qtModelIndex) {
+ return new QtModelIndex();
+ }
+
+ @Override
+ public int rowCount(QtModelIndex parent) {
+ return parent.isValid() ? 0 : m_rows;
+ }
+
+ @Override
+ public HashMap<Integer,String> roleNames(){
+ final HashMap<Integer,String> roles = new HashMap<Integer,String>();
+ roles.put(0, "stringRole");
+ roles.put(1, "booleanRole");
+ roles.put(2, "integerRole");
+ roles.put(3, "doubleRole");
+ roles.put(4, "longRole");
+ return roles;
+ }
+
+ @Override public boolean canFetchMore(QtModelIndex parent)
+ {
+ return !parent.isValid() && (m_rows < 30);
+ }
+
+ @Override public void fetchMore(QtModelIndex parent)
+ {
+ if (!canFetchMore(parent))
+ return;
+ int toAdd = Math.min(10, 30 - rowCount(parent));
+ beginInsertRows(new QtModelIndex(), m_rows, m_rows + toAdd - 1);
+ m_rows += toAdd;
+ endInsertRows();
+ }
+
+ public void addRow() {
+ beginInsertRows(new QtModelIndex(), m_rows, m_rows);
+ m_rows++;
+ endInsertRows();
+ }
+
+ public void removeRow() {
+ if (m_rows == 0)
+ return;
+ beginRemoveRows(new QtModelIndex(), 0, 0);
+ m_rows--;
+ endRemoveRows();
+ }
+
+ public void addCol() {
+ beginInsertColumns(new QtModelIndex(), m_cols, m_cols);
+ m_cols++;
+ endInsertColumns();
+ }
+
+ public void removeCol() {
+ if (m_cols == 0)
+ return;
+ beginRemoveColumns(new QtModelIndex(), 0, 0);
+ m_cols--;
+ endRemoveColumns();
+ }
+
+ public void reset() {
+ beginResetModel();
+ m_rows = 0;
+ m_cols = 0;
+ endResetModel();
+ }
+}
diff --git a/tests/auto/quick/platform/android/qtandroiditemmodel/tst_qtandroiditemmodel.cpp b/tests/auto/quick/platform/android/qtandroiditemmodel/tst_qtandroiditemmodel.cpp
new file mode 100644
index 0000000000..ae1971df01
--- /dev/null
+++ b/tests/auto/quick/platform/android/qtandroiditemmodel/tst_qtandroiditemmodel.cpp
@@ -0,0 +1,182 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QtTest/QTest>
+
+#include <QtQuick/private/qandroiditemmodelproxy_p.h>
+#include <QtQuick/private/qandroidmodelindexproxy_p.h>
+#include <QtQuick/private/qandroidtypes_p.h>
+
+#include <QGuiApplication>
+#include <QtCore/qabstractitemmodel.h>
+#include <QtCore/qjniobject.h>
+#include <QtCore/qjnitypes.h>
+#include <QtCore/qstring.h>
+
+using namespace Qt::Literals;
+
+Q_DECLARE_JNI_CLASS(JTestModel, "org/qtproject/qt/android/tests/TestModel")
+
+class tst_QtAndroidItemModel : public QObject
+{
+ Q_OBJECT
+ JTestModel jModel;
+ QAbstractItemModel *qProxy;
+ void resetModel();
+
+private slots:
+ void initTestCase();
+ void cleanup();
+ void addRow();
+ void addColumn();
+ void removeRow();
+ void removeColumn();
+ void roleNames();
+ void fetchMore();
+ void hasIndex();
+ void data();
+};
+
+void tst_QtAndroidItemModel::initTestCase()
+{
+ QVERIFY(jModel.isValid());
+ qProxy = QAndroidItemModelProxy::createNativeProxy(jModel);
+ QVERIFY(qProxy);
+}
+
+void tst_QtAndroidItemModel::cleanup()
+{
+ resetModel();
+}
+
+void tst_QtAndroidItemModel::addRow()
+{
+ const int rowsBefore = qProxy->rowCount();
+ jModel.callMethod<void>("addRow");
+ QCOMPARE_EQ(qProxy->rowCount(), rowsBefore + 1);
+}
+
+void tst_QtAndroidItemModel::addColumn()
+{
+ const int columnsBefore = qProxy->columnCount();
+ jModel.callMethod<void>("addCol");
+ QCOMPARE_EQ(qProxy->columnCount(), columnsBefore + 1);
+}
+
+void tst_QtAndroidItemModel::removeRow()
+{
+ jModel.callMethod<void>("addRow");
+ jModel.callMethod<void>("addRow");
+ QCOMPARE_EQ(qProxy->rowCount(), 2);
+ jModel.callMethod<void>("removeRow");
+ QCOMPARE_EQ(qProxy->rowCount(), 1);
+ jModel.callMethod<void>("removeRow");
+ QCOMPARE_EQ(qProxy->rowCount(), 0);
+}
+
+void tst_QtAndroidItemModel::removeColumn()
+{
+ jModel.callMethod<void>("addCol");
+ jModel.callMethod<void>("addCol");
+ QCOMPARE_EQ(qProxy->columnCount(), 2);
+ jModel.callMethod<void>("removeCol");
+ QCOMPARE_EQ(qProxy->columnCount(), 1);
+ jModel.callMethod<void>("removeCol");
+ QCOMPARE_EQ(qProxy->columnCount(), 0);
+}
+
+void tst_QtAndroidItemModel::roleNames()
+{
+ const static QHash<int, QByteArray> expectedRoles = { { 0, "stringRole" },
+ { 1, "booleanRole" },
+ { 2, "integerRole" },
+ { 3, "doubleRole" },
+ { 4, "longRole" } };
+ QCOMPARE(qProxy->roleNames(), expectedRoles);
+}
+
+void tst_QtAndroidItemModel::fetchMore()
+{
+ // In the Java TestModel :
+ // canFetchMore() returns true when row count is less than 30
+ // fetchMore() adds 10 rows at most, or the remaining until row count is 30
+ QVERIFY(qProxy->canFetchMore(QModelIndex()));
+ qProxy->fetchMore(QModelIndex());
+ QCOMPARE_EQ(qProxy->rowCount(), 10);
+ QVERIFY(qProxy->canFetchMore(QModelIndex()));
+ qProxy->fetchMore(QModelIndex());
+ QCOMPARE_EQ(qProxy->rowCount(), 20);
+ jModel.callMethod<void>("addRow");
+ QVERIFY(qProxy->canFetchMore(QModelIndex()));
+ qProxy->fetchMore(QModelIndex());
+ QCOMPARE_EQ(qProxy->rowCount(), 30);
+ QVERIFY(!qProxy->canFetchMore(QModelIndex()));
+}
+
+void tst_QtAndroidItemModel::hasIndex()
+{
+ // fetchMore() adds 10 rows
+ qProxy->fetchMore(QModelIndex());
+ jModel.callMethod<void>("addCol");
+ jModel.callMethod<void>("addCol");
+
+ for (int r = 0; r < 10; ++r) {
+ for (int c = 0; c < 2; ++c) {
+ QVERIFY(qProxy->hasIndex(r, c));
+ }
+ }
+}
+
+void tst_QtAndroidItemModel::data()
+{
+ const static QHash<int, QMetaType::Type> roleToType = { { 0, QMetaType::QString },
+ { 1, QMetaType::Bool },
+ { 2, QMetaType::Int },
+ { 3, QMetaType::Double },
+ { 4, QMetaType::Long } };
+ QVERIFY(qProxy->canFetchMore(QModelIndex()));
+ qProxy->fetchMore(QModelIndex());
+ QCOMPARE_EQ(qProxy->rowCount(), 10);
+ jModel.callMethod<void>("addCol");
+ jModel.callMethod<void>("addCol");
+ jModel.callMethod<void>("addCol");
+
+ for (int r = 0; r < 10; ++r) {
+ for (int c = 0; c < 3; ++c) {
+ QModelIndex index = qProxy->index(r, c);
+ for (int role : roleToType.keys()) {
+ const QVariant data = qProxy->data(index, role);
+ QCOMPARE_EQ(data.typeId(), roleToType[role]);
+ switch (role) {
+ case 0:
+ QCOMPARE(data.toString(),
+ "r%1/c%2"_L1.arg(QString::number(r), QString::number(c)));
+ break;
+ case 1:
+ QCOMPARE(data.toBool(), ((r + c) % 2) == 0);
+ break;
+ case 2:
+ QCOMPARE(data.toInt(), (c << 8) + r);
+ break;
+ case 3:
+ QVERIFY(qFuzzyCompare(data.toDouble(), (1.0 + r) / (1.0 + c)));
+ break;
+ case 4:
+ QCOMPARE(data.toULongLong(), ((c << 8) * (r << 8)));
+ break;
+ }
+ }
+ }
+ }
+}
+
+void tst_QtAndroidItemModel::resetModel()
+{
+ jModel.callMethod<void>("reset");
+ QCOMPARE_EQ(qProxy->rowCount(), 0);
+ QCOMPARE_EQ(qProxy->columnCount(), 0);
+}
+
+#include "tst_qtandroiditemmodel.moc"
+
+QTEST_MAIN(tst_QtAndroidItemModel)
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
index f5259a9e64..fd3d9d96b8 100644
--- a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
+++ b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
@@ -24,4 +24,7 @@ android
android
[touchAndDragHandlerOnFlickable]
android
+# QTBUG-118063
+[nativeGesturePinchOnFlickableWithParentTapHandler]
+opensuse-leap
diff --git a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
index e164d89217..d2a9ea9997 100644
--- a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
+++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
@@ -63,6 +63,7 @@ private slots:
void checkableTest();
void ignoredTest();
void passwordTest();
+ void announceTest();
};
tst_QQuickAccessible::tst_QQuickAccessible()
@@ -161,7 +162,7 @@ void tst_QQuickAccessible::quickAttachedProperties()
// Attaching to non-item
{
QObject parent;
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML QtObject: Accessible must be attached to an Item");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML QtObject: Accessible must be attached to an Item or an Action");
QQuickAccessibleAttached *attachedObj = new QQuickAccessibleAttached(&parent);
QCOMPARE(attachedObj->ignored(), false);
@@ -699,6 +700,25 @@ void tst_QQuickAccessible::passwordTest()
QTestAccessibility::clearEvents();
}
+void tst_QQuickAccessible::announceTest()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick\nItem {\n"
+ "Component.onCompleted: Accessible.announce('I am complete!')"
+ "}",
+ QUrl());
+ auto object = std::unique_ptr<QObject>(component.create());
+ QVERIFY(object != nullptr);
+
+ QAccessibleEvent createdEvent(object.get(), QAccessible::ObjectCreated);
+ QVERIFY_EVENT(&createdEvent);
+ QAccessibleAnnouncementEvent event(object.get(), QStringLiteral("I am complete!"));
+ QVERIFY_EVENT(&event);
+
+ QTestAccessibility::clearEvents();
+}
+
QTEST_MAIN(tst_QQuickAccessible)
#include "tst_qquickaccessible.moc"
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index 25c8559ed3..693bdc1a55 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -1,28 +1,31 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
-#include <QtTest/QtTest>
+
+#include <private/qanimationgroupjob_p.h>
+#include <private/qmlutils_p.h>
+
+#include <private/qqmllistmodel_p.h>
+#include <private/qqmltimer_p.h>
+
+#include <private/qquickanimation_p_p.h>
+#include <private/qquickanimatorjob_p.h>
+#include <private/qquickflickable_p.h>
+#include <private/qquickframeanimation_p.h>
+#include <private/qquickitem_p.h>
+#include <private/qquickitemanimation_p.h>
+#include <private/qquickpathinterpolator_p.h>
+#include <private/qquickrectangle_p.h>
+#include <private/qquicktransition_p.h>
+
+#include <QtQuick/qquickview.h>
+
+#include <QtTest/qtest.h>
+#include <QtTest/qsignalspy.h>
+
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
-#include <QtQuick/qquickview.h>
-#include <QtQml/private/qqmltimer_p.h>
-#include <QtQmlModels/private/qqmllistmodel_p.h>
-#include <QtQml/private/qanimationgroupjob_p.h>
-#include <QtQuick/private/qquickrectangle_p.h>
-#include <QtQuick/private/qquickitemanimation_p.h>
-#include <QtQuick/private/qquickitemanimation_p_p.h>
-#include <QtQuick/private/qquicktransition_p.h>
-#include <QtQuick/private/qquickanimation_p.h>
-#include <QtQuick/private/qquickanimatorjob_p.h>
-#include <QtQuick/private/qquickpathinterpolator_p.h>
-#include <QtQuick/private/qquickitem_p.h>
-#include <QtQuick/private/qquicklistview_p.h>
-#include <QtQuick/private/qquickframeanimation_p.h>
-#include <QEasingCurve>
-
-#include <limits.h>
-#include <math.h>
-
-#include <QtQuickTestUtils/private/qmlutils_p.h>
+
+#include <QtCore/qeasingcurve.h>
class tst_qquickanimations : public QQmlDataTest
{
diff --git a/tests/auto/quick/qquickapplication/BLACKLIST b/tests/auto/quick/qquickapplication/BLACKLIST
new file mode 100644
index 0000000000..d643caebdd
--- /dev/null
+++ b/tests/auto/quick/qquickapplication/BLACKLIST
@@ -0,0 +1,4 @@
+[state]
+opensuse-leap # QTBUG-122031
+[active]
+opensuse-leap # QTBUG-75215
diff --git a/tests/auto/quick/qquickflickable/BLACKLIST b/tests/auto/quick/qquickflickable/BLACKLIST
index d35ddb9e3f..a481b96db5 100644
--- a/tests/auto/quick/qquickflickable/BLACKLIST
+++ b/tests/auto/quick/qquickflickable/BLACKLIST
@@ -8,7 +8,3 @@ macos-11
# QTBUG-118060
[ignoreNonLeftMouseButtons]
opensuse-leap
-
-# QTBUG-118063
-[nativeGesturePinchOnFlickableWithParentTapHandler]
-opensuse-leap
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index b003511356..e13a818cf8 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -1693,7 +1693,7 @@ void tst_qquickflickable::flickVelocity()
QTRY_VERIFY(flickable->verticalVelocity() < 0.0);
QTRY_COMPARE(flickable->verticalVelocity(), 0.0);
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
QSKIP("boost doesn't work on OS X");
return;
#endif
diff --git a/tests/auto/quick/qquickimage/data/multiframeAsyncRetain.qml b/tests/auto/quick/qquickimage/data/multiframeAsyncRetain.qml
new file mode 100644
index 0000000000..fc0f135528
--- /dev/null
+++ b/tests/auto/quick/qquickimage/data/multiframeAsyncRetain.qml
@@ -0,0 +1,7 @@
+import QtQuick
+
+Image {
+ source: "multi.ico"
+ asynchronous: true
+ retainWhileLoading: true
+}
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index 427a45977f..d19c99de82 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -135,41 +135,49 @@ void tst_qquickimage::imageSource_data()
QTest::addColumn<bool>("async");
QTest::addColumn<bool>("cache");
QTest::addColumn<QString>("error");
+ QTest::addColumn<bool>("retainWhileLoading");
- QTest::newRow("local") << testFileUrl("colors.png").toString() << 120.0 << 120.0 << false << false << true << "";
- QTest::newRow("local no cache") << testFileUrl("colors.png").toString() << 120.0 << 120.0 << false << false << false << "";
- QTest::newRow("local async") << testFileUrl("colors1.png").toString() << 120.0 << 120.0 << false << true << true << "";
+ QTest::newRow("local") << testFileUrl("colors.png").toString() << 120.0 << 120.0 << false << false << true << "" << false;
+ QTest::newRow("local no cache") << testFileUrl("colors.png").toString() << 120.0 << 120.0 << false << false << false << "" << false;
+ QTest::newRow("local async") << testFileUrl("colors1.png").toString() << 120.0 << 120.0 << false << true << true << "" << false;
+ QTest::newRow("local async retain") << testFileUrl("colors1.png").toString() << 120.0 << 120.0 << false << true << true << "" << true;
QTest::newRow("local not found") << testFileUrl("no-such-file.png").toString() << 0.0 << 0.0 << false
- << false << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file.png").toString();
+ << false << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file.png").toString() << false;
QTest::newRow("local async not found") << testFileUrl("no-such-file-1.png").toString() << 0.0 << 0.0 << false
- << true << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file-1.png").toString();
- QTest::newRow("remote") << "/colors.png" << 120.0 << 120.0 << true << false << true << "";
- QTest::newRow("remote redirected") << "/oldcolors.png" << 120.0 << 120.0 << true << false << false << "";
+ << true << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file-1.png").toString() << false;
+ QTest::newRow("local async retain not found") << testFileUrl("no-such-file-1.png").toString() << 0.0 << 0.0 << false
+ << true << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file-1.png").toString() << true;
+ QTest::newRow("remote") << "/colors.png" << 120.0 << 120.0 << true << false << true << "" << false;
+ QTest::newRow("remote retain") << "/colors.png" << 120.0 << 120.0 << true << false << true << "" << true;
+ QTest::newRow("remote redirected") << "/oldcolors.png" << 120.0 << 120.0 << true << false << false << "" << false;
if (QImageReader::supportedImageFormats().contains("svg"))
- QTest::newRow("remote svg") << "/heart.svg" << 595.0 << 841.0 << true << false << false << "";
+ QTest::newRow("remote svg") << "/heart.svg" << 595.0 << 841.0 << true << false << false << "" << false;
if (QImageReader::supportedImageFormats().contains("svgz"))
- QTest::newRow("remote svgz") << "/heart.svgz" << 595.0 << 841.0 << true << false << false << "";
+ QTest::newRow("remote svgz") << "/heart.svgz" << 595.0 << 841.0 << true << false << false << "" << false;
if (graphicsApi != QSGRendererInterface::Software) {
- QTest::newRow("texturefile pkm format") << testFileUrl("logo.pkm").toString() << 256.0 << 256.0 << false << false << true << "";
- QTest::newRow("texturefile ktx format") << testFileUrl("car.ktx").toString() << 146.0 << 80.0 << false << false << true << "";
- QTest::newRow("texturefile async") << testFileUrl("logo.pkm").toString() << 256.0 << 256.0 << false << true << true << "";
- QTest::newRow("texturefile remote") << "/logo.pkm" << 256.0 << 256.0 << true << false << true << "";
+ QTest::newRow("texturefile pkm format") << testFileUrl("logo.pkm").toString() << 256.0 << 256.0 << false << false << true << "" << false;
+ QTest::newRow("texturefile ktx format") << testFileUrl("car.ktx").toString() << 146.0 << 80.0 << false << false << true << "" << false;
+ QTest::newRow("texturefile async") << testFileUrl("logo.pkm").toString() << 256.0 << 256.0 << false << true << true << "" << false;
+ QTest::newRow("texturefile async retain") << testFileUrl("logo.pkm").toString() << 256.0 << 256.0 << false << true << true << "" << true;
+ QTest::newRow("texturefile remote") << "/logo.pkm" << 256.0 << 256.0 << true << false << true << "" << false;
+ QTest::newRow("texturefile remote retain") << "/logo.pkm" << 256.0 << 256.0 << true << false << true << "" << true;
}
QTest::newRow("remote not found") << "/no-such-file.png" << 0.0 << 0.0 << true
- << false << true << "<Unknown File>:2:1: QML Image: Error transferring {{ServerBaseUrl}}/no-such-file.png - server replied: Not found";
- QTest::newRow("extless") << testFileUrl("colors").toString() << 120.0 << 120.0 << false << false << true << "";
- QTest::newRow("extless no cache") << testFileUrl("colors").toString() << 120.0 << 120.0 << false << false << false << "";
- QTest::newRow("extless async") << testFileUrl("colors1").toString() << 120.0 << 120.0 << false << true << true << "";
+ << false << true << "<Unknown File>:2:1: QML Image: Error transferring {{ServerBaseUrl}}/no-such-file.png - server replied: Not found" << false;
+ QTest::newRow("extless") << testFileUrl("colors").toString() << 120.0 << 120.0 << false << false << true << "" << false;
+ QTest::newRow("extless no cache") << testFileUrl("colors").toString() << 120.0 << 120.0 << false << false << false << "" << false;
+ QTest::newRow("extless async") << testFileUrl("colors1").toString() << 120.0 << 120.0 << false << true << true << "" << false;
+ QTest::newRow("extless async retain") << testFileUrl("colors1").toString() << 120.0 << 120.0 << false << true << true << "" << true;
QTest::newRow("extless not found") << testFileUrl("no-such-file").toString() << 0.0 << 0.0 << false
- << false << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file").toString();
+ << false << true << "<Unknown File>:2:1: QML Image: Cannot open: " + testFileUrl("no-such-file").toString() << false;
// Test that texture file is preferred over image file, when supported.
// Since pattern.pkm has different size than pattern.png, these tests verify that the right file has been loaded
if (graphicsApi != QSGRendererInterface::Software) {
- QTest::newRow("extless prefer-tex") << testFileUrl("pattern").toString() << 64.0 << 64.0 << false << false << true << "";
- QTest::newRow("extless prefer-tex async") << testFileUrl("pattern").toString() << 64.0 << 64.0 << false << true << true << "";
+ QTest::newRow("extless prefer-tex") << testFileUrl("pattern").toString() << 64.0 << 64.0 << false << false << true << "" << false;
+ QTest::newRow("extless prefer-tex async") << testFileUrl("pattern").toString() << 64.0 << 64.0 << false << true << true << "" << false;
} else {
- QTest::newRow("extless ignore-tex") << testFileUrl("pattern").toString() << 200.0 << 200.0 << false << false << true << "";
- QTest::newRow("extless ignore-tex async") << testFileUrl("pattern").toString() << 200.0 << 200.0 << false << true << true << "";
+ QTest::newRow("extless ignore-tex") << testFileUrl("pattern").toString() << 200.0 << 200.0 << false << false << true << "" << false;
+ QTest::newRow("extless ignore-tex async") << testFileUrl("pattern").toString() << 200.0 << 200.0 << false << true << true << "" << false;
}
}
@@ -183,6 +191,7 @@ void tst_qquickimage::imageSource()
QFETCH(bool, async);
QFETCH(bool, cache);
QFETCH(QString, error);
+ QFETCH(bool, retainWhileLoading);
TestHTTPServer server;
if (remote) {
@@ -196,9 +205,10 @@ void tst_qquickimage::imageSource()
if (!error.isEmpty())
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
- QString componentStr = "import QtQuick 2.0\nImage { source: \"" + source + "\"; asynchronous: "
+ QString componentStr = "import QtQuick\nImage { source: \"" + source + "\"; asynchronous: "
+ (async ? QLatin1String("true") : QLatin1String("false")) + "; cache: "
- + (cache ? QLatin1String("true") : QLatin1String("false")) + " }";
+ + (cache ? QLatin1String("true") : QLatin1String("false")) + "; retainWhileLoading: "
+ + (retainWhileLoading ? QLatin1String("true") : QLatin1String("false")) + " }";
QQmlComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QQuickImage *obj = qobject_cast<QQuickImage*>(component.create());
@@ -209,6 +219,8 @@ void tst_qquickimage::imageSource()
else
QVERIFY(!obj->asynchronous());
+ QCOMPARE(obj->retainWhileLoading(), retainWhileLoading);
+
if (cache)
QVERIFY(obj->cache());
else
@@ -1208,6 +1220,7 @@ void tst_qquickimage::multiFrame_data()
QTest::addRow("default") << "multiframe.qml" << false;
QTest::addRow("async") << "multiframeAsync.qml" << true;
+ QTest::addRow("async retain") << "multiframeAsyncRetain.qml" << true;
}
void tst_qquickimage::multiFrame()
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
index e4cc434909..338070b730 100644
--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
@@ -2622,7 +2622,7 @@ class TransformItemPrivate :public QQuickItemPrivate
protected:
Q_DECLARE_PUBLIC(TransformItem)
- bool transformChanged(QQuickItem *transformedItem) override
+ bool transformChanged(QQuickItem *) override
{
Q_Q(TransformItem);
q->transformChanged = true;
diff --git a/tests/auto/quick/qquickitem2/CMakeLists.txt b/tests/auto/quick/qquickitem2/CMakeLists.txt
index 7034acc184..6b115efd2e 100644
--- a/tests/auto/quick/qquickitem2/CMakeLists.txt
+++ b/tests/auto/quick/qquickitem2/CMakeLists.txt
@@ -37,6 +37,11 @@ qt_internal_add_test(tst_qquickitem2
## Scopes:
#####################################################################
+qt_internal_extend_target(tst_qquickitem2 CONDITION TARGET Qt::Widgets
+ LIBRARIES
+ Qt::Widgets
+)
+
qt_internal_extend_target(tst_qquickitem2 CONDITION ANDROID OR IOS
DEFINES
QT_QMLTEST_DATADIR=":/data"
diff --git a/tests/auto/quick/qquickitem2/data/embedded.qml b/tests/auto/quick/qquickitem2/data/embedded.qml
new file mode 100644
index 0000000000..a9cf115699
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/embedded.qml
@@ -0,0 +1,30 @@
+import QtQuick
+
+Rectangle {
+ width: 300
+ height: 300
+
+ Column {
+ anchors.fill: parent
+ anchors.rightMargin: 2
+ anchors.leftMargin: 2
+ anchors.topMargin: 10
+ spacing: 20
+ Rectangle {
+ objectName: "rect1"
+ width: parent.width
+ height: 30
+ border.width: 1
+ border.color: activeFocus ? "blue" : "black"
+ focusPolicy: Qt.TabFocus
+ }
+ Rectangle {
+ objectName: "rect2"
+ width: parent.width
+ height: 30
+ border.width: 1
+ border.color: activeFocus ? "blue" : "black"
+ focusPolicy: Qt.TabFocus
+ }
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/data/embedded_FocusScope.qml b/tests/auto/quick/qquickitem2/data/embedded_FocusScope.qml
new file mode 100644
index 0000000000..0d154f76e5
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/embedded_FocusScope.qml
@@ -0,0 +1,37 @@
+import QtQuick
+
+Rectangle {
+ width: 300
+ height: 300
+
+ FocusScope {
+ width: parent.width
+ height: parent.height
+ focus: true
+
+ Column {
+ anchors.fill: parent
+ anchors.rightMargin: 2
+ anchors.leftMargin: 2
+ anchors.topMargin: 10
+ spacing: 20
+ Rectangle {
+ objectName: "rect1"
+ width: parent.width
+ height: 30
+ border.width: 1
+ border.color: activeFocus ? "blue" : "black"
+ focusPolicy: Qt.TabFocus
+ }
+ Rectangle {
+ objectName: "rect2"
+ width: parent.width
+ height: 30
+ border.width: 1
+ border.color: activeFocus ? "blue" : "black"
+ focusPolicy: Qt.TabFocus
+ focus: true
+ }
+ }
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/data/mapCoordinatesWithWindows.qml b/tests/auto/quick/qquickitem2/data/mapCoordinatesWithWindows.qml
index 8218c5230a..98fc0e77af 100644
--- a/tests/auto/quick/qquickitem2/data/mapCoordinatesWithWindows.qml
+++ b/tests/auto/quick/qquickitem2/data/mapCoordinatesWithWindows.qml
@@ -17,19 +17,19 @@ QtObject {
color: "red"
}
- Window {
- objectName: "childWindow"
- parent: windowA
+ WindowContainer {
x: 100; y: 100
width: 100; height: 100
- visible: true
- color: "blue"
+ window: Window {
+ objectName: "childWindow"
+ color: "blue"
- Rectangle {
- objectName: "childItemInChildWindow"
- x: 30; y: 30
- width: 50; height: 50
- color: "orange"
+ Rectangle {
+ objectName: "childItemInChildWindow"
+ x: 30; y: 30
+ width: 50; height: 50
+ color: "orange"
+ }
}
}
}
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 57deb0a46a..56271ec3f2 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -23,6 +23,11 @@
#include <QtQuickTestUtils/private/viewtestutils_p.h>
#include <QtQuickTestUtils/private/platforminputcontext_p.h>
#include <QtTest/private/qpropertytesthelper_p.h>
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/qwidget.h>
+#include <QtWidgets/qboxlayout.h>
+#include <QtWidgets/qlineedit.h>
+#endif
using namespace QQuickVisualTestUtils;
@@ -134,6 +139,11 @@ private slots:
void lastFocusChangeReason();
void focusInScopeChanges();
+#ifdef QT_WIDGETS_LIB
+ void embeddedInWidgetsFocus_data();
+ void embeddedInWidgetsFocus();
+#endif
+
private:
QQmlEngine engine;
bool qt_tab_all_widgets() {
@@ -4431,6 +4441,78 @@ void tst_QQuickItem::focusInScopeChanges()
QVERIFY(textInput->hasActiveFocus());
}
+#ifdef QT_WIDGETS_LIB
+void tst_QQuickItem::embeddedInWidgetsFocus_data()
+{
+ QTest::addColumn<QUrl>("source");
+ QTest::newRow("Embedded") << testFileUrl("embedded.qml");
+ QTest::newRow("Embedded Focus Scope") << testFileUrl("embedded_FocusScope.qml");
+}
+
+void tst_QQuickItem::embeddedInWidgetsFocus()
+{
+ QFETCH(QUrl, source);
+ QWidget root;
+ QVBoxLayout *layout = new QVBoxLayout(&root);
+
+ QLineEdit *lineEdit1 = new QLineEdit(&root);
+ lineEdit1->setFocusPolicy(Qt::FocusPolicy::TabFocus);
+
+ QQuickView *quickView = new QQuickView;
+ quickView->setSource(source);
+ QWidget *container = QWidget::createWindowContainer(quickView, &root);
+ container->setMinimumSize(quickView->size());
+ container->setFocusPolicy(Qt::TabFocus);
+
+ QLineEdit *lineEdit2 = new QLineEdit(&root);
+ lineEdit2->setFocusPolicy(Qt::FocusPolicy::TabFocus);
+
+ layout->addWidget(lineEdit1);
+ layout->addWidget(container);
+ layout->addWidget(lineEdit2);
+
+ QQuickItem *rect1 = findItem<QQuickItem>(quickView->rootObject(), "rect1");
+ QQuickItem *rect2 = findItem<QQuickItem>(quickView->rootObject(), "rect2");
+ QVERIFY(rect1);
+ QVERIFY(rect2);
+
+ root.show();
+ QTRY_VERIFY(root.isVisible());
+ QVERIFY(QTest::qWaitForWindowExposed(&root));
+ QVERIFY(QTest::qWaitForWindowFocused(root.windowHandle()));
+
+ lineEdit1->setFocus();
+ QTRY_VERIFY(lineEdit1->hasFocus());
+
+ // Tab forward
+ QTest::keyClick(QGuiApplication::focusWindow(), Qt::Key_Tab);
+ QTRY_VERIFY(container->hasFocus());
+ QVERIFY(QTest::qWaitForWindowFocused(quickView));
+ QVERIFY(rect1->hasActiveFocus());
+
+ QTest::keyClick(QGuiApplication::focusWindow(), Qt::Key_Tab);
+ QTRY_VERIFY(rect2->hasActiveFocus());
+
+ QTest::keyClick(QGuiApplication::focusWindow(), Qt::Key_Tab);
+ QVERIFY(QTest::qWaitForWindowFocused(root.windowHandle()));
+ QVERIFY(lineEdit2->hasFocus());
+ QVERIFY(!rect2->hasActiveFocus());
+
+ // Tab backwards
+ QTest::keyClick(QGuiApplication::focusWindow(), Qt::Key_Tab, Qt::ShiftModifier);
+ QTRY_VERIFY(container->hasFocus());
+ QVERIFY(QTest::qWaitForWindowFocused(quickView));
+ QVERIFY(rect2->hasActiveFocus());
+
+ QTest::keyClick(QGuiApplication::focusWindow(), Qt::Key_Tab, Qt::ShiftModifier);
+ QVERIFY(rect1->hasActiveFocus());
+
+ QTest::keyClick(QGuiApplication::focusWindow(), Qt::Key_Tab, Qt::ShiftModifier);
+ QVERIFY(QTest::qWaitForWindowFocused(root.windowHandle()));
+ QVERIFY(lineEdit1->hasFocus());
+}
+#endif
+
QTEST_MAIN(tst_QQuickItem)
#include "tst_qquickitem.moc"
diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
index 03c186fdb4..d31a0b0fb8 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
@@ -1579,6 +1579,49 @@ Item {
compare(rootRect.item1.width, 100)
}
+ //---------------------------
+ // Layout with negative size
+ Component {
+ id: negativeSize_Component
+ Item {
+ id: rootItem
+ width: 0
+ height: 0
+ // default width x height: (0 x 0)
+ RowLayout {
+ spacing: 0
+ anchors.fill: parent
+ anchors.leftMargin: 1 // since parent size == (0 x 0), it causes layout size
+ anchors.bottomMargin: 1 // to become (-1, -1)
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+ }
+ }
+
+ function test_negativeSize() {
+ let rootItem = createTemporaryObject(negativeSize_Component, container)
+ let rowLayout = rootItem.children[0]
+ let item = rowLayout.children[0]
+
+ const arr = [7, 1, 7, 0]
+ arr.forEach((n) => {
+ rootItem.width = n
+ rootItem.height = n
+
+ // n === 0 is special: It will cause the layout to have a
+ // negative size. In this case it will simply not rearrange its
+ // child (and leave it at its previous size, 6)
+ const expectedItemExtent = n === 0 ? 6 : n - 1
+
+ compare(item.width, expectedItemExtent)
+ compare(item.height, expectedItemExtent)
+ });
+ }
+
+
//---------------------------
Component {
id: rowlayoutWithTextItems_Component
diff --git a/tests/auto/quick/qquicklistview/BLACKLIST b/tests/auto/quick/qquicklistview/BLACKLIST
index e4da77acba..0871e4e5c4 100644
--- a/tests/auto/quick/qquicklistview/BLACKLIST
+++ b/tests/auto/quick/qquicklistview/BLACKLIST
@@ -13,3 +13,7 @@ macos ci
android
[contentHeightWithDelayRemove]
android
+
+# QTBUG-123894
+[multipleTransitions]
+macos
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 48171266de..3def877f00 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -7979,7 +7979,7 @@ void tst_QQuickListView::flickBeyondBounds()
// Flick view up beyond bounds
flick(window.data(), QPoint(10, 10), QPoint(10, -2000), 180);
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
QSKIP("Disabled due to flaky behavior on CI system (QTBUG-44493)");
QTRY_COMPARE(findItems<QQuickItem>(contentItem, "wrapper").count(), 0);
#endif
diff --git a/tests/auto/quick/qquickpath/tst_qquickpath.cpp b/tests/auto/quick/qquickpath/tst_qquickpath.cpp
index 9fd4d9ec8a..3e02f63ea5 100644
--- a/tests/auto/quick/qquickpath/tst_qquickpath.cpp
+++ b/tests/auto/quick/qquickpath/tst_qquickpath.cpp
@@ -5,6 +5,7 @@
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
#include <QtQuick/private/qquickpath_p.h>
+#include <QtQuick/private/qquickrectangle_p.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
@@ -21,6 +22,9 @@ private slots:
void closedCatmullRomCurve();
void svg();
void line();
+ void rectangle_data();
+ void rectangle();
+ void rectangleRadii();
private:
void arc(QSizeF scale);
@@ -29,6 +33,7 @@ private:
void closedCatmullRomCurve(QSizeF scale, const QVector<QPointF> &points);
void svg(QSizeF scale);
void line(QSizeF scale);
+ void rectangle(const QQuickPath *path, const QRectF &rect);
};
static void compare(const QPointF &point, const QSizeF &scale, int line, double x, double y)
@@ -318,6 +323,104 @@ void tst_QuickPath::line()
line(QSizeF(7.23,7.23));
}
+void tst_QuickPath::rectangle_data()
+{
+ QTest::addColumn<QByteArray>("pathqml");
+ QTest::addColumn<QRectF>("rect");
+
+ QTest::newRow("basic") << QByteArray("PathRectangle { width: 100; height: 100 }\n")
+ << QRectF(0, 0, 100, 100);
+
+ QTest::newRow("relative") << QByteArray("startX: -50; startY: -100\nPathRectangle {"
+ "relativeX: 100.2; relativeY: 200.3;"
+ "width: 10.5; height: 10.5 }\n")
+ << QRectF(50.2, 100.3, 10.5, 10.5);
+
+ QTest::newRow("stroke") << QByteArray("PathRectangle { x: 5; y: 10; width: 100; height: 100;"
+ "strokeAdjustment: 20 }\n")
+ << QRectF(5, 10, 100, 100).adjusted(10, 10, -10, -10);
+}
+
+void tst_QuickPath::rectangle(const QQuickPath *path, const QRectF &rect)
+{
+ QCOMPARE(path->pointAtPercent(0), rect.topLeft());
+ QCOMPARE(path->pointAtPercent(1), rect.topLeft());
+ QCOMPARE(path->pointAtPercent(1.0 / 8), QPointF(rect.center().x(), rect.top()));
+ QCOMPARE(path->pointAtPercent(3.0 / 8), QPointF(rect.right(), rect.center().y()));
+ QCOMPARE(path->pointAtPercent(5.0 / 8), QPointF(rect.center().x(), rect.bottom()));
+ QCOMPARE(path->pointAtPercent(7.0 / 8), QPointF(rect.left(), rect.center().y()));
+}
+
+void tst_QuickPath::rectangle()
+{
+ QFETCH(QByteArray, pathqml);
+ QFETCH(QRectF, rect);
+
+ QQmlEngine engine;
+ QQmlComponent c1(&engine);
+ c1.setData("import QtQuick\nPath {\n" + pathqml + "}", QUrl());
+ QScopedPointer<QObject> o1(c1.create());
+ QQuickPath *path = qobject_cast<QQuickPath *>(o1.data());
+ QVERIFY(path);
+ QCOMPARE(path->pointAtPercent(0), rect.topLeft());
+ QCOMPARE(path->pointAtPercent(1), rect.topLeft());
+ QCOMPARE(path->pointAtPercent(1.0 / 8), QPointF(rect.center().x(), rect.top()));
+ QCOMPARE(path->pointAtPercent(3.0 / 8), QPointF(rect.right(), rect.center().y()));
+ QCOMPARE(path->pointAtPercent(5.0 / 8), QPointF(rect.center().x(), rect.bottom()));
+ QCOMPARE(path->pointAtPercent(7.0 / 8), QPointF(rect.left(), rect.center().y()));
+}
+
+#define COMPARE_RADII(P, Q) \
+ QCOMPARE(P.radius(), Q->radius()); \
+ QCOMPARE(P.topLeftRadius(), Q->topLeftRadius()); \
+ QCOMPARE(P.topRightRadius(), Q->topRightRadius()); \
+ QCOMPARE(P.bottomLeftRadius(), Q->bottomLeftRadius()); \
+ QCOMPARE(P.bottomRightRadius(), Q->bottomRightRadius());
+
+void tst_QuickPath::rectangleRadii()
+{
+ // Test that the radius logic of PathRectangle is the same as Rectangle's
+ QQmlEngine engine;
+ QQmlComponent c1(&engine);
+ c1.setData("import QtQuick\n"
+ "Rectangle { x: 10; y: 20; width: 30; height: 40\n"
+ "}",
+ QUrl());
+ QScopedPointer<QObject> o1(c1.create());
+ QQuickRectangle *quickRectangle = qobject_cast<QQuickRectangle *>(o1.data());
+ QVERIFY(quickRectangle);
+ QQuickPathRectangle pathRectangle;
+ pathRectangle.setX(quickRectangle->x());
+ pathRectangle.setY(quickRectangle->y());
+ pathRectangle.setWidth(quickRectangle->width());
+ pathRectangle.setHeight(quickRectangle->height());
+ COMPARE_RADII(pathRectangle, quickRectangle);
+ pathRectangle.setRadius(5);
+ quickRectangle->setRadius(5);
+ COMPARE_RADII(pathRectangle, quickRectangle);
+ pathRectangle.setBottomLeftRadius(15);
+ quickRectangle->setBottomLeftRadius(15);
+ COMPARE_RADII(pathRectangle, quickRectangle);
+ pathRectangle.setRadius(-5);
+ quickRectangle->setRadius(-5);
+ COMPARE_RADII(pathRectangle, quickRectangle);
+ pathRectangle.setRadius(0);
+ quickRectangle->setRadius(0);
+ COMPARE_RADII(pathRectangle, quickRectangle);
+ pathRectangle.setTopLeftRadius(-7);
+ quickRectangle->setTopLeftRadius(-7);
+ COMPARE_RADII(pathRectangle, quickRectangle);
+ pathRectangle.setRadius(4);
+ quickRectangle->setRadius(4);
+ pathRectangle.resetBottomLeftRadius();
+ quickRectangle->resetBottomLeftRadius();
+ pathRectangle.setTopRightRadius(0);
+ quickRectangle->setTopRightRadius(0);
+ pathRectangle.setTopLeftRadius(200);
+ quickRectangle->setTopLeftRadius(200);
+ COMPARE_RADII(pathRectangle, quickRectangle);
+}
+
QTEST_MAIN(tst_QuickPath)
#include "tst_qquickpath.moc"
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index 1b06e0047b..703d6e053d 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -1379,7 +1379,7 @@ void tst_QQuickPathView::package()
QQuickPathView *pathView = window->rootObject()->findChild<QQuickPathView*>("photoPathView");
QVERIFY(pathView);
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-27170 view does not reliably receive polish without a running animation");
#endif
@@ -2943,11 +2943,11 @@ public:
m_values << 0 << 1 << 2 << 3 << 4;
}
- int rowCount(const QModelIndex &parent = QModelIndex()) const {
+ int rowCount(const QModelIndex &parent = QModelIndex()) const final {
Q_UNUSED(parent);
return m_values.count();
}
- QVariant data(const QModelIndex &index, int role) const {
+ QVariant data(const QModelIndex &index, int) const final {
if (index.row() < 0 || m_values.count() <= index.row())
return QVariant();
diff --git a/tests/auto/quick/qquickpixmapcache/data/slowLoading.qml b/tests/auto/quick/qquickpixmapcache/data/slowLoading.qml
new file mode 100644
index 0000000000..7ac98ae87b
--- /dev/null
+++ b/tests/auto/quick/qquickpixmapcache/data/slowLoading.qml
@@ -0,0 +1,13 @@
+import QtQuick
+import PixmapCacheTest
+
+DeviceLoadingImage {
+ id: root
+ width: 240
+ height: 240
+ sourceSize.width: width
+ sourceSize.height: height
+ source: "image://slow/200"
+ asynchronous: true
+ retainWhileLoading: true
+}
diff --git a/tests/auto/quick/qquickpixmapcache/deviceloadingimage.cpp b/tests/auto/quick/qquickpixmapcache/deviceloadingimage.cpp
index 72a956d1d2..bc7a3b4246 100644
--- a/tests/auto/quick/qquickpixmapcache/deviceloadingimage.cpp
+++ b/tests/auto/quick/qquickpixmapcache/deviceloadingimage.cpp
@@ -19,25 +19,24 @@ void DeviceLoadingImage::load()
Q_ASSERT(context);
QUrl resolved = context->resolvedUrl(d->url);
device = std::make_unique<QFile>(resolved.toLocalFile());
- d->pix.loadImageFromDevice(qmlEngine(this), device.get(), context->resolvedUrl(d->url),
+ const bool statusChange = (d->status != Loading);
+ if (statusChange)
+ d->status = Loading;
+ d->pendingPix->loadImageFromDevice(qmlEngine(this), device.get(), context->resolvedUrl(d->url),
d->sourceClipRect.toRect(), d->sourcesize * d->devicePixelRatio,
QQuickImageProviderOptions(), d->currentFrame, d->frameCount);
+ connectSuccess &= d->pendingPix->connectFinished(this, thisRequestFinished);
+ connectSuccess &= d->pendingPix->connectFinished(this, SLOT(onRequestFinished()));
+ qCDebug(lcTests) << "loading page" << d->currentFrame << "of" << d->frameCount
+ << "statuses" << d->currentPix->status() << d->pendingPix->status()
+ << "waiting?" << connectSuccess;
+ if (statusChange)
+ emit statusChanged(d->status);
+}
- qCDebug(lcTests) << "loading page" << d->currentFrame << "of" << d->frameCount << "status" << d->pix.status();
-
- switch (d->pix.status()) {
- case QQuickPixmap::Ready:
- pixmapChange();
- break;
- case QQuickPixmap::Loading:
- d->pix.connectFinished(this, thisRequestFinished);
- if (d->status != Loading) {
- d->status = Loading;
- emit statusChanged(d->status);
- }
- break;
- default:
- qCWarning(lcTests) << "unexpected status" << d->pix.status();
- break;
- }
+void DeviceLoadingImage::onRequestFinished()
+{
+ auto *d = static_cast<QQuickImagePrivate *>(QQuickImagePrivate::get(this));
+ qCDebug(lcTests) << "statuses" << d->currentPix->status() << d->pendingPix->status();
+ ++requestsFinished;
}
diff --git a/tests/auto/quick/qquickpixmapcache/deviceloadingimage.h b/tests/auto/quick/qquickpixmapcache/deviceloadingimage.h
index 062f51d16f..c00b456b94 100644
--- a/tests/auto/quick/qquickpixmapcache/deviceloadingimage.h
+++ b/tests/auto/quick/qquickpixmapcache/deviceloadingimage.h
@@ -15,5 +15,11 @@ public:
protected:
void load() override;
+protected slots:
+ void onRequestFinished();
+
+public:
std::unique_ptr<QFile> device;
+ bool connectSuccess = true;
+ int requestsFinished = 0;
};
diff --git a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
index fce9bba0c6..fcd5265ec2 100644
--- a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
+++ b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <qtest.h>
#include <QtTest/QtTest>
+#include <QtQuick/private/qquickimage_p_p.h>
#include <QtQuick/private/qquickpixmapcache_p.h>
#include <QtQml/qqmlengine.h>
#include <QtQuick/qquickimageprovider.h>
@@ -18,18 +19,20 @@
#include <qfuture.h>
#endif
+#include "deviceloadingimage.h"
+
Q_LOGGING_CATEGORY(lcTests, "qt.quick.tests")
class SlowProvider : public QQuickImageProvider
{
public:
- SlowProvider() : QQuickImageProvider(Pixmap) {}
+ SlowProvider() : QQuickImageProvider(Image) {}
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) override
+ QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize) override
{
const int row = id.toInt();
qCDebug(lcTests) << requestCount << QThread::currentThread() << "row" << row << requestedSize;
- QPixmap image(requestedSize);
+ QImage image(requestedSize, QImage::Format_RGB888);
QPainter painter(&image);
const QColor c(128, row % 8 * 32, 64);
painter.fillRect(0, 0, requestedSize.width(), requestedSize.height(), c);
@@ -73,6 +76,7 @@ private slots:
void dataLeak();
#endif
void slowDevice();
+ void slowDeviceInterrupted();
private:
QQmlEngine engine;
TestHTTPServer server;
@@ -542,6 +546,8 @@ void tst_qquickpixmapcache::dataLeak()
*/
void tst_qquickpixmapcache::slowDevice()
{
+ QSKIP("Crashes: QTBUG-126047");
+
#ifdef QT_BUILD_INTERNAL
auto *provider = new SlowProvider;
engine.addImageProvider("slow", provider); // takes ownership
@@ -565,6 +571,44 @@ void tst_qquickpixmapcache::slowDevice()
#endif
}
+void tst_qquickpixmapcache::slowDeviceInterrupted()
+{
+#ifdef QT_BUILD_INTERNAL
+ auto *provider = new SlowProvider;
+ engine.addImageProvider("slow", provider); // takes ownership
+
+ const QColor secondExpectedColor(128, 50 % 8 * 32, 64);
+
+ {
+ QQuickView window(&engine, nullptr);
+ QVERIFY(QQuickTest::showView(window, testFileUrl("slowLoading.qml")));
+ DeviceLoadingImage *dlimg = qobject_cast<DeviceLoadingImage *>(window.rootObject());
+ QVERIFY(dlimg);
+ // the declared source: "image://slow/200" should take 200 ms to load
+ QTRY_COMPARE(dlimg->status(), QQuickImageBase::Loading);
+ QVERIFY(dlimg->connectSuccess);
+ dlimg->setSource(QUrl("image://slow/50"));
+ QTRY_COMPARE(dlimg->requestsFinished, 2);
+ QCOMPARE(provider->requestCount, 2);
+ QCOMPARE(dlimg->status(), QQuickImageBase::Ready);
+ auto *img_d = static_cast<QQuickImagePrivate *>(QQuickImagePrivate::get(dlimg));
+ QCOMPARE(img_d->currentPix->image().pixelColor({1, 1}), secondExpectedColor);
+ QCOMPARE(QQuickPixmapCache::instance()->m_cache.size(), 2);
+ // Unless CI paused at the wrong time for > 200 ms, we cancelled loading
+ // the first image and switched to the second, so QQuickImageBase::requestFinished()
+ // should have only called swap() once. But if this check ends up being flaky in CI,
+ // it can be be removed.
+ QCOMPARE(img_d->currentPix, &img_d->pix2);
+ } // window goes out of scope: all QQuickPixmapData instances should be eventually unreferenced
+
+ QTRY_COMPARE(QQuickPixmapCache::instance()->referencedCost(), 0);
+ const int leakedPixmaps = QQuickPixmapCache::instance()->destroyCache();
+ QCOMPARE_LE(leakedPixmaps, 0); // -1 if the cache is already destroyed
+#else
+ QSKIP("This test relies on private APIs that are only exported in developer-builds");
+#endif
+}
+
QT_END_NAMESPACE
QTEST_MAIN(tst_qquickpixmapcache)
diff --git a/tests/auto/quick/qquickshape/data/filltransform.qml b/tests/auto/quick/qquickshape/data/filltransform.qml
new file mode 100644
index 0000000000..4f83c04c43
--- /dev/null
+++ b/tests/auto/quick/qquickshape/data/filltransform.qml
@@ -0,0 +1,58 @@
+import QtQuick
+import QtQuick.Shapes
+import tst_qquickpathitem
+
+Rectangle {
+ width: 440
+ height: 220
+ color: "white"
+
+ Shape {
+ objectName: "shape1"
+ ShapePath {
+ id: path1
+ objectName: "path1"
+ fillGradient: RadialGradient {
+ centerX: path1.startX + 100
+ centerY: path1.startY + 100
+ centerRadius: 100
+ focalX: centerX
+ focalY: centerY
+ GradientStop { position: 0.0; color: "blue" }
+ GradientStop { position: 0.5; color: "cyan" }
+ GradientStop { position: 1.0; color: "blue" }
+ }
+
+ fillTransform: PlanarTransform.fromScale(2, 1);
+
+ startX: 10
+ startY: 10
+ PathLine { relativeX: 200; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 200 }
+ PathLine { relativeX: -200; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -200 }
+ }
+
+ ShapePath {
+ id: path2
+ objectName: "path2"
+ fillGradient: RadialGradient {
+ centerX: path2.startX + 100
+ centerY: path2.startY + 100
+ centerRadius: 100
+ focalX: centerX
+ focalY: centerY
+ GradientStop { position: 0.0; color: "blue" }
+ GradientStop { position: 0.5; color: "cyan" }
+ GradientStop { position: 1.0; color: "blue" }
+ }
+
+ startX: 220 + 10
+ startY: 10
+ PathLine { relativeX: 200; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 200 }
+ PathLine { relativeX: -200; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -200 }
+ }
+ }
+}
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
index f846cc4e4f..707e0037f5 100644
--- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp
+++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
@@ -62,6 +62,7 @@ private slots:
void multilineDataTypes_data();
void multilineDataTypes();
void multilineStronglyTyped();
+ void fillTransform();
private:
QVector<QPolygonF> m_lowPolyLogo;
@@ -247,6 +248,8 @@ void tst_QQuickShape::changeSignals()
QCOMPARE(vpChangeSpy.size(), 15);
qobject_cast<QQuickGradientStop *>(stopList.at(1))->setColor(Qt::black);
QCOMPARE(vpChangeSpy.size(), 16);
+ vp->setFillTransform(QMatrix4x4(QTransform::fromScale(3, 0.14)));
+ QCOMPARE(vpChangeSpy.size(), 17);
}
void tst_QQuickShape::render()
@@ -674,6 +677,40 @@ void tst_QQuickShape::multilineStronglyTyped()
}
}
+void tst_QQuickShape::fillTransform()
+{
+ QScopedPointer<QQuickView> window(createView());
+
+ window->setSource(testFileUrl("filltransform.qml"));
+ qApp->processEvents();
+
+ QQuickShape *obj = findItem<QQuickShape>(window->rootObject(), "shape1");
+ QVERIFY(obj != nullptr);
+ QQmlListReference list(obj, "data");
+ QCOMPARE(list.count(), 2);
+
+ QQuickShapePath *p1 = qobject_cast<QQuickShapePath *>(list.at(0));
+ QVERIFY(p1 != nullptr);
+ QVERIFY(p1->objectName() == "path1");
+ QVERIFY(p1->fillTransform() == QMatrix4x4(2,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1));
+
+ QQuickShapePath *p2 = qobject_cast<QQuickShapePath *>(list.at(1));
+ QVERIFY(p2 != nullptr);
+ QVERIFY(p2->objectName() == "path2");
+ QVERIFY(p2->fillTransform().isIdentity());
+
+ QMatrix4x4 xf(QTransform::fromTranslate(-36, 0).shear(0.35, 0));
+ p1->setFillTransform(xf);
+ QVERIFY(p1->fillTransform() == xf);
+
+ QVERIFY(p2->fillTransform().isIdentity());
+ p2->setFillTransform(xf);
+ QVERIFY(p2->fillTransform() == xf);
+
+ p1->setFillTransform(QMatrix4x4{});
+ QVERIFY(p1->fillTransform().isIdentity());
+}
+
QTEST_MAIN(tst_QQuickShape)
#include "tst_qquickshape.moc"
diff --git a/tests/auto/quick/qquicktableview/data/reordertableview.qml b/tests/auto/quick/qquicktableview/data/reordertableview.qml
new file mode 100644
index 0000000000..704126180f
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/reordertableview.qml
@@ -0,0 +1,52 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ width: 640
+ height: 450
+
+ property alias tableView: tableView
+ property real delegateWidth: 100
+ property real delegateHeight: 50
+ property Component delegate: tableViewDelegate
+ property bool delegateParentSetBeforeCompleted: false
+
+ TableView {
+ id: tableView
+ width: 600
+ height: 400
+ anchors.margins: 1
+ clip: true
+ delegate: tableViewDelegate
+ columnSpacing: 1
+ rowSpacing: 1
+ animate: false
+ }
+
+ Component {
+ id: tableViewDelegate
+ Rectangle {
+ required property int column
+ required property int row
+ objectName: "tableViewDelegate" + column + row
+ implicitWidth: delegateWidth
+ implicitHeight: delegateHeight
+ color: "lightgray"
+ border.width: 1
+
+ property string modelDataBinding: modelData
+
+ Text {
+ anchors.centerIn: parent
+ text: modelData
+ }
+
+ Component.onCompleted: {
+ delegateParentSetBeforeCompleted = parent != null;
+ }
+ }
+ }
+
+}
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
index bb425b5a6f..56dee4b585 100644
--- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
+++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
@@ -279,6 +279,13 @@ private slots:
void checkScroll_data();
void checkScroll();
void checkRebuildJsModel();
+
+ // Row and column reordering
+ void checkVisualRowColumnAfterReorder();
+ void checkColumnRowSizeAfterReorder();
+ void checkCellModelIdxAfterReorder();
+ void checkEditAfterReorder();
+ void checkSelectionAfterReorder();
};
tst_QQuickTableView::tst_QQuickTableView()
@@ -4868,23 +4875,23 @@ void tst_QQuickTableView::testSelectableScrollTowardsPos()
const QPointF bottomLeft(-100, tableView->height() + 100);
const QPointF bottomRight(tableView->width() + 100, tableView->height() + 100);
- tableViewPrivate->scrollTowardsSelectionPoint(topRight, step);
+ tableViewPrivate->scrollTowardsPoint(topRight, step);
QCOMPARE(tableView->contentX(), step.width());
QCOMPARE(tableView->contentY(), 0);
- tableViewPrivate->scrollTowardsSelectionPoint(bottomRight, step);
+ tableViewPrivate->scrollTowardsPoint(bottomRight, step);
QCOMPARE(tableView->contentX(), step.width() * 2);
QCOMPARE(tableView->contentY(), step.height());
- tableViewPrivate->scrollTowardsSelectionPoint(bottomLeft, step);
+ tableViewPrivate->scrollTowardsPoint(bottomLeft, step);
QCOMPARE(tableView->contentX(), step.width());
QCOMPARE(tableView->contentY(), step.height() * 2);
- tableViewPrivate->scrollTowardsSelectionPoint(topLeft, step);
+ tableViewPrivate->scrollTowardsPoint(topLeft, step);
QCOMPARE(tableView->contentX(), 0);
QCOMPARE(tableView->contentY(), step.height());
- tableViewPrivate->scrollTowardsSelectionPoint(topLeft, step);
+ tableViewPrivate->scrollTowardsPoint(topLeft, step);
QCOMPARE(tableView->contentX(), 0);
QCOMPARE(tableView->contentY(), 0);
}
@@ -7548,6 +7555,236 @@ void tst_QQuickTableView::checkRebuildJsModel()
QCOMPARE(tableView->property(modelUpdated).toInt(), 1);
}
+void tst_QQuickTableView::checkVisualRowColumnAfterReorder()
+{
+ LOAD_TABLEVIEW("reordertableview.qml"); // gives us 'tableView' variable
+ auto model = TestModelAsVariant(3, 3);
+ tableView->setModel(model);
+
+ WAIT_UNTIL_POLISHED;
+
+ QSignalSpy columnMovedSpy(tableView, &QQuickTableView::columnMoved);
+ QSignalSpy rowMovedSpy(tableView, &QQuickTableView::rowMoved);
+
+ // Move row and column
+ tableView->moveColumn(0, 2);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(columnMovedSpy.size(), 3);
+
+ tableView->moveRow(1, 0);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(rowMovedSpy.size(), 2);
+
+ QVariantList firstColumnVar = columnMovedSpy.takeFirst();
+ QCOMPARE(firstColumnVar.at(0), 0); // Logical index
+ QCOMPARE(firstColumnVar.at(1), 0); // Old visual index
+ QCOMPARE(firstColumnVar.at(2), 2); // New visual index
+
+ QVariantList firstRowVar = rowMovedSpy.takeFirst();
+ QCOMPARE(firstRowVar.at(0), 0); // Logical index
+ QCOMPARE(firstRowVar.at(1), 0); // Old visual index
+ QCOMPARE(firstRowVar.at(2), 1); // New visual index
+}
+
+void tst_QQuickTableView::checkColumnRowSizeAfterReorder()
+{
+ LOAD_TABLEVIEW("reordertableview.qml"); // gives us 'tableView' variable
+ auto model = TestModelAsVariant(3, 3);
+ tableView->setModel(model);
+
+ WAIT_UNTIL_POLISHED;
+
+ const QSignalSpy columMovedSpy(tableView, &QQuickTableView::columnMoved);
+ const QSignalSpy rowMovedSpy(tableView, &QQuickTableView::rowMoved);
+
+ for (int index = 0, minSize = 10; index < tableView->columns(); index++, minSize+=10) {
+ tableView->setColumnWidth(index, minSize);
+ tableView->setRowHeight(index, minSize);
+ }
+ WAIT_UNTIL_POLISHED;
+
+ // Move row and column
+ tableView->moveColumn(0, 2);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(columMovedSpy.size(), 3);
+
+ tableView->moveRow(0, 2);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(rowMovedSpy.size(), 3);
+
+ QCOMPARE(tableView->columnWidth(0), 20);
+ QCOMPARE(tableView->columnWidth(1), 30);
+ QCOMPARE(tableView->columnWidth(2), 10);
+
+ QCOMPARE(tableView->rowHeight(0), 20);
+ QCOMPARE(tableView->rowHeight(1), 30);
+ QCOMPARE(tableView->rowHeight(2), 10);
+}
+
+void tst_QQuickTableView::checkCellModelIdxAfterReorder()
+{
+ LOAD_TABLEVIEW("reordertableview.qml"); // gives us 'tableView' variable
+ auto model = TestModelAsVariant(3, 3);
+ tableView->setModel(model);
+
+ WAIT_UNTIL_POLISHED;
+
+ const QSignalSpy columnMovedSpy(tableView, &QQuickTableView::columnMoved);
+ const QSignalSpy rowMovedSpy(tableView, &QQuickTableView::rowMoved);
+
+ const QSharedPointer<TestModel> testModel = model.value<QSharedPointer<TestModel>>();
+ const QString objNameItem21(tableView->itemAtIndex(testModel->index(2, 1))->objectName());
+ const QString objNameItem00(tableView->itemAtIndex(testModel->index(0 ,0))->objectName());
+ const QString objNameItem11(tableView->itemAtIndex(testModel->index(1 ,1))->objectName());
+
+ // Move row and column
+ tableView->moveColumn(0, 2);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(columnMovedSpy.size(), 3);
+
+ tableView->moveRow(1, 0);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(rowMovedSpy.size(), 2);
+
+ // Check model index - index()
+ QModelIndex modelIndex = tableView->index(0, 0);
+ QCOMPARE(modelIndex.column(), 1);
+ QCOMPARE(modelIndex.row(), 1);
+
+ modelIndex = tableView->index(1, 1);
+ QCOMPARE(modelIndex.column(), 2);
+ QCOMPARE(modelIndex.row(), 0);
+
+ modelIndex = tableView->index(2, 2);
+ QCOMPARE(modelIndex.column(), 0);
+ QCOMPARE(modelIndex.row(), 2);
+
+ // Check cell index - cellAtIndex()
+ {
+ QPoint cell = tableView->cellAtIndex(testModel->index(0, 0));
+ QCOMPARE(cell.x(), 2);
+ QCOMPARE(cell.y(), 1);
+ }
+
+ // Check column and row index - columnAtIndex(), rowAtIndex()
+ {
+ int columnIndex = tableView->columnAtIndex(testModel->index(0, 0));
+ int rowIndex = tableView->rowAtIndex(testModel->index(0, 0));
+ QCOMPARE(columnIndex, 2);
+ QCOMPARE(rowIndex, 1);
+ }
+
+ // Check item - itemAtIndex()
+ // Item at index provides the item that is mapped to that model index
+ // and it shouldn't be confused with cell index
+ {
+ QQuickItem *item = tableView->itemAtIndex(testModel->index(0 ,0));
+ QCOMPARE(objNameItem00, item->objectName());
+ }
+
+ // Check item at cell localtion 0, 0 - itemAtCell()
+ {
+ QQuickItem *item = tableView->itemAtCell(QPoint(0, 0));
+ QCOMPARE(objNameItem11, item->objectName());
+ }
+}
+
+void tst_QQuickTableView::checkEditAfterReorder()
+{
+ LOAD_TABLEVIEW("editdelegate.qml"); // gives us 'tableView' variable
+ auto model = TestModelAsVariant(3, 3);
+ tableView->setModel(model);
+
+ WAIT_UNTIL_POLISHED;
+
+ const QSignalSpy columnMovedSpy(tableView, &QQuickTableView::columnMoved);
+ const QSignalSpy rowMovedSpy(tableView, &QQuickTableView::rowMoved);
+
+ // Move row and column
+ tableView->moveColumn(0, 1);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(columnMovedSpy.size(), 2);
+
+ tableView->moveRow(0, 1);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(rowMovedSpy.size(), 2);
+
+ // Edit model index (0, 0)
+ const QSharedPointer<TestModel> testModel = model.value<QSharedPointer<TestModel>>();
+ const auto cellItem1 = tableView->itemAtCell(QPoint(0, 0));
+ QCOMPARE(cellItem1->property("editing").toBool(), false);
+
+ tableView->edit(testModel->index(1, 1));
+ QCOMPARE(cellItem1->property("editing").toBool(), true);
+
+ // Close the editor
+ tableView->closeEditor();
+ QCOMPARE(cellItem1->property("editing").toBool(), false);
+}
+
+void tst_QQuickTableView::checkSelectionAfterReorder()
+{
+ LOAD_TABLEVIEW("tableviewwithselected1.qml");
+
+ TestModel model(10, 10);
+ QItemSelectionModel selectionModel(&model);
+
+ tableView->setModel(QVariant::fromValue(&model));
+ tableView->setSelectionModel(&selectionModel);
+
+ WAIT_UNTIL_POLISHED;
+
+ QCOMPARE(selectionModel.hasSelection(), false);
+ QCOMPARE(tableView->selectionBehavior(), QQuickTableView::SelectCells);
+
+ const QSignalSpy columnMovedSpy(tableView, &QQuickTableView::columnMoved);
+ tableView->moveColumn(0, 2);
+ WAIT_UNTIL_POLISHED;
+ QCOMPARE(columnMovedSpy.size(), 3);
+
+ const QPoint endCellDist(1, 1);
+ const QPoint startCell(0, 0);
+ const QPoint endCell = startCell + endCellDist;
+
+ const QQuickItem *startItem = tableView->itemAtCell(startCell);
+ const QQuickItem *endItem = tableView->itemAtCell(endCell);
+ QVERIFY(startItem);
+ QVERIFY(endItem);
+
+ const QPointF startPos(startItem->x(), startItem->y());
+ const QPointF endPos(endItem->x(), endItem->y());
+
+ QVERIFY(tableViewPrivate->startSelection(startPos, Qt::NoModifier));
+ tableViewPrivate->setSelectionStartPos(startPos);
+ tableViewPrivate->setSelectionEndPos(endPos);
+
+ QCOMPARE(selectionModel.hasSelection(), true);
+
+ const int x1 = qMin(startCell.x(), endCell.x());
+ const int x2 = qMax(startCell.x(), endCell.x());
+ const int y1 = qMin(startCell.y(), endCell.y());
+ const int y2 = qMax(startCell.y(), endCell.y());
+
+ for (int x = x1; x <= x2; ++x) {
+ for (int y = y1; y <= y2; ++y) {
+ const auto index = tableView->index(y, x);
+ QVERIFY(selectionModel.isSelected(index));
+ }
+ }
+
+ const int expectedCount = (x2 - x1 + 1) * (y2 - y1 + 1);
+ const int actualCount = selectionModel.selectedIndexes().size();
+ QCOMPARE(actualCount, expectedCount);
+
+ // The column which has been moved shouldn't have the selected
+ // bit enabled
+ for (int index = 0; index < model.rowCount(); index++)
+ QCOMPARE(selectionModel.isSelected(model.index(index, 0)), false);
+
+ tableViewPrivate->clearSelection();
+ QCOMPARE(selectionModel.hasSelection(), false);
+}
+
QTEST_MAIN(tst_QQuickTableView)
#include "tst_qquicktableview.moc"
diff --git a/tests/auto/quick/qquicktext/BLACKLIST b/tests/auto/quick/qquicktext/BLACKLIST
index a4e9c44eab..46936293ca 100644
--- a/tests/auto/quick/qquicktext/BLACKLIST
+++ b/tests/auto/quick/qquicktext/BLACKLIST
@@ -3,6 +3,7 @@ opensuse-42.1
[contentSize]
windows gcc
msvc-2019
+msvc-2022
[hAlignVisual]
sles
# QTQAINFRA-4127
diff --git a/tests/auto/quick/qquicktextedit/data/hAlignVisual.qml b/tests/auto/quick/qquicktextedit/data/hAlignVisual.qml
index 1280a655f0..f532a9aa36 100644
--- a/tests/auto/quick/qquicktextedit/data/hAlignVisual.qml
+++ b/tests/auto/quick/qquicktextedit/data/hAlignVisual.qml
@@ -4,11 +4,11 @@ Rectangle {
width: 200
height: 100
- Text {
- objectName: "textItem"
+ TextEdit {
+ objectName: "textEditItem"
text: "AA\nBBBBBBB\nCCCCCCCCCCCCCCCC"
anchors.centerIn: parent
- horizontalAlignment: Text.AlignLeft
+ horizontalAlignment: TextEdit.AlignLeft
font.pointSize: 12
font.family: "Times New Roman"
}
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index cc994fe783..c8377aa2d3 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -245,7 +245,6 @@ private:
void simulateKey(QWindow *, int key, Qt::KeyboardModifiers modifiers = {});
bool isMainFontFixed();
- static bool hasWindowActivation();
QStringList standard;
QStringList richText;
@@ -986,8 +985,8 @@ void tst_qquicktextedit::hAlignVisual()
view.showNormal();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- QQuickText *text = view.rootObject()->findChild<QQuickText*>("textItem");
- QVERIFY(text != nullptr);
+ QQuickTextEdit *text = view.rootObject()->findChild<QQuickTextEdit*>("textEditItem");
+ QVERIFY(text);
// Try to check whether alignment works by checking the number of black
// pixels in the thirds of the grabbed image.
@@ -1014,7 +1013,7 @@ void tst_qquicktextedit::hAlignVisual()
}
{
// HCenter Align
- text->setHAlign(QQuickText::AlignHCenter);
+ text->setHAlign(QQuickTextEdit::AlignHCenter);
QImage image = view.grabWindow();
const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image);
const int mid = numberOfNonWhitePixels(centeredSection2, centeredSection3, image);
@@ -1024,7 +1023,7 @@ void tst_qquicktextedit::hAlignVisual()
}
{
// Right Align
- text->setHAlign(QQuickText::AlignRight);
+ text->setHAlign(QQuickTextEdit::AlignRight);
QImage image = view.grabWindow();
const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image);
const int mid = numberOfNonWhitePixels(centeredSection2, centeredSection3, image);
@@ -1036,36 +1035,36 @@ void tst_qquicktextedit::hAlignVisual()
text->setWidth(200);
{
- // Left Align
+ // Right Align
QImage image = view.grabWindow();
- int x = qCeil(text->implicitWidth() * view.devicePixelRatio());
- int left = numberOfNonWhitePixels(0, x, image);
- int right = numberOfNonWhitePixels(x, image.width() - x, image);
- QVERIFY2(left > 0, msgNotGreaterThan(left, 0).constData());
- QCOMPARE(right, 0);
+ const int x = image.width() - qCeil(text->implicitWidth() * view.devicePixelRatio());
+ const int left = numberOfNonWhitePixels(0, x, image);
+ const int right = numberOfNonWhitePixels(x, image.width() - x, image);
+ QCOMPARE(left, 0);
+ QVERIFY2(right > 0, msgNotGreaterThan(left, 0).constData());
}
{
// HCenter Align
- text->setHAlign(QQuickText::AlignHCenter);
+ text->setHAlign(QQuickTextEdit::AlignHCenter);
QImage image = view.grabWindow();
- int x1 = qFloor(image.width() - text->implicitWidth() * view.devicePixelRatio()) / 2;
- int x2 = image.width() - x1;
- int left = numberOfNonWhitePixels(0, x1, image);
- int mid = numberOfNonWhitePixels(x1, x2 - x1, image);
- int right = numberOfNonWhitePixels(x2, image.width() - x2, image);
+ const int x1 = qFloor(image.width() - text->implicitWidth() * view.devicePixelRatio()) / 2;
+ const int x2 = image.width() - x1;
+ const int left = numberOfNonWhitePixels(0, x1, image);
+ const int mid = numberOfNonWhitePixels(x1, x2 - x1, image);
+ const int right = numberOfNonWhitePixels(x2, image.width(), image);
QCOMPARE(left, 0);
QVERIFY2(mid > 0, msgNotGreaterThan(left, 0).constData());
QCOMPARE(right, 0);
}
{
- // Right Align
- text->setHAlign(QQuickText::AlignRight);
+ // Left Align
+ text->setHAlign(QQuickTextEdit::AlignLeft);
QImage image = view.grabWindow();
- int x = image.width() - qCeil(text->implicitWidth() * view.devicePixelRatio());
- int left = numberOfNonWhitePixels(0, x, image);
- int right = numberOfNonWhitePixels(x, image.width() - x, image);
- QCOMPARE(left, 0);
- QVERIFY2(right > 0, msgNotGreaterThan(left, 0).constData());
+ const int x = qCeil(text->implicitWidth() * view.devicePixelRatio());
+ const int left = numberOfNonWhitePixels(0, x, image);
+ const int right = numberOfNonWhitePixels(x, image.width() - x, image);
+ QVERIFY2(left > 0, msgNotGreaterThan(left, 0).constData());
+ QCOMPARE(right, 0);
}
}
@@ -3332,11 +3331,6 @@ bool tst_qquicktextedit::isMainFontFixed()
return ret;
}
-bool tst_qquicktextedit::hasWindowActivation()
-{
- return (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation));
-}
-
void tst_qquicktextedit::textInput()
{
QQuickView window;
@@ -6521,8 +6515,8 @@ void tst_qquicktextedit::touchscreenDoesNotSelect()
void tst_qquicktextedit::touchscreenSetsFocusAndMovesCursor()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
+
QQuickView window;
QVERIFY(QQuickTest::showView(window, testFileUrl("twoInAColumn.qml")));
window.requestActivate();
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index b7e689e147..8f8442544f 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -6,6 +6,7 @@
#include <QtQuickTestUtils/private/qmlutils_p.h>
#include <QtQuickTestUtils/private/testhttpserver_p.h>
#include <QtQuickTestUtils/private/viewtestutils_p.h>
+#include <QtQuickTestUtils/private/visualtestutils_p.h>
#include <private/qinputmethod_p.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
@@ -213,7 +214,6 @@ private:
#if QT_CONFIG(shortcut)
void simulateKeys(QWindow *window, const QKeySequence &sequence);
#endif
- static bool hasWindowActivation();
QQmlEngine engine;
QStringList standard;
@@ -239,11 +239,6 @@ void tst_qquicktextinput::simulateKeys(QWindow *window, const QList<Key> &keys)
}
}
-bool tst_qquicktextinput::hasWindowActivation()
-{
- return (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation));
-}
-
#if QT_CONFIG(shortcut)
void tst_qquicktextinput::simulateKeys(QWindow *window, const QKeySequence &sequence)
@@ -7201,8 +7196,8 @@ void tst_qquicktextinput::touchscreenDoesNotSelect()
void tst_qquicktextinput::touchscreenSetsFocusAndMovesCursor()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
+
QQuickView window;
QVERIFY(QQuickTest::showView(window, testFileUrl("twoInAColumn.qml")));
window.requestActivate();
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index ff3edb3b64..a80827a663 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -3334,7 +3334,7 @@ protected:
}
private:
- static void appendEvent(QQuickItem *filter, QQuickItem *receiver, QEvent *event) {
+ static void appendEvent(QQuickItem *filter, QQuickItem *receiver, QEvent *) {
auto record = DeliveryRecord(filter ? filter->objectName() : QString(), receiver ? receiver->objectName() : QString());
int i = m_deliveryList.size();
if (m_expectedDeliveryList.size() > i && m_expectedDeliveryList[i] == record)
@@ -3384,7 +3384,11 @@ void tst_qquickwindow::testChildMouseEventFilter_data()
QTest::addColumn<InputState>("inputState");
QTest::addColumn<DeliveryRecordVector>("expectedDeliveryOrder");
- for (const QString &eventMode : {"mouse", "touch", "touchToMouse"}) {
+ for (const QString &eventMode : {
+ QStringLiteral("mouse"),
+ QStringLiteral("touch"),
+ QStringLiteral("touchToMouse")
+ }) {
#define desc(txt) qPrintable(QString("%1 events, ").arg(eventMode) + txt)
@@ -4167,7 +4171,7 @@ void tst_qquickwindow::visibilityDoesntClobberWindowState()
window->installEventFilter(&eventFilter);
window->setProperty("visibility", QWindow::FullScreen);
QTRY_VERIFY(eventFilter.events.contains(QEvent::WindowStateChange));
- QCOMPARE(window->windowState(), Qt::WindowFullScreen);
+ QTRY_COMPARE(window->windowState(), Qt::WindowFullScreen);
eventFilter.events.clear();
window->setWindowState(Qt::WindowMaximized);
diff --git a/tests/auto/quick/qquickwindowcontainer/tst_qquickwindowcontainer.cpp b/tests/auto/quick/qquickwindowcontainer/tst_qquickwindowcontainer.cpp
index c702cf96dc..ce3cb0a802 100644
--- a/tests/auto/quick/qquickwindowcontainer/tst_qquickwindowcontainer.cpp
+++ b/tests/auto/quick/qquickwindowcontainer/tst_qquickwindowcontainer.cpp
@@ -16,6 +16,8 @@
#include <QtQuick/qquickwindow.h>
#include <QtQuick/private/qquickwindowcontainer_p.h>
+#define TEST_WINDOW_PARENT 0
+
class tst_QQuickWindowContainer : public QQmlDataTest
{
Q_OBJECT
@@ -34,8 +36,10 @@ private slots:
void windowDestroyed();
void windowLifetimeFollowsContainer();
+#if TEST_WINDOW_PARENT
void deferredVisibilityWithoutWindow();
void windowComponent();
+#endif
private:
std::unique_ptr<QQmlApplicationEngine> m_engine;
@@ -66,8 +70,10 @@ void tst_QQuickWindowContainer::basicFunctionality_data()
{
QTest::addColumn<QPoint>("position");
+#if TEST_WINDOW_PARENT
QTest::newRow("window") << QPoint(100, 100);
QTest::newRow("item") << QPoint(200, 200);
+#endif
QTest::newRow("container") << QPoint(100, 100);
}
@@ -129,6 +135,7 @@ void tst_QQuickWindowContainer::windowLifetimeFollowsContainer()
QVERIFY(windowGuard);
}
+#if TEST_WINDOW_PARENT
void tst_QQuickWindowContainer::deferredVisibilityWithoutWindow()
{
auto *topLevelWindow = qobject_cast<QQuickWindow*>(m_engine->rootObjects().first());
@@ -186,6 +193,7 @@ void tst_QQuickWindowContainer::windowComponent()
QCOMPARE(qobject_cast<QQuickWindow *>(window_item_parent)->parent(), root);
QCOMPARE(qobject_cast<QQuickWindow *>(window_window_parent)->parent(), windowParent);
}
+#endif // TEST_WINDOW_PARENT
QTEST_MAIN(tst_QQuickWindowContainer)
diff --git a/tests/auto/quickcontrols/accessibility/data/actionAccessibility/button.qml b/tests/auto/quickcontrols/accessibility/data/actionAccessibility/button.qml
new file mode 100644
index 0000000000..7e392e9cc3
--- /dev/null
+++ b/tests/auto/quickcontrols/accessibility/data/actionAccessibility/button.qml
@@ -0,0 +1,12 @@
+import QtQuick
+import QtQuick.Controls
+
+Button {
+ action: Action {
+ id: anAction
+ text: "Peaches"
+ Accessible.name: "Peach"
+ Accessible.description: "Show peaches some love"
+ }
+ text: Accessible.description
+}
diff --git a/tests/auto/quickcontrols/accessibility/tst_accessibility.cpp b/tests/auto/quickcontrols/accessibility/tst_accessibility.cpp
index 9774bf4e07..8bdd9453c8 100644
--- a/tests/auto/quickcontrols/accessibility/tst_accessibility.cpp
+++ b/tests/auto/quickcontrols/accessibility/tst_accessibility.cpp
@@ -31,6 +31,8 @@ private slots:
void override();
void ordering();
+
+ void actionAccessibility();
private:
QQmlEngine engine;
};
@@ -274,6 +276,26 @@ void tst_accessibility::ordering()
#endif
}
+void tst_accessibility::actionAccessibility()
+{
+#if QT_CONFIG(accessibility)
+ QQmlComponent component(&engine);
+ component.loadUrl(testFileUrl("actionAccessibility/button.qml"));
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY2(!object.isNull(), qPrintable(component.errorString()));
+
+ QQuickItem *item = qobject_cast<QQuickItem *>(object.data());
+ QVERIFY(item);
+ const QString description = "Show peaches some love";
+ QCOMPARE(item->property("text"), description);
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(item);
+ QVERIFY(iface);
+ QCOMPARE(iface->text(QAccessible::Name), "Peach");
+ QCOMPARE(iface->text(QAccessible::Description), description);
+#endif
+}
+
QTEST_MAIN(tst_accessibility)
#include "tst_accessibility.moc"
diff --git a/tests/auto/quickcontrols/controls/CMakeLists.txt b/tests/auto/quickcontrols/controls/CMakeLists.txt
index 6984315b5a..593d87fb75 100644
--- a/tests/auto/quickcontrols/controls/CMakeLists.txt
+++ b/tests/auto/quickcontrols/controls/CMakeLists.txt
@@ -8,6 +8,7 @@ add_subdirectory(fusion)
add_subdirectory(imagine)
add_subdirectory(material)
add_subdirectory(universal)
+add_subdirectory(fluentwinui3)
if(MACOS)
add_subdirectory(macos)
add_subdirectory(ios)
diff --git a/tests/auto/quickcontrols/controls/basic/BLACKLIST b/tests/auto/quickcontrols/controls/basic/BLACKLIST
index b643dd1d9c..b822193f4c 100644
--- a/tests/auto/quickcontrols/controls/basic/BLACKLIST
+++ b/tests/auto/quickcontrols/controls/basic/BLACKLIST
@@ -11,3 +11,8 @@ qnx
[ComboBox::test_keyClose]
macos arm ci # QTBUG-102817
+
+# QTBUG-126236
+[Action::test_repeater]
+macos
+linux
diff --git a/tests/auto/quickcontrols/controls/basic/tst_basic.cpp b/tests/auto/quickcontrols/controls/basic/tst_basic.cpp
index 33417cca55..7e73bd2231 100644
--- a/tests/auto/quickcontrols/controls/basic/tst_basic.cpp
+++ b/tests/auto/quickcontrols/controls/basic/tst_basic.cpp
@@ -8,6 +8,9 @@ int main(int argc, char *argv[])
{
QTEST_SET_MAIN_SOURCE_PATH
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Basic");
return quick_test_main(argc, argv, "tst_controls::Basic", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/data/combobox/shader.frag b/tests/auto/quickcontrols/controls/data/combobox/shader.frag
new file mode 100644
index 0000000000..fbbef218e6
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/data/combobox/shader.frag
@@ -0,0 +1,19 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#version 440
+
+layout(location = 0) in vec2 qt_TexCoord0;
+layout(location = 0) out vec4 fragColor;
+layout(binding = 1) uniform sampler2D source; // this item
+
+layout(std140, binding = 0) uniform buf {
+ float qt_Opacity; // inherited opacity of this item
+};
+
+
+void main() {
+ vec4 p = texture(source, qt_TexCoord0);
+ lowp float g = dot(p.xyz, vec3(0.344, 0.5, 0.156));
+ fragColor = vec4(g, g, g, p.a) * qt_Opacity;
+}
diff --git a/tests/auto/quickcontrols/controls/data/combobox/shader.frag.qsb b/tests/auto/quickcontrols/controls/data/combobox/shader.frag.qsb
new file mode 100644
index 0000000000..b86ce9a76e
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/data/combobox/shader.frag.qsb
Binary files differ
diff --git a/tests/auto/quickcontrols/controls/data/tst_abstractbutton.qml b/tests/auto/quickcontrols/controls/data/tst_abstractbutton.qml
index 822c703a42..bce13b37f2 100644
--- a/tests/auto/quickcontrols/controls/data/tst_abstractbutton.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_abstractbutton.qml
@@ -42,6 +42,45 @@ TestCase {
SignalSpy { }
}
+ property var expectedPressSignals: [
+ ["activeFocusChanged", { "activeFocus": true }],
+ ["pressedChanged", { "pressed": true }],
+ ["downChanged", { "down": true }],
+ "pressed"
+ ]
+
+ property var expectedReleaseSignals: [
+ ["pressedChanged", { "pressed": false }],
+ ["downChanged", { "down": false }],
+ "released",
+ "clicked"
+ ]
+
+ property var expectedClickSignals
+
+ property var expectedCheckableClickSignals: [
+ ["activeFocusChanged", { "activeFocus": true }],
+ ["pressedChanged", { "pressed": true }],
+ ["downChanged", { "down": true }],
+ "pressed",
+ ["pressedChanged", { "pressed": false }],
+ ["downChanged", { "down": false }],
+ ["checkedChanged", { "checked": true }],
+ "toggled",
+ "released",
+ "clicked"
+ ]
+
+ function initTestCase() {
+ // AbstractButton has TabFocus on macOS, not StrongFocus.
+ if (Qt.platform.os === "osx") {
+ expectedPressSignals.splice(0, 1)
+ expectedCheckableClickSignals.splice(0, 1)
+ }
+
+ expectedClickSignals = [...expectedPressSignals, ...expectedReleaseSignals]
+ }
+
function init() {
failOnWarning(/.?/)
}
@@ -1004,4 +1043,137 @@ TestCase {
compare(releasedSpy.count, 0)
compare(clickedSpy.count, 0)
}
+
+ Component {
+ id: signalSequenceSpy
+ SignalSequenceSpy {
+ // List all signals, even ones we might not be interested in for a particular test,
+ // so that it can catch unwanted ones and fail the test.
+ signals: ["pressed", "released", "canceled", "clicked", "toggled", "doubleClicked",
+ "pressedChanged", "downChanged", "checkedChanged", "activeFocusChanged"]
+ }
+ }
+
+ function test_click() {
+ let control = createTemporaryObject(button, testCase)
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedClickSignals
+ control.click()
+ verify(sequenceSpy.success)
+ }
+
+ function test_clickCheckableButton() {
+ let control = createTemporaryObject(button, testCase, { checkable: true })
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedCheckableClickSignals
+ control.click()
+ verify(sequenceSpy.success)
+ }
+
+ function test_animateClick() {
+ let control = createTemporaryObject(button, testCase)
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedClickSignals
+ control.animateClick()
+ tryVerify(() => { return sequenceSpy.success }, 1000)
+ }
+
+ function test_animateClickCheckableButton() {
+ let control = createTemporaryObject(button, testCase, { checkable: true })
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedCheckableClickSignals
+ control.animateClick()
+ tryVerify(() => { return sequenceSpy.success }, 1000)
+ }
+
+ function test_animateClickTwice() {
+ let control = createTemporaryObject(button, testCase)
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedPressSignals
+ // Check that calling it again before it finishes works as expected.
+ control.animateClick()
+ verify(sequenceSpy.success)
+ // Let the timer progress a bit.
+ wait(0)
+ sequenceSpy.expectedSequence = testCase.expectedReleaseSignals
+ control.animateClick()
+ tryVerify(() => { return sequenceSpy.success }, 1000)
+ }
+
+ function test_clickOnDisabledButton() {
+ let control = createTemporaryObject(button, testCase, { enabled: false })
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = []
+ control.click()
+ verify(sequenceSpy.success)
+ }
+
+ function test_animateClickOnDisabledButton() {
+ let control = createTemporaryObject(button, testCase, { enabled: false })
+ verify(control)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = []
+ control.animateClick()
+ verify(sequenceSpy.success)
+ }
+
+ Component {
+ id: destroyOnPressButtonComponent
+
+ AbstractButton {
+ width: 100
+ height: 50
+
+ onPressed: destroy(this)
+ }
+ }
+
+ function test_clickDestroyOnPress() {
+ let control = createTemporaryObject(destroyOnPressButtonComponent, testCase)
+ verify(control)
+
+ // Parent it to the testCase, otherwise it will be destroyed when the control is.
+ let destructionSpy = createTemporaryObject(signalSpy, testCase,
+ { target: control.Component, signalName: "destruction" })
+ verify(destructionSpy.valid)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedClickSignals
+ // Shouldn't crash, etc. Note that destroy() isn't synchronous, and so
+ // the destruction will happen after the release.
+ control.click()
+ verify(sequenceSpy.success)
+ tryCompare(destructionSpy, "count", 1)
+ }
+
+ function test_animateClickDestroyOnPress() {
+ let control = createTemporaryObject(destroyOnPressButtonComponent, testCase)
+ verify(control)
+
+ // Parent it to the testCase, otherwise it will be destroyed when the control is.
+ let destructionSpy = createTemporaryObject(signalSpy, testCase,
+ { target: control.Component, signalName: "destruction" })
+ verify(destructionSpy.valid)
+
+ let sequenceSpy = signalSequenceSpy.createObject(control, { target: control })
+ sequenceSpy.expectedSequence = testCase.expectedPressSignals
+ // Shouldn't crash, etc. Note that destroy() isn't synchronous, but it is processed
+ // on the next frame, so should always come before the release's 100 ms delay.
+ control.animateClick()
+ verify(sequenceSpy.success)
+ tryCompare(destructionSpy, "count", 1)
+ }
}
diff --git a/tests/auto/quickcontrols/controls/data/tst_combobox.qml b/tests/auto/quickcontrols/controls/data/tst_combobox.qml
index 9f852e29e4..3027d70440 100644
--- a/tests/auto/quickcontrols/controls/data/tst_combobox.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_combobox.qml
@@ -5,6 +5,7 @@ import QtQuick
import QtQuick.Window
import QtTest
import QtQuick.Controls
+import Qt.test.controls
import QtQuick.NativeStyle as NativeStyle
TestCase {
@@ -74,16 +75,7 @@ TestCase {
objectName: "ShaderFX"
width: rect.width
height: rect.height
- fragmentShader: "
- uniform lowp sampler2D source; // this item
- uniform lowp float qt_Opacity; // inherited opacity of this item
- varying highp vec2 qt_TexCoord0;
- void main() {
- lowp vec4 p = texture2D(source, qt_TexCoord0);
- lowp float g = dot(p.xyz, vec3(0.344, 0.5, 0.156));
- gl_FragColor = vec4(g, g, g, p.a) * qt_Opacity;
- }"
-
+ fragmentShader: "combobox/shader.frag.qsb"
}
}
}
@@ -878,22 +870,27 @@ TestCase {
// Account for when a transition of a scale from 0.9-1.0 that it is placed above right away and not below
// first just because there is room at the 0.9 scale
if (control.popup.enter !== null) {
- // hide
- mouseClick(control)
- compare(control.pressed, false)
- tryCompare(control.popup, "visible", false)
- control.y = control.Window.height - (control.popup.contentItem.height * 0.99)
- var popupYSpy = createTemporaryObject(signalSpy, testCase, {target: control.popup, signalName: "yChanged"})
- verify(popupYSpy.valid)
- mousePress(control)
- compare(control.pressed, true)
- compare(control.popup.visible, false)
- mouseRelease(control)
- compare(control.pressed, false)
- compare(control.popup.visible, true)
- tryCompare(control.popup.enter, "running", false)
- verify(control.popup.contentItem.y < control.y)
- verify(popupYSpy.count === 1)
+ // test only if there is a scale animation
+ let scaleAnimation = control.popup.enter.animations.some((animation) => {
+ return (animation instanceof PropertyAnimation && animation.property === "scale")
+ });
+ if (scaleAnimation) {
+ // hide
+ mouseClick(control)
+ compare(control.pressed, false)
+ tryCompare(control.popup, "visible", false)
+ control.y = control.Window.height - (control.popup.contentItem.height * 0.99)
+ var popupYSpy = createTemporaryObject(signalSpy, testCase, {target: control.popup, signalName: "yChanged"})
+ verify(popupYSpy.valid)
+ mousePress(control)
+ compare(control.pressed, true)
+ compare(control.popup.visible, false)
+ mouseRelease(control)
+ compare(control.pressed, false)
+ tryCompare(control.popup, "opened", true)
+ verify(control.popup.contentItem.y < control.y)
+ verify(popupYSpy.count === 1)
+ }
}
var leftLayoutMargin = control.background.layoutMargins === undefined ? 0 : control.popup.layoutMargins.left
@@ -949,7 +946,8 @@ TestCase {
// Check on the second opening that it has the same y position as before
if (i !== 0) {
// y should not have changed again
- verify(popupYSpy.count === 0)
+ if (StyleInfo.styleName !== "FluentWinUI3") // the popup y in FluentWinUI3 depends on the implicitHeight
+ verify(popupYSpy.count === 0)
verify(y === control.innerCombo.popup.y)
} else {
// In some cases on the initial show, y changes more than once
@@ -1024,6 +1022,7 @@ TestCase {
compare(activatedSpy.count, 0)
compare(highlightedSpy.count, 0)
compare(control.popup.visible, true)
+ tryCompare(control.popup, "opened", true)
// press - move - release inside - activated - closed
touch.press(0, content).commit()
@@ -1787,7 +1786,7 @@ TestCase {
// Ensure that it's open so that the popup's implicitHeight changes when we increase the model count.
control.popup.open()
- tryCompare(control.popup, "visible", true)
+ tryCompare(control.popup, "opened", true)
// Add lots of items to the model. The popup should take up the entire height of the window.
control.model = 100
@@ -1799,6 +1798,8 @@ TestCase {
control.model = 0
control.popup.open()
tryCompare(control.popup, "visible", true)
+ if (control.popup.enter !== null)
+ tryCompare(control.popup.enter, "running", false)
compare(control.popup.height, control.popup.topPadding + control.popup.bottomPadding)
}
@@ -2004,11 +2005,16 @@ TestCase {
compare(currentIndexSpy.count, 1)
}
+ readonly property font testFont: ({
+ family: "Arial",
+ pixelSize: 12
+ })
+
Component {
- id: appFontTextFieldComponent
+ id: fixedFontTextFieldComponent
TextField {
objectName: "appFontTextField"
- font: Qt.application.font
+ font: testCase.testFont
// We don't want the background's implicit width to interfere with our tests,
// which are about implicit width of the contentItem of ComboBox, which is by default TextField.
background: null
@@ -2016,14 +2022,14 @@ TestCase {
}
Component {
- id: appFontContentItemComboBoxComponent
+ id: fixedFontContentItemComboBoxComponent
ComboBox {
// Override the contentItem so that the font doesn't vary between styles.
contentItem: TextField {
objectName: "appFontContentItemTextField"
// We do this just to be extra sure that the font never comes from the control,
- // as we want it to match that of the TextField in the appFontTextFieldComponent.
- font: Qt.application.font
+ // as we want it to match that of the TextField in the fixedFontTextFieldComponent.
+ font: testCase.testFont
background: null
}
}
@@ -2077,14 +2083,14 @@ TestCase {
function test_implicitContentWidthPolicy_ContentItemImplicitWidth() {
// Set ContentItemImplicitWidth and ensure that implicitContentWidth is as wide as the current item
// by comparing it against the implicitWidth of an identical TextField
- let control = createTemporaryObject(appFontContentItemComboBoxComponent, testCase, {
+ let control = createTemporaryObject(fixedFontContentItemComboBoxComponent, testCase, {
model: ["Short", "Kinda long"],
implicitContentWidthPolicy: ComboBox.ContentItemImplicitWidth
})
verify(control)
compare(control.implicitContentWidthPolicy, ComboBox.ContentItemImplicitWidth)
- let textField = createTemporaryObject(appFontTextFieldComponent, testCase)
+ let textField = createTemporaryObject(fixedFontTextFieldComponent, testCase)
verify(textField)
// Don't set any text on textField because we're not accounting for the widest
// text here, so we want to compare it against an empty TextField.
@@ -2103,14 +2109,14 @@ TestCase {
}
function test_implicitContentWidthPolicy_WidestText(data) {
- let control = createTemporaryObject(appFontContentItemComboBoxComponent, testCase, {
+ let control = createTemporaryObject(fixedFontContentItemComboBoxComponent, testCase, {
model: data.model,
implicitContentWidthPolicy: ComboBox.WidestText
})
verify(control)
compare(control.implicitContentWidthPolicy, ComboBox.WidestText)
- let textField = createTemporaryObject(appFontTextFieldComponent, testCase)
+ let textField = createTemporaryObject(fixedFontTextFieldComponent, testCase)
verify(textField)
textField.text = "Kinda long"
// Note that we don't need to change the current index here, as the implicitContentWidth
@@ -2137,7 +2143,7 @@ TestCase {
// Changes in font should result in the implicitContentWidth being updated.
textField.font.pixelSize *= 2
// We have to change the contentItem's font size manually since we break the
- // style's binding to the control's font when we set Qt.application.font to it.
+ // style's binding to the control's font when we set the fixed font on it.
control.contentItem.font.pixelSize *= 2
control.font.pixelSize *= 2
compare(Math.ceil(control.implicitContentWidth), Math.ceil(textField.implicitWidth))
@@ -2148,14 +2154,14 @@ TestCase {
}
function test_implicitContentWidthPolicy_WidestTextWhenCompleted(data) {
- let control = createTemporaryObject(appFontContentItemComboBoxComponent, testCase, {
+ let control = createTemporaryObject(fixedFontContentItemComboBoxComponent, testCase, {
model: data.model,
implicitContentWidthPolicy: ComboBox.WidestTextWhenCompleted
})
verify(control)
compare(control.implicitContentWidthPolicy, ComboBox.WidestTextWhenCompleted)
- let textField = createTemporaryObject(appFontTextFieldComponent, testCase)
+ let textField = createTemporaryObject(fixedFontTextFieldComponent, testCase)
verify(textField)
textField.text = "Kinda long"
compare(Math.ceil(control.implicitContentWidth), Math.ceil(textField.implicitWidth))
diff --git a/tests/auto/quickcontrols/controls/data/tst_selectionrectangle.qml b/tests/auto/quickcontrols/controls/data/tst_selectionrectangle.qml
index 879e8c68d4..79a51bd4c3 100644
--- a/tests/auto/quickcontrols/controls/data/tst_selectionrectangle.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_selectionrectangle.qml
@@ -73,6 +73,22 @@ TestCase {
}
Component {
+ id: delegateWithTapHandlerComp
+ Rectangle {
+ implicitWidth: 100
+ implicitHeight: 50
+ color: selected ? "lightblue" : "transparent"
+ border.width: 1
+ required property bool selected
+
+ TapHandler {
+ // This tap handler will block the tap handler in
+ // QQuickTableView from being called.
+ }
+ }
+ }
+
+ Component {
id: tableviewComp
TableView {
id: tableView
@@ -574,6 +590,43 @@ TestCase {
verify(!bottomRightHandle.visible)
}
+ function test_delegateWithTapHandler() {
+ // Check that we clear the current selection if you start a new
+ // mouse drag selection on top of a delegate with a tap handler.
+ let tableView = createTemporaryObject(tableviewComp, testCase)
+ verify(tableView)
+
+ tableView.delegate = delegateWithTapHandlerComp;
+ let selectionRectangle = tableView.selectionRectangle
+ verify(selectionRectangle)
+
+ selectionRectangle.selectionMode = SelectionRectangle.Drag
+ tableView.selectionMode = TableView.ExtendedSelection
+
+ verify(waitForItemPolished(tableView))
+
+ let item0_0 = tableView.itemAtIndex(tableView.index(0, 0))
+ let item1_1 = tableView.itemAtIndex(tableView.index(1, 1))
+ verify(item0_0)
+ verify(item1_1)
+
+ tableView.selectionModel.select(tableView.index(0, 0), ItemSelectionModel.Select)
+ compare(tableView.selectionModel.selectedIndexes.length, 1)
+ compare(tableView.selectionModel.selectedIndexes[0], tableView.index(0, 0))
+
+ // A drag should clear the current selection and select a new cell
+ mouseDrag(tableView.contentItem, item1_1.x, item1_1.y, 10, 10, Qt.LeftButton)
+ compare(tableView.selectionModel.selectedIndexes.length, 1)
+ compare(tableView.selectionModel.selectedIndexes[0], tableView.index(1, 1))
+
+ // Verify that a PressAndHold works as well
+ selectionRectangle.selectionMode = SelectionRectangle.PressAndHold
+ mousePress(tableView, item0_0.x, item0_0.y, Qt.LeftButton)
+ mouseRelease(tableView, item0_0.x, item0_0.y, Qt.LeftButton, Qt.NoModifier, 2000)
+ compare(tableView.selectionModel.selectedIndexes.length, 1)
+ compare(tableView.selectionModel.selectedIndexes[0], tableView.index(0, 0))
+ }
+
// TODO: enable this test when mouseDrag sends modifiers for all mouse events
// (including mouseMove)
// function test_multi_selection() {
diff --git a/tests/auto/quickcontrols/controls/data/tst_splitview.qml b/tests/auto/quickcontrols/controls/data/tst_splitview.qml
index 3bcf9a53c6..aed303689a 100644
--- a/tests/auto/quickcontrols/controls/data/tst_splitview.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_splitview.qml
@@ -74,20 +74,19 @@ TestCase {
// Note that the indices mentioned here account for handles; they do not
// match the indices reported by QQuickSplitView's logging categories.
compare(item.x, expectedGeometry.x, "Mismatch in actual vs expected x value of "
- + itemType + " at index " + typeSpecificIndex + context)
+ + itemType + " " + item + " at index " + typeSpecificIndex + context)
compare(item.y, expectedGeometry.y, "Mismatch in actual vs expected y value of "
- + itemType + " at index " + typeSpecificIndex + context)
+ + itemType + " " + item + " at index " + typeSpecificIndex + context)
compare(item.width, expectedGeometry.width, "Mismatch in actual vs expected width value of "
- + itemType + " at index " + typeSpecificIndex + context)
+ + itemType + " " + item + " at index " + typeSpecificIndex + context)
compare(item.height, expectedGeometry.height, "Mismatch in actual vs expected height value of "
- + itemType + " at index " + typeSpecificIndex + context)
+ + itemType + " " + item + " at index " + typeSpecificIndex + context)
}
}
property real defaultHorizontalHandleWidth: 10
property real defaultVerticalHandleHeight: 10
-
Component {
id: signalSpyComponent
SignalSpy {}
@@ -96,14 +95,14 @@ TestCase {
Component {
id: handleComponent
Rectangle {
- objectName: "handle"
+ objectName: `handle ${x},${y} ${width}x${height} visible: ${visible}`
implicitWidth: defaultHorizontalHandleWidth
implicitHeight: defaultVerticalHandleHeight
color: "#444"
Text {
- objectName: "handleText_" + text
- text: parent.x + "," + parent.y + " " + parent.width + "x" + parent.height
+ objectName: text + "_Text"
+ text: parent.objectName
color: "white"
anchors.centerIn: parent
rotation: 90
@@ -2678,4 +2677,88 @@ TestCase {
verify(!firstHandle.SplitHandle.pressed)
compare(firstItem.width, 125)
}
+
+ Component {
+ id: hiddenItemComponent
+
+ SplitView {
+ anchors.fill: parent
+ handle: handleComponent
+ orientation: Qt.Horizontal
+
+ component SplitItem: Rectangle {
+ objectName: labelText
+
+ SplitView.preferredWidth: 50
+ SplitView.fillHeight: true
+
+ required property string labelText
+
+ Text {
+ anchors.fill: parent
+ wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: `${parent.labelText} - width: ${parent.width.toFixed(2)}`
+ }
+ }
+
+ SplitItem {
+ color: "blue"
+ labelText: "View 1"
+ }
+ SplitItem {
+ color: "red"
+ labelText: "View 2 (hidden)"
+ visible: false
+ }
+ SplitItem {
+ color: "purple"
+ labelText: "View 3"
+ }
+ SplitItem {
+ color: "yellow"
+ labelText: "View 4"
+ }
+ }
+ }
+
+ function test_resizeHiddenItem() {
+ let control = createTemporaryObject(hiddenItemComponent, testCase)
+ verify(control)
+
+ const standardItemWidth = 50
+ let expectedGeometries = [
+ // First item.
+ { x: 0, y: 0, width: standardItemWidth, height: control.height },
+ // First handle.
+ { x: standardItemWidth, y: 0, width: defaultHorizontalHandleWidth, height: control.height },
+ // The second item and its handle are hidden.
+ { hidden: true },
+ { hidden: true },
+ // Third item.
+ { x: standardItemWidth + defaultHorizontalHandleWidth, y: 0, width: standardItemWidth, height: control.height },
+ // Third handle.
+ { x: (standardItemWidth * 2) + defaultHorizontalHandleWidth, y: 0, width: defaultHorizontalHandleWidth, height: control.height },
+ // Fourth item.
+ { x: (standardItemWidth * 2) + (defaultHorizontalHandleWidth * 2), y: 0,
+ width: control.width - (standardItemWidth * 2) - (defaultHorizontalHandleWidth * 2), height: control.height }
+ ]
+ compareSizes(control, expectedGeometries, "before dragging handle")
+
+ // Drag the third handle to the right.
+ let handles = findHandles(control)
+ let thirdHandle = handles[2]
+ // The third (index 4 here) item should get one pixel bigger, and the fourth one pixel smaller.
+ ++expectedGeometries[4].width
+ ++expectedGeometries[5].x // handle
+ ++expectedGeometries[6].x
+ --expectedGeometries[6].width
+ // Use individual events rather than mouseDrag because that will move it past the drag threshold,
+ // which we don't want, since we only want to move by 1 pixel.
+ mousePress(thirdHandle)
+ mouseMove(thirdHandle, thirdHandle.width / 2 + 1, thirdHandle.height / 2, 16)
+ mouseRelease(thirdHandle)
+ compareSizes(control, expectedGeometries, "after dragging handle")
+ }
}
diff --git a/tests/auto/quickcontrols/controls/data/tst_tabbar.qml b/tests/auto/quickcontrols/controls/data/tst_tabbar.qml
index f4b8d170ce..19ba2a9678 100644
--- a/tests/auto/quickcontrols/controls/data/tst_tabbar.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_tabbar.qml
@@ -20,7 +20,12 @@ TestCase {
Component {
id: tabBar
- TabBar { }
+ TabBar {
+ topPadding: 0
+ bottomPadding: 0
+ leftPadding: 0
+ rightPadding: 0
+ }
}
Component {
@@ -533,7 +538,8 @@ TestCase {
compare(control.implicitWidth, control.contentWidth + control.leftPadding + control.rightPadding)
compare(control.implicitHeight, control.contentHeight + control.topPadding + control.bottomPadding)
- let expectedWidth = tab3.contentItem.implicitWidth + tab3.leftPadding + tab3.rightPadding
+ let expectedWidth = Math.max(tab3.implicitBackgroundWidth + tab3.leftInset + tab3.rightInset,
+ tab3.implicitContentWidth + tab3.leftPadding + tab3.rightPadding)
tab3.width = tab3.implicitWidth
tab3.height = tab3.implicitHeight
tryCompare(tab1, "width", (control.width - 2 * data.spacing - expectedWidth) / 2)
diff --git a/tests/auto/quickcontrols/controls/data/tst_tumbler.qml b/tests/auto/quickcontrols/controls/data/tst_tumbler.qml
index c5c567b7d2..3033dc756a 100644
--- a/tests/auto/quickcontrols/controls/data/tst_tumbler.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_tumbler.qml
@@ -60,8 +60,8 @@ TestCase {
// visualItemIndex is from 0 to the amount of visible items.
function itemCenterPos(visualItemIndex) {
- var halfDelegateHeight = tumblerDelegateHeight / 2;
- var yCenter = tumbler.y + tumbler.topPadding + halfDelegateHeight
+ let halfDelegateHeight = tumblerDelegateHeight / 2;
+ let yCenter = tumbler.y + tumbler.topPadding + halfDelegateHeight
+ (tumblerDelegateHeight * visualItemIndex);
return Qt.point(tumblerXCenter(), yCenter);
}
@@ -71,22 +71,22 @@ TestCase {
}
function checkItemSizes() {
- var contentChildren = tumbler.wrap ? tumblerView.children : tumblerView.contentItem.children;
+ let contentChildren = tumbler.wrap ? tumblerView.children : tumblerView.contentItem.children;
verify(contentChildren.length >= tumbler.count);
- for (var i = 0; i < contentChildren.length; ++i) {
+ for (let i = 0; i < contentChildren.length; ++i) {
compare(contentChildren[i].width, tumbler.availableWidth);
compare(contentChildren[i].height, tumblerDelegateHeight);
}
}
function findView(parent) {
- for (var i = 0; i < parent.children.length; ++i) {
- var child = parent.children[i];
+ for (let i = 0; i < parent.children.length; ++i) {
+ let child = parent.children[i];
if (child.hasOwnProperty("currentIndex")) {
return child;
}
- var grandChild = findView(child);
+ let grandChild = findView(child);
if (grandChild)
return grandChild;
}
@@ -95,13 +95,13 @@ TestCase {
}
function findDelegateWithText(parent, text) {
- for (var i = 0; i < parent.children.length; ++i) {
- var child = parent.children[i];
+ for (let i = 0; i < parent.children.length; ++i) {
+ let child = parent.children[i];
if (child.hasOwnProperty("text") && child.text === text) {
return child;
}
- var grandChild = findDelegateWithText(child, text);
+ let grandChild = findDelegateWithText(child, text);
if (grandChild)
return grandChild;
}
@@ -113,9 +113,11 @@ TestCase {
text: modelData
}
- function test_defaults() {
+ function init() {
failOnWarning(/.?/)
+ }
+ function test_defaults() {
let control = createTemporaryObject(defaultTumbler, testCase)
verify(control)
}
@@ -144,7 +146,7 @@ TestCase {
waitForRendering(tumbler);
// Set it through user interaction.
- var pos = Qt.point(tumblerXCenter(), tumbler.height / 2);
+ let pos = Qt.point(tumblerXCenter(), tumbler.height / 2);
mouseDrag(tumbler, pos.x, pos.y, 0, tumbler.height / 3, Qt.LeftButton, Qt.NoModifier, 200);
tryCompare(tumblerView, "offset", 1);
compare(tumbler.currentIndex, 4);
@@ -283,7 +285,7 @@ TestCase {
tumblerView.highlightMoveDuration = 0;
// Navigate upwards through entire wheel.
- for (var j = 0; j < tumbler.count - 1; ++j) {
+ for (let j = 0; j < tumbler.count - 1; ++j) {
keyClick(Qt.Key_Up, Qt.NoModifier);
tryCompare(tumblerView, "offset", j + 1);
compare(tumbler.currentIndex, tumbler.count - 1 - j);
@@ -294,7 +296,7 @@ TestCase {
compare(tumbler.currentIndex, 0);
// Navigate downwards through entire wheel.
- for (j = 0; j < tumbler.count - 1; ++j) {
+ for (let j = 0; j < tumbler.count - 1; ++j) {
keyClick(Qt.Key_Down, Qt.NoModifier);
tryCompare(tumblerView, "offset", tumbler.count - 1 - j);
compare(tumbler.currentIndex, j + 1);
@@ -314,9 +316,9 @@ TestCase {
checkItemSizes();
wait(tumblerView.highlightMoveDuration);
- var firstItemCenterPos = itemCenterPos(1);
- var firstItem = tumblerView.itemAt(firstItemCenterPos.x, firstItemCenterPos.y);
- var actualPos = testCase.mapFromItem(firstItem, 0, 0);
+ let firstItemCenterPos = itemCenterPos(1);
+ let firstItem = tumblerView.itemAt(firstItemCenterPos.x, firstItemCenterPos.y);
+ let actualPos = testCase.mapFromItem(firstItem, 0, 0);
compare(actualPos.x, tumbler.leftPadding);
compare(actualPos.y, tumbler.topPadding + 40);
@@ -332,13 +334,13 @@ TestCase {
fuzzyCompare(actualPos.x, tumbler.leftPadding, 0.0001);
fuzzyCompare(actualPos.y, tumbler.topPadding, 0.0001);
- var secondItemCenterPos = itemCenterPos(1);
- var secondItem = tumblerView.itemAt(secondItemCenterPos.x, secondItemCenterPos.y);
+ let secondItemCenterPos = itemCenterPos(1);
+ let secondItem = tumblerView.itemAt(secondItemCenterPos.x, secondItemCenterPos.y);
verify(secondItem);
verify(firstItem.y < secondItem.y);
- var thirdItemCenterPos = itemCenterPos(2);
- var thirdItem = tumblerView.itemAt(thirdItemCenterPos.x, thirdItemCenterPos.y);
+ let thirdItemCenterPos = itemCenterPos(2);
+ let thirdItem = tumblerView.itemAt(thirdItemCenterPos.x, thirdItemCenterPos.y);
verify(thirdItem);
verify(firstItem.y < thirdItem.y);
verify(secondItem.y < thirdItem.y);
@@ -348,7 +350,7 @@ TestCase {
tumbler = createTemporaryObject(tumblerComponent, testCase);
verify(tumbler);
- var mouseArea = createTemporaryQmlObject(
+ let mouseArea = createTemporaryQmlObject(
"import QtQuick; TextInput { activeFocusOnTab: true; width: 50; height: 50 }", testCase, "");
tumbler.forceActiveFocus();
@@ -360,7 +362,7 @@ TestCase {
}
function test_datePicker() {
- var component = Qt.createComponent("TumblerDatePicker.qml");
+ let component = Qt.createComponent("TumblerDatePicker.qml");
compare(component.status, Component.Ready, component.errorString());
tumbler = createTemporaryObject(component, testCase);
// Should not be any warnings.
@@ -422,7 +424,7 @@ TestCase {
}
function test_listViewTimePicker() {
- var root = createTemporaryObject(timePickerComponent, testCase);
+ let root = createTemporaryObject(timePickerComponent, testCase);
verify(root);
mouseDrag(root.minuteTumbler, root.minuteTumbler.width / 2, root.minuteTumbler.height / 2, 0, 50);
@@ -431,7 +433,7 @@ TestCase {
}
function test_displacement_data() {
- var data = [
+ let data = [
// At 0 offset, the first item is current.
{ count: 6, index: 0, offset: 0, expectedDisplacement: 0 },
{ count: 6, index: 1, offset: 0, expectedDisplacement: -1 },
@@ -462,8 +464,8 @@ TestCase {
// count == 1
{ count: 1, index: 0, offset: 0, expectedDisplacement: 0 }
];
- for (var i = 0; i < data.length; ++i) {
- var row = data[i];
+ for (let i = 0; i < data.length; ++i) {
+ let row = data[i];
row.tag = "count=" + row.count
+ " delegate" + row.index
+ " offset=" + row.offset
@@ -498,7 +500,7 @@ TestCase {
tumbler.model = data.count;
compare(tumbler.count, data.count);
- var delegate = findChild(tumblerView, "delegate" + data.index);
+ let delegate = findChild(tumblerView, "delegate" + data.index);
verify(delegate);
tumblerView.offset = data.offset;
@@ -555,7 +557,7 @@ TestCase {
function test_explicitlyNonwrapping() {
// Check that explicitly setting wrap to false works even when it was implicitly false.
- var explicitlyNonWrapping = createTemporaryObject(twoItemTumbler, testCase);
+ let explicitlyNonWrapping = createTemporaryObject(twoItemTumbler, testCase);
verify(explicitlyNonWrapping);
tryCompare(explicitlyNonWrapping, "wrap", false);
@@ -572,7 +574,7 @@ TestCase {
function test_explicitlyWrapping() {
// Check that explicitly setting wrap to true works even when it was implicitly true.
- var explicitlyWrapping = createTemporaryObject(tenItemTumbler, testCase);
+ let explicitlyWrapping = createTemporaryObject(tenItemTumbler, testCase);
verify(explicitlyWrapping);
compare(explicitlyWrapping.wrap, true);
@@ -644,14 +646,14 @@ TestCase {
}
function test_customContentItemAtConstruction(data) {
- var tumbler = createTemporaryObject(data.component, testCase);
+ let tumbler = createTemporaryObject(data.component, testCase);
// Shouldn't assert.
tumbler.model = 5;
compare(tumbler.count, 5);
tumbler.currentIndex = 2;
- var tumblerView = findView(tumbler);
+ let tumblerView = findView(tumbler);
compare(tumblerView.currentIndex, 2);
tumblerView.incrementCurrentIndex();
@@ -666,10 +668,10 @@ TestCase {
}
function findFirstDelegateWithText(view, text) {
- var delegate = null;
- var contentItem = view.hasOwnProperty("contentItem") ? view.contentItem : view;
- for (var i = 0; i < contentItem.children.length && !delegate; ++i) {
- var child = contentItem.children[i];
+ let delegate = null;
+ let contentItem = view.hasOwnProperty("contentItem") ? view.contentItem : view;
+ for (let i = 0; i < contentItem.children.length && !delegate; ++i) {
+ let child = contentItem.children[i];
if (child.hasOwnProperty("text") && child.text === text)
delegate = child;
}
@@ -692,16 +694,16 @@ TestCase {
tumbler.currentIndex = 2;
compare(tumblerView.currentIndex, 2);
- var contentItemComponent = Qt.createComponent(data.componentPath);
+ let contentItemComponent = Qt.createComponent(data.componentPath);
compare(contentItemComponent.status, Component.Ready);
- var customContentItem = createTemporaryObject(contentItemComponent, tumbler);
+ let customContentItem = createTemporaryObject(contentItemComponent, tumbler);
tumbler.contentItem = customContentItem;
compare(tumbler.count, 5);
tumblerView = findView(tumbler);
compare(tumblerView.currentIndex, 2);
- var delegate = findFirstDelegateWithText(tumblerView, "Custom2");
+ let delegate = findFirstDelegateWithText(tumblerView, "Custom2");
verify(delegate);
compare(delegate.height, defaultImplicitDelegateHeight);
tryCompare(delegate.Tumbler, "displacement", 0);
@@ -712,9 +714,9 @@ TestCase {
}
function test_displacementListView_data() {
- var offset = defaultListViewTumblerOffset;
+ let offset = defaultListViewTumblerOffset;
- var data = [
+ let data = [
// At 0 contentY, the first item is current.
{ contentY: offset, expectedDisplacements: [
{ index: 0, displacement: 0 },
@@ -741,8 +743,8 @@ TestCase {
{ index: 4, displacement: -0.5 } ]
}
];
- for (var i = 0; i < data.length; ++i) {
- var row = data[i];
+ for (let i = 0; i < data.length; ++i) {
+ let row = data[i];
row.tag = "contentY=" + row.contentY;
}
return data;
@@ -758,9 +760,9 @@ TestCase {
// Ensure assumptions about the tumbler used in our data() function are correct.
tumblerView = findView(tumbler);
compare(tumblerView.contentY, -defaultImplicitDelegateHeight);
- var delegateCount = 0;
- var listView = tumblerView;
- var listViewContentItem = tumblerView.contentItem;
+ let delegateCount = 0;
+ let listView = tumblerView;
+ let listViewContentItem = tumblerView.contentItem;
// We use the mouse instead of setting contentY directly, otherwise the
// items snap back into place. This doesn't seem to be an issue for
@@ -779,25 +781,25 @@ TestCase {
// to begin with, nothing changes (the displacement was always very close to 0 in the end).
// Ensure that we at least cover the distance required to reach the desired contentY.
- var distanceToReachContentY = data.contentY - defaultListViewTumblerOffset;
- var distance = Math.abs(distanceToReachContentY) + tumbler.height / 2;
+ let distanceToReachContentY = data.contentY - defaultListViewTumblerOffset;
+ let distance = Math.abs(distanceToReachContentY) + tumbler.height / 2;
// If distanceToReachContentY is 0, we're testing 0 displacement, so we don't need to do anything.
if (distanceToReachContentY != 0) {
mousePress(tumbler, tumblerXCenter(), tumblerYCenter());
- var dragDirection = distanceToReachContentY > 0 ? -1 : 1;
- for (var i = 0; i < distance && Math.floor(listView.contentY) !== Math.floor(data.contentY); ++i) {
+ let dragDirection = distanceToReachContentY > 0 ? -1 : 1;
+ for (let i = 0; i < distance && Math.floor(listView.contentY) !== Math.floor(data.contentY); ++i) {
mouseMove(tumbler, tumblerXCenter(), tumblerYCenter() + i * dragDirection);
wait(1); // because Flickable pays attention to velocity, we need some time between movements (qtdeclarative ebf07c3)
}
}
- for (var i = 0; i < data.expectedDisplacements.length; ++i) {
- var delegate = findChild(listViewContentItem, "delegate" + data.expectedDisplacements[i].index);
+ for (let i = 0; i < data.expectedDisplacements.length; ++i) {
+ let delegate = findChild(listViewContentItem, "delegate" + data.expectedDisplacements[i].index);
verify(delegate);
compare(delegate.height, defaultImplicitDelegateHeight);
// Due to the way we must perform this test, we can't expect high precision.
- var expectedDisplacement = data.expectedDisplacements[i].displacement;
+ let expectedDisplacement = data.expectedDisplacements[i].displacement;
fuzzyCompare(delegate.displacement, expectedDisplacement, 0.1,
"Delegate of ListView-based Tumbler at index " + data.expectedDisplacements[i].index
+ " has displacement of " + delegate.displacement + " when it should be " + expectedDisplacement);
@@ -810,10 +812,10 @@ TestCase {
function test_listViewFlickAboveBounds_data() {
// Tests that flicking above the bounds when already at the top of the
// tumbler doesn't result in an incorrect displacement.
- var data = [];
+ let data = [];
// Less than two items doesn't make sense. The default visibleItemCount
// is 3, so we test a bit more than double that.
- for (var i = 2; i <= 7; ++i) {
+ for (let i = 2; i <= 7; ++i) {
data.push({ tag: i + " items", model: i });
}
return data;
@@ -830,21 +832,21 @@ TestCase {
mousePress(tumbler, tumblerXCenter(), tumblerYCenter());
// Ensure it's stationary.
- var listView = tumblerView;
+ let listView = tumblerView;
compare(listView.contentY, defaultListViewTumblerOffset);
// We could just move up until the contentY changed, but this is safer.
- var distance = tumbler.height;
- var changed = false;
+ let distance = tumbler.height;
+ let changed = false;
- for (var i = 0; i < distance && !changed; ++i) {
+ for (let i = 0; i < distance && !changed; ++i) {
mouseMove(tumbler, tumblerXCenter(), tumblerYCenter() + i, 10);
// Don't test until the contentY has actually changed.
if (Math.abs(listView.contentY) - listView.preferredHighlightBegin > 0.01) {
- for (var delegateIndex = 0; delegateIndex < Math.min(tumbler.count, tumbler.visibleItemCount); ++delegateIndex) {
- var delegate = findChild(listView.contentItem, "delegate" + delegateIndex);
+ for (let delegateIndex = 0; delegateIndex < Math.min(tumbler.count, tumbler.visibleItemCount); ++delegateIndex) {
+ let delegate = findChild(listView.contentItem, "delegate" + delegateIndex);
verify(delegate);
verify(delegate.displacement <= -delegateIndex, "Delegate at index " + delegateIndex + " has a displacement of "
@@ -871,7 +873,7 @@ TestCase {
}
function test_visibleItemCount_data() {
- var data = [
+ let data = [
// e.g. {0: 2} = {delegate index: y pos / delegate height}
// Skip item at index 3, because it's out of view.
{ model: 6, visibleItemCount: 5, expectedYPositions: {0: 2, 1: 3, 2: 4, 4: 0} },
@@ -880,7 +882,7 @@ TestCase {
{ model: 2, visibleItemCount: 1, expectedYPositions: {0: 0} },
];
- for (var i = 0; i < data.length; ++i) {
+ for (let i = 0; i < data.length; ++i) {
data[i].tag = "items=" + data[i].model + ", visibleItemCount=" + data[i].visibleItemCount;
}
return data;
@@ -895,11 +897,11 @@ TestCase {
tumbler.model = data.model;
compare(tumbler.count, data.model);
- for (var delegateIndex = 0; delegateIndex < data.visibleItemCount; ++delegateIndex) {
+ for (let delegateIndex = 0; delegateIndex < data.visibleItemCount; ++delegateIndex) {
if (data.expectedYPositions.hasOwnProperty(delegateIndex)) {
- var delegate = findChild(tumblerView, "delegate" + delegateIndex);
+ let delegate = findChild(tumblerView, "delegate" + delegateIndex);
verify(delegate, "Delegate found at index " + delegateIndex);
- var expectedYPos = data.expectedYPositions[delegateIndex] * tumblerDelegateHeight;
+ let expectedYPos = data.expectedYPositions[delegateIndex] * tumblerDelegateHeight;
compare(delegate.mapToItem(tumbler.contentItem, 0, 0).y, expectedYPos);
}
}
@@ -928,7 +930,7 @@ TestCase {
createTemporaryObject(noParentDelegateComponent, null);
ignoreWarning(/.*Tumbler: attempting to access attached property on item without an \"index\" property/);
- var object = createTemporaryObject(noParentDelegateComponent, testCase);
+ let object = createTemporaryObject(noParentDelegateComponent, testCase);
verify(object);
}
@@ -947,15 +949,15 @@ TestCase {
}
function test_padding_data() {
- var data = [];
+ let data = [];
data.push({ padding: 0 });
data.push({ padding: 10 });
data.push({ left: 10, top: 10 });
data.push({ right: 10, bottom: 10 });
- for (var i = 0; i < data.length; ++i) {
- var tag = "";
+ for (let i = 0; i < data.length; ++i) {
+ let tag = "";
if (data[i].padding !== undefined)
tag += "padding: " + data[i].padding + " ";
@@ -1004,24 +1006,24 @@ TestCase {
compare(tumbler.contentItem.x, tumbler.leftPadding);
compare(tumbler.contentItem.y, tumbler.topPadding);
- var pathView = tumbler.contentItem;
- var expectedDelegateHeight = tumbler.availableHeight / tumbler.visibleItemCount;
- var itemIndicesInVisualOrder = [4, 0, 1];
- for (var i = 0; i < itemIndicesInVisualOrder.length; ++i) {
- var delegate = findChild(pathView, "delegate" + itemIndicesInVisualOrder[i]);
+ let pathView = tumbler.contentItem;
+ let expectedDelegateHeight = tumbler.availableHeight / tumbler.visibleItemCount;
+ let itemIndicesInVisualOrder = [4, 0, 1];
+ for (let i = 0; i < itemIndicesInVisualOrder.length; ++i) {
+ let delegate = findChild(pathView, "delegate" + itemIndicesInVisualOrder[i]);
verify(delegate, "Couldn't find delegate at index " + itemIndicesInVisualOrder[i]
+ " (iteration " + i + " out of " + (pathView.children.length - 1) + ")");
compare(delegate.width, tumbler.availableWidth);
compare(delegate.height, expectedDelegateHeight);
- var expectedY = tumbler.topPadding + i * expectedDelegateHeight;
- var mappedPos = delegate.mapToItem(null, delegate.width / 2, 0);
+ let expectedY = tumbler.topPadding + i * expectedDelegateHeight;
+ let mappedPos = delegate.mapToItem(null, delegate.width / 2, 0);
fuzzyCompare(mappedPos.y, expectedY, 0.5,
"Tumbler's PathView delegate at index " + itemIndicesInVisualOrder[i]
+ " should have a y pos of " + expectedY + ", but it's actually " + mappedPos.y.toFixed(20));
- var expectedX = tumbler.leftPadding;
+ let expectedX = tumbler.leftPadding;
compare(delegate.mapToItem(null, 0, 0).x, expectedX,
"Tumbler's PathView delegate at index " + itemIndicesInVisualOrder[i]
+ " should have a x pos of " + expectedX + ", but it's actually " + mappedPos.x.toFixed(20));
@@ -1050,7 +1052,7 @@ TestCase {
mousePress(tumbler, tumbler.width / 2, tumbler.height / 2, Qt.LeftButton)
compare(tumbler.moving, false)
- for (var y = tumbler.height / 2; y >= tumbler.height / 4; y -= 10)
+ for (let y = tumbler.height / 2; y >= tumbler.height / 4; y -= 10)
mouseMove(tumbler, tumbler.width / 2, y, 1)
compare(tumbler.moving, true)
@@ -1084,15 +1086,15 @@ TestCase {
}
function test_qtbug61374() {
- var row = createTemporaryObject(qtbug61374Component, testCase);
+ let row = createTemporaryObject(qtbug61374Component, testCase);
verify(row);
- var tumbler = row.tumbler;
+ let tumbler = row.tumbler;
tryCompare(tumbler, "currentIndex", 2);
tumblerView = findView(tumbler);
- var label = row.label;
+ let label = row.label;
compare(label.text, "2");
}
@@ -1124,16 +1126,16 @@ TestCase {
tryCompare(tumbler, "moving", false)
compare(tumbler.visibleItemCount, 5)
- for (var i = 0; i < 5; ++i) {
+ for (let i = 0; i < 5; ++i) {
// Find the item through its text, as that's easier than child/itemAt().
- var text = data.expectedVisibleIndices[i].toString()
- var item = findDelegateWithText(tumblerView, text)
+ let text = data.expectedVisibleIndices[i].toString()
+ let item = findDelegateWithText(tumblerView, text)
verify(item, "found no item with text \"" + text + "\"")
compare(item.text, data.expectedVisibleIndices[i].toString())
// Ensure that it's at the position we expect.
- var expectedPos = itemTopLeftPos(i)
- var actualPos = testCase.mapFromItem(item, 0, 0)
+ let expectedPos = itemTopLeftPos(i)
+ let actualPos = testCase.mapFromItem(item, 0, 0)
compare(actualPos.x, expectedPos.x, "expected delegate with text " + item.text
+ " to have an x pos of " + expectedPos.x + " but it was " + actualPos.x)
compare(actualPos.y, expectedPos.y, "expected delegate with text " + item.text
@@ -1150,7 +1152,7 @@ TestCase {
}
function test_setCurrentIndexOnImperativeModelChange() {
- var tumbler = createTemporaryObject(setCurrentIndexOnImperativeModelChangeComponent, testCase);
+ let tumbler = createTemporaryObject(setCurrentIndexOnImperativeModelChangeComponent, testCase);
verify(tumbler);
tumbler.model = 4
@@ -1187,10 +1189,10 @@ TestCase {
}
function test_setCurrentIndexOnDeclarativeModelChange() {
- var root = createTemporaryObject(setCurrentIndexOnDeclarativeModelChangeComponent, testCase);
+ let root = createTemporaryObject(setCurrentIndexOnDeclarativeModelChangeComponent, testCase);
verify(root);
- var tumbler = root.tumbler;
+ let tumbler = root.tumbler;
compare(tumbler.count, 4);
compare(tumbler.wrap, false);
tumblerView = findView(tumbler);
@@ -1217,7 +1219,7 @@ TestCase {
currentIndex: 15
})
- var delegate = findChild(tumblerView, "delegate15")
+ let delegate = findChild(tumblerView, "delegate15")
verify(delegate)
tryCompare(delegate, "displacement", 0)
@@ -1242,7 +1244,7 @@ TestCase {
}
function test_initialCurrentIndex() {
- var tumbler = createTemporaryObject(initialCurrentIndexTumbler, testCase, {wrap: true});
+ let tumbler = createTemporaryObject(initialCurrentIndexTumbler, testCase, {wrap: true});
compare(tumbler.currentIndex, 4);
tumbler = createTemporaryObject(initialCurrentIndexTumbler, testCase, {wrap: false});
compare(tumbler.currentIndex, 4);
@@ -1282,7 +1284,7 @@ TestCase {
touch.press(0, tumblerView, control.width / 2, control.height / 2).commit()
// Move slowly, otherwise its considered as flick which cause current index
// to be varied according to its velocity
- var scrollOffset = control.height / 2
+ let scrollOffset = control.height / 2
for (; scrollOffset > delegateHeight / 2; scrollOffset-=5) {
touch.move(0, tumblerView, control.width / 2, scrollOffset).commit()
}
diff --git a/tests/auto/quickcontrols/controls/fluentwinui3/BLACKLIST b/tests/auto/quickcontrols/controls/fluentwinui3/BLACKLIST
new file mode 100644
index 0000000000..3867b52f90
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/fluentwinui3/BLACKLIST
@@ -0,0 +1,14 @@
+# See qtbase/src/testlib/qtestblacklist.cpp for format
+
+# until adding FluentWinUI3's own BusyIndicator implementation
+[BusyIndicator::test_visibility]
+*
+
+# until adding FluentWinUI3's own Page implementation
+[Page::test_layout]
+*
+
+# QTBUG-95750
+[RangeSlider::test_overlappingHandles]
+b2qt
+qnx
diff --git a/tests/auto/quickcontrols/controls/fluentwinui3/CMakeLists.txt b/tests/auto/quickcontrols/controls/fluentwinui3/CMakeLists.txt
new file mode 100644
index 0000000000..384b8c47f4
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/fluentwinui3/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_fluentwinui3 LANGUAGES C CXX ASM)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../data/tst_*)
+list(APPEND test_data ${test_data_glob})
+
+qt_internal_add_test(tst_fluentwinui3
+ GUI
+ QMLTEST
+ SOURCES
+ tst_fluentwinui3.cpp
+ DEFINES
+ TST_CONTROLS_DATA="${CMAKE_CURRENT_SOURCE_DIR}/../data"
+ LIBRARIES
+ Qt::Gui
+ Qt::QuickControls2
+ TESTDATA ${test_data}
+)
+
+# Make the QML files available to Creator's locator.
+target_sources(tst_fluentwinui3
+ PRIVATE
+ ${test_data}
+)
+
+set_source_files_properties(${test_data}
+ PROPERTIES
+ HEADER_FILE_ONLY ON
+)
diff --git a/tests/auto/quickcontrols/controls/fluentwinui3/dependencies.qml b/tests/auto/quickcontrols/controls/fluentwinui3/dependencies.qml
new file mode 100644
index 0000000000..2b442ac527
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/fluentwinui3/dependencies.qml
@@ -0,0 +1,6 @@
+import QtTest
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.FluentWinUI3
+
+TestCase { }
diff --git a/tests/auto/quickcontrols/controls/fluentwinui3/dummy_imports.qml b/tests/auto/quickcontrols/controls/fluentwinui3/dummy_imports.qml
new file mode 100644
index 0000000000..66e184f138
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/fluentwinui3/dummy_imports.qml
@@ -0,0 +1,12 @@
+// This file exists for the sole purpose for qmlimportscanner to find
+// which modules it needs to extract for deployment.
+// Otherwise, it fails to find the imports that are expressed in C++.
+
+import QtQml
+import QtCore
+import QtQuick
+import QtQuick.NativeStyle
+import QtQuick.Layouts
+import Qt.labs.qmlmodels
+
+QtObject { }
diff --git a/tests/auto/quickcontrols/controls/fluentwinui3/tst_fluentwinui3.cpp b/tests/auto/quickcontrols/controls/fluentwinui3/tst_fluentwinui3.cpp
new file mode 100644
index 0000000000..9f67b3dc9e
--- /dev/null
+++ b/tests/auto/quickcontrols/controls/fluentwinui3/tst_fluentwinui3.cpp
@@ -0,0 +1,13 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QtQuickTest/quicktest.h>
+#include <QtQuickControls2/qquickstyle.h>
+
+int main(int argc, char *argv[])
+{
+ QTEST_SET_MAIN_SOURCE_PATH
+ qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ QQuickStyle::setStyle("FluentWinUI3");
+ return quick_test_main(argc, argv, "tst_controls::FluentWinUI3", TST_CONTROLS_DATA);
+}
diff --git a/tests/auto/quickcontrols/controls/fusion/tst_fusion.cpp b/tests/auto/quickcontrols/controls/fusion/tst_fusion.cpp
index 4485ca0c70..3c1f255d6e 100644
--- a/tests/auto/quickcontrols/controls/fusion/tst_fusion.cpp
+++ b/tests/auto/quickcontrols/controls/fusion/tst_fusion.cpp
@@ -8,6 +8,9 @@ int main(int argc, char *argv[])
{
QTEST_SET_MAIN_SOURCE_PATH
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Fusion");
return quick_test_main(argc, argv, "tst_controls::Fusion", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/imagine/tst_imagine.cpp b/tests/auto/quickcontrols/controls/imagine/tst_imagine.cpp
index 54c363797b..ca9ff3fddd 100644
--- a/tests/auto/quickcontrols/controls/imagine/tst_imagine.cpp
+++ b/tests/auto/quickcontrols/controls/imagine/tst_imagine.cpp
@@ -8,6 +8,9 @@ int main(int argc, char *argv[])
{
QTEST_SET_MAIN_SOURCE_PATH
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Imagine");
return quick_test_main(argc, argv, "tst_controls::Imagine", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/ios/tst_ios.cpp b/tests/auto/quickcontrols/controls/ios/tst_ios.cpp
index 11c6f35b0b..b34a580e3c 100644
--- a/tests/auto/quickcontrols/controls/ios/tst_ios.cpp
+++ b/tests/auto/quickcontrols/controls/ios/tst_ios.cpp
@@ -8,6 +8,9 @@ int main(int argc, char *argv[])
{
QTEST_SET_MAIN_SOURCE_PATH
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("iOS");
return quick_test_main(argc, argv, "tst_controls::iOS", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/macos/tst_macos.cpp b/tests/auto/quickcontrols/controls/macos/tst_macos.cpp
index 1ba0ebf587..91ce22cc0b 100644
--- a/tests/auto/quickcontrols/controls/macos/tst_macos.cpp
+++ b/tests/auto/quickcontrols/controls/macos/tst_macos.cpp
@@ -10,6 +10,9 @@ int main(int argc, char *argv[])
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
// See comment in tst_windows.cpp.
qputenv("QT_QUICK_CONTROLS_IGNORE_CUSTOMIZATION_WARNINGS", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("macOS");
return quick_test_main(argc, argv, "tst_controls::macOS", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/material/tst_material.cpp b/tests/auto/quickcontrols/controls/material/tst_material.cpp
index 782397a592..9a76046d23 100644
--- a/tests/auto/quickcontrols/controls/material/tst_material.cpp
+++ b/tests/auto/quickcontrols/controls/material/tst_material.cpp
@@ -8,6 +8,9 @@ int main(int argc, char *argv[])
{
QTEST_SET_MAIN_SOURCE_PATH
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Material");
return quick_test_main(argc, argv, "tst_controls::Material", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/universal/tst_universal.cpp b/tests/auto/quickcontrols/controls/universal/tst_universal.cpp
index 2d9e687bea..3cd41be836 100644
--- a/tests/auto/quickcontrols/controls/universal/tst_universal.cpp
+++ b/tests/auto/quickcontrols/controls/universal/tst_universal.cpp
@@ -8,6 +8,9 @@ int main(int argc, char *argv[])
{
QTEST_SET_MAIN_SOURCE_PATH
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Universal");
return quick_test_main(argc, argv, "tst_controls::Universal", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/controls/windows/tst_windows.cpp b/tests/auto/quickcontrols/controls/windows/tst_windows.cpp
index 221ff116dd..bcd8fa35d8 100644
--- a/tests/auto/quickcontrols/controls/windows/tst_windows.cpp
+++ b/tests/auto/quickcontrols/controls/windows/tst_windows.cpp
@@ -17,6 +17,9 @@ int main(int argc, char *argv[])
// issued when default-constructing controls. For that we have
// tst_customization::noCustomizationWarningsForDefaultControls.
qputenv("QT_QUICK_CONTROLS_IGNORE_CUSTOMIZATION_WARNINGS", "1");
+ // The tests were originally written before native menus existed,
+ // and some of them try to open menus, which we can't test natively.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Windows");
return quick_test_main(argc, argv, "tst_controls::Windows", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/quickcontrols/focus/tst_focus.cpp b/tests/auto/quickcontrols/focus/tst_focus.cpp
index 5d745813dc..dde4621060 100644
--- a/tests/auto/quickcontrols/focus/tst_focus.cpp
+++ b/tests/auto/quickcontrols/focus/tst_focus.cpp
@@ -29,6 +29,7 @@ public:
tst_focus();
private slots:
+ void init() override;
void initTestCase() override;
void navigation_data();
@@ -50,8 +51,15 @@ tst_focus::tst_focus()
{
}
+void tst_focus::init()
+{
+ QTest::failOnWarning(QRegularExpression(".?"));
+}
+
void tst_focus::initTestCase()
{
+ SKIP_IF_NO_WINDOW_ACTIVATION
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickStyle::setStyle("Basic");
QQmlDataTest::initTestCase();
}
diff --git a/tests/auto/quickcontrols/font/tst_font.cpp b/tests/auto/quickcontrols/font/tst_font.cpp
index bdb73bbf4b..ec8e927693 100644
--- a/tests/auto/quickcontrols/font/tst_font.cpp
+++ b/tests/auto/quickcontrols/font/tst_font.cpp
@@ -113,7 +113,7 @@ void tst_font::font()
QFETCH(QString, testFile);
QFETCH(QFont, expectedFont);
- if (QSysInfo::productType().compare(QLatin1String("osx"), Qt::CaseInsensitive) == 0
+ if (QSysInfo::productType().compare(QLatin1String("macos"), Qt::CaseInsensitive) == 0
&& qgetenv("QTEST_ENVIRONMENT").split(' ').contains("CI")) {
QSKIP("This test crashes on macOS: QTBUG-70063");
}
diff --git a/tests/auto/quickcontrols/palette/data/comboBoxPopupWithApplicationWindow.qml b/tests/auto/quickcontrols/palette/data/comboBoxPopupWithApplicationWindow.qml
new file mode 100644
index 0000000000..436d3cdad6
--- /dev/null
+++ b/tests/auto/quickcontrols/palette/data/comboBoxPopupWithApplicationWindow.qml
@@ -0,0 +1,32 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias topLevelComboBox: topLevelComboBox
+ property alias popup: popup
+ property alias comboBoxInPopup: comboBoxInPopup
+
+ ComboBox {
+ id: topLevelComboBox
+ model: ["ONE", "TWO", "THREE"]
+ }
+
+ Popup {
+ id: popup
+ width: 200
+ height: 200
+ visible: true
+ palette.window: "red"
+
+ ComboBox {
+ id: comboBoxInPopup
+ model: ["ONE", "TWO", "THREE"]
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/palette/data/comboBoxPopupWithThemeDefault.qml b/tests/auto/quickcontrols/palette/data/comboBoxPopupWithThemeDefault.qml
new file mode 100644
index 0000000000..592793fa3f
--- /dev/null
+++ b/tests/auto/quickcontrols/palette/data/comboBoxPopupWithThemeDefault.qml
@@ -0,0 +1,17 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias comboBox: comboBox
+
+ ComboBox {
+ id: comboBox
+ model: 1
+ }
+}
diff --git a/tests/auto/quickcontrols/palette/data/comboBoxPopupWithWindow.qml b/tests/auto/quickcontrols/palette/data/comboBoxPopupWithWindow.qml
new file mode 100644
index 0000000000..d806f30d01
--- /dev/null
+++ b/tests/auto/quickcontrols/palette/data/comboBoxPopupWithWindow.qml
@@ -0,0 +1,33 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+
+Window {
+ width: 400
+ height: 400
+
+ property alias topLevelComboBox: topLevelComboBox
+ property alias popup: popup
+ property alias comboBoxInPopup: comboBoxInPopup
+
+ ComboBox {
+ id: topLevelComboBox
+ model: ["ONE", "TWO", "THREE"]
+ }
+
+ Popup {
+ id: popup
+ width: 200
+ height: 200
+ visible: true
+ palette.window: "red"
+
+ ComboBox {
+ id: comboBoxInPopup
+ model: ["ONE", "TWO", "THREE"]
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/palette/tst_palette.cpp b/tests/auto/quickcontrols/palette/tst_palette.cpp
index 5109ad0f8f..d434589bc6 100644
--- a/tests/auto/quickcontrols/palette/tst_palette.cpp
+++ b/tests/auto/quickcontrols/palette/tst_palette.cpp
@@ -7,9 +7,11 @@
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
+#include <QtQuickTestUtils/private/visualtestutils_p.h>
#include <QtQuickControlsTestUtils/private/controlstestutils_p.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
+#include <QtQuickTemplates2/private/qquickcombobox_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p.h>
@@ -19,6 +21,7 @@
#include <QtQuickControls2/qquickstyle.h>
#include <QSignalSpy>
+using namespace QQuickVisualTestUtils;
using namespace QQuickControlsTestUtils;
class tst_palette : public QQmlDataTest
@@ -52,6 +55,11 @@ private slots:
void resetColor();
void updateBindingPalette();
+
+ void comboBoxPopup_data();
+ void comboBoxPopup();
+ void comboBoxPopupWithThemeDefault_data();
+ void comboBoxPopupWithThemeDefault();
};
tst_palette::tst_palette()
@@ -551,6 +559,92 @@ void tst_palette::updateBindingPalette()
QCOMPARE(windowPalette->buttonText(), customPalette->buttonText());
}
+void tst_palette::comboBoxPopup_data()
+{
+ QTest::addColumn<QString>("style");
+ QTest::addColumn<QString>("qmlFilePath");
+
+ QTest::newRow("Window, Basic") << "Basic" << "comboBoxPopupWithWindow.qml";
+ QTest::newRow("ApplicationWindow, Basic") << "Basic" << "comboBoxPopupWithApplicationWindow.qml";
+ QTest::newRow("Window, Fusion") << "Fusion" << "comboBoxPopupWithWindow.qml";
+ QTest::newRow("ApplicationWindow, Fusion") << "Fusion" << "comboBoxPopupWithApplicationWindow.qml";
+}
+
+// Unlike regular popups, which should inherit their palette from the window and not the parent popup,
+// combo box popups should inherit their palette from the combo box itself.
+void tst_palette::comboBoxPopup()
+{
+ QFETCH(QString, style);
+ QFETCH(QString, qmlFilePath);
+
+ qmlClearTypeRegistrations();
+ QQuickStyle::setStyle(style);
+
+ QQuickApplicationHelper helper(this, qmlFilePath);
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ const auto *windowPalette = window->property("palette").value<QQuickPalette *>();
+ QVERIFY(windowPalette);
+
+ const auto *popup = window->property("popup").value<QQuickPopup *>();
+ QVERIFY(popup);
+ const auto *popupBackground = popup->background();
+ QCOMPARE(popupBackground->property("color"), QColorConstants::Red);
+ QCOMPARE(popupBackground->property("palette").value<QQuickPalette*>()->toQPalette().window().color(),
+ QColorConstants::Red);
+
+ // This has the default palette.
+ const auto *topLevelComboBox = window->property("topLevelComboBox").value<QQuickComboBox *>();
+ QVERIFY(topLevelComboBox);
+ const auto *topLevelComboBoxBackground = topLevelComboBox->popup()->background();
+ QCOMPARE_NE(topLevelComboBoxBackground->property("color"), QColorConstants::Red);
+ QCOMPARE_NE(topLevelComboBoxBackground->property("palette").value<QQuickPalette*>()->toQPalette().window().color(),
+ QColorConstants::Red);
+
+ // The popup that this combo box is in has its window role set to red,
+ // so the combo box's popup background should be red too.
+ const auto *comboBoxInPopup = window->property("comboBoxInPopup").value<QQuickComboBox *>();
+ QVERIFY(comboBoxInPopup);
+ const auto *comboBoxInPopupBackground = comboBoxInPopup->popup()->background();
+ QCOMPARE(comboBoxInPopupBackground->property("color"), QColorConstants::Red);
+ QCOMPARE(comboBoxInPopupBackground->property("palette").value<QQuickPalette*>()->toQPalette().window().color(),
+ QColorConstants::Red);
+}
+
+void tst_palette::comboBoxPopupWithThemeDefault_data()
+{
+ QTest::addColumn<QString>("style");
+ QTest::addColumn<QColor>("expectedComboBoxPopupBackgroundColor");
+
+ QTest::newRow("Basic") << "Basic" << QColor::fromRgb(0xFFFFFF);
+
+ // We can't test Fusion because it uses the default application palette,
+ // which is the default-constructed QPalette, so the test would always pass.
+}
+
+void tst_palette::comboBoxPopupWithThemeDefault()
+{
+ QFETCH(QString, style);
+ QFETCH(QColor, expectedComboBoxPopupBackgroundColor);
+
+ qmlClearTypeRegistrations();
+ QQuickStyle::setStyle(style);
+
+ QQuickApplicationHelper helper(this, "comboBoxPopupWithThemeDefault.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ const auto *comboBox = window->property("comboBox").value<QQuickComboBox *>();
+ QVERIFY(comboBox);
+ const auto *comboBoxBackground = comboBox->popup()->background();
+ QCOMPARE(comboBoxBackground->property("color"), expectedComboBoxPopupBackgroundColor);
+}
+
QTEST_MAIN(tst_palette)
#include "tst_palette.moc"
diff --git a/tests/auto/quickcontrols/qquickapplicationwindow/tst_qquickapplicationwindow.cpp b/tests/auto/quickcontrols/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
index ff0b4418d2..420baa234d 100644
--- a/tests/auto/quickcontrols/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
+++ b/tests/auto/quickcontrols/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
@@ -58,6 +58,8 @@ private slots:
tst_QQuickApplicationWindow::tst_QQuickApplicationWindow()
: QQmlDataTest(QT_QMLTEST_DATADIR)
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
QQuickStyle::setStyle("Basic");
}
@@ -278,6 +280,10 @@ void tst_QQuickApplicationWindow::implicitFill()
void tst_QQuickApplicationWindow::attachedProperties()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("eglfs"), Qt::CaseInsensitive))
+ {
+ QSKIP("This test uses multiple windows and it crashes on EGLFS because of that");
+ }
QQmlEngine engine;
QQmlComponent component(&engine);
component.loadUrl(testFileUrl("attachedProperties.qml"));
diff --git a/tests/auto/quickcontrols/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/quickcontrols/qquickdrawer/tst_qquickdrawer.cpp
index 5eb3895849..d16bc7790f 100644
--- a/tests/auto/quickcontrols/qquickdrawer/tst_qquickdrawer.cpp
+++ b/tests/auto/quickcontrols/qquickdrawer/tst_qquickdrawer.cpp
@@ -1055,8 +1055,7 @@ void tst_QQuickDrawer::interactive_data()
void tst_QQuickDrawer::interactive()
{
- if (!(QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)))
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QFETCH(QString, source);
QQuickControlsApplicationHelper helper(this, source);
diff --git a/tests/auto/quickcontrols/qquickiconlabel/tst_qquickiconlabel.cpp b/tests/auto/quickcontrols/qquickiconlabel/tst_qquickiconlabel.cpp
index 9f0feb5139..c263fbe1bd 100644
--- a/tests/auto/quickcontrols/qquickiconlabel/tst_qquickiconlabel.cpp
+++ b/tests/auto/quickcontrols/qquickiconlabel/tst_qquickiconlabel.cpp
@@ -336,7 +336,7 @@ void tst_qquickiconlabel::iconSourceContext()
QVERIFY(image);
QQuickImagePrivate *imagePrivate
= static_cast<QQuickImagePrivate *>(QQuickItemPrivate::get(image));
- QCOMPARE(imagePrivate->pix.url(), testFileUrl("a.png"));
+ QCOMPARE(imagePrivate->pix1.url(), testFileUrl("a.png"));
}
#endif
}
diff --git a/tests/auto/quickcontrols/qquickmaterialstyle/tst_qquickmaterialstyle.cpp b/tests/auto/quickcontrols/qquickmaterialstyle/tst_qquickmaterialstyle.cpp
index 783c5499c8..48a3e2138a 100644
--- a/tests/auto/quickcontrols/qquickmaterialstyle/tst_qquickmaterialstyle.cpp
+++ b/tests/auto/quickcontrols/qquickmaterialstyle/tst_qquickmaterialstyle.cpp
@@ -2,4 +2,18 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtQuickTest/quicktest.h>
-QUICK_TEST_MAIN(tst_qquickmaterialstyle)
+
+class Setup : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void applicationAvailable()
+ {
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ }
+};
+
+QUICK_TEST_MAIN_WITH_SETUP(tst_qquickmaterialstyle, Setup)
+
+#include "tst_qquickmaterialstyle.moc"
diff --git a/tests/auto/quickcontrols/qquickmenu/data/nativeDynamicSubmenus.qml b/tests/auto/quickcontrols/qquickmenu/data/nativeDynamicSubmenus.qml
new file mode 100644
index 0000000000..951cb7cb6c
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenu/data/nativeDynamicSubmenus.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias contextMenu: contextMenu
+
+ function addSubMenu(title: string) {
+ contextMenu.addMenu(subMenuComponent.createObject(null, { title: title }))
+ }
+
+ function addAction(menu: T.Menu, text: string) {
+ menu.addAction(actionComponent.createObject(null, { text: text }))
+ }
+
+ function insertAction(menu: T.Menu, index: int, text: string) {
+ menu.insertAction(index, actionComponent.createObject(null, { text: text }))
+ }
+
+ Component {
+ id: actionComponent
+
+ Action {
+ objectName: text
+ }
+ }
+
+ Component {
+ id: subMenuComponent
+
+ Menu {
+ id: subMenu
+ objectName: title
+ popupType: Popup.Native
+
+ Action {
+ text: subMenu.objectName + "Action1"
+ }
+ }
+ }
+
+ Menu {
+ id: contextMenu
+ objectName: "menu"
+ popupType: Popup.Native
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenu/data/nativeEmptyMenu.qml b/tests/auto/quickcontrols/qquickmenu/data/nativeEmptyMenu.qml
new file mode 100644
index 0000000000..0ae2c5dc66
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenu/data/nativeEmptyMenu.qml
@@ -0,0 +1,51 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias contextMenu: contextMenu
+
+ function addAction(menu: T.Menu, text: string) {
+ menu.addAction(actionComponent.createObject(null, { text: text }))
+ }
+
+ function insertAction(menu: T.Menu, index: int, text: string) {
+ menu.insertAction(index, actionComponent.createObject(null, { text: text }))
+ }
+
+ function removeAction(menu: T.Menu, index: int) {
+ menu.removeAction(menu.actionAt(index))
+ }
+
+ function addMenu(menu: T.Menu, title: string) {
+ menu.addMenu(menuComponent.createObject(null, { title: title }))
+ }
+
+ Component {
+ id: actionComponent
+
+ Action {
+ objectName: text
+ }
+ }
+
+ Component {
+ id: menuComponent
+
+ Menu {
+ objectName: title
+ }
+ }
+
+ Menu {
+ id: contextMenu
+ objectName: "menu"
+ popupType: Popup.Native
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenu/data/nativeMenuSeparator.qml b/tests/auto/quickcontrols/qquickmenu/data/nativeMenuSeparator.qml
new file mode 100644
index 0000000000..54195af349
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenu/data/nativeMenuSeparator.qml
@@ -0,0 +1,43 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias contextMenu: contextMenu
+
+ Menu {
+ id: contextMenu
+ objectName: "menu"
+ popupType: Popup.Native
+
+ Action {
+ objectName: text
+ text: "action1"
+ }
+
+ MenuSeparator {}
+
+ Menu {
+ id: subMenu
+ objectName: "subMenu"
+ popupType: Popup.Native
+
+ Action {
+ objectName: text
+ text: "subAction1"
+ }
+
+ MenuSeparator {}
+
+ Action {
+ objectName: text
+ text: "subAction2"
+ }
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenu/data/nativeMixedItems.qml b/tests/auto/quickcontrols/qquickmenu/data/nativeMixedItems.qml
new file mode 100644
index 0000000000..119d8debec
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenu/data/nativeMixedItems.qml
@@ -0,0 +1,69 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias contextMenu: contextMenu
+
+ function insertRectangle(menu: T.Menu, index: int, color: color) {
+ menu.insertItem(index, rectangleComponent.createObject(null, { color: color }))
+ }
+
+ Component {
+ id: rectangleComponent
+
+ Rectangle {
+ objectName: "rectangle"
+ width: 32
+ height: 32
+ }
+ }
+
+ Component {
+ id: menuComponent
+
+ Menu {
+ objectName: title
+ popupType: contextMenu.popupType
+ }
+ }
+
+ Menu {
+ id: contextMenu
+ objectName: "menu"
+ popupType: contextMenu.popupType
+
+ Action {
+ objectName: text
+ text: "action"
+ }
+
+ MenuItem {
+ text: "menuItem"
+ objectName: text
+ }
+
+ Menu {
+ id: subMenu
+ title: "subMenu"
+ objectName: title
+ popupType: contextMenu.popupType
+
+ Action {
+ objectName: text
+ text: "subAction1"
+ }
+
+ Action {
+ objectName: text
+ text: "subAction2"
+ }
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenu/data/nativeStatic.qml b/tests/auto/quickcontrols/qquickmenu/data/nativeStatic.qml
new file mode 100644
index 0000000000..32ba1f1829
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenu/data/nativeStatic.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias contextMenu: contextMenu
+
+ Menu {
+ id: contextMenu
+ objectName: "menu"
+ popupType: Popup.Native
+
+ Action {
+ objectName: text
+ text: "action1"
+ shortcut: "A"
+ }
+
+ MenuItem {
+ objectName: text
+ action: Action {
+ text: "menuItemAction"
+ objectName: text
+ shortcut: "B"
+ }
+ }
+
+ Menu {
+ id: subMenu
+ title: "subMenu"
+ objectName: title
+ popupType: Popup.Native
+ // TODO: remove me when the defaults are true
+
+ Action {
+ objectName: text
+ text: "subAction1"
+ shortcut: "1"
+ }
+ }
+ }
+
+ TapHandler {
+ acceptedButtons: Qt.RightButton
+ onTapped: contextMenu.popup()
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenu/tst_qquickmenu.cpp b/tests/auto/quickcontrols/qquickmenu/tst_qquickmenu.cpp
index a80aec5ca1..624a2092bc 100644
--- a/tests/auto/quickcontrols/qquickmenu/tst_qquickmenu.cpp
+++ b/tests/auto/quickcontrols/qquickmenu/tst_qquickmenu.cpp
@@ -9,12 +9,14 @@
#endif
#include <QtGui/qstylehints.h>
#include <QtGui/qpa/qplatformintegration.h>
+#include <QtGui/qpa/qplatformtheme.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
#include <QtQml/qqmlcontext.h>
#include <QtQuick/qquickview.h>
#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuick/private/qquickrectangle_p.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
#include <QtQuickTestUtils/private/visualtestutils_p.h>
#include <QtQuickControlsTestUtils/private/controlstestutils_p.h>
@@ -26,12 +28,16 @@
#include <QtQuickTemplates2/private/qquickbutton_p.h>
#include <QtQuickTemplates2/private/qquickicon_p.h>
#include <QtQuickTemplates2/private/qquickmenu_p.h>
+#include <QtQuickTemplates2/private/qquickmenu_p_p.h>
#include <QtQuickTemplates2/private/qquickmenuitem_p.h>
#include <QtQuickTemplates2/private/qquickmenuseparator_p.h>
+#include <QtQuickTemplates2/private/qquicknativemenuitem_p.h>
using namespace QQuickVisualTestUtils;
using namespace QQuickControlsTestUtils;
+// Native menu tests are in "nativemenus".
+
class tst_QQuickMenu : public QQmlDataTest
{
Q_OBJECT
@@ -40,6 +46,8 @@ public:
tst_QQuickMenu();
private slots:
+ void init() final;
+
void defaults();
void count();
void mouse();
@@ -55,6 +63,7 @@ private slots:
#if QT_CONFIG(cursor)
void popup();
#endif
+ void openParentlessMenu();
void actions();
#if QT_CONFIG(shortcut)
void actionShortcuts();
@@ -87,19 +96,46 @@ private slots:
void customMenuCullItems();
void customMenuUseRepeaterAsTheContentItem();
void invalidUrlInImgTag();
+ void nativeStatic();
+ void nativeDynamicActions();
+ void nativeDynamicSubmenus();
+ void nativeMenuSeparator();
+ void dontUseNativeMenuWindowsChanges();
+ void nativeMixedItems();
+ void effectivePosition_data();
+ void effectivePosition();
+ void textPadding();
+ void resetCurrentIndexUponPopup_data();
+ void resetCurrentIndexUponPopup();
private:
- static bool hasWindowActivation();
+ bool nativeMenuSupported = false;
};
+// This allows us to use QQuickMenuItem's more descriptive operator<< output
+// for the QCOMPARE failure message. It doesn't seem possible to use toString
+// overloads or template specialization when types declared in QML are involved,
+// as is the case for the MenuItems created from Menu's delegate.
+#define COMPARE_MENUITEMS(actualMenuItem, expectedMenuItem) \
+QVERIFY2(actualMenuItem == expectedMenuItem, \
+ qPrintable(QString::fromLatin1("\n Actual: %1\n Expected: %2") \
+ .arg(QDebug::toString(actualMenuItem), QDebug::toString(expectedMenuItem))));
+
tst_QQuickMenu::tst_QQuickMenu()
: QQmlDataTest(QT_QMLTEST_DATADIR)
{
+ std::unique_ptr<QPlatformMenu> platformMenu(QGuiApplicationPrivate::platformTheme()->createPlatformMenu());
+ nativeMenuSupported = platformMenu != nullptr;
}
-bool tst_QQuickMenu::hasWindowActivation()
+void tst_QQuickMenu::init()
{
- return (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation));
+ QQmlDataTest::init();
+
+ // By default we don't want to use native menus, as the majority of the tests
+ // were written before they were a thing. We instead explicitly set it where necessary.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
}
void tst_QQuickMenu::defaults()
@@ -146,8 +182,7 @@ void tst_QQuickMenu::count()
void tst_QQuickMenu::mouse()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
@@ -160,6 +195,7 @@ void tst_QQuickMenu::mouse()
centerOnScreen(window);
moveMouseAway(window);
window->show();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
@@ -278,8 +314,7 @@ void tst_QQuickMenu::pressAndHold()
void tst_QQuickMenu::contextMenuKeyboard()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
if (QGuiApplication::styleHints()->tabFocusBehavior() != Qt::TabFocusAllControls)
QSKIP("This platform only allows tab focus for text controls");
@@ -468,8 +503,7 @@ void tst_QQuickMenu::contextMenuKeyboard()
// QTBUG-70181
void tst_QQuickMenu::disabledMenuItemKeyNavigation()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
if (QGuiApplication::styleHints()->tabFocusBehavior() != Qt::TabFocusAllControls)
QSKIP("This platform only allows tab focus for text controls");
@@ -535,8 +569,7 @@ void tst_QQuickMenu::disabledMenuItemKeyNavigation()
void tst_QQuickMenu::mnemonics()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
#ifdef Q_OS_MACOS
QSKIP("Mnemonics are not used on macOS");
@@ -593,8 +626,7 @@ void tst_QQuickMenu::mnemonics()
void tst_QQuickMenu::menuButton()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
if (QGuiApplication::styleHints()->tabFocusBehavior() != Qt::TabFocusAllControls)
QSKIP("This platform only allows tab focus for text controls");
@@ -648,8 +680,7 @@ void tst_QQuickMenu::addItem()
void tst_QQuickMenu::menuSeparator()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, QLatin1String("menuSeparator.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
@@ -657,6 +688,7 @@ void tst_QQuickMenu::menuSeparator()
centerOnScreen(window);
moveMouseAway(window);
window->show();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
@@ -965,6 +997,29 @@ void tst_QQuickMenu::popup()
}
#endif // QT_CONFIG(cursor)
+void tst_QQuickMenu::openParentlessMenu()
+{
+ // Check that we don't get a crash if the application sets a menu's parentItem
+ // to null. This will also result in the menu not showing at all, since it's
+ // no longer a part of the scene. Even if this limitiation is technically only
+ // relevant for non-native menus, we enforce it also for native menus to ensure
+ // that an application works the same on all platforms.
+ QQuickControlsApplicationHelper helper(this, QLatin1String("popup.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ centerOnScreen(window);
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot show menu: parent is null"));
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu *>();
+ QVERIFY(menu);
+ menu->setParentItem(nullptr);
+ menu->popup();
+ QVERIFY(!menu->isVisible());
+}
+
void tst_QQuickMenu::actions()
{
QQuickControlsApplicationHelper helper(this, QLatin1String("actions.qml"));
@@ -1037,13 +1092,13 @@ void tst_QQuickMenu::actions()
#if QT_CONFIG(shortcut)
void tst_QQuickMenu::actionShortcuts()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, QLatin1String("actionShortcuts.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
QQuickWindow *window = helper.window;
window->show();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
// Try the menu's shortcut.
@@ -1332,8 +1387,7 @@ void tst_QQuickMenu::subMenuKeyboard_data()
void tst_QQuickMenu::subMenuKeyboard()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QFETCH(bool, cascade);
QFETCH(bool, mirrored);
@@ -1344,6 +1398,7 @@ void tst_QQuickMenu::subMenuKeyboard()
centerOnScreen(window);
moveMouseAway(window);
window->show();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
if (mirrored) {
@@ -1461,8 +1516,7 @@ void tst_QQuickMenu::subMenuDisabledKeyboard_data()
// QTBUG-69540
void tst_QQuickMenu::subMenuDisabledKeyboard()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QFETCH(bool, cascade);
QFETCH(bool, mirrored);
@@ -1473,6 +1527,7 @@ void tst_QQuickMenu::subMenuDisabledKeyboard()
centerOnScreen(window);
moveMouseAway(window);
window->show();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
if (mirrored) {
@@ -2050,13 +2105,13 @@ void tst_QQuickMenu::menuItemWidthAfterRetranslate()
void tst_QQuickMenu::giveMenuItemFocusOnButtonPress()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, QLatin1String("giveMenuItemFocusOnButtonPress.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
QQuickApplicationWindow *window = helper.appWindow;
window->show();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
// Press enter on the button to open the menu.
@@ -2138,6 +2193,615 @@ void tst_QQuickMenu::invalidUrlInImgTag()
QVERIFY(menuItemFirst);
}
+void tst_QQuickMenu::nativeStatic()
+{
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeStatic.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+ auto *contextMenuPrivate = QQuickMenuPrivate::get(contextMenu);
+ QVERIFY(contextMenuPrivate->useNativeMenu());
+
+ // Check that the actions of the parent menu can be accessed
+ // and are in the appropriate places in contentModel and contentData.
+ auto *action1 = contextMenu->actionAt(0);
+ QVERIFY(action1);
+ auto *action1MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ QVERIFY(action1MenuItem);
+ QCOMPARE(action1MenuItem->action(), action1);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(contextMenuPrivate->contentData.at(0)),
+ action1MenuItem);
+
+ auto *menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(1));
+ QVERIFY(menuItem);
+ QVERIFY(menuItem->action());
+ QCOMPARE(menuItem->action()->text(), "menuItemAction");
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(contextMenuPrivate->contentData.at(1)), menuItem);
+
+ // Check that the sub-menu can be accessed and is in the
+ // appropriate place in contentData.
+ auto *subMenu = contextMenu->menuAt(2);
+ QVERIFY(subMenu);
+ auto *subMenuPrivate = QQuickMenuPrivate::get(subMenu);
+ auto *subMenuAction1 = subMenu->actionAt(0);
+ QVERIFY(subMenuAction1);
+ auto *subMenuAction1MenuItem = qobject_cast<QQuickMenuItem *>(subMenu->itemAt(0));
+ QVERIFY(subMenuAction1MenuItem);
+ QCOMPARE(subMenuAction1MenuItem->action(), subMenuAction1);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(subMenuPrivate->contentData.at(0)),
+ subMenuAction1MenuItem);
+}
+
+void tst_QQuickMenu::nativeDynamicActions()
+{
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeEmptyMenu.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+ auto *contextMenuPrivate = QQuickMenuPrivate::get(contextMenu);
+
+ // Check that items can be appended to an empty menu.
+ QCOMPARE(contextMenu->actionAt(0), nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "addAction",
+ Q_ARG(QQuickMenu *, contextMenu), Q_ARG(QString, "action1")));
+ {
+ auto action1 = contextMenu->actionAt(0);
+ QVERIFY(action1);
+ QCOMPARE(action1->text(), "action1");
+ auto *action1MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ QVERIFY(action1MenuItem);
+ QCOMPARE(action1MenuItem->action(), action1);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(contextMenuPrivate->contentData.at(0)),
+ action1MenuItem);
+ }
+
+ // Check that actions can be appended after existing items in the parent menu.
+ QCOMPARE(contextMenu->actionAt(1), nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "addAction",
+ Q_ARG(QQuickMenu *, contextMenu), Q_ARG(QString, "action2")));
+ {
+ auto action2 = contextMenu->actionAt(1);
+ QVERIFY(action2);
+ QCOMPARE(action2->text(), "action2");
+ auto *action2MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(1));
+ QVERIFY(action2MenuItem);
+ QCOMPARE(action2MenuItem->action(), action2);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(contextMenuPrivate->contentData.at(1)),
+ action2MenuItem);
+ }
+
+ // Check that actions can be inserted before existing items in the parent menu.
+ QVERIFY(QMetaObject::invokeMethod(window, "insertAction",
+ Q_ARG(QQuickMenu *, contextMenu), Q_ARG(int, 0), Q_ARG(QString, "action0")));
+ {
+ auto action0 = contextMenu->actionAt(0);
+ QVERIFY(action0);
+ QCOMPARE(action0->text(), "action0");
+ auto *action0MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ QVERIFY(action0MenuItem);
+ QCOMPARE(action0MenuItem->action(), action0);
+ // New items are always appended to contentData, regardless of the actual insertion index
+ // in contentModel.
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(contextMenuPrivate->contentData.at(2)),
+ action0MenuItem);
+ }
+}
+
+void tst_QQuickMenu::nativeDynamicSubmenus()
+{
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeDynamicSubmenus.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+ auto *contextMenuPrivate = QQuickMenuPrivate::get(contextMenu);
+
+ // We construct the sub-menu first in QML. At least on Windows, menu items
+ // added to an empty sub-menu won't show up (tested with Widgets): QTBUG-120494.
+ // So, this adds an already-populated menu as a sub-menu.
+ QVERIFY(QMetaObject::invokeMethod(window, "addSubMenu", Q_ARG(QString, "subMenu1")));
+ auto subMenu1 = contextMenu->menuAt(0);
+ QVERIFY(subMenu1);
+ QCOMPARE(subMenu1->title(), "subMenu1");
+ auto *subMenu1Private = QQuickMenuPrivate::get(subMenu1);
+ if (nativeMenuSupported) {
+ QVERIFY(subMenu1Private->handle);
+ QCOMPARE(subMenu1Private->nativeItems.size(), 1);
+ }
+ auto *subMenu1MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ QVERIFY(subMenu1MenuItem);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(contextMenuPrivate->contentData.at(0)),
+ subMenu1MenuItem);
+ QCOMPARE(contextMenuPrivate->contentData.size(), 1);
+ {
+ auto subMenuAction1 = subMenu1->actionAt(0);
+ QVERIFY(subMenuAction1);
+ QCOMPARE(subMenuAction1->text(), "subMenu1Action1");
+ auto *subMenuAction1MenuItem = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(0));
+ QVERIFY(subMenuAction1MenuItem);
+ QCOMPARE(subMenuAction1MenuItem->action(), subMenuAction1);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(subMenu1Private->contentData.at(0)),
+ subMenuAction1MenuItem);
+ if (nativeMenuSupported)
+ QCOMPARE(subMenu1Private->nativeItems.size(), 1);
+ }
+
+ // Check that actions can be appended after existing items in the sub-menu.
+ QCOMPARE(subMenu1->actionAt(1), nullptr);
+ QVERIFY(QMetaObject::invokeMethod(window, "addAction",
+ Q_ARG(QQuickMenu *, subMenu1), Q_ARG(QString, "subMenu1Action2")));
+ {
+ auto subMenu1Action2 = subMenu1->actionAt(1);
+ QVERIFY(subMenu1Action2);
+ QCOMPARE(subMenu1Action2->text(), "subMenu1Action2");
+ auto *subMenu1Action2MenuItem = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(1));
+ QVERIFY(subMenu1Action2MenuItem);
+ QCOMPARE(subMenu1Action2MenuItem->action(), subMenu1Action2);
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(subMenu1Private->contentData.at(1)),
+ subMenu1Action2MenuItem);
+ QCOMPARE(subMenu1Private->contentData.size(), 2);
+ }
+
+ // Check that actions can be inserted before existing items in the sub-menu.
+ QVERIFY(QMetaObject::invokeMethod(window, "insertAction",
+ Q_ARG(QQuickMenu *, subMenu1), Q_ARG(int, 0), Q_ARG(QString, "subMenu1Action0")));
+ {
+ auto subMenu1Action0 = subMenu1->actionAt(0);
+ QVERIFY(subMenu1Action0);
+ QCOMPARE(subMenu1Action0->text(), "subMenu1Action0");
+ auto *subMenu1Action0MenuItem = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(0));
+ QVERIFY(subMenu1Action0MenuItem);
+ QCOMPARE(subMenu1Action0MenuItem->action(), subMenu1Action0);
+ // New items are always appended to contentData, regardless of the actual insertion index
+ // in contentModel.
+ COMPARE_MENUITEMS(qobject_cast<QQuickMenuItem *>(subMenu1Private->contentData.at(2)),
+ subMenu1Action0MenuItem);
+ QCOMPARE(subMenu1Private->contentData.size(), 3);
+ }
+
+ {
+ // Check that takeMenu works.
+ auto *takenSubMenu = contextMenu->takeMenu(0);
+ QCOMPARE(takenSubMenu, subMenu1);
+ QCOMPARE(contextMenuPrivate->contentData.size(), 0);
+ if (nativeMenuSupported) {
+ QVERIFY(!subMenu1Private->handle);
+ QCOMPARE(subMenu1Private->nativeItems.size(), 0);
+ }
+
+ // Check that the sub-menu can be added back in to the menu.
+ contextMenu->addMenu(takenSubMenu);
+ QCOMPARE(contextMenuPrivate->contentData.size(), 1);
+ auto *subMenu1MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ QVERIFY(subMenu1MenuItem);
+ QCOMPARE(subMenu1MenuItem->text(), "subMenu1");
+ if (nativeMenuSupported) {
+ QVERIFY(subMenu1Private->handle);
+ QCOMPARE(subMenu1Private->nativeItems.size(), 3);
+ }
+ QCOMPARE(subMenu1Private->contentData.size(), 3);
+
+ auto *subMenu1Action0MenuItem = qobject_cast<QQuickMenuItem *>(subMenu1->itemAt(0));
+ QVERIFY(subMenu1Action0MenuItem);
+ }
+
+ // Check that removeMenu works.
+ QVERIFY(contextMenu->menuAt(0));
+ contextMenu->removeMenu(contextMenu->menuAt(0));
+ QCOMPARE(contextMenuPrivate->contentData.size(), 0);
+}
+
+void tst_QQuickMenu::nativeMenuSeparator()
+{
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeMenuSeparator.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ // Check that separators in menus are where we expect them to be.
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+ auto *contextMenuSeparatorAsItem = contextMenu->itemAt(1);
+ QVERIFY(contextMenuSeparatorAsItem);
+ auto *contextMenuSeparator = qobject_cast<QQuickMenuSeparator *>(contextMenuSeparatorAsItem);
+ QVERIFY(contextMenuSeparator);
+ if (nativeMenuSupported) {
+ auto *contextMenuPrivate = QQuickMenuPrivate::get(contextMenu);
+ QCOMPARE(contextMenuPrivate->nativeItems.size(), 3);
+ auto *contextMenuSeparatorNativeItem = contextMenuPrivate->nativeItems.at(1);
+ QVERIFY(contextMenuSeparatorNativeItem);
+ QVERIFY(contextMenuSeparatorNativeItem->separator());
+ }
+
+ // Check that separators in sub-menus are where we expect them to be.
+ QQuickMenu *subMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(subMenu);
+ auto *subMenuSeparatorAsItem = subMenu->itemAt(1);
+ QVERIFY(subMenuSeparatorAsItem);
+ auto *subMenuSeparator = qobject_cast<QQuickMenuSeparator *>(subMenuSeparatorAsItem);
+ QVERIFY(subMenuSeparator);
+ if (nativeMenuSupported) {
+ auto *subMenuPrivate = QQuickMenuPrivate::get(subMenu);
+ QCOMPARE(subMenuPrivate->nativeItems.size(), 3);
+ auto *subMenuSeparatorNativeItem = subMenuPrivate->nativeItems.at(1);
+ QVERIFY(subMenuSeparatorNativeItem);
+ QVERIFY(subMenuSeparatorNativeItem->separator());
+ }
+}
+
+void tst_QQuickMenu::dontUseNativeMenuWindowsChanges()
+{
+ QSKIP("QTBUG-125967 This test will need to be fixed, by using popupType: Popup.Native instead of AA_DontUseNativeMenuWindows.");
+
+ if (QSysInfo::productType() == QLatin1String("b2qt"))
+ QSKIP("b2qt doesn't support native menus");
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows, false);
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeStatic.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+ QCOMPARE(contextMenu->count(), 3);
+ // Sub-menus should respect the native-ness of their parents.
+ auto *subMenu = contextMenu->menuAt(2);
+ auto *subMenuPrivate = QQuickMenuPrivate::get(subMenu);
+ QVERIFY(subMenuPrivate->useNativeMenu());
+ if (nativeMenuSupported)
+ QVERIFY(subMenuPrivate->handle);
+ else
+ QVERIFY(!subMenuPrivate->handle);
+
+ // Ensure that the menu and its sub-menu have enough room to open.
+ if (window->width() / 2 <= contextMenu->width())
+ window->setWidth(contextMenu->width() * 2 + 1);
+ if (window->height() <= contextMenu->height())
+ window->setHeight(contextMenu->height() + 1);
+ QTRY_COMPARE(window->contentItem()->size(), window->size());
+
+ // We can't test that aboutToShow/aboutToHide is emitted for native menus
+ // because when they are shown, the event loop is blocked until they are closed.
+ // So we just check that a native menu is actually in use before going on to test
+ // non-native menus.
+ auto *contextMenuPrivate = QQuickMenuPrivate::get(contextMenu);
+ if (nativeMenuSupported)
+ QVERIFY(contextMenuPrivate->handle);
+ else
+ QVERIFY(!contextMenuPrivate->handle);
+
+ // We need to wait until the menu is opened before it picks up the changes,
+ // which is why we don't check the native handle here yet.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ QVERIFY(!contextMenuPrivate->useNativeMenu());
+ QVERIFY(!subMenuPrivate->useNativeMenu());
+
+ // Check that we can open the menu by right-clicking (or just open it manually
+ // if the platform doesn't support (moving) QCursor).
+ QSignalSpy aboutToShowSpy(contextMenu, &QQuickMenu::aboutToShow);
+ QVERIFY(aboutToShowSpy.isValid());
+ bool couldMoveCursorPos = false;
+ const QPoint cursorPos(1, 1);
+#if QT_CONFIG(cursor)
+ // Try moving the cursor from the current position to test if the platform
+ // supports moving the cursor.
+ const QPoint point = QCursor::pos() + QPoint(1, 1);
+ QCursor::setPos(point);
+ if (QTest::qWaitFor([point]{ return QCursor::pos() == point; })) {
+ couldMoveCursorPos = true;
+ const QPoint globalCursorPos = window->mapToGlobal(cursorPos);
+ QCursor::setPos(globalCursorPos);
+ QTest::mouseClick(window, Qt::RightButton, Qt::NoModifier, cursorPos);
+ }
+#endif
+ if (!couldMoveCursorPos) {
+ contextMenu->setX(cursorPos.x());
+ contextMenu->setY(cursorPos.y());
+ contextMenu->open();
+ }
+ QVERIFY(contextMenu->isVisible());
+ QTRY_VERIFY(contextMenu->isOpened());
+ QCOMPARE(aboutToShowSpy.size(), 1);
+ // Now that it's open and has picked up the changes to Qt::AA_DontUseNativeMenuWindows, we can check it.
+ QVERIFY(!contextMenuPrivate->handle);
+ QVERIFY(!subMenuPrivate->handle);
+ // Check that it opened at the mouse cursor and actually has menu items.
+ QCOMPARE(contextMenu->x(), cursorPos.x());
+ QCOMPARE(contextMenu->y(), cursorPos.y());
+ auto *action1MenuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ QVERIFY(action1MenuItem);
+ QCOMPARE(action1MenuItem->text(), "action1");
+
+ // Test setting Qt::AA_DontUseNativeMenuWindows while visible has no effect
+ // (until it's re-opened, which we can't test because we can't test opening native menus).
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows, false);
+ QVERIFY(contextMenuPrivate->useNativeMenu());
+ QVERIFY(!contextMenuPrivate->handle);
+ QVERIFY(!subMenuPrivate->handle);
+
+ // Also check the submenu.
+ auto *subAction1MenuItem = qobject_cast<QQuickMenuItem *>(subMenu->itemAt(0));
+ QVERIFY(subAction1MenuItem);
+ QCOMPARE(subAction1MenuItem->text(), "subAction1");
+
+ // Test closing the non-native menu by clicking on an item.
+ QSignalSpy aboutToHideSpy(contextMenu, &QQuickMenu::aboutToHide);
+ QVERIFY(aboutToHideSpy.isValid());
+ QVERIFY(clickButton(action1MenuItem));
+ QVERIFY(!contextMenu->isOpened());
+ QTRY_VERIFY(!contextMenu->isVisible());
+ QCOMPARE(aboutToShowSpy.size(), 1);
+
+ // Although we can't open the native menu, we can at least check that
+ // attempting (the changes won't come into effect until it's re-opened)
+ // to make the menu native again doesn't e.g. crash.
+ QVERIFY(contextMenuPrivate->useNativeMenu());
+ QVERIFY(subMenuPrivate->useNativeMenu());
+ QVERIFY(!contextMenuPrivate->handle);
+ QVERIFY(!subMenuPrivate->handle);
+}
+
+// Check that non-menu items (e.g. Rectangles) can be inserted between menu items without issues.
+void tst_QQuickMenu::nativeMixedItems()
+{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows, false);
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeMixedItems.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+
+ // Insert a Rectangle between the Action and MenuItem in the top-level menu.
+ QVERIFY(QMetaObject::invokeMethod(window, "insertRectangle",
+ Q_ARG(QQuickMenu *, contextMenu), Q_ARG(int, 1), Q_ARG(QColor, QColorConstants::Red)));
+ {
+ auto *action = contextMenu->actionAt(0);
+ QVERIFY(action);
+ QCOMPARE(action->text(), "action");
+ auto *rectangle = qobject_cast<QQuickRectangle *>(contextMenu->itemAt(1));
+ QVERIFY(rectangle);
+ QCOMPARE(rectangle->color(), QColorConstants::Red);
+ auto *menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(2));
+ QVERIFY(menuItem);
+ QCOMPARE(menuItem->text(), "menuItem");
+ auto *subMenu = contextMenu->menuAt(3);
+ QVERIFY(subMenu);
+ QCOMPARE(subMenu->title(), "subMenu");
+ }
+
+ // Insert a Rectangle at the end of all of the items (which were: {Action, Rectangle, MenuItem, Menu}).
+ QVERIFY(QMetaObject::invokeMethod(window, "insertRectangle",
+ Q_ARG(QQuickMenu *, contextMenu), Q_ARG(int, 4), Q_ARG(QColor, QColorConstants::Blue)));
+ {
+ auto *action = contextMenu->actionAt(0);
+ QVERIFY(action);
+ QCOMPARE(action->text(), "action");
+ auto *rectangle1 = qobject_cast<QQuickRectangle *>(contextMenu->itemAt(1));
+ QVERIFY(rectangle1);
+ QCOMPARE(rectangle1->color(), QColorConstants::Red);
+ auto *menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(2));
+ QVERIFY(menuItem);
+ QCOMPARE(menuItem->text(), "menuItem");
+ auto *subMenu = contextMenu->menuAt(3);
+ QVERIFY(subMenu);
+ QCOMPARE(subMenu->title(), "subMenu");
+ auto *rectangle2 = qobject_cast<QQuickRectangle *>(contextMenu->itemAt(4));
+ QVERIFY(rectangle2);
+ QCOMPARE(rectangle2->color(), QColorConstants::Blue);
+ }
+
+ // Check that the sub-menu can be accessed and is in the
+ // appropriate place in contentData.
+ auto *subMenu = contextMenu->menuAt(3);
+ QVERIFY(subMenu);
+ // Insert a Rectangle between the Action and MenuItem in the top-level menu.
+ QVERIFY(QMetaObject::invokeMethod(window, "insertRectangle",
+ Q_ARG(QQuickMenu *, subMenu), Q_ARG(int, 1), Q_ARG(QColor, QColorConstants::Green)));
+ {
+ auto *action1 = subMenu->actionAt(0);
+ QVERIFY(action1);
+ QCOMPARE(action1->text(), "subAction1");
+ auto *rectangle = qobject_cast<QQuickRectangle *>(subMenu->itemAt(1));
+ QVERIFY(rectangle);
+ QCOMPARE(rectangle->color(), QColorConstants::Green);
+ auto *action2 = subMenu->actionAt(2);
+ QVERIFY(action2);
+ QCOMPARE(action2->text(), "subAction2");
+ }
+}
+void tst_QQuickMenu::effectivePosition_data()
+{
+ QTest::addColumn<QQuickPopup::PopupType>("popupType");
+
+ QTest::newRow("Item") << QQuickPopup::Item;
+ QTest::newRow("Window") << QQuickPopup::Window;
+}
+
+void tst_QQuickMenu::effectivePosition()
+{
+ // Check that the top-left corner of the background delegate
+ // is placed at the requested menu position. For this test to make
+ // sense, the background delegate needs to be responsible for drawing
+ // the window frame (if any), which Qt::FramelessWindowHint implies.
+ QFETCH(QQuickPopup::PopupType, popupType);
+ SKIP_IF_NO_WINDOW_ACTIVATION
+
+ QQuickControlsApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickApplicationWindow *window = helper.appWindow;
+ centerOnScreen(window);
+ window->show();
+ window->requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
+ QVERIFY(menu);
+
+ // This test only makes sense when QQuickMenu is supposed to draw the
+ // window frame. If that changes, then this test will no longer be needed.
+ QVERIFY(QQuickMenuPrivate::get(menu)->popupWindowType() & Qt::FramelessWindowHint);
+
+ menu->setPopupType(popupType);
+
+ // Move the background delegate a bit into the popup, to simulate using a drop-shadow.
+ const QPointF insets = QPointF{20, 10};
+ menu->setLeftInset(insets.x());
+ menu->setTopInset(insets.y());
+
+ const QPointF requestedPos{100, 100};
+ menu->popup(requestedPos);
+ QTRY_VERIFY(menu->isOpened());
+
+ // Unless the popup was moved to fit inside the window (which should not
+ // be the case in this test), we report back to the application that it's
+ // placed at the requested position.
+ QTRY_COMPARE(menu->position(), requestedPos);
+ QCOMPARE(menu->x(), requestedPos.x());
+ QCOMPARE(menu->y(), requestedPos.y());
+
+ // But in reality, it's the background delegate that is placed at the
+ // requested position.
+ const auto background = menu->background();
+ QVERIFY(background);
+ const QPointF actualBgPos = background->mapToItem(menu->parentItem(), {0, 0});
+ QCOMPARE(actualBgPos, requestedPos);
+}
+
+void tst_QQuickMenu::textPadding()
+{
+ // Check that you can set implicitTextPadding on each MenuItem, and that
+ // textPadding will end up as the maximum implicitTextPadding among all the
+ // MenuItems in the same Menu.
+
+ QQuickControlsApplicationHelper helper(this, QLatin1String("nativeMixedItems.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickMenu *contextMenu = window->property("contextMenu").value<QQuickMenu*>();
+ QVERIFY(contextMenu);
+ contextMenu->setPopupType(QQuickPopup::Item);
+
+ contextMenu->setVisible(true);
+
+ // Go through all MenuItems, and give them an implicitTextPadding of 0
+ for (int i = 0; i < contextMenu->count(); ++i) {
+ auto menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(i));
+ QVERIFY(menuItem);
+ menuItem->setImplicitTextPadding(0);
+ QCOMPARE(menuItem->implicitTextPadding(), 0);
+ }
+
+ // Check that all MenuItems now has a textPadding of 0
+ for (int i = 0; i < contextMenu->count(); ++i) {
+ auto menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(i));
+ QCOMPARE(menuItem->textPadding(), 0);
+ }
+
+ // Let the first MenuItem get a implicitTextPadding of 100. This will
+ // make all MenuItems get a textPadding of 100.
+ auto firstItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(0));
+ firstItem->setImplicitTextPadding(100);
+ QCOMPARE(firstItem->implicitTextPadding(), 100);
+ QCOMPARE(firstItem->textPadding(), 100);
+ for (int i = 1; i < contextMenu->count(); ++i) {
+ auto menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(i));
+ QCOMPARE(menuItem->implicitTextPadding(), 0);
+ QCOMPARE(menuItem->textPadding(), 100);
+ }
+
+ // Hide the MenuItem with implicitTextPadding set to 100. This
+ // should make all the MenuItems get a textPadding of 0 again.
+ firstItem->setVisible(false);
+ QCOMPARE(firstItem->implicitTextPadding(), 100);
+ for (int i = 0; i < contextMenu->count(); ++i) {
+ auto menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(i));
+ QCOMPARE(menuItem->textPadding(), 0);
+ }
+
+ // Show it again
+ firstItem->setVisible(true);
+ for (int i = 0; i < contextMenu->count(); ++i) {
+ auto menuItem = qobject_cast<QQuickMenuItem *>(contextMenu->itemAt(i));
+ QCOMPARE(menuItem->textPadding(), 100);
+ }
+}
+
+void tst_QQuickMenu::resetCurrentIndexUponPopup_data()
+{
+ QTest::addColumn<QQuickPopup::PopupType>("popupType");
+
+ QTest::newRow("Item") << QQuickPopup::Item;
+ QTest::newRow("Window") << QQuickPopup::Window;
+
+ // Note: a call to Menu.popup() will be a blocking call on many platforms
+ // when using native menus (e.g macOS and Windows). We can therefore not
+ // check a Menus internal state, nor make a MenuItem current, while it's visible.
+ // QTest::newRow("Native") << QQuickPopup::Native;
+}
+
+void tst_QQuickMenu::resetCurrentIndexUponPopup()
+{
+ // Check that currentIndex is reset back to -1 when
+ // a menu is repopened using the popup() function without
+ // providing a MenuItem as argument.
+ QFETCH(QQuickPopup::PopupType, popupType);
+ SKIP_IF_NO_WINDOW_ACTIVATION
+
+ QQuickControlsApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickApplicationWindow *window = helper.appWindow;
+ centerOnScreen(window);
+ window->show();
+ window->requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+
+ QQuickMenu *menu = window->property("menu").value<QQuickMenu*>();
+ QVERIFY(menu);
+
+ menu->setPopupType(popupType);
+
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
+
+ menu->popup();
+ QTRY_VERIFY(menu->isOpened());
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
+
+ menu->setCurrentIndex(1);
+ QCOMPARE(menu->currentIndex(), 1);
+ QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(1));
+
+ menu->close();
+ QTRY_VERIFY(!menu->isVisible());
+
+ menu->popup();
+ QTRY_VERIFY(menu->isOpened());
+ QCOMPARE(menu->currentIndex(), -1);
+ QCOMPARE(menu->contentItem()->property("currentIndex"), QVariant(-1));
+}
+
QTEST_QUICKCONTROLS_MAIN(tst_QQuickMenu)
#include "tst_qquickmenu.moc"
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/invaliddelegate.qml b/tests/auto/quickcontrols/qquickmenubar/data/invaliddelegate.qml
new file mode 100644
index 0000000000..4a6272bc47
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenubar/data/invaliddelegate.qml
@@ -0,0 +1,40 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ id: root
+
+ width: 400
+ height: 400
+ visible: true
+
+ menuBar: MenuBar {
+ delegate: Item { /* unsupported since it's not a MenuBarItem */ }
+ Menu {
+ id: fileMenu
+ title: "&File"
+ MenuItem { text: "&Open..." }
+ MenuItem { text: "&Save" }
+ MenuItem { text: "Save &As..." }
+ MenuSeparator { }
+ MenuItem { text: "&Quit" }
+ }
+
+ Menu {
+ title: "&Edit"
+ MenuItem { text: "&Cut" }
+ MenuItem { text: "&Copy" }
+ MenuItem { text: "&Paste" }
+ }
+
+ MenuBarItem {
+ menu: Menu {
+ title: "&Help"
+ MenuItem { text: "&About" }
+ }
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/menubarAsHeader.qml b/tests/auto/quickcontrols/qquickmenubar/data/menubarAsHeader.qml
new file mode 100644
index 0000000000..3261ca4b59
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenubar/data/menubarAsHeader.qml
@@ -0,0 +1,64 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ id: root
+ property bool menuBarVisible: true
+ property alias fileMenu: fileMenu
+ property alias contents: contents
+
+ width: 400
+ height: 400
+ visible: true
+
+ header: MenuBar {
+ visible: root.menuBarVisible
+ Menu {
+ id: fileMenu
+ title: "&File"
+ MenuItem { text: "&Open..." }
+ MenuItem { text: "&Save" }
+ MenuItem { text: "Save &As..." }
+ MenuSeparator { }
+ MenuItem { text: "&Quit" }
+ }
+ Menu {
+ title: "&Edit"
+ MenuItem { text: "&Cut" }
+ MenuItem { text: "&Copy" }
+ MenuItem { text: "&Paste" }
+ }
+ Menu {
+ title: "&View"
+ Menu {
+ title: "&Alignment"
+ Menu {
+ title: "&Horizontal"
+ MenuItem { text: "&Left" }
+ MenuItem { text: "&Center" }
+ MenuItem { text: "&Right" }
+ }
+ Menu {
+ title: "&Vertical"
+ MenuItem { text: "&Top" }
+ MenuItem { text: "&Center" }
+ MenuItem { text: "&Bottom" }
+ }
+ }
+ }
+
+ Menu {
+ title: "&Help"
+ MenuItem { text: "&About" }
+ }
+ }
+
+ Rectangle {
+ id: contents
+ anchors.fill: parent
+ color: "green"
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/menubar.qml b/tests/auto/quickcontrols/qquickmenubar/data/menubaritems.qml
index cf8958e4c4..d7b628afea 100644
--- a/tests/auto/quickcontrols/qquickmenubar/data/menubar.qml
+++ b/tests/auto/quickcontrols/qquickmenubar/data/menubaritems.qml
@@ -5,16 +5,20 @@ import QtQuick
import QtQuick.Controls
ApplicationWindow {
+ id: root
readonly property Button oopsButton: oopsButton
+ property alias fileMenu: fileMenu
width: 400
height: 400
visible: true
- header: MenuBar {
+ menuBar: MenuBar {
MenuBarItem {
menu: Menu {
+ id: fileMenu
title: "&File"
+ objectName: title
MenuItem { text: "&Open..." }
MenuItem { text: "&Save" }
MenuItem { text: "Save &As..." }
@@ -25,6 +29,7 @@ ApplicationWindow {
MenuBarItem {
menu: Menu {
title: "&Edit"
+ objectName: title
MenuItem { text: "&Cut" }
MenuItem { text: "&Copy" }
MenuItem { text: "&Paste" }
@@ -35,14 +40,17 @@ ApplicationWindow {
title: "&View"
Menu {
title: "&Alignment"
+ objectName: title
Menu {
title: "&Horizontal"
+ objectName: title
MenuItem { text: "&Left" }
MenuItem { text: "&Center" }
MenuItem { text: "&Right" }
}
Menu {
title: "&Vertical"
+ objectName: title
MenuItem { text: "&Top" }
MenuItem { text: "&Center" }
MenuItem { text: "&Bottom" }
@@ -54,6 +62,7 @@ ApplicationWindow {
MenuBarItem {
menu: Menu {
title: "&Help"
+ objectName: title
MenuItem { text: "&About" }
}
}
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/menus.qml b/tests/auto/quickcontrols/qquickmenubar/data/menus.qml
new file mode 100644
index 0000000000..947beb50fb
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenubar/data/menus.qml
@@ -0,0 +1,85 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ id: root
+ property bool menuBarVisible: true
+ property alias fileMenu: fileMenu
+ property alias contents: contents
+
+ width: 400
+ height: 400
+ visible: true
+
+ menuBar: MenuBar {
+ visible: root.menuBarVisible
+ Menu {
+ id: fileMenu
+ title: "&File"
+ MenuItem { text: "&Open..." }
+ MenuItem { text: "&Save" }
+ MenuItem { text: "Save &As..." }
+ MenuSeparator { }
+ MenuItem { text: "&Quit" }
+ }
+ Menu {
+ title: "&Edit"
+ MenuItem { text: "&Cut" }
+ MenuItem { text: "&Copy" }
+ MenuItem { text: "&Paste" }
+ }
+ Menu {
+ title: "&View"
+ Menu {
+ title: "&Alignment"
+ Menu {
+ title: "&Horizontal"
+ MenuItem { text: "&Left" }
+ MenuItem { text: "&Center" }
+ MenuItem { text: "&Right" }
+ }
+ Menu {
+ title: "&Vertical"
+ MenuItem { text: "&Top" }
+ MenuItem { text: "&Center" }
+ MenuItem { text: "&Bottom" }
+ }
+ }
+ }
+
+ Menu {
+ title: "&Help"
+ MenuItem { text: "&About" }
+ }
+ }
+
+ Rectangle {
+ id: contents
+ anchors.fill: parent
+ color: "green"
+ }
+
+ Text {
+ // dummy binding to test that fileMenu will be kept alive
+ // after a call to menuBar.removeMenu(fileMenu) followed
+ // by running the garbage collector.
+ text: fileMenu.title
+ }
+
+ Component {
+ id: menuComp
+ Menu {
+ objectName: "Extra"
+ title: "extra"
+ }
+ }
+
+ function addTestMenu()
+ {
+ let menu = menuComp.createObject(null)
+ menuBar.addMenu(menu)
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/mixed.qml b/tests/auto/quickcontrols/qquickmenubar/data/mixed.qml
new file mode 100644
index 0000000000..25dbf01e15
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenubar/data/mixed.qml
@@ -0,0 +1,55 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ id: root
+ property bool menuBarVisible: true
+ property alias fileMenu: fileMenu
+ property alias contents: contents
+
+ width: 400
+ height: 400
+ visible: true
+
+ menuBar: MenuBar {
+ visible: root.menuBarVisible
+ Menu {
+ id: fileMenu
+ title: "&File"
+ MenuItem { text: "&Open..." }
+ MenuItem { text: "&Save" }
+ MenuItem { text: "Save &As..." }
+ MenuSeparator { }
+ MenuItem { text: "&Quit" }
+ }
+
+ Rectangle {
+ color: "red"
+ width: 100
+ height: 20
+ }
+
+ Menu {
+ title: "&Edit"
+ MenuItem { text: "&Cut" }
+ MenuItem { text: "&Copy" }
+ MenuItem { text: "&Paste" }
+ }
+
+ MenuBarItem {
+ menu: Menu {
+ title: "&Help"
+ MenuItem { text: "&About" }
+ }
+ }
+ }
+
+ Rectangle {
+ id: contents
+ anchors.fill: parent
+ color: "green"
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/nodelegate.qml b/tests/auto/quickcontrols/qquickmenubar/data/nodelegate.qml
new file mode 100644
index 0000000000..552aea8400
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenubar/data/nodelegate.qml
@@ -0,0 +1,40 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ id: root
+
+ width: 400
+ height: 400
+ visible: true
+
+ menuBar: MenuBar {
+ delegate: null
+ Menu {
+ id: fileMenu
+ title: "&File"
+ MenuItem { text: "&Open..." }
+ MenuItem { text: "&Save" }
+ MenuItem { text: "Save &As..." }
+ MenuSeparator { }
+ MenuItem { text: "&Quit" }
+ }
+
+ Menu {
+ title: "&Edit"
+ MenuItem { text: "&Cut" }
+ MenuItem { text: "&Copy" }
+ MenuItem { text: "&Paste" }
+ }
+
+ MenuBarItem {
+ menu: Menu {
+ title: "&Help"
+ MenuItem { text: "&About" }
+ }
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenubar/data/showandhide.qml b/tests/auto/quickcontrols/qquickmenubar/data/showandhide.qml
new file mode 100644
index 0000000000..fe887c3f99
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickmenubar/data/showandhide.qml
@@ -0,0 +1,40 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ id: root
+
+ width: 400
+ height: 400
+ visible: true
+
+ menuBar: MenuBar {
+ Menu {
+ title: "Menu1"
+ Action { text: qsTr("Action") }
+ }
+
+ Menu {
+ title: "Menu2"
+ Action { text: qsTr("Action") }
+ }
+
+ MenuBarItem {
+ menu: Menu {
+ title: "Menu3"
+ Action { text: qsTr("Action") }
+ }
+ }
+
+ MenuBarItem {
+ visible: false
+ menu: Menu {
+ title: "Menu4"
+ Action { text: qsTr("Action") }
+ }
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickmenubar/tst_qquickmenubar.cpp b/tests/auto/quickcontrols/qquickmenubar/tst_qquickmenubar.cpp
index 63dec4dc6a..d56a48f2a7 100644
--- a/tests/auto/quickcontrols/qquickmenubar/tst_qquickmenubar.cpp
+++ b/tests/auto/quickcontrols/qquickmenubar/tst_qquickmenubar.cpp
@@ -11,7 +11,9 @@
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
#include <QtQuickTemplates2/private/qquickbutton_p.h>
#include <QtQuickTemplates2/private/qquickmenu_p.h>
+#include <QtQuickTemplates2/private/qquickmenu_p_p.h>
#include <QtQuickTemplates2/private/qquickmenubar_p.h>
+#include <QtQuickTemplates2/private/qquickmenubar_p_p.h>
#include <QtQuickTemplates2/private/qquickmenubaritem_p.h>
#include <QtQuickTemplates2/private/qquickmenuitem_p.h>
#include <QtQuickControlsTestUtils/private/controlstestutils_p.h>
@@ -28,19 +30,52 @@ public:
tst_qquickmenubar();
private slots:
+ void init() override;
void delegate();
+ void mouse_data();
void mouse();
void touch();
+ void keys_data();
void keys();
void mnemonics();
void altNavigation();
+ void addRemove_data();
void addRemove();
+ void addRemoveInlineMenus_data();
+ void addRemoveInlineMenus();
+ void addRemoveMenuFromQml_data();
+ void addRemoveMenuFromQml();
+ void insert_data();
+ void insert();
+ void showAndHideMenuBarItems_data();
+ void showAndHideMenuBarItems();
+ void removeMenuThatIsOpen();
+ void addRemoveExistingMenus_data();
+ void addRemoveExistingMenus();
+ void checkHighlightWhenMenuDismissed_data();
void checkHighlightWhenMenuDismissed();
+ void hoverAfterClosingWithEscape_data();
void hoverAfterClosingWithEscape();
+ void AA_DontUseNativeMenuBar();
+ void containerItems_data();
+ void containerItems();
+ void mixedContainerItems_data();
+ void mixedContainerItems();
+ void applicationWindow_data();
+ void applicationWindow();
+ void menubarAsHeader_data();
+ void menubarAsHeader();
+ void menuPosition();
+ void changeDelegate_data();
+ void changeDelegate();
+ void invalidDelegate_data();
+ void invalidDelegate();
+ void panMenuBar_data();
+ void panMenuBar();
private:
- static bool hasWindowActivation();
-
+ bool nativeMenuBarSupported = false;
+ bool popupWindowsSupported = false;
QScopedPointer<QPointingDevice> touchScreen = QScopedPointer<QPointingDevice>(QTest::createTouchDevice());
};
@@ -53,11 +88,17 @@ tst_qquickmenubar::tst_qquickmenubar()
: QQmlDataTest(QT_QMLTEST_DATADIR)
{
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+ QQuickMenuBar mb;
+ nativeMenuBarSupported = QQuickMenuBarPrivate::get(&mb)->useNativeMenuBar();
+ popupWindowsSupported = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::Capability::MultipleWindows);
}
-bool tst_qquickmenubar::hasWindowActivation()
+void tst_qquickmenubar::init()
{
- return (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation));
+ // Enable non-native menubars by default.
+ // Note that some tests will set this property to 'true', which
+ // is why we need to set it back to 'false' here.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, false);
}
void tst_qquickmenubar::delegate()
@@ -73,16 +114,27 @@ void tst_qquickmenubar::delegate()
QVERIFY(item);
}
+void tst_qquickmenubar::mouse_data()
+{
+ QTest::addColumn<bool>("usePopupWindow");
+ QTest::newRow("in-scene popup") << false;
+ // Uncomment when popup windows work 100%
+ // if (popupWindowsSupported)
+ // QTest::newRow("popup window") << true;
+}
+
void tst_qquickmenubar::mouse()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+
+ SKIP_IF_NO_WINDOW_ACTIVATION
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QSKIP("Mouse highlight not functional on offscreen/minimal platforms");
- QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+ QQmlApplicationEngine engine(testFileUrl("menubaritems.qml"));
QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
QVERIFY(window);
@@ -91,7 +143,7 @@ void tst_qquickmenubar::mouse()
moveMouseAway(window.data());
QVERIFY(QTest::qWaitForWindowActive(window.data()));
- QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
QVERIFY(menuBar);
QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
@@ -260,6 +312,8 @@ void tst_qquickmenubar::mouse()
// - It's what happens with e.g. overflow menus on Android.
void tst_qquickmenubar::touch()
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
QQuickControlsApplicationHelper helper(this, QLatin1String("touch.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
centerOnScreen(helper.window);
@@ -285,12 +339,23 @@ void tst_qquickmenubar::touch()
QTRY_VERIFY(fileMenuBarMenu->isOpened());
}
+void tst_qquickmenubar::keys_data()
+{
+ QTest::addColumn<bool>("usePopupWindow");
+ QTest::newRow("in-scene popup") << false;
+ // Uncomment when popup windows work 100%
+ // if (popupWindowsSupported)
+ // QTest::newRow("popup window") << true;
+}
+
void tst_qquickmenubar::keys()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
- QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+ SKIP_IF_NO_WINDOW_ACTIVATION
+
+ QQmlApplicationEngine engine(testFileUrl("menubaritems.qml"));
QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
QVERIFY(window);
@@ -299,7 +364,7 @@ void tst_qquickmenubar::keys()
moveMouseAway(window.data());
QVERIFY(QTest::qWaitForWindowActive(window.data()));
- QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
QVERIFY(menuBar);
QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
@@ -479,14 +544,16 @@ void tst_qquickmenubar::keys()
void tst_qquickmenubar::mnemonics()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+
+ SKIP_IF_NO_WINDOW_ACTIVATION
#if defined(Q_OS_MACOS) or defined(Q_OS_WEBOS)
QSKIP("Mnemonics are not used on this platform");
#endif
- QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+ QQmlApplicationEngine engine(testFileUrl("menubaritems.qml"));
QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
QVERIFY(window);
@@ -497,7 +564,7 @@ void tst_qquickmenubar::mnemonics()
MnemonicKeySimulator keySim(window.data());
- QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
QVERIFY(menuBar);
QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
@@ -632,10 +699,12 @@ void tst_qquickmenubar::mnemonics()
void tst_qquickmenubar::altNavigation()
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
if (!QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::MenuBarFocusOnAltPressRelease).toBool())
QSKIP("Menu doesn't get focus via Alt press&release on this platform");
- QQmlApplicationEngine engine(testFileUrl("menubar.qml"));
+ QQmlApplicationEngine engine(testFileUrl("menubaritems.qml"));
QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
QVERIFY(window);
@@ -644,7 +713,7 @@ void tst_qquickmenubar::altNavigation()
moveMouseAway(window.data());
QVERIFY(QTest::qWaitForWindowActive(window.data()));
- QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
QVERIFY(menuBar);
QQuickMenu *fileMenuBarMenu = menuBar->menuAt(0);
@@ -669,12 +738,30 @@ void tst_qquickmenubar::altNavigation()
QVERIFY(editMenuBarMenu->hasActiveFocus());
}
+void tst_qquickmenubar::addRemove_data()
+{
+ QTest::addColumn<QString>("testUrl");
+ QTest::addColumn<bool>("native");
+ QTest::newRow("menuitems, not native") << QStringLiteral("empty.qml") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("menuitems, native") << QStringLiteral("empty.qml") << true;
+}
+
void tst_qquickmenubar::addRemove()
{
- QQmlApplicationEngine engine(testFileUrl("empty.qml"));
+ QFETCH(QString, testUrl);
+ QFETCH(bool, native);
- QScopedPointer<QQuickMenuBar> menuBar(qobject_cast<QQuickMenuBar *>(engine.rootObjects().value(0)));
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl(testUrl));
+
+ QQuickMenuBar *menuBar = qobject_cast<QQuickMenuBar *>(engine.rootObjects().value(0));
QVERIFY(menuBar);
+ QQuickMenuBarPrivate *menuBarPrivate = QQuickMenuBarPrivate::get(menuBar);
+ QCOMPARE(menuBarPrivate->useNativeMenuBar(), native);
+ if (native)
+ QVERIFY(menuBarPrivate->nativeHandle());
QQmlComponent component(&engine);
component.setData("import QtQuick.Controls; Menu { }", QUrl());
@@ -690,7 +777,7 @@ void tst_qquickmenubar::addRemove()
QCOMPARE(menuBarItem1->menu(), menu1.data());
QCOMPARE(menuBar->itemAt(0), menuBarItem1.data());
- QScopedPointer<QQuickMenu> menu2(qobject_cast<QQuickMenu *>(component.create()));
+ QPointer<QQuickMenu> menu2(qobject_cast<QQuickMenu *>(component.create()));
QVERIFY(!menu2.isNull());
menuBar->insertMenu(0, menu2.data());
QCOMPARE(menuBar->count(), 2);
@@ -703,15 +790,26 @@ void tst_qquickmenubar::addRemove()
QCOMPARE(menuBar->itemAt(0), menuBarItem2.data());
QCOMPARE(menuBar->itemAt(1), menuBarItem1.data());
- // takeMenu(int) does not destroy the menu, but does destroy the respective item in the menubar
+ // takeMenu(int) does not explicitly destroy the menu, but leave
+ // this to the garbage collector. The MenuBarItem, OTOH, is currently
+ // being destroyed from c++, but this might change in the future.
QCOMPARE(menuBar->takeMenu(1), menu1.data());
QCOMPARE(menuBar->count(), 1);
QVERIFY(!menuBar->menuAt(1));
QVERIFY(!menuBar->itemAt(1));
- QCoreApplication::sendPostedEvents(menu1.data(), QEvent::DeferredDelete);
+ QTRY_VERIFY(menuBarItem1.isNull());
+ QVERIFY(!menu1.isNull());
+ gc(engine);
QVERIFY(!menu1.isNull());
- QCoreApplication::sendPostedEvents(menuBarItem1, QEvent::DeferredDelete);
- QVERIFY(menuBarItem1.isNull());
+
+ // check that it's safe to call takeMenu(int) with
+ // an index that is out of range.
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression(".*out of range"));
+ QCOMPARE(menuBar->takeMenu(-1), nullptr);
+ QCOMPARE(menuBar->count(), 1);
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression(".*out of range"));
+ QCOMPARE(menuBar->takeMenu(10), nullptr);
+ QCOMPARE(menuBar->count(), 1);
// addMenu(Menu) re-creates the respective item in the menubar
menuBar->addMenu(menu1.data());
@@ -719,18 +817,295 @@ void tst_qquickmenubar::addRemove()
menuBarItem1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(1));
QVERIFY(!menuBarItem1.isNull());
- // removeMenu(Menu) destroys both the menu and the respective item in the menubar
+ // removeMenu(menu) does not explicitly destroy the menu, but leave
+ // this to the garbage collector. The MenuBarItem, OTOH, is currently
+ // being destroyed from c++, but this might change in the future.
menuBar->removeMenu(menu1.data());
QCOMPARE(menuBar->count(), 1);
QVERIFY(!menuBar->itemAt(1));
- QCoreApplication::sendPostedEvents(menu1.data(), QEvent::DeferredDelete);
- QVERIFY(menu1.isNull());
- QCoreApplication::sendPostedEvents(menuBarItem1, QEvent::DeferredDelete);
- QVERIFY(menuBarItem1.isNull());
+ QTRY_VERIFY(menuBarItem1.isNull());
+ QVERIFY(!menu1.isNull());
+ gc(engine);
+ QVERIFY(!menu1.isNull());
+}
+
+void tst_qquickmenubar::addRemoveInlineMenus_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::addRemoveInlineMenus()
+{
+ // Check that it's safe to remove a menu from the menubar, that
+ // is an inline child from QML (fileMenu). Since it's owned by
+ // JavaScript, it should be deleted by the gc when appropriate, and
+ // not upon a call to removeMenu.
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ auto window = qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0));
+ QVERIFY(window);
+ auto menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QPointer<QQuickMenu> fileMenu = window->property("fileMenu").value<QQuickMenu *>();
+ QVERIFY(fileMenu);
+ QCOMPARE(menuBar->menuAt(0), fileMenu);
+
+ QPointer<QQuickItem> menuBarItem = menuBar->itemAt(0);
+ QVERIFY(menuBarItem);
+
+ menuBar->removeMenu(fileMenu);
+ QVERIFY(menuBar->menuAt(0) != fileMenu);
+ QTRY_VERIFY(!menuBarItem);
+ QVERIFY(fileMenu);
+ gc(engine);
+ QVERIFY(fileMenu);
+
+ // Add it back again, but to the end. This should also be fine, even
+ // if it no longer matches the initial order in the QML file.
+ menuBar->addMenu(fileMenu);
+ QVERIFY(fileMenu);
+ QCOMPARE(menuBar->menuAt(menuBar->count() - 1), fileMenu);
+}
+
+void tst_qquickmenubar::addRemoveMenuFromQml_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::addRemoveMenuFromQml()
+{
+ // Create a menu dynamically from QML, and add it to
+ // the menubar. Remove it again. Check that the
+ // garbage collector will then destruct it.
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ auto window = qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0));
+ QVERIFY(window);
+ auto menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ const int initialMenuCount = menuBar->count();
+ QVERIFY(initialMenuCount > 0);
+
+ QMetaObject::invokeMethod(window, "addTestMenu");
+
+ QCOMPARE(menuBar->count(), initialMenuCount + 1);
+
+ // The "extra" menu should have been added to
+ // the end of the menu bar. Verify this.
+ QQuickItem *item = menuBar->itemAt(menuBar->count() - 1);
+ QPointer<QQuickMenuBarItem> menuBarItem = qobject_cast<QQuickMenuBarItem *>(item);
+ QVERIFY(menuBarItem);
+ QPointer<QQuickMenu> menu = menuBar->menuAt(menuBar->count() - 1);
+ QVERIFY(menu);
+ QCOMPARE(menu->title(), "extra");
+ QCOMPARE(menuBarItem->menu(), menu);
+
+ // Remove the menu again. Since we have no other references to
+ // it from QML, it should be collected by the gc.
+ menuBar->removeMenu(menu);
+ QCOMPARE(menuBar->count(), initialMenuCount);
+ QTRY_VERIFY(!menuBarItem);
+ QVERIFY(menu);
+ gc(engine);
+ QVERIFY(!menu);
+}
+
+void tst_qquickmenubar::insert_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::insert()
+{
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ const int initialMenuCount = menuBar->count();
+ QVERIFY(initialMenuCount > 0);
+
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick.Controls; Menu { }", QUrl());
+
+ QPointer<QQuickMenu> menu1(qobject_cast<QQuickMenu *>(component.create()));
+ QVERIFY(!menu1.isNull());
+ menuBar->insertMenu(0, menu1.data());
+ QCOMPARE(menuBar->count(), initialMenuCount + 1);
+ QCOMPARE(menuBar->menuAt(0), menu1.data());
+
+ QPointer<QQuickMenu> menu2(qobject_cast<QQuickMenu *>(component.create()));
+ QVERIFY(!menu2.isNull());
+ menuBar->insertMenu(2, menu2.data());
+ QCOMPARE(menuBar->count(), initialMenuCount + 2);
+ QCOMPARE(menuBar->menuAt(2), menu2.data());
+}
+
+void tst_qquickmenubar::showAndHideMenuBarItems_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::showAndHideMenuBarItems()
+{
+ // Check that you can toggle MenuBarItem.visible to show and hide menus in the
+ // menu bar. Note that this is not the same as setting Menu.visible, which will
+ // instead open or close the menus.
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("showandhide.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ QCOMPARE(menuBar->count(), 4);
+
+ auto menuBarItem0 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(0));
+ auto menuBarItem1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(1));
+ auto menuBarItem2 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(2));
+ auto menuBarItem3 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(3));
+
+ // Initially, the three first MenuBarItems are visible, but the 4th is hidden
+ QVERIFY(menuBarItem0->isVisible());
+ QVERIFY(menuBarItem1->isVisible());
+ QVERIFY(menuBarItem2->isVisible());
+ QVERIFY(!menuBarItem3->isVisible());
+
+ // Native and visible QQuickMenus should be backed by
+ // QPlatformMenus. Otherwise the handle should be nullptr.
+ QCOMPARE(bool(QQuickMenuPrivate::get(menuBarItem0->menu())->maybeNativeHandle()), native);
+ QCOMPARE(bool(QQuickMenuPrivate::get(menuBarItem1->menu())->maybeNativeHandle()), native);
+ QCOMPARE(bool(QQuickMenuPrivate::get(menuBarItem2->menu())->maybeNativeHandle()), native);
+ QVERIFY(!QQuickMenuPrivate::get(menuBarItem3->menu())->maybeNativeHandle());
+
+ // Make the hidden MenuBarItem visible
+ menuBarItem3->setVisible(true);
+ QCOMPARE(bool(QQuickMenuPrivate::get(menuBarItem3->menu())->maybeNativeHandle()), native);
+ QCOMPARE(menuBar->count(), 4);
+ // Hide it again
+ menuBarItem3->setVisible(false);
+ QVERIFY(!QQuickMenuPrivate::get(menuBarItem3->menu())->maybeNativeHandle());
+ QCOMPARE(menuBar->count(), 4);
+
+ // Toggle the visibility of a MenuBarItem created from the
+ // delegate, which is also initially visible.
+ menuBarItem0->setVisible(false);
+ QVERIFY(!QQuickMenuPrivate::get(menuBarItem0->menu())->maybeNativeHandle());
+ QCOMPARE(menuBar->count(), 4);
+ // Hide it again
+ menuBarItem0->setVisible(true);
+ QCOMPARE(bool(QQuickMenuPrivate::get(menuBarItem0->menu())->maybeNativeHandle()), native);
+ QCOMPARE(menuBar->count(), 4);
+}
+
+void tst_qquickmenubar::removeMenuThatIsOpen()
+{
+ // Check that if we remove a menu that is open, it ends
+ // up being hidden / closed. This is mostly important for
+ // non-native menubars.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QQuickMenu *fileMenu = window->property("fileMenu").value<QQuickMenu *>();
+ QVERIFY(fileMenu);
+ fileMenu->open();
+ QVERIFY(fileMenu->isVisible());
+ menuBar->removeMenu(fileMenu);
+ QVERIFY(fileMenu);
+ QTRY_VERIFY(!fileMenu->isVisible());
+}
+
+void tst_qquickmenubar::addRemoveExistingMenus_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::addColumn<bool>("usePopupWindow");
+ QTest::newRow("non-native, in-scene") << false << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native, native") << true << true;
+ // Uncomment when popup windows work 100%
+ // if (popupWindowsSupported)
+ // QTest::newRow("non-native, popup window") << false << true;
+}
+
+void tst_qquickmenubar::addRemoveExistingMenus()
+{
+ // Check that you get warnings if trying to add menus that
+ // are already in the menubar, or remove menus that are not.
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ auto window = qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0));
+ QVERIFY(window);
+ auto menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QPointer<QQuickMenu> fileMenu = window->property("fileMenu").value<QQuickMenu *>();
+ QVERIFY(fileMenu);
+ QCOMPARE(menuBar->menuAt(0), fileMenu);
+
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot add menu.*"));
+ menuBar->addMenu(fileMenu);
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot insert menu.*"));
+ menuBar->insertMenu(0, fileMenu);
+ menuBar->removeMenu(fileMenu);
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot remove menu.*"));
+ menuBar->removeMenu(fileMenu);
+}
+
+void tst_qquickmenubar::checkHighlightWhenMenuDismissed_data()
+{
+ QTest::addColumn<bool>("usePopupWindow");
+ QTest::newRow("in-scene popup") << false;
+ // Uncomment when popup windows work 100%
+ // if (popupWindowsSupported)
+ // QTest::newRow("popup window") << true;
}
void tst_qquickmenubar::checkHighlightWhenMenuDismissed()
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QSKIP("Mouse highlight not functional on offscreen/minimal platforms");
@@ -787,8 +1162,19 @@ void tst_qquickmenubar::checkHighlightWhenMenuDismissed()
QVERIFY(!dynamicMenuBarItem->isHighlighted());
}
+void tst_qquickmenubar::hoverAfterClosingWithEscape_data()
+{
+ QTest::addColumn<bool>("usePopupWindow");
+ QTest::newRow("in-scene popup") << false;
+ // Uncomment when popup windows work 100%
+ // if (popupWindowsSupported)
+ // QTest::newRow("popup window") << true;
+}
+
void tst_qquickmenubar::hoverAfterClosingWithEscape()
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QSKIP("Mouse highlight not functional on offscreen/minimal platforms");
@@ -821,6 +1207,527 @@ void tst_qquickmenubar::hoverAfterClosingWithEscape()
QVERIFY(!secondMenu->isVisible());
}
+void tst_qquickmenubar::AA_DontUseNativeMenuBar()
+{
+ // Check that we end up with a non-native menu bar when AA_DontUseNativeMenuBar is set.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ auto menuBarPrivate = QQuickMenuBarPrivate::get(menuBar);
+ QQuickItem *contents = window->property("contents").value<QQuickItem *>();
+ QVERIFY(contents);
+
+ QVERIFY(!menuBarPrivate->nativeHandle());
+ QVERIFY(menuBar->isVisible());
+ QVERIFY(menuBar->count() > 0);
+ QVERIFY(menuBar->height() > 0);
+ QCOMPARE(contents->height(), window->height() - menuBar->height());
+
+ // If the menu bar is not native, the menus should not be native either.
+ // The main reason for this limitation is that a native menu typically
+ // run in separate native event loop which will not forward mouse events
+ // to Qt. And this is needed for a non-native menu bar to work (e.g to
+ // support hovering over the menu bar items to open and close menus).
+ const auto firstMenu = menuBar->menuAt(0);
+ QVERIFY(firstMenu);
+ QVERIFY(!QQuickMenuPrivate::get(firstMenu)->maybeNativeHandle());
+}
+
+void tst_qquickmenubar::containerItems_data()
+{
+ QTest::addColumn<QString>("testUrl");
+ QTest::addColumn<bool>("native");
+ QTest::newRow("menuitems, not native") << QStringLiteral("menubaritems.qml") << false;
+ QTest::newRow("menus, not native") << QStringLiteral("menus.qml") << false;
+ if (nativeMenuBarSupported) {
+ QTest::newRow("menuitems, native") << QStringLiteral("menubaritems.qml") << true;
+ QTest::newRow("menus, native") << QStringLiteral("menus.qml") << true;
+ }
+}
+
+void tst_qquickmenubar::containerItems()
+{
+ // Check that the MenuBar ends up containing a MenuBarItem
+ // for each Menu added. This should be the case regardless of
+ // if the MenuBar is native or not. There are several ways
+ // of accessing those MenuBarItems and menus in the MenuBar
+ // API, so check that all end up in sync.
+ QFETCH(QString, testUrl);
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl(testUrl));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ auto *menuBarPrivate = QQuickMenuBarPrivate::get(menuBar);
+ QCOMPARE(menuBarPrivate->useNativeMenuBar(), native);
+
+ QCOMPARE(menuBar->count(), 4);
+ for (int i = 0; i < menuBar->count(); ++i) {
+ QQuickMenu *menu = menuBar->menuAt(i);
+ QVERIFY(menu);
+
+ // Test the itemAt() API
+ QQuickItem *item = menuBar->itemAt(i);
+ QVERIFY(item);
+ auto menuBarItem = qobject_cast<QQuickMenuBarItem *>(item);
+ QVERIFY(menuBarItem);
+ QCOMPARE(menuBarItem->menu(), menu);
+
+ // Test the "contentData" list property API
+ auto cd = menuBarPrivate->contentData();
+ QCOMPARE(cd.count(&cd), menuBar->count());
+ auto cdItem = static_cast<QQuickItem *>(cd.at(&cd, i));
+ QVERIFY(cdItem);
+ auto cdMenuBarItem = qobject_cast<QQuickMenuBarItem *>(cdItem);
+ QVERIFY(cdMenuBarItem);
+ QCOMPARE(cdMenuBarItem->menu(), menu);
+
+ // Test the "menus" list property API
+ auto menus = QQuickMenuBarPrivate::get(menuBar)->menus();
+ QCOMPARE(menus.count(&menus), menuBar->count());
+ auto menusMenu = menus.at(&menus, i);
+ QVERIFY(menusMenu);
+ QCOMPARE(menusMenu, menu);
+ }
+}
+
+void tst_qquickmenubar::mixedContainerItems_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::mixedContainerItems()
+{
+ // The application is allowed to add items other
+ // than MenuBarItems and Menus as children. But those
+ // should just be ignored by the MenuBar (and the Container).
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("mixed.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ // The menubar has four children, but only three of them are
+ // Menus and MenuBarItems. So we should therefore only end up
+ // with three menus in the MenuBar, and three items in the Container.
+ QCOMPARE(menuBar->count(), 3);
+ for (int i = 0; i < 3; ++i) {
+ auto item = menuBar->itemAt(i);
+ QVERIFY(item);
+ auto menuBarItem = qobject_cast<QQuickMenuBarItem *>(item);
+ QVERIFY(menuBarItem);
+ QCOMPARE(menuBarItem->menu(), menuBar->menuAt(i));
+ }
+
+ // Try to add an unsupported item dynamically. It should
+ // have no impact on the MenuBar/Container API.
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick; Item { }", QUrl());
+ QPointer<QQuickItem> plainItem(qobject_cast<QQuickItem *>(component.create()));
+ QVERIFY(plainItem);
+
+ menuBar->addItem(plainItem);
+ QCOMPARE(menuBar->count(), 3);
+ for (int i = 0; i < 3; ++i) {
+ auto item = menuBar->itemAt(i);
+ QVERIFY(item);
+ auto menuBarItem = qobject_cast<QQuickMenuBarItem *>(item);
+ QVERIFY(menuBarItem);
+ QCOMPARE(menuBarItem->menu(), menuBar->menuAt(i));
+ }
+
+ // Remove it again. It should have no impact on
+ // the MenuBar/Container API.
+ menuBar->removeItem(plainItem);
+ QCOMPARE(menuBar->count(), 3);
+ for (int i = 0; i < 3; ++i) {
+ auto item = menuBar->itemAt(i);
+ QVERIFY(item);
+ auto menuBarItem = qobject_cast<QQuickMenuBarItem *>(item);
+ QVERIFY(menuBarItem);
+ QCOMPARE(menuBarItem->menu(), menuBar->menuAt(i));
+ }
+}
+
+void tst_qquickmenubar::applicationWindow_data()
+{
+ QTest::addColumn<bool>("initiallyNative");
+ QTest::addColumn<bool>("initiallyVisible");
+ QTest::newRow("initially not native, visible") << false << true;
+ QTest::newRow("initially not native, hidden") << false << false;
+ if (nativeMenuBarSupported) {
+ QTest::newRow("initially native, visible") << true << true;
+ QTest::newRow("initially native, hidden") << true << false;
+ }
+}
+
+void tst_qquickmenubar::applicationWindow()
+{
+ // Check that ApplicationWindow adds or removes the non-native
+ // menubar in response to toggling Qt::AA_DontUseNativeMenuBar and
+ // MenuBar.visible.
+ QFETCH(bool, initiallyNative);
+ QFETCH(bool, initiallyVisible);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !initiallyNative);
+ QQmlApplicationEngine engine;
+ engine.setInitialProperties({{ "visible", initiallyVisible }});
+ engine.load(testFileUrl("menus.qml"));
+
+ QPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ auto menuBarPrivate = QQuickMenuBarPrivate::get(menuBar);
+ QQuickItem *contents = window->property("contents").value<QQuickItem *>();
+ QVERIFY(contents);
+
+ for (const bool visible : {initiallyVisible, !initiallyVisible, initiallyVisible}) {
+ menuBar->setVisible(visible);
+
+ const bool nativeMenuBarVisible = bool(menuBarPrivate->nativeHandle());
+ QCOMPARE(nativeMenuBarVisible, initiallyNative && visible);
+
+ if (!visible) {
+ QVERIFY(!menuBar->isVisible());
+ QVERIFY(!nativeMenuBarVisible);
+ QCOMPARE(contents->height(), window->height());
+ } else if (nativeMenuBarVisible) {
+ QVERIFY(menuBar->isVisible());
+ QCOMPARE(contents->height(), window->height());
+ } else {
+ QVERIFY(menuBar->isVisible());
+ QVERIFY(menuBar->height() > 0);
+ QCOMPARE(contents->height(), window->height() - menuBar->height());
+ }
+ }
+}
+
+void tst_qquickmenubar::menubarAsHeader_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::menubarAsHeader()
+{
+ // ApplicationWindow.menuBar was added in Qt 5.10. Before that
+ // the menuBar was supposed to be assigned to ApplicationWindow.header.
+ // For backwards compatibility, check that you can still do that.
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menubarAsHeader.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ auto menuBarPrivate = QQuickMenuBarPrivate::get(menuBar);
+ QQuickItem *contents = window->property("contents").value<QQuickItem *>();
+ QVERIFY(contents);
+ QVERIFY(menuBar->count() > 0);
+ QCOMPARE(menuBarPrivate->nativeHandle() != nullptr, native);
+
+ if (menuBarPrivate->nativeHandle()) {
+ // Using native menubar
+ QCOMPARE(contents->height(), window->height());
+ } else {
+ // Not using native menubar
+ QCOMPARE(contents->height(), window->height() - menuBar->height());
+ }
+}
+
+void tst_qquickmenubar::menuPosition()
+{
+ // A Menu.qml will typically have a background with a drop-shadow. And to make
+ // room for this shadow, the Menu itself is made bigger by using Control.insets.
+ // This will make room for both the background and its shadow.
+ // To make sure that the corner of the background (rather than the shadow) ends up
+ // at the requested menu position, the effective position of the menu will be
+ // shifted a bit up and left. This test will therefore check that the corner of the
+ // background ends up that the requested position.
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
+ // Use in-scene popups for this test, since we have no guarantee where a window
+ // manager might end up placing a menu.
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+
+ QPointF requestedPos{50, 50};
+
+ QQuickMenu *editMenu = menuBar->menuAt(1);
+ QVERIFY(editMenu);
+ editMenu->setX(requestedPos.x());
+ editMenu->setY(requestedPos.y());
+ editMenu->setVisible(true);
+ QTRY_VERIFY(editMenu->isOpened());
+ QCOMPARE(editMenu->x(), requestedPos.x());
+ QCOMPARE(editMenu->y(), requestedPos.y());
+
+ QQuickItem *background = editMenu->background();
+ QVERIFY(background);
+
+ QPointF bgPos = background->mapToItem(editMenu->parentItem(), {0, 0});
+ QCOMPARE(bgPos, requestedPos);
+}
+
+void tst_qquickmenubar::changeDelegate_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::newRow("not native") << false;
+ if (nativeMenuBarSupported)
+ QTest::newRow("native") << true;
+}
+
+void tst_qquickmenubar::changeDelegate()
+{
+ // Check that you can change the delegate, and that this
+ // will produce new delegate items, except for the MenuBarItem
+ // that is created inline in the QML code, and hence doesn't use the delegate.
+ QFETCH(bool, native);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("nodelegate.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ QCOMPARE(menuBar->count(), 3);
+
+ QQmlComponent delegate1(&engine);
+ delegate1.setData("import QtQuick.Controls; MenuBarItem {}", QUrl());
+ menuBar->setDelegate(&delegate1);
+
+ auto menuBarItem0_v1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(0));
+ auto menuBarItem1_v1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(1));
+ auto menuBarItem2_v1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(2));
+ QVERIFY(menuBarItem0_v1);
+ QVERIFY(menuBarItem1_v1);
+ QVERIFY(menuBarItem2_v1);
+ QVERIFY(menuBarItem0_v1->isVisible());
+ QVERIFY(menuBarItem1_v1->isVisible());
+ QVERIFY(menuBarItem2_v1->isVisible());
+ QVERIFY(menuBarItem0_v1->menu());
+ QVERIFY(menuBarItem1_v1->menu());
+ QVERIFY(menuBarItem2_v1->menu());
+ QCOMPARE(menuBar->menuAt(0), menuBarItem0_v1->menu());
+ QCOMPARE(menuBar->menuAt(1), menuBarItem1_v1->menu());
+ QCOMPARE(menuBar->menuAt(2), menuBarItem2_v1->menu());
+
+ // Change the delegate
+ QQmlComponent delegate2(&engine);
+ delegate2.setData("import QtQuick.Controls; MenuBarItem {}", QUrl());
+ menuBar->setDelegate(&delegate2);
+
+ auto menuBarItem0_v2 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(0));
+ auto menuBarItem1_v2 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(1));
+ auto menuBarItem2_v2 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(2));
+ QVERIFY(menuBarItem0_v2);
+ QVERIFY(menuBarItem1_v2);
+ QVERIFY(menuBarItem2_v2);
+
+ // The delegate items should now have changed, except for
+ // menuBarItem2, which is not created from the delegate.
+ QVERIFY(menuBarItem0_v2 != menuBarItem0_v1);
+ QVERIFY(menuBarItem1_v2 != menuBarItem1_v1);
+ QCOMPARE(menuBarItem2_v2, menuBarItem2_v1);
+
+ QVERIFY(menuBarItem0_v2->isVisible());
+ QVERIFY(menuBarItem1_v2->isVisible());
+ QVERIFY(menuBarItem2_v2->isVisible());
+ QVERIFY(menuBarItem0_v2->menu());
+ QVERIFY(menuBarItem1_v2->menu());
+ QVERIFY(menuBarItem2_v2->menu());
+ QCOMPARE(menuBar->menuAt(0), menuBarItem0_v2->menu());
+ QCOMPARE(menuBar->menuAt(1), menuBarItem1_v2->menu());
+ QCOMPARE(menuBar->menuAt(2), menuBarItem2_v2->menu());
+}
+
+void tst_qquickmenubar::invalidDelegate_data()
+{
+ QTest::addColumn<bool>("native");
+ QTest::addColumn<bool>("useInvalidDelegate");
+ QTest::newRow("not native, no delegate") << false << false;
+ QTest::newRow("not native, invalid delegate") << false << true;
+ if (nativeMenuBarSupported) {
+ QTest::newRow("native, no delegate") << true << false;
+ QTest::newRow("native, invalid delegate") << true << true;
+ }
+}
+
+void tst_qquickmenubar::invalidDelegate()
+{
+ // Check that QQuickMenuBar can handle a delegate that is either null, or not a
+ // MenuBarItem. The former won't produce any warnings, but the latter should.
+ // In either case, this will not produce visible menus in the menu bar, except
+ // for the menus that are wrapped inside inline MenuBarItems, and therefore
+ // not using the delegate.
+ // To ensure that we still bookkeep the menus for the failing delegates, in case
+ // the delegate changes later, and that functions such as menuAt(index) continues
+ // to work, hidden placeholder MenuBarItems will be used instead.
+ QFETCH(bool, native);
+ QFETCH(bool, useInvalidDelegate);
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, !native);
+ QQmlApplicationEngine engine;
+
+ if (useInvalidDelegate) {
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot insert menu.*"));
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot insert menu.*"));
+ }
+
+ if (useInvalidDelegate)
+ engine.load(testFileUrl("invaliddelegate.qml"));
+ else
+ engine.load(testFileUrl("nodelegate.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ QCOMPARE(menuBar->count(), 3);
+
+ // Menu 2 is an inline MenuBarItem, and is unaffected by the delegate
+ auto inlineMenuBarItem = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(2));
+
+ for (int i = 0; i <= 2; ++i) {
+ auto menuBarItem = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(i));
+ QVERIFY(menuBarItem);
+ auto menu = menuBarItem->menu();
+ QVERIFY(menu);
+ QCOMPARE(menu, menuBar->menuAt(i));
+ if (menuBarItem == inlineMenuBarItem) {
+ QVERIFY(menuBarItem->isVisible());
+ QCOMPARE(bool(QQuickMenuPrivate::get(menu)->maybeNativeHandle()), native);
+ } else {
+ // Menus created from the invalid delegate should be hidden. They should also
+ // not have a native handle, since they should not be in a native menu bar.
+ QVERIFY(!menuBarItem->isVisible());
+ QVERIFY(!bool(QQuickMenuPrivate::get(menu)->maybeNativeHandle()));
+ }
+ }
+
+ // Add a new menu. This one should also be inserted into a placeholder MenuBarItem
+ if (useInvalidDelegate)
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("cannot insert menu.*"));
+
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick.Controls; Menu { }", QUrl());
+ auto menu = qobject_cast<QQuickMenu *>(component.create());
+ QVERIFY(menu);
+
+ menuBar->addMenu(menu);
+ QCOMPARE(menuBar->count(), 4);
+ auto menuBarItem3 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(3));
+ QVERIFY(menuBarItem3);
+ QVERIFY(!menuBarItem3->isVisible());
+ QCOMPARE(menuBar->menuAt(3), menu);
+ QCOMPARE(menuBar->menuAt(3), menuBarItem3->menu());
+ QVERIFY(!QQuickMenuPrivate::get(menu)->maybeNativeHandle());
+
+ // Finally, set a valid delegate. This will make all MenuBarItems visible.
+ QQmlComponent delegate(&engine);
+ delegate.setData("import QtQuick.Controls; MenuBarItem { }", QUrl());
+ menuBar->setDelegate(&delegate);
+
+ for (int i = 0; i <= 3; ++i) {
+ auto menuBarItem = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(i));
+ QVERIFY(menuBarItem);
+ QVERIFY(menuBarItem->isVisible());
+ auto menu = menuBarItem->menu();
+ QVERIFY(menu);
+ QCOMPARE(menu, menuBar->menuAt(i));
+ QCOMPARE(bool(QQuickMenuPrivate::get(menu)->maybeNativeHandle()), native);
+ }
+
+ // inlineMenuBarItem was not created from a delegate, and shouldn't change
+ QCOMPARE(qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(2)), inlineMenuBarItem);
+}
+
+void tst_qquickmenubar::panMenuBar_data()
+{
+ QTest::addColumn<bool>("usePopupWindow");
+ QTest::newRow("in-scene popup") << false;
+ // Uncomment when popup windows work 100%
+ // if (popupWindowsSupported)
+ // QTest::newRow("popup window") << true;
+}
+
+void tst_qquickmenubar::panMenuBar()
+{
+ // Check that a MenuBarItem's menu opens when you click it. And then check that
+ // if you hover the next MenuBarItem in the MenuBar, that the first one will
+ // close, and the second one will open.
+
+#if !defined(Q_OS_MACOS) || !defined(Q_OS_WINDOWS)
+ QSKIP("This test doesn't pass on e.g QNX. It needs more investigation before it can be enabled");
+#endif
+
+#ifdef Q_OS_ANDROID
+ // Android theme does not use hover effects, so moving the mouse would not
+ // highlight an item
+ QSKIP("Panning of MenuBar not supported");
+#endif
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
+ QQmlApplicationEngine engine;
+ engine.load(testFileUrl("menus.qml"));
+
+ QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0)));
+ QVERIFY(window);
+ QQuickMenuBar *menuBar = window->property("menuBar").value<QQuickMenuBar *>();
+ QVERIFY(menuBar);
+ QQuickMenuBarPrivate *menuBar_d = QQuickMenuBarPrivate::get(menuBar);
+
+ auto menuBarItem0 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(0));
+ auto menuBarItem1 = qobject_cast<QQuickMenuBarItem *>(menuBar->itemAt(1));
+ QVERIFY(menuBarItem0);
+ QVERIFY(menuBarItem1);
+
+ QTest::mouseClick(window.data(), Qt::LeftButton, Qt::NoModifier, itemSceneCenter(menuBarItem0));
+ QVERIFY(menuBarItem0->isHighlighted());
+ QVERIFY(!menuBarItem1->isHighlighted());
+ QCOMPARE(menuBar_d->currentItem, menuBarItem0);
+ QVERIFY(menuBar_d->currentMenuOpen);
+ QTRY_VERIFY(menuBarItem0->menu()->isOpened());
+
+ QTest::mouseMove(window.data(), itemSceneCenter(menuBarItem1));
+ QVERIFY(!menuBarItem0->isHighlighted());
+ QVERIFY(menuBarItem1->isHighlighted());
+ QCOMPARE(menuBar_d->currentItem, menuBarItem1);
+ QVERIFY(menuBar_d->currentMenuOpen);
+ QTRY_VERIFY(menuBarItem1->menu()->isOpened());
+ QTRY_VERIFY(!menuBarItem0->menu()->isOpened());
+}
+
QTEST_QUICKCONTROLS_MAIN(tst_qquickmenubar)
#include "tst_qquickmenubar.moc"
diff --git a/tests/auto/quickcontrols/qquickpopup/BLACKLIST b/tests/auto/quickcontrols/qquickpopup/BLACKLIST
index bd2185328f..67d99026aa 100644
--- a/tests/auto/quickcontrols/qquickpopup/BLACKLIST
+++ b/tests/auto/quickcontrols/qquickpopup/BLACKLIST
@@ -23,3 +23,10 @@ opensuse-leap
[cursorShape]
opensuse-leap
+
+[popupWindowFocus]
+* # QTBUG-121363
+
+# QTBUG-126175
+[popupWindowChangingParent]
+linux
diff --git a/tests/auto/quickcontrols/qquickpopup/data/popupCenterIn.qml b/tests/auto/quickcontrols/qquickpopup/data/popupCenterIn.qml
new file mode 100644
index 0000000000..6a67af30fc
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickpopup/data/popupCenterIn.qml
@@ -0,0 +1,22 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+Window {
+ width: 1080
+ height: 720
+
+ property alias popup: simplepopup
+
+ Popup {
+ id: simplepopup
+ anchors.centerIn: parent
+ popupType: Popup.Window
+
+ Text {
+ text: "I am a centered popup"
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickpopup/data/popupWindowFocusHandling.qml b/tests/auto/quickcontrols/qquickpopup/data/popupWindowFocusHandling.qml
new file mode 100644
index 0000000000..1477db047e
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickpopup/data/popupWindowFocusHandling.qml
@@ -0,0 +1,28 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+Window {
+ width: 400
+ height: 400
+
+ property alias popup: simplepopup
+ property alias textField1: outerTextField
+ property alias textField2: innerTextField
+
+ TextField {
+ id: outerTextField
+ focus: true
+ }
+
+ Popup {
+ id: simplepopup
+ popupType: Popup.Window
+ TextField {
+ id: innerTextField
+ focus: true
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickpopup/data/popupWithButtonInBackground.qml b/tests/auto/quickcontrols/qquickpopup/data/popupWithButtonInBackground.qml
new file mode 100644
index 0000000000..b265a80df7
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickpopup/data/popupWithButtonInBackground.qml
@@ -0,0 +1,28 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+Window {
+ width: 1080
+ height: 720
+
+ property alias popup: simplepopup
+
+ Button {
+ text: "Button"
+ }
+
+ Popup {
+ id: simplepopup
+ popupType: Popup.Window
+
+ x: 50
+ y: 50
+
+ Text {
+ text: "I am a very interesting popup"
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickpopup/data/reparentingPopup.qml b/tests/auto/quickcontrols/qquickpopup/data/reparentingPopup.qml
new file mode 100644
index 0000000000..e747704e4b
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickpopup/data/reparentingPopup.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+Window {
+ width: 400
+ height: 400
+
+ property alias popup: simplepopup
+ property alias rectangle1: item1
+ property alias rectangle2: item2
+ property alias rectangle3: item3
+
+ Popup {
+ id: simplepopup
+ visible: true
+ popupType: Popup.Window
+ x: 10
+ y: 10
+ width: 200
+ height: 200
+ }
+
+ Rectangle {
+ id: item1
+ color: "red"
+ width: 200
+ height: 200
+ }
+
+ Rectangle {
+ id: item2
+ color: "green"
+ x: 0
+ y: 200
+ width: parent.width
+ height: 200
+ Rectangle {
+ id: item3
+ color: "blue"
+ x: 200
+ y: 0
+ width: 200
+ height: item2.height
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickpopup/data/simplepopup.qml b/tests/auto/quickcontrols/qquickpopup/data/simplepopup.qml
new file mode 100644
index 0000000000..60371d20d4
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickpopup/data/simplepopup.qml
@@ -0,0 +1,23 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+Window {
+ width: 1080
+ height: 720
+
+ property alias popup: simplepopup
+
+ Popup {
+ id: simplepopup
+ popupType: Popup.Window
+ x: 50
+ y: 50
+
+ Text {
+ text: "I am a very interesting popup"
+ }
+ }
+}
diff --git a/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp b/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp
index f894387672..a10c0aa53a 100644
--- a/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp
@@ -16,18 +16,21 @@
#include <QtQuickTestUtils/private/viewtestutils_p.h>
#include <QtQuickTestUtils/private/visualtestutils_p.h>
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
+#include <QtQuickTemplates2/private/qquickbutton_p.h>
#include <QtQuickTemplates2/private/qquickcombobox_p.h>
#include <QtQuickTemplates2/private/qquickdialog_p.h>
+#include <QtQuickTemplates2/private/qquickdrawer_p.h>
#include <QtQuickTemplates2/private/qquickoverlay_p.h>
#include <QtQuickTemplates2/private/qquickoverlay_p_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p.h>
+#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
+#include <QtQuickTemplates2/private/qquickpopupanchors_p.h>
#include <QtQuickTemplates2/private/qquickpopupitem_p_p.h>
-#include <QtQuickTemplates2/private/qquickbutton_p.h>
+#include <QtQuickTemplates2/private/qquickpopupwindow_p_p.h>
#include <QtQuickTemplates2/private/qquickslider_p.h>
#include <QtQuickTemplates2/private/qquickstackview_p.h>
-#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
#include <QtQuickTemplates2/private/qquicktooltip_p.h>
-#include <QtQuickTemplates2/private/qquickdrawer_p.h>
+#include <QtQuick/private/qquicktextinput_p.h>
#include <QtQuick/private/qquicklistview_p.h>
#include <QtQuick/private/qquicktextedit_p.h>
#include <QtQuick/private/qquickdroparea_p.h>
@@ -111,8 +114,16 @@ private slots:
void fadeDimmer();
void noDimmer();
+ void popupWindowPositioning();
+ void popupWindowAnchorsCenterIn_data();
+ void popupWindowAnchorsCenterIn();
+ void popupWindowModality();
+ void popupWindowClosesOnParentWindowClosing();
+ void popupWindowChangingParent();
+ void popupWindowFocus();
+ void popupWindowChangeFromWindowToInScene();
+
private:
- static bool hasWindowActivation();
QScopedPointer<QPointingDevice> touchScreen = QScopedPointer<QPointingDevice>(QTest::createTouchDevice());
};
@@ -126,6 +137,7 @@ tst_QQuickPopup::tst_QQuickPopup()
void tst_QQuickPopup::initTestCase()
{
QQmlDataTest::initTestCase();
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
qputenv("QML_NO_TOUCH_COMPRESSION", "1");
}
@@ -136,11 +148,6 @@ void tst_QQuickPopup::visible_data()
QTest::newRow("ApplicationWindow") << "applicationwindow.qml";
}
-bool tst_QQuickPopup::hasWindowActivation()
-{
- return (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation));
-}
-
void tst_QQuickPopup::visible()
{
QFETCH(QString, source);
@@ -519,8 +526,7 @@ void tst_QQuickPopup::closePolicy_data()
void tst_QQuickPopup::closePolicy()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QFETCH(QString, source);
QFETCH(const QPointingDevice *, device);
@@ -662,8 +668,7 @@ void tst_QQuickPopup::closePolicy_grabberInside()
void tst_QQuickPopup::activeFocusOnClose1()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Test that a popup that never sets focus: true (e.g. ToolTip) doesn't affect
// the active focus item when it closes.
@@ -708,8 +713,7 @@ void tst_QQuickPopup::activeFocusOnClose1()
void tst_QQuickPopup::activeFocusOnClose2()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Test that a popup that sets focus: true but relinquishes focus (e.g. by
// calling forceActiveFocus() on another item) before it closes doesn't
@@ -750,8 +754,7 @@ void tst_QQuickPopup::activeFocusOnClose2()
void tst_QQuickPopup::activeFocusOnClose3()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Test that a closing popup that had focus doesn't steal focus from
// another popup that the focus was transferred to.
@@ -786,8 +789,7 @@ void tst_QQuickPopup::activeFocusOnClose3()
void tst_QQuickPopup::activeFocusOnClosingSeveralPopups()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Test that active focus isn't lost when multiple popup closing simultaneously
QQuickControlsApplicationHelper helper(this, QStringLiteral("activeFocusOnClosingSeveralPopups.qml"));
@@ -838,8 +840,7 @@ void tst_QQuickPopup::activeFocusOnClosingSeveralPopups()
void tst_QQuickPopup::activeFocusAfterExit()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Test that after closing a popup the highest one in z-order receives it instead.
QQuickControlsApplicationHelper helper(this, QStringLiteral("activeFocusAfterExit.qml"));
@@ -890,8 +891,7 @@ void tst_QQuickPopup::activeFocusAfterExit()
void tst_QQuickPopup::activeFocusOnDelayedEnter()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Test that after opening two popups, first of which has an animation, does not cause
// the first one to receive focus after the animation stops.
@@ -919,8 +919,7 @@ void tst_QQuickPopup::activeFocusOnDelayedEnter()
// key events due to having active focus.
void tst_QQuickPopup::activeFocusDespiteLowerStackingOrder()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, QStringLiteral("activeFocusOnClose3.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
@@ -961,8 +960,7 @@ void tst_QQuickPopup::activeFocusDespiteLowerStackingOrder()
void tst_QQuickPopup::activeFocusItemAfterWindowInactive()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, QStringLiteral("activeFocusAfterWindowInactive.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
@@ -1448,8 +1446,7 @@ void tst_QQuickPopup::componentComplete()
void tst_QQuickPopup::closeOnEscapeWithNestedPopups()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
// Tests the scenario in the Gallery example, where there are nested popups that should
// close in the correct order when the Escape key is pressed.
@@ -1518,8 +1515,7 @@ void tst_QQuickPopup::closeOnEscapeWithNestedPopups()
void tst_QQuickPopup::closeOnEscapeWithVisiblePopup()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, QStringLiteral("closeOnEscapeWithVisiblePopup.qml"));
QVERIFY2(helper.ready, helper.failureMessage());
@@ -1629,8 +1625,7 @@ void tst_QQuickPopup::qquickview()
// QTBUG-73447
void tst_QQuickPopup::disabledPalette()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, "disabledPalette.qml");
QVERIFY2(helper.ready, helper.failureMessage());
@@ -1669,8 +1664,7 @@ void tst_QQuickPopup::disabledPalette()
void tst_QQuickPopup::disabledParentPalette()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, "disabledPalette.qml");
QVERIFY2(helper.ready, helper.failureMessage());
@@ -1778,8 +1772,7 @@ void tst_QQuickPopup::setOverlayParentToNull()
void tst_QQuickPopup::tabFence()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
if (QGuiApplication::styleHints()->tabFocusBehavior() != Qt::TabFocusAllControls)
QSKIP("This platform only allows tab focus for text controls");
@@ -1891,8 +1884,7 @@ void tst_QQuickPopup::centerInOverlayWithinStackViewItem()
void tst_QQuickPopup::destroyDuringExitTransition()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
QQuickControlsApplicationHelper helper(this, "destroyDuringExitTransition.qml");
QVERIFY2(helper.ready, helper.failureMessage());
@@ -2387,6 +2379,334 @@ void tst_QQuickPopup::noDimmer()
QTRY_VERIFY(!drawer->isModal());
}
+#define VERIFY_LOCAL_POS(POPUP, EXPECTED) \
+ QTRY_COMPARE_LE(qAbs(POPUP->x() - qreal(EXPECTED.x())), 1); \
+ QCOMPARE_LE(qAbs(POPUP->position().x() - qreal(EXPECTED.x())), 1); \
+ QCOMPARE_LE(qAbs(POPUP->y() - qreal(EXPECTED.y())), 1); \
+ QCOMPARE_LE(qAbs(POPUP->position().y() - qreal(EXPECTED.y())), 1)
+
+#define VERIFY_GLOBAL_POS(FROM, POPUPWINDOW, EXPECTED) \
+ do { \
+ const auto expectedGlobalPos = FROM->mapToGlobal(EXPECTED.x(), EXPECTED.y()); \
+ const auto actualGlobalPos = POPUPWINDOW->position(); \
+ QTRY_COMPARE_LE(qAbs(actualGlobalPos.x() - qFloor(expectedGlobalPos.x())), 1); \
+ QCOMPARE_LE(qAbs(actualGlobalPos.y() - qFloor(expectedGlobalPos.y())), 1); \
+ } while (false)
+
+void tst_QQuickPopup::popupWindowPositioning()
+{
+ QQuickApplicationHelper helper(this, "simplepopup.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+
+ QSignalSpy xSpy(popup, SIGNAL(xChanged()));
+ QSignalSpy ySpy(popup, SIGNAL(yChanged()));
+
+ auto *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+
+ // x and y properties should be 50 initially
+ const QPoint initialPos(50, 50);
+
+ VERIFY_GLOBAL_POS(popup->parentItem(), popupWindow, initialPos);
+ VERIFY_LOCAL_POS(popup, initialPos);
+
+ // Move popup via QQuickPopup API
+ const QPoint secondPosition(100, 100);
+ popup->setPosition(secondPosition.toPointF());
+
+ QTRY_COMPARE(xSpy.count(), 1);
+ QCOMPARE(ySpy.count(), 1);
+
+ VERIFY_GLOBAL_POS(popup->parentItem(), popupWindow, secondPosition);
+ VERIFY_LOCAL_POS(popup, secondPosition);
+
+ // Move popup via QWindow API (which uses global coordinates)
+ const QPoint thirdPosition(150, 150);
+ popupWindow->setPosition(popup->parentItem()->mapToGlobal(thirdPosition.x(), thirdPosition.y()).toPoint());
+
+ QTRY_COMPARE(xSpy.count(), 2);
+ QCOMPARE(ySpy.count(), 2);
+
+ VERIFY_GLOBAL_POS(popup->parentItem(), popupWindow, thirdPosition);
+ VERIFY_LOCAL_POS(popup, thirdPosition);
+
+ // Moving parent window should change the popups position (because it's stationary, but x and y are relative coordinates)
+ const QPoint movement(30, 30);
+ const QPoint oldPos = window->position();
+ window->setPosition(oldPos + movement);
+
+ // TODO: Figure out these signals are emitted twice
+ // QTRY_COMPARE(xSpy.count(), 3);
+ // QCOMPARE(ySpy.count(), 3);
+
+ VERIFY_GLOBAL_POS(popup->parentItem(), popupWindow, (thirdPosition - movement));
+}
+
+void tst_QQuickPopup::popupWindowAnchorsCenterIn_data()
+{
+ QTest::addColumn<bool>("centerInParent");
+ QTest::newRow("parent") << true;
+ QTest::newRow("overlay") << false;
+}
+
+void tst_QQuickPopup::popupWindowAnchorsCenterIn()
+{
+ QFETCH(bool, centerInParent);
+
+ QQuickApplicationHelper helper(this, "popupCenterIn.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ popupPrivate->getAnchors()->setCenterIn(centerInParent ? window->contentItem() : QQuickOverlay::overlay(window));
+
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+
+ auto *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+
+ const QPoint centeredPosition(qFloor(window->width() / 2 - popupWindow->width() / 2), qFloor(window->height() / 2 - popupWindow->height() / 2));
+
+ VERIFY_GLOBAL_POS(popup->parentItem(), popupWindow, centeredPosition);
+ VERIFY_LOCAL_POS(popup, centeredPosition);
+}
+
+void tst_QQuickPopup::popupWindowModality()
+{
+ QSKIP("The behavior isn't correctly implemented yet. Waiting for patch in qtbase");
+
+ QQuickApplicationHelper helper(this, "popupWithButtonInBackground.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ auto *button = window->findChild<QQuickButton *>();
+ QVERIFY(button);
+
+ QSignalSpy buttonSpy(button, SIGNAL(clicked()));
+
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+
+ auto *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+ QVERIFY(popupWindow->isVisible());
+ // NonModal by default
+ QCOMPARE(popupWindow->modality(), Qt::NonModal);
+
+ // Non modal popups should close on press outside
+ QTest::mouseClick(helper.window, Qt::LeftButton, Qt::NoModifier, button->mapToScene(QPointF(button->width() / 2, button->height() / 2)).toPoint());
+ QTRY_COMPARE(buttonSpy.count(), 1);
+ QVERIFY(!popupWindow->isVisible());
+
+ popup->setModal(true);
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+ QVERIFY(popupWindow->isVisible());
+ QCOMPARE(popupWindow->modality(), Qt::ApplicationModal);
+
+ // Pressing outside the popup shouldn't cause the button to get the event, because of modality.
+ QTest::mouseClick(helper.window, Qt::LeftButton, Qt::NoModifier, button->mapToScene(QPointF(button->width() / 2, button->height() / 2)).toPoint());
+ QCoreApplication::processEvents();
+ QCOMPARE(buttonSpy.count(), 1);
+ QVERIFY(popupWindow->isVisible());
+
+ popup->close();
+ QTRY_VERIFY(!popup->isVisible());
+}
+
+void tst_QQuickPopup::popupWindowClosesOnParentWindowClosing()
+{
+ QSKIP("The behavior isn't correctly implemented yet. Waiting for patch in qtbase");
+ QQuickApplicationHelper helper(this, "simplepopup.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+
+ auto *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+ QVERIFY(popupWindow->isVisible());
+
+ // Closing parent window, should close child window;
+ window->close();
+
+ QTRY_VERIFY(!window->isVisible());
+ QTRY_VERIFY(!popupWindow->isVisible());
+}
+
+void tst_QQuickPopup::popupWindowChangingParent()
+{
+ QQuickApplicationHelper helper(this, "reparentingPopup.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+
+ QQuickItem *item1 = window->property("rectangle1").value<QQuickItem *>();
+ QVERIFY(item1);
+
+ QQuickItem *item2 = window->property("rectangle2").value<QQuickItem *>();
+ QVERIFY(item2);
+
+ QQuickItem *item3 = window->property("rectangle3").value<QQuickItem *>();
+ QVERIFY(item3);
+
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+
+ auto *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+ QVERIFY(popupWindow->isVisible());
+
+ const QPoint initialPos(10, 10);
+
+ VERIFY_GLOBAL_POS(item1, popupWindow, initialPos);
+ VERIFY_LOCAL_POS(popup, initialPos);
+
+ popup->setParentItem(item1);
+
+ VERIFY_GLOBAL_POS(item1, popupWindow, initialPos);
+ VERIFY_LOCAL_POS(popup, initialPos);
+
+ popup->setParentItem(item2);
+
+ VERIFY_GLOBAL_POS(item2, popupWindow, initialPos);
+ VERIFY_LOCAL_POS(popup, initialPos);
+
+ popup->setParentItem(item3);
+
+ VERIFY_GLOBAL_POS(item3, popupWindow, initialPos);
+ VERIFY_LOCAL_POS(popup, initialPos);
+}
+
+void tst_QQuickPopup::popupWindowFocus()
+{
+ QQuickApplicationHelper helper(this, "popupWindowFocusHandling.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickWindow *window = helper.window;
+ QVERIFY(window);
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+ QQuickTextInput *textField1 = window->property("textField1").value<QQuickTextInput *>();
+ QVERIFY(textField1);
+ QQuickTextInput *textField2 = window->property("textField2").value<QQuickTextInput *>();
+ QVERIFY(textField2);
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ window->show();
+ QVERIFY(QTest::qWaitForWindowFocused(window));
+ QVERIFY(QGuiApplication::focusObject() == textField1);
+ QTest::keyClick(helper.window, Qt::Key_Q);
+ QTRY_COMPARE(textField1->text(), "q");
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+ auto *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+ QVERIFY(popupWindow->isVisible());
+ // The focusWindow should still be the main window,
+ // the popup window should get its event forwarded via the delivery agent
+ QVERIFY(QGuiApplication::focusWindow() == helper.window);
+ QVERIFY(popupWindow->focusObject() == textField2);
+ QTest::keyClick(popupWindow, Qt::Key_T);
+ QTRY_COMPARE(textField2->text(), "t");
+ popup->close();
+ QTRY_VERIFY(!popup->isVisible());
+ QVERIFY(QGuiApplication::focusObject() == textField1);
+}
+
+void tst_QQuickPopup::popupWindowChangeFromWindowToInScene()
+{
+ QQuickApplicationHelper helper(this, "simplepopup.qml");
+ QVERIFY2(helper.ready, helper.failureMessage());
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+ auto *popup = window->contentItem()->findChild<QQuickPopup *>();
+ QVERIFY(popup);
+ auto *popupPrivate = QQuickPopupPrivate::get(popup);
+ QVERIFY(popupPrivate);
+ if (!popupPrivate->usePopupWindow())
+ QSKIP("The platform doesn't support native popup windows. Skipping test.");
+
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+ const QWindow *popupWindow = popupPrivate->popupWindow;
+ QVERIFY(popupWindow);
+ QVERIFY(popupWindow->isVisible());
+ popup->close();
+ QTRY_VERIFY(!popupWindow->isVisible());
+ QVERIFY(!popup->isVisible());
+ popup->setPopupType(QQuickPopup::Item);
+ popup->open();
+ QTRY_VERIFY(popup->isVisible());
+ QQuickOverlay *overlay = QQuickOverlay::overlay(window);
+ QVERIFY(overlay);
+ QVERIFY(overlay->childItems().contains(popup->popupItem()));
+ popup->close();
+}
+
QTEST_QUICKCONTROLS_MAIN(tst_QQuickPopup)
#include "tst_qquickpopup.moc"
diff --git a/tests/auto/quickcontrols/qquicktextarea/tst_qquicktextarea.cpp b/tests/auto/quickcontrols/qquicktextarea/tst_qquicktextarea.cpp
index a576bb7941..75e2550d7a 100644
--- a/tests/auto/quickcontrols/qquicktextarea/tst_qquicktextarea.cpp
+++ b/tests/auto/quickcontrols/qquicktextarea/tst_qquicktextarea.cpp
@@ -12,6 +12,7 @@
#include <QtQuick/qquickview.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
#include <QtQuickTestUtils/private/viewtestutils_p.h>
+#include <QtQuickTestUtils/private/visualtestutils_p.h>
#include <QtQuickTemplates2/private/qquicktextarea_p.h>
#include <QtQuickControlsTestUtils/private/qtest_quickcontrols_p.h>
@@ -29,7 +30,6 @@ private slots:
void touchscreenSetsFocusAndMovesCursor();
private:
- static bool hasWindowActivation();
QScopedPointer<QPointingDevice> touchDevice = QScopedPointer<QPointingDevice>(QTest::createTouchDevice());
};
@@ -102,8 +102,7 @@ void tst_QQuickTextArea::touchscreenDoesNotSelect()
void tst_QQuickTextArea::touchscreenSetsFocusAndMovesCursor()
{
- if (!hasWindowActivation())
- QSKIP("Window activation is not supported");
+ SKIP_IF_NO_WINDOW_ACTIVATION
qunsetenv("QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR");
QQuickView window;
@@ -158,11 +157,6 @@ void tst_QQuickTextArea::touchscreenSetsFocusAndMovesCursor()
QCOMPARE_GT(top->selectedText().size(), 0);
}
-bool tst_QQuickTextArea::hasWindowActivation()
-{
- return (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation));
-}
-
QTEST_QUICKCONTROLS_MAIN(tst_QQuickTextArea)
#include "tst_qquicktextarea.moc"
diff --git a/tests/auto/quickcontrols/qquickuniversalstyle/tst_qquickuniversalstyle.cpp b/tests/auto/quickcontrols/qquickuniversalstyle/tst_qquickuniversalstyle.cpp
index f703c549f8..538bac0203 100644
--- a/tests/auto/quickcontrols/qquickuniversalstyle/tst_qquickuniversalstyle.cpp
+++ b/tests/auto/quickcontrols/qquickuniversalstyle/tst_qquickuniversalstyle.cpp
@@ -2,4 +2,18 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtQuickTest/quicktest.h>
-QUICK_TEST_MAIN(tst_qquickuniversalstyle)
+
+class Setup : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void applicationAvailable()
+ {
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ }
+};
+
+QUICK_TEST_MAIN_WITH_SETUP(tst_qquickuniversalstyle, Setup)
+
+#include "tst_qquickuniversalstyle.moc"
diff --git a/tests/auto/quickcontrols/snippets/tst_snippets.cpp b/tests/auto/quickcontrols/snippets/tst_snippets.cpp
index f0d1da48d7..68e6ef5dfa 100644
--- a/tests/auto/quickcontrols/snippets/tst_snippets.cpp
+++ b/tests/auto/quickcontrols/snippets/tst_snippets.cpp
@@ -39,6 +39,9 @@ static QMap<QString, QStringPair> findSnippets(const QDir &inputDir, const QDir
void tst_Snippets::initTestCase()
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+
qInfo() << "Snippets are taken from" << QQC2_SNIPPETS_PATH;
QDir snippetsDir(QQC2_SNIPPETS_PATH);
diff --git a/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp b/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp
index 2afcd81a44..f4e35a37bf 100644
--- a/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp
+++ b/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp
@@ -814,7 +814,6 @@ void tst_QQuickFolderDialogImpl::itemsDisabledWhenNecessary()
QVERIFY(breadcrumbBar->textField()->isVisible());
QCOMPARE(openButton->isEnabled(), false);
#endif
-
// Hide it with the escape key. The Open button should now be enabled.
QTest::keyClick(dialogHelper.window(), Qt::Key_Escape);
QVERIFY(!breadcrumbBar->textField()->isVisible());
diff --git a/tests/auto/quickwidgets/qquickwidget/BLACKLIST b/tests/auto/quickwidgets/qquickwidget/BLACKLIST
index 095e9ee484..8b5585a41e 100644
--- a/tests/auto/quickwidgets/qquickwidget/BLACKLIST
+++ b/tests/auto/quickwidgets/qquickwidget/BLACKLIST
@@ -1,5 +1,12 @@
[tabKey]
opensuse-42.3
opensuse-leap
+macos-12
[enterLeave]
macos
+[focusOnClickInProxyWidget]
+macos-12
+[focusPreserved]
+macos-12
+[synthMouseFromTouch]
+macos-12
diff --git a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
index 0067c716e0..3d5cb6e3b0 100644
--- a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
+++ b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
@@ -14,6 +14,7 @@
#include <QtQuick/private/qquicktaphandler_p.h>
#include <QtQuickTemplates2/private/qquickbutton_p.h>
#include <QtQuickTestUtils/private/qmlutils_p.h>
+#include <QtQuickTestUtils/private/visualtestutils_p.h>
#include <QtGui/QWindow>
#include <QtGui/QScreen>
#include <QtGui/QImage>
@@ -991,8 +992,7 @@ void tst_qquickwidget::focusOnClickInProxyWidget()
void tst_qquickwidget::focusPreserved()
{
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
- QSKIP("Window Activation is not supported.");
+ SKIP_IF_NO_WINDOW_ACTIVATION
if (QGuiApplication::platformName() == "android")
QSKIP("Test doesn't exit cleanly on Android and generates many warnings - QTBUG-112696");
diff --git a/tests/baseline/controls/BLACKLIST b/tests/baseline/controls/BLACKLIST
new file mode 100644
index 0000000000..834b16d765
--- /dev/null
+++ b/tests/baseline/controls/BLACKLIST
@@ -0,0 +1,15 @@
+# animated controls, can't take stable snapshot
+[native:busyIndicator/busy_indicator]
+*
+[basic:busyIndicator/busy_indicator]
+*
+[universal:busyIndicator/busy_indicator]
+*
+[imagine:busyIndicator/busy_indicator]
+*
+[fusion:busyIndicator/busy_indicator]
+*
+[material:busyIndicator/busy_indicator]
+*
+[ios:busyIndicator/busy_indicator]
+*
diff --git a/tests/baseline/controls/data/textarea/textarea.qml b/tests/baseline/controls/data/textarea/textarea.qml
index e34709c6cf..57b57606b4 100644
--- a/tests/baseline/controls/data/textarea/textarea.qml
+++ b/tests/baseline/controls/data/textarea/textarea.qml
@@ -8,11 +8,13 @@ ColumnLayout {
TextArea {
text: "TextArea\n...\n...\n...\n..."
+ cursorVisible: false
}
TextArea {
placeholderText: "TextArea\n...\n...\n..."
enabled: false
+ cursorVisible: false
}
TextArea {
@@ -24,6 +26,7 @@ ColumnLayout {
TextArea {
text: "TextArea\n...\n...\n...\n..."
LayoutMirroring.enabled: true
+ cursorVisible: false
}
}
diff --git a/tests/baseline/controls/data/textfield/textfield.qml b/tests/baseline/controls/data/textfield/textfield.qml
index bc0b1f215f..00b00913f8 100644
--- a/tests/baseline/controls/data/textfield/textfield.qml
+++ b/tests/baseline/controls/data/textfield/textfield.qml
@@ -9,21 +9,25 @@ ColumnLayout {
TextField {
placeholderText: qsTr("Enter text")
enabled: false
+ cursorVisible: false
}
TextField {
placeholderText: qsTr("Enter text")
placeholderTextColor: "red"
+ cursorVisible: false
}
TextField {
placeholderText: qsTr("Enter text")
focus: true
+ cursorVisible: false
}
TextField {
placeholderText: qsTr("Enter text")
LayoutMirroring.enabled: true
+ cursorVisible: false
}
TextField {
@@ -31,5 +35,6 @@ ColumnLayout {
+ "sed do eiusmod tempor incididunt utlabore et dolore magna"
+ "aliqua.Ut enim ad minim veniam, quis nostrud exercitation"
+ "ullamco laboris nisi ut aliquip ex ea commodo consequat.")
+ cursorVisible: false
}
}
diff --git a/tests/baseline/scenegraph/data/shape/shape_fillItem.qml b/tests/baseline/scenegraph/data/shape/shape_fillItem.qml
new file mode 100644
index 0000000000..0862e364b5
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_fillItem.qml
@@ -0,0 +1,177 @@
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ width: 640
+ height: 840
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer; rotationAmount: 0 }
+ ListElement { renderer: Shape.GeometryRenderer; rotationAmount: 30 }
+ ListElement { renderer: Shape.CurveRenderer; rotationAmount: 0 }
+ ListElement { renderer: Shape.CurveRenderer; rotationAmount: 30 }
+ }
+
+ Image {
+ id: image
+ visible: false
+ source: "../shared/col320x480.jpg"
+ }
+
+ Image {
+ id: tiledImage
+ visible: false
+ source: "../shared/col320x480.jpg"
+ layer.enabled: true
+ layer.smooth: true
+ layer.wrapMode: ShaderEffectSource.Repeat
+ }
+
+ Image {
+ id: asynchronousImage
+ visible: false
+ source: "../shared/col320x480.jpg"
+ layer.enabled: true
+ layer.smooth: true
+ layer.wrapMode: ShaderEffectSource.Repeat
+ asynchronous: true
+ }
+
+ Rectangle {
+ id: item
+ visible: false
+ layer.enabled: true
+ layer.smooth: true
+ layer.wrapMode: ShaderEffectSource.Repeat
+ color: "cyan"
+ width: 20
+ height: 20
+ Text {
+ anchors.centerIn: parent
+ text: "😊"
+ }
+ }
+
+ Rectangle {
+ id: sourceItem
+ color: "cyan"
+ width: 20
+ height: 20
+ Text {
+ anchors.centerIn: parent
+ text: "😁"
+ }
+ }
+
+ ShaderEffectSource {
+ id: shaderEffectSource
+ sourceItem: sourceItem
+ width: 20
+ height: 20
+ wrapMode: ShaderEffectSource.Repeat
+ visible: false
+ hideSource: true
+ smooth: true
+ }
+
+ Row {
+ anchors.fill: parent
+ Repeater {
+ model: renderers
+ Column {
+ Shape {
+ id: shape
+ preferredRendererType: renderer
+ width: 160
+ height: 700
+ property real rotate: rotationAmount
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillItem: image
+ fillTransform: PlanarTransform.fromRotate(shape.rotate)
+
+ PathRectangle {
+ x: 10; y: 10
+ width: 140
+ height: 100
+ }
+
+ // startX: 10; startY: 10
+ // PathLine { relativeX: 140; relativeY: 0 }
+ // PathLine { relativeX: 0; relativeY: 100 }
+ // PathLine { relativeX: -140; relativeY: 0 }
+ // PathLine { relativeX: 0; relativeY: -100 }
+ }
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillItem: tiledImage
+
+ PathRectangle {
+ x: 10; y: 10 + 1 * 140
+ width: 140
+ height: 100
+ }
+ fillTransform: PlanarTransform.fromRotate(shape.rotate)
+ }
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillItem: item
+ fillTransform: PlanarTransform.fromRotate(shape.rotate)
+
+ PathRectangle {
+ x: 10; y: 10 + 2 * 140
+ width: 140
+ height: 100
+ }
+ }
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillItem: asynchronousImage
+ fillTransform: PlanarTransform.fromRotate(shape.rotate)
+
+ PathRectangle {
+ x: 10; y: 10 + 3 * 140
+ width: 140
+ height: 100
+ }
+ }
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillItem: shaderEffectSource
+ fillTransform: PlanarTransform.fromRotate(shape.rotate)
+
+ PathRectangle {
+ x: 10; y: 10 + 4 * 140
+ width: 140
+ height: 100
+ }
+ }
+ }
+
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 200
+ x: 10
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillItem: image
+ fillTransform: PlanarTransform.fromRotate(shape.rotate)
+
+ PathRectangle {
+ width: 140
+ height: 100
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/shape/shape_gradient_xf.qml b/tests/baseline/scenegraph/data/shape/shape_gradient_xf.qml
new file mode 100644
index 0000000000..a0a33d9f2c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_gradient_xf.qml
@@ -0,0 +1,81 @@
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ width: 320
+ height: 480
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ Row {
+ Repeater {
+ model: renderers
+ Column {
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillGradient: LinearGradient {
+ y1: 50; y2: 80
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "cyan" }
+ }
+ fillTransform: PlanarTransform.fromAffineMatrix(0.8, 0.2, 0.3, 1.5, 20, -50 + startY)
+
+ startX: 10; startY: 10
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillGradient: RadialGradient {
+ centerX: 80
+ centerY: 75
+ centerRadius: centerY
+ focalX: centerX
+ focalY: centerY
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: .5; color: "cyan" }
+ GradientStop { position: 1; color: "black" }
+ }
+ fillTransform: PlanarTransform.fromAffineMatrix(0.8, 0.2, 0.3, 1.5, 20, -50 + startY)
+
+ startX: 10; startY: 10 + 1 * 140
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillGradient: ConicalGradient {
+ centerX: 80
+ centerY: 75
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: .5; color: "cyan" }
+ GradientStop { position: 1; color: "black" }
+ }
+ fillTransform: PlanarTransform.fromAffineMatrix(0.8, 0.2, 0.3, 1.5, 20, -50 + startY)
+
+ startX: 10; startY: 10 + 2 * 140
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/shape/shape_intersecting8.qml b/tests/baseline/scenegraph/data/shape/shape_intersecting8.qml
new file mode 100644
index 0000000000..fa6e062e17
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_intersecting8.qml
@@ -0,0 +1,64 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ width: 600
+ height: 600
+
+ ListModel {
+ id: fillRules
+ ListElement { fillrule: ShapePath.WindingFill }
+ ListElement { fillrule: ShapePath.OddEvenFill }
+ }
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ ListModel {
+ id: svgstrings
+ ListElement { scaleToFit: 0.6; offsetX: 20; offsetY: 20; pathString: "M 10 100 Q 10 89.6447 17.3223 82.3223 Q 24.6447 75 35 75 Q 45.3553 75 52.6777 82.3223 Q 60 89.6447 60 100 Q 60 85.5025 67.3223 75.2513 Q 74.6447 65 85 65 Q 95.3553 65 102.678 75.2513 Q 110 85.5025 110 100 Q 110 75.1472 117.322 57.5736 Q 124.645 40 135 40 Q 145.355 40 152.678 57.5736 Q 160 75.1472 160 100 Q 171.603 83.923 185 83.923 Q 198.397 83.923 210 100 L 10 100" }
+ }
+ Column {
+ Repeater {
+ model: renderers
+ Column {
+ Repeater {
+ model: fillRules
+ Row {
+ Repeater {
+ model: svgstrings
+ Rectangle {
+ width: 150
+ height: 150
+ border.color: "black"
+
+ Shape {
+ preferredRendererType: renderer
+ ShapePath {
+ fillColor: renderer == Shape.CurveRenderer ? "#99483d8b" : "#99dc143c"
+ fillRule: fillrule
+ strokeWidth: 0
+ PathSvg { path: pathString }
+ }
+
+ transform: Matrix4x4 {
+ matrix: Qt.matrix4x4(scaleToFit, 0, 0, offsetX,
+ 0, scaleToFit, 0, offsetY,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1)
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/shape/shape_rectangle.qml b/tests/baseline/scenegraph/data/shape/shape_rectangle.qml
new file mode 100644
index 0000000000..50e2895f85
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_rectangle.qml
@@ -0,0 +1,151 @@
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ width: 320
+ height: 480
+ color: "lightgray"
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ Row {
+ padding: 10
+ Repeater {
+ model: renderers
+ Column {
+ spacing: 10
+ Shape {
+ width: 160
+ preferredRendererType: renderer
+
+ ShapePath {
+ fillColor: "transparent"
+ strokeColor: "blue"
+ strokeWidth: 1
+
+ PathRectangle {
+ x: 20; y: 0
+ width: 100; height: 20
+ }
+
+ PathRectangle {
+ x: 20.5; y: 30.5
+ width: 100; height: 20
+ }
+ }
+ }
+
+ Shape {
+ width: 160
+ preferredRendererType: renderer
+
+ ShapePath {
+ fillColor: "yellow"
+ strokeColor: "transparent"
+
+ PathRectangle {
+ x: 20; y: 0
+ width: 100; height: 20
+ }
+
+ PathRectangle {
+ x: 20.5; y: 30.5
+ width: 100; height: 20
+ }
+ }
+ }
+
+ Shape {
+ width: 160
+ preferredRendererType: renderer
+
+ ShapePath {
+ fillColor: "yellow"
+ strokeColor: "green"
+ strokeWidth: 5
+ joinStyle: ShapePath.RoundJoin
+
+ PathRectangle {
+ x: 20; y: 00
+ width: 100; height: 20
+ }
+
+ PathRectangle {
+ x: 20; y: 30
+ width: 100; height: 20
+ radius: 5
+ }
+ }
+
+ ShapePath {
+ fillColor: "yellow"
+ strokeColor: "green"
+ strokeWidth: 5
+ joinStyle: ShapePath.MiterJoin
+
+ PathRectangle {
+ x: 20; y: 60
+ width: 100; height: 20
+ }
+
+ PathRectangle {
+ x: 20; y: 90
+ width: 100; height: 20
+ radius: 5
+ }
+
+ PathRectangle {
+ x: 20; y: 120
+ width: 100; height: 20
+ radius: 50
+ }
+
+ PathRectangle {
+ x: 20; y: 150
+ width: 100; height: 30
+ radius: 10
+ topLeftRadius: 50
+ bottomRightRadius: 5
+ bottomLeftRadius: 0
+ }
+ }
+ }
+
+ Rectangle {
+ id: rect
+ width: 120
+ height: 60
+ color: "white"
+ border.width: 20
+ border.color: "blue"
+ topRightRadius: 30
+ }
+
+ Shape {
+ width: 160
+ preferredRendererType: renderer
+
+ ShapePath {
+ id: myPath
+ fillColor: rect.color
+ strokeColor: rect.border.color
+ strokeWidth: rect.border.width
+ joinStyle: ShapePath.MiterJoin
+
+ PathRectangle {
+ width: rect.width
+ height: rect.height
+ topRightRadius: rect.topRightRadius
+ strokeAdjustment: myPath.strokeWidth
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/baseline/scenegraph/data/shape/shape_spread_xf.qml b/tests/baseline/scenegraph/data/shape/shape_spread_xf.qml
new file mode 100644
index 0000000000..c9f67e472d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_spread_xf.qml
@@ -0,0 +1,47 @@
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ width: 320
+ height: 480
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ Row {
+ Repeater {
+ model: renderers
+ Column {
+ Repeater {
+ model: 3
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+ ShapePath {
+ strokeColor: "transparent"
+
+ fillGradient: LinearGradient {
+ id: grad
+ y1: 50; y2: 80
+ spread: model.index === 0 ? ShapeGradient.PadSpread : (model.index === 1 ? ShapeGradient.RepeatSpread : ShapeGradient.ReflectSpread)
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "red" }
+ }
+ fillTransform: PlanarTransform.fromShear(0, 0.2)
+
+ startX: 10; startY: 10
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/shape/shape_updatecolor.qml b/tests/baseline/scenegraph/data/shape/shape_updatecolor.qml
new file mode 100644
index 0000000000..32cc73ad45
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_updatecolor.qml
@@ -0,0 +1,77 @@
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ width: 320
+ height: 800
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ Row {
+ Repeater {
+ model: renderers
+ Column {
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillColor: "red"
+
+ startX: 10; startY: 10
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillColor: "red"
+
+ startX: 10; startY: 10 + 1 * 140
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+ Timer {
+ interval: 100
+ running: true
+ onTriggered: s.fillColor = Qt.rgba(0, 1, 0, 1)
+ }
+
+ ShapePath {
+ id: s
+ strokeColor: "transparent"
+ fillColor: "red"
+
+ startX: 10; startY: 10 + 2 * 140
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/shape/shape_updatefill.qml b/tests/baseline/scenegraph/data/shape/shape_updatefill.qml
new file mode 100644
index 0000000000..8e034c7676
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_updatefill.qml
@@ -0,0 +1,214 @@
+import QtQuick
+import QtQuick.Shapes
+
+Rectangle {
+ width: 320
+ height: 480
+ color: "lightgray"
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ LinearGradient {
+ id: grad1
+ x2: 60; y2: 60
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "red" }
+ }
+
+ ConicalGradient {
+ id: grad2
+ centerX: 15; centerY: 15
+ GradientStop { position: 0; color: "yellow" }
+ GradientStop { position: .5; color: "black" }
+ GradientStop { position: 1; color: "yellow" }
+ }
+
+ Image {
+ id: img1
+ source: "../shared/world.png"
+ visible: false
+ }
+
+ Image {
+ id: img2
+ source: "../shared/sample_1.png"
+ visible: false
+ }
+
+ Row {
+ padding: 10
+ spacing: 20
+ Repeater {
+ model: renderers
+ Shape {
+ width: 140
+ preferredRendererType: renderer
+
+ ShapePath {
+ id: c1
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rc1.x, rc1.y)
+
+ PathRectangle {
+ id: rc1
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: c2
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rc2.x, rc2.y)
+
+ PathRectangle {
+ id: rc2
+ x: 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: g1
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rg1.x, rg1.y)
+ fillGradient: grad1
+
+ PathRectangle {
+ id: rg1
+ y: 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: t1
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillItem: img1
+ fillTransform: PlanarTransform.fromTranslate(rt1.x, rt1.y)
+
+ PathRectangle {
+ id: rt1
+ x: 80; y: 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: g2
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rg2.x, rg2.y)
+ fillGradient: grad1
+
+ PathRectangle {
+ id: rg2
+ y: 2 * 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: t2
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rt2.x, rt2.y)
+ fillItem: img1
+
+ PathRectangle {
+ id: rt2
+ x: 80; y: 2 * 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: g3
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rg3.x, rg3.y)
+ fillGradient: grad1
+
+ PathRectangle {
+ id: rg3
+ y: 3 * 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: t3
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rt3.x, rt3.y)
+ fillItem: img1
+
+ PathRectangle {
+ id: rt3
+ x: 80; y: 3 * 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: g4
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rg4.x, rg4.y)
+ fillGradient: grad2
+
+ PathRectangle {
+ id: rg4
+ y: 4 * 80
+ width: 60; height: 60
+ }
+ }
+
+ ShapePath {
+ id: t4
+ strokeColor: "black"
+ fillColor: "cyan"
+ fillTransform: PlanarTransform.fromTranslate(rt4.x, rt4.y)
+ fillItem: img2
+
+ PathRectangle {
+ id: rt4
+ x: 80; y: 4 * 80
+ width: 60; height: 60
+ }
+ }
+
+ Timer {
+ running: true
+ interval: 150 // <200ms needed for scenegrabber; disable for manual testing
+ onTriggered: {
+ // Test all changes A->B, where A,B in {fillColor, fillGradient, fillItem}
+ // plus change of fillTransform
+
+ c1.fillGradient = grad1
+ g1.fillGradient = null
+ g2.fillGradient = null
+ g2.fillItem = img1
+ g3.fillGradient = grad2
+
+ c2.fillItem = img1
+ t1.fillItem = null
+ t2.fillGradient = grad1
+ t3.fillItem = img2
+
+ g4.fillTransform = g4.fillTransform.times(PlanarTransform.fromRotate(45, 30, 30))
+ t4.fillTransform = t4.fillTransform.times(PlanarTransform.fromRotate(45, 30, 30))
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/baseline/scenegraph/data/shape/shape_updategradient.qml b/tests/baseline/scenegraph/data/shape/shape_updategradient.qml
new file mode 100644
index 0000000000..f1fa0f0f3d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shape/shape_updategradient.qml
@@ -0,0 +1,105 @@
+import QtQuick
+import QtQuick.Shapes
+
+Item {
+ width: 320
+ height: 800
+
+ ListModel {
+ id: renderers
+ ListElement { renderer: Shape.GeometryRenderer }
+ ListElement { renderer: Shape.CurveRenderer }
+ }
+
+ RadialGradient {
+ id: radialGradient
+ centerX: 80
+ centerY: 75
+ centerRadius: centerY
+ focalX: centerX
+ focalY: centerY
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: .5; color: "cyan" }
+ GradientStop { position: 1; color: "black" }
+ }
+
+ Row {
+ Repeater {
+ model: renderers
+ Column {
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillGradient: LinearGradient {
+ y1: 50; y2: 80
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "cyan" }
+ }
+ fillTransform: PlanarTransform.fromAffineMatrix(0.8, 0.2, 0.3, 1.5, 20, -50 + startY)
+
+ startX: 10; startY: 10
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+
+ ShapePath {
+ strokeColor: "transparent"
+ fillGradient: LinearGradient {
+ y1: 50; y2: 80
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "cyan" }
+ }
+ fillTransform: PlanarTransform.fromAffineMatrix(0.8, 0.2, 0.3, 1.5, 20, -50 + startY)
+
+ startX: 10; startY: 10 + 1 * 140
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+
+ Shape {
+ preferredRendererType: renderer
+ width: 160
+ height: 150
+ Timer {
+ interval: 100
+ running: true
+ onTriggered: s.fillGradient = radialGradient
+ }
+
+ ShapePath {
+ id: s
+ strokeColor: "transparent"
+ fillGradient: LinearGradient {
+ y1: 50; y2: 80
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "cyan" }
+ }
+ fillTransform: PlanarTransform.fromAffineMatrix(0.8, 0.2, 0.3, 1.5, 20, -50 + startY)
+
+
+ startX: 10; startY: 10 + 2 * 140
+ PathLine { relativeX: 140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: 100 }
+ PathLine { relativeX: -140; relativeY: 0 }
+ PathLine { relativeX: 0; relativeY: -100 }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/shared/qt_logo.svg b/tests/baseline/scenegraph/data/shared/qt_logo.svg
new file mode 100644
index 0000000000..062daff3e9
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/qt_logo.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="462pt"
+ height="339pt"
+ viewBox="0 0 462 339"
+ version="1.1"
+ id="svg2"
+>
+ <path
+ fill="#41cd52"
+ d=" M 63.50 0.00 L 462.00 0.00 L 462.00 274.79 C 440.60 296.26 419.13 317.66 397.61 339.00 L 0.00 339.00 L 0.00 63.39 C 21.08 42.18 42.34 21.13 63.50 0.00 Z"
+ id="path6"/>
+ <path
+ d=" M 122.37 71.33 C 137.50 61.32 156.21 58.79 174.00 58.95 C 190.94 59.16 208.72 62.13 222.76 72.24 C 232.96 79.41 239.59 90.48 244.01 101.93 C 251.16 120.73 253.26 141.03 253.50 161.01 C 253.53 181.13 252.62 201.69 245.96 220.86 C 241.50 233.90 233.01 245.48 221.81 253.52 C 229.87 266.58 238.09 279.54 246.15 292.60 C 236.02 297.27 225.92 301.97 215.78 306.62 C 207.15 292.38 198.56 278.11 189.90 263.89 C 178.19 265.81 166.21 265.66 154.44 264.36 C 140.34 262.67 125.97 258.37 115.09 248.88 C 106.73 241.64 101.48 231.51 97.89 221.21 C 92.01 203.79 90.43 185.25 90.16 166.97 C 90.02 147.21 91.28 127.14 97.24 108.18 C 101.85 93.92 109.48 79.69 122.37 71.33 Z"
+ id="path8"
+ fill="#ffffff"/>
+ <path
+ d=" M 294.13 70.69 C 304.73 70.68 315.33 70.68 325.93 70.69 C 325.96 84.71 325.92 98.72 325.95 112.74 C 339.50 112.76 353.05 112.74 366.60 112.75 C 366.37 121.85 366.12 130.95 365.86 140.05 C 352.32 140.08 338.79 140.04 325.25 140.07 C 325.28 163.05 325.18 186.03 325.30 209.01 C 325.56 215.30 325.42 221.94 328.19 227.75 C 330.21 232.23 335.65 233.38 340.08 233.53 C 348.43 233.50 356.77 233.01 365.12 232.86 C 365.63 241.22 366.12 249.59 366.60 257.95 C 349.99 260.74 332.56 264.08 316.06 258.86 C 309.11 256.80 302.63 252.19 299.81 245.32 C 294.76 233.63 294.35 220.62 294.13 208.07 C 294.11 185.40 294.13 162.74 294.12 140.07 C 286.73 140.05 279.34 140.08 271.95 140.05 C 271.93 130.96 271.93 121.86 271.95 112.76 C 279.34 112.73 286.72 112.77 294.11 112.74 C 294.14 98.72 294.10 84.71 294.13 70.69 Z"
+ id="path10"
+ fill="#ffffff"/>
+ <path
+ fill="#41cd52"
+ d=" M 160.51 87.70 C 170.80 86.36 181.60 86.72 191.34 90.61 C 199.23 93.73 205.93 99.84 209.47 107.58 C 214.90 119.31 216.98 132.26 218.03 145.05 C 219.17 162.07 219.01 179.25 216.66 196.17 C 215.01 206.24 212.66 216.85 205.84 224.79 C 198.92 232.76 188.25 236.18 178.01 236.98 C 167.21 237.77 155.82 236.98 146.07 231.87 C 140.38 228.84 135.55 224.09 132.73 218.27 C 129.31 211.30 127.43 203.69 126.11 196.07 C 122.13 171.91 121.17 146.91 126.61 122.89 C 128.85 113.83 132.11 104.53 138.73 97.70 C 144.49 91.85 152.51 88.83 160.51 87.70 Z"
+ id="path12"/>
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg/text_stroking.svg b/tests/baseline/scenegraph/data/shared/svg/text_stroking.svg
new file mode 100644
index 0000000000..a5153c7087
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg/text_stroking.svg
@@ -0,0 +1,23 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="550" height="450">
+<!--Testing different values of stroke-linejoin-->
+ <g transform="translate(5, 70)">
+ <rect y="-55" width="250" height="210" fill="none" stroke="black" stroke-width="1"/>
+ <text y="0" style="font-size: 60px; font-weight: bold; font-family: sans-serif; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linejoin: bevel">QtQuick</text>
+ <text y="70" style="font-size: 60px; font-weight: bold; font-family: sans-serif; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linejoin: miter">QtQuick</text>
+ <text y="140" style="font-size: 60px; font-weight: bold; font-family: sans-serif; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linejoin: round">QtQuick</text>
+ </g>
+<!--Testing dash arrays with different values for stroke-linecap-->
+ <g transform="translate(5, 280)">
+ <rect y="-55" width="250" height="210" fill="none" stroke="black" stroke-width="1"/>
+ <text style="font-size: 60; font-weight: bold; font-family: sans-serif; stroke-dasharray:3,5; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linecap: square;">QtQuick</text>
+ <text y="70" style="font-size: 60; font-weight: bold; font-family: sans-serif; stroke-dasharray:3,5; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linecap: round">QtQuick</text>
+ <text y="140" style="font-size: 60; font-weight: bold; font-family: sans-serif; stroke-dasharray:3,5; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linecap: butt">QtQuick</text>
+ </g>
+<!--Testing dash arrays and dash offsets-->
+ <g transform="translate(270, 70)">
+ <rect y="-55" width="250" height="210" fill="none" stroke="black" stroke-width="1"/>
+ <text style="font-size: 60; font-weight: bold; font-family: sans-serif; stroke-dasharray:0; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linecap: square;">QtQuick</text>
+ <text y="70" style="font-size: 60; font-weight: bold; font-family: sans-serif; stroke-dasharray:3, 5; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linecap: square">QtQuick</text>
+ <text y="140" style="font-size: 60; font-weight: bold; font-family: sans-serif; stroke-dasharray:3,5; stroke-dashoffset:3; fill: peachpuff; stroke: black; stroke-width:3.1px; stroke-linecap: square">QtQuick</text>
+ </g>
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-constr-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-constr-201-t.svg
new file mode 100644
index 0000000000..7d922a30b6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-constr-201-t.svg
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="AE" desc="Tests constrained transformations" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: coords-constr-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test Constrained Transformations
+ There are three lines of text in this test.
+ The first is not constrained.
+ The second is constrained with a x and y offset.
+ The third is constrained.
+ The test will pass if, after applying user agent transforms, the circles behave as defined.
+ The test will pass if the three circles align vertically.
+ The reference image displays the file after performing a user agent zoom.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-constr-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="10">
+
+ <g xml:id="reference" stroke="none">
+ <rect x="15" y="15" height="270" width="450" fill="none" stroke="black" stroke-width="0.25"/>
+ <text xml:id="display-title" x="240" y="50" text-anchor="middle" font-size="16" fill="#000">Constrained Transformations</text>
+ </g>
+ <g fill="blue" stroke="none">
+ <circle cx="50" cy="105" r="15"/>
+ <text x="70" y="115" font-size="12">Can be panned, rotated and scaled by the user agent transform.</text>
+ </g>
+ <g transform="ref(svg,10,10)" fill="blue">
+ <circle cx="40" cy="150" r="15"/>
+ <text x="60" y="160" stroke="none" font-size="12">Cannot be transformed by the user agent transform.</text>
+ </g>
+ <g transform="ref(svg)">
+ <circle cx="50" cy="215" r="15" fill="blue"/>
+ <text x="70" y="225" fill="blue" font-size="12">Cannot be transformed by the user agent transform.</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-coord-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-coord-01-t.svg
new file mode 100644
index 0000000000..bf0ba5a2a6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-coord-01-t.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewer="DJ" owner="CN" desc="Tests the default initial coordinate system used by renderer." status="accepted" approved="yes" version="$Revision: 1.6 $" testname="$RCSfile: coords-coord-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Tests the default initial coordinate system used by renderer. Should be 0,0 if not specified.This is illustrated by comparing red boxes that are missing a coordinate or all coordinates with yellow boxes that have the correct coordinates specified. This test should produce three red boxes, with small yellow boxes rendered on top of them. These boxes should be placed along the origin, and x and y axis.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-coord-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- Content of Test Case follows. -->
+ <g stroke="black" stroke-width="5">
+ <line x1="0" y1="0" x2="150" y2="0" />
+ <line x1="0" y1="0" x2="0" y2="150" />
+ </g>
+ <g fill="red">
+ <rect width="15" height="15" />
+ <rect x="150" width="15" height="15" />
+ <rect y="150" width="15" height="15" />
+ </g>
+ <g fill="yellow">
+ <rect x="0" y="0" width="10" height="10" />
+ <rect x="150" y="0" width="10" height="10" />
+ <rect x="0" y="150" width="10" height="10" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-01-t.svg
new file mode 100644
index 0000000000..097423b02b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-01-t.svg
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Validates elementary transforms and transformation nesting" status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: coords-trans-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test verifies the implementation of transforms. It tests elementary transforms and transform nesting. Note that for layout purposes, this test uses nesting of translation with the elementary transforms.</p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ <p>The test uses the rect element, the fill color (solid primary colors) and transforms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(0, 30)" font-size="13">
+ <!-- ====================================================================== -->
+ <!-- First, draw a test grid ============================================== -->
+ <!-- ====================================================================== -->
+ <g xml:id="test-grid" stroke="#cccccc" stroke-width="1">
+ <line x1="10" y1="10.5" x2="470" y2="10.5" />
+ <line x1="10" y1="20.5" x2="470" y2="20.5" />
+ <line x1="10" y1="30.5" x2="470" y2="30.5" />
+ <line x1="10" y1="40.5" x2="470" y2="40.5" />
+ <line x1="10" y1="50.5" x2="470" y2="50.5" />
+ <line x1="10" y1="60.5" x2="470" y2="60.5" />
+ <line x1="10" y1="70.5" x2="470" y2="70.5" />
+ <line x1="10" y1="80.5" x2="470" y2="80.5" />
+ <line x1="10" y1="90.5" x2="470" y2="90.5" />
+ <line x1="10" y1="100.5" x2="470" y2="100.5" />
+ <line x1="10" y1="110.5" x2="470" y2="110.5" />
+ <line x1="10" y1="120.5" x2="470" y2="120.5" />
+ <line x1="10" y1="130.5" x2="470" y2="130.5" />
+ <line x1="10" y1="140.5" x2="470" y2="140.5" />
+ <line x1="10" y1="150.5" x2="470" y2="150.5" />
+ <line x1="10" y1="160.5" x2="470" y2="160.5" />
+ <line x1="10" y1="170.5" x2="470" y2="170.5" />
+ <line x1="10" y1="180.5" x2="470" y2="180.5" />
+ <line x1="10" y1="190.5" x2="470" y2="190.5" />
+ <line x1="10" y1="200.5" x2="470" y2="200.5" />
+ <line x1="10" y1="210.5" x2="470" y2="210.5" />
+ <line x1="10" y1="220.5" x2="470" y2="220.5" />
+ <line x1="10" y1="230.5" x2="470" y2="230.5" />
+ <line x1="10" y1="240.5" x2="470" y2="240.5" />
+ <line x1="10" y1="250.5" x2="470" y2="250.5" />
+ <line x1="10" y1="260.5" x2="470" y2="260.5" />
+ <line y1="10" x1="10.5" y2="260.5" x2="10.5" />
+ <line y1="10" x1="20.5" y2="260.5" x2="20.5" />
+ <line y1="10" x1="30.5" y2="260.5" x2="30.5" />
+ <line y1="10" x1="40.5" y2="260.5" x2="40.5" />
+ <line y1="10" x1="50.5" y2="260.5" x2="50.5" />
+ <line y1="10" x1="60.5" y2="260.5" x2="60.5" />
+ <line y1="10" x1="70.5" y2="260.5" x2="70.5" />
+ <line y1="10" x1="80.5" y2="260.5" x2="80.5" />
+ <line y1="10" x1="90.5" y2="260.5" x2="90.5" />
+ <line y1="10" x1="100.5" y2="260.5" x2="100.5" />
+ <line y1="10" x1="110.5" y2="260.5" x2="110.5" />
+ <line y1="10" x1="120.5" y2="260.5" x2="120.5" />
+ <line y1="10" x1="130.5" y2="260.5" x2="130.5" />
+ <line y1="10" x1="140.5" y2="260.5" x2="140.5" />
+ <line y1="10" x1="150.5" y2="260.5" x2="150.5" />
+ <line y1="10" x1="160.5" y2="260.5" x2="160.5" />
+ <line y1="10" x1="170.5" y2="260.5" x2="170.5" />
+ <line y1="10" x1="180.5" y2="260.5" x2="180.5" />
+ <line y1="10" x1="190.5" y2="260.5" x2="190.5" />
+ <line y1="10" x1="200.5" y2="260.5" x2="200.5" />
+ <line y1="10" x1="210.5" y2="260.5" x2="210.5" />
+ <line y1="10" x1="220.5" y2="260.5" x2="220.5" />
+ <line y1="10" x1="230.5" y2="260.5" x2="230.5" />
+ <line y1="10" x1="240.5" y2="260.5" x2="240.5" />
+ <line y1="10" x1="250.5" y2="260.5" x2="250.5" />
+ <line y1="10" x1="260.5" y2="260.5" x2="260.5" />
+ <line y1="10" x1="270.5" y2="260.5" x2="270.5" />
+ <line y1="10" x1="280.5" y2="260.5" x2="280.5" />
+ <line y1="10" x1="290.5" y2="260.5" x2="290.5" />
+ <line y1="10" x1="300.5" y2="260.5" x2="300.5" />
+ <line y1="10" x1="310.5" y2="260.5" x2="310.5" />
+ <line y1="10" x1="320.5" y2="260.5" x2="320.5" />
+ <line y1="10" x1="330.5" y2="260.5" x2="330.5" />
+ <line y1="10" x1="340.5" y2="260.5" x2="340.5" />
+ <line y1="10" x1="350.5" y2="260.5" x2="350.5" />
+ <line y1="10" x1="360.5" y2="260.5" x2="360.5" />
+ <line y1="10" x1="370.5" y2="260.5" x2="370.5" />
+ <line y1="10" x1="380.5" y2="260.5" x2="380.5" />
+ <line y1="10" x1="390.5" y2="260.5" x2="390.5" />
+ <line y1="10" x1="400.5" y2="260.5" x2="400.5" />
+ <line y1="10" x1="410.5" y2="260.5" x2="410.5" />
+ <line y1="10" x1="420.5" y2="260.5" x2="420.5" />
+ <line y1="10" x1="430.5" y2="260.5" x2="430.5" />
+ <line y1="10" x1="440.5" y2="260.5" x2="440.5" />
+ <line y1="10" x1="450.5" y2="260.5" x2="450.5" />
+ <line y1="10" x1="460.5" y2="260.5" x2="460.5" />
+ <line y1="10" x1="470.5" y2="260.5" x2="470.5" />
+ </g>
+ <!-- ====================================================================== -->
+ <!-- Now, test elementary transforms. For each transform, 3 markers are -->
+ <!-- placed where the user space is expected after transformations for the -->
+ <!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). -->
+ <!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line -->
+ <!-- going from (0, 0) to (0, 20), after applying the elementary -->
+ <!-- transformation. If the test succeeds, the red line should join the -->
+ <!-- black marker to the red marker and the blue line the black marker to -->
+ <!-- the blue marker. -->
+ <!-- ====================================================================== -->
+ <g xml:id="elementary-transforms-test" transform="translate(0, 10)">
+ <g xml:id="elementary-transforms">
+ <!-- Translate -->
+ <g transform="translate(50, 50)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ <!-- Rotate -90 deg about (150, 70) -->
+ <g transform="translate(150, 70) rotate(-90)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ <!-- Skew X -->
+ <g transform="translate(250, 50) skewX(45)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ <!-- Skew Y -->
+ <g transform="translate(350, 50) skewY(45)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ <!-- Scale 2 -->
+ <g transform="translate(210, 120) scale(2)">
+ <rect x="0" y="0" width="20" height="1" fill="blue" />
+ <rect x="0" y="0" width="1" height="20" fill="red" />
+ </g>
+ </g>
+ <!-- elementary-transforms -->
+ <!-- Draw all the markers -->
+ <g xml:id="elementary-transforms-test-markers">
+ <!-- Translate -->
+ <text x="40" y="40">translate (50, 50)</text>
+ <rect x="48" y="48" width="5" height="5" fill="black" />
+ <rect x="68" y="48" width="5" height="5" fill="blue" />
+ <rect x="48" y="68" width="5" height="5" fill="red" />
+ <!-- Rotate -90 deg about (150, 70) -->
+ <text x="140" y="40">rotate(-90)</text>
+ <rect x="148" y="68" width="5" height="5" fill="black" />
+ <rect x="148" y="48" width="5" height="5" fill="blue" />
+ <rect x="168" y="68" width="5" height="5" fill="red" />
+ <!-- Skew X -->
+ <text x="240" y="40">skew x (45)</text>
+ <rect x="248" y="48" width="5" height="5" fill="black" />
+ <rect x="268" y="48" width="5" height="5" fill="blue" />
+ <rect x="268" y="68" width="5" height="5" fill="red" />
+ <!-- Skew Y -->
+ <text x="340" y="40">skew y (45)</text>
+ <rect x="348" y="48" width="5" height="5" fill="black" />
+ <rect x="368" y="68" width="5" height="5" fill="blue" />
+ <rect x="348" y="68" width="5" height="5" fill="red" />
+ <!-- Scale 2 -->
+ <text x="200" y="110">scale (2)</text>
+ <rect x="208" y="118" width="5" height="5" fill="black" />
+ <rect x="248" y="118" width="5" height="5" fill="blue" />
+ <rect x="208" y="158" width="5" height="5" fill="red" />
+ </g>
+ <!-- elementary-transforms-test-markers -->
+ </g>
+ <g xml:id="nested-transforms-test">
+ <g xml:id="nested-transforms">
+ <!-- scale/translate in transform attribute -->
+ <g transform="scale(3, 2) translate(16.666667, 105)">
+ <rect x="0" y="0" width="20" height="1" fill="blue" />
+ <rect x="0" y="0" width="0.67" height="20" fill="red" />
+ </g>
+ <!-- scale/translate in successive elements -->
+ <g transform="translate(200, 0)">
+ <g transform="scale(3, 2)">
+ <g transform="translate(16.666667, 105)">
+ <rect x="0" y="0" width="20" height="1" fill="blue" />
+ <rect x="0" y="0" width="0.67" height="20" fill="red" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <!-- nested-transforms -->
+ <g xml:id="nested-transforms-test-markers">
+ <!-- scale and translate -->
+ <text x="40" y="200">scale(25, 95) and translate(2, 2)</text>
+ <rect x="48" y="208" width="5" height="5" fill="black" />
+ <rect x="108" y="208" width="5" height="5" fill="blue" />
+ <rect x="48" y="248" width="5" height="5" fill="red" />
+ <!-- scale then translate -->
+ <text x="240" y="200">scale(25, 95) then translate(2, 2)</text>
+ <rect x="248" y="208" width="5" height="5" fill="black" />
+ <rect x="308" y="208" width="5" height="5" fill="blue" />
+ <rect x="248" y="248" width="5" height="5" fill="red" />
+ </g>
+ <!-- nested-transforms-test-markers -->
+ </g>
+ <!-- nested-transforms test -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-02-t.svg
new file mode 100644
index 0000000000..806d0c4dcd
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-02-t.svg
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Validates elementary transforms and transformation nesting" status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: coords-trans-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test verifies the implementation of transforms. It tests elementary transforms and transform nesting. Note that for layout purposes, this test uses nesting of translation with the elementary transforms.</p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ <p>The test uses the rect element, the fill color (solid primary colors) and transforms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(0, 30)" font-size="12">
+ <!-- ====================================================================== -->
+ <!-- First, draw a test grid ============================================== -->
+ <!-- ====================================================================== -->
+ <!--g xml:id="test-grid" stroke="#cccccc" stroke-width="1" > <line x1="10" y1="10.5" x2="470" y2="10.5"/> <line x1="10" y1="20.5" x2="470" y2="20.5"/> <line x1="10" y1="30.5" x2="470" y2="30.5"/> <line x1="10" y1="40.5" x2="470" y2="40.5"/> <line x1="10" y1="50.5" x2="470" y2="50.5"/> <line x1="10" y1="60.5" x2="470" y2="60.5"/> <line x1="10" y1="70.5" x2="470" y2="70.5"/> <line x1="10" y1="80.5" x2="470" y2="80.5"/> <line x1="10" y1="90.5" x2="470" y2="90.5"/> <line x1="10" y1="100.5" x2="470" y2="100.5"/> <line x1="10" y1="110.5" x2="470" y2="110.5"/> <line x1="10" y1="120.5" x2="470" y2="120.5"/> <line x1="10" y1="130.5" x2="470" y2="130.5"/> <line x1="10" y1="140.5" x2="470" y2="140.5"/> <line x1="10" y1="150.5" x2="470" y2="150.5"/> <line x1="10" y1="160.5" x2="470" y2="160.5"/> <line x1="10" y1="170.5" x2="470" y2="170.5"/> <line x1="10" y1="180.5" x2="470" y2="180.5"/> <line x1="10" y1="190.5" x2="470" y2="190.5"/> <line x1="10" y1="200.5" x2="470" y2="200.5"/> <line x1="10" y1="210.5" x2="470" y2="210.5"/> <line x1="10" y1="220.5" x2="470" y2="220.5"/> <line x1="10" y1="230.5" x2="470" y2="230.5"/> <line x1="10" y1="240.5" x2="470" y2="240.5"/> <line x1="10" y1="250.5" x2="470" y2="250.5"/> <line x1="10" y1="260.5" x2="470" y2="260.5"/> <line y1="10" x1="10.5" y2="260.5" x2="10.5"/> <line y1="10" x1="20.5" y2="260.5" x2="20.5"/> <line y1="10" x1="30.5" y2="260.5" x2="30.5"/> <line y1="10" x1="40.5" y2="260.5" x2="40.5"/> <line y1="10" x1="50.5" y2="260.5" x2="50.5"/> <line y1="10" x1="60.5" y2="260.5" x2="60.5"/> <line y1="10" x1="70.5" y2="260.5" x2="70.5"/> <line y1="10" x1="80.5" y2="260.5" x2="80.5"/> <line y1="10" x1="90.5" y2="260.5" x2="90.5"/> <line y1="10" x1="100.5" y2="260.5" x2="100.5"/> <line y1="10" x1="110.5" y2="260.5" x2="110.5"/> <line y1="10" x1="120.5" y2="260.5" x2="120.5"/> <line y1="10" x1="130.5" y2="260.5" x2="130.5"/> <line y1="10" x1="140.5" y2="260.5" x2="140.5"/> <line y1="10" x1="150.5" y2="260.5" x2="150.5"/> <line y1="10" x1="160.5" y2="260.5" x2="160.5"/> <line y1="10" x1="170.5" y2="260.5" x2="170.5"/> <line y1="10" x1="180.5" y2="260.5" x2="180.5"/> <line y1="10" x1="190.5" y2="260.5" x2="190.5"/> <line y1="10" x1="200.5" y2="260.5" x2="200.5"/> <line y1="10" x1="210.5" y2="260.5" x2="210.5"/> <line y1="10" x1="220.5" y2="260.5" x2="220.5"/> <line y1="10" x1="230.5" y2="260.5" x2="230.5"/> <line y1="10" x1="240.5" y2="260.5" x2="240.5"/> <line y1="10" x1="250.5" y2="260.5" x2="250.5"/> <line y1="10" x1="260.5" y2="260.5" x2="260.5"/> <line y1="10" x1="270.5" y2="260.5" x2="270.5"/> <line y1="10" x1="280.5" y2="260.5" x2="280.5"/> <line y1="10" x1="290.5" y2="260.5" x2="290.5"/> <line y1="10" x1="300.5" y2="260.5" x2="300.5"/> <line y1="10" x1="310.5" y2="260.5" x2="310.5"/> <line y1="10" x1="320.5" y2="260.5" x2="320.5"/> <line y1="10" x1="330.5" y2="260.5" x2="330.5"/> <line y1="10" x1="340.5" y2="260.5" x2="340.5"/> <line y1="10" x1="350.5" y2="260.5" x2="350.5"/> <line y1="10" x1="360.5" y2="260.5" x2="360.5"/> <line y1="10" x1="370.5" y2="260.5" x2="370.5"/> <line y1="10" x1="380.5" y2="260.5" x2="380.5"/> <line y1="10" x1="390.5" y2="260.5" x2="390.5"/> <line y1="10" x1="400.5" y2="260.5" x2="400.5"/> <line y1="10" x1="410.5" y2="260.5" x2="410.5"/> <line y1="10" x1="420.5" y2="260.5" x2="420.5"/> <line y1="10" x1="430.5" y2="260.5" x2="430.5"/> <line y1="10" x1="440.5" y2="260.5" x2="440.5"/> <line y1="10" x1="450.5" y2="260.5" x2="450.5"/> <line y1="10" x1="460.5" y2="260.5" x2="460.5"/> <line y1="10" x1="470.5" y2="260.5" x2="470.5"/> </g-->
+ <!-- ====================================================================== -->
+ <!-- Now, test elementary transforms. For each transform, 3 markers are -->
+ <!-- placed where the user space is expected after transformations for the -->
+ <!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). -->
+ <!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line -->
+ <!-- going from (0, 0) to (0, 20), after applying the elementary -->
+ <!-- transformation. If the test succeeds, the red line should join the -->
+ <!-- black marker to the red marker and the blue line the black marker to -->
+ <!-- the blue marker. -->
+ <!-- ====================================================================== -->
+ <g xml:id="elementary-transforms-test" transform="translate(0, 10)">
+ <g xml:id="elementary-transforms" transform="translate(-30, 0) scale(2.5, 2.5)">
+ <!-- Translate -->
+ <g transform="translate(50, 50)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ <!-- Rotate -90 deg about (150, 70) -->
+ <g transform="translate(150, 70) rotate(-90)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ </g>
+ <!-- elementary-transforms -->
+ <!-- Draw all the markers -->
+ <g xml:id="elementary-transforms-test-markers" transform="translate(-30, 0) scale(2.5, 2.5)">
+ <!-- Translate -->
+ <text x="40" y="40">translate (50, 50)</text>
+ <rect x="48" y="48" width="5" height="5" fill="black" />
+ <rect x="68" y="48" width="5" height="5" fill="blue" />
+ <rect x="48" y="68" width="5" height="5" fill="red" />
+ <!-- Rotate -90 deg about (150, 70) -->
+ <text x="140" y="40">rotate(-90)</text>
+ <rect x="148" y="68" width="5" height="5" fill="black" />
+ <rect x="148" y="48" width="5" height="5" fill="blue" />
+ <rect x="168" y="68" width="5" height="5" fill="red" />
+ </g>
+ <!-- elementary-transforms-test-markers -->
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-03-t.svg
new file mode 100644
index 0000000000..8d1952033e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-03-t.svg
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Validates elementary transforms and transformation nesting"
+ status="accepted"
+ approved="yes" version="$Revision: 1.9 $" testname="$RCSfile: coords-trans-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test verifies the implementation of transforms. It tests elementary transforms and transform nesting. Note that for layout purposes, this test uses nesting of translation with the elementary transforms.</p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ <p>The test uses the rect element, the fill color (solid primary colors) and transforms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(0, 30)" font-size="12">
+ <!-- ====================================================================== -->
+ <!-- Now, test elementary transforms. For each transform, 3 markers are -->
+ <!-- placed where the user space is expected after transformations for the -->
+ <!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). -->
+ <!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line -->
+ <!-- going from (0, 0) to (0, 20), after applying the elementary -->
+ <!-- transformation. If the test succeeds, the red line should join the -->
+ <!-- black marker to the red marker and the blue line the black marker to -->
+ <!-- the blue marker. -->
+ <!-- ====================================================================== -->
+ <g xml:id="elementary-transforms-test" transform="translate(0, 10)">
+ <g xml:id="elementary-transforms" transform="translate(-560, 0) scale(2.5, 2.5)">
+ <!-- Skew X -->
+ <g transform="translate(250, 50) skewX(45)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ <!-- Skew Y -->
+ <g transform="translate(350, 50) skewY(45)">
+ <rect x="0" y="0" width="20" height="2" fill="blue" />
+ <rect x="0" y="0" width="2" height="20" fill="red" />
+ </g>
+ </g>
+ <!-- elementary-transforms -->
+ <!-- Draw all the markers -->
+ <g xml:id="elementary-transforms-test-markers" transform="translate(-560, 0) scale(2.5, 2.5)">
+ <!-- Skew X -->
+ <text x="240" y="40">skew x (45)</text>
+ <rect x="248" y="48" width="5" height="5" fill="black" />
+ <rect x="268" y="48" width="5" height="5" fill="blue" />
+ <rect x="268" y="68" width="5" height="5" fill="red" />
+ <!-- Skew Y -->
+ <text x="340" y="40">skew y (45)</text>
+ <rect x="348" y="48" width="5" height="5" fill="black" />
+ <rect x="368" y="68" width="5" height="5" fill="blue" />
+ <rect x="348" y="68" width="5" height="5" fill="red" />
+ </g>
+ <!-- elementary-transforms-test-markers -->
+ </g>
+ <!-- nested-transforms test -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-04-t.svg
new file mode 100644
index 0000000000..f3bd5f32bf
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-04-t.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Validates elementary transforms and transformation nesting"
+ status="accepted"
+ approved="yes" version="$Revision: 1.9 $" testname="$RCSfile: coords-trans-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test verifies the implementation of transforms. It tests elementary transforms and transform nesting. Note that for layout purposes, this test uses nesting of translation with the elementary transforms.</p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ <p>The test uses the rect element, the fill color (solid primary colors) and transforms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(0, 30)" font-size="12">
+ <!-- ====================================================================== -->
+ <!-- Now, test elementary transforms. For each transform, 3 markers are -->
+ <!-- placed where the user space is expected after transformations for the -->
+ <!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). -->
+ <!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line -->
+ <!-- going from (0, 0) to (0, 20), after applying the elementary -->
+ <!-- transformation. If the test succeeds, the red line should join the -->
+ <!-- black marker to the red marker and the blue line the black marker to -->
+ <!-- the blue marker. -->
+ <!-- ====================================================================== -->
+ <g xml:id="elementary-transforms-test">
+ <g xml:id="elementary-transforms" transform="translate(60, 45) scale(2.5, 2.5)">
+ <!-- Scale 2 -->
+ <g transform="translate(40, 10) scale(2)">
+ <rect x="0" y="0" width="20" height="1" fill="blue" />
+ <rect x="0" y="0" width="1" height="20" fill="red" />
+ </g>
+ </g>
+ <!-- elementary-transforms -->
+ <!-- Draw all the markers -->
+ <g xml:id="elementary-transforms-test-markers" transform="translate(-364, -230) scale(2.5, 2.5)">
+ <!-- Scale 2 -->
+ <text x="200" y="110">scale (2)</text>
+ <rect x="208" y="118" width="5" height="5" fill="black" />
+ <rect x="248" y="118" width="5" height="5" fill="blue" />
+ <rect x="208" y="158" width="5" height="5" fill="red" />
+ </g>
+ <!-- elementary-transforms-test-markers -->
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-05-t.svg
new file mode 100644
index 0000000000..bef79c291f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-05-t.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Validates elementary transforms and transformation nesting" status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: coords-trans-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test verifies the implementation of transforms. It tests elementary transforms and transform nesting. Note that for layout purposes, this test uses nesting of translation with the elementary transforms.</p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ <p>The test uses the rect element, the fill color (solid primary colors) and transforms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(0, 30)" font-size="12">
+ <!-- ====================================================================== -->
+ <!-- Now, test elementary transforms. For each transform, 3 markers are -->
+ <!-- placed where the user space is expected after transformations for the -->
+ <!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). -->
+ <!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line -->
+ <!-- going from (0, 0) to (0, 20), after applying the elementary -->
+ <!-- transformation. If the test succeeds, the red line should join the -->
+ <!-- black marker to the red marker and the blue line the black marker to -->
+ <!-- the blue marker. -->
+ <!-- ====================================================================== -->
+ <g xml:id="nested-transforms-test">
+ <g xml:id="nested-transforms" transform="translate(-90, -450)">
+ <!-- scale/translate in transform attribute -->
+ <g transform="scale(7.5, 5) translate(16.666667, 105)">
+ <rect x="0" y="0" width="20" height="1" fill="blue" />
+ <rect x="0" y="0" width="0.67" height="20" fill="red" />
+ </g>
+ </g>
+ <!-- nested-transforms -->
+ <g xml:id="nested-transforms-test-markers" transform="translate(-90, -450) scale(2.5, 2.5)">
+ <!-- scale and translate -->
+ <text x="40" y="200">scale(25, 95) - translate(2, 2)</text>
+ <rect x="48" y="208" width="5" height="5" fill="black" />
+ <rect x="108" y="208" width="5" height="5" fill="blue" />
+ <rect x="48" y="248" width="5" height="5" fill="red" />
+ </g>
+ <!-- nested-transforms-test-markers -->
+ </g>
+ <!-- nested-transforms test -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-06-t.svg
new file mode 100644
index 0000000000..3b96343b68
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-06-t.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Validates elementary transforms and transformation nesting"
+ status="accepted"
+ approved="yes" version="$Revision: 1.10 $" testname="$RCSfile: coords-trans-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test verifies the implementation of transforms. It tests elementary transforms and transform nesting. Note that for layout purposes, this test uses nesting of translation with the elementary transforms.</p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ <p>The test uses the rect element, the fill color (solid primary colors) and transforms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(0, 30)" font-size="12">
+ <g xml:id="nested-transforms-test">
+ <g xml:id="nested-transforms">
+ <!-- scale/translate in successive elements -->
+ <g transform="translate(-102, -450)">
+ <g transform="scale(7.5, 5)">
+ <g transform="translate(16.666667, 105)">
+ <rect x="0" y="0" width="20" height="1" fill="blue" />
+ <rect x="0" y="0" width="0.67" height="20" fill="red" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <!-- nested-transforms -->
+ <g xml:id="nested-transforms-test-markers" transform="translate(-600, -450) scale(2.5, 2.5)">
+ <!-- scale then translate -->
+ <text x="248" y="200">scale(25, 95) then translate(2, 2)</text>
+ <rect x="248" y="208" width="5" height="5" fill="black" />
+ <rect x="308" y="208" width="5" height="5" fill="blue" />
+ <rect x="248" y="248" width="5" height="5" fill="red" />
+ </g>
+ <!-- nested-transforms-test-markers -->
+ </g>
+ <!-- nested-transforms test -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-07-t.svg
new file mode 100644
index 0000000000..04501edac9
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-07-t.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ owner="CN" reviewer="OA" desc="tests elementary transforms and transform nesting" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: coords-trans-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test verifies the implementation of transforms. It tests elementary transforms
+ and transform nesting.
+ Note that for layout purposes, this test uses nesting of translation with the elementary transforms.
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly except for variations in the labeling text.
+ </p>
+ <p>
+ The test uses the rect element, the fill color (solid primary colors) and transforms.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-07-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g xml:id="object_1" transform="rotate(30) translate(200, 100)">
+ <rect x="0" y="0" width="150" height="5" fill="green"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="65" y="185" font-size="20">rotate+translate</text>
+
+ <g xml:id="object_2" transform="translate(200,100) rotate(30)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="150" y="100" font-size="20">translate+rotate</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-08-t.svg
new file mode 100644
index 0000000000..23db6cd24f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-08-t.svg
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ owner="CN" reviewer="OA" desc="tests elementary transforms and transform nesting" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: coords-trans-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test verifies the implementation of transforms. It tests elementary transforms
+ and transform nesting.
+ Note that for layout purposes, this test uses nesting of translation with the elementary transforms.
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly except for variations in the labeling text.
+ </p>
+ <p>
+ This test will check if the transfomations performed are carried out in the proper order. The result should differ depending on which transformation comes first.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-08-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="object_1" transform="skewX(45) skewY(45)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ <rect x="150" y="0" width="5" height="50" fill="black"/>
+ <rect x="0" y="50" width="150" height="5" fill="black"/>
+ <ellipse rx="40" ry="15" cx="75" cy="25" fill="purple"/>
+ </g>
+ <text x="30" y="16" font-size="12">skewX(45)+skewY(45)</text>
+
+ <g xml:id="object_2" transform="translate(200,0) skewY(45) skewX(45)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ <rect x="150" y="0" width="5" height="50" fill="black"/>
+ <rect x="0" y="50" width="150" height="5" fill="black"/>
+ <ellipse rx="40" ry="15" cx="75" cy="25" fill="purple"/>
+ </g>
+ <text x="230" y="16" font-size="12">skewY(45)+skewX(45)</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-09-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-09-t.svg
new file mode 100644
index 0000000000..48e4774c98
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-trans-09-t.svg
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ owner="CN" reviewer="OA" desc="Tests elementary transforms and transform nesting" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: coords-trans-09-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test verifies the implementation of transforms. It tests elementary transforms
+ and transform nesting.
+ Note that for layout purposes, this test uses nesting of translation with the elementary transforms.
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly except for variations in the labeling text.
+ </p>
+ <p>
+ This test will check if the various matrix operations work
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-trans-09-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g transform="matrix(0 0 0 0 0 0)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="6" y="20" font-size="20">matrix(0 0 0 0 0 0)</text>
+
+ <g transform="matrix(1 0 0 1 100 100)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="100" y="100" font-size="20">matrix(1 0 0 1 100 100)</text>
+
+ <g transform="matrix(1.5 0 0 1.5 70 60)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="70" y="60" font-size="20">matrix(1.5 0 0 1.5 70 60)</text>
+
+ <g transform="matrix(1 0 0.5 1 30 170)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="30" y="170" font-size="20">matrix(1 0 0.5 1 30 170)</text>
+
+ <g transform="matrix(1 0.5 0 1 100 200)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="100" y="200" font-size="20">matrix(1 0.5 0 1 100 200)</text>
+
+ <g transform="matrix(0 1 -1 0 450 0)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="275" y="30" font-size="20">matrix(0 1 -1 0 450 0)</text>
+
+ <g transform="matrix(1 0.8 0.8 1 300 220)">
+ <rect x="0" y="0" width="150" height="5" fill="blue"/>
+ <rect x="0" y="0" width="5" height="50" fill="red"/>
+ </g>
+ <text x="230" y="220" font-size="20">matrix(1 0.8 0.8 1 300 220)</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-units-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-units-01-t.svg
new file mode 100644
index 0000000000..a846fb0d08
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-units-01-t.svg
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="VH" desc="This test validates the processing rules for converting coordinates and length defined in fractions of the current object's bounding box to user space coordinates and length. Note that this test assumes that linear and radial gradients are implemented." status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: coords-units-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Verify the conversion processing of percentage and fraction values relative to object bounding boxes.
+ This is used when defining linear and radial gradients.
+ </p>
+ <p>
+ The test validates conversion for coordinates, width, height and length. The first test defines two
+ corresponding linear gradients, which specify coordinates using fractions for the first and user
+ coordinates for the second. The second test defines two corresponding radial gradients, which specify
+ a length (radius) using fractions for the first and user space for the second.
+ </p>
+ <p>
+ The rendered image should match the reference image.
+ </p>
+ <p>
+ The test also assumes that linear and radial gradients are implemented.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-units-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-size="14">
+ <!-- ==================================================================== -->
+ <!-- The following gradients will be used to fill a rectangle with the -->
+ <!-- following geometry in User space: x=0, y=0, width=50 height=20 -->
+ <!-- The gradient vector, in linearBoundingBoxFraction, is defined as: -->
+ <!-- (0, 0) to (1, 0). -->
+ <!-- According to the spec, for our rectangle, this corresponds to the -->
+ <!-- following user space coordinates: -->
+ <!-- (0, 0) becomes (0, 0) and (1, 0) becomes (50, 0) -->
+ <!-- These values are used to define the linearUserSpace gradient. -->
+ <!-- If the test succeeds, all the gradient should fill the rectangles -->
+ <!-- the same way -->
+ <!-- ==================================================================== -->
+ <linearGradient xml:id="linearBoundingBoxFraction" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </linearGradient>
+ <linearGradient xml:id="linearUserSpace" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="50" y2="0">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </linearGradient>
+ <!-- Draw Text Comment -->
+ <text x="30" y="30">Bounding box relative coordinates</text>
+ <g transform="translate(30, 40)">
+ <rect x="0" y="0" width="50" height="20" transform="translate(0, 20)" fill="url(#linearBoundingBoxFraction)" />
+ <rect x="0" y="0" width="50" height="20" transform="translate(0, 40)" fill="url(#linearUserSpace)" />
+ <line x1="0" y1="20" x2="50" y2="20" stroke="#cccccc" stroke-width="1" />
+ <line x1="0" y1="40" x2="50" y2="40" stroke="#cccccc" stroke-width="1" />
+ <text x="60" y="35">Fraction</text>
+ <text x="60" y="55">User Space</text>
+ </g>
+ <!-- ==================================================================== -->
+ <!-- The following gradients will be used to fill a rectangle with the -->
+ <!-- following geometry in User space: x=0, y=0, width=60 height=60 -->
+ <!-- The radial gradient in radialBoundingBoxFraction is -->
+ <!-- defined as: cx=0.25 cy=0.25 and r=0.25 -->
+ <!-- These two definition, for our rectangle, should be identical to the -->
+ <!-- following radial gradient in radialUserSpace: -->
+ <!-- cx=15 cy=15 r=15 -->
+ <!-- ==================================================================== -->
+ <radialGradient xml:id="radialBoundingBoxFraction" gradientUnits="objectBoundingBox" cx="0.25" cy="0.25" r="0.25">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </radialGradient>
+ <radialGradient xml:id="radialUserSpace" gradientUnits="userSpaceOnUse" cx="15" cy="15" r="15">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </radialGradient>
+ <!-- Draw Text Comment -->
+ <text x="30" y="130">Bounding box relative length (percentage and fraction)</text>
+ <g transform="translate(30, 140)">
+ <rect x="0" y="0" width="60" height="60" transform="translate(61, 0)" fill="url(#radialBoundingBoxFraction)" />
+ <rect x="0" y="0" width="60" height="60" transform="translate(122, 0)" fill="url(#radialUserSpace)" />
+ <text x="61" y="73">Fraction</text>
+ <text x="122" y="73">User Space</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-viewattr-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-viewattr-05-t.svg
new file mode 100644
index 0000000000..d63c231164
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/coords-viewattr-05-t.svg
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg [
+ <!ENTITY Viewport1 "<rect x='.5' y='.5' width='49' height='29' fill='none' stroke='blue' />">
+ <!ENTITY Viewport2 "<rect x='.5' y='.5' width='29' height='59' fill='none' stroke='blue' />">
+]>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="VH" desc="Validates viewBox specification and the preserveAspectRatio attribute" status="accepted"
+ approved="yes"
+ version="$Revision: 1.12 $" testname="$RCSfile: coords-viewattr-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test verifies the implementation of the preserveAspectRatio attribute on &lt;image&gt; referencing raster content.
+ This is a modified version of the sample file included in the SVG specification. It exercises the various preserveAspectRatio
+ values and uses a general entity definition in order to make reading of the SVG source easier.
+ </p>
+ <p>The rendered picture should match the reference image exactly except for variations in the labeling text.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: coords-viewattr-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-size="9" transform="translate(0, 30)">
+ <desc>Example PreserveAspectRatio - demonstrate available options</desc>
+ <text text-anchor="middle" x="240" font-size="16">Test options of preserveAspectRatio on an image element</text>
+ <text x="40" y="30" text-anchor="middle">Raster to fit</text>
+ <g transform="translate(20,40)">
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" width="40" height="40" preserveAspectRatio="none" />
+ </g>
+ <text x="35.5" y="110" text-anchor="middle">Viewport 1</text>
+ <g transform="translate(10,120)">&Viewport1;</g>
+ <text x="35.5" y="180" text-anchor="middle">Viewport 2</text>
+ <g transform="translate(20,190)">&Viewport2;</g>
+ <g xml:id="meet-group-1" transform="translate(120, 50)">
+ <text x="0" y="-20">---------- meet --------------------</text>
+ <g>
+ <text y="-5">xMin*</text>&Viewport1;
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" preserveAspectRatio="xMinYMin meet" width="50" height="30" />
+ </g>
+ <g transform="translate(70,0)">
+ <text y="-5">xMid*</text>&Viewport1;
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" preserveAspectRatio="xMidYMid meet" width="50" height="30" />
+ </g>
+ <g transform="translate(0,50)">
+ <text y="-5">xMax*</text>&Viewport1;
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" preserveAspectRatio="xMaxYMax meet" width="50" height="30" />
+ </g>
+ </g>
+ <g xml:id="meet-group-2" transform="translate(300, 50)">
+ <text x="0" y="-20">---------- meet ------------------------</text>
+ <g>
+ <text y="-5">*YMin</text>&Viewport2;
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" preserveAspectRatio="xMinYMin meet" width="30" height="60" />
+ </g>
+ <g transform="translate(50, 0)">
+ <text y="-5">*YMid</text>&Viewport2;
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" preserveAspectRatio="xMidYMid meet" width="30" height="60" />
+ </g>
+ <g transform="translate(100, 0)">
+ <text y="-5">*YMax</text>&Viewport2;
+ <image xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/b AIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBA QEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUw MDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgAZABkAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAAAAAA AAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUD DDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1Rk RcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX 5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MV Y3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A8/SSR8LCyc/JZi4rDZdYYa0flPgAgSACSaA1 JKkLWuc4NaC5x0AGpJXT9J+onUcwC3Od9jpOoYRutI/q/m/P7l1X1f8Aqth9HYLXgX5xHuuI0b5V g8fHlbixOa+LSsw5fQf5w7/QMscfdxcL6n9BwwP1cXvH5953/wDR+j+C1qsbHoEU1MqHgxob+RES WVPNlyG5zlP+8bXgAbBRAIgiR4Knk9G6TlgjIw6Xz32AO/zhBVxJNjOUTcZGJ8DSnk+pf4v8C4F/ T7XY1nZj/fX/AOSH4rjOq9E6l0mzZmVFrSYZa33Vu+Dv4L19Qvx6Mmp1GRW22p4hzHCQQtDl/imf GQMh96Hj830P8VpgDto+KJLqPrR9UX9M3ZuCDZgzL2cupn8rfP71y63sObHmgJ4zYP2g9ixEEGip JJJSoXa1znBrQS5xgAckleo/Vb6vM6Phh9oBzrwDc790cisfDv5rlfqJ0kZnUXZ1rZpw4LJ4Nrvo /wCbz9y9GWH8W5o8X3eB0GuTz6Blxx6qSSVDrPWcTo2J9pyZcXHbVU36T3eA/iVkwhKchCAMpS0A C9vpLiKP8YxNwGRhbaCdSx8vA+BABXZ42TTl49eTjuD6bWhzHDuCpc/K5sFe7DhEtjdj8FCQOyRJ Vuo9Qxum4lmZlO21V+GpcTw1o8SuQP8AjHd62mCPQn/Se+P82EsHKZ8wMsUOIR62Br9UGQG73CSq 9M6li9Uw2ZmK6a36EHRzXDlrh4hWlDKJjIxkKMTRBXLOa17Sx4DmuBDmnUEHsV5j9bfq/wDsfMFt AP2LIJNX8h3ev+5enqj1rplfVem3Yb43PE1OP5tjdWlWuR5o8vlBJ9E9Jjw7/RbKNh8fSRPQu9f7 PtPrb/T2d987dv3pLqLHfx+jA+ofU/CGH0HHkQ+8G9/9v6P/AEYW0h41Qox6qRxUxrB/ZEIi4/NM 5Ms5n9ORl9rYAoAKXEf4xqLicLIAJoaHsJ7B5gj7wF26Hk42Pl0ux8mtttLxDmOEgqTlc/sZoZa4 hG7HgdFSFinxVeo/Uui+n6v44ukby97Gnsxxlv38p6PqX9X6b/WGOXwZax7i5g/snn5rcAAAAEAc BXfiHxDHnxxx44yri4iZfkFkIEGy8v8A4waL7Oj1WVgmum4OtA7Atc0OPzK85XttlbLWOrsaHseC HNcJBB7ELCP1K+rxv9b7O6Jn0t7tn3TP4o8h8Rx4MXt5Iy0JMTHx7qlAk2Gl/i8ovr6ZkWvBFVtv 6Ke+0Q5w/J8l1ajVVXTW2qpoZWwQ1jRAAHYBSWfzGb3s08tcPGbpeBQpSSSSiS8d+xGf8/PU2/od n22I03fQ/wDPmqS6z7Oz7V9pj3+n6c+W7ckrv36fc/7m9j+1bw/9K0oIIBHB4SVPo2SMvpOHkAzv pZP9YCHfiFcVOcTGUoneJI+xKkkkkEqSSSSUpJJJJSkkkklKSSSSUrySWX+0m/8AOT9mz/2l9T+3 v4/zUlL7E+3+T93/AAUX+dOP/i+6kLsC3p7z+kxnb2D/AIN+v4O/KusXkHROq2dJ6lVmMktadtrB +dW76Q/u8165j305NFeRQ4PqtaHMcO4KufFOXOPOcgHoza/4XUftWwNiuzMkASeFiYv1u6Nk59mC LdjmO212v0rtPfa74+PK2yARB1BXKdc+ouLmOdkdNcMa86uqP804+UfR/Iq3LR5eRlHPKUOIeiQ2 B8Uyvo9WkvNmZv1u+rf6O1rzjt0AsHq0/wBl44+RWjj/AOMd4AGTggnu6uyP+i5p/Kp5fDM/zYjD PDpKEh+1HGOuj3CS41/+MfFA9mFYXeBeAPwBWfk/XzrOWfSwMdlLnaDaDbZ8u34IR+Gc2d4CA7yk K/BXHF7nP6jhdOoORmWtqrHE8uPg0ckqt0Tr2F1ql9mNLH1uh9T43Afmu07FcbifVP6wdavGT1Wx 1LDy+47rI8G19vnC7bpPRsDpFHo4dcE/zlrtXvP8pyGfDy2HGYjJ72e94fJHwSDInag3kznNY0uc Ya0SSeAAnXLfXnrgw8L9m0O/WcofpI5ZV3/zuPvVfBhlmyxxx/SO/YdSkmhbyv7fd/zp/bEn0/W4 /wCB/m4/zEliJLqfu2L93/Jez/gdmCz+NqXUfVH60fsx4wc1x+w2H2POvouPf+qe/wB65dJHNhhm xnHMWD9oPcKBINh9ta5r2h7CHNcJa4agg9wnXmH1f+tuZ0iKLQcjC/0RPuZ/xZ/gvQemda6b1Wvf h3B7vzqj7bG/FpXN81yOXlySRxw6TG317M0ZAt7nQqnf0bpORrdhUvJ7mts/eBKuJKrGUom4kx8j SXNZ9W+gsMjApnzbP5VeoxcbHEY9LKR4VtDf+pCIknSy5JfNOUv7xJVQUkmc5rGlzyGtGpJMABcv 1z684WG11HTYysnj1P8ABMPx/O+X3p2HBlzS4ccTL8h5lRIG7qdf6/i9FxfUsIfkvB9CidXHxPg0 LyzMzMjOybMrJdvutO5zv4DyCWZmZOdkOycqw23P+k535B4BBXR8lyUeWj+9kl80v2DwYZSvyUkk kri1SSSSSlIlHr+q37Pv9afZ6c758tuqSSB2P7dlPc9E/wCfm1vqbPR0j7b9KP7H6T711mP9q2D7 V6e/v6e6P+kkkuZ575z/ALm3/wAh+1nj9fql+Cy+p/8AOTaf2b9l/wCub9/y/NSSVfB84/m/+q/K k/X6PA9f/wCdO4/tj1vTnT/Q/L0/YsNJJdTy381H+a/6j8n0YDv1+qkkklMhSSSSSn//2Q==" preserveAspectRatio="xMaxYMax meet" width="30" height="60" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.12 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-desc-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-desc-02-t.svg
new file mode 100644
index 0000000000..140f9e2ad8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-desc-02-t.svg
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="CN" desc="Test the CSS2 font-maching algorithm against a set of SVG fonts."
+ status="accepted"
+ approved="yes" version="$Revision: 1.6 $" testname="$RCSfile: fonts-desc-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This tests the behaviour of CSS font matching based on font-variant attribute.</p>
+ <p>The first line of text should be 'square' 'triangle'. The small-caps font should match the second text element.</p>
+ <p>The second line of text should be 'square' 'triangle'. The second line is used to ensure that the order of font specification does not effect the selection of these fonts.</p>
+ <p>The third line of text should be 'square', 'diamond', 'square', 'diamond'. This shows that the correct font is selected when a font in the list does not support the variant required. Note that the fonts provide no x-height so scaling (allowed by CSS) cannot be used to simulate a small cap from a regular font.</p>
+ <p>The last line of test can be 'square', 'a', 'a' (from a fallback font), 'diamond'. The first 'a' can be replaced with a smallcaps 'A', if there is a smallcaps font installed or if synthesis is supported.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-desc-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont1" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750L0 750Z" />
+ </font>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont1" font-variant="small-caps" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="upward-triangle" d="M0 0L500 0L250 900Z" />
+ </font>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont2" font-variant="small-caps" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="upward-triangle" d="M0 0L500 0L250 900Z" />
+ </font>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont2" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750L0 750Z" />
+ </font>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont4" font-variant="normal" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750L0 750Z" />
+ </font>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont5" font-variant="small-caps" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="diamond" d="M0 500L250 250L500 500L250 750Z" />
+ </font>
+ </defs>
+ <g font-size="30">
+ <!-- This should produce a square followed by a triangle -->
+ <text x="50" y="50" font-family="SVGFont1">a</text>
+ <text x="100" y="50" font-family="SVGFont1" font-variant="small-caps">a</text>
+ <!-- This should produce a square followed by a triangle -->
+ <text x="50" y="100" font-family="SVGFont2">a</text>
+ <text x="100" y="100" font-family="SVGFont2" font-variant="small-caps">a</text>
+ <!-- This should produce a square, diamond, square, diamond. -->
+ <text x="50" y="150" font-family="SVGFont5,SVGFont4" font-variant="normal">a</text>
+ <text x="100" y="150" font-family="SVGFont5,SVGFont4" font-variant="small-caps">a</text>
+ <text x="150" y="150" font-family="SVGFont4,SVGFont5" font-variant="normal">a</text>
+ <text x="200" y="150" font-family="SVGFont4,SVGFont5" font-variant="small-caps">a</text>
+ <!-- This should produce a square, 'a', 'a', diamond. Or a small-caps version of the 'A' instead of the first lower-case 'a' if synethesis is supported -->
+ <text x="50" y="200" font-family="SVGFont4" font-variant="normal">a</text>
+ <text x="100" y="200" font-family="SVGFont4" font-variant="small-caps">a</text>
+ <text x="150" y="200" font-family="SVGFont5" font-variant="normal">a</text>
+ <text x="200" y="200" font-family="SVGFont5" font-variant="small-caps">a</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-01-t.svg
new file mode 100644
index 0000000000..36927a1f6f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-01-t.svg
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="Dean Jackson" desc="Basic test of embedded fonts using glyph outlines"
+ status="accepted"
+ approved="yes" version="$Revision: 1.8 $" testname="$RCSfile: fonts-elem-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This is a basic test for embedded SVG fonts. The font &quot;Comic Sans&quot; (available from Microsoft) has been converted into an SVG font and embedded in the SVG file. The test contains two text areas, each with the character string "Ay&#xd6;@&#xe7;" drawn at the same font size.</p>
+ <p>The upper area contains the glyphs from the embedded font placed in the SVG file as path elements. Each glyph is placed at the location it would be if rendered using normal text rendering (ie. the horizontal advance between characters has been preserved).</p>
+ <p>The lower area contains the text string rendered using the embedded SVG font. It should appear exactly the same as the upper text area, ie. font size, character baseline and horizontal advance should be the same.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-elem-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="959">
+ <font-face font-family="TestComic" units-per-em="2048" panose-1="3 15 7 2 3 3 2 2 2 4" ascent="2257" descent="-597" alphabetic="0" />
+ <missing-glyph horiz-adv-x="1024" d="M128 0V1638H896V0H128zM256 128H768V1510H256V128z" />
+ <glyph unicode="@" horiz-adv-x="1907" d="M1306 412Q1200 412 1123 443T999 535Q945 482 894 455T793 428Q682 428 584 518T485 717Q485 902 630 1055T961 1208Q1003 1208 1031 1177T1059 1102Q1059 1042 959 1013Q826 975 771 926Q690 855 690 717Q690 688 717 661Q748 631 794 633Q881 637 955 795Q1022 933 1074 933Q1116 933 1142 902T1168 826Q1168 806 1162 766T1155 706Q1155 641 1211 624Q1233 617 1306 617Q1443 617 1498 684Q1548 744 1548 883Q1548 1128 1351 1283Q1171 1425 921 1425Q630 1425 465 1205Q316 1009 316 712Q316 438 491 250Q673 54 959 54Q1040 54 1142 85L1317 150Q1361 166 1374 166Q1415 166 1445 134T1475 58Q1475 -37 1262 -96Q1101 -140 961 -140Q820 -140 673 -86T420 60Q110 328 110 712Q110 1096 322 1354Q547 1630 921 1630Q1259 1630 1500 1427Q1753 1212 1753 883Q1753 658 1643 537Q1528 412 1306 412z" />
+ <glyph unicode="A" horiz-adv-x="1498" d="M1250 -30Q1158 -30 1090 206Q1064 296 1025 521Q923 507 758 471L492 416Q442 285 321 33Q289 -23 234 -23Q194 -23 163 6T131 78Q131 126 282 443Q265 469 265 503Q265 584 363 607Q477 821 651 1099Q888 1478 946 1478Q1025 1478 1054 1368L1117 1032L1266 337L1323 179Q1352 98 1352 71Q1352 28 1321 -1T1250 -30zM897 1113L611 652Q732 683 978 727L897 1113z" />
+ <glyph unicode="y" horiz-adv-x="1066" d="M1011 892L665 144Q537 -129 469 -313L403 -507Q377 -579 313 -579Q271 -579 241 -552T210 -483Q210 -383 426 96L68 785L23 858Q-4 904 -4 935Q-4 976 27 1007T98 1038Q144 1038 169 1003Q339 767 534 331L682 676Q762 855 836 984Q868 1040 920 1040Q961 1040 992 1011T1024 942Q1024 920 1011 892z" />
+ <glyph unicode="Ö" horiz-adv-x="1635" d="M802 -61Q520 -61 324 108Q116 288 116 572Q116 918 321 1201Q550 1515 892 1515Q1221 1515 1381 1367Q1548 1213 1548 881Q1548 535 1360 257Q1144 -61 802 -61zM892 1310Q647 1310 477 1066Q320 842 320 572Q320 379 463 258Q600 144 802 144Q1045 144 1203 389Q1344 608 1344 881Q1344 1120 1237 1217Q1135 1310 892 1310zM682 1848Q813 1848 813 1743Q813 1713 769 1685Q729 1660 694 1660Q571 1660 571 1763Q571 1792 608 1820T682 1848zM1221 1856Q1255 1856 1290 1825T1325 1763Q1325 1671 1182 1671Q1141 1671 1109 1692Q1073 1716 1073 1755Q1073 1824 1118 1844Q1143 1856 1221 1856z" />
+ <glyph unicode="ç" horiz-adv-x="1052" d="M770 -196Q770 -320 710 -382T528 -445Q443 -445 367 -413Q271 -371 271 -298Q271 -244 339 -244Q375 -244 420 -268T517 -293Q566 -292 590 -269T614 -201Q614 -153 577 -115T463 -48Q304 -12 208 104Q105 227 105 404Q105 607 240 823Q390 1063 578 1063Q676 1063 797 1017Q950 958 950 873Q950 835 925 806T863 776Q834 776 813 793T771 828Q712 875 578 875Q476 875 376 693Q285 526 285 404Q285 272 375 196Q459 125 591 125Q651 125 719 157L835 219Q865 235 878 235Q915 235 942 206T969 138Q969 35 713 -40Q742 -78 756 -117T770 -196z" />
+ </font>
+ </defs>
+ <!-- ===================================================================== -->
+ <!-- Define the font for embedding - using Microsoft's "Comic Sans MS" -->
+ <!-- This is an SVG Font version of Comic. The Comic font license -->
+ <!-- allows editable and installable font embedding. -->
+ <!-- Only need to embed the characters that are used in the test -->
+ <!-- ===================================================================== -->
+ <text fill="black" stroke="none" font-size="35" x="56" y="35">Basic SVG font element</text>
+ <!-- ====================================================================== -->
+ <!-- First place the glyphs by hand -->
+ <!-- ====================================================================== -->
+ <g fill="black" stroke="none">
+ <text x="30" y="130" font-size="18">Placed Glyphs</text>
+ <!-- translate to text position and flip y axis (glyphs are drawn -->
+ <!-- upside down -->
+ <g transform="translate(165,140) scale(1, -1)">
+ <line x1="0" y1="0" x2="210" y2="0" stroke-width="1" stroke="#888888" />
+ <!-- fontsize / units-per-em == 60 / 2048 == 0.029296875 -->
+ <g transform="scale(0.029296875)">
+ <!-- uppercase A -->
+ <line x1="0" y1="-3500" x2="0" y2="2000" stroke-width="50" stroke="#888888" />
+ <path d="M1250 -30Q1158 -30 1090 206Q1064 296 1025 521Q923 507 758 471L492 416Q442 285 321 33Q289 -23 234 -23Q194 -23 163 6T131 78Q131 126 282 443Q265 469 265 503Q265 584 363 607Q477 821 651 1099Q888 1478 946 1478Q1025 1478 1054 1368L1117 1032L1266 337L1323 179Q1352 98 1352 71Q1352 28 1321 -1T1250 -30zM897 1113L611 652Q732 683 978 727L897 1113z" />
+ <!-- lowercase y -->
+ <line x1="1498" y1="-3500" x2="1498" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(1498,0)" d="M1011 892L665 144Q537 -129 469 -313L403 -507Q377 -579 313 -579Q271 -579 241 -552T210 -483Q210 -383 426 96L68 785L23 858Q-4 904 -4 935Q-4 976 27 1007T98 1038Q144 1038 169 1003Q339 767 534 331L682 676Q762 855 836 984Q868 1040 920 1040Q961 1040 992 1011T1024 942Q1024 920 1011 892z" />
+ <!-- unicode 00D6 -->
+ <line x1="2564" y1="-3500" x2="2564" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(2564,0)" d="M802 -61Q520 -61 324 108Q116 288 116 572Q116 918 321 1201Q550 1515 892 1515Q1221 1515 1381 1367Q1548 1213 1548 881Q1548 535 1360 257Q1144 -61 802 -61zM892 1310Q647 1310 477 1066Q320 842 320 572Q320 379 463 258Q600 144 802 144Q1045 144 1203 389Q1344 608 1344 881Q1344 1120 1237 1217Q1135 1310 892 1310zM682 1848Q813 1848 813 1743Q813 1713 769 1685Q729 1660 694 1660Q571 1660 571 1763Q571 1792 608 1820T682 1848zM1221 1856Q1255 1856 1290 1825T1325 1763Q1325 1671 1182 1671Q1141 1671 1109 1692Q1073 1716 1073 1755Q1073 1824 1118 1844Q1143 1856 1221 1856z" />
+ <!-- @ sign -->
+ <line x1="4199" y1="-3500" x2="4199" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(4199,0)" d="M1306 412Q1200 412 1123 443T999 535Q945 482 894 455T793 428Q682 428 584 518T485 717Q485 902 630 1055T961 1208Q1003 1208 1031 1177T1059 1102Q1059 1042 959 1013Q826 975 771 926Q690 855 690 717Q690 688 717 661Q748 631 794 633Q881 637 955 795Q1022 933 1074 933Q1116 933 1142 902T1168 826Q1168 806 1162 766T1155 706Q1155 641 1211 624Q1233 617 1306 617Q1443 617 1498 684Q1548 744 1548 883Q1548 1128 1351 1283Q1171 1425 921 1425Q630 1425 465 1205Q316 1009 316 712Q316 438 491 250Q673 54 959 54Q1040 54 1142 85L1317 150Q1361 166 1374 166Q1415 166 1445 134T1475 58Q1475 -37 1262 -96Q1101 -140 961 -140Q820 -140 673 -86T420 60Q110 328 110 712Q110 1096 322 1354Q547 1630 921 1630Q1259 1630 1500 1427Q1753 1212 1753 883Q1753 658 1643 537Q1528 412 1306 412z" />
+ <!-- unicode 00E7 -->
+ <line x1="6106" y1="-3500" x2="6106" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(6106,0)" d="M770 -196Q770 -320 710 -382T528 -445Q443 -445 367 -413Q271 -371 271 -298Q271 -244 339 -244Q375 -244 420 -268T517 -293Q566 -292 590 -269T614 -201Q614 -153 577 -115T463 -48Q304 -12 208 104Q105 227 105 404Q105 607 240 823Q390 1063 578 1063Q676 1063 797 1017Q950 958 950 873Q950 835 925 806T863 776Q834 776 813 793T771 828Q712 875 578 875Q476 875 376 693Q285 526 285 404Q285 272 375 196Q459 125 591 125Q651 125 719 157L835 219Q865 235 878 235Q915 235 942 206T969 138Q969 35 713 -40Q742 -78 756 -117T770 -196z" />
+ <line x1="7158" y1="-3500" x2="7158" y2="2000" stroke-width="50" stroke="#888888" />
+ </g>
+ </g>
+ </g>
+ <text x="65" y="210" font-size="18">SVG Font</text>
+ <g transform="translate(165, 220)" font-family="TestComic" font-size="60" fill="black" stroke="none">
+ <line x1="0" y1="0" x2="210" y2="0" stroke-width="1" stroke="#888888" />
+ <text>AyÖ@ç</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-02-t.svg
new file mode 100644
index 0000000000..484765b7cf
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-02-t.svg
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="Dean Jackson" desc="Basic test of embedded fonts using glyph outlines" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: fonts-elem-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This is an accuracy test for embedded SVG fonts. The font &quot;Comic Sans&quot; (available from Microsoft) has been converted into an SVG font and embedded in the SVG file. The test contains two text areas, each with the character string "Ay&#xd6;@&#xe7;" drawn at the same font size.</p>
+ <p>The upper area has the placed glyphs as path elements filled with white over a solid black background (creating a white cutout). The embedded SVG font text is then drawn over the cutout. An implementation that passes this test should completely fill the cutout, leaving a solid black area (some slight antialiasing effects may remain).</p>
+ <p>The lower area is the reverse of the upper area, with the placed black glyphs filling the cutout created by white SVG font text. An implementation that passes this test should completely fill the cutout, leaving a solid black area (some slight antialiasing effects may remain).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-elem-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="959">
+ <font-face font-family="TestComic" units-per-em="2048" panose-1="3 15 7 2 3 3 2 2 2 4" ascent="2257" descent="-597" alphabetic="0" />
+ <missing-glyph horiz-adv-x="1024" d="M128 0V1638H896V0H128zM256 128H768V1510H256V128z" />
+ <glyph unicode="@" horiz-adv-x="1907" d="M1306 412Q1200 412 1123 443T999 535Q945 482 894 455T793 428Q682 428 584 518T485 717Q485 902 630 1055T961 1208Q1003 1208 1031 1177T1059 1102Q1059 1042 959 1013Q826 975 771 926Q690 855 690 717Q690 688 717 661Q748 631 794 633Q881 637 955 795Q1022 933 1074 933Q1116 933 1142 902T1168 826Q1168 806 1162 766T1155 706Q1155 641 1211 624Q1233 617 1306 617Q1443 617 1498 684Q1548 744 1548 883Q1548 1128 1351 1283Q1171 1425 921 1425Q630 1425 465 1205Q316 1009 316 712Q316 438 491 250Q673 54 959 54Q1040 54 1142 85L1317 150Q1361 166 1374 166Q1415 166 1445 134T1475 58Q1475 -37 1262 -96Q1101 -140 961 -140Q820 -140 673 -86T420 60Q110 328 110 712Q110 1096 322 1354Q547 1630 921 1630Q1259 1630 1500 1427Q1753 1212 1753 883Q1753 658 1643 537Q1528 412 1306 412z" />
+ <glyph unicode="A" horiz-adv-x="1498" d="M1250 -30Q1158 -30 1090 206Q1064 296 1025 521Q923 507 758 471L492 416Q442 285 321 33Q289 -23 234 -23Q194 -23 163 6T131 78Q131 126 282 443Q265 469 265 503Q265 584 363 607Q477 821 651 1099Q888 1478 946 1478Q1025 1478 1054 1368L1117 1032L1266 337L1323 179Q1352 98 1352 71Q1352 28 1321 -1T1250 -30zM897 1113L611 652Q732 683 978 727L897 1113z" />
+ <glyph unicode="y" horiz-adv-x="1066" d="M1011 892L665 144Q537 -129 469 -313L403 -507Q377 -579 313 -579Q271 -579 241 -552T210 -483Q210 -383 426 96L68 785L23 858Q-4 904 -4 935Q-4 976 27 1007T98 1038Q144 1038 169 1003Q339 767 534 331L682 676Q762 855 836 984Q868 1040 920 1040Q961 1040 992 1011T1024 942Q1024 920 1011 892z" />
+ <glyph unicode="Ö" horiz-adv-x="1635" d="M802 -61Q520 -61 324 108Q116 288 116 572Q116 918 321 1201Q550 1515 892 1515Q1221 1515 1381 1367Q1548 1213 1548 881Q1548 535 1360 257Q1144 -61 802 -61zM892 1310Q647 1310 477 1066Q320 842 320 572Q320 379 463 258Q600 144 802 144Q1045 144 1203 389Q1344 608 1344 881Q1344 1120 1237 1217Q1135 1310 892 1310zM682 1848Q813 1848 813 1743Q813 1713 769 1685Q729 1660 694 1660Q571 1660 571 1763Q571 1792 608 1820T682 1848zM1221 1856Q1255 1856 1290 1825T1325 1763Q1325 1671 1182 1671Q1141 1671 1109 1692Q1073 1716 1073 1755Q1073 1824 1118 1844Q1143 1856 1221 1856z" />
+ <glyph unicode="ç" horiz-adv-x="1052" d="M770 -196Q770 -320 710 -382T528 -445Q443 -445 367 -413Q271 -371 271 -298Q271 -244 339 -244Q375 -244 420 -268T517 -293Q566 -292 590 -269T614 -201Q614 -153 577 -115T463 -48Q304 -12 208 104Q105 227 105 404Q105 607 240 823Q390 1063 578 1063Q676 1063 797 1017Q950 958 950 873Q950 835 925 806T863 776Q834 776 813 793T771 828Q712 875 578 875Q476 875 376 693Q285 526 285 404Q285 272 375 196Q459 125 591 125Q651 125 719 157L835 219Q865 235 878 235Q915 235 942 206T969 138Q969 35 713 -40Q742 -78 756 -117T770 -196z" />
+ </font>
+ </defs>
+ <!-- ===================================================================== -->
+ <!-- Define the font for embedding - using Microsoft's "Comic Sans MS" -->
+ <!-- This is an SVG Font version of Comic. The Comic font license -->
+ <!-- allows editable and installable font embedding. -->
+ <!-- Only need to embed the characters that are used in the test -->
+ <!-- ===================================================================== -->
+ <text fill="black" stroke="none" font-size="35" x="28" y="35">SVG font element accuracy</text>
+ <rect x="165" y="80" width="220" height="165" fill="black" />
+ <text x="7" y="130" font-size="18">SVG over Glyphs</text>
+ <!-- translate to text position and flip y axis (glyphs are drawn -->
+ <!-- upside down -->
+ <g transform="translate(165,140) scale(1, -1)" fill="white">
+ <!-- fontsize / units-per-em == 60 / 2048 == 0.029296875 -->
+ <g transform="scale(0.029296875)">
+ <!-- uppercase A -->
+ <path d="M1250 -30Q1158 -30 1090 206Q1064 296 1025 521Q923 507 758 471L492 416Q442 285 321 33Q289 -23 234 -23Q194 -23 163 6T131 78Q131 126 282 443Q265 469 265 503Q265 584 363 607Q477 821 651 1099Q888 1478 946 1478Q1025 1478 1054 1368L1117 1032L1266 337L1323 179Q1352 98 1352 71Q1352 28 1321 -1T1250 -30zM897 1113L611 652Q732 683 978 727L897 1113z" />
+ <!-- lowercase y -->
+ <path transform="translate(1498,0)" d="M1011 892L665 144Q537 -129 469 -313L403 -507Q377 -579 313 -579Q271 -579 241 -552T210 -483Q210 -383 426 96L68 785L23 858Q-4 904 -4 935Q-4 976 27 1007T98 1038Q144 1038 169 1003Q339 767 534 331L682 676Q762 855 836 984Q868 1040 920 1040Q961 1040 992 1011T1024 942Q1024 920 1011 892z" />
+ <!-- unicode 00D6 -->
+ <path transform="translate(2564,0)" d="M802 -61Q520 -61 324 108Q116 288 116 572Q116 918 321 1201Q550 1515 892 1515Q1221 1515 1381 1367Q1548 1213 1548 881Q1548 535 1360 257Q1144 -61 802 -61zM892 1310Q647 1310 477 1066Q320 842 320 572Q320 379 463 258Q600 144 802 144Q1045 144 1203 389Q1344 608 1344 881Q1344 1120 1237 1217Q1135 1310 892 1310zM682 1848Q813 1848 813 1743Q813 1713 769 1685Q729 1660 694 1660Q571 1660 571 1763Q571 1792 608 1820T682 1848zM1221 1856Q1255 1856 1290 1825T1325 1763Q1325 1671 1182 1671Q1141 1671 1109 1692Q1073 1716 1073 1755Q1073 1824 1118 1844Q1143 1856 1221 1856z" />
+ <!-- @ sign -->
+ <path transform="translate(4199,0)" d="M1306 412Q1200 412 1123 443T999 535Q945 482 894 455T793 428Q682 428 584 518T485 717Q485 902 630 1055T961 1208Q1003 1208 1031 1177T1059 1102Q1059 1042 959 1013Q826 975 771 926Q690 855 690 717Q690 688 717 661Q748 631 794 633Q881 637 955 795Q1022 933 1074 933Q1116 933 1142 902T1168 826Q1168 806 1162 766T1155 706Q1155 641 1211 624Q1233 617 1306 617Q1443 617 1498 684Q1548 744 1548 883Q1548 1128 1351 1283Q1171 1425 921 1425Q630 1425 465 1205Q316 1009 316 712Q316 438 491 250Q673 54 959 54Q1040 54 1142 85L1317 150Q1361 166 1374 166Q1415 166 1445 134T1475 58Q1475 -37 1262 -96Q1101 -140 961 -140Q820 -140 673 -86T420 60Q110 328 110 712Q110 1096 322 1354Q547 1630 921 1630Q1259 1630 1500 1427Q1753 1212 1753 883Q1753 658 1643 537Q1528 412 1306 412z" />
+ <!-- unicode 00E7 -->
+ <path transform="translate(6106,0)" d="M770 -196Q770 -320 710 -382T528 -445Q443 -445 367 -413Q271 -371 271 -298Q271 -244 339 -244Q375 -244 420 -268T517 -293Q566 -292 590 -269T614 -201Q614 -153 577 -115T463 -48Q304 -12 208 104Q105 227 105 404Q105 607 240 823Q390 1063 578 1063Q676 1063 797 1017Q950 958 950 873Q950 835 925 806T863 776Q834 776 813 793T771 828Q712 875 578 875Q476 875 376 693Q285 526 285 404Q285 272 375 196Q459 125 591 125Q651 125 719 157L835 219Q865 235 878 235Q915 235 942 206T969 138Q969 35 713 -40Q742 -78 756 -117T770 -196z" />
+ </g>
+ </g>
+ <g transform="translate(165, 140)" font-family="TestComic" font-size="60" fill="black" stroke="none">
+ <text>AyÖ@ç</text>
+ </g>
+ <text x="7" y="210" font-size="18">Glyphs over SVG</text>
+ <g transform="translate(165, 210)" font-family="TestComic" font-size="60" fill="white" stroke="none">
+ <text>AyÖ@ç</text>
+ </g>
+ <!-- translate to text position and flip y axis (glyphs are drawn -->
+ <!-- upside down -->
+ <g transform="translate(165,210) scale(1, -1)" fill="black">
+ <!-- fontsize / units-per-em == 60 / 2048 == 0.029296875 -->
+ <g transform="scale(0.029296875)">
+ <!-- uppercase A -->
+ <path d="M1250 -30Q1158 -30 1090 206Q1064 296 1025 521Q923 507 758 471L492 416Q442 285 321 33Q289 -23 234 -23Q194 -23 163 6T131 78Q131 126 282 443Q265 469 265 503Q265 584 363 607Q477 821 651 1099Q888 1478 946 1478Q1025 1478 1054 1368L1117 1032L1266 337L1323 179Q1352 98 1352 71Q1352 28 1321 -1T1250 -30zM897 1113L611 652Q732 683 978 727L897 1113z" />
+ <!-- lowercase y -->
+ <path transform="translate(1498,0)" d="M1011 892L665 144Q537 -129 469 -313L403 -507Q377 -579 313 -579Q271 -579 241 -552T210 -483Q210 -383 426 96L68 785L23 858Q-4 904 -4 935Q-4 976 27 1007T98 1038Q144 1038 169 1003Q339 767 534 331L682 676Q762 855 836 984Q868 1040 920 1040Q961 1040 992 1011T1024 942Q1024 920 1011 892z" />
+ <!-- unicode 00D6 -->
+ <path transform="translate(2564,0)" d="M802 -61Q520 -61 324 108Q116 288 116 572Q116 918 321 1201Q550 1515 892 1515Q1221 1515 1381 1367Q1548 1213 1548 881Q1548 535 1360 257Q1144 -61 802 -61zM892 1310Q647 1310 477 1066Q320 842 320 572Q320 379 463 258Q600 144 802 144Q1045 144 1203 389Q1344 608 1344 881Q1344 1120 1237 1217Q1135 1310 892 1310zM682 1848Q813 1848 813 1743Q813 1713 769 1685Q729 1660 694 1660Q571 1660 571 1763Q571 1792 608 1820T682 1848zM1221 1856Q1255 1856 1290 1825T1325 1763Q1325 1671 1182 1671Q1141 1671 1109 1692Q1073 1716 1073 1755Q1073 1824 1118 1844Q1143 1856 1221 1856z" />
+ <!-- @ sign -->
+ <path transform="translate(4199,0)" d="M1306 412Q1200 412 1123 443T999 535Q945 482 894 455T793 428Q682 428 584 518T485 717Q485 902 630 1055T961 1208Q1003 1208 1031 1177T1059 1102Q1059 1042 959 1013Q826 975 771 926Q690 855 690 717Q690 688 717 661Q748 631 794 633Q881 637 955 795Q1022 933 1074 933Q1116 933 1142 902T1168 826Q1168 806 1162 766T1155 706Q1155 641 1211 624Q1233 617 1306 617Q1443 617 1498 684Q1548 744 1548 883Q1548 1128 1351 1283Q1171 1425 921 1425Q630 1425 465 1205Q316 1009 316 712Q316 438 491 250Q673 54 959 54Q1040 54 1142 85L1317 150Q1361 166 1374 166Q1415 166 1445 134T1475 58Q1475 -37 1262 -96Q1101 -140 961 -140Q820 -140 673 -86T420 60Q110 328 110 712Q110 1096 322 1354Q547 1630 921 1630Q1259 1630 1500 1427Q1753 1212 1753 883Q1753 658 1643 537Q1528 412 1306 412z" />
+ <!-- unicode 00E7 -->
+ <path transform="translate(6106,0)" d="M770 -196Q770 -320 710 -382T528 -445Q443 -445 367 -413Q271 -371 271 -298Q271 -244 339 -244Q375 -244 420 -268T517 -293Q566 -292 590 -269T614 -201Q614 -153 577 -115T463 -48Q304 -12 208 104Q105 227 105 404Q105 607 240 823Q390 1063 578 1063Q676 1063 797 1017Q950 958 950 873Q950 835 925 806T863 776Q834 776 813 793T771 828Q712 875 578 875Q476 875 376 693Q285 526 285 404Q285 272 375 196Q459 125 591 125Q651 125 719 157L835 219Q865 235 878 235Q915 235 942 206T969 138Q969 35 713 -40Q742 -78 756 -117T770 -196z" />
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-03-t.svg
new file mode 100644
index 0000000000..01551e2937
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-03-t.svg
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="Dean Jackson" desc="Basic test of external embedded fonts with font-face-src"
+ status="accepted"
+ approved="yes" version="$Revision: 1.7 $" testname="$RCSfile: fonts-elem-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This is a basic test for external SVG fonts. The font &quot;Comic Sans&quot; (available from Microsoft) has been converted into an SVG font and placed in an external SVG file referenced by a font-face-src element. The test contains two text areas, each with the character string "Ay&#xd6;@&#xe7;" drawn at the same font size.</p>
+ <p>The upper area contains the glyphs from the font placed in the SVG file as path elements. Each glyph is placed at the location it would be if rendered using normal text rendering (ie. the horizontal advance between characters has been preserved).</p>
+ <p>The lower area contains the text string rendered using the external SVG font. It should appear exactly the same as the upper text area, ie. font size, character baseline and horizontal advance should be the same.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-elem-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <!--style type="text/css"> <![CDATA[ @font-face { font-family: 'TestComic'; font-weight: normal; font-style: normal; src: url("../images/ext-TestComic.svg#Font") format(svg) } ]]> </style-->
+ <font-face font-family="TestComic">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/ext-TestComic.svg#Font" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <text fill="black" stroke="none" font-size="30" x="26" y="35">External SVG font element (xml)</text>
+ <!-- ====================================================================== -->
+ <!-- First place the glyphs by hand -->
+ <!-- ====================================================================== -->
+ <g fill="black" stroke="none">
+ <text x="31" y="130" font-size="18">Placed Glyphs</text>
+ <!-- translate to text position and flip y axis (glyphs are drawn -->
+ <!-- upside down -->
+ <g transform="translate(165,140) scale(1, -1)">
+ <line x1="0" y1="0" x2="210" y2="0" stroke-width="1" stroke="#888888" />
+ <!-- fontsize / units-per-em == 60 / 2048 == 0.029296875 -->
+ <g transform="scale(0.029296875)">
+ <!-- uppercase A -->
+ <line x1="0" y1="-3500" x2="0" y2="2000" stroke-width="50" stroke="#888888" />
+ <path d="M1250 -30Q1158 -30 1090 206Q1064 296 1025 521Q923 507 758 471L492 416Q442 285 321 33Q289 -23 234 -23Q194 -23 163 6T131 78Q131 126 282 443Q265 469 265 503Q265 584 363 607Q477 821 651 1099Q888 1478 946 1478Q1025 1478 1054 1368L1117 1032L1266 337L1323 179Q1352 98 1352 71Q1352 28 1321 -1T1250 -30zM897 1113L611 652Q732 683 978 727L897 1113z" />
+ <!-- lowercase y -->
+ <line x1="1498" y1="-3500" x2="1498" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(1498,0)" d="M1011 892L665 144Q537 -129 469 -313L403 -507Q377 -579 313 -579Q271 -579 241 -552T210 -483Q210 -383 426 96L68 785L23 858Q-4 904 -4 935Q-4 976 27 1007T98 1038Q144 1038 169 1003Q339 767 534 331L682 676Q762 855 836 984Q868 1040 920 1040Q961 1040 992 1011T1024 942Q1024 920 1011 892z" />
+ <!-- unicode 00D6 -->
+ <line x1="2564" y1="-3500" x2="2564" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(2564,0)" d="M802 -61Q520 -61 324 108Q116 288 116 572Q116 918 321 1201Q550 1515 892 1515Q1221 1515 1381 1367Q1548 1213 1548 881Q1548 535 1360 257Q1144 -61 802 -61zM892 1310Q647 1310 477 1066Q320 842 320 572Q320 379 463 258Q600 144 802 144Q1045 144 1203 389Q1344 608 1344 881Q1344 1120 1237 1217Q1135 1310 892 1310zM682 1848Q813 1848 813 1743Q813 1713 769 1685Q729 1660 694 1660Q571 1660 571 1763Q571 1792 608 1820T682 1848zM1221 1856Q1255 1856 1290 1825T1325 1763Q1325 1671 1182 1671Q1141 1671 1109 1692Q1073 1716 1073 1755Q1073 1824 1118 1844Q1143 1856 1221 1856z" />
+ <!-- @ sign -->
+ <line x1="4199" y1="-3500" x2="4199" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(4199,0)" d="M1306 412Q1200 412 1123 443T999 535Q945 482 894 455T793 428Q682 428 584 518T485 717Q485 902 630 1055T961 1208Q1003 1208 1031 1177T1059 1102Q1059 1042 959 1013Q826 975 771 926Q690 855 690 717Q690 688 717 661Q748 631 794 633Q881 637 955 795Q1022 933 1074 933Q1116 933 1142 902T1168 826Q1168 806 1162 766T1155 706Q1155 641 1211 624Q1233 617 1306 617Q1443 617 1498 684Q1548 744 1548 883Q1548 1128 1351 1283Q1171 1425 921 1425Q630 1425 465 1205Q316 1009 316 712Q316 438 491 250Q673 54 959 54Q1040 54 1142 85L1317 150Q1361 166 1374 166Q1415 166 1445 134T1475 58Q1475 -37 1262 -96Q1101 -140 961 -140Q820 -140 673 -86T420 60Q110 328 110 712Q110 1096 322 1354Q547 1630 921 1630Q1259 1630 1500 1427Q1753 1212 1753 883Q1753 658 1643 537Q1528 412 1306 412z" />
+ <!-- unicode 00E7 -->
+ <line x1="6106" y1="-3500" x2="6106" y2="2000" stroke-width="50" stroke="#888888" />
+ <path transform="translate(6106,0)" d="M770 -196Q770 -320 710 -382T528 -445Q443 -445 367 -413Q271 -371 271 -298Q271 -244 339 -244Q375 -244 420 -268T517 -293Q566 -292 590 -269T614 -201Q614 -153 577 -115T463 -48Q304 -12 208 104Q105 227 105 404Q105 607 240 823Q390 1063 578 1063Q676 1063 797 1017Q950 958 950 873Q950 835 925 806T863 776Q834 776 813 793T771 828Q712 875 578 875Q476 875 376 693Q285 526 285 404Q285 272 375 196Q459 125 591 125Q651 125 719 157L835 219Q865 235 878 235Q915 235 942 206T969 138Q969 35 713 -40Q742 -78 756 -117T770 -196z" />
+ <line x1="7158" y1="-3500" x2="7158" y2="2000" stroke-width="50" stroke="#888888" />
+ </g>
+ </g>
+ </g>
+ <text x="67" y="210" font-size="18">SVG Font</text>
+ <g transform="translate(165, 220)" font-family="TestComic" font-size="60" fill="black" stroke="none">
+ <line x1="0" y1="0" x2="210" y2="0" stroke-width="1" stroke="#888888" />
+ <text>AyÖ@ç</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-06-t.svg
new file mode 100644
index 0000000000..7a6dd8769b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-elem-06-t.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="validates that the font element's horiz-adv-x is used" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: fonts-elem-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test validates that the font element's horiz-adv-x is used as the default glyph's advance when there is no glyph advance specified. All fonts have a units-per-em of 1000.</p>
+ <p>The first row shows a layout with a default adavance of 1000. Glyphs have no advance so the 1000 default should be used.</p>
+ <p>The second row shows a layout with a default adavance of 2000. Glyphs have no advance so the 2000 default should be used.</p>
+ <p>The last row shows a layout with a default adavance of 0. Glyphs have a specified advance so the 0 default should be ignored.</p>
+ <p>Reference blue markers show the expected glyph positions.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-elem-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="advance1000" horiz-adv-x="1000">
+ <font-face font-family="advance1000" units-per-em="1000" ascent="1000" descent="0" alphabetic="0" />
+ <missing-glyph d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z" />
+ <glyph unicode="1" glyph-name="gl_1" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ </font>
+ <font xml:id="advance2000" horiz-adv-x="2000">
+ <font-face font-family="advance2000" units-per-em="1000" ascent="1000" descent="0" alphabetic="0" />
+ <missing-glyph d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z" />
+ <glyph unicode="1" glyph-name="gl_1" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ </font>
+ <font xml:id="advanceIgnored" horiz-adv-x="0">
+ <font-face font-family="advanceIgnored" units-per-em="1000" ascent="1000" descent="0" alphabetic="0" />
+ <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="3000" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="3000" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ </font>
+ <g xml:id="marker">
+ <line y2="-20" stroke="red" />
+ <rect x="-4" y="-4" width="8" height="8" fill="#8888ff" />
+ </g>
+ </defs>
+ <text x="240" y="50" text-anchor="middle" font-size="30">&lt;font&gt; horiz-adv-x</text>
+ <g transform="translate(20, 120)" font-size="14">
+ <g>
+ <text>horiz-adv-x=1000</text>
+ <use xlink:href="#marker" x="240" />
+ <use xlink:href="#marker" x="270" />
+ <text x="240" font-family="advance1000" font-size="30">12</text>
+ </g>
+ <g transform="translate(0, 40)">
+ <text>horiz-adv-x=2000</text>
+ <use xlink:href="#marker" x="240" />
+ <use xlink:href="#marker" x="300" />
+ <text x="240" font-family="advance2000" font-size="30">12</text>
+ </g>
+ <g transform="translate(0, 80)">
+ <text>horiz-adv-x=1000 but ignored</text>
+ <use xlink:href="#marker" x="240" />
+ <use xlink:href="#marker" x="330" />
+ <text x="240" font-family="advanceIgnored" font-size="30">12</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-02-t.svg
new file mode 100644
index 0000000000..8504417554
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-02-t.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test on arabic-form" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: fonts-glyph-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The first subtest tests the arabic-form attribute and should produce a 'downward triangle', a 'space', a 'square', a 'diamond' and then an 'upward triangle' in this order. Remembering that arabic text is right to left.</p>
+ <p>The second subtest is the same, but with glyphs for the letter khah. It should match the reference image.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-glyph-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="300">
+ <font-face font-family="SVGFont" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" horiz-adv-x="300" />
+ <glyph unicode="ښ" glyph-name="downward-triangle" horiz-adv-x="500" arabic-form="isolated" d="M0 900L500 900L250 0Z" />
+ <glyph unicode="ښ" glyph-name="square" horiz-adv-x="500" arabic-form="initial" d="M0 250L500 250L500 750L0 750Z" />
+ <glyph unicode="ښ" glyph-name="diamond" horiz-adv-x="500" arabic-form="medial" d="M0 500L250 250L500 500L250 750Z" />
+ <glyph unicode="ښ" glyph-name="upward-triangle" horiz-adv-x="500" arabic-form="terminal" d="M0 0L500 0L250 900Z" />
+ </font>
+ <font horiz-adv-x="573">
+ <font-face font-family="SVGAr" units-per-em="1000" panose-1="5 1 1 1 1 1 1 1 1 1" ascent="1025" descent="-399" alphabetic="0" />
+ <missing-glyph horiz-adv-x="500" d="M31 0V800H469V0H31ZM438 31V769H62V31H438Z" />
+ <glyph unicode=" " glyph-name="space" horiz-adv-x="370" />
+ <glyph unicode="خ" glyph-name="khah-isolated" arabic-form="isolated" horiz-adv-x="562" d="M309 360Q309 353 297 335T271 317Q260 317 227 337T194 370Q194 380 205 397T232 415Q246 415 277 395T309 360ZM518 -265Q516 -269 509 -275Q507 -277 502 -281Q447 -319 424 -330Q356 -363 281 -363Q228 -363 186 -347T110 -294Q69 -249 54 -199Q44 -167 44 -127Q44 -96 50 -65T76 12Q88 39 110 70Q152 127 152 137Q152 151 148 156T121 161Q95 161 85 156Q72 146 62 140Q44 128 35 130Q35 138 35 146Q37 151 43 162Q77 208 98 219T159 231Q170 231 234 221Q255 218 298 210H340Q347 210 382 218T425 230T435 235Q446 239 449 234Q454 226 444 189T426 152Q418 152 393 154T360 156Q327 156 297 149T228 120Q180 93 142 36Q96 -33 96 -110Q96 -209 168 -257Q223 -294 300 -294Q343 -294 371 -291Q429 -285 489 -267Q506 -260 511 -260Q514 -262 518 -265Z" />
+ <glyph unicode="خ" glyph-name="khah-initial" arabic-form="initial" horiz-adv-x="728" d="M297 372Q297 365 285 347T259 329Q248 329 215 349T182 382Q182 392 193 409T220 427Q234 427 265 407T297 372ZM600 0H0V68H373Q396 68 396 86Q396 89 394 95Q377 137 347 159Q308 188 243 188Q210 188 183 171Q165 160 157 158T145 156Q138 156 138 164L140 174Q145 196 191 220Q228 240 269 240Q313 240 355 221T447 160Q488 120 530 81Q543 73 563 71T609 68Q619 68 620 68T625 68Q645 68 645 46Q645 30 633 15T600 0Z" />
+ <glyph unicode="خ" glyph-name="khah-medial" arabic-form="medial" horiz-adv-x="625" d="M296 376Q296 369 284 351T258 333Q247 333 214 353T181 386Q181 396 192 413T219 431Q233 431 264 411T296 376ZM625 0H0V68H373Q396 68 396 86Q396 89 394 95Q377 137 347 159Q308 188 243 188Q210 188 183 171Q165 160 157 158T145 156Q138 156 138 164L140 174Q145 196 191 220Q228 240 269 240Q313 240 355 221T447 160Q488 120 530 81Q543 73 563 71T609 68Q619 68 620 68T625 68V0Z" />
+ <glyph unicode="خ" glyph-name="khah-terminal" arabic-form="terminal" horiz-adv-x="514" d="M296 352Q296 345 284 327T258 309Q247 309 214 329T181 362Q181 372 192 389T219 407Q233 407 264 387T296 352ZM514 0H375Q313 0 298 64T261 128Q209 128 153 62Q91 -12 91 -101Q91 -199 162 -243Q220 -279 319 -279Q367 -279 390 -276T463 -259Q466 -258 475 -255T488 -252Q490 -252 491 -254T489 -263Q484 -272 466 -286T433 -307Q408 -320 401 -323Q349 -344 277 -344Q169 -344 104 -274Q44 -210 44 -118Q44 -88 51 -53T73 14Q80 31 97 56Q132 108 132 118Q132 127 126 134T110 141Q92 141 85 137Q72 127 59 117Q49 112 44 112Q38 112 38 119Q38 122 40 128Q49 156 80 182Q116 212 157 212Q170 212 188 208Q232 198 258 198H320Q345 198 357 201Q374 207 383 209T398 214T412 216Q420 216 421 212Q424 202 414 170T396 137Q394 137 382 140T362 143Q346 143 337 135T327 104Q327 91 341 80T379 68H514V0Z" />
+ </font>
+ </defs>
+ <g font-family="SVGFont" font-size="80">
+ <!-- This should produce 'downward triangle' 'space' 'square' 'diamond' 'upward-triangle' -->
+ <text x="100" y="100">ښ ښښښ</text>
+ </g>
+ <g font-family="SVGAr" font-size="80">
+ <!-- this should produce isolated khah, followed by initial,medial and terminal khah -->
+ <text x="100" y="200">خ خخخ</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-03-t.svg
new file mode 100644
index 0000000000..4d868ae783
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-03-t.svg
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test on the lang attribute" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: fonts-glyph-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This files tests the lang attribute support of the glyph element. The test should produce an upward-triangle for the first (en) test element and a square for the second (fr) and third
+ (fr-ca) text element. In the third case, a glyph for fr is also suitable for a more specific language text fr-ca. In the fourth case, no suitable language specific or general glyph is
+ provided by the test so a fallback font for the letter 'a' should be used. A triangle or square must not be displayed in the fourth case.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-glyph-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="upward-triangle" lang="en" d="M0 0L500 0L250 900Z" />
+ <glyph unicode="a" glyph-name="square" lang="fr" d="M0 250L500 250L500 750L0 750Z" />
+ </font>
+ </defs>
+ <g font-family="SVGFont" font-size="50">
+ <!-- Should produce an upward pointing triangle -->
+ <text x="50" y="50" xml:lang="en">a</text>
+ <!-- Should produce a square -->
+ <text x="50" y="120" xml:lang="fr">a</text>
+ <!-- Should also produce a square -->
+ <text x="50" y="190" xml:lang="fr-ca">a</text>
+ <!-- Should fall back to another font -->
+ <text x="50" y="260" xml:lang="de">a</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-04-t.svg
new file mode 100644
index 0000000000..4522d3adf8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-04-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewer="CL" owner="CN" desc="Test the glyph selection rules" status="accepted" approved="yes" version="$Revision: 1.6 $" testname="$RCSfile: fonts-glyph-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This tests that glyph selection is done in the order in the definition of the font element. The first line of text should be represented by two triangles and an 'l'. The second line should be represented by a square.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-glyph-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont1" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <glyph unicode="f" glyph-name="upward-triangle" d="M0 0L500 0L250 900Z" />
+ <glyph unicode="ffl" glyph-name="square" d="M0 250L500 250L500 750L0 750Z" />
+ </font>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont2" units-per-em="1000" ascent="800" descent="200" alphabetic="200" />
+ <glyph unicode="ffl" glyph-name="square 2" d="M0 250L500 250L500 750L0 750Z" />
+ <glyph unicode="f" glyph-name="upward-triangle 2" d="M0 0L500 0L250 900Z" />
+ </font>
+ </defs>
+ <text x="100" y="100" font-size="50" font-family="SVGFont1">ffl</text>
+ <text x="100" y="200" font-size="50" font-family="SVGFont2">ffl</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-201-t.svg
new file mode 100644
index 0000000000..64e701f24f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-201-t.svg
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="CL" desc="ligature matching in document order" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: fonts-glyph-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test that ligatures are always used, and only used, when they occur before the
+ glyphs for characters they are ligatures of. The word "fjord" is displayed twice;
+ the top one must use the fj ligature and the bottom one must not; the top of the letter f overlaps the
+ dot of the letter i..
+ </p>
+ <p>
+ Two fonts are defined, almost identical; in one the fj ligature is the
+ first glyph defined, in the second one it is the last glyph.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-glyph-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="Fjord-BoldOblique-nolig" horiz-adv-x="312" >
+ <font-face
+ font-family="Fjord-nl"
+ font-weight="700"
+ font-style="oblique"
+ font-stretch="normal"
+ units-per-em="1000"
+ panose-1="2 0 8 3 0 0 0 0 0 0"
+ ascent="800"
+ descent="-200"
+ x-height="447"
+ cap-height="-1e+10"
+ bbox="-92 -234 639 726.333"
+ underline-thickness="50"
+ underline-position="-100"
+ slope="-9.8"
+ unicode-range="U+0064-U+0072"
+ />
+ <missing-glyph horiz-adv-x="432"
+ d="M33 0v666h333v-666h-333zM66 33h267v600h-267v-600z" />
+ <glyph glyph-name="f" unicode="f"
+ d="M171 429c3.33299 25.333 7.66701 48.333 13 69l11 46c20.667 62.667 53 109 97 139c8.66699 6.66699 21.667 13.667 39 21c28.667 12 62.333 19 101 21c33.333 2 62 -0.666992 86 -8h1c16 -5.33301 30 -12.667 42 -22c6.66699 -4 11.333 -8.66699 14 -14
+ c1.33301 -2 1.66699 -9 1 -21v-1l-2 -48c-2.66699 -10.667 -6 -19 -10 -25c-15.333 -22.667 -37 -32 -65 -28c-12 2 -22.333 6.33301 -31 13c-6.66699 5.33301 -12 11.667 -16 19c-9.33301 15.333 -11.333 32.333 -6 51c1.33301 4.66699 3.33301 9.66699 6 15l3 10
+ c-0.666992 2.66699 -3.66699 5.66699 -9 9c-6.66699 5.33301 -14.667 9.66699 -24 13l-11 3c-3.33301 0 -9.66699 -3.66699 -19 -11c-12.667 -9.33301 -25.333 -22.667 -38 -40c-22.667 -31.333 -39.333 -67.667 -50 -109l-6 -38l-11 -64h116l-6 -18l-5 -8l-10 -2h-20h-80
+ l-14 -83l-27 -157l-12 -70l-5 -33v-1c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.6667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39z" />
+ <glyph glyph-name="j" unicode="j"
+ d="M248 644c4.66701 1.33301 11.333 1.33301 20 0c14 -3.33301 25 -10 33 -20c15.333 -18.667 17.667 -39.333 7 -62v-2v0c-4.66699 -8.66699 -10.667 -15.667 -18 -21c-6.66699 -4.66699 -14.667 -7.66699 -24 -9h-1c-22 -4.66699 -39.667 1.66699 -53 19l-1 1
+ c-15.333 19.333 -17.667 40.333 -7 63l1 1c3.33299 8 8.33299 14.333 15 19c8.66701 6 18 9.66699 28 11zM82 385l4 18l14 3l32 4l92 21l29 10l17 5l20 1l-59 -343l-12 -73c-8 -46 -18.333 -79.3333 -31 -100c-38.667 -66.667 -108 -116 -208 -148
+ c-24 -7.33299 -48 -13 -72 -17l3 20c19.3333 4 37.6667 10.333 55 19c55.3333 28 95 76.667 119 146l5 16c4.6667 15.3333 11.667 53 21 113l22 124l17 103l5 28c1.33299 12 1.66701 19.667 1 23c-8 25.333 -32 34.333 -72 27h-2z" />
+ <glyph glyph-name="o" unicode="o" horiz-adv-x="554"
+ d="M346 447c15.333 0.666992 32 0 50 -2c42 -3.33301 75.333 -16 100 -38c20.667 -16.667 36 -40.333 46 -71c15.333 -46 15.667 -95.333 1 -148l-2 -6c-20.667 -69.333 -58.333 -121.667 -113 -157l-22 -12c-29.333 -14.6667 -66 -24.3333 -110 -29
+ c-58 -4.6667 -105 2.6667 -141 22c-8 4 -17 10.3333 -27 19c-45.3333 41.3333 -62.6667 101 -52 179c2.6667 19.333 7.3333 38.333 14 57l20 44c34 65.333 84.333 108 151 128c19.333 5.33301 47.667 10 85 14zM341 416c-6 0 -14 -3.33301 -24 -10
+ c-21.333 -12 -39.333 -26.667 -54 -44c-46.667 -52.667 -71 -113 -73 -181c-0.667007 -25.333 2.33299 -49.667 9 -73c11.333 -35.3333 29.333 -61.6667 54 -79c15.333 -10 26 -15 32 -15c4.66699 0 13 3.3333 25 10c21.333 12 39.333 26.6667 54 44
+ c46.667 52 71 112.333 73 181c0.666992 24.667 -2 48.333 -8 71c-11.333 36 -29.667 63 -55 81c-12 9.33301 -23 14.333 -33 15z" />
+ <glyph glyph-name="r" unicode="r" horiz-adv-x="445"
+ d="M318 422c-1.33301 5.33301 2 9.66699 10 13c8.66699 4.66699 23.333 8.33301 44 11c67.333 9.33301 110 -2.66699 128 -36l7 -19c2 -9.33301 2.66699 -18 2 -26c-1.33301 -8.66699 -10 -15.667 -26 -21c-20 -5.33301 -39.667 -8 -59 -8c-11.333 0 -19.667 1 -25 3
+ c-5.33301 1.33301 -7.33301 8 -6 20v3c-1.33301 17.333 -7.33301 31.333 -18 42c-6 6 -11.333 9 -16 9c-4.66699 -0.666992 -12.333 -5.33301 -23 -14c-17.333 -14 -32.333 -33.333 -45 -58c-12.667 -25.333 -22.333 -50.333 -29 -75
+ c-4.66699 -16.667 -12.667 -58.333 -24 -125l-10 -56l-4 -28c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c26.6667 0 47 9.6667 61 29l2 4c1.333 1.3333 3.667 9.3333 7 24l7 43l26 149l10 60c2.66701 15.333 2.33299 26.333 -1 33
+ c-8 16 -24.667 24 -50 24l-21 -2l4 18l12 3h1l33 4c30 4.66699 60.333 11.667 91 21l30 10l17 5l20 1l-12 -72h1c8.66699 18.667 21.667 34 39 46v1zM278 375h-1h1z" />
+ <glyph glyph-name="d" unicode="d" horiz-adv-x="562"
+ d="M380 666l50 5l81 19l31 10l22 7l20 1l-10 -60l-21 -123l-58 -339l-15 -91l-4 -23c-1.33301 -10 -1.66699 -16.3333 -1 -19c5.33301 -19.3333 22 -30 50 -32h1h1l-3 -20h-147l1 86h-1c-3.33301 -11.3333 -9.66699 -23.3333 -19 -36c-18.667 -29.3333 -41 -49 -67 -59
+ c-11.333 -4 -26 -6.6667 -44 -8c-14 -1.3333 -28 -1.3333 -42 0c-37.333 3.3333 -66 14.6667 -86 34c-26 25.3333 -41 63.6667 -45 115c-6 72 11.3333 139.667 52 203l2 3c20 30.667 43.333 54 70 70c30 18 65 29.667 105 35c23.333 2.66699 41 0.333008 53 -7
+ c22 -14 30.667 -35.333 26 -64l-1 -6l-8 -19c-3.33301 -3.33301 -5.33301 -5 -6 -5l-8 4l-14 10c6.66699 10 10 18.333 10 25v1c0 16 -6.66699 26.667 -20 32c-5.33301 2 -11 2.33301 -17 1c-4 -0.666992 -11 -4.33301 -21 -11c-14 -10.667 -27.333 -23.667 -40 -39
+ c-39.333 -50 -61 -109 -65 -177c-2 -29.333 0 -55.667 6 -79c8.66701 -36.6667 24.333 -63 47 -79c13.333 -10 23.667 -14.6667 31 -14c6 0.6667 15 5.3333 27 14c13.333 10.6667 26.333 27 39 49c14 24 25 54.333 33 91l22 119l31 180l16 98l5 28l1 19
+ c-3.33301 19.333 -18.667 30.333 -46 33h-6l-21 -2z" />
+ <glyph glyph-name="fjlig" unicode="fj" horiz-adv-x="624"
+ d="M639 633v-23c-5.33331 -25.3333 -20.3333 -41.6667 -45 -49c-18.6667 -6 -36.3333 -4.33331 -53 5c-8.66669 4.66669 -15 10 -19 16c-6 6.66669 -10 15 -12 25c-2 11.3333 -2.33334 21 -1 29c2 9.33331 6.66669 19 14 29c-26.6667 14 -45.6667 22.3333 -57 25
+ c-10 2.66669 -17.6667 3.66669 -23 3c-4.66666 0 -12.3333 -3 -23 -9c-15.3333 -8.66669 -30.6667 -20.3333 -46 -35c-33.3333 -33.3333 -56 -71 -68 -113l-9 -45l-10 -62h312l-23 -137l-34 -201l-11 -64l-9 -46c-4 -12.6667 -11.6667 -26.3333 -23 -41l-1 -2
+ c-17.3333 -22 -45 -44 -83 -66l-102 -57c-15.3333 -10 -29 -20.3333 -41 -31h-1c-5.33334 5.33333 -8.33334 9.66667 -9 13v1c0 1.33333 2.33334 4.33333 7 9l22 19c40.6667 36.6667 69.6667 69 87 97c12 19.3333 20.3333 36 25 50c4 12.6667 8 32.3333 12 59l13 76l35 203
+ l15 90h-196l-15 -87l-24 -142l-13 -77l-6 -34v-4c1.33333 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.66667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39c7.33333 62.6667 21.6667 113 43 151c12.6667 21.3333 25.6667 39.3333 39 54
+ c54.6667 58.6667 130 89.3333 226 92c13.3333 0.666687 27 0.333313 41 -1c34 -2 64.6667 -10.3333 92 -25c10 -4 17.6667 -16.6667 23 -38c2.66669 -9.33331 4 -19 4 -29z" />
+ </font>
+ <font xml:id="Fjord-BoldOblique-lig" horiz-adv-x="312" >
+ <font-face
+ font-family="Fjord-wl"
+ font-weight="700"
+ font-style="oblique"
+ font-stretch="normal"
+ units-per-em="1000"
+ panose-1="2 0 8 3 0 0 0 0 0 0"
+ ascent="800"
+ descent="-200"
+ x-height="447"
+ cap-height="-1e+10"
+ bbox="-92 -234 639 726.333"
+ underline-thickness="50"
+ underline-position="-100"
+ slope="-9.8"
+ unicode-range="U+0064-U+0072"
+ />
+ <missing-glyph horiz-adv-x="432"
+ d="M33 0v666h333v-666h-333zM66 33h267v600h-267v-600z" />
+ <glyph glyph-name="fjlig" unicode="fj" horiz-adv-x="624"
+ d="M639 633v-23c-5.33331 -25.3333 -20.3333 -41.6667 -45 -49c-18.6667 -6 -36.3333 -4.33331 -53 5c-8.66669 4.66669 -15 10 -19 16c-6 6.66669 -10 15 -12 25c-2 11.3333 -2.33334 21 -1 29c2 9.33331 6.66669 19 14 29c-26.6667 14 -45.6667 22.3333 -57 25
+ c-10 2.66669 -17.6667 3.66669 -23 3c-4.66666 0 -12.3333 -3 -23 -9c-15.3333 -8.66669 -30.6667 -20.3333 -46 -35c-33.3333 -33.3333 -56 -71 -68 -113l-9 -45l-10 -62h312l-23 -137l-34 -201l-11 -64l-9 -46c-4 -12.6667 -11.6667 -26.3333 -23 -41l-1 -2
+ c-17.3333 -22 -45 -44 -83 -66l-102 -57c-15.3333 -10 -29 -20.3333 -41 -31h-1c-5.33334 5.33333 -8.33334 9.66667 -9 13v1c0 1.33333 2.33334 4.33333 7 9l22 19c40.6667 36.6667 69.6667 69 87 97c12 19.3333 20.3333 36 25 50c4 12.6667 8 32.3333 12 59l13 76l35 203
+ l15 90h-196l-15 -87l-24 -142l-13 -77l-6 -34v-4c1.33333 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.66667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39c7.33333 62.6667 21.6667 113 43 151c12.6667 21.3333 25.6667 39.3333 39 54
+ c54.6667 58.6667 130 89.3333 226 92c13.3333 0.666687 27 0.333313 41 -1c34 -2 64.6667 -10.3333 92 -25c10 -4 17.6667 -16.6667 23 -38c2.66669 -9.33331 4 -19 4 -29z" />
+ <glyph glyph-name="f" unicode="f"
+ d="M171 429c3.33299 25.333 7.66701 48.333 13 69l11 46c20.667 62.667 53 109 97 139c8.66699 6.66699 21.667 13.667 39 21c28.667 12 62.333 19 101 21c33.333 2 62 -0.666992 86 -8h1c16 -5.33301 30 -12.667 42 -22c6.66699 -4 11.333 -8.66699 14 -14
+ c1.33301 -2 1.66699 -9 1 -21v-1l-2 -48c-2.66699 -10.667 -6 -19 -10 -25c-15.333 -22.667 -37 -32 -65 -28c-12 2 -22.333 6.33301 -31 13c-6.66699 5.33301 -12 11.667 -16 19c-9.33301 15.333 -11.333 32.333 -6 51c1.33301 4.66699 3.33301 9.66699 6 15l3 10
+ c-0.666992 2.66699 -3.66699 5.66699 -9 9c-6.66699 5.33301 -14.667 9.66699 -24 13l-11 3c-3.33301 0 -9.66699 -3.66699 -19 -11c-12.667 -9.33301 -25.333 -22.667 -38 -40c-22.667 -31.333 -39.333 -67.667 -50 -109l-6 -38l-11 -64h116l-6 -18l-5 -8l-10 -2h-20h-80
+ l-14 -83l-27 -157l-12 -70l-5 -33v-1c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.6667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39z" />
+ <glyph glyph-name="j" unicode="j"
+ d="M248 644c4.66701 1.33301 11.333 1.33301 20 0c14 -3.33301 25 -10 33 -20c15.333 -18.667 17.667 -39.333 7 -62v-2v0c-4.66699 -8.66699 -10.667 -15.667 -18 -21c-6.66699 -4.66699 -14.667 -7.66699 -24 -9h-1c-22 -4.66699 -39.667 1.66699 -53 19l-1 1
+ c-15.333 19.333 -17.667 40.333 -7 63l1 1c3.33299 8 8.33299 14.333 15 19c8.66701 6 18 9.66699 28 11zM82 385l4 18l14 3l32 4l92 21l29 10l17 5l20 1l-59 -343l-12 -73c-8 -46 -18.333 -79.3333 -31 -100c-38.667 -66.667 -108 -116 -208 -148
+ c-24 -7.33299 -48 -13 -72 -17l3 20c19.3333 4 37.6667 10.333 55 19c55.3333 28 95 76.667 119 146l5 16c4.6667 15.3333 11.667 53 21 113l22 124l17 103l5 28c1.33299 12 1.66701 19.667 1 23c-8 25.333 -32 34.333 -72 27h-2z" />
+ <glyph glyph-name="o" unicode="o" horiz-adv-x="554"
+ d="M346 447c15.333 0.666992 32 0 50 -2c42 -3.33301 75.333 -16 100 -38c20.667 -16.667 36 -40.333 46 -71c15.333 -46 15.667 -95.333 1 -148l-2 -6c-20.667 -69.333 -58.333 -121.667 -113 -157l-22 -12c-29.333 -14.6667 -66 -24.3333 -110 -29
+ c-58 -4.6667 -105 2.6667 -141 22c-8 4 -17 10.3333 -27 19c-45.3333 41.3333 -62.6667 101 -52 179c2.6667 19.333 7.3333 38.333 14 57l20 44c34 65.333 84.333 108 151 128c19.333 5.33301 47.667 10 85 14zM341 416c-6 0 -14 -3.33301 -24 -10
+ c-21.333 -12 -39.333 -26.667 -54 -44c-46.667 -52.667 -71 -113 -73 -181c-0.667007 -25.333 2.33299 -49.667 9 -73c11.333 -35.3333 29.333 -61.6667 54 -79c15.333 -10 26 -15 32 -15c4.66699 0 13 3.3333 25 10c21.333 12 39.333 26.6667 54 44
+ c46.667 52 71 112.333 73 181c0.666992 24.667 -2 48.333 -8 71c-11.333 36 -29.667 63 -55 81c-12 9.33301 -23 14.333 -33 15z" />
+ <glyph glyph-name="r" unicode="r" horiz-adv-x="445"
+ d="M318 422c-1.33301 5.33301 2 9.66699 10 13c8.66699 4.66699 23.333 8.33301 44 11c67.333 9.33301 110 -2.66699 128 -36l7 -19c2 -9.33301 2.66699 -18 2 -26c-1.33301 -8.66699 -10 -15.667 -26 -21c-20 -5.33301 -39.667 -8 -59 -8c-11.333 0 -19.667 1 -25 3
+ c-5.33301 1.33301 -7.33301 8 -6 20v3c-1.33301 17.333 -7.33301 31.333 -18 42c-6 6 -11.333 9 -16 9c-4.66699 -0.666992 -12.333 -5.33301 -23 -14c-17.333 -14 -32.333 -33.333 -45 -58c-12.667 -25.333 -22.333 -50.333 -29 -75
+ c-4.66699 -16.667 -12.667 -58.333 -24 -125l-10 -56l-4 -28c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c26.6667 0 47 9.6667 61 29l2 4c1.333 1.3333 3.667 9.3333 7 24l7 43l26 149l10 60c2.66701 15.333 2.33299 26.333 -1 33
+ c-8 16 -24.667 24 -50 24l-21 -2l4 18l12 3h1l33 4c30 4.66699 60.333 11.667 91 21l30 10l17 5l20 1l-12 -72h1c8.66699 18.667 21.667 34 39 46v1zM278 375h-1h1z" />
+ <glyph glyph-name="d" unicode="d" horiz-adv-x="562"
+ d="M380 666l50 5l81 19l31 10l22 7l20 1l-10 -60l-21 -123l-58 -339l-15 -91l-4 -23c-1.33301 -10 -1.66699 -16.3333 -1 -19c5.33301 -19.3333 22 -30 50 -32h1h1l-3 -20h-147l1 86h-1c-3.33301 -11.3333 -9.66699 -23.3333 -19 -36c-18.667 -29.3333 -41 -49 -67 -59
+ c-11.333 -4 -26 -6.6667 -44 -8c-14 -1.3333 -28 -1.3333 -42 0c-37.333 3.3333 -66 14.6667 -86 34c-26 25.3333 -41 63.6667 -45 115c-6 72 11.3333 139.667 52 203l2 3c20 30.667 43.333 54 70 70c30 18 65 29.667 105 35c23.333 2.66699 41 0.333008 53 -7
+ c22 -14 30.667 -35.333 26 -64l-1 -6l-8 -19c-3.33301 -3.33301 -5.33301 -5 -6 -5l-8 4l-14 10c6.66699 10 10 18.333 10 25v1c0 16 -6.66699 26.667 -20 32c-5.33301 2 -11 2.33301 -17 1c-4 -0.666992 -11 -4.33301 -21 -11c-14 -10.667 -27.333 -23.667 -40 -39
+ c-39.333 -50 -61 -109 -65 -177c-2 -29.333 0 -55.667 6 -79c8.66701 -36.6667 24.333 -63 47 -79c13.333 -10 23.667 -14.6667 31 -14c6 0.6667 15 5.3333 27 14c13.333 10.6667 26.333 27 39 49c14 24 25 54.333 33 91l22 119l31 180l16 98l5 28l1 19
+ c-3.33301 19.333 -18.667 30.333 -46 33h-6l-21 -2z" />
+
+ </font>
+ </defs>
+ <g fill="#127" fill-opacity="0.4" stroke="#fff" stroke-width="0.5">
+ <text x="160" y="260" font-family="Fjord-nl" font-weight="700" font-style="oblique"
+ font-size="120">fjord</text>
+ <text x="160" y="130" font-family="Fjord-wl" font-weight="700" font-style="oblique"
+ font-size="120">fjord</text>
+ <g font-size="14" fill-opacity="0.8" stroke="none">
+ <text x="20" y="100" >The Fjord fonts</text>
+ <text x="20" y="120">are derived from</text>
+ <text x="20" y="140">Gladiator</text>
+ <text x="20" y="160">by Bert Bos</text>
+ <text x="20" y="180">and are used</text>
+ <text x="20" y="200">by kind permission.</text>
+ </g>
+ <!-- No norwegian blue parrots were harmed n the making of this test -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-202-t.svg
new file mode 100644
index 0000000000..e99daea2a9
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-202-t.svg
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="CL" desc="longest substring ligature matching" status="accepted"
+ approved="yes"
+ version="$Revision: 1.11 $" testname="$RCSfile: fonts-glyph-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test that ligatures are always used, and only used, when they occur before the
+ glyphs for characters they are ligatures of. The word "fjord" is displayed twice;
+ the lower one must use the fj ligature and the upper one must not; the top of the letter f overlaps the
+ dot of the letter j..
+ </p>
+ <p>
+ Two fonts are defined, almost identical; in one the fj ligature is
+ defined after "f" but before "j"; in the second one it is the last glyph.
+ This tests longest-substring matching.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-glyph-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="Fjord-BoldOblique-jfirst" horiz-adv-x="312" >
+ <font-face
+ font-family="Fjord-jf"
+ font-weight="700"
+ font-style="oblique"
+ font-stretch="normal"
+ units-per-em="1000"
+ panose-1="2 0 8 3 0 0 0 0 0 0"
+ ascent="800"
+ descent="-200"
+ x-height="447"
+ cap-height="-1e+10"
+ bbox="-92 -234 639 726.333"
+ underline-thickness="50"
+ underline-position="-100"
+ slope="-9.8"
+ unicode-range="U+0064-U+0072"
+ />
+ <missing-glyph horiz-adv-x="432"
+ d="M33 0v666h333v-666h-333zM66 33h267v600h-267v-600z" />
+
+ <glyph glyph-name="j" unicode="j"
+ d="M248 644c4.66701 1.33301 11.333 1.33301 20 0c14 -3.33301 25 -10 33 -20c15.333 -18.667 17.667 -39.333 7 -62v-2v0c-4.66699 -8.66699 -10.667 -15.667 -18 -21c-6.66699 -4.66699 -14.667 -7.66699 -24 -9h-1c-22 -4.66699 -39.667 1.66699 -53 19l-1 1
+ c-15.333 19.333 -17.667 40.333 -7 63l1 1c3.33299 8 8.33299 14.333 15 19c8.66701 6 18 9.66699 28 11zM82 385l4 18l14 3l32 4l92 21l29 10l17 5l20 1l-59 -343l-12 -73c-8 -46 -18.333 -79.3333 -31 -100c-38.667 -66.667 -108 -116 -208 -148
+ c-24 -7.33299 -48 -13 -72 -17l3 20c19.3333 4 37.6667 10.333 55 19c55.3333 28 95 76.667 119 146l5 16c4.6667 15.3333 11.667 53 21 113l22 124l17 103l5 28c1.33299 12 1.66701 19.667 1 23c-8 25.333 -32 34.333 -72 27h-2z" />
+ <glyph glyph-name="fjlig" unicode="fj" horiz-adv-x="624"
+ d="M639 633v-23c-5.33331 -25.3333 -20.3333 -41.6667 -45 -49c-18.6667 -6 -36.3333 -4.33331 -53 5c-8.66669 4.66669 -15 10 -19 16c-6 6.66669 -10 15 -12 25c-2 11.3333 -2.33334 21 -1 29c2 9.33331 6.66669 19 14 29c-26.6667 14 -45.6667 22.3333 -57 25
+ c-10 2.66669 -17.6667 3.66669 -23 3c-4.66666 0 -12.3333 -3 -23 -9c-15.3333 -8.66669 -30.6667 -20.3333 -46 -35c-33.3333 -33.3333 -56 -71 -68 -113l-9 -45l-10 -62h312l-23 -137l-34 -201l-11 -64l-9 -46c-4 -12.6667 -11.6667 -26.3333 -23 -41l-1 -2
+ c-17.3333 -22 -45 -44 -83 -66l-102 -57c-15.3333 -10 -29 -20.3333 -41 -31h-1c-5.33334 5.33333 -8.33334 9.66667 -9 13v1c0 1.33333 2.33334 4.33333 7 9l22 19c40.6667 36.6667 69.6667 69 87 97c12 19.3333 20.3333 36 25 50c4 12.6667 8 32.3333 12 59l13 76l35 203
+ l15 90h-196l-15 -87l-24 -142l-13 -77l-6 -34v-4c1.33333 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.66667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39c7.33333 62.6667 21.6667 113 43 151c12.6667 21.3333 25.6667 39.3333 39 54
+ c54.6667 58.6667 130 89.3333 226 92c13.3333 0.666687 27 0.333313 41 -1c34 -2 64.6667 -10.3333 92 -25c10 -4 17.6667 -16.6667 23 -38c2.66669 -9.33331 4 -19 4 -29z" />
+ <glyph glyph-name="f" unicode="f"
+ d="M171 429c3.33299 25.333 7.66701 48.333 13 69l11 46c20.667 62.667 53 109 97 139c8.66699 6.66699 21.667 13.667 39 21c28.667 12 62.333 19 101 21c33.333 2 62 -0.666992 86 -8h1c16 -5.33301 30 -12.667 42 -22c6.66699 -4 11.333 -8.66699 14 -14
+ c1.33301 -2 1.66699 -9 1 -21v-1l-2 -48c-2.66699 -10.667 -6 -19 -10 -25c-15.333 -22.667 -37 -32 -65 -28c-12 2 -22.333 6.33301 -31 13c-6.66699 5.33301 -12 11.667 -16 19c-9.33301 15.333 -11.333 32.333 -6 51c1.33301 4.66699 3.33301 9.66699 6 15l3 10
+ c-0.666992 2.66699 -3.66699 5.66699 -9 9c-6.66699 5.33301 -14.667 9.66699 -24 13l-11 3c-3.33301 0 -9.66699 -3.66699 -19 -11c-12.667 -9.33301 -25.333 -22.667 -38 -40c-22.667 -31.333 -39.333 -67.667 -50 -109l-6 -38l-11 -64h116l-6 -18l-5 -8l-10 -2h-20h-80
+ l-14 -83l-27 -157l-12 -70l-5 -33v-1c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.6667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39z" />
+ <glyph glyph-name="o" unicode="o" horiz-adv-x="554"
+ d="M346 447c15.333 0.666992 32 0 50 -2c42 -3.33301 75.333 -16 100 -38c20.667 -16.667 36 -40.333 46 -71c15.333 -46 15.667 -95.333 1 -148l-2 -6c-20.667 -69.333 -58.333 -121.667 -113 -157l-22 -12c-29.333 -14.6667 -66 -24.3333 -110 -29
+ c-58 -4.6667 -105 2.6667 -141 22c-8 4 -17 10.3333 -27 19c-45.3333 41.3333 -62.6667 101 -52 179c2.6667 19.333 7.3333 38.333 14 57l20 44c34 65.333 84.333 108 151 128c19.333 5.33301 47.667 10 85 14zM341 416c-6 0 -14 -3.33301 -24 -10
+ c-21.333 -12 -39.333 -26.667 -54 -44c-46.667 -52.667 -71 -113 -73 -181c-0.667007 -25.333 2.33299 -49.667 9 -73c11.333 -35.3333 29.333 -61.6667 54 -79c15.333 -10 26 -15 32 -15c4.66699 0 13 3.3333 25 10c21.333 12 39.333 26.6667 54 44
+ c46.667 52 71 112.333 73 181c0.666992 24.667 -2 48.333 -8 71c-11.333 36 -29.667 63 -55 81c-12 9.33301 -23 14.333 -33 15z" />
+ <glyph glyph-name="r" unicode="r" horiz-adv-x="445"
+ d="M318 422c-1.33301 5.33301 2 9.66699 10 13c8.66699 4.66699 23.333 8.33301 44 11c67.333 9.33301 110 -2.66699 128 -36l7 -19c2 -9.33301 2.66699 -18 2 -26c-1.33301 -8.66699 -10 -15.667 -26 -21c-20 -5.33301 -39.667 -8 -59 -8c-11.333 0 -19.667 1 -25 3
+ c-5.33301 1.33301 -7.33301 8 -6 20v3c-1.33301 17.333 -7.33301 31.333 -18 42c-6 6 -11.333 9 -16 9c-4.66699 -0.666992 -12.333 -5.33301 -23 -14c-17.333 -14 -32.333 -33.333 -45 -58c-12.667 -25.333 -22.333 -50.333 -29 -75
+ c-4.66699 -16.667 -12.667 -58.333 -24 -125l-10 -56l-4 -28c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c26.6667 0 47 9.6667 61 29l2 4c1.333 1.3333 3.667 9.3333 7 24l7 43l26 149l10 60c2.66701 15.333 2.33299 26.333 -1 33
+ c-8 16 -24.667 24 -50 24l-21 -2l4 18l12 3h1l33 4c30 4.66699 60.333 11.667 91 21l30 10l17 5l20 1l-12 -72h1c8.66699 18.667 21.667 34 39 46v1zM278 375h-1h1z" />
+ <glyph glyph-name="d" unicode="d" horiz-adv-x="562"
+ d="M380 666l50 5l81 19l31 10l22 7l20 1l-10 -60l-21 -123l-58 -339l-15 -91l-4 -23c-1.33301 -10 -1.66699 -16.3333 -1 -19c5.33301 -19.3333 22 -30 50 -32h1h1l-3 -20h-147l1 86h-1c-3.33301 -11.3333 -9.66699 -23.3333 -19 -36c-18.667 -29.3333 -41 -49 -67 -59
+ c-11.333 -4 -26 -6.6667 -44 -8c-14 -1.3333 -28 -1.3333 -42 0c-37.333 3.3333 -66 14.6667 -86 34c-26 25.3333 -41 63.6667 -45 115c-6 72 11.3333 139.667 52 203l2 3c20 30.667 43.333 54 70 70c30 18 65 29.667 105 35c23.333 2.66699 41 0.333008 53 -7
+ c22 -14 30.667 -35.333 26 -64l-1 -6l-8 -19c-3.33301 -3.33301 -5.33301 -5 -6 -5l-8 4l-14 10c6.66699 10 10 18.333 10 25v1c0 16 -6.66699 26.667 -20 32c-5.33301 2 -11 2.33301 -17 1c-4 -0.666992 -11 -4.33301 -21 -11c-14 -10.667 -27.333 -23.667 -40 -39
+ c-39.333 -50 -61 -109 -65 -177c-2 -29.333 0 -55.667 6 -79c8.66701 -36.6667 24.333 -63 47 -79c13.333 -10 23.667 -14.6667 31 -14c6 0.6667 15 5.3333 27 14c13.333 10.6667 26.333 27 39 49c14 24 25 54.333 33 91l22 119l31 180l16 98l5 28l1 19
+ c-3.33301 19.333 -18.667 30.333 -46 33h-6l-21 -2z" />
+ </font>
+ <font xml:id="Fjord-BoldOblique-ffirst" horiz-adv-x="312" >
+ <font-face
+ font-family="Fjord-ff"
+ font-weight="700"
+ font-style="oblique"
+ font-stretch="normal"
+ units-per-em="1000"
+ panose-1="2 0 8 3 0 0 0 0 0 0"
+ ascent="800"
+ descent="-200"
+ x-height="447"
+ cap-height="-1e+10"
+ bbox="-92 -234 639 726.333"
+ underline-thickness="50"
+ underline-position="-100"
+ slope="-9.8"
+ unicode-range="U+0064-U+0072"
+ />
+ <missing-glyph horiz-adv-x="432"
+ d="M33 0v666h333v-666h-333zM66 33h267v600h-267v-600z" />
+ <glyph glyph-name="f" unicode="f"
+ d="M171 429c3.33299 25.333 7.66701 48.333 13 69l11 46c20.667 62.667 53 109 97 139c8.66699 6.66699 21.667 13.667 39 21c28.667 12 62.333 19 101 21c33.333 2 62 -0.666992 86 -8h1c16 -5.33301 30 -12.667 42 -22c6.66699 -4 11.333 -8.66699 14 -14
+ c1.33301 -2 1.66699 -9 1 -21v-1l-2 -48c-2.66699 -10.667 -6 -19 -10 -25c-15.333 -22.667 -37 -32 -65 -28c-12 2 -22.333 6.33301 -31 13c-6.66699 5.33301 -12 11.667 -16 19c-9.33301 15.333 -11.333 32.333 -6 51c1.33301 4.66699 3.33301 9.66699 6 15l3 10
+ c-0.666992 2.66699 -3.66699 5.66699 -9 9c-6.66699 5.33301 -14.667 9.66699 -24 13l-11 3c-3.33301 0 -9.66699 -3.66699 -19 -11c-12.667 -9.33301 -25.333 -22.667 -38 -40c-22.667 -31.333 -39.333 -67.667 -50 -109l-6 -38l-11 -64h116l-6 -18l-5 -8l-10 -2h-20h-80
+ l-14 -83l-27 -157l-12 -70l-5 -33v-1c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.6667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39z" />
+ <glyph glyph-name="fjlig" unicode="fj" horiz-adv-x="624"
+ d="M639 633v-23c-5.33331 -25.3333 -20.3333 -41.6667 -45 -49c-18.6667 -6 -36.3333 -4.33331 -53 5c-8.66669 4.66669 -15 10 -19 16c-6 6.66669 -10 15 -12 25c-2 11.3333 -2.33334 21 -1 29c2 9.33331 6.66669 19 14 29c-26.6667 14 -45.6667 22.3333 -57 25
+ c-10 2.66669 -17.6667 3.66669 -23 3c-4.66666 0 -12.3333 -3 -23 -9c-15.3333 -8.66669 -30.6667 -20.3333 -46 -35c-33.3333 -33.3333 -56 -71 -68 -113l-9 -45l-10 -62h312l-23 -137l-34 -201l-11 -64l-9 -46c-4 -12.6667 -11.6667 -26.3333 -23 -41l-1 -2
+ c-17.3333 -22 -45 -44 -83 -66l-102 -57c-15.3333 -10 -29 -20.3333 -41 -31h-1c-5.33334 5.33333 -8.33334 9.66667 -9 13v1c0 1.33333 2.33334 4.33333 7 9l22 19c40.6667 36.6667 69.6667 69 87 97c12 19.3333 20.3333 36 25 50c4 12.6667 8 32.3333 12 59l13 76l35 203
+ l15 90h-196l-15 -87l-24 -142l-13 -77l-6 -34v-4c1.33333 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c27.3333 0 47.6667 9.66667 61 29l4 6l5 22l6 38l49 285h-60l6 17l4 9l16 2h39c7.33333 62.6667 21.6667 113 43 151c12.6667 21.3333 25.6667 39.3333 39 54
+ c54.6667 58.6667 130 89.3333 226 92c13.3333 0.666687 27 0.333313 41 -1c34 -2 64.6667 -10.3333 92 -25c10 -4 17.6667 -16.6667 23 -38c2.66669 -9.33331 4 -19 4 -29z" />
+ <glyph glyph-name="j" unicode="j"
+ d="M248 644c4.66701 1.33301 11.333 1.33301 20 0c14 -3.33301 25 -10 33 -20c15.333 -18.667 17.667 -39.333 7 -62v-2v0c-4.66699 -8.66699 -10.667 -15.667 -18 -21c-6.66699 -4.66699 -14.667 -7.66699 -24 -9h-1c-22 -4.66699 -39.667 1.66699 -53 19l-1 1
+ c-15.333 19.333 -17.667 40.333 -7 63l1 1c3.33299 8 8.33299 14.333 15 19c8.66701 6 18 9.66699 28 11zM82 385l4 18l14 3l32 4l92 21l29 10l17 5l20 1l-59 -343l-12 -73c-8 -46 -18.333 -79.3333 -31 -100c-38.667 -66.667 -108 -116 -208 -148
+ c-24 -7.33299 -48 -13 -72 -17l3 20c19.3333 4 37.6667 10.333 55 19c55.3333 28 95 76.667 119 146l5 16c4.6667 15.3333 11.667 53 21 113l22 124l17 103l5 28c1.33299 12 1.66701 19.667 1 23c-8 25.333 -32 34.333 -72 27h-2z" />
+ <glyph glyph-name="o" unicode="o" horiz-adv-x="554"
+ d="M346 447c15.333 0.666992 32 0 50 -2c42 -3.33301 75.333 -16 100 -38c20.667 -16.667 36 -40.333 46 -71c15.333 -46 15.667 -95.333 1 -148l-2 -6c-20.667 -69.333 -58.333 -121.667 -113 -157l-22 -12c-29.333 -14.6667 -66 -24.3333 -110 -29
+ c-58 -4.6667 -105 2.6667 -141 22c-8 4 -17 10.3333 -27 19c-45.3333 41.3333 -62.6667 101 -52 179c2.6667 19.333 7.3333 38.333 14 57l20 44c34 65.333 84.333 108 151 128c19.333 5.33301 47.667 10 85 14zM341 416c-6 0 -14 -3.33301 -24 -10
+ c-21.333 -12 -39.333 -26.667 -54 -44c-46.667 -52.667 -71 -113 -73 -181c-0.667007 -25.333 2.33299 -49.667 9 -73c11.333 -35.3333 29.333 -61.6667 54 -79c15.333 -10 26 -15 32 -15c4.66699 0 13 3.3333 25 10c21.333 12 39.333 26.6667 54 44
+ c46.667 52 71 112.333 73 181c0.666992 24.667 -2 48.333 -8 71c-11.333 36 -29.667 63 -55 81c-12 9.33301 -23 14.333 -33 15z" />
+ <glyph glyph-name="r" unicode="r" horiz-adv-x="445"
+ d="M318 422c-1.33301 5.33301 2 9.66699 10 13c8.66699 4.66699 23.333 8.33301 44 11c67.333 9.33301 110 -2.66699 128 -36l7 -19c2 -9.33301 2.66699 -18 2 -26c-1.33301 -8.66699 -10 -15.667 -26 -21c-20 -5.33301 -39.667 -8 -59 -8c-11.333 0 -19.667 1 -25 3
+ c-5.33301 1.33301 -7.33301 8 -6 20v3c-1.33301 17.333 -7.33301 31.333 -18 42c-6 6 -11.333 9 -16 9c-4.66699 -0.666992 -12.333 -5.33301 -23 -14c-17.333 -14 -32.333 -33.333 -45 -58c-12.667 -25.333 -22.333 -50.333 -29 -75
+ c-4.66699 -16.667 -12.667 -58.333 -24 -125l-10 -56l-4 -28c1.33299 -17.3333 15 -28.6667 41 -34l12 -2l-3 -20h-236l3 20c26.6667 0 47 9.6667 61 29l2 4c1.333 1.3333 3.667 9.3333 7 24l7 43l26 149l10 60c2.66701 15.333 2.33299 26.333 -1 33
+ c-8 16 -24.667 24 -50 24l-21 -2l4 18l12 3h1l33 4c30 4.66699 60.333 11.667 91 21l30 10l17 5l20 1l-12 -72h1c8.66699 18.667 21.667 34 39 46v1zM278 375h-1h1z" />
+ <glyph glyph-name="d" unicode="d" horiz-adv-x="562"
+ d="M380 666l50 5l81 19l31 10l22 7l20 1l-10 -60l-21 -123l-58 -339l-15 -91l-4 -23c-1.33301 -10 -1.66699 -16.3333 -1 -19c5.33301 -19.3333 22 -30 50 -32h1h1l-3 -20h-147l1 86h-1c-3.33301 -11.3333 -9.66699 -23.3333 -19 -36c-18.667 -29.3333 -41 -49 -67 -59
+ c-11.333 -4 -26 -6.6667 -44 -8c-14 -1.3333 -28 -1.3333 -42 0c-37.333 3.3333 -66 14.6667 -86 34c-26 25.3333 -41 63.6667 -45 115c-6 72 11.3333 139.667 52 203l2 3c20 30.667 43.333 54 70 70c30 18 65 29.667 105 35c23.333 2.66699 41 0.333008 53 -7
+ c22 -14 30.667 -35.333 26 -64l-1 -6l-8 -19c-3.33301 -3.33301 -5.33301 -5 -6 -5l-8 4l-14 10c6.66699 10 10 18.333 10 25v1c0 16 -6.66699 26.667 -20 32c-5.33301 2 -11 2.33301 -17 1c-4 -0.666992 -11 -4.33301 -21 -11c-14 -10.667 -27.333 -23.667 -40 -39
+ c-39.333 -50 -61 -109 -65 -177c-2 -29.333 0 -55.667 6 -79c8.66701 -36.6667 24.333 -63 47 -79c13.333 -10 23.667 -14.6667 31 -14c6 0.6667 15 5.3333 27 14c13.333 10.6667 26.333 27 39 49c14 24 25 54.333 33 91l22 119l31 180l16 98l5 28l1 19
+ c-3.33301 19.333 -18.667 30.333 -46 33h-6l-21 -2z" />
+ </font>
+ </defs>
+ <g fill="#052" fill-opacity="0.4" stroke="#fff" stroke-width="0.5">
+ <text x="160" y="260" font-family="Fjord-jf" font-weight="700" font-style="oblique"
+ font-size="120">fjord</text>
+ <text x="160" y="130" font-family="Fjord-ff" font-weight="700" font-style="oblique"
+ font-size="120">fjord</text>
+ <g font-size="14" fill-opacity="0.8" stroke="none">
+ <text x="20" y="100">The Fjord fonts</text>
+ <text x="20" y="120" >are derived from</text>
+ <text x="20" y="140">Gladiator</text>
+ <text x="20" y="160">by Bert Bos</text>
+ <text x="20" y="180">and are used</text>
+ <text x="20" y="200">by kind permission.</text>
+ </g>
+ <!-- No norwegian blue parrots were harmed n the making of this test -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.11 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-203-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-203-t.svg
new file mode 100644
index 0000000000..ec64542f2d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-glyph-203-t.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ATE, CM" owner="CL" desc="test path commands in glyphs" status="accepted"
+ approved="yes"
+ version="$Revision: 1.3 $" testname="$RCSfile: fonts-glyph-203-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test that all of the SVG path commands are accepted for defining glyphs. The upper,
+ black text must be a reflection of the lower, colored glyph shapes.
+ </p>
+ <p>
+ The letter A uses L commands, the letter H uses H and V commands, and
+ the letter B uses cubic beziers. The letter C uses a mix of quadratic beziers and vertical lines.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-glyph-203-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <defs>
+ <font xml:id="curvy" horiz-adv-x="450">
+ <font-face font-family="SVGPath" font-weight="500" units-per-em="1000" ascent="800"
+ descent="-200"/>
+ <missing-glyph/>
+ <glyph unicode="A" d="M0,0 L100,600 L300,600 L400,0 L300,0 L 200,200 L 100,0 z
+ M 100,200 L300,200 L 200,500 z"/>
+ <glyph unicode="B" horiz-adv-x="350"
+ d="M0,0 c0,200 0,400 0,600 c33,0 66,0 100,0 c 300,0 300,-300 0,-300
+ c 300,0 300,-300 0,-300 z
+ M 100,100 c 140,0 140,100, 0,100 z
+ M 100,400 c 140,0 140,100, 0,100 z"/>
+ <glyph unicode="C" d="M100,100 Q 0,300 100,500 Q 250,600 400,500
+ v-100 Q300,450 200,400 Q 150,300 200,200 Q 300,150 400,200
+ v-100 Q250,0 100,100 z" />
+ <glyph unicode="H"
+ d="M0,0 v600 h100 v-250 h200 v250 h100 v-600 h-100 v250 h-200 v-250 z"/>
+ </font>
+ </defs>
+ <text x="50" y="150" font-family="SVGPath" font-size="150">BACH</text>
+ <g transform="translate (50,160)">
+ <g transform="scale(0.15)" fill="green">
+ <path
+ d="M0,0 c0,200 0,400 0,600 c33,0 66,0 100,0 c 300,0 300,-300 0,-300
+ c 300,0 300,-300 0,-300 z
+ M 100,100 c 140,0 140,100, 0,100 z
+ M 100,400 c 140,0 140,100, 0,100 z"
+ />
+ </g>
+ </g>
+ <g transform="translate (102.5,160)">
+ <g transform="scale(0.15)" fill="blue">
+ <path d="M0,0 L100,600 L300,600 L400,0 L300,0 L 200,200 L 100,0 z
+ M 100,200 L300,200 L 200,500 z"/>
+ </g>
+ </g>
+ <g transform="translate (170,160)">
+ <g transform="scale(0.15)" fill="maroon">
+ <path d="M100,100 Q 0,300 100,500 Q 250,600 400,500
+ v-100 Q300,450 200,400 Q 150,300 200,200 Q 300,150 400,200
+ v-100 Q250,0 100,100 z"/>
+ </g>
+ </g>
+ <g transform="translate (237.5,160)">
+ <g transform="scale(0.15)" fill="rgb(153, 50, 204)">
+ <path d="M0,0 v600 h100 v-250 h200 v250 h100 v-600 h-100 v250 h-200 v-250 z"/>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-kern-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-kern-01-t.svg
new file mode 100644
index 0000000000..84fa4574e9
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-kern-01-t.svg
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="Test handling of hkern elements in SVG Fonts" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: fonts-kern-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test validates handling of the hkern element.</p>
+ <p>In all instances, a text element matching a font with hkern is displayed along with reference markers showing the expected glyph positioning.</p>
+ <p>The 'fontA' cell shows the string "12" with "fontA" for which there in a kerning pair defined with u1="1" and u2="2".</p>
+ <p>The 'fontB' cell shows the string "12" with "fontB" for which there in a kerning pair defined with g1="gl_1" and g2="gl_2", where "gl_1" has unicode="1" and "gl_2" has unicode="2".</p>
+ <p>The 'fontC' cell shows the string "1234" with "fontC" were the same kerning pair uses u1/u2 to match "12" and g1/g2 to match "34".</p>
+ <p>The 'fontD' cell shows the string "1234" with "fontD" were the same kerning pair uses u1/u2 to match "12" and "34" (u1/u2 are lists of character vales).</p>
+ <p>The 'fontE' cell shows the string "1234" with "fontE" were the same kerning pair uses g1/g2 to match "12" and "34" (g1/g2 are lists of names).</p>
+ <p>The 'fontF' cell shows the string "1234" with "fontF" were the same kerning pair uses u1/u2 to match "12" and "34" (u1/u2 are unicode ranges).</p>
+ <p>The 'fontG' cell shows the string "12" with "fontG" were for which there is a kerning pair with u1 matching "1" and g2 matching "gl_2".</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-kern-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontG" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <hkern u1="1" g2="gl_2" k="-1000" />
+ </font>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontF" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z" />
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z" />
+ <!-- u1 covers '0' to '9' and ':' ';' '<' '=' '>' '?' -->
+ <!-- u2 covers '1' '2' '3' and '4' -->
+ <!-- So, this is a match for '12', '23' and '34' -->
+ <hkern u1="U+003?" u2="U+0031-0034" k="-1500" />
+ </font>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontE" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z" />
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z" />
+ <hkern g1="gl_1,gl_3" g2="gl_2,gl_4" k="-1500" />
+ </font>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontD" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z" />
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z" />
+ <hkern u1="1,3" u2="2,4" k="-1500" />
+ </font>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontC" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z" />
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1000" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z" />
+ <hkern u1="1" u2="2" g1="gl_3" g2="gl_4" k="-1500" />
+ </font>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontB" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <hkern g1="gl_1" g2="gl_2" k="-2000" />
+ </font>
+ <font horiz-adv-x="224">
+ <font-face font-family="fontA" units-per-em="1000" ascent="917" descent="-250" />
+ <missing-glyph horiz-adv-x="800" d="M 0 0 L 750 0 L 750 1000 L 0 1000 Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="250" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <hkern u1="1" u2="2" k="-1000" />
+ </font>
+ </defs>
+ <defs>
+ <g xml:id="marker">
+ <!-- <rect x="0" y="-10" width="10" height="10" /> -->
+ <line y2="-12" stroke="red" stroke-width="1" />
+ <line x2="12" stroke="red" stroke-width="1" />
+ <rect x="-2" y="-2" width="4" height="4" fill="red" />
+ </g>
+ <g xml:id="sampleBkg">
+ <rect width="200" height="20" fill="#eeeeee" />
+ <rect y="20" width="200" height="30" fill="#cccccc" />
+ <rect width="200" height="50" fill="none" stroke="black" />
+ </g>
+ </defs>
+ <text x="240" y="30" font-size="20" text-anchor="middle">&lt;hkern&gt;</text>
+ <g xml:id="legend" transform="translate(30, 60)">
+ <g>
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font A</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">u1="1" u2="2"</text>
+ <g transform="translate(5, 45) scale(2)" font-size="10">
+ <!-- Advance for '1': 0 -->
+ <use xlink:href="#marker" fill="#8888ff" />
+ <!-- Advance for '2' : '1'.advance + kerning -->
+ <!-- : ((250 - (-1000))/1000)*10 -->
+ <!-- : 12.5 -->
+ <use xlink:href="#marker" x="12.5" fill="#8888ff" />
+ <text font-family="fontA" font-size="10">12</text>
+ </g>
+ </g>
+ <g transform="translate(0, 55)">
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font B</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">g1="gl_1" g2="gl_2"</text>
+ <g transform="translate(5, 45) scale(2)">
+ <use xlink:href="#marker" fill="#8888ff" />
+ <use xlink:href="#marker" x="22.5" fill="#8888ff" />
+ <text font-family="fontB" font-size="10">12</text>
+ </g>
+ </g>
+ <g transform="translate(0, 110)">
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font C</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">u1="1" u2="2" g1="gl_3" g2="gl_4"</text>
+ <g transform="translate(5, 45) scale(2)">
+ <use xlink:href="#marker" fill="#8888ff" />
+ <!-- ((1.adv + '12'.k)/unitsPerEm)*fontSize -->
+ <use xlink:href="#marker" x="17.5" fill="#8888ff" />
+ <use xlink:href="#marker" x="32.5" fill="#8888ff" />
+ <!-- ((3.adv + '34'.k)/unitsPerEm)*fontSize -->
+ <use xlink:href="#marker" x="55" fill="#8888ff" />
+ <text font-family="fontC" font-size="10">1234</text>
+ </g>
+ </g>
+ <g transform="translate(0, 165)">
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font D</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">u1="1,3" u2="2,4"</text>
+ <g transform="translate(5, 45) scale(2)">
+ <use xlink:href="#marker" fill="#8888ff" />
+ <use xlink:href="#marker" x="17.5" fill="#8888ff" />
+ <use xlink:href="#marker" x="32.5" fill="#8888ff" />
+ <use xlink:href="#marker" x="55" fill="#8888ff" />
+ <text font-family="fontD" font-size="10">1234</text>
+ </g>
+ </g>
+ <g transform="translate(240, 0)">
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font E</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">g1="gl_1,gl_3" g2="gl_2,gl_4"</text>
+ <g transform="translate(5, 45) scale(2)">
+ <use xlink:href="#marker" fill="#8888ff" />
+ <use xlink:href="#marker" x="17.5" fill="#8888ff" />
+ <use xlink:href="#marker" x="32.5" fill="#8888ff" />
+ <use xlink:href="#marker" x="55" fill="#8888ff" />
+ <text font-family="fontE" font-size="10">1234</text>
+ </g>
+ </g>
+ <g transform="translate(240, 55)">
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font F</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">u1="U+003?" u2="U+0031-34"</text>
+ <g transform="translate(5, 45) scale(2)">
+ <use xlink:href="#marker" fill="#8888ff" />
+ <!-- '2' -->
+ <use xlink:href="#marker" x="17.5" fill="#8888ff" />
+ <!-- '3' -->
+ <use xlink:href="#marker" x="47.5" fill="#8888ff" />
+ <!-- '4' -->
+ <use xlink:href="#marker" x="70" fill="#8888ff" />
+ <text font-family="fontF" font-size="10">1234</text>
+ </g>
+ </g>
+ <g transform="translate(240, 110)">
+ <g>
+ <rect x="-20" width="20" height="50" fill="none" stroke="black" />
+ <text transform="translate(-5, 25) rotate(-90)" text-anchor="middle">font G</text>
+ </g>
+ <use xlink:href="#sampleBkg" />
+ <text x="5" y="15" font-size="12">u1="1" g2="gl_2"</text>
+ <g transform="translate(5, 45) scale(2)">
+ <!-- Advance for '1': 0 -->
+ <use xlink:href="#marker" fill="#8888ff" />
+ <!-- Advance for '2' : '1'.advance + kerning -->
+ <!-- : ((250 - (-1000))/1000)*10 -->
+ <!-- : 12.5 -->
+ <use xlink:href="#marker" x="12.5" fill="#8888ff" />
+ <text font-family="fontG" font-size="10">12</text>
+ </g>
+ </g>
+ </g>
+ <g xml:id="testContent" transform="translate(320, 100)" font-size="10"> </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-overview-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-overview-201-t.svg
new file mode 100644
index 0000000000..cd20c1f958
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/fonts-overview-201-t.svg
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CL" desc="units-per-em values" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: fonts-overview-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This tests a range of values for the 'units per em' attribute. The
+ test is passed if the three letter β are all the same size.
+ </p>
+ <p>
+ The same glyph is defined three times in three fonts, but with different values
+ for units-per-em - 1,000, 10, and 10,000 - and with the other numerical values
+ that depend on units-per-em scaled accordingly. Text using these fonts must all be displayed at the same size,
+ because the same font-size is used throughout.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: fonts-overview-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="beta" horiz-adv-x="550" >
+ <font-face
+ font-family="SVGbeta1"
+ font-weight="500"
+ units-per-em="1000"
+ ascent="800"
+ descent="-200"
+ unicode-range="U+03B2"
+ />
+ <missing-glyph />
+ <glyph glyph-name="beta" unicode="&#x3b2;"
+ d="M522.35 177.05c0 -103.55 -73.73 -201.4 -190.89 -201.4c-62.62 0 -123.22 22.7998 -138.37 85.5h-2.01999v-261.15h-135.34v573.7c0 136.8 37.3691 304.95 218.16 304.95c95.95 0 198.97 -40.85 198.97 -145.35c0 -94.05 -72.72 -133 -160.59 -152v-1.89999
+ c126.25 -16.15 210.08 -76 210.08 -202.35zM360.75 128.6v80.75c0 41.8 -3.03 149.15 -67.67 149.15c-15.15 0 -29.29 -8.54999 -44.44 -8.54999c-14.14 0 -20.2 18.05 -20.2 28.5c0 11.4 9.09 24.7 22.22 24.7c12.12 0 24.24 -6.64999 36.36 -6.64999
+ c45.45 0 45.45 79.8 45.45 108.3c0 42.75 2.01999 146.3 -63.63 146.3c-75.75 0 -77.77 -138.7 -77.77 -188.1v-394.25h31.31c3.03 -23.75 29.29 -49.4004 55.55 -49.4004c68.68 0 82.82 56.0508 82.82 109.25z" />
+ </font>
+ <font xml:id="beta2" horiz-adv-x="5.50" >
+ <font-face
+ font-family="SVGbeta2"
+ font-weight="500"
+ units-per-em="10"
+ ascent="8"
+ descent="-2"
+ unicode-range="U+03B2"
+ />
+ <missing-glyph />
+ <glyph glyph-name="beta" unicode="&#x3b2;"
+ d="M5.2235 1.7705c0 -1.0355 -0.7373 -2.014 -1.9089 -2.014c-0.6262 0 -1.2322 0.227998 -1.3837 0.855h-0.0201999v-2.6115h-1.3534v5.737c0 1.368 0.373691 3.0495 2.1816 3.0495c0.9595 0 1.9897 -0.4085 1.9897 -1.4535c0 -0.9405 -0.7272 -1.33 -1.6059 -1.52v-0.0189999
+ c1.2625 -0.1615 2.1008 -0.76 2.1008 -2.0235zM3.6075 1.286v0.8075c0 0.418 -0.0303 1.4915 -0.6767 1.4915c-0.1515 0 -0.2929 -0.0854999 -0.4444 -0.0854999c-0.1414 0 -0.202 0.1805 -0.202 0.285c0 0.114 0.0909 0.247 0.2222 0.247c0.1212 0 0.2424 -0.0664999 0.3636 -0.0664999
+ c0.4545 0 0.4545 0.798 0.4545 1.083c0 0.4275 0.0201999 1.463 -0.6363 1.463c-0.7575 0 -0.7777 -1.387 -0.7777 -1.881v-3.9425h0.3131c0.0303 -0.2375 0.2929 -0.494004 0.5555 -0.494004c0.6868 0 0.8282 0.560508 0.8282 1.0925z" />
+ </font>
+ <font xml:id="beta3" horiz-adv-x="55000" >
+ <font-face
+ font-family="SVGbeta3"
+ font-weight="500"
+ units-per-em="10000"
+ ascent="8000"
+ descent="-2000"
+ unicode-range="U+03B2"
+ />
+ <missing-glyph />
+ <glyph glyph-name="beta" unicode="&#x3b2;"
+ d="M5223.5 1770.5c0 -1035.5 -737.3 -2014.0 -1908.9 -2014.0c-626.2 0 -1232.2 227.998 -1383.7 855.0h-20.1999v-2611.5h-1353.4v5737.0c0 1368.0 373.691 3049.5 2181.6 3049.5c959.5 0 1989.7 -408.5 1989.7 -1453.5c0 -940.5 -727.2 -1330.0 -1605.9 -1520.0v-18.9999
+ c1262.5 -161.5 2100.8 -760.0 2100.8 -2023.5zM3607.5 1286.0v807.5c0 418.0 -30.3 1491.5 -676.7 1491.5c-151.5 0 -292.9 -85.4999 -444.4 -85.4999c-141.4 0 -202.0 180.5 -202.0 285.0c0 114.0 90.9 247.0 222.2 247.0c121.2 0 242.4 -66.4999 363.6 -66.4999
+ c454.5 0 454.5 798.0 454.5 1083.0c0 427.5 20.1999 1463.0 -636.3 1463.0c-757.5 0 -777.7 -1387.0 -777.7 -1881.0v-3942.5h313.1c30.3 -237.5 292.9 -494.004 555.5 -494.004c686.8 0 828.2 560.508 828.2 1092.5z" />
+ </font>
+ </defs>
+ <!-- alphabetic baseline -->
+ <path stroke-width="2" stroke="#888" d="M 50,200 H 420"/>
+ <!-- ascent -->
+ <path stroke-width="2" stroke="#888" d="M 50, 56 H 420"/>
+ <!-- descent -->
+ <path stroke-width="2" stroke="#888" d="M 50, 236 H 420"/>
+
+ <text x="50" y="200" font-family="SVGbeta1" font-size="180">β</text>
+ <text x="180" y="200" font-family="SVGbeta2" font-size="180">β</text>
+ <text x="310" y="200" font-family="SVGbeta3" font-size="180">β</text>
+
+ <text x="60" y="260" font-size="10">1,000</text>
+ <text x="190" y="260" font-size="10">10</text>
+ <text x="320" y="260" font-size="10">10,000</text>
+ <text x="110" y="280" font-size="16">varying units-per-em values</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/intro-compat-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/intro-compat-201-t.svg
new file mode 100644
index 0000000000..9ebfa42eeb
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/intro-compat-201-t.svg
Binary files differ
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-201-t.svg
new file mode 100644
index 0000000000..c542ad48f8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-201-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: jpeg-required-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB baseline JPEG with the most common chrominance subsampling, 4:1:1.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud411q75s.jpg"/>
+ <text x="320" y="100">baseline 4:1:1</text>
+ <text x="320" y="130">sequential</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-202-t.svg
new file mode 100644
index 0000000000..2e73414cbe
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-202-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB optimised baseline JPEG with the most common chrominance subsampling, 4:1:1.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud411q75o.jpg"/>
+ <text x="320" y="100">optimized 4:1:1</text>
+ <text x="320" y="130">sequential</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-203-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-203-t.svg
new file mode 100644
index 0000000000..a11f8a06f0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-203-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-203-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test progressive, RGB optimised JPEG with the most common chrominance subsampling, 4:1:1.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-203-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud411q75p.jpg"/>
+ <text x="320" y="100">optimized 4:1:1</text>
+ <text x="320" y="130">progressive</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-204-t.svg
new file mode 100644
index 0000000000..64be72e88d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-204-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test greyscale baseline JPEG.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-204-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloudgsq75s.jpg"/>
+ <text x="320" y="100">greyscale</text>
+ <text x="320" y="130">sequential</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-205-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-205-t.svg
new file mode 100644
index 0000000000..f9597150b1
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-205-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-205-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB optimised baseline JPEG with the most common chrominance subsampling, 4:1:1 and with multiple APP markers.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-205-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud-ps411q4app.jpg"/>
+ <text x="320" y="100">optimised 4:1:1</text>
+ <text x="320" y="130">sequential</text>
+ <text x="320" y="160">multi APP markers</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-206-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-206-t.svg
new file mode 100644
index 0000000000..03f144e40a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-206-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-206-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB optimised JPEG with the most common chrominance subsampling, 4:1:1 and with a float DCT.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-206-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud411q65float.jpg"/>
+ <text x="320" y="100">optimised 4:1:1</text>
+ <text x="320" y="130">sequential</text>
+ <text x="320" y="160">float DCT</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-207-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-207-t.svg
new file mode 100644
index 0000000000..b9911a2d8e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-207-t.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-207-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB optimised JPEG with no chrominance subsampling, 4:4:4.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-207-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud444q65o.jpg"/>
+ <text x="320" y="100">optimised 4:4:4</text>
+ <text x="320" y="130">sequential</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-208-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-208-t.svg
new file mode 100644
index 0000000000..97d4c76cc9
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-208-t.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-208-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB optimised JPEG with very unusual chrominance subsampling:
+ 2x2, 4x1, 1x2.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-208-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloudoddq65o.jpg"/>
+ <text x="320" y="100">optimised 4:4:2</text>
+ <text x="320" y="130">sequential</text>
+ <text x="320" y="160" font-size="12">unusual subsampling</text>
+ <text x="320" y="180" font-size="12">2x2, 4x1, 1x2</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-209-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-209-t.svg
new file mode 100644
index 0000000000..f2bfd07be6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/jpeg-required-209-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="baseline JPEG test" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: jpeg-required-209-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test RGB baseline JPEG with the most common chrominance subsampling, 4:1:1 and high compression level (low quality).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: jpeg-required-209-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <image x="10" y="10" width="300" height="300" xlink:href="../images/cloud411q25s.jpg"/>
+ <text x="320" y="100">optimised 4:1:1</text>
+ <text x="320" y="130">sequential</text>
+ <text x="320" y="160">high compression</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-01-t.svg
new file mode 100644
index 0000000000..8d4e677414
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-01-t.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="CL" desc="Test that viewer has the basic capability to process the color property" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-color-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The purpose of this test is to determine if an application has the basic capability to process the 'color' property.
+ There are three subtests.
+ </p>
+ <p>
+ The first subtest, to the top left, is passed if the circle has a red fill. The second subtest, to the top right, is
+ passed if the circle has a red stroke. The third subtest shows a rectangle with a gradient fill, which has three stops.
+ The subtest is passed if central stop is red, fading off to blue to the left and pale yellow to the right.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-color-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+
+ <linearGradient xml:id="grad" color="red">
+ <stop offset="0.05" stop-color="#60F" />
+ <stop offset="0.5" stop-color="currentColor" />
+ <stop offset="0.95" stop-color="#FF6" />
+ </linearGradient>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g color="red">
+ <g color="inherit" fill="none" stroke="none">
+ <!-- inherit to check the property value, not the string, is being used -->
+ <circle cx="130" cy="80" r="60" fill="currentColor" />
+ <circle cx="350" cy="80" r="60" stroke="currentColor" stroke-width="4" />
+ </g>
+ </g>
+ <g color="blue">
+ <g color="inherit" fill="none" stroke="none">
+ <!-- blue color used to check color being scoped and inherited correctly -->
+ <rect x="60" y="215" width="360" height="80" fill="url(#grad)" />
+ </g>
+ </g>
+ <g font-size="30" fill="black">
+ <text x="120" y="170">fill</text>
+ <text x="310" y="170">stroke</text>
+ <text x="180" y="205">stop-color</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-03-t.svg
new file mode 100644
index 0000000000..dc65db62a6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-03-t.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="CL" desc="Test that viewer has the basic capability to render colors, specified as CSS attributes, using any of the equivalent forms." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: paint-color-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Purpose of test is to determine if the color datatype is supported. There are multiple syntaxes for specifying the
+ same color, such as #37F and #3377FF. For each of the six groups shown here, each of the shapes in the group uses
+ one of the syntactical forms and all in the group should be identical in color.
+ </p>
+ <p>
+ The first row uses five forms - 3-digit hex, 6-digit hex, rbg() integer form, rgb() percentage form, and named
+ ('HTML') colors.
+ </p>
+ <p>
+ The second row uses only four forms - 3-digit hex, 6-digit hex, rbg() integer form, rgb() percentage form - as
+ there are no HTML or X11 names for those colors.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-color-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- groups of five colors -->
+ <g>
+ <circle cx="75" cy="40" r="20" fill="#f00" />
+ <circle cx="115" cy="40" r="20" fill="#ff0000" />
+ <circle cx="75" cy="80" r="20" fill="rgb(255,0,0)" />
+ <circle cx="115" cy="80" r="20" fill="rgb(100%,0%,0%)" />
+ <polygon points="95,40 115,60 95,80 75,60" fill="red" />
+ </g>
+ <g>
+ <circle cx="200" cy="40" r="20" fill="#0f0" />
+ <circle cx="240" cy="40" r="20" fill="#00ff00" />
+ <circle cx="200" cy="80" r="20" fill="rgb(0,255,0)" />
+ <circle cx="240" cy="80" r="20" fill="rgb(0%,100%,0%)" />
+ <!-- 'lime' (full intensity green) NOT 'green' (half intensity green) -->
+ <polygon points="220,40 240,60 220,80 200,60" fill="lime" />
+ </g>
+ <g>
+ <circle cx="325" cy="40" r="20" fill="#00f" />
+ <circle cx="365" cy="40" r="20" fill="#0000ff" />
+ <circle cx="325" cy="80" r="20" fill="rgb(0,0,255)" />
+ <circle cx="365" cy="80" r="20" fill="rgb(0%,0%,100%)" />
+ <polygon points="345,40 365,60 345,80 325,60" fill="blue" />
+ </g>
+ <!-- no names for three digit colors except for 00 and ff -->
+ <!-- 11=17 22=34 33=51 44=68 55=85 66=102 77=119 88=136 99=153 aa=170 bb=187 cc=204 dd=221 ee=238 -->
+ <g>
+ <circle cx="75" cy="135" r="20" fill="#a01" />
+ <circle cx="115" cy="135" r="20" fill="#aa0011" />
+ <circle cx="75" cy="175" r="20" fill="rgb(170,0,17)" />
+ <circle cx="115" cy="175" r="20" fill="rgb(66.667%,0%,6.667%)" />
+ </g>
+ <g>
+ <circle cx="200" cy="135" r="20" fill="#3b3" />
+ <circle cx="240" cy="135" r="20" fill="#33bb33" />
+ <circle cx="200" cy="175" r="20" fill="rgb(51,187,51)" />
+ <circle cx="240" cy="175" r="20" fill="rgb(20%,73.333%,20%)" />
+ </g>
+ <g>
+ <circle cx="325" cy="135" r="20" fill="#57e" />
+ <circle cx="365" cy="135" r="20" fill="#5577ee" />
+ <circle cx="325" cy="175" r="20" fill="rgb(85,119,238)" />
+ <circle cx="365" cy="175" r="20" fill="rgb(33.333%,46.666%,93.333%)" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-04-t.svg
new file mode 100644
index 0000000000..8d9c4acb74
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-04-t.svg
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="CL" desc="Tests system colors" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-color-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests system colors. The colors on your screen might not match the reference image at all, but they should at
+ minimum be legible and should preferably resemble the colors used on menus and other user interface elements on
+ your computer, pda or phone.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-color-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="Scene_1" transform="translate(240, 180)">
+ <rect x="-230" y="-170" width="460" height="300" fill="Background" />
+ <rect x="-220" y="-160" width="440" height="280" fill="AppWorkspace" />
+ <rect x="-152" y="-108" width="317" height="221" fill="Window" />
+ <rect x="-152" y="-108" width="317" height="221" fill="none" stroke-width="3" stroke="WindowFrame" />
+ <g xml:id="contents" font-size="12" fill="WindowText">
+ <text x="-148" y="0">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. </text>
+ <text x="-148" y="20">Vestibulum pulvinar. Duis laoreet, nunc vitae facilisis </text>
+ <text x="-148" y="40">tristique, pede sem iaculis mi, non consectetuer lorem </text>
+ <text x="-148" y="60">libero et est. Donec imperdiet purus sed odio. Duis </text>
+ <text x="-148" y="80">venenatis tortor eu lectus. Suspendisse sed metus at </text>
+ <text x="-148" y="100">metus viverra ultricies. Mauris porttitor, justo a vulputate</text>
+ </g>
+ <g xml:id="dropdown" transform="translate(2,0)">
+ <rect x="-150" y="-107" width="118" height="190" fill="ThreeDFace" xml:id="drop-bg" />
+ <rect x="-143" y="0" width="102" height="34" fill="Menu" />
+ <text x="-138" y="24" font-size="20" font-weight="bold" fill="MenuText">Load</text>
+ <rect x="-143" y="40" width="102" height="34" fill="Menu" />
+ <text x="-138" y="64" font-size="20" font-weight="bold" fill="MenuText">Save</text>
+ <path d="M-149 83 h114 v-94" stroke-width="4" stroke="ThreeDDarkShadow" fill="none" />
+ <path d="M-149 83 v-94 h114" stroke-width="4" stroke="ThreeDLightShadow" fill="none" />
+ </g>
+ <g xml:id="menubar">
+ <rect x="-148" y="-62" width="310" height="46" fill="ThreeDLightShadow" />
+ <path d="M152 -52 l 10 -10 v 46 h -311 l10-10 z" fill="ThreeDDarkShadow" />
+ <rect x="-144" y="-58" width="302" height="37" fill="ThreeDFace" />
+ <text x="-141" y="-32" font-size="20" font-weight="bold" fill="HighlightText">File</text>
+ <text x="-90" y="-32" font-size="20" font-weight="bold" fill="MenuText">Edit</text>
+ </g>
+ <g xml:id="windowdecoration">
+ <rect x="-149" y="-106" width="311" height="42" fill="ActiveCaption" stroke-width="4" stroke="ActiveBorder" xml:id="windowbar" />
+ <text x="5" y="-78" text-anchor="middle" font-size="24" font-weight="bold" fill="CaptionText">Lorem</text>
+ <g xml:id="button">
+ <rect x="120" y="-99" rx="8" width="26" height="26" fill="ButtonFace" />
+ <rect x="120" y="-99" rx="8" width="24" height="24" fill="ButtonHighlight" />
+ <rect x="122" y="-97" rx="8" width="24" height="24" fill="ButtonShadow" />
+ <rect x="122" y="-97" rx="8" width="22" height="22" fill="ButtonFace" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-05-t.svg
new file mode 100644
index 0000000000..bb8e5436dc
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-05-t.svg
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="This tests the correct behavior or currentcolor when specified in multiple places." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-color-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Tests the color that is used for the currentColor value in the fill attribute when more than one color is specified.</p>
+ <p>This is illustrated using a single rectangle that is a child of a group element. A fill is specified for the group element but not the rectangle. Colour is specifed for the rectangle and the group element. The user agent should render the rectangle with a RED fill.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-color-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g fill="currentColor" color="red">
+ <rect x="120" y="60" width="150" height="150" color="blue" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-201-t.svg
new file mode 100644
index 0000000000..87e4596e73
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-color-201-t.svg
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN" owner="CL" desc="test the sixteen color names for Tiny" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: paint-color-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests the sixteen color names that must be supported in SVG Tiny.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-color-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <!-- color names -->
+ <rect x="10" y="30" width="25" height="25" fill="black"/>
+ <rect x="10" y="60" width="25" height="25" fill="silver"/>
+ <rect x="10" y="90" width="25" height="25" fill="gray"/>
+ <rect x="10" y="120" width="25" height="25" fill="white"/>
+ <rect x="10" y="150" width="25" height="25" fill="maroon"/>
+ <rect x="10" y="180" width="25" height="25" fill="red"/>
+ <rect x="10" y="210" width="25" height="25" fill="purple"/>
+ <rect x="10" y="240" width="25" height="25" fill="fuchsia"/>
+
+ <!-- rrgb values -->
+ <rect x="35" y="30" width="25" height="25" fill="rgb( 0, 0, 0)"/>
+ <rect x="35" y="60" width="25" height="25" fill="rgb(192, 192, 192)"/>
+ <rect x="35" y="90" width="25" height="25" fill="rgb(128, 128, 128)"/>
+ <rect x="35" y="120" width="25" height="25" fill="rgb(255, 255, 255)"/>
+ <rect x="35" y="150" width="25" height="25" fill="rgb(128, 0, 0)"/>
+ <rect x="35" y="180" width="25" height="25" fill="rgb(255, 0, 0)"/>
+ <rect x="35" y="210" width="25" height="25" fill="rgb(128, 0, 128)"/>
+ <rect x="35" y="240" width="25" height="25" fill="rgb(255, 0, 255)"/>
+
+ <!-- make white visible -->
+ <rect x="10" y="120" width="50" height="25" fill="none" stroke="black"/>
+
+ <!-- labels -->
+ <text x="70" y="50">black</text>
+ <text x="70" y="80">silver</text>
+ <text x="70" y="110">gray</text>
+ <text x="70" y="140">white</text>
+ <text x="70" y="170">maroon</text>
+ <text x="70" y="200">red</text>
+ <text x="70" y="230">purple</text>
+ <text x="70" y="260">fuchsia</text>
+
+ <!-- rgb values -->
+ <rect x="275" y="30" width="25" height="25" fill="green"/>
+ <rect x="275" y="60" width="25" height="25" fill="lime"/>
+ <rect x="275" y="90" width="25" height="25" fill="olive"/>
+ <rect x="275" y="120" width="25" height="25" fill="yellow"/>
+ <rect x="275" y="150" width="25" height="25" fill="navy"/>
+ <rect x="275" y="180" width="25" height="25" fill="blue"/>
+ <rect x="275" y="210" width="25" height="25" fill="teal"/>
+ <rect x="275" y="240" width="25" height="25" fill="aqua"/>
+
+ <!-- color names -->
+ <rect x="250" y="30" width="25" height="25" fill="rgb( 0, 128, 0)"/>
+ <rect x="250" y="60" width="25" height="25" fill="rgb( 0, 255, 0)"/>
+ <rect x="250" y="90" width="25" height="25" fill="rgb(128, 128, 0)"/>
+ <rect x="250" y="120" width="25" height="25" fill="rgb(255, 255, 0)"/>
+ <rect x="250" y="150" width="25" height="25" fill="rgb( 0, 0, 128)"/>
+ <rect x="250" y="180" width="25" height="25" fill="rgb( 0, 0, 255)"/>
+ <rect x="250" y="210" width="25" height="25" fill="rgb( 0, 128, 128)"/>
+ <rect x="250" y="240" width="25" height="25" fill="rgb( 0, 255, 255)"/>
+
+ <!-- labels -->
+ <text x="310" y="50">green</text>
+ <text x="310" y="80">lime</text>
+ <text x="310" y="110">olive</text>
+ <text x="310" y="140">yellow</text>
+ <text x="310" y="170">navy</text>
+ <text x="310" y="200">blue</text>
+ <text x="310" y="230">teal</text>
+ <text x="310" y="260">aqua</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-01-t.svg
new file mode 100644
index 0000000000..40884c4a08
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-01-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle colour and 'none' values on the 'fill' property." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-fill-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the fill properties fill:none, and fill with a color (fill:red)</p>
+ <p>There should be two rectangles, the rectangle on the left hollow (fill:none) and the rectangle on the right filled with red.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-fill-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="36" x="40" y="42">Basic paint: fill properties.</text>
+ <!-- ============================================================================= -->
+ <!-- Draw two simple rectangles. One without fill other with fill:red -->
+ <!-- ============================================================================= -->
+ <rect xml:id="fill-01" fill="none" stroke="#000000" x="75" y="70" width="100" height="160" />
+ <rect xml:id="fill-02" fill="red" stroke="#000000" x="275" y="70" width="100" height="160" />
+ <text font-size="36" x="75" y="280">fill="none"</text>
+ <text font-size="36" x="275" y="280">fill="red"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-02-t.svg
new file mode 100644
index 0000000000..2299dc5af0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-02-t.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle the 'currentColor' value on the 'fill' property." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-fill-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test uses the "currentColor" value for the "fill" attribute.</p>
+ <p>
+ The rectangle on the left should be green filled, the rectangle on the right should be blue. The text above the
+ rectangles should be black.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-fill-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g color="green">
+ <text font-size="36" x="30" y="42">Basic paint: fill properties.</text>
+ <text font-size="36" x="100" y="80">fill="currentColor"</text>
+ <!-- ====================================================================== -->
+ <!-- Second set of rectangles with fill:currentColor -->
+ <!-- ====================================================================== -->
+ <rect xml:id="fill-03" fill="currentColor" stroke="#000000" x="75" y="110" width="100" height="140" />
+ <rect xml:id="fill-04" color="blue" fill="currentColor" stroke="#000000" x="275" y="110" width="100" height="140" />
+ <text font-size="36" x="80" y="280">green</text>
+ <text font-size="36" x="290" y="280">blue</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-03-t.svg
new file mode 100644
index 0000000000..dfa0379ccd
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-03-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle the 'fill-rule' property." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-fill-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the fill rule properties evenodd and nonzero</p>
+ <p>There should be two red filled stars, the leftmost star should be unfilled in the very center.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-fill-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="36" x="30" y="42">Basic paint: fill properties.</text>
+ <!-- ====================================================================== -->
+ <!-- Third test fill-rule:xeenodd and fill-rule:nonzero -->
+ <!-- ====================================================================== -->
+ <path fill="red" fill-rule="evenodd" d="M 110 75 l 50 160 l -130 -100 l 160 0 l -130 100 z" />
+ <path fill="red" fill-rule="nonzero" d="M 365 75 l 50 160 l -130 -100 l 160 0 l -130 100 z" />
+ <text font-size="26" x="10" y="282">fill-rule="evenodd"</text>
+ <text font-size="26" x="260" y="282">fill-rule="nonzero"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-04-t.svg
new file mode 100644
index 0000000000..ffa73e2406
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-04-t.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="TT" desc="Test inheritance of painting properties." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-fill-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This tests inheritance of three properties: "fill", "stroke" and "stroke-width". There is a "g" element (id="G1")
+ which sets fill="blue", stroke="red", and stroke-width="5". The first two rectangles on top should inherit all
+ those properties. The middle left rectangle has fill="yellow" and stroke-width="2", it should inherit the
+ stroke="red" from the parent container. The middle rectangle on the right has stroke="yellow", it should inherit
+ fill and stroke-width from the parent "g". The bottom two rectangles are in another "g" element (id="G2") which
+ is a child of "G1". "G2" sets fill="yellow". It should inherit the stroke and stroke width from the parent "G1".
+ The two bottom rectangles set no fill or stroke properties, they should inherit through the parents, stroke="red"
+ and stroke-width="5".
+ </p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labeling text (per CSS2 rules).</p>
+ <p>
+ The test uses the "rect" element, as well as basic fill (solid primary colors), stroke (black 1-pixel lines),
+ font-family (Arial) and font-size properties.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-fill-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="G1" fill="blue" stroke="red" stroke-width="5" transform="translate(120,30)">
+ <rect x="0" y="0" width="90" height="70" />
+ <rect x="100" y="0" width="90" height="70" />
+ <rect x="0" y="80" width="90" height="70" fill="yellow" stroke-width="2" />
+ <rect x="100" y="80" width="90" height="70" stroke="yellow" />
+ <g xml:id="G2" fill="yellow">
+ <rect x="0" y="160" width="90" height="70" />
+ <rect x="100" y="160" width="90" height="70" />
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-05-t.svg
new file mode 100644
index 0000000000..5439773bec
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-fill-05-t.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DJ" owner="CN" desc="Test using fill-opacity values for rect element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-fill-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test using "fill-opacity" values for "rect" element. This test verifies that opacity is clamped to the specified range.</p>
+ <p>
+ The six rect elements on the left have varying 'fill-opacity' values within the valid range of 0 to 1. The six elements
+ on the right have 'fill-opacity' values outside the 0 to 1 range, and must be clamped. The top three rect elements on
+ the right must have their 'fill-opacity' clamped to 0, while the bottom three rect elements on the right must be clamped
+ to 1.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-fill-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- Use multiple values for opacity -->
+ <rect x="20" y="20" width="60" height="60" fill-opacity="0.0" fill="#0000FF" stroke="black" />
+ <rect x="50" y="50" width="60" height="60" fill-opacity="0.2" fill="#0000FF" stroke="black" />
+ <rect x="80" y="80" width="60" height="60" fill-opacity="0.4" fill="#0000FF" stroke="black" />
+ <rect x="110" y="110" width="60" height="60" fill-opacity="0.6" fill="#0000FF" stroke="black" />
+ <rect x="140" y="140" width="60" height="60" fill-opacity="0.8" fill="#0000FF" stroke="black" />
+ <rect x="170" y="170" width="60" height="60" fill-opacity="1.0" fill="#0000FF" stroke="black" />
+ <!-- Values outside the range 0.0 - 1.0 should be clamped to this range -->
+ <rect x="200" y="20" width="60" height="60" fill-opacity="-100.0" fill="#0000FF" stroke="black" />
+ <rect x="230" y="50" width="60" height="60" fill-opacity="-10.0" fill="#0000FF" stroke="black" />
+ <rect x="260" y="80" width="60" height="60" fill-opacity="-0.1" fill="#0000FF" stroke="black" />
+ <rect x="290" y="110" width="60" height="60" fill-opacity="1.1" fill="#0000FF" stroke="black" />
+ <rect x="320" y="140" width="60" height="60" fill-opacity="10.0" fill="#0000FF" stroke="black" />
+ <rect x="350" y="170" width="60" height="60" fill-opacity="100.0" fill="#0000FF" stroke="black" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-04-t.svg
new file mode 100644
index 0000000000..c8584fc0cb
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-04-t.svg
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="HS" desc="Test that checks the capability of the stop element in linear and radial gradients." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-grad-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that checks the capability of the stop element in linear and radial gradients.</p>
+ <p>
+ The first rectangle has a linear gradient fill with a vector starting at top left and going to bottom right. The
+ stop colors are at 20% spacing apart and are in the following order : violet, blue, lime, yellow, orange, red.
+ Because the gradient vector vector goes from (0,0) to (1,1) in object bounding box space and because the object
+ bounding box has a larger width than height, the gradient vector is skewed off of a pure 45 degree angle. The
+ gradient stripes are also skewed so that they are no longer perpendicular to the gradient vector.
+ </p>
+ <p>
+ The next rectangle has a radial gradient fill with a multi-color stops from innermost to outermost in the following
+ order : black, yellow, red, blue, white, green.
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly, except for possible variations in the labelling
+ text (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Very simple black to red radial gradient ======== -->
+ <!-- ====================================================================== -->
+ <linearGradient xml:id="Grad1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
+ <stop stop-color="rgb(238,130,238)" offset="0" />
+ <stop stop-color="blue" offset="0.2" />
+ <stop stop-color="lime" offset="0.4" />
+ <stop stop-color="yellow" offset="0.6" />
+ <stop stop-color="rgb(255,165,0)" offset="0.8" />
+ <stop stop-color="red" offset="1" />
+ </linearGradient>
+ <rect x="20" y="20" width="440" height="80" fill="url(#Grad1)" />
+ <text font-size="30" x="20" y="130">Multi-color linear gradient.</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient on the stroke of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad2" gradientUnits="userSpaceOnUse" cx="240" cy="210" r="220" fx="240" fy="210">
+ <stop stop-color="black" offset="0" />
+ <stop stop-color="yellow" offset="0.2" />
+ <stop stop-color="red" offset="0.4" />
+ <stop stop-color="blue" offset="0.6" />
+ <stop stop-color="white" offset="0.8" />
+ <stop stop-color="green" offset="1" />
+ </radialGradient>
+ <rect x="20" y="150" width="440" height="80" fill="url(#Grad2)" stroke-width="40" />
+ <text font-size="30" x="20" y="260">Multi-color radial gradient.</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-05-t.svg
new file mode 100644
index 0000000000..65bcb9f4fa
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-05-t.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="HS" desc="Test that checks the capability of the stop opacity in linear and radial gradients." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-grad-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that checks the capability of the stop opacity in linear and radial gradients.</p>
+ <p>
+ There are two tests which contain rectangles with gradients using stop-opacity properties. A cyan color text string
+ "Background" is put behind both of the rectangles to help demonstrate the opacity concept. From top-down the appearance
+ of objects is as follows.
+ </p>
+ <p>
+ The first rectangle has a linear gradient fill with a vector starting at top left and going to bottom right. The stop
+ colors are at 20% spacing apart and are in the following order : violet, blue, lime, yellow, orange, red. Also a stop
+ opacity is given to the colors in the following order: 1, 0.2, 0.5, 0, 0.8, 1 Because the gradient vector vector goes
+ from (0,0) to (1,1) in object bounding box space and because the object bounding box has a larger width than height,
+ the gradient vector is skewed off of a pure 45 degree angle. The gradient stripes are also skewed so that they are no
+ longer perpendicular to the gradient vector.
+ </p>
+ <p>
+ The next rectangle has a radial gradient fill with a multi-color stops from innermost to outermost in the following
+ order : black, yellow, red, blue, white, green. Also a stop opacity is given to the colors in the following order: 1,
+ 0.2, 0.5, 0, 0.8, 1
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly, except for possible variations in the labelling text
+ (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Very simple black to red radial gradient ======== -->
+ <!-- ====================================================================== -->
+ <text font-size="60" fill="aqua" x="70" y="80">Background</text>
+ <linearGradient xml:id="Grad1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
+ <stop stop-color="rgb(238,130,238)" stop-opacity="1" offset="0" />
+ <stop stop-color="blue" stop-opacity="0" offset="0.2" />
+ <stop stop-color="lime" stop-opacity="0.5" offset="0.4" />
+ <stop stop-color="yellow" stop-opacity="0.2" offset="0.6" />
+ <stop stop-color="rgb(255,165,0)" stop-opacity="0.8" offset="0.8" />
+ <stop stop-color="red" stop-opacity="1" offset="1" />
+ </linearGradient>
+ <rect x="20" y="20" width="440" height="80" fill="url(#Grad1)" />
+ <!-- ====================================================================== -->
+ <!-- Radial gradient on the stroke of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <text font-size="60" fill="aqua" x="70" y="210">Background</text>
+ <radialGradient xml:id="Grad2" gradientUnits="userSpaceOnUse" cx="240" cy="210" r="220" fx="240" fy="210">
+ <stop stop-color="black" stop-opacity="1" offset="0" />
+ <stop stop-color="yellow" stop-opacity="0" offset="0.2" />
+ <stop stop-color="red" stop-opacity="0.5" offset="0.4" />
+ <stop stop-color="blue" stop-opacity="0.2" offset="0.6" />
+ <stop stop-color="white" stop-opacity="0.8" offset="0.8" />
+ <stop stop-color="green" stop-opacity="1" offset="1" />
+ </radialGradient>
+ <rect x="20" y="150" width="440" height="80" fill="url(#Grad2)" stroke-width="40" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-07-t.svg
new file mode 100644
index 0000000000..c0bdcf6cd9
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-07-t.svg
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="HS" desc="Test that the viewer has basic capability to handle linear gradients on fills and stroke of objects . This means it needs to understand the following elements : &lt;linearGradient&gt;, &lt;stop&gt; and the following properties : stop-color, fill:url(# ), stroke(url# )" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-grad-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that the viewer has basic capability to handle linear gradients on fills and stroke of objects and text.</p>
+ <p>
+ This test uses the following elements : &lt;linearGradient&gt;, &lt;stop&gt; and the following properties : stop-color,
+ fill:url(# ), stroke(url# )
+ </p>
+ <p>
+ Both elements in this test use the same simple gradient. It is a linear gradient from blue (left) to red (right). From
+ top-down the appearance of objects is as follows.
+ </p>
+ <p>The top rectangle should be filled with the gradient.</p>
+ <p>The next rectangle has no fill, but has a thick stroke on which the gradient is applied.</p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-07-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="scale(1, 1.5)">
+ <!-- ====================================================================== -->
+ <!-- Very simple blue to red linear gradient from left to right ========== -->
+ <!-- ====================================================================== -->
+ <linearGradient xml:id="Gradient" gradientUnits="userSpaceOnUse" x1="10" y1="10" x2="440" y2="10">
+ <stop stop-color="blue" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </linearGradient>
+ <!-- ====================================================================== -->
+ <!-- Linear gradient on the fill of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <rect x="10" y="10" width="430" height="60" fill="url(#Gradient)" />
+ <text font-size="24" x="10" y="90">Linear gradient filled rectangle</text>
+ <!-- ====================================================================== -->
+ <!-- Linear gradient on the stroke of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <rect x="25" y="110" width="400" height="30" fill="none" stroke="url(#Gradient)" stroke-width="20" />
+ <text font-size="24" x="10" y="170">Linear gradient on stroke of rectangle</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-08-t.svg
new file mode 100644
index 0000000000..06b3877222
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-08-t.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="HS" desc="Test that the viewer has basic capability to handle linear gradients on fills and stroke of objects and text. This means it needs to understand the following elements : &lt;linearGradient&gt;, &lt;stop&gt; and the following properties : stop-color, fill:url(# ), stroke(url# )" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that the viewer has basic capability to handle linear gradients on fills and stroke of text.</p>
+ <p>
+ This test uses the following elements : &lt;linearGradient&gt;, &lt;stop&gt; and the following properties : stop-color,
+ fill:url(# ), stroke(url# )
+ </p>
+ <p>
+ Both elements in this test use the same simple gradient. It is a linear gradient from blue (left) to red (right). From
+ top-down the appearance of objects is as follows.
+ </p>
+ <p>The first item is a text string "Gradient on fill" with the gradient on the fill of the text.</p>
+ <p>The second item is a text string that is not filled. It has a 2 user unit stroke on which the gradient is applied.</p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-08-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="MyFont" horiz-adv-x="416">
+ <font-face font-family="MyFont" units-per-em="1000" panose-1="2 0 0 6 3 0 0 2 0 4" ascent="700" descent="-127" alphabetic="0" />
+ <missing-glyph horiz-adv-x="233" />
+ <glyph unicode=" " glyph-name="space" horiz-adv-x="233" />
+ <glyph unicode="G" glyph-name="G" horiz-adv-x="547" d="M40 700V0H510V383H295V253H360V150H190V550H510V700H40Z" />
+ <glyph unicode="a" glyph-name="a" horiz-adv-x="435" d="M71 550L3 0H143L154 119H282L293 0H433L365 550H71ZM168 259L182 410H254L268 259H168Z" />
+ <glyph unicode="d" glyph-name="d" horiz-adv-x="519" d="M27 550V410H87V140H27V0H482V550H27ZM230 410H339V140H230V410Z" />
+ <glyph unicode="e" glyph-name="e" horiz-adv-x="442" d="M37 550V410V0H419V130H180V210H299V340H180V420H419V550H37Z" />
+ <glyph unicode="f" glyph-name="f" horiz-adv-x="428" d="M37 550V410V0H180V196H349V326H180V420H410V550H37Z" />
+ <glyph unicode="i" glyph-name="i" horiz-adv-x="217" d="M37 550V410V0H180V550H37Z" />
+ <glyph unicode="k" glyph-name="k" horiz-adv-x="472" d="M180 207H233L325 0H480L344 284L474 550H319L233 347H180V550H37V410V0H180V207Z" />
+ <glyph unicode="l" glyph-name="l" horiz-adv-x="435" d="M37 0H425V130H180V550H37V410V0Z" />
+ <glyph unicode="n" glyph-name="n" horiz-adv-x="518" d="M180 550H37V410V0H180V324L338 0H481V550H338V226L180 550Z" />
+ <glyph unicode="o" glyph-name="o" horiz-adv-x="484" d="M37 550V0H447V550H37ZM180 410H304V140H180V410Z" />
+ <glyph unicode="r" glyph-name="r" horiz-adv-x="485" d="M37 550V410V0H180V164H222L305 0H465L367 174H444V550H37ZM180 420H301V294H180V420Z" />
+ <glyph unicode="s" glyph-name="s" horiz-adv-x="468" d="M34 550V410V218H291V120H34V0H434V338H177V430H434V550H34Z" />
+ <glyph unicode="t" glyph-name="t" horiz-adv-x="417" d="M5 550V410H137V0H280V410H412V550H5Z" />
+ </font>
+ </defs>
+ <!-- ====================================================================== -->
+ <!-- Very simple blue to red linear gradient from left to right ========== -->
+ <!-- ====================================================================== -->
+ <linearGradient xml:id="Gradient" gradientUnits="userSpaceOnUse" x1="10" y1="10" x2="440" y2="10">
+ <stop stop-color="blue" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </linearGradient>
+ <!-- ====================================================================== -->
+ <!-- Gradient on fill of text ======== -->
+ <!-- ====================================================================== -->
+ <text font-family="MyFont" font-size="68" fill="url(#Gradient)" x="20" y="90">Gradient on fill</text>
+ <text font-size="30" x="40" y="130">Linear gradient on filled text</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient on stroke of text ======== -->
+ <!-- ====================================================================== -->
+ <text font-family="MyFont" x="20" y="220" font-size="55" fill="none" stroke="url(#Gradient)" stroke-width="3">Gradient on stroke</text>
+ <text font-size="30" x="30" y="260">Linear gradient on stroke of text</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-09-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-09-t.svg
new file mode 100644
index 0000000000..4d4ceac465
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-09-t.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="HS" desc="Test that the viewer can handle the gradientUnits attribute on linear gradients." status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-09-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test that the viewer can handle the gradientUnits attribute on linear gradients. It tests the following values of
+ gradientUnits : default (objectBoundingBox), specifying objectBoundingBox, and specifying userSpaceOnUse.
+ </p>
+ <p>From top-down the appearance of objects is as follows.</p>
+ <p>
+ The first rectangle uses the default attributes on the linearGradient element. Therefore the linear gradient should
+ default to objectBoundingBox. It should appear from the left edge of the rectangle (blue) to the right edge of the
+ rectangle (red). The rectangle is smaller than the viewport, because a previous version of the SVG spec had the
+ default value be 'viewport'. The test fails if only a portion of the gradient is shown.
+ </p>
+ <p>The next rectangle uses gradientUnits=objectBoundingBox. The linear gradient should travel from blue (top) to red (bottom).</p>
+ <p>
+ The last rectangle uses gradientUnits=userSpaceOnUse. The rectangle element is given it's own transformation and the
+ gradient is assumed to be in this user space. The gradient should appear as a linear gradient from red (left) to blue
+ (right).
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly, except for possible variations in the labelling text
+ (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-09-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="15" x="10" y="25">Testing gradientUnits attribute</text>
+ <!-- ====================================================================== -->
+ <!-- Linear gradient with default attributes on <linear gradient> element. -->
+ <!-- ====================================================================== -->
+ <linearGradient xml:id="Grad1">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </linearGradient>
+ <rect x="125" y="35" width="200" height="50" fill="url(#Grad1)" />
+ <text font-size="12" x="10" y="100">Linear gradient with default attributes (thus, same as objectBoundingBox)</text>
+ <!--text font-family="Arial" font-size="12" x="10" y="125">Gradient is from the viewport left edge (red) to viewport right edge (blue)</text-->
+ <text font-size="12" x="10" y="115">Gradient is from the object left edge (red) to object right edge (blue)</text>
+ <!-- ====================================================================== -->
+ <!-- Linear gradient with gradientUnits=objectBoundingBox ======== -->
+ <!-- ====================================================================== -->
+ <linearGradient xml:id="Grad2" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="0" y2="1">
+ <stop stop-color="blue" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </linearGradient>
+ <rect x="10" y="125" width="430" height="50" fill="url(#Grad2)" />
+ <text font-size="12" x="10" y="190">gradientUnits=objectBoundingBox</text>
+ <text font-size="12" x="10" y="205">Gradient is from the object top edge (blue) to object bottom edge (red)</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient using gradientUnits="userSpaceOnUse" -->
+ <!-- ====================================================================== -->
+ <linearGradient xml:id="Grad3" x1="0" y1="0" x2="0" y2="430" gradientUnits="userSpaceOnUse">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </linearGradient>
+ <rect transform="translate(10, 260) rotate(-90)" x="0" y="0" width="50" height="430" fill="url(#Grad3)" />
+ <text font-size="12" x="10" y="275">gradientUnits=userSpaceOnUse</text>
+ <text font-size="12" x="10" y="290">Gradient is from the object left edge (red) to object right edge (blue)</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-11-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-11-t.svg
new file mode 100644
index 0000000000..12dbc00196
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-11-t.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="HS" desc="Test that the viewer has basic capability to handle radial gradients on fills and stroke of objects and text. This means it needs to understand the following elements : &lt;radialGradient&gt;, &lt;stop&gt; and the following properties : stop-color, fill:url(# ), stroke(url# )" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-11-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that the viewer has basic capability to handle radial gradients on fills and stroke of objects and text.</p>
+ <p>
+ This test uses the following elements : &lt;radialGradient&gt;, &lt;stop&gt; and the following properties : stop-color,
+ fill:url(# ), stroke(url# )
+ </p>
+ <p>From top-down (left to right) the appearance of objects is as follows.</p>
+ <p>
+ The top left rectangle should be a radial gradient from black(in) to red(outside). The gradiant is applied to the
+ fill of the rectangle.
+ </p>
+ <p>
+ The next rectangle has no fill, but has a thick stroke on which the gradient is applied. The gradient goes from
+ red(in) to yellow (out).
+ </p>
+ <p>The next item is a text with a radial gradient on the fill. The gradient goes from black (in) to yellow (out).</p>
+ <p>The last item is a text with a 2 user unit stroke on which a black (in) to red (out) linear gradient is applied.</p>
+ <p>
+ The rendered picture should match the reference image exactly, except for possible variations in the labelling text
+ (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-11-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Very simple black to red radial gradient ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient gradientUnits="userSpaceOnUse" xml:id="Grad1" cx="75" cy="100" r="130">
+ <stop stop-color="black" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </radialGradient>
+ <rect x="10" y="10" width="210" height="140" fill="url(#Grad1)" />
+ <text font-size="12" x="10" y="165">Radial gradient on fill of rectangle</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient on the stroke of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad2" gradientUnits="userSpaceOnUse" cx="295" cy="100" r="150">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="yellow" offset="1" />
+ </radialGradient>
+ <rect x="250" y="30" width="170" height="100" fill="none" stroke="url(#Grad2)" stroke-width="40" />
+ <text font-size="12" x="230" y="165">Radial gradient on stroke of rectangle</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient on fill of text ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad3" gradientUnits="userSpaceOnUse" cx="225" cy="180" r="90">
+ <stop stop-color="black" offset="0" />
+ <stop stop-color="yellow" offset="1" />
+ </radialGradient>
+ <text font-size="50" fill="url(#Grad3)" x="10" y="210">Gradient on text fill</text>
+ <text font-size="12" x="10" y="225">Radial gradient on text, black to yellow</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient on stroke of text ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad4" gradientUnits="userSpaceOnUse" cx="225" cy="245" r="90">
+ <stop stop-color="black" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </radialGradient>
+ <text font-size="45" fill="none" stroke="url(#Grad4)" stroke-width="2" x="10" y="270">Gradient on text stroke</text>
+ <text font-size="12" x="10" y="285">Radial gradient on stroke of text, black to red</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-12-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-12-t.svg
new file mode 100644
index 0000000000..9d9bb0510f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-12-t.svg
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="HS" desc="Test that the viewer can handle the gradientUnits attribute on radial gradients." status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-12-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test that the viewer can handle the gradientUnits attribute on radial gradients. It tests the following values of
+ gradientUnits : default (objectBoundingBox), objectBoundingBox, and userSpaceOnUse.
+ </p>
+ <p>From top-down the appearance of objects is as follows.</p>
+ <p>
+ The first rectangle uses the default attributes on the radialGradient element. Therefore the radial gradient should
+ be relative to the object bounding box. It should appear from the center of the viewport (blue) to the edges of the
+ viewport (red). The rectangle is wider than tall so it the gradient should be elliptical, not circular.
+ </p>
+ <p>
+ The next rectangle uses gradientUnits=objectBoundingBox. The radial gradient should travel from a center of 20%, 20%
+ of the rectangle with a radius of 50%.
+ </p>
+ <p>
+ The last rectangle uses gradientUnits=userSpaceOnUse. The rectangle element is given it's own transformation and the
+ gradient is assumed to be in this user space. The gradient should appear in the center of the rectangle as a radial
+ gradient from red (center) to blue (edge).
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly, except for possible variations in the labelling text
+ (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-12-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="15" x="10" y="25">Testing gradientUnits attribute</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient with default attributes on <radial gradient> element. -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad1">
+ <stop stop-color="blue" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </radialGradient>
+ <rect x="10" y="35" width="460" height="50" fill="url(#Grad1)" />
+ <text font-size="12" x="10" y="100">Radial gradient with default attributes (from blue to red)</text>
+ <text font-size="12" x="10" y="115">Gradient is blue at the object center and red at the object edges</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient with gradientUnits=objectBoundingBox ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad2" gradientUnits="objectBoundingBox" cx=".2" cy=".2" r=".5">
+ <stop stop-color="blue" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </radialGradient>
+ <rect x="10" y="125" width="460" height="50" fill="url(#Grad2)" />
+ <text font-size="12" x="10" y="190">gradientUnits=objectBoundingBox</text>
+ <text font-size="12" x="10" y="205">cx=.2, cy=.2, r=.5</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient using gradientUnits="userSpaceOnUse" -->
+ <!-- ====================================================================== -->
+ <radialGradient xml:id="Grad3" cx="25" cy="215" r="25" gradientUnits="userSpaceOnUse">
+ <stop stop-color="red" offset="0" />
+ <stop stop-color="blue" offset="1" />
+ </radialGradient>
+ <rect transform="translate(10, 260) rotate(-90)" x="0" y="0" width="50" height="460" fill="url(#Grad3)" />
+ <text font-size="12" x="10" y="275">gradientUnits=userSpaceOnUse</text>
+ <text font-size="12" x="10" y="290">Gradient is red to blue radial gradiant from center to horizontal bounds</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-15-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-15-t.svg
new file mode 100644
index 0000000000..bf4175918b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-15-t.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test linear and radial gradient defaults." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: paint-grad-15-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test linear and radial gradient defaults. Includes testing defaults for linear grad x1,y1,y2 = 0.0, x2 = 1.0 and
+ testing defaults for radial grad cx,cy,r = 0.5
+ </p>
+ <p>
+ The top rectangle must be blue at the lefthand side and red at the right hand side, fading smoothly accross. The
+ lower rectangle must be red at the edges with a black centre to the radial gradient at the centre of the
+ rectangle, and the gradient occupying the whole rectangle.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-15-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- Test defaults for linear grad x1,y1,y2 = 0, x2 = 1 -->
+ <linearGradient xml:id="defs1" gradientUnits="objectBoundingBox">
+ <stop stop-color="blue" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </linearGradient>
+ <!-- Test defaults for radial grad cx,cy,r = 0.5 -->
+ <radialGradient xml:id="defs2" gradientUnits="objectBoundingBox">
+ <stop stop-color="black" offset="0" />
+ <stop stop-color="red" offset="1" />
+ </radialGradient>
+ <rect x="20" y="20" width="440" height="80" fill="url(#defs1)" />
+ <rect x="20" y="150" width="440" height="80" fill="url(#defs2)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-16-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-16-t.svg
new file mode 100644
index 0000000000..1314bc8396
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-16-t.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test gradient stop rules." status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-16-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test gradient stop rules. Including: No stops, like fill = none. One stop, like fill = black. If a stop less than
+ all previous stops, it is set equal to the largest stop. If two stops are equal the last stop controls the color
+ at the overlap point.
+ </p>
+ <p>
+ The top rectangle must have a red outline and no fill. The middle rectangle must have a solid black fill. The
+ lower rectangle must have a yellow to red to green linear gradient on the left-hand half and a solid blue fill
+ for the right hand half.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-16-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- No stops, like fill = none -->
+ <linearGradient xml:id="defs1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0"> </linearGradient>
+ <!-- One stop, like fill = black -->
+ <linearGradient xml:id="defs2" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
+ <stop stop-color="black" offset="1" />
+ </linearGradient>
+ <!-- If a stop less than all previous stops, it is set equal to the largest stop-->
+ <!-- This also tests if two stops are equal the last stop controls the color at the overlap point-->
+ <linearGradient xml:id="defs3" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
+ <stop stop-color="yellow" offset="0" />
+ <stop stop-color="red" offset=".25" />
+ <stop stop-color="green" offset=".5" />
+ <stop stop-color="blue" offset=".1" />
+ </linearGradient>
+ <rect x="20" y="10" width="440" height="80" fill="url(#defs1)" stroke="red" />
+ <rect x="20" y="110" width="440" height="80" fill="url(#defs2)" />
+ <rect x="20" y="210" width="440" height="80" fill="url(#defs3)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-17-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-17-t.svg
new file mode 100644
index 0000000000..57f162f817
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-17-t.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Test that checks that a gradient with objectBoundingBox is not applied on an element without width or height." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: paint-grad-17-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test has a gradient with gradientUnits='objectBoundingBox' which is a fade from black to white. The gradient
+ is used for the stroke of a line. Vertical and horizontal lines don't have a boundingbox, since they are
+ one-dimensional, even though the stroke-width makes it look like they should have a boundingbox with non-zero width
+ and height. See the coordinate chapter, last paragraph of 7.12.
+ </p>
+ <p>
+ The left rectangle has four 'line' elements rotated in different ways. The stroke for the lines have a green solid
+ stroke fallback which should be used if the gradient should be ignored. For this sub-test to pass there must be
+ three lines with solid green stroke, and one line (from bottom left to top right) with a gradient stroke, visible
+ in the rectangle.
+ </p>
+ <p>
+ The right rectangle is the same as the left rectangle except that the stroke paintservers don't have a fallback
+ specified. For this sub-test to pass only the line from bottom left to top right must be visible in the rectangle,
+ and it must have a gradient stroke.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-17-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient xml:id="grad">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-color="white" />
+ </linearGradient>
+ </defs>
+ <!-- sub-test 1: stroke with solid color fallback -->
+ <g transform="translate(50, 100) scale(0.3)">
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad) #070" stroke-width="20" />
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad) #070" stroke-width="20" transform="rotate(45 240 180)" />
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad) #070" stroke-width="20" transform="rotate(90 240 180)" />
+ <line x1="410" y1="10" x2="70" y2="350" stroke="url(#grad) #070" stroke-width="20" />
+ <rect x="0" y="-60" width="480" height="480" fill="none" stroke="black" />
+ </g>
+ <text x="120" y="250" text-anchor="middle">With fallback</text>
+ <!-- sub-test 2: stroke without a fallback -->
+ <g transform="translate(280,100) scale(0.3)">
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad)" stroke-width="20" />
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad)" stroke-width="20" transform="rotate(45 240 180)" />
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad)" stroke-width="20" transform="rotate(90 240 180)" />
+ <line x1="410" y1="10" x2="70" y2="350" stroke="url(#grad)" stroke-width="20" />
+ <rect x="0" y="-60" width="480" height="480" fill="none" stroke="black" />
+ </g>
+ <text x="350" y="250" text-anchor="middle">Without fallback</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-18-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-18-t.svg
new file mode 100644
index 0000000000..d0b376158f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-18-t.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CC" desc="Tests inherit and currentColor on gradient stops" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-18-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test shows rectangles filled with gradient. Several gradients are defined, with two stops:</p>
+ <p>For the top-left rectangle's gradient: The first stop defines a fully-opaque green color. The second stop explicitly inherits (i.e. using the 'inherit' keyword) its stop-color. The result should be that the top-left rectangle is filled with a gradient from green to red since the stop-color is inherited from the location of the gradient definition.</p>
+ <p>For the top-right rectangle's gradient: The first stop defines a fully-opaque green color. The second stop defines a green stop-color but explicitly inherits (i.e. using the 'inherit' keyword) the stop-opacity. The result should be that the top-right rectangle filled in green with a gradient opacity.</p>
+ <p>For the bottom-left rectangle's gradient: The first stop defines a fully-opaque green color. The second stop does not specify the stop-color and the stop-opacity. Since both properties are not inherited, the initial value should be used. The result should be that the lower-left rectangle filled with a gradient going from fully-opaque green to fully-opaque black.</p>
+ <p>For the bottom-right rectangle's gradient: The first stop defines a fully-opaque green color. The second stop specifies the stop-color using the 'currentColor' keyword. The result should be that the lower-right rectangle filled with a gradient going from fully-opaque green to fully-opaque yellow.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-18-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="g0" stop-color="red" stop-opacity="0.5" color="yellow">
+ <linearGradient xml:id="MyGradient1" stop-color="inherit">
+ <stop offset="0" stop-color="green" stop-opacity="1" />
+ <stop offset="1" stop-color="inherit" stop-opacity="1" />
+ </linearGradient>
+ <linearGradient xml:id="MyGradient2" stop-opacity="inherit">
+ <stop offset="0" stop-color="green" stop-opacity="1" />
+ <stop offset="1" stop-color="green" stop-opacity="inherit" />
+ </linearGradient>
+ <linearGradient xml:id="MyGradient3">
+ <stop offset="0" stop-color="green" stop-opacity="1" />
+ <stop offset="1" />
+ </linearGradient>
+ <linearGradient xml:id="MyGradient4">
+ <stop offset="0" stop-color="green" stop-opacity="1" />
+ <stop offset="1" stop-color="currentColor" stop-opacity="1" />
+ </linearGradient>
+ </g>
+ <g xml:id="g1" stop-color="blue">
+ <rect xml:id="r1" fill="url(#MyGradient1)" width="100" height="100" x="50" y="50" />
+ </g>
+ <g xml:id="g2" stop-opacity="1">
+ <rect xml:id="r2" fill="url(#MyGradient2)" width="100" height="100" x="200" y="50" />
+ </g>
+ <g xml:id="g3" stop-opacity="1" stop-color="blue">
+ <rect xml:id="r3" fill="url(#MyGradient3)" width="100" height="100" x="50" y="200" />
+ </g>
+ <g xml:id="g4" color="blue">
+ <rect xml:id="r4" fill="url(#MyGradient4)" width="100" height="100" x="200" y="200" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-202-t.svg
new file mode 100644
index 0000000000..c226d01143
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-202-t.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" standalone="no"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="AE" desc="Stop Opacity Attribute with Text" status="accepted"
+ approved="yes"
+ testname="$RCSfile: paint-grad-202-t.svg,v $" version="$Revision: 1.7 $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Stop Opacity Attribute with Text</p>
+ <p>
+ There are three lines of text. For this test to pass each line of text must have the same gradient
+ from green to blue all set to a 'stop-opacity' of 0.4 . The reference rect at the bottom has a
+ similar gradient but with 'stop-opacity set to 1. The text of the poem should be lighter than
+ the reference line.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g fill="#555" text-anchor="middle">
+ <text fill="#000" x="240" y="30" xml:id="display-title">Stop Opacity Attribute with Text</text>
+ <g font-size="14">
+ <text x="240" y="50" xml:id="comment-1">All three lines of text must have the same transparent gradient - </text>
+ <text x="240" y="65" xml:id="comment-2">from green to blue, set at 0.4 'stop-opacity'. The reference rect at</text>
+ <text x="240" y="80" xml:id="comment-3">the bottom has a similar gradient but with 'stop-opacity set to 1.</text>
+ </g>
+ </g>
+ <defs>
+ <linearGradient xml:id="LinearGrad-transparent-z">
+ <stop stop-opacity="0.4" stop-color="green" offset="0.03"/>
+ <stop stop-opacity="0.4" stop-color="blue" offset="0.40"/>
+ <stop stop-opacity="0.4" stop-color="fuchsia" offset="0.66"/>
+ <stop stop-opacity="0.4" stop-color="purple" offset="0.98"/>
+ </linearGradient>
+ <linearGradient xml:id="LinearGrad-transparent">
+ <stop stop-opacity="0.4" stop-color="green" offset="0.43"/>
+ <stop stop-opacity="0.4" stop-color="blue" offset="0.98"/>
+ </linearGradient>
+ <linearGradient xml:id="LinearGrad-opaque">
+ <stop stop-opacity="1" stop-color="green" offset="0.43"/>
+ <stop stop-opacity="1" stop-color="blue" offset="0.98"/>
+ </linearGradient>
+ <g xml:id="poem">
+ <text x="0" y="0">old pond</text>
+ <text x="0" y="30">a frog leaps in -</text>
+ <text x="0" y="60">a moment after, silence</text>
+ </g>
+ </defs>
+ <use font-size="32" x="60" y="140" fill-opacity="1" fill="url(#LinearGrad-transparent)" xlink:href="#poem"/>
+ <rect x="60" y="217" width="360" height="15" fill="url(#LinearGrad-opaque)"/>
+ <rect x="15" y="217" width="450" height="15" fill="url(#LinearGrad-opaque)"/>
+ <text x="450" fill="#555" font-size="8" y="270" text-anchor="end">Frog Haiku by Matsuo Basho (1686), translated by Ross Figgins</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-204-t.svg
new file mode 100644
index 0000000000..b1c1c912b4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-204-t.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="ASl" desc="LinearGradient with only one stop-color" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: paint-grad-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Gradient with only one stop-color. This test is passed if the fill of
+ the rect on the right is identical to the fill of the rect on the left.
+ </p>
+ <p>
+ For gradients with only a single stop-color the painting shall occur
+ with the solid color fill using the color defined for the gradient stop.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-204-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient x1="130" y1="50" x2="330" y2="250" xml:id="MyGradient" gradientUnits="userSpaceOnUse">
+ <stop stop-color="#F60" stop-opacity="0.5"/>
+ </linearGradient>
+ </defs>
+
+ <rect fill="url(#MyGradient)" stroke="black" stroke-width="2" x="60" y="60" width="150" height="150"/>
+ <text x="40" y="230">Gradient with one stop</text>
+
+ <rect fill="#F60" fill-opacity="0.5" stroke="black" stroke-width="2" x="270" y="60" width="150" height="150"/>
+ <text x="300" y="230">Reference</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-205-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-205-t.svg
new file mode 100644
index 0000000000..87ffaa898e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-grad-205-t.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="ASl" desc="LinearGradient with no stop-color" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-grad-205-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Gradient with no stop-elements. The painting shall occur as if 'none' were specified
+ as the paint style, thus allowing the pale blue rectangle to be seen inside the square.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-grad-205-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <defs>
+ <linearGradient x1="130" y1="50" x2="330" y2="250" xml:id="MyGradient" gradientUnits="userSpaceOnUse" />
+ </defs>
+ <rect width="300" height="100" x="80" y="100" fill="#6CF"/>
+ <rect fill="url(#MyGradient)" stroke="black" stroke-width="2" x="130" y="50" width="200" height="200"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-other-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-other-201-t.svg
new file mode 100644
index 0000000000..f3890fe48b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-other-201-t.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="AE" desc="Test solidColor paint server." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-other-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test solidColor paint server with 'solid-opacity' attribute.</p>
+ <p>
+ There are three 'solidColor' definitions - red, green, blue.
+ These are used for both the fill and outlines of the rectangle and circle.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-other-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g text-anchor="middle" font-size="10" fill="#555">
+ <text xml:id="display-title" x="240" y="30" font-size="14" fill="#000">Solid Color Paint Server</text>
+ <text xml:id="comment-1" x="240" y="45">
+ There are three 'solidColor' definitions - red, green, blue.
+ </text>
+ <text xml:id="comment-2" x="240" y="57">
+ These are used for both the fill and outlines of the rectangle and circle.
+ </text>
+ </g>
+ <defs>
+ <solidColor xml:id="solidRed" solid-color="red"/>
+ <solidColor xml:id="solidGreen" solid-color="green"/>
+ <solidColor xml:id="solidBlue" solid-color="blue"/>
+ </defs>
+ <g transform="scale(0.85),translate(43,40)">
+ <rect x="190" y="50" width="180" height="220" fill="url(#solidRed)" stroke="url(#solidBlue)" stroke-width="12"/>
+ <circle cx="190" cy="160" r="80" fill="none" stroke="url(#solidGreen)" stroke-width="20"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-01-t.svg
new file mode 100644
index 0000000000..cdc8479da7
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-01-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle the 'stroke' and 'stroke-width' properties." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-stroke-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Verify the basic capability to handle the stroke properties ("stroke") in combination with the "rect" element. The
+ pair should be rendered as two blue rectangles, the upper one without a stroke and the lower with a red stroke.
+ </p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labeling text (per CSS2 rules).</p>
+ <p>
+ The test uses the "rect" element, as well as basic "fill" (solid primary colors), "stroke", stroke="red",
+ "font-family" (Arial) and "font-size" attributes.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ============================================================================= -->
+ <!-- Draw two simple rectangles. One without stroke other with stroke:red -->
+ <!-- ============================================================================= -->
+ <text font-size="36" x="10" y="40">Basic paint: stroke properties.</text>
+ <rect xml:id="stroke-01" fill="blue" stroke="none" x="90" y="70" width="300" height="50" />
+ <rect xml:id="stroke-02" fill="blue" stroke-width="20" stroke="red" x="90" y="190" width="300" height="50" />
+ <text font-size="40" x="140" y="150">stroke="none"</text>
+ <text font-size="40" x="148" y="280">stroke="red"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-02-t.svg
new file mode 100644
index 0000000000..23741b11f0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-02-t.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle the 'stroke', 'stroke-width' and 'stroke-linejoin' properties." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-stroke-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Verify the basic capability to handle the stroke properties ("stroke", "stroke-width", "stroke-linejoin") in
+ combination with the "rect" element. The pair should be rendered as two red rectangles without an interior fill.
+ The upper rectangle should have a stroke width of 5 with sharp corners. The lower rectangle should have a stroke
+ width of 5 with round corners.
+ </p>
+ <p>
+ The test uses the "rect" element, as well as basic "fill" (solid primary colors), "stroke", stroke="red"
+ stroke-width="10" stroke-linejoin="round", "font-family" (Arial) and "font-size" properties.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Set of rectangles with stroke-width:10 and stroke-linejoin:round-->
+ <!-- ====================================================================== -->
+ <text font-size="36" x="10" y="40">Basic paint: stroke properties.</text>
+ <rect xml:id="stroke-01" fill="none" stroke="red" stroke-width="20" x="90" y="70" width="300" height="50" />
+ <rect xml:id="stroke-02" fill="none" stroke="red" stroke-width="20" stroke-linejoin="round" x="90" y="190" width="300" height="50" />
+ <text font-size="40" x="120" y="160">stroke-width="20"</text>
+ <text font-size="40" x="58" y="290">stroke-linejoin="round"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-03-t.svg
new file mode 100644
index 0000000000..5e0a5bb718
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-03-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle the &lt;stroke properties&gt;" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-stroke-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Verify the basic capability to handle the stroke properties ("stroke", "stroke-width" "stroke-linejoin", "stroke-linecap",
+ "stroke-miter") in combination with straight-line path commands. The pair should be rendered as as two red line segments.
+ The upper segment should have round end caps. The lower segment should be chopped off where the two line segments meet.
+ </p>
+ <p>
+ The test uses the "path" element, as well as basic "fill" (solid primary colors), "stroke", "stroke-width",
+ "stroke-linejoin", "stroke-linecap", "stroke-miter", "font-family" (Arial) and "font-size" properties.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Test stroke-linecap:round and stroke-miterlimit:1 -->
+ <!-- ====================================================================== -->
+ <text font-size="36" x="10" y="40">Basic paint: stroke properties.</text>
+ <path fill="none" stroke="red" stroke-width="30" stroke-linecap="round" d="M 160 70 l 200 20 l -200 20 " />
+ <path fill="none" stroke="red" stroke-width="30" stroke-linejoin="miter" stroke-miterlimit="1" d="M 160 190 l 200 20 l -200 20" />
+ <text font-size="40" x="60" y="160">stroke-linecap="round"</text>
+ <text font-size="40" x="130" y="280">stroke-miter="1"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-04-t.svg
new file mode 100644
index 0000000000..eee5583e55
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-04-t.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="KMC" desc="Test that viewer has the basic capability to handle the 'stroke', 'stroke-width', 'stroke-dasharray' and 'stroke-dashoffset' properties." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-stroke-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Verify the "stroke-dasharray" and "stroke-dashoffset" properties. Two lines are drawn, one red and one black.
+ Both have a "stroke-dasharray" of "10,10" giving a dashed appearance where the size of the gaps and the size of
+ the dash is equal. The help show this, the black line has a "stroke-dashoffset" so that the dashes in the black
+ line match up with the gaps in the red line.
+ </p>
+ <p>
+ The test uses the "path" element, "stroke", "stroke-width", "stroke-dasharray" and "stroke-dashoffset", "font-family"
+ (Arial) and "font-size" properties.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Test stroke-dasharray and stroke-dashoffset -->
+ <!-- ====================================================================== -->
+ <text font-size="36" x="10" y="60">Basic paint: stroke properties.</text>
+ <path xml:id="stroke-7b" fill="none" stroke="red" stroke-width="25" stroke-dashoffset="0" stroke-dasharray="10,10" d="M 50 120 L 430 120" />
+ <path xml:id="stroke-7c" fill="none" stroke="black" stroke-width="25" stroke-dashoffset="10" stroke-dasharray="10,10" d="M 50 140 L 430 140" />
+ <text font-size="30" x="65" y="210">stroke-dasharray="10, 10"</text>
+ <text font-size="30" x="75" y="260">stroke-dashoffset="10"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-05-t.svg
new file mode 100644
index 0000000000..48085f4ec0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-05-t.svg
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events"
+ shape-rendering="geometricPrecision">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="BB" desc="Shows how a user agent may render thin strokes" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-stroke-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ User agents may render graphical primitives with different levels of accurancy.
+ This test is aimed at determining how does a UA render thin strokes.
+ </p>
+ <p>
+ The test file contains a number of vertical and horizontal lines.
+ The stroke width of the vertical lines are increasing from left to right.
+ The stroke width of the horizontal lines are increasing from top to bottom.
+ The user should be able to see a smooth stroke width increment for the vertical and horizontal lines.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">painting-stroke-05-t.svg</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="20" x="240" y="30" text-anchor="middle">Rendering thin strokes</text>
+ <polyline points="030,50 030,300" stroke="black" stroke-width="0.001"/>
+ <polyline points="50,50 50,300" stroke="black" stroke-width="0.1"/>
+ <polyline points="70,50 70,300" stroke="black" stroke-width="0.2"/>
+ <polyline points="90,50 90,300" stroke="black" stroke-width="0.3"/>
+ <polyline points="110,50 110,300" stroke="black" stroke-width="0.4"/>
+ <polyline points="130,50 130,300" stroke="black" stroke-width="0.5"/>
+ <polyline points="150,50 150,300" stroke="black" stroke-width="0.6"/>
+ <polyline points="170,50 170,300" stroke="black" stroke-width="0.7"/>
+ <polyline points="190,50 190,300" stroke="black" stroke-width="0.8"/>
+ <polyline points="210,50 210,300" stroke="black" stroke-width="0.9"/>
+ <polyline points="230,50 230,300" stroke="black" stroke-width="1.0"/>
+ <polyline points="250,50 250,300" stroke="black" stroke-width="1.1"/>
+ <polyline points="270,50 270,300" stroke="black" stroke-width="1.2"/>
+ <polyline points="290,50 290,300" stroke="black" stroke-width="1.3"/>
+ <polyline points="310,50 310,300" stroke="black" stroke-width="1.4"/>
+ <polyline points="330,50 330,300" stroke="black" stroke-width="1.5"/>
+ <polyline points="350,50 350,300" stroke="black" stroke-width="1.6"/>
+ <polyline points="370,50 370,300" stroke="black" stroke-width="1.7"/>
+ <polyline points="390,50 390,300" stroke="black" stroke-width="1.8"/>
+ <polyline points="410,50 410,300" stroke="black" stroke-width="1.9"/>
+ <polyline points="430,50 430,300" stroke="black" stroke-width="2.0"/>
+ <polyline points="450,50 450,300" stroke="black" stroke-width="2.1"/>
+
+ <line x1="10" x2="470" y1="100" y2="100" stroke="rgb(0,0,139)" stroke-width="0.1"/>
+ <line x1="10" x2="470" y1="150" y2="150" stroke="rgb(0,0,139)" stroke-width="0.5"/>
+ <line x1="10" x2="470" y1="200" y2="200" stroke="rgb(0,0,139)" stroke-width="1"/>
+ <line x1="10" x2="470" y1="250" y2="250" stroke="rgb(0,0,139)" stroke-width="2"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-06-t.svg
new file mode 100644
index 0000000000..23404c4918
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-06-t.svg
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test some effects of stroke-dasharray." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-stroke-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test default effects of stroke-dasharray.
+ </p>
+ <p>
+ This specifically tests the values of none and 0.
+ This also tests an odd number of values in a dash-array attribute
+ and in combination with an offset.
+ </p>
+ <p>
+ The top two lines must be solid black. The next line shows a thick
+ black line with a thinner red line on top; both must have the same
+ dash pattern. The bottom two lines, one black and one blue, must render
+ so that the gaps of one correspond to the dashes of the other.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-06-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="scale(1.8)">
+
+ <!-- No dasharray -->
+ <path stroke="black" stroke-width="10" fill="none" stroke-dasharray="none" d=" M 20 20 L 200 20"/>
+
+ <path stroke="black" stroke-width="10" fill="none" stroke-dasharray="0" d=" M 20 40 L 200 40"/>
+
+ <!-- Odd number, should repeat to make an even number -->
+ <path stroke="black" stroke-width="20" fill="none" stroke-dasharray="5,2,5,5,2,5" d=" M 20 60 L 200 60"/>
+ <path stroke="red" stroke-width="10" fill="none" stroke-dasharray="5,2,5" d=" M 20 60 L 200 60"/>
+
+ <!-- Odd number, with a dashoffset test -->
+ <path stroke="black" stroke-width="10" fill="none" stroke-dasharray="2" d=" M 20 80 L 200 80"/>
+
+ <path stroke="blue" stroke-width="10" fill="none" stroke-dasharray="2" stroke-dashoffset="2" d="
+ M 20 90 L 200 90"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-07-t.svg
new file mode 100644
index 0000000000..2a41e6b396
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-07-t.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test effect of different stroke-miterlimits." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-stroke-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test effect of different stroke-miterlimits. For this particular combination of stroke width and angle,
+ the cut off value of stroke-miterlimit is 18.028. Thus, the first and second subtests should not truncate
+ the stroke, and all the rest must truncate it.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-07-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="scale(1.2) translate(60, 30)">
+ <!-- test different miterlimits -->
+ <path stroke="black" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="20" fill="none" d="M 20 20 L 200 30 L 20 40" />
+ <path stroke="black" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="18.1" fill="none" d="M 20 50 L 200 60 L 20 70" />
+ <path stroke="black" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="17.9" fill="none" d="M 20 80 L 200 90 L 20 100" />
+ <path stroke="black" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="17" fill="none" d="M 20 110 L 200 120 L 20 130" />
+ <path stroke="black" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="4" fill="none" d="M 20 140 L 200 150 L 20 160" />
+ <path stroke="black" stroke-width="10" stroke-linejoin="miter" stroke-miterlimit="1" fill="none" d="M 20 170 L 200 180 L 20 190" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-08-t.svg
new file mode 100644
index 0000000000..8de0746842
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-08-t.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test effects of stroke-opacity range" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-stroke-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test effects of stroke-opacity range. Values
+ outside the range 0-1.0 must be clamped.
+ </p>
+ <p>
+ There must be no blue bars visible beside the three pink dots.
+ Four semitransparent blue bars, increasingly more opaque,
+ must line up with the yellow dots. Three fully opaque
+ blue bars must line up with the green dots.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-08-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(50, 0) scale(1.7)">
+ <circle r="5" fill="#f66" cx="200" cy="20"/>
+ <circle r="5" fill="#f66" cx="200" cy="40"/>
+ <circle r="5" fill="#f66" cx="200" cy="60"/>
+ <circle r="5" fill="#f66" cx="200" cy="80"/>
+ <circle r="5" fill="#ff0" cx="200" cy="80"/>
+ <circle r="5" fill="#ff0" cx="200" cy="100"/>
+ <circle r="5" fill="#ff0" cx="200" cy="120"/>
+ <circle r="5" fill="#ff0" cx="200" cy="140"/>
+ <circle r="5" fill="#6f3" cx="200" cy="160"/>
+ <circle r="5" fill="#6f3" cx="200" cy="180"/>
+ <circle r="5" fill="#6f3" cx="200" cy="200"/>
+ <!-- Test range and values outside range (should be clamped to valid range) -->
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="-1.0" d=" M 20 20 L 200 20"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="-0.1" d=" M 20 40 L 200 40"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="0.0" d=" M 20 60 L 200 60"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="0.2" d=" M 20 80 L 200 80"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="0.4" d=" M 20 100 L 200 100"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="0.6" d=" M 20 120 L 200 120"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="0.8" d=" M 20 140 L 200 140"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="1.0" d=" M 20 160 L 200 160"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="1.1" d=" M 20 180 L 200 180"/>
+ <path stroke="blue" stroke-width="10" fill="none" stroke-opacity="2.0" d=" M 20 200 L 200 200"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-202-t.svg
new file mode 100644
index 0000000000..3f8d53864f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-202-t.svg
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="DOH" desc="Direction of stroke-dasharray and stroke-dashoffset for basic shapes." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-stroke-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Direction of stroke-dasharray and stroke-dashoffset for basic shapes.
+ </p>
+ <p>
+ The main indication for a failed test is the appearence of a blue path on
+ a white background area. It is passed, if all blue paths are on a gray background area.
+ </p>
+ <p>
+ stroke-dasharray and stroke-dashoffset are tested on basic shapes circle, ellipse, rectangle,
+ rectangle with rounded corners, line, polyline and polygon. The test is sensitive to the
+ direction of stroke-dasharray and stroke-dashoffset and on the starting point on the basic
+ shape.
+ </p>
+ <p>
+ The dashes are positioned correctly, if they are only on a gray background area.
+ If there are dashes on a white background, this is an indication for an error.
+ Additional information given in the elements title and desc for the related subtest
+ may help to identify the tested shape and property combination and the error,
+ if there is one.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g>
+ <title>background of filled rectangles indicating stroking areas in gray</title>
+ <rect x="0" y="0" width="480" height="360" fill="#fff" />
+ <rect x="20" y="20" width="100" height="100" fill="#ccc" />
+ <rect x="120" y="120" width="100" height="100" fill="#ccc" />
+ <g transform="translate(0,30) rotate(45,320,120)">
+ <rect x="220" y="20" width="100" height="100" fill="#ccc" />
+ <rect x="320" y="120" width="100" height="100" fill="#ccc" />
+ </g>
+ <rect x="400" y="40" width="70" height="70" fill="#ccc" />
+ <rect x="400" y="180" width="70" height="70" fill="#ccc" />
+ </g>
+
+ <g>
+ <title>testing stroke-dasharray for circle, rectangle with rounded corners, ellipse</title>
+ <circle cx="120" cy="120" r="89.1268"
+ fill="none" stroke-width="20" stroke="#00f" stroke-dasharray="140">
+ <title>stroke-dasharray on circle without stroke-dashoffset</title>
+ <desc>Note that the pathLength of the circle is exactly 560</desc>
+ </circle>
+ <rect x="30.8732" y="30.8732" width="178.2535" height="178.2535" rx="200"
+ fill="none" stroke-width="12" stroke="#00a" stroke-dasharray="0,140,140,140,140">
+ <title>stroke-dasharray on rect with rounded corners without stroke-dashoffset</title>
+ <desc>Note that the pathLength of the rect is exactly 560</desc>
+ </rect>
+ <ellipse cx="120" cy="120" rx="89.1268" ry="89.1268"
+ fill="none" stroke-width="4" stroke="#44f" stroke-dasharray="140">
+ <title>stroke-dasharray on ellipse without stroke-dashoffset</title>
+ <desc>Note that the pathLength of the ellipse is exactly 560</desc>
+ </ellipse>
+
+
+ <circle cx="320" cy="150" r="89.1268"
+ fill="none" stroke-width="20" stroke="#00f" stroke-dasharray="140" stroke-dashoffset="-70">
+ <title>stroke-dasharray on circle without negative stroke-dashoffset</title>
+ <desc>Note that the pathLength of the circle is exactly 560</desc>
+ </circle>
+ <rect x="230.8732" y="60.8732" width="178.2535" height="178.2535" rx="200"
+ fill="none" stroke-width="12" stroke="#00a" stroke-dasharray="140" stroke-dashoffset="-210">
+ <title>stroke-dasharray on rect with rounded corners with negative stroke-dashoffset</title>
+ <desc>Note that the pathLength of the rect is exactly 560</desc>
+ </rect>
+ <ellipse cx="320" cy="150" rx="89.1268" ry="89.1268"
+ fill="none" stroke-width="4" stroke="#44f" stroke-dasharray="140" stroke-dashoffset="210">
+ <title>stroke-dasharray on ellipse with positive stroke-dashoffset</title>
+ <desc>Note that the pathLength of the ellipse is exactly 560</desc>
+ </ellipse>
+ </g>
+
+
+ <g fill="none" stroke-dasharray="none" stroke-dashoffset="none">
+ <title>testing stroke-dasharray for line, polyline, polygon</title>
+ <line x1="10" y1="250" x2="80" y2="250" stroke-width="30" stroke="#ccc" />
+ <line x1="150" y1="250" x2="220" y2="250" stroke-width="30" stroke="#ccc" />
+ <line x1="10" y1="250" x2="220" y2="250"
+ stroke-width="20" stroke="#00f" stroke-dasharray="70" stroke-dashoffset="0">
+ <title>stroke-dasharray on line with stroke-dashoffset set to 0</title>
+ </line>
+ <polyline points="10,250 100,250 220,250"
+ stroke-width="12" stroke="#00a" stroke-dasharray="70" stroke-dashoffset="0">
+ <title>stroke-dasharray on polyline with stroke-dashoffset set to 0</title>
+ </polyline>
+ <polygon points="10,250 100,250 255,250"
+ stroke-width="4" stroke="#44f" stroke-dasharray="70" stroke-dashoffset="0">
+ <title>stroke-dasharray on polygon with stroke-dashoffset set to 0</title>
+ </polygon>
+
+ <line x1="10" y1="290" x2="45" y2="290" stroke-width="30" stroke="#ccc" />
+ <line x1="115" y1="290" x2="185" y2="290" stroke-width="30" stroke="#ccc" />
+ <line x1="255" y1="290" x2="290" y2="290" stroke-width="30" stroke="#ccc" />
+ <line x1="10" y1="290" x2="290" y2="290" stroke-width="20" stroke="#00f" stroke-dasharray="70" stroke-dashoffset="35">
+ <title>stroke-dasharray on line with stroke-dashoffset</title>
+ </line>
+ <polyline points="10,290 100,290 290,290"
+ stroke-width="12" stroke="#00a" stroke-dasharray="70" stroke-dashoffset="-105">
+ <title>stroke-dasharray on polyline with negative stroke-dashoffset</title>
+ </polyline>
+ <polygon points="10,290 100,290 290,290"
+ stroke-width="4" stroke="#44f" stroke-dasharray="70" stroke-dashoffset="35">
+ <title>stroke-dasharray on polygon with stroke-dashoffset</title>
+ </polygon>
+ </g>
+
+
+ <g fill="none" >
+ <title>testing stroke-dasharray for rectangles</title>
+ <rect x="420" y="30" width="30" height="240"
+ stroke-width="20" stroke="#00f" stroke-dasharray="70" stroke-dashoffset="100">
+ <title>stroke-dasharray on rect with positive stroke-dashoffset</title>
+ </rect>
+
+ <rect x="420" y="20" width="30" height="258.5841" rx="10"
+ stroke-width="12" stroke="#00a"
+ stroke-dasharray="10,35.708,70,70,70,78.5841,70,70,70,70" stroke-dashoffset="10">
+ <title>stroke-dasharray on rect with rounded corners with positive stroke-dashoffset</title>
+ <desc>Note that the pathLength of the rectangle is exactly 560, the round parts are 2pi*rx</desc>
+ </rect>
+
+ <rect x="420" y="-10" width="30" height="350"
+ stroke-width="4" stroke="#44f" stroke-dasharray="0,70,70,70,70,210,70,70,70,70" stroke-dashoffset="-10">
+ <title>stroke-dasharray on rect with negative stroke-dashoffset</title>
+ </rect>
+ </g>
+
+
+ <g font-size="12" stroke="none" fill="#ccc">
+ <text x="340" y="310">position of the dashes:</text>
+ <text x="340" y="322">blue on gray: ok</text>
+ <text x="340" y="334">blue on white: fail </text>
+ </g>
+
+
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-204-t.svg
new file mode 100644
index 0000000000..fa32d3590b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-204-t.svg
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="DOH" desc="Precision tests for stroke-linejoin" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-stroke-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Precision tests for stroke-linejoin.
+ </p>
+ <p>
+ The main indication for a failed test is the appearence of something red.
+ </p>
+ <p>
+ stroke-linejoin is tested, using a comparsion with filled or stroked paths or shapes with the same appearance.
+ This is tested for different three miter angles for the values round, miter and bevel, for each of them one with
+ test path on top of the comparsion shapes and one with the path below.
+ </p>
+ The four paths top right test the inheritance either for the value explicitely set to 'inherit' or a missing stroke-linejoin property.
+ <p>
+ </p>
+ <p>
+ The top is always blue. If something
+ red gets visible, an error is occured.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-204-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <rect x="0" y="0" width="480" height="360" fill="#fff" />
+ <g stroke-linejoin="miter" stroke-miterlimit="10">
+ <g transform="translate(-25,-25) scale(0.75)">
+ <title>stroke-linejoin round (on top)</title>
+ <path d="M50,50L50,100 M50,100 100,100" stroke-width="20" stroke="red" fill="none"/>
+ <circle cx="50" cy="100" r="10" fill="red" />
+ <path d="M50,50L50,100 100,100" stroke-width="20" stroke-linejoin="round" stroke="blue" fill="none"/>
+
+ <path d="M200,50L150,100 M150,100 200,100" stroke-width="20" stroke="red" fill="none"/>
+ <circle cx="150" cy="100" r="10" fill="red" />
+ <path d="M200,50L150,100 200,100" stroke-width="20" stroke-linejoin="round" stroke="blue" fill="none"/>
+
+ <path d="M250,50L300,100 M300,100 350,100" stroke-width="20" stroke="red" fill="none"/>
+ <circle cx="300" cy="100" r="10" fill="red" />
+ <path d="M250,50L300,100 350,100" stroke-width="20" stroke-linejoin="round" stroke="blue" fill="none"/>
+ </g>
+
+ <g transform="translate(-25,35) scale(0.75)">
+ <title>stroke-linejoin round (below)</title>
+ <path d="M50,50L50,100 100,100" stroke-width="20" stroke-linejoin="round" stroke="red" fill="none"/>
+ <path d="M50,50L50,100 M50,100 100,100" stroke-width="20" stroke="blue" fill="none"/>
+ <circle cx="50" cy="100" r="10" fill="blue" />
+
+ <path d="M200,50L150,100 200,100" stroke-width="20" stroke-linejoin="round" stroke="red" fill="none"/>
+ <path d="M200,50L150,100 M150,100 200,100" stroke-width="20" stroke="blue" fill="none"/>
+ <circle cx="150" cy="100" r="10" fill="blue" />
+
+ <path d="M250,50L300,100 350,100" stroke-width="20" stroke-linejoin="round" stroke="red" fill="none"/>
+ <path d="M250,50L300,100 M300,100 350,100" stroke-width="20" stroke="blue" fill="none"/>
+ <circle cx="300" cy="100" r="10" fill="blue" />
+ </g>
+
+
+
+ <g transform="translate(-25,120) scale(0.75)">
+ <title>stroke-linejoin miter (on top)</title>
+
+ <path d="M50,50L50,110 M40,100 100,100" stroke-width="20" stroke="red" fill="none"/>
+ <path d="M50,50L50,100 100,100" stroke-width="20" stroke-linejoin="miter" stroke="blue" fill="none"/>
+
+ <path d="M192.928932188,42.928932188
+ L125.857864376,110 200,110 200,90 174.142135624,90 207.071067812,57.071067812z" fill="red"/>
+ <path d="M200,50L150,100 200,100" stroke-width="20" stroke-linejoin="miter" stroke="blue" fill="none"/>
+
+ <path d="M242.928932188,57.071067812
+ L295.857864376,110 350,110 350,90 304.142135624,90 257.071067812,42.928932188z" fill="red"/>
+ <path d="M250,50L300,100 350,100" stroke-width="20" stroke-linejoin="miter" stroke="blue" fill="none"/>
+ </g>
+
+ <g transform="translate(-25,180) scale(0.75)">
+ <title>stroke-linejoin miter (below)</title>
+ <path d="M50,50L50,100 100,100" stroke-width="20" stroke-linejoin="miter" stroke="red" fill="none"/>
+ <path d="M50,50L50,110 M40,100 100,100" stroke-width="20" stroke="blue" fill="none"/>
+
+ <path d="M200,50L150,100 200,100" stroke-width="20" stroke-linejoin="miter" stroke="red" fill="none"/>
+ <path d="M192.928932188,42.928932188
+ L125.857864376,110 200,110 200,90 174.142135624,90 207.071067812,57.071067812z" fill="blue"/>
+
+ <path d="M250,50L300,100 350,100" stroke-width="20" stroke-linejoin="miter" stroke="red" fill="none"/>
+ <path d="M242.928932188,57.071067812
+ L295.857864376,110 350,110 350,90 304.142135624,90 257.071067812,42.928932188z" fill="blue"/>
+ </g>
+
+
+ <g transform="translate(215,-25) scale(0.75)">
+ <title>stroke-linejoin bevel (on top)</title>
+
+ <path d="M40,50L40,100 50,110 100,110 100,90 60,90 60,50z" fill="red"/>
+ <path d="M50,50L50,100 100,100" stroke-width="20" stroke-linejoin="bevel" stroke="blue" fill="none"/>
+
+ <path d="M192.928932188,42.928932188
+ L142.928932188,92.928932188 150,110
+ 200,110 200,90 174.142135624,90 207.071067812,57.071067812z" fill="red"/>
+ <path d="M200,50L150,100 200,100" stroke-width="20" stroke-linejoin="bevel" stroke="blue" fill="none"/>
+
+ <path d="M242.928932188,57.071067812
+ L292.928932188,107.071067812 300,110
+ 350,110 350,90 304.142135624,90 257.071067812,42.928932188z" fill="red"/>
+ <path d="M250,50L300,100 350,100" stroke-width="20" stroke-linejoin="bevel" stroke="blue" fill="none"/>
+ </g>
+
+ <g transform="translate(215,35) scale(0.75)">
+ <title>stroke-linejoin bevel (below)</title>
+ <path d="M50,50L50,100 100,100" stroke-width="20" stroke-linejoin="bevel" stroke="red" fill="none"/>
+ <path d="M40,50L40,100 50,110 100,110 100,90 60,90 60,50z" fill="blue"/>
+
+ <path d="M200,50L150,100 200,100" stroke-width="20" stroke-linejoin="bevel" stroke="red" fill="none"/>
+ <path d="M192.928932188,42.928932188
+ L142.928932188,92.928932188 150,110 200,110 200,90 174.142135624,90 207.071067812,57.071067812z" fill="blue"/>
+
+ <path d="M250,50L300,100 350,100" stroke-width="20" stroke-linejoin="bevel" stroke="red" fill="none"/>
+ <path d="M242.928932188,57.071067812
+ L292.928932188,107.071067812 300,110 350,110 350,90 304.142135624,90 257.071067812,42.928932188z" fill="blue"/>
+ </g>
+
+ <g transform="translate(250,140)" stroke-linejoin="round" stroke="blue" fill="none" stroke-width="10">
+ <title>inheritance test (on top, round)</title>
+ <path d="M0,150L25,120 50,150" stroke-linejoin="round" stroke="red" fill="none" stroke-width="10" />
+ <path d="M1000,0L1000,0" stroke-linejoin="miter" />
+ <path d="M0,150L25,120 50,150" stroke-linejoin="inherit" />
+
+ <path d="M0,0L100,200 50,0" stroke-linejoin="round" stroke="red" fill="none" stroke-width="10" />
+ <path d="M0,0L100,200 50,0" />
+ </g>
+
+ <g transform="translate(370,140)" stroke-linejoin="round" stroke="red" fill="none" stroke-width="10">
+ <title>inheritance test (below, round)</title>
+ <path d="M1000,0L1000,0" stroke-linejoin="miter" />
+ <path d="M0,150L25,120 50,150" stroke-linejoin="inherit" />
+ <path d="M0,150L25,120 50,150" stroke-linejoin="round" stroke="blue" fill="none" stroke-width="10" />
+
+ <path d="M0,0L100,200 50,0" />
+ <path d="M0,0L100,200 50,0" stroke-linejoin="round" stroke="blue" fill="none" stroke-width="10" />
+ </g>
+ </g>
+ <g font-size="12" stroke="none" fill="#ccc">
+ <text x="20" y="283">stroke-linejoin:</text>
+ <text x="20" y="295">red = wrong</text>
+ </g>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-207-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-207-t.svg
new file mode 100644
index 0000000000..9599d36ccb
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-stroke-207-t.svg
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="DOH" desc="Centering of stroke on the outline of rectangles." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-stroke-207-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Centering of stroke on the outline of rectangles.
+ </p>
+ <p>
+ The main indication for a failed test is the appearence of something red.
+ </p>
+ <p>
+ The width and position of the stroke centered on the outline of a rectangle is tested with four stroked rectangles,
+ one is the thin black stroked test frame rectangle, the second one a large blue rectangle, the third a rectangle
+ with rounded corners, looking like a circle and the fourth a small square.
+ </p>
+ <p>
+ The correct position is tested by a comparsion with several filled rectangles in the background or in the fourth case
+ covering the test square completely. The parts of the background covered with the blue test rectangles are filled red,
+ respectively the test square is stroked red too.
+ Therefore if something red gets visible, the position of the stroke of
+ the related test rectangle is wrong.
+ </p>
+ <p>
+ According to the conformance criteria all visual rendering should be accurate to within one px unit to the mathematically
+ correct result. Therefore possible residuals from the red background parts have to be in this
+ range of accuracy to pass the test.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-stroke-207-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g>
+ <title>background of filled rectangles indicating the position of the stroked test rectangles</title>
+ <rect x="0" y="0" width="480" height="360" fill="#fff" />
+ <rect x="0.5" y="0.5" width="479" height="359" fill="#f00" />
+ <rect x="1.5" y="1.5" width="477" height="357" fill="#fff" />
+ <rect x="60" y="40" width="360" height="240" fill="#f00" />
+ <rect x="80" y="60" width="320" height="200" fill="#fff" />
+ <rect x="119.6" y="109.6" width="100.8" height="100.8" rx="200" fill="#f00" />
+ <rect x="140.4" y="130.4" width="59.2" height="59.2" ry="200" fill="#fff" />
+ <rect x="260" y="110" width="100" height="100" fill="#a00" />
+ <rect x="280" y="130" width="60" height="60" fill="#fff" />
+ </g>
+ <g stroke="#00f" stroke-width="20" fill="none">
+ <rect x="70" y="50" width="340" height="220">
+ <title>large blue stroked test rectangle</title>
+ </rect>
+ <rect x="130" y="120" width="80" height="80" ry="40" rx="40" stroke-width="20.8">
+ <title>small blue stroked test rectangle with rounded corners looking like a circle</title>
+ </rect>
+ </g>
+
+
+
+ <rect x="270" y="120" width="80" height="80" stroke="#f00" stroke-width="20" fill="none">
+ <title>small red stroked test rectangle</title>
+ </rect>
+ <g stroke="none" fill="#00f">
+ <title>small blue rectangles to cover the small red stroked test rectangle</title>
+ <rect x="260" y="110" width="80" height="20" />
+ <rect x="340" y="110" width="20" height="80" />
+ <rect x="280" y="190" width="80" height="20" />
+ <rect x="260" y="130" width="20" height="80" />
+ </g>
+
+
+ <g font-size="12" stroke="none" fill="#ccc">
+ <text x="340" y="315">position of the stroke:</text>
+ <text x="340" y="328">red = wrong</text>
+ </g>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-202-t.svg
new file mode 100644
index 0000000000..b316a3435f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-202-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events"
+ viewport-fill="yellow" viewport-fill-opacity="0.5">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ASl" desc="Viewport-fill on transparent image" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-vfill-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests viewport-fill and viewport-fill-opacity.
+ The image should show the correct viewport-fill (green).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-vfill-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <rect x="1" y="90" width="478" height="180" stroke="black" fill="red" fill-opacity="0.3"/>
+ <image xlink:href="../images/viewport-fill-img.png" x="64" y="64" width="104" height="112" transform="scale(0.5) translate(-32, -32)" viewport-fill="green"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-204-t.svg
new file mode 100644
index 0000000000..f57b6974e2
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-204-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events"
+ viewport-fill="yellow" viewport-fill-opacity="0.0">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ASl" desc="Viewport fill and opacity inheritance" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: paint-vfill-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test on viewport-fill and viewport-fill-opacity. viewport-fill-opacity is set to 0.0 so the set viewport-fill
+ color should not be visible. The image has its viewport-fill set to "inherit" and viewport-fill-opacity to 1.0
+ so the image should show with a yellow viewport-fill and full opacity.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-vfill-204-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18" viewport-fill="inherit">
+ <rect x="1" y="90" width="478" height="180" stroke="black" fill="red" fill-opacity="0.3"/>
+ <image xlink:href="../images/viewport-fill-img.png" x="64" y="64" width="104" height="112" viewport-fill="inherit" viewport-fill-opacity="1.0"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-205-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-205-t.svg
new file mode 100644
index 0000000000..a5fdddf48a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paint-vfill-205-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events"
+ viewport-fill="yellow" viewport-fill-opacity="0.5">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ASl" desc="Viewport fill and opacity" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: paint-vfill-205-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests viewport-fill and viewport-fill-opacity.
+ Output should match reference image.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paint-vfill-205-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <rect x="1" y="90" width="478" height="180" stroke="black" fill="red" fill-opacity="0.3"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-01-t.svg
new file mode 100644
index 0000000000..f7fb68e9ed
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-01-t.svg
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,AE" owner="LH" desc="Test that the viewer has the basic capability to handle the 'path' element and data (d) attribute in combination with the cubic Bezier curveto, both regular and shorthand/smooth forms - C, c, S, s (along with Mm and Zz)." status="accepted"
+ approved="yes"
+ version="$Revision: 1.13 $" testname="$RCSfile: paths-data-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that the viewer has the basic capability to handle the 'path' element and its data (d) attribute in combination with the cubic Bezier curveto commands, C, c, S, s (plus Mm and Zz).</p>
+ <p>There are 8 subtests, each composed from the cubic Bezier path commands per the label by the subtest. On-curve control points (i.e., the curve position) are marked by small blue squares. Subtests are filled, or stroked, or both, using simple style properties and colors.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansISO-8859-1" unicode-range="U+0-FF">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans-ISO-8859-1.svg#iso_8859_1" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- First Curve "X" that has subpath utilizing M, C, S, m, c, & s ======== -->
+ <!-- ====================================================================== -->
+ <text font-size="12" x="240" y="14" text-anchor="middle">Cubic bézier curves drawn with commands:</text>
+ <path xml:id="X_curve_MCSmcs" fill="#FF0000" stroke="#00C000" d=" M 210 130 C 145 130 110 80 110 80 S 75 25 10 25 m 0 105 c 65 0 100 -50 100 -50 s 35 -55 100 -55 " />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ===================================== -->
+ <!-- ====================================================================== -->
+ <rect x="208" y="128" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="108" y="78" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="8" y="23" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="8" y="128" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="108" y="78" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="208" y="23" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="5" y="82">M,C,S,m,c,s</text>
+ <!-- ====================================================================== -->
+ <!-- Infinity using M, c, c, c, C & z ===================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Infinity_McccCz" fill="none" stroke="#000000" d=" M 240 90 c 0 30 7 50 50 0 c 43 -50 50 -30 50 0 c 0 83 -68 -34 -90 -30 C 240 60 240 90 240 90 z " />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="238" y="88" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="288" y="88" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="338" y="88" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="248" y="58" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="253" y="50">M,c,c,c,C,z</text>
+ <!-- ====================================================================== -->
+ <!-- Horizontal line utilizing M, C & Z =================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Line_MCZ" fill="none" stroke="#000000" d="M80 170 C100 170 160 170 180 170Z" />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="78" y="168" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="178" y="168" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="110" y="190">M,C,Z</text>
+ <!-- ====================================================================== -->
+ <!-- Inverted V using M, C, c & Z ========================================= -->
+ <!-- ====================================================================== -->
+ <path xml:id="Inv_V_MCcZ" fill="#00C000" stroke="none" d="M5 260 C40 260 60 175 55 160 c -5 15 15 100 50 100Z" />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="3" y="258" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="53" y="158" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="103" y="258" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="85" y="220">M,C,c,Z</text>
+ <!-- ====================================================================== -->
+ <!-- Remembrance Ribbon using m, c & s ==================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Rem_Rib_mcs" fill="none" stroke="#000000" d="m 200 260 c 50 -40 50 -100 25 -100 s -25 60 25 100 " />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="198" y="258" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="223" y="158" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="248" y="258" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="165" y="210">m,c,s</text>
+ <!-- ====================================================================== -->
+ <!-- 90 degree arc using M & C ============================================ -->
+ <!-- ====================================================================== -->
+ <path xml:id="Arc_MC" fill="#0000FF" stroke="#000000" d=" M 360 100 C 420 90 460 140 450 190" />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="358" y="98" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="448" y="188" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="360" y="150">M,C</text>
+ <!-- ====================================================================== -->
+ <!-- Circle using M, c, s, s, s & z ======================================= -->
+ <!-- ====================================================================== -->
+ <path xml:id="Circle_Mcssz" fill="#FFFF00" stroke="#000000" d="M360 210 c 0 20 -16 36 -36 36 s -36 -16 -36 -36 s 16 -36 36 -36 s 36 16 36 36 z " />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="358" y="208" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="322" y="244" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="286" y="208" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="322" y="172" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="290" y="265">M,c,s,s,s,z</text>
+ <!-- ====================================================================== -->
+ <!-- Inverted horseshoe using m, c & z ==================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Horseshoe_Mcs" fill="#F0F0F0" stroke="#FF0000" d="m 360 325 c -40 -60 95 -100 80 0 z " />
+ <!-- ====================================================================== -->
+ <!-- Markers for path control points ====================================== -->
+ <!-- ====================================================================== -->
+ <rect x="358" y="323" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <rect x="438" y="323" width="4" height="4" fill="#4A83FF" stroke="none" />
+ <text font-size="12" x="380" y="340">m,c,z</text>
+ </g>
+ <g font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.13 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansISO-8859-1,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-02-t.svg
new file mode 100644
index 0000000000..7e39904794
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-02-t.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,AE" owner="LH" desc="Test that the viewer has the basic capability to handle the 'path' element and data (d) attribute in combination with the quadratic Bezier curveto commands, both regular and shorthand/smooth forms - Q, q, T, t (along with Mm and Zz)." status="accepted"
+ approved="yes"
+ version="$Revision: 1.13 $" testname="$RCSfile: paths-data-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test that the viewer has the basic capability to handle the 'path' element and its data (d) attribute in combination with the quadratic Bezier curveto commands, Q, q, T, t (plus Mm and Zz).</p>
+ <p>There are 7 subtests, each composed from the quadric Bezier path commands per the label by the subtest. On-curve control points (i.e., the curve position) are marked by small colored squares. Subtests are filled, or stroked, or both, using simple style properties and colors.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansISO-8859-1" unicode-range="U+0-FF">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans-ISO-8859-1.svg#iso_8859_1" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Quadratic bézier curves drawn with commands:</text>
+ <!-- ====================================================================== -->
+ <!-- Quad Bezier with sub-path using M, Q, M, q, & z ====================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Bez_MQMqz" fill="none" stroke="#0000FF" stroke-width="3" d="M 15 20 Q 30 120 130 30 M 180 80 q -75 -100 -163 -60z" />
+ <text font-size="12" x="80" y="86">M,Q,M,q,z</text>
+ <rect x="13" y="18" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="128" y="28" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="178" y="78" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="15" y="18" width="4" height="4" fill="#00C000" stroke="none" />
+ <!-- ====================================================================== -->
+ <!-- Quad Bezier with sub-path using m, q, z, m, q, & z =================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Bez_fill_MQzmqz" fill="#FFFF00" stroke="#CF0000" d="M372 130Q272 50 422 10zm70 0q50-150-80-90z" />
+ <text font-size="12" x="352" y="150">m,q,z,m,q,z</text>
+ <rect x="370" y="128" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="420" y="8" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="440" y="128" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="360" y="38" width="4" height="4" fill="#0000FF" stroke="none" />
+ <!-- ====================================================================== -->
+ <!-- Simple Bezier using M, Q, & Z ======================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Bez_stroke_MQz" fill="none" stroke="#00FFFF" d="M224 103Q234 -12 304 33Z" />
+ <text font-size="12" x="192" y="36">M,Q,Z</text>
+ <rect x="222" y="101" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="302" y="31" width="4" height="4" fill="#0000FF" stroke="none" />
+ <!-- ====================================================================== -->
+ <!-- Tri Bezier using M, Q, T, Q, & z ===================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Tri_MQTQz" fill="#00C000" stroke="#000000" d="M208 168Q258 268 308 168T258 118Q128 88 208 168z" />
+ <text font-size="12" x="308" y="188">M,Q,T,Q,z</text>
+ <rect x="206" y="166" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="306" y="166" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="256" y="116" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="206" y="206" width="4" height="4" fill="#0000FF" stroke="none" />
+ <!-- ====================================================================== -->
+ <!-- Double Bezier using M, Q, Q, & z ===================================== -->
+ <!-- ====================================================================== -->
+ <path xml:id="Inv_V_MCcZ" fill="#CF0000" stroke="none" d=" M 60 100 Q -40 150 60 200 Q 160 150 60 100 z " />
+ <text font-size="12" x="80" y="200">M,Q,Q,z</text>
+ <rect x="58" y="98" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="58" y="198" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="58" y="98" width="4" height="4" fill="#0000FF" stroke="none" />
+ <!-- ====================================================================== -->
+ <!-- Sin Wave using M, q, t, t, t, t, & z ================================ -->
+ <!-- ====================================================================== -->
+ <path xml:id="Sin_Mqttttz" fill="none" stroke="#FF0000" d="M240 296q25-100 47 0t47 0t47 0t47 0t47 0z" />
+ <text font-size="12" x="380" y="236">M,q,t,t,t,t,z</text>
+ <rect x="238" y="294" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="285" y="294" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="332" y="294" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="379" y="294" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="426" y="294" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="473" y="294" width="4" height="4" fill="#0000FF" stroke="none" />
+ <!-- ====================================================================== -->
+ <!-- Double Spade using M, q, Q, q, Q, & z ================================ -->
+ <!-- ====================================================================== -->
+ <path xml:id="Dbl_spd_MCcZ" fill="#0000C0" stroke="#00CF00" stroke-width="2" d="M172 193q-100 50 0 50Q72 243 172 293q100 -50 0 -50Q272 243 172 193z" />
+ <text font-size="12" x="48" y="280">M,q,Q,q,Q,z</text>
+ <rect x="170" y="191" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="170" y="241" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="170" y="291" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="170" y="241" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="170" y="191" width="4" height="4" fill="#FF0000" stroke="none" />
+ </g>
+ <g font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.13 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansISO-8859-1,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-04-t.svg
new file mode 100644
index 0000000000..f084348ebc
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-04-t.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,AE" owner="LH" desc="Test that viewer has the basic capability to handle the &lt;path&gt; element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z." status="accepted"
+ approved="yes"
+ version="$Revision: 1.12 $" testname="$RCSfile: paths-data-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the 'path' element, and its data attribute (d) in combination with the straight-line path commands. Two pairs of concentric equilateral triangles are drawn using respectively M,L,Z and m,l,z. The shapes are identical, with one stroked and one filled. The fill-mode default of "even-odd" means that the inner triangle is hollow.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Lines drawn with commands (absolute coordinates):</text>
+ <!-- ====================================================================== -->
+ <!-- First Group of Triangles using M, L & Z commands ===================== -->
+ <!-- ====================================================================== -->
+ <g transform="scale(1.8)">
+ <text font-size="12" x="125" y="30" text-anchor="middle">M,L,L,L,Z,</text>
+ <text font-size="12" x="125" y="46" text-anchor="middle">subpath</text>
+ <text font-size="12" x="125" y="61" text-anchor="middle">M,L,L,L,Z</text>
+ <path xml:id="Triangle_stroke_MLZ" fill="none" stroke="#000000" d=" M 62.00000 56.00000 L 113.96152 146.00000 L 10.03848 146.00000 L 62.00000 56.00000 Z M 62.00000 71.00000 L 100.97114 138.50000 L 23.02886 138.50000 L 62.00000 71.00000 Z " />
+ <rect x="60.00000" y="54.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="111.96152" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="8.03848" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="60.00000" y="69.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="98.97114" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="21.02886" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <text font-size="12" x="42" y="162">stroked</text>
+ <path xml:id="Triangle_fill_MLZ" fill="#FF0000" stroke="none" fill-rule="evenodd" d=" M 177.00000 56.00000 L 228.96152 146.00000 L 125.03848 146.00000 L 177.00000 56.00000 Z M 177.00000 71.00000 L 215.97114 138.50000 L 138.02886 138.50000 L 177.00000 71.00000 Z " />
+ <rect x="175.00000" y="54.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="226.96152" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="123.03848" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="175.00000" y="69.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="213.97114" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="136.02886" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <text font-size="12" x="162" y="162">filled</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.12 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-05-t.svg
new file mode 100644
index 0000000000..f22ba0d745
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-05-t.svg
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,AE" owner="LH" desc="Test that viewer has the basic capability to handle the &lt;path&gt; element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z." status="accepted"
+ approved="yes"
+ version="$Revision: 1.13 $" testname="$RCSfile: paths-data-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the 'path' element, and its data attribute (d) in combination with the straight-line path commands. Two pairs of concentric equilateral triangles are drawn using respectively M,L,Z and m,l,z. The shapes in each pair are identical, with one stroked and one filled. The fill-mode default of "even-odd" means that the inner triangle is hollow.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Lines drawn with commands (relative coordinates):</text>
+ <!-- ====================================================================== -->
+ <!-- Second Group of Triangles using m, l & z commands===================== -->
+ <!-- ====================================================================== -->
+ <g transform="scale(1.8) translate(0, -150)">
+ <text font-size="12" x="125" y="180" text-anchor="middle">m,l,l,l,z,</text>
+ <text font-size="12" x="125" y="194" text-anchor="middle">subpath</text>
+ <text font-size="12" x="125" y="208" text-anchor="middle">m,l,l,l,z</text>
+ <path xml:id="Triangle_stroke_mlz" fill="none" stroke="#000000" d=" m 62.00000 190.00000 l 51.96152 90.00000 l -103.92304 0.00000 l 51.96152 -90.00000 z m 0.00000 15.00000 l 38.97114 67.50000 l -77.91228 0.00000 l 38.97114 -67.50000 z " />
+ <rect x="60.00000" y="188.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="111.96152" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="8.03848" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="60.00000" y="203.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="98.97114" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="21.02886" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <path xml:id="Triangle_fill_mlz" fill="#00C000" stroke="none" fill-rule="evenodd" d=" m 177.00000 190.00000 l 51.96152 90.00000 l -103.92304 0.00000 l 51.96152 -90.00000 z m 0.00000 15.00000 l 38.97114 67.50000 l -77.91228 0.00000 l 38.97114 -67.50000 z " />
+ <rect x="175.00000" y="188.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="226.96152" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="123.03848" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="175.00000" y="203.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="213.97114" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="136.02886" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.13 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-06-t.svg
new file mode 100644
index 0000000000..a2863c221a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-06-t.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,AE" owner="LH" desc="Test that viewer has the basic capability to handle the &lt;path&gt; element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z." status="accepted"
+ approved="yes"
+ version="$Revision: 1.12 $" testname="$RCSfile: paths-data-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the 'path' element, and its data attribute (d) in combination with the straight-line path commands. Two pairs of staircase figures are drawn using respectively M,H,V,Z and m,h,v,z. The shapes in each pair are identical, with one stroked and one filled.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Horizontal and Vertical Lines drawn with commands (absolute coordinates):</text>
+ <g transform="scale(1.8) translate(-200, 0)">
+ <!-- ====================================================================== -->
+ <!-- First Group of Stairs using M, H, V & Z commands====================== -->
+ <!-- ====================================================================== -->
+ <text font-size="12" x="288" y="30">M,H,V,H,</text>
+ <text font-size="12" x="288" y="46">V,H,V,H,</text>
+ <text font-size="12" x="304" y="62">V,Z</text>
+ <path xml:id="Stairs_stroke_MHVZ" fill="none" stroke="#000000" d=" M 240.00000 56.00000 H 270.00000 V 86.00000 H 300.00000 V 116.00000 H 330.00000 V 146.00000 H 240.00000 V 56.00000 Z " />
+ <rect x="238.00000" y="54.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="268.00000" y="54.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="268.00000" y="84.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="298.00000" y="84.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="298.00000" y="114.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="328.00000" y="114.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="328.00000" y="144.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="238.00000" y="144.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <path xml:id="Stairs_fill_MHVZ" fill="#0000FF" stroke="none" d=" M 350.00000 56.00000 H 380.00000 V 86.00000 H 410.00000 V 116.00000 H 440.00000 V 146.00000 H 350.00000 V 56.00000 Z " />
+ <rect x="348.00000" y="54.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="378.00000" y="54.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="378.00000" y="84.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="408.00000" y="84.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="408.00000" y="114.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="438.00000" y="114.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="438.00000" y="144.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <rect x="348.00000" y="144.00000" width="4" height="4" fill="#FFFF00" stroke="none" />
+ <!-- ====================================================================== -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.12 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-07-t.svg
new file mode 100644
index 0000000000..6449e60f76
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-07-t.svg
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,AE" owner="LH" desc="Test that viewer has the basic capability to handle the &lt;path&gt; element and data (d) attribute in combination with the moveto, lineto, and closepath commands - M, L, Z, m, l, and z." status="accepted"
+ approved="yes"
+ version="$Revision: 1.12 $" testname="$RCSfile: paths-data-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the 'path' element, and its data attribute (d) in combination with the straight-line path commands. Two pairs of staircase figures are drawn using respectively M,H,V,Z and m,h,v,z. The shapes in each pair are identical, with one stroked and one filled.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-07-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Horizontal and Vertical Lines drawn with commands (relative coordinates):</text>
+ <g transform="scale(1.8) translate(-200, -150)">
+ <!-- ====================================================================== -->
+ <!-- Second Group of Stairs using m, h, v & z commands====================== -->
+ <!-- ====================================================================== -->
+ <text font-size="12" x="288" y="180">m,h,v,h</text>
+ <text font-size="12" x="288" y="194">v,h,v,h</text>
+ <text font-size="12" x="304" y="208">v,z</text>
+ <path xml:id="Stairs_stroke_mhvz" fill="none" stroke="#000000" d=" m 240.00000 190.00000 h 30.00000 v 30.00000 h 30.00000 v 30.00000 h 30.00000 v 30.00000 h -90.00000 v -90.00000 z " />
+ <rect x="238.00000" y="188.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="268.00000" y="188.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="268.00000" y="218.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="298.00000" y="218.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="298.00000" y="248.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="328.00000" y="248.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="328.00000" y="278.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="238.00000" y="278.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <path xml:id="Stairs_fill_mhvz" fill="#FFFF00" stroke="none" d=" m 350.00000 190.00000 h 30.00000 v 30.00000 h 30.00000 v 30.00000 h 30.00000 v 30.00000 h -90.00000 v -90.00000 z " />
+ <rect x="348.00000" y="188.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="378.00000" y="188.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="378.00000" y="218.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="408.00000" y="218.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="408.00000" y="248.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="438.00000" y="248.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="438.00000" y="278.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ <rect x="348.00000" y="278.00000" width="4" height="4" fill="#0000FF" stroke="none" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.12 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-08-t.svg
new file mode 100644
index 0000000000..ff358eaf46
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-08-t.svg
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN,AN" owner="SH" desc="tests support for moveto and closepath path commands" status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: paths-data-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the 'path' element, and its data attribute (d) in combination with the straight-line path commands. Two pairs of concentric equilateral triangles are drawn using M and Z. No L commands are used in this test as they are implied after an M or Z command. The shapes are identical, with one stroked and one filled. The fill-mode default of "even-odd" means that the inner triangle is hollow.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-08-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- First Group of Triangles using M & Z commands ======================== -->
+ <!-- ====================================================================== -->
+ <text font-size="12" x="240" y="14" text-anchor="middle">Lines drawn with commands (testing implicit followup of 'L' commands):</text>
+ <text font-size="24" x="180" y="64">M and Z</text>
+ <g transform="scale(1.8)">
+ <path xml:id="Triangle_stroke_MZ" fill="none" stroke="#000000" d=" M 62.00000 56.00000 113.96152 146.00000 10.03848 146.00000 62.00000 56.00000 Z M 62.00000 71.00000 100.97114 138.50000 23.02886 138.50000 62.00000 71.00000 Z " />
+ <rect x="60.00000" y="54.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="111.96152" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="8.03848" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="60.00000" y="69.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="98.97114" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="21.02886" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <text font-size="12" x="42" y="162">stroked</text>
+ <path xml:id="Triangle_fill_MZ" fill="#FF0000" stroke="none" fill-rule="evenodd" d=" M 177.00000 56.00000 228.96152 146.00000 125.03848 146.00000 177.00000 56.00000 Z M 177.00000 71.00000 215.97114 138.50000 138.02886 138.50000 177.00000 71.00000 Z " />
+ <rect x="175.00000" y="54.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="226.96152" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="123.03848" y="144.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="175.00000" y="69.00000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="213.97114" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <rect x="136.02886" y="136.50000" width="4" height="4" fill="#00C000" stroke="none" />
+ <text font-size="12" x="162" y="162">filled</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-09-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-09-t.svg
new file mode 100644
index 0000000000..c3824cef24
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-09-t.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN,AN" owner="SH" desc="tests moveto and closepath path commands" status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: paths-data-09-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify the basic capability to handle the 'path' element, and its data attribute (d) in combination with the straight-line path commands. Two pairs of concentric equilateral triangles are drawn using m and z. No l commands are used in this test as they are implied after an m or z command. The shapes are identical, with one stroked and one filled. The fill-mode default of "even-odd" means that the inner triangle is hollow.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-09-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Second Group of Triangles using m & z commands ===================== -->
+ <!-- ====================================================================== -->
+ <text font-size="12" x="240" y="14" text-anchor="middle">Lines drawn with commands (testing implicit followup of 'l' commands):</text>
+ <text font-size="24" x="180" y="64">m and z</text>
+ <g transform="scale(1.8) translate(0, -150)">
+ <path xml:id="Triangle_stroke_mz" fill="none" stroke="#000000" d=" m 62.00000 190.00000 51.96152 90.00000 -103.92304 0.00000 51.96152 -90.00000 z m 0.00000 15.00000 38.97114 67.50000 -77.91228 0.00000 38.97114 -67.50000 z " />
+ <rect x="60.00000" y="188.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="111.96152" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="8.03848" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="60.00000" y="203.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="98.97114" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="21.02886" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <path xml:id="Triangle_fill_mz" fill="#00C000" stroke="none" fill-rule="evenodd" d=" m 177.00000 190.00000 51.96152 90.00000 -103.92304 0.00000 51.96152 -90.00000 z m 0.00000 15.00000 38.97114 67.50000 -77.91228 0.00000 38.97114 -67.50000 z " />
+ <rect x="175.00000" y="188.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="226.96152" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="123.03848" y="278.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="175.00000" y="203.00000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="213.97114" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ <rect x="136.02886" y="270.50000" width="4" height="4" fill="#FF0000" stroke="none" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-10-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-10-t.svg
new file mode 100644
index 0000000000..03231dfc71
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-10-t.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN,AN" owner="SH" desc="tests paths with closepath vs. same start and end point" status="accepted"
+ approved="yes"
+ version="$Revision: 1.11 $" testname="$RCSfile: paths-data-10-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify that the viewer renders the line caps and line joins for open and closed paths properly. Verify that the open triangular paths are stroked differently at ends of the path than they are at their intermediate corners. In contrast, the corners of a closed path should all appear the same.</p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-10-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing correct stroking with open and closed paths</text>
+ <g transform="scale(0.9),translate(20,30)">
+ <g transform="translate(10,10)">
+ <text font-size="18" x="10" y="20">open</text>
+ <text font-size="18" x="10" y="38">join=round</text>
+ <text font-size="18" x="10" y="56">cap=butt</text>
+ <text font-size="18" x="10" y="74">M,L</text>
+ <g transform="translate(115,0)">
+ <path xml:id="triangle-01" fill="green" stroke="red" stroke-width="15" stroke-linecap="butt" stroke-linejoin="round" d="M 100 0 L 100 80 0 40 100 0" />
+ </g>
+ </g>
+ <g transform="translate(10,115)">
+ <text font-size="18" x="10" y="20">open</text>
+ <text font-size="18" x="10" y="38">join=bevel</text>
+ <text font-size="18" x="10" y="56">cap=round</text>
+ <text font-size="18" x="10" y="74">m,l</text>
+ <g transform="translate(115,0)">
+ <path xml:id="triangle-02" fill="green" stroke="red" stroke-width="15" stroke-linecap="round" stroke-linejoin="bevel" d="m 100 0 l 0 80 -100 -40 100 -40" />
+ </g>
+ </g>
+ <g transform="translate(10,220)">
+ <text font-size="18" x="10" y="20">open</text>
+ <text font-size="18" x="10" y="38">join=miter</text>
+ <text font-size="18" x="10" y="56">cap=square</text>
+ <text font-size="18" x="10" y="74">M,L</text>
+ <g transform="translate(115,0)">
+ <path xml:id="triangle-03" fill="green" stroke="red" stroke-width="15" stroke-linecap="square" stroke-linejoin="miter" d="M 100 0 L 100 80 0 40 100 0" />
+ </g>
+ </g>
+ <g transform="translate(250,10)">
+ <text font-size="18" x="125" y="20">closed</text>
+ <text font-size="18" x="125" y="38">join=round</text>
+ <text font-size="18" x="125" y="56">cap=butt</text>
+ <text font-size="18" x="125" y="74">M,L,Z</text>
+ <g transform="translate(0,0)">
+ <path xml:id="triangle-04" fill="green" stroke="red" stroke-width="15" stroke-linecap="butt" stroke-linejoin="round" d="M 0 0 L 100 40 0 80 Z" />
+ </g>
+ </g>
+ <g transform="translate(250,115)">
+ <text font-size="18" x="125" y="20">closed</text>
+ <text font-size="18" x="125" y="38">join=bevel</text>
+ <text font-size="18" x="125" y="56">cap=round</text>
+ <text font-size="18" x="125" y="74">m,l,z</text>
+ <g transform="translate(0,0)">
+ <path xml:id="triangle-05" fill="green" stroke="red" stroke-width="15" stroke-linecap="round" stroke-linejoin="bevel" d="m 0 0 l 100 40 -100 40 z" />
+ </g>
+ </g>
+ <g transform="translate(250,220)">
+ <text font-size="18" x="125" y="20">closed</text>
+ <text font-size="18" x="125" y="38">join=miter</text>
+ <text font-size="18" x="125" y="56">cap=square</text>
+ <text font-size="18" x="125" y="74">M,L,Z</text>
+ <g transform="translate(0,0)">
+ <path xml:id="triangle-06" fill="green" stroke="red" stroke-width="15" stroke-linecap="square" stroke-linejoin="miter" d="M 0 0 L 100 40 0 80 Z" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.11 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-12-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-12-t.svg
new file mode 100644
index 0000000000..1357183abc
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-12-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED,AN" owner="CN" desc="Test using multiple coord sets to build a polybézier, and implicit values for initial S." status="accepted"
+ approved="yes"
+ version="$Revision: 1.11 $" testname="$RCSfile: paths-data-12-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test using multiple coord sets to build a polybézier, and implicit values for initial S.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-12-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansISO-8859-1" unicode-range="U+0-FF">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans-ISO-8859-1.svg#iso_8859_1" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing cubic bézier curves and implicit values for 'S':</text>
+ <text font-size="24" x="220" y="64">M,C,S</text>
+ <text font-size="24" x="220" y="250">M,S</text>
+ <!-- Use multiple coord sets to build a polybézier-->
+ <path fill="none" stroke="red" stroke-width="3" d="M 100 100 C 100 20 200 20 200 100 S 300 180 300 100" />
+ <rect x="100" y="100" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="200" y="100" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="300" y="100" width="4" height="4" fill="blue" stroke="none" />
+ <!-- Test if S not preceeded by either C or S , first control point is coincident with the current point.-->
+ <path fill="none" stroke="red" stroke-width="3" d="M 100 250 S 200 200 200 250 300 300 300 250" />
+ <rect x="100" y="250" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="200" y="200" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="200" y="250" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="200" y="300" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="300" y="300" width="4" height="4" fill="blue" stroke="none" />
+ <rect x="300" y="250" width="4" height="4" fill="blue" stroke="none" />
+ </g>
+ <g font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.11 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansISO-8859-1,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-13-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-13-t.svg
new file mode 100644
index 0000000000..32abd1462b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-13-t.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED,AN" owner="CN" desc="Test multiple coridinates for V and H" status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: paths-data-13-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test multiple coordinates for V and H. There should be one horizontal red line and one vertical blue line.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-13-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing implicit followup of 'V' and 'H' commands):</text>
+ <text font-size="24" x="180" y="64">M,H</text>
+ <text font-size="24" x="260" y="230">M,V</text>
+ <!-- Use multiple coords to H, should get a straight horizontal line -->
+ <path stroke="red" stroke-width="5" d=" M 240.00000 56.00000 H 270.00000 300.00000 320.00000 400.00000 " />
+ <!-- Use multiple coords to V, should get a straight vertical line -->
+ <path stroke="blue" stroke-width="5" d=" M 240.00000 156.00000 V 180.00000 200.00000 260.00000 300.00000 " />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-14-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-14-t.svg
new file mode 100644
index 0000000000..c2f852ecd4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-14-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED,AN" owner="CN" desc="Test implicit values for moveto." status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: paths-data-14-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test implicit values for moveto. If the first command is 'm' it should be taken as an absolute moveto, plus implicit lineto.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-14-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing implicit followup of 'l/L' commands succeeding 'm/M', commands:</text>
+ <text font-size="24" x="110" y="75" text-anchor="middle">m,z,m,z</text>
+ <text font-size="24" x="315" y="75" text-anchor="middle">M,Z,M,Z</text>
+ <g transform="scale(1.8)">
+ <!-- If the first command is 'm' it should be taken as an absolute moveto, plus implicit lineto. -->
+ <path fill="none" stroke="#000000" d=" m 62.00000 56.00000 51.96152 90.00000 -103.92304 0.00000 51.96152 -90.00000 z m 0.00000 15.00000 38.97114 67.50000 -77.91228 0.00000 38.97114 -67.50000 z " />
+ <!-- Test implicit lineto. -->
+ <path fill="#FF0000" stroke="none" fill-rule="evenodd" d=" M 177.00000 56.00000 228.96152 146.00000 125.03848 146.00000 177.00000 56.00000 Z M 177.00000 71.00000 215.97114 138.50000 138.02886 138.50000 177.00000 71.00000 Z " />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-15-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-15-t.svg
new file mode 100644
index 0000000000..c685e0bd36
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/paths-data-15-t.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,ED" owner="CN" desc="Test using multiple coord sets to build a polybézier, then T with no preceeding Q or T." status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: paths-data-15-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test using multiple coord sets to build a polybézier, then T with no preceding Q or T.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labeling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: paths-data-15-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansISO-8859-1" unicode-range="U+0-FF">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans-ISO-8859-1.svg#iso_8859_1" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing implement followup of commands for quadratic bézier curves</text>
+ <text font-size="24" x="210" y="120">M,Q</text>
+ <text font-size="24" x="200" y="190">M,T</text>
+ <g transform="scale(1.8) translate(20 50)">
+ <!-- Use multiple coord sets to build a polybezier-->
+ <path fill="none" stroke="red" stroke-width="3" d="M 20 20 Q 50 10 80 20 110 30 140 20 170 10 200 20" />
+ <!-- Test if T not preceded by either Q or T , control point should be coincident with the current point.-->
+ <path fill="none" stroke="blue" stroke-width="3" d="M 20 50 T 50 50 80 50" />
+ <rect x="20" y="50" width="4" height="4" fill="#0000FF" stroke="black" />
+ <rect x="50" y="50" width="4" height="4" fill="#0000FF" stroke="black" />
+ <rect x="80" y="50" width="4" height="4" fill="#0000FF" stroke="black" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansISO-8859-1,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansISO-8859-1,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g> -->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-01-t.svg
new file mode 100644
index 0000000000..5a280242c1
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-01-t.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates that shapes can be both filled." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-elems-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies that shapes can be filled.</p>
+ <p>There is one pair of octagons. These are filled.</p>
+ <p>The rendered image should match the reference image except for the text which may show minor layout differences.</p>
+ <p>The test uses the 'path' element, as well as basic fill (solid primary colors), stroke (primary color 1-pixel and wide lines), font-family (Arial) and font-size properties - the common prerequisites.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-elems-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- First, fill shape with two different colors -->
+ <!-- ====================================================================== -->
+ <g transform="translate(30, 80)">
+ <g fill="red">
+ <path d="M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z" />
+ </g>
+ <g fill="black" transform="translate(200, 0)">
+ <path d="M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z" />
+ </g>
+ <text x="130" y="-30" font-size="28">Shape fill</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-02-t.svg
new file mode 100644
index 0000000000..8c4c6accc4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-02-t.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg [
+ <!ENTITY shape "<path d='M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z' />">
+]>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates that shapes can be both stroked." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-elems-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies that shapes can be stroked.</p>
+ <p>There is one pair of octagons. These are stroked.</p>
+ <p>The rendered image should match the reference image except for the text which may show minor layout differences.</p>
+ <p>The test uses the 'rect' element, as well as basic fill (solid primary colors), stroke (primary color 1-pixel and wide lines), font-family (Arial) and font-size properties - the common prerequisites.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-elems-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Now, stroke shape with two different stroke width and color -->
+ <!-- ====================================================================== -->
+ <g transform="translate(30, 80)">
+ <g fill="none" stroke="red" stroke-width="3">
+ <path d="M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z" />
+ </g>
+ <g fill="none" stroke="black" stroke-width="9" transform="translate(200, 0)">
+ <path d="M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z" />
+ </g>
+ <text x="110" y="-30" font-size="28">Shape stroke</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-03-t.svg
new file mode 100644
index 0000000000..4900b63850
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-03-t.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg [
+ <!ENTITY shape "<path d='M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z' />">
+]>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates that shapes can be both filled and stroked." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-elems-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies that shapes can be filled, stroked and the order of filling and stroking.</p>
+ <p>There is one pair of octagons. These are filled plus stroked.</p>
+ <p>The rendered image should match the reference image except for the text which may show minor layout differences.</p>
+ <p>The test uses the 'rect' element, as well as basic fill (solid primary colors), stroke (primary color 1-pixel and wide lines), font-family (Arial) and font-size properties - the common prerequisites.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-elems-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Now, fill and stroke. The fill should happen first -->
+ <!-- ====================================================================== -->
+ <g transform="translate(30, 80)">
+ <g fill="yellow" stroke="red" stroke-width="8">&shape;</g>
+ <g stroke="black" fill="blue" stroke-width="8" transform="translate(200, 0)">&shape;</g>
+ <text x="70" y="-30" font-size="28">Shape fill and stroke</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-06-t.svg
new file mode 100644
index 0000000000..64c5863c41
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-06-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates that text can be both filled." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-elems-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies that text can be filled. The test shows two 'A' characters that are filled and not stroked.</p>
+ <p>The rendered image should match the reference image except for the text which may show minor layout differences.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-elems-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="MyFont" horiz-adv-x="416">
+ <font-face font-family="MyFont" units-per-em="1000" panose-1="2 0 0 6 3 0 0 2 0 4" ascent="700" descent="-127" />
+ <missing-glyph horiz-adv-x="500" />
+ <glyph unicode="A" glyph-name="A" horiz-adv-x="505" d="M73 700L5 0H155L170 165H335L350 0H500L432 700H73ZM183 315L205 550H300L322 315H183Z" />
+ <glyph unicode="B" glyph-name="B" horiz-adv-x="550" d="M40 700V0H510V280L423 350L510 420V700H40ZM360 550V471L306 420H190V550H360ZM190 280H306L360 229V150H190V280Z" />
+ </font>
+ </defs>
+ <!-- ====================================================================== -->
+ <!-- First, fill text with two different colors -->
+ <!-- ====================================================================== -->
+ <text x="180" y="40" font-size="30">Text fill</text>
+ <g font-size="300" font-family="MyFont">
+ <text x="60" y="280" fill="red">A</text>
+ <text x="260" y="280" fill="navy">A</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-07-t.svg
new file mode 100644
index 0000000000..db9a64f40f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-07-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates that text can be both stroked." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-elems-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies that text can be stroked. The The test shows two characters that are stroked and not filled.</p>
+ <p>The rendered image should match the reference image except for the text which may show minor layout differences.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-elems-07-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="MyFont" horiz-adv-x="416">
+ <font-face font-family="MyFont" units-per-em="1000" panose-1="2 0 0 6 3 0 0 2 0 4" ascent="700" descent="-127" />
+ <missing-glyph horiz-adv-x="500" />
+ <glyph unicode="A" glyph-name="A" horiz-adv-x="505" d="M73 700L5 0H155L170 165H335L350 0H500L432 700H73ZM183 315L205 550H300L322 315H183Z" />
+ <glyph unicode="B" glyph-name="B" horiz-adv-x="550" d="M40 700V0H510V280L423 350L510 420V700H40ZM360 550V471L306 420H190V550H360ZM190 280H306L360 229V150H190V280Z" />
+ </font>
+ </defs>
+ <!-- ====================================================================== -->
+ <!-- Now, stroke text with two different stroke width and color -->
+ <!-- ====================================================================== -->
+ <text x="180" y="40" font-size="30">Text stroke</text>
+ <g font-size="300" font-family="MyFont">
+ <text x="60" y="280" fill="none" stroke="red" stroke-width="12">A</text>
+ <text x="260" y="280" fill="none" stroke="navy" stroke-width="12">B</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-08-t.svg
new file mode 100644
index 0000000000..bda095fef1
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-elems-08-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates that text can be both filled and stroked." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-elems-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies that text can be stroked. The test shows two 'A' characters that are both stroked and filled.</p>
+ <p>The rendered image should match the reference image except for the text which may show minor layout differences.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-elems-08-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="MyFont" horiz-adv-x="416">
+ <font-face font-family="MyFont" units-per-em="1000" panose-1="2 0 0 6 3 0 0 2 0 4" ascent="700" descent="-127" />
+ <missing-glyph horiz-adv-x="500" />
+ <glyph unicode="A" glyph-name="A" horiz-adv-x="505" d="M73 700L5 0H155L170 165H335L350 0H500L432 700H73ZM183 315L205 550H300L322 315H183Z" />
+ <glyph unicode="B" glyph-name="B" horiz-adv-x="550" d="M40 700V0H510V280L423 350L510 420V700H40ZM360 550V471L306 420H190V550H360ZM190 280H306L360 229V150H190V280Z" />
+ </font>
+ </defs>
+ <!-- ====================================================================== -->
+ <!-- Now, fill and stroke. The fill should happen first -->
+ <!-- ====================================================================== -->
+ <text x="120" y="40" font-size="30">Text fill and stroke</text>
+ <g font-size="300" font-family="MyFont">
+ <text x="60" y="280" fill="#f82" stroke="red" stroke-width="12">A</text>
+ <text x="260" y="280" fill="#9ae" stroke="navy" stroke-width="12">B</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-01-t.svg
new file mode 100644
index 0000000000..5e49fe2b28
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-01-t.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR, DS" owner="VH, AS" desc="This test validates the rendering order of graphic elements and the concept of grouping." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: render-groups-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies implicit rendering order (paragraph 3.3) and grouping mechanism (paragraphs 3.4). It also validates basic Shape, Image and text rendering.</p>
+ <p>This test renders 3 elements: a text string "SVG", then a shape, then an image. Because of their definition order and coordinates, the image should be on top of the rectangle and the rectangle on top of the text. None of the "SVG" should show through the rectangle and none of the rectangle should show through the image.</p>
+ <p>Prerequisites: the test assumes proper handling of the fill stroke, stroke-width, font-size rendering properties. It uses the rect, line, text and image elements, as well as all the elements required for the test template. To ensure that the text string is overlapped by the other elements and to avoid a dependency on system fonts, an SVG font is used.</p>
+ <p>The rendered image should match the reference image exactly.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-groups-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="313">
+ <!-- Converted from Larabie Anglepoise by Batik ttf2svg -->
+ <font-face font-family="larabie-anglepoise" units-per-em="1000" panose-1="0 0 4 0 0 0 0 0 0 0" ascent="703" descent="-300" alphabetic="0" />
+ <missing-glyph horiz-adv-x="500" d="M63 0V700H438V0H63ZM125 63H375V638H125V63Z" />
+ <glyph unicode="S" glyph-name="S" horiz-adv-x="385" d="M371 1H29V144H264Q264 151 264 166Q265 180 265 188Q265 212 249 212H132Q83 212 55 247Q29 279 29 329V566H335V422H136V375Q136 360 144 356Q148 355 168 355H279Q327 355 352 309Q371 273 371 221V1Z" />
+ <glyph unicode="V" glyph-name="V" horiz-adv-x="351" d="M365 563L183 -33L0 563H101L183 296L270 563H365Z" />
+ <glyph unicode="G" glyph-name="G" horiz-adv-x="367" d="M355 1H18V564H355V420H125V144H248V211H156V355H355V1Z" />
+ <hkern g1="V" g2="G" k="-40" />
+ </font>
+ </defs>
+ <!-- ====================================================================== -->
+ <!-- 3 overlapping elements in a group -->
+ <!-- ====================================================================== -->
+ <g transform="scale(1.8, 1.8)">
+ <!-- Background pattern -->
+ <rect x="20" y="10" width="230" height="155" fill="rgb(192, 192, 192)" />
+ <line x1="40" y1="10" x2="40" y2="175" stroke="white" stroke-width="15" />
+ <line x1="70" y1="10" x2="70" y2="175" stroke="white" stroke-width="15" />
+ <line x1="100" y1="10" x2="100" y2="175" stroke="white" stroke-width="15" />
+ <line x1="130" y1="10" x2="130" y2="175" stroke="white" stroke-width="15" />
+ <line x1="160" y1="10" x2="160" y2="175" stroke="white" stroke-width="15" />
+ <line x1="190" y1="10" x2="190" y2="175" stroke="white" stroke-width="15" />
+ <line x1="220" y1="10" x2="220" y2="175" stroke="white" stroke-width="15" />
+ <line x1="250" y1="10" x2="250" y2="175" stroke="white" stroke-width="15" />
+ <rect x="20" y="10" width="230" height="155" fill="none" stroke="black" />
+ <g >
+ <text font-family="larabie-anglepoise" font-size="120" x="30" y="90">SVG</text>
+ <rect x="70" y="55" width="130" height="70" fill="rgb(130, 0, 50)" />
+ <image x="162" y="75" width="80" height="80" xlink:href="../images/sign.png" />
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-03-t.svg
new file mode 100644
index 0000000000..26e54f4b04
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/render-groups-03-t.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="NR" owner="VH" desc="This test validates the rendering order of graphic elements." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: render-groups-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verifies implicit rendering order (paragraph 3.3) and grouping mechanism (paragraphs 3.4). It also validates basic Shape, Image and text rendering.</p>
+ <p>This test renders 3 elements: a text string "SVG", then a shape, then an image. Because of their definition order and coordinates, the image should be on top of the rectangle and the rectangle on top of the text. None of the "SVG" should show through the rectangle and none of the rectangle should show through the image.</p>
+ <p>Prerequisites: the test assumes proper handling of the fill stroke, stroke-width, font-size rendering properties. It uses the rect, line, text and image elements, as well as all the elements required for the test template. To ensure that the text string is overlapped by the other elements and to avoid a dependency on system fonts, an SVG font is used.</p>
+ <p>The rendered image should match the reference image exactly.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: render-groups-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="313">
+ <!-- Converted from Larabie Anglepoise by Batik ttf2svg -->
+ <font-face font-family="larabie-anglepoise" units-per-em="1000" panose-1="0 0 4 0 0 0 0 0 0 0" ascent="703" descent="-300" alphabetic="0" />
+ <missing-glyph horiz-adv-x="500" d="M63 0V700H438V0H63ZM125 63H375V638H125V63Z" />
+ <glyph unicode="S" glyph-name="S" horiz-adv-x="385" d="M371 1H29V144H264Q264 151 264 166Q265 180 265 188Q265 212 249 212H132Q83 212 55 247Q29 279 29 329V566H335V422H136V375Q136 360 144 356Q148 355 168 355H279Q327 355 352 309Q371 273 371 221V1Z" />
+ <glyph unicode="V" glyph-name="V" horiz-adv-x="351" d="M365 563L183 -33L0 563H101L183 296L270 563H365Z" />
+ <glyph unicode="G" glyph-name="G" horiz-adv-x="367" d="M355 1H18V564H355V420H125V144H248V211H156V355H355V1Z" />
+ <hkern g1="V" g2="G" k="-40" />
+ </font>
+ </defs>
+ <!-- ====================================================================== -->
+ <!-- 3 overlapping elements in a group with opacity -->
+ <!-- ====================================================================== -->
+ <g transform="scale(1.8, 1.8)">
+ <!-- Background pattern -->
+ <rect x="20" y="10" width="230" height="155" fill="rgb(192, 192, 192)" />
+ <line x1="40" y1="10" x2="40" y2="175" stroke="white" stroke-width="15" />
+ <line x1="70" y1="10" x2="70" y2="175" stroke="white" stroke-width="15" />
+ <line x1="100" y1="10" x2="100" y2="175" stroke="white" stroke-width="15" />
+ <line x1="130" y1="10" x2="130" y2="175" stroke="white" stroke-width="15" />
+ <line x1="160" y1="10" x2="160" y2="175" stroke="white" stroke-width="15" />
+ <line x1="190" y1="10" x2="190" y2="175" stroke="white" stroke-width="15" />
+ <line x1="220" y1="10" x2="220" y2="175" stroke="white" stroke-width="15" />
+ <line x1="250" y1="10" x2="250" y2="175" stroke="white" stroke-width="15" />
+ <rect x="20" y="10" width="230" height="155" fill="none" stroke="black" />
+ <!-- The following text, rectangle and image are drawn, fully opaque, in -->
+ <!-- the order they are defined. Therefore, none of the 'A' under the -->
+ <!-- rectangle should show. Neither should any of the rectangle under -->
+ <!-- the image. -->
+ <text font-family="larabie-anglepoise" font-size="120" x="30" y="90">SVG</text>
+ <rect x="70" y="55" width="130" height="70" fill="rgb(130, 0, 50)" />
+ <image x="162" y="75" width="80" height="80" xlink:href="../images/sign.png" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-01-t.svg
new file mode 100644
index 0000000000..ade3b09dca
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-01-t.svg
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="LH" desc="Test ability to handle the 'circle' basic shapes element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: shapes-circle-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-circle-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the &lt;circle/&gt; element with different fill, stroke and stroke-width attributes</text>
+ <circle cx="100" cy="100" r="50" fill="none" stroke="black" />
+ <circle cx="220" cy="100" r="35" fill="red" stroke="black" />
+ <circle cx="340" cy="100" r="20" fill="black" stroke="lime" stroke-width="4" />
+ <circle cx="100" cy="260" r="20" stroke="lime" fill="yellow" stroke-width="4" />
+ <circle cx="220" cy="260" r="35" stroke="none" fill="blue" />
+ <circle cx="340" cy="260" r="50" stroke="red" fill="none" stroke-width="10" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-02-t.svg
new file mode 100644
index 0000000000..921ba47929
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-02-t.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DJ,AN" owner="CN" desc="Defaults test with circle." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: shapes-circle-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Defaults test with circle.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-circle-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the default attributes on the &lt;circle/&gt; element</text>
+ <g fill="red" stroke="#000000" fill-opacity="0.5">
+ <!-- Set cx and cy coordinate to default.-->
+ <circle r="50" />
+ <!-- Set cx coordinate to default.-->
+ <circle cy="100" r="50" />
+ <!-- Set cy coordinate to default.-->
+ <circle cx="100" r="50" />
+ <!-- Set r attribute to 0 (should not display a circle).-->
+ <circle cx="100" cy="100" r="0" />
+ <!-- Set all values to draw a circle -->
+ <circle cx="100" cy="100" r="50" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-03-t.svg
new file mode 100644
index 0000000000..c421882089
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-circle-03-t.svg
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="AN" desc="Testing the correct stroking of the circle element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: shapes-circle-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Defaults test with circle.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-circle-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the correct stroking of the &lt;circle /&gt; element.</text>
+ <text font-size="12" x="160" y="106">3 'o clock starting point</text>
+ <text font-size="12" x="160" y="256">3 'o clock starting point</text>
+ <g fill="red" stroke="#000000">
+ <!-- upper left circle -->
+ <circle cx="100" cy="100" r="50" stroke-width="5" stroke-dasharray="50,5"/>
+ <!-- reference lines upper left circle -->
+ <line x1="100" y1="100" x2="127" y2="142.1" stroke-width="0.5" stroke="blue"/>
+ <line x1="100" y1="100" x2="122.7" y2="144.6" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="74.75" y2="143.2" stroke-width="0.5" stroke="blue"/>
+ <line x1="100" y1="100" x2="70.6" y2="140.4" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="50.1" y2="97.1" stroke-width="0.5" stroke="blue"/>
+ <line x1="100" y1="100" x2="50.6" y2="92.2" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="79.95" y2="54.42" stroke-width="0.5" stroke="blue"/>
+ <line x1="100" y1="100" x2="84.62" y2="52.45" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="131.72" y2="61.36" stroke-width="0.5" stroke="blue"/>
+ <line x1="100" y1="100" x2="135.4" y2="64.72" stroke-width="0.5" stroke="blue" />
+ <!-- line indicating the 3 'o clock starting point of upper left circle -->
+ <line x1="100" y1="100" x2="150" y2="100" stroke-width="2" stroke="blue"/>
+ <!-- lower left circle -->
+ <circle cx="100" cy="250" r="50" stroke-width="10" stroke-dasharray="305,15"/>
+ <!-- reference line lower left circle -->
+ <line x1="100" y1="250" x2="149.17" y2="240.88" stroke-width="0.5" stroke="blue"/>
+ <!-- line indicating the 3 'o clock starting point of lower left circle -->
+ <line x1="100" y1="250" x2="150" y2="250" stroke-width="2" stroke="blue" />
+ <!-- upper right circle -->
+ <circle cx="400" cy="100" r="50" stroke-width="5" stroke-dasharray="50,5" stroke-linecap="round"/>
+ <!-- reference lines upper right circle -->
+ <line x1="400" y1="100" x2="427" y2="142.1" stroke-width="0.5" stroke="blue"/>
+ <line x1="400" y1="100" x2="422.7" y2="144.6" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="374.75" y2="143.2" stroke-width="0.5" stroke="blue"/>
+ <line x1="400" y1="100" x2="370.6" y2="140.4" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="350.1" y2="97.1" stroke-width="0.5" stroke="blue"/>
+ <line x1="400" y1="100" x2="350.6" y2="92.2" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="379.95" y2="54.42" stroke-width="0.5" stroke="blue"/>
+ <line x1="400" y1="100" x2="384.62" y2="52.45" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="431.72" y2="61.36" stroke-width="0.5" stroke="blue"/>
+ <line x1="400" y1="100" x2="435.4" y2="64.72" stroke-width="0.5" stroke="blue" />
+ <!-- line indicating the 3 'o clock starting point of the upper right circle -->
+ <line x1="400" y1="100" x2="450" y2="100" stroke-width="2" stroke="blue" />
+ <!-- lower right circle -->
+ <circle cx="400" cy="250" r="50" stroke-width="10" stroke-dasharray="305,15" stroke-linecap="round"/>
+ <!-- reference line lower right circle -->
+ <line x1="400" y1="250" x2="449.17" y2="240.88" stroke-width="0.5" stroke="blue"/>
+ <!-- line indicating the 3 'o clock starting point of lower right circle -->
+ <line x1="400" y1="250" x2="450" y2="250" stroke-width="2" stroke="blue"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-01-t.svg
new file mode 100644
index 0000000000..0268cc2f1b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-01-t.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN" owner="KRL" desc="Test that viewer has the basic capability to handle the &lt;ellipse&gt; element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: shapes-ellipse-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-ellipse-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the &lt;ellipse /&gt; element with various stroke and fill attributes</text>
+ <!-- ====================================================================== -->
+ <!-- First pair of ellipses. -->
+ <!-- ====================================================================== -->
+ <ellipse xml:id="ellipse-01" fill="none" stroke="#000000" cx="50" cy="75" rx="30" ry="50" />
+ <ellipse xml:id="ellipse-02" fill="red" cx="160" cy="75" rx="30" ry="50" />
+ <!-- ====================================================================== -->
+ <!-- Second pair of ellipses, should actually draw circles. -->
+ <!-- ====================================================================== -->
+ <ellipse xml:id="ellipse-03" fill="none" stroke="#000000" cx="270" cy="80" rx="35" ry="35" />
+ <ellipse xml:id="ellipse-04" fill="red" cx="370" cy="80" rx="35" ry="35" />
+ <!-- ====================================================================== -->
+ <!-- Third pair of ellipses. -->
+ <!-- ====================================================================== -->
+ <ellipse xml:id="ellipse-05" fill="none" stroke="#0000FF" stroke-width="8" cx="50" cy="220" rx="30" ry="50" />
+ <ellipse xml:id="ellipse-06" fill="#00FF00" stroke="#0000FF" stroke-width="8" cx="160" cy="220" rx="30" ry="50" />
+ <!-- ====================================================================== -->
+ <!-- Fourth pair of ellipses. -->
+ <!-- ====================================================================== -->
+ <ellipse xml:id="ellipse-07" fill="#00FF00" stroke="#0000FF" stroke-width="8" cx="330" cy="220" rx="70" ry="40" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-02-t.svg
new file mode 100644
index 0000000000..2040890ff1
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-02-t.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DJ,AN" owner="CN" desc="Defaults test with ellipse." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: shapes-ellipse-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Defaults test with ellipse. Ellipses with rx or ry set to zero shouldn't be drawn. Unspecified cx and cy attributes default to zero.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-ellipse-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the default and zero value attributes of the &lt;ellipse /&gt; element.</text>
+ <g fill="red" stroke="#000000" fill-opacity="0.5">
+ <!-- Set cx and cy coordinate to default. Should be drawn at zero/zero. -->
+ <ellipse rx="100" ry="50" />
+ <!-- Set rx attribute to 0, ellipse shouldn't be drawn.-->
+ <ellipse cx="100" cy="150" rx="0" ry="50" />
+ <!-- Set ry attribute to 0, ellipse shouldn't be drawn.-->
+ <ellipse cx="200" cy="50" rx="100" ry="0" />
+ <!-- Set all values attribute to draw an ellipse.-->
+ <ellipse cx="250" cy="250" rx="100" ry="50" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g> -->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-03-t.svg
new file mode 100644
index 0000000000..6d024a84a7
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-ellipse-03-t.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="AN" desc="Testing the correct stroking of the ellipse element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: shapes-ellipse-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Defaults test with circle.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-ellipse-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the correct stroking of the &lt;ellipse /&gt; element.</text>
+ <text font-size="12" x="160" y="106">3 'o clock starting point</text>
+ <text font-size="12" x="160" y="256">3 'o clock starting point</text>
+ <g fill="red" stroke="#000000">
+ <!-- upper left ellipse -->
+ <ellipse cx="100" cy="100" rx="50" ry="30" stroke-width="5" stroke-dasharray="50,5"/>
+ <!-- reference lines upper left ellipse -->
+ <line x1="100" y1="100" x2="113.78" y2="128.87" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="108.85" y2="129.55" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="61.07" y2="118.85" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="57.26" y2="115.6" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="69.41" y2="76.29" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="74.02" y2="74.38" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="123.2" y2="73.44" stroke-width="0.5" stroke="blue" />
+ <line x1="100" y1="100" x2="127.91" y2="75.13" stroke-width="0.5" stroke="blue" />
+ <!-- line indicating the 3 'o clock starting point for upper left ellipse-->
+ <line x1="100" y1="100" x2="150" y2="100" stroke-width="2" stroke="blue" />
+ <!-- lower left ellipse -->
+ <ellipse cx="100" cy="250" rx="50" ry="30" stroke-width="10" stroke-dasharray="245,15" />
+ <!-- reference line lower left ellipse -->
+ <line x1="100" y1="250" x2="147.31" y2="240.24" stroke-width="0.5" stroke="blue" />
+ <!-- line indicating the 3 'o clock starting point of lower left ellipse -->
+ <line x1="100" y1="250" x2="150" y2="250" stroke-width="2" stroke="blue" />
+ <!-- upper right ellipse -->
+ <ellipse cx="400" cy="100" rx="50" ry="30" stroke-width="5" stroke-dasharray="50,5" stroke-linecap="round"/>
+ <!-- reference lines upper left ellipse -->
+ <line x1="400" y1="100" x2="413.78" y2="128.87" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="408.85" y2="129.55" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="361.07" y2="118.85" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="357.26" y2="115.6" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="369.41" y2="76.29" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="374.02" y2="74.38" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="423.2" y2="73.44" stroke-width="0.5" stroke="blue" />
+ <line x1="400" y1="100" x2="427.91" y2="75.13" stroke-width="0.5" stroke="blue" />
+ <!-- line indicating the 3 'o clock starting point for upper right ellipse-->
+ <line x1="400" y1="100" x2="450" y2="100" stroke-width="2" stroke="blue" />
+ <!-- lower right ellipse -->
+ <ellipse cx="400" cy="250" rx="50" ry="30" stroke-width="10" stroke-dasharray="245,15" stroke-linecap="round"/>
+ <!-- reference line lower left ellipse -->
+ <line x1="400" y1="250" x2="447.31" y2="240.24" stroke-width="0.5" stroke="blue" />
+ <!-- line indicating the 3 'o clock starting point lower right -->
+ <line x1="400" y1="250" x2="450" y2="250" stroke-width="2" stroke="blue" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-intro-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-intro-01-t.svg
new file mode 100644
index 0000000000..129f3b6b19
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-intro-01-t.svg
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN,CN" owner="SH" desc="Test that viewer supports the degenerate cases of the basic shapes" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: shapes-intro-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Tests the degenerate cases of the basic shapes. The shapes are positioned within the black rectangles.</p>
+ <p>None of the shapes should be visible (each of the ten black rectangles should be empty). The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-intro-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the degenerate cases of the basic shapes; attribute values set to zero.</text>
+ <!-- ====================================================================== -->
+ <!-- Draw the boxes to contain the shapes and the text labels for the boxes -->
+ <!-- ====================================================================== -->
+ <g fill="none" stroke="#000000">
+ <!-- rects -->
+ <rect x="50" y="50" width="35" height="60" />
+ <rect x="50" y="155" width="35" height="60" />
+ <rect x="130" y="50" width="35" height="60" />
+ <rect x="130" y="155" width="35" height="60" />
+ <!-- circles -->
+ <rect x="210" y="50" width="60" height="60" />
+ <rect x="210" y="155" width="60" height="60" />
+ <!-- ellipses -->
+ <rect x="315" y="50" width="35" height="60" />
+ <rect x="315" y="155" width="35" height="60" />
+ <rect x="394" y="50" width="35" height="60" />
+ <rect x="394" y="155" width="35" height="60" />
+ <!-- line -->
+ <rect x="235" y="260" width="10" height="10" />
+ </g>
+ <g font-family="Arial" font-size="8">
+ <text x="5" y="90">Stroked</text>
+ <text x="5" y="195">Unstroked</text>
+ <text x="50" y="135">Zero width rect</text>
+ <text x="130" y="135">Zero height rect</text>
+ <text x="210" y="135">Zero radius circle</text>
+ <text x="315" y="135">Zero x radius ellipse</text>
+ <text x="394" y="135">Zero y radius ellipse</text>
+ <text x="235" y="290">Zero length line</text>
+ </g>
+ <!-- ====================================================================== -->
+ <!-- Draw 4 rectangles, two with zero width, two with zero height -->
+ <!-- (stroked and unstroked) -->
+ <!-- ====================================================================== -->
+ <rect xml:id="Zero-width-stroked-rect" fill="none" stroke="#000000" x="55" y="55" width="0" height="50" />
+ <rect xml:id="Zero-width-unstroked-rect" fill="#FF0000" stroke="none" x="55" y="160" width="0" height="50" />
+ <rect xml:id="Zero-height-stroked-rect" fill="#00FF00" stroke="#0000FF" x="135" y="55" width="25" height="0" />
+ <rect xml:id="Zero-height-rect" fill="#00FF00" stroke="none" x="135" y="160" width="25" height="0" />
+ <!-- ====================================================================== -->
+ <!-- Draw two zero radius circles (stroked and unstroked) -->
+ <!-- ====================================================================== -->
+ <circle xml:id="Zero-radius-stroked-circle" fill="none" stroke="#000000" cx="240" cy="80" r="0" />
+ <circle xml:id="Zero-radius-unstroked-circle" fill="#FF0000" stroke="none" cx="240" cy="185" r="0" />
+ <!-- ====================================================================== -->
+ <!-- Draw 4 ellipses, two with a zero x radius, two with a zero y radius -->
+ <!-- (stroked and unstroked) -->
+ <!-- ====================================================================== -->
+ <ellipse xml:id="Zero-x-radius-stroked-ellipse" fill="#00FF00" stroke="#0000FF" cx="332" cy="80" rx="0" ry="25" />
+ <ellipse xml:id="Zero-x-radius-unstroked-ellipse" fill="#00FF00" stroke="none" cx="332" cy="185" rx="0" ry="25" />
+ <ellipse xml:id="Zero-y-radius-stroked-ellipse" fill="none" stroke="#000000" cx="411" cy="80" rx="12" ry="0" />
+ <ellipse xml:id="Zero-y-radius-unstroked-ellipse" fill="#FF0000" stroke="none" cx="411" cy="185" rx="12" ry="0" />
+ <!-- ====================================================================== -->
+ <!-- Draw a zero-length line -->
+ <!-- ====================================================================== -->
+ <line xml:id="Zero-length-line" stroke="#0000FF" x1="240" y1="265" x2="240" y2="265" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-01-t.svg
new file mode 100644
index 0000000000..2d5e076938
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-01-t.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN" owner="LH" desc="Test ability to handle the 'line' basic-shapes element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: shapes-line-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-line-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the &lt;line/&gt; element with different stroke and stroke-width attributes</text>
+ <g xml:id="diagonal-line-set">
+ <line x1="37.5" y1="137" x2="112.5" y2="50" fill="none" stroke="black" stroke-width="1" />
+ <line x1="112.5" y1="137" x2="187.5" y2="50" fill="none" stroke="red" stroke-width="5" />
+ <line x1="187.5" y1="137" x2="262.5" y2="50" fill="none" stroke="green" stroke-width="7.5" />
+ <line x1="262.5" y1="137" x2="337.5" y2="50" fill="none" stroke="blue" stroke-width="10" />
+ <line x1="337.5" y1="137" x2="412.5" y2="50" fill="none" stroke="fuchsia" stroke-width="12.5" />
+ </g>
+ <g xml:id="middle-figure" stroke="black" stroke-width="1">
+ <line x1="170" y1="200" x2="220" y2="200" />
+ <line x1="220" y1="200" x2="220" y2="250" />
+ <line x1="220" y1="250" x2="270" y2="250" />
+ <line x1="270" y1="250" x2="270" y2="200" />
+ <line x1="270" y1="200" x2="320" y2="200" />
+ </g>
+ <g xml:id="lower-left-figure" stroke="blue" stroke-width="10">
+ <line x1="25" y1="200" x2="75" y2="200" />
+ <line x1="75" y1="200" x2="75" y2="250" />
+ <line x1="75" y1="250" x2="125" y2="250" />
+ <line x1="125" y1="250" x2="125" y2="200" />
+ <line x1="125" y1="200" x2="175" y2="200" />
+ </g>
+ <g xml:id="lower-right-figure" stroke-width="10">
+ <line x1="370" y1="250" x2="420" y2="250" stroke="black" />
+ <line x1="420" y1="200" x2="470" y2="200" stroke="fuchsia" />
+ <line x1="320" y1="200" x2="370" y2="200" stroke="blue" />
+ <line x1="370" y1="200" x2="370" y2="250" stroke="green" />
+ <line x1="420" y1="250" x2="420" y2="200" stroke="red" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-02-t.svg
new file mode 100644
index 0000000000..cab56a93cc
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-line-02-t.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="AN" desc="Test the default attributes of the line element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: shapes-line-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ For this test to pass the following lines must be drawn:
+ - Green line across the top from 480,0 to 0,0
+ - Red line across the left hand side from 0,0 to 0,360
+ - Blue line across the bottom from 480,360 to 0,360
+ - Purple line across the test from 480,85 to 0,0
+ - Fuchsia line across the test from 0,0 to 480,170
+ - Aqua line across the test from 0,360 to 480,170
+ - Teal line across the test from 480,256 to 0,360
+ </p>
+ <p>
+ If the x1, x2, y1, or y2 attribute is not specified the effect is as if
+ a value of "0" were specified.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-line-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the default attributes of the &lt;line/&gt; element</text>
+ <g stroke-width="4">
+ <line x2="480" y2="170" stroke="fuchsia"/>
+ <line y1="360" x2="480" y2="170" stroke="aqua"/>
+ <line x1="480" y1="85" stroke="purple"/>
+ <line x1="480" y1="256" y2="360" stroke="teal"/>
+ <line y2="360" stroke="red"/>
+ <line x1="480" stroke="green"/>
+ <line x1="480" y1="360" y2="360" stroke="blue"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-01-t.svg
new file mode 100644
index 0000000000..e6b6868903
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-01-t.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN" owner="KRL" desc="Test that viewer has the basic capability to handle the 'polygon' element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: shapes-polygon-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-polygon-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the &lt;polygon/&gt; element with different fill, stroke and stroke-width attributes</text>
+ <!-- Test case label. -->
+ <!-- ====================================================================== -->
+ <!-- First two polygons, convex and "regular". -->
+ <!-- ====================================================================== -->
+ <!-- Open, convex, "regular". -->
+ <polygon xml:id="polygon-01" fill="none" stroke="#000000" points="59,45,95,63,108,105,82,139,39,140,11,107,19,65" />
+ <!-- Closed, convex, "regular". -->
+ <polygon xml:id="polygon-02" fill="red" points="179,45,218,63,228,105,202,139,159,140,131,107,139,65,179,45" />
+ <!-- ====================================================================== -->
+ <!-- Third polygon, concave and irregular. -->
+ <!-- ====================================================================== -->
+ <!-- Closed, convex, "irregular". -->
+ <polygon xml:id="polygon-03" fill="blue" stroke="black" stroke-width="6" points="350,45 375,80 410,95 375,110 350,145 325,120 290,95 325,70,350,45" />
+ <!-- ====================================================================== -->
+ <!-- Fourth and fifth polygons. -->
+ <!-- ====================================================================== -->
+ <!-- Closed, convex, "regular". -->
+ <polygon xml:id="polygon-05" fill="none" stroke="#0000FF" stroke-width="8" points="59,185,98,203,108,245,82,279,39,280,11,247,19,205,59,185" />
+ <!-- Open, convex, "regular". -->
+ <polygon xml:id="polygon-06" fill="#00FF00" stroke="#0000FF" stroke-width="8" points="179,185,218,203,228,245,202,279,159,280,131,247,139,205" />
+ <!-- ====================================================================== -->
+ <!-- Sixth polygons, irregular with both concave and convex angles. -->
+ <!-- ====================================================================== -->
+ <polygon xml:id="polygon-07" fill="none" stroke="#00FF00" stroke-width="8" points="270,225 300,245 320,225 340,245 280,280 390,280 420,240 280,185" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-02-t.svg
new file mode 100644
index 0000000000..763bf1b68c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polygon-02-t.svg
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="AN" desc="Test points attribute syntax. Test that empty and invalid points attributes result in not rendering 'polygon' elements." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: shapes-polygon-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Testing different points attribute syntaxes, empty and invalid points
+ attributes (e.g. odd number of coordinates).
+ </p>
+ <p>
+ Only three identical polygon elements should be rendered down the
+ right hand side of the test.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for
+ possible variations in the labelling text (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-polygon-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Test that empty and invalid points attributes don't result in rendering 'polygon' elements.</text>
+ <text font-size="12" x="25" y="160">Only three similar &lt;polygon /&gt; elements should be rendered.</text>
+ <text font-size="12" x="25" y="180">Three different syntaxes in the points attribute.</text>
+ <!-- Test polygon without points attribute. -->
+ <polygon xml:id="polygon-01" fill="red" stroke="black" />
+ <!-- Test polygon with empty points attribute. -->
+ <polygon xml:id="polygon-02" fill="red" stroke="black" points="" />
+ <!-- odd number of coordinates -->
+ <polygon xml:id="polygon-03" fill="red" stroke="black" points="179,45,218,63,228,105,202,139,159,140,131,107,139,65,179" />
+ <!-- two alternative points attribute syntaxes -->
+ <polygon xml:id="polygon-04" fill="red" stroke="black" transform="translate(40,0)" points="350,45 375,80 410,95 375,110 350,145 325,120 290,95 325,70,350,45" />
+ <polygon xml:id="polygon-05" fill="red" stroke="black" transform="translate(40,100)" points="350,45,375,80,410,95,375,110,350,145,325,120,290,95,325,70,350,45" />
+ <polygon xml:id="polygon-06" fill="red" stroke="black" transform="translate(40,200)" points="350 45 375 80 410 95 375 110 350 145 325 120 290 95 325 70 350 45" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-01-t.svg
new file mode 100644
index 0000000000..904850cf15
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-01-t.svg
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN" owner="LH" desc="Test that viewer has the basic capability to handle the 'polyline' element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: shapes-polyline-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-polyline-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the &lt;polyline/&gt; element with different fill, stroke and stroke-width attributes</text>
+ <!-- Test case label. -->
+ <!-- ====================================================================== -->
+ <!-- First two polylines. -->
+ <!-- ====================================================================== -->
+ <!-- Open sawtooth line. -->
+ <polyline xml:id="polyline-01" fill="none" stroke="#000000" points="10,50,35,150,60,50,85,150,110,50,135,150" />
+ <!-- text font-family="Arial" font-size="12" x="52" y="40">stroked</text-->
+ <!-- Closed pentagon shaped polyline (5 segments). -->
+ <polyline xml:id="polyline-02" fill="none" stroke="blue" stroke-width="8" points="220,50,267,84,249,140,190,140,172,84,220,50" />
+ <!--text font-family="Arial" font-size="12" x="202" y="40">stroked</text-->
+ <!-- ====================================================================== -->
+ <!-- Third polyline. -->
+ <!-- ====================================================================== -->
+ <!-- The sawtooth again, polylines can be filled. -->
+ <polyline xml:id="polyline-03" fill="blue" stroke="#00FF00" stroke-width="4" points="310,50,335,150,360,50,385,150,410,50,435,150" />
+ <!--text font-family="Arial" font-size="12" x="340" y="40">filled &amp; stroked</text-->
+ <!-- ====================================================================== -->
+ <!-- Fourth and fifth polylines. -->
+ <!-- ====================================================================== -->
+ <!-- An unclosed "septagon" shaped polyline (7th segment omitted). -->
+ <polyline xml:id="polyline-04" fill="none" stroke="red" stroke-width="8" points="59,185,98,203,108,245,82,279,39,280,11,247,19,205" />
+ <!--text font-family="Arial" font-size="12" x="36" y="175">stroked</text-->
+ <!-- Same shape, filled, shows difference with 'polygon'. -->
+ <polyline xml:id="polyline-05" fill="#00FF00" stroke="#0000FF" stroke-width="8" points="189,185,228,203,238,245,212,279,169,280,141,247,149,205" />
+ <!--text font-family="Arial" font-size="12" x="148" y="175">filled &amp; stroked</text-->
+ <!-- ====================================================================== -->
+ <!-- Sixth polylines, irregular with both concave and convex angles. -->
+ <!-- ====================================================================== -->
+ <polyline xml:id="polyline-06" fill="#FF00FF" stroke="none" stroke-width="8" points="270,225 300,245 320,225 340,245 280,280 390,280 420,240 280,185" />
+ <!--text font-family="Arial" font-size="12" x="330" y="175">filled</text-->
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-02-t.svg
new file mode 100644
index 0000000000..3eb4771000
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-polyline-02-t.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="AN" desc="Test points attribute syntax. Test that empty and invalid points attributes result in not rendering 'polyline' elements." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: shapes-polyline-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Testing different points attribute syntaxes, empty and invalid points
+ attributes (e.g. odd number of coordinates).
+ </p>
+ <p>
+ Only three identical polygon elements should be rendered down the
+ right hand side of the test.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-polyline-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Test that empty and invalid points attributes result in not rendering &lt;polyline /&gt; elements.</text>
+ <text font-size="12" x="25" y="160">Only three similar &lt;polyline /&gt; elements should be rendered.</text>
+ <text font-size="12" x="25" y="180">Two different syntaxes in the points attribute.</text>
+ <!-- Test polyline without points attribute. -->
+ <polyline xml:id="polyline-01" fill="red" stroke="black" />
+ <!-- Test polyline with empty points attribute. -->
+ <polyline xml:id="polyline-02" fill="red" stroke="black" points="" />
+ <!-- odd number of coordinates -->
+ <polyline xml:id="polyline-03" fill="red" stroke="black" points="179,45,218,63,228,105,202,139,159,140,131,107,139,65,179" />
+ <!-- three alternative points attribute syntaxes -->
+ <polyline xml:id="polyline-04" fill="red" stroke="black" transform="translate(40,0)" points="350,45 375,80 410,95 375,110 350,145 325,120 290,95 325,70,350,45" />
+ <polyline xml:id="polyline-05" fill="red" stroke="black" transform="translate(40,100)" points="350,45,375,80,410,95,375,110,350,145,325,120,290,95,325,70,350,45" />
+ <polyline xml:id="polyline-06" fill="red" stroke="black" transform="translate(40,200)" points="350 45 375 80 410 95 375 110 350 145 325 120 290 95 325 70 350 45" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-01-t.svg
new file mode 100644
index 0000000000..52fc61551a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-01-t.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AN" owner="KRL" desc="Test that viewer has the basic capability to handle the &lt;rect&gt; element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: shapes-rect-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-rect-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the &lt;rect/&gt; element with different fill, stroke and rx attributes</text>
+ <!-- ====================================================================== -->
+ <!-- First of all draw two simple rectangles. One stroked, one filled. -->
+ <!-- ====================================================================== -->
+ <rect xml:id="Simple-rect-no-fill" fill="none" stroke="#000000" x="30" y="46" width="50" height="80" />
+ <rect xml:id="Simple-rect-filled" fill="red" x="130" y="46" width="50" height="80" />
+ <!-- ====================================================================== -->
+ <!-- Second set of rectangles this time with rounded corners. -->
+ <!-- ====================================================================== -->
+ <rect xml:id="Simple-round-rect-no-fill" fill="none" stroke="#000000" x="250" y="46" width="50" height="80" rx="30" />
+ <rect xml:id="Simple-round-rect-filled" fill="red" x="350" y="46" width="50" height="80" rx="30" />
+ <!-- ====================================================================== -->
+ <!-- Third set of rectangles. -->
+ <!-- ====================================================================== -->
+ <rect xml:id="rect-03" fill="none" stroke="#0000FF" stroke-width="8" x="30" y="196" width="50" height="80" />
+ <rect xml:id="rect-04" fill="#00FF00" stroke="#0000FF" stroke-width="8" x="130" y="196" width="50" height="80" />
+ <!-- ====================================================================== -->
+ <!-- Fourth set of rectangles. -->
+ <!-- ====================================================================== -->
+ <rect xml:id="rect-05" fill="none" stroke="#0000FF" stroke-width="8" x="250" y="196" width="50" height="80" rx="30" ry="50" />
+ <rect xml:id="rect-06" fill="#00FF00" x="350" y="196" width="50" height="80" rx="30" ry="50" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-02-t.svg
new file mode 100644
index 0000000000..4a590c2300
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-02-t.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DJ,AN" owner="CN" desc="Testing the default attributes on the rect element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: shapes-rect-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ <p>Testing the default attributes on the rect element. There should be four rectangles. One should be placed on the left (default x), one on the top (default y). Two rounded rectangles should appear where rx and ry are of the same value (one of the two had been omitted).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-rect-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the default values of attributes of the &lt;rect/&gt; element</text>
+ <g fill="blue" stroke="#000000" fill-opacity="0.5">
+ <!-- Set x coordinate to default. -->
+ <rect y="46" width="50" height="80" />
+ <!-- Set y coordinate to default. -->
+ <rect x="130" width="50" height="80" />
+ <!-- Set width to default. -->
+ <rect x="250" y="46" height="80" width="0" />
+ <!-- Set height to default. -->
+ <rect x="350" y="46" height="0" width="50" />
+ <!-- Set rx to default. -->
+ <rect x="30" y="196" width="50" height="80" ry="20" />
+ <!-- Set ry to default. -->
+ <rect x="130" y="196" width="50" height="80" rx="20" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-03-t.svg
new file mode 100644
index 0000000000..1eb14fb8d8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/shapes-rect-03-t.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="AN" desc="Testing the correct stroking of the rect element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: shapes-rect-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Testing the correct stroking of the rect element. The blue lines indicate where a dash or gap should start and end. For the test to pass, it has to match the reference image.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: shapes-rect-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" x="240" y="14" text-anchor="middle">Testing the correct stroking of the &lt;rect/&gt; element</text>
+ <g fill="red" stroke="#000000">
+ <!-- normal rectangle -->
+ <rect x="50" y="100" width="100" height="100" stroke-dasharray="100,5" stroke-width="5"/>
+ <!-- rectangle with rounded corner -->
+ <rect x="250" y="100" width="100" height="100" rx="10" ry="10" stroke-dasharray="100,5" stroke-width="5"/>
+ </g>
+ <g xml:id="lines_indicating_the_dashing" stroke="blue">
+ <!-- left rectangle -->
+ <line x1="50" y1="100" x2="50" y2="90" />
+ <line x1="150" y1="100" x2="150" y2="90" />
+ <line x1="150" y1="105" x2="160" y2="105" />
+ <line x1="145" y1="200" x2="145" y2="210" />
+ <line x1="140" y1="200" x2="140" y2="210" />
+ <line x1="50" y1="190" x2="40" y2="190" />
+ <line x1="50" y1="185" x2="40" y2="185" />
+ <!-- right rectangle -->
+ <line x1="260" y1="100" x2="260" y2="90" />
+ <line x1="350" y1="114" x2="360" y2="114" />
+ <line x1="350" y1="119" x2="360" y2="119" />
+ <line x1="326.4" y1="200" x2="326.4" y2="210" />
+ <line x1="321.4" y1="200" x2="321.4" y2="210" />
+ <line x1="250" y1="167" x2="240" y2="167" />
+ <line x1="250" y1="162" x2="240" y2="162" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark" fill-opacity="0.5">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-class-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-class-201-t.svg
new file mode 100644
index 0000000000..b1a1cb6ba2
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-class-201-t.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events" xml:space="preserve">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="DS" desc="Tests that the value of the 'class' attribute is included in the DOM" status="accepted"
+ approved="yes"
+ version="$Revision: 1.3 $" testname="$RCSfile: struct-class-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests that the value of the 'class' attribute is included in the DOM,
+ including space-separated values, and values with extraneous spaces.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for
+ possible variations in the labelling text (per CSS2 rules). The pass
+ condition is seeing three green circles, with text below each circle
+ reflecting the normalized space-separated values for the class of that
+ circle. The leftmost circle has the value "foo", the middle circle has
+ the value "bar baz", and the rightmost circle has the value
+ " funky spacing ", normalized to "funky spacing". If any of the
+ circles are red, the test has failed.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-class-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <circle xml:id="circle_1" cx="120" cy="150" r="40" class="foo" />
+ <text id="text_1" x="120" y="210" font-size="18" fill="black" text-anchor="middle"> </text>
+
+ <circle xml:id="circle_2" cx="240" cy="150" r="40" class="bar baz" />
+ <text id="text_2" x="240" y="210" font-size="18" fill="black" text-anchor="middle"> </text>
+
+ <circle xml:id="circle_3" cx="360" cy="150" r="40" class=" funky spacing " />
+ <text id="text_3" x="360" y="210" font-size="18" fill="black" text-anchor="middle"> </text>
+
+ <script type="text/ecmascript">
+ <![CDATA[
+ function testAttributeValue( targetElId, outputElId, val )
+ {
+ var targetEl = document.getElementById( targetElId );
+
+ var classVal = targetEl.getAttribute( "class" );
+ //normalize value
+ classVal = classVal.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ");
+
+ var fill = "red";
+ if ( classVal == val )
+ {
+ fill = "lime";
+ }
+ targetEl.setAttribute( "fill", fill );
+
+ var outputEl = document.getElementById( outputElId );
+ outputEl.firstChild.nodeValue = classVal;
+ }
+
+ testAttributeValue("circle_1", "text_1", "foo");
+ testAttributeValue("circle_2", "text_2", "bar baz");
+ testAttributeValue("circle_3", "text_3", "funky spacing");
+ ]]>
+ </script>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-common-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-common-201-t.svg
new file mode 100644
index 0000000000..e758029040
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-common-201-t.svg
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <handler type="application/ecmascript" xe:event="SVGLoad">
+ initTest(evt);
+ </handler>
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CL" desc="test id and xml:id modification" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: struct-common-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests that reading of IDs and modification of id and xml:id is conformant to the SVG and xml:id specifications. The test passes if four green circles are shown.
+ </p>
+ <p>
+ The first circle has an id only; the second, xml:id only. The third circle has both, with the same values; and the fourth has both, with different values. All four circles have a red fill; on loading the document, a script
+ gets each of the circles by its ID and then sets the fill to green. Lastly, the script attempts
+ to get the fourth circle by ID, using the value of the id attribute; this must fail. If the fourth
+ circle is dark red, the implementation is not giving priority to the value of xml:id.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-common-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <script type="application/ecmascript">
+ <![CDATA[
+ var svg_ns = "http://www.w3.org/2000/svg"
+ var doc;
+ var oldid;
+ var newid;
+ var bothids;
+ var different;
+
+ //
+ // onload handler for top level svg element.
+ //
+ function initTest(evt)
+ {
+ // Get Document
+ var target = evt.target;
+ doc = target.ownerDocument;
+
+ // Get elements identified by id, by xml:id, and by both
+ oldid = doc.getElementById("cod");
+ newid= doc.getElementById("plaice");
+ bothids= doc.getElementById("flounder");
+ different= doc.getElementById("mackerel");
+
+ //Make all four elements green
+ oldid.setAttribute("fill", "green");
+ newid.setAttribute("fill", "green");
+ bothids.setAttribute("fill", "green");
+ different.setAttribute("fill", "green");
+
+ //Try to select on id, should fail
+ different= doc.getElementById("herring");
+ different.setAttribute("fill", "#700");
+
+ }
+ ]]>
+ </script>
+
+ <circle cx="60" cy="100" r="50" fill="red" id="cod"/>
+ <circle cx="180" cy="100" r="50" fill="red" xml:id="plaice" />
+ <circle cx="300" cy="100" r="50" fill="red" id="flounder" xml:id="flounder"/>
+ <circle cx="420" cy="100" r="50" fill="red" id="herring" xml:id="mackerel"/>
+
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="16" text-anchor="middle">
+ <text x="60" y="190">id only</text>
+ <text x="180" y="190">xml:id only</text>
+ <text x="300" y="190">id and</text>
+ <text x="300" y="210">xml:id, same</text>
+ <text x="300" y="230">values</text>
+ <text x="420" y="190">id and</text>
+ <text x="420" dy="210">xml:id, different</text>
+ <text x="420" dy="230">values</text>
+ </g>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+ -->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-01-t.svg
new file mode 100644
index 0000000000..91f8851c87
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-01-t.svg
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="TT" desc="Test to determine if a simple switch element can be probably evaluated." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: struct-cond-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test evaluates a switch statement. The result should be a green rectangle in the lower left quarter of the output window.</p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ <p>The test uses the 'rect' element, as well as basic fill (solid primary colors), stroke (black 1-pixel lines), font-family (Arial) and font-size properties.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-cond-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <switch>
+ <rect fill="red" x="0" y="0" width="220" height="150" requiredExtensions="http://example.org/bogus" />
+ <rect fill="green" x="0" y="150" width="220" height="150" />
+ <rect fill="blue" x="240" y="0" width="220" height="150" />
+ </switch>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-02-t.svg
new file mode 100644
index 0000000000..ce35c1a25f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-02-t.svg
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CL" desc="Test that viewer has the basic capability to switch on user langauge" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: struct-cond-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This tests ability to use the 'systemLanguage' as a test attribute within a switch element. To pass, either</p>
+ <p>It is an error to display no output; the last child of switch has no test, so it will always be taken unless a more suitable child has already evaluated to true.</p>
+ <p>In addition, the string "Why don't they just speak &lt;language&gt;" should appear in the center of the graphic, translated into that language. It is not an error for some or all of this string to display as 'missing character' glyphs, if no suitable font is available - however, this is unlikely if the language is indeed the users primary language. (It can easily occur during testing, however).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-cond-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g fill="black" stroke="none" font-size="24" font-weight="normal" font-family="Arial, Tahoma, Verdana, 'Arial Unicode MS', Code2000">
+ <!-- a blank one <text x="20" y="220" xml:lang=""> <tspan font-weight="bold" > ?</text> <text x="230" y="150" xml:lang="en"></text> -->
+ <!-- put sample here for testing -->
+ <switch>
+ <g systemLanguage="af">
+ <text x="20" y="220" xml:lang="af" font-size="16">Waarom kan hulle nie net doodgewoon Afrikaans praat nie?</text>
+ <text x="230" y="150" xml:lang="en">Afrikaans</text>
+ </g>
+ <g systemLanguage="am">
+ <text x="20" y="220" xml:lang="am" font-family="'GF Zemen Unicode',Code2000" font-size="28">ለምንድነው አማርኛ የማይናገሩት፧</text>
+ <text x="230" y="150" xml:lang="en">Amharic</text>
+ </g>
+ <g systemLanguage="ar">
+ <!-- this is a tiny test so there is no text-anchor, thus rtl text is explicitly positioned -->
+ <text x="20" y="220" xml:lang="ar-SA" font-family=" Tahoma,'MS Farsi','Arial Unicode MS'" font-size="19">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <text x="230" y="150" xml:lang="en">Arabic (SA)</text>
+ </g>
+ <g systemLanguage="bg">
+ <text x="20" y="220" xml:lang="bg" font-size="18">Защо те просто не могат да говорят български ?</text>
+ <text x="230" y="150" xml:lang="en">Bulgarian</text>
+ </g>
+ <g systemLanguage="bn">
+ <text x="20" y="220" xml:lang="bn" font-family="'Arial Unicode MS','UT Bengali Khulna'" font-size="28">ওরা েকন বাংলা বলেত পাের না ?</text>
+ <text x="230" y="150" xml:lang="en">Bengali</text>
+ </g>
+ <!-- Tibetan needs complex layout: this will not work correctly though the font has the right glyphs: <g systemLanguage="bo"> <text x="20" y="220" xml:lang="bo" font-family="'Arial Unicode MS'" font-size="18"> ག་རེ་བྱས་ཁོ་རང་ཚོས་ བོད་ སྐད་ཆ་དེ་ག་རང་བཤད་ཀྱི་མ་རེད།</text> <text x="230" y="150" xml:lang="en">Tibetan</text> </g>-->
+ <g systemLanguage="ca">
+ <text x="20" y="220" xml:lang="bg" font-size="20">Per què no poden simplement parlar en català ?</text>
+ <text x="230" y="150" xml:lang="en">Catalan</text>
+ </g>
+ <g systemLanguage="cs">
+ <text x="20" y="220" xml:lang="cs">Proč prostě nemluví česky ?</text>
+ <text x="230" y="150" xml:lang="en">Czech</text>
+ </g>
+ <g systemLanguage="cy">
+ <text x="20" y="220" xml:lang="cy" font-size="20">Pam dydyn nhw ddim yn siarad Cymraeg ?</text>
+ <text x="230" y="150" xml:lang="en">Welsh</text>
+ </g>
+ <g systemLanguage="da">
+ <text x="20" y="220" xml:lang="da">Hvorfor kan de ikke bare tale dansk ?</text>
+ <text x="230" y="150" xml:lang="en">Danish</text>
+ </g>
+ <!-- need a generic german, too -->
+ <g systemLanguage="de-DE">
+ <text x="20" y="220" xml:lang="de-DE" font-size="22">Warum sprechen sie nicht einfach Deutsch ?</text>
+ <text x="230" y="150" xml:lang="en">German (DE)</text>
+ </g>
+ <g systemLanguage="el">
+ <text x="20" y="220" xml:lang="el-GR" font-size="22">Μα γιατί δεν μπορούν να μιλήσουν Ελληνικά ;</text>
+ <text x="230" y="150" xml:lang="en">Greek (modern, GR)</text>
+ </g>
+ <g systemLanguage="en">
+ <text x="20" y="220" xml:lang="en-US">Why can't they just speak English ?</text>
+ <text x="230" y="150" xml:lang="en">English (US)</text>
+ </g>
+ <g systemLanguage="es">
+ <text x="20" y="220" xml:lang="es-ES" font-size="18">¿Por qué no pueden simplemente hablar en castellano ?</text>
+ <text x="230" y="150" xml:lang="en">Spanish (ES)</text>
+ </g>
+ <g systemLanguage="eu">
+ <text x="20" y="220" xml:lang="eu" font-size="21">Zergatik ezin dute  Euzkeraz bakarrik hitzegin?</text>
+ <text x="230" y="150" xml:lang="en">Basque</text>
+ </g>
+ <g systemLanguage="fa">
+ <text x="20" y="220" xml:lang="fa" font-family=" Tahoma,'MS Farsi','Arial Unicode MS'" font-size="22">خب، چرا فارسى صحبت نمى كنند؟</text>
+ <text x="230" y="150" xml:lang="en">Farsi</text>
+ </g>
+ <g systemLanguage="fi">
+ <text x="20" y="220" xml:lang="fi" font-size="20">Miksi he eivät yksinkertaisesti puhu suomea ?</text>
+ <text x="230" y="150" xml:lang="en">Finnish</text>
+ </g>
+ <!-- put Canadian French before generic French -->
+ <g systemLanguage="fr">
+ <text x="20" y="220" xml:lang="fr-fR" font-size="17">Pourquoi, tout simplement, ne parlent-ils pas en Français ?</text>
+ <text x="230" y="150" xml:lang="en">French (FR)</text>
+ </g>
+ <g systemLanguage="gd">
+ <text x="20" y="220" xml:lang="gd" font-size="20">Carson nach eil iad a'bruidhinn na Gàidhlige ?</text>
+ <text x="230" y="150" xml:lang="en">Scots Gaelic</text>
+ </g>
+ <g systemLanguage="gu">
+ <text x="20" y="220" xml:lang="gu" font-family="'Arial Unicode MS'" font-size="28">બદ્ધા લોકો ગુજરાતી કૅમ નથી બોલતા?</text>
+ <text x="230" y="150" xml:lang="en">Gujarti (IN)</text>
+ </g>
+ <g systemLanguage="he">
+ <!-- he or iw, check -->
+ <text x="20" y="220" xml:lang="he" font-family="Tahoma,'Arial Unicode MS'" font-size="22">למה הם פשוט לא מדברים עברית ?</text>
+ <text x="230" y="150" xml:lang="en">Hebrew (modern)</text>
+ </g>
+ <g systemLanguage="hi">
+ <text x="20" y="220" xml:lang="hi" font-family="Mangal,Code2000,'Arial Unicode MS'">यह लोग हिन्दी क्यों नहीं बोल सकते हैं ?</text>
+ <text x="230" y="150" xml:lang="en">Hindi</text>
+ </g>
+ <g systemLanguage="hr">
+ <text x="20" y="220" xml:lang="hr">Zašto jednostavno ne govore hrvatski ?</text>
+ <text x="230" y="150" xml:lang="en">Croatian</text>
+ </g>
+ <g systemLanguage="hu">
+ <text x="20" y="220" xml:lang="hu" font-size="22">Miért nem beszélnek egyszerűen magyarul ?</text>
+ <text x="230" y="150" xml:lang="en">Hungarian</text>
+ </g>
+ <g systemLanguage="hy">
+ <text x="20" y="220" xml:lang="hy" font-family="Sylfaen,Code2000,'Arial Unicode MS'" font-size="22">Ինչու՞ նրանք չեն խոսում Հայերեն </text>
+ <text x="230" y="150" xml:lang="en">Armenian</text>
+ </g>
+ <g systemLanguage="id">
+ <text x="20" y="220" xml:lang="id" font-size="18">Mengapa mereka tidak bisa bicara bahasa Indonesia ?</text>
+ <text x="230" y="150" xml:lang="en">Indonesian</text>
+ </g>
+ <g systemLanguage="is">
+ <text x="20" y="220" xml:lang="is" font-size="20">Hvers vegna geta þeir ekki réttlátur tala Íslenska ?</text>
+ <text x="230" y="150" xml:lang="en">Icelandic</text>
+ </g>
+ <g systemLanguage="it">
+ <text x="20" y="220" xml:lang="it" font-size="18">Perchè non possono semplicemente parlare italiano ?</text>
+ <text x="230" y="150" xml:lang="en">Italian</text>
+ </g>
+ <g systemLanguage="iu">
+ <!-- unable to distinguish North Baffin Island Inuktitut from South/Central Baffin Island Inuktitut because ISO 3166 codes do not offer any finer resolution than 'Canadian' -->
+ <text x="20" y="220" xml:lang="iu" font-family="NunacomU,'Ballymun RO','Arial Unicode MS'" font-size="28">ᓱᒻᒪᓂᒃᑯᐊ ᐃᓄᒃᑎᑐ ᑐᐃᓐᓇᔭᙱᓚᑦ</text>
+ <text x="230" y="150" xml:lang="en">Inuktitut</text>
+ </g>
+ <g systemLanguage="ja-JP">
+ <text x="20" y="220" xml:lang="ja-JP" font-family="'MS Gothic',MS ゴシック,'MS Mincho',MS 明朝,Code2000,'Arial Unicode MS',DFP-SMTWSong" font-size="22">なぜ、みんな日本語を話してくれないのか?</text>
+ <text x="230" y="150" xml:lang="en">Japanese (JP)</text>
+ </g>
+ <g systemLanguage="jw">
+ <text x="20" y="220" xml:lang="jw" font-size="20">Kenapa kok ora nganggo  basa Jawa  wae?</text>
+ <text x="230" y="150" xml:lang="en">Javanese</text>
+ </g>
+ <g systemLanguage="ka">
+ <text x="20" y="220" xml:lang="ka" font-family="Sylfaen,Code2000,'Arial Unicode MS'" font-size="20">რატომ არ ლაპარაკობენ ისინი ქართულად ?</text>
+ <text x="230" y="150" xml:lang="en">Georgian</text>
+ </g>
+ <g systemLanguage="kk">
+ <text x="20" y="220" xml:lang="kk" font-family="'Arial Unicode MS',Code2000">Олар неге қазақ тiлiнде сойлемейдi?</text>
+ <text x="230" y="150" xml:lang="en">Kazakh</text>
+ </g>
+ <g systemLanguage="kn">
+ <text x="20" y="220" xml:lang="kn" font-family="'Arial Unicode MS',Code2000" font-size="28">ಅವರು ಕನ್ನಡ ಮಾತನಾಡಬಹುದಲ್ಲಾ?</text>
+ <text x="230" y="150" xml:lang="en">Kannada</text>
+ </g>
+ <g systemLanguage="ko">
+ <text x="20" y="220" xml:lang="ko" font-family="GulimChe,굴림체,Gulim,굴림,BatangChe,바탕체,Batang,바탕,Code2000,'Arial Unicode MS'" font-size="15">세계의 모든 사람들이 한국어 를 이해한다면 얼마나 좋을까?</text>
+ <text x="230" y="150" xml:lang="en">Korean</text>
+ </g>
+ <g systemLanguage="ky">
+ <text x="20" y="220" xml:lang="ky" font-family="'Arial Unicode MS',Code2000">Емне үчүн алар кыргызча сүйлбйт?</text>
+ <text x="230" y="150" xml:lang="en">Kirghiz</text>
+ </g>
+ <g systemLanguage="lt">
+ <text x="20" y="220" xml:lang="lt" font-size="28">Kodėl gi jie nekalba lietuviškai ?</text>
+ <text x="230" y="150" xml:lang="en">Lithuanian</text>
+ </g>
+ <g systemLanguage="mk">
+ <text x="20" y="220" xml:lang="mk" font-size="20">Зошто тие едноставно не говорат македонски ?</text>
+ <text x="230" y="150" xml:lang="en">Macedonian</text>
+ </g>
+ <g systemLanguage="mr">
+ <text x="20" y="220" xml:lang="mr" font-family="Mangal,Code2000,'Arial Unicode MS'" font-size="26">लोकांना मराठी का बोलता येत नाही?</text>
+ <text x="230" y="150" xml:lang="en">Marathi</text>
+ </g>
+ <g systemLanguage="nl">
+ <text x="20" y="220" xml:lang="nl" font-size="21">Waarom spreken ze niet gewoon Nederlands ?</text>
+ <text x="230" y="150" xml:lang="en">Dutch</text>
+ </g>
+ <g systemLanguage="no">
+ <text x="20" y="220" xml:lang="no" font-size="21">Hvorfor kan de ikke bare snakke norsk ?</text>
+ <text x="230" y="150" xml:lang="en">Norwegian</text>
+ </g>
+ <g systemLanguage="or">
+ <text x="20" y="220" xml:lang="or" font-family="'Arial Unicode MS',Code2000" font-size="26">ସେମାନେ ଉଡିଯା ରେ କହିନ୍କି କହିବେ ନହିଁ?</text>
+ <text x="230" y="150" xml:lang="en">Oriya</text>
+ </g>
+ <g systemLanguage="pl">
+ <text x="20" y="220" xml:lang="pl">Dlaczego oni nie mówią po polsku ?</text>
+ <text x="230" y="150" xml:lang="en">Polish</text>
+ </g>
+ <!-- test two specific types of Portugese, then a generic alternative -->
+ <g systemLanguage="pt-PT">
+ <text x="20" y="220" xml:lang="pt-PT" font-size="18">Porque é que eles não falam simplesmente em Português ?</text>
+ <text x="230" y="150" xml:lang="en">Portugese (PT)</text>
+ </g>
+ <g systemLanguage="pt-BR">
+ <text x="20" y="220" xml:lang="pt-BR" font-size="17">Porque é que eles não falam em Português (do Brasil) ?</text>
+ <text x="230" y="150" xml:lang="en">Portugese (BR)</text>
+ </g>
+ <g systemLanguage="pt">
+ <text x="20" y="220" xml:lang="pt-PT" font-size="18">Porque é que eles não falam simplesmente em Português ?</text>
+ <text x="230" y="150" xml:lang="en">Portugese</text>
+ </g>
+ <g systemLanguage="ro">
+ <text x="20" y="220" xml:lang="ro">De ce ei nu vorbesc moldoveneşte ?</text>
+ <text x="230" y="150" xml:lang="en">Romanian</text>
+ </g>
+ <g systemLanguage="ru">
+ <text x="20" y="220" xml:lang="ru">Почему же они не говорят по-русски ?</text>
+ <text x="230" y="150" xml:lang="en">Russian</text>
+ </g>
+ <g systemLanguage="sa">
+ <text x="20" y="220" xml:lang="sa" font-family="Mangal,Code2000,'Arial Unicode MS'" font-size="26">ते किं संस्कृतः माम वदन्ति ?</text>
+ <text x="230" y="150" xml:lang="en">Sanskrit</text>
+ </g>
+ <g systemLanguage="sr">
+ <text x="20" y="220" xml:lang="sr">Zašto jednostavno ne govore srpski ?</text>
+ <text x="230" y="150" xml:lang="en">Serbian</text>
+ </g>
+ <g systemLanguage="si">
+ <text x="20" y="220" xml:lang="si" font-family="'Andale Mono WT J'" font-size="26">අැයි ඔවුන්ට ඉංගරිස කතා ෛනබ ?</text>
+ <text x="230" y="150" xml:lang="en">Sinhalese</text>
+ <!-- Sinhalese needs somewhat complex layout (many paired special cases, see http://www-texdev.mpce.mq.edu.au/l2h/indic/Sinhala/lreport/node1.html so this 'chart' font is not entirely suitable-->
+ </g>
+ <g systemLanguage="sl">
+ <text x="20" y="220" xml:lang="sl">Zakaj vendar ne govorijo slovensko ?</text>
+ <text x="230" y="150" xml:lang="en">Slovenian</text>
+ </g>
+ <g systemLanguage="sq">
+ <text x="20" y="220" xml:lang="sq">Pse nuk duan të flasin vetëm shqip ?</text>
+ <text x="230" y="150" xml:lang="en">Albanian</text>
+ </g>
+ <g systemLanguage="sv">
+ <text x="20" y="220" xml:lang="sv">Varför pratar dom inte bara svenska ?</text>
+ <text x="230" y="150" xml:lang="en">Swedish</text>
+ </g>
+ <g systemLanguage="ta">
+ <text x="20" y="220" xml:lang="ta" font-family="Latha,'Arial Unicode MS'" font-size="20">அவர்கள் ஏன் தமிழில் பேசக்கூடாது ?</text>
+ <text x="230" y="150" xml:lang="en">Tamil</text>
+ </g>
+ <g systemLanguage="te">
+ <text x="20" y="220" xml:lang="te" font-family="'Arial Unicode MS'"> తెలుగు లో ఎందుకు మాట్లాడరు?</text>
+ <text x="230" y="150" xml:lang="en">Telugu</text>
+ </g>
+ <g systemLanguage="tg">
+ <text x="20" y="220" xml:lang="tg" font-size="20">Čaro onho ba zaboni točiki gap namezanand?</text>
+ <text x="230" y="150" xml:lang="en">Tajik</text>
+ </g>
+ <g systemLanguage="th">
+ <text x="20" y="220" xml:lang="th" font-family="Tahoma,CordiaUPC,BrowalliaUPC,DilleniaUPC,EucrosiaUPC,FreesiaUPC,JasmineUPC, KodChiangUPC,LilyUPC,'Arial Unicode MS'" font-size="28">ทำไมเขาถึงไม่พูด ภาษาไทย </text>
+ <text x="230" y="150" xml:lang="en">Thai</text>
+ </g>
+ <g systemLanguage="tl">
+ <text x="20" y="220" xml:lang="tl" font-size="19">Bakit hindi na lang sila magsalita ng Tagalog ?</text>
+ <text x="230" y="150" xml:lang="en">Tagalog (Filipino)</text>
+ </g>
+ <g systemLanguage="tr">
+ <text x="20" y="220" xml:lang="tr">Neden Türkçe konuşamıyorlar?</text>
+ <text x="230" y="150" xml:lang="en">Turkish</text>
+ </g>
+ <g systemLanguage="tt">
+ <text x="20" y="220" xml:lang="tt" font-family="'Arial Unicode MS',Code2000" font-size="22">Нишләп олар татарча сүләша алмыйлар?</text>
+ <text x="230" y="150" xml:lang="en">Tatar</text>
+ </g>
+ <g systemLanguage="uk">
+ <text x="20" y="220" xml:lang="uk">Чому б їм не розмовляти українською ?</text>
+ <text x="230" y="150" xml:lang="en">Ukranian</text>
+ </g>
+ <g systemLanguage="ur-IN">
+ <text x="20" y="220" xml:lang="ur-IN" font-family=" Tahoma,'MS Farsi','Arial Unicode MS'" font-size="22">ﻦﻴﻫ ﻰﺘﻠﻭﺒ ﻦﻴﻬﻨ ﻦﻭﻴﻜ ﻮﺪﺭﺃ بس ﻮﻩ ﻟﻮﮒ؟</text>
+ <text x="230" y="150" xml:lang="en">Urdu (IN)</text>
+ </g>
+ <g systemLanguage="ur-PK">
+ <text x="20" y="220" xml:lang="ur-PK" font-family=" Tahoma,'MS Farsi','Arial Unicode MS'" font-size="19">ﻦﻴﻫ ﻰﺘﻠﻭﺒ ﻦﻴﻬﻨ ﻦﻭﻴﻜ ﻮﺪﺭﺃ بس ﻮﻩ ﻟﻮﮒ؟</text>
+ <text x="230" y="150" xml:lang="en">Urdu (PK)</text>
+ </g>
+ <!-- should have a generic Urdu here for when user preference is Urdu but neither Pakistan Urdu nor Indian Urdu -->
+ <g systemLanguage="uz">
+ <text x="20" y="220" xml:lang="uz" font-size="22">Nega ular uzbek tilinda gapirmaidilar?</text>
+ <text x="230" y="150" xml:lang="en">Uzbek</text>
+ </g>
+ <g systemLanguage="vi">
+ <text x="20" y="220" xml:lang="vi" font-family="Tahoma,Verdana,'Verdana Ref','Arial Unicode MS'" font-size="22">Tại sao họ không thể chỉ nói tiếng Việt ?</text>
+ <text x="230" y="150" xml:lang="en">Vietnamese</text>
+ </g>
+ <g systemLanguage="yi">
+ <text x="20" y="220" xml:lang="yi" font-family="Tahoma,'Arial Unicode MS'" font-size="22">פֿאַרװאָס רעדט מען ניט פּשוט ייִדיש ?</text>
+ <text x="230" y="150" xml:lang="en">Yiddish</text>
+ </g>
+ <g systemLanguage="zh-CN">
+ <text x="20" y="220" font-family="'MS Hei','MS Song',LiSu,隶书,Code2000,'Arial Unicode MS'" font-size="26" xml:lang="zh-CN">他们为什么不说中文 (中国) ?</text>
+ <text x="230" y="150" xml:lang="en">Chinese (CN)</text>
+ </g>
+ <g systemLanguage="zh-TW">
+ <text x="20" y="220" xml:lang="zh-TW" font-family="MingLiU,細明體,PMingLiU,新細明體,DFP-SMTWSong,Code2000,'Arial Unicode MS'" font-size="26">他們爲什麽不說中文(台灣)?</text>
+ <text x="230" y="150" xml:lang="en">Chinese (TW)</text>
+ </g>
+ <g>
+ <!-- the default case, try three languages of W3C host institutions -->
+ <text x="90" y="100" fill="#700" font-size="14">You have no (matching) language preference set</text>
+ <text x="20" y="180" xml:lang="ja-JP" font-family="MS Gothic,MS ゴシック,MS Mincho,MS 明朝,Code2000,'Arial Unicode MS',DFP-SMTWSong" font-size="20">なぜ、みんな日本語を話してくれないのか?</text>
+ <text x="20" y="220" xml:lang="en-US">Why can't they just speak English ?</text>
+ <text x="20" y="260" xml:lang="fr-fR" font-size="16">Pourquoi, tout simplement, ne parlent-ils pas en Français ?</text>
+ </g>
+ </switch>
+ <!-- action item was to make a switch "for all ISO 639-1 language codes", a large task not completed. But there is enough here to make a good test case, including 19 of the top 20 langiuages by number of speakers (except Punjabi). Here is the full list (trailing * indicates language included in this test), accurate as of October 22, 2002 from the registration authority: http://lcweb.loc.gov/standards/iso639-2/langcodes.html aa Afar ab Abkhazian af Afrikaans * am Amharic * ar Arabic * as Assamese ae Avestan ay Aymara az Azerbaijani ba Bashkir be Byelorussian bg Bulgarian * bh Bihari bi Bislama bn Bengali [Bangla] * bo Tibetan * br Breton bs Bosnian ca Catalan * ce Chechen ch Chamorro co Corsican cs Czech * cu Church Slavic cv Chuvash cy Welsh * da Danish * de German * dz Dzongkha [Bhutani] el Greek, Modern (1453-) * en English, Modern * eo Esperanto es Spanish * et Estonian eu Basque * fa Persian (Farsi) * fi Finnish * fj Fijian fo Faeroese fr French, Modern * fy Frisian ga Irish gd Scots Gaelic * gl Gallegan [Galician] gn Guarani gu Gujarati * gv Manx ha Hausa he Hebrew * hi Hindi * ho Hiri Motu hr Croatian * hu Hungarian * hy Armenian * hz Herero ia Interlingua id Indonesian * ie Interlingue ik Inupiak is Icelandic * it Italian * iu Inuktitut * iw Hebrew * ja Japanese * jw Javanese ka Georgian * ki Kikuyu kj Kuanyama kk Kazakh * kl Kalaallisut [Greenlandic] km Khmer [Cambodian] kn Kannada * ko Korean * ks Kashmiri ku Kurdish kv Komi kw Cornish ky Kirghiz * la Latin ln Lingala lo Lao [Laothian] lt Lithuanian * lv Latvian [Lettish] mg Malagasy mh Marshall mi Maori mk Macedonian * ml Malayalam mn Mongolian mo Moldavian mr Marathi * ms Malay mt Maltese my Burmese na Nauru nb Norwegian Bokmal nd Ndebele, North ne Nepali ng Ndonga nl Dutch * nn Norwegian Nynorsk no Norwegian * nr Ndebele, South nv Navajo ny Chichewa~@Nyanja oc Occitan (post 1500); Provencal om Oromo [Afan] or Oriya * os Ossetian; Ossetic pa Panjabi pi Pali pl Polish * ps Pushto [Pashto] pt Portuguese * qu Quechua rm Rhaeto-Romance rn Kirundi ro Romanian * ru Russian * rw Kinyarwanda sa Sanskrit * sc Sardinian sd Sindhi se Northern Sami sg Sangro sr Serbian * si Sinhalese * sk Slovak sl Slovenian * sm Samoan sn Shona so Somali sq Albanian * sr Serbian ss Swati [Siswati] st Sotho, Southern [Sesotho] su Sundanese sv Swedish * sw Swahili ta Tamil * te Tegulu * tg Tajik * th Thai * ti Tigrinya tk Turkmen tl Tagalog * tn Tswana [Setswana] to Tonga tr Turkish * ts Tsonga tt Tatar * tw Twi ug Uighur uk Ukrainian * ur Urdu * uz Uzbek * vi Vietnamese * vo Volapuk wo Wolof xh Xhosa yi Yiddish * yo Yoruba za Zhuang zh Chinese * zu Zulu note: http://msdn.microsoft.com/workshop/management/ISO639codes.htm is obselete and incorrect -->
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-03-t.svg
new file mode 100644
index 0000000000..b03faee540
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-03-t.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="CL" desc="Tests the switch element with requiredFeature" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: struct-cond-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests the &lt;switch&gt; element with requiredFeature. If a red rectangle with white text 'FAIL' is
+ displayed, the test fails. Otherwise, if a green rectangle is displayed in the lower part with the text '',
+ the test is passed.
+ </p>
+ <p>
+ The red rectangle and the white text each require a non-existent feature; the test attribute will thus
+ evaluate to false and neither element will be rendered by a compliant implementation.
+ </p>
+ <p>
+ The upper subtest is informative; it distinguishes between a purely SVG Tiny 1.2
+ implementation and others which also implement more (eg SVG Full 1.1, or
+ some profile of SVG 1.2 greater than Tiny). The results of this subtest
+ does not affect the pass/fail criteria.
+ </p>
+ <p>
+ Because SVG Tiny does not support for SVG Full DOM, an SVG Tiny implementation which
+ does not support other SVG Profiles should show a rectangle
+ <span style="background: rgb( 95, 158, 160)">like this</span>.
+ If the application supports the DOM, meaning that it does more than just SVG Tiny, it
+ should show a rectangle <span style="background: rgb( 32, 178, 170)">like this</span>.
+ Either result is a pass.
+ </p>
+ <p>
+ The lower subtest,has another switch. The first child has a requiredFeature
+ set to http://www.w3.org/TR/SVG11/feature#BasicText which all SVG Tiny implementations
+ must support. If the application does, the lower rectangle is displayed in green
+ <span style="background:green; color: white">like this</span>. Otherwise, a red rectangle
+ indicates that the text has failed.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-cond-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <switch>
+ <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#SVGDOM">
+ <rect x="30" y="20" width="420" height="130" fill="rgb( 32, 178, 170)" />
+ <text x="240" y="100" font-size="18" text-anchor="middle">This viewer does more than SVG Tiny 1.2</text>
+ </g>
+ <g>
+ <rect x="30" y="20" width="420" height="130" fill="rgb( 95, 158, 160)" />
+ <text x="240" y="100" font-size="18" text-anchor="middle">
+ This viewer
+ does not implement SVG Full DOM
+ </text>
+ </g>
+ </switch>
+ <switch transform="translate(0, 140)">
+ <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#BasicText">
+ <rect x="30" y="20" width="420" height="130" fill="green" />
+ <text x="240" y="100" font-size="18" text-anchor="middle" fill="white">SVG Basic Text feature supported</text>
+ </g>
+ <g>
+ <rect x="30" y="20" width="420" height="130" fill="red" />
+ <text x="240" y="100" font-size="18" text-anchor="middle" fill="white">Fail: Basic Text feature not supported</text>
+ </g>
+ </switch>
+
+ <rect x="30" y="20" width="420" height="270" fill="red" requiredFeatures="http://example.org/NotAFeature"/>
+ <text x="240" y="180" fill="white" text-anchor="middle" font-size="36"
+ requiredFeatures="http://www.w3.org/TR/SVG11/feature#NotAFeatureEither">FAIL</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-204-t.svg
new file mode 100644
index 0000000000..be7c309109
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-204-t.svg
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="AE" desc="Required Formats Attribute" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-cond-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Required Formats Attribute</p>
+ <p>
+ A series of switches are used to determine which Internet Media types ('MIME types')
+ are supported, using the 'requiredFormats' attribute,
+ displaying a 'yes' or 'no' as appropriate. The test is passed if there is text in
+ the second row of each column, and that text is only
+ <span style="color:#070">green</span> (in the top table)
+ or <span style="color:rgb(138, 43, 226)">blueviolet</span> (in the bottom table);
+ no <span style="color:red">red</span> text is displayed.
+ </p>
+ <p>
+ The SVG Tiny 1.2 specification mandates certain formats, so these must be supported:
+ image/jpeg, image/png, image/svg+xml.
+ It is an error not to support them, therefore 'yes' is green and 'no' is red.
+ </p>
+ <p>
+ This test also checks for support of Internet Media types which are
+ assumed to not exist and are unlikely to ever be registered: garbage/garbage.
+ Therefore, 'yes' is red and 'no' is green.
+ </p>
+ <p>
+ Lastly, most media types are optional. For example, image/tiff may be
+ supported but support is not mandated by the SVG Tiny 1.2 specification.
+ The second table examines these optional formats.
+ Both 'yes' and 'no' are displayed in blueviolet. Whether the particular Internet Media type
+ is supported or not does not affect whether the test is passed or failed, but does provide useful
+ information about the optional capabilities of a particular implementation.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-cond-204-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g fill="#555" font-size="10" text-anchor="middle">
+ <text fill="#000" x="240" font-size="14" y="30" xml:id="display-title">requiredFormats Attribute</text>
+ <text x="240" y="45" xml:id="comment-1">
+ Supported Internet Media types are determined, using the 'requiredFormats' attribute
+ </text>
+ <!--text x="240" y="57" xml:id="comment-2">
+ Results that are expected are marked as such.
+ </text-->
+ </g>
+ <g font-size="10" transform="translate(-30,97)">
+ <text text-anchor="end" x="340" y="-15" fill="#555" font-size="14">Mandatory Formats</text>
+ <text x="350" y="-15" fill="#555" font-size="14">Supported?</text>
+ <text text-anchor="end" x="340" y="0" fill="black">image/svg+xml</text>
+ <switch>
+ <text x="350" y="0" fill="green" requiredFormats="image/svg+xml">Yes (required)</text>
+ <text x="350" y="0" fill="red">No (fail)</text>
+ </switch>
+ <text text-anchor="end" x="340" y="12" fill="black">image/png</text>
+ <switch>
+ <text x="350" y="12" fill="green" requiredFormats="image/png">Yes (required)</text>
+ <text x="350" y="12" fill="red">No (fail)</text>
+ </switch>
+ <text text-anchor="end" x="340" y="24" fill="black">image/jpeg</text>
+ <switch>
+ <text x="350" y="24" fill="green" requiredFormats="image/jpeg">Yes (required)</text>
+ <text x="350" y="24" fill="red">No (fail)</text>
+ </switch>
+ <text text-anchor="end" x="340" y="36" fill="black">foo/foo</text>
+ <switch>
+ <text x="350" y="36" fill="red" requiredFormats="garbage/garbage">Yes (fail)</text>
+ <text x="350" y="36" fill="green">No (expected)</text>
+ </switch>
+ <text text-anchor="end" x="340" y="48" fill="black">image/png image/svg+xml foo/foo</text>
+ <switch>
+ <text x="350" y="48" fill="red" requiredFormats="image/png image/svg+xml garbage/garbage">Yes (fail)</text>
+ <text x="350" y="48" fill="green">No (expected)</text>
+ </switch>
+ <text text-anchor="end" x="340" y="60" fill="black">image/svg+xml image/png image/jpeg</text>
+ <switch>
+ <text x="350" y="60" fill="green" requiredFormats="image/svg+xml image/png image/jpeg">Yes (required)</text>
+ <text x="350" y="60" fill="red">No (fail)</text>
+ </switch>
+
+ <text text-anchor="end" x="340" y="85" fill="#555" font-size="14">Optional Formats</text>
+ <text x="350" y="85" fill="#555" font-size="14">Supported?</text>
+
+ <text text-anchor="end" x="340" y="100" fill="black">image/tif</text>
+ <switch>
+ <text x="350" y="100" fill="rgb(138, 43, 226)" requiredFormats="image/tif">Yes</text>
+ <text x="350" y="100" fill="rgb(138, 43, 226)">No </text>
+ </switch>
+ <text text-anchor="end" x="340" y="112" fill="black">image/g3fax</text>
+ <switch>
+ <text x="350" y="112" fill="rgb(138, 43, 226)" requiredFormats="image/g3fax">Yes</text>
+ <text x="350" y="112" fill="rgb(138, 43, 226)">No</text>
+ </switch>
+
+ <text text-anchor="end" x="340" y="124" fill="black">video/mpeg</text>
+ <switch>
+ <text x="350" y="124" fill="rgb(138, 43, 226)" requiredFormats="video/mpeg">Yes</text>
+ <text x="350" y="124" fill="rgb(138, 43, 226)">No</text>
+ </switch>
+ <text text-anchor="end" x="340" y="136" fill="black">video/3gpp</text>
+ <switch>
+ <text x="350" y="136" fill="rgb(138, 43, 226)" requiredFormats="video/3gpp">Yes</text>
+ <text x="350" y="136" fill="rgb(138, 43, 226)">No</text>
+ </switch>
+
+ <text text-anchor="end" x="340" y="148" fill="black">audio/vnd.wave;codec=1</text>
+ <switch>
+ <text x="350" y="148" fill="rgb(138, 43, 226)" requiredFormats="audio/vnd.wave;codec=1">Yes</text>
+ <text x="350" y="148" fill="rgb(138, 43, 226)">No</text>
+ </switch>
+
+ <text text-anchor="end" x="340" y="160" fill="black">audio/3gpp</text>
+ <switch>
+ <text x="350" y="160" fill="rgb(138, 43, 226)" requiredFormats="audio/3gpp">Yes</text>
+ <text x="350" y="160" fill="rgb(138, 43, 226)">No</text>
+ </switch>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-209-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-209-t.svg
new file mode 100644
index 0000000000..babb480b15
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-209-t.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CM" owner="DS" desc="Test to determine if 'display' or 'visibility' attributes have an incorrect effect on the 'switch' element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.3 $" testname="$RCSfile: struct-cond-209-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test evaluates the effects of the 'display' or 'visibility'
+ attributes on a switch statement. The result should be a green circle
+ in the center of the output window.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for
+ possible variations in the labelling text (per CSS2 rules). The pass
+ condition is seeing a green circle in the center of the image. If a
+ gray rectangle is visible, the test cannot be evaluated because the
+ 'display' attribute is not supported. If a blue rectangle is visible,
+ the test cannot be evaluated because the 'visibility' attribute is not
+ supported. If a red rectangle with a gray stroke is visible, the test
+ is failed because the switch is affected by the 'display' attribute.
+ If a red rectangle with a black stroke is visible, the test is failed
+ because the switch is affected by the 'display' attribute.
+ </p>
+ <p>
+ The test uses the 'rect' and 'circle' elements, as well as basic fill
+ (solid primary colors), stroke (black or gray 2-pixel lines), and the
+ 'display' and 'visibility' attributes.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-cond-209-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content">
+
+ <circle cx='240' cy='180' r='23' fill='lime' />
+
+ <switch xml:id="test-display">
+ <rect fill="gray" stroke-width="2" x="215" y="155" width="50" height="50" display="none" />
+ <rect fill="red" stroke="gray" stroke-width="2" x="215" y="155" width="50" height="50" />
+ </switch>
+
+ <switch xml:id="test-visibility">
+ <rect fill="blue" stroke-width="2" x="215" y="155" width="50" height="50" visibility="hidden" />
+ <rect fill="red" stroke="blue" stroke-width="2" x="215" y="155" width="50" height="50" />
+ </switch>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-210-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-210-t.svg
new file mode 100644
index 0000000000..dbda7b27f0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-cond-210-t.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CM" owner="DS" desc="Test to determine if referenced resource (elements or paint servers) are still displayed event if hidden by a 'switch' element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.3 $" testname="$RCSfile: struct-cond-210-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test evaluates the effects of the switch statement on referencing
+ content such as gradients or elements. The result should be a yellow
+ rectangle in the center of the output window, with green circles in
+ three of the corners of the rectangle.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for
+ possible variations in the labelling text (per CSS2 rules). The pass
+ condition is seeing three circles, one solid green circle in upper
+ right corner of the rectangle, and a circle with a green gradient in
+ each of the bottom corners of the rectangle. If a red or black circle
+ is visible in the upper left corner of the rectangle, the test cannot
+ be evaluated because the 'switch' is not correctly supported. If any of
+ the upper-right or lower circles is not visible, or does not have the
+ correct fill, the test is failed. If the bottom-right circle is not
+ visible or does not have the gradient fill, then the 'switch' is not
+ correctly supported, and does not allow one conditionally hidden
+ resource to reference another.
+ </p>
+ <p>
+ The test uses the 'rect', 'circle', 'gradient', and 'use' elements, as
+ well as basic fill (solid primary colors) and radial gradients.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-cond-210-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <switch>
+ <g>
+ <rect fill="yellow" x="120" y="90" width="240" height="180" />
+ </g>
+ <g fill="red">
+ <circle xml:id="ref-source" cx="150" cy="120" r="25" />
+
+ <radialGradient xml:id="ref-gradient">
+ <stop offset="0" stop-color="green" />
+ <stop offset="1" stop-color="lime" />
+ </radialGradient>
+ </g>
+ <g>
+ <circle xml:id="ref-source-gradient" cx="150" cy="240" r="25" fill="url(#ref-gradient)"/>
+ </g>
+ </switch>
+
+ <use xlink:href="#ref-source" x="180" fill="lime" />
+ <use xlink:href="#ref-source-gradient" x="180" />
+ <circle xml:id="ref-source" cx="150" cy="240" r="25" fill="url(#ref-gradient)"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-01-t.svg
new file mode 100644
index 0000000000..c2ffbfd0a3
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-01-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="TT" desc="Test to determine if the defs element is used as a container correctly" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: struct-defs-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test to verify that the defs element is used as a container correctly.</p>
+ <p>In this test a fill is created which is solid red. The view should be a solid red rectangle centered in the viewport 100 pixels from from left,top and right,bottom. Also, in the defs sections there are rectangle defined, one to paint over the entire canvas with a green fill and the other to obscure most of the red rectangle. The green rectangles should not show in the view as defs are referenced items and are not rendered. No green should show.</p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ <p>The test uses the 'rect' element, as well as basic fill (solid primary colors), stroke (black 1-pixel lines), font-family (Arial) and font-size properties.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-defs-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs xml:id="references">
+ <rect xml:id="rect11" x="0" y="0" width="480" height="360" color="#008000" />
+ </defs>
+ <defs>
+ <rect x="160" y="100" width="160" height="160" fill="#008000" />
+ </defs>
+ <rect x="140" y="80" width="200" height="200" fill="#F00" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-201-t.svg
new file mode 100644
index 0000000000..e368331f89
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-defs-201-t.svg
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Tests display=none on the defs element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-defs-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests that the value of the display property on the defs element or on its descendants
+ doesn't prevent the elements from being referenced.
+ </p>
+ <p>
+ The test has passed if the following conditions are met:
+ </p>
+ <ol>
+ <li>there are 8 big rects visible each of a different color.</li>
+ <li>on top of the 8 big rects there are 8 circles that contain the reference color, the color of each circle must match the color of the rect to the right of its center</li>
+ <li>from the top-left to the top-right corner the colors must be: green, lime, yellow, olive.</li>
+ <li>from the bottom-left to the bottom-right corner the colors must be: navy, teal, blue, fuchsia.</li>
+ </ol>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-defs-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <defs display="none">
+ <rect xml:id="r1" x="-50" y="-50" width="100" height="100" fill="currentColor"/>
+ <rect xml:id="r2" x="-50" y="-50" width="100" height="100" fill="currentColor" display="inline"/>
+ <rect xml:id="r3" x="-50" y="-50" width="100" height="100" fill="currentColor" display="none"/>
+ <g xml:id="g1" display="none">
+ <rect xml:id="r4" x="-50" y="-50" width="100" height="100" fill="currentColor"/>
+ <g xml:id="g2">
+ <use xml:id="u1" xlink:href="#r1" color="olive"/>
+ <use xml:id="u2" xlink:href="#r3" color="red"/>
+ <use xml:id="u3" xlink:href="#r1" transform="translate(-300 100)" color="navy"/>
+ <g xml:id="g3" display="none">
+ <use xml:id="u4" xlink:href="#r1" color="teal"/>
+ <use xml:id="u5" xlink:href="#r3" color="red" display="none"/>
+ <use xml:id="u6" xlink:href="#r1" transform="translate(100 0)" color="blue"/>
+ </g>
+ </g>
+ </g>
+ <use xml:id="u7" xlink:href="#r1"/>
+ </defs>
+
+ <g transform="translate(0 20)">
+ <use xlink:href="#r1" transform="translate(100 100)" color="green"/>
+
+ <!-- this should not be visible -->
+ <use xlink:href="#r3" transform="translate(100 100)" color="red"/>
+
+ <use xlink:href="#r2" transform="translate(200 100)" color="lime"/>
+ <use xlink:href="#r4" transform="translate(300 100)" color="yellow"/>
+
+ <!-- should show olive and navy rects -->
+ <use xlink:href="#g2" transform="translate(400 100)"/>
+
+ <use xlink:href="#u4" transform="translate(200 200)"/>
+ <use xlink:href="#u6" transform="translate(200 200)"/>
+ <use xlink:href="#u7" transform="translate(400 200)" color="fuchsia"/>
+
+ <!-- this should not be visible -->
+ <use xlink:href="#g3" transform="translate(200 200)" display="inline"/>
+
+ <circle cx="50" cy="50" r="25" fill="green"/>
+ <circle cx="150" cy="50" r="25" fill="lime"/>
+ <circle cx="250" cy="50" r="25" fill="yellow"/>
+ <circle cx="350" cy="50" r="25" fill="olive"/>
+ <circle cx="50" cy="250" r="25" fill="navy"/>
+ <circle cx="150" cy="250" r="25" fill="teal"/>
+ <circle cx="250" cy="250" r="25" fill="blue"/>
+ <circle cx="350" cy="250" r="25" fill="fuchsia"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-205-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-205-t.svg
new file mode 100644
index 0000000000..b43a483843
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-205-t.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Tests that discard elements are discarded." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-discard-205-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test tests that discard elements themselves are discarded after being activated.
+ </p>
+ <p>
+ The test has passed if after 3 seconds there are three green circles visible, and no red.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-discard-205-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(30,20)">
+ <circle xml:id="c1" cx="150" cy="100" r="50" fill="green"/>
+ <rect xml:id="r1" x="100" y="50" width="100" height="100" fill="red"/>
+
+ <circle xml:id="c2" cx="260" cy="100" r="50" fill="green"/>
+ <rect xml:id="r2" x="210" y="50" width="100" height="100" fill="red"/>
+
+ <circle xml:id="c3" cx="205" cy="200" r="50" fill="green"/>
+
+ <discard xml:id="discard1" xlink:href="#r1" begin="1s"/>
+ <discard xml:id="discard2" xlink:href="#r2" begin="1s"/>
+ <discard xml:id="discard3" xlink:href="#unresolved" begin="1s"/>
+
+ <set xml:id="set" attributeName="display" to="inline" begin="2s" dur="1s" fill="freeze"/>
+
+ <handler xe:event="beginEvent" xe:observer="set">
+ var d1 = document.getElementById("discard1");
+ var d2 = document.getElementById("discard2");
+ var d3 = document.getElementById("discard3");
+
+ if(d1 || d2 || d3)
+ document.getElementById("c3").setAttribute("fill", "red");
+ </handler>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-206-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-206-t.svg
new file mode 100644
index 0000000000..825bdb426c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-discard-206-t.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Tests that discard elements can be discarded before activation." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-discard-206-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests that discard elements can be discarded before activation.
+ </p>
+ <p>
+ The test has passed if after 3 seconds there is there are 4 green rects visible,
+ and nothing red.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-discard-206-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(30,-30)">
+ <rect xml:id="r0" x="100" y="100" width="200" height="200" fill="red"/>
+ <rect xml:id="r1" x="100" y="100" width="100" height="100" fill="green"/>
+ <rect xml:id="r2" x="200" y="100" width="100" height="100" fill="green"/>
+ <rect xml:id="r3" x="100" y="200" width="100" height="100" fill="green"/>
+ <rect xml:id="r4" x="200" y="200" width="100" height="100" fill="green"/>
+ <rect xml:id="r5" x="100" y="100" width="200" height="200" fill="red"/>
+
+ <discard xml:id="discard1" xlink:href="#r1" begin="2s"/>
+ <discard xml:id="discard2" xlink:href="#r2" begin="2s"/>
+ <discard xml:id="discard3" xlink:href="#r3" begin="2s"/>
+ <discard xml:id="discard4" xlink:href="#r5"/>
+ <discard xml:id="discard5" xlink:href="#discard1" begin="1s"/>
+ <discard xml:id="discard6" xlink:href="#discard2" begin="0s"/>
+ <discard xml:id="discard7" xlink:href="#discard3"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-02-t.svg
new file mode 100644
index 0000000000..746d8618ef
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-02-t.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="validates the use of the preserveAspectRatio" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-frag-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test validates the use of the preserveAspectRatio attribute on the root svg element in an SVG Tiny document. In this document, preserveAspectRatio is set to none and the width and height of the document set to 100%.</p>
+ <p>The document's viewBox is defined to be 100 by 100 with an origin in (100, 100). The content is made of 2 red squares and 2 orange circles.</p>
+ <p>Because preserveAspectRatio is set to 'none', the content should appear distorted: squares show as rectangles and circles show as ellipses.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-frag-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <rect x="100" y="100" width="50" height="50" fill="rgb(220, 20, 60)" />
+ <rect x="150" y="150" width="50" height="50" fill="rgb(220, 20, 60)" />
+ <circle cx="125" cy="175" r="25" fill="rgb(255, 215, 0)" />
+ <circle cx="175" cy="125" r="25" fill="rgb(255, 215, 0)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-03-t.svg
new file mode 100644
index 0000000000..c054acf2cb
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-03-t.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="validates the use of the preserveAspectRatio" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-frag-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test validates the use of the preserveAspectRatio attribute on the root svg element in an SVG Tiny document. In this document, preserveAspectRatio is set to 'xMidYMid meet' and the width and height of the document set to 100%.</p>
+ <p>The document's viewBox is defined to be 100 by 100 with an origin in (100, 100). The content is made of 2 red squares and 2 orange circles.</p>
+ <p>Because preserveAspectRatio is set to 'xMidYMid meet', the content should appear centered within the viewport: squares show as squares (and not rectangles) and circles show as circles (and not ellipses).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-frag-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <rect x="100" y="100" width="50" height="50" fill="rgb(220, 20, 60)" />
+ <rect x="150" y="150" width="50" height="50" fill="rgb(220, 20, 60)" />
+ <circle cx="125" cy="175" r="25" fill="rgb(255, 215, 0)" />
+ <circle cx="175" cy="125" r="25" fill="rgb(255, 215, 0)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-04-t.svg
new file mode 100644
index 0000000000..a9a1c09cc0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-04-t.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="validates svg element with no viewbox" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-frag-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test validates the operation of the svg element when there is no viewbox.</p>
+ <p>The document's size is 480 by 360 with an x/y origin in (1000, 1000). Because x/y are ignored on the root svg element, the x/y origin should have no effect on the drawing.</p>
+ <p>The document contains squares and circles between the (100,100) and (200, 200) coordinates. Changing the viewport size should have no effect on the placement or scale of the document's conten.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-frag-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <rect x="100" y="100" width="50" height="50" fill="rgb(220, 20, 60)" />
+ <rect x="150" y="150" width="50" height="50" fill="rgb(220, 20, 60)" />
+ <circle cx="125" cy="175" r="25" fill="rgb(255, 215, 0)" />
+ <circle cx="175" cy="125" r="25" fill="rgb(255, 215, 0)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-05-t.svg
new file mode 100644
index 0000000000..e1079cb2db
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-05-t.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="CL" desc="support for namespace prefixes" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: struct-frag-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This tests that XML Namespaces are correctly implemented, in that the tuple of local name and namespace URI, rather than the prefix, is important. The first subtest is a group where the namespace prefix 's' is bound to the SVG namespace and an 's:circle' is drawn in pale yellow. The same group declares the default namespace to be a non-SVG namespace; the blue circle element in that namespace must not be drawn.</p>
+ <p>The second subtest puts the namespace declarations on the elements themselves. The prefix 'toto' is bound to the SVG namespace and the XLink namespace is made the default namespace. Thus, the blue '&lt;toto:a href="uri"&gt;Valid&lt;/toto:a&gt;' is a valid link and must be traversable. Select this link, then go back to the test.</p>
+ <p>The third subtest has no prefix on the element name 'a' and uses the usual 'xlink:' prefix on the 'href' attribute. However, both the default namespace and the namespace bound to the 'xlink' prefix are dummy namespaces. Not only should the link not be traversable, it must not even display at all. If the text 'Invalid' is displayed, the test fails.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-frag-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-family="Arial,sans-serif">
+ <s:g xmlns:s="http://www.w3.org/2000/svg" xmlns="http://www.example.org/notsvg">
+ <s:circle cx="240" cy="180" r="130" fill="#FF6" />
+ <circle cx="240" cy="180" r="150" fill="#369" />
+ </s:g>
+ <text x="240" y="100" text-anchor="middle" font-size="40" fill="#369">
+ <toto:a dahut:href="../images/linkingToc-t.svg" xmlns:toto="http://www.w3.org/2000/svg" xmlns:dahut="http://www.w3.org/1999/xlink">Valid</toto:a>
+ </text>
+ <text x="240" y="250" text-anchor="middle" font-size="40" fill="#C33">
+ <a xlink:href="../images/linkingToc-t.svg" xmlns="http://example.org/notsvg" xmlns:xlink="http://example.org/notxlink">Invalid</a>
+ </text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-06-t.svg
new file mode 100644
index 0000000000..168c0b18da
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-frag-06-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="VH" desc="tests required XML features, such as entities and the internal DTD subset" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-frag-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test adds testing of some basic XML features SVG User Agents should support.</p>
+ <p>First, the test checks support for the default entities amp, lt, gt, apos and quot. This is what the first line shows in gray.</p>
+ <p>Second, the test checks support for hexadecimal and decimal character entities, as shown in the second line, again in gray</p>
+ <p>Finally, the last line shows usage of an entity defined in the document's internal DTD subset. The same geometry (a path) is reused twice, once filled in gray and ones stroked in gray.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-frag-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="30" y="30">Default entities: amp, lt, gt, apos, quot: </text>
+ <text x="90" y="60" fill="gray">&amp;, &lt;, &gt;, ', "</text>
+ <text x="30" y="100">Character references:</text>
+ <text x="90" y="130" fill="gray"> A hexadecimal (&amp;#x41)= A</text>
+ <text x="90" y="160" fill="gray"> A decimal (&amp;#65)= A</text>
+ <text x="30" y="200">Entity references:</text>
+ <text x="105" y="228" text-anchor="middle">gray</text>
+ <g transform="translate(90, 235) scale(0.2)" fill="gray">
+ <path d="M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z" />
+ </g>
+ <text x="205" y="228" text-anchor="middle">outlined</text>
+ <g transform="translate(190, 235) scale(0.2)" fill="none" stroke="gray" stroke-width="5">
+ <path d="M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-01-t.svg
new file mode 100644
index 0000000000..f1cc59cd7c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-01-t.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AS" owner="TT" desc="Test that the g element functions correctly as a container." status="accepted"
+ approved="yes"
+ version="$Revision: 1.9 $" testname="$RCSfile: struct-group-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test checks to see that graphics elements (g) can be nested and that the like attributes can be passed to the children. All the g elements for this test are in the g element whose xml:id=allGs. The two red rectangles and the yellow are in the g labeled rects. The reds inherit a fill color the green rect has a fill specified and it should not be overwritten. The two yellow rectangles should inherit the fill color and the transform attribute, they should be yellow and rotated at -20 degrees. These two rectangles are in g "yellowNrotate", that g is nested inside g "gratuitiousG". The black rectangle in the upper right, has no attributes inherited from its parent. The focus is nesting of g elements and passing on of attributes.</p>
+ <p>The rendered picture should match the reference image, except for possible variations in the labelling text (per CSS2 rules).</p>
+ <p>The test uses the 'rect' element, as well as basic fill (solid primary colors), stroke (black 1-pixel lines), font-family (Arial) and font-size properties.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-group-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="rects" fill="red">
+ <rect x="0" y="0" width="240" height="180" />
+ <rect x="60" y="45" width="120" height="90" fill="green" />
+ <rect x="240" y="180" width="240" height="180" />
+ </g>
+ <g xml:id="singleG">
+ <rect x="240" y="0" width="240" height="180" fill="black" />
+ </g>
+ <g xml:id="gratuitiousG">
+ <g xml:id="yellowNrotate" fill="yellow" transform="rotate(-20)">
+ <rect x="0" y="224" width="40" height="40" />
+ <rect x="0" y="280" width="40" height="40" />
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-03-t.svg
new file mode 100644
index 0000000000..7370c1ba88
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-group-03-t.svg
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="property inheritance" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-group-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test validates that properties are inherited (or not, depending on their defintion), from a group to its children.</p>
+ <p>The two rows displayed in this test should be identical. In the top row, each property is set to the value 'inherit'. In the bottom row, which is the reference, each property is set to the value that should be inherited in the top row.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-group-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <rect xml:id="propertyCell" x="-5" y="-14" width="110" height="22" />
+ <rect xml:id="sampleCell" x="-5" y="-14" width="50" height="22" />
+ </defs>
+ <g xml:id="grid" transform="translate(70, 150) rotate(-90)" fill="none" stroke="black">
+ <use xlink:href="#propertyCell" />
+ <use xlink:href="#propertyCell" y="22" />
+ <use xlink:href="#propertyCell" y="44" />
+ <use xlink:href="#propertyCell" y="66" />
+ <use xlink:href="#propertyCell" y="88" />
+ <use xlink:href="#propertyCell" y="110" />
+ <use xlink:href="#propertyCell" y="132" />
+ <use xlink:href="#propertyCell" y="154" />
+ <use xlink:href="#propertyCell" y="176" />
+ <use xlink:href="#propertyCell" y="198" />
+ <use xlink:href="#propertyCell" y="220" />
+ <use xlink:href="#propertyCell" y="242" />
+ <use xlink:href="#propertyCell" y="264" />
+ <use xlink:href="#propertyCell" y="286" />
+ <use xlink:href="#propertyCell" y="308" />
+ <use xlink:href="#propertyCell" y="330" />
+ <use xlink:href="#propertyCell" y="352" />
+ <g transform="translate(-50, 0)">
+ <use xlink:href="#sampleCell" />
+ <use xlink:href="#sampleCell" y="22" />
+ <use xlink:href="#sampleCell" y="44" />
+ <use xlink:href="#sampleCell" y="66" />
+ <use xlink:href="#sampleCell" y="88" />
+ <use xlink:href="#sampleCell" y="110" />
+ <use xlink:href="#sampleCell" y="132" />
+ <use xlink:href="#sampleCell" y="154" />
+ <use xlink:href="#sampleCell" y="176" />
+ <use xlink:href="#sampleCell" y="198" />
+ <use xlink:href="#sampleCell" y="220" />
+ <use xlink:href="#sampleCell" y="242" />
+ <use xlink:href="#sampleCell" y="264" />
+ <use xlink:href="#sampleCell" y="286" />
+ <use xlink:href="#sampleCell" y="308" />
+ <use xlink:href="#sampleCell" y="330" />
+ <use xlink:href="#sampleCell" y="352" />
+ </g>
+ <g transform="translate(-100, 0)">
+ <use xlink:href="#sampleCell" />
+ <use xlink:href="#sampleCell" y="22" />
+ <use xlink:href="#sampleCell" y="44" />
+ <use xlink:href="#sampleCell" y="66" />
+ <use xlink:href="#sampleCell" y="88" />
+ <use xlink:href="#sampleCell" y="110" />
+ <use xlink:href="#sampleCell" y="132" />
+ <use xlink:href="#sampleCell" y="154" />
+ <use xlink:href="#sampleCell" y="176" />
+ <use xlink:href="#sampleCell" y="198" />
+ <use xlink:href="#sampleCell" y="220" />
+ <use xlink:href="#sampleCell" y="242" />
+ <use xlink:href="#sampleCell" y="264" />
+ <use xlink:href="#sampleCell" y="286" />
+ <use xlink:href="#sampleCell" y="308" />
+ <use xlink:href="#sampleCell" y="330" />
+ <use xlink:href="#sampleCell" y="352" />
+ </g>
+ </g>
+ <g xml:id="properties" transform="translate(70, 150) rotate(-90)">
+ <text>color</text>
+ <text y="22">display</text>
+ <text y="44">fill</text>
+ <text y="66">fill-rule</text>
+ <text y="88">stroke</text>
+ <text y="110">stroke-dasharray</text>
+ <text y="132">stroke-dashoffset</text>
+ <text y="154">stroke-linecap</text>
+ <text y="176">stroke-linejoin</text>
+ <text y="198">stroke-miterlimit</text>
+ <text y="220">stroke-width</text>
+ <text y="242">visibility</text>
+ <text y="264">font-family</text>
+ <text y="286">font-size</text>
+ <text y="308">font-style</text>
+ <text y="330">font-weight</text>
+ <text y="352">text-anchor</text>
+ </g>
+ <g xml:id="inheritGroup" transform="translate(56, 155)">
+ <g color="#0F0">
+ <rect x="3" y="10" width="16" height="32" fill="currentColor" />
+ </g>
+ <g display="none" transform="translate(22, 0)">
+ <rect x="3" y="10" width="16" height="32" display="inherit" />
+ </g>
+ <g fill="#0F0" transform="translate(44, 0)">
+ <rect x="3" y="10" width="16" height="32" fill="inherit" />
+ </g>
+ <g fill-rule="evenodd" transform="translate(66, 0)">
+ <polygon points="10.5,0 21,21 0,7 21,7 0,21" fill-rule="inherit" fill="#0F0" transform="translate(3, 15) scale(0.7)" />
+ </g>
+ <g stroke="#0F0" transform="translate(88, 0)">
+ <rect x="3" y="10" width="16" height="32" stroke="inherit" fill="none" />
+ </g>
+ <g stroke-dasharray="2 2 5 5" transform="translate(110, 0)">
+ <line x1="11" y1="5" x2="11" y2="40" stroke="#0F0" stroke-dasharray="inherit" stroke-width="2" />
+ </g>
+ <g stroke-dashoffset="4" transform="translate(132, 0)">
+ <line x1="11" y1="5" x2="11" y2="40" stroke="#0F0" stroke-dashoffset="inherit" stroke-dasharray="2 2 5 5" stroke-width="2" />
+ </g>
+ <g stroke-linecap="round" transform="translate(154, 0)">
+ <line x1="11" y1="10" x2="11" y2="40" stroke="#0F0" stroke-linecap="inherit" stroke-width="10" />
+ </g>
+ <g stroke-linejoin="round" transform="translate(176, 0)">
+ <polyline points="3,40 11,10 19,40" stroke="#0F0" stroke-linejoin="inherit" stroke-width="5" fill="none" />
+ </g>
+ <g stroke-miterlimit="1" transform="translate(198, 0)">
+ <polyline points="3,40 11,10 19,40" stroke="#0F0" stroke-miterlimit="inherit" stroke-width="5" fill="none" />
+ </g>
+ <g stroke-width="5" transform="translate(220, 0)">
+ <line x1="11" y1="10" x2="11" y2="40" stroke="#0F0" stroke-width="inherit" />
+ </g>
+ <g visibility="hidden" transform="translate(242, 0)">
+ <line x1="11" y1="10" x2="11" y2="40" stroke="#0F0" visibility="inherit" />
+ </g>
+ <g font-family="serif" transform="translate(264, 0)">
+ <text x="11" y="30" font-size="20" text-anchor="middle" font-family="inherit">A</text>
+ </g>
+ <g font-size="10" transform="translate(286, 0)">
+ <text x="11" y="30" font-size="inherit" text-anchor="middle" font-family="serif">A</text>
+ </g>
+ <g font-style="italic" transform="translate(308, 0)">
+ <text x="11" y="30" font-style="inherit" text-anchor="middle" font-size="20" font-family="serif">A</text>
+ </g>
+ <g font-weight="bold" transform="translate(330, 0)">
+ <text x="11" y="30" font-weight="inherit" text-anchor="middle" font-family="serif" font-size="20">A</text>
+ </g>
+ <g text-anchor="middle" transform="translate(352, 0)">
+ <text x="11" y="30" text-anchor="inherit" font-family="serif" font-size="20">A</text>
+ </g>
+ </g>
+ <g xml:id="referenceGroup" transform="translate(56, 205)">
+ <g>
+ <rect x="3" y="10" width="16" height="32" fill="#0F0" />
+ </g>
+ <g transform="translate(22, 0)">
+ <rect x="3" y="10" width="16" height="32" display="none" />
+ </g>
+ <g transform="translate(44, 0)">
+ <rect x="3" y="10" width="16" height="32" fill="#0F0" />
+ </g>
+ <g transform="translate(66, 0)">
+ <polygon points="10.5,0 21,21 0,7 21,7 0,21" fill-rule="evenodd" fill="#0F0" transform="translate(3, 15) scale(0.7)" />
+ </g>
+ <g transform="translate(88, 0)">
+ <rect x="3" y="10" width="16" height="32" stroke="#0F0" fill="none" />
+ </g>
+ <g stroke-dasharray="2 2 5 5" transform="translate(110, 0)">
+ <line x1="11" y1="5" x2="11" y2="40" stroke="#0F0" stroke-dasharray="inherit" stroke-width="2" />
+ </g>
+ <g transform="translate(132, 0)">
+ <line x1="11" y1="5" x2="11" y2="40" stroke="#0F0" stroke-dashoffset="4" stroke-dasharray="2 2 5 5" stroke-width="2" />
+ </g>
+ <g transform="translate(154, 0)">
+ <line x1="11" y1="10" x2="11" y2="40" stroke="#0F0" stroke-linecap="round" stroke-width="10" />
+ </g>
+ <g transform="translate(176, 0)">
+ <polyline points="3,40 11,10 19,40" stroke="#0F0" stroke-linejoin="round" stroke-width="5" fill="none" />
+ </g>
+ <g transform="translate(198, 0)">
+ <polyline points="3,40 11,10 19,40" stroke="#0F0" stroke-miterlimit="1" stroke-width="5" fill="none" />
+ </g>
+ <g transform="translate(220, 0)">
+ <line x1="11" y1="10" x2="11" y2="40" stroke="#0F0" stroke-width="5" />
+ </g>
+ <g transform="translate(242, 0)">
+ <line x1="11" y1="10" x2="11" y2="40" stroke="#0F0" visibility="hidden" />
+ </g>
+ <g transform="translate(264, 0)">
+ <text x="11" y="30" font-size="20" text-anchor="middle" font-family="serif">A</text>
+ </g>
+ <g transform="translate(286, 0)">
+ <text x="11" y="30" font-size="10" text-anchor="middle" font-family="serif">A</text>
+ </g>
+ <g transform="translate(308, 0)">
+ <text x="11" y="30" font-style="italic" text-anchor="middle" font-size="20" font-family="serif">A</text>
+ </g>
+ <g transform="translate(330, 0)">
+ <text x="11" y="30" font-weight="bold" text-anchor="middle" font-family="serif" font-size="20">A</text>
+ </g>
+ <g transform="translate(352, 0)">
+ <text x="11" y="30" text-anchor="middle" font-family="serif" font-size="20">A</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-201-t.svg
new file mode 100644
index 0000000000..86ebf33d66
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-201-t.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ snapshotTime="3"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ASl" desc="Tests that the snapshotTime attribute is set" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-svg-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The svg should look the same on both sides and the text
+ should read "OK".
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-svg-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+
+ <rect xml:id="referenceframe" x="10" y="30" width="220" height="280" stroke="#000000" fill="none"/>
+ <rect xml:id="testframe" x="249" y="30" width="220" height="280" stroke="#000000" fill="none"/>
+ <rect xml:id="textframe" x="340" y="315" width="120" height="40" stroke="#000000" fill="none"/>
+
+ <text xml:id="title" x="10" y="25" font-size="15">Get-FloatTrait(snapshotTime) on svg and check value</text>
+ <text xml:id="referencetext" x="75" y="50" font-size="20">reference</text>
+ <text xml:id="scripttext" x="325" y="50" font-size="20">scripted</text>
+ <g fill="black">
+ <text xml:id="status" x="350" y="350" font-size="40" fill="red">Error!</text>
+ </g>
+
+ <text xml:id="reftextelement" x="20" y="150" font-size="25" fill="#184bed">
+ l8 4 bed
+ </text>
+
+ <text xml:id="scripttextelement" x="259" y="150" fill="#184bed" font-size="25">
+ l8 4 bed
+ </text>
+
+ <defs>
+ <path xml:id="moon" fill="#eac900" d="M 0 0 C 50 20 50 80 0 100 C 30 80 30 20 0 0 z" transform="rotate(30)"/>
+ </defs>
+
+ <use xlink:href="#moon" x="90" y="200"/>
+ <use xlink:href="#moon" x="329" y="200"/>
+
+ <script type="application/ecmascript">
+ <![CDATA[
+ var text = document.getElementById("status");
+ var svg = document.getElementById("svg-root");
+ var fs = svg.getFloatTrait("snapshotTime");
+ if(fs == "3")
+ {
+ text.setTrait("#text", "OK!");
+ text.setTrait("fill", "inherit");
+ }
+ ]]>
+ </script>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-202-t.svg
new file mode 100644
index 0000000000..dd4127b237
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-202-t.svg
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ASl" desc="Tests the default value for attribute snapshotTime" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-svg-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The svg shold look the same on both sides and the text
+ should read "OK".
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-svg-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <rect xml:id="referenceframe" x="10" y="30" width="220" height="280" stroke="#000000" fill="none"/>
+ <rect xml:id="testframe" x="249" y="30" width="220" height="280" stroke="#000000" fill="none"/>
+ <rect xml:id="textframe" x="340" y="315" width="120" height="40" stroke="#000000" fill="none"/>
+
+ <text xml:id="title" x="10" y="25" font-size="15">GetFloatTrait(snapshotTime) on svg where snapshotTime is default</text>
+ <text xml:id="referencetext" x="75" y="50" font-size="20">reference</text>
+ <text xml:id="scripttext" x="325" y="50" font-size="20">scripted</text>
+ <g fill="black">
+ <text xml:id="status" x="350" y="350" font-size="40" fill="red">Error!</text>
+ </g>
+
+ <text xml:id="reftextelement" x="20" y="150" font-size="25" fill="#184bed">
+ l8 4 bed
+ </text>
+
+ <text xml:id="scripttextelement" x="259" y="150" fill="#184bed" font-size="25">
+ l8 4 bed
+ </text>
+
+ <defs>
+ <path xml:id="moon" fill="#eac900" d="M 0 0 C 50 20 50 80 0 100 C 30 80 30 20 0 0 z" transform="rotate(30)"/>
+ </defs>
+
+ <use xlink:href="#moon" x="90" y="200"/>
+ <use xlink:href="#moon" x="329" y="200"/>
+
+
+ <script type="application/ecmascript">
+ <![CDATA[
+ var text = document.getElementById("status");
+ var svg = document.getElementById("svg-root");
+ var fs = svg.getFloatTrait("snapshotTime");
+ if(fs == "0")
+ {
+ text.setTrait("#text", "OK!");
+ text.setTrait("fill", "inherit");
+ }
+ ]]>
+ </script>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-203-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-203-t.svg
new file mode 100644
index 0000000000..b2f9516285
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-203-t.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Test svg element in svg." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-svg-203-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test tests that any &lt;svg&gt; elements that are encountered inside
+ an &lt;svg&gt; element are ignored, if the user agent supports SVG Tiny 1.2 only.
+ </p>
+ <p>
+ If the user agent can handle SVG 1.1 Basic or Full, then the test has passed
+ if only the string "This text should be visible if the viewer supports at least SVG 1.1 Basic."
+ is visible.
+ </p>
+ <p>
+ If the user agent supports only SVG 1.2 Tiny then the test has passed if
+ the svg element and it's contents have been ignored. Only the string
+ "This text should be visible if the viewer supports only SVG 1.2 Tiny." should
+ be visible.
+ </p>
+ <p>
+ If <em>both</em> strings are visible then the test has failed.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-svg-203-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <text x="240" y="250" text-anchor="middle" font-size="10">This text should be visible if the viewer supports only SVG 1.2 Tiny.</text>
+
+ <svg x="10" y="200" width="460" height="100" viewBox="0 0 400 100" overflow="visible">
+ <rect width="400" height="100" fill="white"/>
+ <text x="200" y="30" text-anchor="middle" font-size="10">This text should be visible if the viewer supports at least SVG 1.1 Basic.</text>
+ </svg>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-204-t.svg
new file mode 100644
index 0000000000..804120d35e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-svg-204-t.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="-100" height="-1"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Test negative values for width and height on the svg element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-svg-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test is passed if nothing is rendered as the SVG root element
+ contains negative values for the width and height.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-svg-204-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <text x="240" y="150" text-anchor="middle">Failed</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-01-t.svg
new file mode 100644
index 0000000000..ee7dac8b44
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-01-t.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="Tests that the viewer can handle various types of use references" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-use-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The purpose of this test is to validate proper handling of the use element. In particular, the test checks the proper inheritance of properties through the shadow tree (rather than through the document tree).</p>
+ <p>The test should display various elements in different shades of green. If an element is not displayed in green, but in red fill and/or yellow stroke, then it is in error.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <g fill="red" stroke="yellow" stroke-width="3">
+ <rect xml:id="usedRect" width="20" height="20" />
+ <circle xml:id="usedCircle" cx="10" cy="10" r="10" />
+ <ellipse xml:id="usedEllipse" cx="10" cy="10" rx="10" ry="10" />
+ <line xml:id="usedLine" x1="0" y1="10" x2="20" y2="10" />
+ <path xml:id="usedPath" d="M 0 0 L 20 0 L 20 20 L 0 20 Z" />
+ <polygon xml:id="usedPolygon" points="0,0 20,0 20,20 0,20 0 0" />
+ <polyline xml:id="usedPolyline" points="0,0 20,0 20,20" />
+ <g xml:id="usedG">
+ <rect width="10" height="20" />
+ <rect x="10" width="10" height="20" fill="rgb(0,128,0)" />
+ </g>
+ <use xml:id="usedUse" xlink:href="#usedRect" />
+ <image xml:id="usedImage" xlink:href="../images/20x20.png" width="20" height="20" />
+ <text xml:id="usedText">Text</text>
+ </g>
+ </defs>
+ <g>
+ <g xml:id="labels" transform="translate(130, 40)" font-size="20" text-anchor="end">
+ <text>&lt;rect&gt;</text>
+ <text y="30">&lt;circle&gt;</text>
+ <text y="60">&lt;ellipse&gt;</text>
+ <text y="90">&lt;line&gt;</text>
+ <text y="120">&lt;polyline&gt;</text>
+ <text y="150">&lt;polygon&gt;</text>
+ <text y="180">&lt;path&gt;</text>
+ <text y="210">&lt;image&gt;</text>
+ <text y="240">&lt;text&gt;</text>
+ </g>
+ <g xml:id="labelsColumn2" transform="translate(310, 40)" font-size="20" text-anchor="end">
+ <text>&lt;g&gt;</text>
+ <text y="30">&lt;use&gt;</text>
+ </g>
+ </g>
+ <g transform="translate(150, 25)">
+ <use xlink:href="#usedRect" fill="#0F0" />
+ <use y="30" xlink:href="#usedCircle" fill="#0F0" />
+ <use y="60" xlink:href="#usedEllipse" fill="#0F0" />
+ <use y="90" xlink:href="#usedLine" stroke="#0F0" stroke-width="2" />
+ <use y="120" xlink:href="#usedPolyline" stroke="#0F0" stroke-width="2" fill="none" />
+ <use y="150" xlink:href="#usedPolygon" fill="#0F0" />
+ <use y="180" xlink:href="#usedPath" fill="#0F0" />
+ <use y="210" xlink:href="#usedImage" fill="#FF0" />
+ <use y="260" xlink:href="#usedText" fill="#0F0" font-weight="bold" font-size="25" font-style="italic" />
+ <use x="180" y="0" xlink:href="#usedG" fill="#0F0" />
+ <use x="180" y="30" xlink:href="#usedUse" fill="#0c0" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-03-t.svg
new file mode 100644
index 0000000000..c68cf8f321
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-03-t.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CN" owner="VH" desc="tests x/y attribs on use element" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: struct-use-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The purpose of this test is to validate proper handling of the x/y attributes on the use element.</p>
+ <p>The test shows a &lt;use&gt; element displayed on the right. On the left, a group built as described in section 5.6 of the SVG 1.1 specification validates that the &lt;use element is properly processed.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <rect xml:id="usedRect" width="100" height="100" fill="rgb(250,220,0)" stroke="rgb(200,40,40)" stroke-width="20" />
+ </defs>
+ <text x="120" y="60" text-anchor="middle">Reference</text>
+ <text x="360" y="60" text-anchor="middle">&lt;use&gt;</text>
+ <!-- This group is constructed as described in section 5.6 of the -->
+ <!-- SVG 1.1 Specification. -->
+ <g xml:id="reference" transform="rotate(45,120,170) translate(70,120)">
+ <rect width="100" height="100" fill="rgb(250,220,0)" stroke="rgb(200,40,40)" stroke-width="20" />
+ </g>
+ <g transform="translate(240, 0)">
+ <use xlink:href="#usedRect" x="70" y="120" transform="rotate(45,120,170)" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-09-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-09-t.svg
new file mode 100644
index 0000000000..4444575405
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-09-t.svg
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE, AG" owner="AN, DS" desc="Tests the use element in symbol definition" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-use-09-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This tests a set of 'use' and 'rect' elements inside 'g' elements, with
+ each referencing the one before. For the test to pass, 5 nested
+ rectangles with a green stroke must be rendered, and no red rectangles
+ must be rendered.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-09-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content">
+ <!-- put all of the actual test here -->
+ <defs>
+ <g xml:id="rect1">
+ <rect x="-50" y="-50" width="100" height="100" fill="none" stroke="green" stroke-width="3" />
+ </g>
+ <g xml:id="rect2">
+ <use xlink:href="#rect1" />
+ <rect x="-55" y="-55" width="110" height="110" fill="none" stroke="green" stroke-width="3" />
+ </g>
+ <g xml:id="rect3">
+ <use xlink:href="#rect2" />
+ <rect x="-60" y="-60" width="120" height="120" fill="none" stroke="green" stroke-width="3" />
+ </g>
+ <g xml:id="rect4">
+ <use xlink:href="#rect3" />
+ <rect x="-65" y="-65" width="130" height="130" fill="none" stroke="green" stroke-width="3" />
+ </g>
+ <g xml:id="rects">
+ <use xlink:href="#rect4" />
+ <rect x="-70" y="-70" width="140" height="140" fill="none" stroke="green" stroke-width="3" />
+ </g>
+ </defs>
+
+ <g>
+ <rect x="190" y="130" width="100" height="100" fill="none" stroke="red" />
+ <rect x="185" y="125" width="110" height="110" fill="none" stroke="red" />
+ <rect x="180" y="120" width="120" height="120" fill="none" stroke="red" />
+ <rect x="175" y="115" width="130" height="130" fill="none" stroke="red" />
+ <rect x="170" y="110" width="140" height="140" fill="none" stroke="red" />
+ </g>
+
+ <use x="240" y="180" xlink:href="#rects" />
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-201-t.svg
new file mode 100644
index 0000000000..ed6b32215d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-201-t.svg
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Test reference restrictions on the 'use' element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-use-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test tests reference restrictions on the use element. Each of the 5 different
+ restrictions is tested.
+ </p>
+ <p>
+ A compliant SVG Tiny 1.2 user agent must treat each of the invalid IRI:s as if the xlink:href
+ attribute hadn't been specified, which is the same as disabling rendering of the use element
+ in question. Thus for the test to pass none of the content that the use elements try to reference
+ must be visible, the end result should be 5 empty (white) rects.
+ </p>
+ <p>
+ For a user agent that handles at least SVG 1.1 Basic the testcase has still passed if the referenced
+ content in the rect that is labelled "B" is visible since this is allowed for 1.1.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="240" y="50" text-anchor="middle">Test &lt;use&gt; reference restrictions</text>
+
+ <g>
+ <!-- this is an invalid IRI because it directly creates a circular dependency -->
+ <use xlink:href="#svg-root" x="20" y="105" width="80" height="80"/>
+ <rect x="15" y="100" width="90" height="120" fill="none" stroke="black"/>
+ <rect x="15" y="190" width="90" height="30" fill="none" stroke="black"/>
+ <text x="60" y="210" text-anchor="middle">A</text>
+ </g>
+ <g>
+ <!-- this is an invalid IRI because it references an svg fragment, however it may be visible if SVG 1.1 is supported -->
+ <use xlink:href="../images/resources.svg#svg-root" x="110" y="105" width="80" height="80"/>
+ <rect x="105" y="100" width="90" height="120" fill="none" stroke="black"/>
+ <rect x="105" y="190" width="90" height="30" fill="none" stroke="black"/>
+ <text x="150" y="210" text-anchor="middle">B</text>
+ </g>
+ <g>
+ <!-- this is an invalid IRI because it references an entire file -->
+ <use xlink:href="../images/resources.svg" x="200" y="105" width="80" height="80"/>
+ <rect x="195" y="100" width="90" height="120" fill="none" stroke="black"/>
+ <rect x="195" y="190" width="90" height="30" fill="none" stroke="black"/>
+ <text x="240" y="210" text-anchor="middle">C</text>
+ </g>
+ <g>
+ <!-- this is an invalid IRI because it references a media resource other than svg -->
+ <use xlink:href="../images/1pixelred.png" x="290" y="105" width="80" height="80"/>
+ <rect x="285" y="100" width="90" height="120" fill="none" stroke="black"/>
+ <rect x="285" y="190" width="90" height="30" fill="none" stroke="black"/>
+ <text x="330" y="210" text-anchor="middle">D</text>
+ </g>
+ <g>
+ <!-- this is an invalid IRI because data IRI:s are not allowed on 'use' -->
+ <use xlink:href="data:image/svg+xml;charset=utf-8,%3Crect%20width%3D%22100%22%20height%3D%22100%22%20fill%3D%22red%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%2F%3E"
+ x="380" y="105" width="80" height="80"/>
+ <rect x="375" y="100" width="90" height="120" fill="none" stroke="black"/>
+ <rect x="375" y="190" width="90" height="30" fill="none" stroke="black"/>
+ <text x="420" y="210" text-anchor="middle">E</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-202-t.svg
new file mode 100644
index 0000000000..414f292039
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-202-t.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Test reference restriction B on the 'use' element." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: struct-use-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test tests the reference restriction B on the use element.
+ </p>
+ <p>
+ A compliant SVG Tiny 1.2 user agent must treat each of the invalid IRI:s as if the xlink:href
+ attribute hadn't been specified, which is the same as disabling rendering of the use element
+ in question. Thus for the test to pass the content that the use element tries to reference
+ must be invisible, the end result should be an empty (white) rect.
+ </p>
+ <p>
+ For a user agent that handles at least SVG 1.1 Basic the testcase has still passed if the referenced
+ content in the rect that is labelled "B" is visible since this is allowed for 1.1.
+ If the script in the external resource is executed then the color of the rect will be green.
+ If not then the rect will be red.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="240" y="50" text-anchor="middle">Test &lt;use&gt; reference restriction B</text>
+
+ <g>
+ <!-- it's unclear if this is an invalid IRI, it references a fragment that has a script in it -->
+ <use xlink:href="../images/scriptresource.svg#g" x="110" y="105" width="80" height="80"/>
+ <rect x="105" y="100" width="90" height="120" fill="none" stroke="black"/>
+ <rect x="105" y="190" width="90" height="30" fill="none" stroke="black"/>
+ <text x="150" y="210" text-anchor="middle">B</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-203-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-203-t.svg
new file mode 100644
index 0000000000..f501c6a132
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-203-t.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL, AS" owner="BB" desc="Tests external references on the use element" status="accepted"
+ approved="yes"
+ version="$Revision: 1.2 $" testname="$RCSfile: struct-use-203-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The intent of the file is to determine if the UA supports references to external SVG fragments. To pass this test, the UA agent must display a total of 8 graphical primitives (2 rectangles, 2 circles, 2 ellipses and 2 triangles). For each object, the UA should display a semi transparent duplicate copy at an offset position. See referenced image.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-203-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="ExtContent">
+ <use xlink:href="../images/svgRef12.svg#alpha" />
+ <use xlink:href="../images/svgRef12.svg#beta" />
+ <use xlink:href="../images/svgRef12.svg#gamma" />
+ <use xlink:href="../images/svgRef12.svg#delta" />
+ <use xlink:href="../images/svgRef12.svg#testContent" x="-5" y="5" fill-opacity="0.5" />
+ </g>
+ <text font-size="20" x="240" y="30" text-anchor="middle">External references on &lt;use&gt;</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.2 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-204-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-204-t.svg
new file mode 100644
index 0000000000..bcbfdb3279
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-204-t.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL, AS" owner="BB" desc="Tests external references on the use element" status="accepted"
+ approved="yes"
+ version="$Revision: 1.2 $" testname="$RCSfile: struct-use-204-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The intent of the file is to determine if the UA supports references to external SVG fragments. To pass this test, the UA agent must display a total of 8 graphical primitives (2 rectangles, 2 circles, 2 ellipses and 2 triangles). For each object, the UA should display a semi-transparent duplicate copy at an offset position. See referenced image.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-204-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g xml:id="ExtContent">
+ <use xlink:href="../images/svgRef12.svg#alpha" />
+ <use xlink:href="../images/svgRef12.svg#beta" />
+ <use xlink:href="../images/svgRef12.svg#gamma" />
+ <use xlink:href="../images/svgRef12.svg#delta" />
+ <use xlink:href="../images/svgRef12.svg#testContent" x="-5" y="5" fill-opacity="0.5" />
+ </g>
+ <text font-size="20" x="240" y="30" text-anchor="middle">External references on &lt;use&gt;</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.2 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-205-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-205-t.svg
new file mode 100644
index 0000000000..e185903c75
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-205-t.svg
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="ED" desc="Test SVGElementInstance and events" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-use-205-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test checks some aspects of the SVGElementInstance with regards to events.
+ </p>
+ <p>
+ Four blue rects should be visible at first. To run the test each rect must be clicked a minimum of two times. Once
+ to run the basic test, and once to verify that the event handler was removed properly. The test has passed if after
+ clicking all the rects two times or more there are four green rects with the word "Passed" on them. If anything red
+ is visible or the text on any of the rects say "Failed" then the test has failed.
+ </p>
+ <p>
+ The top-left rect checks that correspondingUseElement and correspondingElement are returning the correct values, and
+ also that the currentTarget isn't the same as target here.
+ </p>
+ <p>
+ The top-right rect checks that events bubble the correct way when SVGElementInstance is involved. It's almost the same
+ as the first subtest, but uses another 'use' element.
+ </p>
+ <p>
+ The bottom-left rect doesn't use 'use' elements at all, it's to illustrate event bubbling in normal trees as compared
+ to SVGElementInstance trees.
+ </p>
+ <p>
+ The bottom-right rect uses nested 'use' elements. The event handler 'nestedhandler' should be executed first, and will
+ check some aspects of nested use elements. It will modify what it references, and that is checked in the 'h4' event
+ handler.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-205-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="240" y="50" text-anchor="middle">Test SVGElementInstance and events</text>
+
+ <defs>
+ <g xml:id="g">
+ <rect xml:id="r" width="100" height="100" rx="10"/>
+ <text xml:id="t" font-size="9" x="50" y="50" text-anchor="middle" pointer-events="none" fill="white">Click here</text>
+ </g>
+ <use xml:id="nesteduse" xlink:href="#g">
+ <handler xml:id="nestedhandler" xe:event="click">
+ var link = "#fail";
+ // The correspondingUseElement is always the outermost use element if use elements are nested
+ if(event.target.correspondingUseElement == document.getElementById("u3"))
+ {
+ // The currentTarget is the 'nesteduse' use element when this event is received,
+ // and the target is the element where the event originated
+ if(event.currentTarget.correspondingElement == document.getElementById("nesteduse"))
+ {
+ link = "#pass";
+ }
+ }
+ document.getElementById("nesteduse").setAttributeNS("http://www.w3.org/1999/xlink", "href", link);
+
+ // Remove the handler, so that clicking again does nothing
+ document.getElementById("nesteduse").removeChild(document.getElementById("nestedhandler"));
+ </handler>
+ </use>
+ <g xml:id="fail">
+ <rect xml:id="rf" width="100" height="100" fill="red" rx="10"/>
+ <text xml:id="tf" font-size="9" x="50" y="50" text-anchor="middle" pointer-events="none" fill="white">Failed</text>
+ </g>
+ <g xml:id="pass">
+ <rect xml:id="rp" width="100" height="100" fill="green" rx="10"/>
+ <text xml:id="tp" font-size="9" x="50" y="50" text-anchor="middle" pointer-events="none" fill="white">Passed</text>
+ </g>
+ </defs>
+
+ <g transform="translate(40,-20)" fill="blue">
+ <use xml:id="u1" xlink:href="#g" x="100" y="100">
+ <handler xml:id="h1" xe:event="click">
+ var link = "#fail";
+ // The currentTarget is this use element, and the target should be the rect element where
+ // the event originated. Checks these conditions.
+ // if(event.target != event.currentTarget)
+ {
+ if(event.target.correspondingUseElement == event.currentTarget)
+ {
+ if(event.target.correspondingElement == document.getElementById("r"))
+ {
+ link = "#pass";
+ }
+ }
+ }
+ document.getElementById("u1").setAttributeNS("http://www.w3.org/1999/xlink", "href", link);
+
+ // Remove the handler, so that clicking again does nothing
+ document.getElementById("u1").removeChild(document.getElementById("h1"));
+ </handler>
+ </use>
+ <use xml:id="u2" xlink:href="#g" x="204" y="100">
+ <handler xml:id="h2" xe:event="click">
+ var link = "#fail";
+ // The target element should have a correspondingUseElement that is the element using it.
+ // In this case it should be 'u2', and the correspondingElement should be the rect with id 'r'.
+ if(event.target.correspondingUseElement == document.getElementById("u2"))
+ {
+ if(event.target.correspondingElement == document.getElementById("r"))
+ {
+ link = "#pass";
+ }
+ }
+ document.getElementById("u2").setAttributeNS("http://www.w3.org/1999/xlink", "href", link);
+
+ // Remove the handler, so that clicking again does nothing
+ document.getElementById("u2").removeChild(document.getElementById("h2"));
+ </handler>
+ </use>
+ <g xml:id="g3" transform="translate(100,204)">
+ <rect xml:id="r3" width="100" height="100" rx="10"/>
+ <text xml:id="t3" font-size="9" x="50" y="50" text-anchor="middle" pointer-events="none" fill="white">Click here</text>
+
+ <handler xml:id="h3" xe:event="click">
+ var status = "Failed";
+ // This subtest is included to show the how target and currentTarget works on normal elements.
+ if(event.target != event.currentTarget)
+ {
+ if(event.target == document.getElementById("r3"))
+ {
+ if(event.currentTarget == document.getElementById("g3"))
+ {
+ status = "Passed";
+ }
+ }
+ }
+ document.getElementById("r3").setAttributeNS(null, "fill", status == "Passed" ? "green" : "red");
+ document.getElementById("t3").textContent = status;
+
+ // Remove the handler, so that clicking again does nothing
+ document.getElementById("g3").removeChild(document.getElementById("h3"));
+ </handler>
+ </g>
+ <use xml:id="u3" xlink:href="#nesteduse" x="204" y="204">
+ <handler xml:id="h4" xe:event="click">
+ var link = "#fail";
+ // If the nested use handler was executed then the rect element where the event originated has no
+ // corresponding use element anymore, correspondingUseElement will be null.
+ if(!event.target.correspondingUseElement)
+ {
+ if(event.target.correspondingElement == document.getElementById("r"))
+ {
+ link = "#pass";
+ }
+ }
+ document.getElementById("u3").setAttributeNS("http://www.w3.org/1999/xlink", "href", link);
+
+ // Remove the handler, so that clicking again does nothing
+ document.getElementById("u3").removeChild(document.getElementById("h4"));
+ </handler>
+ </use>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-206-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-206-t.svg
new file mode 100644
index 0000000000..de8695755c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-206-t.svg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AS" owner="ED" desc="Tests interaction in use element" status="accepted"
+ approved="yes"
+ version="$Revision: 1.1 $" testname="$RCSfile: struct-use-206-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ If the user agent supports referencing external content you should see three green rects.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-206-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <use xml:id="use-elm" x="60" y="50" xlink:href="../images/struct-use-206-resource.svg#svg-root"/>
+ <rect x="300" y="170" width="120" height="120" fill="lime" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.1 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--
+ <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-207-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-207-t.svg
new file mode 100644
index 0000000000..48952d0418
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-207-t.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="AG" desc="Tests external references and computed inherited values" status="accepted"
+ approved="yes"
+ version="$Revision: 1.2 $" testname="$RCSfile: struct-use-207-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This file is intented to test the computed values in external
+ references. Both files (referencing and referenced) define similar
+ colors/gradients via 'color', 'linearGradient' and 'radialGradient'.
+ The ids of those definitions are the same but the actual appearance are
+ different. These definitions are used to test the property inheritance
+ feature of SVG.
+ </p>
+ <p>
+ The top left rectangle should be filled with the blue linear gradient
+ since the 'use' has a specified value defined in the 'defs' section.
+ The top right rectangle is forestgreen since the 'use' has a computed
+ value. The bottom left rectangle is also forestgreen since the fill is
+ not inherited from the referenced element's original parent. The bottom
+ right rectangle is filled with the orange radial gradient since the
+ computed value is given by the CSS cascade.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-207-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient xml:id="linearGrad1" gradientUnits="objectBoundingBox" y1="0" x1="0" y2="1" x2="1">
+ <stop offset="0" stop-color="blue" />
+ <stop offset="0.33" stop-color="white" />
+ <stop offset="0.5" stop-color="navy" />
+ <stop offset="0.66" stop-color="white" />
+ <stop offset="1.0" stop-color="blue" />
+ </linearGradient>
+ <radialGradient xml:id="radialGrad1" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.5">
+ <stop offset="0" stop-color="blue" />
+ <stop offset="0.33" stop-color="white" />
+ <stop offset="0.5" stop-color="navy" />
+ <stop offset="0.66" stop-color="white" />
+ <stop offset="1.0" stop-color="blue" />
+ </radialGradient>
+ </defs>
+ <g color="green">
+ <use xlink:href="../images/svgRef13.svg#rect1" fill="url(#linearGrad1)" />
+ <use xlink:href="../images/svgRef13.svg#rect2" fill="currentColor" />
+ <use xlink:href="../images/svgRef13.svg#rect3" />
+ <use xlink:href="../images/svgRef13.svg#rect4" />
+ <text font-size="24" x="240" y="35" text-anchor="middle">External references and computed values</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.2 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-208-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-208-t.svg
new file mode 100644
index 0000000000..1c2ee83ba2
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-208-t.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="AG" desc="Tests interaction in use element" status="accepted"
+ approved="yes"
+ version="$Revision: 1.3 $" testname="$RCSfile: struct-use-208-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests the reference a group of shapes with the use element.
+ </p>
+ <p>
+ The test is passed if two green circles with a black border are
+ rendered.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-208-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g fill="red">
+ <g xml:id="ref_circle">
+ <circle cx="150" cy="100" r="60" stroke="black" stroke-width="3"/>
+ <circle cx="300" cy="100" r="60" stroke="black" stroke-width="3"/>
+ </g>
+ </g>
+
+ <use xml:id="use-elm" x="0" y="0" xlink:href="#ref_circle" fill="green"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-209-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-209-t.svg
new file mode 100644
index 0000000000..e011582d61
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-209-t.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="AG" desc="Tests cyclic references" status="accepted"
+ approved="yes"
+ version="$Revision: 1.2 $" testname="$RCSfile: struct-use-209-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests circular references.
+ </p>
+ <p>
+ For this test to pass the green text "This text should be visible." must
+ be rendered. It is not an error if graphics are visible in addition to
+ the green text. It is not a requirement that graphics be rendered in
+ addition to the green text.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-209-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g transform="translate(60,50)">
+ <use xml:id="use-elm-1" xlink:href="../images/struct-use-209-t-cycles.svg#svg-root"/>
+ <rect width="120" height="120" fill="none" stroke="black"/>
+ <text x="60" y="140" text-anchor="middle" font-size="14">'use' referencing 'svg' element</text>
+ </g>
+
+ <g transform="translate(300,50)">
+ <use xml:id="use-elm-2" xlink:href="../images/struct-use-209-t-cycles.svg#image"/>
+ <rect width="120" height="120" fill="none" stroke="black"/>
+ <text x="60" y="140" text-anchor="middle" font-size="14">'use' referencing 'image' element</text>
+ </g>
+
+ <text x="240" y="260" text-anchor="middle" fill="green" font-size="35">This text should be visible.</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.2 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-01-t.svg
new file mode 100644
index 0000000000..6c0efd5143
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-01-t.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="DS" desc="Test for recursion in 'use' elements." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-use-recursion-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test checks for recursion in 'use' elements. The passing conditions are that the browser does not crash, and that at least one orange circle, and one yellow circle, and a line of green text are rendered.
+ Also, on an implementation-specific basis, additional orange and yellow circles with a dashed gray stroke may or may not be rendered, depending upon when and how the implementation detects the circular reference,
+ with the number of dashed circles of a given color indicating now many times the level of recurrsion permitted by the implementation.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-recursion-01-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g xml:id="group-1">
+ <circle xml:id="circle-1" cx='100' cy='25' r='10' fill='#FF7F00' />
+ <use xml:id="use-1" x="0" y="25" xlink:href="#group-2" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+ </g>
+ <g xml:id="group-2">
+ <circle xml:id="circle-2" cx='380' cy='25' r='10' fill='#FFFF00' />
+ <use xml:id="use-2" x="0" y="25" xlink:href="#group-1" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+ </g>
+
+ <text xml:id="pass" x="240" y="280" text-anchor="middle" fill="green" font-size="24">This text should be visible.</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-02-t.svg
new file mode 100644
index 0000000000..f65fb8e58e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-02-t.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="DS" desc="Test for recursion in 'use' elements referencing external files." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-use-recursion-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test checks for recursion in 'use' elements with external references. The passing conditions are that the browser does not crash, and that the green test is rendered. The passing conditions are that the
+ browser does not crash, and that at least one orange circle and a line of green text are rendered. Also, on an implementation-specific basis, additional orange and yellow circles with a dashed gray stroke may or may
+ not be rendered, depending upon when and how the implementation detects the circular reference, with the number of dashed circles of a given color indicating now many times the level of recurrsion permitted by the implementation..
+ </p>
+ <p>
+ This test depends upon 'struct-use-recursion-03-t.svg'.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-recursion-02-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g xml:id="group-1">
+ <circle xml:id="circle-1" cx='100' cy='25' r='10' fill='#FF7F00' />
+ <use xml:id="use-1" x="0" y="25" xlink:href="struct-use-recursion-03-t.svg#group-2" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+ </g>
+
+ <text xml:id="pass" x="240" y="280" text-anchor="middle" fill="green" font-size="24">This text should be visible.</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-03-t.svg
new file mode 100644
index 0000000000..6cf57caa86
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/struct-use-recursion-03-t.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="DS" desc="Test for recursion in 'use' elements referencing external files." status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: struct-use-recursion-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test checks for recursion in 'use' elements with external references. The passing conditions are that the browser does not crash, and that at least one yellow circle and a line of green text are rendered.
+ Also, on an implementation-specific basis, additional orange and yellow circles with a dashed gray stroke may or may not be rendered, depending upon when and how the implementation detects the circular reference,
+ with the number of dashed circles of a given color indicating now many times the level of recurrsion permitted by the implementation.
+ </p>
+ <p>
+ This test depends upon 'struct-use-recursion-02-t.svg'. It differs from 'struct-use-recursion-02-t.svg' in that the 'use' element comes before the 'circle' element.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: struct-use-recursion-03-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g xml:id="group-2">
+ <use xml:id="use-2" x="0" y="25" xlink:href="struct-use-recursion-02-t.svg#group-1" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+ <circle xml:id="circle-2" cx='380' cy='25' r='10' fill='#FFFF00' />
+ </g>
+
+ <text xml:id="pass" x="240" y="280" text-anchor="middle" fill="green" font-size="24">This text should be visible.</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-inherit-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-inherit-01-t.svg
new file mode 100644
index 0000000000..9b15770eec
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-inherit-01-t.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE,AN" owner="CL" desc="Verify property inheritance" status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: styling-inherit-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Verify property inheritance as required by 6.7 "Property inheritance". </p>
+ <p>For this test to pass:</p>
+ <p>At the center right, there is an ellipse. The fill color is not specified on that element but on its parent. The ellipse must be filled a solid yellow</p>
+ <p>At the top left, an oval shape is formed from a rectangle with a radial gradient. The color of the middle stop uses the keyword 'inherit' and thus takes its parent's value of green, giving a yellow, green, white gradient from the center to the edge.</p>
+ <p>At the bottom left, an oval shape is formed from a rectangle with a radial gradient. The color of the middle stop uses the value 'currentColor' and thus takes the value its parent's color property, a dark red, giving a yellow, dark red, white gradient from the center to the edge</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: styling-inherit-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g fill="yellow">
+ <g stroke="#555">
+ <ellipse rx="90" ry="60" cx="330" cy="140" />
+ </g>
+ </g>
+ <radialGradient xml:id="ygw" stop-color="green">
+ <stop offset="0%" stop-color="yellow" />
+ <stop offset="50%" stop-color="inherit" />
+ <stop offset="100%" stop-color="white" />
+ </radialGradient>
+ <rect width="180" height="120" x="40" y="20" stroke="none" fill="url(#ygw)" />
+ <radialGradient xml:id="yrw" color="#700">
+ <stop offset="0%" stop-color="yellow" />
+ <stop offset="50%" stop-color="currentColor" />
+ <stop offset="100%" stop-color="white" />
+ </radialGradient>
+ <rect width="180" height="120" x="40" y="160" stroke="none" fill="url(#yrw)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-pres-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-pres-01-t.svg
new file mode 100644
index 0000000000..3fc2f57a40
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/styling-pres-01-t.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CL" desc="Check !important in presentation attribute is an unsupported value" status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: styling-pres-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Check that !important in presentation attribute is an unsupported attribute value. To pass, two rectangles should be drawn. A black filled rectangle and a lime green stroked rectangle.</p>
+ <p>
+ A fill attribute is set to red with !important. This is an unsupported attribute value,
+ consequently the fill attribute should be the lacuna value, which is black. Therefore, to pass, the rectangle should be filled with black.
+ </p>
+ <p>A lime green border is also drawn, to check that rendering continues after the element with the unsupported value.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: styling-pres-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <circle r="80" cx="240" cy="150" fill="blue" />
+ <rect width="200" height="160" x="140" y="70" fill="red !important" />
+ <rect width="200" height="160" x="140" y="70" fill="none" stroke="lime" stroke-width="4" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-01-t.svg
new file mode 100644
index 0000000000..8b345cdab2
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-01-t.svg
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="JF" desc="Test 'text-anchor' property (horizontal)." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-align-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test 'text-anchor' property (horizontal).</p>
+ <p>The three lines test the three values for property 'text-anchor': start, middle and end.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-align-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="34" x="5" y="40">Test 'text-anchor' (horizontal)</text>
+ <g xml:id="text-anchor" font-family="Arial" font-size="14">
+ <g transform="translate(230,130)">
+ <line stroke="black" x2="50" />
+ <circle r="3" />
+ <text font-size="30" fill="red">text-anchor:none</text>
+ </g>
+ <g transform="translate(230,180)">
+ <line stroke="black" x2="50" />
+ <circle r="3" />
+ <text font-size="30" text-anchor="start" fill="red">text-anchor:start</text>
+ </g>
+ <g transform="translate(230,230)">
+ <line stroke="black" x1="-25" x2="25" />
+ <circle r="3" />
+ <text font-size="30" text-anchor="middle" fill="green">text-anchor:middle</text>
+ </g>
+ <g transform="translate(230,280)">
+ <line stroke="black" x1="-50" x2="0" />
+ <circle r="3" />
+ <text font-size="30" text-anchor="end" fill="blue">text-anchor:end</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-07-t.svg
new file mode 100644
index 0000000000..14ebfe8a52
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-07-t.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CN" desc="Test horizontal baselines across script and font size changes." status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-align-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test horizontal baselines across script and font size changes.</p>
+ <p>
+ The dominant baseline should be alphabetic, so the 'ab' will be sitting
+ on the blue line, the japanese glyphs will be on the ideographic
+ baseline and '&#2339;' is a devangari character and will use the hanging
+ baseline. The smaller versions of the characters should be aligned to
+ the same baselines. So 'ab' on the blue line, the ideographic chars
+ slightly below the line and the devangari should be hanging from the
+ hanging baseline.
+ </p>
+ <p>Original test authored by Rodney Hardy at CISRA.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-align-07-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-family="'Arial Unicode MS',Georgia,'Times New Roman',Times,'MS Mincho',serif" font-size="30">
+ <!-- The dominant baseline should be alphabetic, so the 'ab' will be sitting on the blue line, the japanese glyphs will be on the ideographic baseline and '&#2339;' is a devangari character and will use the hanging baseline. The smaller versions of the characters should be aligned to the same baselines. So 'ab' on the blue line, the ideographic chars slightly below the line and the devangari should be hanging from the hanging baseline. -->
+ <text x="50" y="100" font-size="50">
+ a&#29340;&#2339;
+ <tspan font-size="25">a&#29340;&#2339;</tspan>
+ <tspan font-size="10">a&#29340;&#2339;</tspan>
+ </text>
+ <line x1="50" y1="100" x2="400" y2="100" stroke-width="1" stroke="blue" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-08-t.svg
new file mode 100644
index 0000000000..44447646d6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-08-t.svg
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="CN" desc="Test horizontal baselines across script and font size changes (SVG Font)." status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-align-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test horizontal baselines across script and font size changes. It uses
+ an SVG Font, where the Latin letter "a" is a rectangle, the Japanese
+ letter "犜" is an upward-pointing triangle, and the Devanagari letter
+ "ण" is a downward-pointing triangle.
+ </p>
+ <p>
+ The dominant baseline should be alphabetic, so the 'a' will be sitting
+ on the alphabetic (blue) line, the japanese glyph (upward pointing
+ triangle) will be aligned on the ideographic (red) baseline and 'ण' is
+ a devangari character (downward pointing triangle) and will use the
+ hanging baseline (green). The smaller versions of the characters should
+ be aligned to the same baselines as the respective larger characters,
+ so all like shapes align to the same baseline..
+ </p>
+ <p>Original test authored by Rodney Hardy at CISRA.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-align-08-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font horiz-adv-x="500">
+ <font-face font-family="SVGFont" units-per-em="1000" ascent="800" descent="200" alphabetic="200" ideographic="0" hanging="900" />
+ <missing-glyph horiz-adv-x="500" d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z" />
+ <glyph unicode=" " glyph-name="space" />
+ <glyph unicode="a" glyph-name="rectangle" d="M0 200L500 200L500 900L0 900Z" />
+ <glyph unicode="犜" glyph-name="upward-triangle" d="M0 0L500 0L250 900Z" />
+ <glyph unicode="ण" glyph-name="downward-triangle" d="M0 900L500 900L250 0Z" />
+ </font>
+ </defs>
+ <g font-family="SVGFont">
+ <!-- The dominant baseline should be alphabetic, so the 'ab' will be sitting on the blue line, the japanese glyphs will be on the ideographic baseline and '&#2339;' is a devangari character and will use the hanging baseline. The smaller versions of the characters should be aligned to the same baselines. So 'a' on the blue line, the ideographic chars slightly below the line and the devangari should be hanging from the hanging baseline. -->
+ <text x="50" y="200" font-size="150">
+ a犜ण
+ <tspan font-size="75">a犜ण</tspan>
+ <tspan font-size="30">a犜ण</tspan>
+ </text>
+ <line x1="50" y1="200" x2="433" y2="200" stroke-width="1" stroke="blue" />
+ <line x1="50" y1="230" x2="433" y2="230" stroke-width="1" stroke="red" />
+ <line x1="50" y1="95" x2="433" y2="95" stroke-width="1" stroke="green" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-201-t.svg
new file mode 100644
index 0000000000..33a60b08ed
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-201-t.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="DS" desc="Test viewer basic capability to handle 'text-anchor' property." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-align-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test for viewer capability to handle the basics of the 'textAnchor'
+ alignment property for 'text' when it has child elements.
+ </p>
+ <p>
+ The first line from the top tests that a 'tspan' element is rendered
+ after the text content of the parent 'text' element.
+ </p>
+ <p>
+ The second line from the top tests that all the text content, including
+ that of child 'tspan' elements, is taken into account when positioning
+ the text with respect to its alignment point.
+ </p>
+ <p>
+ The rendered picture should match the reference image, except for
+ possible variations in the text fonts and layout (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-align-201-t.svg,v $</title>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="5" y="40" font-size="40" fill="black">Test of 'text-anchor'</text>
+ <text x="20" y="80" font-size="30" fill="black">text-anchor, text and tspan</text>
+ <!-- Test cases -->
+ <line x1="220" y1="120" x2="220" y2="260" stroke="red" />
+ <g font-family="Arial" font-size="30" fill="blue">
+ <text x="220" y="140" text-anchor="start">
+ start text
+ <tspan xml:space="preserve" fill="red"> red tspan</tspan>
+ </text>
+ <text x="220" y="180" text-anchor="middle" font-size="23">
+ first text <tspan font-weight="bold">first tspan</tspan> <tspan font-weight="bold">last tspan</tspan> last text
+ </text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-202-t.svg
new file mode 100644
index 0000000000..52c96d5f99
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-align-202-t.svg
@@ -0,0 +1,895 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CL" desc="test alignment on RTL text" status="accepted"
+ approved="yes"
+ version="$Revision: 1.10 $" testname="$RCSfile: text-align-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>This test checks for text alignment on right-to-left text.</p>
+ <p>The first subtest has the word for 'Egypt', مص</p>
+ <p>The second subtest has the hebrew text פעילות </p>
+ <p>Text-anchor values of start are black, middle are maroon and end are dark blue.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-align-202-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <font xml:id="Untitled2" horiz-adv-x="537" >
+ <font-face
+ font-family="svgSerifHebrewArabic"
+ font-weight="500"
+ font-stretch="normal"
+ units-per-em="1000"
+ panose-1="2 0 6 3 0 0 0 0 0 0"
+ ascent="800"
+ descent="-200"
+ x-height="-1e+10"
+ cap-height="-1e+10"
+ bbox="11 -345 531 843"
+ underline-thickness="50"
+ underline-position="-100"
+ unicode-range="U+0590-U+06FF,U+FB50-U+FEFC"/>
+ <missing-glyph horiz-adv-x="432"
+ d="M33 0v666h333v-666h-333zM66 33h267v600h-267v-600z" />
+
+ <!-- ligatures -->
+ <glyph glyph-name="uniFDF2" unicode="&#x627;&#xfee0;&#xfee0;&#xfeea;" horiz-adv-x="640" arabic-form="isolated"
+ d="M918 261q45 0 45 87q0 110 -10 155l-29 132l55 29l19 -162q6 -65 8 -148v-20q0 -98 -13 -131t-59 -33q-109 2 -119 75q-12 -75 -111 -75q-60 0 -103 114l-34 -30q-54 1 -87 21t-33 50q0 23 9.5 42t30.5 34.5t33.5 23t40 20t28.5 12.5v45l31 34q3 -77 6.5 -122.5t10 -80.5
+ t19 -50.5t29.5 -22.5t44 -7q41 0 50.5 13.5t9.5 56.5q0 144 -24 271l55 41q3 -235 28 -342q8 -33 53 -33q2 0 6 0.5t7 0.5h4zM483 341q14 -23 31.5 -31t54.5 -8q16 0 23 1v107q-91 -34 -109 -69zM786 782q2 0 11 -15t22 -15q14 9 14 24q0 8 -3 15q3 6 6 6q3 1 7 -10t4 -37
+ q0 -16 -5.5 -22t-20.5 -6q-11 0 -29 5q-17 -21 -31 -21q-34 0 -34 41q0 18 2 30h2q3 1 5 -4t3 -11t4.5 -11.5t9.5 -5.5q7 0 19 6.5t12 18.5q0 5 -1 8q1 2 3 4zM790 853q-4 30 -28 67l28 30q5 -28 5 -57q0 -27 -5 -40z" />
+ <glyph glyph-name="uniFEFB" unicode="&#x0644;&#x0627;" horiz-adv-x="676" arabic-form="isolated"
+ d="M440 438c28 61.3333 53.3333 125.5 76 192.5c22.6667 67 35 116.5 37 148.5l-20 55c0 1.33331 -0.166687 3.66669 -0.5 7s-0.5 6 -0.5 8c0 26.6667 7 49 21 67v-14c0.666687 -18 21 -34 61 -48l-10 -52l-18 -19c-5.33331 -14 -9.83331 -33.5 -13.5 -58.5
+ s-13.3333 -62 -29 -111s-41.5 -115.167 -77.5 -198.5c39.3333 -70 59 -123 59 -159c0 -28.6667 -17.3333 -46.8333 -52 -54.5s-111 -12.5 -229 -14.5l6 91c81.3333 32.6667 137.667 75.6667 169 129l-141 212c-34.6667 51.3333 -53.6667 77.6667 -57 79
+ c-2.66667 0 -7.33333 -1.83331 -14 -5.5s-11.6667 -5.5 -15 -5.5c-12 0 -26.6667 9.16669 -44 27.5s-26 44.8333 -26 79.5c0 30.6667 6 46 18 46c14 0 42.1667 -27.5 84.5 -82.5c42.3333 -55 82.3333 -112.333 120 -172zM336 273c49.3333 1.33334 83 4.33334 101 9
+ s27 14 27 28c0 9.33334 -8 30.6667 -24 64c-30 -41.3333 -64.6667 -75 -104 -101z" />
+ <glyph glyph-name="uniFEFC" unicode="&#x0644;&#x0627;" horiz-adv-x="724" arabic-form="terminal"
+ d="M739 197h-48c-70 0 -105 54.6667 -105 164l-11 98c-30 -116.667 -75.6667 -195.667 -137 -237c-46.6667 -17.3333 -123.667 -26 -231 -26c-36 0 -64 0.333328 -84 1c110.667 35.3333 206.333 72.3333 287 111c98.6667 56.6667 148 174.667 148 354
+ c0 62 -4.66669 146 -14 252l120 -119c-28 -20 -42 -76.3333 -42 -169c0 -74.6667 9 -172.333 27 -293c14 -35.3333 29.3333 -53 46 -53h37zM438 445c-69.3333 144 -143.667 216 -223 216h-8l-3 144c66.6667 -4 117.333 -39.6667 152 -107s62 -151.667 82 -253z" />
+
+ <!-- ascii -->
+ <glyph unicode=" " horiz-adv-x="450"/>
+
+ <!-- hebrew -->
+ <glyph glyph-name="afii57664" unicode="&#x5d0;"
+ d="M71 51c0 9.33333 -6.16666 36.5 -18.5 81.5c-12.3333 45 -18.5 74.5 -18.5 88.5c0 34 21 75 63 123c-3.33334 0.666656 -8.33334 3.5 -15 8.5s-14.3333 12.3333 -23 22c-8.66667 9.66666 -16.1667 24.3333 -22.5 44c-6.33333 19.6667 -9.5 41.8333 -9.5 66.5
+ c0 24 6.33333 46 19 66s25.3333 30 38 30h2c1.33334 0 2.16666 -1 2.5 -3s0.833336 -6.66669 1.5 -14s2 -15.3333 4 -24c6 -22.6667 25.1667 -50.6667 57.5 -84c32.3333 -33.3333 63.1667 -61 92.5 -83c29.3333 -22 45.6667 -33 49 -33l51 71
+ c-5.33334 0 -20.5 11.5 -45.5 34.5s-37.5 42.8333 -37.5 59.5c0 16.6667 7.33334 34 22 52s29 27 43 27c4 0 6.16666 -1.33331 6.5 -4s0.166656 -6.33331 -0.5 -11v-6c0 -14 8.16666 -27.6667 24.5 -41c16.3333 -13.3333 34.1667 -25 53.5 -35s37.1667 -23.3333 53.5 -40
+ s24.5 -35 24.5 -55c0 -26.6667 -9.33334 -50.1667 -28 -70.5s-34 -30.5 -46 -30.5c-0.666656 0 -4.33334 15.6667 -11 47c-2.66666 13.3333 -7.33334 25 -14 35s-12.6667 16.6667 -18 20l-8 5l-49 -77c1.33334 0 8 -3.5 20 -10.5s26.5 -17.5 43.5 -31.5
+ s33.8333 -29.6667 50.5 -47s30.8333 -38 42.5 -62s17.5 -47.6667 17.5 -71c0 -41.3333 -4 -69 -12 -83s-18.6667 -21 -32 -21h-7c-0.666656 0 -1.5 6.33333 -2.5 19c-1 12.6667 -6.5 29.3333 -16.5 50c-10 20.6667 -25.3333 39 -46 55
+ c-42.6667 31.3333 -96.5 74.3333 -161.5 129c-65 54.6667 -97.8333 82 -98.5 82l-9 -7c-6 -4.66666 -12.1667 -12.1667 -18.5 -22.5s-9.5 -21.5 -9.5 -33.5c0 -15.3333 6.66666 -32.6667 20 -52s27.8333 -36.6667 43.5 -52c15.6667 -15.3333 30.1667 -33.1667 43.5 -53.5
+ c13.3333 -20.3333 20 -39.1667 20 -56.5c0 -12 -3.5 -22.1667 -10.5 -30.5c-7 -8.33333 -14.8333 -14 -23.5 -17s-16.6667 -6.5 -24 -10.5h-115l6 12c0.666668 2 2.66667 3 6 3c5.33333 0 9.33333 0.5 12 1.5s5.66667 2.66667 9 5c3.33334 2.33333 5.66666 6.33333 7 12
+ c1.33334 5.66667 2 13.1667 2 22.5z" />
+ <glyph glyph-name="afii57665" unicode="&#x5d1;"
+ d="M115 442c-26.6667 0 -46.6667 5.5 -60 16.5c-13.3333 11 -20 34.5 -20 70.5c0 36.6667 9.33333 59.6667 28 69c0 -2 1.33334 -5.5 4 -10.5s9 -10.3333 19 -16s22.3333 -8.5 37 -8.5h206c32 0 59.8333 -10.1667 83.5 -30.5s35.5 -57.1667 35.5 -110.5l2 -314h54l-35 -108
+
+ h-445l35 108h370v260c0 30.6667 -8.16666 50.6667 -24.5 60s-40.5 14 -72.5 14h-217z" />
+ <glyph glyph-name="afii57666" unicode="&#x5d2;" horiz-adv-x="350"
+ d="M141 433c-17.3333 0 -30.1667 5.33334 -38.5 16s-12.5 31.3333 -12.5 62c0 44 6.33334 73 19 87c0 -0.666687 0.833336 -2.33331 2.5 -5s4 -6.16669 7 -10.5l7.5 -10.5c4 -6 15.1667 -9.5 33.5 -10.5s37.3333 -3.33331 57 -7s32.8333 -11.8333 39.5 -24.5
+ c8.66666 -14.6667 13 -37.6667 13 -69v-22v-264c0 -29.3333 2.83334 -59 8.5 -89s11.8333 -58.6667 18.5 -86c-16.6667 0 -27.3333 0.666667 -32 2c-4.66666 1.33333 -7.83334 4.83333 -9.5 10.5c-1.66667 5.66667 -2.5 14.1667 -2.5 25.5
+ c-1.33333 10 -5.5 29.8333 -12.5 59.5s-10.5 44.8333 -10.5 45.5h-10l-62 -143h-118v4c0 67.3333 10 102 30 104l120 21c4.66667 4.66667 12.8333 14.6667 24.5 30s17.8333 27.3333 18.5 36c1.33333 16 5.16667 43.8333 11.5 83.5c6.33333 39.6667 9.5 65.8333 9.5 78.5
+ c0 6 -0.333328 10.3333 -1 13v4c0 15.3333 -4 29.8333 -12 43.5s-22 20.5 -42 20.5c-6 0 -15.5 -0.833344 -28.5 -2.5s-22.5 -2.5 -28.5 -2.5z" />
+ <glyph glyph-name="afii57667" unicode="&#x5d3;"
+ d="M53 596c0 -4.66669 4.5 -11.5 13.5 -20.5s23.1667 -13.5 42.5 -13.5h315c14.6667 0 28 -5.5 40 -16.5s18 -23.8333 18 -38.5c0 -17.3333 -4.5 -32.5 -13.5 -45.5s-20.8333 -19.5 -35.5 -19.5h-10v-350c0 -2.66666 0.166656 -5.83334 0.5 -9.5s0.5 -6.5 0.5 -8.5
+ c0 -10.6667 -3.66666 -26 -11 -46s-15.6667 -30 -25 -30h-2l-2 1c-0.666656 0 -1 3.33333 -1 10c0 2 0.166656 6.16667 0.5 12.5c0.333344 6.33333 0.5 11.1667 0.5 14.5l9 406h-281c-32.6667 0 -55.3333 6.83334 -68 20.5c-12.6667 13.6667 -19 33.8333 -19 60.5
+ c0 37.3333 9.33333 61.6667 28 73z" />
+ <glyph glyph-name="afii57668" unicode="&#x5d4;"
+ d="M52 598c0 -3.33331 1.16667 -7.33331 3.5 -12s8 -9.66669 17 -15s20.8333 -8 35.5 -8h315c12.6667 0 22.8333 -5.5 30.5 -16.5s11.5 -24.1667 11.5 -39.5c0 -43.3333 -14 -65 -42 -65h-10l5 -343c0 -2 1 -7.83334 3 -17.5s3 -17.5 3 -23.5
+ c0 -9.33333 -2.83334 -21.6667 -8.5 -37c-5.66666 -15.3333 -12.5 -23 -20.5 -23c-3.33334 0 -6 0.666667 -8 2c-0.666656 0 -1 2 -1 6c0 2.66667 0.166656 7.33333 0.5 14c0.333344 6.66667 0.5 11.6667 0.5 15l5 407h-280c-60 0 -90 28.6667 -90 86c0 32.6667 10 56 30 70
+ zM74 142c0 -16.6667 0.666664 -34.8333 2 -54.5s2 -30.1667 2 -31.5c0 -14 -2.16666 -27 -6.5 -39s-11.1667 -18 -20.5 -18l-1 1h-3c-4.66667 0 -7 16.6667 -7 50c0 2 0.166668 7 0.5 15s0.5 16.6667 0.5 26c0 8.66666 -0.333332 21 -1 37s-1 28 -1 36
+ c0 40.6667 4.83333 75.3333 14.5 104c9.66667 28.6667 19.1667 43 28.5 43c4 0 6 -6.33334 6 -19c0 -6 -2.33334 -25.6667 -7 -59c-4.66666 -33.3333 -7 -63.6667 -7 -91z" />
+ <glyph glyph-name="afii57669" unicode="&#x5d5;" horiz-adv-x="350"
+ d="M166 563c32.6667 0 53.8333 -6.33331 63.5 -19s14.5 -32.3333 14.5 -59c0 -6 -0.166672 -14.1667 -0.5 -24.5s-0.5 -17.5 -0.5 -21.5l12 -340c0 -14.6667 -2 -34.8333 -6 -60.5c-4 -25.6667 -9.33333 -38.5 -16 -38.5h-2c-0.666672 0 -3.33333 5 -8 15s-7 18.3333 -7 25
+ l7 325v7c0 13.3333 -7.66667 28.8333 -23 46.5s-34 26.5 -56 26.5c-4 0 -10 -0.166656 -18 -0.5s-13.6667 -0.5 -17 -0.5c-18.6667 0 -33.5 5.83334 -44.5 17.5s-16.5 26.5 -16.5 44.5c0 16 4 33.3333 12 52s15.6667 32 23 40l3 -10c2 -7.33331 5.5 -13.3333 10.5 -18
+ s12.1667 -7 21.5 -7c2.66666 0 6 -0.166687 10 -0.5s7 -0.5 9 -0.5c4 0 9.16667 0.166687 15.5 0.5s10.8333 0.5 13.5 0.5z" />
+ <glyph glyph-name="afii57670" unicode="&#x5d6;" horiz-adv-x="350"
+ d="M225 420c-4.66667 0 -8.5 2.16666 -11.5 6.5s-4.5 8.5 -4.5 12.5c0 4.66666 2 7 6 7c0 -0.666656 -3.66667 -1 -11 -1c-2 -5.33334 -6.16667 -12.5 -12.5 -21.5s-11.3333 -19 -15 -30s-5.5 -24.8333 -5.5 -41.5c0 -20.6667 5.33333 -54.6667 16 -102
+ c10.6667 -47.3333 16 -84 16 -110c0 -30.6667 -5.33333 -58.3333 -16 -83c-3.33333 -8 -6.16667 -17.5 -8.5 -28.5s-4.66667 -18.6667 -7 -23c-2.33333 -4.33333 -6.5 -6.5 -12.5 -6.5c-7.33333 0 -14 7.16667 -20 21.5c-6 14.3333 -9 25.5 -9 33.5
+ c0 0.666668 2.5 11.5 7.5 32.5s7.5 47.1667 7.5 78.5c0 15.3333 -0.833328 37.5 -2.5 66.5s-2.5 50.8333 -2.5 65.5c0 31.3333 1.66667 55.1667 5 71.5s8.83333 29.5 16.5 39.5l29.5 37c-2.66667 0 -7.66667 -0.166656 -15 -0.5s-13 -0.5 -17 -0.5
+ c-32.6667 0 -58.1667 7 -76.5 21s-27.5 39 -27.5 75c0 26.6667 7 46 21 58c0 -0.666687 4.33334 -4.83331 13 -12.5s14 -13.1667 16 -16.5c3.33334 -4.66669 24.3333 -7.33331 63 -8s61.3333 -3.66669 68 -9c20.6667 -16 31 -37 31 -63c0 -20.6667 -4 -37.3333 -12 -50
+ s-18 -19 -30 -19z" />
+ <glyph glyph-name="afii57671" unicode="&#x5d7;"
+ d="M65 -1c-5.33333 0 -9.33333 3.83333 -12 11.5c-2.66667 7.66667 -4 24.8333 -4 51.5l4 306c0.666668 15.3333 16 40 46 74c-26 0 -44.1667 8 -54.5 24s-15.5 39 -15.5 69c0 32.6667 7.66667 53.6667 23 63c4.66667 -9.33331 9.83333 -16.6667 15.5 -22
+ c5.66666 -5.33331 10.8333 -8.66669 15.5 -10s9.33334 -2.33331 14 -3s8.33334 -0.666687 11 0h315c13.3333 0 23.8333 -5.33331 31.5 -16s11.5 -24 11.5 -40c0 -43.3333 -14.3333 -65 -43 -65h-10l11 -345c0 -66 -8.66666 -99 -26 -99
+ c-5.33334 0 -9.16666 4.66667 -11.5 14c-2.33334 9.33333 -3.5 17 -3.5 23v407h-265c-20.6667 -30 -31 -54.6667 -31 -74v-314c0 -36.6667 -7.33334 -55 -22 -55z" />
+ <glyph glyph-name="afii57672" unicode="&#x5d8;"
+ d="M70 323c0 -26.6667 2.5 -67 7.5 -121s9.83334 -85.3333 14.5 -94h350c17.3333 50 26 121.667 26 215c0 37.3333 -7.83334 62 -23.5 74s-51.5 18 -107.5 18c-19.3333 0 -39.1667 -6.83334 -59.5 -20.5s-37 -28.6667 -50 -45l-37.5 -45.5
+ c-12 -14 -20.3333 -21.3333 -25 -22c-2 0 -3 1 -3 3c0 5.33334 14.6667 32.3333 44 81s47.3333 84.6667 54 108c16 59.3333 25 89 27 89c14.6667 1.33331 25 2 31 2c29.3333 0 55 -5 77 -15s39.1667 -23 51.5 -39s22.3333 -35.6667 30 -59s12.8333 -46 15.5 -68
+ s4 -46.6667 4 -74c0 -46.6667 -1.66666 -87.5 -5 -122.5s-7.5 -62.3333 -12.5 -82s-10.8333 -38.6667 -17.5 -57c-6.66666 -18.3333 -13.3333 -34.5 -20 -48.5h-400c1.33333 16 2 33.3333 2 52c0.666668 21.3333 1 49.3333 1 84c0 16 -0.166668 41.1667 -0.5 75.5
+ s-0.5 63.1667 -0.5 86.5c0 31.3333 3.5 59.3333 10.5 84s12.8333 40.5 17.5 47.5s8.33334 11.8333 11 14.5c-8 0 -19.1667 6.83334 -33.5 20.5s-21.5 31.1667 -21.5 52.5c0 18 3.16667 35.6667 9.5 53c6.33333 17.3333 14.8333 26.6667 25.5 28
+ c0 -12.6667 7.16666 -24.1667 21.5 -34.5s30 -19 47 -26s32.6667 -18.5 47 -34.5s21.5 -35 21.5 -57c0 -14.6667 -3 -29 -9 -43s-10.6667 -21.6667 -14 -23c0 3.33334 -13.3333 14.5 -40 33.5c-26.6667 19 -42 28.5 -46 28.5c-2 -2.66666 -4.33334 -7.5 -7 -14.5
+ s-5.5 -20.1667 -8.5 -39.5s-4.5 -41 -4.5 -65z" />
+ <glyph glyph-name="afii57673" unicode="&#x5d9;" horiz-adv-x="350"
+ d="M118 478c-17.3333 0 -31.1667 6 -41.5 18s-15.5 27.3333 -15.5 46c0 15.3333 3.16666 32 9.5 50s13.5 31 21.5 39c0 -5.33331 4.83334 -12.1667 14.5 -20.5s21.5 -12.5 35.5 -12.5c5.33333 0 13.6667 0.333313 25 1s20 1 26 1c22.6667 0 38.8333 -6.83331 48.5 -20.5
+ s14.5 -29.1667 14.5 -46.5c0 -24.6667 -5.83333 -66.1667 -17.5 -124.5s-21.5 -87.5 -29.5 -87.5c0 0.666656 0.5 4.16666 1.5 10.5s2.16667 14.6667 3.5 25s2 20.1667 2 29.5c0 34.6667 -6.83333 58.8333 -20.5 72.5s-29.5 20.5 -47.5 20.5
+ c-3.33333 0 -8.33333 -0.166656 -15 -0.5c-6.66666 -0.333344 -11.6667 -0.5 -15 -0.5z" />
+ <glyph glyph-name="afii57674" unicode="&#x5da;"
+ d="M62 564c0 -4.66669 5.33334 -11.8333 16 -21.5s21 -14.5 31 -14.5h325c13.3333 0 27 -6.33331 41 -19c14 -12.6667 21 -26.3333 21 -41c0 -16 -6.33334 -30.3333 -19 -43s-27 -19 -43 -19h-10c8 -304 12 -494.333 12 -571c0 -60 -0.333344 -105.333 -1 -136
+ c0 -29.3333 -7.33334 -44 -22 -44c-2.66666 0 -5 0.333344 -7 1c-1.33334 0 -5.33334 5.83334 -12 17.5s-10 20.8333 -10 27.5l11 705h-283c-57.3333 0 -86 23 -86 69c0 17.3333 3.66667 35 11 53c7.33333 18 15.6667 30 25 36z" />
+ <glyph glyph-name="afii57675" unicode="&#x5db;"
+ d="M101 442c-46.6667 0 -70 29 -70 87c0 35.3333 9.66667 58.3333 29 69c0 -2 1.33333 -5.33331 4 -10c2.66666 -4.66669 9 -10 19 -16s22.3333 -9 37 -9h246c24.6667 0 45.1667 -4.66669 61.5 -14s28.3333 -23 36 -41s12.8333 -36.5 15.5 -55.5s4 -41.5 4 -67.5
+ c0 -12 -0.333344 -29.5 -1 -52.5s-1 -39.8333 -1 -50.5c0 -12.6667 0.666656 -33.1667 2 -61.5s2 -49.5 2 -63.5c0 -49.3333 -7.16666 -87.8333 -21.5 -115.5c-14.3333 -27.6667 -41.8333 -41.5 -82.5 -41.5h-366l36 108h322c34 0 56 7.33334 66 22
+ c10 14.6667 15 40.6667 15 78c0 6.66667 -0.166656 18.1667 -0.5 34.5c-0.333344 16.3333 -0.5 29.5 -0.5 39.5v45c0 46 -5.16666 76.6667 -15.5 92s-35.8333 23 -76.5 23h-260z" />
+ <glyph glyph-name="afii57676" unicode="&#x5dc;"
+ d="M159 843c11.3333 0 21.5 -5.16669 30.5 -15.5s15.1667 -20.8333 18.5 -31.5l4 -16c0 -3.33331 -2.16667 -9.16669 -6.5 -17.5s-8.66667 -21.6667 -13 -40s-6.5 -41.5 -6.5 -69.5v-65h261c16 0 29.8333 -5.66669 41.5 -17s17.8333 -26.6667 18.5 -46l9 -204v-2
+ c0 -15.3333 -8.16666 -34.8333 -24.5 -58.5c-16.3333 -23.6667 -32.1667 -43.5 -47.5 -59.5s-37.6667 -38 -67 -66l-49 -47c-10.6667 -10.6667 -18 -20.6667 -22 -30c-4 -9.33333 -5.83334 -16 -5.5 -20s-1.33334 -7.16667 -5 -9.5s-11.5 -3.5 -23.5 -3.5
+ c-17.3333 0 -26 4.66667 -26 14c0 12 12.6667 30.1667 38 54.5s53.1667 48.3333 83.5 72s58.1667 49.6667 83.5 78c25.3333 28.3333 38 52.1667 38 71.5v6l-13 113c-5.33334 21.3333 -18.6667 32 -40 32l-302 2c-3.33333 0 -5 9.66666 -5 29v6l7 191
+ c0.666672 16.6667 6.16667 30.6667 16.5 42s15.5 22.3333 15.5 33c0 12.6667 -4.66667 21 -14 25s-14 12.6667 -14 26c0 15.3333 5.66667 23 17 23h2z" />
+ <glyph glyph-name="afii57677" unicode="&#x5dd;"
+ d="M389 563c22 0 42.6667 -9 62 -27s29 -47.6667 29 -89v-18l3 -427l-450 -2l11 334c0.666668 30.6667 8.16667 56.3333 22.5 77c14.3333 20.6667 25.8333 31 34.5 31h2h26h-1c-7.33334 0 -16.8333 -11 -28.5 -33s-17.5 -47 -17.5 -75v-226h382l1 280
+ c0 18.6667 -2.5 32.6667 -7.5 42s-14.8333 14 -29.5 14c-2.66666 0 -7.33334 -0.166656 -14 -0.5s-12 -0.5 -16 -0.5h-288c-31.3333 0 -53.6667 6.66666 -67 20c-13.3333 13.3333 -20 28.6667 -20 46c0 17.3333 4.83333 34.8333 14.5 52.5
+ c9.66667 17.6667 20.1667 29.8333 31.5 36.5c-0.666664 0 -1 -2.66669 -1 -8c0 -18 12.3333 -27 37 -27h284z" />
+ <glyph glyph-name="afii57678" unicode="&#x5de;"
+ d="M483 127c0 -14 0.333344 -25 1 -33v-12c0 -6 -6.66666 -21 -20 -45s-20 -36.3333 -20 -37h-335c0.666664 0 11.6667 17.6667 33 53c21.3333 35.3333 32.3333 53.6667 33 55h286l3 121v4c0 60.6667 -19.5 110.5 -58.5 149.5s-90.1667 58.5 -153.5 58.5
+ c-29.3333 0 -56 -6.33334 -80 -19s-42.8333 -28.1667 -56.5 -46.5c-13.6667 -18.3333 -25.1667 -38.5 -34.5 -60.5s-15.6667 -41.6667 -19 -59c-3.33333 -17.3333 -5 -32.3333 -5 -45c0 -7.33333 2.16667 -27.3333 6.5 -60c4.33334 -32.6667 6.5 -60.6667 6.5 -84
+ c0 -44 -7.33333 -66.3333 -22 -67c-2.66667 0 -5.83333 4 -9.5 12s-5.5 16.6667 -5.5 26v14c0 18 -1.66667 42.5 -5 73.5s-5 54.5 -5 70.5c0 36 6.16667 77.1667 18.5 123.5c12.3333 46.3333 33.8333 82.5 64.5 108.5c-3.33334 5.33334 -11.6667 12.1667 -25 20.5
+ s-24.6667 18.1667 -34 29.5s-14 25.6667 -14 43c0 15.3333 2.66667 30.8333 8 46.5s12 26.1667 20 31.5c0 -0.666687 8 -10.6667 24 -30c3.33334 -6 17 -11 41 -15s39.6667 -10.6667 47 -20c6 -7.33331 10.6667 -16.3333 14 -27c3.33333 -10.6667 5.66667 -20.6667 7 -30
+ s2.66667 -15 4 -17c1.33333 -3.33334 10.3333 -0.333344 27 9c14.6667 8.66666 27.1667 20.8333 37.5 36.5c10.3333 15.6667 17.8333 29.1667 22.5 40.5s7.33334 17 8 17c41.3333 -4 75.3333 -12.3333 102 -25s46.5 -29.6667 59.5 -51s21.6667 -42.8333 26 -64.5
+ s6.5 -47.8333 6.5 -78.5c0 -13.3333 -0.5 -34 -1.5 -62s-1.5 -49 -1.5 -63v-7c0 -3.33333 -0.166656 -15.1667 -0.5 -35.5s-0.5 -36.8333 -0.5 -49.5z" />
+ <glyph glyph-name="afii57679" unicode="&#x5df;" horiz-adv-x="350"
+ d="M122 416c-23.3333 0 -39.8333 7.33334 -49.5 22c-9.66667 14.6667 -14.5 31.3333 -14.5 50c0 32 12 57.3333 36 76c0 -4.66669 6.66666 -15.3333 20 -32c4 -5.33331 20.1667 -9.33331 48.5 -12s46.1667 -6.33331 53.5 -11c22.6667 -15.3333 34 -34 34 -56
+ c0 -23.3333 -9.5 -53.1667 -28.5 -89.5s-28.5 -73.5 -28.5 -111.5l12 -495v-4c0 -19.3333 -2.83333 -40.1667 -8.5 -62.5s-14.5 -33.5 -26.5 -33.5h-4c-4.66667 0 -7 12.3333 -7 37l14 558c0 16.6667 4.16667 37.3333 12.5 62s12.5 40.3333 12.5 47c0 37.3333 -17 56 -51 56
+ c-2.66667 0 -6.83333 -0.166656 -12.5 -0.5s-9.83334 -0.5 -12.5 -0.5z" />
+ <glyph glyph-name="afii57680" unicode="&#x5e0;" horiz-adv-x="350"
+ d="M144 444c-24 0 -41.5 5.83334 -52.5 17.5s-16.5 35.1667 -16.5 70.5c0 33.3333 5.33334 55.3333 16 66c0 -0.666687 2.66666 -4 8 -10s9 -10.6667 11 -14c4.66666 -6.66669 20 -10 46 -10h13c37.3333 0 62.1667 -7.5 74.5 -22.5s18.5 -49.1667 18.5 -102.5
+ c1.33334 -8 2 -56 2 -144c0 -73.3333 -0.666656 -142.667 -2 -208c0 -0.666664 -7.16667 -14.8333 -21.5 -42.5c-14.3333 -27.6667 -21.5 -42.5 -21.5 -44.5h-172l55 108h129l16 269v7c0 16 -4.5 30.1667 -13.5 42.5s-25.5 18.5 -49.5 18.5
+ c-4 0 -10.6667 -0.166656 -20 -0.5s-16 -0.5 -20 -0.5z" />
+ <glyph glyph-name="afii57681" unicode="&#x5e1;"
+ d="M59 283c0 -62.6667 6.33334 -107.5 19 -134.5s40 -40.5 82 -40.5h157c5.33334 0 13.1667 -0.166664 23.5 -0.5s17.8333 -0.5 22.5 -0.5c18.6667 0 33.5 1.66666 44.5 5s21.8333 10.6667 32.5 22c10.6667 11.3333 18.3333 29.1667 23 53.5s7 55.8333 7 94.5
+ c0 60.6667 -7.16666 102.5 -21.5 125.5s-43.1667 34.5 -86.5 34.5h-257c0 -3.33334 -2.5 -8.66666 -7.5 -16l-16 -24c-5.66666 -8.66666 -10.8333 -23.5 -15.5 -44.5c-4.66667 -21 -7 -45.8333 -7 -74.5zM79 443c-28.6667 3.33334 -43 29 -43 77c0 42 8.66667 68 26 78
+ c0 -1.33331 1.33333 -4.5 4 -9.5c2.66666 -5 9 -10.5 19 -16.5s22 -9 36 -9h246c22 0 40.8333 -4.16669 56.5 -12.5s27.8333 -18.8333 36.5 -31.5c8.66666 -12.6667 15.5 -29.1667 20.5 -49.5s8.16666 -39.1667 9.5 -56.5s2 -38 2 -62c0 -8 -0.166656 -19.6667 -0.5 -35
+ s-0.5 -26.6667 -0.5 -34c0 -95.3333 -15.1667 -166.167 -45.5 -212.5c-30.3333 -46.3333 -73.1667 -69.5 -128.5 -69.5h-157c-23.3333 0 -43.1667 3.66667 -59.5 11c-16.3333 7.33333 -29.1667 16.5 -38.5 27.5c-9.33333 11 -16.3333 26.5 -21 46.5s-7.66667 39 -9 57
+ c-1.33333 18 -2 41.3333 -2 70v70c0 64 16.3333 117.667 49 161z" />
+ <glyph glyph-name="afii57682" unicode="&#x5e2;"
+ d="M414 564c25.3333 0 42.5 -4.66669 51.5 -14s13.5 -28 13.5 -56c0 -50 -13.3333 -131 -40 -243s-50.3333 -175.667 -71 -191c-12 -8 -74.6667 -20 -188 -36l-169 -24c8.66667 15.3333 18 36.3333 28 63c10 26.6667 15 43 15 49l136 27l-31.5 68
+ c-11 22.6667 -20.8333 46 -29.5 70c-8.66666 24 -13 42.6667 -13 56c0 9.33334 2.16666 20.5 6.5 33.5s9.16667 24.1667 14.5 33.5l15 26l7 12c0 -0.666656 -3 -1 -9 -1c-22 0 -37 6.5 -45 19.5s-12 31.5 -12 55.5c0 52 8.66666 81 26 87c0 -2 1 -5.16669 3 -9.5
+ s6.66667 -9 14 -14s16.3333 -7.5 27 -7.5h7c50 0 75 -25 75 -75c0 -17.3333 -2.66667 -34.6667 -8 -52s-9.66667 -27 -13 -29c0 4 -5.33333 8.83334 -16 14.5s-24.6667 8.5 -42 8.5l-6 -15c-4 -10 -8 -22.6667 -12 -38s-6 -29.6667 -6 -43c0 -14 2.5 -27.5 7.5 -40.5
+ s14 -33.6667 27 -62c13 -28.3333 25.1667 -59.1667 36.5 -92.5c5.33333 0 32.1667 4 80.5 12c48.3333 8 73.8333 13.3333 76.5 16c21.3333 32.6667 38.1667 70.8333 50.5 114.5c12.3333 43.6667 18.5 81.8333 18.5 114.5v4c0 12 -5.16666 20 -15.5 24s-22 5.66666 -35 5
+ s-25.6667 2.16666 -38 8.5s-19.8333 17.5 -22.5 33.5c-1.33334 4.66666 -2 12.6667 -2 24c0 21.3333 3.16666 42.1667 9.5 62.5s14.5 32.8333 24.5 37.5l7 -8c4.66666 -6 7.66666 -11.6667 9 -17c4 -7.33331 15.3333 -11 34 -11h4z" />
+ <glyph glyph-name="afii57683" unicode="&#x5e3;"
+ d="M174 182c31.3333 0 54.6667 7.16667 70 21.5c15.3333 14.3333 23 42.1667 23 83.5c0 25.3333 -5.16666 42.3333 -15.5 51c-10.3333 8.66666 -26.5 13 -48.5 13c-7.33333 0 -20.6667 -0.5 -40 -1.5s-35 -1.5 -47 -1.5c-28 0 -42 6 -42 18c0 6.66666 3.66666 14 11 22
+ s14.3333 14 21 18c4.66666 0 11.3333 0.166656 20 0.5c8.66667 0.333344 15 0.5 19 0.5h154c43.3333 0 77.5 -13.3333 102.5 -40s37.5 -74 37.5 -142c0 -6 -1.16666 -47.5 -3.5 -124.5s-3.5 -141.167 -3.5 -192.5c0 -164.667 11 -247 33 -247c13.3333 0 20 59.3333 20 178
+ c0 70.6667 -2.33334 154.667 -7 252l-7 146v26c0 176.667 -56 265 -168 265h-193c-40 0 -60 11.6667 -60 35c-17.3333 -8.66669 -26 -35.3333 -26 -80c0 -24 4.33333 -41.3333 13 -52c8.66667 -10.6667 24.6667 -18.6667 48 -24
+ c-13.3333 -14.6667 -26.8333 -33.8333 -40.5 -57.5c-13.6667 -23.6667 -20.5 -48.8333 -20.5 -75.5c0 -10 5.16667 -23.3333 15.5 -40c10.3333 -16.6667 20.1667 -27.6667 29.5 -33c18 -12.6667 53 -19 105 -19z" />
+ <glyph glyph-name="afii57684" unicode="&#x5e4;"
+ d="M175 216c32 0 55.3333 7.33333 70 22c14.6667 14.6667 22 41.3333 22 80c0 27.3333 -5.16666 45.5 -15.5 54.5c-10.3333 9 -26.8333 13.5 -49.5 13.5c-6.66667 0 -19.5 -0.5 -38.5 -1.5s-34.5 -1.5 -46.5 -1.5c-28 0 -42 6.33334 -42 19c0 6 3.66666 13 11 21
+ s14.3333 13.6667 21 17c4.66666 0 11.3333 0.333344 20 1c8.66667 0.666656 15 1 19 1h154c25.3333 0 46.1667 -2.66666 62.5 -8s30.1667 -17 41.5 -35c14.6667 -24 25.1667 -44.8333 31.5 -62.5s9.83334 -39.8333 10.5 -66.5l6 -162h-398l-35 -108h417
+ c2 4.66667 8.5 23.6667 19.5 57c11 33.3333 16.5 50.3333 16.5 51v164c0 29.3333 -0.666656 55.1667 -2 77.5s-5.33334 47.8333 -12 76.5s-15.6667 52.1667 -27 70.5c-11.3333 18.3333 -27.8333 34 -49.5 47s-47.5 19.5 -77.5 19.5h-193c-40 0 -60 11.6667 -60 35
+ c-18 -9.33331 -27 -36 -27 -80c0 -24 4.5 -41.1667 13.5 -51.5s25.1667 -18.5 48.5 -24.5l-11 -14c-7.33334 -9.33334 -14.5 -19 -21.5 -29s-13.6667 -23.5 -20 -40.5c-6.33333 -17 -9.5 -33.5 -9.5 -49.5c0 -10 5.33333 -23.3333 16 -40
+ c10.6667 -16.6667 20.3333 -28 29 -34c19.3333 -12.6667 54.6667 -19 106 -19z" />
+ <glyph glyph-name="afii57685" unicode="&#x5e5;"
+ d="M443 361c-6.66666 6.66666 -13 13.3333 -19 20s-10 11 -12 13s-4.16666 3.66666 -6.5 5s-4.83334 2 -7.5 2s-7.16666 -0.666656 -13.5 -2s-10.8333 -2 -13.5 -2c-4.66666 -4 -18.1667 -14 -40.5 -30s-41.3333 -31.3333 -57 -46s-29.5 -30.3333 -41.5 -47
+ c-13.3333 -20 -23.8333 -72.3333 -31.5 -157c-7.66667 -84.6667 -17.1667 -139.667 -28.5 -165l4 -195v-3c0 -19.3333 -3.5 -40.5 -10.5 -63.5s-17.8333 -34.5 -32.5 -34.5c-5.33334 0 -9.16666 4.66666 -11.5 14s-3.5 16.6667 -3.5 22l13 633
+ c0 4.66666 3.66667 11.1667 11 19.5s11 15.8333 11 22.5c0 14.6667 -6.66667 25.3333 -20 32c-13.3333 6.66666 -28.1667 10.5 -44.5 11.5s-31.1667 6.33334 -44.5 16c-13.3333 9.66666 -20 24.8333 -20 45.5c0 17.3333 3.66667 35.1667 11 53.5
+ c7.33333 18.3333 15.6667 31.1667 25 38.5c0 -1.33331 3.83333 -5.66669 11.5 -13c7.66666 -7.33331 12.5 -12.3333 14.5 -15c4 -5.33331 15.5 -9.16669 34.5 -11.5s32.5 -5.83331 40.5 -10.5c23.3333 -16 35 -39.6667 35 -71c0 -24 -7.5 -51.5 -22.5 -82.5
+ s-22.5 -67.1667 -22.5 -108.5l6 -230c3.33333 8.66667 11.1667 52.5 23.5 131.5s24.5 126.833 36.5 143.5c10.6667 14.6667 22.6667 28.3333 36 41c13.3333 12.6667 30.1667 26.3333 50.5 41s33.5 24.6667 39.5 30c-8 4.66666 -14.1667 14.5 -18.5 29.5s-6.5 27.5 -6.5 37.5
+ c0 16 4.5 31.8333 13.5 47.5c9 15.6667 19.5 26.1667 31.5 31.5c0 -1.33331 4.16666 -5.66669 12.5 -13s13.5 -13.3333 15.5 -18c2.66666 -6.66669 9 -10.8333 19 -12.5c10 -1.66666 20.1667 -5.16666 30.5 -10.5s17.5 -15.3333 21.5 -30c5.33334 -17.3333 8 -34.3333 8 -51
+ c0 -30.6667 -9 -50.3333 -27 -59z" />
+ <glyph glyph-name="afii57686" unicode="&#x5e6;"
+ d="M369 598c0 -13.3333 5.5 -23.8333 16.5 -31.5s23.3333 -13 37 -16s26 -10.8333 37 -23.5s16.5 -30 16.5 -52c0 -16.6667 -3.83334 -32.3333 -11.5 -47s-17.5 -24.6667 -29.5 -30c0 23.3333 -16.3333 39 -49 47l-40 -192c18 -8.66667 30.5 -15.1667 37.5 -19.5
+ s14.1667 -10.1667 21.5 -17.5s16.6667 -17.3333 28 -30c16.6667 -16.6667 28 -32.6667 34 -48c6 -15.3333 9 -35.3333 9 -60c0 -14.6667 -3.5 -30.3333 -10.5 -47c-7 -16.6667 -12.5 -27 -16.5 -31h-436c32 55.3333 49.6667 91.3333 53 108h314
+ c0 13.3333 -2.33334 23.6667 -7 31c-18.6667 23.3333 -39.8333 40.8333 -63.5 52.5s-45.1667 18.5 -64.5 20.5c-19.3333 2 -37.6667 4.16667 -55 6.5s-30.8333 8.16667 -40.5 17.5s-14.5 24.6667 -14.5 46c0 9.33334 0.5 25.3333 1.5 48s1.5 39.6667 1.5 51
+ c0 29.3333 -3.5 49 -10.5 59s-19.5 15 -37.5 15h-20c-20 0 -34.3333 5.83334 -43 17.5c-8.66667 11.6667 -13 25.1667 -13 40.5c0 16 3.83333 32.5 11.5 49.5c7.66667 17 16.1667 28.8333 25.5 35.5c0 -11.3333 4.33333 -19.6667 13 -25
+ c8.66666 -5.33331 18.5 -8.33331 29.5 -9s22.5 -3.16669 34.5 -7.5s20.6667 -11.1667 26 -20.5c7.33333 -11.3333 11 -43 11 -95c0 -9.33334 -0.166672 -24 -0.5 -44s-0.5 -34.6667 -0.5 -44s55 -39.6667 165 -91l39 191c-28 9.33334 -42 29.3333 -42 60
+ c0 17.3333 4.16666 34.5 12.5 51.5s18.5 28.1667 30.5 33.5z" />
+ <glyph glyph-name="afii57687" unicode="&#x5e7;"
+ d="M457 230c0 41.3333 -2.33334 73.6667 -7 97s-13.6667 41 -27 53s-28 19.5 -44 22.5s-39.3333 4.5 -70 4.5h-206c-22.6667 0 -38.5 1.66666 -47.5 5s-13.8333 8.66666 -14.5 16s-2 16.6667 -4 28c-3.33333 12 -5 25 -5 39c0 33.3333 9.66667 56.3333 29 69
+ c0 -6 5.33334 -13.6667 16 -23s24.6667 -14 42 -14h194c22.6667 0 41.6667 -1.16669 57 -3.5s28.8333 -6.33331 40.5 -12c11.6667 -5.66666 20.8333 -13.3333 27.5 -23s12.5 -21.6667 17.5 -36s8.66666 -31.3333 11 -51l8 -68c3 -25.6667 5.5 -54.8333 7.5 -87.5
+ c0.666656 -4.66667 1 -11.6667 1 -21c0 -21.3333 -2.66666 -39.8333 -8 -55.5s-15 -29.8333 -29 -42.5c-14 -12.6667 -25.6667 -22.1667 -35 -28.5s-25.8333 -15.3333 -49.5 -27c-23.6667 -11.6667 -40.1667 -20.1667 -49.5 -25.5
+ c-46.6667 -26.6667 -83.1667 -46.8333 -109.5 -60.5c-26.3333 -13.6667 -45.5 -20.5 -57.5 -20.5c-3.33333 0 -5 1 -5 3c0 6 18 21.3333 54 46c36 24.6667 76 49.6667 120 75c9.33334 5.33334 22.6667 11.8333 40 19.5s30.8333 14.1667 40.5 19.5
+ c9.66666 5.33333 20 12.5 31 21.5s19 20.1667 24 33.5s7.5 29 7.5 47zM76 -153c0 -66.6667 -3.33334 -112.333 -10 -137c-6.66667 -24.6667 -21.3333 -42.3333 -44 -53c-0.666666 0 -1 1.33334 -1 4s1.66667 19.3333 5 50s5 54.6667 5 72c0 4.66667 -0.5 34.5 -1.5 89.5
+ s-1.5 119.833 -1.5 194.5v150c0 23.3333 3 45.6667 9 67s11.3333 32 16 32c2 0 5.16667 -6 9.5 -18c4.33334 -12 6.5 -26 6.5 -42c0 -7.33333 -0.833336 -17.6667 -2.5 -31s-2.5 -32.3333 -2.5 -57c0 -28.6667 2 -81.5 6 -158.5s6 -131.167 6 -162.5z" />
+ <glyph glyph-name="afii57688" unicode="&#x5e8;"
+ d="M336 563c14 0 27.3333 -1.83331 40 -5.5s25.3333 -9.66669 38 -18s23 -21.1667 31 -38.5c8 -17.3333 12.3333 -38 13 -62l1 -18c0.666656 -12 1.66666 -28.1667 3 -48.5s2.5 -42.6667 3.5 -67s1.83334 -51.5 2.5 -81.5s1 -57.6667 1 -83c0 -36 -0.666656 -63.6667 -2 -83
+ c-1.33334 -19.3333 -2 -29.3333 -2 -30v-12c0 -11.3333 -2.66666 -17 -8 -17c-2.66666 0 -4.66666 0.333333 -6 1c-2 0 -6.5 4.16667 -13.5 12.5c-7 8.33333 -10.5 15.5 -10.5 21.5v1l11 267v20c0 50.6667 -3.5 83.6667 -10.5 99s-18.1667 23 -33.5 23
+ c-3.33334 0 -11.3333 -0.333344 -24 -1s-24 -1 -34 -1h-225c-30 0 -52 5.5 -66 16.5s-21 32.5 -21 64.5c0 40 9 65 27 75c0 -4.66669 5.33333 -11.6667 16 -21c10.6667 -9.33331 24 -14 40 -14h229z" />
+ <glyph glyph-name="afii57689" unicode="&#x5e9;"
+ d="M81 455c-13.3333 0 -25.3333 4.16666 -36 12.5s-16 22.5 -16 42.5c0 18 3.66667 36.6667 11 56s17 30 29 32l8 -10c5.33334 -6.66669 8.66666 -13 10 -19c2 -6.66669 6 -11.1667 12 -13.5s12.3333 -3.33331 19 -3s13.6667 -1.66669 21 -6s13 -11.5 17 -21.5s6 -20 6 -30
+ c0 -16.6667 -4.33333 -32.8333 -13 -48.5s-15 -24.5 -19 -26.5c0 8.66666 -3.33334 15.8333 -10 21.5s-16 8.5 -28 8.5l-6 -13c-3.33334 -8.66666 -6.83334 -21.1667 -10.5 -37.5s-5.5 -33.8333 -5.5 -52.5c0 -28.6667 7 -71.8333 21 -129.5
+ c14 -57.6667 27.6667 -94.1667 41 -109.5c21.3333 34 49.8333 96.6667 85.5 188c35.6667 91.3333 53.5 143.667 53.5 157h-2c-18 0 -32.6667 4.83334 -44 14.5s-17 22.8333 -17 39.5c0 16.6667 4.5 35.5 13.5 56.5s19.1667 32.5 30.5 34.5c0 -0.666687 2 -4.16669 6 -10.5
+ s6.66666 -12.5 8 -18.5c1.33334 -8 6.33334 -12.5 15 -13.5s18.5 -3.16669 29.5 -6.5s19.1667 -11.3333 24.5 -24c4.66666 -11.3333 7 -22.6667 7 -34c0 -16.6667 -3.5 -32.1667 -10.5 -46.5s-12.5 -22.5 -16.5 -24.5c-2.66666 16.6667 -12.3333 25 -29 25
+ c0 -24.6667 -41.3333 -137 -124 -337h239c28 4 52.6667 41.6667 74 113c21.3333 71.3333 32 139.667 32 205c0 11.3333 -5.16666 19 -15.5 23s-21.8333 5.83334 -34.5 5.5s-25.1667 3 -37.5 10s-20.1667 18.5 -23.5 34.5c-0.666656 2.66666 -1 6.66666 -1 12
+ c0 16.6667 4.33334 34 13 52s19 29.6667 31 35c0 -1.33331 2.16666 -5.66669 6.5 -13s7.16666 -13 8.5 -17c2.66666 -7.33331 12.6667 -12.3333 30 -15s30 -12.3333 38 -29c6 -13.3333 9 -34.6667 9 -64c0 -59.3333 -9.16669 -127 -27.5 -203
+ c-18.3333 -76 -36.3333 -136.833 -54 -182.5c-17.6667 -45.6667 -28.5 -70.5 -32.5 -74.5h-332c0 6.66667 -0.833336 16.5 -2.5 29.5s-2.5 23.8333 -2.5 32.5c-2 30 -10 69 -24 117s-21 90.6667 -21 128c0 15.3333 1.16667 30.3333 3.5 45s5.33333 27 9 37
+ s7.66667 19.5 12 28.5s8.33334 15.8333 12 20.5l9.5 12l4 5h-4z" />
+ <glyph glyph-name="afii57690" unicode="&#x5ea;"
+ d="M71 598c0 -2.66669 1.16666 -6.33331 3.5 -11s8.16666 -9.83331 17.5 -15.5s21.3333 -8.5 36 -8.5h232c37.3333 0 60.8333 -1.83331 70.5 -5.5s21.1667 -14.5 34.5 -32.5c5.33334 -7.33331 9.33334 -15.6667 12 -25s4.16666 -18.8333 4.5 -28.5s0.833344 -20.5 1.5 -32.5
+ l15 -340v-17c0 -55.3333 -7 -83 -21 -83c-0.666656 0 -1 0.333333 -1 1h-2c-2 0 -6.5 4.33333 -13.5 13c-7 8.66667 -10.1667 16 -9.5 22l17 353c0 18 -2.33334 31.8333 -7 41.5s-14.3333 14.5 -29 14.5c-3.33334 0 -8.5 -0.333344 -15.5 -1s-12.5 -1 -16.5 -1h-294
+ c-1.33334 -4.66666 -4 -10.8333 -8 -18.5s-8.33334 -23 -13 -46s-7 -47.1667 -7 -72.5c0 -22.6667 5 -43.6667 15 -63c10 -19.3333 20.8333 -35 32.5 -47c11.6667 -12 22.5 -26.3333 32.5 -43s15 -33.3333 15 -50c0 -23.3333 -6.33333 -46.1667 -19 -68.5
+ c-12.6667 -22.3333 -29.3333 -33.5 -50 -33.5h-71c-0.666668 0.666667 -1 7.66667 -1 21c0 35.3333 2 59 6 71s11.6667 18 23 18c16.6667 0 30 -1.66666 40 -5c-5.33334 12 -12.3333 25 -21 39s-16.8333 33.5 -24.5 58.5s-11.5 49.1667 -11.5 72.5
+ c0 69.3333 15.6667 125 47 167c-11.3333 0 -22.3333 8.16666 -33 24.5c-10.6667 16.3333 -16 36.8333 -16 61.5c0 38 9.66667 61.3333 29 70z" />
+ <glyph glyph-name="afii57716" unicode="&#x5f0;"
+ d="M406 563c32 0 53.1667 -6.5 63.5 -19.5s15.5 -35.8333 15.5 -68.5v-21v-15l10 -340c0 -14.6667 -2 -34.8333 -6 -60.5c-4 -25.6667 -9.33334 -38.5 -16 -38.5h-2c-0.666656 0 -3.16666 5 -7.5 15s-6.5 18.3333 -6.5 25l6 325v7c0 12 -7.16666 27.1667 -21.5 45.5
+ s-33.5 27.5 -57.5 27.5c-4 0 -9.66666 -0.166656 -17 -0.5s-13 -0.5 -17 -0.5c-18.6667 0 -33.5 5.66666 -44.5 17s-16.5 25.6667 -16.5 43c0 16 4 33.6667 12 53s15.3333 33 22 41l3 -10c2 -7.33331 5.5 -13.3333 10.5 -18s12.1667 -7 21.5 -7
+ c2.66666 0 6.16666 -0.166687 10.5 -0.5s7.16666 -0.5 8.5 -0.5c4.66666 0 10 0.166687 16 0.5s10.3333 0.5 13 0.5zM146 563c32 0 53 -6.66669 63 -20s15 -33.3333 15 -60c0 -4.66666 -0.166672 -11.3333 -0.5 -20s-0.5 -14.6667 -0.5 -18v-6l12 -340c0 -14 -2 -34 -6 -60
+ s-9.33333 -39 -16 -39h-2c-2 0 -5 5 -9 15s-6 18.3333 -6 25l7 325c0 14.6667 -6.66667 31.6667 -20 51s-33 29 -59 29c-4 0 -10 -0.166656 -18 -0.5s-13.6667 -0.5 -17 -0.5c-18.6667 0 -33.5 5.83334 -44.5 17.5s-16.5 26.5 -16.5 44.5c0 16 4 33.3333 12 52
+ s15.6667 32 23 40c0 -0.666687 0.666668 -3.16669 2 -7.5c1.33334 -4.33331 2.83334 -8.33331 4.5 -12s5 -7.16669 10 -10.5s11.1667 -5 18.5 -5c2.66666 0 6 -0.166687 10 -0.5s7 -0.5 9 -0.5c4 0 9.16666 0.166687 15.5 0.5c6.33333 0.333313 10.8333 0.5 13.5 0.5z" />
+ <glyph glyph-name="afii57717" unicode="&#x5f1;"
+ d="M407 563c32.6667 0 53.8333 -6.83331 63.5 -20.5s14.5 -34.5 14.5 -62.5v-35v-6l10 -340c0 -14.6667 -2 -34.8333 -6 -60.5c-4 -25.6667 -9.33334 -38.5 -16 -38.5h-2c-0.666656 0 -3.33334 5 -8 15s-7 18.3333 -7 25l8 325v5c0 14.6667 -7.5 30.8333 -22.5 48.5
+ s-33.8333 26.5 -56.5 26.5c-4 0 -10 -0.166656 -18 -0.5s-13.6667 -0.5 -17 -0.5c-18 0 -32.6667 5.66666 -44 17s-17 26 -17 44c0 16 4 33.5 12 52.5s15.6667 32.5 23 40.5l3 -10c2 -7.33331 5.5 -13.3333 10.5 -18s12.1667 -7 21.5 -7
+ c2.66666 0 6.16666 -0.166687 10.5 -0.5s7.16666 -0.5 8.5 -0.5c4 0 9.33334 0.166687 16 0.5s11 0.5 13 0.5zM91 445c-17.3333 0 -31.3333 6.16666 -42 18.5s-16 27.8333 -16 46.5c0 15.3333 3 31.8333 9 49.5s13 30.5 21 38.5c0 -4.66669 5.16666 -11.3333 15.5 -20
+ s23.1667 -13 38.5 -13c4.66666 0 12.6667 0.333313 24 1s19.6667 1 25 1c22 0 37.6667 -7 47 -21s14 -29.3333 14 -46c0 -24 -5.83333 -65.1667 -17.5 -123.5s-21.1667 -87.5 -28.5 -87.5v1c0 0.666656 0.5 4.5 1.5 11.5s2.16667 15.6667 3.5 26s2 20.1667 2 29.5
+ c0 33.3333 -7 56.5 -21 69.5s-30 19.5 -48 19.5c-3.33334 0 -8 -0.166656 -14 -0.5s-10.6667 -0.5 -14 -0.5z" />
+ <glyph glyph-name="afii57718" unicode="&#x5f2;"
+ d="M349 478c-17.3333 0 -31.1667 6 -41.5 18s-15.5 27.3333 -15.5 46c0 15.3333 3.16666 32 9.5 50s13.1667 31 20.5 39c0 -5.33331 4.83334 -12.1667 14.5 -20.5s21.5 -12.5 35.5 -12.5c5.33334 0 13.6667 0.333313 25 1s20 1 26 1c22.6667 0 38.8333 -6.83331 48.5 -20.5
+ s14.5 -29.1667 14.5 -46.5c0 -22.6667 -6 -63.6667 -18 -123s-21.3333 -89 -28 -89v1c0 0.666656 0.666656 4.5 2 11.5s2.5 15.6667 3.5 26s1.5 20.1667 1.5 29.5c0 33.3333 -6.83334 56.6667 -20.5 70s-29.5 20 -47.5 20c-3.33334 0 -8.33334 -0.166656 -15 -0.5
+ s-11.6667 -0.5 -15 -0.5zM88 478c-17.3333 0 -31.1667 6 -41.5 18s-15.5 27.3333 -15.5 46c0 15.3333 3 32 9 50s12.6667 31 20 39c0 -4 5.16666 -10.5 15.5 -19.5s22.5 -13.5 36.5 -13.5c4.66666 0 12.6667 0.333313 24 1c11.3333 0.666687 20 1 26 1
+ c22.6667 0 38.8333 -7 48.5 -21s14.5 -29.3333 14.5 -46c0 -24 -5.83333 -65.3333 -17.5 -124s-21.1667 -88 -28.5 -88v1c0 0.666656 1 8.83334 3 24.5s3 29.5 3 41.5c0 33.3333 -6.66667 56.8333 -20 70.5s-29 20.5 -47 20.5c-3.33334 0 -8.33334 -0.166656 -15 -0.5
+ s-11.6667 -0.5 -15 -0.5z" />
+ <glyph glyph-name="uni05F3" unicode="&#x5f3;" horiz-adv-x="396"
+ d="M283 727c5.33334 0 9 -1.16669 11 -3.5s3 -7.5 3 -15.5c0 -24 -11.8333 -53 -35.5 -87c-23.6667 -34 -48.1667 -62.6667 -73.5 -86c-25.3333 -23.3333 -42.3333 -35 -51 -35c-3.33333 0 -5 2 -5 6c0 12.6667 10.6667 39.3333 32 80s40.6667 73 58 97
+ c13.3333 17.3333 24.1667 29 32.5 35c8.33334 6 17.8333 9 28.5 9z" />
+ <glyph glyph-name="uni05F4" unicode="&#x5f4;" horiz-adv-x="396"
+ d="M197 727c5.33333 0 8.83333 -1 10.5 -3s2.5 -7 2.5 -15c0 -24 -11.8333 -53.1667 -35.5 -87.5s-48.3333 -63.1667 -74 -86.5c-25.6667 -23.3333 -42.5 -35 -50.5 -35c-3.33333 0 -5 2 -5 6c0 12.6667 10.6667 39.5 32 80.5c21.3333 41 41 73.1667 59 96.5
+ c13.3333 18 24 29.8333 32 35.5s17.6667 8.5 29 8.5zM332 727c5.33334 0 9 -1.16669 11 -3.5s3 -7.5 3 -15.5c0 -24 -11.8333 -53 -35.5 -87s-48.3333 -62.6667 -74 -86c-25.6667 -23.3333 -42.8333 -35 -51.5 -35c-3.33333 0 -5 2 -5 6c0 12 10.8333 38.6667 32.5 80
+ s41.1667 73.6667 58.5 97c13.3333 17.3333 24.1667 29 32.5 35s17.8333 9 28.5 9z" />
+
+ <!-- arabic -->
+ <glyph glyph-name="afii57388" unicode="&#x60c;" horiz-adv-x="226"
+ d="M245 256q-10 -60 -67 -61q-67 0 -79 64q1 9 0 19t2 24t7.5 28t16 31.5t28.5 34.5t47 28l18 -1q-50 -44 -74 -89q34 2 44 2q17 0 28.5 -7t17 -21t8 -25t3.5 -27z" />
+ <glyph glyph-name="afii57403" unicode="&#x61b;" horiz-adv-x="250"
+ d="M143 395q-38 0 -63.5 28t-25.5 72q0 133 109 227l19 -26q-69 -69 -69 -115q0 -12 11.5 -17.5t26.5 -6t32.5 -9t26.5 -25.5q8 -18 8 -38v-13q-1 -9 -4.5 -19.5t-11 -25t-23 -23.5t-36.5 -9zM150 322q58 0 68 -73q-9 -68 -62 -68h-5q-70 0 -70 70q0 69 69 71z" />
+ <glyph glyph-name="afii57407" unicode="&#x61f;" horiz-adv-x="473"
+ d="M147 663q0 50 33.5 83.5t88.5 33.5q67 0 93.5 -35t26.5 -81q0 -36 -14.5 -51.5t-31.5 -15.5t-29 14t-12 28q0 13 16.5 32t16.5 29q0 11 -19.5 28.5t-44.5 17.5q-64 0 -64 -62q0 -28 15 -51t32.5 -39t32.5 -56.5t15 -99.5q0 -28 -3 -63h-25q-1 63 -11 98t-22.5 46
+ t-35.5 33t-40 51q-18 29 -18 60zM344 256q0 -58 -44 -58h-1q-60 0 -60 51q1 51 55 51q50 0 50 -44z" />
+ <glyph glyph-name="afii57409" unicode="&#x621;" horiz-adv-x="350"
+ d="M277 363q-5 0 -18 28t-27 28q-20 0 -40 -35t-20 -59q0 -16 10 -43t24 -27q7 0 14 3.5t16 9.5t33.5 18.5t59.5 26.5l-13 -52q-76 -23 -231 -140q43 60 97 108q-39 10 -55 28t-16 54q0 53 34 98t82 71h8q56 -3 56 -60q0 -17 -3.5 -37t-10.5 -20z" />
+ <glyph glyph-name="afii57410" unicode="&#x622;" horiz-adv-x="321"
+ d="M154 1055q16 0 43 -2t39 -2q34 0 54 9t67 45l-17 -55q-17 -29 -44.5 -40t-85.5 -11q-11 0 -35.5 1t-41.5 1q-15 -1 -26.5 0t-35.5 -12t-59 -43q35 69 59 89t83 20zM149 154q27 331 27 391q0 83 -9 265l42 89q14 -255 14 -418q0 -171 -74 -327z" />
+ <glyph glyph-name="afii57411" unicode="&#x623;" horiz-adv-x="249"
+ d="M209 1044q-4 0 -12 18t-18 18q-13 0 -25.5 -22.5t-12.5 -38.5q0 -11 6 -28t15 -17q5 0 9.5 2t10 6t22 12t38.5 17l-8 -33q-49 -15 -150 -91q26 36 63 70q-26 7 -36 18.5t-10 34.5q0 35 22 64t53 46h5q36 -2 36 -39t-8 -37zM149 154q27 369 27 391q0 85 -9 266l42 89
+ q14 -255 14 -419q0 -171 -74 -327z" />
+ <glyph glyph-name="afii57412" unicode="&#x624;" horiz-adv-x="399"
+ d="M342 652q-4 0 -12 18t-18 18q-13 0 -25.5 -22.5t-12.5 -38.5q0 -11 6 -28t15 -17q5 0 9.5 2t10 6t22 12t38.5 17l-8 -33q-49 -15 -150 -91q26 36 63 70q-26 7 -36 18.5t-10 34.5q0 35 22 64t53 46h5q36 -2 36 -39t-8 -37zM189 303q0 65 32 108t85 43h9q68 -11 84 -172
+ v-85q0 -112 -106 -247q-59 -75 -167 -75h-53v10q119 70 149.5 96.5t75.5 100.5q34 55 34 96q0 14 -2 21h-99q-42 18 -42 88v16zM341 288q-2 52 -10 77t-32 25q-45 0 -45 -102h9q9 0 27.5 -0.5t26.5 -0.5q16 0 24 1z" />
+ <glyph glyph-name="afii57413" unicode="&#x625;" horiz-adv-x="249"
+ d="M212 37q-4 0 -12 18t-18 18q-13 0 -25.5 -22.5t-12.5 -38.5q0 -11 6 -28t15 -17q5 0 9.5 2t10 6t22 12t38.5 17l-8 -33q-49 -15 -150 -91q26 36 63 70q-26 7 -36 18.5t-10 34.5q0 35 22 64t53 46h5q36 -2 36 -39t-8 -37zM149 154q27 369 27 391q0 85 -9 266l42 89
+ q14 -255 14 -419q0 -171 -74 -327z" />
+ <glyph glyph-name="afii57414" unicode="&#x626;" horiz-adv-x="776"
+ d="M447 606q-4 0 -12 18t-18 18q-13 0 -25.5 -22.5t-12.5 -38.5q0 -11 6 -28t15 -17q5 0 9.5 2t10 6t22 12t38.5 17l-8 -33q-49 -15 -150 -91q26 36 63 70q-26 7 -36 18.5t-10 34.5q0 35 22 64t53 46h5q36 -2 36 -39t-8 -37zM714 465q27 0 35.5 -15t8.5 -43q0 -9 -2 -27
+ q-33 26 -66 26q-34 0 -80.5 -43t-46.5 -63q0 -29 80 -29q3 0 19 2t30 2q63 0 63 -37v-4q0 -118 -132 -197q-89 -53 -206 -53q-82 0 -141 17.5t-89 47t-43 60.5t-13 65q0 107 83 222l11 -4q-52 -98 -52 -163t52 -106.5t146 -48.5q302 16 348 109q-2 20 -101 20h-6
+ q-95 0 -95 56q0 65 67 135.5t130 70.5z" />
+ <glyph glyph-name="afii57415" unicode="&#x627;" horiz-adv-x="249"
+ d="M149 154q27 369 27 391q0 85 -9 266l42 89q14 -255 14 -419q0 -171 -74 -327z" />
+ <glyph glyph-name="afii57416" unicode="&#x628;" horiz-adv-x="950"
+ d="M644 2l-52 -54l-52 54l52 53zM926 278q0 82 -10 117t-42 62l18 64q65 -41 65 -124q0 -5 -1 -13t-1 -13v-174h-718q-56 0 -83.5 21t-27.5 76q0 77 70 203l10 -9q-52 -104 -52 -141t42 -69h730z" />
+ <glyph glyph-name="afii57417" unicode="&#x629;" horiz-adv-x="424"
+ d="M392 670l-55 -55l-55 55l55 55zM235 670l-56 -55l-55 55l55 55zM251 564q72 -80 107.5 -145t35.5 -104q0 -21 -8.5 -46t-18.5 -33q-14 -12 -41 -23t-49 -11q-64 0 -93 11.5t-51 49.5q-6 10 -6 34q0 40 30 97.5t50 87.5l-8 10zM235 454q-69 -80 -69 -126q0 -32 32.5 -45
+ t74.5 -13q52 0 69.5 8.5t17.5 26.5q0 28 -31.5 78t-93.5 71z" />
+ <glyph glyph-name="afii57418" unicode="&#x62a;" horiz-adv-x="925"
+ d="M530 574l-65 -66l-67 66l67 67zM740 574l-65 -66l-67 66l67 67zM862 512q63 -39 63 -119q0 -9 -2 -25v-169h-693q-79 0 -96 41q-11 25 -11 53q0 19 5 47q12 59 63 149l9 -8q-32 -62 -49 -125q-1 -4 -1 -12q0 -35 41 -67h704q0 45 -5 95q-6 46 -45 79z" />
+ <glyph glyph-name="afii57419" unicode="&#x62b;" horiz-adv-x="924"
+ d="M756 543l-64 -66l-67 66l67 67zM531 543l-64 -66l-67 66l67 67zM643 665l-65 -67l-66 67l66 66zM921 275q0 64 -8.5 103t-16.5 49.5t-26 25.5l17 63q65 -41 65 -123q0 -5 -1 -13t-1 -13v-173h-713q-55 0 -82.5 21t-27.5 76q0 75 70 201l9 -8q-51 -99 -51 -140
+ q0 -38 42 -69h724z" />
+ <glyph glyph-name="afii57420" unicode="&#x62c;" horiz-adv-x="750"
+ d="M330 491q16 0 111 -16.5t206 -16.5l88 2l-20 -63h-7q-173 0 -292 -51t-193 -158q-54 -76 -54 -157q0 -35 8.5 -67.5t28 -64t58 -50.5t91.5 -19q112 0 296 46l48 -47q-157 -49 -319 -55h-26q-132 14 -178 78q-45 63 -45 82q-7 21 -7 53q0 68 31.5 128.5t93.5 132.5
+ q143 118 237 144q-52 15 -106 27t-108 12q-50 0 -64 -17l-27 -10q47 48 77 67.5t72 19.5zM497 104l-53 -53l-52 53l52 51z" />
+ <glyph glyph-name="afii57421" unicode="&#x62d;" horiz-adv-x="748"
+ d="M330 505q12 0 109.5 -16t209.5 -16l89 1l-20 -62h-7q-175 0 -294.5 -50t-194.5 -156q-54 -75 -54 -155q0 -36 8.5 -68.5t28.5 -63t59 -49t93 -18.5q110 0 307 44l37 -46q-159 -48 -320 -54h-27q-133 14 -180 77q-45 59 -45 82q-7 20 -7 52q0 67 32 126.5t94 131.5
+ q145 118 239 143q-51 14 -108.5 25.5t-109.5 11.5q-50 0 -62 -16l-27 -10q33 33 50 47.5t43.5 26.5t56.5 12z" />
+ <glyph glyph-name="afii57422" unicode="&#x62e;" horiz-adv-x="701"
+ d="M308 503q19 0 107.5 -15.5t193.5 -15.5l84 2l-19 -59h-7q-323 0 -461 -195q-51 -70 -51 -145q0 -32 8 -62t25.5 -60t53 -48.5t84.5 -18.5q105 0 303 59l29 -60q-150 -45 -302 -51h-25q-125 13 -170 72q-42 57 -42 78q-7 18 -7 49q0 62 29 117.5t90 126.5q137 110 225 134
+ q-50 13 -103 24t-102 11q-47 0 -59 -15l-25 -9q31 31 47 45t41 25t53 11zM379 680l-44 -44l-43 44l43 43z" />
+ <glyph glyph-name="afii57423" unicode="&#x62f;" horiz-adv-x="397"
+ d="M382 278q-7 27 -8 45t-7 35t-7.5 27.5t-9.5 22t-14 18.5t-19.5 17.5t-26.5 19l-36 22.5l2 79q22 -7 35.5 -12.5t40 -26t43.5 -48.5t32.5 -80t19.5 -119q0 -78 -56 -78h-202q-55 0 -55 96v21l12 1q4 -38 28 -40h228z" />
+ <glyph glyph-name="afii57424" unicode="&#x630;" horiz-adv-x="399"
+ d="M303 725l-57 -57l-55 57l55 55zM378 277q-6 26 -7 44t-6.5 34.5t-7.5 27t-10 22l-13.5 19t-19 17.5t-27 18.5l-35.5 22.5l2 78q21 -7 35 -13t40 -26t42.5 -47.5t32 -79t19.5 -117.5q0 -77 -55 -77h-200q-54 0 -54 95v20l12 2q4 -38 28 -40h224z" />
+ <glyph glyph-name="afii57425" unicode="&#x631;" horiz-adv-x="328"
+ d="M325 447q20 -69 20 -148q0 -22 -5 -58t-6 -46l-128 -241q-49 -72 -103 -84l-104 -23l5 21q83 49 106 81l69 100q70 99 88 140t18 79q0 45 -18 132z" />
+ <glyph glyph-name="afii57426" unicode="&#x632;" horiz-adv-x="331"
+ d="M326 601l-56 -56l-59 56l59 53zM325 447q20 -69 20 -148q0 -22 -5 -58t-6 -46l-128 -241q-43 -53 -103 -84l-104 -23l5 21q18 14 34 24t39 31.5t46.5 49t57 76t71.5 112.5q33 54 33 107q0 45 -18 132z" />
+ <glyph glyph-name="afii57427" unicode="&#x633;" horiz-adv-x="951"
+ d="M883 274q52 0 52 19q0 26 -40 116l23 36q45 -101 45 -153t-19 -70t-56 -18q-23 0 -31.5 0.5t-25 8t-34.5 23.5q-25 -34 -61 -34q-58 0 -107 -1q0 -45 -8.5 -79.5t-18 -53.5t-32 -35.5t-35.5 -22.5t-43 -18q-63 -25 -152 -25h-33q-34 2 -60.5 8t-57.5 21t-48 47.5
+ t-17 79.5q0 64 82 224l13 -23q-67 -101 -67 -158q0 -70 41 -106t150 -36q63 0 134 21t84 41q30 45 30 122q0 67 -42 116l33 72q32 -56 39 -120h107q40 0 40 68v16l13 7q13 -56 31 -74.5t71 -18.5z" />
+ <glyph glyph-name="afii57428" unicode="&#x634;" horiz-adv-x="949"
+ d="M876 272q49 0 49 19q0 25 -39 114l23 36q44 -99 44 -151q0 -50 -19 -68.5t-55 -18.5q-7 -1 -17 -0.5t-20 2.5t-24 9.5t-29 20.5q-25 -33 -59 -33q-59 0 -107 -1q0 -55 -9 -91.5t-31.5 -58.5t-40 -31.5t-55.5 -24.5q-60 -25 -149 -25h-33q-26 1 -47 4.5t-47.5 13.5
+ t-44 25.5t-30 44t-12.5 66.5q0 63 81 220l13 -23q-67 -102 -67 -156q0 -68 39.5 -103.5t150.5 -35.5q62 0 132 21t83 41q29 44 29 120q0 67 -41 113l33 72q30 -56 38 -118h106q40 0 40 69v13l13 7q12 -54 30 -73t72 -19zM855 553l-47 -45l-49 45l49 45zM774 656l-47 -46
+ l-49 46l49 44zM691 553l-47 -45l-49 45l49 45z" />
+ <glyph glyph-name="afii57429" unicode="&#x635;" horiz-adv-x="949"
+ d="M832 466q20 0 38 -5t37 -18t30 -41t11 -67q0 -33 -7 -67l-15 -34v-1q0 -31 -187 -31l-150 -1q-1 -66 -19.5 -111.5t-53.5 -69.5t-76.5 -33.5t-97.5 -9.5q-212 0 -212 177q4 111 35 197l18 -6q-28 -78 -28 -150q0 -78 40.5 -120t147.5 -44q65 2 111 18.5t68.5 42.5
+ t32 52.5t9.5 56.5q0 71 -63 144l34 72q44 -105 59 -131l120 120q58 55 107 60h11zM895 323q0 82 -84 82q-80 0 -183 -131q7 0 20.5 -0.5t20.5 -0.5q27 0 162 5q64 16 64 45z" />
+ <glyph glyph-name="afii57430" unicode="&#x636;" horiz-adv-x="949"
+ d="M832 466q20 0 38 -5t37 -18t30 -41t11 -67q0 -33 -7 -67l-15 -34v-1q0 -31 -187 -31l-150 -1q-1 -66 -19.5 -111.5t-53.5 -69.5t-76.5 -33.5t-97.5 -9.5q-212 0 -212 177q4 111 35 197l18 -6q-28 -78 -28 -150q0 -78 40.5 -120t147.5 -44q65 2 111 18.5t68.5 42.5
+ t32 52.5t9.5 56.5q0 71 -63 144l34 72q44 -105 59 -131l120 120q58 55 107 60h11zM895 333q0 82 -84 82q-80 0 -183 -131q7 0 20.5 -0.5t20.5 -0.5q27 0 162 5q64 16 64 45zM747 633l-49 -48l-48 48l48 48z" />
+ <glyph glyph-name="afii57431" unicode="&#x637;" horiz-adv-x="557"
+ d="M165 277q21 15 21 39q0 126 -86 384l63 83l26.5 -146.5t26.5 -168t12 -140.5q0 -4 -0.5 -11t-0.5 -10q115 131 218 131q22 0 41 -6t39 -21t31.5 -47t11.5 -78v-4q0 -81 -61 -81h-513l-1 79zM536 304q0 45 -28.5 64.5t-65.5 19.5q-38 0 -86.5 -28t-79.5 -56l-20 -20h279
+ q1 7 1 20z" />
+ <glyph glyph-name="afii57432" unicode="&#x638;" horiz-adv-x="550"
+ d="M443 612l-46 -46l-47 46l47 47zM165 277q21 15 21 39q0 126 -86 384l63 83l26.5 -146.5t26.5 -168t12 -140.5q0 -4 -0.5 -11t-0.5 -10q115 131 218 131q22 0 41 -6t39 -21t31.5 -47t11.5 -78v-4q0 -81 -61 -81h-513l-1 79zM536 304q0 45 -28.5 64.5t-65.5 19.5
+ q-38 0 -86.5 -28t-79.5 -56l-20 -20h279q1 7 1 20z" />
+ <glyph glyph-name="afii57433" unicode="&#x639;" horiz-adv-x="625"
+ d="M130 -67q0 53 31 127t93 126q-87 75 -122 117v29v2q0 62 65 119q56 49 126 49h5q53 -8 121 -50q-13 1 -36 1q-76 0 -153.5 -28t-86.5 -54q2 -37 51 -77.5t95 -40.5q10 0 37.5 14t81 31t121.5 22l-35 -67q-146 -15 -219 -90q-131 -123 -131 -195q0 -76 361 -122h111
+ l-104 -65q-176 8 -265 26t-118 46t-29 80z" />
+ <glyph glyph-name="afii57434" unicode="&#x63a;" horiz-adv-x="602"
+ d="M130 -62q0 60 33 131.5t90 119.5q-87 74 -121 116v29v2q0 62 65 119q55 48 124 48h4q52 -8 121 -49q-10 1 -30 1q-77 0 -156 -28t-88 -54q4 -36 51.5 -76.5t93.5 -40.5h6q119 58 231 66l-35 -66q-143 -15 -216 -89q-129 -122 -129 -194q0 -73 356 -120h110l-103 -65
+ q-173 8 -261 26t-117 45.5t-29 78.5zM323 720l-48 -48l-49 48l49 48z" />
+ <glyph glyph-name="afii57441" unicode="&#x641;" horiz-adv-x="801"
+ d="M592 432q0 59 29.5 121.5t73.5 62.5h4q25 0 49.5 -24t40.5 -71q22 -64 22 -158v-66q0 -92 -86 -92l-526 1q-43 5 -56.5 28.5t-14.5 98.5q2 54 26 130l26 -27q-34 -78 -34 -114q0 -34 34 -41q50 0 150 -0.5t149 -0.5q33 0 99 0.5t99 0.5h3q85 0 85 48v5q-56 13 -94.5 20.5
+ t-58.5 25.5t-20 52zM693 529q-36 -10 -36 -71q0 -49 85 -49q15 0 22 1v1q-8 39 -27.5 76t-43.5 42zM675 712l-49 -50l-50 50l50 51z" />
+ <glyph glyph-name="afii57442" unicode="&#x642;" horiz-adv-x="696"
+ d="M709 562l-55 -55l-55 55l55 55zM552 562l-56 -55l-55 55l55 55zM719 183q-17 -140 -88 -187q-95 -56 -259 -56h-31q-209 45 -209 163q-2 22 -2 35q0 96 51 218h11q-28 -97 -28 -167q0 -28 4 -47q11 -116 273 -116h13q96 16 152 36q75 38 75 111q0 10 -1 16q-2 18 -31 18
+ q-21 0 -49 -7q-95 0 -95 51q0 4 2 14q2 37 30 86q29 59 69 66q52 -24 85 -77q25 -51 28 -94v-63zM607 354h-3q-33 0 -48 -44q-6 -10 -6 -18q0 -20 41 -20h9q38 0 44 2q6 0 6 10q0 2 -2 10q-3 16 -17 37z" />
+ <glyph glyph-name="afii57443" unicode="&#x643;" horiz-adv-x="757"
+ d="M948 958l-199 -87q-19 -8 -73.5 -33.5t-54.5 -32.5q0 -10 107 -126l40 -51t31 -41.5t24.5 -38.5t21.5 -43t21 -55.5l24 -74.5q4 -39 4 -75q0 -101 -42 -101h-1l-587 2q-78 0 -128 87q-15 25 -15 89q0 67 20 131l8 -4q-7 -45 -7 -85q0 -77 39.5 -111t137.5 -34h11h529
+ q2 24 2 35q0 121 -125 286l-61 65l-11 -14q-34 23 -86 75q-4 26 -4 38q0 60 45.5 102t171.5 94l163 66z" />
+ <glyph glyph-name="afii57444" unicode="&#x644;" horiz-adv-x="655"
+ d="M377 -150q-45 0 -83 7.5t-77.5 27t-62 60t-22.5 98.5q0 102 61 261l16 -6q-46 -141 -46 -216q0 -74 76 -126q88 -19 160 -19q82 0 117 18q89 46 89 157q0 264 -37 704l38 38l52 41l47 -146l-52 -64v-52q0 -169 6 -305t6 -167q0 -83 -11.5 -137t-42 -95.5t-88 -60
+ t-146.5 -18.5z" />
+ <glyph glyph-name="afii57445" unicode="&#x645;" horiz-adv-x="549"
+ d="M280 303q-28 0 -51 -38q-4 16 -4 33q0 66 80 68h27q28 0 81.5 -17.5t103.5 -52.5t50 -74q0 -26 -28 -57t-63 -31l-72 24q-71 24 -120 24q-60 0 -85 -36q30 -234 30 -373q0 -63 -22 -111q-20 126 -36 206t-22.5 100t-11 52.5t-8.5 96.5v11q0 50 42 95.5t107 45.5
+ q25 0 130 -28q-25 17 -68 39.5t-60 22.5z" />
+ <glyph glyph-name="afii57446" unicode="&#x646;" horiz-adv-x="651"
+ d="M441 451l-59 -55l-58 55l58 55zM362 -20q67 0 112.5 7t84.5 26.5t58 58t19 97.5q-1 156 -41 188l58 96q17 -71 20 -243l-7 -78q-5 -70 -26 -117t-57 -70.5t-76 -32.5t-96 -9q-32 0 -49 1q-136 0 -188.5 53t-52.5 156q0 92 28 189l21 -4q-17 -74 -17 -132q0 -6 1 -18.5
+ t1 -18.5q0 -147 207 -149z" />
+ <glyph glyph-name="afii57470" unicode="&#x647;" horiz-adv-x="424"
+ d="M251 564q72 -80 107.5 -145t35.5 -104q0 -21 -8.5 -46t-18.5 -33q-14 -12 -41 -23t-49 -11q-64 0 -93 11.5t-51 49.5q-6 10 -6 34q0 40 30 97.5t50 87.5l-8 10zM235 454q-69 -80 -69 -126q0 -32 32.5 -45t74.5 -13q52 0 69.5 8.5t17.5 26.5q0 28 -31.5 78t-93.5 71z" />
+ <glyph glyph-name="afii57448" unicode="&#x648;" horiz-adv-x="399"
+ d="M189 303q0 65 32 108t85 43h9q68 -11 84 -172v-85q0 -112 -106 -247q-59 -75 -167 -75h-53v10q119 70 149.5 96.5t75.5 100.5q34 55 34 96q0 14 -2 21h-99q-42 18 -42 88v16zM341 288q-2 52 -10 77t-32 25q-45 0 -45 -102h9q9 0 27.5 -0.5t26.5 -0.5q16 0 24 1z" />
+ <glyph glyph-name="afii57449" unicode="&#x649;" horiz-adv-x="776"
+ d="M714 465q27 0 35.5 -15t8.5 -43q0 -9 -2 -27q-33 26 -66 26q-34 0 -80.5 -43t-46.5 -63q0 -29 80 -29q3 0 19 2t30 2q63 0 63 -37v-4q0 -118 -132 -197q-89 -53 -206 -53q-82 0 -141 17.5t-89 47t-43 60.5t-13 65q0 107 83 222l11 -4q-52 -98 -52 -163t52 -106.5
+ t146 -48.5q302 16 348 109q-2 20 -101 20h-6q-95 0 -95 56q0 65 67 135.5t130 70.5z" />
+ <glyph glyph-name="afii57450" unicode="&#x64a;" horiz-adv-x="776"
+ d="M461 -122l-65 -66l-67 66l67 67zM619 -89l-65 -66l-67 66l67 67zM714 465q27 0 35.5 -15t8.5 -43q0 -9 -2 -27q-33 26 -66 26q-34 0 -80.5 -43t-46.5 -63q0 -29 80 -29q3 0 19 2t30 2q63 0 63 -37v-4q0 -118 -132 -197q-89 -53 -206 -53q-82 0 -141 17.5t-89 47t-43 60.5
+ t-13 65q0 107 83 222l11 -4q-52 -98 -52 -163t52 -106.5t146 -48.5q302 16 348 109q-2 20 -101 20h-6q-95 0 -95 56q0 65 67 135.5t130 70.5z" />
+ <glyph glyph-name="afii57451" unicode="&#x64b;" horiz-adv-x="300"
+ d="M190 1006l-78 -37.5t-42 -28.5t-16 -36l151 74q23 10 32 22t12 35zM190 916l-78 -37.5t-42 -28.5t-16 -36l151 74q23 10 32 22t12 35z" />
+ <glyph glyph-name="afii57453" unicode="&#x64d;" horiz-adv-x="300"
+ d="M180 -153l-74.5 -37t-43.5 -29t-18 -37l151 74q23 10 32 22t12 35zM180 -63l-74.5 -37t-43.5 -29t-18 -37l151 74q23 10 32 22t12 35z" />
+ <glyph glyph-name="afii57454" unicode="&#x64e;" horiz-adv-x="300"
+ d="M190 1006l-78 -37.5t-42 -28.5t-16 -36l151 74q23 10 32 22t12 35z" />
+ <glyph glyph-name="afii57455" unicode="&#x64f;" horiz-adv-x="300"
+ d="M219 1010q24 -11 30 -17.5t6 -15.5q0 -11 -6 -25l-50 23q-34 -64 -127 -100h-21q71 39 124 112l-21 17t-15 13.5t-9 14.5t-3 18q0 34 25.5 59t51.5 25q31 0 31 -41q0 -30 -16 -83zM201 1052q0 18 -5.5 25t-21.5 7q-13 0 -13 -17q0 -12 39 -41q1 10 1 26z" />
+ <glyph glyph-name="afii57456" unicode="&#x650;" horiz-adv-x="300"
+ d="M180 -153l-74.5 -37t-43.5 -29t-18 -37l151 74q23 10 32 22t12 35z" />
+ <glyph glyph-name="afii57457" unicode="&#x651;" horiz-adv-x="300"
+ d="M250 1011q-1 -13 -15 -30.5t-35 -17.5q-8 0 -17 3q-18 -45 -51 -45q-19 0 -31.5 15.5t-12.5 39.5q0 14 5 37h7q-5 -18 -5 -28q0 -15 8.5 -24t20.5 -9q13 0 22.5 11t27.5 42q10 -14 22 -14q11 0 23 13t12 25q0 21 -23 35l6 12q36 -50 36 -65z" />
+ <glyph glyph-name="afii57392" unicode="&#x660;" horiz-adv-x="297"
+ d="M331 404l-111 -124l-106 125l106 122z" />
+ <glyph glyph-name="afii57393" unicode="&#x661;" horiz-adv-x="254"
+ d="M210 796q79 -141 101.5 -271.5t22.5 -347.5q-6 -22 -15 -22q-11 0 -20.5 60t-20 141t-41.5 181.5t-77 165.5z" />
+ <glyph glyph-name="afii57394" unicode="&#x662;" horiz-adv-x="427"
+ d="M300 705q22 0 38.5 3.5t28 13.5l18.5 16.5t13 25.5l8 25.5t7 30.5l34 -38q0 -97 -22 -131.5t-97 -34.5q-51 0 -83 23q27 -126 39 -438q-14 -29 -26 -29q-19 0 -29 58.5t-16 138.5t-34.5 180t-78.5 166l60 94q48 -68 72 -86t68 -18z" />
+ <glyph glyph-name="afii57395" unicode="&#x663;" horiz-adv-x="497"
+ d="M144 824l42.5 -54t32 -40.5t22.5 -18t32 -8.5q44 0 57.5 19t20.5 69q7 15 14 15q11 0 16.5 -29.5t12.5 -42.5q9 -19 41 -19q49 0 49 49v5q3 6 11 19t10 13q4 0 13 -49q0 -120 -77 -125q-60 7 -76 52q-30 -38 -46 -48t-46 -10q-8 0 -32 2q23 -95 23 -209q0 -231 -39 -231
+ q-12 0 -27 29q5 97 5 156q-1 29 0 54t-3.5 59t-13.5 70.5t-31 89.5t-54 116z" />
+ <glyph glyph-name="afii57396" unicode="&#x664;" horiz-adv-x="440"
+ d="M353 675q37 0 56.5 5t20.5 5q3 0 3 -4q0 -5 -11 -27q-17 -28 -43.5 -37.5t-98.5 -9.5h-48h-20q13 -62 13 -169q0 -260 -29 -260q-15 0 -18 16q-7 213 -23.5 294.5t-81.5 213.5l46 95l48 -67q7 -19 13 -19q2 0 7 22t14 48t36.5 48t68.5 22q24 0 58 -17t34 -49
+ q0 -12 -14 -12q-28 27 -58 27q-12 0 -28 -3.5t-33.5 -16.5t-17.5 -34q0 -16 7 -36q28 -22 47.5 -28.5t51.5 -6.5z" />
+ <glyph glyph-name="afii57397" unicode="&#x665;" horiz-adv-x="465"
+ d="M145 189q-59 0 -79 36.5t-20 107.5q0 16 42 115q39 98 143 239l-21 29l52 57q87 -128 127 -213.5t43 -188.5v-11q0 -73 -29.5 -121.5t-87.5 -48.5q-60 0 -84 60q-25 -53 -86 -61zM257 661q-69 -98 -117.5 -190.5t-48.5 -140.5q0 -81 55 -81q12 0 21.5 8t21.5 23.5
+ t23 23.5q13 11 40 -16t47 -27q12 0 30 6.5t36.5 28t18.5 53.5q0 50 -34 141t-93 171z" />
+ <glyph glyph-name="afii57398" unicode="&#x666;" horiz-adv-x="466"
+ d="M247 559q27 0 43 5t27.5 13t49.5 26t95 37q3 -45 3 -76q-84 -28 -196.5 -152.5t-179.5 -271.5q-2 -1 -4 -1q-6 0 -6 9q0 46 45.5 155t108.5 185q-86 13 -119.5 42t-33.5 54q0 50 58.5 113t110.5 65h5q36 0 57.5 -14.5t42.5 -48.5q1 -1 1 -3q0 -4 -9 -4q-8 0 -31.5 4.5
+ t-39.5 4.5q-46 0 -79.5 -33t-33.5 -54q0 -22 19.5 -38.5t65.5 -16.5z" />
+ <glyph glyph-name="afii57399" unicode="&#x667;" horiz-adv-x="421"
+ d="M212 268q0 65 -57.5 217t-107.5 198l25 91q113 -148 175 -429q21 283 118 428l23 -90q-31 -45 -67 -161.5t-40 -225.5l-5 -45q-5 -47 -39 -47v-1q-26 12 -26 48q0 2 0.5 8t0.5 9z" />
+ <glyph glyph-name="afii57400" unicode="&#x668;" horiz-adv-x="459"
+ d="M314 592q54 -206 121 -293l-36 -100l-154 441l-151 -441l-38 97q67 86 121 294t68 219q17 -11 69 -217z" />
+ <glyph glyph-name="afii57401" unicode="&#x669;" horiz-adv-x="424"
+ d="M398 165q-133 121 -133 344q0 34 1 53q-51 -9 -88 -9q-55 0 -78 26t-23 60q0 13 3.5 32.5t13 46t24 49t39.5 38t56 15.5q49 0 79.5 -65t35.5 -176q-2 -16 -2 -46q0 -76 23.5 -136t71.5 -122zM142 677q0 -29 19.5 -38t61.5 -9q29 0 47 1q-4 24 -7.5 38.5t-11 31.5t-21 25
+ t-32.5 8q-23 0 -39.5 -19.5t-16.5 -37.5z" />
+ <glyph glyph-name="uni066B" unicode="&#x66b;" horiz-adv-x="212"
+ d="M79 183q-24 0 -39.5 23t-15.5 44q0 25 19.5 41t46.5 16q31 0 48.5 -28t17.5 -67q0 -25 -13 -53.5t-36 -47.5l-15 -3q29 48 36 91q-37 -16 -49 -16z" />
+ <glyph glyph-name="uni0674" unicode="&#x674;" horiz-adv-x="300"
+ d="M203 970q-4 0 -12 18t-18 18q-13 0 -25.5 -22.5t-12.5 -38.5q0 -11 6 -28t15 -17q5 0 9.5 2t10 6t22 12t38.5 17l-8 -33q-49 -15 -150 -91q26 36 63 70q-26 7 -36 18.5t-10 34.5q0 35 22 64t53 46h5q36 -2 36 -39t-8 -37z" />
+ <glyph glyph-name="afii57506" unicode="&#x67e;" horiz-adv-x="926"
+ d="M508 26l-52 -55l-53 55l53 52zM921 277q0 51 -4 84.5t-14.5 53t-15 25t-19.5 18.5l18 64q66 -40 66 -125q0 -5 -1 -13t-1 -13v-176h-724q-55 0 -83.5 21.5t-28.5 76.5q0 79 71 204l10 -8q-52 -101 -52 -143q0 -38 42 -69h736zM600 -83l-52 -55l-53 55l53 52zM693 26
+ l-53 -55l-53 55l53 52z" />
+ <glyph glyph-name="afii57507" unicode="&#x686;" horiz-adv-x="750"
+ d="M673 112l-62 -63l-63 63l63 61zM473 112l-62 -63l-63 63l63 61zM580 -13l-62 -61l-63 61l63 62zM334 506q13 0 111 -16.5t212 -16.5l90 2l-20 -63h-7q-177 0 -298 -51t-198 -158q-54 -77 -54 -156q0 -35 8.5 -67.5t28 -64.5t59 -51t94.5 -19q114 0 313 45l37 -47
+ q-162 -50 -325 -54h-27q-134 13 -182 77q-45 61 -45 83q-8 22 -8 53q0 67 32.5 127.5t95.5 133.5q145 118 242 144q-54 15 -109.5 27t-109.5 12q-51 0 -65 -17l-27 -10q34 34 51 48.5t43.5 26.5t57.5 12z" />
+ <glyph glyph-name="afii57508" unicode="&#x698;" horiz-adv-x="338"
+ d="M363 587l-52 -50l-53 50l53 49zM285 707l-52 -50l-54 50l54 48zM216 587l-52 -50l-53 50l53 49zM325 447q20 -69 20 -148q0 -22 -5 -58t-6 -46l-128 -241q-49 -72 -103 -84l-104 -23l5 21q18 14 34 24t39 31.5t46.5 49t57 76t71.5 112.5q33 54 33 107q0 45 -18 132z" />
+ <glyph glyph-name="afii57509" unicode="&#x6af;" horiz-adv-x="874"
+ d="M948 962l-199 -87q-19 -8 -73.5 -33.5t-54.5 -32.5q0 -10 107 -126l40 -51t31 -41.5t24.5 -38.5t21.5 -43t21 -55.5l24 -74.5q4 -39 4 -75q0 -101 -42 -101h-1l-587 2q-78 0 -128 87q-15 26 -15 89q0 67 20 131l8 -5q-7 -45 -7 -84q0 -77 39.5 -111t137.5 -34h11h529
+ q2 24 2 35q0 121 -125 286l-61 65l-11 -14q-34 23 -86 75q-4 26 -4 38q0 60 45.5 102t171.5 94l163 66zM870 1115v-52l-304 -135q21 45 304 187z" />
+ <glyph glyph-name="uni06CC" unicode="&#x6cc;" horiz-adv-x="776"
+ d="M714 465q27 0 35.5 -15t8.5 -43q0 -9 -2 -27q-33 26 -66 26q-34 0 -80.5 -43t-46.5 -63q0 -29 80 -29q3 0 19 2t30 2q63 0 63 -37v-4q0 -118 -132 -197q-89 -53 -206 -53q-82 0 -141 17.5t-89 47t-43 60.5t-13 65q0 107 83 222l11 -4q-52 -98 -52 -163t52 -106.5
+ t146 -48.5q302 16 348 109q-2 20 -101 20h-6q-95 0 -95 56q0 65 67 135.5t130 70.5z" />
+ <glyph glyph-name="uni06D4" unicode="&#x6d4;" horiz-adv-x="176"
+ d="M90 238q10 37 48 46q38 -9 48 -46q-10 -38 -48 -48q-38 10 -48 48z" />
+
+ <!-- presentational forms -->
+ <glyph glyph-name="uniFB56" unicode="&#x67e;" horiz-adv-x="926" arabic-form="isolated"
+d="M508 26l-52 -55l-53 55l53 52zM921 277c0 34 -1.33331 62.1667 -4 84.5s-7.5 40 -14.5 53s-12 21.3333 -15 25s-9.5 9.83334 -19.5 18.5l18 64c44 -26.6667 66 -68.3333 66 -125c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.66666 -1 -13v-176h-724
+c-36.6667 0 -64.5 7.16667 -83.5 21.5s-28.5 39.8333 -28.5 76.5c0 52.6667 23.6667 120.667 71 204l10 -8c-34.6667 -67.3333 -52 -115 -52 -143c0 -25.3333 14 -48.3333 42 -69h736zM600 -83l-52 -55l-53 55l53 52zM693 26l-53 -55l-53 55l53 52z" />
+ <glyph glyph-name="uniFB57" unicode="&#x67e;" horiz-adv-x="926" arabic-form="terminal"
+ d="M508 26l-52 -55l-53 55l53 52zM921 277c0 34 -1.33331 62.1667 -4 84.5s-7.5 40 -14.5 53s-12 21.3333 -15 25s-9.5 9.83334 -19.5 18.5l18 64c44 -26.6667 66 -68.3333 66 -125c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.66666 -1 -13v-176h-724
+c-36.6667 0 -64.5 7.16667 -83.5 21.5s-28.5 39.8333 -28.5 76.5c0 52.6667 23.6667 120.667 71 204l10 -8c-34.6667 -67.3333 -52 -115 -52 -143c0 -25.3333 14 -48.3333 42 -69h736zM600 -83l-52 -55l-53 55l53 52zM693 26l-53 -55l-53 55l53 52z" />
+ <glyph glyph-name="uniFB58" unicode="&#x67e;" horiz-adv-x="308" arabic-form="initial"
+ d="M148 58l-57 -58l-58 58l58 58zM207 -73l-57 -59l-57 59l57 58zM268 58l-57 -58l-58 58l58 58zM256 534c30 -43.3333 45 -93 45 -149v-74c0 -73.3333 -17.3333 -110.333 -52 -111h-252l-9 83h280v11c0 68 -18.6667 120.667 -56 158z" />
+ <glyph glyph-name="uniFB59" unicode="&#x67e;" horiz-adv-x="308" arabic-form="medial"
+ d="M148 58l-57 -58l-58 58l58 58zM207 -73l-57 -59l-57 59l57 58zM268 58l-57 -58l-58 58l58 58zM256 534c30 -43.3333 45 -93 45 -149v-74c0 -73.3333 -17.3333 -110.333 -52 -111h-252l-9 83h280v11c0 68 -18.6667 120.667 -56 158z" />
+ <glyph glyph-name="uniFB7A" unicode="&#x686;" horiz-adv-x="750" arabic-form="isolated"
+ d="M673 112l-62 -63l-63 63l63 61zM473 112l-62 -63l-63 63l63 61zM580 -13l-62 -61l-63 61l63 62zM334 506c9.33334 0 46.5 -5.5 111.5 -16.5s135.5 -16.5 211.5 -16.5l90 2l-20 -63h-7c-230.667 0 -396 -69.6667 -496 -209c-36 -51.3333 -54 -103.333 -54 -156
+c0 -23.3333 2.83333 -45.8333 8.5 -67.5c5.66667 -21.6667 15 -43.1667 28 -64.5c13 -21.3333 32.6667 -38.3333 59 -51c26.3333 -12.6667 57.8333 -19 94.5 -19c76 0 180.333 15 313 45l37 -47c-108 -33.3333 -216.333 -51.3333 -325 -54h-27
+c-89.3333 8.66667 -150 34.3333 -182 77c-30 40.6667 -45 68.3333 -45 83c-5.33334 14.6667 -8 32.3333 -8 53c0 44.6667 10.8333 87.1667 32.5 127.5c21.6667 40.3333 53.5 84.8333 95.5 133.5c96.6667 78.6667 177.333 126.667 242 144c-36 10 -72.5 19 -109.5 27
+s-73.5 12 -109.5 12c-34 0 -55.6667 -5.66666 -65 -17l-27 -10c22.6667 22.6667 39.6667 38.8333 51 48.5s25.8333 18.5 43.5 26.5s36.8333 12 57.5 12z" />
+ <glyph glyph-name="uniFB7B" unicode="&#x686;" horiz-adv-x="750" arabic-form="terminal"
+ d="M490 32l-52 -52l-51 52l51 51zM628 401c6 -54.6667 13.3333 -89.3333 22 -104s27.3333 -22 56 -22h50l-3 -81h-40c-20.6667 2 -37.6667 8.83333 -51 20.5s-22.8333 28 -28.5 49s-9.33331 39.5 -11 55.5s-2.5 36.3333 -2.5 61zM333 501c11.3333 0 50 -5.5 116 -16.5
+s134 -16.5 204 -16.5l89 2l-20 -62h-7c-228.667 0 -392.333 -69 -491 -207c-35.3333 -50.6667 -53 -102.333 -53 -155c0 -17.3333 1.33333 -34.1667 4 -50.5c2.66667 -16.3333 8.16667 -33.8333 16.5 -52.5c8.33333 -18.6667 19.3333 -34.8333 33 -48.5s32.5 -25 56.5 -34
+s52 -13.5 84 -13.5c73.3333 0 164.333 11.3333 273 34l67 -36c-107.333 -32 -214.333 -50 -321 -54h-27c-90 9.33333 -150 35 -180 77c-30 40.6667 -45 68 -45 82c-4.66666 13.3333 -7 30.6667 -7 52c0 44.6667 10.6667 87 32 127s52.6667 84 94 132
+c95.3333 77.3333 175 124.667 239 142c-34 9.33334 -70 18 -108 26s-74.3333 12 -109 12c-34 0 -55 -5.33334 -63 -16l-27 -10c32 32 57.8333 54.3333 77.5 67c19.6667 12.6667 43.8333 19 72.5 19zM575 131l-52 -52l-51 52l51 51zM419 131l-52 -52l-51 52l51 51z" />
+ <glyph glyph-name="uniFB7C" unicode="&#x686;" horiz-adv-x="580" arabic-form="initial"
+ d="M271 59l-50 -51l-52 51l52 51zM445 59l-52 -51l-50 51l50 51zM358 -38l-51 -52l-51 52l51 51zM149 354c10.6667 14.6667 21.3333 28.5 32 41.5s20.6667 24.3333 30 34s19.6667 17.3333 31 23s23.3333 8.5 36 8.5c18.6667 0 46.5 -12.8333 83.5 -38.5
+s76.1667 -57.5 117.5 -95.5c20 -23.3333 63 -40.3333 129 -51l2 -76h-590c-15.3333 0 -23 25 -23 75l462 1l-127 90c-15.3333 10.6667 -32 16 -50 16c-22 0 -61 -10.3333 -117 -31z" />
+ <glyph glyph-name="uniFB7D" unicode="&#x686;" horiz-adv-x="580" arabic-form="medial"
+ d="M271 59l-50 -51l-52 51l52 51zM445 59l-52 -51l-50 51l50 51zM358 -38l-51 -52l-51 52l51 51zM149 354c10.6667 14.6667 21.3333 28.5 32 41.5s20.6667 24.3333 30 34s19.6667 17.3333 31 23s23.3333 8.5 36 8.5c18.6667 0 46.5 -12.8333 83.5 -38.5
+s76.1667 -57.5 117.5 -95.5c20 -23.3333 63 -40.3333 129 -51l2 -76h-590c-15.3333 0 -23 25 -23 75l462 1l-127 90c-15.3333 10.6667 -32 16 -50 16c-22 0 -61 -10.3333 -117 -31z" />
+ <glyph glyph-name="uniFB8A" unicode="&#x698;" horiz-adv-x="338" arabic-form="isolated"
+ d="M363 587l-52 -50l-53 50l53 49zM285 707l-52 -50l-54 50l54 48zM216 587l-52 -50l-53 50l53 49zM325 447c13.3333 -46 20 -95.3333 20 -148c0 -11.3333 -0.333344 -19.6667 -1 -25l-10 -79l-128 -241c-32.6667 -48 -67 -76 -103 -84l-104 -23l5 21
+c12.6667 10 24.6667 18.5 36 25.5c11.3333 7 24.3333 17.6667 39 32c14.6667 14.3333 30 30.6667 46 49c16 18.3333 34.8333 43.5 56.5 75.5s45.1667 69 70.5 111c22 36 33 71.6667 33 107c0 30 -6 74 -18 132z" />
+ <glyph glyph-name="uniFB8B" unicode="&#x698;" horiz-adv-x="338" arabic-form="terminal"
+ d="M363 587l-52 -50l-53 50l53 49zM285 707l-52 -50l-54 50l54 48zM216 587l-52 -50l-53 50l53 49zM325 447c13.3333 -46 20 -95.3333 20 -148c0 -11.3333 -0.333344 -19.6667 -1 -25l-10 -79l-128 -241c-32.6667 -48 -67 -76 -103 -84l-104 -23l5 21
+c12.6667 10 24.6667 18.5 36 25.5c11.3333 7 24.3333 17.6667 39 32c14.6667 14.3333 30 30.6667 46 49c16 18.3333 34.8333 43.5 56.5 75.5s45.1667 69 70.5 111c22 36 33 71.6667 33 107c0 30 -6 74 -18 132z" />
+ <glyph glyph-name="uniFB92" unicode="&#x6af;" horiz-adv-x="874" arabic-form="isolated"
+ d="M142 426c0 -50 12.1667 -87.1667 36.5 -111.5s71.8333 -36.5 142.5 -36.5h9h529c1.33331 16 2 27.6667 2 35c0 80.6667 -41.6667 176 -125 286l-61 65l-11 -14c-20 13.3333 -39.6667 29.6667 -59 49l-27 26c-2.66669 17.3333 -4 30 -4 38c0 40 15.1667 74 45.5 102
+s87.5 59.3333 171.5 94l163 66l-6 -63l-199 -87c-12.6667 -5.33331 -37.1667 -16.5 -73.5 -33.5s-54.5 -27.8333 -54.5 -32.5c0 -6.66669 35.6667 -48.6667 107 -126l40 -51c11.3333 -14 21.6667 -27.8333 31 -41.5s17.5 -26.5 24.5 -38.5s14.1667 -26.3333 21.5 -43
+c7.33331 -16.6667 14.3333 -35.1667 21 -55.5l24 -74.5c2.66669 -26 4 -51 4 -75c0 -67.3333 -14 -101 -42 -101h-1l-587 2c-52 0 -94.6667 29 -128 87c-10 17.3333 -15 47 -15 89c0 44.6667 6.66666 88.3333 20 131l8 -5c-4.66667 -35.3333 -7 -62.3333 -7 -81zM870 1115
+v-52l-304 -135c14 30 115.333 92.3333 304 187z" />
+ <glyph glyph-name="uniFB93" unicode="&#x6af;" horiz-adv-x="874" arabic-form="terminal"
+ d="M142 426c0 -50 12.1667 -87.1667 36.5 -111.5s71.8333 -36.5 142.5 -36.5h9h529c1.33331 16 2 27.6667 2 35c0 80.6667 -41.6667 176 -125 286l-61 65l-11 -14c-20 13.3333 -39.6667 29.6667 -59 49l-27 26c-2.66669 17.3333 -4 30 -4 38c0 40 15.1667 74 45.5 102
+s87.5 59.3333 171.5 94l163 66l-6 -63l-199 -87c-12.6667 -5.33331 -37.1667 -16.5 -73.5 -33.5s-54.5 -27.8333 -54.5 -32.5c0 -6.66669 35.6667 -48.6667 107 -126l40 -51c11.3333 -14 21.6667 -27.8333 31 -41.5s17.5 -26.5 24.5 -38.5s14.1667 -26.3333 21.5 -43
+c7.33331 -16.6667 14.3333 -35.1667 21 -55.5l24 -74.5c2.66669 -26 4 -51 4 -75c0 -67.3333 -14 -101 -42 -101h-1l-587 2c-52 0 -94.6667 29 -128 87c-10 17.3333 -15 47 -15 89c0 44.6667 6.66666 88.3333 20 131l8 -5c-4.66667 -35.3333 -7 -62.3333 -7 -81zM870 1115
+v-52l-304 -135c14 30 115.333 92.3333 304 187z" />
+ <glyph glyph-name="uniFB94" unicode="&#x6af;" horiz-adv-x="329" arabic-form="initial"
+ d="M398 912l-199 -82c-85.3333 -36 -128 -56.6667 -128 -62s35.6667 -44.6667 107 -118l40 -47.5c11.3333 -13 21.6667 -25.8333 31 -38.5c9.33334 -12.6667 17.5 -24.6667 24.5 -36s14 -25 21 -41s14 -33.5 21 -52.5s15.1667 -42.5 24.5 -70.5
+c2.66666 -24 4 -47.6667 4 -71c0 -62.6667 -14 -94 -42 -94h-1l-306 2l6 78h308c1.33334 13.3333 2 23 2 29c0 72.6667 -41.6667 160.333 -125 263l-61 61l-11 -13c-16.6667 10 -36.3333 25.3333 -59 46l-27 24c-2.66667 17.3333 -4 29.3333 -4 36
+c0 38.6667 15.8333 71.1667 47.5 97.5c31.6667 26.3333 88.1667 55.1667 169.5 86.5l163 62zM354 1077v-50l-304 -130c14 29.3333 115.333 89.3333 304 180z" />
+ <glyph glyph-name="uniFB95" unicode="&#x6af;" horiz-adv-x="329" arabic-form="medial"
+ d="M398 912l-199 -82c-85.3333 -36 -128 -56.6667 -128 -62s35.6667 -44.6667 107 -118l40 -47.5c11.3333 -13 21.6667 -25.8333 31 -38.5c9.33334 -12.6667 17.5 -24.6667 24.5 -36s14 -25 21 -41s14 -33.5 21 -52.5s15.1667 -42.5 24.5 -70.5
+c2.66666 -24 4 -47.6667 4 -71c0 -62.6667 -14 -94 -42 -94h-1l-306 2l6 78h308c1.33334 13.3333 2 23 2 29c0 72.6667 -41.6667 160.333 -125 263l-61 61l-11 -13c-16.6667 10 -36.3333 25.3333 -59 46l-27 24c-2.66667 17.3333 -4 29.3333 -4 36
+c0 38.6667 15.8333 71.1667 47.5 97.5c31.6667 26.3333 88.1667 55.1667 169.5 86.5l163 62zM354 1077v-50l-304 -130c14 29.3333 115.333 89.3333 304 180z" />
+ <glyph glyph-name="uniFBFC" unicode="&#x6cc;" horiz-adv-x="776" arabic-form="isolated"
+ d="M714 465c18 0 29.8333 -5 35.5 -15s8.5 -24.3333 8.5 -43c0 -2 -0.166687 -4.66666 -0.5 -8s-0.5 -5.66666 -0.5 -7l-1 -12c-22 17.3333 -44 26 -66 26c-22.6667 0 -49.5 -14.3333 -80.5 -43s-46.5 -49.6667 -46.5 -63c0 -19.3333 26.6667 -29 80 -29
+c2 0 8.33331 0.666656 19 2s20.6667 2 30 2c42 0 63 -12.3333 63 -37v-4c0 -78.6667 -44 -144.333 -132 -197c-59.3333 -35.3333 -128 -53 -206 -53c-54.6667 0 -101.667 5.83333 -141 17.5c-39.3333 11.6667 -69 27.3333 -89 47c-20 19.6667 -34.3333 39.8333 -43 60.5
+c-8.66667 20.6667 -13 42.3333 -13 65c0 71.3333 27.6667 145.333 83 222l11 -4c-34.6667 -65.3333 -52 -119.667 -52 -163c0 -43.3333 17.3333 -78.8333 52 -106.5c34.6667 -27.6667 83.3333 -43.8333 146 -48.5c201.333 10.6667 317.333 47 348 109
+c-1.33331 13.3333 -35 20 -101 20h-6c-63.3333 0 -95 18.6667 -95 56c0 43.3333 22.3333 88.5 67 135.5s88 70.5 130 70.5z" />
+ <glyph glyph-name="uniFBFD" unicode="&#x6cc;" horiz-adv-x="700" arabic-form="terminal"
+ d="M370 -14c70 0 130.167 8 180.5 24c50.3333 16 75.5 32.3333 75.5 49v2c0 10 -9 15 -27 15c-1.33331 0 -3.83331 -0.166664 -7.5 -0.5s-6.5 -0.5 -8.5 -0.5h-110c-28 4 -42 20.3333 -42 49c0 2 0.333344 5.16667 1 9.5s1 7.83333 1 10.5c0 38.6667 28 74.6667 84 108
+c30 18 81.3333 27 154 27h50l-1 -77c-8.66669 0 -20.6667 0.166672 -36 0.5s-26.3333 0.5 -33 0.5c-74 0 -123.667 -3.83333 -149 -11.5c-25.3333 -7.66667 -38 -23.1667 -38 -46.5c0 -9.33333 6.33334 -14 19 -14h111c51.3333 0 77 -16.3333 77 -49
+c0 -42.6667 -19 -78 -57 -106s-91 -46.6667 -159 -56c-9.33334 -1.33334 -42.3333 -2 -99 -2c-88 8 -147.167 22.8333 -177.5 44.5c-30.3333 21.6667 -45.8333 56.5 -46.5 104.5v13c0 66 18.3333 135.333 55 208l7 -4c-28 -57.3333 -42 -104.333 -42 -141
+c0 -47.3333 10.6667 -84 32 -110c44.6667 -31.3333 106.667 -47 186 -47z" />
+ <glyph glyph-name="uniFBFE" unicode="&#x6cc;" horiz-adv-x="304" arabic-form="initial"
+ d="M173 55l-59 -57l-61 57l61 57zM300 55l-59 -57l-61 57l61 57zM286 514c30 -41.3333 45 -88 45 -140v-69c0 -69.3333 -17.3333 -104.333 -52 -105h-252c-32.6667 0 -49 26 -49 78h320v10c0 64 -18.6667 113.667 -56 149z" />
+ <glyph glyph-name="uniFBFF" unicode="&#x6cc;" horiz-adv-x="304" arabic-form="medial"
+ d="M173 55l-59 -57l-61 57l61 57zM300 55l-59 -57l-61 57l61 57zM286 514c30 -41.3333 45 -88 45 -140v-69c0 -69.3333 -17.3333 -104.333 -52 -105h-252c-32.6667 0 -49 26 -49 78h320v10c0 64 -18.6667 113.667 -56 149z" />
+ <glyph glyph-name="uniFDF2" unicode="&#xfdf2;" horiz-adv-x="640" arabic-form="isolated"
+ d="M918 261c30 0 45 29 45 87c0 73.3333 -3.33331 125 -10 155l-29 132l55 29l19 -162c4 -43.3333 6.66669 -92.6667 8 -148v-20c0 -65.3333 -4.33331 -109 -13 -131s-28.3333 -33 -59 -33c-72.6667 1.33333 -112.333 26.3333 -119 75c-8 -50 -45 -75 -111 -75
+c-40 0 -74.3333 38 -103 114l-34 -30c-36 0.666672 -65 7.66666 -87 21s-33 30 -33 50c0 15.3333 3.16666 29.3333 9.5 42s16.5 24.1667 30.5 34.5s25.1667 18 33.5 23s21.6667 11.6667 40 20s27.8333 12.5 28.5 12.5v45l31 34c2 -51.3333 4.16669 -92.1667 6.5 -122.5
+s5.66669 -57.1667 10 -80.5s10.6667 -40.1667 19 -50.5s18.1667 -17.8333 29.5 -22.5c11.3333 -4.66667 26 -7 44 -7c27.3333 0 44.1667 4.5 50.5 13.5s9.5 27.8333 9.5 56.5c0 96 -8 186.333 -24 271l55 41c2 -156.667 11.3333 -270.667 28 -342c5.33331 -22 23 -33 53 -33
+c1.33331 0 3.33331 0.166656 6 0.5s5 0.5 7 0.5h4zM483 341c9.33334 -15.3333 19.8333 -25.6667 31.5 -31c11.6667 -5.33334 29.8333 -8 54.5 -8c10.6667 0 18.3333 0.333344 23 1v107c-60.6667 -22.6667 -97 -45.6667 -109 -69zM786 782c1.33331 0 5 -5 11 -15
+s13.3333 -15 22 -15c9.33331 6 14 14 14 24c0 5.33331 -1 10.3333 -3 15c2 4 4 6 6 6c2 0.666687 4.33331 -2.66669 7 -10s4 -19.6667 4 -37c0 -10.6667 -1.83331 -18 -5.5 -22s-10.5 -6 -20.5 -6c-7.33331 0 -17 1.66669 -29 5c-11.3333 -14 -21.6667 -21 -31 -21
+c-22.6667 0 -34 13.6667 -34 41c0 12 0.666687 22 2 30h2c2 0.666687 3.66669 -0.666687 5 -4s2.33331 -7 3 -11s2.16669 -7.83331 4.5 -11.5s5.5 -5.5 9.5 -5.5c4.66669 0 11 2.16669 19 6.5s12 10.5 12 18.5c0 3.33331 -0.333313 6 -1 8
+c0.666687 1.33331 1.66669 2.66669 3 4zM790 853c-2.66669 20 -12 42.3333 -28 67l28 30c3.33331 -18.6667 5 -37.6667 5 -57c0 -18 -1.66669 -31.3333 -5 -40z" />
+ <glyph glyph-name="uniFDFC" unicode="&#xfdfc;" horiz-adv-x="837" arabic-form="isolated"
+ d="M600 292c16 -20 26.6667 -38.3333 32 -55s8 -43.3333 8 -80v-84h-162c-24.6667 0 -41.8333 16.1667 -51.5 48.5c-9.66666 32.3333 -15.5 78.6667 -17.5 139c-2 60.3333 -4.66666 99.8333 -8 118.5c-5.33334 27.3333 -15.3333 48 -30 62l42 67
+c12.6667 -38 20.3333 -90.6667 23 -158l6 -154c5.33334 -42 17.3333 -63 36 -63h137c0 23.3333 -2.5 41.3333 -7.5 54s-16.5 29.3333 -34.5 50zM812 9c0 -33.3333 -19.8333 -68.8333 -59.5 -106.5c-39.6667 -37.6667 -75.8333 -56.5 -108.5 -56.5
+c-26.6667 0 -52 4.66667 -76 14l-73 28l5 13c45.3333 -8.66666 76 -13 92 -13c44 0 87.6667 19 131 57c42.6667 36.6667 64 71.6667 64 105c0 34 -17.3333 69.3333 -52 106l20 54c38 -34.6667 57 -73.6667 57 -117v-84zM638 5l-27 -49l-55 30l26 48zM560 -25l-27 -50l-55 29
+l25 49zM322 415c22.6667 -142 34 -239.667 34 -293c0 -52 -16 -88 -48 -108s-78.6667 -30 -140 -30c-94.6667 0 -142 34.6667 -142 104c0 46 19.6667 104.667 59 176l11 -6c-29.3333 -53.3333 -44 -96.6667 -44 -130c0 -56.6667 38.3333 -85 115 -85
+c36.6667 0 72.6667 6.66667 108 20c35.3333 13.3333 53 30.6667 53 52c0 43.3333 -14 148.333 -42 315l-15 8v8c0 26 6 51 18 75h6c0.666656 -14.6667 6 -24 16 -28l40 -18c0 -20 -3 -42 -9 -66z" />
+ <glyph glyph-name="uniFE70" unicode="&#xfe70;" arabic-form="isolated"
+ d="M190 1006l-78.5 -38c-19 -9.33331 -32.6667 -18.5 -41 -27.5c-8.33333 -9 -13.8333 -21.1667 -16.5 -36.5l151 74c15.3333 6.66669 26 14 32 22s10 19.6667 12 35zM190 916l-78.5 -38c-19 -9.33331 -32.6667 -18.5 -41 -27.5c-8.33333 -9 -13.8333 -21.1667 -16.5 -36.5
+l151 74c15.3333 6.66669 26 14 32 22s10 19.6667 12 35z" />
+ <glyph glyph-name="uniFE74" unicode="&#xfe74;" arabic-form="isolated"
+ d="M180 -153l-76 -37c-19.3333 -9.33333 -33.5 -18.8333 -42.5 -28.5s-14.8333 -22.1667 -17.5 -37.5l151 74c15.3333 6.66667 26 14 32 22s10 19.6667 12 35zM180 -63l-76 -37c-19.3333 -9.33334 -33.5 -18.8333 -42.5 -28.5c-9 -9.66667 -14.8333 -22.1667 -17.5 -37.5
+l151 74c15.3333 6.66666 26 14 32 22s10 19.6667 12 35z" />
+ <glyph glyph-name="uniFE76" unicode="&#xfe76;" arabic-form="isolated"
+ d="M190 1006l-78.5 -38c-19 -9.33331 -32.6667 -18.5 -41 -27.5c-8.33333 -9 -13.8333 -21.1667 -16.5 -36.5l151 74c15.3333 6.66669 26 14 32 22s10 19.6667 12 35z" />
+ <glyph glyph-name="uniFE78" unicode="&#xfe78;" arabic-form="isolated"
+ d="M219 1010c16 -7.33331 26 -13 30 -17s6 -9.33331 6 -16c0 -7.33331 -2 -15.6667 -6 -25l-50 23c-22.6667 -42.6667 -65 -76 -127 -100h-21c47.3333 26 88.6667 63.3333 124 112l-34 28c-9.33333 8.66669 -14 20.3334 -14 35c0 23.3334 8.66667 43.1666 26 59.5
+s34.3333 24.5 51 24.5c20.6667 0 31 -14 31 -42c0 -19.3334 -5.33333 -46.6666 -16 -82zM201 1052c0 12 -1.66667 20.3334 -5 25s-10.3333 7 -21 7c-9.33333 0 -14 -5.33337 -14 -16c0 -8.66663 13 -22.6666 39 -42c0.666672 6.66663 1 15.3334 1 26z" />
+ <glyph glyph-name="uniFE7A" unicode="&#xfe7a;" arabic-form="isolated"
+ d="M180 -153l-76 -37c-19.3333 -9.33333 -33.5 -18.8333 -42.5 -28.5s-14.8333 -22.1667 -17.5 -37.5l151 74c15.3333 6.66667 26 14 32 22s10 19.6667 12 35z" />
+ <glyph glyph-name="uniFE7C" unicode="&#xfe7c;" arabic-form="isolated"
+ d="M250 1011c-0.666672 -8 -5.83333 -18.1667 -15.5 -30.5s-21.1667 -18.5 -34.5 -18.5c-3.33333 0 -9 1.33331 -17 4c-12 -30 -29 -45 -51 -45c-12.6667 0 -23.1667 5.16669 -31.5 15.5s-12.5 23.5 -12.5 39.5c0 9.33331 1.66666 21.6667 5 37h7
+c-3.33334 -12 -5 -21.3333 -5 -28c0 -10 2.66666 -18 8 -24s12.3333 -9 21 -9c4.66667 0 8.5 0.666687 11.5 2s7.83333 6 14.5 14s14.6667 20.3333 24 37c7.33333 -9.33331 14.6667 -14 22 -14s15 4.33331 23 13s12 17 12 25c0 14 -7.66667 25.6666 -23 35l6 12
+c24 -33.3334 36 -55 36 -65z" />
+ <glyph glyph-name="uniFE81" unicode="&#x622;" horiz-adv-x="321" arabic-form="isolated"
+ d="M155 1055c10 0 23.5 -0.5 40.5 -1.5s29.8333 -1.5 38.5 -1.5c24 0 42.8333 2.83337 56.5 8.5s35.8333 20.5 66.5 44.5l-17 -55c-12 -19.3334 -27 -32.6667 -45 -40s-46 -11 -84 -11c-3.33333 0 -13.6667 0.333313 -31 1s-33 1 -47 1
+c-10.6667 -0.666687 -19.8333 -0.5 -27.5 0.5s-19.3333 -2.83331 -35 -11.5c-15.6667 -8.66669 -35.1667 -23.3333 -58.5 -44c22.6667 45.3333 42 74.8333 58 88.5c16 13.6666 44.3333 20.5 85 20.5zM149 154c18 210.667 27 343 27 397c0 56.6667 -3 143 -9 259l42 89
+c9.33333 -170 14 -309.333 14 -418c0 -114 -24.6667 -223 -74 -327z" />
+ <glyph glyph-name="uniFE8C" unicode="&#x626;" horiz-adv-x="301" arabic-form="medial"
+ d="M175 653c0 14.6667 7.66667 34.6667 23 60s35 38 59 38h5c27.3333 -1.33331 41.6667 -16 43 -44c-12 8 -23 12 -33 12c-12 0 -24 -5.33331 -36 -16s-18 -20 -18 -28c0 -6 4.83333 -14.8333 14.5 -26.5s20.8333 -17.5 33.5 -17.5c13.3333 0 32.3333 3.33331 57 10
+c-39.3333 -34 -91.6667 -62.3333 -157 -85c11.3333 22 28.6667 38.3333 52 49c-28.6667 14 -43 30 -43 48zM271 509c28.6667 -42.6667 43 -89.6667 43 -141v-70c0 -70.6667 -16.6667 -106 -50 -106h-240c-30.6667 0 -46 26.3333 -46 79h304v11
+c0 64.6667 -17.3333 114.667 -52 150z" />
+ <glyph glyph-name="uniFE8D" unicode="&#x627;" horiz-adv-x="249" arabic-form="isolated"
+ d="M149 154l13.5 182c4.33333 56 7.33333 93.1667 9 111.5s2.83333 35.6667 3.5 52c0.666672 16.3333 1 33.8333 1 52.5c0 56.6667 -3 143 -9 259l42 89c9.33333 -170 14 -309.667 14 -419c0 -114 -24.6667 -223 -74 -327z" />
+ <glyph glyph-name="uniFE8E" unicode="&#x627;" horiz-adv-x="275" arabic-form="terminal"
+ d="M215 699c0 -50 -3 -100.5 -9 -151.5s-9 -91.1667 -9 -120.5c0 -30.6667 4 -64 12 -100c7.33333 -30.6667 36.6667 -46 88 -46h5v-81c-58 0 -98.6667 16.3333 -122 49c-23.3333 32.6667 -36.6667 82 -40 148c10.6667 84.6667 16 171.333 16 260
+c0 57.3333 -1.66667 106.333 -5 147l47 97c11.3333 -68 17 -135.333 17 -202z" />
+ <glyph glyph-name="uniFE8F" unicode="&#x628;" horiz-adv-x="950" arabic-form="isolated"
+ d="M644 2l-52 -54l-52 54l52 53zM926 278c0 43.3333 -3 78 -9 104s-11.5 42.3333 -16.5 49s-13.8333 15.3333 -26.5 26l18 64c43.3333 -27.3333 65 -68.6667 65 -124c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.66666 -1 -13v-174h-718c-37.3333 0 -65.1667 7 -83.5 21
+s-27.5 39.3333 -27.5 76c0 52 23.3333 119.667 70 203l10 -9c-34.6667 -69.3333 -52 -116.333 -52 -141c0 -24 14 -47 42 -69h730z" />
+ <glyph glyph-name="uniFE90" unicode="&#x628;" horiz-adv-x="950" arabic-form="terminal"
+ d="M644 2l-52 -54l-52 54l52 53zM926 278c0 43.3333 -3 78 -9 104s-11.5 42.3333 -16.5 49s-13.8333 15.3333 -26.5 26l18 64c43.3333 -27.3333 65 -68.6667 65 -124c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.66666 -1 -13v-174h-718c-37.3333 0 -65.1667 7 -83.5 21
+s-27.5 39.3333 -27.5 76c0 52 23.3333 119.667 70 203l10 -9c-34.6667 -69.3333 -52 -116.333 -52 -141c0 -24 14 -47 42 -69h730z" />
+ <glyph glyph-name="uniFE91" unicode="&#x628;" horiz-adv-x="293" arabic-form="initial"
+ d="M251 29l-67 -69l-68 69l68 68zM274 525c30 -43.3333 45 -92.6667 45 -148v-73c0 -74 -17.3333 -111 -52 -111h-271l2 83h288v11c0 68 -18.3333 120.333 -55 157z" />
+ <glyph glyph-name="uniFE92" unicode="&#x628;" horiz-adv-x="293" arabic-form="medial"
+ d="M251 29l-67 -69l-68 69l68 68zM274 525c30 -43.3333 45 -92.6667 45 -148v-73c0 -74 -17.3333 -111 -52 -111h-271l2 83h288v11c0 68 -18.3333 120.333 -55 157z" />
+ <glyph glyph-name="uniFE95" unicode="&#x62a;" horiz-adv-x="925" arabic-form="isolated"
+ d="M530 574l-65 -66l-67 66l67 67zM740 574l-65 -66l-67 66l67 67zM895 277c0 52.6667 -3 90.3333 -9 113s-19.6667 43 -41 61l17 61c42 -26 63 -65.6667 63 -119c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.33334 -1 -12v-169h-693
+c-34.6667 0 -61.1667 6.83333 -79.5 20.5s-27.5 38.1667 -27.5 73.5c0 50 22.6667 115.333 68 196l9 -8c-33.3333 -66.6667 -50 -112.333 -50 -137c0 -23.3333 13.6667 -45.6667 41 -67h704z" />
+ <glyph glyph-name="uniFE96" unicode="&#x62a;" horiz-adv-x="925" arabic-form="terminal"
+ d="M530 574l-65 -66l-67 66l67 67zM740 574l-65 -66l-67 66l67 67zM895 277c0 52.6667 -3 90.3333 -9 113s-19.6667 43 -41 61l17 61c42 -26 63 -65.6667 63 -119c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.33334 -1 -12v-169h-693
+c-34.6667 0 -61.1667 6.83333 -79.5 20.5s-27.5 38.1667 -27.5 73.5c0 50 22.6667 115.333 68 196l9 -8c-33.3333 -66.6667 -50 -112.333 -50 -137c0 -23.3333 13.6667 -45.6667 41 -67h704z" />
+ <glyph glyph-name="uniFE97" unicode="&#x62a;" horiz-adv-x="308" arabic-form="initial"
+ d="M150 689l-57 -58l-59 58l59 59zM295 688l-57 -59l-59 59l59 58zM254 533c29.3333 -44 44 -93.3333 44 -148v-74c0 -74 -17 -111 -51 -111h-251l-8 83h277v15c0 65.3333 -18.3333 116.333 -55 153z" />
+ <glyph glyph-name="uniFE98" unicode="&#x62a;" horiz-adv-x="308" arabic-form="medial"
+ d="M150 689l-57 -58l-59 58l59 59zM295 688l-57 -59l-59 59l59 58zM254 533c29.3333 -44 44 -93.3333 44 -148v-74c0 -74 -17 -111 -51 -111h-251l-8 83h277v15c0 65.3333 -18.3333 116.333 -55 153z" />
+ <glyph glyph-name="uniFE99" unicode="&#x62b;" horiz-adv-x="924" arabic-form="isolated"
+ d="M756 543l-64 -66l-67 66l67 67zM531 543l-64 -66l-67 66l67 67zM643 665l-65 -67l-66 67l66 66zM921 275c0 54 -3 92.6667 -9 116s-20 44 -42 62l17 63c43.3333 -27.3333 65 -68.3333 65 -123c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.66666 -1 -13v-173h-713
+c-36.6667 0 -64.1667 7 -82.5 21s-27.5 39.3333 -27.5 76c0 52 23.3333 119 70 201l9 -8c-34 -68 -51 -114.667 -51 -140c0 -24 14 -47 42 -69h724z" />
+ <glyph glyph-name="uniFE9A" unicode="&#x62b;" horiz-adv-x="924" arabic-form="terminal"
+ d="M756 543l-64 -66l-67 66l67 67zM531 543l-64 -66l-67 66l67 67zM643 665l-65 -67l-66 67l66 66zM921 275c0 54 -3 92.6667 -9 116s-20 44 -42 62l17 63c43.3333 -27.3333 65 -68.3333 65 -123c0 -3.33334 -0.333313 -7.66666 -1 -13s-1 -9.66666 -1 -13v-173h-713
+c-36.6667 0 -64.1667 7 -82.5 21s-27.5 39.3333 -27.5 76c0 52 23.3333 119 70 201l9 -8c-34 -68 -51 -114.667 -51 -140c0 -24 14 -47 42 -69h724z" />
+ <glyph glyph-name="uniFE9B" unicode="&#x62b;" horiz-adv-x="298" arabic-form="initial"
+ d="M163 675l-61 -61l-61 61l61 62zM293 673l-60 -61l-62 61l62 62zM230 794l-61 -62l-61 62l61 61zM264 532c30 -43.3333 45 -92.6667 45 -148v-73c0 -74 -17.3333 -111 -52 -111h-251l-8 83h278v11c0 68 -18.3333 120.333 -55 157z" />
+ <glyph glyph-name="uniFE9C" unicode="&#x62b;" horiz-adv-x="298" arabic-form="medial"
+ d="M163 675l-61 -61l-61 61l61 62zM293 673l-60 -61l-62 61l62 62zM230 794l-61 -62l-61 62l61 61zM264 532c30 -43.3333 45 -92.6667 45 -148v-73c0 -74 -17.3333 -111 -52 -111h-251l-8 83h278v11c0 68 -18.3333 120.333 -55 157z" />
+ <glyph glyph-name="uniFE9D" unicode="&#x62c;" horiz-adv-x="750" arabic-form="isolated"
+ d="M330 491c10.6667 0 47.6667 -5.5 111 -16.5s132 -16.5 206 -16.5l88 2l-20 -63h-5c-116 0 -213.833 -17 -293.5 -51s-144.167 -86.6667 -193.5 -158c-36 -50.6667 -54 -103.333 -54 -158c0 -23.3333 2.83333 -45.8333 8.5 -67.5c5.66667 -21.6667 15 -43 28 -64
+s32.1667 -37.8333 57.5 -50.5c25.3333 -12.6667 55.6667 -19 91 -19c72.6667 0 171.667 15.6667 297 47l48 -47c-104.667 -32.6667 -211 -51 -319 -55h-26c-88 9.33333 -147.333 35.3333 -178 78c-30 40.6667 -45 68 -45 82c-4.66666 14 -7 31.6667 -7 53
+c0 45.3333 10.5 87.6667 31.5 127c21 39.3333 52.1667 84 93.5 134c95.3333 78.6667 174.333 126.667 237 144c-37.3333 10 -73.5 19 -108.5 27s-70.1667 12 -105.5 12c-34.6667 0 -56 -5.66666 -64 -17l-27 -10c30.6667 32 56 54.5 76 67.5s44.3333 19.5 73 19.5zM497 104
+l-53 -53l-52 53l52 51z" />
+ <glyph glyph-name="uniFE9E" unicode="&#x62c;" horiz-adv-x="750" arabic-form="terminal"
+ d="M497 84l-53 -53l-52 53l52 52zM778 192h-45c-43.3333 4 -71.1667 20.8333 -83.5 50.5c-12.3333 29.6667 -18.8333 78.5 -19.5 146.5l8 -10c4 -23.3333 7.16669 -39.8333 9.5 -49.5s6.5 -20 12.5 -31s14 -18.1667 24 -21.5s23.6667 -5 41 -5h56zM337 494
+c9.33334 0 46.3333 -5.5 111 -16.5c64.6667 -11 136.333 -16.5 215 -16.5l91 1l-21 -63h-5c-119.333 0 -220 -17 -302 -51s-148.333 -87 -199 -159c-36.6667 -52 -55 -104.667 -55 -158c0 -18 1.66667 -35.6667 5 -53c3.33333 -17.3333 9.33333 -35.3333 18 -54
+c8.66667 -18.6667 19.8333 -35 33.5 -49s32 -25.5 55 -34.5s49.1667 -13.5 78.5 -13.5c74.6667 0 180.333 15.6667 317 47l37 -48c-108 -32.6667 -217 -51 -327 -55h-28c-90 9.33333 -151 35.3333 -183 78c-30.6667 41.3333 -46 69.3333 -46 84
+c-4.66666 13.3333 -7 31 -7 53c0 45.3333 10.6667 88.1667 32 128.5c21.3333 40.3333 53.3333 85.1667 96 134.5c98.6667 80.6667 180 129.333 244 146c-16 3.33334 -39.5 9 -70.5 17s-57 13.5 -78 16.5s-44.8333 4.5 -71.5 4.5c-35.3333 0 -57 -5.66666 -65 -17l-28 -10
+c22 22 38.6667 37.8333 50 47.5s26.1667 18.8333 44.5 27.5s37.8333 13 58.5 13z" />
+ <glyph glyph-name="uniFE9F" unicode="&#x62c;" horiz-adv-x="574" arabic-form="initial"
+ d="M128 383c68.6667 50.6667 117.667 76 147 76c12.6667 0 33.5 -8.83334 62.5 -26.5s54.8333 -36.5 77.5 -56.5c60.6667 -64 123.333 -97.3333 188 -100l2 -76h-585c-15.3333 0 -23 24.6667 -23 74l458 2l-126 88c-13.3333 8.66666 -31 18.1667 -53 28.5
+s-39.6667 15.5 -53 15.5c-10 0 -41.6667 -8.33334 -95 -25zM357 44l-53 -53l-52 53l52 52z" />
+ <glyph glyph-name="uniFEA0" unicode="&#x62c;" horiz-adv-x="574" arabic-form="medial"
+ d="M128 383c68.6667 50.6667 117.667 76 147 76c12.6667 0 33.5 -8.83334 62.5 -26.5s54.8333 -36.5 77.5 -56.5c60.6667 -64 123.333 -97.3333 188 -100l2 -76h-585c-15.3333 0 -23 24.6667 -23 74l458 2l-126 88c-13.3333 8.66666 -31 18.1667 -53 28.5
+s-39.6667 15.5 -53 15.5c-10 0 -41.6667 -8.33334 -95 -25zM357 44l-53 -53l-52 53l52 52z" />
+ <glyph glyph-name="uniFEA1" unicode="&#x62d;" horiz-adv-x="748" arabic-form="isolated"
+ d="M330 505c8 0 44.5 -5.33334 109.5 -16s134.833 -16 209.5 -16l89 1l-20 -62h-5c-117.333 0 -216 -16.6667 -296 -50s-145 -85.3333 -195 -156c-36 -50 -54 -101.667 -54 -155c0 -22.6667 2.83333 -44.6667 8.5 -66c5.66667 -21.3333 15 -42.5 28 -63.5
+s32.3333 -38 58 -51c25.6667 -13 56.1667 -19.5 91.5 -19.5c76 0 179.333 15 310 45l37 -46c-106 -32 -212.667 -50 -320 -54h-27c-88.6667 9.33333 -148.667 35 -180 77c-30 39.3333 -45 66.6667 -45 82c-4.66666 13.3333 -7 30.6667 -7 52
+c0 44.6667 10.6667 86.8333 32 126.5c21.3333 39.6667 52.6667 83.5 94 131.5c96.6667 78.6667 176.333 126.333 239 143c-32.6667 8.66666 -68.1667 17 -106.5 25s-75.1667 12 -110.5 12c-33.3333 0 -54.3333 -5.33334 -63 -16l-27 -10
+c34.6667 34.6667 61.8333 57.6667 81.5 69c19.6667 11.3333 42.5 17 68.5 17z" />
+ <glyph glyph-name="uniFEA2" unicode="&#x62d;" horiz-adv-x="750" arabic-form="terminal"
+ d="M638 389c4 -23.3333 7.16669 -39.8333 9.5 -49.5s6.5 -20 12.5 -31s14 -18.1667 24 -21.5s23.6667 -5 41 -5h56l-3 -80h-45c-18 2 -33.6667 7.16667 -47 15.5s-23.5 18 -30.5 29s-12.5 25.1667 -16.5 42.5s-6.5 33.1667 -7.5 47.5s-1.5 31.8333 -1.5 52.5h8zM337 494
+c9.33334 0 46.3333 -5.5 111 -16.5c64.6667 -11 136.333 -16.5 215 -16.5l91 1l-21 -63h-5c-119.333 0 -220 -17 -302 -51s-148.333 -87 -199 -159c-36.6667 -52 -55 -104.667 -55 -158c0 -22.6667 2.83333 -45 8.5 -67s15.1667 -43.8333 28.5 -65.5s33 -39 59 -52
+s57 -19.5 93 -19.5c74 0 176.667 15.6667 308 47l37 -58c-102 -26 -207.667 -41 -317 -45h-28c-90 9.33333 -151 35.3333 -183 78c-30.6667 41.3333 -46 69.3333 -46 84c-4.66666 13.3333 -7 31 -7 53c0 45.3333 10.6667 88.1667 32 128.5
+c21.3333 40.3333 53.3333 85.1667 96 134.5c98.6667 80.6667 180 129.333 244 146c-16 3.33334 -39.5 9 -70.5 17s-57 13.5 -78 16.5s-44.8333 4.5 -71.5 4.5c-35.3333 0 -57 -5.66666 -65 -17l-28 -10c22 22 38.6667 37.8333 50 47.5s26.1667 18.8333 44.5 27.5
+s37.8333 13 58.5 13z" />
+ <glyph glyph-name="uniFEA3" unicode="&#x62d;" horiz-adv-x="600" arabic-form="initial"
+ d="M148 353c18.6667 25.3333 32.6667 43.6667 42 55s22 22.6667 38 34s32 17 48 17c19.3333 0 47.6667 -12.8333 85 -38.5s75.6667 -57.1667 115 -94.5c20 -23.3333 62.6667 -40 128 -50l2 -76h-586c-15.3333 0 -23 24.6667 -23 74l459 2l-126 88
+c-15.3333 10.6667 -32 16 -50 16c-23.3333 0 -62 -10 -116 -30z" />
+ <glyph glyph-name="uniFEA4" unicode="&#x62d;" horiz-adv-x="600" arabic-form="medial"
+ d="M148 353c18.6667 25.3333 32.6667 43.6667 42 55s22 22.6667 38 34s32 17 48 17c19.3333 0 47.6667 -12.8333 85 -38.5s75.6667 -57.1667 115 -94.5c20 -23.3333 62.6667 -40 128 -50l2 -76h-586c-15.3333 0 -23 24.6667 -23 74l459 2l-126 88
+c-15.3333 10.6667 -32 16 -50 16c-23.3333 0 -62 -10 -116 -30z" />
+ <glyph glyph-name="uniFEA5" unicode="&#x62e;" horiz-adv-x="701" arabic-form="isolated"
+ d="M308 503c11.3333 0 46.6667 -5.16666 106 -15.5s124.333 -15.5 195 -15.5l84 2l-19 -59h-5c-216.667 0 -371 -65 -463 -195c-34 -46.6667 -51 -95 -51 -145c0 -21.3333 2.66667 -42 8 -62s13.8333 -40 25.5 -60s29.3333 -36.1667 53 -48.5
+c23.6667 -12.3333 51.8333 -18.5 84.5 -18.5c70 0 171 19.6667 303 59l29 -60c-100 -30 -200.667 -47 -302 -51h-25c-84.6667 8.66667 -141.333 32.6667 -170 72c-28 38 -42 64 -42 78c-4.66666 12 -7 28.3333 -7 49c0 44 10.1667 84.6667 30.5 122
+c20.3333 37.3333 49.8333 78 88.5 122c91.3333 73.3333 166.333 118 225 134c-32 8.66666 -66.1667 16.6667 -102.5 24s-70.8333 11 -103.5 11c-30.6667 0 -50 -5 -58 -15l-25 -9c30 30 54.3333 51 73 63c18.6667 12 41.3333 18 68 18zM379 680l-44 -44l-43 44l43 43z" />
+ <glyph glyph-name="uniFEA6" unicode="&#x62e;" horiz-adv-x="775" arabic-form="terminal"
+ d="M474 696l-54 -54l-53 54l53 53zM790 201h-45c-40.6667 4 -68.3333 18.6667 -83 44c-14.6667 25.3333 -22.3333 74.3333 -23 147l9 -11c6.66669 -44 14.8333 -73 24.5 -87s30.8333 -21 63.5 -21h57zM341 499c10.6667 0 49.3333 -5.66666 116 -17
+c66.6667 -11.3333 138.667 -17 216 -17l92 2l-20 -65h-5c-121.333 0 -223.833 -17.5 -307.5 -52.5c-83.6667 -35 -151.833 -88.8333 -204.5 -161.5c-36.6667 -52.6667 -55 -106.667 -55 -162c0 -17.3333 1.33333 -34.3333 4 -51c2.66667 -16.6667 8.33333 -34.8333 17 -54.5
+c8.66667 -19.6667 20 -36.6667 34 -51c14 -14.3333 33.1667 -26.3333 57.5 -36s52.5 -14.5 84.5 -14.5c78.6667 0 185.667 16.3333 321 49l36 -51c-112 -33.3333 -223 -52 -333 -56h-28c-91.3333 9.33333 -153.667 36 -187 80c-31.3333 42 -47 70.3333 -47 85
+c-4.66666 14 -7 32.3333 -7 55c0 46.6667 11 90.6667 33 132c22 41.3333 54.6667 86.6667 98 136c99.3333 81.3333 182 131 248 149c-16 3.33334 -39.1667 8.83334 -69.5 16.5s-56.8333 13.3333 -79.5 17s-48 5.5 -76 5.5c-35.3333 0 -57.3333 -5.66666 -66 -17l-28 -11
+c23.3333 23.3333 40.8333 40 52.5 50s26.6667 19.1667 45 27.5s37.8333 12.5 58.5 12.5z" />
+ <glyph glyph-name="uniFEA7" unicode="&#x62e;" horiz-adv-x="596" arabic-form="initial"
+ d="M320 618l-50 -49l-48 49l48 48zM147 351c9.33333 13.3333 19.1667 26.3333 29.5 39s20 23.8333 29 33.5s19.3333 17.5 31 23.5s23.8333 9 36.5 9c38 0 104 -44 198 -132c19.3333 -22.6667 62 -39 128 -49l1 -75h-580c-15.3333 0 -23 24.3333 -23 73l455 2l-91 64.5
+c-22 15 -38.6667 25.1667 -50 30.5s-22.6667 8 -34 8c-23.3333 0 -61.6667 -10 -115 -30z" />
+ <glyph glyph-name="uniFEA8" unicode="&#x62e;" horiz-adv-x="596" arabic-form="medial"
+ d="M320 618l-50 -49l-48 49l48 48zM147 351c9.33333 13.3333 19.1667 26.3333 29.5 39s20 23.8333 29 33.5s19.3333 17.5 31 23.5s23.8333 9 36.5 9c38 0 104 -44 198 -132c19.3333 -22.6667 62 -39 128 -49l1 -75h-580c-15.3333 0 -23 24.3333 -23 73l455 2l-91 64.5
+c-22 15 -38.6667 25.1667 -50 30.5s-22.6667 8 -34 8c-23.3333 0 -61.6667 -10 -115 -30z" />
+ <glyph glyph-name="uniFEA9" unicode="&#x62f;" horiz-adv-x="397" arabic-form="isolated"
+ d="M382 278c-4 16.6667 -6.5 31 -7.5 43s-3.16666 23.3333 -6.5 34s-5.83334 19.6667 -7.5 27s-5 14.8333 -10 22.5s-9.66666 14.1667 -14 19.5s-10.8333 11.3333 -19.5 18s-17.6667 13.1667 -27 19.5l-36 23.5l2 79c14.6667 -4.66669 26.6667 -9 36 -13
+s22.6667 -12.6667 40 -26c17.3333 -13.3333 31.6667 -29.3333 43 -48s22.1667 -45.3333 32.5 -80s16.8333 -74.3333 19.5 -119c0 -52 -18.6667 -78 -56 -78h-202c-36.6667 0 -55 32 -55 96v21l12 1c2.66667 -25.3333 12 -38.6667 28 -40h228z" />
+ <glyph glyph-name="uniFEAA" unicode="&#x62f;" horiz-adv-x="397" arabic-form="terminal"
+ d="M382 278c-4 16.6667 -6.5 31 -7.5 43s-3.16666 23.3333 -6.5 34s-5.83334 19.6667 -7.5 27s-5 14.8333 -10 22.5s-9.66666 14.1667 -14 19.5s-10.8333 11.3333 -19.5 18s-17.6667 13.1667 -27 19.5l-36 23.5l2 79c14.6667 -4.66669 26.6667 -9 36 -13
+s22.6667 -12.6667 40 -26c17.3333 -13.3333 31.6667 -29.3333 43 -48s22.1667 -45.3333 32.5 -80s16.8333 -74.3333 19.5 -119c0 -52 -18.6667 -78 -56 -78h-202c-36.6667 0 -55 32 -55 96v21l12 1c2.66667 -25.3333 12 -38.6667 28 -40h228z" />
+ <glyph glyph-name="uniFEAB" unicode="&#x630;" horiz-adv-x="399" arabic-form="isolated"
+ d="M303 725l-57 -57l-55 57l55 55zM378 277c-6 23.3333 -9.33334 42.3333 -10 57s-3.5 28.3333 -8.5 41l-12 30c-3 7.33334 -9.33334 15.3333 -19 24s-19.6667 16.6667 -30 24s-25.8333 17 -46.5 29l2 78c14 -4.66669 25.6667 -9 35 -13s22.6667 -12.6667 40 -26
+c17.3333 -13.3333 31.5 -29.1667 42.5 -47.5s21.6667 -44.6667 32 -79s16.8333 -73.5 19.5 -117.5c0 -51.3333 -18.3333 -77 -55 -77h-200c-36 0 -54 31.6667 -54 95v20l12 2c2.66667 -25.3333 12 -38.6667 28 -40h224z" />
+ <glyph glyph-name="uniFEAC" unicode="&#x630;" horiz-adv-x="399" arabic-form="terminal"
+ d="M303 725l-57 -57l-55 57l55 55zM378 277c-6 23.3333 -9.33334 42.3333 -10 57s-3.5 28.3333 -8.5 41l-12 30c-3 7.33334 -9.33334 15.3333 -19 24s-19.6667 16.6667 -30 24s-25.8333 17 -46.5 29l2 78c14 -4.66669 25.6667 -9 35 -13s22.6667 -12.6667 40 -26
+c17.3333 -13.3333 31.5 -29.1667 42.5 -47.5s21.6667 -44.6667 32 -79s16.8333 -73.5 19.5 -117.5c0 -51.3333 -18.3333 -77 -55 -77h-200c-36 0 -54 31.6667 -54 95v20l12 2c2.66667 -25.3333 12 -38.6667 28 -40h224z" />
+ <glyph glyph-name="uniFEAD" unicode="&#x631;" horiz-adv-x="328" arabic-form="isolated"
+ d="M325 447c13.3333 -46 20 -95.3333 20 -148c0 -14.6667 -1.66666 -34 -5 -58s-5.33334 -39.3333 -6 -46l-128 -241c-32 -48 -66.3333 -76 -103 -84l-104 -23l5 21c55.3333 32.6667 90.6667 59.6667 106 81l69 100c46 66.6667 75.1667 113.5 87.5 140.5
+c12.3333 27 18.5 53.1667 18.5 78.5c0 30 -6 74 -18 132z" />
+ <glyph glyph-name="uniFEAE" unicode="&#x631;" horiz-adv-x="328" arabic-form="terminal"
+ d="M325 447c13.3333 -46 20 -95.3333 20 -148c0 -14.6667 -1.66666 -34 -5 -58s-5.33334 -39.3333 -6 -46l-128 -241c-32 -48 -66.3333 -76 -103 -84l-104 -23l5 21c55.3333 32.6667 90.6667 59.6667 106 81l69 100c46 66.6667 75.1667 113.5 87.5 140.5
+c12.3333 27 18.5 53.1667 18.5 78.5c0 30 -6 74 -18 132z" />
+ <glyph glyph-name="uniFEAF" unicode="&#x632;" horiz-adv-x="331" arabic-form="isolated"
+ d="M326 601l-56 -56l-59 56l59 53zM325 447c13.3333 -46 20 -95.3333 20 -148c0 -14.6667 -1.66666 -34 -5 -58s-5.33334 -39.3333 -6 -46l-128 -241c-28.6667 -35.3333 -63 -63.3333 -103 -84l-104 -23l5 21c54 38.6667 89.3333 67.3333 106 86
+c48.6667 58 90 116.5 124 175.5s51 105.167 51 138.5c0 30 -6 74 -18 132z" />
+ <glyph glyph-name="uniFEB0" unicode="&#x632;" horiz-adv-x="331" arabic-form="terminal"
+ d="M326 648l-63 -63l-67 63l67 60zM325 447c13.3333 -46 20 -95.3333 20 -148c0 -14.6667 -1.66666 -34 -5 -58s-5.33334 -39.3333 -6 -46l-128 -241c-28.6667 -35.3333 -63 -63.3333 -103 -84l-104 -23l5 21c54 38.6667 89.3333 67.3333 106 86
+c48.6667 58 90 116.5 124 175.5s51 105.167 51 138.5c0 30 -6 74 -18 132z" />
+ <glyph glyph-name="uniFEB1" unicode="&#x633;" horiz-adv-x="951" arabic-form="isolated"
+ d="M882 274c35.3333 0 53 6.33334 53 19c0 17.3333 -13.3333 56 -40 116l23 36c30 -67.3333 45 -118.333 45 -153c0 -36.6667 -6.83331 -60.5 -20.5 -71.5s-34.1667 -16.5 -61.5 -16.5h-19c-21.3333 1.33333 -43 12 -65 32c-16.6667 -22.6667 -37 -34 -61 -34
+c-38.6667 0 -74.3333 -0.333328 -107 -1c0 -30 -2.66669 -56.5 -8 -79.5s-11.5 -41 -18.5 -54s-17.6667 -24.8333 -32 -35.5c-14.3333 -10.6667 -26.1667 -18.1667 -35.5 -22.5c-9.33331 -4.33333 -23.6667 -10.1667 -43 -17.5c-42 -16.6667 -92.6667 -25 -152 -25h-33
+c-22.6667 1.33333 -42.8333 4 -60.5 8c-17.6667 4 -36.8333 11 -57.5 21s-36.6667 25.8333 -48 47.5c-11.3333 21.6667 -17 48.1667 -17 79.5c0 42.6667 27.3333 117.333 82 224l13 -23c-44.6667 -69.3333 -67 -122 -67 -158c0 -48 9.66667 -80.8333 29 -98.5
+c19.3333 -17.6667 52.3333 -30.1667 99 -37.5c17.3333 -3.33333 38.6667 -5 64 -5c42 0 86.1667 6.83333 132.5 20.5c46.3333 13.6667 74.5 27.1667 84.5 40.5c20 32 30 71.6667 30 119s-14 87 -42 119l33 72c21.3333 -37.3333 34.3333 -77.3333 39 -120h107
+c26.6667 0 40 23 40 69v15l13 7c8.66669 -36.6667 19 -61.3333 31 -74s35.3333 -19 70 -19z" />
+ <glyph glyph-name="uniFEB2" unicode="&#x633;" horiz-adv-x="951" arabic-form="terminal"
+ d="M882 274c35.3333 0 53 6.33334 53 19c0 17.3333 -13.3333 56 -40 116l23 36c30 -67.3333 45 -118.333 45 -153c0 -36.6667 -6.83331 -60.5 -20.5 -71.5s-34.1667 -16.5 -61.5 -16.5h-19c-21.3333 1.33333 -43 12 -65 32c-16.6667 -22.6667 -37 -34 -61 -34
+c-38.6667 0 -74.3333 -0.333328 -107 -1c0 -30 -2.66669 -56.5 -8 -79.5s-11.5 -41 -18.5 -54s-17.6667 -24.8333 -32 -35.5c-14.3333 -10.6667 -26.1667 -18.1667 -35.5 -22.5c-9.33331 -4.33333 -23.6667 -10.1667 -43 -17.5c-42 -16.6667 -92.6667 -25 -152 -25h-33
+c-22.6667 1.33333 -42.8333 4 -60.5 8c-17.6667 4 -36.8333 11 -57.5 21s-36.6667 25.8333 -48 47.5c-11.3333 21.6667 -17 48.1667 -17 79.5c0 42.6667 27.3333 117.333 82 224l13 -23c-44.6667 -69.3333 -67 -122 -67 -158c0 -48 9.66667 -80.8333 29 -98.5
+c19.3333 -17.6667 52.3333 -30.1667 99 -37.5c17.3333 -3.33333 38.6667 -5 64 -5c42 0 86.1667 6.83333 132.5 20.5c46.3333 13.6667 74.5 27.1667 84.5 40.5c20 32 30 71.6667 30 119s-14 87 -42 119l33 72c21.3333 -37.3333 34.3333 -77.3333 39 -120h107
+c26.6667 0 40 23 40 69v15l13 7c8.66669 -36.6667 19 -61.3333 31 -74s35.3333 -19 70 -19z" />
+ <glyph glyph-name="uniFEB3" unicode="&#x633;" horiz-adv-x="600" arabic-form="initial"
+ d="M523 272c22.6667 0 37.8333 2 45.5 6s11.5 12.3333 11.5 25c0 17.3333 -17.3333 53 -52 107l23 54c38 -54 57 -95.6667 57 -125v-83c0 -24 -4 -39.3333 -12 -46s-26.3333 -10 -55 -10c-30 0 -55 12.6667 -75 38c-22 -25.3333 -41.3333 -38 -58 -38h-83
+c-19.3333 0 -38 12.6667 -56 38c-18 -25.3333 -37 -38 -57 -38h-197c-10 0 -17 25 -21 75c148 0 228.667 1 242 3c14.6667 2.66666 22 14 22 34c0 14 -5.33333 38.6667 -16 74l14 19c7.33334 -29.3333 12.5 -52.8333 15.5 -70.5s8 -31.1667 15 -40.5
+s15.6667 -15.3333 26 -18s26.5 -4 48.5 -4c50.6667 0 76 14.3333 76 43c0 16.6667 -6 40.6667 -18 72l9 18c14 -42.6667 25.5 -73.1667 34.5 -91.5s17.5 -29.8333 25.5 -34.5s19.6667 -7 35 -7z" />
+ <glyph glyph-name="uniFEB4" unicode="&#x633;" horiz-adv-x="600" arabic-form="medial"
+ d="M523 272c22.6667 0 37.8333 2 45.5 6s11.5 12.3333 11.5 25c0 17.3333 -17.3333 53 -52 107l23 54c38 -54 57 -95.6667 57 -125v-83c0 -24 -4 -39.3333 -12 -46s-26.3333 -10 -55 -10c-30 0 -55 12.6667 -75 38c-22 -25.3333 -41.3333 -38 -58 -38h-83
+c-19.3333 0 -38 12.6667 -56 38c-18 -25.3333 -37 -38 -57 -38h-197c-10 0 -17 25 -21 75c148 0 228.667 1 242 3c14.6667 2.66666 22 14 22 34c0 14 -5.33333 38.6667 -16 74l14 19c7.33334 -29.3333 12.5 -52.8333 15.5 -70.5s8 -31.1667 15 -40.5
+s15.6667 -15.3333 26 -18s26.5 -4 48.5 -4c50.6667 0 76 14.3333 76 43c0 16.6667 -6 40.6667 -18 72l9 18c14 -42.6667 25.5 -73.1667 34.5 -91.5s17.5 -29.8333 25.5 -34.5s19.6667 -7 35 -7z" />
+ <glyph glyph-name="uniFEB5" unicode="&#x634;" horiz-adv-x="949" arabic-form="isolated"
+ d="M876 272c32.6667 0 49 6.66666 49 20c0 17.3333 -13 55 -39 113l23 36c29.3333 -66 44 -116.333 44 -151c0 -33.3333 -6.16669 -56.1667 -18.5 -68.5s-30.5 -18.5 -54.5 -18.5c-4.66669 -0.666672 -10.3333 -0.833328 -17 -0.5s-13.3333 1.16667 -20 2.5
+s-14.8333 4.5 -24.5 9.5s-19.5 11.8333 -29.5 20.5c-16.6667 -22 -36.3333 -33 -59 -33c-39.3333 0 -75 -0.333328 -107 -1c0 -36.6667 -3 -67.1667 -9 -91.5c-6 -24.3333 -16.5 -43.8333 -31.5 -58.5c-15 -14.6667 -28.3333 -25.1667 -40 -31.5
+c-11.6667 -6.33333 -30.1667 -14.5 -55.5 -24.5c-40 -16.6667 -89.6667 -25 -149 -25h-33c-17.3333 0.666666 -33 2.16667 -47 4.5s-29.8333 6.83333 -47.5 13.5c-17.6667 6.66667 -32.3333 15.1667 -44 25.5c-11.6667 10.3333 -21.6667 25 -30 44s-12.5 41.1667 -12.5 66.5
+c0 42 27 115.333 81 220l13 -23c-44 -67.3333 -66 -119 -66 -155v-2c0 -46.6667 9.5 -78.5 28.5 -95.5s51.5 -29.1667 97.5 -36.5c17.3333 -3.33333 38.3333 -5 63 -5c41.3333 0 85.3333 6.83333 132 20.5c46.6667 13.6667 74.3333 27.1667 83 40.5
+c19.3333 29.3333 29 69 29 119c0 46 -13.6667 84 -41 114l33 72c20 -37.3333 32.6667 -76.6667 38 -118h106c26.6667 0 40 22.6667 40 68v14l13 7c8 -36.6667 18 -61.1667 30 -73.5s36 -18.5 72 -18.5zM855 553l-47 -45l-49 45l49 45zM774 656l-47 -46l-49 46l49 44z
+M691 553l-47 -45l-49 45l49 45z" />
+ <glyph glyph-name="uniFEB6" unicode="&#x634;" horiz-adv-x="949" arabic-form="terminal"
+ d="M876 272c32.6667 0 49 6.66666 49 20c0 17.3333 -13 55 -39 113l23 36c29.3333 -66 44 -116.333 44 -151c0 -33.3333 -6.16669 -56.1667 -18.5 -68.5s-30.5 -18.5 -54.5 -18.5c-4.66669 -0.666672 -10.3333 -0.833328 -17 -0.5s-13.3333 1.16667 -20 2.5
+s-14.8333 4.5 -24.5 9.5s-19.5 11.8333 -29.5 20.5c-16.6667 -22 -36.3333 -33 -59 -33c-39.3333 0 -75 -0.333328 -107 -1c0 -36.6667 -3 -67.1667 -9 -91.5c-6 -24.3333 -16.5 -43.8333 -31.5 -58.5c-15 -14.6667 -28.3333 -25.1667 -40 -31.5
+c-11.6667 -6.33333 -30.1667 -14.5 -55.5 -24.5c-40 -16.6667 -89.6667 -25 -149 -25h-33c-17.3333 0.666666 -33 2.16667 -47 4.5s-29.8333 6.83333 -47.5 13.5c-17.6667 6.66667 -32.3333 15.1667 -44 25.5c-11.6667 10.3333 -21.6667 25 -30 44s-12.5 41.1667 -12.5 66.5
+c0 42 27 115.333 81 220l13 -23c-44 -67.3333 -66 -119 -66 -155v-2c0 -46.6667 9.5 -78.5 28.5 -95.5s51.5 -29.1667 97.5 -36.5c17.3333 -3.33333 38.3333 -5 63 -5c41.3333 0 85.3333 6.83333 132 20.5c46.6667 13.6667 74.3333 27.1667 83 40.5
+c19.3333 29.3333 29 69 29 119c0 46 -13.6667 84 -41 114l33 72c20 -37.3333 32.6667 -76.6667 38 -118h106c26.6667 0 40 22.6667 40 68v14l13 7c8 -36.6667 18 -61.1667 30 -73.5s36 -18.5 72 -18.5zM855 553l-47 -45l-49 45l49 45zM774 656l-47 -46l-49 46l49 44z
+M691 553l-47 -45l-49 45l49 45z" />
+ <glyph glyph-name="uniFEB7" unicode="&#x634;" horiz-adv-x="649" arabic-form="initial"
+ d="M570 280c21.3333 0 37.3333 2 48 6s16 12.6667 16 26c0 20 -19 59.3333 -57 118l24 60c42 -58.6667 63 -104.333 63 -137v-91c0 -26 -4.16669 -42.6667 -12.5 -50s-28.5 -11 -60.5 -11c-32.6667 0 -60 13.6667 -82 41c-24 -27.3333 -45 -41 -63 -41h-91
+c-20.6667 0 -41 13.6667 -61 41c-19.3333 -27.3333 -40 -41 -62 -41h-215c-10.6667 0 -18.3333 27.3333 -23 82c162 0 250 1 264 3c16 2.66666 24 15.3333 24 38c0 19.3333 -5.66666 46 -17 80l14 21c8.66666 -32.6667 14.5 -58.5 17.5 -77.5s8.5 -33.5 16.5 -43.5
+s17.5 -16.5 28.5 -19.5s28.8333 -4.5 53.5 -4.5c55.3333 0 83 16 83 48c0 17.3333 -6.66666 43.3333 -20 78l10 19c20 -62.6667 35.3333 -102.5 46 -119.5c10.6667 -17 29.3333 -25.5 56 -25.5zM585 648l-55 -53l-56 53l56 51zM491 767l-55 -53l-56 53l56 51zM395 648
+l-54 -53l-57 53l57 51z" />
+ <glyph glyph-name="uniFEB8" unicode="&#x634;" horiz-adv-x="649" arabic-form="medial"
+ d="M570 280c21.3333 0 37.3333 2 48 6s16 12.6667 16 26c0 20 -19 59.3333 -57 118l24 60c42 -58.6667 63 -104.333 63 -137v-91c0 -26 -4.16669 -42.6667 -12.5 -50s-28.5 -11 -60.5 -11c-32.6667 0 -60 13.6667 -82 41c-24 -27.3333 -45 -41 -63 -41h-91
+c-20.6667 0 -41 13.6667 -61 41c-19.3333 -27.3333 -40 -41 -62 -41h-215c-10.6667 0 -18.3333 27.3333 -23 82c162 0 250 1 264 3c16 2.66666 24 15.3333 24 38c0 19.3333 -5.66666 46 -17 80l14 21c8.66666 -32.6667 14.5 -58.5 17.5 -77.5s8.5 -33.5 16.5 -43.5
+s17.5 -16.5 28.5 -19.5s28.8333 -4.5 53.5 -4.5c55.3333 0 83 16 83 48c0 17.3333 -6.66666 43.3333 -20 78l10 19c20 -62.6667 35.3333 -102.5 46 -119.5c10.6667 -17 29.3333 -25.5 56 -25.5zM585 648l-55 -53l-56 53l56 51zM491 767l-55 -53l-56 53l56 51zM395 648
+l-54 -53l-57 53l57 51z" />
+ <glyph glyph-name="uniFEB9" unicode="&#x635;" horiz-adv-x="949" arabic-form="isolated"
+ d="M832 466c13.3333 0 26 -1.66666 38 -5s24.3333 -9.33334 37 -18s22.6667 -22.3333 30 -41s11 -41 11 -67c0 -22 -2.33331 -44.3333 -7 -67l-15 -34v-1c0 -20.6667 -62.3333 -31 -187 -31l-150 -1c-0.666687 -44.6667 -7.16669 -82.1667 -19.5 -112.5
+c-12.3333 -30.3333 -30.3333 -53.3333 -54 -69c-23.6667 -15.6667 -49.1667 -26.6667 -76.5 -33c-27.3333 -6.33333 -59.6667 -9.5 -97 -9.5c-141.333 0 -212 59 -212 177c2.66667 74 14.3333 139.667 35 197l18 -6c-18.6667 -52.6667 -28 -103.333 -28 -152
+c0 -50.6667 13.5 -89.8333 40.5 -117.5c27 -27.6667 76.1667 -42.5 147.5 -44.5c43.3333 1.33333 80.3333 7.5 111 18.5s53.5 25.1667 68.5 42.5s25.6667 34.8333 32 52.5c6.33331 17.6667 9.5 36.5 9.5 56.5c0 47.3333 -21 95.3333 -63 144l34 72
+c29.3333 -70 49 -113.667 59 -131l120 120c38.6667 36.6667 74.3333 56.6667 107 60h11zM895 323c0 54.6667 -28 82 -84 82c-54.6667 0 -115.667 -43.6667 -183 -131c4 0 10.3333 -0.166656 19 -0.5s15.3333 -0.5 20 -0.5c19.3333 0 74 1.66666 164 5
+c42.6667 11.3333 64 26.3333 64 45z" />
+ <glyph glyph-name="uniFEBA" unicode="&#x635;" horiz-adv-x="949" arabic-form="terminal"
+ d="M832 466c13.3333 0 26 -1.66666 38 -5s24.3333 -9.33334 37 -18s22.6667 -22.3333 30 -41s11 -41 11 -67c0 -22 -2.33331 -44.3333 -7 -67l-15 -34v-1c0 -20.6667 -62.3333 -31 -187 -31l-150 -1c-0.666687 -44.6667 -7.16669 -82.1667 -19.5 -112.5
+c-12.3333 -30.3333 -30.3333 -53.3333 -54 -69c-23.6667 -15.6667 -49.1667 -26.6667 -76.5 -33c-27.3333 -6.33333 -59.6667 -9.5 -97 -9.5c-141.333 0 -212 59 -212 177c2.66667 74 14.3333 139.667 35 197l18 -6c-18.6667 -52.6667 -28 -103.333 -28 -152
+c0 -50.6667 13.5 -89.8333 40.5 -117.5c27 -27.6667 76.1667 -42.5 147.5 -44.5c43.3333 1.33333 80.3333 7.5 111 18.5s53.5 25.1667 68.5 42.5s25.6667 34.8333 32 52.5c6.33331 17.6667 9.5 36.5 9.5 56.5c0 47.3333 -21 95.3333 -63 144l34 72
+c29.3333 -70 49 -113.667 59 -131l120 120c38.6667 36.6667 74.3333 56.6667 107 60h11zM895 323c0 54.6667 -28 82 -84 82c-54.6667 0 -115.667 -43.6667 -183 -131c4 0 10.3333 -0.166656 19 -0.5s15.3333 -0.5 20 -0.5c19.3333 0 74 1.66666 164 5
+c42.6667 11.3333 64 26.3333 64 45z" />
+ <glyph glyph-name="uniFEBB" unicode="&#x635;" horiz-adv-x="823" arabic-form="initial"
+ d="M724 492c74 -2 114.333 -64.6667 121 -188c0 -69.3333 -14.3333 -104 -43 -104h-416c-32 0 -65 16 -99 48c-31.3333 -32 -62.6667 -48 -94 -48h-169c-16 1.33333 -24 25.3333 -24 72h193c15.3333 10 27.5 19.5 36.5 28.5s15.5 20 19.5 33s6.33333 23.1667 7 30.5
+c0.666656 7.33334 1.33334 21 2 41l22 22c30 -103.333 78.6667 -155 146 -155h6c55.3333 83.3333 103.833 140.167 145.5 170.5s90.5 46.8333 146.5 49.5zM777 340c0 45.3333 -27.3333 72 -82 80c-30 -2.66666 -57.5 -9.33334 -82.5 -20s-46.6667 -25 -65 -43
+s-31.8333 -32.5 -40.5 -43.5c-8.66666 -11 -18.3333 -24.8333 -29 -41.5h263c24 12 36 34.6667 36 68z" />
+ <glyph glyph-name="uniFEBC" unicode="&#x635;" horiz-adv-x="823" arabic-form="medial"
+ d="M724 492c74 -2 114.333 -64.6667 121 -188c0 -69.3333 -14.3333 -104 -43 -104h-416c-32 0 -65 16 -99 48c-31.3333 -32 -62.6667 -48 -94 -48h-169c-16 1.33333 -24 25.3333 -24 72h193c15.3333 10 27.5 19.5 36.5 28.5s15.5 20 19.5 33s6.33333 23.1667 7 30.5
+c0.666656 7.33334 1.33334 21 2 41l22 22c30 -103.333 78.6667 -155 146 -155h6c55.3333 83.3333 103.833 140.167 145.5 170.5s90.5 46.8333 146.5 49.5zM777 340c0 45.3333 -27.3333 72 -82 80c-30 -2.66666 -57.5 -9.33334 -82.5 -20s-46.6667 -25 -65 -43
+s-31.8333 -32.5 -40.5 -43.5c-8.66666 -11 -18.3333 -24.8333 -29 -41.5h263c24 12 36 34.6667 36 68z" />
+ <glyph glyph-name="uniFEBD" unicode="&#x636;" horiz-adv-x="949" arabic-form="isolated"
+ d="M832 466c13.3333 0 26 -1.66666 38 -5s24.3333 -9.33334 37 -18s22.6667 -22.3333 30 -41s11 -41 11 -67c0 -22 -2.33331 -44.3333 -7 -67l-15 -34v-1c0 -20.6667 -62.3333 -31 -187 -31l-150 -1c-0.666687 -44.6667 -7.16669 -82.1667 -19.5 -112.5
+c-12.3333 -30.3333 -30.3333 -53.3333 -54 -69c-23.6667 -15.6667 -49.1667 -26.6667 -76.5 -33c-27.3333 -6.33333 -59.6667 -9.5 -97 -9.5c-141.333 0 -212 59 -212 177c2.66667 74 14.3333 139.667 35 197l18 -6c-18.6667 -52.6667 -28 -103.333 -28 -152
+c0 -50.6667 13.5 -89.8333 40.5 -117.5c27 -27.6667 76.1667 -42.5 147.5 -44.5c43.3333 1.33333 80.3333 7.5 111 18.5s53.5 25.1667 68.5 42.5s25.6667 34.8333 32 52.5c6.33331 17.6667 9.5 36.5 9.5 56.5c0 47.3333 -21 95.3333 -63 144l34 72
+c29.3333 -70 49 -113.667 59 -131l120 120c38.6667 36.6667 74.3333 56.6667 107 60h11zM895 333c0 54.6667 -28 82 -84 82c-54.6667 0 -115.667 -43.6667 -183 -131c4 0 10.3333 -0.166656 19 -0.5s15.3333 -0.5 20 -0.5c19.3333 0 74 1.66666 164 5
+c42.6667 11.3333 64 26.3333 64 45zM747 633l-49 -48l-48 48l48 48z" />
+ <glyph glyph-name="uniFEBE" unicode="&#x636;" horiz-adv-x="949" arabic-form="terminal"
+ d="M832 466c13.3333 0 26 -1.66666 38 -5s24.3333 -9.33334 37 -18s22.6667 -22.3333 30 -41s11 -41 11 -67c0 -22 -2.33331 -44.3333 -7 -67l-15 -34v-1c0 -20.6667 -62.3333 -31 -187 -31l-150 -1c-0.666687 -44.6667 -7.16669 -82.1667 -19.5 -112.5
+c-12.3333 -30.3333 -30.3333 -53.3333 -54 -69c-23.6667 -15.6667 -49.1667 -26.6667 -76.5 -33c-27.3333 -6.33333 -59.6667 -9.5 -97 -9.5c-141.333 0 -212 59 -212 177c2.66667 74 14.3333 139.667 35 197l18 -6c-18.6667 -52.6667 -28 -103.333 -28 -152
+c0 -50.6667 13.5 -89.8333 40.5 -117.5c27 -27.6667 76.1667 -42.5 147.5 -44.5c43.3333 1.33333 80.3333 7.5 111 18.5s53.5 25.1667 68.5 42.5s25.6667 34.8333 32 52.5c6.33331 17.6667 9.5 36.5 9.5 56.5c0 47.3333 -21 95.3333 -63 144l34 72
+c29.3333 -70 49 -113.667 59 -131l120 120c38.6667 36.6667 74.3333 56.6667 107 60h11zM895 333c0 54.6667 -28 82 -84 82c-54.6667 0 -115.667 -43.6667 -183 -131c4 0 10.3333 -0.166656 19 -0.5s15.3333 -0.5 20 -0.5c19.3333 0 74 1.66666 164 5
+c42.6667 11.3333 64 26.3333 64 45zM747 633l-49 -48l-48 48l48 48z" />
+ <glyph glyph-name="uniFEBF" unicode="&#x636;" horiz-adv-x="805" arabic-form="initial"
+ d="M608 704l-49 -48l-48 48l48 48zM791 443c22.6667 -48 34 -94.3333 34 -139c0 -69.3333 -14.3333 -104 -43 -104h-416c-32 0 -65 16 -99 48c-31.3333 -32 -62.6667 -48 -94 -48h-169c-16 1.33333 -24 28.6667 -24 82h193c23.3333 8 39.6667 19.6667 49 35
+s14.6667 44.6667 16 88l22 22c28 -97.3333 72.6667 -146 134 -146c8 0 14 0.333344 18 1c58 78.6667 107.167 132.667 147.5 162s88.5 45.3333 144.5 48c34 -2 63 -18.3333 87 -49zM757 341c0 44.6667 -27.3333 70.6667 -82 78c-82.6667 -6 -155 -51.6667 -217 -137h263
+c24 6 36 25.6667 36 59z" />
+ <glyph glyph-name="uniFEC0" unicode="&#x636;" horiz-adv-x="805" arabic-form="medial"
+ d="M608 704l-49 -48l-48 48l48 48zM791 443c22.6667 -48 34 -94.3333 34 -139c0 -69.3333 -14.3333 -104 -43 -104h-416c-32 0 -65 16 -99 48c-31.3333 -32 -62.6667 -48 -94 -48h-169c-16 1.33333 -24 28.6667 -24 82h193c23.3333 8 39.6667 19.6667 49 35
+s14.6667 44.6667 16 88l22 22c28 -97.3333 72.6667 -146 134 -146c8 0 14 0.333344 18 1c58 78.6667 107.167 132.667 147.5 162s88.5 45.3333 144.5 48c34 -2 63 -18.3333 87 -49zM757 341c0 44.6667 -27.3333 70.6667 -82 78c-82.6667 -6 -155 -51.6667 -217 -137h263
+c24 6 36 25.6667 36 59z" />
+ <glyph glyph-name="uniFEC1" unicode="&#x637;" horiz-adv-x="557" arabic-form="isolated"
+ d="M165 277c14 11.3333 21 23.6667 21 37c0 87.3333 -28.6667 216 -86 386l63 83l26.5 -146c9.66667 -51.3333 18.5 -107 26.5 -167s12 -107 12 -141c0 -2.66666 -0.166672 -6.5 -0.5 -11.5s-0.5 -8.5 -0.5 -10.5c77.3333 87.3333 150 131 218 131
+c33.3333 0 62.1667 -11 86.5 -33c24.3333 -22 36.5 -61.6667 36.5 -119v-4c0 -54 -20.3333 -81 -61 -81h-513l-1 79zM537 304c0 30 -9.66669 51.5 -29 64.5c-19.3333 13 -41 19.5 -65 19.5c-27.3333 0 -57.3333 -9.83334 -90 -29.5s-58.3333 -37.8333 -77 -54.5l-20 -20h279
+c1.33331 9.33334 2 16 2 20z" />
+ <glyph glyph-name="uniFEC5" unicode="&#x638;" horiz-adv-x="550" arabic-form="isolated"
+ d="M443 612l-46 -46l-47 46l47 47zM165 277c14 11.3333 21 23.6667 21 37c0 87.3333 -28.6667 216 -86 386l63 83l26.5 -146c9.66667 -51.3333 18.5 -107 26.5 -167s12 -107 12 -141c0 -2.66666 -0.166672 -6.5 -0.5 -11.5s-0.5 -8.5 -0.5 -10.5
+c77.3333 87.3333 150 131 218 131c33.3333 0 62.1667 -11 86.5 -33c24.3333 -22 36.5 -61.6667 36.5 -119v-4c0 -54 -20.3333 -81 -61 -81h-513l-1 79zM537 304c0 30 -9.66669 51.5 -29 64.5c-19.3333 13 -41 19.5 -65 19.5c-27.3333 0 -57.3333 -9.83334 -90 -29.5
+s-58.3333 -37.8333 -77 -54.5l-20 -20h279c1.33331 9.33334 2 16 2 20z" />
+ <glyph glyph-name="uniFEC9" unicode="&#x639;" horiz-adv-x="625" arabic-form="isolated"
+ d="M130 -67c0 34.6667 10.3333 76.8333 31 126.5c20.6667 49.6667 51.6667 91.8333 93 126.5c-58 50 -98.6667 89 -122 117v32c0 40.6667 21.6667 80 65 118c37.3333 32.6667 79.3333 49 126 49h5c35.3333 -5.33334 75.6667 -22 121 -50c-8.66666 0.666656 -21 1 -37 1
+c-51.3333 0 -102.667 -9.33334 -154 -28c-51.3333 -18.6667 -79.6667 -36.6667 -85 -54c1.33333 -24 18.3333 -49.6667 51 -77c32.6667 -27.3333 64.3333 -41 95 -41h6c80 38.6667 158 61 234 67l-35 -67c-94.6667 -10 -167.667 -40 -219 -90
+c-87.3333 -83.3333 -131 -148.333 -131 -195c0 -50.6667 120.333 -91.3333 361 -122h111l-104 -65c-149.333 7.33333 -261.667 22 -337 44c-50 14 -75 50 -75 108z" />
+ <glyph glyph-name="uniFECA" unicode="&#x639;" horiz-adv-x="575" arabic-form="terminal"
+ d="M359 536c8 -0.666687 16.3333 -2 25 -4s18.6667 -5.33331 30 -10s20.6667 -11.6667 28 -21s11 -20.3333 11 -33c0 -21.3333 -12.6667 -45 -38 -71c-16.6667 -8 -37.6667 -23 -63 -45c10.6667 -50.6667 49.3333 -76 116 -76h131l5 -76h-134
+c-68 11.3333 -119.333 46.6667 -154 106c-49.3333 -36 -87 -73 -113 -111s-39 -80.6667 -39 -128c0 -28 8.83333 -52.6667 26.5 -74c17.6667 -21.3333 39.5 -37 65.5 -47s49.8333 -17.3333 71.5 -22s40.1667 -7 55.5 -7c34 0 75.6667 14 125 42l43 -51
+c-69.3333 -37.3333 -130.667 -56 -184 -56c-69.3333 0 -127.167 20.1667 -173.5 60.5c-46.3333 40.3333 -69.5 93.1667 -69.5 158.5c0 42.6667 9.16667 83.8333 27.5 123.5s39.1667 72.6667 62.5 99s55.6667 58.5 97 96.5c-1.33334 4 -2.5 7.83334 -3.5 11.5
+s-2.33334 7.16666 -4 10.5s-3.33334 6.33334 -5 9s-4 4.66666 -7 6s-6.16666 2 -9.5 2c-0.666656 0 -1.66666 -0.166656 -3 -0.5s-2.33334 -0.5 -3 -0.5l-61 -11c2 79.3333 50 119 144 119z" />
+ <glyph glyph-name="uniFECB" unicode="&#x639;" horiz-adv-x="674" arabic-form="initial"
+ d="M257 429c0 -24 14.3333 -51.3333 43 -82s62.3333 -46 101 -46c67.3333 0 158 8.66666 272 26l-50 -77c-116 -32.6667 -234 -49 -354 -49h-252c-16 0 -24 25.3333 -24 76l276 -1c-42.6667 63.3333 -64 114.333 -64 153c8 35.3333 27.8333 65.1667 59.5 89.5
+c31.6667 24.3333 66.8333 36.5 105.5 36.5l56 -5c58 -26 98.3333 -50.3333 121 -73c-64 10.6667 -114 16 -150 16c-34 0 -65.8333 -6.16666 -95.5 -18.5s-44.5 -27.5 -44.5 -45.5z" />
+ <glyph glyph-name="uniFECC" unicode="&#x639;" horiz-adv-x="550" arabic-form="medial"
+ d="M346 528c37.3333 0 68.6667 -6.66669 94 -20c25.3333 -13.3333 38 -30.6667 38 -52v-1c0 -24.6667 -24 -63.3333 -72 -116c24 -41.3333 52.6667 -62 86 -62h2h74v-77h-76c-48 0 -92.3333 31 -133 93c-54 -62 -112.667 -93 -176 -93h-2l-167 -1
+c-14.6667 0.666672 -22.6667 26.6667 -24 78l144 1c3.33333 0 8.33333 -0.166656 15 -0.5s11.3333 -0.5 14 -0.5c101.333 0 152 29.6667 152 89c0 4 -1.33334 9.16666 -4 15.5s-8.66666 13 -18 20s-21 10.5 -35 10.5c-7.33333 0 -14.5 -3 -21.5 -9s-11.5 -14.6667 -13.5 -26
+h-9v22c2 41.3333 14 73.1667 36 95.5c22 22.3333 54 33.5 96 33.5z" />
+ <glyph glyph-name="uniFECD" unicode="&#x63a;" horiz-adv-x="602" arabic-form="isolated"
+ d="M130 -62c0 40 10.8333 83.8333 32.5 131.5c21.6667 47.6667 51.8333 87.5 90.5 119.5c-58 49.3333 -98.3333 88 -121 116v29v3c0 40.6667 21.6667 80 65 118c36.6667 32 78 48 124 48h4c34.6667 -5.33334 75 -21.6667 121 -49c-7.33334 0.666656 -18 1 -32 1
+c-51.3333 0 -103.167 -9.5 -155.5 -28.5c-52.3333 -19 -81.1667 -36.8333 -86.5 -53.5c2.66667 -24 19.8333 -49.5 51.5 -76.5s62.8333 -40.5 93.5 -40.5h6c79.3333 38.6667 156.333 60.6667 231 66l-35 -66c-95.3333 -10 -167.333 -39.6667 -216 -89
+c-86 -80.6667 -129 -145 -129 -193c0 -50.6667 118.667 -91 356 -121h110l-103 -65c-146 7.33333 -257 22 -333 44c-49.3333 14.6667 -74 50 -74 106zM323 720l-48 -48l-49 48l49 48z" />
+ <glyph glyph-name="uniFECE" unicode="&#x63a;" horiz-adv-x="577" arabic-form="terminal"
+ d="M394 674l-49 -50l-50 50l50 49zM359 536c8 -0.666687 16.3333 -2 25 -4s18.6667 -5.33331 30 -10s20.6667 -11.6667 28 -21s11 -20.3333 11 -33c0 -21.3333 -12.6667 -45 -38 -71c-16.6667 -8 -37.6667 -23 -63 -45c10.6667 -50.6667 49.3333 -76 116 -76h131l5 -76h-134
+c-68 11.3333 -119.333 46.6667 -154 106c-49.3333 -36 -87 -73 -113 -111s-39 -80.6667 -39 -128c0 -28 8.83333 -52.6667 26.5 -74c17.6667 -21.3333 39.5 -37 65.5 -47s49.8333 -17.3333 71.5 -22s40.1667 -7 55.5 -7c34 0 75.6667 14 125 42l43 -51
+c-69.3333 -37.3333 -130.667 -56 -184 -56c-69.3333 0 -127.167 20.1667 -173.5 60.5c-46.3333 40.3333 -69.5 93.1667 -69.5 158.5c0 42.6667 9.16667 83.8333 27.5 123.5s39.1667 72.6667 62.5 99s55.6667 58.5 97 96.5c-1.33334 4 -2.5 7.83334 -3.5 11.5
+s-2.33334 7.16666 -4 10.5s-3.33334 6.33334 -5 9s-4 4.66666 -7 6s-6.16666 2 -9.5 2c-0.666656 0 -1.66666 -0.166656 -3 -0.5s-2.33334 -0.5 -3 -0.5l-61 -11c2 79.3333 50 119 144 119z" />
+ <glyph glyph-name="uniFECF" unicode="&#x63a;" horiz-adv-x="578" arabic-form="initial"
+ d="M222 420c0 -20 12.3333 -45.5 37 -76.5c24.6667 -31 56 -46.5 94 -46.5c62 0 144.333 8.66666 247 26l-46 -74c-106 -32 -212.667 -48 -320 -48h-229c-14.6667 0 -22 24.3333 -22 73l251 -1c-39.3333 62.6667 -59 112 -59 148c8 34 26.3333 62.6667 55 86
+c28.6667 23.3333 60.3333 35 95 35l51 -5c51.3333 -24 87.6667 -47.3333 109 -70c-52.6667 10 -97.6667 15 -135 15c-30 0 -58.8333 -5.83334 -86.5 -17.5c-27.6667 -11.6667 -41.5 -26.5 -41.5 -44.5zM368 753l-46 -48l-46 48l46 49z" />
+ <glyph glyph-name="uniFED0" unicode="&#x63a;" horiz-adv-x="577" arabic-form="medial"
+ d="M355 522c39.3333 0 71.6667 -6.66669 97 -20c25.3333 -13.3333 38 -30.3333 38 -51v-3c0 -24 -24.6667 -61.3333 -74 -112c25.3333 -40 54.6667 -60 88 -60h2h97v-76h-98c-49.3333 0 -95 30 -137 90c-54.6667 -60 -114.667 -90 -180 -90h-2l-171 -1
+c-16 1.33333 -24.3333 27 -25 77l147 1c8 -0.666656 19.3333 -1 34 -1c101.333 0 152 29 152 87c0 8 -5 17.6667 -15 29s-24.6667 17 -44 17c-7.33334 0 -14.5 -3.16666 -21.5 -9.5s-11.5 -15.1667 -13.5 -26.5h-9v23c2 40.6667 14.3333 71.8333 37 93.5
+c22.6667 21.6667 55.3333 32.5 98 32.5zM397 703l-49 -50l-49 50l49 50z" />
+ <glyph glyph-name="uniFED1" unicode="&#x641;" horiz-adv-x="801" arabic-form="isolated"
+ d="M789 521c14.6667 -64 22 -116.667 22 -158v-66c0 -61.3333 -28.6667 -92 -86 -92l-526 1c-16 2 -28.6667 5.66667 -38 11s-16.3333 14 -21 26s-7.66667 24.1667 -9 36.5s-2.33333 30.1667 -3 53.5c1.33333 36 10 79.3333 26 130l26 -27c-22.6667 -52 -34 -90 -34 -114
+c0 -22.6667 11.3333 -36.3333 34 -41c55.3333 -0.666656 138.333 -1 249 -1c27.3333 0 68.6667 0.166656 124 0.5c55.3333 0.333344 96.6667 0.5 124 0.5h5c55.3333 0 83 16 83 48v5c-38.6667 8.66666 -70.6667 15.5 -96 20.5s-44.5 13.5 -57.5 25.5s-19.5 29.6667 -19.5 53
+c0 42.6667 11 84.6667 33 126c16 38 39.3333 57 70 57h4c30.6667 0 60.6667 -31.6667 90 -95zM693 529c-24 -6.66669 -36 -30.3333 -36 -71c0 -32.6667 28 -49 84 -49c10 0 17.6667 0.333344 23 1v1c-5.33331 26 -14.5 51.3333 -27.5 76s-27.5 38.6667 -43.5 42zM675 712
+l-49 -50l-50 50l50 51z" />
+ <glyph glyph-name="uniFED2" unicode="&#x641;" horiz-adv-x="801" arabic-form="terminal"
+ d="M789 521c14.6667 -64 22 -116.667 22 -158v-66c0 -61.3333 -28.6667 -92 -86 -92l-526 1c-16 2 -28.6667 5.66667 -38 11s-16.3333 14 -21 26s-7.66667 24.1667 -9 36.5s-2.33333 30.1667 -3 53.5c1.33333 36 10 79.3333 26 130l26 -27c-22.6667 -52 -34 -90 -34 -114
+c0 -22.6667 11.3333 -36.3333 34 -41c55.3333 -0.666656 138.333 -1 249 -1c27.3333 0 68.6667 0.166656 124 0.5c55.3333 0.333344 96.6667 0.5 124 0.5h5c55.3333 0 83 16 83 48v5c-38.6667 8.66666 -70.6667 15.5 -96 20.5s-44.5 13.5 -57.5 25.5s-19.5 29.6667 -19.5 53
+c0 42.6667 11 84.6667 33 126c16 38 39.3333 57 70 57h4c30.6667 0 60.6667 -31.6667 90 -95zM693 529c-24 -6.66669 -36 -30.3333 -36 -71c0 -32.6667 28 -49 84 -49c10 0 17.6667 0.333344 23 1v1c-5.33331 26 -14.5 51.3333 -27.5 76s-27.5 38.6667 -43.5 42zM675 712
+l-49 -50l-50 50l50 51z" />
+ <glyph glyph-name="uniFED3" unicode="&#x641;" arabic-form="initial"
+ d="M296 509c14.6667 -44 22 -95.3333 22 -154v-63c0 -61.3333 -27.6667 -92 -83 -92h-265v74l218 1h5c53.3333 0 80 15.6667 80 47v5c-35.3333 8.66666 -65.5 15.3333 -90.5 20s-44 12.8333 -57 24.5s-19.5 28.8333 -19.5 51.5c0 44 10.6667 85 32 123
+c15.3333 37.3333 38 56 68 56h4c16 0 31.6667 -7.83331 47 -23.5c15.3333 -15.6667 28.3333 -38.8333 39 -69.5zM197 753l-49 -50l-48 50l48 50zM196 527c-13.3333 0 -25.6667 -8.33331 -37 -25c-11.3333 -16.6667 -17 -33 -17 -49c0 -9.33334 1.5 -17.6667 4.5 -25
+s7.5 -13.1667 13.5 -17.5s12.8333 -8 20.5 -11s16.5 -5.33334 26.5 -7s20.5 -3.16666 31.5 -4.5s22.5 -2.33334 34.5 -3c-2.66666 22 -7 43 -13 63s-14.6667 38.1667 -26 54.5c-11.3333 16.3333 -24 24.5 -38 24.5z" />
+ <glyph glyph-name="uniFED4" unicode="&#x641;" arabic-form="medial"
+ d="M296 509c14.6667 -44 22 -95.3333 22 -154v-63c0 -61.3333 -27.6667 -92 -83 -92h-265v74l218 1h5c53.3333 0 80 15.6667 80 47v5c-35.3333 8.66666 -65.5 15.3333 -90.5 20s-44 12.8333 -57 24.5s-19.5 28.8333 -19.5 51.5c0 44 10.6667 85 32 123
+c15.3333 37.3333 38 56 68 56h4c16 0 31.6667 -7.83331 47 -23.5c15.3333 -15.6667 28.3333 -38.8333 39 -69.5zM197 753l-49 -50l-48 50l48 50zM196 527c-13.3333 0 -25.6667 -8.33331 -37 -25c-11.3333 -16.6667 -17 -33 -17 -49c0 -9.33334 1.5 -17.6667 4.5 -25
+s7.5 -13.1667 13.5 -17.5s12.8333 -8 20.5 -11s16.5 -5.33334 26.5 -7s20.5 -3.16666 31.5 -4.5s22.5 -2.33334 34.5 -3c-2.66666 22 -7 43 -13 63s-14.6667 38.1667 -26 54.5c-11.3333 16.3333 -24 24.5 -38 24.5z" />
+ <glyph glyph-name="uniFED5" unicode="&#x642;" horiz-adv-x="696" arabic-form="isolated"
+ d="M709 562l-55 -55l-55 55l55 55zM552 562l-56 -55l-55 55l55 55zM606 417c24 -10.6667 48 -30.1667 72 -58.5s37.6667 -65.8333 41 -112.5v-63c-11.3333 -95.3333 -40.6667 -157.667 -88 -187c-60.6667 -37.3333 -147 -56 -259 -56h-31c-139.333 30 -209 84.3333 -209 163
+c0 3.33334 -0.333328 9 -1 17s-1 14 -1 18c0 64 17 136.667 51 218h11c-18.6667 -68.6667 -28 -124.667 -28 -168c0 -26 3.16667 -47.8333 9.5 -65.5c6.33333 -17.6667 18.8333 -34.3333 37.5 -50c18.6667 -15.6667 47 -27.3333 85 -35c38 -7.66667 86.3333 -11.5 145 -11.5
+c16.6667 0 43.1667 4.16667 79.5 12.5c36.3333 8.33333 64.8333 16.1667 85.5 23.5c50 24 75 61 75 111c0 13.3333 -2 22.5 -6 27.5s-12.6667 7.5 -26 7.5c-11.3333 0 -27.6667 -2.66667 -49 -8c-63.3333 0 -95 17 -95 51c0 31.3333 10.8333 65.6667 32.5 103
+s44.5 58.3333 68.5 63zM605 354c-16.6667 0 -30 -7.83334 -40 -23.5s-15 -28.5 -15 -38.5c0 -13.3333 13.6667 -20 41 -20h9c25.3333 0 40 0.666656 44 2c3.33331 0 5 3 5 9c0 16.6667 -6 32.6667 -18 48l-24 23h-2z" />
+ <glyph glyph-name="uniFED6" unicode="&#x642;" horiz-adv-x="696" arabic-form="terminal"
+ d="M709 562l-55 -55l-55 55l55 55zM552 562l-56 -55l-55 55l55 55zM606 417c24 -10.6667 48 -30.1667 72 -58.5s37.6667 -65.8333 41 -112.5v-63c-11.3333 -95.3333 -40.6667 -157.667 -88 -187c-60.6667 -37.3333 -147 -56 -259 -56h-31c-139.333 30 -209 84.3333 -209 163
+c0 3.33334 -0.333328 9 -1 17s-1 14 -1 18c0 64 17 136.667 51 218h11c-18.6667 -68.6667 -28 -124.667 -28 -168c0 -26 3.16667 -47.8333 9.5 -65.5c6.33333 -17.6667 18.8333 -34.3333 37.5 -50c18.6667 -15.6667 47 -27.3333 85 -35c38 -7.66667 86.3333 -11.5 145 -11.5
+c16.6667 0 43.1667 4.16667 79.5 12.5c36.3333 8.33333 64.8333 16.1667 85.5 23.5c50 24 75 61 75 111c0 13.3333 -2 22.5 -6 27.5s-12.6667 7.5 -26 7.5c-11.3333 0 -27.6667 -2.66667 -49 -8c-63.3333 0 -95 17 -95 51c0 31.3333 10.8333 65.6667 32.5 103
+s44.5 58.3333 68.5 63zM605 354c-16.6667 0 -30 -7.83334 -40 -23.5s-15 -28.5 -15 -38.5c0 -13.3333 13.6667 -20 41 -20h9c25.3333 0 40 0.666656 44 2c3.33331 0 5 3 5 9c0 16.6667 -6 32.6667 -18 48l-24 23h-2z" />
+ <glyph glyph-name="uniFED7" unicode="&#x642;" horiz-adv-x="650" arabic-form="initial"
+ d="M292 503c14 -40.6667 21 -90.3333 21 -149v-62c0 -60 -27.3333 -90 -82 -90h-261v72l215 1h5c52.6667 0 79 15.3333 79 46v5c-34.6667 8 -64.1667 14 -88.5 18s-43.1667 11.8333 -56.5 23.5c-13.3333 11.6667 -20 29.1667 -20 52.5c0 36.6667 9.33334 74.8333 28 114.5
+c18.6667 39.6667 42 59.5 70 59.5h4c16 0 31.6667 -7.66669 47 -23c15.3333 -15.3333 28.3333 -38 39 -68zM147 744l-48 -50l-47 50l47 48zM139 447c0 -12.6667 3.16667 -23.1667 9.5 -31.5s16.3333 -14.6667 30 -19s26.6667 -7.33334 39 -9s29.5 -3.16666 51.5 -4.5
+c-4.66666 34 -13.5 65.3333 -26.5 94s-29.5 43 -49.5 43c-13.3333 0 -25.6667 -8.16666 -37 -24.5s-17 -32.5 -17 -48.5zM276 744l-47 -50l-48 50l48 48z" />
+ <glyph glyph-name="uniFED8" unicode="&#x642;" horiz-adv-x="650" arabic-form="medial"
+ d="M292 503c14 -40.6667 21 -90.3333 21 -149v-62c0 -60 -27.3333 -90 -82 -90h-261v72l215 1h5c52.6667 0 79 15.3333 79 46v5c-34.6667 8 -64.1667 14 -88.5 18s-43.1667 11.8333 -56.5 23.5c-13.3333 11.6667 -20 29.1667 -20 52.5c0 36.6667 9.33334 74.8333 28 114.5
+c18.6667 39.6667 42 59.5 70 59.5h4c16 0 31.6667 -7.66669 47 -23c15.3333 -15.3333 28.3333 -38 39 -68zM147 744l-48 -50l-47 50l47 48zM139 447c0 -12.6667 3.16667 -23.1667 9.5 -31.5s16.3333 -14.6667 30 -19s26.6667 -7.33334 39 -9s29.5 -3.16666 51.5 -4.5
+c-4.66666 34 -13.5 65.3333 -26.5 94s-29.5 43 -49.5 43c-13.3333 0 -25.6667 -8.16666 -37 -24.5s-17 -32.5 -17 -48.5zM276 744l-47 -50l-48 50l48 48z" />
+ <glyph glyph-name="uniFED9" unicode="&#x643;" horiz-adv-x="757" arabic-form="isolated"
+ d="M948 958l-199 -87c-12.6667 -5.33331 -37.1667 -16.5 -73.5 -33.5s-54.5 -27.8333 -54.5 -32.5c0 -5.33331 4.16669 -12.6667 12.5 -22s19.5 -20.8333 33.5 -34.5s35.1667 -37.8333 63.5 -72.5s58.1667 -74.6667 89.5 -120c26.6667 -42.6667 50 -103 70 -181
+c2.66669 -10 4 -35 4 -75c0 -67.3333 -14 -101 -42 -101h-1l-587 2c-52 0 -94.6667 29 -128 87c-10 16.6667 -15 46.3333 -15 89c0 44.6667 6.66666 88.3333 20 131l8 -4c-4.66667 -30 -7 -58.3333 -7 -85c0 -51.3333 13.1667 -88.3333 39.5 -111s72.1667 -34 137.5 -34h11
+h529c1.33331 16 2 27.6667 2 35c0 81.3333 -41.6667 176.667 -125 286l-61 65l-11 -14c-22.6667 15.3333 -51.3333 40.3333 -86 75c-2.66669 17.3333 -4 30 -4 38c0 18.6667 2.33331 35 7 49s12.5 27.3333 23.5 40s25.8333 24.5 44.5 35.5s42 23.3333 70 37
+s61.3333 28.3333 100 44l135 56.5z" />
+ <glyph glyph-name="uniFEDA" unicode="&#x643;" horiz-adv-x="757" arabic-form="terminal"
+ d="M948 958l-199 -87c-12.6667 -5.33331 -37.1667 -16.5 -73.5 -33.5s-54.5 -27.8333 -54.5 -32.5c0 -5.33331 4.16669 -12.6667 12.5 -22s19.5 -20.8333 33.5 -34.5s35.1667 -37.8333 63.5 -72.5s58.1667 -74.6667 89.5 -120c26.6667 -42.6667 50 -103 70 -181
+c2.66669 -10 4 -35 4 -75c0 -67.3333 -14 -101 -42 -101h-1l-587 2c-52 0 -94.6667 29 -128 87c-10 16.6667 -15 46.3333 -15 89c0 44.6667 6.66666 88.3333 20 131l8 -4c-4.66667 -30 -7 -58.3333 -7 -85c0 -51.3333 13.1667 -88.3333 39.5 -111s72.1667 -34 137.5 -34h11
+h529c1.33331 16 2 27.6667 2 35c0 81.3333 -41.6667 176.667 -125 286l-61 65l-11 -14c-22.6667 15.3333 -51.3333 40.3333 -86 75c-2.66669 17.3333 -4 30 -4 38c0 18.6667 2.33331 35 7 49s12.5 27.3333 23.5 40s25.8333 24.5 44.5 35.5s42 23.3333 70 37
+s61.3333 28.3333 100 44l135 56.5z" />
+ <glyph glyph-name="uniFEDB" unicode="&#x643;" horiz-adv-x="318" arabic-form="initial"
+ d="M388 912l-199 -82c-2.66667 -1.33331 -16.5 -7.16669 -41.5 -17.5s-45.6667 -19.5 -62 -27.5s-24.5 -13.6667 -24.5 -17c0 -5.33331 35.6667 -44.6667 107 -118c56.6667 -68 98.5 -127.833 125.5 -179.5c27 -51.6667 40.5 -110.5 40.5 -176.5c0 -63.3333 -14 -95 -42 -95
+h-1l-306 2l6 78h308c1.33334 13.3333 2 23 2 29c0 70.6667 -41.6667 158.333 -125 263l-61 61l-11 -13c-22.6667 14.6667 -51.3333 38 -86 70c-2.66667 16 -4 28 -4 36c0 20.6667 3.66667 38.5 11 53.5c7.33333 15 19 29.1667 35 42.5s39.3333 27.3333 70 42
+c30.6667 14.6667 65.8333 30 105.5 46l152.5 60l6 2z" />
+ <glyph glyph-name="uniFEDC" unicode="&#x643;" horiz-adv-x="318" arabic-form="medial"
+ d="M388 912l-199 -82c-2.66667 -1.33331 -16.5 -7.16669 -41.5 -17.5s-45.6667 -19.5 -62 -27.5s-24.5 -13.6667 -24.5 -17c0 -5.33331 35.6667 -44.6667 107 -118c56.6667 -68 98.5 -127.833 125.5 -179.5c27 -51.6667 40.5 -110.5 40.5 -176.5c0 -63.3333 -14 -95 -42 -95
+h-1l-306 2l6 78h308c1.33334 13.3333 2 23 2 29c0 70.6667 -41.6667 158.333 -125 263l-61 61l-11 -13c-22.6667 14.6667 -51.3333 38 -86 70c-2.66667 16 -4 28 -4 36c0 20.6667 3.66667 38.5 11 53.5c7.33333 15 19 29.1667 35 42.5s39.3333 27.3333 70 42
+c30.6667 14.6667 65.8333 30 105.5 46l152.5 60l6 2z" />
+ <glyph glyph-name="uniFEDD" unicode="&#x644;" horiz-adv-x="655" arabic-form="isolated"
+ d="M665 161c0 -56.6667 -3.83331 -103 -11.5 -139s-21.8333 -67.6667 -42.5 -95c-20.6667 -27.3333 -50 -47 -88 -59s-86.6667 -18 -146 -18c-163.333 0 -245 64.3333 -245 193c0 64.6667 20.3333 151.667 61 261l16 -6c-30.6667 -94 -46 -166 -46 -216
+c0 -49.3333 25.3333 -91.3333 76 -126c59.3333 -12.6667 113 -19 161 -19c54 0 92.6667 6 116 18c59.3333 30.6667 89 83 89 157c0 176 -12.3333 410.667 -37 704l38 38l52 41l47 -146l-52 -64v-48c0 -114.667 2 -218.5 6 -311.5s6 -147.833 6 -164.5z" />
+ <glyph glyph-name="uniFEDE" unicode="&#x644;" horiz-adv-x="655" arabic-form="terminal"
+ d="M665 161c0 -56.6667 -3.83331 -103 -11.5 -139s-21.8333 -67.6667 -42.5 -95c-20.6667 -27.3333 -50 -47 -88 -59s-86.6667 -18 -146 -18c-163.333 0 -245 64.3333 -245 193c0 64.6667 20.3333 151.667 61 261l16 -6c-30.6667 -94 -46 -166 -46 -216
+c0 -49.3333 25.3333 -91.3333 76 -126c59.3333 -12.6667 113 -19 161 -19c54 0 92.6667 6 116 18c59.3333 30.6667 89 83 89 157c0 176 -12.3333 410.667 -37 704l38 38l52 41l47 -146l-52 -64v-48c0 -114.667 2 -218.5 6 -311.5s6 -147.833 6 -164.5z" />
+ <glyph glyph-name="uniFEDF" unicode="&#x644;" horiz-adv-x="206" arabic-form="initial"
+ d="M210 901l40 -130l-40 9v-391c0 -49.3333 -4.5 -87.3333 -13.5 -114c-9 -26.6667 -21 -44.5 -36 -53.5s-36.8333 -15.8333 -65.5 -20.5l-108 -3l1 77l78 2c61.3333 1.33334 91 38.3333 89 111l-10 452z" />
+ <glyph glyph-name="uniFEE0" unicode="&#x644;" horiz-adv-x="206" arabic-form="medial"
+ d="M210 901l40 -130l-40 9v-391c0 -49.3333 -4.5 -87.3333 -13.5 -114c-9 -26.6667 -21 -44.5 -36 -53.5s-36.8333 -15.8333 -65.5 -20.5l-108 -3l1 77l78 2c61.3333 1.33334 91 38.3333 89 111l-10 452z" />
+ <glyph glyph-name="uniFEE1" unicode="&#x645;" horiz-adv-x="549" arabic-form="isolated"
+ d="M280 303c-18 0 -35 -12.6667 -51 -38c-2.66667 10.6667 -4 22 -4 34c0 43.3333 26.6667 65.6667 80 67h27c18.6667 0 45.8333 -5.66666 81.5 -17s70.1667 -28.8333 103.5 -52.5c33.3333 -23.6667 50 -48.5 50 -74.5c0 -17.3333 -9.33331 -36.3333 -28 -57
+s-40 -31 -64 -31l-71 24c-46.6667 16 -86.3333 24 -119 24c-40.6667 0 -69.3333 -12 -86 -36c20 -161.333 30 -285.667 30 -373c0 -42 -7.33333 -79 -22 -111c-14.6667 87.3333 -27.3333 157.833 -38 211.5c-10.6667 53.6667 -17.8333 86.6667 -21.5 99
+c-3.66667 12.3333 -7 28.5 -10 48.5s-5.83333 52 -8.5 96v11c0 9.33333 2.5 21 7.5 35s12.8333 29.3333 23.5 46s26.5 30.8333 47.5 42.5c21 11.6667 44.8333 17.5 71.5 17.5c14 0 57 -9.33334 129 -28c-63.3333 41.3333 -106 62 -128 62z" />
+ <glyph glyph-name="uniFEE2" unicode="&#x645;" horiz-adv-x="549" arabic-form="terminal"
+ d="M280 303c-18 0 -35 -12.6667 -51 -38c-2.66667 10.6667 -4 22 -4 34c0 43.3333 26.6667 65.6667 80 67h27c18.6667 0 45.8333 -5.66666 81.5 -17s70.1667 -28.8333 103.5 -52.5c33.3333 -23.6667 50 -48.5 50 -74.5c0 -17.3333 -9.33331 -36.3333 -28 -57
+s-40 -31 -64 -31l-71 24c-46.6667 16 -86.3333 24 -119 24c-40.6667 0 -69.3333 -12 -86 -36c20 -161.333 30 -285.667 30 -373c0 -42 -7.33333 -79 -22 -111c-14.6667 87.3333 -27.3333 157.833 -38 211.5c-10.6667 53.6667 -17.8333 86.6667 -21.5 99
+c-3.66667 12.3333 -7 28.5 -10 48.5s-5.83333 52 -8.5 96v11c0 9.33333 2.5 21 7.5 35s12.8333 29.3333 23.5 46s26.5 30.8333 47.5 42.5c21 11.6667 44.8333 17.5 71.5 17.5c14 0 57 -9.33334 129 -28c-63.3333 41.3333 -106 62 -128 62z" />
+ <glyph glyph-name="uniFEE3" unicode="&#x645;" horiz-adv-x="403" arabic-form="initial"
+ d="M307 430c24.6667 0 51.1667 -20.3333 79.5 -61s42.5 -79.6667 42.5 -117c0 -40.6667 -25.6667 -65 -77 -73c-44.6667 0 -82.6667 10.6667 -114 32l-45 31c-21.3333 -26.6667 -50.6667 -40 -88 -40h-4h-101v76l101 -1c22.6667 0.666656 41.8333 6.33334 57.5 17
+s28 23.5 37 38.5s17.5 29.8333 25.5 44.5s18.6667 27.1667 32 37.5c13.3333 10.3333 29.3333 15.5 48 15.5h6zM342 240c18 0 27 11.3333 27 34c0 12.6667 -14 36.3333 -42 71l-19 14l-17 -7c-20.6667 -16.6667 -33.6667 -36 -39 -58c10 -16 23.6667 -29 41 -39
+s33.6667 -15 49 -15z" />
+ <glyph glyph-name="uniFEE4" unicode="&#x645;" horiz-adv-x="403" arabic-form="medial"
+ d="M307 430c24.6667 0 51.1667 -20.3333 79.5 -61s42.5 -79.6667 42.5 -117c0 -40.6667 -25.6667 -65 -77 -73c-44.6667 0 -82.6667 10.6667 -114 32l-45 31c-21.3333 -26.6667 -50.6667 -40 -88 -40h-4h-101v76l101 -1c22.6667 0.666656 41.8333 6.33334 57.5 17
+s28 23.5 37 38.5s17.5 29.8333 25.5 44.5s18.6667 27.1667 32 37.5c13.3333 10.3333 29.3333 15.5 48 15.5h6zM342 240c18 0 27 11.3333 27 34c0 12.6667 -14 36.3333 -42 71l-19 14l-17 -7c-20.6667 -16.6667 -33.6667 -36 -39 -58c10 -16 23.6667 -29 41 -39
+s33.6667 -15 49 -15z" />
+ <glyph glyph-name="uniFEE5" unicode="&#x646;" horiz-adv-x="651" arabic-form="isolated"
+ d="M441 451l-59 -55l-58 55l58 55zM362 -20c95.3333 0 164.833 13.5 208.5 40.5s65.5 76.5 65.5 148.5c-0.666687 104 -14.3333 166.667 -41 188l58 96c11.3333 -47.3333 18 -128.333 20 -243l-7 -78c-3.33331 -46.6667 -12 -85.6667 -26 -117
+c-14 -31.3333 -33 -54.8333 -57 -70.5c-24 -15.6667 -49.3333 -26.5 -76 -32.5c-26.6667 -6 -58.6667 -9 -96 -9c-21.3333 0 -37.6667 0.333336 -49 1c-90.6667 0 -153.5 17.6667 -188.5 53c-35 35.3333 -52.5 87.3333 -52.5 156c0 61.3333 9.33333 124.333 28 189l21 -4
+c-11.3333 -48.6667 -17 -92 -17 -130c0 -4.66667 0.333328 -11.3333 1 -20s1 -15 1 -19c0 -98 69 -147.667 207 -149z" />
+ <glyph glyph-name="uniFEE6" unicode="&#x646;" horiz-adv-x="651" arabic-form="terminal"
+ d="M441 451l-59 -55l-58 55l58 55zM362 -20c95.3333 0 164.833 13.5 208.5 40.5s65.5 76.5 65.5 148.5c-0.666687 104 -14.3333 166.667 -41 188l58 96c11.3333 -47.3333 18 -128.333 20 -243l-7 -78c-3.33331 -46.6667 -12 -85.6667 -26 -117
+c-14 -31.3333 -33 -54.8333 -57 -70.5c-24 -15.6667 -49.3333 -26.5 -76 -32.5c-26.6667 -6 -58.6667 -9 -96 -9c-21.3333 0 -37.6667 0.333336 -49 1c-90.6667 0 -153.5 17.6667 -188.5 53c-35 35.3333 -52.5 87.3333 -52.5 156c0 61.3333 9.33333 124.333 28 189l21 -4
+c-11.3333 -48.6667 -17 -92 -17 -130c0 -4.66667 0.333328 -11.3333 1 -20s1 -15 1 -19c0 -98 69 -147.667 207 -149z" />
+ <glyph glyph-name="uniFEE7" unicode="&#x646;" horiz-adv-x="323" arabic-form="initial"
+ d="M278 630l-61 -58l-62 58l62 58zM286 508c30 -40 45 -85.6667 45 -137v-68c0 -68.6667 -17.3333 -103 -52 -103h-282l-9 77h310v9c0 62.6667 -18.6667 111.667 -56 147z" />
+ <glyph glyph-name="uniFEE8" unicode="&#x646;" horiz-adv-x="323" arabic-form="medial"
+ d="M278 630l-61 -58l-62 58l62 58zM286 508c30 -40 45 -85.6667 45 -137v-68c0 -68.6667 -17.3333 -103 -52 -103h-282l-9 77h310v9c0 62.6667 -18.6667 111.667 -56 147z" />
+ <glyph glyph-name="uniFEE9" unicode="&#x647;" horiz-adv-x="424" arabic-form="isolated"
+ d="M394 315c0 -67.3333 -39 -105 -117 -113c-43.3333 0 -74.6667 3.66667 -94 11s-36 24 -50 50c-4 8 -6 19.3333 -6 34c0 26.6667 10 59.1667 30 97.5s36.6667 67.5 50 87.5l-8 10l52 72h1c40 -45.3333 66.3333 -79.3333 79 -102l51 -87c8 -20.6667 12 -40.6667 12 -60z
+M274 270c58 0 87 10.6667 87 32c0 18.6667 -10.6667 45.1667 -32 79.5s-52.6667 58.5 -94 72.5v-1c-4.66667 -4.66666 -11 -12 -19 -22l-23 -30c-7.33333 -10 -13.6667 -21.6667 -19 -35s-8 -26 -8 -38c0 -20.6667 11 -35.5 33 -44.5s47 -13.5 75 -13.5z" />
+ <glyph glyph-name="uniFEEA" unicode="&#x647;" horiz-adv-x="622" arabic-form="terminal"
+ d="M615 201c-68.6667 0 -117.833 14.1667 -147.5 42.5c-29.6667 28.3333 -52.1667 85.8333 -67.5 172.5c-21.3333 -51.3333 -57 -77 -107 -77c-108.667 2 -163 26.6667 -163 74c0 56.6667 74.3333 116.333 223 179c-2.66666 8.66669 -4 18.6667 -4 30
+c0 25.3333 8 50.6667 24 76l74 -337c29.3333 -57.3333 64.6667 -86 106 -86h94l-5 -72c-1.33331 -1.33333 -10.3333 -2 -27 -2zM199 440c0 -15.3333 11.3333 -26.5 34 -33.5s43.3333 -10.5 62 -10.5c35.3333 0 58.3333 3.66666 69 11s18.3333 22.3333 23 45
+c-2 8 -4.5 19.5 -7.5 34.5s-6 28.5 -9 40.5s-6.5 22.6667 -10.5 32c-107.333 -44.6667 -161 -84.3333 -161 -119z" />
+ <glyph glyph-name="uniFEEB" unicode="&#x647;" horiz-adv-x="525" arabic-form="initial"
+ d="M353 747c119.333 -116 179 -237.667 179 -365c0 -14 -1 -29.3333 -3 -46s-5.5 -36 -10.5 -58s-13.3333 -41.3333 -25 -58s-25.8333 -27.3333 -42.5 -32c-68 6.66667 -131.333 37.3333 -190 92c-58.6667 -52.6667 -122 -79.6667 -190 -81h-83l7 76
+c91.3333 0 165 16 221 48c-34 16 -59 52.3333 -75 109c0 111.333 71.3333 183 214 215l-56 37c4.66666 30.6667 22.6667 51.6667 54 63zM455 294c6.66666 0 14 14.3333 22 43s12 49.6667 12 63c0 62.6667 -23.3333 121.667 -70 177l-2 -47
+c-16.6667 -72.6667 -42 -130 -76 -172c63.3333 -36.6667 100.667 -58 112 -64h2zM323 423c25.3333 66 38 107.333 38 124c0 19.3333 -8 30.3333 -24 33c-32 -9.33331 -61.5 -23.5 -88.5 -42.5s-40.5 -39.8333 -40.5 -62.5c0 -26.6667 32 -55.6667 96 -87z" />
+ <glyph glyph-name="uniFEEC" unicode="&#x647;" horiz-adv-x="476" arabic-form="medial"
+ d="M378 404c0 -11.3333 -0.666656 -21 -2 -29s-5 -18.5 -11 -31.5s-17 -25.1667 -33 -36.5s-36.3333 -21 -61 -29h220v-77h-220c21.3333 -4.66667 40.6667 -15 58 -31c30.6667 -18 46 -47.3333 46 -88v-1c0 -26 -11.6667 -51.8333 -35 -77.5s-48 -38.5 -74 -38.5h-4
+c-21.3333 0 -39.1667 13.5 -53.5 40.5s-24.5 58.5 -30.5 94.5l-5 101h-191l1 77h187l9 125c10.6667 43.3333 22.8333 74.8333 36.5 94.5c13.6667 19.6667 34.1667 29.5 61.5 29.5c28 0 51.8333 -15.6667 71.5 -47s29.5 -56.6667 29.5 -76zM348 399
+c0 7.33334 -1.5 16.1667 -4.5 26.5s-9.66666 20.8333 -20 31.5s-23.5 16 -39.5 16c-19.3333 0 -34.3333 -9.83334 -45 -29.5s-17.5 -44 -20.5 -73s-7.16667 -59.8333 -12.5 -92.5h32c36.6667 15.3333 64.1667 31.5 82.5 48.5s27.5 41.1667 27.5 72.5zM209 188
+c15.3333 -104 42.3333 -157.333 81 -160c42.6667 12 64 31.6667 64 59c0 34 -14.5 61.5 -43.5 82.5s-62.8333 31.5 -101.5 31.5v-13z" />
+ <glyph glyph-name="uniFEED" unicode="&#x648;" horiz-adv-x="399" arabic-form="isolated"
+ d="M330 199h-99c-28 12 -42 42 -42 90v14c0 41.3333 14 81 42 119c16 21.3333 41 32 75 32h9c45.3333 -7.33334 73.3333 -64.6667 84 -172v-85c0 -76 -35.3333 -158.333 -106 -247c-39.3333 -50 -95 -75 -167 -75h-53v10c79.3333 46 129.167 78 149.5 96
+s45.5 51.6667 75.5 101c22.6667 36.6667 34 69 34 97c0 4 -0.666656 10.6667 -2 20zM341 288c-1.33334 35.3333 -4.66666 61.1667 -10 77.5s-16 24.5 -32 24.5c-30 0 -45 -34 -45 -102h10c5.33334 0 14.1667 -0.166656 26.5 -0.5s21.5 -0.5 27.5 -0.5
+c10.6667 0 18.3333 0.333344 23 1z" />
+ <glyph glyph-name="uniFEEE" unicode="&#x648;" horiz-adv-x="399" arabic-form="terminal"
+ d="M330 199h-99c-28 12 -42 42 -42 90v14c0 41.3333 14 81 42 119c16 21.3333 41 32 75 32h9c45.3333 -7.33334 73.3333 -64.6667 84 -172v-85c0 -76 -35.3333 -158.333 -106 -247c-39.3333 -50 -95 -75 -167 -75h-53v10c79.3333 46 129.167 78 149.5 96
+s45.5 51.6667 75.5 101c22.6667 36.6667 34 69 34 97c0 4 -0.666656 10.6667 -2 20zM341 288c-1.33334 35.3333 -4.66666 61.1667 -10 77.5s-16 24.5 -32 24.5c-30 0 -45 -34 -45 -102h10c5.33334 0 14.1667 -0.166656 26.5 -0.5s21.5 -0.5 27.5 -0.5
+c10.6667 0 18.3333 0.333344 23 1z" />
+ </font>
+ <path d="M20,10 L20,280" stroke="#BBB" />
+ <path d="M240,10 L240,280" stroke="#BBB" />
+ <path d="M460,10 L460,280" stroke="#BBB" />
+ <path d="M10,60 L470,60" stroke="#BBB" />
+ <path d="M10,150 L470,150" stroke="#BBB" />
+ <path d="M10,240 L470,240" stroke="#BBB" />
+ <g font-family="Andalus,Diwani Letter,serif" font-size="50">
+ <text text-anchor="middle" x="240" y="60" xml:lang="ar" fill="#700">آلات</text>
+ <text text-anchor="start" x="460" y="60" xml:lang="ar">آلات</text>
+ <text text-anchor="end" x="20" y="60" xml:lang="ar" fill="#009">آلات</text>
+ </g>
+ <g font-family="FreeSerif, svgSerifHebrewArabic,serif" font-size="50">
+ <text text-anchor="middle" x="240" y="150" xml:lang="ar" fill="#700">مص</text>
+ <text text-anchor="start" x="460" y="150" xml:lang="ar">مص</text>
+ <text text-anchor="end" x="20" y="150" xml:lang="ar" fill="#009">مص</text>
+ <!--
+ <text text-anchor="middle" x="380" y="320">&#x627;&#xfee0;&#xfee0;&#xfeea; &#x0644;&#x0627;</text>
+ -->
+ </g>
+ <g font-family="svgSerifHebrewArabic,serif" font-size="50">
+ <text text-anchor="middle" x="240" y="240" xml:lang="he" fill="#700">פעילות </text>
+ <text text-anchor="start" x="460" y="240" xml:lang="he">פעילות</text>
+ <text text-anchor="end" x="20" y="240" xml:lang="he" fill="#009">פעילות</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.10 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
+
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-201-t.svg
new file mode 100644
index 0000000000..cce3527060
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-201-t.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="Testing 'textArea' with fixed 'width' and 'height'" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-area-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Testing 'textArea' with fixed 'width' and 'height'</p>
+ <p>
+ Lines should break at character boundaries if there is not enough room to perform word breaks.
+ The 'height' of the first 'textArea' below (top-right) is less than that of the characters
+ so nothing should appear.
+ </p>
+ <p>The text is taken from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-201-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g text-anchor="middle" font-size="10" fill="#555">
+ <text xml:id="display-title" x="240" y="30" font-size="14" fill="#000">TextArea with Fixed Width and Height</text>
+ <text xml:id="comment-1" x="240" y="45">
+ Lines should break at character boundaries if there is not enough room to perform word breaks.
+ </text>
+ <text xml:id="comment-2" x="240" y="57">
+ The 'height' of the first 'textArea' below (top-right) is less than that of the characters
+ </text>
+ <text xml:id="comment-3" x="240" y="69">
+ so nothing should appear.
+ </text>
+ </g>
+ <text x="465" y="295" font-size="8" text-anchor="end" fill="#555">
+ Excerpt from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919
+ </text>
+ <rect x="15" y="80" width="48" height="200" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="80" width="48" height="200" font-size="24" fill="#369">Together they searched all through the great palace and even to the farthest limits of the palace grounds, which were quite extensive, but nowhere could they find a trace of Ozma. When Dorothy returned to where Betsy and Trot awaited her, the little girl's face was rather solemn and troubled, for never before had Ozma gone away without telling her friends where she was going, or without an escort that befitted her royal state.</textArea>
+ <rect x="75" y="80" width="390" height="15" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="75" y="80" width="390" height="15" font-size="24" fill="#396">Together they searched all through the great palace and even to the farthest limits of the palace grounds, which were quite extensive, but nowhere could they find a trace of Ozma. When Dorothy returned to where Betsy and Trot awaited her, the little girl's face was rather solemn and troubled, for never before had Ozma gone away without telling her friends where she was going, or without an escort that befitted her royal state.</textArea>
+ <rect x="75" y="105" width="390" height="175" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="75" y="105" width="390" height="175" font-size="24" fill="#396">Together they searched all through the great palace and even to the farthest limits of the palace grounds, which were quite extensive, but nowhere could they find a trace of Ozma. When Dorothy returned to where Betsy and Trot awaited her, the little girl's face was rather solemn and troubled, for never before had Ozma gone away without telling her friends where she was going, or without an escort that befitted her royal state.</textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-202-t.svg
new file mode 100644
index 0000000000..f30ade1bd8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-202-t.svg
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="Testing 'textArea' with fixed 'width' and 'height'" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-area-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Testing 'textArea' with fixed 'width' and 'height'</p>
+ <p>
+ Three 'textArea' elements contain words which are increasing in 'font-size'.
+
+ To pass, no characters should appear in the top-right box since the 'height' of the 'textArea' is less
+ than that of the characters.
+
+ There should be no characters outside of the border of the larger bottom-left box.
+
+ In the left-side box, there may be characters outside of the border, depending on whether
+ the implementation breaks words or not.
+ </p>
+ <p>The text is taken from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-202-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g text-anchor="middle" font-size="10" fill="#555">
+ <text xml:id="display-title" x="240" y="30" font-size="14" fill="#000">TextArea with Fixed Width and Height</text>
+ </g>
+ <text x="465" y="295" font-size="8" text-anchor="end" fill="#555">
+ Excerpt from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919
+ </text>
+ <rect x="15" y="80" width="48" height="200" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="80" width="48" height="200" font-size="10" fill="#936">
+ <tspan>
+ <tspan font-size="10">Together </tspan>
+ <tspan font-size="11">they </tspan>
+ <tspan font-size="12">searched </tspan>
+ <tspan font-size="13">all </tspan>
+ <tspan font-size="14">through </tspan>
+ <tspan font-size="15">the </tspan>
+ <tspan font-size="16">great </tspan>
+ <tspan font-size="17">palace </tspan>
+ <tspan font-size="18">and </tspan>
+ <tspan font-size="19">even </tspan>
+ <tspan font-size="20">to </tspan>
+ <tspan font-size="21">the </tspan>
+ <tspan font-size="22">farthest </tspan>
+ <tspan font-size="23">limits </tspan>
+ <tspan font-size="24">of </tspan>
+ <tspan font-size="25">the </tspan>
+ <tspan font-size="26">palace </tspan>
+ <tspan font-size="27">grounds, </tspan>
+ <tspan font-size="28">which </tspan>
+ <tspan font-size="29">were </tspan>
+ <tspan font-size="30">quite </tspan>
+ <tspan font-size="31">extensive </tspan>
+ </tspan>
+ </textArea>
+ <rect x="75" y="80" width="390" height="15" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="75" y="80" width="390" height="15" font-size="10" fill="#396">
+ <tspan>
+ <tspan font-size="10">Together </tspan>
+ <tspan font-size="11">they </tspan>
+ <tspan font-size="12">searched </tspan>
+ <tspan font-size="13">all </tspan>
+ <tspan font-size="14">through </tspan>
+ <tspan font-size="15">the </tspan>
+ <tspan font-size="16">great </tspan>
+ <tspan font-size="17">palace </tspan>
+ <tspan font-size="18">and </tspan>
+ <tspan font-size="19">even </tspan>
+ <tspan font-size="20">to </tspan>
+ <tspan font-size="21">the </tspan>
+ <tspan font-size="22">farthest </tspan>
+ <tspan font-size="23">limits </tspan>
+ <tspan font-size="24">of </tspan>
+ <tspan font-size="25">the </tspan>
+ <tspan font-size="26">palace </tspan>
+ <tspan font-size="27">grounds, </tspan>
+ <tspan font-size="28">which </tspan>
+ <tspan font-size="29">were </tspan>
+ <tspan font-size="30">quite </tspan>
+ <tspan font-size="31">extensive </tspan>
+ </tspan>
+ </textArea>
+ <rect x="75" y="105" width="390" height="175" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="75" y="105" width="390" height="175" font-size="10" fill="#396">
+ <tspan>
+ <tspan font-size="10">Together </tspan>
+ <tspan font-size="11">they </tspan>
+ <tspan font-size="12">searched </tspan>
+ <tspan font-size="13">all </tspan>
+ <tspan font-size="14">through </tspan>
+ <tspan font-size="15">the </tspan>
+ <tspan font-size="16">great </tspan>
+ <tspan font-size="17">palace </tspan>
+ <tspan font-size="18">and </tspan>
+ <tspan font-size="19">even </tspan>
+ <tspan font-size="20">to </tspan>
+ <tspan font-size="21">the </tspan>
+ <tspan font-size="22">farthest </tspan>
+ <tspan font-size="23">limits </tspan>
+ <tspan font-size="24">of </tspan>
+ <tspan font-size="25">the </tspan>
+ <tspan font-size="26">palace </tspan>
+ <tspan font-size="27">grounds, </tspan>
+ <tspan font-size="28">which </tspan>
+ <tspan font-size="29">were </tspan>
+ <tspan font-size="30">quite </tspan>
+ <tspan font-size="31">extensive </tspan>
+ <tspan font-size="32">but </tspan>
+ <tspan font-size="33">nowhere </tspan>
+ <tspan font-size="34">could </tspan>
+ <tspan font-size="36">they </tspan>
+ <tspan font-size="37">find </tspan>
+ <tspan font-size="38">a </tspan>
+ <tspan font-size="39">trace </tspan>
+ <tspan font-size="40">of </tspan>
+ <tspan font-size="41">Ozma. </tspan>
+ </tspan>
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!-- <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+ -->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-205-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-205-t.svg
new file mode 100644
index 0000000000..c72cf5091c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-205-t.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="TextArea with Height Set to Auto" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-area-205-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>TextArea with Height Set to Auto</p>
+ <p>Text should wrap at the right-hand margin and continue to the end of the paragraph.</p>
+ <p>The text is taken from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-205-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="30" font-size="14" text-anchor="middle" fill="#000">TextArea with Height Set to Auto</text>
+ <text xml:id="comment-1" x="240" y="45" font-size="11" text-anchor="middle" fill="#555">Text should wrap at the right-hand margin and continue to the end of the paragraph.</text>
+ <text x="465" y="290" font-size="8" text-anchor="end" fill="#555">Excerpt from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</text>
+ <line x1="15" y1="60" x2="465" y2="60" stroke="black" stroke-width="0.25"/>
+ <line x1="15" y1="60" x2="15" y2="275" stroke="black" stroke-width="0.25"/>
+ <line x1="465" y1="60" x2="465" y2="275" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="60" width="450" height="auto" font-size="16" fill="#259" text-align="start">
+ With this, he jumped upon the back of the Sawhorse again, and the quaint steed, which never tired, dashed away at full speed. The three girls were very much disturbed in mind. Even the Patchwork Girl seemed to realize that a great calamity had overtaken them all. Ozma was a fairy of considerable power, and all the creatures in Oz as well as the three mortal girls from the outside world looked upon her as their protector and friend. The idea of their beautiful girl Ruler's being overpowered by an enemy and dragged from her splendid palace a captive was too astonishing for them to comprehend at first. Yet what other explanation of the mystery could there be?
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-206-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-206-t.svg
new file mode 100644
index 0000000000..79c60d133f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-206-t.svg
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="TextArea with Line-increment and Tbreak" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-area-206-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>TextArea with Line-increment and Tbreak</p>
+ <p>The blue lines should appear below each of the five text lines in the 'textArea'.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-206-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="30" font-size="14" text-anchor="middle" fill="#000">TextArea with Line-increment and Tbreak</text>
+ <text xml:id="comment-1" x="240" y="45" font-size="11" text-anchor="middle" fill="#555">
+ The blue lines should appear below each of the five text lines in the 'textArea'.
+ </text>
+ <g stroke="blue" stroke-width="1.5" stroke-opacity="0.6">
+ <line x1="15" y1="75" x2="465" y2="75"/>
+ <line x1="15" y1="95" x2="465" y2="95"/>
+ <line x1="15" y1="125" x2="465" y2="125"/>
+ <line x1="15" y1="175" x2="465" y2="175"/>
+ <line x1="15" y1="275" x2="465" y2="275"/>
+ </g>
+ <rect x="15" y="60" width="450" height="225" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="60" width="450" height="225" fill="#285" text-align="start">
+ <tspan line-increment="15">
+ 1. 'line-increment' set to 15.<tspan font-size="15">ABCDEF</tspan>
+ </tspan>
+ <tspan line-increment="20">
+ <tbreak/>2. 'line-increment' set to 20. <tspan font-size="20">ABCDEF</tspan>
+ </tspan>
+ <tspan line-increment="30">
+ <tbreak/>3. 'line-increment' set to 30. <tspan font-size="30">ABCDEF</tspan>
+ </tspan>
+ <tspan line-increment="50">
+ <tbreak/>4. 'line-increment' set to 50. <tspan font-size="50">ABCDEF</tspan>
+ </tspan>
+ <tspan line-increment="100">
+ <tbreak/>5. 'line-increment' set to 100. <tspan font-size="100">ABCD</tspan>
+ </tspan>
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-207-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-207-t.svg
new file mode 100644
index 0000000000..05922f9813
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-207-t.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="TextArea Transformed by Rotation" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-area-207-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>TextArea Transformed by Rotation</p>
+ <p>The three 'textArea's should be rotated by 35, 90 and 180 degrees.</p>
+ <p>The text is taken from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-207-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="30" font-size="14" text-anchor="middle" fill="#000">TextArea Transformed by Rotation</text>
+ <text xml:id="comment-1" x="240" y="45" font-size="11" text-anchor="middle" fill="#555">
+ The three textArea's should be rotated by 35, 90 and 180 degrees.
+ </text>
+ <text x="465" y="290" font-size="8" text-anchor="end" fill="#555" visibility="visible">
+ Excerpts from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919
+ </text>
+ <g transform="rotate(35,80,-15)">
+ <rect x="130" y="40" width="195" height="130" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="130" y="40" width="195" height="130" font-size="14" fill="#259">
+ "Stone, is it?" Scraps, who was again dancing wildly around, for she never tired and could never keep still for long.<tbreak/>
+ "Course it's stone," answered Betsy scornfully.<tbreak/>
+ "Can't you see?"<tbreak/>
+ "Yes," said Scraps, going closer. "I can SEE the wall, but I can't FEEL it." And then, with her arms outstretched, she did a very queer thing. She walked right into the wall and disappeared.<tbreak/>
+ "For goodness sake!" Dorothy, amazed, as indeed they all were.<tbreak/>
+ "The gates must be around the other side," said the Wizard. "Let us follow the curve of the wall until we reach an opening in it."<tbreak/>
+ "Which way?" asked Dorothy.<tbreak/>
+ "We must guess that," he replied. "Suppose we go to the left. One direction is as good as another." They formed in marching order and went around the city wall to the left. It wasn't a big city, as I have said, but to go way around it outside the high wall was quite a walk, as they became aware. But around it our adventurers went without finding any sign of a gateway or other opening. When they had returned to the little mound from which they had started, they dismounted from the animals and again seated themselves on the grassy mound.
+ </textArea>
+ </g>
+ <g transform="rotate(90,50,50)">
+ <rect x="65" y="-365" width="100" height="205" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="65" y="-365" width="100" height="205" font-size="14" fill="#259">
+ The others of the party, however they might be puzzled by the serious problem that confronted them, would not allow themselves to despair.<tbreak/>
+ "If we once get over these mountains," said Button-Bright, "we could probably get along all right."<tbreak/>
+ "True enough," agreed Dorothy. "So we must find some way, of course, to get past these whirligig hills. But how?"<tbreak/>
+ "I wish the Ork was with us," sighed Trot.<tbreak/>
+ "But the Ork isn't here," said the Wizard, "and we must depend upon ourselves to conquer this difficulty. Unfortunately, all my magic has been stolen, otherwise I am sure could easily get over the mountains."<tbreak/>
+ "Unfortunately," observed the Woozy, "none of us has wings. And we're in a magic country without any magic."<tbreak/>
+ "What is that around your waist, Dorothy?" asked the Wizard.<tbreak/>
+ "That? Oh, that's just the Magic Belt I once captured from the Nome King," she replied.
+ </textArea>
+ </g>
+ <g transform="rotate(180,50,50)">
+ <rect x="-365" y="-175" width="205" height="100" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="-365" y="-175" width="205" height="100" font-size="14" fill="#259">
+ "A Magic Belt! Why, that's fine. I'm sure a Magic Belt would take you over these hills.".<tbreak/>
+ "It might if I knew how to work it," said the little girl. "Ozma knows a lot of its magic, but I've never found out about it. All I know is that while I am wearing it, nothing can hurt me.".<tbreak/>
+ "Try wishing yourself across and see if it will obey you," suggested the Wizard..<tbreak/>
+ "But what good would that do?" asked Dorothy. "If I got across, it wouldn't help the rest of you, and I couldn't go alone among all those giants and dragons while you stayed here.".<tbreak/>
+ "True enough," agreed the Wizard sadly. And then, after looking around the group, he inquired, "What is that on your finger, Trot?".<tbreak/>
+ "A ring. The Mermaids gave it to me," she explained, "and if ever I'm in trouble when I'm on the water, I can call the Mermaids and they'll come and help me. But the Mermaids can't help me on the land, you know, 'cause they swim, and--and--they haven't any legs.".<tbreak/>
+ "True enough," repeated the Wizard, more sadly.
+ </textArea>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-208-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-208-t.svg
new file mode 100644
index 0000000000..4329580987
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-208-t.svg
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="TextArea with Both Width and Height Set to Auto" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-area-208-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>TextArea with Both Width and Height Set to Auto</p>
+ <p>
+ The eight lines of numbers should not wrap. Each line is terminated by a tbreak element.
+ They have numbers from 0 to 50. Each line increases the 'font-size' by 25%.
+ The 'line-increment' attribute is not used.
+ </p>
+ <p>
+ This test is passed if eight lines of numbers are rendered and not
+ wrapped to a new line. Numbers displayed will decrease with each line.
+ Every line must begin with number 0.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-208-t.svg,v $</title>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="25" font-size="14" text-anchor="middle" fill="#000">TextArea with Both Width and Height Set to Auto</text>
+ <text xml:id="comment-1" x="240" y="40" font-size="11" text-anchor="middle" fill="#555">
+ The following eight lines of numbers should not wrap. They have numbers from 0 to 50.
+ </text>
+ <text xml:id="comment-2" x="240" y="52" font-size="11" text-anchor="middle" fill="#555">
+ Each line increases the 'font-size' by 25%. The 'line-increment' attribute is not used.
+ </text>
+ <line x1="15" y1="63" x2="465" y2="63" stroke="black" stroke-width="0.25"/>
+ <line x1="15" y1="63" x2="15" y2="290" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="60" width="auto" height="auto" font-size="13" xml:space="default">
+ <tspan fill="#285">
+ <tspan font-size="13">0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50</tspan>
+ <tspan font-size="16.25">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ <tspan font-size="19.5">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ <tspan font-size="22.75">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ <tspan font-size="26">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ <tspan font-size="29.25">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ <tspan font-size="32.5">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ <tspan font-size="35.75">
+ <tbreak/>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
+ </tspan>
+ </tspan>
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-209-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-209-t.svg
new file mode 100644
index 0000000000..8406f602d7
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-209-t.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="TextArea Testing Word Breaks and Tbreak" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-area-209-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>TextArea Testing Word Breaks and Tbreak</p>
+ <p>
+ Each word should break onto a new line. The left-hand 'textArea' has no 'tbreak' elements
+ while the right-hand one uses 'tbreak' after each word. Both should appear the same.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-209-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="25" font-size="14" text-anchor="middle" fill="#000">TextArea Testing Word Breaks and Tbreak</text>
+ <text xml:id="comment-1" x="240" y="40" font-size="11" text-anchor="middle" fill="#555">
+ Each word should break onto a new line. The left-hand 'textArea' has no 'tbreak' elements
+ </text>
+ <text xml:id="comment-2" x="240" y="52" font-size="11" text-anchor="middle" fill="#555">
+ while the right-hand one uses 'tbreak' after each word. Both should appear the same.
+ </text>
+ <rect x="15" y="65" height="220" width="220" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="65" height="220" width="220" font-size="12" xml:space="default" fill="#359">
+ Pseudopseudohypoparathyroidism Dichlorodiphenyltrichloroethane Floccinaucinihilipilification Honorificabilitudinitatibus Trinitrophenylmethylnitramine Paradimethylaminobenzaldehyde Cystoureteropyelonephritis Ethylenediaminetetraacetate Octamethylpyrophosphoramide Electroencephalographically Antitransubstantiationalist Hydroxydesoxycorticosterone Methylchloroisothiazolinone Ethylenediaminetetraacetic Anhydrohydroxyprogesterone Antidisestablishmentarianism Requeterequeteacostumbrado Superpsicoanalisticamente Anticonstitutionnellement Sobreabundantisimamente Apesadumbradisimamente Otorrinolaringologistico Endocrinologicamente
+ </textArea>
+ <rect x="245" y="65" height="220" width="220" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="245" y="65" height="220" width="220" font-size="12" xml:space="default" fill="#359">
+ Pseudopseudohypoparathyroidism <tbreak/>Dichlorodiphenyltrichloroethane <tbreak/>Floccinaucinihilipilification <tbreak/>Honorificabilitudinitatibus <tbreak/>Trinitrophenylmethylnitramine <tbreak/>Paradimethylaminobenzaldehyde <tbreak/>Cystoureteropyelonephritis <tbreak/>Ethylenediaminetetraacetate <tbreak/>Octamethylpyrophosphoramide <tbreak/>Electroencephalographically <tbreak/>Antitransubstantiationalist <tbreak/>Hydroxydesoxycorticosterone <tbreak/>Methylchloroisothiazolinone <tbreak/>Ethylenediaminetetraacetic <tbreak/>Anhydrohydroxyprogesterone <tbreak/>Antidisestablishmentarianism <tbreak/>Requeterequeteacostumbrado <tbreak/>Superpsicoanalisticamente <tbreak/>Anticonstitutionnellement <tbreak/>Sobreabundantisimamente <tbreak/>Apesadumbradisimamente <tbreak/>Otorrinolaringologistico <tbreak/>Endocrinologicamente <tbreak/>
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-210-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-210-t.svg
new file mode 100644
index 0000000000..b631dc35d6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-210-t.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="Testing 'rotate' attribute" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-area-210-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Testing "tbreak"</p>
+ <p>The gap between the lines should be as described</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-210-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="30" font-size="14" text-anchor="middle" fill="#000">&lt;tbreak&gt;</text>
+ <text xml:id="comment-1" x="240" y="45" font-size="11" text-anchor="middle" fill="#555">This slides tests the behaviour of &lt;tbreak&gt; in various situations</text>
+
+ <rect x="15" y="60" height="215" width="450" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="60" width="450" height="215" font-size="16" fill="#259"><tbreak/>
+This line should not be at the top of the textArea<tbreak/>
+This line should be immediately below the previous one<tbreak/>
+<tbreak/>
+There should be a gap between this line and the previous<tbreak/>
+<tbreak/>
+ <tbreak/>
+There should be a big gap between this line and the previous<tbreak/>
+<tspan line-increment="32"><tbreak/></tspan>
+There should be a big gap between this line and the previous<tbreak/>
+<tbreak/>
+<tbreak/>
+<tbreak/>
+<tbreak/>
+<tbreak/>
+<tbreak/>
+<tbreak/>
+<tbreak/>
+<tspan fill="red">This line should not be visible !</tspan>
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-221-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-221-t.svg
new file mode 100644
index 0000000000..1a1fad5889
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-221-t.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="TextArea with Line-increment and Text-anchor" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-area-221-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>TextArea with line-increment, text-align and display-align</p>
+ <p>
+ All text should be centered vertically and horizontally.
+ The 'font-size' is varied along with 'line-increment'.
+ </p>
+ <p>The text is taken from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-221-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text xml:id="display-title" x="240" y="25" font-size="14" text-anchor="middle" fill="#000">TextArea with line-increment, text-align and display-align</text>
+ <text xml:id="comment-1" x="240" y="40" font-size="11" text-anchor="middle" fill="#555">
+ All text should be centered horizontally and vertically.
+ </text>
+ <text x="465" y="290" font-size="8" text-anchor="end" fill="#555" visibility="hidden">
+ Excerpt from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919
+ </text>
+ <rect x="15" y="60" width="450" height="220" fill="none" stroke="black" stroke-width="0.25"/>
+ <textArea x="15" y="60" width="450" height="220" fill="#259" text-align="center" font-size="40" display-align="center">
+ The Lost Princess of Oz
+ <tspan line-increment="25">
+ <tbreak/>
+ </tspan>
+ <tspan font-size="20">
+ by<tbreak/>
+ </tspan>
+ <tspan font-size="24" line-increment="28">
+ Baum, L. Frank (Lyman Frank)<tbreak/>
+ <tspan font-size="18">1856-1919</tspan>
+ <tbreak/>
+ </tspan>
+ <tspan font-size="16" line-increment="20">
+ The eleventh book in the OZ set<tbreak/>
+ Published 1917
+ </tspan>
+ </textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-222-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-222-t.svg
new file mode 100644
index 0000000000..b2b71bc0bf
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-area-222-t.svg
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ASL" owner="AE" desc="Testing 'textArea' with fixed 'width' and 'height'" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-area-222-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Testing 'textArea' with editable attribute</p>
+ <p>Activating a textArea element should bring up UI asking for new text</p>
+ <p>The initial text is taken from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-area-222-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g text-anchor="middle" font-size="10" fill="#555">
+ <text xml:id="display-title" x="240" y="30" font-size="14" fill="#000">TextArea with editable attribute</text>
+ <text xml:id="comment-1" x="240" y="45">
+ Activating a textArea element should allow edit of textArea contents.
+ </text>
+ </g>
+ <text x="465" y="295" font-size="8" text-anchor="end" fill="#555">
+ Excerpt from "The Lost Princess of Oz" by Baum, L. Frank (Lyman Frank), 1856-1919
+ </text>
+ <rect x="15" y="80" width="48" height="200" fill="none" stroke="black" stroke-width="2">
+ <set attributeName="stroke" to="red" begin="text1.focusin" end="text1.focusout"/>
+ </rect>
+
+ <textArea xml:id="text1" editable="simple" x="15" y="80" width="48" height="200" font-size="24" fill="#369">Together they searched all through the great palace and even to the farthest limits of the palace grounds, which were quite extensive, but nowhere could they find a trace of Ozma.</textArea>
+
+ <rect x="75" y="105" width="390" height="175" fill="none" stroke="black" stroke-width="2">
+ <set attributeName="stroke" to="red" begin="text2.focusin" end="text2.focusout"/>
+ </rect>
+
+ <textArea xml:id="text2" editable="simple" x="75" y="105" width="390" height="175" font-size="24" fill="#396">Together they searched all through the great palace and even to the farthest limits of the palace grounds, which were quite extensive, but nowhere could they find a trace of Ozma.</textArea>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-edit-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-edit-201-t.svg
new file mode 100644
index 0000000000..9e5eca0b89
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-edit-201-t.svg
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE,AN" owner="ED" desc="Test editable in textArea" status="accepted"
+ approved="yes"
+ version="$Revision: 1.5 $" testname="$RCSfile: text-edit-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test checks basic text-editing capabilities.
+ </p>
+ <p>
+ Start editing by activating the textArea that has a green dashed outline.
+ This textArea has no child text content, but has a defined width and height.
+ Input the string "123 456" (one two three, space, space, four five six).
+
+ After input is complete, click the button labeled "Check #1". If the frame around
+ the textArea goes from being dashed to being solid then that part of the test has passed.
+ Another condition is that the text string "123 456" should look like it only has one space
+ and not two due to the whitespace handling rules.
+ </p>
+ <p>
+ Next activate the middle textArea that has a red dashed outline.
+ Input two spaces between 3 and 4. Now since this textArea has xml:space="preserve" those
+ two spaces should be rendered as two spaces, meaning it must look different from the first
+ textArea on the left. The textContent must be the same in both cases though, and this is
+ verified by clicking the button labeled "Check #2". If the test is successful the frame
+ will turn from dashed red to solid red.
+ </p>
+ <p>
+ Finally activate the rightmost textArea that has a blue dashed outline.
+ Then exit the editing mode without changing the text. The text must not change and the 'tbreak' element
+ must be kept in the position it's in. Now activate the textArea again and input an additional linebreak between 3 and 4.
+ The line "345" must now be on the third line, the second line being blank.
+ Click the button labeled "Check #3" to verify the result, the frame will turn from dashed
+ blue to solid blue if successful.
+ </p>
+ <p>
+ The test has passed if after inputting text according to the instructions above and clicking the three
+ buttons the rendered image matches the reference image exactly.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-edit-201-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18" stroke-width="2">
+
+ <text y="50" x="240" text-anchor="middle">Test editable text in textArea</text>
+
+ <g transform="translate(50,100)">
+ <text x="50" y="-10" text-anchor="middle" font-size="9" xml:space="preserve">Input the string "123 456" (two spaces).</text>
+
+ <textArea xml:id="ta1" width="100" height="100" pointer-events="boundingBox" editable="simple"> </textArea>
+ <rect xml:id="r1" width="100" height="100" stroke="green" fill="none" stroke-dasharray="5,5"/>
+
+ <rect y="110" width="100" height="20" rx="5" fill="none" stroke="green" pointer-events="fill">
+ <handler xe:event="click">
+ if(document.getElementById("ta1").textContent == "123 456")
+ document.getElementById("r1").setAttributeNS(null, "stroke-dasharray", "none");
+ </handler>
+ </rect>
+ <text x="50" y="126" text-anchor="middle" pointer-events="none">Check #1</text>
+ </g>
+ <g transform="translate(190,140)">
+ <text x="50" y="-10" text-anchor="middle" font-size="9">Insert two spaces between 3 and 4.</text>
+
+ <textArea xml:id="ta2" width="100" height="100" xml:space="preserve" pointer-events="boundingBox" editable="simple">123456</textArea>
+ <rect xml:id="r2" width="100" height="100" stroke="red" fill="none" stroke-dasharray="5,5"/>
+
+ <rect y="110" width="100" height="20" rx="5" fill="none" stroke="red" pointer-events="fill">
+ <handler xe:event="click">
+ if(document.getElementById("ta2").textContent == "123 456")
+ document.getElementById("r2").setAttributeNS(null, "stroke-dasharray", "none");
+ </handler>
+ </rect>
+ <text x="50" y="126" text-anchor="middle" pointer-events="none">Check #2</text>
+ </g>
+ <g transform="translate(330,100)">
+ <text x="50" y="-10" text-anchor="middle" font-size="9">Insert an additional linefeed between 3 and 4.</text>
+
+ <textArea xml:id="ta3" width="100" height="100" pointer-events="boundingBox" editable="simple">
+ 123<tbreak/>456
+ </textArea>
+ <rect xml:id="r3" width="100" height="100" stroke="blue" fill="none" stroke-dasharray="5,5"/>
+
+ <rect y="110" width="100" height="20" rx="5" fill="none" stroke="blue" pointer-events="fill">
+ <handler xe:event="click">
+ <![CDATA[
+ var ta = document.getElementById("ta3");
+ if (ta.textContent == "123456" &&
+ ta.firstElementChild.localName == 'tbreak' &&
+ ta.lastElementChild.localName == 'tbreak' &&
+ ta.firstElementChild != ta.lastElementChild &&
+ ta.firstElementChild.nextElementSibling == ta.lastElementChild)
+ document.getElementById("r3").setAttributeNS(null, "stroke-dasharray", "none");
+ ]]>
+ </handler>
+ </rect>
+ <text x="50" y="126" text-anchor="middle" pointer-events="none">Check #3</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!-- <g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+ -->
+</svg> \ No newline at end of file
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-01-t.svg
new file mode 100644
index 0000000000..736853ad15
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-01-t.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DS" owner="CL," desc="Test that viewer has the basic capability to handle different font families" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-fonts-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Purpose of test is to determine if the font family is being correctly selected. The top two lines of text test serif fonts; the top line in maroon tests the generic font family 'serif' and the second line in black tests a selection of commonly available named serif fonts. The next two lines of text test sans-serif fonts; the top line in maroon tests the generic font family 'sans-serif' and the second line in black tests a selection of commonly available named sans serif fonts. The following two lines of text test monospaced fonts; the top line in maroon tests the generic font family 'monospaced' and the second line in black tests a selection of commonly available named monospaced fonts. The lowercase 'i' and uppercase'W' should be the same width,for monospaced fonts.</p>
+ <p>The seventh line of text, in green, tests for three non-existent fonts (nonsense names). There is no fallback generic font specified. The text must be displayed anyway.</p>
+ <p>The first six lines contain two Japanese characters (&#x753B;&#x50CF;) at the end of the line. Both of these characters must be displayed, although it is compliant to display them with the 'missing glyph' if no suitable font containing Japanese characters can be found. Most but not all fonts have a visible missing glyph character. If the selected font has a visible missing glyph character, it should appear wherever the corresponding glyph is not available.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-fonts-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-weight="normal" font-size="24" stroke="none">
+ <text font-family="Georgia, 'Minion Web', 'Times New Roman', Times, 'MS PMincho', Heisei-Mincho, serif " x="20" y="80">A serifed face 画像</text>
+ <text font-family="Arial, 'Arial Unicode', 'Myriad Web', Geneva, 'Lucida Sans Unicode', 'MS PGothic', Osaka, sans-serif " x="20" y="160">A sans-serif face 画像</text>
+ <text font-family="'Lucida Console', 'Courier New', Courier, Monaco, 'MS Gothic', Osaka-Mono, monospace" x="20" y="240">A mono (iW) face 画像</text>
+ <g xml:id="generic" fill="maroon">
+ <text font-family="serif" x="40" y="50">A serifed face 画像</text>
+ <text font-family="sans-serif " x="40" y="130">A sans-serif face 画像</text>
+ <text font-family="monospace " x="40" y="210">A mono (iW) face 画像</text>
+ </g>
+ <text fill="green" font-family="'No such font at all', 'another fictitious one', sillynamewithoutspaces" x="40" y="290">This must be displayed</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-02-t.svg
new file mode 100644
index 0000000000..4195f0c1f8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-02-t.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DS" owner="CL," desc="Test that viewer has the basic capability to handle different font weights" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-fonts-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Purpose of test is to determine if the font weight is being correctly rendered. A number of font families are specified. The numerical weight values (100 to 900) should show the lighter weights on the lower numbers and the heavier weights on the larger numbers. Heavier is defined to mean 'no lighter'.</p>
+ <p>If only one font weight is available, they should all display at the same weight. The transition from black to green figures shows the correct light to bold transition for the common case where two weights are available. If three or more weights are available, see the CSS2 specification for how these are allocated to the nine weight numbers.</p>
+ <p>The absolute keywords 'normal' and bold' are tested by the first two lines on the right hand side of the test, the third line of text tests the to 'bolder' relative keyword and the fourth tests the 'lighter' relative keyword.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-fonts-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-family="Georgia,'Times New Roman',Times,'MS Mincho',serif" font-size="30">
+ <text font-weight="100" x="360" y="50">100</text>
+ <text font-weight="200" x="360" y="85">200</text>
+ <text font-weight="300" x="360" y="120">300</text>
+ <text font-weight="400" x="360" y="155">400</text>
+ <text font-weight="500" x="360" y="190">500</text>
+ <text fill="green" font-weight="600" x="360" y="225">600</text>
+ <text fill="green" font-weight="700" x="360" y="260">700</text>
+ <text fill="green" font-weight="800" x="360" y="295">800</text>
+ <text fill="green" font-weight="900" x="360" y="330">900</text>
+ <text font-weight="bold" x="60" y="80">This is bold</text>
+ <text font-weight="normal" x="60" y="130">This is normal</text>
+ <g font-weight="normal" fill="blue">
+ <text font-weight="bolder" x="60" y="180">Blue is bolder</text>
+ </g>
+ <g font-weight="bold" fill="blue">
+ <text font-weight="lighter" x="60" y="230">Blue is lighter</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-03-t.svg
new file mode 100644
index 0000000000..4a15fdba9f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-03-t.svg
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="MI" desc="Testing font-family attribute" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-fonts-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Testing font-family attribute. Two SVG fonts are defined. Various text elements are then used with varying values for the font-family attribute. The first two text elements should display in their respective fonts, the last two should be displayed using the system font since the value specified for font-family is either invalid or not specified.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-fonts-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font>
+ <font-face font-family="SVGHaettenschweiler" />
+ <glyph unicode="A" horiz-adv-x="440" d="M440 0l-160 0 -20 180 -80 0 -20 -180 -160 0 120 700 200 0 120 -700zm-200 280l-20 220 -20 -220 40 0z" />
+ <glyph unicode="B" horiz-adv-x="378" d="M20 0l0 700 180 0c40,0 80,0 100,-20 40,-20 60,-60 60,-100l0 -100c0,-60 -40,-80 -100,-100 80,-20 100,-60 100,-100l0 -140c0,-40 -20,-80 -40,-100 -40,-20 -60,-40 -100,-40l-200 0zm200 460l0 120c0,20 -20,20 -40,20l0 -180c20,0 40,0 40,40zm0 -340l0 180c0,20 -20,40 -40,40l0 -260c20,0 40,20 40,40z" />
+ <glyph unicode="C" horiz-adv-x="370" d="M360 460l-140 0 0 140c0,0 -20,20 -20,20 -20,0 -20,-20 -20,-20l0 -500c0,0 0,0 20,0 0,0 20,0 20,0l0 180 140 0 0 -180c0,-20 -20,-60 -60,-80 -20,-20 -60,-20 -100,-20 -120,0 -180,40 -180,120l0 460c0,80 60,120 180,120 100,0 160,-40 160,-120l0 -120z" />
+ </font>
+ <font>
+ <font-face font-family="SVGCharlesworth" />
+ <glyph unicode="A" horiz-adv-x="712" d="M-60 0l0 20c0,0 20,0 40,0 40,0 40,0 60,20 0,0 20,20 40,80 20,60 40,120 80,200 20,80 40,160 80,220 20,60 40,120 40,120 0,20 -20,20 -80,20l0 20c20,0 80,0 140,0 100,0 140,0 160,0l0 -20c-40,0 -80,0 -80,-20 20,-60 60,-140 80,-220 40,-100 80,-180 100,-260 40,-80 60,-140 60,-140 0,0 20,-20 40,-20 40,0 60,0 60,0l0 -20c0,0 -60,0 -180,0 -20,0 -40,0 -80,0 -40,0 -60,0 -80,0l0 20c20,0 60,0 80,0 20,0 20,20 20,20 0,0 -20,60 -40,140 -40,80 -40,120 -60,140 -60,0 -140,0 -220,0 -20,-20 -20,-40 -20,-80 -20,-40 -40,-80 -40,-120 -20,-60 -20,-80 -20,-80 20,-20 60,-20 80,-20l20 -20c-40,0 -80,0 -140,0 -80,0 -120,0 -140,0zm260 360c40,0 80,0 120,0 60,0 100,0 100,0 0,0 0,0 -20,40 0,20 -20,60 -40,100 0,40 -20,80 -20,100 -20,20 -20,40 -20,60l0 0c-20,-40 -40,-80 -60,-160 -40,-80 -60,-120 -60,-140z" />
+ <glyph unicode="B" horiz-adv-x="684" d="M160 660c-20,20 -40,20 -100,20l-20 20c20,0 60,0 120,0 80,0 140,0 180,0 60,0 100,0 160,-20 40,-20 60,-60 60,-100 0,-40 -20,-100 -60,-120 -20,-40 -60,-60 -100,-80l0 0c40,0 60,-20 100,-40 20,0 40,-20 60,-40 20,-20 20,-40 40,-60 0,-20 0,-40 0,-60 0,-40 0,-60 -20,-100 -20,-20 -40,-40 -80,-60 -20,-20 -60,-20 -100,-20 -20,0 -40,0 -80,0 -60,0 -100,0 -160,0 -20,0 -60,0 -120,0l20 20c0,0 20,0 40,0 40,0 40,0 60,20 0,0 0,20 0,80 0,80 0,160 0,240 0,80 0,140 0,200 0,60 0,100 0,100zm120 -620c20,0 60,-20 80,-20 20,0 60,0 80,20 20,0 20,20 40,40 20,20 20,40 20,60 0,40 -20,80 -40,100 -20,40 -40,60 -80,80 -40,20 -60,20 -100,20 0,-20 0,-40 0,-80 0,-40 0,-80 0,-120 0,-40 0,-80 0,-100zm0 340c40,0 80,0 100,20 20,20 40,40 60,60 0,20 0,60 0,80 0,20 0,40 0,60 -20,20 -40,40 -60,60 -20,20 -40,20 -60,20 -20,0 -40,0 -40,0 0,0 0,-20 0,-40 0,-20 0,-60 0,-140 0,-60 0,-100 0,-120z" />
+ <glyph unicode="C" horiz-adv-x="808" d="M740 480l-20 0c0,20 0,60 0,80 -20,20 -20,40 -40,60 -40,20 -60,20 -100,40 -40,20 -60,20 -100,20 -20,0 -20,0 -40,0 -40,0 -100,-20 -120,-40 -40,-20 -60,-40 -80,-80 -20,-20 -40,-40 -60,-80 0,-20 0,-60 0,-80 0,-60 0,-120 20,-160 20,-40 60,-80 100,-120 20,-20 80,-40 120,-60 40,-20 100,-40 140,-40 80,20 160,40 220,60l0 -40c-40,-20 -80,-40 -140,-40 -40,-20 -100,-20 -140,-20 -80,0 -140,20 -200,40 -80,20 -120,60 -180,100 -40,60 -60,120 -60,200 0,0 0,20 0,20 0,60 0,100 20,140 20,40 60,80 100,120 20,40 80,60 140,80 60,20 120,40 200,40 60,0 120,-20 200,-20 0,0 0,0 0,20 20,40 20,40 20,60l20 0c0,-20 0,-60 0,-140 -20,-100 -20,-140 -20,-160z" />
+ </font>
+ </defs>
+ <text x="15" y="60" font-size="18">font-family = "Haettenschweiler"</text>
+ <text x="340" y="60" font-family="SVGHaettenschweiler" font-size="35">ABC</text>
+ <text x="15" y="110" font-size="18">font-family = "Charlesworth"</text>
+ <text x="340" y="110" font-family="SVGCharlesworth" font-size="35">ABC</text>
+ <text x="15" y="160" font-size="18">font-family = "Invalid Name"</text>
+ <text x="340" y="160" font-family="InvalidFontFamily" font-size="35">ABC</text>
+ <text x="15" y="210" font-size="18">font-family = not specified</text>
+ <text x="340" y="210" font-size="35">ABC</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-04-t.svg
new file mode 100644
index 0000000000..b2459ed12a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-04-t.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="MI" desc="Testing font-family attribute" status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-fonts-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Testing font-family attribute.
+ Various text elements are
+ used with varying values for the font-family attribute.
+ The first two text elements should display in their respective fonts,
+ <span style="font-family: Haettenschweiler">Haettenschweiler</span> and
+ <span style="font-family: Charlesworth"></span>,
+ <em>if</em> they are installed on the target system. Otherwise, simply
+ displaying
+ the text in some fallback font is enough to pass the test.
+ The last two should be displayed using a fallback font since the
+ value specified for font-family is either invalid or not specified.
+ Failing to display the text means the test is not passed.
+ </p>
+ <p>
+ If the two named fonts are available on the system,
+ the rendered picture should match the reference image exactly,
+ except for possible
+ variations in the labelling text (per CSS2 rules)
+ and variations in text antialiasing or hinting.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-fonts-04-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <text x="15" y="60" font-size="18">font-family = "Haettenschweiler"</text>
+ <text x="340" y="60" font-family="Haettenschweiler" font-size="35">ABC</text>
+
+ <text x="15" y="110" font-size="18">font-family = "Charlesworth"</text>
+ <text x="340" y="110" font-family="Charlesworth" font-size="35">ABC</text>
+
+ <text x="15" y="160" font-size="18">font-family = "Invalid Name"</text>
+ <text x="340" y="160" font-family="InvalidFontFamily" font-size="35">ABC</text>
+
+ <text x="15" y="210" font-size="18">font-family = not specified</text>
+ <text x="340" y="210" font-size="35">ABC</text>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-202-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-202-t.svg
new file mode 100644
index 0000000000..114819c4f3
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-fonts-202-t.svg
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DS" owner="CL" desc="Test that viewer has the basic capability to handle different font weights" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-fonts-202-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ <p>
+ This tests the 'font-weight' property when multiple weights are available. A
+ font family with six weights is specified, with a fallback to 'serif'. If
+ the platform supports installable opentype fonts, please download
+ <a href="http://justanotherfoundry.com/Zalamander/index.htm">Zalamander Caps</a>
+ by Tim Ahrens of <a href="http://justanotherfoundry.com/">Just Another Foundry</a>.
+ </p>
+ <p>
+ The numerical weight values (100 to 900) should show the lighter weights on the
+ lower numbers and the heavier weights on the larger numbers. Heavier is defined
+ to mean 'no lighter'.
+ </p>
+ <p>
+ If only one font weight is available, they should all display at the same weight.
+ The transition from black to green figures shows the correct light to bold transition
+ for the common case where two weights are available. If three or more weights are
+ available, see the CSS2 specification for how these are allocated to the nine weight
+ numbers.
+ </p>
+ <p>
+ The absolute keywords 'normal' and bold' are tested by the first two lines on the
+ right hand side of the test, the third line of text tests the to 'bolder' relative
+ keyword and the fourth tests the 'lighter' relative keyword.
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-fonts-202-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII" font-size="18">
+ <g font-family="'ZalamanderCaps', serif" font-size="30">
+ <text font-weight="100" x="360" y="50">100</text>
+ <text font-weight="200" x="360" y="85">200</text>
+ <text font-weight="300" x="360" y="120">300</text>
+ <text font-weight="400" x="360" y="155">400</text>
+ <text font-weight="500" x="360" y="190">500</text>
+ <text fill="green" font-weight="600" x="360" y="225">600</text>
+ <text fill="green" font-weight="700" x="360" y="260">700</text>
+ <text fill="green" font-weight="800" x="360" y="295">800</text>
+ <text fill="green" font-weight="900" x="360" y="330">900</text>
+ <text font-weight="bold" x="60" y="80">This is bold</text>
+ <text font-weight="normal" x="60" y="130">This is normal</text>
+ <g font-weight="normal" fill="blue">
+ <text font-weight="bolder" x="60" y="180">Blue is bolder</text>
+ </g>
+ <g font-weight="bold" fill="blue">
+ <text font-weight="lighter" x="60" y="230">Blue is lighter</text>
+ </g>
+ <g font-size="14">
+ <text x="30" y="270">ZalamanderCaps is an OpenType font</text>
+ <text x="30" y="290">by Tim Ahrens of Just Another Foundry</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-01-t.svg
new file mode 100644
index 0000000000..e16c341c67
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-01-t.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="JF" desc="Test left-to-right aspect of internationalized text." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-intro-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test left-to-right aspect of internationalized text.</p>
+ <p>Various text strings in various languages appear. The main purpose of the test is to verify that the correct characters appear and that they appear in the correct order and orientation, even though the first choice font does not have the right glyphs.</p>
+ <p>Correct rendering requires that each character is rendered. it may be rendered with the 'missing glyph' if no glyphs are found in the fonts listed in the content, or in any fallback font that is available. The first choice font is a special SVG font that only contains the 'missing glyph'. Missing glyph from other fonts may conformantly be used, however.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-intro-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="Missy" horiz-adv-x="5">
+ <font-face font-family="MissingInAction" font-weight="normal" font-style="normal" units-per-em="8" cap-height="8" x-height="4" ascent="8" descent="2" alphabetic="0" mathematical="4" ideographic="-2" hanging="8" />
+ <missing-glyph d="M1,3h2v2h-2z" />
+ </font>
+ </defs>
+ <text font-family="Arial Unicode MS" font-size="40" fill="red" x="5" y="40">Test left-to-right text.</text>
+ <g font-size="17" font-family="MissingInAction, Georgia, 'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <text x="10" y="75">Polish: Mogę jeść szkło, i mi ...</text>
+ <text x="10" y="110">Russian: Я могу есть стекло, ...</text>
+ <text x="10" y="145" font-size="17">Greek: Μπορώ να φάω ...</text>
+ <text x="10" y="180">Hebrew: אני יכול לאכול זכוכית ... </text>
+ <text x="10" y="215">Yiddish: איך קען עסן גלאָז און ...</text>
+ </g>
+ <g font-size="17" font-family="MissingInAction, 'MS Song', SimHei,'LucidaSansUnicode', 'Arial Unicode MS'">
+ <text x="10" y="250">Chinese:我能吞下玻璃而不伤身体。</text>
+ </g>
+ <g font-size="17" font-family="MissingInAction, 'MS-Gothic','LucidaSansUnicode', 'Arial Unicode MS'">
+ <text x="10" y="285" font-size="17">Japanese: 私はガラスを食べます。</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-04-t.svg
new file mode 100644
index 0000000000..cf60f7ed7d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-04-t.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="JF" desc="Test basic of internationalized text." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-intro-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test basic aspect of internationalized text.</p>
+ <p>Various text strings in various languages appear. The main purpose of the test is to verify that the correct characters appear and that they appear in the correct order and orientation.</p>
+ <p>Correct rendering requires that each character is rendered. It is not required that a given character be rendered with any particular font; just that it is rendered. It may be rendered with the 'missing glyph' if no glyphs are found in the fonts listed in the content, or in any fallback font that is available.</p>
+ <p>A future version of this test might include all necessary glyphs as an SVG font.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-intro-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="16" fill="red" x="10" y="20">Test horizontal text.</text>
+ <g font-size="17" font-family="'Arial Unicode MS', 'LucidaSansUnicode','MS-Gothic'">
+ <text x="10" y="60">Polish: Mogę jeść szkło, i mi nie szkodzi.</text>
+ <text x="10" y="90">Russian: Я могу есть стекло, это мне не вредит.</text>
+ <text x="10" y="120" font-size="15">Greek: Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.</text>
+ <!-- Greek and japanese smaller just to make it fit on the line -->
+ <text x="10" y="150">Text "אני יכול לאכול זכוכית וזה לא מזיק לי" is in Hebrew</text>
+ <text x="10" y="180">Yiddish: איך קען עסן גלאָז און עס טוט מיר נישט װײ.</text>
+ <text x="10" y="210">Chinese:我能吞下玻璃而不伤身体。</text>
+ <text x="10" y="240" font-size="15">Japanese: 私はガラスを食べられます。それは私を傷つけません。</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-05-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-05-t.svg
new file mode 100644
index 0000000000..463b074e8d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-05-t.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="ED" owner="CL" desc="Tests Arabic text using various platform fonts" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-intro-05-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Tests Arabic text using various platform fonts. If these fonts are not available, a fallback font should be used that has Arabic glyphs. If such a font is not available, the 'missing glyph' (typically an open rectangle) should be displayed. It is an error to display the wrong Arabic glyphs, for example to display all isolate forms.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-intro-05-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="460" y="80" text-anchor="end" xml:lang="ar" font-size="30" font-family="Andalus">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <!-- andalus font comes with Windows 2000 and XP -->
+ <text x="460" y="160" text-anchor="end" xml:lang="ar" font-size="36" font-family="'Diwani Letter'">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <!-- Diwani fonts come with Microsoft Arabic fonts extension for Office XP http://www.microsoft.com/downloads/details.aspx?FamilyID=A83C0E03-8913-47A3-ACB7-8AC357627620&displaylang=AR -->
+ <text x="460" y="240" text-anchor="end" xml:lang="ar" font-size="30" font-family="'Nafees Naskh'">لماذا لا يتكلمون اللّغة العربية فحسب؟</text>
+ <!-- Nafees Nastaleeq and Nafees Naskh are freely available from the Center for Research in Urdu Language Processing (CRULP http://www.crulp.org ) at the National University of Computer and Emerging Sciences, Pakistan ( http://www.nu.edu.pk ) -->
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-06-t.svg
new file mode 100644
index 0000000000..9cd03b1eb4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-06-t.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AG" owner="CL" desc="test mandatory arabic ligatures" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-intro-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ <p>This test ensures that mandatory ligatures in Arabic are displayed.</p>
+ <p>
+ There are two subtests. The first requires an isolate lam-alef ligature
+ and the second requires a right-joining lam-alef ligature.
+ </p>
+ <p>
+ The test is passed if subtests are displayed as following:
+ </p>
+ <ul>
+ <li>The first subtest has the word for 'tools', آلات</li>
+ <li>The second subtest has the word for 'three', ثلاثة</li>
+ </ul>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-intro-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g font-family="Andalus,Diwani Letter,serif">
+ <path d="M10,120 L470,120" stroke="#BBB" />
+ <path d="M10,240 L470,240" stroke="#BBB" />
+ <text text-anchor="middle" x="240" y="120" font-size="140" xml:lang="ar" fill="#700">آلات</text>
+ <text text-anchor="middle" x="240" y="240" font-size="140" xml:lang="ar" fill="#700">ثلاثة</text>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-201-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-201-t.svg
new file mode 100644
index 0000000000..c6103034b4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-intro-201-t.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="DS" desc="Test for basic capability to handle 'text' elements and text presentation attributes." status="accepted"
+ approved="yes"
+ version="$Revision: 1.4 $" testname="$RCSfile: text-intro-201-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test text element, tspan element and various text styles.</p>
+ <p>The first group tests that text displays at all, that it displays in a straight line, and that the font style can be made italic or bold.</p>
+ <p>The second group tests that text can be treated as any other graphical element, with stroke and fill properties. The first word tests that fill color can be specified. The second word tests that stroke color can be specified in absence of fill. The third group tests the combination of all these effects. The final group tests positioning of 'text' elements.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-intro-201-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="19" y="61" font-size="32">Plain</text>
+ <text x="142" y="61" font-size="32" font-style="italic">Italic</text>
+ <text x="257" y="60" font-size="32" font-weight="bold">Bold</text>
+ <text x="224" y="110" font-size="32" fill="blue">fill only</text>
+ <text x="39" y="147" font-size="32" fill="none" stroke="red">stroke only</text>
+ <text x="10" y="200" font-size="32" font-style="italic" font-weight="bold" fill="blue" stroke="red">Bold, italic, fill and stroke</text>
+ <g>
+ <rect x="50" y="225" width="380" height="64" fill="none" stroke="black" stroke-width="2" />
+ <g>
+ <text x="55" y="245" font-size="24" fill="black">Each line of text which flows in a </text>
+ <text x="55" y="265" font-size="24" fill="black">rectangular box has to be broken</text>
+ <text x="55" y="285" font-size="24" fill="black">into separated lines.</text>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-04-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-04-t.svg
new file mode 100644
index 0000000000..c9bb324c42
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-04-t.svg
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="Tests that the viewer can handle the rotate attribute on the text element" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-text-04-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The purpose of this test is to validate proper handling of the text element's x and y attributes. In the various samples, a red marker shows the text's (0,0) coordinate. The blue markers show the current text positions. These are either defined by absolute x/y positioning or they are computed from the embeded font's glyphs advances.</p>
+ <p>The first text sample shows a reference piece of text.</p>
+ <p>The second text sample (x all) shows a piece of text where all the glyphs are positioned along the x axis.</p>
+ <p>The third text sample (x more) is a text element where there are more x values than characters (5 values for 4 characters). The last x value should be ignored and the result should be the same as the third sample.</p>
+ <p>The fourth text sample (x fewer) is a text element where there are fewer x values than characters (3 values for 4 characters). The last character should not be positioned but laid out normally, following its previous character sibling.</p>
+ <p>The fifth (y all), sixth (y more) and seventh (y fewer) text sample parallel the second, third and fourth test, but for the y attribute values.</p>
+ <p>The samples in the right column show combinations of x/y value sets.</p>
+ <p>In all the above tests, blue markers represent the expected glyph positions. The red markers are showing positions where no glyph should appear. The glyphs are black squares of increasing sizes.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-text-04-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="embeded" horiz-adv-x="224">
+ <font-face font-family="embeded" units-per-em="1000" ascent="1000" descent="-250" alphabetic="0" />
+ <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="750" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="750" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="750" d="M 0 0 L 750 0 L 750 750 L 0 750 Z" />
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="750" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z" />
+ </font>
+ </defs>
+ <defs>
+ <rect xml:id="marker" x="-4" y="-4" width="8" height="8" />
+ </defs>
+ <g font-size="16">
+ <g xml:id="reference" transform="translate(130, 40)">
+ <text text-anchor="end" x="-30">Reference</text>
+ <g>
+ <use xlink:href="#marker" x="0" fill="#8888FF" />
+ <use xlink:href="#marker" x="15" fill="#8888FF" />
+ <use xlink:href="#marker" x="30" fill="#8888FF" />
+ <use xlink:href="#marker" x="45" fill="#8888FF" />
+ <text xml:id="ref" font-family="embeded" font-size="20">1234</text>
+ </g>
+ </g>
+ <g xml:id="xAll" transform="translate(130, 80)">
+ <text text-anchor="end" x="-30">x all</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" fill="#8888FF" />
+ <use xlink:href="#marker" x="80" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" x="20 40 60 80">1234</text>
+ </g>
+ <g xml:id="xMore" transform="translate(130, 120)">
+ <text text-anchor="end" x="-30">x more</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" fill="#8888FF" />
+ <use xlink:href="#marker" x="80" fill="#8888FF" />
+ <use xlink:href="#marker" x="100" fill="red" />
+ <text font-family="embeded" font-size="20" x="20 40 60 80 100">1234</text>
+ </g>
+ <g xml:id="xFewer" transform="translate(130, 160)">
+ <text text-anchor="end" x="-30">x fewer</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" fill="#8888FF" />
+ <use xlink:href="#marker" x="75" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" x="20 40 60">1234</text>
+ </g>
+ <g xml:id="yAll" transform="translate(130, 200)">
+ <text text-anchor="end" x="-30">y all</text>
+ <use xlink:href="#marker" x="0" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="15" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="30" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="45" y="10" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" y="-10 -5 5 10">1234</text>
+ </g>
+ <g xml:id="yMore" transform="translate(130, 250)">
+ <text text-anchor="end" x="-30">y more</text>
+ <use xlink:href="#marker" x="0" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="15" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="30" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="45" y="10" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" y="-10 -5 5 10 20">1234</text>
+ </g>
+ <g xml:id="yFewer" transform="translate(130, 300)">
+ <text text-anchor="end" x="-30">y fewer</text>
+ <use xlink:href="#marker" x="0" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="15" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="30" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="45" y="5" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" y="-10 -5 5">1234</text>
+ </g>
+ <g transform="translate(220, 0)">
+ <g xml:id="xyAll" transform="translate(130, 80)">
+ <text text-anchor="end" x="-30">x/y all</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="80" y="10" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" x="20 40 60 80" y="-10 -5 5 10">1234</text>
+ </g>
+ <g xml:id="xyMore" transform="translate(130, 120)">
+ <text text-anchor="end" x="-30">x/y more</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="80" y="10" fill="#8888FF" />
+ <use xlink:href="#marker" x="100" y="20" fill="red" />
+ <text font-family="embeded" font-size="20" x="20 40 60 80 100" y="-10 -5 5 10 20">1234</text>
+ </g>
+ <g xml:id="xyFewer" transform="translate(130, 160)">
+ <text text-anchor="end" x="-30">x/y fewer</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="75" y="5" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" x="20 40 60" y="-10 -5 5">1234</text>
+ </g>
+ <g xml:id="xAllyFewer" transform="translate(130, 200)">
+ <text text-anchor="end" x="-30">x all y fewer</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="80" y="5" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" x="20 40 60 80" y="-10 -5 5">1234</text>
+ </g>
+ <g xml:id="xFewerYall" transform="translate(130, 240)">
+ <text text-anchor="end" x="-30">x fewer y all</text>
+ <use xlink:href="#marker" x="0" fill="red" />
+ <use xlink:href="#marker" x="20" y="-10" fill="#8888FF" />
+ <use xlink:href="#marker" x="40" y="-5" fill="#8888FF" />
+ <use xlink:href="#marker" x="60" y="5" fill="#8888FF" />
+ <use xlink:href="#marker" x="77.52" y="10" fill="#8888FF" />
+ <text font-family="embeded" font-size="20" x="20 40 60" y="-10 -5 5 10">1234</text>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-06-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-06-t.svg
new file mode 100644
index 0000000000..09892b1cea
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-06-t.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="VH" desc="x/y glyph positioning on ligatures" status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-text-06-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>The purpose of this test is to validate the interaction of x/y glyph positioning and ligatures.</p>
+ <p>The first line shows an example where there is a ligature (fi) which should be accounted for before breaking into text chunks (see specification section 10.5, additional x/y/dx/dy processing rules, bullet discussing ligatures). In this first line, the ligatures cause the x position 180 (shown in red), to be ignored. As a result, a glyph should be shown over each pale blue square markers. The glyphs are black squares of increasing sizes except for the initial ligature which has the form of two small black triangles joined at their tops. The ligature should show on the first pale blue marker position.</p>
+ <p>The second line shows the same test but using multiple y positions.</p>
+ <p>The third line shows the same test but using multiple x and y positions.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-text-06-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <font xml:id="embeded" horiz-adv-x="224">
+ <font-face font-family="embeded" units-per-em="1000" panose-1="0 0 0 0 0 0 0 0 0 0" ascent="917" descent="-250" alphabetic="0" />
+ <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V750H100V50H700Z" />
+ <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="1500" d="M 0 0 L 250 0 L 250 250 L 0 250 Z" />
+ <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0 L 500 0 L 500 500 L 0 500 Z" />
+ <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="1500" d="M 0 0 L 750 0 L 750 750 L 0 750 Z" />
+ <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1500" d="M 0 0 L 1000 0 L 1000 1000 L 0 1000 Z" />
+ <glyph unicode="fi" glyph-name="fi" horiz-adv-x="1500" d="M 0 0 L 500 0 L 0 700 L 500 700 Z" />
+ </font>
+ </defs>
+ <defs>
+ <g xml:id="marker">
+ <line y2="-15" stroke="red" />
+ <rect x="-4" y="-4" width="8" height="8" />
+ </g>
+ </defs>
+ <g font-size="10">
+ <g transform="translate(20, 30)">
+ <g xml:id="legend" transform="translate(10, 40)" font-size="12">
+ <text>x positioning</text>
+ <text y="40">y positioning</text>
+ <text y="140">x/y positioning</text>
+ </g>
+ <g transform="translate(100, 40)">
+ <use xlink:href="#marker" x="10" fill="#8888ff" />
+ <use xlink:href="#marker" x="180" fill="red" />
+ <use xlink:href="#marker" x="40" fill="#8888ff" />
+ <use xlink:href="#marker" x="70" fill="#8888ff" />
+ <use xlink:href="#marker" x="100" fill="#8888ff" />
+ <use xlink:href="#marker" x="130" fill="#8888ff" />
+ <text x="10 180 40 70 100 130" y="0" font-family="embeded">fi1234</text>
+ </g>
+ <g transform="translate(100, 80)">
+ <use xlink:href="#marker" y="-10" fill="#8888ff" />
+ <use xlink:href="#marker" x="15" y="50" fill="red" />
+ <use xlink:href="#marker" x="15" y="0" fill="#8888ff" />
+ <use xlink:href="#marker" x="30" y="10" fill="#8888ff" />
+ <use xlink:href="#marker" x="45" y="20" fill="#8888ff" />
+ <use xlink:href="#marker" x="60" y="30" fill="#8888ff" />
+ <text y="-10 50 0 10 20 30" x="0" font-family="embeded">fi1234</text>
+ </g>
+ <g transform="translate(100, 180)">
+ <use xlink:href="#marker" x="10" y="-10" fill="#8888ff" />
+ <use xlink:href="#marker" x="180" y="50" fill="red" />
+ <use xlink:href="#marker" x="40" y="0" fill="#8888ff" />
+ <use xlink:href="#marker" x="70" y="10" fill="#8888ff" />
+ <use xlink:href="#marker" x="100" y="20" fill="#8888ff" />
+ <use xlink:href="#marker" x="130" y="30" fill="#8888ff" />
+ <text x="10 180 40 70 100 130" y="-10 50 0 10 20 30" font-family="embeded">fi1234</text>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-07-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-07-t.svg
new file mode 100644
index 0000000000..7a52266c13
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-07-t.svg
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="MI" desc="Tests multiple x, y, rotate" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-text-07-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Tests multiple x, y, rotate, with various combinations. Since an array of values is given, each glyph must use the value from the corresponding character in the list.</p>
+ <p>The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-text-07-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="240 260 280 300 320 340 360" y="60 80 100 120 140 160 180 200" font-size="35">Multi X Y</text>
+ <text x="10" y="60" rotate="0 10 20 30 40 50 60" font-size="35">ROTATE</text>
+ <text x="10 30 50 70 90 110 130 150 170 190 210 230 250" y="300 290 280 270 260 250 240 230 220 210 200 190 180" rotate="0 -10 -20 -30 -40 -50 -60 -70 -80 -90 -100 -110 -120" font-size="35">Both Together</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-08-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-08-t.svg
new file mode 100644
index 0000000000..b83966ba60
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-08-t.svg
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="DJ" owner="SH" desc="tests text opacity properties" status="accepted"
+ approved="yes"
+ version="$Revision" testname="$RCSfile: text-text-08-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Two opacity properties (fill-opacity and stroke-opacity) of 'text' elements are covered in this test.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-text-08-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="19" y="60" font-size="64" fill="blue" stroke="red" stroke-width="2">Normal Text</text>
+ <text x="19" y="120" font-size="64" fill="blue" stroke="red" stroke-width="2" fill-opacity="0.50">Fill opacity</text>
+ <text x="19" y="180" font-size="64" fill="blue" stroke="red" stroke-width="2" stroke-opacity="0.50">Stroke opacity</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-09-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-09-t.svg
new file mode 100644
index 0000000000..caa1bbe412
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-text-09-t.svg
@@ -0,0 +1,55 @@
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="AE" owner="CL" desc="Tests multiple x, y, rotate" status="accepted"
+ approved="yes"
+ version="$Revision: 1.6 $" testname="$RCSfile: text-text-09-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Tests multiple x, y, rotate, with various combinations. Since an
+ array of values is given, each glyph must use the value from the
+ corresponding character in the list. In this test, there are less values
+ in the array than there are characters.
+ <!-- publish once the eratta are out -->
+ </p>
+ <p>
+ The rendered picture should match the reference image exactly, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-text-09-t.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="240 260 280 300" y="60 80 100 120 140" font-size="35">Multi X Y</text>
+ <text x="10" y="60" rotate="0 10 20 30" font-size="35">ROTATE</text>
+ <text x="10 30 50 70 90 110 130 150" y="300 290 280 270 260 250 240 230" rotate="0 -10 -20 -30 -40 -50 -60 -70 -80 -90" font-size="35">Both Together</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-tselect-03-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-tselect-03-t.svg
new file mode 100644
index 0000000000..32378bd0cb
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-tselect-03-t.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="CL" owner="ED" desc="Tests bidirectional text selection" status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-tselect-03-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This test demonstrates text selection of bidirectional text.
+ </p>
+ <p>To pass the test the the first 9 characters in logical order starting from logical position 0 are to be selected. This must be done by the tester since there's no way to control the selection in DOM. The selection should be started at the letter 'a' and proceed to the number '1' as indicated by the arrows. Visually this makes the selection discontigous and these substrings must be selected (listed in visual order):</p>
+ <p>"abc"</p>
+ <p>the space between "c" and "&#1493;"</p>
+ <p>"1"</p>
+ <p>the space between "3" and "&#1490;"</p>
+ <p>"&#1488;&#1489;&#1490;"</p>
+ <p>If only the substrings listed above were selected then the test has passed.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-tselect-03-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ <font xml:id="mini" horiz-adv-x="500" >
+ <font-face
+ font-family="tselect"
+ font-weight="400"
+ font-stretch="normal"
+ units-per-em="1000"
+ panose-1="2 2 6 3 5 4 5 2 3 4"
+ ascent="800"
+ descent="-200"
+ x-height="450"
+ cap-height="686"
+ bbox="-797 -545 2010 1166"
+ underline-thickness="50"
+ underline-position="-100"
+ unicode-range="U+05D0-U+05D5, U+0061-U+0066, U+0020, U+0031-U+0033" />
+ <missing-glyph horiz-adv-x="432" d="M33 0v666h333v-666h-333zM66 33h267v600h-267v-600z" />
+ <glyph glyph-name="one" unicode="1" d="M183 593q-18 0 -72 -22v14l180 91l8 -2v-600q0 -36 18 -47t77 -12v-15h-276v15q56 2 75.5 16.5t19.5 61.5v453q0 47 -30 47z" />
+ <glyph glyph-name="two" unicode="2" d="M31 477q5 23 10 40t21.5 49.5t37 54t57 38.5t82.5 17q78 0 131.5 -51t53.5 -126q0 -113 -128 -247l-168 -176h239q34 0 50.5 11.5t44.5 54.5l13 -5l-55 -137h-390v12l178 189q130 138 130 260q0 63 -39 102t-102 39q-52 0 -83.5 -28.5t-61.5 -101.5z" />
+ <glyph glyph-name="three" unicode="3" d="M81 78q23 0 68.5 -28t79.5 -28q55 0 93 43t38 106q0 52 -27 91.5t-74 56.5q-29 11 -106 11v13q34 12 58.5 23.5t51.5 31t41.5 47.5t14.5 64q0 47 -30.5 77t-79.5 30q-47 0 -82.5 -25.5t-66.5 -80.5l-15 4q26 71 70.5 116.5t126.5 45.5q69 0 112.5 -38t43.5 -99q0 -41 -21 -72t-73 -66q60 -26 94 -66.5t34 -115.5q0 -106 -78.5 -169.5t-197.5 -63.5q-52 0 -82.5 15.5t-30.5 41.5q0 16 10.5 25.5t27.5 9.5z" />
+ <glyph glyph-name="a" unicode="a" horiz-adv-x="444" d="M37 97q0 38 21.5 69t57 50.5t80 39t91.5 36.5v61q0 83 -76 83q-30 0 -51 -14.5t-21 -34.5q0 -8 2.5 -22t2.5 -18q0 -17 -13.5 -29.5t-31.5 -12.5q-17 0 -30 13t-13 30q0 47 48.5 79.5t119.5 32.5q82 0 113 -39.5t31 -120.5v-195q0 -33 6.5 -45.5t23.5 -12.5q21 0 44 19v-26q-26 -29 -45.5 -39.5t-44.5 -10.5q-31 0 -45.5 17t-18.5 56q-86 -73 -146 -73q-46 0 -75.5 30t-29.5 77zM287 123v145q-90 -33 -126 -64t-36 -75v-4q0 -32 18.5 -54.5t44.5 -22.5q34 0 73 23q16 9 21 19t5 33z" />
+ <glyph glyph-name="b" unicode="b" d="M153 681v-306q15 37 54 61t85 24q75 0 125.5 -62.5t50.5 -154.5q0 -107 -67.5 -180t-166.5 -73q-60 0 -112.5 20.5t-52.5 43.5v519q0 31 -9.5 41t-39.5 10q-11 0 -17 -1v16l29 8q67 19 116 36zM153 322v-252q0 -19 29 -33.5t68 -14.5q62 0 96 46t34 129q0 91 -34.5 145.5t-93.5 54.5q-39 0 -69 -23t-30 -52z" />
+ <glyph glyph-name="c" unicode="c" horiz-adv-x="444" d="M25 213q0 111 65.5 179t153.5 68q63 0 108.5 -30.5t45.5 -72.5q0 -17 -14 -29.5t-34 -12.5q-34 0 -47 46l-6 22q-8 28 -20 38t-39 10q-61 0 -98.5 -48.5t-37.5 -125.5q0 -86 43.5 -140.5t111.5 -54.5q43 0 74 21t67 73l14 -9q-10 -20 -17.5 -33t-27 -39t-38.5 -42t-50 -29.5t-64 -13.5q-83 0 -136.5 62.5t-53.5 160.5z" />
+ <glyph glyph-name="d" unicode="d" d="M344 -10l-4 3v64q-48 -67 -128 -67q-83 0 -134 59.5t-51 155.5q0 106 61 180.5t147 74.5q54 0 105 -43v156q0 31 -9 41t-37 10q-14 0 -22 -1v16q91 24 147 44l5 -2v-567q0 -35 8.5 -46t35.5 -11q5 0 23 1v-16zM251 42q38 0 63.5 21.5t25.5 38.5v230q0 40 -31 70t-71 30q-57 0 -91 -51t-34 -136q0 -92 38 -147.5t100 -55.5z" />
+ <glyph glyph-name="e" unicode="e" horiz-adv-x="444" d="M97 277q2 -63 17 -108.5t39 -68t48.5 -32t51.5 -9.5q48 0 83.5 24t71.5 81l16 -7q-31 -81 -86 -124t-126 -43q-86 0 -136.5 60.5t-50.5 163.5q0 111 58.5 178.5t150.5 67.5q76 0 118 -45.5t53 -137.5h-308zM99 309h204q-10 65 -31 90t-67 25q-90 0 -106 -115z" />
+ <glyph glyph-name="f" unicode="f" horiz-adv-x="333" d="M341 580q-16 0 -27.5 11.5t-18 26t-20 26t-32.5 11.5q-57 0 -57 -89v-116h123v-32h-122v-314q0 -56 16 -71.5t77 -17.5v-15h-260v15q54 3 68.5 18.5t14.5 70.5v314h-82v32h82q2 112 42 172.5t134 60.5q45 0 74.5 -17.5t29.5 -44.5q0 -17 -12.5 -29t-29.5 -12z" />
+ <glyph glyph-name="afii57664" unicode="&#x5d0;" horiz-adv-x="537" d="M71 51q0 14 -18.5 81.5t-18.5 88.5q0 51 63 123q-5 1 -15 8.5t-23 22t-22.5 44t-9.5 66.5q0 36 19 66t38 30h2q2 0 2.5 -3t1.5 -14t4 -24q9 -34 57.5 -84t92.5 -83t49 -33l51 71q-8 0 -45.5 34.5t-37.5 59.5t22 52t43 27q6 0 6.5 -4t-0.5 -11v-6q0 -21 24.5 -41t53.5 -35t53.5 -40t24.5 -55q0 -40 -28 -70.5t-46 -30.5q-1 0 -11 47q-4 20 -14 35t-18 20l-8 5l-49 -77q2 0 20 -10.5t43.5 -31.5t50.5 -47t42.5 -62t17.5 -71q0 -62 -12 -83t-32 -21h-7q-1 0 -2.5 19t-16.5 50t-46 55q-64 47 -161.5 129t-98.5 82l-9 -7q-9 -7 -18.5 -22.5t-9.5 -33.5q0 -23 20 -52t43.5 -52t43.5 -53.5t20 -56.5q0 -18 -10.5 -30.5t-23.5 -17t-24 -10.5h-115l6 12q1 3 6 3q8 0 12 1.5t9 5t7 12t2 22.5z" />
+ <glyph glyph-name="afii57665" unicode="&#x5d1;" horiz-adv-x="537" d="M115 442q-40 0 -60 16.5t-20 70.5q0 55 28 69q0 -3 4 -10.5t19 -16t37 -8.5h206q48 0 83.5 -30.5t35.5 -110.5l2 -314h54l-35 -108h-445l35 108h370v260q0 46 -24.5 60t-72.5 14h-217z" />
+ <glyph glyph-name="afii57666" unicode="&#x5d2;" horiz-adv-x="350" d="M141 433q-26 0 -38.5 16t-12.5 62q0 66 19 87q0 -1 2.5 -5t7 -10.5l7.5 -10.5q6 -9 33.5 -10.5t57 -7t39.5 -24.5q13 -22 13 -69v-22v-264q0 -44 8.5 -89t18.5 -86q-25 0 -32 2t-9.5 10.5t-2.5 25.5q-2 15 -12.5 59.5t-10.5 45.5h-10l-62 -143h-118v4q0 101 30 104l120 21q7 7 24.5 30t18.5 36q2 24 11.5 83.5t9.5 78.5q0 9 -1 13v4q0 23 -12 43.5t-42 20.5q-9 0 -28.5 -2.5t-28.5 -2.5z" />
+ <glyph glyph-name="afii57667" unicode="&#x5d3;" horiz-adv-x="537" d="M53 596q0 -7 13.5 -20.5t42.5 -13.5h315q22 0 40 -16.5t18 -38.5q0 -26 -13.5 -45.5t-35.5 -19.5h-10v-350q0 -4 0.5 -9.5t0.5 -8.5q0 -16 -11 -46t-25 -30h-2l-2 1q-1 0 -1 10q0 3 0.5 12.5t0.5 14.5l9 406h-281q-49 0 -68 20.5t-19 60.5q0 56 28 73z" />
+ <glyph glyph-name="afii57668" unicode="&#x5d4;" horiz-adv-x="537" d="M52 598q0 -5 3.5 -12t17 -15t35.5 -8h315q19 0 30.5 -16.5t11.5 -39.5q0 -65 -42 -65h-10l5 -343q0 -3 3 -17.5t3 -23.5q0 -14 -8.5 -37t-20.5 -23q-5 0 -8 2q-1 0 -1 6q0 4 0.5 14t0.5 15l5 407h-280q-90 0 -90 86q0 49 30 70zM74 142q0 -25 2 -54.5t2 -31.5q0 -21 -6.5 -39t-20.5 -18l-1 1h-3q-7 0 -7 50q0 3 0.5 15t0.5 26q0 13 -1 37t-1 36q0 61 14.5 104t28.5 43q6 0 6 -19q0 -9 -7 -59t-7 -91z" />
+ <glyph glyph-name="afii57669" unicode="&#x5d5;" horiz-adv-x="350" d="M166 563q49 0 63.5 -19t14.5 -59q0 -9 -0.5 -24.5t-0.5 -21.5l12 -340q0 -22 -6 -60.5t-16 -38.5h-2q-1 0 -8 15t-7 25l7 325v7q0 20 -23 46.5t-56 26.5q-6 0 -18 -0.5t-17 -0.5q-28 0 -44.5 17.5t-16.5 44.5q0 24 12 52t23 40l3 -10q3 -11 10.5 -18t21.5 -7q4 0 10 -0.5t9 -0.5q6 0 15.5 0.5t13.5 0.5z" />
+ <glyph glyph-name="space" unicode=" " horiz-adv-x="250"/>
+ </font>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="12" y="300" x="10">Start selecting here</text>
+ <text font-size="12" y="130" x="10">select from 'a' to '1'</text>
+ <path d="M0 100l0 -100m-2 20l2 -20l2 20" transform="translate(20 190)" stroke="black" fill="none"/>
+ <path d="M20 140l160 0m-20 -2l20 2l-20 2" stroke="black" fill="none"/>
+
+ <text xml:id="text" font-size="48" y="128" x="10" font-family="tselect" transform="translate(0 60)"> abc &#1488;&#1489;&#1490; 123 &#1491;&#1492;&#1493; def </text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-01-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-01-t.svg
new file mode 100644
index 0000000000..2b3e92e15c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-01-t.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="VH" owner="LH," desc="Test that viewer correctly handle whitespace and the 'space' attribute." status="accepted"
+ approved="yes"
+ version="$Revision: 1.7 $" testname="$RCSfile: text-ws-01-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test for viewer correct handling of whitespace and the 'xml:space' attribute. There are two sub-tests, for xml:space value "default". In each test, the content of the 'text' element is written on multiple lines. The first test of each pair has indented text with leading space characters, tabs, etc. The second has no indentation, but a line break before the content and after it. There are no space (or other whitespace) characters at the ends of the lines.</p>
+ <p>The two test cases are self-descriptive. From the top; first, "default" value applied to 3 lines of content with indents, space characters, tabs, etc; second, "default" applied to two lines content with no indent;</p>
+ <p>In each test, the test string is in blue and the reference image is in black. The rendered picture should approximately match the reference image, however there is some question in the reference image concerning the exact amount of space in the long-space areas. The third test uses the nbsp unicode character to force the reference white spaces display, which provides an accurate match if the font in use has the same metrics for that character and the default white space. Also, variations are possible in the text fonts and layout (per CSS2 rules).</p>
+ <p>The test also uses the 'rect' element, as well as basic fill (solid primary colors), stroke (black 1-pixel lines), font-family (Arial) and font-size properties.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-ws-01-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="15" y="35" font-size="32" fill="black">Basic: xml:space attribute</text>
+ <text x="35" y="60" font-size="32" fill="black">&amp; whitespace handling.</text>
+ <!-- Test 1: indented, spaces, tabs, and space='default' -->
+ <!-- Features=" line break and spaces before 1st line" tabs before 2nd line; -->
+ <!-- spaces before 3rd line; no space at ends of any lines. -->
+ <text x="15" y="105" fill="blue" font-size="40" xml:space="default">WS with indented lines.</text>
+ <text x="15" y="140" fill="black" font-size="40">WS with indented lines.</text>
+ <rect x="25" y="145" width="350" height="36" fill="none" stroke="black" />
+ <text x="28" y="175" fill="black" font-size="40">xml:space='default'</text>
+ <!-- Test 2: non-indented,and space='default' -->
+ <!-- Features=" line break before 1st line" no space either at beginning -->
+ <!-- or end of any lines. -->
+ <text x="15" y="225" fill="blue" font-size="40" xml:space="default"> WS non-indented lines. </text>
+ <text x="15" y="260" fill="black" font-size="40">WS non-indented lines.</text>
+ <rect x="25" y="265" width="350" height="36" fill="none" stroke="black" />
+ <text x="28" y="295" fill="black" font-size="40">xml:space='default'</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-02-t.svg b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-02-t.svg
new file mode 100644
index 0000000000..6971cde902
--- /dev/null
+++ b/tests/baseline/scenegraph/data/shared/svg_12_testsuite/text-ws-02-t.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xe="http://www.w3.org/2001/xml-events">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ reviewer="VH" owner="LH," desc="Test that viewer correctly handle whitespace and the 'space' attribute." status="accepted"
+ approved="yes"
+ version="$Revision: 1.8 $" testname="$RCSfile: text-ws-02-t.svg,v $">
+ <d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
+ <p>Test for viewer correct handling of whitespace and the 'xml:space' attribute. There are two sub-tests, for value "preserve". In each test, the content of the 'text' element is written on multiple lines. The first test of each pair has indented text with leading space characters, tabs, etc. The second has no indentation, but a line break before the content and after it. There are no space (or other whitespace) characters at the ends of the lines.</p>
+ <p>The two test cases are self-descriptive. From the top; first, "preserve" applied to essentially the same content as first; second, "preserve" applied to essentially the same content as second.</p>
+ <p>In each test, the test string is in blue and the reference image is in black. The rendered picture should approximately match the reference image, however there is some question in the reference image concerning the exact amount of space in the long-space areas. The third test uses the nbsp unicode character to force the reference white spaces display, which provides an accurate match if the font in use has the same metrics for that character and the default white space. Also, variations are possible in the text fonts and layout (per CSS2 rules).</p>
+ <p>The test also uses the 'rect' element, as well as basic fill (solid primary colors), stroke (black 1-pixel lines), font-family (Arial) and font-size properties.</p>
+ </d:OperatorScript>
+ </SVGTestCase>
+ <title xml:id="test-title">$RCSfile: text-ws-02-t.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="15" y="35" font-size="32" fill="black">Basic: xml:space attribute</text>
+ <text x="35" y="60" font-size="32" fill="black">&amp; whitespace handling.</text>
+ <!-- Test 3: indented, spaces, tabs, and space='preserve' -->
+ <!-- Features=" line break and spaces before 1st line" tabs before 2nd line; -->
+ <!-- spaces before 3rd line; no space at ends of any lines. -->
+ <text x="15" y="105" fill="blue" font-size="40" xml:space="preserve">
+WS
+ with
+ indented lines.
+ </text>
+ <!-- should match this, with blank replacing HT, LF, etc -->
+ <text x="15" y="140" fill="black" font-size="40" xml:space="preserve">&#160;WS&#160;&#160;&#160;with&#160;&#160;indented&#160;lines.</text>
+ <rect x="25" y="145" width="380" height="36" fill="none" stroke="black" />
+ <text x="28" y="175" fill="black" font-size="40">xml:space='preserve'</text>
+ <!-- Test 4: non-indented, and space='preserve' -->
+ <!-- Features=" no line break before 1st line" no space either at beginning -->
+ <!-- or end of any lines. -->
+ <text x="15" y="225" fill="blue" font-size="40" xml:space="preserve">WS
+non-indented lines.
+ </text>
+ <text x="15" y="260" fill="black" font-size="40">WS non-indented lines.</text>
+ <rect x="25" y="265" width="380" height="36" fill="none" stroke="black" />
+ <text x="28" y="295" fill="black" font-size="40">xml:space='preserve'</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g xml:id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/baseline/scenegraph/data/text/text_context_font_merging.qml b/tests/baseline/scenegraph/data/text/text_context_font_merging.qml
new file mode 100644
index 0000000000..3f0adfe2d8
--- /dev/null
+++ b/tests/baseline/scenegraph/data/text/text_context_font_merging.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 100
+ Column {
+ anchors.fill: parent
+ Text {
+ text: "說文閩音通說文閩音通說文閩音通"
+ font.pixelSize: 20
+ }
+ Text {
+ text: "說文閩音通說文閩音通說文閩音通"
+ font.contextFontMerging: true
+ font.pixelSize: 20
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/text/text_prefertypolinemetrics.qml b/tests/baseline/scenegraph/data/text/text_prefertypolinemetrics.qml
new file mode 100644
index 0000000000..3bb9452021
--- /dev/null
+++ b/tests/baseline/scenegraph/data/text/text_prefertypolinemetrics.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+
+Item {
+ width: 180
+ height: 60
+
+ Row {
+ anchors.fill: parent
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 16
+ textFormat: Qt.RichText
+ text: "First line<br />Second line<br />Third line"
+ }
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 16
+ textFormat: Qt.RichText
+ text: "First line<br />Second line<br />Third line"
+ font.preferTypoLineMetrics: true
+ }
+
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/coordsOther.qml b/tests/baseline/scenegraph/data/vectorimages/coordsOther.qml
new file mode 100644
index 0000000000..93901e77f7
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/coordsOther.qml
@@ -0,0 +1,38 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 650
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-constr-201-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-coord-01-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-units-01-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-viewattr-05-t.svg"
+ }
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/coordsOtherCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/coordsOtherCurveRenderer.qml
new file mode 100644
index 0000000000..e529b0ae5c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/coordsOtherCurveRenderer.qml
@@ -0,0 +1,38 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 650
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-constr-201-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-coord-01-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-units-01-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/coords-viewattr-05-t.svg"
+ }
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/coordsTrans.qml b/tests/baseline/scenegraph/data/vectorimages/coordsTrans.qml
new file mode 100644
index 0000000000..e007c1e05c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/coordsTrans.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 650
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "coords-trans*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/coordsTransCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/coordsTransCurveRenderer.qml
new file mode 100644
index 0000000000..ce2a3bde02
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/coordsTransCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 650
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "coords-trans*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fillMode.qml b/tests/baseline/scenegraph/data/vectorimages/fillMode.qml
new file mode 100644
index 0000000000..03e575daf4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fillMode.qml
@@ -0,0 +1,59 @@
+import QtQuick
+import QtQuick.VectorImage
+
+Rectangle{
+ id: topLevelItem
+ width: 200
+ height: 880
+
+ Column {
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ name: "Stretch"
+ mode: VectorImage.Stretch
+ }
+ ListElement {
+ name: "NoResize"
+ mode: VectorImage.NoResize
+ }
+ ListElement {
+ name: "PreserveAspectCrop"
+ mode: VectorImage.PreserveAspectCrop
+ }
+ ListElement {
+ name: "PreserveAspectFit"
+ mode: VectorImage.PreserveAspectFit
+ }
+
+ }
+
+ Column {
+ width: 200
+ height: 200 + t.height
+ Rectangle {
+ color: "white"
+ border.width: 1
+ border.color: "black"
+ width: 152
+ height: 202
+ VectorImage {
+ x: 1
+ y: 1
+ width: 150
+ height: 200
+ source: "../shared/qt_logo.svg"
+ fillMode: mode
+ clip: true
+ z: 100
+ }
+ }
+ Text {
+ id: t
+ text: name
+ }
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fontsElem.qml b/tests/baseline/scenegraph/data/vectorimages/fontsElem.qml
new file mode 100644
index 0000000000..5070eb1a88
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fontsElem.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "fonts-elem*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fontsElemCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/fontsElemCurveRenderer.qml
new file mode 100644
index 0000000000..1883258f27
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fontsElemCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "fonts-elem*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fontsGlyph.qml b/tests/baseline/scenegraph/data/vectorimages/fontsGlyph.qml
new file mode 100644
index 0000000000..b95d5027e3
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fontsGlyph.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 500
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "fonts-glyph*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fontsGlyphCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/fontsGlyphCurveRenderer.qml
new file mode 100644
index 0000000000..b7372ad98d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fontsGlyphCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 500
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "fonts-glyph*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fontsOther.qml b/tests/baseline/scenegraph/data/vectorimages/fontsOther.qml
new file mode 100644
index 0000000000..053a873c21
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fontsOther.qml
@@ -0,0 +1,35 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 650
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/fonts-desc-02-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/fonts-kern-01-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/fonts-overview-201-t.svg"
+ }
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/fontsOtherCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/fontsOtherCurveRenderer.qml
new file mode 100644
index 0000000000..5f438d24b2
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/fontsOtherCurveRenderer.qml
@@ -0,0 +1,35 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 650
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/fonts-desc-02-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/fonts-kern-01-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/fonts-overview-201-t.svg"
+ }
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/introCompat.qml b/tests/baseline/scenegraph/data/vectorimages/introCompat.qml
new file mode 100644
index 0000000000..1dce43a2d0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/introCompat.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 600
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "intro-compat*.svg"]
+ }
+
+ VectorImage {
+ width: 600
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/jpegRequired.qml b/tests/baseline/scenegraph/data/vectorimages/jpegRequired.qml
new file mode 100644
index 0000000000..67b064c20f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/jpegRequired.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle {
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "jpeg-required*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/jpegRequiredCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/jpegRequiredCurveRenderer.qml
new file mode 100644
index 0000000000..3f7a2455e0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/jpegRequiredCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle {
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "jpeg-required*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintColor.qml b/tests/baseline/scenegraph/data/vectorimages/paintColor.qml
new file mode 100644
index 0000000000..ad6aa3ac79
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintColor.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-color*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintColorCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/paintColorCurveRenderer.qml
new file mode 100644
index 0000000000..8b7459d33f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintColorCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-color*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintFill.qml b/tests/baseline/scenegraph/data/vectorimages/paintFill.qml
new file mode 100644
index 0000000000..06953d1ab6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintFill.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-fill*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintFillCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/paintFillCurveRenderer.qml
new file mode 100644
index 0000000000..26f3eb7f29
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintFillCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-fill*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintGrad.qml b/tests/baseline/scenegraph/data/vectorimages/paintGrad.qml
new file mode 100644
index 0000000000..1b70160464
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintGrad.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-grad*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintGradCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/paintGradCurveRenderer.qml
new file mode 100644
index 0000000000..70121f48e0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintGradCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-grad*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintStroke.qml b/tests/baseline/scenegraph/data/vectorimages/paintStroke.qml
new file mode 100644
index 0000000000..a34104809e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintStroke.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 500
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-stroke*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintStrokeCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/paintStrokeCurveRenderer.qml
new file mode 100644
index 0000000000..bbf8f25b5c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintStrokeCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 500
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-stroke*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintVfill.qml b/tests/baseline/scenegraph/data/vectorimages/paintVfill.qml
new file mode 100644
index 0000000000..bfc2077189
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintVfill.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-vfill*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/paintVfillCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/paintVfillCurveRenderer.qml
new file mode 100644
index 0000000000..057558625d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/paintVfillCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paint-vfill*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/pathsData.qml b/tests/baseline/scenegraph/data/vectorimages/pathsData.qml
new file mode 100644
index 0000000000..6b277bc62f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/pathsData.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paths-data*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/pathsDataCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/pathsDataCurveRenderer.qml
new file mode 100644
index 0000000000..2261e7d181
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/pathsDataCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "paths-data*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/renderElems.qml b/tests/baseline/scenegraph/data/vectorimages/renderElems.qml
new file mode 100644
index 0000000000..5ce8bab582
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/renderElems.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "render-elems*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/renderElemsCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/renderElemsCurveRenderer.qml
new file mode 100644
index 0000000000..747722848b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/renderElemsCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "render-elems*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/renderGroups.qml b/tests/baseline/scenegraph/data/vectorimages/renderGroups.qml
new file mode 100644
index 0000000000..08edc30469
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/renderGroups.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "render-groups*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/renderGroupsCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/renderGroupsCurveRenderer.qml
new file mode 100644
index 0000000000..25ca7c5d07
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/renderGroupsCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "render-groups*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesCircle.qml b/tests/baseline/scenegraph/data/vectorimages/shapesCircle.qml
new file mode 100644
index 0000000000..40be30c78e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesCircle.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-circle*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesCircleCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesCircleCurveRenderer.qml
new file mode 100644
index 0000000000..8db2edd22a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesCircleCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-circle*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesEllipse.qml b/tests/baseline/scenegraph/data/vectorimages/shapesEllipse.qml
new file mode 100644
index 0000000000..74a43349fa
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesEllipse.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-ellipse*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesEllipseCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesEllipseCurveRenderer.qml
new file mode 100644
index 0000000000..7b6433ab7a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesEllipseCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-ellipse*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesIntro.qml b/tests/baseline/scenegraph/data/vectorimages/shapesIntro.qml
new file mode 100644
index 0000000000..462d689c4c
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesIntro.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 300
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-intro*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesIntroCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesIntroCurveRenderer.qml
new file mode 100644
index 0000000000..d48f042625
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesIntroCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 300
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-intro*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesLine.qml b/tests/baseline/scenegraph/data/vectorimages/shapesLine.qml
new file mode 100644
index 0000000000..35da140e9e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesLine.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-line*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesLineCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesLineCurveRenderer.qml
new file mode 100644
index 0000000000..36a0ac6b4b
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesLineCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-line*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesPolygon.qml b/tests/baseline/scenegraph/data/vectorimages/shapesPolygon.qml
new file mode 100644
index 0000000000..5ad1877c78
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesPolygon.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-polygon*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesPolygonCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesPolygonCurveRenderer.qml
new file mode 100644
index 0000000000..147134915d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesPolygonCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-polygon*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesPolyline.qml b/tests/baseline/scenegraph/data/vectorimages/shapesPolyline.qml
new file mode 100644
index 0000000000..53aa112ce3
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesPolyline.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-polyline*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesPolylineCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesPolylineCurveRenderer.qml
new file mode 100644
index 0000000000..10989005be
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesPolylineCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-polyline*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesRect.qml b/tests/baseline/scenegraph/data/vectorimages/shapesRect.qml
new file mode 100644
index 0000000000..ff9c957461
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesRect.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-rect*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/shapesRectCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/shapesRectCurveRenderer.qml
new file mode 100644
index 0000000000..229fbe2080
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/shapesRectCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "shapes-rect*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structCommon.qml b/tests/baseline/scenegraph/data/vectorimages/structCommon.qml
new file mode 100644
index 0000000000..2f7cb2d125
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structCommon.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 300
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-common*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structCommonCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structCommonCurveRenderer.qml
new file mode 100644
index 0000000000..57b40a8a52
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structCommonCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 300
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-common*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structCond.qml b/tests/baseline/scenegraph/data/vectorimages/structCond.qml
new file mode 100644
index 0000000000..f8f4e19986
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structCond.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 480
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-cond*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structCondCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structCondCurveRenderer.qml
new file mode 100644
index 0000000000..9d22493ef4
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structCondCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 480
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-cond*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structDefs.qml b/tests/baseline/scenegraph/data/vectorimages/structDefs.qml
new file mode 100644
index 0000000000..9fe54d5886
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structDefs.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-defs*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structDefsCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structDefsCurveRenderer.qml
new file mode 100644
index 0000000000..85b1b0a1f2
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structDefsCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-defs*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structDiscard.qml b/tests/baseline/scenegraph/data/vectorimages/structDiscard.qml
new file mode 100644
index 0000000000..725cc8a7a5
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structDiscard.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-discard*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structDiscardCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structDiscardCurveRenderer.qml
new file mode 100644
index 0000000000..bbdbda6e15
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structDiscardCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-discard*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structFrag.qml b/tests/baseline/scenegraph/data/vectorimages/structFrag.qml
new file mode 100644
index 0000000000..cc2e809b49
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structFrag.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 480
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-frag*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structFragCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structFragCurveRenderer.qml
new file mode 100644
index 0000000000..89ad820dd0
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structFragCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 480
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-frag*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structGroup.qml b/tests/baseline/scenegraph/data/vectorimages/structGroup.qml
new file mode 100644
index 0000000000..28bf0fa0e5
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structGroup.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-group*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structGroupCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structGroupCurveRenderer.qml
new file mode 100644
index 0000000000..de358bcdfa
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structGroupCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 400
+ height: 600
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-group*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structSvg.qml b/tests/baseline/scenegraph/data/vectorimages/structSvg.qml
new file mode 100644
index 0000000000..923178bcdf
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structSvg.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-svg*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structSvgCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structSvgCurveRenderer.qml
new file mode 100644
index 0000000000..66a4f19e38
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structSvgCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-svg*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structUse.qml b/tests/baseline/scenegraph/data/vectorimages/structUse.qml
new file mode 100644
index 0000000000..33f8bcbe9f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structUse.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-use*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/structUseCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/structUseCurveRenderer.qml
new file mode 100644
index 0000000000..820d8e8b8f
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/structUseCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 600
+
+ Grid {
+ columns: 4
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "struct-use*.svg"]
+ }
+
+ VectorImage {
+ width: 200
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/styling.qml b/tests/baseline/scenegraph/data/vectorimages/styling.qml
new file mode 100644
index 0000000000..c01a7fe4c7
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/styling.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 300
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "styling*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/stylingCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/stylingCurveRenderer.qml
new file mode 100644
index 0000000000..39f1162fc5
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/stylingCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 300
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "styling*.svg"]
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textAlign.qml b/tests/baseline/scenegraph/data/vectorimages/textAlign.qml
new file mode 100644
index 0000000000..13cec970e3
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textAlign.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-align*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textAlignCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/textAlignCurveRenderer.qml
new file mode 100644
index 0000000000..e9c23aabef
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textAlignCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-align*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textArea.qml b/tests/baseline/scenegraph/data/vectorimages/textArea.qml
new file mode 100644
index 0000000000..a2c8304877
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textArea.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-area*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textAreaCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/textAreaCurveRenderer.qml
new file mode 100644
index 0000000000..491d90b1ca
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textAreaCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 3
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-area*.svg"]
+ }
+
+ VectorImage {
+ width: 266
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textIntro.qml b/tests/baseline/scenegraph/data/vectorimages/textIntro.qml
new file mode 100644
index 0000000000..2c9d2cc813
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textIntro.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-intro*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textIntroCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/textIntroCurveRenderer.qml
new file mode 100644
index 0000000000..d667345f18
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textIntroCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-intro*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textOther.qml b/tests/baseline/scenegraph/data/vectorimages/textOther.qml
new file mode 100644
index 0000000000..f74c14c72a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textOther.qml
@@ -0,0 +1,32 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 300
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/text-tselect-03-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/text-edit-201-t.svg"
+ }
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textOtherCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/textOtherCurveRenderer.qml
new file mode 100644
index 0000000000..9bf5ba219d
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textOtherCurveRenderer.qml
@@ -0,0 +1,32 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 300
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: ListModel {
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/text-tselect-03-t.svg"
+ }
+ ListElement {
+ fileUrl: "../shared/svg_12_testsuite/text-edit-201-t.svg"
+ }
+ }
+
+ VectorImage {
+ width: 400
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textStroke.qml b/tests/baseline/scenegraph/data/vectorimages/textStroke.qml
new file mode 100644
index 0000000000..3cf3be041e
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textStroke.qml
@@ -0,0 +1,6 @@
+import QtQuick
+import QtQuick.VectorImage
+
+VectorImage {
+ source: "../shared/svg/text_stroking.svg"
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textText.qml b/tests/baseline/scenegraph/data/vectorimages/textText.qml
new file mode 100644
index 0000000000..cd2a46f9af
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textText.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-text*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textTextCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/textTextCurveRenderer.qml
new file mode 100644
index 0000000000..7cab1ea4f1
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textTextCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 800
+ height: 800
+
+ Grid {
+ columns: 2
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-text*.svg"]
+ }
+
+ VectorImage {
+ width: 350
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textWs.qml b/tests/baseline/scenegraph/data/vectorimages/textWs.qml
new file mode 100644
index 0000000000..b67cf6060a
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textWs.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 500
+ height: 800
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-ws*.svg"]
+ }
+
+ VectorImage {
+ width: 500
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.GeometryRenderer
+ }
+ }
+ }
+}
diff --git a/tests/baseline/scenegraph/data/vectorimages/textWsCurveRenderer.qml b/tests/baseline/scenegraph/data/vectorimages/textWsCurveRenderer.qml
new file mode 100644
index 0000000000..1165d38fc6
--- /dev/null
+++ b/tests/baseline/scenegraph/data/vectorimages/textWsCurveRenderer.qml
@@ -0,0 +1,28 @@
+import QtQuick
+import QtQuick.VectorImage
+import Qt.labs.folderlistmodel
+
+Rectangle{
+ id: topLevelItem
+ width: 500
+ height: 800
+
+ Grid {
+ columns: 1
+ anchors.fill: parent
+ Repeater {
+ model: FolderListModel {
+ folder: Qt.resolvedUrl("../shared/svg_12_testsuite/")
+ nameFilters: [ "text-ws*.svg"]
+ }
+
+ VectorImage {
+ width: 500
+ height: implicitHeight * width / implicitWidth
+ source: fileUrl
+ clip: true
+ preferredRendererType: VectorImage.CurveRenderer
+ }
+ }
+ }
+}
diff --git a/tests/manual/painterpathquickshape/ControlPanel.qml b/tests/manual/painterpathquickshape/ControlPanel.qml
index 87eb9ae3e7..ea3168d124 100644
--- a/tests/manual/painterpathquickshape/ControlPanel.qml
+++ b/tests/manual/painterpathquickshape/ControlPanel.qml
@@ -28,6 +28,7 @@ Item {
property alias painterComparisonAlpha: painterComparisonColorAlpha.value
property alias outlineEnabled: enableOutline.checked
property alias gradientType: gradientType.currentIndex
+ property alias fillScaleX: fillTransformSlider.value
property alias rendererName: rendererLabel.text
property alias preferCurve: rendererLabel.preferCurve
@@ -254,6 +255,19 @@ Item {
}
}
Label {
+ text: "Fill transform (scale x: " + fillTransformSlider.value.toFixed(2) + "):"
+ color: "white"
+ visible: gradientType.currentIndex != 0
+ }
+ Slider {
+ id: fillTransformSlider
+ Layout.fillWidth: true
+ from: 0.2
+ to: 5.0
+ value: 1.0
+ visible: gradientType.currentIndex != 0
+ }
+ Label {
text: "Fill alpha(" + Math.round(alphaSlider.value*100)/100 + "):"
color: "white"
}
diff --git a/tests/manual/painterpathquickshape/ControlledShape.qml b/tests/manual/painterpathquickshape/ControlledShape.qml
index e690f59ccc..26a57163cd 100644
--- a/tests/manual/painterpathquickshape/ControlledShape.qml
+++ b/tests/manual/painterpathquickshape/ControlledShape.qml
@@ -89,6 +89,7 @@ Item {
strokeStyle: controlPanel.outlineStyle
joinStyle: controlPanel.joinStyle
capStyle: controlPanel.capStyle
+ fillTransform: Qt.matrix4x4(controlPanel.fillScaleX,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)
}
Repeater {
diff --git a/tests/manual/platforms/android/qml_in_android_service/.gitignore b/tests/manual/platforms/android/qml_in_android_service/.gitignore
new file mode 100644
index 0000000000..2300a2df35
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_android_service/.gitignore
@@ -0,0 +1,2 @@
+build/*
+CMakeLists.txt.user
diff --git a/tests/manual/platforms/android/qml_in_android_service/CMakeLists.txt b/tests/manual/platforms/android/qml_in_android_service/CMakeLists.txt
new file mode 100644
index 0000000000..47afd4c0c3
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_android_service/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+cmake_minimum_required(VERSION 3.16)
+
+project(qml_in_android_service VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+find_package(Qt6 6.7 REQUIRED COMPONENTS Quick)
+
+qt_standard_project_setup(REQUIRES 6.6)
+
+
+qt_add_executable(qml_in_android_service
+ main.cpp
+)
+
+qt_add_qml_module(qml_in_android_service
+ URI qml_in_android_service
+ VERSION 1.0
+ QML_FILES Main.qml
+)
+
+target_link_libraries(qml_in_android_service
+ PRIVATE Qt6::Quick
+)
+
+install(TARGETS qml_in_android_service
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
diff --git a/tests/manual/platforms/android/qml_in_android_service/Main.qml b/tests/manual/platforms/android/qml_in_android_service/Main.qml
new file mode 100644
index 0000000000..6b8684e525
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_android_service/Main.qml
@@ -0,0 +1,100 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import QtQuick.Controls
+
+Rectangle {
+ id: mainRectangle
+
+ property string colorStringFormat: "#1CB669"
+
+ signal onClicked()
+
+ color: colorStringFormat
+
+ Text {
+ id: helloText
+
+ text: "QML"
+ color: "white"
+ font.pixelSize: 72
+ font.bold: true
+ fontSizeMode: Text.VerticalFit
+ horizontalAlignment: Text.AlignHCenter
+
+ // Height is calculated based on display orientation
+ // from Screen height, dividing numbers are based on what what seem
+ // to look good on most displays
+ height: Screen.width > Screen.height ? Screen.height / 8 : (Screen.height / 2) / 8
+
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ top: parent.top
+ topMargin: 5
+ }
+ }
+
+
+ Text {
+ id: changeColorText
+
+ text: "Tap button to change Java view background color"
+ color: "white"
+ font.pixelSize: 58
+ fontSizeMode: Text.Fit
+ wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
+
+ // Height and width are calculated based on display orientation
+ // from Screen height and width, dividing numbers are based on what seem to
+ // look good on most displays
+ height: Screen.width > Screen.height ? Screen.height / 8 : (Screen.height / 2) / 8
+ width: Screen.width > Screen.height ? (Screen.width / 2) / 2 : Screen.width / 2
+
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ top: helloText.bottom
+ topMargin: Screen.height / 10
+ }
+ }
+
+ Button {
+ id: button
+ // Width is calculated from changeColorText which is calculated from Screen size
+ // dividing numbers are base on what seems to look good on most displays
+ width: changeColorText.width / 1.6
+ height: changeColorText.height * 1.2
+
+ anchors {
+
+ horizontalCenter: parent.horizontalCenter
+ top: changeColorText.bottom
+ topMargin: height / 5
+ }
+
+ onClicked: mainRectangle.onClicked()
+
+ background: Rectangle {
+ id: buttonBackground
+
+ radius: 14
+ color: "#6200EE"
+ opacity: button.down ? 0.6 : 1
+ scale: button.down ? 0.9 : 1
+ }
+
+ contentItem: Text {
+ id: buttonText
+
+ text: "CHANGE COLOR"
+ color: "white"
+ font.pixelSize: 58
+ minimumPixelSize: 10
+ fontSizeMode: Text.Fit
+ font.bold: true
+ wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+ }
+}
diff --git a/tests/manual/platforms/android/qml_in_android_service/main.cpp b/tests/manual/platforms/android/qml_in_android_service/main.cpp
new file mode 100644
index 0000000000..3293373061
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_android_service/main.cpp
@@ -0,0 +1,10 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include <QGuiApplication>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ return app.exec();
+}
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/.gitignore b/tests/manual/platforms/android/qml_in_java_based_android_project/.gitignore
new file mode 100644
index 0000000000..347e252ef1
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/.gitignore
@@ -0,0 +1,33 @@
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Log/OS Files
+*.log
+
+# Android Studio generated files and folders
+captures/
+.externalNativeBuild/
+.cxx/
+*.apk
+output.json
+
+# IntelliJ
+*.iml
+.idea/
+misc.xml
+deploymentTargetDropDown.xml
+render.experimental.xml
+
+# Keystore files
+*.jks
+*.keystore
+
+# Google Services (e.g. APIs or Firebase)
+google-services.json
+
+# Android Profiling
+*.hprof
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/README.md b/tests/manual/platforms/android/qml_in_java_based_android_project/README.md
new file mode 100644
index 0000000000..5199430bc8
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/README.md
@@ -0,0 +1,35 @@
+# What is this?
+
+This project is for manual testing of embedding QML into Android Services. It
+loads a QML view and a regular Android view side by side, both hosted by a
+Service, and wires them together.
+
+This application is meant to be built using Android Studio, with the Qt Gradle
+plugin. There is no need to manually build the Qt project or edit it, only this
+Android project.
+
+# How to sign the application
+In order to sign the application, you must have a keystore file and list it in
+a 'keystore.properties' file in the project root.
+
+1) Create 'keystore.properties' file in the same folder as this README
+2) Add the following information to the file:
+ ```
+ storePassword=somePassword
+ keyPassword=someOtherPassword
+ keyAlias=someKeyAlias
+ storeFile=/full/path/to/your/keystore.keystore
+ ```
+
+After this, the app build.gradle will read that file and extract the required
+information from it, and use that to sign the app before it is deployed.
+
+# How to configure QtBuild Gradle plugin
+The app-level build.gradle already includes and configures the plugin, but it requires some information about the environment it's running in: The Qt installation directory, and the Qt for Android kit directory.
+
+1) Create 'qtbuild.properties' file in the same folder as this README
+2) Add the following information to the file:
+ ```
+ qtKitDir=/path/to/your/android/kit/
+ qtPath=/path/to/your/Qt/installation // e.g. /etc/Qt/
+ ```
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/build.gradle b/tests/manual/platforms/android/qml_in_java_based_android_project/app/build.gradle
new file mode 100644
index 0000000000..3aa396c87a
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/build.gradle
@@ -0,0 +1,83 @@
+plugins {
+ id 'com.android.application'
+ id 'org.qtproject.qt.gradleplugin' version '0.1-SNAPSHOT+'
+}
+
+def qtBuildPropertiesFile = rootProject.file('qtbuild.properties');
+def qtBuildProperties = new Properties();
+qtBuildProperties.load(new FileInputStream(qtBuildPropertiesFile));
+QtBuild {
+ projectPath file('../../qml_in_android_service')
+ qtKitDir file(qtBuildProperties['qtKitDir'])
+ qtPath file(qtBuildProperties['qtPath'])
+}
+
+def keystorePropertiesFile = rootProject.file('keystore.properties');
+def keystoreProperties = new Properties();
+keystoreProperties.load(new FileInputStream(keystorePropertiesFile));
+
+android {
+ signingConfigs {
+ debug {
+ storeFile file(keystoreProperties['storeFile'])
+ storePassword keystoreProperties['storePassword']
+ keyAlias keystoreProperties['keyAlias']
+ keyPassword keystoreProperties['keyPassword']
+ }
+ }
+ namespace 'com.example.qml_in_java_based_android_project'
+ compileSdk 34
+
+ defaultConfig {
+ applicationId "com.example.qml_in_java_based_android_project"
+ minSdk 28
+ targetSdk 34
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ signingConfig signingConfigs.debug
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ signingConfig signingConfigs.debug
+ }
+ debug {
+ signingConfig signingConfigs.debug
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ packagingOptions {
+ jniLibs {
+ useLegacyPackaging true
+ }
+ }
+ sourceSets {
+ main {
+ assets {
+ srcDirs 'assets'
+ }
+ jniLibs {
+ srcDirs 'libs'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation 'androidx.appcompat:appcompat:1.6.1'
+ implementation 'com.google.android.material:material:1.9.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+ implementation "org.qtproject.qt.gradleplugin:QtGradlePlugin:0.1-SNAPSHOT"
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+}
+
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/AndroidManifest.xml b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..896b975a0b
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/AndroidManifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
+
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
+
+ <application
+ android:allowBackup="true"
+ android:dataExtractionRules="@xml/data_extraction_rules"
+ android:fullBackupContent="@xml/backup_rules"
+ android:label="@string/app_name"
+ android:supportsRtl="true"
+ tools:targetApi="34"
+ android:theme="@style/Theme.AppCompat">
+ <service
+ android:name=".QmlService"
+ android:enabled="true"
+ android:exported="true"/>
+
+ <activity
+ android:name=".MainActivity"
+ android:configChanges="orientation|screenLayout|screenSize"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/MainActivity.java b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/MainActivity.java
new file mode 100644
index 0000000000..c619dce985
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/MainActivity.java
@@ -0,0 +1,20 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+package com.example.qml_in_java_based_android_project;
+
+import androidx.appcompat.app.AppCompatActivity;
+import android.content.Intent;
+import android.os.Bundle;
+
+public class MainActivity extends AppCompatActivity
+{
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.view_main);
+ startService(new Intent(this, QmlService.class));
+ finish();
+ }
+}
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/QmlService.java b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/QmlService.java
new file mode 100644
index 0000000000..0c9de067e6
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/java/com/example/qml_in_java_based_android_project/QmlService.java
@@ -0,0 +1,204 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+package com.example.qml_in_java_based_android_project;
+
+import android.annotation.SuppressLint;
+import android.app.Service;
+import android.content.Intent;
+import android.graphics.Color;
+import android.graphics.PixelFormat;
+import android.os.IBinder;
+import android.util.Size;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.view.Gravity;
+
+import android.widget.Button;
+import android.widget.Switch;
+import android.widget.TextView;
+
+import java.util.Random;
+import java.util.function.Consumer;
+
+import org.qtproject.qt.android.QtQuickView;
+import org.qtproject.qt.android.QtQmlStatus;
+import org.qtproject.qt.android.QtQmlStatusChangeListener;
+import org.qtproject.example.qml_in_android_service.Qml_in_android_service.Main;
+
+@SuppressLint("UseSwitchCompatOrMaterialCode")
+public class QmlService extends Service implements QtQmlStatusChangeListener
+{
+ private static final String TAG = "QmlService";
+ private WindowManager m_windowManager;
+ private QtQuickView m_serviceView;
+ private final Main m_serviceViewComponent = new Main();
+ private View m_mainView;
+
+ private TextView m_qmlBackgroundColorTextView;
+ private TextView m_qmlStatusTextView;
+ private View m_colorBox;
+ private Switch m_connectionSwitch;
+ private int m_qmlSignalListenerId;
+
+ @Override
+ public IBinder onBind(Intent intent)
+ {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void onCreate()
+ {
+ m_windowManager = getSystemService(WindowManager.class);
+
+ getScreenSize((size) -> {
+ // Get the available geometry, and split it between the Android and QML UIs
+ m_serviceView = addQuickView(new Size(size.getWidth() / 2, size.getHeight()));
+ m_serviceViewComponent.setStatusChangeListener(this);
+ m_serviceView.loadComponent(m_serviceViewComponent);
+
+ m_mainView = addMainView(new Size(size.getWidth() / 2, size.getHeight()));
+ connectToNativeControls(m_mainView);
+ });
+ }
+
+ /*
+ Draw the "main" view on the left side of the screen, with the native controls
+ */
+ private View addMainView(final Size size)
+ {
+ final LayoutInflater inflater = getSystemService(LayoutInflater.class);
+
+ final WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(
+ size.getWidth(), size.getHeight(),
+ WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
+ WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ & ~WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
+ PixelFormat.TRANSLUCENT);
+ layoutParams.gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL;
+
+ View mainView = inflater.inflate(R.layout.view_main, null);
+ m_windowManager.addView(mainView, layoutParams);
+ return mainView;
+ }
+
+ /*
+ Take size, and draw QtQuickView of that size on the right side of the screen
+ */
+ private QtQuickView addQuickView(final Size size)
+ {
+ WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(
+ size.getWidth(), size.getHeight(),
+ WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
+ WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ & ~WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
+ PixelFormat.TRANSLUCENT);
+ layoutParams.gravity = Gravity.RIGHT | Gravity.CENTER_VERTICAL;
+
+ QtQuickView serviceView = new QtQuickView(this);
+ m_windowManager.addView(serviceView, layoutParams);
+ return serviceView;
+ }
+
+ /*
+ Draw empty View that fills the parent (screen in this case) to discover the available size,
+ report to consumer
+ */
+ private void getScreenSize(final Consumer<Size> screenSizeConsumer)
+ {
+ final WindowManager.LayoutParams params = new WindowManager.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT,
+ WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
+ WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ & ~WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
+ PixelFormat.TRANSLUCENT);
+ final View view = new View(this) {
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom)
+ {
+ m_windowManager.removeView(this);
+ screenSizeConsumer.accept(new Size(right - left, bottom - top));
+ }
+ };
+ m_windowManager.addView(view, params);
+ }
+
+ @Override
+ public void onDestroy()
+ {
+ if (m_windowManager != null) {
+ if (m_serviceView != null) {
+ m_windowManager.removeView(m_serviceView);
+ m_serviceView = null;
+ }
+ if (m_mainView != null) {
+ m_windowManager.removeView(m_mainView);
+ m_mainView = null;
+ }
+ }
+ }
+
+ /*
+ Connect listeners to the native controls
+ */
+ private void connectToNativeControls(final View mainView)
+ {
+ m_qmlBackgroundColorTextView = mainView.findViewById(R.id.qmlBackgroundColorText);
+ m_qmlStatusTextView = mainView.findViewById(R.id.qmlStatus);
+ m_colorBox = mainView.findViewById(R.id.box);
+
+ m_connectionSwitch = mainView.findViewById(R.id.switch1);
+ m_connectionSwitch.setOnCheckedChangeListener(
+ (buttonView, isChecked) -> connectSwitchListener(isChecked));
+
+ final Button changeColorButton = mainView.findViewById(R.id.button);
+ changeColorButton.setOnClickListener(this::onChangeColorButtonListener);
+ }
+
+ public void onChangeColorButtonListener(View view)
+ {
+ m_serviceViewComponent.setColorStringFormat(getRandomColorString());
+
+ final String qmlColor = m_serviceView.getProperty("colorStringFormat");
+ m_qmlBackgroundColorTextView.setText(qmlColor);
+ m_colorBox.setBackgroundColor(Color.parseColor(qmlColor));
+ }
+
+ @Override
+ public void onStatusChanged(QtQmlStatus status)
+ {
+ m_qmlStatusTextView.setText(
+ String.format("%s %s", getResources().getString(R.string.qml_view_status), status));
+ // Once QML is loaded and the signal listener switch is not checked,
+ // connect to onClicked() signal in main.qml
+ if (status == QtQmlStatus.READY && m_connectionSwitch.isChecked())
+ connectSwitchListener(m_connectionSwitch.isChecked());
+ }
+
+ private void connectSwitchListener(boolean checked)
+ {
+ if (checked) {
+ m_qmlSignalListenerId = m_serviceView.connectSignalListener(
+ "onClicked", Object.class, this::onQmlChangeColorButtonClicked);
+ } else {
+ m_serviceView.disconnectSignalListener(m_qmlSignalListenerId);
+ }
+ }
+
+ public void onQmlChangeColorButtonClicked(String signal, Object o)
+ {
+ m_mainView.setBackgroundColor(Color.parseColor(getRandomColorString()));
+ }
+
+ private String getRandomColorString()
+ {
+ Random rand = new Random();
+ return String.format("#%06x", rand.nextInt(0xffffff + 1));
+ }
+}
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/layout/view_main.xml b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/layout/view_main.xml
new file mode 100644
index 0000000000..65b6b3fe6c
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/layout/view_main.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/mainLinear"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:baselineAligned="false"
+ android:background="#AF93DF">
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="8dp"
+ android:gravity="center_horizontal"
+ android:includeFontPadding="false"
+ android:text="@string/java"
+ android:textColor="#FFFFFF"
+ android:textSize="24sp"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/qmlStatus"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="16dp"
+ android:gravity="center_horizontal"
+ android:text="@string/qml_view_status"
+ android:textColor="#FFFFFF"/>
+
+ <LinearLayout
+ android:id="@+id/buttonAndSwitchLayout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:orientation="horizontal"
+ android:layout_marginTop="16dp">
+
+ <LinearLayout
+ android:id="@+id/buttonLinearLayout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_weight="1">
+
+ <TextView
+ android:id="@+id/changeColorText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:maxLines="3"
+ android:text="@string/change_qml_background"
+ android:textColor="#FFFFFF" />
+
+ <Button
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="8dp"
+ android:text="@string/button"
+ android:textSize="14sp" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/switchLinearLayout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_weight="1">
+
+ <TextView
+ android:id="@+id/switchText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:maxLines="3"
+ android:text="@string/connect_qml_button_signal_listener"
+ android:textColor="#FFFFFF" />
+
+ <Switch
+ android:id="@+id/switch1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:textOff="@string/off"
+ android:textOn="@string/on"
+ android:showText="true"
+ android:checked="true"
+ tools:ignore="UseSwitchCompatOrMaterialXml" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/qmlColorLinear"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="10dp">
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_weight="1">
+
+ <TextView
+ android:id="@+id/qmlViewBackgroundText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:maxLines="2"
+ android:text="@string/qml_view_background_color"
+ android:textColor="#FFFFFF" />
+
+ <TextView
+ android:id="@+id/qmlBackgroundColorText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:textColor="#FFFFFF" />
+ </LinearLayout>
+
+ <View
+ android:id="@+id/box"
+ android:layout_width="100dp"
+ android:layout_height="50dp"
+ android:layout_gravity="center_horizontal"
+ android:background="@android:color/transparent"
+ android:layout_weight="0"/>
+ </LinearLayout>
+</LinearLayout>
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/values/strings.xml b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000000..39d33f40c9
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/values/strings.xml
@@ -0,0 +1,12 @@
+<resources>
+ <string name="app_name">qml_in_java_based_android_project</string>
+ <string name="button">Change color</string>
+ <string name="java">Java</string>
+ <string name="change_qml_background">Tap button to change QML view background color</string>
+ <string name="connect_qml_button_signal_listener">QML Button listener connected</string>
+ <string name="on">On</string>
+ <string name="off">Off</string>
+ <string name="qml_view_status">QML view status: </string>
+ <string name="qml_view_background_color">QML view background color:</string>
+</resources>
+
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/backup_rules.xml b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000000..04dd1acfe3
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Sample backup rules file; uncomment and customize as necessary.
+ See https://developer.android.com/guide/topics/data/autobackup
+ for details.
+ Note: This file is ignored for devices older that API 31
+ See https://developer.android.com/about/versions/12/backup-restore
+-->
+<full-backup-content>
+</full-backup-content>
+
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/data_extraction_rules.xml b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000000..9840b57766
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Sample data extraction rules file; uncomment and customize as necessary.
+ See https://developer.android.com/about/versions/12/backup-restore#xml-changes
+ for details.
+-->
+<data-extraction-rules>
+ <cloud-backup>
+ </cloud-backup>
+</data-extraction-rules>
+
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/build.gradle b/tests/manual/platforms/android/qml_in_java_based_android_project/build.gradle
new file mode 100644
index 0000000000..b92d690313
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/build.gradle
@@ -0,0 +1,4 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+id 'com.android.application' version '7.4.1' apply false
+}
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/gradle.properties b/tests/manual/platforms/android/qml_in_java_based_android_project/gradle.properties
new file mode 100644
index 0000000000..dacb776f4a
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/gradle.properties
@@ -0,0 +1,22 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
+
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/gradle/wrapper/gradle-wrapper.properties b/tests/manual/platforms/android/qml_in_java_based_android_project/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..62f495dfed
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/tests/manual/platforms/android/qml_in_java_based_android_project/settings.gradle b/tests/manual/platforms/android/qml_in_java_based_android_project/settings.gradle
new file mode 100644
index 0000000000..8a59ffb868
--- /dev/null
+++ b/tests/manual/platforms/android/qml_in_java_based_android_project/settings.gradle
@@ -0,0 +1,23 @@
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ maven {
+ url "https://android.qt.io/maven/snapshots"
+ }
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ maven {
+ url "https://android.qt.io/maven/snapshots"
+ }
+ }
+}
+
+rootProject.name = "qml_in_java_based_android_project"
+include ':app'
diff --git a/tests/manual/quickcontrols/CMakeLists.txt b/tests/manual/quickcontrols/CMakeLists.txt
index e7f07e6110..fa3bf67e9d 100644
--- a/tests/manual/quickcontrols/CMakeLists.txt
+++ b/tests/manual/quickcontrols/CMakeLists.txt
@@ -10,6 +10,7 @@ if(LINUX)
endif()
add_subdirectory(headerview)
add_subdirectory(imagine/musicplayer)
+add_subdirectory(menus)
add_subdirectory(qquickdialog)
add_subdirectory(screenshots)
add_subdirectory(sidepanel)
diff --git a/tests/manual/quickcontrols/menus/CMakeLists.txt b/tests/manual/quickcontrols/menus/CMakeLists.txt
new file mode 100644
index 0000000000..ce757613a1
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(menus VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Quick QuickControls2)
+
+qt_standard_project_setup(REQUIRES 6.8)
+
+qt_add_executable(appmenus
+ main.cpp
+)
+
+qt_add_qml_module(appmenus
+ URI Menus
+ VERSION 1.0
+ QML_FILES
+ Main.qml
+ SOURCES
+ cppsettings.cpp
+ cppsettings.h
+ main.cpp
+ RESOURCES
+ icons/warning.png
+ icons/warning@2x.png
+)
+
+# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
+# If you are developing for iOS or macOS you should consider setting an
+# explicit, fixed bundle identifier manually though.
+set_target_properties(appmenus PROPERTIES
+# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appmenus
+ MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ MACOSX_BUNDLE TRUE
+ WIN32_EXECUTABLE TRUE
+)
+
+target_link_libraries(appmenus
+ PRIVATE
+ Qt6::Quick
+ Qt6::QuickControls2
+)
diff --git a/tests/manual/quickcontrols/menus/Main.qml b/tests/manual/quickcontrols/menus/Main.qml
new file mode 100644
index 0000000000..a75f2afd6c
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/Main.qml
@@ -0,0 +1,453 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtCore
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtQuick.Dialogs
+
+ApplicationWindow {
+ id: window
+ width: 800
+ height: 600
+ visible: true
+ title: qsTr("Menus - style: %1").arg(currentStyle)
+
+ required property string currentStyle
+
+ Shortcut {
+ sequence: "Ctrl+Q"
+ onActivated: Qt.quit()
+ }
+
+ Settings {
+ id: settings
+
+ property alias windowX: window.x
+ property alias windowY: window.y
+ }
+
+ menuBar: MenuBar {
+ visible: menuBarVisibleSwitch.checked
+
+ Menu {
+ id: fileMenu
+ objectName: "file"
+ title: qsTr("&File")
+ popupType: popupTypeCombo.currentIndex
+ ContextAction { text: qsTr("&New...") }
+ ContextMenuItem { text: "menuItem" }
+ ContextAction { text: qsTr("&Open...") }
+ ContextAction { text: qsTr("&Save") }
+ ContextAction { text: qsTr("Save &As...") }
+ Menu {
+ title: qsTr("Sub...")
+ ContextAction { text: qsTr("Sub action 1") }
+ ContextAction { text: qsTr("Sub action 2") }
+ }
+ MenuSeparator { }
+ ContextAction {
+ text: qsTr("&Quit")
+ // This is needed for macOS since it takes priority over the Shortcut.
+ onTriggered: Qt.quit()
+ }
+ Action {
+ text: qsTr("Remove menu")
+ onTriggered: menuBar.removeMenu(fileMenu)
+ }
+ }
+ Menu {
+ id: editMenu
+ objectName: "edit"
+ title: qsTr("&Edit")
+ popupType: popupTypeCombo.currentIndex
+ ContextAction {
+ id: cutAction
+ text: qsTr("Cut")
+ enabled: textArea.selectedText.length > 0
+ }
+ ContextAction {
+ text: qsTr("Copy")
+ enabled: textArea.selectedText.length > 0
+ }
+ ContextAction {
+ text: qsTr("Paste")
+ enabled: textArea.activeFocus
+ }
+
+ MenuSeparator {}
+
+ Action {
+ text: qsTr("Checkable menu")
+ checkable: true
+ checked: true
+ }
+ Action {
+ text: qsTr("Remove menu")
+ onTriggered: menuBar.removeMenu(editMenu)
+ }
+ Menu {
+ id: editSubMenu
+ title: qsTr("Find / Replace")
+ Action { text: qsTr("&Find") }
+ }
+
+ MenuSeparator {}
+
+ ContextAction {
+ text: qsTr("Dummy Action")
+ shortcut: "Ctrl+I"
+ }
+ }
+ MenuBarItem {
+ id: explicitMenuBarItem
+ menu: Menu {
+ id: menuBarItemMenu
+ objectName: "MenuBarItem"
+ title: "MenuBarItem"
+ popupType: popupTypeCombo.currentIndex
+ ContextAction { text: qsTr("Action") }
+ Action {
+ text: qsTr("Remove menu")
+ onTriggered: menuBar.removeMenu(menuBarItemMenu)
+ }
+ }
+ }
+ }
+
+ Component {
+ id: extraMenuComp
+ Menu {
+ id: extraMenu
+ objectName: "Extra"
+ title: qsTr("&Extra")
+ ContextAction { text: qsTr("&Trigger") }
+ Action {
+ text: qsTr("Remove Extra menu")
+ onTriggered: menuBar.removeMenu(extraMenu)
+ }
+ }
+ }
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ Label {
+ text: qsTr("Right click on the window background to open a context menu. "
+ + "Right click on the TextArea to access its edit context menu.\n\n"
+ + "Things to check:\n\n"
+ + "- Do the menu items trigger their actions (check console for output)?\n"
+ + "- Do checkable menu items work?\n"
+ + "- Do the Edit menu items (in the MenuBar menu and edit context menu)"
+ + " work as expected with the TextArea?\n"
+ + " - Are they enabled/disabled as expected?\n"
+ + " - Does the TextArea keep focus after interacting with the Edit menu items?\n"
+ + "- Does adding and removing menu items work?\n"
+ + "- Do the menus in the MenuBar work?\n"
+ + "- Can you add and remove menus from the MenuBar?\n"
+ + "- Do shortcuts work?")
+ verticalAlignment: Text.AlignVCenter
+ wrapMode: Text.Wrap
+
+ Layout.alignment: Qt.AlignHCenter
+ Layout.preferredWidth: window.width * 0.5
+ Layout.fillHeight: true
+ }
+
+ GroupBox {
+ title: qsTr("Context menu")
+
+ Layout.fillWidth: true
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ RowLayout {
+ Label {
+ text: qsTr("Popup type")
+ }
+
+ ComboBox {
+ id: popupTypeCombo
+ model: ["Default", "Item", "Window", "Native"]
+ onCurrentIndexChanged: CppSettings.popupType = currentIndex
+ currentIndex: CppSettings.popupType
+ }
+ }
+
+ Row {
+ Button {
+ text: qsTr("Add action")
+ onClicked: backgroundContextMenu.appendAction()
+ }
+ Button {
+ text: qsTr("Remove action")
+ onClicked: backgroundContextMenu.removeLastAction()
+ }
+
+ Button {
+ text: qsTr("Add sub-menu action")
+ onClicked: subMenu.appendAction()
+ }
+ Button {
+ text: qsTr("Remove sub-menu action")
+ onClicked: subMenu.removeLastAction()
+ }
+ }
+ }
+ }
+
+ TextArea {
+ id: textArea
+ text: qsTr("Dummy TextArea to test disabled menu items")
+
+ Layout.fillWidth: true
+ Layout.minimumHeight: 100
+
+ TapHandler {
+ objectName: "textAreaMouseTapHandler"
+ acceptedButtons: Qt.RightButton
+ onPressedChanged: if (pressed) editContextMenu.popup()
+ }
+ TapHandler {
+ objectName: "textAreaTouchTapHandler"
+ acceptedDevices: PointerDevice.TouchScreen
+ onLongPressed: editContextMenu.popup()
+ }
+ }
+
+ Component {
+ id: menuBarItemComp
+ MenuBarItem {
+ }
+ }
+
+ MessageDialog {
+ id: restartNeededDialog
+ buttons: MessageDialog.Ok
+ text: "Your current changes requires a restart to take effect!"
+ }
+
+ GroupBox {
+ title: qsTr("MenuBar")
+
+ Layout.fillWidth: true
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ Row {
+ Switch {
+ text: qsTr("Don't use native menu bar")
+ checked: CppSettings.dontUseNativeMenuBar
+
+ onClicked: {
+ CppSettings.dontUseNativeMenuBar = checked
+ restartNeededDialog.open()
+ }
+ }
+ Switch {
+ id: menuBarVisibleSwitch
+ text: qsTr("MenuBar visible")
+ checked: true
+ }
+ }
+ Row {
+ Button {
+ text: "Append menu"
+ onClicked: {
+ let menu = extraMenuComp.createObject(menuBar, { title: "Extra " + menuBar.count })
+ menuBar.addMenu(menu)
+ }
+ }
+ Button {
+ text: "Prepend menu"
+ onClicked: {
+ let menu = extraMenuComp.createObject(menuBar, { title: "Extra " + menuBar.count })
+ menuBar.insertMenu(0, menu)
+ }
+ }
+ Button {
+ text: qsTr("Add file menu")
+ onClicked: menuBar.addMenu(fileMenu)
+ }
+ Button {
+ text: "Change labels"
+ onClicked: {
+ fileMenu.title = "File changed"
+ cutAction.text = "Cut changed"
+ }
+ }
+ Button {
+ text: "toggle delegate"
+ onClicked: menuBar.delegate = menuBar.delegate ? null : menuBarItemComp
+ }
+ Switch {
+ text: "MenuBarItem visible"
+ checked: true
+ onCheckedChanged: explicitMenuBarItem.visible = checked
+ }
+ }
+ }
+ }
+ }
+
+ TapHandler {
+ objectName: "backgroundMouseTapHandler"
+ acceptedButtons: Qt.RightButton
+ onPressedChanged: if (pressed) backgroundContextMenu.popup()
+ }
+ TapHandler {
+ objectName: "backgroundTouchTapHandler"
+ acceptedDevices: PointerDevice.TouchScreen
+ onLongPressed: backgroundContextMenu.popup()
+ }
+
+ Component {
+ id: actionComponent
+
+ Action {}
+ }
+
+ component ContextAction: Action {
+ onCheckedChanged: (checked) => print("checked of \"" + text + "\" changed to " + checked)
+ onTriggered: print("triggered \"" + text + "\"")
+ }
+
+ component ContextMenuItem: MenuItem {
+ onCheckedChanged: print("checked of \"" + text + "\" changed to " + checked)
+ onTriggered: print("triggered \"" + text + "\"")
+ }
+
+ Menu {
+ id: backgroundContextMenu
+ objectName: "backgroundContextMenu"
+ popupType: popupTypeCombo.currentIndex
+
+ function appendAction() {
+ let action = actionComponent.createObject(null, { text: qsTr("Extra context menu item") })
+ backgroundContextMenu.addAction(action)
+ }
+
+ function removeLastAction() {
+ // TODO: Can't use count here because it's 0: it uses contentModel->count(), but native menu items
+ // are not Qt Quick items, so we either need to document that you should use contentData.count
+ // or add an "actions" property. The problem with contentData is that it could contain
+ // non-Action objects. Another potential issue is that "It is not re-ordered when items are inserted or moved",
+ // making it unreliable as a general purpose container of actions if users add or remove them dynamically.
+ backgroundContextMenu.removeAction(backgroundContextMenu.actionAt(backgroundContextMenu.contentData.length - 1))
+ }
+
+ ContextAction {
+ text: qsTr("Context menu item")
+ shortcut: "A"
+ }
+ ContextMenuItem {
+ text: qsTr("Checkable context menu item")
+ checkable: true
+ }
+ ContextAction {
+ text: qsTr("Checked context menu item")
+ checkable: true
+ checked: true
+ shortcut: "C"
+ }
+ ContextAction {
+ text: qsTr("Disabled context menu item")
+ enabled: false
+ shortcut: "D"
+ }
+ ContextAction {
+ text: qsTr("Checked and disabled context menu item")
+ checkable: true
+ checked: true
+ enabled: false
+ shortcut: "E"
+ }
+
+ MenuSeparator {}
+
+ ContextAction {
+ text: qsTr("Context menu item with icon (name)")
+ icon.name: "mail-send"
+ }
+
+ ContextAction {
+ text: qsTr("Context menu item with icon (source)")
+ icon.source: "qrc:/qt/qml/Menus/icons/warning.png"
+ }
+
+ ContextAction {
+ text: qsTr("Context menu item with disabled icon (source)")
+ icon.source: "qrc:/qt/qml/Menus/icons/warning.png"
+ enabled: false
+ }
+
+ MenuSeparator {}
+
+ Menu {
+ id: subMenu
+ title: qsTr("Sub-menu")
+ objectName: title
+ popupType: backgroundContextMenu.popupType
+
+ function appendAction() {
+ let action = actionComponent.createObject(null, { text: qsTr("Extra sub-menu item") })
+ subMenu.addAction(action)
+ }
+
+ function removeLastAction() {
+ subMenu.removeAction(subMenu.actionAt(subMenu.contentData.length - 1))
+ }
+
+ ContextAction {
+ text: qsTr("Sub-menu item")
+ }
+ ContextAction {
+ text: qsTr("Checkable sub-menu item")
+ checkable: true
+ shortcut: "G"
+ }
+ ContextAction {
+ text: qsTr("Checked sub-menu item")
+ checkable: true
+ checked: true
+ }
+
+ MenuSeparator {}
+
+ ContextAction {
+ text: qsTr("Disabled sub-menu item")
+ enabled: false
+ shortcut: "I"
+ }
+ ContextAction {
+ text: qsTr("Checked and disabled sub-menu item")
+ checkable: true
+ checked: true
+ enabled: false
+ shortcut: "J"
+ }
+ }
+ }
+
+ Menu {
+ id: editContextMenu
+ objectName: "editContextMenu"
+
+ ContextAction {
+ text: qsTr("Cut")
+ enabled: textArea.selectedText.length > 0
+ }
+ ContextAction {
+ text: qsTr("Copy")
+ enabled: textArea.selectedText.length > 0
+ }
+ ContextAction {
+ text: qsTr("Paste")
+ enabled: textArea.activeFocus
+ }
+ }
+}
+
diff --git a/tests/manual/quickcontrols/menus/Menu.qml b/tests/manual/quickcontrols/menus/Menu.qml
new file mode 100644
index 0000000000..0d18fca2ab
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/Menu.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick.Controls
+
+Menu {}
diff --git a/tests/manual/quickcontrols/menus/cppsettings.cpp b/tests/manual/quickcontrols/menus/cppsettings.cpp
new file mode 100644
index 0000000000..589cea916b
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/cppsettings.cpp
@@ -0,0 +1,43 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "cppsettings.h"
+
+#include <QCoreApplication>
+
+CppSettings::CppSettings(QObject *parent) :
+ QObject(parent),
+ mSettings("QtProject", "menus")
+{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, dontUseNativeMenuBar());
+}
+
+bool CppSettings::dontUseNativeMenuBar() const
+{
+ return mSettings.value("dontUseNativeMenuBar").toBool();
+}
+
+void CppSettings::setDontUseNativeMenuBar(bool dontUseNativeMenuBar)
+{
+ const bool oldValue = this->dontUseNativeMenuBar();
+ if (dontUseNativeMenuBar == oldValue)
+ return;
+
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, dontUseNativeMenuBar);
+ mSettings.setValue("dontUseNativeMenuBar", dontUseNativeMenuBar);
+ emit dontUseNativeMenuBarChanged();
+}
+
+int CppSettings::popupType() const
+{
+ return mSettings.value("popupType").toInt();
+}
+
+void CppSettings::setPopupType(int newPopupType)
+{
+ const int oldValue = popupType();
+ if (oldValue == newPopupType)
+ return;
+ mSettings.setValue("popupType", newPopupType);
+ emit popupTypeChanged();
+}
diff --git a/tests/manual/quickcontrols/menus/cppsettings.h b/tests/manual/quickcontrols/menus/cppsettings.h
new file mode 100644
index 0000000000..b6af1f9f09
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/cppsettings.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef CPPSETTINGS_H
+#define CPPSETTINGS_H
+
+#include <QObject>
+#include <QQmlEngine>
+#include <QSettings>
+
+class CppSettings : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(bool dontUseNativeMenuBar READ dontUseNativeMenuBar WRITE setDontUseNativeMenuBar
+ NOTIFY dontUseNativeMenuBarChanged FINAL)
+ Q_PROPERTY(int popupType READ popupType WRITE setPopupType
+ NOTIFY popupTypeChanged FINAL)
+ QML_ELEMENT
+ QML_SINGLETON
+
+public:
+ explicit CppSettings(QObject *parent = nullptr);
+
+ bool dontUseNativeMenuBar() const;
+ void setDontUseNativeMenuBar(bool dontUseNativeMenuBar);
+
+ int popupType() const;
+ void setPopupType(int newPopupType);
+
+signals:
+ void dontUseNativeMenuBarChanged();
+ void popupTypeChanged();
+
+private:
+ QSettings mSettings;
+};
+
+#endif // CPPSETTINGS_H
diff --git a/tests/manual/quickcontrols/menus/icons/warning.png b/tests/manual/quickcontrols/menus/icons/warning.png
new file mode 100644
index 0000000000..590a61eb80
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/icons/warning.png
Binary files differ
diff --git a/tests/manual/quickcontrols/menus/icons/warning@2x.png b/tests/manual/quickcontrols/menus/icons/warning@2x.png
new file mode 100644
index 0000000000..487fbafcfd
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/icons/warning@2x.png
Binary files differ
diff --git a/tests/manual/quickcontrols/menus/main.cpp b/tests/manual/quickcontrols/menus/main.cpp
new file mode 100644
index 0000000000..e9b4e6d5eb
--- /dev/null
+++ b/tests/manual/quickcontrols/menus/main.cpp
@@ -0,0 +1,27 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QQuickStyle>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication::setOrganizationName("QtProject");
+ QGuiApplication::setApplicationName("menus");
+
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ engine.setInitialProperties({{ "currentStyle", QQuickStyle::name() }});
+ QObject::connect(
+ &engine,
+ &QQmlApplicationEngine::objectCreationFailed,
+ &app,
+ []() { QCoreApplication::exit(-1); },
+ Qt::QueuedConnection);
+ engine.loadFromModule("Menus", "Main");
+
+ return app.exec();
+}
+
diff --git a/tests/manual/quickcontrols/testbench/controls/Menu.qml b/tests/manual/quickcontrols/testbench/controls/Menu.qml
index df5bc55d20..f1948a7399 100644
--- a/tests/manual/quickcontrols/testbench/controls/Menu.qml
+++ b/tests/manual/quickcontrols/testbench/controls/Menu.qml
@@ -42,15 +42,18 @@ QtObject {
MenuItem {
text: "Checked"
+ checkable: true
checked: true
}
MenuItem {
text: "Checked + Pressed"
+ checkable: true
checked: true
down: true
}
MenuItem {
text: "Checked + Disabled"
+ checkable: true
checked: true
enabled: false
}
diff --git a/tests/manual/quickcontrols/testbench/controls/ToolBar.qml b/tests/manual/quickcontrols/testbench/controls/ToolBar.qml
index 2596f4309e..867556d152 100644
--- a/tests/manual/quickcontrols/testbench/controls/ToolBar.qml
+++ b/tests/manual/quickcontrols/testbench/controls/ToolBar.qml
@@ -34,6 +34,8 @@ QtObject {
ToolButton {
text: qsTr("ToolButton 3")
+ checkable: true
+ checked: true
}
}
}
diff --git a/tests/manual/quickcontrols/testbench/testbench.qml b/tests/manual/quickcontrols/testbench/testbench.qml
index 9c7f4a70aa..68975cfd69 100644
--- a/tests/manual/quickcontrols/testbench/testbench.qml
+++ b/tests/manual/quickcontrols/testbench/testbench.qml
@@ -139,7 +139,11 @@ Ui.ApplicationWindow {
text: "\ue801"
font.family: "fontello"
visible: searchTextField.length > 0
- onClicked: searchTextField.clear()
+ onClicked: {
+ searchTextField.clear()
+ // textEdited is not emitted for clear(), so we have to set this ourselves.
+ settings.lastSearchText = ""
+ }
Layout.leftMargin: -5
}
diff --git a/tests/manual/svg/data/image/1.svg b/tests/manual/svg/data/image/1.svg
new file mode 100644
index 0000000000..d5f27450c2
--- /dev/null
+++ b/tests/manual/svg/data/image/1.svg
@@ -0,0 +1,3 @@
+<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
+ <image xlink:href="data.png" height="200" width="200" />
+</svg>
diff --git a/tests/manual/svg/data/image/2.svg b/tests/manual/svg/data/image/2.svg
new file mode 100644
index 0000000000..3f71e5ca23
--- /dev/null
+++ b/tests/manual/svg/data/image/2.svg
@@ -0,0 +1,3 @@
+<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
+ <image xlink:href="qtlogo.png" height="200" width="200" />
+</svg>
diff --git a/tests/manual/svg/data/image/3.svg b/tests/manual/svg/data/image/3.svg
new file mode 100644
index 0000000000..85751587d9
--- /dev/null
+++ b/tests/manual/svg/data/image/3.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg viewBox="0 0 210 297">
+<image width="200" height="200" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAA8CAYAAAGPy61gAAAAAXNSR0IArs4c6QAAAJZlWElmTU0A&#10;KgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodp&#10;AAQAAAABAAAAbAAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgSW1hZ2VSZWFkeQAAAAOgAQADAAAA&#10;AQABAACgAgAEAAAAAQAAAFSgAwAEAAAAAQAAADwAAAAAm/SbDAAAAAlwSFlzAAALEwAACxMBAJqc&#10;GAAAAi1pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6&#10;bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRm&#10;PSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJk&#10;ZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8v&#10;bnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMu&#10;YWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1h&#10;Z2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43Mjwv&#10;dGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmll&#10;bnRhdGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+&#10;CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpg60/Z&#10;AAAXv0lEQVR4Ae1caZBdxXXuvve+bXaNFhAIJI0EWmZGCEaIJYVLBlxFlkpBbBGXKwRXYkOFwmAW&#10;B20uPYFGQrahAnHiiMTlCrHLCYqdhB/g2NiocDDgMEbSLEhCmhkJAVJmkWZ9672d7+v77tvfmzej&#10;wdYPGt7cvr2cPn369OlzTp8rKZBaetsvwuM08+WS0Xb8yXo08BrGjJCP7VWxTkZM2udSFZGupq1B&#10;J5KIzlua8LMsMDxPP72OhpcBrIE1p79JiMGhfv8W6TNFR9s9SemIP/DaZBrLzNCO45gqYau2jucs&#10;ZYiXChsLseDQxV+TMmCJ4NmTO9FAash495IEJbInE7Hm1YTMo0F/rHEwjkZxc06V3z47qdtnurnd&#10;Q8nBcWHPn4wLWxekG0bt00HJojzobre8v0ZL7y7HK7Pm1girsdp7zXmCCkpDBW1lcnhcGFV+oVRi&#10;MUkGPNONM+RiEaYXP3VWBJsWfiQd+9bk4ORtQmo4In9CaQjKMF+x5gWEN/MciByWv+jJoSs4tFEd&#10;SHdMN+TMySxyIrHCDPi6HVBJRUhSN+UMnRyawNqIIwKNmPQ7nmZ9CMVIrSd2z1GOM4jJpEdg+UxT&#10;/rJrOGZdUMzpHPPt37DdXU+WSqkwFa6P5FyFoxqN2uCwfc5lCd0x9acAqLWgVhyoHjZb+v02Fspt&#10;hvkYIX/NoYsenWz98BtO56WPuWuB2kW/eijUsHD+ZLotynLoRAjJ/xt7TSzdrqS1R4D9WaTX2JlM&#10;7N0o9t39btwWre8/qfxn5vjt5ZF4chi09QZ3WxfSEJh+SuzYIZWd5kROWETt+H37xEYHANIVKg9Y&#10;CmZRTMVVD9bbB+c8JJe/92wgEB/2dTeHx9mhpdeXwMNQSVvUjn2kTg02BoOmaBCGPA0aezBFAU3T&#10;NbmZeK0v1DASHV9pmOZvcqty37hPNMGX9IWDdaHqCBlzNpLZrML+KlEfdcaiswFPw7Cs4bqYPVLI&#10;a0YN9hzoJP2WAC+SDcCclSXDHonkt1SUKYcWPGoc+ocJ8+CzI2bX85DbSnlS1WG9mVCLXOLldy/C&#10;p1LKV9kMu2cAj2pu3UQdhMqJ47fHFyyNq6TLUZZljdsqs+GyQRfs9c6lW25JNZiLZxDY+IOmf7S2&#10;7RKlkuogsNRk6Fi2aYQYK6keywbIfD7QWH4DvoOmkf0ynJSG2tzau/NTLNvwathqPvbEzZDCy/ie&#10;nXK3qXQPhOXvheuyGyHvcraSfZDk3Xg3xy4PVkvD+Xn+FmW/XEwdd4WPXREeZWVW0vzsCLkkBT5V&#10;ldlFWW3zgEqRkd1ZrcyGqtAGFbYMoXZlFZfM5mKKZi3H23+Rav0az18eBQfnjJj9/ZAThrzag8SF&#10;olyVGCo/FZZI8WnSVEUSn5GmUeNTkzgpt6sa4RtMSS6juW/X7ja11xcfl3Uqoe7LB1pcoEDU6UO0&#10;NiiM2oAYPnE6dO2S1Yl3+95LegD0qYx2lPw5YhINCjFlL8hJFU/iMBsX8f4hUaN8j+yTd9okh5co&#10;nFmfB1DFg4H5xTH1enpPKSCc9bqX2f9SWTLeeGBp+Fz6rKFAtkLjNcGaqkFgQV5J13mwf5dP2dwd&#10;9geDwVCywX8OAmsGCEr0wTbjtIpvhVmZn2U0hGKxmK2EK1XLUFEqsz4IHTmyu2vZ1i3FRm/p33mj&#10;NMzXVcJJAvEMo6QaSz9WOTUZtHEnWAxQkTJLxTQzl0YQNSZ2wMF5j2Dfhw0xN6xFdMsHOy9TUfkF&#10;qEJ1ylG/7F7+9Z90LU6+KeQ2DQsSnucJ1XtuBAc7yehctEmvoK9KVKk59We1vlThKhTMOn8y0mcJ&#10;NTjZRCQ3YNDBvvavgCrtIiaqXc0Wq44MEIuLPmF1pQ5HnAihNWe+pZyJmMIBahipnRhcvVDZ/R9p&#10;dVNgIblzHexcFQXBSpNrSuXEFqZhdi3enAZx1dDTqsjh681PSUP+Uefi+E+WHxvyBa2LN2Oi2yE2&#10;qoaDCevI/MfGdEMc+isG99RYKqLMUVDX8N2rDPl4ttbkAfSexeWTVwv7QDrqLRe4kje8/3QIllum&#10;tjAXARvcIWTYWXRqLjRb8WPKuXGZmAwKSx9ObW/v9a3tD9dX1daMmnbVmKqqOiMsoyySHGbKpS92&#10;TBbil13imkw5JfGk4yiYjKlkOkGVhGniRDHpCnk03dkDkvf0YUmu02XYNW9c9nDEqNKGc16z9GvQ&#10;EMaL5OdTixpN8O7tqCmuE6W7VJaZiqIWz73m409e3t0UPbVhvzCGRiL3AvTf4keM07yLPPRaGTjU&#10;tOVF5MUxIWLYTDvURNzdMamWtW0fqbEOkZBzg2xWcZqKovosNWusE8uPNfpOLRoyO5dufQ47Ooif&#10;YTiiFafgdaomUctdPu9EHNqri3zrqT16x2Nt6T0wKD2Y9ovtdkebiI4PGKC+ugG1UEvUt2j3lEuV&#10;ncsuBAVFSsKIfl0Yzjb4Ct7sXxrW1gF1yf2fDqe1C4gqbhza8DnnOJUFyO32RNzac2SlKwFW9bcv&#10;NBz5l9IQT5Tb9dNBNHfCJIDeCDhClbJx6lidl23SZKFuFesf/FfUk0cLVy3dF7XZ+dwRvDcH9pgx&#10;c0Q9MFlPa36tSAyMbzQsuQ/yF9TTEl0jn9Ws0qxeweTEyNxYtHFiqs1UKVDdLjkwRgLtg90Cq16f&#10;tDNA0tUprHPxOdGPRiIwr7U1WwAI+vj/YrQ1GJnn9AWTcija3LuTtvtq/C4oJEmtNKItvTsPgLNX&#10;gJoBd5Ow+sJJWnzApXgIKK3Er6h9V4BummGoNGNq6feClrNWYLb27YJmplYAYiXLjR0CjXguNDz4&#10;PCCj4df1CbMuBBCQUgknjuoc2TlbmFrweK0CsEJZVzgClEYck6a5/kD9V9/Nr6ZJI0PWP8Fhepcz&#10;keCxmUNn2LQYBUX4X7v2tAzOh1L6nQhWgqQN+I/DBKntWvzXh0E9HIthCEo8w+6TYkRFkl86dNHX&#10;pFkbIJJpVIikYzt3W1FnQeelmwwQ5x3UT8vnVQmSUQx5oLNp6xN6vvBNYsFVc691R3Nv+67mu3wP&#10;tp58soF1RLbt7XCVMx5bBWWGyKYTusSM6vgEKIrZSZ4E00rpXV+0F4bC+R6Ef3OdpiAatZwwV1iP&#10;PtuTPDNGftRSHc+nW4/v/EXnsm23dKwL05l3uKWvHW5Zfd67CMNT5bfr0vihMJ0vOnZeYXlEHZGA&#10;EuJ6EaG1s681+kwPry+AXHrzQavHjIybW/t33eAf7H97pL7FkM7ovUrKfyFfGnCQA066PcDUQjcI&#10;GdiIrK/ETC+PqBS0O75NBMULG80116xdlRykcyJ3o6S0HjoF/qZj3XOuoi3ED+BQ/z6Mtk6sCE+6&#10;dIJKSFGYTrxvgt+XhCjJilMgKuFGdl7isreJhUasb+jL1JRAzcJ+EFiwNNenR+eoULrtSMJccXhP&#10;7cIVEe1qZH3bh+Gq6FlhmHOrFa6uJiphgpIzADL6ngYW+fGNYrXsEPdAPKnfg5Xp8lw2RswrZeJu&#10;wy2lJGARbxikCJm+5Prh46LR4/NYxFqNO6A2J5K8FrrrGlzOsHlxuKxBKo0oKunZgA9fW4/c6Si6&#10;GGK9OECWejXbkUdy6NyQcqlVG3jFlr5bbzhVlzr55PcgovYbAfNVOCEPuupgurfbOe9v4RJmNaBj&#10;YXR0JNs4S5saWc0yWU6FaV+3izKwwZtUsDYlWSaT6ImOwgr1DCdvipkWebmyFOU4dXV1mSPREBRJ&#10;Hjp5oPDqDbex2W3DmTLxzdArol8JozQQt0n+3/KI4sZqLBFxXeU8hRxxGsK6+Bgs9Wp2uMMYwbIL&#10;lo9L2ffSiGJQXhVJ227aJ3pUm3gOWoj4FWSmh04+YAd+Jrcs7MpcKi4lUykoJTqURpQdlJp0DAP3&#10;vGGnY98rjmPbe7GEGVbIBRqDQ51neDoprEipBKaYFqplpowhlPCBzR5Abru4c5/dg12yduwZmRwY&#10;LxDOMIVDMp64bwPuJfpxjVDrWJ91InQ+uJwrDSPtYgHj8nDwOLrUXHLKyyNqCB/Oeq1weDJQ9Dtz&#10;IAPPcjsoqhYYTmtHE/G9OOvfTEFPQhn/nse0+ohVaomnqaLXAfS5Cc4xAbksIE9RVELspQBOsfRw&#10;HJ2djMHg6+byCxFW5tC7EwyEiJ9LzrMT9vUibq/i+7yTifsJk3ophPifYQJZLh9943vbG98d1UyM&#10;I/QB+KTXwxlxle+DyWojZGGPYquWSZXa9RhAvtDVtOXPQUnZ3LPDF5wjLO8YXHHR4iivTUj1lj7f&#10;54yg79+0py4zsGNU+w3qqrzTXdIvkgMLcDWIxNtmun/gnixgp0x3jI7Zg+wVpShOkSCUjM24s/lB&#10;1/Jt7+f0wrG55G7hr074VhpV1jv0i+Yl7iwwi7m+u2nTQV3HiX1oXSoSxkkQgNc5JVd4OogSNp2z&#10;8GBgrRi7QD5NOMIejZzFcjbqwfEHk+/Bg3ZY7sAKKFX7fYz1YF8yOCkPRZvZcik+XURdYATqrQM3&#10;kwF8HPt2ZzL5sufZWDv6jCqqEmb3JbT8d3cE96+ukzFMqjN3xtmNyuU9JNkGebCCMufW/ieRpHhi&#10;MZRrmODZDVmKlF+U/+62cv86IoariB7YatfOjKLZwDJ5Xte8hBVtsOqCt9hcTr28mQbTyinqFerd&#10;rqZta9mvvBydFmTB8J/PYrWUPRYlnbhwM01Qt+QR8L1GkkBmE1FvWc8HQeLk4DQ8iiiHHPOlKFBe&#10;4B674oHYlR+G5/kjvv82G6uugeCn+y/bQCPQT1IeBXI2/fL3vqIthUBwuBqi8J1QqH4AjLYaxERM&#10;xSfEzKNd0VdNUKoRrK2x5oZAyINWdf0QXleBkLyK4YkMLxNbfJKmooDe8gy+jYrk61ZDVTN8K9za&#10;WfrZVCCmqOcI0AfwHyMNPH2fC8mfK3JYC5mEN1fPU5CZxTwcaHShJx6fBxFPugbhF5gwbaHyWnbF&#10;E4KWhOglWAchkUSgsHScd6DGvgUfBhRw45RCxJCwJewUqPeWDBiOPRfbYQngU8hfD+1qOW/57LOw&#10;WEq5kNCwROICFe4pqpBFT40SUGZQzNOzVQczaI4oxGGaMPVEsECMTvwPK67uf6f+qwwcdBMFyI6w&#10;hJXoph2pp/eOKDAsKgvTiDT3ta9FyT8jrHeNPRolB7OBbsSGJRI8UAr6kVY90QQ3y3CLoVcD4PuQ&#10;J/ypYJQAXb54NhW8KO5Jgoiifgr6zqN6WHhTaWDrPH0sroutPEaszWpL68q7v8ZuegshNOthC4Cw&#10;pHzObnJg0yKiAXLDVp/rXrL5RwwI6Wi7l6JGwftajWjlV6GxXGsPT0RQFsos29QoVdri/PU7yj3o&#10;35hoMD44cWvPsq0/11ck9OeQmLw2gY199fvfWJjobd8NxP4UHByQVsrTQj4Bw9CdYo9HhwDt29Fj&#10;D+xm6MRG9YIJs1Zfm9Dr23HJ1utw//mUVRt62B6D1o+e+BVwGsSLBu6/aMJq69grOsS9Cd+EbcUQ&#10;66rHclcDXWc/5ahNMwIPWQnOtOyJ+Bc1MQlkO7YutzfSBuw3cNZRp8b/AV5vx89HEcMQSX7woJ/4&#10;VgDWAMlTi14P1V6+Moo+/6h9BOhAwnZcEp6kWtfdtO0RtP2RUePXS4FqJHgWIZTpsWbYZRlvpqMj&#10;rF0rmuJDm+6pp3sgEtx5pJkT1OWLSQSlBrDNf4Yt9rzGg9ucWzvlpBvs83XAYXIFiEjk6WLNjOnx&#10;WHoCkG9S1CU+PDeJr2C+hCurPazynC9XL79JOzMgDh/Gto/oLc6dL9UkeI/urjdBsF87hkm1TwxE&#10;LYeh/cxHo1GMLzuT5ya7Qfxf4/em/kmdfw2NTlJcuKmE6zdVW+5xPjKUXJHEKe5Ljsa+0L108w89&#10;bCC7rI519yZa+tv/wqwJfRfEpBybjniJ44T3w3U2pkx5fffiLT1e/A91ZnoN4K77ISKPP8/7FtwM&#10;dHYt25ZjApabdHZdGl7vrkcRcvZN7SlztCsvs/DZHabIz6hTCmZCBi1u31HHSb7NMm5NPJTHFZCH&#10;f0KZBWJ6S5/qOtVD+kBMfptVi/P5JrbWwVQpMcJ3gPwpn/pskpLcn5sou73EQ65E8vxOynCg25Vo&#10;NI3i6XBNBqweWNq8aLWjyZOJhvozrBzY38Ma6U4eE+oVKxi4yjL+qTjpw0Mk4SWkBbcy0y8s56/G&#10;MjGZ4jCI7t4ICnEVZC4IIvmRiAG639ktt/z7IoSOXnTmcLJDygSNF3wQ+DKCHW7ARcgIICBUA3vM&#10;XSQcq8J0JnS0EqFnFoNv00gz7qg5j58dSHEu0DisT+L5G1YDQS2yxIojIXxdoOpSl83TI6g3AYAC&#10;wLSrlZeA8wXGQKJhgO0OcqRAU2l3w1KlmVIgXDBtHjQ+vb2CTrojO7PMfWa3nGF+ZhyaPZhLv+yS&#10;TD4110zBDHJltmsWNJLEh0MKcQvQ4xK2ZpTL0CDNc25j1zeuTWvlXiDNBo5ZiMyYQ0FHWOZav66P&#10;HXOvNPSWT3HMkRURBJHIUYY5IpUjexY6eVk9WeNsuhS3vwNCixUhE2aDjqhJ7Yh0mwoyGvdZJqQ3&#10;7MwIqjGCPccob6EuD8jAAgLUWx4FPJH1hZlSRxmegTQ9HQ8RPOhjMpQTW/4oAbgprAZ6XPnmWOJK&#10;qGMsnh7sFKSP6zEzgrrY8CROwOqpl6atBRX0RT25sdqF7vpL48dat5suf+KLPkSFBPB1UgSAfsnh&#10;3EXKcDpI/hkt+WbK/R8TRWdOUFeQ06NEO+WLKfwUo6Gog/IdN6XUQQ/AqkFwONx3lSZEV5lz+CGm&#10;/A78Aridgtq0QThUy6jmrHlvzyLQ8Q73VEZ0eQVpxNH3MvoQwyJNd4krGMFtUhEyRaG5KFXBSoqZ&#10;jTW34TL+Lt1O2+8ZvQ8EuRoT/x9rfg0OQL2VEfam9Ubqjtk/crfmcN/F9VXJM6NPdTdteYQwtX4L&#10;f0CP6NHyQ5nJv4PvoApmJtpnxtJOJBxK0pFz2I/J04mPLQ+PQQsYSIl4XuByLESWpXDxfLG618z/&#10;zJygmTH9yeHJBLjw+ea+3bexeMP+HXriOg95CqLedKDuQYqBL+P3CiZOu56BiORacjO+fRR92ML/&#10;xX/v4Z2q+yU9Vm1v3+OexGjAfLeEhdS76wVZE/hjmJ5YUk9nQgMekvwSmjLbcLQI+ig5qqgT82MF&#10;1MLUd7YlhyY70RQqHWJV8WU7iMwIzGH86IE673Q+pmdmcM5LqQgsmxCuTb4PYmhu5aUyD5Hu1WEQ&#10;LSwZ3fbGIkRm6AiPTHcvx4n7T01Ybyx6mJOlTivxjwMYtOXX9O66CUfUT0GwIPRPclcxZrBl0GfC&#10;FIXz2lnXdcXXj8O0rIGYQMioK4e10eENmPVs6dv1Vzjk/t6JAdXzMD1nh6AZxCgI6H3yI3zgkDDl&#10;jloz+DI/zco0mSKXcvdptx+bgviw21+35lXfCO5imAwDJcrxEj6lsUwEhUQg3T/vfUk1xaii9fju&#10;W6HJ/oziFV/Nl1qwqcBMK8plSmB5DbQTl59IM8AJnEsHyQngewqq4wCOklFIMerdsHEULgLlKtx0&#10;P9+1bMt3XGJu5wGivCvt5uM7dyOwf5Oj/aBagJcjKsDKhPRBaUN8MuT8KMbu0mMLcU7LcOXUwAqY&#10;D0gLIdoXoW6uiz/lfNkFy5tm7utsc2gudL654gDLnr6kIzVIDO/HVuSIGDi7HpNPiwzKTcRGJ1zn&#10;cniytb/993Gr8ZKOVKvkGoMjUKfFvzCD0XgAUpB490rEgz8mtqTVmJb9LJxGIpwE7sH8Hz9BK8IK&#10;k6YahiBKyOEqfLr8m4Bj3sx/qiBNVDg3+E5wzcfbjyAE9Urowd7iVDTKrDdybyvi2IVBXER2AP8/&#10;LCbYZ33cqQFii9GElKIKoiEGL9Y1McP+oPX4463kUPaPK/tGeJRexI+67++amFzIGOI9Sb/D0fHJ&#10;eV1Lt6zDB84jFwiHkmQ5yeU86pTwBTDOWCXgqovjdKf+6H4YxW36W05avsKLEPLj2v0QcNvQuXjz&#10;WU/OE5kLhEML6OISC8HdVJFgGCCGlCJQyz/Kut8yMSmHcTuBfz4CYx+1zsYboBpe5Vweow4rGAfG&#10;J9OFSlAXO5dwwHHmp64H6DyeSgbwnZgUPfhuloRsxf2UVgNpaOTD/X+TqEOdRtk7pQAAAABJRU5E&#10;rkJggg==&#10;" id="image1" x="10" y="10" />
+</svg>
diff --git a/tests/manual/svg/data/image/data.png b/tests/manual/svg/data/image/data.png
new file mode 100644
index 0000000000..7b660be3de
--- /dev/null
+++ b/tests/manual/svg/data/image/data.png
Binary files differ
diff --git a/tests/manual/svg/data/image/qtlogo.png b/tests/manual/svg/data/image/qtlogo.png
new file mode 100644
index 0000000000..7b660be3de
--- /dev/null
+++ b/tests/manual/svg/data/image/qtlogo.png
Binary files differ
diff --git a/tests/manual/svg/data/styling/stroking_text.svg b/tests/manual/svg/data/styling/stroking_text.svg
new file mode 100644
index 0000000000..bacc04fff4
--- /dev/null
+++ b/tests/manual/svg/data/styling/stroking_text.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="250" height="200">
+ <text y="70" style="font-size: 80px; font-weight: bold; font-family: sans-serif; stroke-dasharray:5,5; fill: peachpuff; stroke: crimson; stroke-width:4.1px; stroke-linecap: square; stroke-linejoin: bevel;">pizazz</text>
+ <text y="150" style="font-size: 80px; font-weight: bold; font-family: sans-serif; fill: peachpuff; stroke: blue; stroke-width:4.1px; stroke-linecap: square; stroke-linejoin: bevel;">pizazz</text>
+</svg>
diff --git a/tests/manual/tableview/abstracttablemodel/main.qml b/tests/manual/tableview/abstracttablemodel/main.qml
index 5578e86dba..9c43af2f99 100644
--- a/tests/manual/tableview/abstracttablemodel/main.qml
+++ b/tests/manual/tableview/abstracttablemodel/main.qml
@@ -85,6 +85,22 @@ ApplicationWindow {
}
CheckBox {
+ id: movableColumnEnabled
+ checkable: true
+ checked: false
+ Layout.fillWidth: false
+ text: "Reorder columns"
+ }
+
+ CheckBox {
+ id: movableRowEnabled
+ checkable: true
+ checked: false
+ Layout.fillWidth: false
+ text: "Reorder rows"
+ }
+
+ CheckBox {
id: enableAnimation
checkable: true
checked: true
@@ -202,6 +218,14 @@ ApplicationWindow {
text: "Clear selection"
onClicked: tableView.selectionModel.clearSelection()
}
+ Button {
+ text: "Clear column reordering"
+ onClicked: tableView.clearColumnReordering()
+ }
+ Button {
+ text: "Clear row reordering"
+ onClicked: tableView.clearRowReordering()
+ }
}
}
@@ -450,7 +474,7 @@ ApplicationWindow {
}
}
- TableView {
+ HorizontalHeaderView {
id: topHeader
objectName: "topHeader"
anchors.left: centerScrollView.left
@@ -465,8 +489,11 @@ ApplicationWindow {
}
delegate: Rectangle {
+ required property bool containsDrag
implicitHeight: topHeader.height
implicitWidth: 20
+ border.width: containsDrag ? 1 : 0
+ border.color: containsDrag ? window.palette.text : window.palette.alternateBase
color: window.palette.alternateBase
Label {
anchors.centerIn: parent
@@ -481,10 +508,11 @@ ApplicationWindow {
syncView: tableView
syncDirection: Qt.Horizontal
+ movableColumns: movableColumnEnabled.checked
resizableColumns: resizableColumnsEnabled.checked
}
- TableView {
+ VerticalHeaderView {
id: leftHeader
objectName: "leftHeader"
anchors.left: menu.right
@@ -499,8 +527,11 @@ ApplicationWindow {
}
delegate: Rectangle {
+ required property bool containsDrag
implicitHeight: 50
implicitWidth: leftHeader.width
+ border.width: containsDrag ? 1 : 0
+ border.color: containsDrag ? window.palette.text : window.palette.alternateBase
color: window.palette.alternateBase
Label {
anchors.centerIn: parent
@@ -515,6 +546,7 @@ ApplicationWindow {
syncView: tableView
syncDirection: Qt.Vertical
+ movableRows: movableRowEnabled.checked
resizableRows: resizableRowsEnabled.checked
}
diff --git a/tests/manual/windowembedding/examples/clipping.qml b/tests/manual/windowembedding/examples/clipping.qml
index fa3d27db72..5e7778da37 100644
--- a/tests/manual/windowembedding/examples/clipping.qml
+++ b/tests/manual/windowembedding/examples/clipping.qml
@@ -16,17 +16,16 @@ Rectangle {
clip: true
- Window {
- id: redWindow
- flags: Qt.WindowTransparentForInput
- color: "lightgray"
- visible: true
+ WindowContainer {
width: 200; height: 200
- parent: flickable.contentItem
+ window: Window {
+ flags: Qt.WindowTransparentForInput
+ color: "lightgray"
- Image {
- source: "https://placedog.net/500/500?random"
- anchors.fill: parent
+ Image {
+ source: "https://placedog.net/500/500?random"
+ anchors.fill: parent
+ }
}
}
}
diff --git a/tests/manual/windowembedding/examples/stacking.qml b/tests/manual/windowembedding/examples/stacking.qml
index 7634bb0bff..38a84fa477 100644
--- a/tests/manual/windowembedding/examples/stacking.qml
+++ b/tests/manual/windowembedding/examples/stacking.qml
@@ -10,41 +10,41 @@ Rectangle {
property int windowZ: 0
- Window {
+ WindowContainer {
id: redWindow
- color: "red"
- visible: true
- parent: rootItem
+ window: Window {
+ color: "red"
- MouseArea {
- anchors.fill: parent
- onClicked: redWindow.z = ++rootItem.windowZ
+ MouseArea {
+ anchors.fill: parent
+ onClicked: redWindow.z = ++rootItem.windowZ
+ }
}
}
- Window {
+ WindowContainer {
id: greenWindow
- color: "green"
- visible: true
- parent: rootItem
x: 100; y: 100
+ window: Window {
+ color: "green"
- MouseArea {
- anchors.fill: parent
- onClicked: greenWindow.z = ++rootItem.windowZ
+ MouseArea {
+ anchors.fill: parent
+ onClicked: greenWindow.z = ++rootItem.windowZ
+ }
}
}
- Window {
+ WindowContainer {
id: blueWindow
- color: "blue"
- visible: true
- parent: rootItem
x: 200; y: 200
+ window: Window {
+ color: "blue"
- MouseArea {
- anchors.fill: parent
- onClicked: blueWindow.z = ++rootItem.windowZ
+ MouseArea {
+ anchors.fill: parent
+ onClicked: blueWindow.z = ++rootItem.windowZ
+ }
}
}
}
diff --git a/tests/manual/windowembedding/examples/transform.qml b/tests/manual/windowembedding/examples/transform.qml
index c07dae5850..932c52b0ab 100644
--- a/tests/manual/windowembedding/examples/transform.qml
+++ b/tests/manual/windowembedding/examples/transform.qml
@@ -19,22 +19,21 @@ Rectangle {
]
//scale: 3 // FIXME: Doesn't work when assigned like this
- Window {
- id: childWindow
- objectName: "childWindow"
- visible: true
- parent: rectangle
+ WindowContainer {
width: 200; height: 200
+ window: Window {
+ color: "lightgray"
- Image {
- source: "https://placedog.net/500/500?random"
- anchors.fill: parent
- }
+ Image {
+ source: "https://placedog.net/500/500?random"
+ anchors.fill: parent
+ }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- rectangle.scale += 0.1
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ rectangle.scale += 0.1
+ }
}
}
}