WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
126103
StyleResolver::pseudoStyleForElement don't call initElement(0) before return and cause anchor element in a incorrect visited status
https://bugs.webkit.org/show_bug.cgi?id=126103
Summary
StyleResolver::pseudoStyleForElement don't call initElement(0) before return ...
xiexuehui
Reported
2013-12-20 18:22:58 PST
1, Summary this may cause EInsideLink status of RenderStyle generated by StyleResolver::styleForElement be incorrect 2, Simple Example <head> <style> a:after { content:"" } </style> </head> <body> <a id="test" href="#test" style="overflow:hidden"> click me </a> 3, Steps 1) open the above simple example in a mobile browser 2) click the anchor element in the above example 4, Issue the anchor element will not be marked as visited 5, Conclusion At first, WebCore recieve a touch event, and StyleResolver::pseudoStyleForElement was triggered. Before pseudoStyleForElement return, initElement(0) is not called, so the anchor element is cached in StyleResolver Then, WebCore receive a mouse click event, so it is added to visited link list in PageGroup, and its RenderStyle is recalculate. StyleResolver::styleForElement is call to give the RenderStyle, but initElement(element) will do nothing, because the element is cached. so the anchor element's visited status will not be detected, and m_elementLinkState will not be set to InsideVisitedLink. finially the anchor element will not be marked as visited 6, Expect call initElement(0) before StyleResolver::pseudoStyleForElement return to clear cache to element
Attachments
add a test html file containing the post example
(148 bytes, text/html)
2013-12-20 18:26 PST
,
xiexuehui
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
xiexuehui
Comment 1
2013-12-20 18:26:59 PST
Created
attachment 219823
[details]
add a test html file containing the post example
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug