[webkit-reviews] review granted: [Bug 194880] Smart Insert for paragraphs. : [Attachment 364876] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 15 22:10:29 PDT 2019


Ryosuke Niwa <rniwa at webkit.org> has granted Megan Gardner
<megan_gardner at apple.com>'s request for review:
Bug 194880: Smart Insert for paragraphs.
https://bugs.webkit.org/show_bug.cgi?id=194880

Attachment 364876: Patch

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




--- Comment #44 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 364876
  --> https://bugs.webkit.org/attachment.cgi?id=364876
Patch

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

> Source/WebCore/editing/ReplaceSelectionCommand.cpp:1144
>      if ((isListHTMLElement(refNode.get()) ||
(isLegacyAppleStyleSpan(refNode.get()) &&
isListHTMLElement(refNode->firstChild())))
> -	   && blockStart && blockStart->renderer()->isListItem())
> +	   && blockStart && blockStart->renderer()->isListItem()) {

Why don't we do:
bool isInsertingIntoList = (isListHTMLElement(refNode.get()) || ...;
if (isInsertingIntoList)
    refNode = ...;
instead?


More information about the webkit-reviews mailing list