Bug 5680

Summary: containsOnlyWhitespace does not need to be a virtual function
Product: WebKit Reporter: Darin Adler <darin>
Component: DOMAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Enhancement CC: cdumez
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
remove virtual containsOnlyWhitespace from DOM::NodeImpl
eric: review-
adds call to isTextNode missing from earlier patch ggaren: review+

Description Darin Adler 2005-11-09 08:21:38 PST
 
Comment 1 Darin Adler 2005-11-09 08:22:10 PST
Created attachment 4643 [details]
remove virtual containsOnlyWhitespace from DOM::NodeImpl
Comment 2 Eric Seidel (no email) 2005-11-09 12:20:40 PST
Comment on attachment 4643 [details]
remove virtual containsOnlyWhitespace from DOM::NodeImpl

This part of your patch is not safe:

+		  !curr->element() || !static_cast<TextImpl
*>(curr->element())-

It may be possible for things other than TextNodes to create RenderText objects
(at least in an SVG-enabled world).
Comment 3 Darin Adler 2005-11-09 13:41:07 PST
Comment on attachment 4643 [details]
remove virtual containsOnlyWhitespace from DOM::NodeImpl

Good point. I thought there was a check of isTextNode on that line. I'll fix
it.
Comment 4 Darin Adler 2005-12-18 15:00:18 PST
Created attachment 5145 [details]
adds call to isTextNode missing from earlier patch
Comment 5 Geoffrey Garen 2005-12-18 15:15:55 PST
Comment on attachment 5145 [details]
adds call to isTextNode missing from earlier patch

r=me
Comment 6 Lucas Forschler 2019-02-06 09:04:14 PST
Mass moving XML DOM bugs to the "DOM" Component.