Bug 47735 - Remove some functions from class Node and make a few others non-virtual
Summary: Remove some functions from class Node and make a few others non-virtual
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-15 12:59 PDT by Darin Adler
Modified: 2019-02-06 09:04 PST (History)
4 users (show)

See Also:


Attachments
Patch (33.11 KB, patch)
2010-10-15 16:51 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Already-reviewed patch: Posted because it’s the only way to get the Early Warning System to test it (33.63 KB, patch)
2010-10-18 11:27 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-10-15 12:59:05 PDT
Remove some functions from class Node and make a few others non-virtual
Comment 1 Darin Adler 2010-10-15 16:51:04 PDT
Created attachment 70919 [details]
Patch
Comment 2 Darin Adler 2010-10-15 16:51:31 PDT
Reported bug 47755 about the false positive style violation found in this patch.
Comment 3 WebKit Review Bot 2010-10-15 16:53:04 PDT
Attachment 70919 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/dom/Node.h:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 WebKit Review Bot 2010-10-15 18:34:10 PDT
Attachment 70919 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/4478010
Comment 5 Alexey Proskuryakov 2010-10-16 16:48:18 PDT
Comment on attachment 70919 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=70919&action=review

r=me

> WebCore/ChangeLog:62
> +        (WebCore::enclosingInline): Moved function here from the Node class. Also
> +        fixed an incorrect cast this function did, which assumed the function
> +        result was always an element, which the function does not guarantee.

Does this change observable behavior?

> WebCore/dom/Node.h:370
> +    // see @ref traversePreviousNode()

Is there a reason to keep a part of this comment in Javadoc style?
Comment 6 Dimitri Glazkov (Google) 2010-10-16 16:59:48 PDT
Note the cr-linux redness. I think it's because of the FloatPoint.h include removed.
Comment 7 Darin Adler 2010-10-18 08:21:21 PDT
(In reply to comment #6)
> Note the cr-linux redness. I think it's because of the FloatPoint.h include removed.

I’ll add an include of MathExtras.h to HistoryItem.cpp to pick up the ceil function.
Comment 8 Darin Adler 2010-10-18 11:24:52 PDT
(In reply to comment #5)
> > WebCore/ChangeLog:62
> > +        (WebCore::enclosingInline): Moved function here from the Node class. Also
> > +        fixed an incorrect cast this function did, which assumed the function
> > +        result was always an element, which the function does not guarantee.
> 
> Does this change observable behavior?

I don’t think the incorrect cast had yet led to anything that would create incorrect code. I thought of it as a “ticking time bomb”, though.

> > WebCore/dom/Node.h:370
> > +    // see @ref traversePreviousNode()
> 
> Is there a reason to keep a part of this comment in Javadoc style?

I guess I could have gone further and tried to wipe out the half-baked attempt to use Javadoc style. I wasn’t sure whether I should.
Comment 9 Darin Adler 2010-10-18 11:27:09 PDT
Created attachment 71063 [details]
Already-reviewed patch: Posted because it’s the only way to get the Early Warning System to test it
Comment 10 WebKit Review Bot 2010-10-18 11:28:55 PDT
Attachment 71063 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/dom/Node.h:38:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Alexey Proskuryakov 2010-10-18 11:32:26 PDT
> I guess I could have gone further and tried to wipe out the half-baked attempt to use Javadoc style. I wasn’t sure whether I should.

It seems strange to keep them in comments that were modified (this may be the only one, in fact).
Comment 12 Darin Adler 2010-10-18 11:33:01 PDT
(In reply to comment #11)
> > I guess I could have gone further and tried to wipe out the half-baked attempt to use Javadoc style. I wasn’t sure whether I should.
> 
> It seems strange to keep them in comments that were modified (this may be the only one, in fact).

Fixed now locally (although not in the patch I uploaded for the early warning system).
Comment 13 Darin Adler 2010-10-18 12:52:49 PDT
Committed r69987: <http://trac.webkit.org/changeset/69987>
Comment 14 Lucas Forschler 2019-02-06 09:04:06 PST
Mass moving XML DOM bugs to the "DOM" Component.