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

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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Added 2 changes in mac files Created 4 years 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 AccessibilityTextDirection AXLayoutObject::textDirection() const { 973 AccessibilityTextDirection AXLayoutObject::textDirection() const {
974 if (!getLayoutObject()) 974 if (!getLayoutObject())
975 return AXNodeObject::textDirection(); 975 return AXNodeObject::textDirection();
976 976
977 const ComputedStyle* style = getLayoutObject()->style(); 977 const ComputedStyle* style = getLayoutObject()->style();
978 if (!style) 978 if (!style)
979 return AXNodeObject::textDirection(); 979 return AXNodeObject::textDirection();
980 980
981 if (style->isHorizontalWritingMode()) { 981 if (style->isHorizontalWritingMode()) {
982 switch (style->direction()) { 982 switch (style->direction()) {
983 case LTR: 983 case TextDirection::Ltr:
984 return AccessibilityTextDirectionLTR; 984 return AccessibilityTextDirectionLTR;
985 case RTL: 985 case TextDirection::Rtl:
986 return AccessibilityTextDirectionRTL; 986 return AccessibilityTextDirectionRTL;
987 } 987 }
988 } else { 988 } else {
989 switch (style->direction()) { 989 switch (style->direction()) {
990 case LTR: 990 case TextDirection::Ltr:
991 return AccessibilityTextDirectionTTB; 991 return AccessibilityTextDirectionTTB;
992 case RTL: 992 case TextDirection::Rtl:
993 return AccessibilityTextDirectionBTT; 993 return AccessibilityTextDirectionBTT;
994 } 994 }
995 } 995 }
996 996
997 return AXNodeObject::textDirection(); 997 return AXNodeObject::textDirection();
998 } 998 }
999 999
1000 int AXLayoutObject::textLength() const { 1000 int AXLayoutObject::textLength() const {
1001 if (!isTextControl()) 1001 if (!isTextControl())
1002 return -1; 1002 return -1;
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 2479
2480 bool AXLayoutObject::elementAttributeValue( 2480 bool AXLayoutObject::elementAttributeValue(
2481 const QualifiedName& attributeName) const { 2481 const QualifiedName& attributeName) const {
2482 if (!m_layoutObject) 2482 if (!m_layoutObject)
2483 return false; 2483 return false;
2484 2484
2485 return equalIgnoringCase(getAttribute(attributeName), "true"); 2485 return equalIgnoringCase(getAttribute(attributeName), "true");
2486 } 2486 }
2487 2487
2488 } // namespace blink 2488 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698