Summary: | HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, cdumez, commit-queue, esprehn+autocc, gyuyoung.kim, kling, koivisto | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 129034 | ||||||||
Attachments: |
|
Description
Ryosuke Niwa
2015-02-24 21:08:30 PST
Created attachment 247309 [details]
Cleanup
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. Comment on attachment 247309 [details]
Cleanup
Thanks for the review!
Comment on attachment 247309 [details]
Cleanup
Oh oops, missed the comments.
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? (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. (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... Created attachment 247326 [details]
Updated per Ben's comment
Comment on attachment 247326 [details] Updated per Ben's comment Clearing flags on attachment: 247326 Committed r180631: <http://trac.webkit.org/changeset/180631> All reviewed patches have been landed. Closing bug. |