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

Unified Diff: Source/core/layout/LayoutTextCombine.cpp

Issue 940373003: Rename RenderText to LayoutText (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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/core/layout/LayoutTextCombine.h ('k') | Source/core/layout/LayoutTextFragment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTextCombine.cpp
diff --git a/Source/core/rendering/RenderCombineText.cpp b/Source/core/layout/LayoutTextCombine.cpp
similarity index 87%
rename from Source/core/rendering/RenderCombineText.cpp
rename to Source/core/layout/LayoutTextCombine.cpp
index e911b1f95afd40ed7494d61e61487483501e1ce8..63dcad2a3d9f6b71509491e69cbf7645597eabd8 100644
--- a/Source/core/rendering/RenderCombineText.cpp
+++ b/Source/core/layout/LayoutTextCombine.cpp
@@ -19,7 +19,7 @@
*/
#include "config.h"
-#include "core/rendering/RenderCombineText.h"
+#include "core/layout/LayoutTextCombine.h"
#include "core/layout/TextRunConstructor.h"
#include "platform/graphics/GraphicsContext.h"
@@ -28,8 +28,8 @@ namespace blink {
const float textCombineMargin = 1.1f; // Allow em + 10% margin
-RenderCombineText::RenderCombineText(Node* node, PassRefPtr<StringImpl> string)
- : RenderText(node, string)
+LayoutTextCombine::LayoutTextCombine(Node* node, PassRefPtr<StringImpl> string)
+ : LayoutText(node, string)
, m_combinedTextWidth(0)
, m_scaleX(1.0f)
, m_isCombined(false)
@@ -37,22 +37,22 @@ RenderCombineText::RenderCombineText(Node* node, PassRefPtr<StringImpl> string)
{
}
-void RenderCombineText::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyle)
+void LayoutTextCombine::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyle)
{
setStyleInternal(LayoutStyle::clone(styleRef()));
- RenderText::styleDidChange(diff, oldStyle);
+ LayoutText::styleDidChange(diff, oldStyle);
updateIsCombined();
}
-void RenderCombineText::setTextInternal(PassRefPtr<StringImpl> text)
+void LayoutTextCombine::setTextInternal(PassRefPtr<StringImpl> text)
{
- RenderText::setTextInternal(text);
+ LayoutText::setTextInternal(text);
updateIsCombined();
}
-float RenderCombineText::width(unsigned from, unsigned length, const Font& font, float xPosition, TextDirection direction, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
+float LayoutTextCombine::width(unsigned from, unsigned length, const Font& font, float xPosition, TextDirection direction, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
{
if (!length)
return 0;
@@ -63,7 +63,7 @@ float RenderCombineText::width(unsigned from, unsigned length, const Font& font,
if (m_isCombined)
return font.fontDescription().computedSize();
- return RenderText::width(from, length, font, xPosition, direction, fallbackFonts, glyphOverflow);
+ return LayoutText::width(from, length, font, xPosition, direction, fallbackFonts, glyphOverflow);
}
void scaleHorizontallyAndTranslate(GraphicsContext& context, float scaleX, float centerX, float offsetX, float offsetY)
@@ -71,7 +71,7 @@ void scaleHorizontallyAndTranslate(GraphicsContext& context, float scaleX, float
context.concatCTM(AffineTransform(scaleX, 0, 0, 1, centerX * (1.0f - scaleX) + offsetX * scaleX, offsetY));
}
-void RenderCombineText::transformToInlineCoordinates(GraphicsContext& context, const FloatRect& boxRect) const
+void LayoutTextCombine::transformToInlineCoordinates(GraphicsContext& context, const FloatRect& boxRect) const
{
ASSERT(!m_needsFontUpdate);
ASSERT(m_isCombined);
@@ -86,14 +86,14 @@ void RenderCombineText::transformToInlineCoordinates(GraphicsContext& context, c
scaleHorizontallyAndTranslate(context, m_scaleX, centerX, offsetX(boxRect), offsetY());
}
-void RenderCombineText::transformLayoutRect(FloatRect& boxRect) const
+void LayoutTextCombine::transformLayoutRect(FloatRect& boxRect) const
{
ASSERT(!m_needsFontUpdate);
ASSERT(m_isCombined);
boxRect.move(offsetXNoScale(boxRect), offsetY());
}
-void RenderCombineText::updateIsCombined()
+void LayoutTextCombine::updateIsCombined()
{
// CSS3 spec says text-combine works only in vertical writing mode.
m_isCombined = !style()->isHorizontalWritingMode()
@@ -104,7 +104,7 @@ void RenderCombineText::updateIsCombined()
m_needsFontUpdate = true;
}
-void RenderCombineText::updateFont()
+void LayoutTextCombine::updateFont()
{
if (!m_needsFontUpdate)
return;
« no previous file with comments | « Source/core/layout/LayoutTextCombine.h ('k') | Source/core/layout/LayoutTextFragment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698