alignment status in Composer was erroneous for cells into an aligned table; b=97519, r=jfrancis, sr=kin
git-svn-id: svn://10.0.0.236/trunk@103933 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e869a10a49
commit
b0f0ef596c
@ -21,6 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
@ -690,6 +691,7 @@ nsHTMLEditRules::GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign)
|
||||
|
||||
// check up the ladder for divs with alignment
|
||||
nsCOMPtr<nsIDOMNode> temp = nodeToExamine;
|
||||
PRBool isFirstNodeToExamine = PR_TRUE;
|
||||
while (nodeToExamine)
|
||||
{
|
||||
if (nsHTMLEditUtils::IsDiv(nodeToExamine))
|
||||
@ -716,6 +718,13 @@ nsHTMLEditRules::GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isFirstNodeToExamine && nsHTMLEditUtils::IsTable(nodeToExamine)) {
|
||||
// the node to examine is a table and this is not the first node
|
||||
// we examine; let's break here to materialize the 'inline-block'
|
||||
// behaviour of html tables regarding to text alignment
|
||||
return NS_OK;
|
||||
}
|
||||
isFirstNodeToExamine = PR_FALSE;
|
||||
res = nodeToExamine->GetParentNode(getter_AddRefs(temp));
|
||||
if (NS_FAILED(res)) temp = nsnull;
|
||||
nodeToExamine = temp;
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
@ -690,6 +691,7 @@ nsHTMLEditRules::GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign)
|
||||
|
||||
// check up the ladder for divs with alignment
|
||||
nsCOMPtr<nsIDOMNode> temp = nodeToExamine;
|
||||
PRBool isFirstNodeToExamine = PR_TRUE;
|
||||
while (nodeToExamine)
|
||||
{
|
||||
if (nsHTMLEditUtils::IsDiv(nodeToExamine))
|
||||
@ -716,6 +718,13 @@ nsHTMLEditRules::GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isFirstNodeToExamine && nsHTMLEditUtils::IsTable(nodeToExamine)) {
|
||||
// the node to examine is a table and this is not the first node
|
||||
// we examine; let's break here to materialize the 'inline-block'
|
||||
// behaviour of html tables regarding to text alignment
|
||||
return NS_OK;
|
||||
}
|
||||
isFirstNodeToExamine = PR_FALSE;
|
||||
res = nodeToExamine->GetParentNode(getter_AddRefs(temp));
|
||||
if (NS_FAILED(res)) temp = nsnull;
|
||||
nodeToExamine = temp;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user