WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 163348
Add experimental support for the "formatForeColor" inputType
https://bugs.webkit.org/show_bug.cgi?id=163348
Summary
Add experimental support for the "formatForeColor" inputType
Wenson Hsieh
Reported
2016-10-12 11:45:46 PDT
Add experimental support for the "formatForeColor" inputType
Attachments
Patch
(6.46 KB, patch)
2016-10-12 12:08 PDT
,
Wenson Hsieh
rniwa
: review+
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing
(8.16 KB, patch)
2016-10-12 12:46 PDT
,
Wenson Hsieh
wenson_hsieh
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-yosemite
(880.36 KB, application/zip)
2016-10-12 13:06 PDT
,
Build Bot
no flags
Details
Patch for landing
(8.55 KB, patch)
2016-10-12 14:17 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews114 for mac-yosemite
(1.96 MB, application/zip)
2016-10-12 14:58 PDT
,
Build Bot
no flags
Details
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2016-10-12 12:08:05 PDT
Created
attachment 291379
[details]
Patch
Wenson Hsieh
Comment 2
2016-10-12 12:11:39 PDT
<
rdar://problem/28739334
>
Ryosuke Niwa
Comment 3
2016-10-12 12:22:55 PDT
Comment on
attachment 291379
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=291379&action=review
> Source/WebCore/editing/Editor.cpp:145 > + auto colorValue = properties->getPropertyCSSValue(CSSPropertyColor); > + ASSERT(colorValue); > + return colorValue->cssText();
Why don't we just call getPropertyValue which returns String?
> LayoutTests/fast/events/input-events-forecolor-data.html:19 > + if (event.inputType === "formatForeColor") > + shouldBe("event.data", "'rgb(255, 255, 255)'");
I'm not certain the functional syntax is what we want to be using here but I guess that'd be consistent with CSSOM:
https://drafts.csswg.org/cssom/#serialize-a-css-component-value
Ryosuke Niwa
Comment 4
2016-10-12 12:24:19 PDT
Comment on
attachment 291379
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=291379&action=review
Sorry, a few more comments.
> LayoutTests/fast/events/input-events-forecolor-data-expected.txt:2 > +PASS event.data is 'rgb(255, 255, 255)' > +PASS event.data is 'rgb(255, 255, 255)'
It's not clear why these results are correct. At minimum we should print out the event name.
> LayoutTests/fast/events/input-events-forecolor-data.html:12 > + document.getElementById("editable").focus(); > + testRunner.execCommand("ForeColor", "rgb(255, 255, 255)");
You don't need to wrap this inside the if. execCommand('foreColor') always works and so does focus(). You should probably test more colors though.
Wenson Hsieh
Comment 5
2016-10-12 12:32:52 PDT
Comment on
attachment 291379
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=291379&action=review
>> Source/WebCore/editing/Editor.cpp:145 >> + return colorValue->cssText(); > > Why don't we just call getPropertyValue which returns String?
Good point! Changed to return getPropertyValue().
>> LayoutTests/fast/events/input-events-forecolor-data-expected.txt:2 >> +PASS event.data is 'rgb(255, 255, 255)' > > It's not clear why these results are correct. At minimum we should print out the event name.
Sounds good. I'll make it more clear by printing out the event type/inputType.
>> LayoutTests/fast/events/input-events-forecolor-data.html:12 >> + testRunner.execCommand("ForeColor", "rgb(255, 255, 255)"); > > You don't need to wrap this inside the if. execCommand('foreColor') always works and so does focus(). > > You should probably test more colors though.
Ok, done! Also added more colors in this test.
>> LayoutTests/fast/events/input-events-forecolor-data.html:19 >> + shouldBe("event.data", "'rgb(255, 255, 255)'"); > > I'm not certain the functional syntax is what we want to be using here > but I guess that'd be consistent with CSSOM:
https://drafts.csswg.org/cssom/#serialize-a-css-component-value
Good point -- let's keep this issue in mind.
Wenson Hsieh
Comment 6
2016-10-12 12:46:30 PDT
Created
attachment 291384
[details]
Patch for landing
Build Bot
Comment 7
2016-10-12 13:06:14 PDT
Comment on
attachment 291379
[details]
Patch
Attachment 291379
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/2272193
New failing tests: fast/events/input-events-forecolor-data.html
Build Bot
Comment 8
2016-10-12 13:06:17 PDT
Created
attachment 291386
[details]
Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Wenson Hsieh
Comment 9
2016-10-12 14:17:20 PDT
Created
attachment 291394
[details]
Patch for landing
WebKit Commit Bot
Comment 10
2016-10-12 14:51:47 PDT
Comment on
attachment 291394
[details]
Patch for landing Clearing flags on attachment: 291394 Committed
r207244
: <
http://trac.webkit.org/changeset/207244
>
Build Bot
Comment 11
2016-10-12 14:57:58 PDT
Comment on
attachment 291379
[details]
Patch
Attachment 291379
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/2272726
New failing tests: fast/events/input-events-forecolor-data.html
Build Bot
Comment 12
2016-10-12 14:58:01 PDT
Created
attachment 291401
[details]
Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug