<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>194156</bug_id>
          
          <creation_ts>2019-02-01 08:26:19 -0800</creation_ts>
          <short_desc>Bug on the removeFormat command for contentEditable elements</short_desc>
          <delta_ts>2019-02-01 08:26:19 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>Safari 11</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.13</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Raphael Chauveau">raph.chauveau</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1501111</commentid>
    <comment_count>0</comment_count>
      <attachid>360862</attachid>
    <who name="Raphael Chauveau">raph.chauveau</who>
    <bug_when>2019-02-01 08:26:19 -0800</bug_when>
    <thetext>Created attachment 360862
code to reproduce the bug

When removing format from a contentEditable element where styling has been applied in a specific order, the background color is left behind and overflows.

Steps to reproduce the problem, using the attached demo file :
# Select the word &quot;love&quot; in the Demo bellow
# Click the button &quot;Bold&quot;
# Click the button &quot;Background color&quot;
# Click the button &quot;Foreground color&quot;
# Select the words &quot;I love pizza&quot;
# Click the button &quot;Remove format&quot;

What is the expected behavior?
After the execution of the above steps, we expect the words &quot;I love pizza&quot; to have no formatting (color or font style).

What went wrong?
We notice that the words &quot;love pizza&quot; have a green background color.

This bug could be reproduced in Chrome and Safari, but not Firefox. This leads me to think that Webkit is the source of the bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>360862</attachid>
            <date>2019-02-01 08:26:19 -0800</date>
            <delta_ts>2019-02-01 08:26:19 -0800</delta_ts>
            <desc>code to reproduce the bug</desc>
            <filename>file_194156.txt</filename>
            <type>text/plain</type>
            <size>1399</size>
            <attacher name="Raphael Chauveau">raph.chauveau</attacher>
            
              <data encoding="base64">PHNjcmlwdD4NCiAgZnVuY3Rpb24gY29tbWFuZChjb21tYW5kLCBwYXJhbSkgew0KICAgIGRvY3Vt
ZW50LmV4ZWNDb21tYW5kKGNvbW1hbmQsIGZhbHNlLCBwYXJhbSk7DQogIH07DQo8L3NjcmlwdD4N
Cg0KPGgxPkJVRzwvaDE+DQoNCjxoMj5TY29wZTwvaDI+DQo8cD5UaGlzIGJ1ZyBhZmZlY3RzIHRo
ZSBXZWJraXQgYnJvd3NlciBlbmdpbmUuICh1c2VkIGluIENocm9taXVtLCBTYWZhcmksIE9wZXJh
LCAuLi4pPC9wPg0KDQo8aDI+U3VtbWFyeTwvaDI+DQo8cD5XaGVuIHJlbW92aW5nIGZvcm1hdCBm
cm9tIGEgY29udGVudEVkaXRhYmxlIGVsZW1lbnQgd2hlcmUgc3R5bGluZyBoYXMgYmVlbiBhcHBs
aWVkIGluIGEgc3BlY2lmaWMgb3JkZXIsIHRoZSBiYWNrZ3JvdW5kIGNvbG9yIGlzIGxlZnQgYmVo
aW5kIGFuZCBvdmVyZmxvd3MuPC9wPg0KDQo8aDI+UmVwcm9kdWNpbmcgdGhlIGJ1ZzwvaDI+DQo8
cD5JbiBvcmRlciB0byByZXByb2R1Y2UgdGhlIGJ1ZyA6PC9wPg0KPHVsPg0KICA8bGk+U2VsZWN0
IHRoZSB3b3JkICJsb3ZlIiBpbiB0a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