Changeset 80151 in webkit


Ignore:
Timestamp:
Mar 2, 2011 11:34:00 AM (13 years ago)
Author:
carol.szabo@nokia.com
Message:

content property doesn't support quotes
https://bugs.webkit.org/show_bug.cgi?id=6503

Patch by Carol Szabo <carol.szabo@nokia.com> on 2011-03-02
Reviewed by David Hyatt <hyatt@apple.com>

Source/WebCore:

Added full support for quotes as defined by CSS 2.1.

Tests: fast/css/content/content-quotes-01.html

fast/css/content/content-quotes-02.html
fast/css/content/content-quotes-03.html
fast/css/content/content-quotes-04.html
fast/css/content/content-quotes-05.html
fast/css/content/content-quotes-06.html

  • Android.mk:
  • CMakeLists.txt:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:

Added RenderQuote.cpp/h and QuotesData.cpp/h to the dependency lists

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseQuotes):

  • css/CSSParser.h:

Added needed stylesheet parsing support for quotes,
(no-)open-quote and (no-)close-quote

  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::applyProperty):
Handled setting of the new quotes RenderStyle property and added
handling of quotes for the content property.

  • css/html.css:

(q:before):
(q:after):
replaced the '"' workaround with open/close-quote

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::dirtyLineBoxesForRenderer):
Made RenderQuote behave like RenderCounter.
Needed to ensure that the Quote text is calculated before layout,
just as it is for RenderCounter.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isQuote):

  • rendering/RenderObjectChildList.cpp:

(WebCore::RenderObjectChildList::removeChildNode):
(WebCore::RenderObjectChildList::appendChildNode):
(WebCore::RenderObjectChildList::insertChildNode):
Handled updating of quote depth when renderers are added and removed
from the tree.
(WebCore::RenderObjectChildList::updateBeforeAfterContent):
Added support for Quote content.

  • rendering/RenderQuote.cpp: Added.

(WebCore::adjustDepth):
(WebCore::RenderQuote::RenderQuote):
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::renderName):
(WebCore::RenderQuote::placeQuote):
(WebCore::LanguageData::operator<):
(WebCore::defaultLanguageQuotes):
(WebCore::quotesMap):
(WebCore::quotesForLanguage):
(WebCore::defaultQuotes):
(WebCore::RenderQuote::originalText):
(WebCore::RenderQuote::computePreferredLogicalWidths):
(WebCore::RenderQuote::rendererSubtreeAttached):
(WebCore::RenderQuote::rendererRemovedFromTree):
(WebCore::RenderQuote::styleDidChange):

  • rendering/RenderQuote.h: Added.

(WebCore::RenderQuote::isQuote):
(WebCore::toRenderQuote):

  • rendering/RenderingAllInOne.cpp:

Included RenderQuote.cpp

  • rendering/style/StyleAllInOne.cpp:

Included QuotesData.cpp

  • rendering/style/ContentData.cpp:

(WebCore::ContentData::dataEquivalent):
Checked for quotetype identity.
(WebCore::ContentData::deleteContent):
Accounted for the new QUOTE_TYPE.

  • rendering/style/ContentData.h:

(WebCore::ContentData::isQuote):
(WebCore::ContentData::quote):
(WebCore::ContentData::setQuote):

  • rendering/style/QuotesData.cpp: Added.

(WebCore::QuotesData::create):
(WebCore::QuotesData::operator==):
(WebCore::QuotesData::~QuotesData):

  • rendering/style/QuotesData.h: Added.

(WebCore::QuotesData::data):
(WebCore::QuotesData::operator delete):
(WebCore::QuotesData::QuotesData):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setContent):
(WebCore::RenderStyle::setQuotes):

  • rendering/style/RenderStyle.h:

(WebCore::InheritedFlags::quotes):
(WebCore::InheritedFlags::setQuotes):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleAllInOne.cpp:

Added QuotesData.cpp to the included files list.

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::operator==):
Included quotes in equality check.

  • rendering/style/StyleRareInheritedData.h:

Added quotes

LayoutTests:

Added new tests for quotes. Fixed a few afected expected results.

  • fast/css/content/content-quotes-01-expected.txt: Added.
  • fast/css/content/content-quotes-01.html: Added.
  • fast/css/content/content-quotes-02-expected.txt: Added.
  • fast/css/content/content-quotes-02.html: Added.
  • fast/css/content/content-quotes-03-expected.txt: Added.
  • fast/css/content/content-quotes-03.html: Added.
  • fast/css/content/content-quotes-04-expected.txt: Added.
  • fast/css/content/content-quotes-04.html: Added.
  • fast/css/content/content-quotes-05-expected.txt: Added.
  • fast/css/content/content-quotes-05.html: Added.
  • fast/css/content/content-quotes-06-expected.txt: Added.
  • fast/css/content/content-quotes-06.html: Added.
  • platform/mac/fast/css-generated-content/005-expected.txt:
  • platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt:
  • platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt:
  • platform/qt/fast/css-generated-content/005-expected.txt:
  • platform/qt/fast/css-generated-content/beforeAfter-interdocument-expected.txt:
  • platform/qt/fast/css-generated-content/no-openclose-quote-expected.txt:
Location:
trunk
Files:
16 added
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r80148 r80151  
     12011-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
    1292011-03-02  Tony Gentilcore  <tonyg@chromium.org>
    230
  • trunk/LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt

    r25970 r80151  
    77        RenderInline {Q} at (0,0) size 158x18
    88          RenderInline (generated) at (0,0) size 7x18
    9             RenderText at (0,0) size 7x18
     9            RenderQuote at (0,0) size 7x18
    1010              text run at (0,0) width 7: "\""
    1111          RenderText {#text} at (7,0) size 151x18
     
    1818            text run at (0,0) width 53: "this text."
    1919          RenderInline (generated) at (0,0) size 7x18
    20             RenderText at (53,0) size 7x18
     20            RenderQuote at (53,0) size 7x18
    2121              text run at (53,0) width 7: "\""
    2222        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt

    r40921 r80151  
    1919          RenderInline {Q} at (0,0) size 158x18
    2020            RenderInline (generated) at (0,0) size 7x18
    21               RenderText at (0,0) size 7x18
     21              RenderQuote at (0,0) size 7x18
    2222                text run at (0,0) width 7: "\""
    2323            RenderText {#text} at (7,0) size 151x18
     
    3030              text run at (0,0) width 53: "this text."
    3131            RenderInline (generated) at (0,0) size 7x18
    32               RenderText at (53,0) size 7x18
     32              RenderQuote at (53,0) size 7x18
    3333                text run at (53,0) width 7: "\""
  • trunk/LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt

    r30635 r80151  
    88          RenderText at (0,0) size 8x18
    99            text run at (0,0) width 8: "*"
     10          RenderQuote at (0,0) size 0x0
    1011        RenderText {#text} at (8,0) size 425x18
    1112          text run at (8,0) width 114: "This is some text. "
     
    1415          RenderText at (433,0) size 8x18
    1516            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  
    77        RenderInline {Q} at (0,0) size 173x21
    88          RenderInline (generated) at (0,0) size 9x21
    9             RenderText at (0,0) size 9x21
     9            RenderQuote at (0,0) size 9x21
    1010              text run at (0,0) width 9: "\""
    1111          RenderText {#text} at (9,0) size 164x21
     
    1818            text run at (0,0) width 57: "this text."
    1919          RenderInline (generated) at (0,0) size 9x21
    20             RenderText at (57,0) size 9x21
     20            RenderQuote at (57,0) size 9x21
    2121              text run at (57,0) width 9: "\""
    2222        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/qt/fast/css-generated-content/beforeAfter-interdocument-expected.txt

    r79870 r80151  
    1919          RenderInline {Q} at (0,0) size 173x21
    2020            RenderInline (generated) at (0,0) size 9x21
    21               RenderText at (0,0) size 9x21
     21              RenderQuote at (0,0) size 9x21
    2222                text run at (0,0) width 9: "\""
    2323            RenderText {#text} at (9,0) size 164x21
     
    3030              text run at (0,0) width 57: "this text."
    3131            RenderInline (generated) at (0,0) size 9x21
    32               RenderText at (57,0) size 9x21
     32              RenderQuote at (57,0) size 9x21
    3333                text run at (57,0) width 9: "\""
  • trunk/LayoutTests/platform/qt/fast/css-generated-content/no-openclose-quote-expected.txt

    r79870 r80151  
    88          RenderText at (0,0) size 8x21
    99            text run at (0,0) width 8: "*"
     10          RenderQuote at (0,0) size 0x0
    1011        RenderText {#text} at (8,0) size 455x21
    1112          text run at (8,0) width 119: "This is some text. "
     
    1415          RenderText at (463,0) size 8x21
    1516            text run at (463,0) width 8: "*"
     17          RenderQuote at (0,0) size 0x0
  • trunk/Source/WebCore/Android.mk

    r80041 r80151  
    703703        rendering/RenderObjectChildList.cpp \
    704704        rendering/RenderPart.cpp \
     705        rendering/RenderQuote.cpp \
    705706        rendering/RenderReplaced.cpp \
    706707        rendering/RenderReplica.cpp \
     
    792793        rendering/style/KeyframeList.cpp \
    793794        rendering/style/NinePieceImage.cpp \
     795        rendering/style/QuotesData.cpp \
    794796        rendering/style/RenderStyle.cpp \
    795797
  • trunk/Source/WebCore/CMakeLists.txt

    r80041 r80151  
    13781378    rendering/RenderPart.cpp
    13791379    rendering/RenderProgress.cpp
     1380    rendering/RenderQuote.cpp
    13801381    rendering/RenderReplaced.cpp
    13811382    rendering/RenderReplica.cpp
     
    14151416    rendering/style/KeyframeList.cpp
    14161417    rendering/style/NinePieceImage.cpp
     1418    rendering/style/QuotesData.cpp
    14171419    rendering/style/RenderStyle.cpp
    14181420    rendering/style/ShadowData.cpp
  • trunk/Source/WebCore/ChangeLog

    r80150 r80151  
     12011-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
    11092011-03-02  Antti Koivisto  <antti@apple.com>
    2110
  • trunk/Source/WebCore/GNUmakefile.am

    r80086 r80151  
    28292829        Source/WebCore/rendering/RenderProgress.cpp \
    28302830        Source/WebCore/rendering/RenderProgress.h \
     2831        Source/WebCore/rendering/RenderQuote.cpp \
     2832        Source/WebCore/rendering/RenderQuote.h \
    28312833        Source/WebCore/rendering/RenderReplaced.cpp \
    28322834        Source/WebCore/rendering/RenderReplaced.h \
     
    29312933        Source/WebCore/rendering/style/NinePieceImage.h \
    29322934        Source/WebCore/rendering/style/OutlineValue.h \
     2935        Source/WebCore/rendering/style/QuotesData.cpp \
     2936        Source/WebCore/rendering/style/QuotesData.h \
    29332937        Source/WebCore/rendering/style/RenderStyleConstants.h \
    29342938        Source/WebCore/rendering/style/RenderStyle.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r80135 r80151  
    37143714            'rendering/style/NinePieceImage.h',
    37153715            'rendering/style/OutlineValue.h',
     3716            'rendering/style/QuotesData.cpp',
     3717            'rendering/style/QuotesData.h',
    37163718            'rendering/style/RenderStyle.cpp',
    37173719            'rendering/style/RenderStyle.h',
     
    39733975            'rendering/RenderProgress.cpp',
    39743976            'rendering/RenderProgress.h',
     3977            'rendering/RenderQuote.cpp',
     3978            'rendering/RenderQuote.h',
    39753979            'rendering/RenderReplaced.cpp',
    39763980            'rendering/RenderReplaced.h',
  • trunk/Source/WebCore/WebCore.pro

    r80041 r80151  
    10891089    rendering/RenderPart.cpp \
    10901090    rendering/RenderProgress.cpp \
     1091    rendering/RenderQuote.cpp \
    10911092    rendering/RenderReplaced.cpp \
    10921093    rendering/RenderReplica.cpp \
     
    11241125    rendering/style/KeyframeList.cpp \
    11251126    rendering/style/NinePieceImage.cpp \
     1127    rendering/style/QuotesData.cpp \
    11261128    rendering/style/RenderStyle.cpp \
    11271129    rendering/style/ShadowData.cpp \
     
    20762078    rendering/RenderPart.h \
    20772079    rendering/RenderProgress.h \
     2080    rendering/RenderQuote.h \
    20782081    rendering/RenderReplaced.h \
    20792082    rendering/RenderReplica.h \
     
    21132116    rendering/style/KeyframeList.h \
    21142117    rendering/style/NinePieceImage.h \
     2118    rendering/style/QuotesData.h \
    21152119    rendering/style/RenderStyle.h \
    21162120    rendering/style/ShadowData.h \
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r80145 r80151  
    3503135031                        </File>
    3503235032                        <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
    3503335089                                RelativePath="..\rendering\RenderReplaced.cpp"
    3503435090                                >
     
    3894138997                                <File
    3894238998                                        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"
    3894339055                                        >
    3894439056                                </File>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r80145 r80151  
    14041404                59EE12301106081F00885116 /* JNIUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59EE122F1106081F00885116 /* JNIUtility.cpp */; };
    14051405                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 */; };
    14061410                5D15E3AB0F9E6AC1009E0E3F /* XMLDocumentParserScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D15E3A90F9E6AC1009E0E3F /* XMLDocumentParserScope.cpp */; };
    14071411                5D15E3AC0F9E6AC1009E0E3F /* XMLDocumentParserScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D15E3AA0F9E6AC1009E0E3F /* XMLDocumentParserScope.h */; };
     
    78637867                59EE122F1106081F00885116 /* JNIUtility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JNIUtility.cpp; sourceTree = "<group>"; };
    78647868                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>"; };
    78657873                5D15E3A90F9E6AC1009E0E3F /* XMLDocumentParserScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLDocumentParserScope.cpp; sourceTree = "<group>"; };
    78667874                5D15E3AA0F9E6AC1009E0E3F /* XMLDocumentParserScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLDocumentParserScope.h; sourceTree = "<group>"; };
     
    1800518013                        isa = PBXGroup;
    1800618014                        children = (
     18015                                5A574F26131DB96D00471B88 /* QuotesData.cpp */,
     18016                                5A574F27131DB96D00471B88 /* QuotesData.h */,
    1800718017                                BC5EB5E00E81BE8700B25965 /* BorderData.h */,
    1800818018                                BC5EB5DA0E81B7EA00B25965 /* BorderValue.h */,
     
    1884918859                                A43BF59A1149292800C643CA /* RenderProgress.cpp */,
    1885018860                                A43BF59B1149292800C643CA /* RenderProgress.h */,
     18861                                5A574F22131DB93900471B88 /* RenderQuote.cpp */,
     18862                                5A574F23131DB93900471B88 /* RenderQuote.h */,
    1885118863                                A871DFDE0A15376B00B12A68 /* RenderReplaced.cpp */,
    1885218864                                A871DFDF0A15376B00B12A68 /* RenderReplaced.h */,
     
    2249722509                                E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
    2249822510                                977E2E0F12F0FC9C00C13379 /* XSSFilter.h in Headers */,
     22511                                5A574F25131DB93900471B88 /* RenderQuote.h in Headers */,
     22512                                5A574F29131DB96D00471B88 /* QuotesData.h in Headers */,
    2249922513                                339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */,
    2250022514                                33D0212D131DB37B004091A8 /* CookieStorage.h in Headers */,
     
    2514525159                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
    2514625160                                977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */,
     25161                                5A574F24131DB93900471B88 /* RenderQuote.cpp in Sources */,
     25162                                5A574F28131DB96D00471B88 /* QuotesData.cpp in Sources */,
    2514725163                        );
    2514825164                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/css/CSSParser.cpp

    r80150 r80151  
    635635        if (id)
    636636            validPrimitive = true;
     637        else
     638            return parseQuotes(propId, important);
    637639        break;
    638640    case CSSPropertyUnicodeBidi:         // normal | embed | bidi-override | inherit
     
    23532355        return None;
    23542356    }
     2357}
     2358
     2359// [ <string> <string> ]+ | inherit | none
     2360// inherit and none are handled in parseValue.
     2361bool 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;
    23552379}
    23562380
  • trunk/Source/WebCore/css/CSSParser.h

    r80041 r80151  
    8080        bool parse4Values(int propId, const int* properties, bool important);
    8181        bool parseContent(int propId, bool important);
     82        bool parseQuotes(int propId, bool important);
    8283
    8384        PassRefPtr<CSSValue> parseAttr(CSSParserValueList* args);
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r80150 r80151  
    7272#include "Pair.h"
    7373#include "PerspectiveTransformOperation.h"
     74#include "QuotesData.h"
    7475#include "Rect.h"
    7576#include "RenderScrollbar.h"
     
    47544755            CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item);
    47554756            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);
    47584793                    didSet = true;
    47594794                    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);
    47774797                    didSet = true;
    47784798                    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);
    47854801                    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                    {}
    47864810                }
    47874811            }
     
    47914815        return;
    47924816    }
     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;
    47934848
    47944849    case CSSPropertyCounterIncrement:
     
    60326087    case CSSPropertyFontStretch:
    60336088    case CSSPropertyPage:
    6034     case CSSPropertyQuotes:
    60356089    case CSSPropertyTextLineThrough:
    60366090    case CSSPropertyTextLineThroughColor:
  • trunk/Source/WebCore/css/html.css

    r80041 r80151  
    114114
    115115q:before {
    116     content: '"'
    117     /* FIXME: content: open-quote; */
     116    content: open-quote;
    118117}
    119118
    120119q:after {
    121     content: '"'
    122     /* FIXME: content: close-quote; */
     120    content: close-quote;
    123121}
    124122
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r80041 r80151  
    179179{
    180180    if (o->isText()) {
    181         if (o->preferredLogicalWidthsDirty() && o->isCounter())
     181        if (o->preferredLogicalWidthsDirty() && (o->isCounter() || o->isQuote()))
    182182            toRenderText(o)->computePreferredLogicalWidths(0); // FIXME: Counters depend on this hack. No clue why. Should be investigated and removed.
    183183        toRenderText(o)->dirtyLineBoxes(fullLayout);
  • trunk/Source/WebCore/rendering/RenderObject.h

    r80041 r80151  
    253253    virtual bool isBoxModelObject() const { return false; }
    254254    virtual bool isCounter() const { return false; }
     255    virtual bool isQuote() const { return false; }
    255256    virtual bool isDetails() const { return false; }
    256257    virtual bool isDetailsMarker() const { return false; }
  • trunk/Source/WebCore/rendering/RenderObjectChildList.cpp

    r80041 r80151  
    3737#include "RenderLayer.h"
    3838#include "RenderListItem.h"
     39#include "RenderQuote.h"
    3940#include "RenderStyle.h"
    4041#include "RenderTextFragment.h"
     
    131132    if (oldChild->m_hasCounterNodeMap)
    132133        RenderCounter::destroyCounterNodes(oldChild);
     134    RenderQuote::rendererRemovedFromTree(oldChild);
    133135
    134136    if (AXObjectCache::accessibilityEnabled())
     
    178180            owner->dirtyLinesFromChangedChild(newChild);
    179181    }
    180 
    181182    RenderCounter::rendererSubtreeAttached(newChild);
     183    RenderQuote::rendererSubtreeAttached(newChild);
    182184    newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing block hierarchy.
    183185    if (!owner->normalChildNeedsLayout())
     
    240242
    241243    RenderCounter::rendererSubtreeAttached(child);
     244    RenderQuote::rendererSubtreeAttached(child);
    242245    child->setNeedsLayoutAndPrefWidthsRecalc();
    243246    if (!owner->normalChildNeedsLayout())
     
    461464                break;
    462465            }
    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;
    467474        }
    468475
  • trunk/Source/WebCore/rendering/RenderingAllInOne.cpp

    r80041 r80151  
    8080#include "RenderPart.cpp"
    8181#include "RenderProgress.cpp"
     82#include "RenderQuote.cpp"
    8283#include "RenderReplaced.cpp"
    8384#include "RenderReplica.cpp"
  • trunk/Source/WebCore/rendering/style/ContentData.cpp

    r80041 r80151  
    5252    case CONTENT_COUNTER:
    5353        return *counter() == *other.counter();
     54    case CONTENT_QUOTE:
     55        return quote() == other.quote();
    5456    }
    5557
     
    7274        delete m_content.m_counter;
    7375        break;
     76    case CONTENT_QUOTE:
     77        break;
    7478    }
    7579
  • trunk/Source/WebCore/rendering/style/ContentData.h

    r80041 r80151  
    5252    bool isImage() const { return m_type == CONTENT_OBJECT; }
    5353    bool isNone() const { return m_type == CONTENT_NONE; }
     54    bool isQuote() const { return m_type == CONTENT_QUOTE; }
    5455    bool isText() const { return m_type == CONTENT_TEXT; }
    5556
     
    9495    }
    9596
     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
    96109    ContentData* next() const { return m_next.get(); }
    97110    void setNext(PassOwnPtr<ContentData> next) { m_next = next; }
     
    105118        StringImpl* m_text;
    106119        CounterContent* m_counter;
     120        QuoteType m_quote;
    107121    } m_content;
    108122    OwnPtr<ContentData> m_next;
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r80041 r80151  
    2828#include "CSSStyleSelector.h"
    2929#include "FontSelector.h"
     30#include "QuotesData.h"
    3031#include "RenderArena.h"
    3132#include "RenderObject.h"
     
    606607}
    607608
     609void RenderStyle::setQuotes(PassRefPtr<QuotesData> q)
     610{
     611    if (*rareInheritedData->quotes.get() == *q.get())
     612        return;
     613    rareInheritedData.access()->quotes = q;
     614}
     615
    608616void RenderStyle::clearCursorList()
    609617{
     
    671679        return;
    672680    prepareToSetContent(0, add)->setCounter(counter);
     681}
     682
     683void RenderStyle::setContent(QuoteType quote, bool add)
     684{
     685    prepareToSetContent(0, add)->setQuote(quote);
    673686}
    674687
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r80041 r80151  
    11351135    void setContent(PassRefPtr<StyleImage>, bool add = false);
    11361136    void setContent(PassOwnPtr<CounterContent>, bool add = false);
     1137    void setContent(QuoteType, bool add = false);
    11371138
    11381139    const CounterDirectiveMap* counterDirectives() const;
    11391140    CounterDirectiveMap& accessCounterDirectives();
     1141
     1142    QuotesData* quotes() const { return rareInheritedData->quotes.get(); }
     1143    void setQuotes(PassRefPtr<QuotesData>);
    11401144
    11411145    const AtomicString& hyphenString() const;
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r80041 r80151  
    298298
    299299enum StyleContentType {
    300     CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER
     300    CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER, CONTENT_QUOTE
     301};
     302
     303enum QuoteType {
     304    OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE, NO_CLOSE_QUOTE
    301305};
    302306
  • trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp

    r80041 r80151  
    3131#include "KeyframeList.cpp"
    3232#include "NinePieceImage.cpp"
     33#include "QuotesData.cpp"
    3334#include "RenderStyle.cpp"
    3435#include "SVGRenderStyle.cpp"
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp

    r80041 r80151  
    2424
    2525#include "CursorList.h"
     26#include "QuotesData.h"
    2627#include "RenderStyle.h"
    2728#include "RenderStyleConstants.h"
     
    133134        && hyphenationString == o.hyphenationString
    134135        && hyphenationLocale == o.hyphenationLocale
    135         && textEmphasisCustomMark == o.textEmphasisCustomMark;
     136        && textEmphasisCustomMark == o.textEmphasisCustomMark
     137        && *quotes == *o.quotes;
    136138}
    137139
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h

    r80041 r80151  
    3535
    3636class CursorList;
     37class QuotesData;
    3738class ShadowData;
    3839
     
    8990
    9091    AtomicString textEmphasisCustomMark;
     92    RefPtr<QuotesData> quotes;
    9193
    9294private:
Note: See TracChangeset for help on using the changeset viewer.