Summary: | Need to check NULL frame in EventHandler::updateDragAndDrop. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jian Li <jianli> | ||||
Component: | WebCore JavaScript | Assignee: | Jian Li <jianli> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Jian Li
2009-09-30 10:02:44 PDT
Created attachment 40379 [details]
Proposed Patch
Comment on attachment 40379 [details] Proposed Patch > - if (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > - accept = static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame()->eventHandler()->updateDragAndDrop(event, clipboard); > + Frame* frame = (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > + ? static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame() : 0; We don't line up ? characters like this. In fact, I'm not sure why it's indented the way it is. Just indent four characters as you would anywhere else. r=me (In reply to comment #2) > (From update of attachment 40379 [details]) > > - if (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > > - accept = static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame()->eventHandler()->updateDragAndDrop(event, clipboard); > > + Frame* frame = (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > > + ? static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame() : 0; > > We don't line up ? characters like this. In fact, I'm not sure why it's > indented the way it is. Just indent four characters as you would anywhere else. > > r=me I just copied the same code structure from the nearby code. I will fix both occurrences when I land the change. Thanks. Committed as http://trac.webkit.org/changeset/48934. |