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

Side by Side Diff: sky/engine/core/rendering/InlineTextBox.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/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.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, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 LayoutUnit widthOfHiddenText = m_logicalWidth - widthOfVisibleText; 561 LayoutUnit widthOfHiddenText = m_logicalWidth - widthOfVisibleText;
562 // FIXME: The hit testing logic also needs to take this translation into account. 562 // FIXME: The hit testing logic also needs to take this translation into account.
563 LayoutSize truncationOffset(isLeftToRightDirection() ? widthOfHidden Text : -widthOfHiddenText, 0); 563 LayoutSize truncationOffset(isLeftToRightDirection() ? widthOfHidden Text : -widthOfHiddenText, 0);
564 adjustedPaintOffset.move(isHorizontal() ? truncationOffset : truncat ionOffset.transposedSize()); 564 adjustedPaintOffset.move(isHorizontal() ? truncationOffset : truncat ionOffset.transposedSize());
565 } 565 }
566 } 566 }
567 567
568 GraphicsContext* context = paintInfo.context; 568 GraphicsContext* context = paintInfo.context;
569 RenderStyle* styleToUse = renderer().style(isFirstLineStyle()); 569 RenderStyle* styleToUse = renderer().style(isFirstLineStyle());
570 570
571 adjustedPaintOffset.move(0, styleToUse->isHorizontalWritingMode() ? 0 : -log icalHeight());
572
573 FloatPoint boxOrigin = locationIncludingFlipping(); 571 FloatPoint boxOrigin = locationIncludingFlipping();
574 boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().to Float()); 572 boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().to Float());
575 FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight())); 573 FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight()));
576 574
577 RenderCombineText* combinedText = styleToUse->hasTextCombine() && renderer() .isCombineText() && toRenderCombineText(renderer()).isCombined() ? &toRenderComb ineText(renderer()) : 0; 575 RenderCombineText* combinedText = styleToUse->hasTextCombine() && renderer() .isCombineText() && toRenderCombineText(renderer()).isCombined() ? &toRenderComb ineText(renderer()) : 0;
578 576
579 bool shouldRotate = !isHorizontal() && !combinedText; 577 bool shouldRotate = !isHorizontal() && !combinedText;
580 if (shouldRotate) 578 if (shouldRotate)
581 context->concatCTM(rotation(boxRect, Clockwise)); 579 context->concatCTM(rotation(boxRect, Clockwise));
582 580
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 1419 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
1422 const int rendererCharacterOffset = 24; 1420 const int rendererCharacterOffset = 24;
1423 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1421 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1424 fputc(' ', stderr); 1422 fputc(' ', stderr);
1425 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1423 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1426 } 1424 }
1427 1425
1428 #endif 1426 #endif
1429 1427
1430 } // namespace blink 1428 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698