WebKit Bugzilla
Attachment 345968 Details for
Bug 188131
: Adjust the color matrix for the inverse apple-invert-lightness() transformation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188131-20180727162617.patch (text/plain), 28.80 KB, created by
Simon Fraser (smfr)
on 2018-07-27 16:26:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-07-27 16:26:18 PDT
Size:
28.80 KB
patch
obsolete
>Subversion Revision: 234330 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4cd9a16edcf58760126e6ca4d52ce945fb910e97..a9df1b47495c9163390e10e1968820fcf6794127 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-07-27 Simon Fraser <simon.fraser@apple.com> >+ >+ Adjust the color matrix for the inverse apple-invert-lightness() transformation >+ https://bugs.webkit.org/show_bug.cgi?id=188131 >+ rdar://problem/42673070 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use the correct inverse matrix values. >+ >+ Test: editing/style/inverse-color-filter.html >+ >+ * platform/graphics/filters/FilterOperation.cpp: >+ (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): >+ > 2018-07-27 Simon Fraser <simon.fraser@apple.com> > > Be more conservative with compositing layer creation when memory is low >diff --git a/Source/WebCore/platform/graphics/filters/FilterOperation.cpp b/Source/WebCore/platform/graphics/filters/FilterOperation.cpp >index 22b737321305009902f8ad3de70eae67626ef5ac..746940e9e0bf0237af6b3673cc459deb27c93756 100644 >--- a/Source/WebCore/platform/graphics/filters/FilterOperation.cpp >+++ b/Source/WebCore/platform/graphics/filters/FilterOperation.cpp >@@ -258,11 +258,10 @@ bool InvertLightnessFilterOperation::inverseTransformColor(FloatComponents& sRGB > FloatComponents rgbComponents = sRGBColorComponents; > // Apply the matrix. > float matrixValues[20] = { >- -1.124858, -0.244747, 0.119605, 0, 1.25, >- -0.124506, -1.244758, 0.119264, 0, 1.25, >- -0.12445, -0.244568, -0.880982, 0, 1.25, >- 0, 0, 0, 1, 0 >- >+ -1.300, -0.097, 0.147, 0, 1.25, >+ -0.049, -1.347, 0.146, 0, 1.25, >+ -0.049, -0.097, -1.104, 0, 1.25, >+ 0, 0, 0, 1, 0 > }; > ColorMatrix toLightModeMatrix(matrixValues); > toLightModeMatrix.transformColorComponents(rgbComponents); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 3e443e1253cda2df62d3fb59a9e03684bb4b47b3..a042fd9d4d4efa6e9034a4507e2d6e95bbb7d391 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2018-07-27 Simon Fraser <simon.fraser@apple.com> >+ >+ Adjust the color matrix for the inverse apple-invert-lightness() transformation >+ https://bugs.webkit.org/show_bug.cgi?id=188131 >+ rdar://problem/42673070 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rebaseline tests that use the filter inversion. Add a new test that does inversion >+ for a whole range of colors, to get good coverage of the inversion matrix. >+ >+ * editing/style/inverse-color-filter-expected.txt: Added. >+ * editing/style/inverse-color-filter.html: Added. >+ * editing/style/set-backColor-with-color-filter-expected.txt: >+ * editing/style/set-foreColor-with-color-filter-expected.txt: >+ * platform/win/TestExpectations: >+ > 2018-07-27 Simon Fraser <simon.fraser@apple.com> > > Be more conservative with compositing layer creation when memory is low >diff --git a/LayoutTests/editing/style/inverse-color-filter-expected.txt b/LayoutTests/editing/style/inverse-color-filter-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e5162742bd928527605dc3d0bdc2f567f7c27a7b >--- /dev/null >+++ b/LayoutTests/editing/style/inverse-color-filter-expected.txt >@@ -0,0 +1,720 @@ >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 0, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 255, 255)" >+| <span> >+| style="background-color: rgb(0, 0, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(235, 235, 235)" >+| <span> >+| style="background-color: rgb(25, 25, 25);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(214, 214, 214)" >+| <span> >+| style="background-color: rgb(51, 51, 51);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(192, 192, 192)" >+| <span> >+| style="background-color: rgb(79, 79, 79);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(170, 170, 170)" >+| <span> >+| style="background-color: rgb(106, 106, 106);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(146, 146, 146)" >+| <span> >+| style="background-color: rgb(136, 136, 136);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(122, 122, 122)" >+| <span> >+| style="background-color: rgb(166, 166, 166);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(96, 96, 96)" >+| <span> >+| style="background-color: rgb(199, 199, 199);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(68, 68, 68)" >+| <span> >+| style="background-color: rgb(234, 234, 234);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(35, 35, 35)" >+| <span> >+| style="background-color: rgb(255, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 0, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 54, 74)" >+| <span> >+| style="background-color: rgb(232, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 30, 87)" >+| <span> >+| style="background-color: rgb(220, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(17, 5, 59)" >+| <span> >+| style="background-color: rgb(255, 252, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(46, 7, 62)" >+| <span> >+| style="background-color: rgb(255, 247, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(60, 8, 27)" >+| <span> >+| style="background-color: rgb(255, 244, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(92, 7, 0)" >+| <span> >+| style="background-color: rgb(255, 207, 198);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(90, 28, 0)" >+| <span> >+| style="background-color: rgb(255, 234, 199);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(88, 52, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 199);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(85, 61, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 202);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(102, 97, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 177);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(79, 85, 3)" >+| <span> >+| style="background-color: rgb(255, 255, 201);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(38, 62, 15)" >+| <span> >+| style="background-color: rgb(255, 255, 236);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 77, 101)" >+| <span> >+| style="background-color: rgb(200, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 46, 122)" >+| <span> >+| style="background-color: rgb(180, 237, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(26, 10, 83)" >+| <span> >+| style="background-color: rgb(245, 225, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(69, 14, 89)" >+| <span> >+| style="background-color: rgb(255, 216, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(86, 16, 41)" >+| <span> >+| style="background-color: rgb(255, 211, 243);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(131, 17, 0)" >+| <span> >+| style="background-color: rgb(255, 168, 147);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(124, 42, 0)" >+| <span> >+| style="background-color: rgb(255, 206, 153);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(122, 74, 0)" >+| <span> >+| style="background-color: rgb(255, 245, 153);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(120, 87, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 154);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(141, 134, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 122);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(111, 118, 8)" >+| <span> >+| style="background-color: rgb(255, 255, 156);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(56, 87, 26)" >+| <span> >+| style="background-color: rgb(240, 255, 203);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 109, 143)" >+| <span> >+| style="background-color: rgb(150, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 66, 170)" >+| <span> >+| style="background-color: rgb(125, 207, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(44, 19, 118)" >+| <span> >+| style="background-color: rgb(216, 184, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(97, 23, 124)" >+| <span> >+| style="background-color: rgb(255, 175, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(121, 26, 62)" >+| <span> >+| style="background-color: rgb(255, 168, 213);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(181, 26, 0)" >+| <span> >+| style="background-color: rgb(255, 113, 81);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(173, 62, 0)" >+| <span> >+| style="background-color: rgb(255, 165, 88);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(169, 104, 0)" >+| <span> >+| style="background-color: rgb(255, 219, 89);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(167, 123, 0)" >+| <span> >+| style="background-color: rgb(255, 243, 90);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(196, 188, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 46);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(154, 166, 14)" >+| <span> >+| style="background-color: rgb(255, 255, 90);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(79, 122, 40)" >+| <span> >+| style="background-color: rgb(205, 255, 156);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 140, 180)" >+| <span> >+| style="background-color: rgb(106, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 86, 214)" >+| <span> >+| style="background-color: rgb(74, 182, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(55, 26, 148)" >+| <span> >+| style="background-color: rgb(186, 150, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(123, 33, 159)" >+| <span> >+| style="background-color: rgb(246, 134, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(154, 36, 79)" >+| <span> >+| style="background-color: rgb(255, 127, 180);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(227, 36, 0)" >+| <span> >+| style="background-color: rgb(255, 65, 20);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(217, 80, 0)" >+| <span> >+| style="background-color: rgb(255, 129, 29);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(213, 132, 0)" >+| <span> >+| style="background-color: rgb(255, 194, 29);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(210, 157, 0)" >+| <span> >+| style="background-color: rgb(255, 227, 31);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(245, 236, 0)" >+| <span> >+| style="background-color: rgb(255, 255, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(195, 209, 23)" >+| <span> >+| style="background-color: rgb(246, 255, 31);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(102, 156, 53)" >+| <span> >+| style="background-color: rgb(173, 240, 111);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 163, 215)" >+| <span> >+| style="background-color: rgb(66, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 97, 255)" >+| <span> >+| style="background-color: rgb(28, 149, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(77, 34, 179)" >+| <span> >+| style="background-color: rgb(168, 114, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(153, 41, 189)" >+| <span> >+| style="background-color: rgb(239, 99, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(185, 45, 93)" >+| <span> >+| style="background-color: rgb(255, 88, 148);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 64, 19)" >+| <span> >+| style="background-color: rgb(255, 40, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 106, 0)" >+| <span> >+| style="background-color: rgb(255, 109, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 170, 0)" >+| <span> >+| style="background-color: rgb(255, 183, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(254, 199, 0)" >+| <span> >+| style="background-color: rgb(255, 218, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 252, 65)" >+| <span> >+| style="background-color: rgb(210, 206, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(217, 235, 55)" >+| <span> >+| style="background-color: rgb(202, 225, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(119, 187, 65)" >+| <span> >+| style="background-color: rgb(138, 223, 71);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(0, 199, 252)" >+| <span> >+| style="background-color: rgb(21, 255, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(58, 136, 254)" >+| <span> >+| style="background-color: rgb(22, 120, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(94, 48, 235)" >+| <span> >+| style="background-color: rgb(107, 50, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(190, 56, 243)" >+| <span> >+| style="background-color: rgb(203, 36, 255);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(230, 59, 122)" >+| <span> >+| style="background-color: rgb(246, 32, 111);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 98, 81)" >+| <span> >+| style="background-color: rgb(207, 11, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 134, 71)" >+| <span> >+| style="background-color: rgb(215, 63, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 180, 63)" >+| <span> >+| style="background-color: rgb(219, 125, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(254, 203, 62)" >+| <span> >+| style="background-color: rgb(218, 154, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 247, 107)" >+| <span> >+| style="background-color: rgb(164, 154, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(228, 239, 101)" >+| <span> >+| style="background-color: rgb(159, 173, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(150, 211, 95)" >+| <span> >+| style="background-color: rgb(110, 186, 41);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(83, 213, 253)" >+| <span> >+| style="background-color: rgb(15, 177, 227);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(116, 167, 254)" >+| <span> >+| style="background-color: rgb(16, 80, 189);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(135, 78, 254)" >+| <span> >+| style="background-color: rgb(95, 24, 244);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(211, 87, 254)" >+| <span> >+| style="background-color: rgb(175, 20, 228);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(237, 113, 158)" >+| <span> >+| style="background-color: rgb(178, 23, 79);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 140, 130)" >+| <span> >+| style="background-color: rgb(149, 5, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 165, 125)" >+| <span> >+| style="background-color: rgb(152, 40, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 198, 119)" >+| <span> >+| style="background-color: rgb(156, 84, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 216, 119)" >+| <span> >+| style="background-color: rgb(154, 105, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 249, 149)" >+| <span> >+| style="background-color: rgb(118, 110, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(235, 243, 143)" >+| <span> >+| style="background-color: rgb(116, 126, 1);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(177, 221, 140)" >+| <span> >+| style="background-color: rgb(79, 134, 33);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(148, 227, 254)" >+| <span> >+| style="background-color: rgb(9, 108, 142);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(168, 198, 254)" >+| <span> >+| style="background-color: rgb(11, 48, 118);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(177, 140, 254)" >+| <span> >+| style="background-color: rgb(62, 16, 159);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(227, 146, 254)" >+| <span> >+| style="background-color: rgb(114, 13, 148);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(244, 164, 192)" >+| <span> >+| style="background-color: rgb(114, 14, 49);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 181, 175)" >+| <span> >+| style="background-color: rgb(95, 3, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 196, 171)" >+| <span> >+| style="background-color: rgb(98, 25, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 217, 168)" >+| <span> >+| style="background-color: rgb(100, 52, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 228, 168)" >+| <span> >+| style="background-color: rgb(99, 65, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 251, 185)" >+| <span> >+| style="background-color: rgb(78, 73, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(242, 247, 183)" >+| <span> >+| style="background-color: rgb(75, 81, 1);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(204, 232, 181)" >+| <span> >+| style="background-color: rgb(51, 86, 23);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(202, 240, 254)" >+| <span> >+| style="background-color: rgb(5, 53, 70);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(212, 227, 254)" >+| <span> >+| style="background-color: rgb(6, 25, 58);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(217, 202, 254)" >+| <span> >+| style="background-color: rgb(27, 8, 73);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(241, 201, 254)" >+| <span> >+| style="background-color: rgb(57, 7, 73);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(249, 211, 224)" >+| <span> >+| style="background-color: rgb(55, 8, 24);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 218, 216)" >+| <span> >+| style="background-color: rgb(47, 0, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 226, 214)" >+| <span> >+| style="background-color: rgb(48, 12, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 236, 213)" >+| <span> >+| style="background-color: rgb(48, 24, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(255, 242, 213)" >+| <span> >+| style="background-color: rgb(48, 31, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(254, 252, 221)" >+| <span> >+| style="background-color: rgb(38, 35, 0);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(248, 250, 219)" >+| <span> >+| style="background-color: rgb(38, 41, 2);" >+| "aaa" >+| <div> >+| contenteditable="" >+| data-color="rgb(224, 237, 212)" >+| <span> >+| style="background-color: rgb(34, 51, 19);" >+| "<#selection-anchor>aaa<#selection-focus>" >diff --git a/LayoutTests/editing/style/inverse-color-filter.html b/LayoutTests/editing/style/inverse-color-filter.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8a2024c34bc4a0f8515aba8072db2844fd75b060 >--- /dev/null >+++ b/LayoutTests/editing/style/inverse-color-filter.html >@@ -0,0 +1,194 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ enableColorFilter=true ] --> >+<html> >+<head> >+ <style> >+ #container { >+ width: 500px; >+ height: 400px; >+ border: 1px solid black; >+ background-color: white; >+ -apple-color-filter: apple-invert-lightness(); >+ } >+ >+ #container > div { >+ height: 30px; >+ width: 30px; >+ margin: 5px; >+ float: left; >+ } >+ >+ </style> >+ <script> >+ const colors = [ >+ "rgb(0, 0, 0)", >+ "rgb(255, 255, 255)", >+ "rgb(235, 235, 235)", >+ "rgb(214, 214, 214)", >+ "rgb(192, 192, 192)", >+ "rgb(170, 170, 170)", >+ "rgb(146, 146, 146)", >+ "rgb(122, 122, 122)", >+ "rgb(96, 96, 96)", >+ "rgb(68, 68, 68)", >+ "rgb(35, 35, 35)", >+ "rgb(0, 0, 0)", >+ >+ "rgb(0, 54, 74)", >+ "rgb(0, 30, 87)", >+ "rgb(17, 5, 59)", >+ "rgb(46, 7, 62)", >+ "rgb(60, 8, 27)", >+ "rgb(92, 7, 0)", >+ "rgb(90, 28, 0)", >+ "rgb(88, 52, 0)", >+ "rgb(85, 61, 0)", >+ "rgb(102, 97, 0)", >+ "rgb(79, 85, 3)", >+ "rgb(38, 62, 15)", >+ >+ "rgb(0, 77, 101)", >+ "rgb(0, 46, 122)", >+ "rgb(26, 10, 83)", >+ "rgb(69, 14, 89)", >+ "rgb(86, 16, 41)", >+ "rgb(131, 17, 0)", >+ "rgb(124, 42, 0)", >+ "rgb(122, 74, 0)", >+ "rgb(120, 87, 0)", >+ "rgb(141, 134, 0)", >+ "rgb(111, 118, 8)", >+ "rgb(56, 87, 26)", >+ >+ "rgb(0, 109, 143)", >+ "rgb(0, 66, 170)", >+ "rgb(44, 19, 118)", >+ "rgb(97, 23, 124)", >+ "rgb(121, 26, 62)", >+ "rgb(181, 26, 0)", >+ "rgb(173, 62, 0)", >+ "rgb(169, 104, 0)", >+ "rgb(167, 123, 0)", >+ "rgb(196, 188, 0)", >+ "rgb(154, 166, 14)", >+ "rgb(79, 122, 40)", >+ >+ "rgb(0, 140, 180)", >+ "rgb(0, 86, 214)", >+ "rgb(55, 26, 148)", >+ "rgb(123, 33, 159)", >+ "rgb(154, 36, 79)", >+ "rgb(227, 36, 0)", >+ "rgb(217, 80, 0)", >+ "rgb(213, 132, 0)", >+ "rgb(210, 157, 0)", >+ "rgb(245, 236, 0)", >+ "rgb(195, 209, 23)", >+ "rgb(102, 156, 53)", >+ >+ "rgb(0, 163, 215)", >+ "rgb(0, 97, 255)", >+ "rgb(77, 34, 179)", >+ "rgb(153, 41, 189)", >+ "rgb(185, 45, 93)", >+ "rgb(255, 64, 19)", >+ "rgb(255, 106, 0)", >+ "rgb(255, 170, 0)", >+ "rgb(254, 199, 0)", >+ "rgb(255, 252, 65)", >+ "rgb(217, 235, 55)", >+ "rgb(119, 187, 65)", >+ >+ "rgb(0, 199, 252)", >+ "rgb(58, 136, 254)", >+ "rgb(94, 48, 235)", >+ "rgb(190, 56, 243)", >+ "rgb(230, 59, 122)", >+ "rgb(255, 98, 81)", >+ "rgb(255, 134, 71)", >+ "rgb(255, 180, 63)", >+ "rgb(254, 203, 62)", >+ "rgb(255, 247, 107)", >+ "rgb(228, 239, 101)", >+ "rgb(150, 211, 95)", >+ >+ "rgb(83, 213, 253)", >+ "rgb(116, 167, 254)", >+ "rgb(135, 78, 254)", >+ "rgb(211, 87, 254)", >+ "rgb(237, 113, 158)", >+ "rgb(255, 140, 130)", >+ "rgb(255, 165, 125)", >+ "rgb(255, 198, 119)", >+ "rgb(255, 216, 119)", >+ "rgb(255, 249, 149)", >+ "rgb(235, 243, 143)", >+ "rgb(177, 221, 140)", >+ >+ "rgb(148, 227, 254)", >+ "rgb(168, 198, 254)", >+ "rgb(177, 140, 254)", >+ "rgb(227, 146, 254)", >+ "rgb(244, 164, 192)", >+ "rgb(255, 181, 175)", >+ "rgb(255, 196, 171)", >+ "rgb(255, 217, 168)", >+ "rgb(255, 228, 168)", >+ "rgb(255, 251, 185)", >+ "rgb(242, 247, 183)", >+ "rgb(204, 232, 181)", >+ >+ "rgb(202, 240, 254)", >+ "rgb(212, 227, 254)", >+ "rgb(217, 202, 254)", >+ "rgb(241, 201, 254)", >+ "rgb(249, 211, 224)", >+ "rgb(255, 218, 216)", >+ "rgb(255, 226, 214)", >+ "rgb(255, 236, 213)", >+ "rgb(255, 242, 213)", >+ "rgb(254, 252, 221)", >+ "rgb(248, 250, 219)", >+ "rgb(224, 237, 212)", >+ ]; >+ >+ function buildColorSamples() >+ { >+ let container = document.getElementById('container'); >+ for (let color of colors) { >+ var child = document.createElement('div'); >+ child.setAttribute('contenteditable', ''); >+ child.setAttribute('data-color', color); >+ child.textContent = 'aaa'; >+ container.appendChild(child); >+ } >+ } >+ >+ function testOneColor(testDiv) >+ { >+ let targetColor = testDiv.getAttribute('data-color'); >+ window.getSelection().setPosition(testDiv, 0); >+ window.getSelection().modify('extend', 'forward', 'word'); >+ if (window.testRunner) >+ testRunner.execCommand('backColor', false, targetColor); >+ } >+ >+ function runTest() >+ { >+ buildColorSamples(); >+ >+ let container = document.getElementById('container'); >+ for (let child of container.childNodes) { >+ testOneColor(child); >+ } >+ >+ Markup.dump(container); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <script src="../../resources/dump-as-markup.js"></script> >+</head> >+<body> >+<div id="container" style="-apple-color-filter: apple-invert-lightness()"></div> >+</body> >+</html> >diff --git a/LayoutTests/editing/style/set-backColor-with-color-filter-expected.txt b/LayoutTests/editing/style/set-backColor-with-color-filter-expected.txt >index 6b26cf3000811393f589665e15552d309b203e4c..4e6e43f16270e88392738c89aa1a8f2ff9df1bf7 100644 >--- a/LayoutTests/editing/style/set-backColor-with-color-filter-expected.txt >+++ b/LayoutTests/editing/style/set-backColor-with-color-filter-expected.txt >@@ -2,5 +2,5 @@ Setting the background color should invert the color through -apple-color-filter > > "world" should be #ecfffd / rgb(236, 255, 253): > | <span> >-| style="background-color: rgb(236, 255, 253);" >+| style="background-color: rgb(233, 255, 254);" > | "<#selection-anchor>hello world<#selection-focus>" >diff --git a/LayoutTests/editing/style/set-foreColor-with-color-filter-expected.txt b/LayoutTests/editing/style/set-foreColor-with-color-filter-expected.txt >index dc962ad0ec3bf80b1f40a7f7359f5ef42ea83ba9..98d195f5a53410f98fb7a767789268780077c0b4 100644 >--- a/LayoutTests/editing/style/set-foreColor-with-color-filter-expected.txt >+++ b/LayoutTests/editing/style/set-foreColor-with-color-filter-expected.txt >@@ -2,5 +2,5 @@ Setting the foreground color should invert the color through -apple-color-filter > > "world" should be #ecfffd: > | <font> >-| color="#ecfffd" >+| color="#e9fffe" > | "<#selection-anchor>hello world<#selection-focus>" >diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations >index 0ed66052b06b22523a26e57968d6e88243135bbf..7eb1b4d458eae3422178b1cd5d3b465e26a5de1e 100644 >--- a/LayoutTests/platform/win/TestExpectations >+++ b/LayoutTests/platform/win/TestExpectations >@@ -100,6 +100,7 @@ webkit.org/b/173281 http/tests/security/mixedContent/secure-redirect-to-secure-r > webkit.org/b/173281 http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html [ Skip ] > webkit.org/b/173281 editing/style/set-foreColor-with-color-filter.html [ Skip ] > webkit.org/b/173281 editing/style/set-backColor-with-color-filter.html [ Skip ] >+webkit.org/b/173281 editing/style/inverse-color-filter.html [ Skip ] > > # TODO HW filters not yet supported on Windows > webkit.org/b/74716 css3/filters/effect-blur-hw.html [ Skip ]
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
Flags:
zalan
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188131
: 345968