WebKit Bugzilla
Attachment 349401 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]
Another patch for EWS
bug-189382-20180911094155.patch (text/plain), 21.07 KB, created by
Wenson Hsieh
on 2018-09-11 09:41:55 PDT
(
hide
)
Description:
Another patch for EWS
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-09-11 09:41:55 PDT
Size:
21.07 KB
patch
obsolete
>Subversion Revision: 235880 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cc605918098d1e4147496792f106cad87316e204..f8700aab218f3872ab7fa049977368e92d7ddcf0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+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. >+ >+ 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): >+ >+ Populate `StyleChange::m_applyFontColor` with the fully opaque version of the given color. 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 the relevant EditAction describing this set of FontAttributeChanges. >+ >+ * editing/FontAttributeChanges.h: >+ (WebCore::FontChanges::isEmpty const): >+ > 2018-09-10 Megan Gardner <megan_gardner@apple.com> > > Correctly interpret from angle for conic gradients >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 8798d939779962029bf2310fa49eba742f86035b..8ffb45b3891c5f1db2f6c928f084bceb6f0d67df 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,33 @@ >+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. >+ >+ 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 Chris Dumez <cdumez@apple.com> > > Unreviewed, fix ProcessSwap API tests after r235867. >diff --git a/Source/WebCore/editing/EditingStyle.cpp b/Source/WebCore/editing/EditingStyle.cpp >index 913fbd52f1692fe4d65cb2bc6a05a5be553fc0e6..bc194a952ebce3edfbe3cb4bff11406eb0edef76 100644 >--- a/Source/WebCore/editing/EditingStyle.cpp >+++ b/Source/WebCore/editing/EditingStyle.cpp >@@ -1720,7 +1720,7 @@ void StyleChange::extractTextStyles(Document& document, MutableStyleProperties& > } > > if (style.getPropertyCSSValue(CSSPropertyColor)) { >- m_applyFontColor = Color(textColorFromStyle(style)).serialized(); >+ m_applyFontColor = textColorFromStyle(style).colorWithAlpha(1).serialized(); > style.removeProperty(CSSPropertyColor); > } > >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 7217d8abe40eaab91fd547f2fa89d4015bdf5ffd..49e74d0ca8007d58bc9cac5c33b5822a079e3676 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -3387,6 +3387,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 bab3dac97469911601769e07e0c8ee359b627ca8..7f973d7686252ab7a2eccfc4843e16e2cd613919 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,21 @@ >+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. >+ >+ 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 Thomas Denney <tdenney@apple.com> > > [WHLSL] Inlining should be optional >diff --git a/Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm b/Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm >index 22bf87c6abe5b0cc03319066bb01b0ce10a718cf..713d8c49a0e45913eff493e3f4eef49ee6dd74ee 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"]); >+ EXPECT_TRUE([[webView objectByEvaluatingJavaScript:@"!foo.querySelector('font')"] boolValue]); >+ EXPECT_TRUE([[webView objectByEvaluatingJavaScript:@"!bar.querySelector('font')"] boolValue]); >+ }; >+ >+ [webView evaluateJavaScript:@"document.execCommand('StyleWithCSS', false, true)" completionHandler:nil]; >+ >+ // 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)"); >+ >+ // 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)"); >+ >+ // 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)"); >+ >+ // 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)"); >+ >+ // 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 96cc8d5261c9845dfc82c251ccac824f2cdb1abc..4f298ac3be9fedf93903c5b140fc3675f321e3f8 100644 >--- a/Tools/TestWebKitAPI/cocoa/TestWKWebView.h >+++ b/Tools/TestWebKitAPI/cocoa/TestWKWebView.h >@@ -39,6 +39,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..d45f6722412b6a2ae6c33de6ece6e449134e3d0b 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; otherwise, if a transparent color is specified, just drop the >+ alpha component, since this alpha value can't be represented via the font element anyways. >+ >+ * 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..ceda256af8baccae0ee4c57f15ee51351b242c99 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><u style="color:red;">hello</u></font>" yields "<font color="#003264"><u>hello</u></font>" > 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..34bdd64a6bf7a4d96d5398a9147df2ce75993041 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><u style="color:red;">hello</u></font>', '<font color="#003264"><u>hello</u></font>'); > 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