RESOLVED FIXED 117290
[CSSRegions] getBoundingClientRect wrong for inline content nodes
https://bugs.webkit.org/show_bug.cgi?id=117290
Summary [CSSRegions] getBoundingClientRect wrong for inline content nodes
Mihnea Ovidenie
Reported 2013-06-06 06:11:35 PDT
For inline content nodes, getBoundingClientRect gives wrong values.
Attachments
Patch (9.62 KB, patch)
2013-06-06 07:56 PDT, Mihnea Ovidenie
no flags
Patch for landing (10.75 KB, patch)
2013-06-07 00:06 PDT, Mihnea Ovidenie
no flags
Patch for landing (10.76 KB, patch)
2013-06-07 00:16 PDT, Mihnea Ovidenie
no flags
Mihnea Ovidenie
Comment 1 2013-06-06 07:56:35 PDT
Alexandru Chiculita
Comment 2 2013-06-06 10:05:07 PDT
Comment on attachment 203935 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=203935&action=review Looks good. > LayoutTests/fast/regions/flowed-inline-content-bounding-client-rect.html:2 > + nit: I've usually been asked to make tests look like a standard html page with head & body tags. > Source/WebCore/rendering/RenderFlowThread.cpp:1157 > + RenderRegion* region = mapFromFlowToRegion(transformState); > + if (region) nit: You can combine these lines in one. > Source/WebCore/rendering/RenderFlowThread.cpp:1158 > + static_cast<const RenderObject*>(region)->mapLocalToContainer(region->containerForRepaint(), transformState, mode, wasFixed); nit: Mihai was right on the other bug. We need to fix this cast.
Mihnea Ovidenie
Comment 3 2013-06-06 10:57:12 PDT
(In reply to comment #2) > (From update of attachment 203935 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=203935&action=review > > Looks good. > > > LayoutTests/fast/regions/flowed-inline-content-bounding-client-rect.html:2 > > + > > nit: I've usually been asked to make tests look like a standard html page with head & body tags. > > > Source/WebCore/rendering/RenderFlowThread.cpp:1157 > > + RenderRegion* region = mapFromFlowToRegion(transformState); > > + if (region) > > nit: You can combine these lines in one. > > > Source/WebCore/rendering/RenderFlowThread.cpp:1158 > > + static_cast<const RenderObject*>(region)->mapLocalToContainer(region->containerForRepaint(), transformState, mode, wasFixed); > > nit: Mihai was right on the other bug. We need to fix this cast. Why? I am not a fan of making RFT friend for RenderRegion and also i am not a huge fan of adding mapLocalToContainer and make it public in RenderRegion. Both in RenderBox and RenderInline, the function is protected/private.
Alexandru Chiculita
Comment 4 2013-06-06 13:18:35 PDT
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 203935 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=203935&action=review > > > > Looks good. > > > > > LayoutTests/fast/regions/flowed-inline-content-bounding-client-rect.html:2 > > > + > > > > nit: I've usually been asked to make tests look like a standard html page with head & body tags. > > > > > Source/WebCore/rendering/RenderFlowThread.cpp:1157 > > > + RenderRegion* region = mapFromFlowToRegion(transformState); > > > + if (region) > > > > nit: You can combine these lines in one. > > > > > Source/WebCore/rendering/RenderFlowThread.cpp:1158 > > > + static_cast<const RenderObject*>(region)->mapLocalToContainer(region->containerForRepaint(), transformState, mode, wasFixed); > > > > nit: Mihai was right on the other bug. We need to fix this cast. > > Why? I am not a fan of making RFT friend for RenderRegion and also i am not a huge fan of adding mapLocalToContainer and make it public in RenderRegion. Both in RenderBox and RenderInline, the function is protected/private. Yeah. I'm not a fan of that either.
Mihnea Ovidenie
Comment 5 2013-06-07 00:06:56 PDT
Created attachment 204006 [details] Patch for landing
WebKit Commit Bot
Comment 6 2013-06-07 00:08:53 PDT
Comment on attachment 204006 [details] Patch for landing Rejecting attachment 204006 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 204006, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Alex Chiculita found in /Volumes/Data/EWS/WebKit/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py. /Volumes/Data/EWS/WebKit/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://webkit-queues.appspot.com/results/716693
Mihnea Ovidenie
Comment 7 2013-06-07 00:16:44 PDT
Created attachment 204007 [details] Patch for landing
WebKit Commit Bot
Comment 8 2013-06-07 01:00:26 PDT
Comment on attachment 204007 [details] Patch for landing Clearing flags on attachment: 204007 Committed r151309: <http://trac.webkit.org/changeset/151309>
WebKit Commit Bot
Comment 9 2013-06-07 01:00:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.