OLD | NEW |
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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 | 1028 |
1029 const ComputedStyle* style = GetLayoutObject()->Style(); | 1029 const ComputedStyle* style = GetLayoutObject()->Style(); |
1030 if (!style) | 1030 if (!style) |
1031 return AXNodeObject::GetTextStyle(); | 1031 return AXNodeObject::GetTextStyle(); |
1032 | 1032 |
1033 unsigned text_style = kTextStyleNone; | 1033 unsigned text_style = kTextStyleNone; |
1034 if (style->GetFontWeight() == kFontWeightBold) | 1034 if (style->GetFontWeight() == kFontWeightBold) |
1035 text_style |= kTextStyleBold; | 1035 text_style |= kTextStyleBold; |
1036 if (style->GetFontDescription().Style() == kFontStyleItalic) | 1036 if (style->GetFontDescription().Style() == kFontStyleItalic) |
1037 text_style |= kTextStyleItalic; | 1037 text_style |= kTextStyleItalic; |
1038 if (style->GetTextDecoration() == kTextDecorationUnderline) | 1038 if (style->GetTextDecoration() == TextDecoration::kUnderline) |
1039 text_style |= kTextStyleUnderline; | 1039 text_style |= kTextStyleUnderline; |
1040 if (style->GetTextDecoration() == kTextDecorationLineThrough) | 1040 if (style->GetTextDecoration() == TextDecoration::kLineThrough) |
1041 text_style |= kTextStyleLineThrough; | 1041 text_style |= kTextStyleLineThrough; |
1042 | 1042 |
1043 return static_cast<TextStyle>(text_style); | 1043 return static_cast<TextStyle>(text_style); |
1044 } | 1044 } |
1045 | 1045 |
1046 KURL AXLayoutObject::Url() const { | 1046 KURL AXLayoutObject::Url() const { |
1047 if (IsAnchor() && isHTMLAnchorElement(layout_object_->GetNode())) { | 1047 if (IsAnchor() && isHTMLAnchorElement(layout_object_->GetNode())) { |
1048 if (HTMLAnchorElement* anchor = toHTMLAnchorElement(AnchorElement())) | 1048 if (HTMLAnchorElement* anchor = toHTMLAnchorElement(AnchorElement())) |
1049 return anchor->Href(); | 1049 return anchor->Href(); |
1050 } | 1050 } |
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2512 | 2512 |
2513 bool AXLayoutObject::ElementAttributeValue( | 2513 bool AXLayoutObject::ElementAttributeValue( |
2514 const QualifiedName& attribute_name) const { | 2514 const QualifiedName& attribute_name) const { |
2515 if (!layout_object_) | 2515 if (!layout_object_) |
2516 return false; | 2516 return false; |
2517 | 2517 |
2518 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); | 2518 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); |
2519 } | 2519 } |
2520 | 2520 |
2521 } // namespace blink | 2521 } // namespace blink |
OLD | NEW |