[BlackBerry] Add Proximity Detector.
https://bugs.webkit.org/show_bug.cgi?id=112278

Patch by Genevieve Mak <gmak@rim.com> on 2013-03-13
Reviewed by Rob Buis.

Internally Reviewed by Mike Lattanzio.
PR #243385

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

* WebKitSupport/ProximityDetector.cpp: Added.
(WebKit):
(BlackBerry::WebKit::getPriorityLevel):
(BlackBerry::WebKit::ProximityDetector::ProximityDetector):
(BlackBerry::WebKit::ProximityDetector::~ProximityDetector):
(BlackBerry::WebKit::ProximityDetector::findBestPoint):
* WebKitSupport/ProximityDetector.h: Added.
(WebCore):
(WebKit):
(ProximityDetector):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Handle min-width / max-width on the grid element
https://bugs.webkit.org/show_bug.cgi?id=112269

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/css-grid-layout/grid-element-min-max-width.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
Added some sanity checks that the starting indexes are in the grid.

(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
Updated the code to use m_grid to iterate: this is the correct way to
go as it will handle implicit rows / columns properly. Added a comment
about the current way being inefficient and incorrect with spanning grid
items.

(WebCore::RenderGrid::computePreferredLogicalWidths):
Updated the comments.

(WebCore::RenderGrid::gridTrackSize):
* rendering/RenderGrid.h:
Constified gridTrackSize.

LayoutTests:

* fast/css-grid-layout/grid-element-min-max-width-expected.txt: Added.
* fast/css-grid-layout/grid-element-min-max-width.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify Checked<> multiplication
https://bugs.webkit.org/show_bug.cgi?id=112286

Reviewed by James Robinson.

Source/WTF:

Trying to correctly identify multiplication by zero complicated the
unsigned * unsigned multiply, and still didn't handle all cases correctly.
Now we just do the normal division based approach to overflow detection
leading to much simpler reasoning.

Would be nice if we could have a jo style intrinsic one day.

* wtf/CheckedArithmetic.h:

Tools:

Add tests for multiplication by zero and max to ensure we don't
mess them up should we ever make changes to Checked<> in future.

* TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
(TestWebKitAPI):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145759 268f45cc-cd09-0410-ab3c-d52691b4dbfc