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

Side by Side Diff: sky/engine/core/rendering/RenderText.cpp

Issue 688213002: First pass at removing dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderReplaced.cpp ('k') | sky/engine/core/rendering/RenderView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 598
599 if (rightAligned) { 599 if (rightAligned) {
600 left = std::max(left, leftEdge); 600 left = std::max(left, leftEdge);
601 left = std::min(left, rootRight - caretWidth); 601 left = std::min(left, rootRight - caretWidth);
602 } else { 602 } else {
603 left = std::min(left, rightEdge - caretWidthRightOfOffset); 603 left = std::min(left, rightEdge - caretWidthRightOfOffset);
604 left = std::max(left, rootLeft); 604 left = std::max(left, rootLeft);
605 } 605 }
606 606
607 return style()->isHorizontalWritingMode() ? IntRect(left, top, caretWidth, h eight) : IntRect(top, left, height, caretWidth); 607 return IntRect(left, top, caretWidth, height);
608 } 608 }
609 609
610 ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len , float xPos, TextDirection textDirection, HashSet<const SimpleFontData*>* fallb ackFonts, GlyphOverflow* glyphOverflow) const 610 ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len , float xPos, TextDirection textDirection, HashSet<const SimpleFontData*>* fallb ackFonts, GlyphOverflow* glyphOverflow) const
611 { 611 {
612 if (style()->hasTextCombine() && isCombineText()) { 612 if (style()->hasTextCombine() && isCombineText()) {
613 const RenderCombineText* combineText = toRenderCombineText(this); 613 const RenderCombineText* combineText = toRenderCombineText(this);
614 if (combineText->isCombined()) 614 if (combineText->isCombined())
615 return combineText->combinedTextWidth(f); 615 return combineText->combinedTextWidth(f);
616 } 616 }
617 617
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 ASSERT(child->prevTextBox() == prev); 1680 ASSERT(child->prevTextBox() == prev);
1681 prev = child; 1681 prev = child;
1682 } 1682 }
1683 ASSERT(prev == m_lastTextBox); 1683 ASSERT(prev == m_lastTextBox);
1684 #endif 1684 #endif
1685 } 1685 }
1686 1686
1687 #endif 1687 #endif
1688 1688
1689 } // namespace blink 1689 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderReplaced.cpp ('k') | sky/engine/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698