Changeset 79861 in webkit
- Timestamp:
- Feb 28, 2011 7:26:44 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 44 added
- 36 deleted
- 18 edited
- 1 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79860 r79861 1 2011-02-28 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 XML without style should render as syntax-highlighted source. 6 https://bugs.webkit.org/show_bug.cgi?id=13807 7 8 Added tests for XML tree view mode. Testing both logic for entering 9 XML tree view mode and rendering itself. 10 Tests are disabled for QT since this logic is not yet implemented, see 11 https://bugs.webkit.org/show_bug.cgi?id=55302 12 13 * fast/css/dumpAsText/xml-stylesheet-pi-not-in-prolog-expected.txt: Copied from LayoutTests/fast/css/xml-stylesheet-pi-not-in-prolog.xml. 14 * fast/css/dumpAsText/xml-stylesheet-pi-not-in-prolog.xml: Renamed from LayoutTests/fast/css/xml-stylesheet-pi-not-in-prolog.xml. 15 * fast/encoding/dumpAsText/utf-16-no-bom-expected.txt: Added. 16 * fast/encoding/dumpAsText/utf-16-no-bom.xml: Renamed from LayoutTests/fast/encoding/utf-16-no-bom.xml. 17 * http/tests/xmlviewer/dumpAsText/css-stylesheet-expected.txt: Added. 18 * http/tests/xmlviewer/dumpAsText/css-stylesheet.xml: Added. 19 * http/tests/xmlviewer/dumpAsText/frames-expected.txt: Added. 20 * http/tests/xmlviewer/dumpAsText/frames.html: Added. 21 * http/tests/xmlviewer/dumpAsText/mathml-expected.txt: Added. 22 * http/tests/xmlviewer/dumpAsText/mathml.xml: Added. 23 * http/tests/xmlviewer/dumpAsText/resources/css-stylesheet.css: Added. 24 (assertion): 25 * http/tests/xmlviewer/dumpAsText/resources/frames-helper.xml: Added. 26 * http/tests/xmlviewer/dumpAsText/resources/xsl.xml: Added. 27 * http/tests/xmlviewer/dumpAsText/svg-expected.txt: Added. 28 * http/tests/xmlviewer/dumpAsText/svg.xml: Added. 29 * http/tests/xmlviewer/dumpAsText/wml-expected.txt: Added. 30 * http/tests/xmlviewer/dumpAsText/wml.xml: Added. 31 * http/tests/xmlviewer/dumpAsText/xhtml-tag-expected.txt: Added. 32 * http/tests/xmlviewer/dumpAsText/xhtml-tag.xml: Added. 33 * http/tests/xmlviewer/dumpAsText/xlink-expected.txt: Added. 34 * http/tests/xmlviewer/dumpAsText/xlink.xml: Added. 35 * http/tests/xmlviewer/dumpAsText/xmlviewer-charset-cp1251-expected.txt: Added. 36 * http/tests/xmlviewer/dumpAsText/xmlviewer-charset-cp1251.xml: Added. 37 * http/tests/xmlviewer/dumpAsText/xmlviewer-charset-utf8-expected.txt: Added. 38 * http/tests/xmlviewer/dumpAsText/xmlviewer-charset-utf8.xml: Added. 39 * http/tests/xmlviewer/dumpAsText/xmlviewer-expected.txt: Added. 40 * http/tests/xmlviewer/dumpAsText/xmlviewer.xml: Added. 41 * http/tests/xmlviewer/dumpAsText/xsl-stylesheet-expected.txt: Added. 42 * http/tests/xmlviewer/dumpAsText/xsl-stylesheet.xml: Added. 43 * http/tests/xmlviewer/dumpAsText/xul-expected.txt: Added. 44 * http/tests/xmlviewer/dumpAsText/xul.xml: Added. 45 * platform/chromium-linux/fast/css/xml-stylesheet-pi-not-in-prolog-expected.checksum: Removed. 46 * platform/chromium-linux/fast/css/xml-stylesheet-pi-not-in-prolog-expected.png: Removed. 47 * platform/chromium-linux/fast/encoding/utf-16-no-bom-expected.checksum: Removed. 48 * platform/chromium-linux/fast/encoding/utf-16-no-bom-expected.png: Removed. 49 * platform/chromium-linux/svg/hixie/error/004-expected.checksum: Removed. 50 * platform/chromium-linux/svg/hixie/error/004-expected.png: Removed. 51 * platform/chromium-linux/svg/hixie/error/005-expected.checksum: Removed. 52 * platform/chromium-linux/svg/hixie/error/005-expected.png: Removed. 53 * platform/chromium-win/fast/css/xml-stylesheet-pi-not-in-prolog-expected.checksum: Removed. 54 * platform/chromium-win/fast/css/xml-stylesheet-pi-not-in-prolog-expected.png: Removed. 55 * platform/chromium-win/fast/css/xml-stylesheet-pi-not-in-prolog-expected.txt: Removed. 56 * platform/chromium-win/fast/encoding/utf-16-no-bom-expected.checksum: Removed. 57 * platform/chromium-win/fast/encoding/utf-16-no-bom-expected.png: Removed. 58 * platform/chromium-win/fast/encoding/utf-16-no-bom-expected.txt: Removed. 59 * platform/chromium-win/svg/hixie/error/004-expected.checksum: Removed. 60 * platform/chromium-win/svg/hixie/error/004-expected.png: Removed. 61 * platform/chromium-win/svg/hixie/error/004-expected.txt: Removed. 62 * platform/chromium-win/svg/hixie/error/005-expected.checksum: Removed. 63 * platform/chromium-win/svg/hixie/error/005-expected.png: Removed. 64 * platform/chromium-win/svg/hixie/error/005-expected.txt: Removed. 65 * platform/chromium/http/tests/xmlviewer/dumpAsText/mathml-expected.txt: Added. 66 * platform/gtk/fast/css/xml-stylesheet-pi-not-in-prolog-expected.checksum: Removed. 67 * platform/gtk/fast/css/xml-stylesheet-pi-not-in-prolog-expected.png: Removed. 68 * platform/gtk/fast/css/xml-stylesheet-pi-not-in-prolog-expected.txt: Removed. 69 * platform/gtk/fast/encoding/utf-16-no-bom-expected.checksum: Removed. 70 * platform/gtk/fast/encoding/utf-16-no-bom-expected.png: Removed. 71 * platform/gtk/fast/encoding/utf-16-no-bom-expected.txt: Removed. 72 * platform/gtk/svg/hixie/error/004-expected.checksum: Removed. 73 * platform/gtk/svg/hixie/error/004-expected.png: Removed. 74 * platform/gtk/svg/hixie/error/004-expected.txt: Removed. 75 * platform/gtk/svg/hixie/error/005-expected.checksum: Removed. 76 * platform/gtk/svg/hixie/error/005-expected.png: Removed. 77 * platform/gtk/svg/hixie/error/005-expected.txt: Removed. 78 * platform/mac-leopard/fast/css/xml-stylesheet-pi-not-in-prolog-expected.checksum: Removed. 79 * platform/mac-leopard/fast/css/xml-stylesheet-pi-not-in-prolog-expected.png: Removed. 80 * platform/mac-leopard/fast/encoding/utf-16-no-bom-expected.checksum: Removed. 81 * platform/mac-leopard/fast/encoding/utf-16-no-bom-expected.png: Removed. 82 * platform/mac-leopard/svg/hixie/error/004-expected.checksum: Removed. 83 * platform/mac-leopard/svg/hixie/error/004-expected.png: Removed. 84 * platform/mac-leopard/svg/hixie/error/005-expected.checksum: Removed. 85 * platform/mac-leopard/svg/hixie/error/005-expected.png: Removed. 86 * platform/mac/fast/css/xml-stylesheet-pi-not-in-prolog-expected.checksum: Removed. 87 * platform/mac/fast/css/xml-stylesheet-pi-not-in-prolog-expected.png: Removed. 88 * platform/mac/fast/css/xml-stylesheet-pi-not-in-prolog-expected.txt: Removed. 89 * platform/mac/fast/encoding/utf-16-no-bom-expected.checksum: Removed. 90 * platform/mac/fast/encoding/utf-16-no-bom-expected.png: Removed. 91 * platform/mac/fast/encoding/utf-16-no-bom-expected.txt: Removed. 92 * platform/mac/svg/hixie/error/004-expected.checksum: Removed. 93 * platform/mac/svg/hixie/error/004-expected.png: Removed. 94 * platform/mac/svg/hixie/error/004-expected.txt: Removed. 95 * platform/mac/svg/hixie/error/005-expected.checksum: Removed. 96 * platform/mac/svg/hixie/error/005-expected.png: Removed. 97 * platform/mac/svg/hixie/error/005-expected.txt: Removed. 98 * platform/qt/Skipped: 99 * platform/qt/fast/css/dumpAsText/xml-stylesheet-pi-not-in-prolog-expected.txt: Added. 100 * platform/qt/fast/css/xml-stylesheet-pi-not-in-prolog-expected.txt: Removed. 101 * platform/qt/fast/encoding/dumpAsText/utf-16-no-bom-expected.txt: Added. 102 * platform/qt/fast/encoding/utf-16-no-bom-expected.txt: Removed. 103 * platform/qt/svg/hixie/error/004-expected.txt: Removed. 104 * platform/qt/svg/hixie/error/005-expected.txt: Removed. 105 * platform/qt/svg/hixie/error/dumpAsText/004-expected.txt: Added. 106 * platform/qt/svg/hixie/error/dumpAsText/005-expected.txt: Added. 107 * svg/hixie/error/dumpAsText/004-expected.txt: Added. 108 * svg/hixie/error/dumpAsText/004.xml: Renamed from LayoutTests/svg/hixie/error/004.xml. 109 * svg/hixie/error/dumpAsText/005-expected.txt: Added. 110 * svg/hixie/error/dumpAsText/005.xml: Renamed from LayoutTests/svg/hixie/error/005.xml. 111 1 112 2011-02-28 Pavel Feldman <pfeldman@chromium.org> 2 113 -
trunk/LayoutTests/fast/css/dumpAsText/xml-stylesheet-pi-not-in-prolog-expected.txt
r79860 r79861 1 This XML file does not appear to have any style information associated with it. The document tree is shown below. 1 2 <foo> 2 <?xml-stylesheet href="resources/xml-stylesheet-pi-not-in-prolog.css" type="text/css"?>3 3 This tests that xml-stylesheet processing instructions have no effect when they're not in the prolog (before the root element). If this test is successful, this text should NOT have a black border. 4 4 </foo> 5 -
trunk/LayoutTests/platform/qt/Skipped
r79857 r79861 3613 3613 http/tests/inspector-enabled/open-close-open.html 3614 3614 http/tests/inspector/change-iframe-src.html 3615 3616 # [Qt] XML Viewer fails due to specifics in the parser implementation 3617 # https://bugs.webkit.org/show_bug.cgi?id=55302 3618 http/tests/xmlviewer/dumpAsText/svg.xml 3619 http/tests/xmlviewer/dumpAsText/wml.xml 3620 http/tests/xmlviewer/dumpAsText/xlink.xml 3621 http/tests/xmlviewer/dumpAsText/xmlviewer-charset-cp1251.xml 3622 http/tests/xmlviewer/dumpAsText/xmlviewer-charset-utf8.xml 3623 http/tests/xmlviewer/dumpAsText/xmlviewer.xml 3624 http/tests/xmlviewer/dumpAsText/xsl-stylesheet.xml 3625 http/tests/xmlviewer/dumpAsText/xul.xml -
trunk/Source/WebCore/CMakeLists.txt
r79825 r79861 1505 1505 xml/XMLHttpRequestProgressEventThrottle.cpp 1506 1506 xml/XMLHttpRequestUpload.cpp 1507 xml/XMLTreeViewer.cpp 1507 1508 xml/XMLSerializer.cpp 1508 1509 xml/XPathEvaluator.cpp … … 2140 2141 2141 2142 2143 # Generate XMLViewerXSL.h 2144 ADD_CUSTOM_COMMAND( 2145 OUTPUT ${DERIVED_SOURCES_DIR}/XMLViewerXSL.h 2146 MAIN_DEPENDENCY xml/XMLViewer.xsl 2147 COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl XMLViewer_xsl ${WEBCORE_DIR}/xml/XMLViewer.xsl ${DERIVED_SOURCES_DIR}/XMLViewerXSL.h 2148 VERBATIM) 2149 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/XMLViewerXSL.h) 2150 2151 2142 2152 # Generate HTML entity table 2143 2153 ADD_CUSTOM_COMMAND( -
trunk/Source/WebCore/ChangeLog
r79858 r79861 1 2011-02-28 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 XML without style should render as syntax-highlighted source. 6 https://bugs.webkit.org/show_bug.cgi?id=13807 7 8 XML tree view mode implemented. If XML does not have any style 9 information, it is rendered as highlighted source with collapsable 10 elements. 11 12 Tests: fast/css/dumpAsText/xml-stylesheet-pi-not-in-prolog.xml 13 fast/encoding/dumpAsText/utf-16-no-bom.xml 14 http/tests/xmlviewer/dumpAsText/css-stylesheet.xml 15 http/tests/xmlviewer/dumpAsText/frames.html 16 http/tests/xmlviewer/dumpAsText/mathml.xml 17 http/tests/xmlviewer/dumpAsText/svg.xml 18 http/tests/xmlviewer/dumpAsText/wml.xml 19 http/tests/xmlviewer/dumpAsText/xhtml-tag.xml 20 http/tests/xmlviewer/dumpAsText/xlink.xml 21 http/tests/xmlviewer/dumpAsText/xmlviewer-charset-cp1251.xml 22 http/tests/xmlviewer/dumpAsText/xmlviewer-charset-utf8.xml 23 http/tests/xmlviewer/dumpAsText/xmlviewer.xml 24 http/tests/xmlviewer/dumpAsText/xsl-stylesheet.xml 25 http/tests/xmlviewer/dumpAsText/xul.xml 26 svg/hixie/error/dumpAsText/004.xml 27 svg/hixie/error/dumpAsText/005.xml 28 29 * CMakeLists.txt: 30 * DerivedSources.make: 31 * GNUmakefile.am: 32 * WebCore.gyp/WebCore.gyp: 33 * WebCore.gypi: 34 * WebCore.vcproj/WebCore.vcproj: 35 * WebCore.xcodeproj/project.pbxproj: 36 * css/CSSStyleSelector.cpp: 37 (WebCore::CSSStyleSelector::matchUARules): 38 * dom/Document.cpp: 39 (WebCore::Document::Document): 40 (WebCore::Document::createElement): 41 * dom/Document.h: 42 (WebCore::Document::usesViewSourceStyles): 43 (WebCore::Document::setUsesViewSourceStyles): 44 (WebCore::Document::sawElementsInKnownNamespaces): 45 * dom/XMLDocumentParser.h: 46 * dom/XMLDocumentParserLibxml2.cpp: 47 (WebCore::XMLDocumentParser::XMLDocumentParser): 48 (WebCore::XMLDocumentParser::processingInstruction): 49 (WebCore::XMLDocumentParser::initializeParserContext): 50 (WebCore::XMLDocumentParser::doEnd): 51 * dom/XMLDocumentParserQt.cpp: 52 (WebCore::XMLDocumentParser::XMLDocumentParser): 53 (WebCore::XMLDocumentParser::initializeParserContext): 54 (WebCore::XMLDocumentParser::parseProcessingInstruction): 55 * html/HTMLViewSourceDocument.cpp: 56 (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument): 57 * xml/XMLTreeViewer.cpp: Added. 58 (WebCore::XMLTreeViewer::XMLTreeViewer): 59 (WebCore::XMLTreeViewer::hasNoStyleInformation): 60 (WebCore::XMLTreeViewer::transformDocumentToTreeView): 61 * xml/XMLTreeViewer.h: Added. 62 (WebCore::XMLTreeViewer::~XMLTreeViewer): 63 * xml/XMLViewer.xsl: Added. 64 * xml/XSLStyleSheet.h: 65 (WebCore::XSLStyleSheet::createForXMLTreeViewer): 66 1 67 2011-02-28 Yury Semikhatsky <yurys@chromium.org> 2 68 -
trunk/Source/WebCore/DerivedSources.make
r79805 r79861 649 649 # -------- 650 650 651 # XMLViewer XSLT 652 653 all : XMLViewerXSL.h 654 655 XMLViewerXSL.h : xml/XMLViewer.xsl 656 perl $(WebCore)/inspector/xxd.pl XMLViewer_xsl $(WebCore)/xml/XMLViewer.xsl XMLViewerXSL.h 657 658 # -------- 659 651 660 # HTML entity names 652 661 -
trunk/Source/WebCore/GNUmakefile.am
r79825 r79861 647 647 DerivedSources/WebCore/XMLNames.h \ 648 648 DerivedSources/WebCore/XMLNSNames.cpp \ 649 DerivedSources/WebCore/XMLNSNames.h 649 DerivedSources/WebCore/XMLNSNames.h \ 650 DerivedSources/WebCore/XMLViewerXSL.h 650 651 651 652 webcore_sources += \ … … 3625 3626 Source/WebCore/xml/XMLHttpRequestUpload.cpp \ 3626 3627 Source/WebCore/xml/XMLHttpRequestUpload.h \ 3628 Source/WebCore/xml/XMLTreeViewer.cpp \ 3629 Source/WebCore/xml/XMLTreeViewer.h \ 3627 3630 Source/WebCore/xml/XMLSerializer.cpp \ 3628 3631 Source/WebCore/xml/XMLSerializer.h \ … … 4858 4861 $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES_WEBCORE) $(WebCore)/html/DocTypeStrings.gperf 4859 4862 4863 # XML Viewer XSL 4864 DerivedSources/WebCore/XMLViewerXSL.h: $(WebCore)/xml/XMLViewer.xsl 4865 $(PERL) $(WebCore)/inspector/xxd.pl XMLViewer_xsl $(WebCore)/xml/XMLViewer.xsl $(GENSOURCES_WEBCORE)/XMLViewerXSL.h 4866 4860 4867 # HTML entity names 4861 4868 DerivedSources/WebCore/HTMLEntityTable.cpp: $(WebCore)/html/parser/HTMLEntityNames.in $(WebCore)/html/parser/create-html-entity-table -
trunk/Source/WebCore/WebCore.gyp/WebCore.gyp
r79805 r79861 388 388 # Actions to build derived sources. 389 389 { 390 'action_name': 'generateXMLViewerXSL', 391 'inputs': [ 392 '../xml/XMLViewer.xsl', 393 ], 394 'outputs': [ 395 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerXSL.h', 396 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerXSL.cpp', 397 ], 398 'action': [ 399 'perl', 400 '../inspector/xxd.pl', 401 'XMLViewer_xsl', 402 '../xml/XMLViewer.xsl', 403 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerXSL.h' 404 ], 405 }, 406 { 390 407 'action_name': 'HTMLEntityTable', 391 408 'inputs': [ -
trunk/Source/WebCore/WebCore.gypi
r79825 r79861 4640 4640 'xml/XMLHttpRequestUpload.cpp', 4641 4641 'xml/XMLHttpRequestUpload.h', 4642 'xml/XMLTreeViewer.cpp', 4643 'xml/XMLTreeViewer.h', 4642 4644 'xml/XMLSerializer.cpp', 4643 4645 'xml/XMLSerializer.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r79825 r79861 23039 23039 </File> 23040 23040 <File 23041 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\XMLViewerXSL.h" 23042 > 23043 </File> 23044 <File 23041 23045 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\XPathGrammar.cpp" 23042 23046 > … … 40985 40989 </File> 40986 40990 <File 40991 RelativePath="..\xml\XMLTreeViewer.cpp" 40992 > 40993 </File> 40994 <File 40995 RelativePath="..\xml\XMLTreeViewer.h" 40996 > 40997 </File> 40998 <File 40987 40999 RelativePath="..\xml\XMLSerializer.cpp" 40988 41000 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r79825 r79861 1367 1367 550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; }; 1368 1368 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1369 5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */; }; 1370 5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */; }; 1369 1371 590E1B4911E4EF4B0069F784 /* DeviceOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1370 1372 590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */; }; … … 7818 7820 550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 7819 7821 550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 7822 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTreeViewer.cpp; sourceTree = "<group>"; }; 7823 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTreeViewer.h; sourceTree = "<group>"; }; 7820 7824 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientation.h; sourceTree = "<group>"; }; 7821 7825 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceOrientationEventCustom.cpp; sourceTree = "<group>"; }; … … 7826 7830 596229771133EFD700DC4CBB /* GeolocationPositionCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeolocationPositionCache.cpp; sourceTree = "<group>"; }; 7827 7831 596229791133EFE200DC4CBB /* GeolocationPositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationPositionCache.h; sourceTree = "<group>"; }; 7832 5980B03312EF3D8400DF5F85 /* XMLViewer.xsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = XMLViewer.xsl; sourceTree = "<group>"; }; 7828 7833 599E758F11055A1F00D904FA /* Bridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bridge.h; path = bridge/Bridge.h; sourceTree = "<group>"; }; 7829 7834 59A85EA1119D68D900DEF1EF /* DeviceOrientationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceOrientationEvent.cpp; sourceTree = "<group>"; }; … … 18416 18421 BCDFD48C0E305290009D10AD /* XMLHttpRequestUpload.h */, 18417 18422 BCDFD4900E305644009D10AD /* XMLHttpRequestUpload.idl */, 18423 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */, 18424 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */, 18418 18425 1ACE53E40A8D18E70022947D /* XMLSerializer.cpp */, 18419 18426 1ACE53E50A8D18E70022947D /* XMLSerializer.h */, 18420 18427 1ACE53E60A8D18E70022947D /* XMLSerializer.idl */, 18428 5980B03312EF3D8400DF5F85 /* XMLViewer.xsl */, 18421 18429 1AB7FC470A8B92EC00D9D37B /* XPathEvaluator.cpp */, 18422 18430 1AB7FC480A8B92EC00D9D37B /* XPathEvaluator.h */, … … 22451 22459 E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */, 22452 22460 1ACE53EB0A8D18E70022947D /* XMLSerializer.h in Headers */, 22461 5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */, 22453 22462 1AB7FC690A8B92EC00D9D37B /* XPathEvaluator.h in Headers */, 22454 22463 BC60DA5B0D2A31F700B9918F /* XPathException.h in Headers */, … … 25094 25103 E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */, 25095 25104 1ACE53EA0A8D18E70022947D /* XMLSerializer.cpp in Sources */, 25105 5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */, 25096 25106 1AB7FC680A8B92EC00D9D37B /* XPathEvaluator.cpp in Sources */, 25097 25107 1AB7FC6B0A8B92EC00D9D37B /* XPathExpression.cpp in Sources */, -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r79805 r79861 1253 1253 matchRules(defaultQuirksStyle, firstUARule, lastUARule, false); 1254 1254 1255 // If we're in view source mode, then we match rules from the view source style sheet.1256 if (m_checker.m_document-> frame() && m_checker.m_document->frame()->inViewSourceMode()) {1255 // If document uses view source styles (in view source mode or in xml viewer mode), then we match rules from the view source style sheet. 1256 if (m_checker.m_document->usesViewSourceStyles()) { 1257 1257 if (!defaultViewSourceStyle) 1258 1258 loadViewSourceStyle(); -
trunk/Source/WebCore/dom/Document.cpp
r79805 r79861 410 410 , m_isXHTML(isXHTML) 411 411 , m_isHTML(isHTML) 412 , m_usesViewSourceStyles(false) 413 , m_sawElementsInKnownNamespaces(false) 412 414 , m_numNodeListCaches(0) 413 415 #if USE(JSC) … … 960 962 #endif 961 963 962 if (!e) 964 if (e) 965 m_sawElementsInKnownNamespaces = true; 966 else 963 967 e = Element::create(qName, document()); 964 968 -
trunk/Source/WebCore/dom/Document.h
r79805 r79861 436 436 437 437 CSSStyleSelector* styleSelectorIfExists() const { return m_styleSelector.get(); } 438 439 bool usesViewSourceStyles() const { return m_usesViewSourceStyles; } 440 void setUsesViewSourceStyles(bool usesViewSourceStyles) { m_usesViewSourceStyles = usesViewSourceStyles; } 441 442 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNamespaces; } 443 438 444 CSSStyleSelector* styleSelector() 439 445 { … … 1371 1377 bool m_isHTML; 1372 1378 1379 bool m_usesViewSourceStyles; 1380 bool m_sawElementsInKnownNamespaces; 1381 1373 1382 unsigned m_numNodeListCaches; 1374 1383 -
trunk/Source/WebCore/dom/XMLDocumentParser.h
r79805 r79861 195 195 196 196 bool m_sawError; 197 bool m_sawCSS; 197 198 bool m_sawXSLTransform; 198 199 bool m_sawFirstElement; -
trunk/Source/WebCore/dom/XMLDocumentParserLibxml2.cpp
r79805 r79861 64 64 65 65 #if ENABLE(XSLT) 66 #include "XMLTreeViewer.h" 66 67 #include <libxslt/xslt.h> 67 68 #endif 68 69 69 70 #if ENABLE(XHTMLMP) 70 #include "HTMLNames.h"71 71 #include "HTMLScriptElement.h" 72 72 #endif 73 73 74 74 75 using namespace std; … … 549 550 , m_currentNode(document) 550 551 , m_sawError(false) 552 , m_sawCSS(false) 551 553 , m_sawXSLTransform(false) 552 554 , m_sawFirstElement(false) … … 575 577 , m_currentNode(fragment) 576 578 , m_sawError(false) 579 , m_sawCSS(false) 577 580 , m_sawXSLTransform(false) 578 581 , m_sawFirstElement(false) … … 968 971 969 972 // ### handle exceptions 970 int exception= 0;973 ExceptionCode ec = 0; 971 974 RefPtr<ProcessingInstruction> pi = document()->createProcessingInstruction( 972 toString(target), toString(data), e xception);973 if (e xception)975 toString(target), toString(data), ec); 976 if (ec) 974 977 return; 975 978 … … 982 985 pi->finishParsingChildren(); 983 986 987 if (pi->isCSS()) 988 m_sawCSS = true; 984 989 #if ENABLE(XSLT) 985 990 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); … … 1308 1313 DocumentParser::startParsing(); 1309 1314 m_sawError = false; 1315 m_sawCSS = false; 1310 1316 m_sawXSLTransform = false; 1311 1317 m_sawFirstElement = false; … … 1322 1328 void XMLDocumentParser::doEnd() 1323 1329 { 1330 if (!isStopped()) { 1331 if (m_context) { 1332 // Tell libxml we're done. 1333 { 1334 XMLDocumentParserScope scope(document()->cachedResourceLoader()); 1335 xmlParseChunk(context(), 0, 0, 1); 1336 } 1337 1338 m_context = 0; 1339 } 1340 } 1341 1324 1342 #if ENABLE(XSLT) 1325 if (m_sawXSLTransform) { 1343 XMLTreeViewer xmlTreeViewer(document()); 1344 1345 bool xmlViewerMode = !m_sawError && !m_sawCSS && !m_sawXSLTransform && xmlTreeViewer.hasNoStyleInformation(); 1346 1347 if (xmlViewerMode || m_sawXSLTransform) { 1326 1348 void* doc = xmlDocPtrForString(document()->cachedResourceLoader(), m_originalSourceForTransform, document()->url().string()); 1327 1349 document()->setTransformSource(new TransformSource(doc)); 1328 1350 1329 document()->setParsing(false); // Make the doc think it's done, so it will apply xsl sheets. 1330 document()->styleSelectorChanged(RecalcStyleImmediately); 1331 document()->setParsing(true); 1351 if (xmlViewerMode) 1352 xmlTreeViewer.transformDocumentToTreeView(); 1353 else { 1354 document()->setParsing(false); // Make the document think it's done, so it will apply XSL stylesheets. 1355 document()->styleSelectorChanged(RecalcStyleImmediately); 1356 document()->setParsing(true); 1357 } 1358 1332 1359 DocumentParser::stopParsing(); 1333 1360 } 1334 1361 #endif 1335 1362 1336 if (isStopped())1337 return;1338 1339 if (m_context) {1340 // Tell libxml we're done.1341 {1342 XMLDocumentParserScope scope(document()->cachedResourceLoader());1343 xmlParseChunk(context(), 0, 0, 1);1344 }1345 1346 m_context = 0;1347 }1348 1363 } 1349 1364 -
trunk/Source/WebCore/dom/XMLDocumentParserQt.cpp
r79805 r79861 92 92 , m_currentNode(document) 93 93 , m_sawError(false) 94 , m_sawCSS(false) 94 95 , m_sawXSLTransform(false) 95 96 , m_sawFirstElement(false) … … 118 119 , m_currentNode(fragment) 119 120 , m_sawError(false) 121 , m_sawCSS(false) 120 122 , m_sawXSLTransform(false) 121 123 , m_sawFirstElement(false) … … 206 208 DocumentParser::startParsing(); 207 209 m_sawError = false; 210 m_sawCSS = false; 208 211 m_sawXSLTransform = false; 209 212 m_sawFirstElement = false; … … 641 644 pi->finishParsingChildren(); 642 645 646 if (pi->isCSS()) 647 m_sawCSS = true; 643 648 #if ENABLE(XSLT) 644 649 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); -
trunk/Source/WebCore/html/HTMLViewSourceDocument.cpp
r79805 r79861 53 53 { 54 54 setUsesBeforeAfterRules(true); 55 setUsesViewSourceStyles(true); 56 55 57 setCompatibilityMode(QuirksMode); 56 58 lockCompatibilityMode(); -
trunk/Source/WebCore/xml/XSLStyleSheet.h
r79805 r79861 64 64 } 65 65 66 static PassRefPtr<XSLStyleSheet> createForXMLTreeViewer(Node* node, const String& sheetString) 67 { 68 RefPtr<XSLStyleSheet> sheet = adoptRef(new XSLStyleSheet(node, String(), KURL(), false)); 69 sheet->parseString(sheetString); 70 71 return sheet.release(); 72 } 73 66 74 virtual ~XSLStyleSheet(); 67 75
Note: See TracChangeset
for help on using the changeset viewer.