mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Backed out 3 changesets (bug 1802466) for mochitest failure on test_composition_text_querycontent.xhtml . CLOSED TREE
Backed out changeset 1af6a9b30e2c (bug 1802466) Backed out changeset 9461b0e136d3 (bug 1802466) Backed out changeset 59c6e8943e53 (bug 1802466)
This commit is contained in:
parent
0dc5162e6f
commit
8af2b78975
@ -3236,7 +3236,7 @@ nsIFrame* Selection::GetSelectionEndPointGeometry(SelectionRegion aRegion,
|
||||
nsFrameSelection::AdjustFrameForLineStart(frame, frameOffset);
|
||||
|
||||
// Figure out what node type we have, then get the
|
||||
// appropriate rect for its nodeOffset.
|
||||
// appropriate rect for it's nodeOffset.
|
||||
bool isText = node->IsText();
|
||||
|
||||
nsPoint pt(0, 0);
|
||||
@ -3250,42 +3250,19 @@ nsIFrame* Selection::GetSelectionEndPointGeometry(SelectionRegion aRegion,
|
||||
|
||||
frame = childFrame;
|
||||
|
||||
// Get the coordinates of the offset into the text frame.
|
||||
// Get the x coordinate of the offset into the text frame.
|
||||
rv = GetCachedFrameOffset(frame, nodeOffset, pt);
|
||||
if (NS_FAILED(rv)) return nullptr;
|
||||
}
|
||||
|
||||
// Return the rect relative to the frame, with zero inline-size. The
|
||||
// inline-position is either 'pt' (if we're a text node) or otherwise just
|
||||
// the physical "end" edge of the frame (which we express as the frame's own
|
||||
// width or height, since the returned position is relative to the frame).
|
||||
// The block position and size are set so as to fill the frame in that axis.
|
||||
// (i.e. block-position of 0, and block-size matching the frame's own block
|
||||
// size).
|
||||
const WritingMode wm = frame->GetWritingMode();
|
||||
// Helper to determine the inline-axis position for the aRect outparam.
|
||||
auto GetInlinePosition = [&]() {
|
||||
if (isText) {
|
||||
return wm.IsVertical() ? pt.y : pt.x;
|
||||
}
|
||||
// Return the frame's physical end edge of its inline axis, relative to the
|
||||
// frame. That's just its height or width.
|
||||
// TODO(dholbert): This seems to work, but perhaps we really want the
|
||||
// inline-end edge (rather than physical end of inline axis)? (i.e. if we
|
||||
// have direction:rtl, maybe this code would want to return 0 instead of
|
||||
// height/width?)
|
||||
return frame->ISize(wm);
|
||||
};
|
||||
|
||||
// Set the inline position and block-size. Leave inline size and block
|
||||
// position set to 0, as discussed above.
|
||||
if (wm.IsVertical()) {
|
||||
aRect->y = GetInlinePosition();
|
||||
aRect->SetWidth(frame->ISize(wm));
|
||||
} else {
|
||||
aRect->x = GetInlinePosition();
|
||||
aRect->SetHeight(frame->ISize(wm));
|
||||
// Return the rect relative to the frame, with zero width.
|
||||
if (isText) {
|
||||
aRect->x = pt.x;
|
||||
} else if (mFrameSelection->GetHint() == CARET_ASSOCIATE_BEFORE) {
|
||||
// It's the frame's right edge we're interested in.
|
||||
aRect->x = frame->GetRect().Width();
|
||||
}
|
||||
aRect->SetHeight(frame->GetRect().Height());
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
@ -0,0 +1,98 @@
|
||||
[text-input-vertical-overflow-no-scroll.html]
|
||||
[input[type=text\] in vertical-lr: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=text\] in vertical-rl: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=text\] in sideways-lr: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if (os == "android") and debug and swgl: [PASS, FAIL]
|
||||
if (os == "android") and debug and not swgl: PASS
|
||||
if (os == "win") and not debug and (processor == "x86_64"): [PASS, FAIL]
|
||||
if (os == "linux") and debug: FAIL
|
||||
if (os == "android") and not debug: [PASS, FAIL]
|
||||
if os == "mac": PASS
|
||||
[FAIL, PASS]
|
||||
|
||||
[input[type=text\] in sideways-rl: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=password\] in vertical-lr: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=password\] in vertical-rl: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=password\] in sideways-lr: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if (os == "win") and debug and (processor == "x86_64"): [PASS, FAIL]
|
||||
if (os == "android") and debug and not swgl: PASS
|
||||
if (os == "android") and debug and swgl: [PASS, FAIL]
|
||||
if (os == "linux") and debug: FAIL
|
||||
if (os == "android") and not debug: [PASS, FAIL]
|
||||
if os == "mac": PASS
|
||||
[FAIL, PASS]
|
||||
|
||||
[input[type=password\] in sideways-rl: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if (os == "linux") and not debug: [FAIL, PASS]
|
||||
if (os == "win") and not debug: [FAIL, PASS]
|
||||
if os == "mac": [FAIL, PASS]
|
||||
FAIL
|
||||
|
||||
[input[type=search\] in vertical-lr: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=search\] in vertical-rl: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=search\] in sideways-lr: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if (os == "win") and not debug and (processor == "x86_64"): [PASS, FAIL]
|
||||
if (os == "android") and debug and not swgl: PASS
|
||||
if (os == "android") and debug and swgl: [PASS, FAIL]
|
||||
if (os == "linux") and debug: FAIL
|
||||
if (os == "android") and not debug: [PASS, FAIL]
|
||||
if os == "mac": PASS
|
||||
[FAIL, PASS]
|
||||
|
||||
[input[type=search\] in sideways-rl: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if not debug and (os == "linux"): [FAIL, PASS]
|
||||
if not debug and (os == "mac"): [FAIL, PASS]
|
||||
if not debug and (os == "win"): [FAIL, PASS]
|
||||
FAIL
|
||||
|
||||
[input[type=number\] in vertical-lr: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if not debug and (os == "linux"): [FAIL, PASS]
|
||||
if not debug and (os == "win"): [FAIL, PASS]
|
||||
if not debug and (os == "mac"): [FAIL, PASS]
|
||||
FAIL
|
||||
|
||||
[input[type=number\] in vertical-rl: typing characters in input should not cause the page to scroll]
|
||||
expected: [FAIL, PASS]
|
||||
|
||||
[input[type=number\] in sideways-lr: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if (os == "linux") and debug and swgl and not fission: FAIL
|
||||
if (os == "linux") and not debug and not asan and not fission: [PASS, FAIL]
|
||||
if (os == "linux") and debug and not swgl: FAIL
|
||||
if (os == "win") and not debug and (processor == "x86"): [PASS, FAIL]
|
||||
if (os == "android") and debug and not swgl: PASS
|
||||
if (os == "android") and debug and swgl: [PASS, FAIL]
|
||||
if (os == "android") and not debug: [PASS, FAIL]
|
||||
if os == "mac": PASS
|
||||
[FAIL, PASS]
|
||||
|
||||
[input[type=number\] in sideways-rl: typing characters in input should not cause the page to scroll]
|
||||
expected:
|
||||
if not debug and (os == "linux") and (processor == "x86_64") and fission and not asan and tsan: [FAIL, PASS]
|
||||
if not debug and (os == "linux") and (processor == "x86_64") and fission and not asan and not tsan: [FAIL, PASS]
|
||||
if not debug and (os == "linux") and (processor == "x86_64") and fission and asan: [FAIL, PASS]
|
||||
if not debug and (os == "linux") and (processor == "x86_64") and not fission: [FAIL, PASS]
|
||||
if not debug and (os == "linux") and (processor == "x86"): [FAIL, PASS]
|
||||
if not debug and (os == "win"): [FAIL, PASS]
|
||||
if not debug and (os == "mac"): [FAIL, PASS]
|
||||
FAIL
|
@ -12,22 +12,7 @@
|
||||
.spacer {
|
||||
height: 100vh;
|
||||
}
|
||||
input {
|
||||
font-family: monospace;
|
||||
|
||||
/* Use an explicit whole-number-of-pixels height, to avoid tripping
|
||||
Mozilla bug 1851066, regarding fractional scroll positions
|
||||
triggering an async 1px adjustment to scrollTop. We can remove this
|
||||
once that bug is fixed.
|
||||
(Without this hack, the input element may end up with a height
|
||||
that's a fractional number of pixels, depending on the font.
|
||||
And then this test's call to 'scrollIntoView' puts us at a
|
||||
fractional scroll-position, to bottom-align the input element. And
|
||||
that's sufficient to trigger bug 1851066 and get an asynchronous 1px
|
||||
adjustment to scrollTop, which this test doesn't expect.
|
||||
*/
|
||||
height: 200px;
|
||||
}
|
||||
input { font-family: monospace; }
|
||||
</style>
|
||||
|
||||
<div class="spacer"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user