This commit is contained in:
hyatt%netscape.com 1999-10-14 12:02:32 +00:00
Родитель 89f6b1a594
Коммит b0356da4ef
7 изменённых файлов: 16 добавлений и 39 удалений

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

@ -300,7 +300,6 @@ nsMenuPopupFrame::GetNextMenuItem(nsIMenuFrame* aStart, nsIMenuFrame** aResult)
}
else currFrame = mFrames.FirstChild();
nsIFrame* start = currFrame;
while (currFrame) {
nsCOMPtr<nsIContent> current;
currFrame->GetContent(getter_AddRefs(current));

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

@ -159,6 +159,8 @@ nsPopupSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
frames.RemoveFrame(frame);
mPopupFrames.AppendFrame(this, frame);
nsIFrame* first = frames.FirstChild();
rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, first);
return rv;
}
frame->GetNextSibling(&frame);
}

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

@ -647,7 +647,6 @@ nsSliderFrame::SetCurrentPosition(nsIContent* scrollbar, nsIFrame* aThumbFrame,
{
// get our current position and max position from our content node
PRInt32 curpos = GetCurrentPosition(scrollbar);
PRInt32 maxpos = GetMaxPosition(scrollbar);
// get the new position and make sure it is in bounds

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

@ -35,27 +35,6 @@
#include "nsCOMPtr.h"
#include "nsINameSpaceManager.h"
static void ForceDrawFrame(nsIFrame * aFrame)
{
if (aFrame == nsnull) {
return;
}
nsRect rect;
nsIView * view;
nsPoint pnt;
aFrame->GetOffsetFromView(pnt, &view);
aFrame->GetRect(rect);
rect.x = pnt.x;
rect.y = pnt.y;
if (view) {
nsCOMPtr<nsIViewManager> viewMgr;
view->GetViewManager(*getter_AddRefs(viewMgr));
if (viewMgr)
viewMgr->UpdateView(view, rect, 0);
}
}
//
// NS_NewTreeCellFrame
//
@ -125,7 +104,7 @@ nsTreeCellFrame::Init(nsIPresContext& aPresContext,
// Get the table frame.
nsTableFrame* tableFrame = nsnull;
nsresult rv = nsTableFrame::GetTableFrame(rowGroupFrame, tableFrame);
rv = nsTableFrame::GetTableFrame(rowGroupFrame, tableFrame);
if (NS_FAILED(rv) || (nsnull == tableFrame)) {
return rv;
}
@ -362,7 +341,7 @@ nsTreeCellFrame::ToggleOpenClose()
// Take the tree item content and toggle the value of its open attribute.
nsAutoString attrValue;
nsresult result = treeItem->GetAttribute("open", attrValue);
treeItem->GetAttribute("open", attrValue);
attrValue.ToLowerCase();
PRBool isExpanded = (attrValue=="true");
if (isExpanded)
@ -397,7 +376,7 @@ nsTreeCellFrame::Open()
// Take the tree item content and toggle the value of its open attribute.
nsAutoString attrValue;
nsresult result = treeItem->GetAttribute("open", attrValue);
treeItem->GetAttribute("open", attrValue);
attrValue.ToLowerCase();
PRBool isExpanded = (attrValue=="true");
if (!isExpanded) {
@ -426,7 +405,7 @@ nsTreeCellFrame::Close()
// Take the tree item content and toggle the value of its open attribute.
nsAutoString attrValue;
nsresult result = treeItem->GetAttribute("open", attrValue);
treeItem->GetAttribute("open", attrValue);
attrValue.ToLowerCase();
PRBool isExpanded = (attrValue=="true");
if (isExpanded) {

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

@ -33,8 +33,8 @@
nsTreeIndentationFrame::nsTreeIndentationFrame()
{
width = 0;
haveComputedWidth = PR_FALSE;
mWidth = 0;
mHaveComputedWidth = PR_FALSE;
}
nsresult
@ -70,11 +70,10 @@ nsTreeIndentationFrame::Reflow(nsIPresContext& aPresContext,
aMetrics.ascent = 0;
aMetrics.descent = 0;
nscoord width = 0;
// Compute our width based on the depth of our node within the content model
if (!haveComputedWidth)
if (!mHaveComputedWidth)
{
mWidth = 0;
nscoord level = 0;
// First climb out to the tree item level.
@ -109,15 +108,15 @@ nsTreeIndentationFrame::Reflow(nsIPresContext& aPresContext,
level = (level/2) - 1;
if (level < 0) level = 0;
width = level*16; // Hardcode an indentation of 16 pixels for now. TODO: Make this a parameter or something
mWidth = level*16; // Hardcode an indentation of 16 pixels for now. TODO: Make this a parameter or something
}
}
float p2t;
aPresContext.GetScaledPixelsToTwips(&p2t);
if (0 != width) {
aMetrics.width = NSIntPixelsToTwips(width, p2t);
if (0 != mWidth) {
aMetrics.width = NSIntPixelsToTwips(mWidth, p2t);
}
if (nsnull != aMetrics.maxElementSize) {

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

@ -32,6 +32,6 @@ public:
protected:
virtual ~nsTreeIndentationFrame();
nscoord width;
PRBool haveComputedWidth;
nscoord mWidth;
PRBool mHaveComputedWidth;
};

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

@ -342,7 +342,6 @@ nsTreeRowFrame::HandleHeaderDragEvent(nsIPresContext& aPresContext,
for (colX = flexIndex+1; colX < columnCount; colX++) {
// Retrieve the current widths for these columns and compute
// the total amount of space they occupy.
nsTableColFrame* colFrame = tableFrame->GetColFrame(colX);
propTotal += colWidths[colX];
}
@ -392,7 +391,7 @@ nsTreeRowFrame::HandleHeaderDragEvent(nsIPresContext& aPresContext,
treeFrame->SetUseGeneration(PR_FALSE); // Cached rows have to reflow.
treeFrame->UnsuppressReflow();
PRInt32 colWidth = flexWidth - delta;
colWidth = flexWidth - delta;
sprintf(ch,"%d*", colWidth);
nsAutoString propColWidth(ch);
flexContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::width, propColWidth,