[webkit-changes] [WebKit/WebKit] eb072c: Make ApplyStyleCommand::applyBlockStyle to work wi...

Ahmad Saleem noreply at github.com
Fri Dec 9 02:02:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eb072c37fe4eb37704d87b163dd4e9318cd83c5d
      https://github.com/WebKit/WebKit/commit/eb072c37fe4eb37704d87b163dd4e9318cd83c5d
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    A LayoutTests/editing/execCommand/remove-format-with-non-html-element-crash-expected.txt
    A LayoutTests/editing/execCommand/remove-format-with-non-html-element-crash.html
    M Source/WebCore/editing/ApplyStyleCommand.cpp

  Log Message:
  -----------
  Make ApplyStyleCommand::applyBlockStyle to work with non-HTML element

Make ApplyStyleCommand::applyBlockStyle to work with non-HTML element
https://bugs.webkit.org/show_bug.cgi?id=170765

Reviewed by Ryosuke Niwa.

Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=177283

This patch changes assumption to check a block to apply style as |HTMLElement|
to |Element| in |ApplyStyleCommand::applyBlockStyle()| to work with
non-HTML
element, a namespaceURI of element is other than HTML namespace URI.

Note: We can create and insert non-HTML element by document.createElementNS().

* Source/WebCore/editing/ApplyStyleCommand.cpp:
(ApplyStyleCommand::applyBlockStyle): Update assertion
* LayoutTests/editing/execCommand/remove-format-with-non-html-element-crash.html: Add Test Case
* LayoutTests/editing/execCommand/remove-format-with-non-html-element-crash-expected.txt: Add Test Case Expectations

Canonical link: https://commits.webkit.org/257617@main




More information about the webkit-changes mailing list