[webkit-reviews] review granted: [Bug 70800] WebKit nests pre on copy and paste when the pre is the root editable element : [Attachment 112984] Fixed typo in comment

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 31 12:05:19 PDT 2011


Darin Adler <darin at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 70800: WebKit nests pre on copy and paste when the pre is the root editable
element
https://bugs.webkit.org/show_bug.cgi?id=70800

Attachment 112984: Fixed typo in comment
https://bugs.webkit.org/attachment.cgi?id=112984&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=112984&action=review


> Source/WebCore/editing/htmlediting.cpp:1182
> +    return node->hasTagName(listingTag)
> +    || node->hasTagName(olTag)
> +    || node->hasTagName(preTag)
> +    || node->hasTagName(tableTag)
> +    || node->hasTagName(ulTag)
> +    || node->hasTagName(xmpTag)
> +    || node->hasTagName(h1Tag)
> +    || node->hasTagName(h2Tag)
> +    || node->hasTagName(h3Tag)
> +    || node->hasTagName(h4Tag)
> +    || node->hasTagName(h5Tag);

Normally these would all be indented one tab stop (four spaces).

Not sure if the compiler will notice the common subexpression and remove the 11
unneeded checks of the “is element” bit. If not, the function could be written
with an early exit and cast to make sure it gets that right.


More information about the webkit-reviews mailing list