Bug 75330 - REGRESSION (r92823): Background color not preserved when copying and pasting a table row
Summary: REGRESSION (r92823): Background color not preserved when copying and pasting ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: HasReduction, InRadar, Regression
Depends on:
Blocks: 75615
  Show dependency treegraph
 
Reported: 2011-12-28 16:41 PST by mitz
Modified: 2012-04-23 00:01 PDT (History)
6 users (show)

See Also:


Attachments
Email message for reproducing the bug (2.47 KB, text/plain)
2011-12-28 16:41 PST, mitz
no flags Details
reduction (600 bytes, text/html)
2012-01-03 16:55 PST, Ryosuke Niwa
no flags Details
fixes the bug (7.05 KB, patch)
2012-01-03 17:51 PST, Ryosuke Niwa
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2011-12-28 16:41:54 PST
Created attachment 120708 [details]
Email message for reproducing the bug

Steps to reproduce:
0. In Mail preferences > Compositing, select “Include selected text, if any; otherwise include all text”
1. Open the attached patch.eml in Mail
2. Tripe-click the green line to select it in its entirety
3. Choose Message > Reply

Expected results:
In the new compose window, the quoted row maintains its green background color.

Actual result:
In the new compose window, the quoted row is missing the green background color.

Regression:
Caused by <http://trac.webkit.org/r92823>

Notes:
Alternatively, you can reproduce this by opening the message in Mail, choosing Message > Send again, selecting the row, cutting it, and pasting it, or even copying and pasting in-place.
Comment 1 Radar WebKit Bug Importer 2011-12-28 16:42:25 PST
<rdar://problem/10630181>
Comment 2 Ryosuke Niwa 2012-01-03 16:55:42 PST
Created attachment 121020 [details]
reduction

Reproduction steps:
1. Open the attached file
2. Copy
3. Paste inside iframe
Comment 3 Ryosuke Niwa 2012-01-03 17:51:45 PST
Created attachment 121029 [details]
fixes the bug
Comment 4 Tony Chang 2012-01-04 09:52:27 PST
Comment on attachment 121029 [details]
fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=121029&action=review

> Source/WebCore/editing/EditingStyle.cpp:99
> +static PassRefPtr<CSSMutableStyleDeclaration> editingStyleFromComputedStyle(PassRefPtr<CSSComputedStyleDeclaration> style, bool includeNonInheritableProperties = false)

Nit: Should we convert includeNonInheritableProperties to an enum?

> LayoutTests/editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html:5
> +The pated text should have lightgreen background color.</p>

pated -> pasted
Comment 5 Ryosuke Niwa 2012-01-04 14:05:26 PST
Committed r104068: <http://trac.webkit.org/changeset/104068>
Comment 6 Csaba Osztrogonác 2012-01-04 14:28:09 PST
(In reply to comment #5)
> Committed r104068: <http://trac.webkit.org/changeset/104068>

It broke 12 tests on GTK and on Qt: 
http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r104068%20(15677)/results.html
Comment 7 Ryosuke Niwa 2012-01-04 14:36:44 PST
(In reply to comment #6)
> (In reply to comment #5)
> > Committed r104068: <http://trac.webkit.org/changeset/104068>
> 
> It broke 12 tests on GTK and on Qt: 
> http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r104068%20(15677)/results.html

I'm confused. Qt bot hasn't even caught up yet. Also, my patch can't affect non-editing tests as EditingStyle isn't used anywhere but in editing.
Comment 8 Csaba Osztrogonác 2012-01-04 14:46:18 PST
(In reply to comment #7)
> I'm confused. Qt bot hasn't even caught up yet. Also, my patch can't affect non-editing tests as EditingStyle isn't used anywhere but in editing.

Our internal bots caught your patch: http://build.webkit.sed.hu/waterfall?category=core
Comment 9 Ryosuke Niwa 2012-01-04 14:50:25 PST
(In reply to comment #8)
> (In reply to comment #7)
> > I'm confused. Qt bot hasn't even caught up yet. Also, my patch can't affect non-editing tests as EditingStyle isn't used anywhere but in editing.
> 
> Our internal bots caught your patch: http://build.webkit.sed.hu/waterfall?category=core

Oops, that's because I have a busted Element.cpp change :( Didn't see that. Will revert it in a minute.
Comment 10 Ryosuke Niwa 2012-01-04 15:04:18 PST
(In reply to comment #9)
> Oops, that's because I have a busted Element.cpp change :( Didn't see that. Will revert it in a minute.

Reverted it in http://trac.webkit.org/changeset/104081.
Comment 11 Ryosuke Niwa 2012-04-23 00:01:55 PDT
Fixed in http://trac.webkit.org/changeset/104068.