Closed Bug 1808886 Opened 2 years ago Closed 2 years ago

[Yahoo mail] Copying formatted text on mail.yahoo.com does not respect text size changes

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox108 --- wontfix
firefox109 --- wontfix
firefox110 --- wontfix
firefox111 --- fixed

People

(Reporter: oardelean, Assigned: masayuki)

References

()

Details

Attachments

(2 files)

Notes

  • This does not reproduce in Chrome. Please see the attachment for more details.

Found in

  • Nightly 110.0a1

Affected versions

  • Nightly 110.0a1
  • Firefox 109.0b9
  • Firefox 108.0.2

Tested platforms

  • macOS 12
  • Ubuntu 22
  • Windows 10

Affected platforms

  • macOS 12
  • Ubuntu 22
  • Windows 10

Unaffected platforms

  • N/A;

Steps to reproduce

  1. Launch Firefox and go to https://mail.yahoo.com.
  2. Log in with a valid account.
  3. Click on the “Compose” button to open a new e-mail window.
  4. Open a new tab and go to https://docs.google.com/.
  5. Log in with a valid account.
  6. Open a new Blank Document and write one or two phrases and apply formatting( text size, highlights, different fonts).
  7. Return to https://mail.yahoo.com tab and paste the formatted text into the e-mail window.
  8. Select the newly-pasted phrases and change the size of text.

Expected result

  • Text size changes accordingly to reflect the user’s selection.

Actual result

  • Text size does not change.

Regression range

  • Will look for one as soon as possible.

I tried searching for a regression range but it seems that I can reproduce the issue up until Nightly 71.0a1(build ID: 20190922213341).
I think it's safe to assume that this is not a regression.

I've not investigated this, but I guess that <font size> is inserted inside or outside of <span style="font-size:...">. Currently, our style editor checks HTML elements representing a style in the CSS mode, but does not do the opposite thing, i.e., checking
CSS style of elements, in the HTML mode. Perhaps, we need to make the style editor removes CSS style in the HTML mode.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All

Currently, Gecko does not support updating font-size style even in the CSS
mode. Therefore, CSSEditUtils claims that <font size="..."> style is not
CSS editable. Supporting it requires a lot of new code but currently we don't
have any reports about this poor support. Therefore, we should only try to
make the style editor remove font-size properties around selection at setting
<font size="..."> style for now.

Additionally, Blink and WebKit does not allow to nest multiple <font> elements
and <span> elements which specify font-size, font-family or color. When
setting one of the styles, they split ancestors which are related to the style
at range boundaries. Then, unwrap the unnecessary elements. This makes the
DOM tree simpler, thus, the later handling will be simpler. Therefore, it's
worthwhile to follow them.

Unfortunately, there are some logic differences when handling styles in elements
having id attribute. Therefore, there are some new test failures, but I guess
that it does not cause any problems in web apps in the wild because it's hard to
manage editable identified elements in cross browsers and I have no idea of
motivations to do it.

Depends on D166617

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/e891dce2c845 Make the style editor treat `<font>` related styles as exclusive styles r=m_kato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38077 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

The patch landed in nightly and beta is affected.
:masayuki, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox110 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(masayuki)
Upstream PR merged by moz-wptsync-bot

Risky and not a new regression. So wontfix for beta is reasonable.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: