|
|
Created:
4 years, 4 months ago by joone Modified:
4 years, 4 months ago Reviewers:
yosin_UTC9 CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionKeep formatting tags included when it is cut or copied.
When we copy/cut a formatting tag without the highest node.
the formatting tag's text can be wrapped by <span> tag
instead of the formatting tag. This CL allows to keep
formatting tags included when it is cut or copied.
BUG=634482
TEST=editing/pasteboard/cut-paste-formatting-tag.html
Committed: https://crrev.com/f77d0eaedb2787483c147b973bcf7e7de82bf0f3
Cr-Commit-Position: refs/heads/master@{#411883}
Patch Set 1 #Patch Set 2 : updated code #Patch Set 3 : fix test fails #
Total comments: 5
Patch Set 4 : remove editor variable in test case #
Messages
Total messages: 35 (28 generated)
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #3 (id:40001) has been deleted
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_clobber_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Keep formatting tags included when it is copied and pasted. When we copy/cut a formatting tags without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is copied or cut. When we copy/cut a formatting tags without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ==========
Description was changed from ========== Keep formatting tags included when it is copied or cut. When we copy/cut a formatting tags without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tags without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ==========
Description was changed from ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tags without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ==========
Description was changed from ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is copied and pasted. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ==========
Description was changed from ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node, the formatting tag can be transformed to a span tag with inline-styles. This CL keeps formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node. the formatting tag's text can be wrapped by <span> tag instead of the formatting tag. This CL allows to keep formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ==========
joone.hur@intel.com changed reviewers: + yosin@chromium.org
Hi yosin@ could you review this CL? https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html (right): https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html:15: '<div contenteditable id="editor" style="width: 300px; height: 250px; border: 1px solid black"><br><div><b>foo|</b></div></div>'), The layout test result is a bit different from running https://bugs.chromium.org/p/chromium/issues/attachmentText?aid=245594 in Chromium browser: This is the result of Chrome browser without this fix: <div contenteditable="true" id="ce" style="width: 300px; height: 250px; border: 1px solid black"> <br class="Apple-interchange-newline"> <span style="font-weight: bold;">aaaa</span> <br> </div> This is the layout test result without this fix: <div contenteditable id="editor" style="width: 300px; height: 250px; border: 1px solid black"> <br> <div> <span style="font-weight: bold;">foo|</span> </div> </div> This is the result of Chrome browser with this fix: <div contenteditable="true" id="ce" style="width: 300px; height: 250px; border: 1px solid black"> <b><br class="Apple-interchange-newline">aaaa</b> <br> </div> This is the layout test result with this fix: <div contenteditable id="editor" style="width: 300px; height: 250px; border: 1px solid black"> <br> <div> <b>foo|</b> </div> </div>
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
lgtm w/ small stylish nits https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html (right): https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html:10: var editor = selection.document.getElementById('editor'); nit: Could you get rid of |var editor = ...| since this script doesn't use |editor|? https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right): https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:1139: bool isPresentationalHTMLElement(const Node* node) Could you make |isPresentationalHTMLElement() to take |const Node&|, since this function doesn't take |nullptr|?
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks for review! https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html (right): https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html:10: var editor = selection.document.getElementById('editor'); On 2016/08/12 01:37:34, Yosi_UTC9 wrote: > nit: Could you get rid of |var editor = ...| since this script doesn't use > |editor|? Done. https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right): https://codereview.chromium.org/2229703004/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:1139: bool isPresentationalHTMLElement(const Node* node) On 2016/08/12 01:37:35, Yosi_UTC9 wrote: > Could you make |isPresentationalHTMLElement() to take |const Node&|, > since this function doesn't take |nullptr|? Maybe no, because we need to change other methods because they are used as parameter of highestEnclosingNodeOfType(). => isPresentationalHTMLElement, isMailHTMLBlockquoteElement, isInline, isHTMLHeaderElement, isInlineHTMLElementWithStyle. Other methods may take |nullptr| so we need to figure out if those methods really take |nullptr|.
On 2016/08/12 22:12:21, joone wrote: > On 2016/08/12 01:37:35, Yosi_UTC9 wrote: > > Could you make |isPresentationalHTMLElement() to take |const Node&|, > > since this function doesn't take |nullptr|? > > Maybe no, because we need to change other methods because they are used as > parameter of highestEnclosingNodeOfType(). > => isPresentationalHTMLElement, isMailHTMLBlockquoteElement, isInline, > isHTMLHeaderElement, isInlineHTMLElementWithStyle. > Other methods may take |nullptr| so we need to figure out if those methods > really take |nullptr|. If it is possible, I will prepare for another CL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by joone.hur@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from yosin@chromium.org Link to the patchset: https://codereview.chromium.org/2229703004/#ps80001 (title: "remove editor variable in test case")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node. the formatting tag's text can be wrapped by <span> tag instead of the formatting tag. This CL allows to keep formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node. the formatting tag's text can be wrapped by <span> tag instead of the formatting tag. This CL allows to keep formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ==========
Message was sent while issue was closed.
Committed patchset #4 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node. the formatting tag's text can be wrapped by <span> tag instead of the formatting tag. This CL allows to keep formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html ========== to ========== Keep formatting tags included when it is cut or copied. When we copy/cut a formatting tag without the highest node. the formatting tag's text can be wrapped by <span> tag instead of the formatting tag. This CL allows to keep formatting tags included when it is cut or copied. BUG=634482 TEST=editing/pasteboard/cut-paste-formatting-tag.html Committed: https://crrev.com/f77d0eaedb2787483c147b973bcf7e7de82bf0f3 Cr-Commit-Position: refs/heads/master@{#411883} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/f77d0eaedb2787483c147b973bcf7e7de82bf0f3 Cr-Commit-Position: refs/heads/master@{#411883} |