[Webkit-unassigned] [Bug 120769] [CSSRegions] Selection focusNode set to the "region" block, instead of the "source" block
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 27 08:01:29 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=120769
--- Comment #7 from Mihnea Ovidenie <mihnea at adobe.com> 2013-09-27 08:00:29 PST ---
(From update of attachment 212560)
View in context: https://bugs.webkit.org/attachment.cgi?id=212560&action=review
> Source/WebCore/rendering/RenderBlock.cpp:4463
> + return isChildHitTestCandidate(box) && (region ? toRenderBlock(box)->regionAtBlockOffset(point.y()) == region : true);
Is it safe here to convert a box to RenderBlock? It is not clear to me why.
> Source/WebCore/rendering/RenderBlock.cpp:4482
> + if (isRenderRegion()) {
Maybe you should you create a positionForPoint in RenderRegion so that you avoid casts etc.
> Source/WebCore/rendering/RenderBlock.cpp:4485
> + LayoutPoint newPoint(0, point.y());
You need to explain what you are doing here.
> Source/WebCore/rendering/RenderBlock.cpp:4493
> + return toRenderBlock(thread->firstChild())->positionForPoint(newPoint);
Is it always safe to cast here? What happens if the first child is not a block, for instance an image? Also, what happens if the flow thread has more than one child:
<div style="-webkit-flow-into: flow"></div>
<div style="-webkit-flow-into: flow"></div>
> Source/WebCore/rendering/RenderBlock.cpp:4505
> + RenderRegion* region = regionAtBlockOffset(point.y());
Not a huge fan of changing the RenderBlock::positionForPoint method with regions specific code.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list