content property doesn't support quotes
authorcarol.szabo@nokia.com <carol.szabo@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2011 19:34:00 +0000 (19:34 +0000)
committercarol.szabo@nokia.com <carol.szabo@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2011 19:34:00 +0000 (19:34 +0000)
commitef000df0e2132f95ac5d8096d40fd65385208943
tree9373a09cc8c4865e3534470e6c9a631079f7faf7
parent31fae428d7fd7f46fdde8267a4aca8406dbc2278
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/content/content-quotes-01-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-01.html [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-02-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-02.html [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-03-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-03.html [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-04-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-04.html [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-05-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-05.html [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-06-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/content/content-quotes-06.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt
LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt
LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt
LayoutTests/platform/qt/fast/css-generated-content/005-expected.txt
LayoutTests/platform/qt/fast/css-generated-content/beforeAfter-interdocument-expected.txt
LayoutTests/platform/qt/fast/css-generated-content/no-openclose-quote-expected.txt
Source/WebCore/Android.mk
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/html.css
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderObjectChildList.cpp
Source/WebCore/rendering/RenderQuote.cpp [new file with mode: 0644]
Source/WebCore/rendering/RenderQuote.h [new file with mode: 0644]
Source/WebCore/rendering/RenderingAllInOne.cpp
Source/WebCore/rendering/style/ContentData.cpp
Source/WebCore/rendering/style/ContentData.h
Source/WebCore/rendering/style/QuotesData.cpp [new file with mode: 0644]
Source/WebCore/rendering/style/QuotesData.h [new file with mode: 0644]
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleAllInOne.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h