Changeset 93481 in webkit
- Timestamp:
- Aug 20, 2011 11:11:55 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93479 r93481 1 2011-08-20 Darin Adler <darin@apple.com> 2 3 If Range::insertNode is passed an empty document fragment, it creates a broken DOM tree 4 https://bugs.webkit.org/show_bug.cgi?id=65015 5 6 Reviewed by Alexey Proskuryakov. 7 8 * fast/dom/Range/insertNode-empty-fragment-crash-expected.txt: Added. 9 * fast/dom/Range/insertNode-empty-fragment-crash.html: Added. 10 1 11 2011-08-20 Balazs Kelemen <kbalazs@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r93477 r93481 1 2011-08-20 Darin Adler <darin@apple.com> 2 3 If Range::insertNode is passed an empty document fragment, it creates a broken DOM tree 4 https://bugs.webkit.org/show_bug.cgi?id=65015 5 6 Reviewed by Alexey Proskuryakov. 7 8 Test: fast/dom/Range/insertNode-empty-fragment-crash.html 9 10 * dom/Range.cpp: (WebCore::Range::insertNode): Don't adjust the range after insertion 11 if we didn't add anything. Otherwise the code will put a wrong "child before" value into 12 the range end boundary point. 13 1 14 2011-08-20 Ken Buchanan <kenrb@chromium.org> 2 15 -
trunk/Source/WebCore/dom/Element.cpp
r93087 r93481 131 131 } 132 132 133 NodeRareData*Element::createRareData()134 { 135 return new ElementRareData;133 OwnPtr<NodeRareData> Element::createRareData() 134 { 135 return adoptPtr(new ElementRareData); 136 136 } 137 137 -
trunk/Source/WebCore/dom/Element.h
r93071 r93481 428 428 429 429 QualifiedName m_tagName; 430 virtual NodeRareData*createRareData();430 virtual OwnPtr<NodeRareData> createRareData(); 431 431 432 432 ElementRareData* rareData() const; -
trunk/Source/WebCore/dom/Node.cpp
r93385 r93481 537 537 538 538 ASSERT(!NodeRareData::rareDataMap().contains(this)); 539 NodeRareData* data = createRareData() ;539 NodeRareData* data = createRareData().leakPtr(); 540 540 NodeRareData::rareDataMap().set(this, data); 541 541 setFlag(HasRareDataFlag); … … 543 543 } 544 544 545 NodeRareData*Node::createRareData()546 { 547 return new NodeRareData;545 OwnPtr<NodeRareData> Node::createRareData() 546 { 547 return adoptPtr(new NodeRareData); 548 548 } 549 549 -
trunk/Source/WebCore/dom/Node.h
r93276 r93481 676 676 virtual void derefEventTarget(); 677 677 678 virtual NodeRareData*createRareData();678 virtual OwnPtr<NodeRareData> createRareData(); 679 679 bool rareDataFocused() const; 680 680 -
trunk/Source/WebCore/dom/Range.cpp
r93269 r93481 4 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 5 5 * (C) 2001 Peter Kelly (pmk@post.com) 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 7 7 * 8 8 * This library is free software; you can redistribute it and/or … … 1049 1049 // This special case doesn't seem to match the DOM specification, but it's currently required 1050 1050 // to pass Acid3. We might later decide to remove this. 1051 if (collapsed )1051 if (collapsed && numNewChildren) 1052 1052 m_end.set(m_start.container(), startOffset + numNewChildren, lastChild.get()); 1053 1053 } -
trunk/Source/WebCore/page/animation/AnimationController.cpp
r91999 r93481 456 456 457 457 AnimationController::AnimationController(Frame* frame) 458 : m_data( new AnimationControllerPrivate(frame))458 : m_data(adoptPtr(new AnimationControllerPrivate(frame))) 459 459 { 460 460 } … … 462 462 AnimationController::~AnimationController() 463 463 { 464 delete m_data;465 464 } 466 465 -
trunk/Source/WebCore/page/animation/AnimationController.h
r86981 r93481 32 32 #include "CSSPropertyNames.h" 33 33 #include <wtf/Forward.h> 34 #include <wtf/OwnPtr.h> 34 35 35 36 namespace WebCore { … … 78 79 79 80 private: 80 AnimationControllerPrivate*m_data;81 OwnPtr<AnimationControllerPrivate> m_data; 81 82 }; 82 83
Note: See TracChangeset
for help on using the changeset viewer.