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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/font-size-delta-after-anchor-crash.html

Issue 2119083003: Make ApplyStyleCommand::applyRelativeFontStyleChange() to handle AfterAnchor position correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-05T10:59:18 Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/execCommand/font-size-delta-after-anchor-crash.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/font-size-delta-after-anchor-crash.html b/third_party/WebKit/LayoutTests/editing/execCommand/font-size-delta-after-anchor-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..14cca0ef7f0e8fdfcd1d72482e254097fff954cd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/font-size-delta-after-anchor-crash.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div contenteditable>
+x<input><select style="display:block"><option id="anchor"></option></select>
+</div>
+<div id="log"></div>
+<script>
+test(() => {
+ // Since parser reject child nodes in INPUT, we make child node in INPUT here
+ // to make |VisibleSelection::m_extent| have INPUT, AfterAnchor.
+ var input = document.querySelector('input');
+ input.appendChild(document.createElement('i'));
+
+ var selection = window.getSelection();
+ selection.collapse(document.querySelector('#anchor'), 0);
+ selection.extend(input, 1);
+ document.execCommand('FontSizeDelta', false, '1');
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698