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 142003
HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
https://bugs.webkit.org/show_bug.cgi?id=142003
Summary
HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code fo...
Ryosuke Niwa
Reported
2015-02-24 21:08:30 PST
Don't duplicate code!
Attachments
Cleanup
(3.99 KB, patch)
2015-02-24 21:10 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Updated per Ben's comment
(5.39 KB, patch)
2015-02-25 02:28 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2015-02-24 21:10:42 PST
Created
attachment 247309
[details]
Cleanup
Benjamin Poulain
Comment 2
2015-02-25 00:37:29 PST
Comment on
attachment 247309
[details]
Cleanup View in context:
https://bugs.webkit.org/attachment.cgi?id=247309&action=review
Honestly I would prefer this with new tests. I would be surprised if we have good coverage for the changes in WordWrap, NbspMode and LineBreak. I bet the tests only check for the behavior of UserModify.
> Source/WebCore/html/HTMLElement.cpp:170 > +static CSSValueID contentEditableValueToUserModifyValue(const AtomicString& value)
I think it would be better to base that off "ContentEditableType" with a switch(). Otherwise the tests are duplicated.
Ryosuke Niwa
Comment 3
2015-02-25 00:50:14 PST
Comment on
attachment 247309
[details]
Cleanup Thanks for the review!
Ryosuke Niwa
Comment 4
2015-02-25 00:50:53 PST
Comment on
attachment 247309
[details]
Cleanup Oh oops, missed the comments.
Ryosuke Niwa
Comment 5
2015-02-25 00:53:53 PST
Comment on
attachment 247309
[details]
Cleanup View in context:
https://bugs.webkit.org/attachment.cgi?id=247309&action=review
>> Source/WebCore/html/HTMLElement.cpp:170 >> +static CSSValueID contentEditableValueToUserModifyValue(const AtomicString& value) > > I think it would be better to base that off "ContentEditableType" with a switch(). > > Otherwise the tests are duplicated.
You mean adding a new enum type? Or you're talking about EUserModify, which has three values?
Benjamin Poulain
Comment 6
2015-02-25 00:56:19 PST
(In reply to
comment #5
)
> Comment on
attachment 247309
[details]
> Cleanup > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=247309&action=review
> > >> Source/WebCore/html/HTMLElement.cpp:170 > >> +static CSSValueID contentEditableValueToUserModifyValue(const AtomicString& value) > > > > I think it would be better to base that off "ContentEditableType" with a switch(). > > > > Otherwise the tests are duplicated. > > You mean adding a new enum type? Or you're talking about EUserModify, which > has three values?
I have added "enum class ContentEditableType" in HTMLElement to solve some styling problems. I think that *may* have everything you need.
Ryosuke Niwa
Comment 7
2015-02-25 01:59:19 PST
(In reply to
comment #6
)
> (In reply to
comment #5
) > > Comment on
attachment 247309
[details]
> > Cleanup > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=247309&action=review
> > > > >> Source/WebCore/html/HTMLElement.cpp:170 > > >> +static CSSValueID contentEditableValueToUserModifyValue(const AtomicString& value) > > > > > > I think it would be better to base that off "ContentEditableType" with a switch(). > > > > > > Otherwise the tests are duplicated. > > > > You mean adding a new enum type? Or you're talking about EUserModify, which > > has three values? > > I have added "enum class ContentEditableType" in HTMLElement to solve some > styling problems. > > I think that *may* have everything you need.
Yes, indeed. Uploading a new patch...
Ryosuke Niwa
Comment 8
2015-02-25 02:28:14 PST
Created
attachment 247326
[details]
Updated per Ben's comment
WebKit Commit Bot
Comment 9
2015-02-25 10:42:22 PST
Comment on
attachment 247326
[details]
Updated per Ben's comment Clearing flags on attachment: 247326 Committed
r180631
: <
http://trac.webkit.org/changeset/180631
>
WebKit Commit Bot
Comment 10
2015-02-25 10:42:26 PST
All reviewed patches have been landed. Closing bug.
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