Changeset 80151 in webkit
- Timestamp:
- Mar 2, 2011 11:34:00 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 16 added
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r80148 r80151 1 2011-03-02 Carol Szabo <carol.szabo@nokia.com> 2 3 Reviewed by David Hyatt <hyatt@apple.com> 4 5 content property doesn't support quotes 6 https://bugs.webkit.org/show_bug.cgi?id=6503 7 8 Added new tests for quotes. Fixed a few afected expected results. 9 10 * fast/css/content/content-quotes-01-expected.txt: Added. 11 * fast/css/content/content-quotes-01.html: Added. 12 * fast/css/content/content-quotes-02-expected.txt: Added. 13 * fast/css/content/content-quotes-02.html: Added. 14 * fast/css/content/content-quotes-03-expected.txt: Added. 15 * fast/css/content/content-quotes-03.html: Added. 16 * fast/css/content/content-quotes-04-expected.txt: Added. 17 * fast/css/content/content-quotes-04.html: Added. 18 * fast/css/content/content-quotes-05-expected.txt: Added. 19 * fast/css/content/content-quotes-05.html: Added. 20 * fast/css/content/content-quotes-06-expected.txt: Added. 21 * fast/css/content/content-quotes-06.html: Added. 22 * platform/mac/fast/css-generated-content/005-expected.txt: 23 * platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt: 24 * platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt: 25 * platform/qt/fast/css-generated-content/005-expected.txt: 26 * platform/qt/fast/css-generated-content/beforeAfter-interdocument-expected.txt: 27 * platform/qt/fast/css-generated-content/no-openclose-quote-expected.txt: 28 1 29 2011-03-02 Tony Gentilcore <tonyg@chromium.org> 2 30 -
trunk/LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt
r25970 r80151 7 7 RenderInline {Q} at (0,0) size 158x18 8 8 RenderInline (generated) at (0,0) size 7x18 9 Render Textat (0,0) size 7x189 RenderQuote at (0,0) size 7x18 10 10 text run at (0,0) width 7: "\"" 11 11 RenderText {#text} at (7,0) size 151x18 … … 18 18 text run at (0,0) width 53: "this text." 19 19 RenderInline (generated) at (0,0) size 7x18 20 Render Textat (53,0) size 7x1820 RenderQuote at (53,0) size 7x18 21 21 text run at (53,0) width 7: "\"" 22 22 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt
r40921 r80151 19 19 RenderInline {Q} at (0,0) size 158x18 20 20 RenderInline (generated) at (0,0) size 7x18 21 Render Textat (0,0) size 7x1821 RenderQuote at (0,0) size 7x18 22 22 text run at (0,0) width 7: "\"" 23 23 RenderText {#text} at (7,0) size 151x18 … … 30 30 text run at (0,0) width 53: "this text." 31 31 RenderInline (generated) at (0,0) size 7x18 32 Render Textat (53,0) size 7x1832 RenderQuote at (53,0) size 7x18 33 33 text run at (53,0) width 7: "\"" -
trunk/LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt
r30635 r80151 8 8 RenderText at (0,0) size 8x18 9 9 text run at (0,0) width 8: "*" 10 RenderQuote at (0,0) size 0x0 10 11 RenderText {#text} at (8,0) size 425x18 11 12 text run at (8,0) width 114: "This is some text. " … … 14 15 RenderText at (433,0) size 8x18 15 16 text run at (433,0) width 8: "*" 17 RenderQuote at (0,0) size 0x0 -
trunk/LayoutTests/platform/qt/fast/css-generated-content/005-expected.txt
r79870 r80151 7 7 RenderInline {Q} at (0,0) size 173x21 8 8 RenderInline (generated) at (0,0) size 9x21 9 Render Textat (0,0) size 9x219 RenderQuote at (0,0) size 9x21 10 10 text run at (0,0) width 9: "\"" 11 11 RenderText {#text} at (9,0) size 164x21 … … 18 18 text run at (0,0) width 57: "this text." 19 19 RenderInline (generated) at (0,0) size 9x21 20 Render Textat (57,0) size 9x2120 RenderQuote at (57,0) size 9x21 21 21 text run at (57,0) width 9: "\"" 22 22 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/qt/fast/css-generated-content/beforeAfter-interdocument-expected.txt
r79870 r80151 19 19 RenderInline {Q} at (0,0) size 173x21 20 20 RenderInline (generated) at (0,0) size 9x21 21 Render Textat (0,0) size 9x2121 RenderQuote at (0,0) size 9x21 22 22 text run at (0,0) width 9: "\"" 23 23 RenderText {#text} at (9,0) size 164x21 … … 30 30 text run at (0,0) width 57: "this text." 31 31 RenderInline (generated) at (0,0) size 9x21 32 Render Textat (57,0) size 9x2132 RenderQuote at (57,0) size 9x21 33 33 text run at (57,0) width 9: "\"" -
trunk/LayoutTests/platform/qt/fast/css-generated-content/no-openclose-quote-expected.txt
r79870 r80151 8 8 RenderText at (0,0) size 8x21 9 9 text run at (0,0) width 8: "*" 10 RenderQuote at (0,0) size 0x0 10 11 RenderText {#text} at (8,0) size 455x21 11 12 text run at (8,0) width 119: "This is some text. " … … 14 15 RenderText at (463,0) size 8x21 15 16 text run at (463,0) width 8: "*" 17 RenderQuote at (0,0) size 0x0 -
trunk/Source/WebCore/Android.mk
r80041 r80151 703 703 rendering/RenderObjectChildList.cpp \ 704 704 rendering/RenderPart.cpp \ 705 rendering/RenderQuote.cpp \ 705 706 rendering/RenderReplaced.cpp \ 706 707 rendering/RenderReplica.cpp \ … … 792 793 rendering/style/KeyframeList.cpp \ 793 794 rendering/style/NinePieceImage.cpp \ 795 rendering/style/QuotesData.cpp \ 794 796 rendering/style/RenderStyle.cpp \ 795 797 -
trunk/Source/WebCore/CMakeLists.txt
r80041 r80151 1378 1378 rendering/RenderPart.cpp 1379 1379 rendering/RenderProgress.cpp 1380 rendering/RenderQuote.cpp 1380 1381 rendering/RenderReplaced.cpp 1381 1382 rendering/RenderReplica.cpp … … 1415 1416 rendering/style/KeyframeList.cpp 1416 1417 rendering/style/NinePieceImage.cpp 1418 rendering/style/QuotesData.cpp 1417 1419 rendering/style/RenderStyle.cpp 1418 1420 rendering/style/ShadowData.cpp -
trunk/Source/WebCore/ChangeLog
r80150 r80151 1 2011-03-02 Carol Szabo <carol.szabo@nokia.com> 2 3 Reviewed by David Hyatt <hyatt@apple.com> 4 5 content property doesn't support quotes 6 https://bugs.webkit.org/show_bug.cgi?id=6503 7 8 Added full support for quotes as defined by CSS 2.1. 9 10 Tests: fast/css/content/content-quotes-01.html 11 fast/css/content/content-quotes-02.html 12 fast/css/content/content-quotes-03.html 13 fast/css/content/content-quotes-04.html 14 fast/css/content/content-quotes-05.html 15 fast/css/content/content-quotes-06.html 16 17 * Android.mk: 18 * CMakeLists.txt: 19 * GNUmakefile.am: 20 * WebCore.gypi: 21 * WebCore.pro: 22 * WebCore.vcproj/WebCore.vcproj: 23 * WebCore.xcodeproj/project.pbxproj: 24 Added RenderQuote.cpp/h and QuotesData.cpp/h to the dependency lists 25 * css/CSSParser.cpp: 26 (WebCore::CSSParser::parseValue): 27 (WebCore::CSSParser::parseQuotes): 28 * css/CSSParser.h: 29 Added needed stylesheet parsing support for quotes, 30 (no-)open-quote and (no-)close-quote 31 * css/CSSStyleSelector.cpp: 32 (WebCore::CSSStyleSelector::applyProperty): 33 Handled setting of the new quotes RenderStyle property and added 34 handling of quotes for the content property. 35 * css/html.css: 36 (q:before): 37 (q:after): 38 replaced the '"' workaround with open/close-quote 39 * rendering/RenderBlockLineLayout.cpp: 40 (WebCore::dirtyLineBoxesForRenderer): 41 Made RenderQuote behave like RenderCounter. 42 Needed to ensure that the Quote text is calculated before layout, 43 just as it is for RenderCounter. 44 * rendering/RenderObject.h: 45 (WebCore::RenderObject::isQuote): 46 * rendering/RenderObjectChildList.cpp: 47 (WebCore::RenderObjectChildList::removeChildNode): 48 (WebCore::RenderObjectChildList::appendChildNode): 49 (WebCore::RenderObjectChildList::insertChildNode): 50 Handled updating of quote depth when renderers are added and removed 51 from the tree. 52 (WebCore::RenderObjectChildList::updateBeforeAfterContent): 53 Added support for Quote content. 54 * rendering/RenderQuote.cpp: Added. 55 (WebCore::adjustDepth): 56 (WebCore::RenderQuote::RenderQuote): 57 (WebCore::RenderQuote::~RenderQuote): 58 (WebCore::RenderQuote::renderName): 59 (WebCore::RenderQuote::placeQuote): 60 (WebCore::LanguageData::operator<): 61 (WebCore::defaultLanguageQuotes): 62 (WebCore::quotesMap): 63 (WebCore::quotesForLanguage): 64 (WebCore::defaultQuotes): 65 (WebCore::RenderQuote::originalText): 66 (WebCore::RenderQuote::computePreferredLogicalWidths): 67 (WebCore::RenderQuote::rendererSubtreeAttached): 68 (WebCore::RenderQuote::rendererRemovedFromTree): 69 (WebCore::RenderQuote::styleDidChange): 70 * rendering/RenderQuote.h: Added. 71 (WebCore::RenderQuote::isQuote): 72 (WebCore::toRenderQuote): 73 * rendering/RenderingAllInOne.cpp: 74 Included RenderQuote.cpp 75 * rendering/style/StyleAllInOne.cpp: 76 Included QuotesData.cpp 77 * rendering/style/ContentData.cpp: 78 (WebCore::ContentData::dataEquivalent): 79 Checked for quotetype identity. 80 (WebCore::ContentData::deleteContent): 81 Accounted for the new QUOTE_TYPE. 82 * rendering/style/ContentData.h: 83 (WebCore::ContentData::isQuote): 84 (WebCore::ContentData::quote): 85 (WebCore::ContentData::setQuote): 86 * rendering/style/QuotesData.cpp: Added. 87 (WebCore::QuotesData::create): 88 (WebCore::QuotesData::operator==): 89 (WebCore::QuotesData::~QuotesData): 90 * rendering/style/QuotesData.h: Added. 91 (WebCore::QuotesData::data): 92 (WebCore::QuotesData::operator delete): 93 (WebCore::QuotesData::QuotesData): 94 * rendering/style/RenderStyle.cpp: 95 (WebCore::RenderStyle::setContent): 96 (WebCore::RenderStyle::setQuotes): 97 * rendering/style/RenderStyle.h: 98 (WebCore::InheritedFlags::quotes): 99 (WebCore::InheritedFlags::setQuotes): 100 * rendering/style/RenderStyleConstants.h: 101 * rendering/style/StyleAllInOne.cpp: 102 Added QuotesData.cpp to the included files list. 103 * rendering/style/StyleRareInheritedData.cpp: 104 (WebCore::StyleRareInheritedData::operator==): 105 Included quotes in equality check. 106 * rendering/style/StyleRareInheritedData.h: 107 Added quotes 108 1 109 2011-03-02 Antti Koivisto <antti@apple.com> 2 110 -
trunk/Source/WebCore/GNUmakefile.am
r80086 r80151 2829 2829 Source/WebCore/rendering/RenderProgress.cpp \ 2830 2830 Source/WebCore/rendering/RenderProgress.h \ 2831 Source/WebCore/rendering/RenderQuote.cpp \ 2832 Source/WebCore/rendering/RenderQuote.h \ 2831 2833 Source/WebCore/rendering/RenderReplaced.cpp \ 2832 2834 Source/WebCore/rendering/RenderReplaced.h \ … … 2931 2933 Source/WebCore/rendering/style/NinePieceImage.h \ 2932 2934 Source/WebCore/rendering/style/OutlineValue.h \ 2935 Source/WebCore/rendering/style/QuotesData.cpp \ 2936 Source/WebCore/rendering/style/QuotesData.h \ 2933 2937 Source/WebCore/rendering/style/RenderStyleConstants.h \ 2934 2938 Source/WebCore/rendering/style/RenderStyle.cpp \ -
trunk/Source/WebCore/WebCore.gypi
r80135 r80151 3714 3714 'rendering/style/NinePieceImage.h', 3715 3715 'rendering/style/OutlineValue.h', 3716 'rendering/style/QuotesData.cpp', 3717 'rendering/style/QuotesData.h', 3716 3718 'rendering/style/RenderStyle.cpp', 3717 3719 'rendering/style/RenderStyle.h', … … 3973 3975 'rendering/RenderProgress.cpp', 3974 3976 'rendering/RenderProgress.h', 3977 'rendering/RenderQuote.cpp', 3978 'rendering/RenderQuote.h', 3975 3979 'rendering/RenderReplaced.cpp', 3976 3980 'rendering/RenderReplaced.h', -
trunk/Source/WebCore/WebCore.pro
r80041 r80151 1089 1089 rendering/RenderPart.cpp \ 1090 1090 rendering/RenderProgress.cpp \ 1091 rendering/RenderQuote.cpp \ 1091 1092 rendering/RenderReplaced.cpp \ 1092 1093 rendering/RenderReplica.cpp \ … … 1124 1125 rendering/style/KeyframeList.cpp \ 1125 1126 rendering/style/NinePieceImage.cpp \ 1127 rendering/style/QuotesData.cpp \ 1126 1128 rendering/style/RenderStyle.cpp \ 1127 1129 rendering/style/ShadowData.cpp \ … … 2076 2078 rendering/RenderPart.h \ 2077 2079 rendering/RenderProgress.h \ 2080 rendering/RenderQuote.h \ 2078 2081 rendering/RenderReplaced.h \ 2079 2082 rendering/RenderReplica.h \ … … 2113 2116 rendering/style/KeyframeList.h \ 2114 2117 rendering/style/NinePieceImage.h \ 2118 rendering/style/QuotesData.h \ 2115 2119 rendering/style/RenderStyle.h \ 2116 2120 rendering/style/ShadowData.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r80145 r80151 35031 35031 </File> 35032 35032 <File 35033 RelativePath="..\rendering\RenderQuote.cpp" 35034 > 35035 <FileConfiguration 35036 Name="Debug|Win32" 35037 ExcludedFromBuild="true" 35038 > 35039 <Tool 35040 Name="VCCLCompilerTool" 35041 /> 35042 </FileConfiguration> 35043 <FileConfiguration 35044 Name="Release|Win32" 35045 ExcludedFromBuild="true" 35046 > 35047 <Tool 35048 Name="VCCLCompilerTool" 35049 /> 35050 </FileConfiguration> 35051 <FileConfiguration 35052 Name="Debug_Cairo_CFLite|Win32" 35053 ExcludedFromBuild="true" 35054 > 35055 <Tool 35056 Name="VCCLCompilerTool" 35057 /> 35058 </FileConfiguration> 35059 <FileConfiguration 35060 Name="Release_Cairo_CFLite|Win32" 35061 ExcludedFromBuild="true" 35062 > 35063 <Tool 35064 Name="VCCLCompilerTool" 35065 /> 35066 </FileConfiguration> 35067 <FileConfiguration 35068 Name="Debug_All|Win32" 35069 ExcludedFromBuild="true" 35070 > 35071 <Tool 35072 Name="VCCLCompilerTool" 35073 /> 35074 </FileConfiguration> 35075 <FileConfiguration 35076 Name="Release_LTCG|Win32" 35077 ExcludedFromBuild="true" 35078 > 35079 <Tool 35080 Name="VCCLCompilerTool" 35081 /> 35082 </FileConfiguration> 35083 </File> 35084 <File 35085 RelativePath="..\rendering\RenderQuote.h" 35086 > 35087 </File> 35088 <File 35033 35089 RelativePath="..\rendering\RenderReplaced.cpp" 35034 35090 > … … 38941 38997 <File 38942 38998 RelativePath="..\rendering\style\OutlineValue.h" 38999 > 39000 </File> 39001 <File 39002 RelativePath="..\rendering\style\QuotesData.cpp" 39003 > 39004 <FileConfiguration 39005 Name="Debug|Win32" 39006 ExcludedFromBuild="true" 39007 > 39008 <Tool 39009 Name="VCCLCompilerTool" 39010 /> 39011 </FileConfiguration> 39012 <FileConfiguration 39013 Name="Release|Win32" 39014 ExcludedFromBuild="true" 39015 > 39016 <Tool 39017 Name="VCCLCompilerTool" 39018 /> 39019 </FileConfiguration> 39020 <FileConfiguration 39021 Name="Debug_Cairo_CFLite|Win32" 39022 ExcludedFromBuild="true" 39023 > 39024 <Tool 39025 Name="VCCLCompilerTool" 39026 /> 39027 </FileConfiguration> 39028 <FileConfiguration 39029 Name="Release_Cairo_CFLite|Win32" 39030 ExcludedFromBuild="true" 39031 > 39032 <Tool 39033 Name="VCCLCompilerTool" 39034 /> 39035 </FileConfiguration> 39036 <FileConfiguration 39037 Name="Debug_All|Win32" 39038 ExcludedFromBuild="true" 39039 > 39040 <Tool 39041 Name="VCCLCompilerTool" 39042 /> 39043 </FileConfiguration> 39044 <FileConfiguration 39045 Name="Release_LTCG|Win32" 39046 ExcludedFromBuild="true" 39047 > 39048 <Tool 39049 Name="VCCLCompilerTool" 39050 /> 39051 </FileConfiguration> 39052 </File> 39053 <File 39054 RelativePath="..\rendering\style\QuotesData.h" 38943 39055 > 38944 39056 </File> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r80145 r80151 1404 1404 59EE12301106081F00885116 /* JNIUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59EE122F1106081F00885116 /* JNIUtility.cpp */; }; 1405 1405 59EE12321106082900885116 /* JNIUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 59EE12311106082900885116 /* JNIUtility.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1406 5A574F24131DB93900471B88 /* RenderQuote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5A574F22131DB93900471B88 /* RenderQuote.cpp */; }; 1407 5A574F25131DB93900471B88 /* RenderQuote.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A574F23131DB93900471B88 /* RenderQuote.h */; }; 1408 5A574F28131DB96D00471B88 /* QuotesData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5A574F26131DB96D00471B88 /* QuotesData.cpp */; }; 1409 5A574F29131DB96D00471B88 /* QuotesData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A574F27131DB96D00471B88 /* QuotesData.h */; }; 1406 1410 5D15E3AB0F9E6AC1009E0E3F /* XMLDocumentParserScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D15E3A90F9E6AC1009E0E3F /* XMLDocumentParserScope.cpp */; }; 1407 1411 5D15E3AC0F9E6AC1009E0E3F /* XMLDocumentParserScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D15E3AA0F9E6AC1009E0E3F /* XMLDocumentParserScope.h */; }; … … 7863 7867 59EE122F1106081F00885116 /* JNIUtility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JNIUtility.cpp; sourceTree = "<group>"; }; 7864 7868 59EE12311106082900885116 /* JNIUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JNIUtility.h; sourceTree = "<group>"; }; 7869 5A574F22131DB93900471B88 /* RenderQuote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderQuote.cpp; sourceTree = "<group>"; }; 7870 5A574F23131DB93900471B88 /* RenderQuote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderQuote.h; sourceTree = "<group>"; }; 7871 5A574F26131DB96D00471B88 /* QuotesData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QuotesData.cpp; path = style/QuotesData.cpp; sourceTree = "<group>"; }; 7872 5A574F27131DB96D00471B88 /* QuotesData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuotesData.h; path = style/QuotesData.h; sourceTree = "<group>"; }; 7865 7873 5D15E3A90F9E6AC1009E0E3F /* XMLDocumentParserScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLDocumentParserScope.cpp; sourceTree = "<group>"; }; 7866 7874 5D15E3AA0F9E6AC1009E0E3F /* XMLDocumentParserScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLDocumentParserScope.h; sourceTree = "<group>"; }; … … 18005 18013 isa = PBXGroup; 18006 18014 children = ( 18015 5A574F26131DB96D00471B88 /* QuotesData.cpp */, 18016 5A574F27131DB96D00471B88 /* QuotesData.h */, 18007 18017 BC5EB5E00E81BE8700B25965 /* BorderData.h */, 18008 18018 BC5EB5DA0E81B7EA00B25965 /* BorderValue.h */, … … 18849 18859 A43BF59A1149292800C643CA /* RenderProgress.cpp */, 18850 18860 A43BF59B1149292800C643CA /* RenderProgress.h */, 18861 5A574F22131DB93900471B88 /* RenderQuote.cpp */, 18862 5A574F23131DB93900471B88 /* RenderQuote.h */, 18851 18863 A871DFDE0A15376B00B12A68 /* RenderReplaced.cpp */, 18852 18864 A871DFDF0A15376B00B12A68 /* RenderReplaced.h */, … … 22497 22509 E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */, 22498 22510 977E2E0F12F0FC9C00C13379 /* XSSFilter.h in Headers */, 22511 5A574F25131DB93900471B88 /* RenderQuote.h in Headers */, 22512 5A574F29131DB96D00471B88 /* QuotesData.h in Headers */, 22499 22513 339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */, 22500 22514 33D0212D131DB37B004091A8 /* CookieStorage.h in Headers */, … … 25145 25159 E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */, 25146 25160 977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */, 25161 5A574F24131DB93900471B88 /* RenderQuote.cpp in Sources */, 25162 5A574F28131DB96D00471B88 /* QuotesData.cpp in Sources */, 25147 25163 ); 25148 25164 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/css/CSSParser.cpp
r80150 r80151 635 635 if (id) 636 636 validPrimitive = true; 637 else 638 return parseQuotes(propId, important); 637 639 break; 638 640 case CSSPropertyUnicodeBidi: // normal | embed | bidi-override | inherit … … 2353 2355 return None; 2354 2356 } 2357 } 2358 2359 // [ <string> <string> ]+ | inherit | none 2360 // inherit and none are handled in parseValue. 2361 bool CSSParser::parseQuotes(int propId, bool important) 2362 { 2363 RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated(); 2364 while (CSSParserValue* val = m_valueList->current()) { 2365 RefPtr<CSSValue> parsedValue; 2366 if (val->unit == CSSPrimitiveValue::CSS_STRING) 2367 parsedValue = CSSPrimitiveValue::create(val->string, CSSPrimitiveValue::CSS_STRING); 2368 else 2369 break; 2370 values->append(parsedValue.release()); 2371 m_valueList->next(); 2372 } 2373 if (values->length()) { 2374 addProperty(propId, values.release(), important); 2375 m_valueList->next(); 2376 return true; 2377 } 2378 return false; 2355 2379 } 2356 2380 -
trunk/Source/WebCore/css/CSSParser.h
r80041 r80151 80 80 bool parse4Values(int propId, const int* properties, bool important); 81 81 bool parseContent(int propId, bool important); 82 bool parseQuotes(int propId, bool important); 82 83 83 84 PassRefPtr<CSSValue> parseAttr(CSSParserValueList* args); -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r80150 r80151 72 72 #include "Pair.h" 73 73 #include "PerspectiveTransformOperation.h" 74 #include "QuotesData.h" 74 75 #include "Rect.h" 75 76 #include "RenderScrollbar.h" … … 4754 4755 CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item); 4755 4756 switch (contentValue->primitiveType()) { 4756 case CSSPrimitiveValue::CSS_STRING: 4757 m_style->setContent(contentValue->getStringValue().impl(), didSet); 4757 case CSSPrimitiveValue::CSS_STRING: 4758 m_style->setContent(contentValue->getStringValue().impl(), didSet); 4759 didSet = true; 4760 break; 4761 case CSSPrimitiveValue::CSS_ATTR: { 4762 // FIXME: Can a namespace be specified for an attr(foo)? 4763 if (m_style->styleType() == NOPSEUDO) 4764 m_style->setUnique(); 4765 else 4766 m_parentStyle->setUnique(); 4767 QualifiedName attr(nullAtom, contentValue->getStringValue().impl(), nullAtom); 4768 m_style->setContent(m_element->getAttribute(attr).impl(), didSet); 4769 didSet = true; 4770 // register the fact that the attribute value affects the style 4771 m_selectorAttrs.add(attr.localName().impl()); 4772 break; 4773 } 4774 case CSSPrimitiveValue::CSS_URI: { 4775 if (!contentValue->isImageValue()) 4776 break; 4777 m_style->setContent(cachedOrPendingFromValue(CSSPropertyContent, static_cast<CSSImageValue*>(contentValue)), didSet); 4778 didSet = true; 4779 break; 4780 } 4781 case CSSPrimitiveValue::CSS_COUNTER: { 4782 Counter* counterValue = contentValue->getCounterValue(); 4783 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(counterValue->identifier(), 4784 (EListStyleType)counterValue->listStyleNumber(), counterValue->separator())); 4785 m_style->setContent(counter.release(), didSet); 4786 didSet = true; 4787 break; 4788 } 4789 case CSSPrimitiveValue::CSS_IDENT: 4790 switch (contentValue->getIdent()) { 4791 case CSSValueOpenQuote: 4792 m_style->setContent(OPEN_QUOTE, didSet); 4758 4793 didSet = true; 4759 4794 break; 4760 case CSSPrimitiveValue::CSS_ATTR: { 4761 // FIXME: Can a namespace be specified for an attr(foo)? 4762 if (m_style->styleType() == NOPSEUDO) 4763 m_style->setUnique(); 4764 else 4765 m_parentStyle->setUnique(); 4766 QualifiedName attr(nullAtom, contentValue->getStringValue().impl(), nullAtom); 4767 m_style->setContent(m_element->getAttribute(attr).impl(), didSet); 4768 didSet = true; 4769 // register the fact that the attribute value affects the style 4770 m_selectorAttrs.add(attr.localName().impl()); 4771 break; 4772 } 4773 case CSSPrimitiveValue::CSS_URI: { 4774 if (!contentValue->isImageValue()) 4775 break; 4776 m_style->setContent(cachedOrPendingFromValue(CSSPropertyContent, static_cast<CSSImageValue*>(contentValue)), didSet); 4795 case CSSValueCloseQuote: 4796 m_style->setContent(CLOSE_QUOTE, didSet); 4777 4797 didSet = true; 4778 4798 break; 4779 } 4780 case CSSPrimitiveValue::CSS_COUNTER: { 4781 Counter* counterValue = contentValue->getCounterValue(); 4782 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(counterValue->identifier(), 4783 (EListStyleType)counterValue->listStyleNumber(), counterValue->separator())); 4784 m_style->setContent(counter.release(), didSet); 4799 case CSSValueNoOpenQuote: 4800 m_style->setContent(NO_OPEN_QUOTE, didSet); 4785 4801 didSet = true; 4802 break; 4803 case CSSValueNoCloseQuote: 4804 m_style->setContent(NO_CLOSE_QUOTE, didSet); 4805 didSet = true; 4806 break; 4807 default: 4808 // normal and none do not have any effect. 4809 {} 4786 4810 } 4787 4811 } … … 4791 4815 return; 4792 4816 } 4817 case CSSPropertyQuotes: 4818 if (isInherit) { 4819 if (m_parentStyle) 4820 m_style->setQuotes(m_parentStyle->quotes()); 4821 return; 4822 } 4823 if (isInitial) { 4824 m_style->setQuotes(0); 4825 return; 4826 } 4827 if (value->isValueList()) { 4828 CSSValueList* list = static_cast<CSSValueList*>(value); 4829 size_t length = list->length(); 4830 QuotesData* data = QuotesData::create(length); 4831 if (!data) 4832 return; // Out of memory 4833 String* quotes = data->data(); 4834 for (size_t i = 0; i < length; i++) { 4835 CSSValue* item = list->itemWithoutBoundsCheck(i); 4836 ASSERT(item->isPrimitiveValue()); 4837 primitiveValue = static_cast<CSSPrimitiveValue*>(item); 4838 ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_STRING); 4839 quotes[i] = primitiveValue->getStringValue(); 4840 } 4841 m_style->setQuotes(adoptRef(data)); 4842 } else if (primitiveValue) { 4843 ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT); 4844 if (primitiveValue->getIdent() == CSSValueNone) 4845 m_style->setQuotes(adoptRef(QuotesData::create(0))); 4846 } 4847 return; 4793 4848 4794 4849 case CSSPropertyCounterIncrement: … … 6032 6087 case CSSPropertyFontStretch: 6033 6088 case CSSPropertyPage: 6034 case CSSPropertyQuotes:6035 6089 case CSSPropertyTextLineThrough: 6036 6090 case CSSPropertyTextLineThroughColor: -
trunk/Source/WebCore/css/html.css
r80041 r80151 114 114 115 115 q:before { 116 content: '"' 117 /* FIXME: content: open-quote; */ 116 content: open-quote; 118 117 } 119 118 120 119 q:after { 121 content: '"' 122 /* FIXME: content: close-quote; */ 120 content: close-quote; 123 121 } 124 122 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r80041 r80151 179 179 { 180 180 if (o->isText()) { 181 if (o->preferredLogicalWidthsDirty() && o->isCounter())181 if (o->preferredLogicalWidthsDirty() && (o->isCounter() || o->isQuote())) 182 182 toRenderText(o)->computePreferredLogicalWidths(0); // FIXME: Counters depend on this hack. No clue why. Should be investigated and removed. 183 183 toRenderText(o)->dirtyLineBoxes(fullLayout); -
trunk/Source/WebCore/rendering/RenderObject.h
r80041 r80151 253 253 virtual bool isBoxModelObject() const { return false; } 254 254 virtual bool isCounter() const { return false; } 255 virtual bool isQuote() const { return false; } 255 256 virtual bool isDetails() const { return false; } 256 257 virtual bool isDetailsMarker() const { return false; } -
trunk/Source/WebCore/rendering/RenderObjectChildList.cpp
r80041 r80151 37 37 #include "RenderLayer.h" 38 38 #include "RenderListItem.h" 39 #include "RenderQuote.h" 39 40 #include "RenderStyle.h" 40 41 #include "RenderTextFragment.h" … … 131 132 if (oldChild->m_hasCounterNodeMap) 132 133 RenderCounter::destroyCounterNodes(oldChild); 134 RenderQuote::rendererRemovedFromTree(oldChild); 133 135 134 136 if (AXObjectCache::accessibilityEnabled()) … … 178 180 owner->dirtyLinesFromChangedChild(newChild); 179 181 } 180 181 182 RenderCounter::rendererSubtreeAttached(newChild); 183 RenderQuote::rendererSubtreeAttached(newChild); 182 184 newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing block hierarchy. 183 185 if (!owner->normalChildNeedsLayout()) … … 240 242 241 243 RenderCounter::rendererSubtreeAttached(child); 244 RenderQuote::rendererSubtreeAttached(child); 242 245 child->setNeedsLayoutAndPrefWidthsRecalc(); 243 246 if (!owner->normalChildNeedsLayout()) … … 461 464 break; 462 465 } 463 case CONTENT_COUNTER: 464 renderer = new (owner->renderArena()) RenderCounter(owner->document(), *content->counter()); 465 renderer->setStyle(pseudoElementStyle); 466 break; 466 case CONTENT_COUNTER: 467 renderer = new (owner->renderArena()) RenderCounter(owner->document(), *content->counter()); 468 renderer->setStyle(pseudoElementStyle); 469 break; 470 case CONTENT_QUOTE: 471 renderer = new (owner->renderArena()) RenderQuote(owner->document(), content->quote()); 472 renderer->setStyle(pseudoElementStyle); 473 break; 467 474 } 468 475 -
trunk/Source/WebCore/rendering/RenderingAllInOne.cpp
r80041 r80151 80 80 #include "RenderPart.cpp" 81 81 #include "RenderProgress.cpp" 82 #include "RenderQuote.cpp" 82 83 #include "RenderReplaced.cpp" 83 84 #include "RenderReplica.cpp" -
trunk/Source/WebCore/rendering/style/ContentData.cpp
r80041 r80151 52 52 case CONTENT_COUNTER: 53 53 return *counter() == *other.counter(); 54 case CONTENT_QUOTE: 55 return quote() == other.quote(); 54 56 } 55 57 … … 72 74 delete m_content.m_counter; 73 75 break; 76 case CONTENT_QUOTE: 77 break; 74 78 } 75 79 -
trunk/Source/WebCore/rendering/style/ContentData.h
r80041 r80151 52 52 bool isImage() const { return m_type == CONTENT_OBJECT; } 53 53 bool isNone() const { return m_type == CONTENT_NONE; } 54 bool isQuote() const { return m_type == CONTENT_QUOTE; } 54 55 bool isText() const { return m_type == CONTENT_TEXT; } 55 56 … … 94 95 } 95 96 97 QuoteType quote() const 98 { 99 ASSERT(isQuote()); 100 return m_content.m_quote; 101 } 102 void setQuote(QuoteType type) 103 { 104 deleteContent(); 105 m_type = CONTENT_QUOTE; 106 m_content.m_quote = type; 107 } 108 96 109 ContentData* next() const { return m_next.get(); } 97 110 void setNext(PassOwnPtr<ContentData> next) { m_next = next; } … … 105 118 StringImpl* m_text; 106 119 CounterContent* m_counter; 120 QuoteType m_quote; 107 121 } m_content; 108 122 OwnPtr<ContentData> m_next; -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r80041 r80151 28 28 #include "CSSStyleSelector.h" 29 29 #include "FontSelector.h" 30 #include "QuotesData.h" 30 31 #include "RenderArena.h" 31 32 #include "RenderObject.h" … … 606 607 } 607 608 609 void RenderStyle::setQuotes(PassRefPtr<QuotesData> q) 610 { 611 if (*rareInheritedData->quotes.get() == *q.get()) 612 return; 613 rareInheritedData.access()->quotes = q; 614 } 615 608 616 void RenderStyle::clearCursorList() 609 617 { … … 671 679 return; 672 680 prepareToSetContent(0, add)->setCounter(counter); 681 } 682 683 void RenderStyle::setContent(QuoteType quote, bool add) 684 { 685 prepareToSetContent(0, add)->setQuote(quote); 673 686 } 674 687 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r80041 r80151 1135 1135 void setContent(PassRefPtr<StyleImage>, bool add = false); 1136 1136 void setContent(PassOwnPtr<CounterContent>, bool add = false); 1137 void setContent(QuoteType, bool add = false); 1137 1138 1138 1139 const CounterDirectiveMap* counterDirectives() const; 1139 1140 CounterDirectiveMap& accessCounterDirectives(); 1141 1142 QuotesData* quotes() const { return rareInheritedData->quotes.get(); } 1143 void setQuotes(PassRefPtr<QuotesData>); 1140 1144 1141 1145 const AtomicString& hyphenString() const; -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r80041 r80151 298 298 299 299 enum StyleContentType { 300 CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER 300 CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER, CONTENT_QUOTE 301 }; 302 303 enum QuoteType { 304 OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE, NO_CLOSE_QUOTE 301 305 }; 302 306 -
trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp
r80041 r80151 31 31 #include "KeyframeList.cpp" 32 32 #include "NinePieceImage.cpp" 33 #include "QuotesData.cpp" 33 34 #include "RenderStyle.cpp" 34 35 #include "SVGRenderStyle.cpp" -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r80041 r80151 24 24 25 25 #include "CursorList.h" 26 #include "QuotesData.h" 26 27 #include "RenderStyle.h" 27 28 #include "RenderStyleConstants.h" … … 133 134 && hyphenationString == o.hyphenationString 134 135 && hyphenationLocale == o.hyphenationLocale 135 && textEmphasisCustomMark == o.textEmphasisCustomMark; 136 && textEmphasisCustomMark == o.textEmphasisCustomMark 137 && *quotes == *o.quotes; 136 138 } 137 139 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r80041 r80151 35 35 36 36 class CursorList; 37 class QuotesData; 37 38 class ShadowData; 38 39 … … 89 90 90 91 AtomicString textEmphasisCustomMark; 92 RefPtr<QuotesData> quotes; 91 93 92 94 private:
Note: See TracChangeset
for help on using the changeset viewer.