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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 IgnoredReasons* ignoredReasons) const { 480 IgnoredReasons* ignoredReasons) const {
481 // The following cases can apply to any element that's a subclass of 481 // The following cases can apply to any element that's a subclass of
482 // AXLayoutObject. 482 // AXLayoutObject.
483 483
484 if (!m_layoutObject) { 484 if (!m_layoutObject) {
485 if (ignoredReasons) 485 if (ignoredReasons)
486 ignoredReasons->push_back(IgnoredReason(AXNotRendered)); 486 ignoredReasons->push_back(IgnoredReason(AXNotRendered));
487 return IgnoreObject; 487 return IgnoreObject;
488 } 488 }
489 489
490 if (m_layoutObject->style()->visibility() != EVisibility::Visible) { 490 if (m_layoutObject->style()->visibility() != EVisibility::kVisible) {
491 // aria-hidden is meant to override visibility as the determinant in AX 491 // aria-hidden is meant to override visibility as the determinant in AX
492 // hierarchy inclusion. 492 // hierarchy inclusion.
493 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) 493 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false"))
494 return DefaultBehavior; 494 return DefaultBehavior;
495 495
496 if (ignoredReasons) 496 if (ignoredReasons)
497 ignoredReasons->push_back(IgnoredReason(AXNotVisible)); 497 ignoredReasons->push_back(IgnoredReason(AXNotVisible));
498 return IgnoreObject; 498 return IgnoreObject;
499 } 499 }
500 500
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 AccessibilityTextDirection AXLayoutObject::textDirection() const { 982 AccessibilityTextDirection AXLayoutObject::textDirection() const {
983 if (!getLayoutObject()) 983 if (!getLayoutObject())
984 return AXNodeObject::textDirection(); 984 return AXNodeObject::textDirection();
985 985
986 const ComputedStyle* style = getLayoutObject()->style(); 986 const ComputedStyle* style = getLayoutObject()->style();
987 if (!style) 987 if (!style)
988 return AXNodeObject::textDirection(); 988 return AXNodeObject::textDirection();
989 989
990 if (style->isHorizontalWritingMode()) { 990 if (style->isHorizontalWritingMode()) {
991 switch (style->direction()) { 991 switch (style->direction()) {
992 case TextDirection::Ltr: 992 case TextDirection::kLtr:
993 return AccessibilityTextDirectionLTR; 993 return AccessibilityTextDirectionLTR;
994 case TextDirection::Rtl: 994 case TextDirection::kRtl:
995 return AccessibilityTextDirectionRTL; 995 return AccessibilityTextDirectionRTL;
996 } 996 }
997 } else { 997 } else {
998 switch (style->direction()) { 998 switch (style->direction()) {
999 case TextDirection::Ltr: 999 case TextDirection::kLtr:
1000 return AccessibilityTextDirectionTTB; 1000 return AccessibilityTextDirectionTTB;
1001 case TextDirection::Rtl: 1001 case TextDirection::kRtl:
1002 return AccessibilityTextDirectionBTT; 1002 return AccessibilityTextDirectionBTT;
1003 } 1003 }
1004 } 1004 }
1005 1005
1006 return AXNodeObject::textDirection(); 1006 return AXNodeObject::textDirection();
1007 } 1007 }
1008 1008
1009 int AXLayoutObject::textLength() const { 1009 int AXLayoutObject::textLength() const {
1010 if (!isTextControl()) 1010 if (!isTextControl())
1011 return -1; 1011 return -1;
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 2489
2490 bool AXLayoutObject::elementAttributeValue( 2490 bool AXLayoutObject::elementAttributeValue(
2491 const QualifiedName& attributeName) const { 2491 const QualifiedName& attributeName) const {
2492 if (!m_layoutObject) 2492 if (!m_layoutObject)
2493 return false; 2493 return false;
2494 2494
2495 return equalIgnoringCase(getAttribute(attributeName), "true"); 2495 return equalIgnoringCase(getAttribute(attributeName), "true");
2496 } 2496 }
2497 2497
2498 } // namespace blink 2498 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698