WebKit Bugzilla
Attachment 349397 Details for
Bug 189382
: [macOS] [WK2] Support changing foreground colors via color panel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for EWS
bug-189382-20180911084122.patch (text/plain), 21.45 KB, created by
Wenson Hsieh
on 2018-09-11 08:41:22 PDT
(
hide
)
Description:
Patch for EWS
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-09-11 08:41:22 PDT
Size:
21.45 KB
patch
obsolete
>Subversion Revision: 235874 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 737b51e495fce2bd4527352250c8fe758a0b74af..2eaa1f81a2bbd0c0b9ca63384d2e4fb554f58fdc 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,30 @@ >+2018-09-10 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [macOS] [WK2] Support changing foreground colors via color panel >+ https://bugs.webkit.org/show_bug.cgi?id=189382 >+ <rdar://problem/44227311> >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Small adjustments to support changing foreground text color using NSColorPanel in WebKit2. See comments below. >+ Tested by FontManagerTests.ChangeFontColorWithColorPanel. >+ >+ * editing/EditingStyle.cpp: >+ (WebCore::StyleChange::extractTextStyles): >+ >+ Support setting foreground text color with alpha by using a styled span element rather than a font element with >+ attributes. To do this, only populate `StyleChange::m_applyFontColor` if the color is opaque. This is because >+ the font element does not support `rgba()` syntax, so any font colors here with alpha that are serialized to >+ `rgba()` result in a garbage value for the computed color style. >+ >+ * editing/FontAttributeChanges.cpp: >+ (WebCore::FontAttributeChanges::editAction const): >+ >+ Add a helper to return a the relevant EditAction describing this set of FontAttributeChanges. >+ >+ * editing/FontAttributeChanges.h: >+ (WebCore::FontChanges::isEmpty const): >+ > 2018-09-10 Youenn Fablet <youenn@apple.com> > > ontrack events should be fired even if an existing transceiver exists >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1b1e4e270b14a0b48aa110e03393c18499ab4ae8..6996f6039d7d3c520573714b539e07eb129d1d1e 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,33 @@ >+2018-09-10 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [macOS] [WK2] Support changing foreground colors via color panel >+ https://bugs.webkit.org/show_bug.cgi?id=189382 >+ <rdar://problem/44227311> >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Adds support for changing font color in a richly editable element in WebKit2 via NSColorPanel. See below for >+ more detail, as well as the WebCore ChangeLog. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView changeColor:]): >+ >+ Implement this selector; AppKit calls into this when changing font color using NSColorPanel. >+ >+ * UIProcess/Cocoa/WebViewImpl.h: >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::changeFontColorFromSender): >+ >+ Creates and populates new FontAttributeChanges, with only the foreground color determined by asking the sender >+ object for its -color. >+ >+ * WebProcess/WebPage/mac/WebPageMac.mm: >+ >+ Use the relevant EditAction for the incoming FontAttributeChanges, instead of always specifying >+ EditAction::ChangeAttributes. >+ >+ (WebKit::WebPage::changeFontAttributes): >+ > 2018-09-10 James Savage <james.savage@apple.com> > > Long press on picture/link show menu obscured by keyboard. >diff --git a/Source/WebCore/editing/EditingStyle.cpp b/Source/WebCore/editing/EditingStyle.cpp >index 913fbd52f1692fe4d65cb2bc6a05a5be553fc0e6..622adf93df927028bf8ff56e5bf0ad642f51f9f7 100644 >--- a/Source/WebCore/editing/EditingStyle.cpp >+++ b/Source/WebCore/editing/EditingStyle.cpp >@@ -1720,8 +1720,11 @@ void StyleChange::extractTextStyles(Document& document, MutableStyleProperties& > } > > if (style.getPropertyCSSValue(CSSPropertyColor)) { >- m_applyFontColor = Color(textColorFromStyle(style)).serialized(); >- style.removeProperty(CSSPropertyColor); >+ auto color = textColorFromStyle(style); >+ if (color.isOpaque()) { >+ m_applyFontColor = color.serialized(); >+ style.removeProperty(CSSPropertyColor); >+ } > } > > m_applyFontFace = style.getPropertyValue(CSSPropertyFontFamily); >diff --git a/Source/WebCore/editing/FontAttributeChanges.cpp b/Source/WebCore/editing/FontAttributeChanges.cpp >index 6ea0dce22f40ada50743758baaf9451ffcef1235..7b54c45e6be4d6f4c0a5eb2f386ddd02f3a9d5a9 100644 >--- a/Source/WebCore/editing/FontAttributeChanges.cpp >+++ b/Source/WebCore/editing/FontAttributeChanges.cpp >@@ -31,6 +31,7 @@ > #include "CSSValueKeywords.h" > #include "CSSValueList.h" > #include "CSSValuePool.h" >+#include "EditAction.h" > #include "EditingStyle.h" > #include "StyleProperties.h" > >@@ -93,6 +94,18 @@ static RefPtr<CSSValueList> cssValueListForShadow(const FontShadow& shadow) > return list.ptr(); > } > >+EditAction FontAttributeChanges::editAction() const >+{ >+ if (!m_verticalAlign && !m_backgroundColor && !m_shadow && !m_strikeThrough && !m_underline) { >+ if (m_foregroundColor && m_fontChanges.isEmpty()) >+ return EditAction::SetColor; >+ >+ if (!m_foregroundColor && !m_fontChanges.isEmpty()) >+ return EditAction::SetFont; >+ } >+ return EditAction::ChangeAttributes; >+} >+ > Ref<EditingStyle> FontAttributeChanges::createEditingStyle() const > { > auto style = m_fontChanges.createStyleProperties(); >diff --git a/Source/WebCore/editing/FontAttributeChanges.h b/Source/WebCore/editing/FontAttributeChanges.h >index cb667b5c50ece005ebe094d5b1b1e8e6e1c6109f..de7ae53d3782c40f711e484f5aed2c525a9d60dd 100644 >--- a/Source/WebCore/editing/FontAttributeChanges.h >+++ b/Source/WebCore/editing/FontAttributeChanges.h >@@ -35,6 +35,7 @@ namespace WebCore { > class EditingStyle; > class MutableStyleProperties; > >+enum class EditAction : uint8_t; > enum class VerticalAlignChange : uint8_t { Superscript, Baseline, Subscript }; > > class FontChanges { >@@ -49,6 +50,11 @@ public: > void setBold(bool bold) { m_bold = bold; } > void setItalic(bool italic) { m_italic = italic; } > >+ bool isEmpty() const >+ { >+ return !m_fontName && !m_fontFamily && !m_fontSize && !m_fontSizeDelta && !m_bold && !m_italic; >+ } >+ > WEBCORE_EXPORT Ref<EditingStyle> createEditingStyle() const; > Ref<MutableStyleProperties> createStyleProperties() const; > >@@ -87,6 +93,7 @@ public: > void setFontChanges(const FontChanges& fontChanges) { m_fontChanges = fontChanges; } > > WEBCORE_EXPORT Ref<EditingStyle> createEditingStyle() const; >+ WEBCORE_EXPORT EditAction editAction() const; > > private: > std::optional<VerticalAlignChange> m_verticalAlign; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index e0c29c5e4b7fd91ed3ca064b9c923e48abac8fb8..6026918f31fea2d213adc8227030e38ae6bedecb 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -3359,6 +3359,11 @@ WEBCORE_COMMAND(yankAndSelect) > _impl->changeFontFromFontManager(); > } > >+- (void)changeColor:(id)sender >+{ >+ _impl->changeFontColorFromSender(sender); >+} >+ > - (void)changeAttributes:(id)sender > { > _impl->changeFontAttributesFromSender(sender); >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >index d964d509d90bd3038ac9e58c39fe272bca17a8f3..d4e28571c1cca101f97c6cf8fbcb31410253141f 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >@@ -317,6 +317,7 @@ public: > void updateFontPanelIfNeeded(); > void changeFontFromFontManager(); > void changeFontAttributesFromSender(id); >+ void changeFontColorFromSender(id); > bool validateUserInterfaceItem(id <NSValidatedUserInterfaceItem>); > void setEditableElementIsFocused(bool); > >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 1af4addf1d7c47a7128629aee3618dd981770bb4..201abc46f03e386b5fde58537345ec2960860ea7 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -2749,6 +2749,24 @@ void WebViewImpl::updateFontPanelIfNeeded() > } > } > >+void WebViewImpl::changeFontColorFromSender(id sender) >+{ >+ if (![sender respondsToSelector:@selector(color)]) >+ return; >+ >+ id color = [sender color]; >+ if (![color isKindOfClass:NSColor.class]) >+ return; >+ >+ auto& editorState = m_page->editorState(); >+ if (!editorState.isContentEditable || editorState.selectionIsNone) >+ return; >+ >+ WebCore::FontAttributeChanges changes; >+ changes.setForegroundColor(WebCore::colorFromNSColor((NSColor *)color)); >+ m_page->changeFontAttributes(WTFMove(changes)); >+} >+ > void WebViewImpl::changeFontAttributesFromSender(id sender) > { > auto& editorState = m_page->editorState(); >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >index 2bdd08fdd83fdb5d50855e7cc58e596e2ec0a7f4..c9aa5ee50e12036aa1b24c00456f4ef6742cbb5d 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >@@ -1119,7 +1119,7 @@ void WebPage::changeFontAttributes(WebCore::FontAttributeChanges&& changes) > { > auto& frame = m_page->focusController().focusedOrMainFrame(); > if (frame.selection().selection().isContentEditable()) >- frame.editor().applyStyleToSelection(changes.createEditingStyle(), EditAction::ChangeAttributes, Editor::ColorFilterMode::InvertColor); >+ frame.editor().applyStyleToSelection(changes.createEditingStyle(), changes.editAction(), Editor::ColorFilterMode::InvertColor); > } > > void WebPage::changeFont(WebCore::FontChanges&& changes) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7dfc1574c252f4ce48852bce58db7dfff9ee30f9..c1255b77ce1543bcf09d6d2914b32b119c3ffaf2 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,21 @@ >+2018-09-10 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [macOS] [WK2] Support changing foreground colors via color panel >+ https://bugs.webkit.org/show_bug.cgi?id=189382 >+ <rdar://problem/44227311> >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Add an API test that uses NSColorPanel to change the color of selected text, and also apply typing styles when >+ the selection is collapsed. The test also exercises switching between opaque colors (alpha = 1) and transparent >+ colors, as well as making different parts of a word different colors. >+ >+ * TestWebKitAPI/Tests/mac/FontManagerTests.mm: >+ (-[TestWKWebView collapseToEnd]): >+ (webViewForFontManagerTesting): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/cocoa/TestWKWebView.h: >+ > 2018-09-10 Don Olmstead <don.olmstead@sony.com> > > CBOR coders should only be compiled if WebAuthN is enabled >diff --git a/Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm b/Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm >index 22bf87c6abe5b0cc03319066bb01b0ce10a718cf..150184e0582432f1be64a790c653ff6a4dde8c05 100644 >--- a/Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm >+++ b/Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm >@@ -40,6 +40,7 @@ > - (NSString *)stylePropertyAtSelectionStart:(NSString *)propertyName; > - (NSString *)stylePropertyAtSelectionEnd:(NSString *)propertyName; > - (void)selectNextWord; >+- (void)collapseToEnd; > > @end > >@@ -57,6 +58,11 @@ > [self selectWord:nil]; > } > >+- (void)collapseToEnd >+{ >+ [self evaluateJavaScript:@"getSelection().collapseToEnd()" completionHandler:nil]; >+} >+ > - (NSString *)stylePropertyAtSelectionStart:(NSString *)propertyName > { > NSString *script = [NSString stringWithFormat:@"getComputedStyle(getSelection().getRangeAt(0).startContainer.parentElement)['%@']", propertyName]; >@@ -74,7 +80,9 @@ > static RetainPtr<TestWKWebView> webViewForFontManagerTesting(NSFontManager *fontManager) > { > auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 400, 400)]); >- [webView synchronouslyLoadHTMLString:@"<body contenteditable><span id='foo'>foo</span> <span id='bar'>bar</span> <span id='baz'>baz</span></body>"]; >+ [webView synchronouslyLoadHTMLString:@"<body contenteditable>" >+ "<span id='foo'>foo</span> <span id='bar'>bar</span> <span id='baz'>baz</span>" >+ "</body><script>document.body.addEventListener('input', event => lastInputEvent = event)</script>"]; > [webView stringByEvaluatingJavaScript:@"document.body.focus()"]; > fontManager.target = webView.get(); > return webView; >@@ -93,7 +101,7 @@ namespace TestWebKitAPI { > > TEST(FontManagerTests, ChangeFontSizeWithMenuItems) > { >- NSFontManager *fontManager = [NSFontManager sharedFontManager]; >+ NSFontManager *fontManager = NSFontManager.sharedFontManager; > auto webView = webViewForFontManagerTesting(fontManager); > > auto sizeIncreaseMenuItemCell = menuItemCellForFontAction(NSSizeUpFontAction); >@@ -133,7 +141,7 @@ TEST(FontManagerTests, ChangeFontSizeWithMenuItems) > > TEST(FontManagerTests, ChangeFontWithPanel) > { >- NSFontManager *fontManager = [NSFontManager sharedFontManager]; >+ NSFontManager *fontManager = NSFontManager.sharedFontManager; > auto webView = webViewForFontManagerTesting(fontManager); > > NSFontPanel *fontPanel = [fontManager fontPanel:YES]; >@@ -182,7 +190,7 @@ TEST(FontManagerTests, ChangeFontWithPanel) > > TEST(FontManagerTests, ChangeAttributesWithFontEffectsBox) > { >- NSFontManager *fontManager = [NSFontManager sharedFontManager]; >+ NSFontManager *fontManager = NSFontManager.sharedFontManager; > auto webView = webViewForFontManagerTesting(fontManager); > > NSFontPanel *fontPanel = [fontManager fontPanel:YES]; >@@ -248,6 +256,60 @@ TEST(FontManagerTests, ChangeAttributesWithFontEffectsBox) > EXPECT_WK_STREQ("none", textDecorationsAroundSelection()); > } > >+TEST(FontManagerTests, ChangeFontColorWithColorPanel) >+{ >+ NSColorPanel *colorPanel = NSColorPanel.sharedColorPanel; >+ colorPanel.showsAlpha = YES; >+ >+ auto webView = webViewForFontManagerTesting(NSFontManager.sharedFontManager); >+ auto checkFontColorAtStartAndEndWithInputEvents = [webView] (const char* colorAsString) { >+ EXPECT_WK_STREQ(colorAsString, [webView stylePropertyAtSelectionStart:@"color"]); >+ EXPECT_WK_STREQ(colorAsString, [webView stylePropertyAtSelectionEnd:@"color"]); >+ EXPECT_WK_STREQ("formatFontColor", [webView stringByEvaluatingJavaScript:@"lastInputEvent.inputType"]); >+ EXPECT_WK_STREQ(colorAsString, [webView stringByEvaluatingJavaScript:@"lastInputEvent.data"]); >+ }; >+ >+ // 1. Select "foo" and turn it red; verify that the font element is used for fully opaque colors. >+ colorPanel.color = NSColor.redColor; >+ [webView selectWord:nil]; >+ [webView changeColor:colorPanel]; >+ checkFontColorAtStartAndEndWithInputEvents("rgb(255, 0, 0)"); >+ EXPECT_TRUE([[webView objectByEvaluatingJavaScript:@"!!foo.querySelector('font')"] boolValue]); >+ >+ // 2. Now select "bar" and try a few different colors, starting with a color with alpha. >+ colorPanel.color = [NSColor colorWithWhite:1 alpha:0.2]; >+ [webView selectNextWord]; >+ [webView changeColor:colorPanel]; >+ checkFontColorAtStartAndEndWithInputEvents("rgba(255, 255, 255, 0.2)"); >+ EXPECT_FALSE([[webView objectByEvaluatingJavaScript:@"!!bar.querySelector('font')"] boolValue]); >+ >+ // 3a. Switch back to a solid color. >+ colorPanel.color = [NSColor colorWithRed:0.8 green:0.7 blue:0.2 alpha:1]; >+ [webView changeColor:colorPanel]; >+ checkFontColorAtStartAndEndWithInputEvents("rgb(204, 179, 51)"); >+ EXPECT_TRUE([[webView objectByEvaluatingJavaScript:@"!!bar.querySelector('font')"] boolValue]); >+ >+ // 3b. Switch back again to a color with alpha. >+ colorPanel.color = [NSColor colorWithRed:0.8 green:0.7 blue:0.2 alpha:0.2]; >+ [webView changeColor:colorPanel]; >+ checkFontColorAtStartAndEndWithInputEvents("rgba(204, 179, 51, 0.2)"); >+ EXPECT_FALSE([[webView objectByEvaluatingJavaScript:@"!!bar.querySelector('font')"] boolValue]); >+ >+ // 4a. Now collapse the selection to the end and set the typing style color to green. >+ colorPanel.color = NSColor.greenColor; >+ [webView collapseToEnd]; >+ [webView changeColor:colorPanel]; >+ EXPECT_WK_STREQ("formatFontColor", [webView stringByEvaluatingJavaScript:@"lastInputEvent.inputType"]); >+ EXPECT_WK_STREQ("rgb(0, 255, 0)", [webView stringByEvaluatingJavaScript:@"lastInputEvent.data"]); >+ >+ // 4b. This should result in inserting green text. >+ [webView insertText:@"green"]; >+ [webView moveWordBackward:nil]; >+ [webView selectWord:nil]; >+ EXPECT_WK_STREQ("rgba(204, 179, 51, 0.2)", [webView stylePropertyAtSelectionStart:@"color"]); >+ EXPECT_WK_STREQ("rgb(0, 255, 0)", [webView stylePropertyAtSelectionEnd:@"color"]); >+} >+ > } // namespace TestWebKitAPI > > #endif // PLATFORM(MAC) && WK_API_ENABLED >diff --git a/Tools/TestWebKitAPI/cocoa/TestWKWebView.h b/Tools/TestWebKitAPI/cocoa/TestWKWebView.h >index 5f169d9b4d74da5713e3ea3c8185a2a72a8ad591..c9579e4946f44698ef83efac7ef4de41db1bc350 100644 >--- a/Tools/TestWebKitAPI/cocoa/TestWKWebView.h >+++ b/Tools/TestWebKitAPI/cocoa/TestWKWebView.h >@@ -38,6 +38,7 @@ > #if PLATFORM(MAC) > - (void)paste:(id)sender; > - (void)changeAttributes:(id)sender; >+- (void)changeColor:(id)sender; > #endif > @end > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 09edb95156b4718b3a8fa1a1366b46ddce46410a..2a9193bc2e1d9285206f36e20ae2598f39c9a702 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2018-09-11 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [macOS] [WK2] Support changing foreground colors via color panel >+ https://bugs.webkit.org/show_bug.cgi?id=189382 >+ <rdar://problem/44227311> >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Adjust an existing layout test that applies a text color with alpha. Currently, this results in a font element >+ being emitted with the `color` attribute, but this is incorrect, since the `color` attribute of a font element >+ does not support "rgba(â¦)" values. >+ >+ Instead, split this into two cases: verify that setting the color to an opaque color (with alpha = 1) emits a >+ font element with the correct `color` attribute, and fall back to using an inline style when the color is >+ partially transparent. >+ >+ * editing/style/inline-style-container-expected.txt: >+ * editing/style/inline-style-container.html: >+ > 2018-09-10 Truitt Savell <tsavell@apple.com> > > Rebaseline test after https://trac.webkit.org/changeset/235866/webkit. >diff --git a/LayoutTests/editing/style/inline-style-container-expected.txt b/LayoutTests/editing/style/inline-style-container-expected.txt >index 12dce2e0d30da5be648a6873d399fc7a50700f19..cff70bb5e9cb1ebd24d96af172a6d61b6200c495 100644 >--- a/LayoutTests/editing/style/inline-style-container-expected.txt >+++ b/LayoutTests/editing/style/inline-style-container-expected.txt >@@ -13,7 +13,8 @@ PASS fontName(Arial) on all of "<b><font face="Arial">hello</font></b> world" yi > PASS fontName(Arial) on all of "<font color="blue">hello</font> world" yields "<font face="Arial"><font color="blue">hello</font> world</font>" > PASS fontName(Arial) on all of "<b><u>hello</u> world</b>" yields "<b><font face="Arial"><u>hello</u> world</font></b>" > PASS foreColor(blue) on all of "<font><u style="color:red;">hello</u></font>" yields "<font color="#0000ff"><u>hello</u></font>" >-PASS foreColor(rgba(0, 50, 100, 0.4)) on all of "<font><u style="color:red;">hello</u></font>" yields "<font color="rgba(0, 50, 100, 0.4)"><u>hello</u></font>" >+PASS foreColor(rgb(0, 50, 100)) on all of "<font><u style="color:red;">hello</u></font>" yields "<font color="#003264"><u>hello</u></font>" >+PASS foreColor(rgba(0, 50, 100, 0.4)) on all of "<font color="#00ff00"><u>hello</u></font>" yields "<u style="color: rgba(0, 50, 100, 0.4);">hello</u>" > PASS bold(null) on all of "<u><strike>hello</strike> <strike>world</strike></u>" yields "<u><b><strike>hello</strike> <strike>world</strike></b></u>" > PASS bold(null) on all of "<i>hello</i> <b>world</b>" yields "<b><i>hello</i> world</b>" > PASS bold(null) on all of "<strike><i><u>hello <b>world</b></u></i> webkit</strike>" yields "<strike><b><i><u>hello world</u></i> webkit</b></strike>" >diff --git a/LayoutTests/editing/style/inline-style-container.html b/LayoutTests/editing/style/inline-style-container.html >index 1051eecd6c8e79cb85a974b0a94e610c82bde1c9..30484c520f2cfbfde1550248949f8f7d620e3ffe 100644 >--- a/LayoutTests/editing/style/inline-style-container.html >+++ b/LayoutTests/editing/style/inline-style-container.html >@@ -37,7 +37,8 @@ testSingleToggle("fontName", "Arial", '<b><font face="Arial">hello</font></b> wo > testSingleToggle("fontName", "Arial", '<font color="blue">hello</font> world', '<font face="Arial"><font color="blue">hello</font> world</font>'); > testSingleToggle("fontName", "Arial", '<b><u>hello</u> world</b>', '<b><font face="Arial"><u>hello</u> world</font></b>'); > testSingleToggle("foreColor", 'blue', '<font><u style="color:red;">hello</u></font>', '<font color="#0000ff"><u>hello</u></font>'); >-testSingleToggle("foreColor", 'rgba(0, 50, 100, 0.4)', '<font><u style="color:red;">hello</u></font>', '<font color="rgba(0, 50, 100, 0.4)"><u>hello</u></font>'); >+testSingleToggle("foreColor", 'rgb(0, 50, 100)', '<font><u style="color:red;">hello</u></font>', '<font color="#003264"><u>hello</u></font>'); >+testSingleToggle("foreColor", 'rgba(0, 50, 100, 0.4)', '<font color="#00ff00"><u>hello</u></font>', '<u style="color: rgba(0, 50, 100, 0.4);">hello</u>'); > testSingleToggle("bold", null, '<u><strike>hello</strike> <strike>world</strike></u>', '<u><b><strike>hello</strike> <strike>world</strike></b></u>'); > testSingleToggle("bold", null, '<i>hello</i> <b>world</b>', '<b><i>hello</i> world</b>'); > testSingleToggle("bold", null, '<strike><i><u>hello <b>world</b></u></i> webkit</strike>', '<strike><b><i><u>hello world</u></i> webkit</b></strike>');
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189382
:
349376
|
349379
|
349380
|
349381
|
349382
|
349384
|
349397
|
349401
|
349492