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

Unified Diff: Source/core/css/AffectedByFocusTest.cpp

Issue 420193007: Use new Traversal<> API more in the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take feedback into consideration Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/AffectedByFocusTest.cpp
diff --git a/Source/core/css/AffectedByFocusTest.cpp b/Source/core/css/AffectedByFocusTest.cpp
index cde3b5c6614d3171ea80f336b7f130131803f9c6..68fc3a2eca29446c1b9ea18a43d6ee49e6d6e757 100644
--- a/Source/core/css/AffectedByFocusTest.cpp
+++ b/Source/core/css/AffectedByFocusTest.cpp
@@ -59,16 +59,16 @@ void AffectedByFocusTest::setHtmlInnerHTML(const char* htmlContent)
void AffectedByFocusTest::checkElements(ElementResult expected[], unsigned expectedCount) const
{
unsigned i = 0;
- Element* elm = document().body();
+ HTMLElement* element = document().body();
- for (; elm && i < expectedCount; elm = ElementTraversal::next(*elm), ++i) {
- ASSERT_TRUE(elm->hasTagName(expected[i].tag));
- ASSERT(elm->renderStyle());
- ASSERT_EQ(expected[i].affectedBy, elm->renderStyle()->affectedByFocus());
- ASSERT_EQ(expected[i].childrenOrSiblingsAffectedBy, elm->childrenOrSiblingsAffectedByFocus());
+ for (; element && i < expectedCount; element = Traversal<HTMLElement>::next(*element), ++i) {
+ ASSERT_TRUE(element->hasTagName(expected[i].tag));
+ ASSERT(element->renderStyle());
+ ASSERT_EQ(expected[i].affectedBy, element->renderStyle()->affectedByFocus());
+ ASSERT_EQ(expected[i].childrenOrSiblingsAffectedBy, element->childrenOrSiblingsAffectedByFocus());
}
- ASSERT(!elm && i == expectedCount);
+ ASSERT(!element && i == expectedCount);
}
// A global :focus rule in html.css currently causes every single element to be
« no previous file with comments | « no previous file | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698