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

Side by Side Diff: sky/engine/core/rendering/RenderBoxModelObject.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 break; 2529 break;
2530 case alignRight: 2530 case alignRight:
2531 x = maxX - caretWidth; 2531 x = maxX - caretWidth;
2532 if (!currentStyle->isLeftToRightDirection()) 2532 if (!currentStyle->isLeftToRightDirection())
2533 x -= textIndentOffset; 2533 x -= textIndentOffset;
2534 break; 2534 break;
2535 } 2535 }
2536 x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth, 0)); 2536 x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth, 0));
2537 2537
2538 LayoutUnit height = style()->fontMetrics().height(); 2538 LayoutUnit height = style()->fontMetrics().height();
2539 LayoutUnit verticalSpace = lineHeight(true, currentStyle->isHorizontalWritin gMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes) - height; 2539 LayoutUnit verticalSpace = lineHeight(true, HorizontalLine, PositionOfInter iorLineBoxes) - height;
2540 LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2); 2540 LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2);
2541 return currentStyle->isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth , height) : LayoutRect(y, x, height, caretWidth); 2541 return LayoutRect(x, y, caretWidth, height);
2542 } 2542 }
2543 2543
2544 bool RenderBoxModelObject::shouldAntialiasLines(GraphicsContext* context) 2544 bool RenderBoxModelObject::shouldAntialiasLines(GraphicsContext* context)
2545 { 2545 {
2546 // FIXME: We may want to not antialias when scaled by an integral value, 2546 // FIXME: We may want to not antialias when scaled by an integral value,
2547 // and we may want to antialias when translated by a non-integral value. 2547 // and we may want to antialias when translated by a non-integral value.
2548 // FIXME: See crbug.com/382491. getCTM does not include scale factors applie d at raster time, such 2548 // FIXME: See crbug.com/382491. getCTM does not include scale factors applie d at raster time, such
2549 // as device zoom. 2549 // as device zoom.
2550 return !context->getCTM().isIdentityOrTranslationOrFlipped(); 2550 return !context->getCTM().isIdentityOrTranslationOrFlipped();
2551 } 2551 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2634 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2635 for (RenderObject* child = startChild; child && child != endChild; ) { 2635 for (RenderObject* child = startChild; child && child != endChild; ) {
2636 // Save our next sibling as moveChildTo will clear it. 2636 // Save our next sibling as moveChildTo will clear it.
2637 RenderObject* nextSibling = child->nextSibling(); 2637 RenderObject* nextSibling = child->nextSibling();
2638 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2638 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2639 child = nextSibling; 2639 child = nextSibling;
2640 } 2640 }
2641 } 2641 }
2642 2642
2643 } // namespace blink 2643 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBoxModelObject.h ('k') | sky/engine/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698