|
|
Created:
4 years, 10 months ago by hyunjunekim2 Modified:
4 years, 10 months ago CC:
blink-reviews, chromium-reviews, Rick Byers Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix draggable {svg, inline} elements are painted at incorrect position
When drag {SVGShape, Inline} elements, It are painted at incorrect position.
Don't contain position of them on localToAbsolute function.
Because use bounding{x, y} of them that return on
absoluteBoundingBoxRectIncludingDescendants as offset.
TEST=EventHandlerTest.cpp
BUG=579153, 579158
Committed: https://crrev.com/89317940af3b85bdff2f0e99c35082b5d3d517cf
Cr-Commit-Position: refs/heads/master@{#377852}
Patch Set 1 #Patch Set 2 : #
Total comments: 19
Patch Set 3 : #
Total comments: 2
Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : Add font-family on a test #Patch Set 8 : #Patch Set 9 : #Patch Set 10 : #Patch Set 11 : #Patch Set 12 : Remove comment. #
Messages
Total messages: 47 (22 generated)
Description was changed from ========== WIP BUG=579153 ========== to ========== WIP BUG=579153 ==========
Description was changed from ========== WIP BUG=579153 ========== to ========== Fix draggable svg elements are painted at incorrect position BUG=579153 ==========
Description was changed from ========== Fix draggable svg elements are painted at incorrect position BUG=579153 ========== to ========== Fix draggable svg elements are painted at incorrect position BUG=579153, 579158 ==========
Description was changed from ========== Fix draggable svg elements are painted at incorrect position BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position BUG=579153, 579158 ==========
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. BUG=579153, 579158 ==========
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Because don't contain position of them on localToAbsolute function. BUG=579153, 579158 ==========
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Because don't contain position of them on localToAbsolute function. BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use BoundingBox{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants. BUG=579153, 579158 ==========
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use BoundingBox{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants. BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants. BUG=579153, 579158 ==========
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants. BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. BUG=579153, 579158 ==========
pdr, fs, Could you check PS2? Thank you :)
hyunjune.kim@samsung.com changed reviewers: + fs@opera.com, pdr@chromium.org
+ pdr, fs Could you check PS2? Thank you.
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. TEST=EventHandlerTest.cpp BUG=579153, 579158 ==========
I'll defer this to pdr, because I know he was poking about this area recently (and filed both of the bugs! =)) You might want to loop in some input dev. too to make sure they don't mind having these tests. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:693: if (dragState().m_dragDataTransfer) { if (...) return ...; return IntPoint(); https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3331: if (dragState().m_dragType == DragSourceActionDHTML) { (I wonder why this code isn't in DragController::populateDragDataTransfer like the code for all the other types...) https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3333: IntRect boundingIncludingDescendants = layoutObject->absoluteBoundingBoxRectIncludingDescendants(); I guess this makes sense since it's what LocalFrame::nodeImage uses. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3334: FloatPoint absPos(boundingIncludingDescendants.x(), boundingIncludingDescendants.y()); No need to do int -> float and then round to int again, so maybe just: IntSize delta = m_mouseDownPos - boundingIncludingDescendants.location(); ? https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.h (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.h:136: IntPoint dragDataTransferLocation(); ...ForTesting()? https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandlerTest.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:178: "[draggable] {-moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;" Including the -moz-* and -khtml-* seems a bit excessive to me. It might also make sense to set "margin: 0" on body to make the mapping to a point more obvious? https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:184: PlatformMouseEvent mouseDownEvent1( Why the '1' at the end? https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:211: "[draggable] {-moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;" Same as above. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:219: PlatformMouseEvent mouseDownEvent1( Same as above.
fs, I wrote the report. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3331: if (dragState().m_dragType == DragSourceActionDHTML) { On 2016/02/23 17:27:45, fs wrote: > (I wonder why this code isn't in DragController::populateDragDataTransfer like > the code for all the other types...) This is the report that is flow to draw dragged image simply. 1) There is |m_dragLoc| on DataTransfer. When call setDragImageElement function, set |m_dragLoc| that is offset on the image. 2) Call |dataTransfer->createDragImage| on |DragController::startDrag| to get dragOffset that is |m_dragLoc| also to create image. And calcultate |dragLocation| with dragOffset. 3) Next call DragController::doSystemDrag with dragLocation and image created. 4) Call DragClientImpl::startDrag with dragLocation and image created. 5) finally call WebViewImpl::startDragging with dragLocation and image created. > Why this code isn't in DragController::populateDragDataTransfer. I guess because of 1), 2) processes.
https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3331: if (dragState().m_dragType == DragSourceActionDHTML) { Did you say that this codes need to transfer on |DragController::populateDragDataTransfer|?
https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3331: if (dragState().m_dragType == DragSourceActionDHTML) { On 2016/02/24 at 12:04:41, hyunjunekim2 wrote: > Did you say that this codes need to transfer on |DragController::populateDragDataTransfer|? No need to take any action on this - I was mostly thinking out aloud. (If something were to be done about it, a separate CL would be the way to go regardless.)
https://codereview.chromium.org/1716023002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3332: IntRect absoluteBoundingBox = layoutObject->absoluteBoundingBoxRect(); Why did you switch this to absoluteBoundingBoxRect (from absoluteBoundingBoxRectIncludingDescendants)?
fs, Changed them such as PS4. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:693: if (dragState().m_dragDataTransfer) { On 2016/02/23 17:27:45, fs wrote: > if (...) > return ...; > return IntPoint(); Done. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3334: FloatPoint absPos(boundingIncludingDescendants.x(), boundingIncludingDescendants.y()); On 2016/02/23 17:27:45, fs wrote: > No need to do int -> float and then round to int again, so maybe just: > > IntSize delta = m_mouseDownPos - boundingIncludingDescendants.location(); > > ? Done. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.h (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.h:136: IntPoint dragDataTransferLocation(); On 2016/02/23 17:27:45, fs wrote: > ...ForTesting()? Done. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandlerTest.cpp (right): https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:178: "[draggable] {-moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;" On 2016/02/23 17:27:45, fs wrote: > Including the -moz-* and -khtml-* seems a bit excessive to me. > > It might also make sense to set "margin: 0" on body to make the mapping to a > point more obvious? Done. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:184: PlatformMouseEvent mouseDownEvent1( On 2016/02/23 17:27:45, fs wrote: > Why the '1' at the end? Done. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:211: "[draggable] {-moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;" On 2016/02/23 17:27:45, fs wrote: > Same as above. Done. https://codereview.chromium.org/1716023002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandlerTest.cpp:219: PlatformMouseEvent mouseDownEvent1( On 2016/02/23 17:27:46, fs wrote: > Same as above. Done. https://codereview.chromium.org/1716023002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1716023002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:3332: IntRect absoluteBoundingBox = layoutObject->absoluteBoundingBoxRect(); On 2016/02/24 12:51:16, fs wrote: > Why did you switch this to absoluteBoundingBoxRect (from > absoluteBoundingBoxRectIncludingDescendants)? |absoluteBoundingBoxRect| function was thought to include both. But re-change |absoluteBoundingBoxRectIncludingDescendants|. Because |absoluteBoundingBoxRectIncludingDescendants| function contains |absoluteBoundingBoxrect| Layer of children.
fs, pdr Could you check PS4 and take me advice? Thank you.
On 2016/02/24 at 13:57:40, hyunjune.kim wrote: > fs, pdr > Could you check PS4 and take me advice? Thank you. LGTM, this looks great. Can you remove the TODO in LocalFrame.cpp too? https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit...
On 2016/02/24 20:51:36, pdr wrote: > On 2016/02/24 at 13:57:40, hyunjune.kim wrote: > > fs, pdr > > Could you check PS4 and take me advice? Thank you. > > LGTM, this looks great. > > Can you remove the TODO in LocalFrame.cpp too? > https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit... Done.
The CQ bit was checked by pdr@chromium.org
lgtm
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1716023002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1716023002/80001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
hyunjune.kim@samsung.com changed reviewers: + rbyers@chromium.org
fs, pdr I changed this patch about test. added 'font-family' and modified font-size that is even. Rick Byers, Also could you check this patch? Thank you.
rbyers@chromium.org changed reviewers: + dtapuska@chromium.org
dtapuska@ knows this code as well as I do (and you already have a core OWNERS LGTM). Dave can you please take a look?
rbyers@chromium.org changed reviewers: - rbyers@chromium.org
On 2016/02/25 16:30:49, Rick Byers wrote: > dtapuska@ knows this code as well as I do (and you already have a core OWNERS > LGTM). Dave can you please take a look? lgtm
pdr, After Issue 1736893002 was landing, i will land this patch. Thank you.
On 2016/02/26 at 06:47:21, hyunjune.kim wrote: > pdr, > After Issue 1736893002 was landing, i will land this patch. > Thank you. Oh no, you win this race since mine isn't even reviewed yet :) Please go ahead and land this, and I'll rebase my patch tomorrow. I confirmed the patches work well together too.
The CQ bit was checked by hyunjune.kim@samsung.com
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, dtapuska@chromium.org, rbyers@chromium.org Link to the patchset: https://codereview.chromium.org/1716023002/#ps220001 (title: "Remove comment.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1716023002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1716023002/220001
On 2016/02/26 06:52:28, pdr wrote: > On 2016/02/26 at 06:47:21, hyunjune.kim wrote: > > pdr, > > After Issue 1736893002 was landing, i will land this patch. > > Thank you. > > Oh no, you win this race since mine isn't even reviewed yet :) > > Please go ahead and land this, and I'll rebase my patch tomorrow. I confirmed > the patches work well together too. Ok, Go ahead. Thank you.
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_clobber_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by pdr@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1716023002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1716023002/220001
Message was sent while issue was closed.
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. TEST=EventHandlerTest.cpp BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. TEST=EventHandlerTest.cpp BUG=579153, 579158 ==========
Message was sent while issue was closed.
Committed patchset #12 (id:220001)
Message was sent while issue was closed.
Description was changed from ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. TEST=EventHandlerTest.cpp BUG=579153, 579158 ========== to ========== Fix draggable {svg, inline} elements are painted at incorrect position When drag {SVGShape, Inline} elements, It are painted at incorrect position. Don't contain position of them on localToAbsolute function. Because use bounding{x, y} of them that return on absoluteBoundingBoxRectIncludingDescendants as offset. TEST=EventHandlerTest.cpp BUG=579153, 579158 Committed: https://crrev.com/89317940af3b85bdff2f0e99c35082b5d3d517cf Cr-Commit-Position: refs/heads/master@{#377852} ==========
Message was sent while issue was closed.
Patchset 12 (id:??) landed as https://crrev.com/89317940af3b85bdff2f0e99c35082b5d3d517cf Cr-Commit-Position: refs/heads/master@{#377852} |