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

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

Issue 1746283002: Rename enums/functions that collide in chromium style in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-13-platform: . 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 if (m_layoutTextInfo.m_text != layoutText) { 595 if (m_layoutTextInfo.m_text != layoutText) {
596 m_layoutTextInfo.m_text = layoutText; 596 m_layoutTextInfo.m_text = layoutText;
597 m_layoutTextInfo.m_font = &font; 597 m_layoutTextInfo.m_font = &font;
598 m_layoutTextInfo.m_lineBreakIterator.resetStringAndReleaseIterator(layou tText.text(), style.locale()); 598 m_layoutTextInfo.m_lineBreakIterator.resetStringAndReleaseIterator(layou tText.text(), style.locale());
599 } else if (m_layoutTextInfo.m_font != &font) { 599 } else if (m_layoutTextInfo.m_font != &font) {
600 m_layoutTextInfo.m_font = &font; 600 m_layoutTextInfo.m_font = &font;
601 } 601 }
602 602
603 // Non-zero only when kerning is enabled, in which case we measure 603 // Non-zero only when kerning is enabled, in which case we measure
604 // words with their trailing space, then subtract its width. 604 // words with their trailing space, then subtract its width.
605 float wordTrailingSpaceWidth = (font.fontDescription().typesettingFeatures() & Kerning) ? 605 float wordTrailingSpaceWidth = (font.fontDescription().getTypesettingFeature s() & Kerning) ?
606 font.width(constructTextRun(font, &spaceCharacter, 1, style, style.direc tion())) + wordSpacing 606 font.width(constructTextRun(font, &spaceCharacter, 1, style, style.direc tion())) + wordSpacing
607 : 0; 607 : 0;
608 608
609 UChar lastCharacter = m_layoutTextInfo.m_lineBreakIterator.lastCharacter(); 609 UChar lastCharacter = m_layoutTextInfo.m_lineBreakIterator.lastCharacter();
610 UChar secondToLastCharacter = m_layoutTextInfo.m_lineBreakIterator.secondToL astCharacter(); 610 UChar secondToLastCharacter = m_layoutTextInfo.m_lineBreakIterator.secondToL astCharacter();
611 for (; m_current.offset() < layoutText.textLength(); m_current.fastIncrement InTextNode()) { 611 for (; m_current.offset() < layoutText.textLength(); m_current.fastIncrement InTextNode()) {
612 bool previousCharacterIsSpace = m_currentCharacterIsSpace; 612 bool previousCharacterIsSpace = m_currentCharacterIsSpace;
613 UChar c = m_current.current(); 613 UChar c = m_current.current();
614 m_currentCharacterIsSpace = c == spaceCharacter || c == tabulationCharac ter || (!m_preservesNewline && (c == newlineCharacter)); 614 m_currentCharacterIsSpace = c == spaceCharacter || c == tabulationCharac ter || (!m_preservesNewline && (c == newlineCharacter));
615 615
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 980
981 if (style.getTextIndentType() == 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

Powered by Google App Engine
This is Rietveld 408576698