Bug 5680 - containsOnlyWhitespace does not need to be a virtual function
Summary: containsOnlyWhitespace does not need to be a virtual function
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Enhancement
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 08:21 PST by Darin Adler
Modified: 2019-02-06 09:04 PST (History)
1 user (show)

See Also:


Attachments
remove virtual containsOnlyWhitespace from DOM::NodeImpl (2.87 KB, patch)
2005-11-09 08:22 PST, Darin Adler
eric: review-
Details | Formatted Diff | Diff
adds call to isTextNode missing from earlier patch (2.90 KB, patch)
2005-12-18 15:00 PST, Darin Adler
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.