This commit is contained in:
jst%netscape.com 2002-05-23 00:00:34 +00:00
Родитель 161d2dff76
Коммит c510ff0346
204 изменённых файлов: 522 добавлений и 1224 удалений

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

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

@ -49,7 +49,6 @@
#include "nsGenericHTMLElement.h"
#include "nsILink.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsIEventStateManager.h"

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

@ -41,7 +41,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -43,7 +43,6 @@
#include "nsGenericHTMLElement.h"
#include "nsILink.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -43,7 +43,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -42,7 +42,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -41,7 +41,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -41,7 +41,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIDeviceContext.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"

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

@ -48,7 +48,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -41,7 +41,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -54,7 +54,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
@ -1142,8 +1141,10 @@ nsHTMLInputElement::Click()
for (PRInt32 i=0; i<numShells; i++) {
nsCOMPtr<nsIPresShell> shell;
doc->GetShellAt(i, getter_AddRefs(shell));
if (shell) {
rv = shell->GetPresContext(getter_AddRefs(context));
shell->GetPresContext(getter_AddRefs(context));
if (context) {
nsEventStatus status = nsEventStatus_eIgnore;
nsMouseEvent event;

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -42,7 +42,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -41,7 +41,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -42,7 +42,6 @@
#include "nsGenericHTMLElement.h"
#include "nsILink.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -44,7 +44,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -46,7 +46,6 @@
#include "nsITextContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -43,7 +43,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -43,7 +43,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -42,7 +42,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -44,7 +44,6 @@
#include "nsHTMLAttributes.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -42,7 +42,6 @@
#include "nsHTMLAttributes.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -46,7 +46,6 @@
#include "nsHTMLAttributes.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -46,7 +46,6 @@
#include "nsGenericHTMLElement.h"
#include "GenericElementCollection.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -41,7 +41,6 @@
#include "nsHTMLAttributes.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"

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

@ -52,7 +52,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -40,7 +40,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -39,7 +39,6 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"

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

@ -116,7 +116,6 @@
#include "nsVoidArray.h"
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "nsHTMLIIDs.h"
#include "nsTextFragment.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptGlobalObjectOwner.h"

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

@ -71,7 +71,6 @@
#include "nsUnicharUtils.h"
#include "nsVoidArray.h"
#include "nsIUnicharInputStream.h"
#include "nsHTMLIIDs.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsIDOMHTMLLinkElement.h"
#include "nsIDOMHTMLAreaElement.h"

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

@ -47,7 +47,6 @@
#include "nsIHTMLContent.h"
#include "nsIStyleRule.h"
#include "nsIFrame.h"
#include "nsHTMLIIDs.h"
#include "nsICSSStyleRule.h"
#include "nsIStyleRuleProcessor.h"
#include "nsIStyleContext.h"

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

@ -48,7 +48,6 @@
#include "nsIPresContext.h"
#include "nsIEventStateManager.h"
#include "nsIDocument.h"
#include "nsHTMLIIDs.h"
#include "nsICSSFrameConstructor.h"
#include "nsIStyleFrameConstruction.h"
#include "nsHTMLParts.h"

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

@ -56,7 +56,6 @@
#include "nsTableColFrame.h"
#include "nsIDOMHTMLTableColElement.h"
#include "nsTableCellFrame.h" // to get IS_CELL_FRAME
#include "nsHTMLIIDs.h"
#include "nsIStyleFrameConstruction.h"
#include "nsHTMLParts.h"
#include "nsIPresShell.h"

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

@ -60,7 +60,6 @@
#include "nsIPref.h"
#include "nsIViewObserver.h"
#include "nsContainerFrame.h"
#include "nsHTMLIIDs.h"
#include "nsIDeviceContext.h"
#include "nsIEventStateManager.h"
#include "nsIDOMEvent.h"

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

@ -43,7 +43,6 @@
#include "nsFormFrame.h"
#include "nsFormControlFrame.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLParts.h"
#include "nsIFormControl.h"
@ -1748,18 +1747,16 @@ NS_IMETHODIMP
nsComboboxControlFrame::GetName(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;

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

@ -51,7 +51,6 @@
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIStyleContext.h"

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

@ -45,7 +45,6 @@
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsIPresState.h"
#include "nsWidgetsCID.h"
@ -508,18 +507,16 @@ NS_IMETHODIMP
nsFileControlFrame::GetName(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;

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

@ -44,7 +44,6 @@
#include "nsIStyleContext.h"
#include "nsLeafFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLIIDs.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsCoord.h"
@ -687,15 +686,15 @@ nsFormControlFrame::GetMaxLength(PRInt32* aSize)
{
*aSize = -1;
nsresult result = NS_CONTENT_ATTR_NOT_THERE;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**) &content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
nsHTMLValue value;
result = content->GetHTMLAttribute(nsHTMLAtoms::maxlength, value);
if (eHTMLUnit_Integer == value.GetUnit()) {
*aSize = value.GetIntValue();
}
NS_RELEASE(content);
}
return result;
}
@ -705,15 +704,15 @@ nsFormControlFrame::GetSizeFromContent(PRInt32* aSize) const
{
*aSize = -1;
nsresult result = NS_CONTENT_ATTR_NOT_THERE;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**) &content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
nsHTMLValue value;
result = content->GetHTMLAttribute(nsHTMLAtoms::size, value);
if (eHTMLUnit_Integer == value.GetUnit()) {
*aSize = value.GetIntValue();
}
NS_RELEASE(content);
}
return result;
}
@ -737,18 +736,16 @@ NS_IMETHODIMP
nsFormControlFrame::GetName(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;
@ -759,18 +756,16 @@ NS_IMETHODIMP
nsFormControlFrame::GetValue(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;

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

@ -44,7 +44,6 @@
#include "nsIStyleContext.h"
#include "nsLeafFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLIIDs.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsCoord.h"
@ -174,15 +173,14 @@ nsFormControlHelper::GetWrapProperty(nsIContent * aContent, nsString &aOutValue)
{
aOutValue.SetLength(0);
nsresult result = NS_CONTENT_ATTR_NOT_THERE;
nsIHTMLContent* content = nsnull;
aContent->QueryInterface(kIHTMLContentIID, (void**) &content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(aContent));
if (content) {
nsHTMLValue value;
result = content->GetHTMLAttribute(nsHTMLAtoms::wrap, value);
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(aOutValue);
}
NS_RELEASE(content);
}
return result;
}
@ -404,17 +402,15 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
aDesiredSize.width = CSS_NOTSET;
aDesiredSize.height = CSS_NOTSET;
nsIContent* iContent = nsnull;
aFrame->GetFormContent((nsIContent*&) iContent);
if (!iContent) {
return 0;
}
nsIHTMLContent* hContent = nsnull;
nsresult result = iContent->QueryInterface(kIHTMLContentIID, (void**)&hContent);
if ((NS_OK != result) || !hContent) {
NS_RELEASE(iContent);
nsCOMPtr<nsIContent> iContent;
aFrame->GetFormContent(*getter_AddRefs(iContent));
nsCOMPtr<nsIHTMLContent> hContent(do_QueryInterface(iContent));
if (!hContent) {
return 0;
}
nsAutoString valAttr;
nsresult valStatus = NS_CONTENT_ATTR_NOT_THERE;
if (nsnull != aSpec.mColValueAttr) {
@ -510,13 +506,10 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
}
}
NS_RELEASE(hContent);
if (ATTR_NOTSET == numRows) {
numRows = (aRowHeight > 0) ? (aDesiredSize.height / aRowHeight) : 0;
}
NS_RELEASE(iContent);
return numRows;
}
@ -704,10 +697,10 @@ nsresult
nsFormControlHelper::GetName(nsIContent* aContent, nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (nsnull != aContent) {
nsIHTMLContent* formControl = nsnull;
result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
if (aContent) {
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(aContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
@ -715,7 +708,6 @@ nsFormControlHelper::GetName(nsIContent* aContent, nsAString* aResult)
value.GetStringValue(*aResult);
}
}
NS_RELEASE(formControl);
}
}
return result;
@ -726,18 +718,16 @@ nsresult
nsFormControlHelper::GetValue(nsIContent* aContent, nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (nsnull != aContent) {
nsIHTMLContent* formControl = nsnull;
result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(aContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;

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

@ -51,7 +51,6 @@
#include "nsIStyleContext.h"
#include "nsLeafFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLIIDs.h"
#include "nsISupports.h"
#include "nsHTMLAtoms.h"
#include "nsIImage.h"
@ -236,18 +235,16 @@ NS_IMETHODIMP
nsHTMLButtonControlFrame::GetName(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;
@ -257,18 +254,16 @@ NS_IMETHODIMP
nsHTMLButtonControlFrame::GetValue(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
if ((NS_OK == result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(*aResult);
}
NS_RELEASE(formControl);
}
}
return result;

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

@ -52,7 +52,6 @@
#include "nsIStyleContext.h"
#include "nsLeafFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLIIDs.h"
#include "nsISupports.h"
#include "nsHTMLAtoms.h"
#include "nsIImage.h"

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

@ -47,7 +47,6 @@
#include "nsIStyleContext.h"
#include "nsLeafFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLIIDs.h"
#include "nsIViewManager.h"
#include "nsISupports.h"
#include "nsHTMLAtoms.h"

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

@ -42,7 +42,6 @@
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsIPresState.h"
#include "nsWidgetsCID.h"

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

@ -46,7 +46,6 @@
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIStyleContext.h"
@ -144,16 +143,16 @@ PRInt32 nsLegendFrame::GetAlign()
intValue = NS_STYLE_TEXT_ALIGN_RIGHT;
}
#endif // IBMBIDI
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**) &content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::align, value))) {
if (eHTMLUnit_Enumerated == value.GetUnit()) {
intValue = value.GetIntValue();
}
}
NS_RELEASE(content);
}
return intValue;
}

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

@ -42,7 +42,6 @@
#include "nsListControlFrame.h"
#include "nsFormControlFrame.h" // for COMPARE macro
#include "nsFormControlHelper.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsIHTMLContent.h"
#include "nsIFormControl.h"

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

@ -37,7 +37,6 @@
#include "nsCOMPtr.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsContainerFrame.h"
#include "nsHTMLIIDs.h"
#include "nsReflowPath.h"
#include "nsIStyleContext.h"
#include "nsIViewManager.h"

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

@ -42,7 +42,6 @@
#include "nsIViewManager.h"
#include "nsHTMLAtoms.h"
#include "nsIView.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLValue.h"
#include "nsHTMLParts.h"
#include "nsLayoutAtoms.h"

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

@ -37,7 +37,6 @@
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsHTMLParts.h"
#include "nsHTMLIIDs.h"
#include "nsIPresContext.h"
#include "nsLineLayout.h"
#include "nsStyleConsts.h"

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

@ -49,7 +49,6 @@
#include "nsLineLayout.h"
#include "nsPlaceholderFrame.h"
#include "nsStyleConsts.h"
#include "nsHTMLIIDs.h"
#include "nsCSSRendering.h"
#include "nsIFrameManager.h"
#include "nsIPresContext.h"
@ -3016,27 +3015,31 @@ nsBlockFrame::GetTopBlockChild()
// whitespace.
PRInt32 n = mLines.front()->GetChildCount();
while (--n >= 0) {
nsIContent* content;
nsresult rv = firstChild->GetContent(&content);
if (NS_FAILED(rv) || !content) {
nsCOMPtr<nsIContent> content;
firstChild->GetContent(getter_AddRefs(content));
if (!content) {
return nsnull;
}
if (!content->IsContentOfType(nsIContent::eTEXT)) {
NS_RELEASE(content);
return nsnull;
}
nsITextContent* tc;
rv = content->QueryInterface(kITextContentIID, (void**) &tc);
NS_RELEASE(content);
if (NS_FAILED(rv) || (nsnull == tc)) {
nsCOMPtr<nsITextContent> tc(do_QueryInterface(content));
NS_ASSERTION(tc, "Huh, eTEXT content not an nsITextContent!");
if (!tc) {
return nsnull;
}
PRBool isws = PR_FALSE;
tc->IsOnlyWhitespace(&isws);
NS_RELEASE(tc);
if (!isws) {
return nsnull;
}
firstChild->GetNextSibling(&firstChild);
}
@ -6136,8 +6139,10 @@ nsBlockFrame::RenumberLists(nsIPresContext* aPresContext)
// Setup initial list ordinal value
// XXX Map html's start property to counter-reset style
PRInt32 ordinal = 1;
nsIHTMLContent* hc;
if (mContent && (NS_OK == mContent->QueryInterface(kIHTMLContentIID, (void**) &hc))) {
nsCOMPtr<nsIHTMLContent> hc(do_QueryInterface(mContent));
if (hc) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE ==
hc->GetHTMLAttribute(nsHTMLAtoms::start, value)) {
@ -6148,7 +6153,6 @@ nsBlockFrame::RenumberLists(nsIPresContext* aPresContext)
}
}
}
NS_RELEASE(hc);
}
// Get to first-in-flow

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

@ -38,7 +38,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsBlockReflowContext.h"
#include "nsLineLayout.h"
#include "nsHTMLIIDs.h"
#include "nsSpaceManager.h"
#include "nsIFontMetrics.h"
#include "nsIPresContext.h"

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

@ -37,7 +37,6 @@
#include "nsCOMPtr.h"
#include "nsBulletFrame.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLValue.h"
#include "nsHTMLContainerFrame.h"

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

@ -49,7 +49,6 @@
#include "nsVoidArray.h"
#include "nsISizeOfHandler.h"
#include "nsHTMLReflowCommand.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLContainerFrame.h"
#include "nsIFrameManager.h"
#include "nsIPresShell.h"

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

@ -41,7 +41,6 @@
#include "nsIContent.h"
#include "nsLineLayout.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsLayoutAtoms.h"
#define nsFirstLetterFrameSuper nsHTMLContainerFrame

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

@ -68,7 +68,6 @@
#include "nsIDOMHTMLAreaElement.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsIDeviceContext.h"
#include "nsHTMLIIDs.h"
#include "nsIEventStateManager.h"
#include "nsISelection.h"
#include "nsISelectionPrivate.h"

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

@ -52,7 +52,6 @@
#include "nsIMarkupDocumentViewer.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsHTMLIIDs.h"
#include "nsIComponentManager.h"
#include "nsIStreamListener.h"
#include "nsIURL.h"

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

@ -1,4 +1,3 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
@ -27,7 +26,6 @@
#include "nsHTMLContainerFrame.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsHTMLIIDs.h"
#include "nsIComponentManager.h"
#include "nsIStreamListener.h"
#include "nsIURL.h"
@ -408,13 +406,13 @@ nsHTMLFramesetFrame::Init(nsIPresContext* aPresContext,
continue;
nsCOMPtr<nsIAtom> tag;
child->GetTag(*getter_AddRefs(tag));
if ((nsHTMLAtoms::frameset == tag) || (nsHTMLAtoms::frame == tag)) {
if (tag == nsHTMLAtoms::frameset || tag == nsHTMLAtoms::frame) {
nsCOMPtr<nsIStyleContext> kidSC;
nsresult result;
nsresult result;
aPresContext->ResolveStyleContextFor(child, mStyleContext,
getter_AddRefs(kidSC));
if (nsHTMLAtoms::frameset == tag) {
if (tag == nsHTMLAtoms::frameset) {
result = NS_NewHTMLFramesetFrame(shell, &frame);
mChildTypes[mChildCount] = FRAMESET;
@ -645,9 +643,9 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext,
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
nsHTMLValue htmlVal;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**)&content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::border, htmlVal))) {
nsHTMLUnit unit = htmlVal.GetUnit();
PRInt32 intVal = 0;
@ -659,13 +657,12 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext,
if (intVal < 0) {
intVal = 0;
}
NS_RELEASE(content);
if (forcing && intVal == 0) {
intVal = DEFAULT_BORDER_WIDTH_PX;
}
return NSIntPixelsToTwips(intVal, p2t);
}
NS_RELEASE(content);
}
if (mParentBorderWidth > 0 ||
@ -709,26 +706,24 @@ nsHTMLFramesetFrame::GetDesiredSize(nsIPresContext* aPresContext,
nsHTMLFramesetFrame* nsHTMLFramesetFrame::GetFramesetParent(nsIFrame* aChild)
{
nsHTMLFramesetFrame* parent = nsnull;
nsIContent* content = nsnull;
aChild->GetContent(&content);
if (nsnull != content) {
nsIContent* contentParent = nsnull;
content->GetParent(contentParent);
if (nsnull != contentParent) {
nsIHTMLContent* contentParent2 = nsnull;
contentParent->QueryInterface(kIHTMLContentIID, (void**)&contentParent2);
if (nsnull != contentParent2) {
nsIAtom* tag;
contentParent2->GetTag(tag);
if (nsHTMLAtoms::frameset == tag) {
aChild->GetParent((nsIFrame**)&parent);
}
NS_IF_RELEASE(tag);
NS_RELEASE(contentParent2);
nsCOMPtr<nsIContent> content;
aChild->GetContent(getter_AddRefs(content));
if (content) {
nsCOMPtr<nsIContent> contentParent;
content->GetParent(*getter_AddRefs(contentParent));
nsCOMPtr<nsIHTMLContent> contentParent2 =
do_QueryInterface(contentParent);
if (contentParent2) {
nsCOMPtr<nsIAtom> tag;
contentParent2->GetTag(*getter_AddRefs(tag));
if (tag == nsHTMLAtoms::frameset) {
aChild->GetParent((nsIFrame**)&parent);
}
NS_RELEASE(contentParent);
}
NS_RELEASE(content);
}
return parent;
@ -862,9 +857,10 @@ void nsHTMLFramesetFrame::ParseRowCol(nsIPresContext* aPresContext, nsIAtom* aAt
{
nsHTMLValue value;
nsAutoString rowsCols;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**)&content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
if (NS_CONTENT_ATTR_HAS_VALUE == content->GetHTMLAttribute(aAttrType, value)) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(rowsCols);
@ -875,11 +871,9 @@ void nsHTMLFramesetFrame::ParseRowCol(nsIPresContext* aPresContext, nsIAtom* aAt
(*aSpecs)[i] = specs[i];
}
delete [] specs;
NS_RELEASE(content);
return;
}
}
NS_RELEASE(content);
}
aNumSpecs = 1;
*aSpecs = new nsFramesetSpec[1];
@ -1054,11 +1048,10 @@ nsFrameborder GetFrameBorderHelper(nsIHTMLContent* aContent)
nsFrameborder nsHTMLFramesetFrame::GetFrameBorder()
{
nsFrameborder result = eFrameborder_Notset;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**) &content);
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
result = GetFrameBorderHelper(content);
NS_RELEASE(content);
}
if (eFrameborder_Notset == result) {
return mParentFrameborder;
@ -1069,11 +1062,11 @@ nsFrameborder nsHTMLFramesetFrame::GetFrameBorder()
nsFrameborder nsHTMLFramesetFrame::GetFrameBorder(nsIContent* aContent)
{
nsFrameborder result = eFrameborder_Notset;
nsIHTMLContent* content = nsnull;
aContent->QueryInterface(kIHTMLContentIID, (void**) &content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
result = GetFrameBorderHelper(content);
NS_RELEASE(content);
}
if (eFrameborder_Notset == result) {
return GetFrameBorder();
@ -1084,9 +1077,10 @@ nsFrameborder nsHTMLFramesetFrame::GetFrameBorder(nsIContent* aContent)
nscolor nsHTMLFramesetFrame::GetBorderColor()
{
nscolor result = NO_COLOR;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**)&content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mContent));
if (content) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::bordercolor, value))) {
if ((eHTMLUnit_Color == value.GetUnit()) ||
@ -1094,7 +1088,6 @@ nscolor nsHTMLFramesetFrame::GetBorderColor()
result = value.GetColorValue();
}
}
NS_RELEASE(content);
}
if (NO_COLOR == result) {
return mParentBorderColor;
@ -1105,9 +1098,10 @@ nscolor nsHTMLFramesetFrame::GetBorderColor()
nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent)
{
nscolor result = NO_COLOR;
nsIHTMLContent* content = nsnull;
aContent->QueryInterface(kIHTMLContentIID, (void**)&content);
if (nsnull != content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(aContent));
if (content) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::bordercolor, value))) {
if ((eHTMLUnit_Color == value.GetUnit()) ||
@ -1115,7 +1109,6 @@ nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent)
result = value.GetColorValue();
}
}
NS_RELEASE(content);
}
if (NO_COLOR == result) {
return GetBorderColor();
@ -1454,19 +1447,16 @@ PRBool
nsHTMLFramesetFrame::GetNoResize(nsIFrame* aChildFrame)
{
PRBool result = PR_FALSE;
nsIContent* content = nsnull;
aChildFrame->GetContent(&content);
if (nsnull != content) {
nsIHTMLContent* htmlContent = nsnull;
content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
if (nsnull != htmlContent) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::noresize, value)) {
result = PR_TRUE;
}
NS_RELEASE(htmlContent);
nsCOMPtr<nsIContent> content;
aChildFrame->GetContent(getter_AddRefs(content));
nsCOMPtr<nsIHTMLContent> htmlContent(do_QueryInterface(content));
if (htmlContent) {
nsHTMLValue value;
if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::noresize, value)) {
result = PR_TRUE;
}
NS_RELEASE(content);
}
return result;
}
@ -1507,9 +1497,9 @@ nsHTMLFramesetFrame::RecalculateBorderResize()
if (child) {
nsCOMPtr<nsIAtom> tag;
child->GetTag(*getter_AddRefs(tag));
if (nsHTMLAtoms::frameset == tag) {
if (tag == nsHTMLAtoms::frameset) {
childTypes[frameOrFramesetChildIndex++] = FRAMESET;
} else if (nsHTMLAtoms::frame == tag) {
} else if (tag == nsHTMLAtoms::frame) {
childTypes[frameOrFramesetChildIndex++] = FRAME;
}
// Don't overflow childTypes array

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

@ -45,7 +45,6 @@
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsHTMLContainerFrame.h"
#include "nsHTMLIIDs.h"
#include "nsCSSRendering.h"
#include "nsIScrollableView.h"
#include "nsWidgetsCID.h"

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

@ -55,7 +55,6 @@
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsViewsCID.h"
#include "nsHTMLIIDs.h"
#include "nsIDOMEvent.h"
#include "nsIScrollableView.h"
#include "nsWidgetsCID.h"

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

@ -46,7 +46,6 @@
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsIWidget.h"
#include "nsHTMLIIDs.h"
#include "nsPageFrame.h"
#include "nsIRenderingContext.h"
#include "nsGUIEvent.h"

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

@ -43,7 +43,6 @@
#include "nsIContent.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsHTMLIIDs.h"
#include "nsFrame.h"
#include "nsContainerFrame.h"
#include "nsLayoutAtoms.h"

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

@ -41,7 +41,6 @@
#include "nsIPresContext.h"
#include "nsIRenderingContext.h"
#include "nsIPresShell.h"
#include "nsHTMLIIDs.h"
#include "nsIImage.h"
#include "nsIWidget.h"
#include "nsHTMLAtoms.h"

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

@ -56,7 +56,6 @@
#include "nsINameSpaceManager.h"
#include "nsHTMLAtoms.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsIDOMEventReceiver.h"
#include "nsIPresShell.h"
#include "nsIFrame.h"
@ -964,45 +963,51 @@ nsImageMap::IsInside(nscoord aX, nscoord aY,
if (area->IsInside(aX, aY)) {
if (area->GetHasURL()) {
// Set the image loader's source URL and base URL
nsIURI* baseUri = nsnull;
nsCOMPtr<nsIURI> baseUri;
if (mMap) {
nsIHTMLContent* htmlContent;
if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) {
htmlContent->GetBaseURL(baseUri);
NS_RELEASE(htmlContent);
nsCOMPtr<nsIHTMLContent> htmlContent(do_QueryInterface(mMap));
if (htmlContent) {
htmlContent->GetBaseURL(*getter_AddRefs(baseUri));
}
else {
nsIDocument* doc;
if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) {
doc->GetBaseURL(baseUri); // Could just use mDocument here...
NS_RELEASE(doc);
nsCOMPtr<nsIDocument> doc;
mMap->GetDocument(*getter_AddRefs(doc));
if (doc) {
// Could just use mDocument here...
doc->GetBaseURL(*getter_AddRefs(baseUri));
}
}
}
if (!baseUri) return PR_FALSE;
if (!baseUri) {
return PR_FALSE;
}
nsAutoString href;
area->GetHREF(href);
NS_MakeAbsoluteURI(aAbsURL, href, baseUri);
NS_RELEASE(baseUri);
}
area->GetTarget(aTarget);
if (mMap && (aTarget.Length() == 0)) {
nsIHTMLContent* content = nsnull;
nsresult result = mMap->QueryInterface(kIHTMLContentIID, (void**)&content);
if ((NS_OK == result) && content) {
nsCOMPtr<nsIHTMLContent> content(do_QueryInterface(mMap));
if (content) {
content->GetBaseTarget(aTarget);
NS_RELEASE(content);
}
}
area->GetAltText(aAltText);
*aSuppress = area->mSuppressFeedback;
area->GetArea(aContent);
return PR_TRUE;
}
}
return PR_FALSE;
}

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

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsInlineFrame.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLParts.h"
#include "nsIStyleContext.h"

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

@ -44,7 +44,6 @@
#include "nsInlineFrame.h"
#include "nsStyleConsts.h"
#include "nsHTMLContainerFrame.h"
#include "nsHTMLIIDs.h"
#include "nsSpaceManager.h"
#include "nsIStyleContext.h"
#include "nsIPresContext.h"

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

@ -41,7 +41,6 @@
#include "nsIStyleContext.h"
#include "nsIRenderingContext.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsLayoutAtoms.h"
#include "nsIStyleSet.h"
#include "nsIPresShell.h"

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

@ -41,7 +41,6 @@
#include "nsIStyleContext.h"
#include "nsIRenderingContext.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsLayoutAtoms.h"
#include "nsIStyleSet.h"
#include "nsIPresShell.h"

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

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsPlaceholderFrame.h"
#include "nsLineLayout.h"
#include "nsHTMLIIDs.h"
#include "nsIContent.h"
#include "nsIPresContext.h"
#include "nsIRenderingContext.h"

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

@ -41,7 +41,6 @@
#include "nsIRenderingContext.h"
#include "nsIStyleContext.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLIIDs.h"
#include "nsIDeviceContext.h"
#include "nsIViewManager.h"
#include "nsIPresShell.h"
@ -203,7 +202,7 @@ nsSimplePageSequenceFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(kIPageSequenceFrameIID)) {
if (aIID.Equals(NS_GET_IID(nsIPageSequenceFrame))) {
*aInstancePtr = (void*)(nsIPageSequenceFrame*)this;
return NS_OK;
}

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

@ -38,7 +38,6 @@
#include "nsIHTMLContent.h"
#include "nsFrame.h"
#include "nsLineLayout.h"
#include "nsHTMLIIDs.h"
#include "nsIPresContext.h"
#include "nsHTMLAtoms.h"
#include "nsUnitConversion.h"

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

@ -52,7 +52,6 @@
#include "nsCoord.h"
#include "nsIFontMetrics.h"
#include "nsIRenderingContext.h"
#include "nsHTMLIIDs.h"
#include "nsIPresShell.h"
#include "nsIView.h"
#include "nsIViewManager.h"
@ -5589,79 +5588,74 @@ nsTextFrame::ComputeTotalWordDimensions(nsIPresContext* aPresContext,
PRUnichar *newWordBuf = aWordBuf;
PRUint32 newWordBufSize = aWordBufSize;
while (nsnull != aNextFrame) {
nsIContent* content = nsnull;
if ((NS_OK == aNextFrame->GetContent(&content)) && (nsnull != content)) {
#ifdef DEBUG_WORD_WRAPPING
printf(" next textRun=");
nsFrame::ListTag(stdout, aNextFrame);
printf("\n");
#endif
nsITextContent* tc;
if (NS_OK == content->QueryInterface(kITextContentIID, (void**)&tc)) {
PRBool stop = PR_FALSE;
nsTextDimensions moreDimensions;
moreDimensions = ComputeWordFragmentDimensions(aPresContext,
aLineBreaker,
aLineLayout,
aReflowState,
aNextFrame, content, tc,
&stop,
newWordBuf,
aWordLen,
newWordBufSize,
aIsBreakable);
if (moreDimensions.width < 0) {
PRUint32 moreSize = -moreDimensions.width;
//Oh, wordBuf is too small, we have to grow it
newWordBufSize += moreSize;
if (newWordBuf != aWordBuf) {
newWordBuf = (PRUnichar*)nsMemory::Realloc(newWordBuf, sizeof(PRUnichar)*newWordBufSize);
NS_ASSERTION(newWordBuf, "not enough memory");
} else {
newWordBuf = (PRUnichar*)nsMemory::Alloc(sizeof(PRUnichar)*newWordBufSize);
NS_ASSERTION(newWordBuf, "not enough memory");
if(newWordBuf) {
memcpy((void*)newWordBuf, aWordBuf, sizeof(PRUnichar)*(newWordBufSize-moreSize));
}
}
nsCOMPtr<nsIContent> content;
aNextFrame->GetContent(getter_AddRefs(content));
#ifdef DEBUG_WORD_WRAPPING
printf(" next textRun=");
nsFrame::ListTag(stdout, aNextFrame);
printf("\n");
#endif
nsCOMPtr<nsITextContent> tc(do_QueryInterface(content));
if (tc) {
PRBool stop = PR_FALSE;
nsTextDimensions moreDimensions;
moreDimensions = ComputeWordFragmentDimensions(aPresContext,
aLineBreaker,
aLineLayout,
aReflowState,
aNextFrame, content, tc,
&stop,
newWordBuf,
aWordLen,
newWordBufSize,
aIsBreakable);
if (moreDimensions.width < 0) {
PRUint32 moreSize = -moreDimensions.width;
//Oh, wordBuf is too small, we have to grow it
newWordBufSize += moreSize;
if (newWordBuf != aWordBuf) {
newWordBuf = (PRUnichar*)nsMemory::Realloc(newWordBuf, sizeof(PRUnichar)*newWordBufSize);
NS_ASSERTION(newWordBuf, "not enough memory");
} else {
newWordBuf = (PRUnichar*)nsMemory::Alloc(sizeof(PRUnichar)*newWordBufSize);
NS_ASSERTION(newWordBuf, "not enough memory");
if(newWordBuf) {
moreDimensions = ComputeWordFragmentDimensions(aPresContext,
aLineBreaker,
aLineLayout,
aReflowState,
aNextFrame, content, tc,
&stop,
newWordBuf,
aWordLen,
newWordBufSize,
aIsBreakable);
NS_ASSERTION((moreDimensions.width >= 0), "ComputeWordFragmentWidth is returning negative");
} else {
stop = PR_TRUE;
moreDimensions.Clear();
}
memcpy((void*)newWordBuf, aWordBuf, sizeof(PRUnichar)*(newWordBufSize-moreSize));
}
}
NS_RELEASE(tc);
NS_RELEASE(content);
addedDimensions.Combine(moreDimensions);
#ifdef DEBUG_WORD_WRAPPING
printf(" moreWidth=%d (addedWidth=%d) stop=%c\n", moreDimensions.width,
addedDimensions.width, stop?'T':'F');
#endif
if (stop) {
goto done;
}
if(newWordBuf) {
moreDimensions =
ComputeWordFragmentDimensions(aPresContext, aLineBreaker,
aLineLayout, aReflowState,
aNextFrame, content, tc, &stop,
newWordBuf, aWordLen, newWordBufSize,
aIsBreakable);
NS_ASSERTION((moreDimensions.width >= 0),
"ComputeWordFragmentWidth is returning negative");
} else {
stop = PR_TRUE;
moreDimensions.Clear();
}
}
else {
// It claimed it was text but it doesn't implement the
// nsITextContent API. Therefore I don't know what to do with it
// and can't look inside it. Oh well.
NS_RELEASE(content);
addedDimensions.Combine(moreDimensions);
#ifdef DEBUG_WORD_WRAPPING
printf(" moreWidth=%d (addedWidth=%d) stop=%c\n", moreDimensions.width,
addedDimensions.width, stop?'T':'F');
#endif
if (stop) {
goto done;
}
}
else {
// It claimed it was text but it doesn't implement the
// nsITextContent API. Therefore I don't know what to do with it
// and can't look inside it. Oh well.
goto done;
}
// Move on to the next frame in the text-run
aNextFrame = aLineLayout.FindNextText(aPresContext, aNextFrame);
@ -5805,12 +5799,11 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const
const nsTextFragment* frag;
// Get the frames text content
nsITextContent* tc;
if (NS_OK != mContent->QueryInterface(kITextContentIID, (void**) &tc)) {
nsCOMPtr<nsITextContent> tc(do_QueryInterface(mContent));
if (!tc) {
return;
}
tc->GetText(&frag);
NS_RELEASE(tc);
// Compute the total length of the text content.
*aTotalContentLength = frag->GetLength();

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

@ -44,7 +44,6 @@
#include "nsStyleConsts.h"
#include "nsILineBreaker.h"
#include "nsIWordBreaker.h"
#include "nsHTMLIIDs.h"
#include "nsIServiceManager.h"
#include "nsUnicharUtilCIID.h"
#include "nsICaseConversion.h"

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

@ -37,7 +37,6 @@
#include "nsCOMPtr.h"
#include "nsContainerFrame.h"
#include "nsHTMLParts.h"
#include "nsHTMLIIDs.h"
#include "nsLayoutAtoms.h"
#include "nsIViewManager.h"
#include "nsIScrollableFrame.h"

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

@ -82,7 +82,6 @@ CPPSRCS = \
nsHRFrame.cpp \
nsHTMLContainerFrame.cpp \
nsHTMLFrame.cpp \
nsHTMLIIDs.cpp \
nsHTMLReflowCommand.cpp \
nsHTMLReflowState.cpp \
nsImageFrame.cpp \

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

@ -86,7 +86,6 @@ CPP_OBJS= \
.\$(OBJDIR)\nsHRFrame.obj \
.\$(OBJDIR)\nsHTMLContainerFrame.obj \
.\$(OBJDIR)\nsHTMLFrame.obj \
.\$(OBJDIR)\nsHTMLIIDs.obj \
.\$(OBJDIR)\nsHTMLReflowCommand.obj \
.\$(OBJDIR)\nsHTMLReflowState.obj \
.\$(OBJDIR)\nsImageFrame.obj \

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

@ -37,7 +37,6 @@
#include "nsCOMPtr.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsContainerFrame.h"
#include "nsHTMLIIDs.h"
#include "nsReflowPath.h"
#include "nsIStyleContext.h"
#include "nsIViewManager.h"

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше