For test_bug648573.html and test_bug644768.html, we no longer need to
create an iframe to turn off the preferences. I move the content of
iframe.src back to the test files.
--HG--
extra : amend_source : eec926c474be934b99faeb604493c01c471066e7
For test_bug648573.html and test_bug644768.html, we no longer need to
create an iframe to turn off the preferences. I move the content of
iframe.src back to the test files.
--HG--
extra : rebase_source : 5cf321bf3280e032cc6645810e3e7faa7a6ff615
We do not want to traverse inside native anonymous elements, but we
should still be able to skip over generated content, to avoid getting
stuck on such images.
The caret movement code already handles unselectable text frames if we
happen to land in the middle of one in nsTextFrame::PeekOffsetCharacter/Word.
However, when performing frame traversal to find the next frame to jump
to, we don't remember if we skipped over an unselectable frame, which causes
us to jump one offset too much when the caret is on the boundary of
selectable and unselectable content. The test cases demonstrate the
scenario. Note that an <img alt=foo> is implemented by adding a
generated content to the inline frame representing it, so as far as
the caret movement code is concerned, both test cases are treated similarly.
Note that we need to do this only when moving the selection, and not
when extending it. We are adding an aExtend argument to
nsPeekOffsetStruct's constructor in order to be able to special case
that.
We do not want to traverse inside native anonymous elements, but we
should still be able to skip over generated content, to avoid getting
stuck on such images.
The caret movement code already handles unselectable text frames if we
happen to land in the middle of one in nsTextFrame::PeekOffsetCharacter/Word.
However, when performing frame traversal to find the next frame to jump
to, we don't remember if we skipped over an unselectable frame, which causes
us to jump one offset too much when the caret is on the boundary of
selectable and unselectable content. The test cases demonstrate the
scenario. Note that an <img alt=foo> is implemented by adding a
generated content to the inline frame representing it, so as far as
the caret movement code is concerned, both test cases are treated similarly.
Note that we need to do this only when moving the selection, and not
when extending it. We are adding an aExtend argument to
nsPeekOffsetStruct's constructor in order to be able to special case
that.
The content inside an editable region is either editable itself, or
is inside a contenteditable="false" subtree. In the first case,
it should not be focusable since it is editable. In the second
case, it should not be focusable since the entire non-editable
region is treated as a special single entity for the purposes of
selection and caret movement, and having something focusable in
the middle of such a subtree breaks that model.
The content inside an editable region is either editable itself, or
is inside a contenteditable="false" subtree. In the first case,
it should not be focusable since it is editable. In the second
case, it should not be focusable since the entire non-editable
region is treated as a special single entity for the purposes of
selection and caret movement, and having something focusable in
the middle of such a subtree breaks that model.
We are white-listing the existing set of tests that use setTimeout
like this. Hopefully these tests will be investigated and fixed
in the future, so that we can narrow down the white-list.
This check is only turned on for mochitest-plain for now.
These tests all involving focusing on an empty element. Touch caret will
not show under the new touch caret UI spec. Therefore, I fix them by
disabling touch caret when running those tests.
bug512295-1.html and bug512295-2.html are sending key events which hides
touch caret. Turn off the touch caret preference to fix test cases that
ought to be failed by definition of the touch caret behavior.
Turn off the touch caret preference to fix test cases that ought to be
failed by definition of the touch caret behavior.
Thank Steven Lee <slee@mozilla.com> for the original WIP patch.