Commit 382a4ea1 authored by mjs's avatar mjs

Reviewed by Trey.

 	- fixed 3145317 - Unable to add or remove menu items on Site Menu page using Safari Beta

	This turned out to be a problem with event.layerX / event.layerY.

        * khtml/xml/dom2_eventsimpl.cpp:
        (MouseEventImpl::computeLayerPos): Since layer position is
	relative to parent layer, go up the layer tree adjusting for layer
	offset to compute true layer position.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3ddf5d37
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3145317 - Unable to add or remove menu items on Site Menu page using Safari Beta
This turned out to be a problem with event.layerX / event.layerY.
* khtml/xml/dom2_eventsimpl.cpp:
(MouseEventImpl::computeLayerPos): Since layer position is
relative to parent layer, go up the layer tree adjusting for layer
offset to compute true layer position.
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
......
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3145317 - Unable to add or remove menu items on Site Menu page using Safari Beta
This turned out to be a problem with event.layerX / event.layerY.
* khtml/xml/dom2_eventsimpl.cpp:
(MouseEventImpl::computeLayerPos): Since layer position is
relative to parent layer, go up the layer tree adjusting for layer
offset to compute true layer position.
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
......
......@@ -436,8 +436,11 @@ void MouseEventImpl::computeLayerPos()
}
node->renderer()->enclosingLayer()->updateLayerPosition();
m_layerX -= node->renderer()->enclosingLayer()->xPos();
m_layerY -= node->renderer()->enclosingLayer()->yPos();
for (khtml::RenderLayer *layer = node->renderer()->enclosingLayer(); layer != NULL; layer = layer->parent()) {
m_layerX -= layer->xPos();
m_layerY -= layer->yPos();
}
}
MouseEventImpl::~MouseEventImpl()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment