[webkit-reviews] review denied: [Bug 100460] Refactor calendar picker to remove _x/_y from DaysTable : [Attachment 170820] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 25 23:09:26 PDT 2012


Kent Tamura <tkent at chromium.org> has denied Keishi Hattori
<keishi at webkit.org>'s request for review:
Bug 100460: Refactor calendar picker to remove _x/_y from DaysTable
https://bugs.webkit.org/show_bug.cgi?id=100460

Attachment 170820: Patch
https://bugs.webkit.org/attachment.cgi?id=170820&action=review

------- Additional Comments from Kent Tamura <tkent at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=170820&action=review


> Source/WebCore/ChangeLog:26
> +	   (DaysTable):
> +	   (DaysTable.prototype._hasSelection):
> +	   (DaysTable.prototype.navigateToMonthAndKeepSelectionPosition):
> +	   (DaysTable.prototype.selectDate):
> +	   (DaysTable.prototype.selectRangeContainingNode): Selects
date/week/month containing the given day node.
> +	   (DaysTable.prototype.selectRangeAtPosition): Selects date/week/month
at the given position.
> +	   (DaysTable.prototype.firstSelectedNode): Returns first selected day
node.
> +	   (DaysTable.prototype.deselect): Deselects all selections.
> +	   (DaysTable.prototype._handleMouseOver):
> +	   (DaysTable.prototype._handleMouseOut):
> +	   (DaysTable.prototype._handleKey):
> +	   (DaysTable.prototype.updateSelection):

Please write per-function "why" comments especially to existing functions.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:1011
> +DaysTable.prototype.selectRangeContainingNode = function(dayNode) {

should be _selectRangeContainingNode
Also, you might want to add a FIXME comment about a reason why the function is
named "range".

> Source/WebCore/Resources/pagepopups/calendarPicker.js:1022
> +DaysTable.prototype.selectRangeAtPosition = function(x, y) {

should be _selectRangeAtPosition

> Source/WebCore/Resources/pagepopups/calendarPicker.js:1029
> +DaysTable.prototype.firstSelectedNode = function() {

I think this should be _firstNodeInSelectedRange

> Source/WebCore/Resources/pagepopups/calendarPicker.js:1033
> +DaysTable.prototype.deselect = function() {

should be _deselect.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:-1161
> -	   this._days[this._y][this._x].classList.remove(ClassNames.Selected);

Why is this correct?  Who removes ClassNames.Selected?


More information about the webkit-reviews mailing list