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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 169643002: SubtreeStyleChange for :hover/:active/:focus with ::first-letter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Check for :hover/:active/:focus instead. Created 6 years, 10 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 | « LayoutTests/fast/css/first-line-hover-001-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index c117d5f2651f171e17b02733d284f38e18fff523..85a1c4f7b20821a167bbb05df67390b2193b555b 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -809,7 +809,8 @@ void ContainerNode::focusStateChanged()
if (!renderer())
return;
- if (isElementNode() && toElement(this)->childrenAffectedByFocus())
+ if ((isElementNode() && toElement(this)->childrenAffectedByFocus())
+ || (renderStyle()->affectedByFocus() && renderStyle()->hasPseudoStyle(FIRST_LETTER)))
setNeedsStyleRecalc(SubtreeStyleChange);
else if (renderStyle()->affectedByFocus())
setNeedsStyleRecalc(LocalStyleChange);
@@ -846,7 +847,8 @@ void ContainerNode::setActive(bool down)
// FIXME: Why does this not need to handle the display: none transition like :hover does?
if (renderer()) {
- if (isElementNode() && toElement(this)->childrenAffectedByActive())
+ if ((isElementNode() && toElement(this)->childrenAffectedByActive())
+ || (renderStyle()->affectedByActive() && renderStyle()->hasPseudoStyle(FIRST_LETTER)))
setNeedsStyleRecalc(SubtreeStyleChange);
else if (renderStyle()->affectedByActive())
setNeedsStyleRecalc(LocalStyleChange);
@@ -874,7 +876,8 @@ void ContainerNode::setHovered(bool over)
return;
}
- if (isElementNode() && toElement(this)->childrenAffectedByHover())
+ if ((isElementNode() && toElement(this)->childrenAffectedByHover())
+ || (renderStyle()->affectedByHover() && renderStyle()->hasPseudoStyle(FIRST_LETTER)))
setNeedsStyleRecalc(SubtreeStyleChange);
else if (renderStyle()->affectedByHover())
setNeedsStyleRecalc(LocalStyleChange);
« no previous file with comments | « LayoutTests/fast/css/first-line-hover-001-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698