[webkit-reviews] review granted: [Bug 215551] Create documentOrder function, start refactoring to use it instead of Range::compare functions : [Attachment 406755] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 20 09:59:27 PDT 2020


Chris Dumez <cdumez at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 215551: Create documentOrder function, start refactoring to use it instead
of Range::compare functions
https://bugs.webkit.org/show_bug.cgi?id=215551

Attachment 406755: Patch

https://bugs.webkit.org/attachment.cgi?id=406755&action=review




--- Comment #7 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 406755
  --> https://bugs.webkit.org/attachment.cgi?id=406755
Patch

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

r=me

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1947
>      if (isNativeTextControl() && is<HTMLTextFormControlElement>(*node))

The is<HTMLTextFormControlElement>(*node) could be faster if we now leveraged
the fact that we already know node is an Element.
is<HTMLTextFormControlElement>(*node) does an is<WebCore::Element>(node) check
internally when you pass it a Node.

> Source/WebCore/dom/Node.h:676
> +class PartialOrdering {

Can you explain why we're not using a simple enum? I personally find this class
a bit confusing and not very WebKit like (is_eq() for e.g. does not seem to
match WebKit coding style).


More information about the webkit-reviews mailing list