| Index: Source/WebCore/rendering/RenderQuote.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderQuote.cpp (revision 143496)
|
| +++ Source/WebCore/rendering/RenderQuote.cpp (working copy)
|
| @@ -54,10 +54,15 @@
|
| void RenderQuote::willBeRemovedFromTree()
|
| {
|
| RenderText::willBeRemovedFromTree();
|
| -
|
| detachQuote();
|
| }
|
|
|
| +void RenderQuote::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
|
| +{
|
| + RenderText::styleDidChange(diff, oldStyle);
|
| + updateText();
|
| +}
|
| +
|
| typedef HashMap<AtomicString, const QuotesData*, CaseFoldingHash> QuotesMap;
|
|
|
| static const QuotesMap& quotesDataLanguageMap()
|
| @@ -245,17 +250,9 @@
|
|
|
| void RenderQuote::updateText()
|
| {
|
| - computePreferredLogicalWidths(0);
|
| + setText(originalText());
|
| }
|
|
|
| -void RenderQuote::computePreferredLogicalWidths(float lead)
|
| -{
|
| - if (!m_attached)
|
| - attachQuote();
|
| - setTextInternal(originalText());
|
| - RenderText::computePreferredLogicalWidths(lead);
|
| -}
|
| -
|
| const QuotesData* RenderQuote::quotesData() const
|
| {
|
| if (QuotesData* customQuotes = style()->quotes())
|
| @@ -275,14 +272,8 @@
|
| ASSERT(view());
|
| ASSERT(!m_attached);
|
| ASSERT(!m_next && !m_previous);
|
| + ASSERT(isRooted());
|
|
|
| - // FIXME: Don't set pref widths dirty during layout. See updateDepth() for
|
| - // more detail.
|
| - if (!isRooted()) {
|
| - setNeedsLayoutAndPrefWidthsRecalc();
|
| - return;
|
| - }
|
| -
|
| if (!view()->renderQuoteHead()) {
|
| view()->setRenderQuoteHead(this);
|
| m_attached = true;
|
| @@ -360,12 +351,8 @@
|
| break;
|
| }
|
| }
|
| - // FIXME: Don't call setNeedsLayout or dirty our preferred widths during layout.
|
| - // This is likely to fail anyway as one of our ancestor will call setNeedsLayout(false),
|
| - // preventing the future layout to occur on |this|. The solution is to move that to a
|
| - // pre-layout phase.
|
| if (oldDepth != m_depth)
|
| - setNeedsLayoutAndPrefWidthsRecalc();
|
| + updateText();
|
| }
|
|
|
| } // namespace WebCore
|
|
|