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

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

Issue 1363823002: [Reland] Invalidate whitespace text on text color changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix rebase Created 5 years, 2 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 | « third_party/WebKit/Source/core/style/StyleDifference.h ('k') | 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) 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 607
608 if (m_layoutObject->isText()) { 608 if (m_layoutObject->isText()) {
609 // static text beneath MenuItems and MenuButtons are just reported along with the menu item, so it's ignored on an individual level 609 // static text beneath MenuItems and MenuButtons are just reported along with the menu item, so it's ignored on an individual level
610 AXObject* parent = parentObjectUnignored(); 610 AXObject* parent = parentObjectUnignored();
611 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar iaRoleAttribute() == MenuButtonRole)) { 611 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar iaRoleAttribute() == MenuButtonRole)) {
612 if (ignoredReasons) 612 if (ignoredReasons)
613 ignoredReasons->append(IgnoredReason(AXStaticTextUsedAsNameFor, parent)); 613 ignoredReasons->append(IgnoredReason(AXStaticTextUsedAsNameFor, parent));
614 return true; 614 return true;
615 } 615 }
616 LayoutText* layoutText = toLayoutText(m_layoutObject); 616 LayoutText* layoutText = toLayoutText(m_layoutObject);
617 if (!layoutText->firstTextBox()) { 617 if (!layoutText->hasTextBoxes()) {
618 if (ignoredReasons) 618 if (ignoredReasons)
619 ignoredReasons->append(IgnoredReason(AXEmptyText)); 619 ignoredReasons->append(IgnoredReason(AXEmptyText));
620 return true; 620 return true;
621 } 621 }
622 622
623 // Don't ignore static text in editable text controls. 623 // Don't ignore static text in editable text controls.
624 for (AXObject* parent = parentObject(); parent; parent = parent->parentO bject()) { 624 for (AXObject* parent = parentObject(); parent; parent = parent->parentO bject()) {
625 if (parent->roleValue() == TextFieldRole) 625 if (parent->roleValue() == TextFieldRole)
626 return false; 626 return false;
627 } 627 }
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 if (label && label->layoutObject()) { 2635 if (label && label->layoutObject()) {
2636 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2636 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2637 result.unite(labelRect); 2637 result.unite(labelRect);
2638 } 2638 }
2639 } 2639 }
2640 2640
2641 return result; 2641 return result;
2642 } 2642 }
2643 2643
2644 } // namespace blink 2644 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleDifference.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698