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

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

Issue 2900633003: Make TextEmphasisMark an enum class. (Closed)
Patch Set: Rebase Created 3 years, 7 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, 2008, 2009, 2010, 2011 Apple Inc. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 return true; 483 return true;
484 } 484 }
485 return false; 485 return false;
486 } 486 }
487 487
488 bool InlineTextBox::GetEmphasisMarkPosition( 488 bool InlineTextBox::GetEmphasisMarkPosition(
489 const ComputedStyle& style, 489 const ComputedStyle& style,
490 TextEmphasisPosition& emphasis_position) const { 490 TextEmphasisPosition& emphasis_position) const {
491 // This function returns true if there are text emphasis marks and they are 491 // This function returns true if there are text emphasis marks and they are
492 // suppressed by ruby text. 492 // suppressed by ruby text.
493 if (style.GetTextEmphasisMark() == kTextEmphasisMarkNone) 493 if (style.GetTextEmphasisMark() == TextEmphasisMark::kNone)
494 return false; 494 return false;
495 495
496 emphasis_position = style.GetTextEmphasisPosition(); 496 emphasis_position = style.GetTextEmphasisPosition();
497 // Ruby text is always over, so it cannot suppress emphasis marks under. 497 // Ruby text is always over, so it cannot suppress emphasis marks under.
498 if (emphasis_position == TextEmphasisPosition::kUnder) 498 if (emphasis_position == TextEmphasisPosition::kUnder)
499 return true; 499 return true;
500 500
501 LineLayoutBox containing_block = GetLineLayoutItem().ContainingBlock(); 501 LineLayoutBox containing_block = GetLineLayoutItem().ContainingBlock();
502 // This text is not inside a ruby base, so it does not have ruby text over it. 502 // This text is not inside a ruby base, so it does not have ruby text over it.
503 if (!containing_block.IsRubyBase()) 503 if (!containing_block.IsRubyBase())
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 for (; printed_characters < kLayoutObjectCharacterOffset; 748 for (; printed_characters < kLayoutObjectCharacterOffset;
749 printed_characters++) 749 printed_characters++)
750 fputc(' ', stderr); 750 fputc(' ', stderr);
751 fprintf(stderr, "(%d,%d) \"%s\"\n", Start(), Start() + Len(), 751 fprintf(stderr, "(%d,%d) \"%s\"\n", Start(), Start() + Len(),
752 value.Utf8().data()); 752 value.Utf8().data());
753 } 753 }
754 754
755 #endif 755 #endif
756 756
757 } // namespace blink 757 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698