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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 10 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
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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 break; 1462 break;
1463 default: 1463 default:
1464 marginEnd = m_text.isEmpty() ? 0 : offset / 2; 1464 marginEnd = m_text.isEmpty() ? 0 : offset / 2;
1465 } 1465 }
1466 } 1466 }
1467 marginStart = -marginEnd - minPreferredLogicalWidth(); 1467 marginStart = -marginEnd - minPreferredLogicalWidth();
1468 } 1468 }
1469 1469
1470 } 1470 }
1471 1471
1472 style()->setMarginStart(Length(marginStart, Fixed)); 1472 deprecatedMutableStyle()->setMarginStart(Length(marginStart, Fixed));
1473 style()->setMarginEnd(Length(marginEnd, Fixed)); 1473 deprecatedMutableStyle()->setMarginEnd(Length(marginEnd, Fixed));
1474 } 1474 }
1475 1475
1476 LayoutUnit RenderListMarker::lineHeight(bool firstLine, LineDirectionMode direct ion, LinePositionMode linePositionMode) const 1476 LayoutUnit RenderListMarker::lineHeight(bool firstLine, LineDirectionMode direct ion, LinePositionMode linePositionMode) const
1477 { 1477 {
1478 if (!isImage()) 1478 if (!isImage())
1479 return m_listItem->lineHeight(firstLine, direction, PositionOfInteriorLi neBoxes); 1479 return m_listItem->lineHeight(firstLine, direction, PositionOfInteriorLi neBoxes);
1480 return RenderBox::lineHeight(firstLine, direction, linePositionMode); 1480 return RenderBox::lineHeight(firstLine, direction, linePositionMode);
1481 } 1481 }
1482 1482
1483 int RenderListMarker::baselinePosition(FontBaseline baselineType, bool firstLine , LineDirectionMode direction, LinePositionMode linePositionMode) const 1483 int RenderListMarker::baselinePosition(FontBaseline baselineType, bool firstLine , LineDirectionMode direction, LinePositionMode linePositionMode) const
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 if (style()) { 1645 if (style()) {
1646 // Reuse the current margins. Otherwise resetting the margins to initial values 1646 // Reuse the current margins. Otherwise resetting the margins to initial values
1647 // would trigger unnecessary layout. 1647 // would trigger unnecessary layout.
1648 newStyle->setMarginStart(style()->marginStart()); 1648 newStyle->setMarginStart(style()->marginStart());
1649 newStyle->setMarginEnd(style()->marginRight()); 1649 newStyle->setMarginEnd(style()->marginRight());
1650 } 1650 }
1651 setStyle(newStyle.release()); 1651 setStyle(newStyle.release());
1652 } 1652 }
1653 1653
1654 } // namespace blink 1654 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698