WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 37944
37129
CSS last-child not being properly updated dynamically after innerHTML update
https://bugs.webkit.org/show_bug.cgi?id=37129
Summary
CSS last-child not being properly updated dynamically after innerHTML update
Stephen Murphy
Reported
2010-04-05 18:05:45 PDT
Created
attachment 52592
[details]
HTML file showing the innerHTML and last-child bug When updating a node's content via innerHTML, the last-child CSS attribute isn't re-evaluated properly. I've attached an HTML file showing the issue.
Attachments
HTML file showing the innerHTML and last-child bug
(907 bytes, text/html)
2010-04-05 18:05 PDT
,
Stephen Murphy
no flags
Details
Fix for Bug 37129 - CSS last-child not being properly updated dynamically after innerHTML update
(3.39 KB, patch)
2010-05-12 03:56 PDT
,
Yuzo Fujishima
no flags
Details
Formatted Diff
Diff
Fix for Bug 37129 - CSS last-child not being properly updated dynamically after innerHTML update
(3.39 KB, patch)
2010-05-12 04:00 PDT
,
Yuzo Fujishima
tkent
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Stephen Murphy
Comment 1
2010-04-05 18:09:00 PDT
This not only affects WebKit nightly but Safari 4.05 (5531.22.7)
Alexey Proskuryakov
Comment 2
2010-04-06 11:34:12 PDT
Confirmed with
r57153
. I tested that last-child works dynamically when adding several items with appendChild(). Perhaps it's more than just last-child that doesn't work well with innerHTML?
Stephen Murphy
Comment 3
2010-04-06 13:43:15 PDT
One workaround for this is to use nth-child(N) where N is the last item. Mobile Safari is affected as well.
David Richards
Comment 4
2010-04-21 13:18:52 PDT
I guess I duped this bug, but I also included some other examples and workarounds because it also affects styling of a set of classes. bug: 37944
https://bugs.webkit.org/show_bug.cgi?id=37944
Yuzo Fujishima
Comment 5
2010-05-12 03:56:26 PDT
Created
attachment 55829
[details]
Fix for
Bug 37129
- CSS last-child not being properly updated dynamically after innerHTML update
Yuzo Fujishima
Comment 6
2010-05-12 04:00:02 PDT
Created
attachment 55830
[details]
Fix for
Bug 37129
- CSS last-child not being properly updated dynamically after innerHTML update
Yoshiki Hayashi
Comment 7
2010-05-12 04:15:04 PDT
I don't know if both are needed or only one is needed but I happened to have sent a different patch to fix the same bug in different bug. What a coincidence the time I posted is almost the same time as yours. :)
https://bugs.webkit.org/show_bug.cgi?id=37944
Yuzo Fujishima
Comment 8
2010-05-19 01:50:41 PDT
Ping?
Alexey Proskuryakov
Comment 9
2010-05-19 09:24:00 PDT
I don't know if this is correct or not, but it certainly looks suspicious that a function called beginParsingChildren() is called when not parsing.
Kent Tamura
Comment 10
2010-07-13 03:28:33 PDT
I chose the patch in
Bug#37944
. Thank you for working on this. *** This bug has been marked as a duplicate of
bug 37944
***
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