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

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

Issue 2905053002: Fix null ptr exception (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 if (isHTMLSelectElement(*GetNode())) { 538 if (isHTMLSelectElement(*GetNode())) {
539 HTMLSelectElement& select_element = toHTMLSelectElement(*GetNode()); 539 HTMLSelectElement& select_element = toHTMLSelectElement(*GetNode());
540 return select_element.IsMultiple() ? kListBoxRole : kPopUpButtonRole; 540 return select_element.IsMultiple() ? kListBoxRole : kPopUpButtonRole;
541 } 541 }
542 542
543 if (isHTMLOptionElement(*GetNode())) { 543 if (isHTMLOptionElement(*GetNode())) {
544 HTMLSelectElement* select_element = 544 HTMLSelectElement* select_element =
545 toHTMLOptionElement(GetNode())->OwnerSelectElement(); 545 toHTMLOptionElement(GetNode())->OwnerSelectElement();
546 return select_element->IsMultiple() ? kListBoxOptionRole 546 return !select_element || select_element->IsMultiple()
547 : kMenuListOptionRole; 547 ? kListBoxOptionRole
548 : kMenuListOptionRole;
548 } 549 }
549 550
550 if (isHTMLTextAreaElement(*GetNode())) 551 if (isHTMLTextAreaElement(*GetNode()))
551 return kTextFieldRole; 552 return kTextFieldRole;
552 553
553 if (HeadingLevel()) 554 if (HeadingLevel())
554 return kHeadingRole; 555 return kHeadingRole;
555 556
556 if (isHTMLDivElement(*GetNode())) 557 if (isHTMLDivElement(*GetNode()))
557 return kGenericContainerRole; 558 return kGenericContainerRole;
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 return String(); 3233 return String();
3233 return ToTextControlElement(node)->StrippedPlaceholder(); 3234 return ToTextControlElement(node)->StrippedPlaceholder();
3234 } 3235 }
3235 3236
3236 DEFINE_TRACE(AXNodeObject) { 3237 DEFINE_TRACE(AXNodeObject) {
3237 visitor->Trace(node_); 3238 visitor->Trace(node_);
3238 AXObjectImpl::Trace(visitor); 3239 AXObjectImpl::Trace(visitor);
3239 } 3240 }
3240 3241
3241 } // namespace blink 3242 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698