Remove FIRST_LINE_INHERITED fake pseudo style
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2016 15:58:35 +0000 (15:58 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2016 15:58:35 +0000 (15:58 +0000)
commitd4a882e8f3e0e787f5178c821729fd2a5576fcf9
tree1fe358f7c72353e4a85b805971b10ce8a692358b
parent777acdb12f262214ab681c8f3fd2db7c58fcf39f
Remove FIRST_LINE_INHERITED fake pseudo style
https://bugs.webkit.org/show_bug.cgi?id=165071

Reviewed by Andreas Kling.

Source/WebCore:

These are create during layout an then cached to the RenderStyle. Cache computed first line style to
RenderObject rare data instead, avoiding style mutation an other confusing messiness.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::computeFirstLineStyle):
(WebCore::RenderElement::firstLineStyle):

    Cache the first line style.

(WebCore::RenderElement::invalidateCachedFirstLineStyle):
(WebCore::RenderElement::styleWillChange):

    Invalidate subtree if we have cached first line style.

(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::uncachedFirstLineStyle): Deleted.
(WebCore::RenderElement::cachedFirstLineStyle): Deleted.
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::rareDataMap):
(WebCore::RenderObject::rareData):
(WebCore::RenderObject::ensureRareData):
* rendering/RenderObject.h:

    Stop copying rare data objects.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):

    Use the normal mechanism for invalidating layout for first-line instead of a hack in pseudoStyleCacheIsInvalid.

* rendering/style/RenderStyleConstants.h:
* style/RenderTreeUpdater.cpp:
(WebCore::pseudoStyleCacheIsInvalid):

    Simplify.

LayoutTests:

Expand the test case a bit.

* fast/css/pseudo-cache-stale-expected.html:
* fast/css/pseudo-cache-stale.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/pseudo-cache-stale-expected.html
LayoutTests/fast/css/pseudo-cache-stale.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/style/RenderTreeUpdater.cpp