:first-line pseudo selector ignoring words created from :before
https://bugs.webkit.org/show_bug.cgi?id=80794
Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-10-07
Reviewed by Daniel Bates.
Source/WebCore:
The :first-line pseudo-element style is not applied for content
which is generated from the :before/:after pseudo-elements.
Test: fast/css/first-line-style-for-before-after-content.html
* rendering/RenderObject.cpp:
(WebCore::firstLineStyleForCachedUncachedType):
Added a new static helper function incorporating the common
functionality of both uncachedFirstLineStyle() and firstLineStyleSlowCase()
functions. It also modifies the functionality to handle the
scenario when :first-line style needs to be applied on content
generated from :before/:after.
While getting the :first-line style we should also consider the case
when the content is generated from a :before/:after pseudo-element in
which case the RenderInline's parent should be considered for
obtaining the first-line style.
(WebCore):
(WebCore::RenderObject::uncachedFirstLineStyle):
(WebCore::RenderObject::firstLineStyleSlowCase):
Moved the duplicate code between the two functions to the common
helper function firstLineStyleForCachedUncachedType().
LayoutTests:
* fast/css/first-line-style-for-before-after-content-expected.html: Added.
* fast/css/first-line-style-for-before-after-content.html: Added.
Added ref test for verification of the scenario when :first-line style
is applied to content generated from :before/:after pseudo-elements.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed