blob: 8ec4d504ce50111948bf68e2f704d62d72ec3b16 [file] [log] [blame]
When updating the tree, the style needs to be invalidated when the :first-child changes, even if there is no renderer.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Base case for rightmost element with :first-child
PASS getComputedStyle(document.getElementById("target1")).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target2")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target3")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(4, 5, 6)"
Removed first child (target1)
PASS getComputedStyle(document.getElementById("target2")).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target3")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(4, 5, 6)"
Add back target1 at the end
PASS getComputedStyle(document.getElementById("target2")).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target3")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target1")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(4, 5, 6)"
Base case for a styled element with an ancestor affected by :first-child
PASS getComputedStyle(document.getElementById("target4")).color is "rgb(7, 8, 9)"
PASS getComputedStyle(document.getElementById("target5")).color is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target6")).color is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target5")).backgroundColor is "rgb(10, 11, 12)"
PASS getComputedStyle(document.getElementById("target6")).backgroundColor is "rgb(10, 11, 12)"
Removed first child (target4's parent)
PASS getComputedStyle(document.getElementById("target5")).color is "rgb(7, 8, 9)"
PASS getComputedStyle(document.getElementById("target6")).color is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target5")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target6")).backgroundColor is "rgb(10, 11, 12)"
Add back target4's parent at the end
PASS getComputedStyle(document.getElementById("target5")).color is "rgb(7, 8, 9)"
PASS getComputedStyle(document.getElementById("target6")).color is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target4")).color is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target5")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target6")).backgroundColor is "rgb(10, 11, 12)"
PASS getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(10, 11, 12)"
PASS successfullyParsed is true
TEST COMPLETE