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

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

Issue 308683007: Rename childrenAffectedBy methods and constants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Renamed as proposed. Created 6 years, 7 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/css/DragUpdateTest.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 de9dc0aebdc049573a7a9e05e3151763475ccb88..8a4f2cbd3fb056fb58e9acfe6b12ea2823bd159e 100644
--- a/Source/core/css/AffectedByFocusTest.cpp
+++ b/Source/core/css/AffectedByFocusTest.cpp
@@ -25,7 +25,7 @@ protected:
struct ElementResult {
const WebCore::QualifiedName tag;
bool affectedBy;
- bool childrenAffectedBy;
+ bool childrenOrSiblingsAffectedBy;
};
virtual void SetUp() OVERRIDE;
@@ -64,7 +64,7 @@ void AffectedByFocusTest::checkElements(ElementResult expected[], unsigned expec
ASSERT_TRUE(elm->hasTagName(expected[i].tag));
ASSERT(elm->renderStyle());
ASSERT_EQ(expected[i].affectedBy, elm->renderStyle()->affectedByFocus());
- ASSERT_EQ(expected[i].childrenAffectedBy, elm->childrenAffectedByFocus());
+ ASSERT_EQ(expected[i].childrenOrSiblingsAffectedBy, elm->childrenOrSiblingsAffectedByFocus());
}
ASSERT(!elm && i == expectedCount);
@@ -72,7 +72,7 @@ void AffectedByFocusTest::checkElements(ElementResult expected[], unsigned expec
// A global :focus rule in html.css currently causes every single element to be
// affectedByFocus. Check that all elements in a document with no :focus rules
-// gets the affectedByFocus set on RenderStyle and not childrenAffectedByFocus.
+// gets the affectedByFocus set on RenderStyle and not childrenOrSiblingsAffectedByFocus.
TEST_F(AffectedByFocusTest, UAUniversalFocusRule)
{
ElementResult expected[] = {
@@ -91,7 +91,7 @@ TEST_F(AffectedByFocusTest, UAUniversalFocusRule)
checkElements(expected, sizeof(expected) / sizeof(ElementResult));
}
-// ":focus div" will mark ascendants of all divs with childrenAffectedByFocus.
+// ":focus div" will mark ascendants of all divs with childrenOrSiblingsAffectedByFocus.
TEST_F(AffectedByFocusTest, FocusedAscendant)
{
ElementResult expected[] = {
@@ -113,7 +113,7 @@ TEST_F(AffectedByFocusTest, FocusedAscendant)
checkElements(expected, sizeof(expected) / sizeof(ElementResult));
}
-// "body:focus div" will mark the body element with childrenAffectedByFocus.
+// "body:focus div" will mark the body element with childrenOrSiblingsAffectedByFocus.
TEST_F(AffectedByFocusTest, FocusedAscendantWithType)
{
ElementResult expected[] = {
@@ -135,9 +135,9 @@ TEST_F(AffectedByFocusTest, FocusedAscendantWithType)
checkElements(expected, sizeof(expected) / sizeof(ElementResult));
}
-// ":not(body):focus div" should not mark the body element with childrenAffectedByFocus.
+// ":not(body):focus div" should not mark the body element with childrenOrSiblingsAffectedByFocus.
// Note that currently ":focus:not(body)" does not do the same. Then the :focus is
-// checked and the childrenAffectedByFocus flag set before the negated type selector
+// checked and the childrenOrSiblingsAffectedByFocus flag set before the negated type selector
// is found.
TEST_F(AffectedByFocusTest, FocusedAscendantWithNegatedType)
{
@@ -161,7 +161,7 @@ TEST_F(AffectedByFocusTest, FocusedAscendantWithNegatedType)
}
// Checking current behavior for ":focus + div", but this is a BUG or at best
-// sub-optimal. The focused element will also in this case get childrenAffectedByFocus
+// sub-optimal. The focused element will also in this case get childrenOrSiblingsAffectedByFocus
// even if it's really a sibling. Effectively, the whole sub-tree of the focused
// element will have styles recalculated even though none of the children are
// affected. There are other mechanisms that makes sure the sibling also gets its
@@ -219,7 +219,7 @@ TEST_F(AffectedByFocusTest, AffectedByFocusUpdate)
ASSERT_EQ(1U, accessCount);
}
-TEST_F(AffectedByFocusTest, ChildrenAffectedByFocusUpdate)
+TEST_F(AffectedByFocusTest, ChildrenOrSiblingsAffectedByFocusUpdate)
{
// Check that when focussing the outer div in the document below, you get a
// style recalc for the whole subtree.
@@ -285,7 +285,7 @@ TEST_F(AffectedByFocusTest, NoInvalidationSetFocusUpdate)
{
// Check that when focussing the outer div in the document below, you get a
// style recalc for the outer div only. The invalidation set for :focus will
- // include 'a', but the id=d div should be affectedByFocus, not childrenAffectedByFocus.
+ // include 'a', but the id=d div should be affectedByFocus, not childrenOrSiblingsAffectedByFocus.
setHtmlInnerHTML("<style>#nomatch:focus .a { border: 1px solid lime; }</style>"
"<div id=d tabIndex=1>"
« no previous file with comments | « no previous file | Source/core/css/DragUpdateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698