This is a followup of https://bugs.webkit.org/show_bug.cgi?id=186656. We need to alter the logic of resetting the inline state in this function.