6 years, 4 months ago
(2014-08-05 23:09:29 UTC)
#4
lgtm
https://codereview.chromium.org/443553002/diff/1/ui/webui/resources/js/cr/ui/...
File ui/webui/resources/js/cr/ui/bubble.js (right):
https://codereview.chromium.org/443553002/diff/1/ui/webui/resources/js/cr/ui/...
ui/webui/resources/js/cr/ui/bubble.js:53: };
On 2014/08/05 23:00:54, Vitaly Pavlenko wrote:
> On 2014/08/05 18:49:27, Dan Beam wrote:
> > ^ is this still needed?
>
> Yes. If I move these declarations inside scope function body, then I'll get
the
> Closure Compiler problem that one can't declare a @enum non-globally.
>
> Reproducer:
>
> function f() {
> /** @enum */ window.MyEnum = {a: 1, b: 2};
> }
>
> /** @type {window.MyEnum} */
> var Var = window.MyEnum.a;
>
> // JSC_TYPE_PARSE_ERROR: Bad type annotation. Unknown type window.MyEnum at
line
> 5 character 11
> // /** @type {window.MyEnum} */
> // ^
>
> After Chrome pass the code inside scope function body still remains inside
scope
> function body.
ok, is there a github issue you can reference (assuming we want local enums to
be exportable)?
Vitaly Pavlenko
https://codereview.chromium.org/443553002/diff/1/ui/webui/resources/js/cr/ui/bubble.js File ui/webui/resources/js/cr/ui/bubble.js (right): https://codereview.chromium.org/443553002/diff/1/ui/webui/resources/js/cr/ui/bubble.js#newcode53 ui/webui/resources/js/cr/ui/bubble.js:53: }; On 2014/08/05 23:09:29, Dan Beam wrote: > On ...
6 years, 4 months ago
(2014-08-06 00:16:42 UTC)
#5
https://codereview.chromium.org/443553002/diff/1/ui/webui/resources/js/cr/ui/...
File ui/webui/resources/js/cr/ui/bubble.js (right):
https://codereview.chromium.org/443553002/diff/1/ui/webui/resources/js/cr/ui/...
ui/webui/resources/js/cr/ui/bubble.js:53: };
On 2014/08/05 23:09:29, Dan Beam wrote:
> On 2014/08/05 23:00:54, Vitaly Pavlenko wrote:
> > On 2014/08/05 18:49:27, Dan Beam wrote:
> > > ^ is this still needed?
> >
> > Yes. If I move these declarations inside scope function body, then I'll get
> the
> > Closure Compiler problem that one can't declare a @enum non-globally.
> >
> > Reproducer:
> >
> > function f() {
> > /** @enum */ window.MyEnum = {a: 1, b: 2};
> > }
> >
> > /** @type {window.MyEnum} */
> > var Var = window.MyEnum.a;
> >
> > // JSC_TYPE_PARSE_ERROR: Bad type annotation. Unknown type window.MyEnum at
> line
> > 5 character 11
> > // /** @type {window.MyEnum} */
> > // ^
> >
> > After Chrome pass the code inside scope function body still remains inside
> scope
> > function body.
>
> ok, is there a github issue you can reference (assuming we want local enums to
> be exportable)?
Done.
Vitaly Pavlenko
I rebased these fixes onto master. In the meantime HelpPage was changed, so I have ...
6 years, 4 months ago
(2014-08-12 20:25:25 UTC)
#6
I rebased these fixes onto master. In the meantime HelpPage was changed, so I
have some more fixes. Please, review this CL once again.
I've added assert.js to this CL, the same changes are now in
https://codereview.chromium.org/454223004/ . I'd like to commit assert.js with
the fastest CL which I succeed to commit.
Dan Beam
https://chromiumcodereview.appspot.com/443553002/diff/60001/chrome/browser/resources/help/help_page.js File chrome/browser/resources/help/help_page.js (right): https://chromiumcodereview.appspot.com/443553002/diff/60001/chrome/browser/resources/help/help_page.js#newcode165 chrome/browser/resources/help/help_page.js:165: * @param {function()} method The click handler. nit: Function ...
6 years, 4 months ago
(2014-08-13 22:20:08 UTC)
#7
lgtm https://chromiumcodereview.appspot.com/443553002/diff/60001/ui/webui/resources/js/cr/ui/bubble.js File ui/webui/resources/js/cr/ui/bubble.js (right): https://chromiumcodereview.appspot.com/443553002/diff/60001/ui/webui/resources/js/cr/ui/bubble.js#newcode480 ui/webui/resources/js/cr/ui/bubble.js:480: if (event.button == 0 && this.anchorNode_.contains(event.target)) On 2014/08/14 ...
6 years, 4 months ago
(2014-08-14 00:47:02 UTC)
#9
lgtm
https://chromiumcodereview.appspot.com/443553002/diff/60001/ui/webui/resource...
File ui/webui/resources/js/cr/ui/bubble.js (right):
https://chromiumcodereview.appspot.com/443553002/diff/60001/ui/webui/resource...
ui/webui/resources/js/cr/ui/bubble.js:480: if (event.button == 0 &&
this.anchorNode_.contains(event.target))
On 2014/08/14 00:01:02, Vitaly Pavlenko wrote:
> On 2014/08/13 22:20:08, Dan Beam wrote:
> > why don't you have to use assertInstanceOf here?
>
> At that point compiler doesn't know what type has this.anchorNode_ and can't
> guess which arguments should this.anchorNode_.contains() receive.
please add anchorNode_ to the prototype
Dan Beam
https://chromiumcodereview.appspot.com/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js File ui/webui/resources/js/cr/ui/bubble.js (right): https://chromiumcodereview.appspot.com/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js#newcode486 ui/webui/resources/js/cr/ui/bubble.js:486: if (this.contains(assertInstanceof(event.target, Element))) not lgtm, not done
6 years, 4 months ago
(2014-08-14 00:47:51 UTC)
#10
https://chromiumcodereview.appspot.com/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js File ui/webui/resources/js/cr/ui/bubble.js (right): https://chromiumcodereview.appspot.com/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js#newcode483 ui/webui/resources/js/cr/ui/bubble.js:483: // Close the bubble when the underlying document is ...
6 years, 4 months ago
(2014-08-19 03:09:21 UTC)
#12
https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js File ui/webui/resources/js/cr/ui/bubble.js (right): https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js#newcode486 ui/webui/resources/js/cr/ui/bubble.js:486: if (this.contains(assertInstanceof(event.target, Element))) On 2014/08/27 21:36:03, Vitaly Pavlenko wrote: ...
6 years, 3 months ago
(2014-08-27 21:42:01 UTC)
#14
https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr...
File ui/webui/resources/js/cr/ui/bubble.js (right):
https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr...
ui/webui/resources/js/cr/ui/bubble.js:486: if
(this.contains(assertInstanceof(event.target, Element)))
On 2014/08/27 21:36:03, Vitaly Pavlenko wrote:
> On 2014/08/18 21:21:13, Vitaly Pavlenko wrote:
> > On 2014/08/14 00:47:50, Dan Beam wrote:
> > > not lgtm, not done
> >
> > I asked the compiler team for helping me with externs:
> > https://github.com/google/closure-compiler/issues/470#issuecomment-52219387
> >
> > As tbreisacher@ told me, there's no simple way to fix that problem with open
> > source tools. One possible way involves opening up the jar and modifying it,
> but
> > it's not a good idea.
>
> Can't reproduce the case when this.contains() doesn't work. Works now for me.
you mean even with assertInstanceOf(event.target, Node)?
Vitaly Pavlenko
On 2014/08/27 21:42:01, Dan Beam wrote: > https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js > File ui/webui/resources/js/cr/ui/bubble.js (right): > > https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr/ui/bubble.js#newcode486 ...
6 years, 3 months ago
(2014-08-27 21:59:51 UTC)
#15
On 2014/08/27 21:42:01, Dan Beam wrote:
>
https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr...
> File ui/webui/resources/js/cr/ui/bubble.js (right):
>
>
https://codereview.chromium.org/443553002/diff/80001/ui/webui/resources/js/cr...
> ui/webui/resources/js/cr/ui/bubble.js:486: if
> (this.contains(assertInstanceof(event.target, Element)))
> On 2014/08/27 21:36:03, Vitaly Pavlenko wrote:
> > On 2014/08/18 21:21:13, Vitaly Pavlenko wrote:
> > > On 2014/08/14 00:47:50, Dan Beam wrote:
> > > > not lgtm, not done
> > >
> > > I asked the compiler team for helping me with externs:
> > >
https://github.com/google/closure-compiler/issues/470#issuecomment-52219387
> > >
> > > As tbreisacher@ told me, there's no simple way to fix that problem with
open
> > > source tools. One possible way involves opening up the jar and modifying
it,
> > but
> > > it's not a good idea.
> >
> > Can't reproduce the case when this.contains() doesn't work. Works now for
me.
>
> you mean even with assertInstanceOf(event.target, Node)?
Sorry, I forgot to remove @suppress {checkTypes}. Reproduced now.
Dan Beam
very very close https://chromiumcodereview.appspot.com/443553002/diff/160001/ui/webui/resources/js/cr/ui/bubble.js File ui/webui/resources/js/cr/ui/bubble.js (right): https://chromiumcodereview.appspot.com/443553002/diff/160001/ui/webui/resources/js/cr/ui/bubble.js#newcode488 ui/webui/resources/js/cr/ui/bubble.js:488: case 'mousedown': assertInstanceOf(event.target, Node); https://chromiumcodereview.appspot.com/443553002/diff/160001/ui/webui/resources/js/cr/ui/bubble.js#newcode489 ui/webui/resources/js/cr/ui/bubble.js:489: ...
6 years, 3 months ago
(2014-08-27 23:38:38 UTC)
#16
Issue 443553002: Typecheck chrome://help using CompilerPass.java, everything except dependency to options
(Closed)
Created 6 years, 4 months ago by Vitaly Pavlenko
Modified 6 years, 3 months ago
Reviewers: Dan Beam
Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Comments: 50