RESOLVED FIXED 71764
Rename CSS document() -> findDocument(), to indicate tree climbing
https://bugs.webkit.org/show_bug.cgi?id=71764
Summary Rename CSS document() -> findDocument(), to indicate tree climbing
Roland Steiner
Reported 2011-11-07 21:40:04 PST
Various classes in CSS call CSSStyleSheet's document() function, which climbs the CSS object's tree to locate the document. Rename the function and all calling sites to findDocument() to indicate this overhead.
Attachments
Patch (16.13 KB, patch)
2011-11-07 21:44 PST, Roland Steiner
no flags
Roland Steiner
Comment 1 2011-11-07 21:44:26 PST
Roland Steiner
Comment 2 2011-11-07 21:46:36 PST
Incidentally, Source/WebCore/page/PageSerializer.cpp contains 2 cases where the return value of the document/findDocument() call isn't checked for NULL (see the patch). I'm not familiar enough with the code to know whether this is a potential issue or safe.
Darin Adler
Comment 3 2011-11-08 10:13:28 PST
(In reply to comment #2) > Incidentally, Source/WebCore/page/PageSerializer.cpp contains 2 cases where the return value of the document/findDocument() call isn't checked for NULL (see the patch). I'm not familiar enough with the code to know whether this is a potential issue or safe. You’re right to question that. Hard to tell if there is any real problem. A separate issue is that some call sites put the document into a Document* and then do some other work and then use it afterward. In some cases a RefPtr<Document> might be needed instead.
WebKit Review Bot
Comment 4 2011-11-08 11:05:00 PST
Comment on attachment 113987 [details] Patch Clearing flags on attachment: 113987 Committed r99595: <http://trac.webkit.org/changeset/99595>
WebKit Review Bot
Comment 5 2011-11-08 11:05:05 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.