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

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

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderText.h ('k') | Source/core/rendering/RenderTextControl.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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 m_lastTextBox = s->prevTextBox(); 1462 m_lastTextBox = s->prevTextBox();
1463 else 1463 else
1464 s->nextTextBox()->setPreviousTextBox(s->prevTextBox()); 1464 s->nextTextBox()->setPreviousTextBox(s->prevTextBox());
1465 s->destroy(); 1465 s->destroy();
1466 return; 1466 return;
1467 } 1467 }
1468 1468
1469 m_containsReversedText |= !s->isLeftToRightDirection(); 1469 m_containsReversedText |= !s->isLeftToRightDirection();
1470 } 1470 }
1471 1471
1472 float RenderText::width(unsigned from, unsigned len, float xPos, TextDirection t extDirection, bool firstLine, HashSet<const SimpleFontData*>* fallbackFonts, Gly phOverflow* glyphOverflow) const 1472 float RenderText::width(unsigned from, unsigned len, float xPos, TextDirection t extDirection, OwnOrFirstLineStyle firstLine, HashSet<const SimpleFontData*>* fal lbackFonts, GlyphOverflow* glyphOverflow) const
1473 { 1473 {
1474 if (from >= textLength()) 1474 if (from >= textLength())
1475 return 0; 1475 return 0;
1476 1476
1477 if (from + len > textLength()) 1477 if (from + len > textLength())
1478 len = textLength() - from; 1478 len = textLength() - from;
1479 1479
1480 return width(from, len, style(firstLine)->font(), xPos, textDirection, fallb ackFonts, glyphOverflow); 1480 return width(from, len, style(firstLine)->font(), xPos, textDirection, fallb ackFonts, glyphOverflow);
1481 } 1481 }
1482 1482
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); 1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset);
1870 } 1870 }
1871 1871
1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() 1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox()
1873 { 1873 {
1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); 1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox);
1875 } 1875 }
1876 1876
1877 } // namespace WebCore 1877 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderText.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698