layout/base/tests/mochitest.ini
author Emilio Cobos Álvarez <emilio@crisal.io>
Mon, 26 Nov 2018 09:21:37 +0000
changeset 504393 8e88421b280c2afda62f4ba704ce29701c30549f
parent 504376 14d532b8d89432c1a4b01d5007960295a13022da
child 505116 3ea2a2c78bf4454226971e87036de12fafeadc4c
permissions -rw-r--r--
Bug 1506547 - Align user-select behavior more with other UAs. r=mats There's a few subtle behavior changes here, which I'll try to break down in the commit message. The biggest one is the EditableDescendantCount stuff going away. This was added in bug 1181130, to prevent clicking on the non-editable div from selecting the editable div inside. This is problematic for multiple reasons: * First, I don't think non-editable regions of an editable element should be user-select: all. * Second, it just doesn't work in Shadow DOM (the editable descendant count is not kept up-to-date when not in the uncomposed doc), so nested contenteditables behave differently inside vs. outside a Shadow Tree. * Third, I think it's user hostile to just entirely disable selection if you have a contenteditable descendant as a child of a user-select: all thing. WebKit behaves like this patch in the following test-case (though not Blink): https://crisal.io/tmp/user-select-all-contenteditable-descendant.html Edge doesn't seem to support user-select: all at all (no pun intended). But we don't allow to select anything at all which looks wrong. * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM and not even notice...). In any case I've verified that this doesn't regress the editor from that bug. If this regresses anything we can fix it as outlined in the first bullet point above, which should also make us more compatible with other UAs in that test-case. The other change is `all` not overriding everything else. So, something like: <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div> Totally ignores the -webkit-user-select: none declaration in Firefox before this change. This doesn't match any other UA nor the spec, and this patch aligns us with WebKit / Blink. This in turn makes us not need -moz-text anymore, whose only purpose was to avoid this. This also fixes a variety of bugs uncovered by the previous changes, like the SetIgnoreUserModify(false) call in editor being completely useless, since presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it. This in turn uncovered even more bugs, from bugs in the caret painting code, like not checking -moz-user-modify on the right frame if you're the last frame of a line, to even funnier bits where before this patch you show the caret but can't write at all... In any case, the new setup I came up with is that when you're editing (the selection is focused on an editable node) moving the caret forces it to end up in an editable node, thus jumping over non-editable ones. This has the nice effect of not completely disabling selection of -moz-user-select: all elements that have editable descendants (which was a very ad-hoc hack for bug 1181130, and somewhat broken per the above), and also not needing the -moz-user-select: all for non-editable bits in contenteditable.css at all. This also fixes issues with br-skipping like not being able to insert content in the following test-case: <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div> If you start moving to the left from the second line, for example. I think this yields way better behavior in all the relevant test-cases from bug 1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the complexity is significantly reduced in some places. There's still some other broken bits that this patch doesn't fix, but I'll file follow-ups for those. Differential Revision: https://phabricator.services.mozilla.com/D12687

[DEFAULT]
support-files =
  Ahem.ttf
  file_bug465448.html
  file_bug842853.html
  file_bug842853.sjs
  selection-utils.js
  ../../../dom/plugins/test/mochitest/plugin-utils.js

[test_after_paint_pref.html]
skip-if = (os == 'win' && asan) # Bug 1459682
[test_border_radius_hit_testing.html]
support-files = border_radius_hit_testing_iframe.html
[test_bug66619.html]
[test_bug93077-1.html]
[test_bug93077-2.html]
[test_bug93077-3.html]
[test_bug93077-4.html]
[test_bug93077-5.html]
[test_bug93077-6.html]
[test_bug114649.html]
[test_bug332655-1.html]
[test_bug332655-2.html]
[test_bug369950.html]
skip-if = true # Bug 492575
support-files = bug369950-subframe.xml
[test_bug370436.html]
skip-if = toolkit == 'android' # Bug 1355815
[test_bug386575.xhtml]
[test_bug388019.html]
[test_bug394057.html]
skip-if = toolkit == 'android' || (os == 'win' && asan) # Bug 1355817, bug 1460993
[test_bug399284.html]
[test_bug399951.html]
[test_bug404209.xhtml]
[test_bug416896.html]
[test_bug423523.html]
[test_bug435293-interaction.html]
[test_bug435293-scale.html]
[test_bug435293-skew.html]
[test_bug449781.html]
[test_bug450930.xhtml]
skip-if = true # bug 934301
support-files = bug450930.xhtml
[test_bug465448.xul]
[test_bug469170.html]
[test_bug471126.html]
[test_bug499538-1.html]
[test_bug514127.html]
[test_bug518777.html]
[test_bug548545.xhtml]
[test_bug558663.html]
support-files = bug558663.html
[test_bug559499.html]
[test_bug569520.html]
[test_bug582181-1.html]
[test_bug582181-2.html]
[test_bug582771.html]
[test_bug583889.html]
support-files =
  bug583889_inner1.html
  bug583889_inner2.html
[test_bug588174.html]
[test_bug603550.html]
skip-if = toolkit == 'android' # Doesn't work on Android
[test_bug607529.html]
support-files =
  file_bug607529.html
  file_bug607529-1.html
[test_bug629838.html]
skip-if = toolkit == 'android' # android: Requires plugin support
[test_bug644768.html]
[test_bug646757.html]
[test_bug667512.html]
[test_bug677878.html]
[test_bug687297.html]
support-files =
  bug687297_a.html
  bug687297_b.html
  bug687297_c.html
[test_bug696020.html]
[test_bug718809.html]
[test_bug725426.html]
[test_bug731777.html]
[test_bug749186.html]
[test_bug761572.html]
[test_bug770106.html]
[test_bug842853.html]
support-files =
  file_bug842853-frame.html
skip-if = toolkit == 'android' # Bug 1355821
[test_bug842853-2.html]
skip-if = toolkit == 'android' # Bug 1355821
[test_bug849219.html]
[test_bug851445.html]
skip-if = toolkit == 'android' # Bug 1355821
support-files = bug851445_helper.html
[test_bug851485.html]
skip-if = toolkit == 'android' # Bug 1355821
[test_bug858459.html]
skip-if = toolkit == 'android' # Bug 1355822
[test_bug968148.html]
skip-if = toolkit == 'android' # Bug 1355829
support-files =
  bug968148_inner.html
  bug968148_inner2.html
[test_bug970964.html]
skip-if = toolkit == 'android' # Bug 1355829
support-files =
  bug970964_inner.html
  bug970964_inner2.html
[test_bug977003.html]
skip-if = toolkit == 'android' # We don't support pointer event on android
support-files =
  bug977003_inner_1.html
  bug977003_inner_2.html
  bug977003_inner_3.html
  bug977003_inner_4.html
  bug977003_inner_5.html
  bug977003_inner_6.html
[test_bug990340.html]
[test_bug993936.html]
[test_bug1078327.html]
skip-if = toolkit == 'android' # We don't support pointer event on android
support-files = bug1078327_inner.html
[test_bug1080360.html]
skip-if = toolkit == 'android' # We don't support pointer event on android
support-files = bug1080360_inner.html
[test_bug1080361.html]
skip-if = toolkit == 'android' # We don't support pointer event on android
support-files = bug1080361_inner.html
[test_bug1093686.html]
support-files = bug1093686_inner.html
[test_bug1120705.html]
skip-if = toolkit == 'android' || os == 'mac' || toolkit == 'gtk3' # android does not have clickable scrollbars, mac does not have scrollbar down and up buttons, gtk may or may not have scrollbar buttons depending on theme
[test_bug1153130.html]
skip-if = toolkit == 'android' # We don't support pointer event on android
support-files = bug1153130_inner.html
[test_bug1162990.html]
skip-if = toolkit == 'android' # We don't support pointer event on android
support-files =
  bug1162990_inner_1.html
  bug1162990_inner_2.html
[test_bug1226904.html]
support-files = bug1226904.html
[test_bug1246622.html]
[test_bug1278021.html]
[test_emulateMedium.html]
[test_event_target_iframe_oop.html]
skip-if = e10s # bug 1020135, nested oop iframes not supported
support-files = bug921928_event_target_iframe_apps_oop.html
[test_event_target_radius.html]
skip-if = toolkit == 'android' # Bug 1355836
[test_expanding_selection_per_page.html]
support-files = window_empty_document.html
[test_flush_on_paint.html]
skip-if = true # Bug 688128
[test_frame_reconstruction_for_pseudo_elements.html]
[test_frame_reconstruction_for_svg_transforms.html]
[test_frame_reconstruction_scroll_restore.html]
[test_getBoxQuads_convertPointRectQuad.html]
support-files =
  file_getBoxQuads_convertPointRectQuad_frame1.html
  file_getBoxQuads_convertPointRectQuad_frame2.html
[test_getClientRects_emptytext.html]
[test_mozPaintCount.html]
skip-if = toolkit == 'android' # android: Requires plugin support
[test_preserve3d_sorting_hit_testing.html]
support-files = preserve3d_sorting_hit_testing_iframe.html
[test_preserve3d_sorting_hit_testing2.html]
support-files = preserve3d_sorting_hit_testing2_iframe.html
[test_reftests_with_caret.html]
skip-if = toolkit == 'android' # Bug 1355842
support-files =
  bug106855-1.html
  bug106855-2.html
  bug106855-1-ref.html
  bug240933-1.html
  bug240933-2.html
  bug240933-1-ref.html
  bug389321-1.html
  bug389321-1-ref.html
  bug389321-2.html
  bug389321-2-ref.html
  bug389321-3.html
  bug389321-3-ref.html
  bug482484.html
  bug482484-ref.html
  bug503399.html
  bug503399-ref.html
  bug512295-1.html
  bug512295-1-ref.html
  bug512295-2.html
  bug512295-2-ref.html
  bug585922.html
  bug585922-ref.html
  bug597519-1.html
  bug597519-1-ref.html
  bug602141-1.html
  bug602141-1-ref.html
  bug602141-2.html
  bug602141-2-ref.html
  bug602141-3.html
  bug602141-3-ref.html
  bug602141-4.html
  bug602141-4-ref.html
  bug612271-1.html
  bug612271-2.html
  bug612271-3.html
  bug612271-ref.html
  bug613433-1.html
  bug613433-2.html
  bug613433-3.html
  bug613433-ref.html
  bug613807-1.html
  bug613807-1-ref.html
  bug632215-1.html
  bug632215-2.html
  bug632215-ref.html
  bug633044-1.html
  bug633044-1-ref.html
  bug634406-1.html
  bug634406-1-ref.html
  bug644428-1.html
  bug644428-1-ref.html
  bug646382-1.html
  bug646382-1-ref.html
  bug646382-2.html
  bug646382-2-ref.html
  bug664087-1.html
  bug664087-1-ref.html
  bug664087-2.html
  bug664087-2-ref.html
  bug682712-1.html
  bug682712-1-ref.html
  bug746993-1.html
  bug746993-1-ref.html
  bug923376.html
  bug923376-ref.html
  bug956530-1.html
  bug956530-1-ref.html
  bug966992-1.html
  bug966992-1-ref.html
  bug966992-2.html
  bug966992-2-ref.html
  bug966992-3.html
  bug966992-3-ref.html
  bug989012-1.html
  bug989012-1-ref.html
  bug989012-2.html
  bug989012-2-ref.html
  bug989012-3.html
  bug989012-3-ref.html
  bug1007065-1.html
  bug1007065-1-ref.html
  bug1007067-1.html
  bug1007067-1-ref.html
  bug1061468.html
  bug1061468-ref.html
  bug1082486-1.html
  bug1082486-1-ref.html
  bug1082486-2.html
  bug1082486-2-ref.html
  bug1097242-1.html
  bug1097242-1-ref.html
  bug1109968-1-ref.html
  bug1109968-1.html
  bug1109968-2-ref.html
  bug1109968-2.html
  bug1123067-1.html
  bug1123067-2.html
  bug1123067-3.html
  bug1123067-ref.html
  bug1132768-1.html
  bug1132768-1-ref.html
  bug1237236-1.html
  bug1237236-1-ref.html
  bug1237236-2.html
  bug1237236-2-ref.html
  bug1258308-1.html
  bug1258308-1-ref.html
  bug1258308-2.html
  bug1258308-2-ref.html
  bug1259949-1.html
  bug1259949-1-ref.html
  bug1259949-2.html
  bug1259949-2-ref.html
  bug1263288.html
  bug1263288-ref.html
  bug1263357-1.html
  bug1263357-1-ref.html
  bug1263357-2.html
  bug1263357-2-ref.html
  bug1263357-3.html
  bug1263357-3-ref.html
  bug1263357-4.html
  bug1263357-4-ref.html
  bug1263357-5.html
  bug1263357-5-ref.html
  bug1354478-1.html
  bug1354478-1-ref.html
  bug1354478-2.html
  bug1354478-2-ref.html
  bug1354478-3.html
  bug1354478-3-ref.html
  bug1354478-4.html
  bug1354478-4-ref.html
  bug1354478-5.html
  bug1354478-5-ref.html
  bug1354478-6.html
  bug1354478-6-ref.html
  bug1359411.html
  bug1359411-ref.html
  bug1415416.html
  bug1415416-ref.html
  bug1423331-1.html
  bug1423331-1-ref.html
  bug1423331-2.html
  bug1423331-2-ref.html
  bug1423331-3.html
  bug1423331-4.html
  bug1484094-1.html
  bug1484094-1-ref.html
  bug1484094-2.html
  bug1484094-2-ref.html
  image_rgrg-256x256.png
  input-invalid-ref.html
  input-maxlength-invalid-change.html
  input-maxlength-ui-invalid-change.html
  input-maxlength-ui-valid-change.html
  input-maxlength-valid-before-change.html
  input-maxlength-valid-change.html
  input-minlength-invalid-change.html
  input-minlength-ui-invalid-change.html
  input-minlength-ui-valid-change.html
  input-minlength-valid-before-change.html
  input-minlength-valid-change.html
  input-valid-ref.html
  multi-range-script-select.html
  multi-range-script-select-ref.html
  multi-range-user-select.html
  multi-range-user-select-ref.html
  textarea-invalid-ref.html
  textarea-maxlength-invalid-change.html
  textarea-maxlength-ui-invalid-change.html
  textarea-maxlength-ui-valid-change.html
  textarea-maxlength-valid-before-change.html
  textarea-maxlength-valid-change.html
  textarea-minlength-invalid-change.html
  textarea-minlength-ui-invalid-change.html
  textarea-minlength-ui-valid-change.html
  textarea-minlength-valid-before-change.html
  textarea-minlength-valid-change.html
  textarea-valid-ref.html
  bug1506547-1.html
  bug1506547-2.html
  bug1506547-3.html
  bug1506547-4.html
  bug1506547-5.html
  bug1506547-6.html
  bug1506547-4-ref.html
  bug1506547-5-ref.html

[test_remote_frame.html]
[test_resize_flush.html]
support-files = resize_flush_iframe.html
[test_scroll_event_ordering.html]
[test_scroll_selection_into_view.html]
skip-if = toolkit == 'android' # Bug 1355844
support-files =
  scroll_selection_into_view_window.html
  scroll_selection_into_view_window_frame.html
[test_scroll_snapping.html]
skip-if = toolkit == 'android' # Bug 1355851
[test_scroll_snapping_scrollbars.html]
skip-if = toolkit == 'android' || os == 'win' # Bug 1355851, bug 1381932, Bug 1379810
[test_transformed_scrolling_repaints.html]
[test_transformed_scrolling_repaints_2.html]
skip-if = (headless && os == 'mac') # Headless Bug 1414103
[test_transformed_scrolling_repaints_3.html]
support-files =
  transformed_scrolling_repaints_3_window.html
  transformed_scrolling_repaints_3_window_frame.html

# *** Please maintain alphabetical ordering when adding new tests ***