RESOLVED FIXED 74425
Reduce code duplication in Element::setAttribute methods
https://bugs.webkit.org/show_bug.cgi?id=74425
Summary Reduce code duplication in Element::setAttribute methods
Adam Klein
Reported 2011-12-13 11:12:22 PST
Reduce code duplication in Element::setAttribute methods
Attachments
Patch (4.55 KB, patch)
2011-12-13 11:15 PST, Adam Klein
no flags
Adam Klein
Comment 1 2011-12-13 11:15:18 PST
Ryosuke Niwa
Comment 2 2011-12-13 11:24:08 PST
Comment on attachment 119046 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119046&action=review > Source/WebCore/dom/Element.cpp:-664 > - else if (old && !value.isNull()) { The other one doesn't check !value.isNull(). Why is that okay?
Adam Klein
Comment 3 2011-12-13 11:32:52 PST
Comment on attachment 119046 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119046&action=review >> Source/WebCore/dom/Element.cpp:-664 >> - else if (old && !value.isNull()) { > > The other one doesn't check !value.isNull(). Why is that okay? The first branch's test is "old && value.isNull()", so "else if (old)" is equivalent to "else if (old && !value.isNull())". The one un-handled case here is "!old && value.isNull()", which is a no-op.
Ryosuke Niwa
Comment 4 2011-12-13 11:35:55 PST
Comment on attachment 119046 [details] Patch Thanks for the clarification. Makes sense to me.
WebKit Review Bot
Comment 5 2011-12-13 12:41:07 PST
Comment on attachment 119046 [details] Patch Clearing flags on attachment: 119046 Committed r102695: <http://trac.webkit.org/changeset/102695>
WebKit Review Bot
Comment 6 2011-12-13 12:41:12 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.