|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by malaykeshav Modified:
3 years, 10 months ago CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1 Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSet caret width based on device scale factor
Moves caretWidth() function from LayoutObject to FrameView
and computes the width according to the device scale factor.
COMPONENT=LayoutObject, FrameView, Caret
BUG=655410
Review-Url: https://codereview.chromium.org/2683233005
Cr-Commit-Position: refs/heads/master@{#450160}
Committed: https://chromium.googlesource.com/chromium/src/+/3353063df1bbda55628a8c1e0a0d1f1289d80b78
Patch Set 1 #
Total comments: 6
Patch Set 2 : Fix compile error #
Total comments: 3
Patch Set 3 : Set caret width based on device scale factor #Patch Set 4 : Merge with ToT #Patch Set 5 : Sync with ToT again #Messages
Total messages: 69 (53 generated)
The CQ bit was checked by malaykeshav@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.
The CQ bit was checked by malaykeshav@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.
malaykeshav@chromium.org changed reviewers: + oshima@chromium.org
PTAL
The CQ bit was checked by malaykeshav@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.
alternatively, you can add FrameView::getCaretWidth(). I'll leave it to owner's review. https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutBox.cpp:4548: LayoutSize(caretWidth(frameView()->getHostWindow()), size().height())); just get noce https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1181: x = maxX - caretWidth(frameView()->getHostWindow()); can you just get once in this function? https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutText.cpp:769: caretWidth(frameView()->getHostWindow()) / 2; ditto
Resolved comments https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutBox.cpp:4548: LayoutSize(caretWidth(frameView()->getHostWindow()), size().height())); On 2017/02/10 at 19:55:16, oshima wrote: > just get noce Done https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1181: x = maxX - caretWidth(frameView()->getHostWindow()); On 2017/02/10 at 19:55:16, oshima wrote: > can you just get once in this function? Done https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): https://codereview.chromium.org/2683233005/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutText.cpp:769: caretWidth(frameView()->getHostWindow()) / 2; On 2017/02/10 at 19:55:16, oshima wrote: > ditto Done
The CQ bit was checked by malaykeshav@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...
lgtm with one q. There's no layout test with caret?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by malaykeshav@chromium.org to run a CQ dry run
On 2017/02/10 at 21:09:34, oshima wrote: > lgtm with one q. > > There's no layout test with caret? Couldnt find one related to width. There were some related to color and height.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
malaykeshav@chromium.org changed reviewers: + wangxianzhu@chromium.org
PTAL
https://codereview.chromium.org/2683233005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2683233005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutObject.cpp:104: static LayoutUnit gCaretWidth(host->windowToViewportScalar(1)); Does host->windowToViewportScalar(1) always return the same value in a process?
https://codereview.chromium.org/2683233005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2683233005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutObject.cpp:104: static LayoutUnit gCaretWidth(host->windowToViewportScalar(1)); On 2017/02/10 22:53:55, Xianzhu wrote: > Does host->windowToViewportScalar(1) always return the same value in a process? No, two tabs may have different scale factor.
Patchset #2 (id:20001) has been deleted
https://codereview.chromium.org/2683233005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2683233005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutObject.cpp:104: static LayoutUnit gCaretWidth(host->windowToViewportScalar(1)); On 2017/02/10 22:57:23, oshima wrote: > On 2017/02/10 22:53:55, Xianzhu wrote: > > Does host->windowToViewportScalar(1) always return the same value in a > process? > > No, two tabs may have different scale factor. Then the above code is incorrect because the static variable is initialized only once. Please remove this function from LayoutObject.h/cpp and add LayoutUnit FrameView::caretWidth() const { return getHostWindow()->windowToViewportScalar(1); }
The CQ bit was checked by malaykeshav@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...
Patchset #3 (id:60001) has been deleted
Description was changed from ========== Set caret width based on device scale factor Updates caretWidth() function to accept HostWindow as an argument to scale caret width based on device scale factor. COMPONENT=LayoutObject, LayoutObject subclasses, Caret BUG=655410 ========== to ========== Set caret width based on device scale factor Moves caretWidth() function from LayoutObject to FrameView and computes the width according to the device scale factor. COMPONENT=LayoutObject, FrameView, Caret BUG=655410 ==========
The CQ bit was checked by malaykeshav@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...
Patchset #3 (id:80001) has been deleted
The CQ bit was checked by malaykeshav@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: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Patchset #3 (id:100001) has been deleted
The CQ bit was checked by malaykeshav@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: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
The CQ bit was checked by malaykeshav@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.
PTAL
The CQ bit was checked by wangxianzhu@chromium.org
lgtm
The patchset sent to the CQ was uploaded after l-g-t-m from oshima@chromium.org Link to the patchset: https://codereview.chromium.org/2683233005/#ps140001 (title: "Merge with ToT")
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
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by malaykeshav@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by malaykeshav@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.
The CQ bit was checked by malaykeshav@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from oshima@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2683233005/#ps160001 (title: "Sync with ToT again")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 160001, "attempt_start_ts": 1487029836764460,
"parent_rev": "549d1501a66ed2ec0283149f65c71d64569183aa", "commit_rev":
"3353063df1bbda55628a8c1e0a0d1f1289d80b78"}
Message was sent while issue was closed.
Description was changed from ========== Set caret width based on device scale factor Moves caretWidth() function from LayoutObject to FrameView and computes the width according to the device scale factor. COMPONENT=LayoutObject, FrameView, Caret BUG=655410 ========== to ========== Set caret width based on device scale factor Moves caretWidth() function from LayoutObject to FrameView and computes the width according to the device scale factor. COMPONENT=LayoutObject, FrameView, Caret BUG=655410 Review-Url: https://codereview.chromium.org/2683233005 Cr-Commit-Position: refs/heads/master@{#450160} Committed: https://chromium.googlesource.com/chromium/src/+/3353063df1bbda55628a8c1e0a0d... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:160001) as https://chromium.googlesource.com/chromium/src/+/3353063df1bbda55628a8c1e0a0d... |
