Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2121613003: Include style tags when pasting HTML content. (Closed)

Created:
4 years, 5 months ago by dominicc (has gone to gerrit)
Modified:
4 years, 5 months ago
Reviewers:
tkent, yosin, yosin_UTC9
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Include style tags when pasting HTML content. Applications such as Excel put HTML content on the clipboard which includes STYLE elements. Users expect the styles to remain when pasting this content. Chromium used to strip STYLE elements like WebKit. This change leaves the STYLE elements in place like Firefox and Edge. This means pasted content could change the formatting of the surrounding page, but editors could work around this by processing STYLE tags. BUG=121163 Committed: https://crrev.com/8ebfae3567b1bfe350286345bb0c338b9f354fe1 Cr-Commit-Position: refs/heads/master@{#403867}

Patch Set 1 #

Patch Set 2 : Update test. #

Patch Set 3 : Try to appease Windows linker. #

Total comments: 10

Patch Set 4 : EditorTestBase. #

Messages

Total messages: 20 (6 generated)
dominicc (has gone to gerrit)
PTAL FWIW I have developed an alternative patch which serializes the style rules into attributes ...
4 years, 5 months ago (2016-07-04 06:00:57 UTC) #2
dominicc (has gone to gerrit)
PTAL
4 years, 5 months ago (2016-07-06 02:28:40 UTC) #4
yosin_UTC9
lgtm +tken@, for second opinion about gTest vs. layout test https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html File third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html (right): https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html#newcode64 ...
4 years, 5 months ago (2016-07-06 03:44:01 UTC) #6
yosin_UTC9
On 2016/07/06 at 03:44:01, Yosi_UTC9 wrote: > lgtm > > +tken@, for second opinion about ...
4 years, 5 months ago (2016-07-06 04:04:40 UTC) #7
tkent
https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html File third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html (right): https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html#newcode64 third_party/WebKit/LayoutTests/editing/pasteboard/paste-head-contents.html:64: </body> On 2016/07/06 at 03:44:00, Yosi_UTC9 wrote: > OPTIONAL: ...
4 years, 5 months ago (2016-07-06 04:05:20 UTC) #8
yosin_UTC9
https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp File third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp (right): https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp#newcode27 third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp:27: TEST(ReplaceSelectionCommandTest, styleTagsInPastedHeadIncludedInContent) BTW, you can use EditingTestBase. https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/editing/EditingTestBase.h
4 years, 5 months ago (2016-07-06 04:05:47 UTC) #9
tkent
https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h File third_party/WebKit/Source/core/dom/ParserContentPolicy.h (left): https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h#oldcode43 third_party/WebKit/Source/core/dom/ParserContentPolicy.h:43: static inline ParserContentPolicy disallowScriptingContent(ParserContentPolicy parserContentPolicy) Is this change related ...
4 years, 5 months ago (2016-07-06 04:06:44 UTC) #10
yosin_UTC9
On 2016/07/06 at 04:06:44, tkent wrote: > https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h > File third_party/WebKit/Source/core/dom/ParserContentPolicy.h (left): > > https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h#oldcode43 ...
4 years, 5 months ago (2016-07-06 05:52:35 UTC) #11
dominicc (has gone to gerrit)
PTAL https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h File third_party/WebKit/Source/core/dom/ParserContentPolicy.h (left): https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h#oldcode43 third_party/WebKit/Source/core/dom/ParserContentPolicy.h:43: static inline ParserContentPolicy disallowScriptingContent(ParserContentPolicy parserContentPolicy) On 2016/07/06 at ...
4 years, 5 months ago (2016-07-06 06:52:14 UTC) #12
yosin_UTC9
On 2016/07/06 at 06:52:14, dominicc wrote: > PTAL > > https://codereview.chromium.org/2121613003/diff/40001/third_party/WebKit/Source/core/dom/ParserContentPolicy.h > File third_party/WebKit/Source/core/dom/ParserContentPolicy.h (left): ...
4 years, 5 months ago (2016-07-06 06:55:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2121613003/60001
4 years, 5 months ago (2016-07-06 07:26:00 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-06 08:28:16 UTC) #17
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-06 08:28:30 UTC) #18
commit-bot: I haz the power
4 years, 5 months ago (2016-07-06 08:30:21 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8ebfae3567b1bfe350286345bb0c338b9f354fe1
Cr-Commit-Position: refs/heads/master@{#403867}

Powered by Google App Engine
This is Rietveld 408576698