[Shadow DOM] The MouseEvent offsetX and offsetY attributes must return the coordinates relative to the origin of the padding edge of the relative target after retargeting.
https://bugs.webkit.org/show_bug.cgi?id=104509

Reviewed by Dimitri Glazkov.

Adding a test for making sure that MouseEvent offsetX and offsetY arrributes are adjusted in retargeting.

* fast/dom/shadow/shadow-dom-mouse-event-adjust-offset-expected.txt: Added.
* fast/dom/shadow/shadow-dom-mouse-event-adjust-offset.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make NodeRenderingContext::parentRenderer and nextRenderer top layer aware
https://bugs.webkit.org/show_bug.cgi?id=103477

Reviewed by Hajime Morita.

Source/WebCore:

Original patch by Elliott Sprehn (minor code and layout tests added).

Instead of using adjustInsertionPointForTopLayerElement and reassigning
pointers passed by reference we should just make nextRenderer and parentRenderer
handle the top layer properly. Right now they would return the wrong values
since we only correctly handle the top layer during renderer creation.

This makes handling of top layer elements consistent with handling of
other special renderering systems like flow threads.

Tests: fast/dom/HTMLDialogElement/modal-dialog-in-replaced-renderer.html
       fast/dom/HTMLDialogElement/modal-dialog-in-table-column.html
       fast/dom/HTMLDialogElement/modal-dialog-sibling.html

* dom/NodeRenderingContext.cpp:
(WebCore::isRendererReparented): Added this helper function. We must skip
renderers that are reparented in nextRenderer and previousRenderer.
(WebCore):
(WebCore::adjustInsertionPointForTopLayerElement): Removed this method.
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):

LayoutTests:

* fast/dom/HTMLDialogElement/modal-dialog-in-replaced-renderer-expected.html: Added.
* fast/dom/HTMLDialogElement/modal-dialog-in-replaced-renderer.html: Added.
* fast/dom/HTMLDialogElement/modal-dialog-in-table-column-expected.html: Added.
* fast/dom/HTMLDialogElement/modal-dialog-in-table-column.html: Added.
* fast/dom/HTMLDialogElement/modal-dialog-sibling-expected.html: Added.
* fast/dom/HTMLDialogElement/modal-dialog-sibling.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139154 268f45cc-cd09-0410-ab3c-d52691b4dbfc