It detects blocks near the given point and returns the top left corner of the selected rect.
Created attachment 192969 [details] Patch with changelogs
Attachment 192969 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/ChangeLog', u'Source/WebKit/PlatformBlackBerry.cmake', u'Source/WebKit/blackberry/ChangeLog', u'Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp', u'Source/WebKit/blackberry/WebKitSupport/ProximityDetector.h']" exit_code: 1 Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:103: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:104: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:105: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:107: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:108: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:109: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:110: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:111: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 8 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 192975 [details] Patch with changelogs - style fixed
Attachment 192975 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/ChangeLog', u'Source/WebKit/PlatformBlackBerry.cmake', u'Source/WebKit/blackberry/ChangeLog', u'Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp', u'Source/WebKit/blackberry/WebKitSupport/ProximityDetector.h']" exit_code: 1 Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:108: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 192975 [details] Patch with changelogs - style fixed View in context: https://bugs.webkit.org/attachment.cgi?id=192975&action=review Can be cleaned up a bit more. > Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:18 > +using WTF::RefPtr; Should not be needed at all. > Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:19 > +using WTF::String; You may get away with discarding this one but it depends if it clashes with B::P::String.
Created attachment 192983 [details] Patch with changelogs
Comment on attachment 192983 [details] Patch with changelogs View in context: https://bugs.webkit.org/attachment.cgi?id=192983&action=review > Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp:104 > + bool equalPriorityAndCloser = priority == bestPriority && sqrt((double)contentPos.distanceSquaredToPoint(bestPoint)) > sqrt((double)contentPos.distanceSquaredToPoint(curRect.location())) I think parentheses would make this more readable, plus you can discard both sqrt in this case.
Created attachment 192991 [details] Patch with changelogs
Comment on attachment 192991 [details] Patch with changelogs LGTM.
Comment on attachment 192991 [details] Patch with changelogs Clearing flags on attachment: 192991 Committed r145757: <http://trac.webkit.org/changeset/145757>
All reviewed patches have been landed. Closing bug.
Created attachment 193107 [details] Patch This will not compile, variable names are wrong. Here's the fix.
Comment on attachment 193107 [details] Patch Again, well spotted.
I think the patch was not commited, either we reopen this or I file a new bug.
Reopening to try to commit a fixup patch.
Comment on attachment 193107 [details] Patch Retrying.
Comment on attachment 193107 [details] Patch Clearing flags on attachment: 193107 Committed r146090: <http://trac.webkit.org/changeset/146090>
Thanks for catching that, I never compiled it because we have an older non-webkit compliant version internally.