|
|
Chromium Code Reviews|
Created:
4 years, 3 months ago by Tima Vaisburd Modified:
4 years, 3 months ago CC:
chromium-reviews, jam, darin-cc_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionKeep ContentViewCore selection rectangle in DIP
ContentViewCore holds selection rectangle in physical pixels,
thus making it indirectly dependent on DIP scale.
This CL changes it to DIP and does the necessary conversions
in Java layer. As a consequence the position of the paste popup
dialog is also passed from native layer in DIP.
BUG=620929
Committed: https://crrev.com/1bce7c3445dec41e42574f7c58af01793d706f37
Cr-Commit-Position: refs/heads/master@{#419922}
Patch Set 1 #
Total comments: 7
Patch Set 2 : Dropped Dip suffix to names and added Pix suffix where dimension is pixels #
Dependent Patchsets: Messages
Total messages: 20 (11 generated)
The CQ bit was checked by timav@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependant on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. Aa consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ========== to ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependant on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ==========
timav@chromium.org changed reviewers: + boliu@chromium.org, tedchoc@chromium.org
Another small step in ContentViewCore conversion. PTAL. I wonder whether this CL should be bigger though.
https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2127: mSelectionRect.set(left, top, right, bottom); no scaling for the rect values?
https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2127: mSelectionRect.set(left, top, right, bottom); On 2016/09/20 21:07:54, boliu wrote: > no scaling for the rect values? Scaling on return, in onGetContentRect()
lgtm https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:378: private final Rect mSelectionRect = new Rect(); oops, missed that, add a comment here this is in dip
Description was changed from ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependant on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ========== to ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependent on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ==========
lgtm https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:378: private final Rect mSelectionRect = new Rect(); or call it mSelectionRectDp? https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2119: private void onSelectionEvent(int eventType, int xAnchorDip, int yAnchorDip, int left, int top, it's odd to have Dip for some values and not others. we should be consistent either way
https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:378: private final Rect mSelectionRect = new Rect(); On 2016/09/20 21:53:57, Ted C wrote: > or call it mSelectionRectDp? I went for |mSelectionRect| with no suffix for DIP (comment added) and suffix "Pix" for physical pixels because "Pix" already existed. https://codereview.chromium.org/2352143002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2119: private void onSelectionEvent(int eventType, int xAnchorDip, int yAnchorDip, int left, int top, On 2016/09/20 21:53:57, Ted C wrote: > it's odd to have Dip for some values and not others. we should be consistent > either way Dropped "Dip". Renamed xAnchor -> xAnchorPix below etc.
The CQ bit was checked by timav@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tedchoc@chromium.org, boliu@chromium.org Link to the patchset: https://codereview.chromium.org/2352143002/#ps20001 (title: "Dropped Dip suffix to names and added Pix suffix where dimension is pixels")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependent on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ========== to ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependent on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependent on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 ========== to ========== Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependent on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG=620929 Committed: https://crrev.com/1bce7c3445dec41e42574f7c58af01793d706f37 Cr-Commit-Position: refs/heads/master@{#419922} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/1bce7c3445dec41e42574f7c58af01793d706f37 Cr-Commit-Position: refs/heads/master@{#419922} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
