Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Issue 3104038: DeviceOrientationDispatcher: no orientation updates equal to lastOrientation(). (Closed)

Created:
10 years, 4 months ago by hans
Modified:
9 years, 5 months ago
Reviewers:
joth, allanwoj
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

DeviceOrientationDispatcher: no orientation updates equal to lastOrientation(). The DeviceOrientationDispatcher, which implements WebDeviceOrientationClient, must not send orientation updates that are equal to its lastOrientation(). This can happen when the client is stopped and then started again. BUG=44654 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57650

Patch Set 1 #

Total comments: 4

Patch Set 2 : Patch #

Patch Set 3 : Patch #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -13 lines) Patch
M chrome/renderer/device_orientation_dispatcher.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/renderer/device_orientation_dispatcher.cc View 1 1 chunk +32 lines, -12 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
hans
10 years, 4 months ago (2010-08-26 10:40:40 UTC) #1
joth
LGTM, with 2 small suggestions / questions http://codereview.chromium.org/3104038/diff/1/2 File chrome/renderer/device_orientation_dispatcher.cc (right): http://codereview.chromium.org/3104038/diff/1/2#newcode69 chrome/renderer/device_orientation_dispatcher.cc:69: return; could ...
10 years, 4 months ago (2010-08-26 11:05:20 UTC) #2
hans
http://codereview.chromium.org/3104038/diff/1/2 File chrome/renderer/device_orientation_dispatcher.cc (right): http://codereview.chromium.org/3104038/diff/1/2#newcode69 chrome/renderer/device_orientation_dispatcher.cc:69: return; On 2010/08/26 11:05:20, joth wrote: > could we ...
10 years, 4 months ago (2010-08-26 16:01:00 UTC) #3
allanwoj
LGTM On 2010/08/26 16:01:00, hans wrote: > http://codereview.chromium.org/3104038/diff/1/2 > File chrome/renderer/device_orientation_dispatcher.cc (right): > > http://codereview.chromium.org/3104038/diff/1/2#newcode69 ...
10 years, 4 months ago (2010-08-26 16:12:18 UTC) #4
joth
10 years, 3 months ago (2010-08-26 16:24:12 UTC) #5
LGTM too

On 26 August 2010 17:12, <allanwoj@chromium.org> wrote:

> LGTM
>
>
> On 2010/08/26 16:01:00, hans wrote:
>
>> http://codereview.chromium.org/3104038/diff/1/2
>> File chrome/renderer/device_orientation_dispatcher.cc (right):
>>
>
>  http://codereview.chromium.org/3104038/diff/1/2#newcode69
>> chrome/renderer/device_orientation_dispatcher.cc:69: return;
>> On 2010/08/26 11:05:20, joth wrote:
>> > could we do something like
>> > if (last_orientation_.get() && last_orientation->Equals(p.can, p.alpha,
>>
> ....)
>
>> >   return;
>> Hmm, yeah that would be nice, but require a change in the WebKit class...
>> I'm
>> trying to think if there might be a nice way to not have to do that.
>>
>
>  Moving this out to a separate function to make it a bit clearer.
>>
>
>  >
>> > btw it seems surprising you compare the alpha values even if they can't
>> provide
>> > them (& beta & gamma)
>> > maybe comment they are guaranteed to be <whatever> if no provided?
>>
>
>  Fixing this.
>>
>
>  http://codereview.chromium.org/3104038/diff/1/3
>> File chrome/renderer/device_orientation_dispatcher.h (right):
>>
>
>  http://codereview.chromium.org/3104038/diff/1/3#newcode9
>> chrome/renderer/device_orientation_dispatcher.h:9: #include
>> "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientation.h"
>> On 2010/08/26 11:05:20, joth wrote:
>> > namespace WebKit { class WebDeviceOrientation; } instead?
>>
>
>  Done.
>>
>
>
>
> http://codereview.chromium.org/3104038/show
>

Powered by Google App Engine
This is Rietveld 408576698