ASSERT_WITH_SECURITY_IMPLICATION in WebCore::InlineTextBox::paint
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2014 23:36:04 +0000 (23:36 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2014 23:36:04 +0000 (23:36 +0000)
commita16bbdb0307aeb435888290132c1f02a912427ce
tree8bc583e7cf32bbdcae8655d9859d73383e7492be
parent11d93d1c70445a5e7952f15acca14db1593d82df
ASSERT_WITH_SECURITY_IMPLICATION in WebCore::InlineTextBox::paint
https://bugs.webkit.org/show_bug.cgi?id=114586

Reviewed by Dave Hyatt.

Taken mostly from https://chromium.googlesource.com/chromium/blink/+/cb2297db16f2e9328cb4dd8b552093d6b22340a8

If RenderQuote is a subclass of RenderObject, it can't be split by the first-letter CSS pseudoclass.
Instead, we should make it a subclass of RenderElement, so that it can be split properly.

Source/WebCore:

Test: fast/css-generated-content/quote-first-letter.html

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote):
(WebCore::RenderQuote::willBeDestroyed):
(WebCore::RenderQuote::willBeRemovedFromTree):
(WebCore::RenderQuote::styleDidChange):
(WebCore::RenderQuote::updateText):
(WebCore::RenderQuote::computeText):
(WebCore::RenderQuote::updateDepth):
* rendering/RenderQuote.h:
* rendering/style/ContentData.cpp:
(WebCore::QuoteContentData::createContentRenderer):

LayoutTests:

This adds a test to make sure that the splitting behavior occurs, as well as updates existing tests that
didn't use the splitting behavior.

* fast/css-generated-content/quote-first-letter-expected.html: Added.
* fast/css-generated-content/quote-first-letter.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/nested-tables-with-before-after-content-crash-expected.txt:
* platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-generated-content/quote-first-letter-expected.html [new file with mode: 0644]
LayoutTests/fast/css-generated-content/quote-first-letter.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/nested-tables-with-before-after-content-crash-expected.txt
LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderImage.h
Source/WebCore/rendering/RenderQuote.cpp
Source/WebCore/rendering/RenderQuote.h
Source/WebCore/rendering/style/ContentData.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h