WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
112329
REGRESSION: WebKit doesn't preserve style when copying text from another element
https://bugs.webkit.org/show_bug.cgi?id=112329
Summary
REGRESSION: WebKit doesn't preserve style when copying text from another element
Ryosuke Niwa
Reported
2013-03-14 01:41:07 PDT
Reproduction steps: 1. Go to
http://jsfiddle.net/fns4w/
2. Copy "Copy this" at the bottom 3. Paste it after "todispaly" Expected result: The pasted text has the font size of 50px Actual result: The pasted text has the default font size
Attachments
Approach 1
(4.38 KB, patch)
2013-03-25 02:08 PDT
,
Pravin D
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cr-linux-08 for chromium-linux-x86_64
(825.88 KB, application/zip)
2013-03-25 10:24 PDT
,
WebKit Review Bot
no flags
Details
Reduction
(535 bytes, text/html)
2013-04-02 01:14 PDT
,
Ryosuke Niwa
no flags
Details
Work in progress changes
(6.75 KB, patch)
2013-04-13 01:01 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Patch
(11.13 KB, patch)
2013-06-19 03:57 PDT
,
Pravin D
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
(499.24 KB, application/zip)
2013-06-19 08:18 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from APPLE-EWS-2 for win-future
(794.40 KB, application/zip)
2013-06-19 09:38 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from APPLE-EWS-5 for win-future
(794.31 KB, application/zip)
2013-06-19 11:22 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
(473.45 KB, application/zip)
2013-06-20 04:06 PDT
,
Build Bot
no flags
Details
Patch
(11.84 KB, patch)
2013-06-27 04:39 PDT
,
Pravin D
beidson
: review-
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from APPLE-EWS-4 for win-future
(814.11 KB, application/zip)
2013-06-27 13:32 PDT
,
Build Bot
no flags
Details
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2013-03-15 18:53:04 PDT
<
rdar://problem/13435950
>
Pravin D
Comment 2
2013-03-25 02:08:28 PDT
Created
attachment 194803
[details]
Approach 1
WebKit Review Bot
Comment 3
2013-03-25 10:24:37 PDT
Comment on
attachment 194803
[details]
Approach 1
Attachment 194803
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://webkit-commit-queue.appspot.com/results/17308243
New failing tests: editing/pasteboard/5761530-1.html editing/pasteboard/paste-and-sanitize.html editing/pasteboard/copy-null-characters.html editing/pasteboard/paste-blockquote-2.html editing/deleting/merge-paragraph-from-h6-with-style.html editing/deleting/merge-paragraph-into-pre.html editing/deleting/merge-paragraph-from-address.html editing/pasteboard/paste-blockquote-3.html editing/deleting/merge-paragraph-into-h1.html editing/pasteboard/paste-text-with-style-4.html editing/deleting/merge-paragraph-from-listing.html editing/deleting/merge-paragraph-from-p-with-style-2.html editing/deleting/merge-paragraph-into-h1-with-dir-2.html editing/deleting/merge-paragraph-into-h1-with-dir.html editing/deleting/merge-paragraph-with-style-from-rule.html editing/deleting/merge-paragraph-from-h6.html editing/deleting/merge-paragraph-into-h1-with-style.html editing/deleting/merge-paragraph-from-p-with-style.html editing/deleting/delete-to-end-of-paragraph.html editing/deleting/merge-paragraph-from-p-with-style-3.html editing/deleting/merge-paragraph-from-h6-with-style-2.html editing/deleting/merge-whitespace-pre.html editing/deleting/deleting-line-break-preserves-underline-color.html
WebKit Review Bot
Comment 4
2013-03-25 10:24:41 PDT
Created
attachment 194881
[details]
Archive of layout-test-results from gce-cr-linux-08 for chromium-linux-x86_64 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-08 Port: chromium-linux-x86_64 Platform: Linux-3.3.8-gcg-201212281604-x86_64-with-GCEL-10.04-gcel_10.04
Ryosuke Niwa
Comment 5
2013-04-02 01:14:10 PDT
Created
attachment 196093
[details]
Reduction The problem is in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline. We’re removing font-size & color via removeStyleFromRulesAndContext since they’re duplicated in the style rules. Since the inline style is now empty, we end up erronrously removing span and those rules stops applying to the text.
Ryosuke Niwa
Comment 6
2013-04-02 01:44:23 PDT
This is a regression from Safari 6.0.2.
Ryosuke Niwa
Comment 7
2013-04-02 02:54:29 PDT
This is probably a regression from
http://trac.webkit.org/changeset/96870
.
Ryosuke Niwa
Comment 8
2013-04-13 01:01:37 PDT
Created
attachment 197924
[details]
Work in progress changes Some work in progress changes for the record. This approach is wrong.
Ryosuke Niwa
Comment 9
2013-04-13 01:03:26 PDT
For the future myself, to fix this bug, I need to distinguish cases where users are deleting paragraphs and we’re merging paragraphs as a part of other operations. In the latter case, we need to preserve all styles including that of style rules for blocks.
Grzegorz Czajkowski
Comment 10
2013-04-25 02:44:03 PDT
***
Bug 115027
has been marked as a duplicate of this bug. ***
Pravin D
Comment 11
2013-06-19 03:57:11 PDT
Created
attachment 204984
[details]
Patch
Build Bot
Comment 12
2013-06-19 08:18:07 PDT
Comment on
attachment 204984
[details]
Patch
Attachment 204984
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/945237
New failing tests: editing/deleting/deleting-line-break-preserves-underline-color.html
Build Bot
Comment 13
2013-06-19 08:18:09 PDT
Created
attachment 205008
[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Build Bot
Comment 14
2013-06-19 09:38:00 PDT
Comment on
attachment 204984
[details]
Patch
Attachment 204984
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/926251
New failing tests: editing/deleting/deleting-line-break-preserves-underline-color.html
Build Bot
Comment 15
2013-06-19 09:38:03 PDT
Created
attachment 205011
[details]
Archive of layout-test-results from APPLE-EWS-2 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: APPLE-EWS-2 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Build Bot
Comment 16
2013-06-19 11:22:56 PDT
Comment on
attachment 204984
[details]
Patch
Attachment 204984
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/926269
New failing tests: editing/deleting/deleting-line-break-preserves-underline-color.html
Build Bot
Comment 17
2013-06-19 11:22:59 PDT
Created
attachment 205021
[details]
Archive of layout-test-results from APPLE-EWS-5 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: APPLE-EWS-5 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Build Bot
Comment 18
2013-06-20 04:06:29 PDT
Comment on
attachment 204984
[details]
Patch
Attachment 204984
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/880486
New failing tests: editing/deleting/deleting-line-break-preserves-underline-color.html http/tests/security/cross-origin-plugin-private-browsing-toggled.html
Build Bot
Comment 19
2013-06-20 04:06:33 PDT
Created
attachment 205069
[details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-09 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Pravin D
Comment 20
2013-06-27 04:39:05 PDT
Created
attachment 205586
[details]
Patch
Build Bot
Comment 21
2013-06-27 13:32:22 PDT
Comment on
attachment 205586
[details]
Patch
Attachment 205586
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/999024
New failing tests: fast/js/global-constructors-attributes-shared-worker.html fast/js/global-constructors-attributes-dedicated-worker.html
Build Bot
Comment 22
2013-06-27 13:32:25 PDT
Created
attachment 205628
[details]
Archive of layout-test-results from APPLE-EWS-4 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: APPLE-EWS-4 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Brady Eidson
Comment 23
2016-05-24 22:01:28 PDT
Comment on
attachment 205586
[details]
Patch Assuming that patches for review since 2013 are stale, r-
Ahmad Saleem
Comment 24
2022-11-30 17:19:57 PST
Using link from URL field, I am not able to reproduce this bug in Safari Technology Preview 159 and it is matching with Chrome Canary 110, where the copy result in 50px text in green color while in case of Firefox Nightly 109, I am getting weird "New Line" in between copied text and contenteditable text. Just wanted to share updated results. Thanks!
Ryosuke Niwa
Comment 25
2022-12-01 13:58:44 PST
Yeah, this is working now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug