Bug 207676 - Dark Mode: In Notes, list item becomes invisible in dark mode after outdenting
Summary: Dark Mode: In Notes, list item becomes invisible in dark mode after outdenting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-12 19:45 PST by Ryosuke Niwa
Modified: 2020-02-13 18:56 PST (History)
5 users (show)

See Also:


Attachments
Fixes the bug (9.97 KB, patch)
2020-02-12 20:48 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixes the bug (8.16 KB, patch)
2020-02-12 23:07 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed the bug (8.50 KB, patch)
2020-02-13 17:03 PST, Ryosuke Niwa
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2020-02-12 19:45:22 PST
Steps To Reproduce:
1. System Preferences —> General —> Appearance = Dark
2. Sign in with an IMAP account with HTML notes (i.e. Gmail)
3. Launch Notes
4. Create a new HTML note
5. Start a numbered list (i.e. type “1.” followed by text)
6. Outdent the list item

Result: The test becomes invisible

<rdar://problem/56682679>
Comment 1 Ryosuke Niwa 2020-02-12 20:48:07 PST
Created attachment 390612 [details]
Fixes the bug
Comment 2 Ryosuke Niwa 2020-02-12 22:15:30 PST
Comment on attachment 390612 [details]
Fixes the bug

Hm... looks like PasteRTFD.TransformColorsOfDarkContent is failing on iOS.
Comment 3 Ryosuke Niwa 2020-02-12 23:02:32 PST
Comment on attachment 390612 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=390612&action=review

> Source/WebCore/editing/ReplaceSelectionCommand.cpp:579
> -    return true;
> +    return hasVisibleNonSemanticColor;

Alright, this doesn't work :( Reverting this.
Comment 4 Ryosuke Niwa 2020-02-12 23:07:58 PST
Created attachment 390620 [details]
Fixes the bug
Comment 5 Ryosuke Niwa 2020-02-13 12:21:01 PST
Oh, looks like iOS just needs platform specific result for the test due to auto size propert as usual but that should not block the code review.
Comment 6 Timothy Hatcher 2020-02-13 15:16:55 PST
Comment on attachment 390620 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=390620&action=review

> Source/WebCore/editing/EditingStyle.cpp:1385
> +            m_mutableStyle->setProperty(CSSPropertyColor, computedValue);

This should use id, otherwise CSSPropertyBackgroundColor and CSSPropertyCaretColor will overwrite CSSPropertyColor.
Comment 7 Ryosuke Niwa 2020-02-13 17:03:15 PST
Created attachment 390705 [details]
Fixed the bug
Comment 8 Ryosuke Niwa 2020-02-13 18:56:34 PST
Committed r256580: <https://trac.webkit.org/changeset/256580>