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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 1743803002: Rename enums/functions that collide in chromium style in core/style/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-8
Patch Set: get-names-9: rebase Created 4 years, 9 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
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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 { 720 {
721 if (style()->hasTextCombine() && isCombineText()) { 721 if (style()->hasTextCombine() && isCombineText()) {
722 const LayoutTextCombine* combineText = toLayoutTextCombine(this); 722 const LayoutTextCombine* combineText = toLayoutTextCombine(this);
723 if (combineText->isCombined()) 723 if (combineText->isCombined())
724 return combineText->combinedTextWidth(f); 724 return combineText->combinedTextWidth(f);
725 } 725 }
726 726
727 TextRun run = constructTextRun(f, this, start, len, styleRef(), textDirectio n); 727 TextRun run = constructTextRun(f, this, start, len, styleRef(), textDirectio n);
728 run.setCharactersLength(textLength() - start); 728 run.setCharactersLength(textLength() - start);
729 ASSERT(run.charactersLength() >= run.length()); 729 ASSERT(run.charactersLength() >= run.length());
730 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize()); 730 run.setTabSize(!style()->collapseWhiteSpace(), style()->getTabSize());
731 run.setXPos(leadWidth + textWidthSoFar); 731 run.setXPos(leadWidth + textWidthSoFar);
732 732
733 FloatRect newGlyphBounds; 733 FloatRect newGlyphBounds;
734 float result = f.width(run, fallbackFonts, glyphBoundsAccumulation ? &newGly phBounds : nullptr); 734 float result = f.width(run, fallbackFonts, glyphBoundsAccumulation ? &newGly phBounds : nullptr);
735 if (glyphBoundsAccumulation) { 735 if (glyphBoundsAccumulation) {
736 newGlyphBounds.move(textWidthSoFar, 0); 736 newGlyphBounds.move(textWidthSoFar, 0);
737 glyphBoundsAccumulation->unite(newGlyphBounds); 737 glyphBoundsAccumulation->unite(newGlyphBounds);
738 } 738 }
739 return result; 739 return result;
740 } 740 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 m_firstLineMinWidth = currMaxWidth; 1074 m_firstLineMinWidth = currMaxWidth;
1075 } 1075 }
1076 1076
1077 if (currMaxWidth > m_maxWidth) 1077 if (currMaxWidth > m_maxWidth)
1078 m_maxWidth = currMaxWidth; 1078 m_maxWidth = currMaxWidth;
1079 currMaxWidth = 0; 1079 currMaxWidth = 0;
1080 } else { 1080 } else {
1081 TextRun run = constructTextRun(f, this, i, 1, styleToUse, textDi rection); 1081 TextRun run = constructTextRun(f, this, i, 1, styleToUse, textDi rection);
1082 run.setCharactersLength(len - i); 1082 run.setCharactersLength(len - i);
1083 ASSERT(run.charactersLength() >= run.length()); 1083 ASSERT(run.charactersLength() >= run.length());
1084 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize( )); 1084 run.setTabSize(!style()->collapseWhiteSpace(), style()->getTabSi ze());
1085 run.setXPos(leadWidth + currMaxWidth); 1085 run.setXPos(leadWidth + currMaxWidth);
1086 1086
1087 currMaxWidth += f.width(run); 1087 currMaxWidth += f.width(run);
1088 needsWordSpacing = isSpace && !previousCharacterIsSpace && i == len - 1; 1088 needsWordSpacing = isSpace && !previousCharacterIsSpace && i == len - 1;
1089 } 1089 }
1090 ASSERT(lastWordBoundary == i); 1090 ASSERT(lastWordBoundary == i);
1091 lastWordBoundary++; 1091 lastWordBoundary++;
1092 } 1092 }
1093 } 1093 }
1094 if (run) 1094 if (run)
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 w = maxLogicalWidth(); 1506 w = maxLogicalWidth();
1507 } 1507 }
1508 } else { 1508 } else {
1509 w = widthFromFont(f, from, len, xPos.toFloat(), 0, textDirection, fa llbackFonts, glyphBounds); 1509 w = widthFromFont(f, from, len, xPos.toFloat(), 0, textDirection, fa llbackFonts, glyphBounds);
1510 } 1510 }
1511 } else { 1511 } else {
1512 TextRun run = constructTextRun(f, this, from, len, styleRef(), textDirec tion); 1512 TextRun run = constructTextRun(f, this, from, len, styleRef(), textDirec tion);
1513 run.setCharactersLength(textLength() - from); 1513 run.setCharactersLength(textLength() - from);
1514 ASSERT(run.charactersLength() >= run.length()); 1514 ASSERT(run.charactersLength() >= run.length());
1515 1515
1516 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize()); 1516 run.setTabSize(!style()->collapseWhiteSpace(), style()->getTabSize());
1517 run.setXPos(xPos.toFloat()); 1517 run.setXPos(xPos.toFloat());
1518 w = f.width(run, fallbackFonts, glyphBounds); 1518 w = f.width(run, fallbackFonts, glyphBounds);
1519 } 1519 }
1520 1520
1521 return w; 1521 return w;
1522 } 1522 }
1523 1523
1524 IntRect LayoutText::linesBoundingBox() const 1524 IntRect LayoutText::linesBoundingBox() const
1525 { 1525 {
1526 IntRect result; 1526 IntRect result;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 1751 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
1752 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason); 1752 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason);
1753 if (box->truncation() != cNoTruncation) { 1753 if (box->truncation() != cNoTruncation) {
1754 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) 1754 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox())
1755 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason); 1755 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason);
1756 } 1756 }
1757 } 1757 }
1758 } 1758 }
1759 1759
1760 } // namespace blink 1760 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698