Bug 110317

Summary: Add an ASSERT to didChangeDeviceProximity
Product: WebKit Reporter: Kihong Kwon <kihong.kwon>
Component: WebCore Misc.Assignee: Kihong Kwon <kihong.kwon>
Status: RESOLVED FIXED    
Severity: Normal CC: morrita, vimff0, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 92837    
Attachments:
Description Flags
Patch
none
Patch none

Description Kihong Kwon 2013-02-20 02:31:46 PST
Proximity event is occurred normally even if value is less than min or more then max.
Therefore we need to add checking the range of proximity value.
Comment 1 Kihong Kwon 2013-02-20 02:43:18 PST
Created attachment 189271 [details]
Patch
Comment 2 Hajime Morrita 2013-02-21 21:05:44 PST
Comment on attachment 189271 [details]
Patch

I wonder whether this should be done in WebCore. Why not handle this in client side and just assert the range here?
Comment 3 Kihong Kwon 2013-02-21 21:25:16 PST
(In reply to comment #2)
> (From update of attachment 189271 [details])
> I wonder whether this should be done in WebCore. Why not handle this in client side and just assert the range here?

As you said, client can check this.
IMHO, we need to add a minimal defense in the WebCore, but I'm not strongly sure about this. Could I get your opinion about this?
Comment 4 Hajime Morrita 2013-02-21 22:07:06 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 189271 [details] [details])
> > I wonder whether this should be done in WebCore. Why not handle this in client side and just assert the range here?
> 
> As you said, client can check this.
> IMHO, we need to add a minimal defense in the WebCore, but I'm not strongly sure about this. Could I get your opinion about this?

Just add an assertion here and a guard on caller side?
Comment 5 Kihong Kwon 2013-02-22 21:21:03 PST
Add ASSERT to didChangeDeviceProximity function to check range of value.
In addition, fix some wrong layout test cases.
Comment 6 Kihong Kwon 2013-02-22 21:31:02 PST
Created attachment 189903 [details]
Patch
Comment 7 WebKit Review Bot 2013-02-24 18:04:02 PST
Comment on attachment 189903 [details]
Patch

Clearing flags on attachment: 189903

Committed r143882: <http://trac.webkit.org/changeset/143882>
Comment 8 WebKit Review Bot 2013-02-24 18:04:08 PST
All reviewed patches have been landed.  Closing bug.