summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html
diff options
context:
space:
mode:
authorcommit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-01-15 15:42:55 +0000
committercommit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-01-15 15:42:55 +0000
commit713268bd268484d9f027e414f260228d81f47a6b (patch)
treee65132e865f56171aad3ace542ceea3373175c0e /third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html
parent09b2f0a00957df7c7843cc77e70f8f799413b577 (diff)
downloadchromium_src-713268bd268484d9f027e414f260228d81f47a6b.zip
chromium_src-713268bd268484d9f027e414f260228d81f47a6b.tar.gz
chromium_src-713268bd268484d9f027e414f260228d81f47a6b.tar.bz2
display:inline's hover behavior is not applied to ::before and ::after pseudo elements
https://bugs.webkit.org/show_bug.cgi?id=91723 Patch by Elliott Sprehn <esprehn@gmail.com> on 2013-01-15 Reviewed by Eric Seidel. Source/WebCore: When hovering over the anonymous text renderers inside :before and :after we would correctly detect a hit in InlineTextBox::nodeAtPoint, but would then fail to set the correct node for the hit test because in RenderObject::updateHitTestResult node() is null. Instead we should walk up the render tree to the PseudoElement and treat it as if we hit that. Test: fast/css-generated-content/hover-inline.html * rendering/RenderObject.cpp: (WebCore::RenderObject::updateHitTestResult): LayoutTests: Add a test that hovering generated content inside an inline element causes the element to become hovered. * fast/css-generated-content/hover-inline-expected.txt: Added. * fast/css-generated-content/hover-inline.html: Added. git-svn-id: svn://svn.chromium.org/blink/trunk@139739 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html b/third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html
new file mode 100644
index 0000000..3938d2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+
+<style>
+ * { margin: 0; padding: 0; }
+ span:before { content: "Hover this text."; }
+</style>
+
+<span></span>
+
+<p>Hovering the generated text should hover the span: </p>
+
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+onload = function() {
+ // Need to cause a layout before hover will work.
+ document.body.offsetLeft;
+ document.querySelector('span').onmouseover = function() {
+ document.body.appendChild(document.createElement('p')).textContent = 'PASS';
+ };
+ if (window.eventSender)
+ eventSender.mouseMoveTo(5, 5);
+}
+</script>