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

Side by Side Diff: Source/core/rendering/RenderListMarker.cpp

Issue 463633002: Revert "Cleanup deadcode in Rendering" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderListMarker.h ('k') | Source/core/rendering/RenderMenuList.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 * 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 } 1671 }
1672 1672
1673 int RenderListMarker::baselinePosition(FontBaseline baselineType, bool firstLine , LineDirectionMode direction, LinePositionMode linePositionMode) const 1673 int RenderListMarker::baselinePosition(FontBaseline baselineType, bool firstLine , LineDirectionMode direction, LinePositionMode linePositionMode) const
1674 { 1674 {
1675 ASSERT(linePositionMode == PositionOnContainingLine); 1675 ASSERT(linePositionMode == PositionOnContainingLine);
1676 if (!isImage()) 1676 if (!isImage())
1677 return m_listItem->baselinePosition(baselineType, firstLine, direction, PositionOfInteriorLineBoxes); 1677 return m_listItem->baselinePosition(baselineType, firstLine, direction, PositionOfInteriorLineBoxes);
1678 return RenderBox::baselinePosition(baselineType, firstLine, direction, lineP ositionMode); 1678 return RenderBox::baselinePosition(baselineType, firstLine, direction, lineP ositionMode);
1679 } 1679 }
1680 1680
1681 String RenderListMarker::suffix() const
1682 {
1683 EListStyleType type = style()->listStyleType();
1684 const UChar suffix = listMarkerSuffix(type, m_listItem->value());
1685
1686 if (suffix == ' ')
1687 return String(" ");
1688
1689 // If the suffix is not ' ', an extra space is needed
1690 UChar data[2];
1691 if (style()->isLeftToRightDirection()) {
1692 data[0] = suffix;
1693 data[1] = ' ';
1694 } else {
1695 data[0] = ' ';
1696 data[1] = suffix;
1697 }
1698
1699 return String(data, 2);
1700 }
1701
1681 bool RenderListMarker::isInside() const 1702 bool RenderListMarker::isInside() const
1682 { 1703 {
1683 return m_listItem->notInList() || style()->listStylePosition() == INSIDE; 1704 return m_listItem->notInList() || style()->listStylePosition() == INSIDE;
1684 } 1705 }
1685 1706
1686 IntRect RenderListMarker::getRelativeMarkerRect() 1707 IntRect RenderListMarker::getRelativeMarkerRect()
1687 { 1708 {
1688 if (isImage()) 1709 if (isImage())
1689 return IntRect(0, 0, m_image->imageSize(this, style()->effectiveZoom()). width(), m_image->imageSize(this, style()->effectiveZoom()).height()); 1710 return IntRect(0, 0, m_image->imageSize(this, style()->effectiveZoom()). width(), m_image->imageSize(this, style()->effectiveZoom()).height());
1690 1711
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 1843
1823 if (clipToVisibleContent) 1844 if (clipToVisibleContent)
1824 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect); 1845 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect);
1825 else 1846 else
1826 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer) .enclosingBoundingBox(); 1847 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer) .enclosingBoundingBox();
1827 1848
1828 return rect; 1849 return rect;
1829 } 1850 }
1830 1851
1831 } // namespace blink 1852 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListMarker.h ('k') | Source/core/rendering/RenderMenuList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698