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

Unified Diff: sky/engine/core/rendering/RenderCombineText.cpp

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
Patch Set: Created 6 years, 2 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 | « sky/engine/core/rendering/RenderBoxModelObject.cpp ('k') | sky/engine/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderCombineText.cpp
diff --git a/sky/engine/core/rendering/RenderCombineText.cpp b/sky/engine/core/rendering/RenderCombineText.cpp
index cc6b573aa6355ea30788c44dc477cd7b1a118114..86fe368415790c47b501bedaa9167ed89c410f6a 100644
--- a/sky/engine/core/rendering/RenderCombineText.cpp
+++ b/sky/engine/core/rendering/RenderCombineText.cpp
@@ -25,8 +25,6 @@
namespace blink {
-const float textCombineMargin = 1.1f; // Allow em + 10% margin
-
RenderCombineText::RenderCombineText(Node* node, PassRefPtr<StringImpl> string)
: RenderText(node, string)
, m_combinedTextWidth(0)
@@ -96,52 +94,7 @@ void RenderCombineText::combineText()
m_needsFontUpdate = false;
// CSS3 spec says text-combine works only in vertical writing mode.
- if (style()->isHorizontalWritingMode())
- return;
-
- TextRun run = constructTextRun(this, originalFont(), this, style(), style()->direction());
- FontDescription description = originalFont().fontDescription();
- float emWidth = description.computedSize() * textCombineMargin;
- bool shouldUpdateFont = false;
-
- description.setOrientation(Horizontal); // We are going to draw combined text horizontally.
- m_combinedTextWidth = originalFont().width(run);
- m_isCombined = m_combinedTextWidth <= emWidth;
-
- FontSelector* fontSelector = style()->font().fontSelector();
-
- if (m_isCombined)
- shouldUpdateFont = style()->setFontDescription(description); // Need to change font orientation to horizontal.
- else {
- // Need to try compressed glyphs.
- static const FontWidthVariant widthVariants[] = { HalfWidth, ThirdWidth, QuarterWidth };
- for (size_t i = 0 ; i < WTF_ARRAY_LENGTH(widthVariants) ; ++i) {
- description.setWidthVariant(widthVariants[i]);
- Font compressedFont = Font(description);
- compressedFont.update(fontSelector);
- float runWidth = compressedFont.width(run);
- if (runWidth <= emWidth) {
- m_combinedTextWidth = runWidth;
- m_isCombined = true;
-
- // Replace my font with the new one.
- shouldUpdateFont = style()->setFontDescription(description);
- break;
- }
- }
- }
-
- if (!m_isCombined)
- shouldUpdateFont = style()->setFontDescription(originalFont().fontDescription());
-
- if (shouldUpdateFont)
- style()->font().update(fontSelector);
-
- if (m_isCombined) {
- DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectReplacementCharacter, 1));
- m_renderingText = text();
- RenderText::setTextInternal(objectReplacementCharacterString.impl());
- }
+ // FIXME(sky): Remove
}
} // namespace blink
« no previous file with comments | « sky/engine/core/rendering/RenderBoxModelObject.cpp ('k') | sky/engine/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698