Add first-letter assert exception in RenderButton::setupInnerStyle().
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 06:13:02 +0000 (06:13 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 06:13:02 +0000 (06:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140517OB

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-05-07
Reviewed by Darin Adler.

StyleResolver references inner block's render style temporary in
RenderBlock::styleDidChange() when we have first-letter css pseudo
element.

* rendering/RenderButton.cpp:
(WebCore::RenderButton::setupInnerStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderButton.cpp

index d09c0f7f238ae751cee783f06dc5dc35a1759c12..ca46fbb4f701e9efa90dcb08b2dfe584b1406496 100644 (file)
@@ -1,3 +1,17 @@
+2015-05-07  Hyungwook Lee  <hyungwook.lee@navercorp.com>
+
+        Add first-letter assert exception in RenderButton::setupInnerStyle().
+        https://bugs.webkit.org/show_bug.cgi?id=140517OB
+
+        Reviewed by Darin Adler.
+
+        StyleResolver references inner block's render style temporary in
+        RenderBlock::styleDidChange() when we have first-letter css pseudo
+        element.
+
+        * rendering/RenderButton.cpp:
+        (WebCore::RenderButton::setupInnerStyle):
+
 2015-05-07  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, fix build after r183970.
index 2efced268acb13d1ca612147ddcc279943ca1114..7a3eaa9eab2cc525b181d48cc60aff4a4bb5e781 100644 (file)
@@ -127,7 +127,7 @@ void RenderButton::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
 
 void RenderButton::setupInnerStyle(RenderStyle* innerStyle) 
 {
-    ASSERT(innerStyle->refCount() == 1);
+    ASSERT(style().hasPseudoStyle(FIRST_LETTER) || innerStyle->refCount() == 1);
     // RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is
     // safe to modify.
     // FIXME: I don't see how the comment above is accurate when this is called