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.
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.
With APZ, we always layerize the first scrollable element of the page,
if the page itself is not scrollable. These additional layers can cause
fuzzy reftest failures in two ways: differences in blending, and by
disabling sub-pixel test anti-aliasing. The latter is only a problem
with unaccelerated drawing, because we don't support component alpha
layers with BasicLayers. (We also don't support them with
BasicCompositor, but "Reftest unaccelerated" only tests BasicLayers).
We no longer rely on the bogus br node for positioning the caret.
If an editable region has a non-editable block element, we can
probably rely on the block element to reserve the vertical
height, so in those cases we should be able to get away without
a bogus br node.
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.
Recomputing the placeholder visibility does not require the placeholder div
itself to be present, as the only information required for that is the current
value of the text control which is present either way. This patch fixes
nsTextEditorState::ValueWasChanged and nsTextEditorState::UpdatePlaceholderVisibility
to that effect.
But the real fix is in nsTextEditorState::UpdatePlaceholderText, where after
setting the placeholder text on the anonymous div, we redo the placeholder
visibility computation. Since this function can be called from
HTMLTextAreaElement::CreatePlaceholderNode during frame construction, the
GetValue function may return the wrong value since the editor has not properly
been set up yet, resulting in this bug. And this function call is useless
anyway, because changing the placeholder text does not really affect the
result of the visibility computation, so there is no need to do this work
in the first place.
Recomputing the placeholder visibility does not require the placeholder div
itself to be present, as the only information required for that is the current
value of the text control which is present either way. This patch fixes
nsTextEditorState::ValueWasChanged and nsTextEditorState::UpdatePlaceholderVisibility
to that effect.
But the real fix is in nsTextEditorState::UpdatePlaceholderText, where after
setting the placeholder text on the anonymous div, we redo the placeholder
visibility computation. Since this function can be called from
HTMLTextAreaElement::CreatePlaceholderNode during frame construction, the
GetValue function may return the wrong value since the editor has not properly
been set up yet, resulting in this bug. And this function call is useless
anyway, because changing the placeholder text does not really affect the
result of the visibility computation, so there is no need to do this work
in the first place.