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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 2845773002: Make TextDecoration an enum class. (Closed)
Patch Set: 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 1027
1028 const ComputedStyle* style = GetLayoutObject()->Style(); 1028 const ComputedStyle* style = GetLayoutObject()->Style();
1029 if (!style) 1029 if (!style)
1030 return AXNodeObject::GetTextStyle(); 1030 return AXNodeObject::GetTextStyle();
1031 1031
1032 unsigned text_style = kTextStyleNone; 1032 unsigned text_style = kTextStyleNone;
1033 if (style->GetFontWeight() == kFontWeightBold) 1033 if (style->GetFontWeight() == kFontWeightBold)
1034 text_style |= kTextStyleBold; 1034 text_style |= kTextStyleBold;
1035 if (style->GetFontDescription().Style() == kFontStyleItalic) 1035 if (style->GetFontDescription().Style() == kFontStyleItalic)
1036 text_style |= kTextStyleItalic; 1036 text_style |= kTextStyleItalic;
1037 if (style->GetTextDecoration() == kTextDecorationUnderline) 1037 if (style->GetTextDecoration() == TextDecoration::kUnderline)
1038 text_style |= kTextStyleUnderline; 1038 text_style |= kTextStyleUnderline;
1039 if (style->GetTextDecoration() == kTextDecorationLineThrough) 1039 if (style->GetTextDecoration() == TextDecoration::kLineThrough)
1040 text_style |= kTextStyleLineThrough; 1040 text_style |= kTextStyleLineThrough;
1041 1041
1042 return static_cast<TextStyle>(text_style); 1042 return static_cast<TextStyle>(text_style);
1043 } 1043 }
1044 1044
1045 KURL AXLayoutObject::Url() const { 1045 KURL AXLayoutObject::Url() const {
1046 if (IsAnchor() && isHTMLAnchorElement(layout_object_->GetNode())) { 1046 if (IsAnchor() && isHTMLAnchorElement(layout_object_->GetNode())) {
1047 if (HTMLAnchorElement* anchor = toHTMLAnchorElement(AnchorElement())) 1047 if (HTMLAnchorElement* anchor = toHTMLAnchorElement(AnchorElement()))
1048 return anchor->Href(); 1048 return anchor->Href();
1049 } 1049 }
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 2511
2512 bool AXLayoutObject::ElementAttributeValue( 2512 bool AXLayoutObject::ElementAttributeValue(
2513 const QualifiedName& attribute_name) const { 2513 const QualifiedName& attribute_name) const {
2514 if (!layout_object_) 2514 if (!layout_object_)
2515 return false; 2515 return false;
2516 2516
2517 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); 2517 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true");
2518 } 2518 }
2519 2519
2520 } // namespace blink 2520 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698