RESOLVED WONTFIX 75512
[EFL] Implement the hit test result's bounding rect
https://bugs.webkit.org/show_bug.cgi?id=75512
Summary [EFL] Implement the hit test result's bounding rect
Jinwoo Song
Reported 2012-01-03 19:26:57 PST
Implement the hit test result to return the bounding rect of the element.
Attachments
Implement the hit test result's bounding rect (2.88 KB, patch)
2012-01-03 19:31 PST, Jinwoo Song
no flags
Use the Eina_Rectangle for the bounding rect instead of struct. (2.99 KB, patch)
2012-01-05 18:40 PST, Jinwoo Song
no flags
Implement the hit test result's bounding rect (2.99 KB, patch)
2012-01-05 18:45 PST, Jinwoo Song
no flags
Patch (2.73 KB, patch)
2012-01-05 19:05 PST, Jinwoo Song
morrita: review-
morrita: commit-queue-
Jinwoo Song
Comment 1 2012-01-03 19:31:48 PST
Created attachment 121041 [details] Implement the hit test result's bounding rect
Ryuan Choi
Comment 2 2012-01-05 03:11:35 PST
Comment on attachment 121041 [details] Implement the hit test result's bounding rect View in context: https://bugs.webkit.org/attachment.cgi?id=121041&action=review > Source/WebKit/efl/ewk/ewk_frame.cpp:691 > + RefPtr<WebCore::Node> innerNonSharedNode = result.innerNonSharedNode(); innerNonSharedNode return WebCore::Node*. > Source/WebKit/efl/ewk/ewk_frame.h:129 > + } bounding_box; /**< the bounding rect of the element */ How do you think about using Eina_Rectangle ?
Jinwoo Song
Comment 3 2012-01-05 18:12:48 PST
(In reply to comment #2) > (From update of attachment 121041 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=121041&action=review > > > Source/WebKit/efl/ewk/ewk_frame.cpp:691 > > + RefPtr<WebCore::Node> innerNonSharedNode = result.innerNonSharedNode(); > > innerNonSharedNode return WebCore::Node*. I think there is no problem to use the RefPtr for the innerNonSharedNode. > > > Source/WebKit/efl/ewk/ewk_frame.h:129 > > + } bounding_box; /**< the bounding rect of the element */ > > How do you think about using Eina_Rectangle ? That's a good suggestion and I'll fix this.
Jinwoo Song
Comment 4 2012-01-05 18:40:00 PST
Created attachment 121381 [details] Use the Eina_Rectangle for the bounding rect instead of struct.
Jinwoo Song
Comment 5 2012-01-05 18:45:34 PST
Created attachment 121382 [details] Implement the hit test result's bounding rect Upload new patch file after reflecting the comment to use the Eina_Rectangle.
Ryuan Choi
Comment 6 2012-01-05 18:49:10 PST
Comment on attachment 121381 [details] Use the Eina_Rectangle for the bounding rect instead of struct. View in context: https://bugs.webkit.org/attachment.cgi?id=121381&action=review > Source/WebKit/efl/ewk/ewk_frame.cpp:696 > + WebCore::IntRect boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : WebCore::IntRect(); > + hitTest->bounding_box.x = boundingRect.x(); > + hitTest->bounding_box.y = boundingRect.y(); > + hitTest->bounding_box.w = boundingRect.width(); > + hitTest->bounding_box.h = boundingRect.height(); hitTest->bounding_box = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : WebCore::IntRect();
Jinwoo Song
Comment 7 2012-01-05 19:04:43 PST
(In reply to comment #6) > (From update of attachment 121381 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=121381&action=review > > > Source/WebKit/efl/ewk/ewk_frame.cpp:696 > > + WebCore::IntRect boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : WebCore::IntRect(); > > + hitTest->bounding_box.x = boundingRect.x(); > > + hitTest->bounding_box.y = boundingRect.y(); > > + hitTest->bounding_box.w = boundingRect.width(); > > + hitTest->bounding_box.h = boundingRect.height(); > > hitTest->bounding_box = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : WebCore::IntRect(); Done.
Jinwoo Song
Comment 8 2012-01-05 19:05:30 PST
Ryuan Choi
Comment 9 2012-01-05 19:16:41 PST
(In reply to comment #8) > Created an attachment (id=121385) [details] > Patch LGTM.
Gyuyoung Kim
Comment 10 2012-01-05 20:32:36 PST
Comment on attachment 121385 [details] Patch Looks OK too.
Hajime Morrita
Comment 11 2012-01-16 00:58:55 PST
Comment on attachment 121385 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121385&action=review > Source/WebKit/efl/ewk/ewk_frame.cpp:691 > + hitTest->bounding_box = result.innerNonSharedNode() ? result.innerNonSharedNode()->renderer()->absoluteBoundingBoxRect() : WebCore::IntRect(); I know you just follow what other ports do. But it is really unfortunate to see this - layering violation: accessing the render object. - null check which should be done by HItTestResult. Could you extract this function as a part of HistTestResult method?
Jinwoo Song
Comment 12 2012-01-19 04:41:33 PST
(In reply to comment #11) > (From update of attachment 121385 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=121385&action=review > > > Source/WebKit/efl/ewk/ewk_frame.cpp:691 > > + hitTest->bounding_box = result.innerNonSharedNode() ? result.innerNonSharedNode()->renderer()->absoluteBoundingBoxRect() : WebCore::IntRect(); > > I know you just follow what other ports do. But it is really unfortunate to see this > - layering violation: accessing the render object. > - null check which should be done by HItTestResult. > > Could you extract this function as a part of HistTestResult method? Sure, I'll prepare a patch as you suggested.
Gyuyoung Kim
Comment 13 2012-04-04 02:17:35 PDT
Any update ?
Michael Catanzaro
Comment 14 2017-03-11 10:43:04 PST
Closing this bug because the EFL port has been removed from trunk. If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.
Note You need to log in before you can comment on or make changes to this bug.