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

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

Issue 2845773002: Make TextDecoration 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 LineLayoutItem decorating_box, 902 LineLayoutItem decorating_box,
903 LineVerticalPositionType position_type, 903 LineVerticalPositionType position_type,
904 FontBaseline baseline_type, 904 FontBaseline baseline_type,
905 LayoutUnit farthest) const { 905 LayoutUnit farthest) const {
906 for (InlineBox* curr = FirstChild(); curr; curr = curr->NextOnLine()) { 906 for (InlineBox* curr = FirstChild(); curr; curr = curr->NextOnLine()) {
907 if (curr->GetLineLayoutItem().IsOutOfFlowPositioned()) 907 if (curr->GetLineLayoutItem().IsOutOfFlowPositioned())
908 continue; // Positioned placeholders don't affect calculations. 908 continue; // Positioned placeholders don't affect calculations.
909 909
910 // If the text decoration isn't in effect on the child, it must be outside 910 // If the text decoration isn't in effect on the child, it must be outside
911 // of |decorationObject|. 911 // of |decorationObject|.
912 if (!(curr->LineStyleRef().TextDecorationsInEffect() & 912 if (!EnumHasFlags(curr->LineStyleRef().TextDecorationsInEffect(),
913 kTextDecorationUnderline)) 913 TextDecoration::kUnderline))
914 continue; 914 continue;
915 915
916 if (decorating_box && decorating_box.IsLayoutInline() && 916 if (decorating_box && decorating_box.IsLayoutInline() &&
917 !IsAncestorAndWithinBlock(decorating_box, curr->GetLineLayoutItem())) 917 !IsAncestorAndWithinBlock(decorating_box, curr->GetLineLayoutItem()))
918 continue; 918 continue;
919 919
920 if (curr->IsInlineFlowBox()) { 920 if (curr->IsInlineFlowBox()) {
921 farthest = ToInlineFlowBox(curr)->FarthestPositionForUnderline( 921 farthest = ToInlineFlowBox(curr)->FarthestPositionForUnderline(
922 decorating_box, position_type, baseline_type, farthest); 922 decorating_box, position_type, baseline_type, farthest);
923 } else if (curr->IsInlineTextBox()) { 923 } else if (curr->IsInlineTextBox()) {
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 DCHECK_EQ(child->prevOnLine(), prev); 1731 DCHECK_EQ(child->prevOnLine(), prev);
1732 prev = child; 1732 prev = child;
1733 } 1733 }
1734 DCHECK_EQ(prev, m_lastChild); 1734 DCHECK_EQ(prev, m_lastChild);
1735 #endif 1735 #endif
1736 } 1736 }
1737 1737
1738 #endif 1738 #endif
1739 1739
1740 } // namespace blink 1740 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698