https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js File chrome/browser/resources/print_preview/component.js (right): https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js#newcode157 chrome/browser/resources/print_preview/component.js:157: * @return {!HTMLElement} Element selected by the given query. ...
6 years, 3 months ago
(2014-09-19 18:54:43 UTC)
#12
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js File chrome/browser/resources/print_preview/component.js (right): https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js#newcode157 chrome/browser/resources/print_preview/component.js:157: * @return {!HTMLElement} Element selected by the given query. ...
6 years, 3 months ago
(2014-09-19 20:33:09 UTC)
#13
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
File chrome/browser/resources/print_preview/component.js (right):
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
chrome/browser/resources/print_preview/component.js:157: * @return
{!HTMLElement} Element selected by the given query.
On 2014/09/19 18:54:42, Aleksey Shlyapnikov wrote:
> Why? This is a generic function and it's not guaranteed that the element we
are
> looking for is there.
I tried to add this assert, compile the browser and play around with
print_preview. I haven't found any failures on this assert.
Do you think that instead I should add assert() around all calls to
getChildElement()?
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
File chrome/browser/resources/print_preview/data/app_state.js (right):
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
chrome/browser/resources/print_preview/data/app_state.js:220: };
On 2014/09/19 18:54:42, Aleksey Shlyapnikov wrote:
> What's the reason for this and other similar changes?
Right now Closure Compiler doesn't understand @typedefs and @enums if they are
placed inside function scope:
https://github.com/google/closure-compiler/issues/544
So I need to move them to a global scope to make the typechecking work.
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
File chrome/browser/resources/print_preview/data/destination_store.js (right):
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
chrome/browser/resources/print_preview/data/destination_store.js:274: return
!!this.cloudPrintInterface_ &&
On 2014/09/19 18:54:42, Aleksey Shlyapnikov wrote:
> On 2014/09/19 00:57:59, Vitaly Pavlenko wrote:
> > On 2014/09/19 00:54:20, Lei Zhang wrote:
> > > Is there a preference between !!foo vs. foo != null ?
> >
> > I just insert the general !! cast in all cases. I don't know if it's a good
> idea
> > to do so here. Aleksey, what do you think?
>
> This is a pointer check, why would we convert it to boolean? Same semantics,
> more code. Let's leave it as it was.
Otherwise Closure Compiler whines that we possibly return non-boolean from
function that is supposed to return boolean type.
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
File chrome/browser/resources/print_preview/print_preview_utils.js (right):
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
chrome/browser/resources/print_preview/print_preview_utils.js:96: * @param
{?number} totalPageCount The total number of pages.
On 2014/09/19 18:54:42, Aleksey Shlyapnikov wrote:
> Maybe {number=} makes more sense here?
You are right. Done.
Aleksey Shlyapnikov
lgtm https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js File chrome/browser/resources/print_preview/component.js (right): https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js#newcode157 chrome/browser/resources/print_preview/component.js:157: * @return {!HTMLElement} Element selected by the given ...
6 years, 3 months ago
(2014-09-19 20:48:59 UTC)
#14
lgtm
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
File chrome/browser/resources/print_preview/component.js (right):
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
chrome/browser/resources/print_preview/component.js:157: * @return
{!HTMLElement} Element selected by the given query.
On 2014/09/19 20:33:09, Vitaly Pavlenko wrote:
> On 2014/09/19 18:54:42, Aleksey Shlyapnikov wrote:
> > Why? This is a generic function and it's not guaranteed that the element we
> are
> > looking for is there.
>
> I tried to add this assert, compile the browser and play around with
> print_preview. I haven't found any failures on this assert.
>
> Do you think that instead I should add assert() around all calls to
> getChildElement()?
So with no assert and @return {HTMLElement} declaration Closure compiler
complains on every getChildElement's call site?
Can you leave a TODO here (on my name) to check all call sites and rename this
function to something like getRequiredChildElement?
Vitaly Pavlenko
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js File chrome/browser/resources/print_preview/component.js (right): https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resources/print_preview/component.js#newcode157 chrome/browser/resources/print_preview/component.js:157: * @return {!HTMLElement} Element selected by the given query. ...
6 years, 3 months ago
(2014-09-19 21:12:54 UTC)
#15
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
File chrome/browser/resources/print_preview/component.js (right):
https://chromiumcodereview.appspot.com/575333002/diff/1/chrome/browser/resour...
chrome/browser/resources/print_preview/component.js:157: * @return
{!HTMLElement} Element selected by the given query.
On 2014/09/19 20:48:59, Aleksey Shlyapnikov wrote:
> On 2014/09/19 20:33:09, Vitaly Pavlenko wrote:
> > On 2014/09/19 18:54:42, Aleksey Shlyapnikov wrote:
> > > Why? This is a generic function and it's not guaranteed that the element
we
> > are
> > > looking for is there.
> >
> > I tried to add this assert, compile the browser and play around with
> > print_preview. I haven't found any failures on this assert.
> >
> > Do you think that instead I should add assert() around all calls to
> > getChildElement()?
>
> So with no assert and @return {HTMLElement} declaration Closure compiler
> complains on every getChildElement's call site?
>
> Can you leave a TODO here (on my name) to check all call sites and rename this
> function to something like getRequiredChildElement?
Yes, without this assert you get 40 errors like this:
##
/usr/local/google/home/vitalyp/src/chrome/browser/resources/print_preview/search/destination_search.js:441:
ERROR - actual parameter 1 of setIsVisible does not match formal parameter
## found : (HTMLElement|null)
## required: HTMLElement
## setIsVisible(this.getChildElement('.cloud-list'), loggedIn);
## ^
TODO is inserted.
Vitaly Pavlenko
The CQ bit was checked by vitalyp@chromium.org
6 years, 3 months ago
(2014-09-22 22:47:46 UTC)
#16
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/69918) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/59230) android_aosp ...
6 years, 3 months ago
(2014-09-22 22:55:45 UTC)
#19
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/12727)
6 years, 3 months ago
(2014-09-23 00:15:06 UTC)
#23
https://codereview.chromium.org/575333002/diff/80001/ui/webui/resources/js/cr/event_target.js File ui/webui/resources/js/cr/event_target.js (right): https://codereview.chromium.org/575333002/diff/80001/ui/webui/resources/js/cr/event_target.js#newcode16 ui/webui/resources/js/cr/event_target.js:16: * @implements {EventTarget} this is a confusing statement. i ...
6 years, 3 months ago
(2014-09-23 00:46:34 UTC)
#26
https://codereview.chromium.org/575333002/diff/100001/ui/webui/resources/js/event_tracker.js File ui/webui/resources/js/event_tracker.js (right): https://codereview.chromium.org/575333002/diff/100001/ui/webui/resources/js/event_tracker.js#newcode51 ui/webui/resources/js/event_tracker.js:51: node: target, does this property make much sense to ...
6 years, 3 months ago
(2014-09-23 01:42:28 UTC)
#28
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/17157)
6 years, 3 months ago
(2014-09-23 23:49:41 UTC)
#35
Issue 575333002: Compile print_preview, part 2: reduce down to 260 errors
(Closed)
Created 6 years, 3 months ago by Vitaly Pavlenko
Modified 6 years, 2 months ago
Reviewers: Lei Zhang, Aleksey Shlyapnikov, Dan Beam
Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview
Comments: 20