Closed Bug 1682731 Opened 3 years ago Closed 3 years ago

non-native theme input placeholder text padding does not match regular text padding

Categories

(Core :: Widget, defect)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: heycam, Unassigned)

References

Details

Attachments

(1 file)

Attached image placeholder.png

Some reftests fail with the non-native theme enabled because the padding applied to an input's placeholder text is not the same as that applied to the regular text (the editor div). See the attached screen shot for an example.

This seems to be because we don't correctly store the used padding on the scroll frame that contains the placeholder. That decision is made here:

https://searchfox.org/mozilla-central/rev/8883276967d39918e2ce64e873afdd432fb406ca/layout/generic/ReflowInput.cpp#2510-2514

as we've passed in an aPadding value to manually inherit down the padding value from the nsTextControlFrame. The editor div's frame is marked as a reflow root here:

https://searchfox.org/mozilla-central/rev/8883276967d39918e2ce64e873afdd432fb406ca/layout/forms/nsTextControlFrame.cpp#1103-1107

which causes us to store the UsedPaddingProperty(). I'm not sure why we don't store this whenever we have an aPadding value passed in, since otherwise later calls to GetUsedPadding() will return values that come from style and be different from what we used to reflow.

I think bug 1577530 will fix this incidentally. I don't think we want to do it unconditionally because we pass the padding override for all scrolled content and such.

Thanks, confirmed fixed with that patch.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: