Changeset 21862 in webkit
- Timestamp:
- May 29, 2007 1:33:04 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r21861 r21862 1 2007-05-29 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Maciej. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=13792 6 REGRESSION: WebKit doesn't show this javascript screenshot page (and crashes after click on its "hidden link") 7 8 * fast/frames/removal-before-attach-crash-expected.txt: Added. 9 * fast/frames/removal-before-attach-crash.html: Added. 10 1 11 2007-05-29 Darin Adler <darin@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r21861 r21862 1 2007-05-29 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Maciej. 4 5 - fix crash in http://bugs.webkit.org/show_bug.cgi?id=13792 6 REGRESSION: WebKit doesn't show this javascript screenshot page (and crashes after click on its "hidden link") 7 8 Test: fast/frames/removal-before-attach-crash.html 9 10 Delayed the queueing of the post-attach callback until attach(). 11 12 * html/HTMLFrameElementBase.cpp: 13 (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): 14 (WebCore::HTMLFrameElementBase::parseMappedAttribute): Replaced call to the 15 HTMLElement implementation with a call to the HTMLFrameOwnerElement 16 implementation, as the latter is the parent class. 17 (WebCore::HTMLFrameElementBase::insertedIntoDocument): Instead of queueing 18 the post-attach callback here, just set a flag telling us to do so 19 at the beginning of attach(). 20 (WebCore::HTMLFrameElementBase::removedFromDocument): Reset the above flag. 21 (WebCore::HTMLFrameElementBase::attach): If this is the first attach() after 22 being inserted into the document, queue a post-attach callback to load the 23 frame. 24 (WebCore::HTMLFrameElementBase::willRemove): Changed to call up to the correct 25 parent class. 26 (WebCore::HTMLFrameElementBase::setFocus): Ditto. 27 * html/HTMLFrameElementBase.h: 28 * html/HTMLPlugInElement.cpp: 29 (WebCore::HTMLPlugInElement::mapToEntry): Replaced call to the HTMLElement 30 implementation with a call to the HTMLFrameOwnerElement implementation, 31 as the latter is the parent class. 32 (WebCore::HTMLPlugInElement::parseMappedAttribute): Ditto. 33 (WebCore::HTMLPlugInElement::checkDTD): Ditto. 34 (WebCore::HTMLPlugInElement::detach): Ditto. 35 1 36 2007-05-29 Darin Adler <darin@apple.com> 2 37 -
trunk/WebCore/html/HTMLFrameElementBase.cpp
r21749 r21862 53 53 , m_noResize(false) 54 54 , m_viewSource(false) 55 , m_shouldOpenURLAfterAttach(false) 55 56 { 56 57 } … … 115 116 else if (attr->name() == idAttr) { 116 117 // Important to call through to base for the id attribute so the hasID bit gets set. 117 HTML Element::parseMappedAttribute(attr);118 HTMLFrameOwnerElement::parseMappedAttribute(attr); 118 119 m_name = attr->value(); 119 120 } else if (attr->name() == nameAttr) { … … 150 151 setHTMLEventListener(unloadEvent, attr); 151 152 } else 152 HTML Element::parseMappedAttribute(attr);153 HTMLFrameOwnerElement::parseMappedAttribute(attr); 153 154 } 154 155 … … 160 161 void HTMLFrameElementBase::insertedIntoDocument() 161 162 { 162 HTML Element::insertedIntoDocument();163 HTMLFrameOwnerElement::insertedIntoDocument(); 163 164 164 165 m_name = getAttribute(nameAttr); … … 172 173 // Othewise, a synchronous load that executed JavaScript would see incorrect 173 174 // (0) values for the frame's renderer-dependent properties, like width. 174 queuePostAttachCallback(&HTMLFrameElementBase::openURLCallback, this); 175 m_shouldOpenURLAfterAttach = true; 176 } 177 178 void HTMLFrameElementBase::removedFromDocument() 179 { 180 m_shouldOpenURLAfterAttach = false; 181 182 HTMLFrameOwnerElement::removedFromDocument(); 175 183 } 176 184 177 185 void HTMLFrameElementBase::attach() 178 186 { 179 HTMLElement::attach(); 187 if (m_shouldOpenURLAfterAttach) { 188 m_shouldOpenURLAfterAttach = false; 189 queuePostAttachCallback(&HTMLFrameElementBase::openURLCallback, this); 190 } 191 192 HTMLFrameOwnerElement::attach(); 180 193 181 194 if (RenderPart* renderPart = static_cast<RenderPart*>(renderer())) … … 191 204 } 192 205 193 HTML Element::willRemove();206 HTMLFrameOwnerElement::willRemove(); 194 207 } 195 208 … … 218 231 void HTMLFrameElementBase::setFocus(bool received) 219 232 { 220 HTML Element::setFocus(received);233 HTMLFrameOwnerElement::setFocus(received); 221 234 if (Page* page = document()->page()) 222 235 page->focusController()->setFocusedFrame(received ? contentFrame() : 0); -
trunk/WebCore/html/HTMLFrameElementBase.h
r21624 r21862 37 37 38 38 virtual void insertedIntoDocument(); 39 virtual void removedFromDocument(); 39 40 virtual void willRemove(); 40 41 … … 101 102 bool m_noResize; 102 103 bool m_viewSource; 104 105 bool m_shouldOpenURLAfterAttach; 103 106 }; 104 107 -
trunk/WebCore/html/HTMLPlugInElement.cpp
r21749 r21862 125 125 } 126 126 127 return HTML Element::mapToEntry(attrName, result);127 return HTMLFrameOwnerElement::mapToEntry(attrName, result); 128 128 } 129 129 … … 143 143 addHTMLAlignment(attr); 144 144 else 145 HTML Element::parseMappedAttribute(attr);145 HTMLFrameOwnerElement::parseMappedAttribute(attr); 146 146 } 147 147 148 148 bool HTMLPlugInElement::checkDTD(const Node* newChild) 149 149 { 150 return newChild->hasTagName(paramTag) || HTML Element::checkDTD(newChild);150 return newChild->hasTagName(paramTag) || HTMLFrameOwnerElement::checkDTD(newChild); 151 151 } 152 152 … … 159 159 } 160 160 161 HTML Element::detach();161 HTMLFrameOwnerElement::detach(); 162 162 } 163 163
Note: See TracChangeset
for help on using the changeset viewer.