Let's see if backing out bug 397219 fixes the orange.

This commit is contained in:
jruderman@hmc.edu 2007-11-10 20:16:50 -08:00
Родитель e3f6cc5a3e
Коммит ecbca909c9
1 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -1161,7 +1161,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
nsCOMPtr<nsPIDOMWindow> win = mDocument->GetWindow();
if (!win) {
NS_ERROR("win is null. this happens [often on xlib builds]. see bug #79213");
// NS_ERROR("win is null. this happens [often on xlib builds]. see bug #79213");
return NS_ERROR_NULL_POINTER;
}
@ -4982,7 +4982,17 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
if (startContent) {
startFrame = shell->GetPrimaryFrameFor(startContent);
if (isCollapsed) {
// Check to see if our caret is at the very end of a node
// First check to see if we're in a <label>
// We don't want to return the selection in a label, because
// we we should be tabbing relative to what the label
// points to (the current focus), not relative to the label itself.
nsIContent *parentContent = startContent;
while ((parentContent = parentContent->GetParent()) != nsnull) {
if (parentContent->Tag() == nsGkAtoms::label) {
return NS_OK; // Don't return selection location, we're on a label
}
}
// Next check to see if our caret is at the very end of a node
// If so, the caret is actually sitting in front of the next
// logical frame's primary node - so for this case we need to
// change caretContent to that node.