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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

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 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 return direction == WTF::Unicode::RightToLeft 528 return direction == WTF::Unicode::RightToLeft
529 || direction == WTF::Unicode::RightToLeftArabic ? RTL : LTR; 529 || direction == WTF::Unicode::RightToLeftArabic ? RTL : LTR;
530 } 530 }
531 531
532 ALWAYS_INLINE float textWidth(LineLayoutText text, unsigned from, unsigned len, const Font& font, float xPos, bool collapseWhiteSpace, HashSet<const SimpleFontD ata*>* fallbackFonts = nullptr, FloatRect* glyphBounds = nullptr) 532 ALWAYS_INLINE float textWidth(LineLayoutText text, unsigned from, unsigned len, const Font& font, float xPos, bool collapseWhiteSpace, HashSet<const SimpleFontD ata*>* fallbackFonts = nullptr, FloatRect* glyphBounds = nullptr)
533 { 533 {
534 if ((!from && len == text.textLength()) || text.style()->hasTextCombine()) 534 if ((!from && len == text.textLength()) || text.style()->hasTextCombine())
535 return text.width(from, len, font, LayoutUnit(xPos), text.style()->direc tion(), fallbackFonts, glyphBounds); 535 return text.width(from, len, font, LayoutUnit(xPos), text.style()->direc tion(), fallbackFonts, glyphBounds);
536 536
537 TextRun run = constructTextRun(font, text, from, len, text.styleRef()); 537 TextRun run = constructTextRun(font, text, from, len, text.styleRef());
538 run.setTabSize(!collapseWhiteSpace, text.style()->tabSize()); 538 run.setTabSize(!collapseWhiteSpace, text.style()->getTabSize());
539 run.setXPos(xPos); 539 run.setXPos(xPos);
540 return font.width(run, fallbackFonts, glyphBounds); 540 return font.width(run, fallbackFonts, glyphBounds);
541 } 541 }
542 542
543 inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool & hyphenated) 543 inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool & hyphenated)
544 { 544 {
545 if (!m_current.offset()) 545 if (!m_current.offset())
546 m_appliedStartWidth = false; 546 m_appliedStartWidth = false;
547 547
548 LineLayoutText layoutText(m_current.getLineLayoutItem()); 548 LineLayoutText layoutText(m_current.getLineLayoutItem());
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 && !m_lastObject.isRubyRun()) { 968 && !m_lastObject.isRubyRun()) {
969 m_width.commit(); 969 m_width.commit();
970 m_lineBreak.moveToStartOf(m_nextObject); 970 m_lineBreak.moveToStartOf(m_nextObject);
971 } 971 }
972 } 972 }
973 } 973 }
974 974
975 inline IndentTextOrNot requiresIndent(bool isFirstLine, bool isAfterHardLineBrea k, const ComputedStyle& style) 975 inline IndentTextOrNot requiresIndent(bool isFirstLine, bool isAfterHardLineBrea k, const ComputedStyle& style)
976 { 976 {
977 IndentTextOrNot indentText = DoNotIndentText; 977 IndentTextOrNot indentText = DoNotIndentText;
978 if (isFirstLine || (isAfterHardLineBreak && style.textIndentLine()) == TextI ndentEachLine) 978 if (isFirstLine || (isAfterHardLineBreak && style.getTextIndentLine()) == Te xtIndentEachLine)
979 indentText = IndentText; 979 indentText = IndentText;
980 980
981 if (style.textIndentType() == TextIndentHanging) 981 if (style.getTextIndentType() == TextIndentHanging)
982 indentText = indentText == IndentText ? DoNotIndentText : IndentText; 982 indentText = indentText == IndentText ? DoNotIndentText : IndentText;
983 983
984 return indentText; 984 return indentText;
985 } 985 }
986 986
987 } // namespace blink 987 } // namespace blink
988 988
989 #endif // BreakingContextInlineHeaders_h 989 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/TextAutosizer.cpp ('k') | third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698