Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: Source/WebCore/rendering/RenderQuote.cpp

Issue 12301012: Merge 143060 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderQuote.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderQuote.cpp
===================================================================
--- Source/WebCore/rendering/RenderQuote.cpp (revision 143280)
+++ 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,27 +250,9 @@
void RenderQuote::updateText()
{
- computePreferredLogicalWidths(0);
+ setText(originalText());
}
-void RenderQuote::computePreferredLogicalWidths(float lead)
-{
-#ifndef NDEBUG
- // FIXME: We shouldn't be modifying the tree in computePreferredLogicalWidths.
- // Instead, we should properly hook the appropriate changes in the DOM and modify
- // the render tree then. When that's done, we also won't need to override
- // computePreferredLogicalWidths at all.
- // https://bugs.webkit.org/show_bug.cgi?id=104829
- SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false);
-#endif
-
- if (!m_attached)
- attachQuote();
- setTextInternal(originalText());
-
- RenderText::computePreferredLogicalWidths(lead);
-}
-
const QuotesData* RenderQuote::quotesData() const
{
if (QuotesData* customQuotes = style()->quotes())
@@ -285,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;
@@ -370,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
« no previous file with comments | « Source/WebCore/rendering/RenderQuote.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698