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

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: Rebase after reopen 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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 AccessibilityTextDirection AXLayoutObject::textDirection() const { 981 AccessibilityTextDirection AXLayoutObject::textDirection() const {
982 if (!getLayoutObject()) 982 if (!getLayoutObject())
983 return AXNodeObject::textDirection(); 983 return AXNodeObject::textDirection();
984 984
985 const ComputedStyle* style = getLayoutObject()->style(); 985 const ComputedStyle* style = getLayoutObject()->style();
986 if (!style) 986 if (!style)
987 return AXNodeObject::textDirection(); 987 return AXNodeObject::textDirection();
988 988
989 if (style->isHorizontalWritingMode()) { 989 if (style->isHorizontalWritingMode()) {
990 switch (style->direction()) { 990 switch (style->direction()) {
991 case LTR: 991 case TextDirection::Ltr:
992 return AccessibilityTextDirectionLTR; 992 return AccessibilityTextDirectionLTR;
993 case RTL: 993 case TextDirection::Rtl:
994 return AccessibilityTextDirectionRTL; 994 return AccessibilityTextDirectionRTL;
995 } 995 }
996 } else { 996 } else {
997 switch (style->direction()) { 997 switch (style->direction()) {
998 case LTR: 998 case TextDirection::Ltr:
999 return AccessibilityTextDirectionTTB; 999 return AccessibilityTextDirectionTTB;
1000 case RTL: 1000 case TextDirection::Rtl:
1001 return AccessibilityTextDirectionBTT; 1001 return AccessibilityTextDirectionBTT;
1002 } 1002 }
1003 } 1003 }
1004 1004
1005 return AXNodeObject::textDirection(); 1005 return AXNodeObject::textDirection();
1006 } 1006 }
1007 1007
1008 int AXLayoutObject::textLength() const { 1008 int AXLayoutObject::textLength() const {
1009 if (!isTextControl()) 1009 if (!isTextControl())
1010 return -1; 1010 return -1;
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 2487
2488 bool AXLayoutObject::elementAttributeValue( 2488 bool AXLayoutObject::elementAttributeValue(
2489 const QualifiedName& attributeName) const { 2489 const QualifiedName& attributeName) const {
2490 if (!m_layoutObject) 2490 if (!m_layoutObject)
2491 return false; 2491 return false;
2492 2492
2493 return equalIgnoringCase(getAttribute(attributeName), "true"); 2493 return equalIgnoringCase(getAttribute(attributeName), "true");
2494 } 2494 }
2495 2495
2496 } // namespace blink 2496 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698