Joone Blog

My major contributions to Chromium project

Posted on Nov 14, 2016

I have been working on the Chromium project since 2013. Over that time I have fixed a large number of bugs and implemented several features across the browser, mostly in two areas: Blink editing (the engine behind contenteditable and rich-text editors used by web apps such as Gmail) and Aura / Ozone / Wayland support (the windowing and display layers that let Chromium run natively on Linux).

This post summarizes those contributions. For each issue I include a short description of the problem and how it was fixed, and for each change list (CL) I add a one-line note so you can understand the work without having to open every link.

Blink Editing

These fixes target the editing engine behind contenteditable elements — fixing wrong DOM mutations, broken whitespace handling, stray markup on copy/paste, and incorrect queryCommandState results.

  1. Issue 226941 — Contenteditable issues related to backspace handling. Pressing Backspace in an editable region merged or deleted nodes incorrectly, corrupting the resulting markup.
    • CL 2064473002: fix the node merging/deletion logic that ran on Backspace.
    • CL 2117663002: follow-up covering additional edge cases.
  2. Issue 318925 — Copy and paste sometimes removes spaces between words. Whitespace was collapsed during paste, so words ran together. Fixed iteratively across several CLs.
  3. Issue 310149  is forced on SPACE between text nodes. Typing a space between text nodes inserted a non-breaking space when a regular space should have been used.
  4. Issue 335955 — Unwanted spans inserted in contentEditable elements. Editing operations added redundant <span> wrappers, polluting the markup.
  5. Issue 571420 — Chrome hangs when creating a bullet list in contenteditable. Building a bulleted list could trigger an infinite loop that froze the tab.
    • CL 2250133004: fix the list-creation logic to prevent the hang.
  6. Issue 634482 — Formatting tags converted to spans with styles on cut/paste. Semantic tags such as <b>/<i> were rewritten as styled spans during cut/paste, losing the original markup.
    • CL 2229703004: keep the original formatting tags instead of converting them to spans.
  7. Issue 625802 — Unnecessary quote appears after clicking "indent more" in the compose box. Increasing indentation inserted a spurious blockquote.
  8. Issue 582225document.queryCommandState isn't working correctly. The command-state query returned wrong results for certain selections.
  9. Issue 584939queryCommandState returns true for bold/italic/underline/strikethrough after selecting an image. Selecting an image incorrectly reported text styles as active.
    • CL 1960553002: return the correct state when the selection is an image.
  10. Issue 385374queryCommandState can return true for both list types. Both ordered and unordered list states were reported as active at the same time.
    • CL 2268843002: report only the list type that actually applies.
  11. Issue 232188 — Caret color issue in contenteditable elements. The text caret was drawn with the wrong color in some editable contexts.

Aura and Wayland support

These changes improve how Chromium integrates with the Linux desktop and bring up the Ozone/Wayland windowing backend.

  1. Issue 408481 — System dialogs (e.g. "Save As…") are not modal on Ubuntu. Native file dialogs did not block their parent window, so users could keep interacting with the page behind them.
    • CL 1624793002: make the system dialogs properly modal to their parent window.
  2. Issue 473228 — Make *::ShowWithWindowState(minimized, maximized, fullscreen) consistent across platforms. Window show/restore behavior differed between platforms; this unified it. Landed across several CLs.
  3. Issue 578890 — Upstream Wayland backend for Ozone. Contributed the Wayland platform backend so Chromium can run natively under a Wayland compositor.
  4. Issue 50485 — Korean Hangul typing issue. Composing Korean text produced incorrect input in some cases.