Changeset 154320 in webkit
- Timestamp:
- Aug 20, 2013, 3:13:00 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154319 r154320 1 2013-08-20 Antti Koivisto <antti@apple.com> 2 3 <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp 4 5 Reviewed by Andreas Kling. 6 7 * fast/css-generated-content/insert-stylesheet-and-pseudo-crash-expected.txt: Added. 8 * fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html: Added. 9 1 10 2013-08-20 Simon Pena <simon.pena@samsung.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r154317 r154320 1 2013-08-20 Antti Koivisto <antti@apple.com> 2 3 <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp 4 5 Reviewed by Andreas Kling. 6 7 PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it. 8 9 Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached 10 along with rendering. However in this case the page inserts a <style> that uses ::before along with an element 11 that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly 12 insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash. 13 14 Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html 15 16 * dom/Element.cpp: 17 (WebCore::Element::insertedInto): 18 (WebCore::Element::removedFrom): 19 20 Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document. 21 When they are added normally during render tree attach these calls don't happen either. 22 1 23 2013-08-20 Ryosuke Niwa <rniwa@webkit.org> 2 24 -
trunk/Source/WebCore/dom/Element.cpp
r154286 r154320 1285 1285 #endif 1286 1286 1287 if (Element* before = pseudoElement(BEFORE))1288 before->insertedInto(insertionPoint);1289 1290 if (Element* after = pseudoElement(AFTER))1291 after->insertedInto(insertionPoint);1292 1293 1287 if (!insertionPoint->isInTreeScope()) 1294 1288 return InsertionDone; … … 1331 1325 bool wasInDocument = insertionPoint->document(); 1332 1326 #endif 1333 1334 if (Element* before = pseudoElement(BEFORE))1335 before->removedFrom(insertionPoint);1336 1337 if (Element* after = pseudoElement(AFTER))1338 after->removedFrom(insertionPoint);1339 1327 1340 1328 #if ENABLE(DIALOG_ELEMENT)
Note:
See TracChangeset
for help on using the changeset viewer.