Bug 203992 - Correct editing commands' InputEvent::inputType values
Summary: Correct editing commands' InputEvent::inputType values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 203944
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-08 00:26 PST by Milan Crha
Modified: 2019-11-10 15:49 PST (History)
3 users (show)

See Also:


Attachments
wk2-inputType.c (7.88 KB, text/x-csrc)
2019-11-08 00:26 PST, Milan Crha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2019-11-08 00:26:17 PST
Created attachment 383115 [details]
wk2-inputType.c

This is a follow up from bug #203944.

I took a set of expected Inputevent::inputType values, as specified here:
https://w3c.github.io/input-events/#interface-InputEvent-Attributes
and checked what WebKitGTK+ use. The attached program shows the result (its first line contains a command to build&run it). It's not an exhaustive list, but it shows several inconsistencies.

Below is a table of the outputs, where those with '*' are failures from the standard:

  Editing cmd             |  expected                    | received
  'insertText'            | 'insertText'                 | 'insertText'
  'InsertLineBreak'       | 'insertLineBreak'            | 'insertLineBreak'
  'InsertParagraph'       | 'insertParagraph'            | 'insertParagraph'
  'InsertOrderedList'     | 'insertOrderedList'          | 'insertOrderedList'
  'InsertUnorderedList'   | 'insertUnorderedList'        | 'insertUnorderedList'
* 'InsertHorizontalRule'  | 'insertHorizontalRule'       | 'insertText'
* 'InsertLink'            | 'insertLink'                 | '*timeout*'
  'Paste'                 | 'insertFromPaste'            | 'insertFromPaste'
  'PasteAsPlainText'      | 'insertFromPaste'            | 'insertFromPaste'
* 'PasteAsQuotation'      | 'insertFromPasteAsQuotation' | 'insertFromPaste'
  'bold'                  | 'formatBold'                 | 'formatBold'
  'Italic'                | 'formatItalic'               | 'formatItalic'
  'Underline'             | 'formatUnderline'            | 'formatUnderline'
- 'Strikethrough'         | 'formatStrikeThrough'        | 'formatUnderline' (fixed by bug #203944)
  'Superscript'           | 'formatSuperscript'          | 'formatSuperscript'
  'Subscript'             | 'formatSubscript'            | 'formatSubscript'
  'JustifyFull'           | 'formatJustifyFull'          | 'formatJustifyFull'
  'JustifyCenter'         | 'formatJustifyCenter'        | 'formatJustifyCenter'
  'JustifyRight'          | 'formatJustifyRight'         | 'formatJustifyRight'
  'JustifyLeft'           | 'formatJustifyLeft'          | 'formatJustifyLeft'
  'Indent'                | 'formatIndent'               | 'formatIndent'
  'Outdent'               | 'formatOutdent'              | 'formatOutdent'
  'MakeTextWritingDirectionLeftToRight' | 'formatSetInlineTextDirection' | 'formatSetInlineTextDirection'
  'MakeTextWritingDirectionRightToLeft' | 'formatSetInlineTextDirection' | 'formatSetInlineTextDirection'
* 'BackColor'             | 'formatBackColor'            | ''
  'ForeColor'             | 'formatFontColor'            | 'formatFontColor'
* 'FontName'              | 'formatFontName'             | ''
  'InsertHTML'            | 'insertText'                 | 'insertText'
* 'RemoveFormat'          | 'formatRemove'               | ''
  'Undo'                  | 'historyUndo'                | 'historyUndo'
  'Redo'                  | 'historyRedo'                | 'historyRedo'