Wednesday, March 01, 2017

Enable to open multiple file-pickers in Chromium for Linux

Sometimes, we don't know exact requirements or expect user behaviors while developing or fix something. I fixed the file-picker modal issue in Chromium for Linux last year. At that time, the reviewer and I thought that there would be no case to pop-up multiple file-pickers, but it happened  since M55 when you follow the following steps:
1) Enable "Ask where to save" in settings.
2) Open 2 tabs of e.g.:
3) Wait for 2 downloader windows, and close/cancel/etc both
4) Freeze or crash

Here is a video to reproduce the problem.

When file-picker is opened, it disables event listening of the main host window. Then, the user closes the file-picker, it enables the event listening. Now, the host widow has a counter to check the number of the open file-pickers and it doesn't disable the event listening if there are any open file-picker. The event listening can be enabled when the last file-picker is closed. Here is the fix.
Anyway, you may see the fix in M58(Apr 25th, 2017)

Friday, February 17, 2017

Apple-style-span class was fully removed from Blink

Finally, Apple-style-span class was fully removed from Blink(commit).

Apple-style-span has not been produced since 2011:, but there were still some legacy code to handle Apple-style-span class because old WebKit engines has produced it, but now the usage is quite low(<=0.0001%). So, we decided to remove it from Blink at the last BlinkOn7. The code were executed whenever the users copy text or run Editing APIs(document.execCommand) to change the styles. Other non-standard CSS classes(Apple-interchange-newline, Apple-converted-space, Apple-paste-as-quotation) will be also removed soon if possible.

Anyway, I feel that editing in Chromium is a bit faster :P

Tuesday, November 29, 2016

Make file-picker modal in Chromium for Linux

When I stared working on Chromium, I found a bug in Chromium for Linux: the file-picker was not modal. So, while opening a file-picker, the users could control the main window. Sometimes, it caused mis-behaviors such as we were able to send an email while attaching a file.
There was already a bug and it seemed easy to fix it, but, it took 2 years to fully fix the problem.

The root cause is as follows:

Chromium for Linux uses GtkFileChooserDialog to open a file-picker, but it is not modal to the X11 host window because GtkFileChooserDialog can be modal only to the parent GtkWindow. So I tried to allow the X11 host window to disable input event handling to make a file-picker modal:  Here is the details:

Opening a file-picker

DisableEventListening() disables event listening for the host window using aura::ScopedWindowTargeter, which allows to temporarily replace the event-targeter with ui::NullEventTargeter. It returns a scope handle that is used to call |destroy_callback| when closing the file-picker.

class ScopedHandle {
   explicit ScopedHandle(const base::Closure& destroy_callback);
   void CancelCallback();

    base::Closure destroy_callback_;

In addition, we also set another destroy callback(OnFilePickerDestroy) to the GtkFileChooserDialog that can be called when the file-picker is closed.

Close the file-picker

As you can see, OnFilePickerDestroy deletes scoped_handle.
void OnFilePickerDestroy(views::DesktopWindowTreeHostX11::ScopedHandle*
   scoped_handle) {
 delete scoped_handle;

Then, |destroy_callback| of ScopedHandle below is automatically called.
void DesktopWindowTreeHostX11::EnableEventListening() {
 modal_dialog_xid_ = 0;

You can find more details and discussion at here.

The first change list was reverted due to the UI freezing problem that happens when the users open a file-picker from a child window of the X11 host window. The second change list finally fixed this issue(BUG 408481, 579408). I also added a test case for the fix: BrowserSelectFileDialogTest.ModalTest.

Monday, November 14, 2016

My major contributions to Chromium project

I have been working on Chromium project since 2013 and fixed many bugs and implemented some features. Here are my major contributions:

Blink Editing
  1. [Issue 226941] Contenteditable issues related to backspace handling
  2. [Issue 318925] Copy and paste sometimes removes spaces between words
  1. [Issue 310149] ContentEditable:   is forced on SPACE between text nodes
  2. [Issue 335955] Unwanted spans inserted in contentEditable elements
  3. [issue 571420] chrome hangs on when creating bullet list in contenteditable
  1. [Issue 634482] Formatting tags converted to spans with styles on cut/paste
  2. [Issue 625802] Unnecessary quote appears after clicking on indent more option in compose box.
  3. [Issue 582225] document.queryCommandState isn't working well with and
  4. [Issue 584939] document.queryCommandState returns true for bold, italic, underline, and strikethrough after selecting image
  5. [Issue 385374] queryCommandState can return true for both list types
  6. [issue 232188] Caret color issue in content editable element

Aura and Wayland support:

  1. [Issue 408481] System dialogs (e.g. 'Save As...') are not modal on Ubuntu
  2. [Issue 473228] Make *::ShowWithWindowState(minimized, maximized, fullscreen) consistent across platforms
  3. Issue 578890 upstream wayland backend for ozone
  4. Issue 50485 Korean Hangul typing issue  

Tuesday, July 22, 2014

OSCON 2014

I attended OSCON 2014 held in Portland, Oregon. I think Portland is the Mecca of Open Source because OSCON is held there every year and Intel Open Source Technology center is also in Hillsboro near Portland. In addition, Linus Torvalds is based in Portland.

I wanted to attend some sessions this year, but I didn't see many related to my job. There are more high level topics above system level. Anyway, it's great listening to web developers as a web engine developer.

OSCON is a bit different from other F/OSS conferences, which is aimed at the Web development, clouds, database, language, and hardware like Raspberry Pi and Arduino. So, there are no Linux kernel, GNOME/KDE, and other system level topics. I think that Guadec or FOSDEM is well suited for me.

Anyway, I really enjoyed the atmosphere of the F/OSS conference. I saw many hackers and geeks who were hacking around session rooms. There were many BoFs until 10PM.

Many companies that have open source solutions joined the Expo. They showed their solutions and services to visitors. Intel also showed a Crosswalk demo video with a web application running on Crosswalk controlling a drone remotely, which shows Crosswalk can talk to the device using JavaScript to communicate with each other over wireless networks. It was cool.

I had an opportunity to use Firefox OS. The device looks cheap, but the UI responsiveness is really good. I heard that it's just 150$, but it was released in some developing countries. I hope to see a Firefox OS phone in the major markets. I got lots of information from the Firefox OS session. The speakers introduced ways on how to develop Firefox OS applications and to use the development tools. It's quite interesting to know that Firefox OS applications can run in Firefox for Android.

I felt that I need to learn other areas to more enjoy talks in OSCON next year. :-)

Wednesday, April 02, 2014


Ozone-Wayland is an Ozone implementation of Chromium, which allows to run Crosswalk and Chromium browser natively on Wayland without any X11 dependence[1].

I have been working on Ozone-Wayland recently. There were two releases since I was involved in the development. In the latest release, I contributed the virtual keyboard support to Ozone-Wayland. You can find how it works in the following video:

The ozone-wayland team has been focusing on graphics accelerations such as WebGL, Canvas 2D, Accelerated Compositing on Wayland. WebGL and Canvas 2D accelerations can be accelerated by off-screen Rendering in GPU process. In the latest release, we started supporting multi-touch and virtual keyboard, which work fine on Tizen IVI as you can the above video.

What is Ozone?
 Ozone is an abstraction layer used by Chromium browsers to separate out the different windowing systems and also abstract surface acceleration for Aura UI framework, input handling, event handling, and other UI-related matters[4]. Ozone-Wayland provides Wayland support for Ozone[2].


  1. Project Homepage:
  3. Ozone-Wayland Release Adds Virtual Keyboard, Touch Support, Mar. 26,  2014 
  4. Chromium On Wayland "Ozone" Continues, Oct. 07, 2013
  5. Wayland-Based Chromium Browser Released, Nov. 11, 2013
  6. Chromium Ported To Wayland, Now Working, Sep. 18, 2013

Monday, December 30, 2013

What I learned about American holidays

This year, I experienced Halloween, Thanksgiving day, and Christmas with my family for the first time since I moved to the US. There were many new things I learned about these holidays, so I’d like to share them with you.

Many Koreans know about Halloween because the young Korean people who had studied in the US started bringing Halloween customs back to South Korea and enjoying Halloween there since the 2000s and the majority of kindergartens have a Halloween costume party these days, but Halloween is still not commonly celebrated in Korea, so it’s very hard to find a person wearing a Halloween costume on the streets on Halloween.

I didn’t know that Halloween started in the US at first. From reading Wikipedia, I learned that Irish immigrants brought their Halloween into the new land and then it has been developed into what we see today. Actually, I didn’t know Halloween is such a big holiday like Christmas, until I saw every big market start to sell big pumpkins at the end of September. Moreover, a Korean also suggested to me that I visit a pumpkin farm near Portland together. I didn’t think I would buy a pumpkin at that time. Anyway, I took my family there in early October.

I was surprised to see many pumpkins in the field. The pumpkin farm was very fun to walk around. I got on a small train with my daughter lead by a tractor. There were many kinds of farm animals such as ponies, pigs, cows, sheep, and chickens, so my daughter saw them very closely, which made her excited. Every family, including the Korean family, bought pumpkins. Finally, I bought a pumpkin for my daughter and it still rolls around on the living room floor.

On Halloween, my daughter wore a vampire dress and went out with me to get candies and chocolates. I saw many children and their parents wore various costumes walking around. They really enjoyed the day, even some who were adults, so I considered wearing a costume for the next Halloween day. My daughter is also prepared for next Halloween: I already bought her another costume for 50% off!

After Halloween, I noticed that many people started getting ready for Thanksgiving. I I became aware that, like Halloween, Thanksgiving Day also started in the U.S. I thought every Western person enjoyed Thanksgiving day, similar to how Korean people sometimes think all western people are American.

Fortunately, an older Korean couple who have been living in the U.S. for many years invited me to their Thanksgiving dinner. If it wasn't for my friendly daughter, I might not have had the chance to participate in a Thanksgiving feast. While my wife was grocery shopping with my daughter near our apartment one day, she smiled at an elderly Korean couple. They started chatting, and my wife found out that they had lived in the U.S. for many years. They ended up inviting me to their house for Thanksgiving dinner. They prepared a turkey, sweet potatoes, cranberry jam and kimchi and soybean stew. The turkey was really good. I heard that it takes a lot of time to cook a turkey, from marinating to roasting. I would like to thank the couple and hope everything is great with them.

Christmas Day in the U.S. is a bit different although it is also a holiday in Korea. It seemed that every family really enjoyed Christmas day: I saw many houses decked out with lights for Christmas and my colleagues brought Christmas cookies to the office. I also decorated a Christmas tree with ornaments and lights for my daughter, which was my first time to have a Christmas tree at home. My tree is a fake one, but many families seem to buy a real tree. As you may know, it’s very hard to find a real Christmas tree and houses decked with lights in Korea. Usually, churches and department stores are decked with lights, but not private homes. Decorating a Christmas tree is also not common, even for Christians. I also attended the Portland Christmas tree lighting ceremony in Pioneer Square, which is one of my best memories of Portland. An interesting thing was that nobody around me had attended this ceremony, which for me was like many Seoul citizens never having gone up to the observation deck of the 63 building in Yeouido.

Through experiencing these holidays in Oregon for the first time, I realized that we just know superficial things about how other people live in their countries, and I have resolved to try to learn as much as possible about America and Americans while I live in the U.S.