[Webkit-unassigned] [Bug 128422] Web Inspector: update check-webkit-style to flag single quotes in WebInspectorUI projects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 13 03:15:01 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=128422


Diego Pino <dpino at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dpino at igalia.com




--- Comment #3 from Diego Pino <dpino at igalia.com>  2014-02-13 03:12:16 PST ---
The checker does the following:

   * Multi line and single line comments are removed. Single quotes should be valid in comments.
   * Check for single quotes. Single quotes that happen within strings ("") or regular expressions should be valid.
   * Otherwise error.

The current js.py checker is only used to validate the JavaScript files of the Web Inspector, so added validation for single quotes to that file.

In addition to this, there are currently some files from the Inspector that include single quotes. Here is the list:

CookieStorageContentView.js(254):     if (cookieDomain.charAt(0) !== '.')
DOMTreeElement.js(539):             tag.textContent = '';
DOMTreeElement.js(540):             tag.appendChild(document.createTextNode('<'+nodeName));
DOMTreeElement.js(542):             tag.appendChild(document.createTextNode('>'));
DOMTreeElement.js(752):             tagNameElement.removeEventListener('keyup', keyupListener, false);
DOMTreeElement.js(752):             tagNameElement.removeEventListener('keyup', keyupListener, false);
DOMTreeElement.js(762):         tagNameElement.addEventListener('keyup', keyupListener, false);
DataGrid.js(678):             emptyData[identifier] = '';
ColorPicker.js(49):     this._opacityPattern = 'url("data:image/svg+xml;base64,' + btoa('<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="rgb(204, 204, 204)"><rect width="3" height="3" /><rect x="3" y="3" width="3" height="3"/></svg>') + '")';
DOMTreeOutline.js(380):         event.dataTransfer.dropEffect = 'move';
Main.js(491):         console.assert(profileTitle[0] === '/');

I have concerns for ColorPicker.js because single quotes are used to wrap double quotes. It looks a reasonable use of single quotes. Either we escape the double quotes or add logic to the checker to handle this case.

The rest of files I think they should be modified. And don't know if it's better to do this in this patch or to file a new bug to remove single quotes from these files.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list